From f0d3f0b45a1ab934c4b479350ffcecac420c00e1 Mon Sep 17 00:00:00 2001 From: Jorg Sowa Date: Fri, 5 Jun 2026 10:15:51 +0200 Subject: [PATCH] Store class names in canonical case in the class table --- NEWS | 9 + UPGRADING | 52 ++ UPGRADING.INTERNALS | 18 + Zend/Optimizer/compact_literals.c | 24 +- Zend/Optimizer/dfa_pass.c | 6 +- Zend/Optimizer/optimize_func_calls.c | 8 +- Zend/Optimizer/pass1.c | 2 +- Zend/Optimizer/zend_cfg.c | 4 +- Zend/Optimizer/zend_inference.c | 8 +- Zend/Optimizer/zend_optimizer.c | 53 +- Zend/Optimizer/zend_optimizer_internal.h | 2 +- Zend/Optimizer/zend_ssa.c | 4 +- Zend/tests/add_002.phpt | 2 +- Zend/tests/add_003.phpt | 2 +- Zend/tests/arg_unpack/invalid_type.phpt | 2 +- .../asymmetric_visibility/protected.phpt | 4 +- .../traits/insteadof_unused_warnings.phpt | 2 +- .../deprecated/traits/with_conflicts.phpt | 2 +- Zend/tests/bug18556.phpt | 6 +- Zend/tests/bug45180.phpt | 10 +- Zend/tests/bug51827.phpt | 6 +- Zend/tests/bug70124.phpt | 2 +- Zend/tests/bug70262.phpt | 2 +- Zend/tests/bug70288.phpt | 2 +- Zend/tests/bug70332.phpt | 2 +- Zend/tests/bug78502.phpt | 2 +- .../call_user_func_005.phpt | 2 +- Zend/tests/class_alias/class_alias_002.phpt | 4 +- Zend/tests/class_alias/class_alias_006.phpt | 2 +- Zend/tests/class_alias/class_alias_011.phpt | 2 +- Zend/tests/class_exists_002.phpt | 2 +- .../class_name_case/backslash_prefix.phpt | 32 + Zend/tests/class_name_case/catch_clause.phpt | 39 ++ .../catch_clause_user_handler.phpt | 18 + .../tests/class_name_case/class_constant.phpt | 26 + .../class_exists_functions.phpt | 25 + .../class_keyword_case_insensitive.phpt | 16 + Zend/tests/class_name_case/instanceof.phpt | 16 + .../tests/class_name_case/is_a_functions.phpt | 21 + Zend/tests/class_name_case/magic_method.phpt | 12 + .../magic_method_wrong_case_callstatic.phpt | 10 + .../magic_method_wrong_case_construct.phpt | 10 + .../magic_method_wrong_case_tostring.phpt | 10 + Zend/tests/class_name_case/new_dynamic.phpt | 20 + Zend/tests/class_name_case/new_operator.phpt | 25 + Zend/tests/class_name_case/no_warn.phpt | 43 ++ Zend/tests/class_name_case/static_method.phpt | 26 + .../class_name_case/static_property.phpt | 26 + Zend/tests/closures/bug52193.phpt | 92 +-- Zend/tests/closures/bug77627.phpt | 4 +- Zend/tests/closures/closure_020.phpt | 8 +- Zend/tests/closures/closure_027.phpt | 14 +- Zend/tests/closures/closure_029.phpt | 6 +- Zend/tests/closures/closure_032.phpt | 48 +- Zend/tests/closures/closure_call.phpt | 8 +- .../closures/closure_from_callable_basic.phpt | 33 +- .../closure_invoke_case_insensitive.phpt | 7 +- .../closure_static_property_error.phpt | 4 +- Zend/tests/comparison/compare_001.phpt | 4 +- Zend/tests/comparison/compare_001_64bit.phpt | 4 +- Zend/tests/comparison/compare_002.phpt | 4 +- Zend/tests/comparison/compare_002_64bit.phpt | 4 +- Zend/tests/comparison/compare_003.phpt | 4 +- Zend/tests/comparison/compare_003_64bit.phpt | 4 +- Zend/tests/comparison/compare_004.phpt | 4 +- Zend/tests/comparison/compare_004_64bit.phpt | 4 +- Zend/tests/comparison/compare_005.phpt | 4 +- Zend/tests/comparison/compare_005_64bit.phpt | 4 +- Zend/tests/comparison/compare_006.phpt | 4 +- Zend/tests/comparison/compare_006_64bit.phpt | 4 +- Zend/tests/constant_arrays.phpt | 2 +- Zend/tests/constants/008.phpt | 2 +- Zend/tests/constants/bug46304.phpt | 21 +- .../debug_info-error-case-insensitive.phpt | 20 - Zend/tests/dereference/dereference_004.phpt | 2 +- Zend/tests/dereference/dereference_005.phpt | 2 +- Zend/tests/dynamic_call/bug68475.phpt | 4 +- Zend/tests/errmsg/errmsg_026.phpt | 2 +- Zend/tests/errmsg/errmsg_044.phpt | 4 +- Zend/tests/error_reporting/bug72162.phpt | 2 +- Zend/tests/exceptions/bug50005.phpt | 2 +- Zend/tests/exceptions/bug64821.1.phpt | 2 +- Zend/tests/exceptions/bug64821.2.phpt | 2 +- Zend/tests/exceptions/bug64821.3.phpt | 2 +- Zend/tests/exceptions/bug76025.phpt | 2 +- Zend/tests/exceptions/exception_009.phpt | 4 +- .../exception_handler_005.phpt | 2 +- .../exception_handler_006.phpt | 2 +- .../exception_handler_007.phpt | 2 +- .../constexpr/case_insensitive.phpt | 16 +- Zend/tests/foreach/bug34873.phpt | 2 +- Zend/tests/frameless_jmp_004.phpt | 2 +- Zend/tests/function_exists_basic.phpt | 2 +- Zend/tests/gc/bug64896.phpt | 2 +- Zend/tests/gc/bug69446_2.phpt | 2 +- Zend/tests/gc/gc_033.phpt | 2 +- Zend/tests/generators/bug76427.phpt | 4 +- Zend/tests/generators/gc_order.phpt | 2 +- Zend/tests/get_defined_functions_basic.phpt | 2 +- Zend/tests/get_parent_class_basic.phpt | 2 +- Zend/tests/gh_21699.phpt | 2 +- Zend/tests/gh_21699_static.phpt | 2 +- .../flexible-heredoc-nowdoc-lineno.phpt | 7 +- .../indirect_call_array_002.phpt | 2 +- .../indirect_call_string_001.phpt | 10 +- .../indirect_method_call_004.phpt | 9 +- Zend/tests/inheritance/bug48215_2.phpt | 2 +- Zend/tests/instanceof_001.phpt | 2 +- Zend/tests/inter_007.phpt | 2 +- Zend/tests/interface_exists_002.phpt | 2 +- Zend/tests/lazy_objects/gh20875.phpt | 2 +- .../serialize___serialize_may_initialize.phpt | 2 +- Zend/tests/list/list_001.phpt | 4 +- Zend/tests/list/list_002.phpt | 2 +- Zend/tests/list/list_keyed_ArrayAccess.phpt | 4 +- Zend/tests/list/list_reference_002.phpt | 2 +- Zend/tests/lsb/lsb_015.phpt | 2 +- Zend/tests/lsb/lsb_022.phpt | 8 +- Zend/tests/magic_methods/bug31683.phpt | 29 +- Zend/tests/magic_methods/bug45186.phpt | 30 +- Zend/tests/magic_methods/bug45186_2.phpt | 23 +- Zend/tests/magic_methods/bug48533.phpt | 2 +- Zend/tests/magic_methods/bug70321.phpt | 26 +- Zend/tests/magic_methods/call_static_003.phpt | 17 +- Zend/tests/magic_methods/call_static_004.phpt | 2 +- Zend/tests/magic_methods/call_static_006.phpt | 2 +- .../magic_methods/magic_methods_001.phpt | 4 +- .../magic_methods/magic_methods_006.phpt | 6 +- .../magic_methods/magic_methods_009.phpt | 6 +- ...matic_implementation_case_insensitive.phpt | 23 - Zend/tests/namespaces/ns_021.phpt | 2 +- Zend/tests/namespaces/ns_022.phpt | 2 +- Zend/tests/namespaces/ns_031.phpt | 2 +- Zend/tests/namespaces/ns_032.phpt | 2 +- Zend/tests/namespaces/ns_070.phpt | 4 +- Zend/tests/namespaces/ns_071.phpt | 2 +- Zend/tests/namespaces/ns_072.phpt | 2 +- Zend/tests/namespaces/ns_073.phpt | 4 +- Zend/tests/namespaces/ns_074.phpt | 6 +- Zend/tests/nullsafe_operator/019.phpt | 2 +- Zend/tests/objects/objects_019.phpt | 2 +- Zend/tests/objects/objects_025.phpt | 4 +- Zend/tests/objects/objects_031.phpt | 6 +- Zend/tests/property_exists.phpt | 2 +- Zend/tests/symtable_cache_recursive_dtor.phpt | 2 +- Zend/tests/traits/bug53748.phpt | 10 +- Zend/tests/traits/bug62892.phpt | 2 +- Zend/tests/traits/bug75607.phpt | 2 +- Zend/tests/traits/bug75607a.phpt | 2 +- .../tests/traits/get_declared_traits_004.phpt | 2 +- Zend/tests/traits/trait_exists_002.phpt | 2 +- .../redundant_types/duplicate_class_type.phpt | 4 +- .../tests/type_declarations/scalar_basic.phpt | 2 +- .../scalar_return_basic.phpt | 156 +---- .../scalar_return_basic_64bit.phpt | 156 +---- .../type_declarations/scalar_strict.phpt | 217 +------ .../scalar_strict_64bit.phpt | 217 +------ .../scalar_strict_basic.phpt | 121 +--- .../redundant_types/duplicate_class_type.phpt | 4 +- Zend/tests/typehints/bug43332_1.phpt | 2 +- Zend/tests/typehints/or_null.phpt | 16 +- Zend/tests/use_function/case_insensivity.phpt | 7 +- .../varSyntax/encapsed_string_deref.phpt | 3 +- Zend/tests/varSyntax/new_instanceof_expr.phpt | 2 +- Zend/zend.h | 1 - Zend/zend_API.c | 166 +++--- Zend/zend_API.h | 4 +- Zend/zend_ast.c | 10 +- Zend/zend_attributes.c | 26 +- Zend/zend_attributes.h | 7 +- Zend/zend_autoload.c | 4 +- Zend/zend_autoload.h | 2 +- Zend/zend_builtin_functions.c | 43 +- Zend/zend_closures.c | 2 +- Zend/zend_compile.c | 557 +++++++++--------- Zend/zend_compile.h | 9 +- Zend/zend_constants.c | 64 +- Zend/zend_enum.c | 4 +- Zend/zend_exceptions.c | 2 +- Zend/zend_execute.c | 37 +- Zend/zend_execute.h | 7 +- Zend/zend_execute_API.c | 87 ++- Zend/zend_inheritance.c | 86 ++- Zend/zend_inheritance.h | 4 +- Zend/zend_interfaces.c | 12 +- Zend/zend_object_handlers.c | 36 +- Zend/zend_object_handlers.h | 3 + Zend/zend_opcode.c | 2 - Zend/zend_string.h | 1 - Zend/zend_vm_def.h | 38 +- Zend/zend_vm_execute.h | 268 ++++----- build/gen_stub.php | 12 +- ext/bcmath/tests/gh15968.phpt | 2 +- ext/bcmath/tests/number/gh18641.phpt | 2 +- ext/com_dotnet/tests/27974.phpt | 2 +- ext/com_dotnet/tests/bug33386.phpt | 2 +- ext/com_dotnet/tests/bug34272.phpt | 2 +- ext/com_dotnet/tests/bug39596.phpt | 2 +- ext/com_dotnet/tests/bug45280.phpt | 2 +- ext/com_dotnet/tests/bug49192.phpt | 2 +- ext/com_dotnet/tests/bug63208.phpt | 2 +- ext/com_dotnet/tests/bug66322.phpt | 4 +- ext/com_dotnet/tests/bug66431_0.phpt | 2 +- ext/com_dotnet/tests/bug66431_1.phpt | 6 +- ext/com_dotnet/tests/bug69939.phpt | 2 +- ext/com_dotnet/tests/bug73679.phpt | 2 +- ext/com_dotnet/tests/bug77177.phpt | 4 +- ext/com_dotnet/tests/bug77578.phpt | 2 +- ext/com_dotnet/tests/bug78650.phpt | 2 +- ext/com_dotnet/tests/bug79299.phpt | 2 +- ext/com_dotnet/tests/lookup_error.phpt | 2 +- ext/com_dotnet/tests/variants.phpt | 4 +- ext/com_dotnet/tests/variants_x64.phpt | 6 +- ext/curl/tests/curl_file_upload.phpt | 8 +- ext/date/php_date_arginfo.h | 82 +-- ext/date/tests/DatePeriod_getter.phpt | 4 +- .../tests/DateTimeImmutable_set_state.phpt | 2 +- ...imeImmutable_uninitialised_exceptions.phpt | 4 +- ext/date/tests/DateTimeZone_set_state.phpt | 2 +- .../tests/DateTime_getTimeZone_basic1.phpt | 8 +- .../tests/DateTime_setTimezone_basic1.phpt | 2 +- ext/date/tests/DateTime_set_state.phpt | 2 +- .../DateTime_uninitialised_exceptions.phpt | 4 +- ext/date/tests/bug45529.phpt | 6 +- ext/date/tests/bug45543.phpt | 4 +- ext/date/tests/bug46108.phpt | 2 +- ext/date/tests/bug48097.phpt | 2 +- ext/date/tests/bug48476.phpt | 2 +- ext/date/tests/bug51987.phpt | 2 +- ext/date/tests/bug63435.phpt | 2 +- ext/date/tests/bug67118.phpt | 2 +- ext/date/tests/bug73489.phpt | 12 +- ext/date/tests/bug74173.phpt | 2 +- ext/date/tests/bug76374.phpt | 8 +- ext/date/tests/bug76770.phpt | 2 +- ext/date/tests/bug80483.phpt | 4 +- ext/date/tests/bug81097.phpt | 2 +- ext/date/tests/bug81565.phpt | 2 +- ext/date/tests/date_time_immutable.phpt | 8 +- ext/date/tests/date_timestamp_get.phpt | 2 +- ext/date/tests/gh9891.phpt | 4 +- ...me_and_daylight_saving_time-type3-bd2.phpt | 10 +- ...ime_and_daylight_saving_time-type3-bs.phpt | 8 +- ext/date/tests/timezones-list.phpt | 6 +- .../DOMCDATASection_construct_error_001.phpt | 2 +- .../tests/DOMComment_appendData_basic.phpt | 2 +- .../tests/DOMComment_insertData_basic.phpt | 2 +- .../tests/DOMComment_insertData_error1.phpt | 2 +- .../tests/DOMComment_insertData_error2.phpt | 2 +- .../tests/DOMComment_replaceData_basic.phpt | 4 +- .../tests/DOMComment_replaceData_error1.phpt | 2 +- .../tests/DOMComment_replaceData_error2.phpt | 2 +- ...Document_createEntityReference_error1.phpt | 2 +- .../tests/DOMDocument_saveHTML_variant2.phpt | 4 +- ext/dom/tests/DOMNamedNodeMap_count.phpt | 2 +- .../DOMNamedNodeMap_edge_case_offset.phpt | 2 +- ext/dom/tests/DOMXPath_callables.phpt | 4 +- ext/dom/tests/DomNodeList_count.phpt | 2 +- ext/dom/tests/bug28721.phpt | 8 +- ext/dom/tests/bug28817.phpt | 2 +- ext/dom/tests/bug32615.phpt | 2 +- ext/dom/tests/bug36756.phpt | 4 +- ext/dom/tests/bug37277.phpt | 6 +- ext/dom/tests/bug38474.phpt | 2 +- ext/dom/tests/bug43364.phpt | 4 +- ext/dom/tests/bug45251.phpt | 2 +- ext/dom/tests/bug66783.phpt | 2 +- ext/dom/tests/bug69373.phpt | 2 +- ext/dom/tests/bug75451.phpt | 2 +- ext/dom/tests/bug79852.phpt | 4 +- .../tests/clone_attribute_namespace_01.phpt | 12 +- .../tests/clone_attribute_namespace_02.phpt | 4 +- .../delayed_freeing/element_uaf_crash.phpt | 2 +- ext/dom/tests/dom001.phpt | 10 +- ext/dom/tests/dom003.phpt | 4 +- ext/dom/tests/dom004.phpt | 2 +- ext/dom/tests/dom005.phpt | 2 +- ext/dom/tests/dom006.phpt | 2 +- ext/dom/tests/dom_create_element.phpt | 68 +-- ext/dom/tests/dom_set_attr_node.phpt | 2 +- ext/dom/tests/dom_xinclude.phpt | 4 +- ext/dom/tests/domchardata.phpt | 2 +- ...domdocument_createentityreference_001.phpt | 2 +- ext/dom/tests/domelement.phpt | 8 +- ext/dom/tests/domobject_debug_handler.phpt | 4 +- ext/dom/tests/domxpath.phpt | 4 +- ext/dom/tests/gh11347.phpt | 4 +- ext/dom/tests/gh12455.phpt | 2 +- ext/dom/tests/gh13863.phpt | 6 +- ext/dom/tests/gh15192.phpt | 2 +- ext/dom/tests/gh15570.phpt | 2 +- ext/dom/tests/gh15670.phpt | 4 +- ext/dom/tests/gh17201.phpt | 2 +- ext/dom/tests/gh22077.phpt | 2 +- ext/dom/tests/gh8996.phpt | 6 +- ext/dom/tests/import_attribute_namespace.phpt | 4 +- .../modern/common/Document_title_setter.phpt | 28 +- .../common/Element_insertAdjacentElement.phpt | 8 +- ext/dom/tests/modern/common/gh21077.phpt | 2 +- .../common/innerHTML_cache_invalidation.phpt | 2 +- .../common/namespace_sxe_interaction.phpt | 4 +- .../tests/modern/common/template_cloning.phpt | 4 +- .../tests/modern/common/template_manual.phpt | 8 +- .../tests/modern/common/template_nested.phpt | 2 +- .../modern/common/template_participation.phpt | 8 +- .../tests/modern/css_selectors/attribute.phpt | 2 +- .../tests/modern/css_selectors/closest.phpt | 2 +- .../closest_invalid_selector.phpt | 2 +- .../modern/css_selectors/combinators.phpt | 2 +- .../tests/modern/css_selectors/gh20395.phpt | 2 +- ext/dom/tests/modern/css_selectors/id.phpt | 2 +- .../matches_invalid_selector.phpt | 2 +- .../modern/css_selectors/namespaces.phpt | 2 +- .../css_selectors/pseudo_classes_blank.phpt | 2 +- .../css_selectors/pseudo_classes_checked.phpt | 2 +- .../css_selectors/pseudo_classes_current.phpt | 2 +- .../css_selectors/pseudo_classes_dir.phpt | 2 +- .../pseudo_classes_disabled_enabled.phpt | 2 +- .../css_selectors/pseudo_classes_empty.phpt | 2 +- .../pseudo_classes_first_last_child.phpt | 2 +- .../css_selectors/pseudo_classes_has.phpt | 2 +- .../pseudo_classes_is_where.phpt | 2 +- .../css_selectors/pseudo_classes_lang.phpt | 2 +- .../css_selectors/pseudo_classes_links.phpt | 2 +- .../css_selectors/pseudo_classes_no_op.phpt | 2 +- .../pseudo_classes_nth_child.phpt | 2 +- .../pseudo_classes_nth_child_of.phpt | 2 +- .../css_selectors/pseudo_classes_nth_col.phpt | 2 +- .../pseudo_classes_only_child.phpt | 2 +- .../pseudo_classes_only_of_type.phpt | 2 +- .../pseudo_classes_optional_required.phpt | 2 +- .../pseudo_classes_placeholder_shown.phpt | 2 +- .../pseudo_classes_read_write_read_only.phpt | 2 +- .../css_selectors/pseudo_classes_root.phpt | 4 +- .../modern/css_selectors/pseudo_elements.phpt | 2 +- .../modern/css_selectors/quirks_mode.phpt | 4 +- .../tests/modern/css_selectors/test_utils.inc | 8 +- .../Element_getDescendantNamespaces.phpt | 2 +- .../Element_renaming_html_ns_01.phpt | 2 +- .../Element_renaming_html_ns_02.phpt | 2 +- .../Element_substitutedNodeValue.phpt | 6 +- .../attribute_renaming_conflict.phpt | 4 +- .../modern/extensions/node_renaming.phpt | 2 +- .../node_renaming_validation_errors.phpt | 2 +- .../interactions/Document_body_setter.phpt | 10 +- .../Document_body_setter_errors.phpt | 4 +- .../Dom_Element_insertAdjacentHTML.phpt | 4 +- .../modern/html/parser/Element_innerHTML.phpt | 26 +- .../modern/html/parser/Element_outerHTML.phpt | 6 +- ext/dom/tests/modern/html/parser/gh17485.phpt | 2 +- ext/dom/tests/modern/html/parser/gh18090.phpt | 4 +- .../html/serializer/Element_innerHTML.phpt | 2 +- .../Element_outerHTML_invalid_tree.phpt | 2 +- .../html/serializer/legacy_null_content.phpt | 2 +- ..._deleteData_negative_in_bounds_length.phpt | 2 +- ...Data_insertData_negative_offset_mod32.phpt | 4 +- ...Data_replaceData_negative_count_mod32.phpt | 4 +- ...ubstringData_negative_arguments_mod32.phpt | 6 +- .../modern/spec/appendChild_dtd_legacy.phpt | 2 +- .../attribute_entity_expansion_legacy.phpt | 14 +- ext/dom/tests/modern/spec/dump_attr.inc | 4 +- ext/dom/tests/modern/spec/element_dump.inc | 4 +- ext/dom/tests/modern/token_list/add.phpt | 6 +- .../tests/modern/token_list/add_errors.phpt | 4 +- ext/dom/tests/modern/token_list/attlist.phpt | 4 +- .../modern/token_list/change_attribute.phpt | 2 +- ext/dom/tests/modern/token_list/clone.phpt | 2 +- ext/dom/tests/modern/token_list/contains.phpt | 2 +- .../modern/token_list/contains_empty.phpt | 2 +- .../modern/token_list/contains_error.phpt | 2 +- ext/dom/tests/modern/token_list/count.phpt | 2 +- ext/dom/tests/modern/token_list/debug.phpt | 2 +- .../tests/modern/token_list/dimensions.phpt | 2 +- .../modern/token_list/dimensions_error.phpt | 2 +- ext/dom/tests/modern/token_list/entities.phpt | 4 +- ext/dom/tests/modern/token_list/equality.phpt | 2 +- .../modern/token_list/foreach_by_ref.phpt | 2 +- .../tests/modern/token_list/getIterator.phpt | 2 +- ext/dom/tests/modern/token_list/item.phpt | 2 +- .../tests/modern/token_list/iteration_01.phpt | 2 +- .../tests/modern/token_list/iteration_02.phpt | 2 +- .../iterator_modification_invalidation.phpt | 2 +- ext/dom/tests/modern/token_list/remove.phpt | 10 +- .../modern/token_list/remove_errors.phpt | 4 +- .../modern/token_list/removed_element.phpt | 2 +- ext/dom/tests/modern/token_list/replace.phpt | 14 +- .../modern/token_list/replace_error.phpt | 2 +- ext/dom/tests/modern/token_list/supports.phpt | 2 +- ext/dom/tests/modern/token_list/toggle.phpt | 16 +- .../tests/modern/token_list/toggle_error.phpt | 2 +- .../modern/token_list/value_edge_cases.phpt | 2 +- .../Element_innerHTML_prefixed_writing.phpt | 2 +- .../modern/xml/Element_innerHTML_writing.phpt | 20 +- .../xml/Element_innerHTML_writing_errors.phpt | 6 +- .../xml/Element_innerOuterHTML_reading.phpt | 4 +- ...Element_innerOuterHTML_reading_errors.phpt | 2 +- .../xml/Element_insertAdjacentHTML.phpt | 2 +- .../modern/xml/Element_outerHTML_writing.phpt | 8 +- .../xml/return_dom_node_from_xpath.phpt | 2 +- ext/dom/tests/php_function_edge_cases.phpt | 4 +- ext/dom/tests/xml_parsing_LIBXML_NO_XXE.phpt | 2 +- ext/dom/tests/xml_parsing_LIBXML_RECOVER.phpt | 2 +- ext/dom/tests/xpath_context_node.phpt | 2 +- ext/dom/tests/xpath_domnamespacenode.phpt | 2 +- ext/dom/tests/xpath_evaluate_basic_types.phpt | 2 +- ext/ffi/tests/038.phpt | 2 +- ext/ffi/tests/list.phpt | 2 +- ext/fileinfo/tests/mime_content_type_001.phpt | 2 +- ext/filter/tests/039.phpt | 2 +- ext/filter/tests/bug67167.01.phpt | 2 +- ext/gd/tests/bug19366.phpt | 36 +- ext/gd/tests/bug22544-mb.phpt | 10 +- ext/gd/tests/bug22544.phpt | 10 +- ext/gd/tests/bug27582_1.phpt | 8 +- ext/gd/tests/bug43121.phpt | 10 +- ext/gd/tests/bug48555.phpt | 4 +- ext/gmp/tests/gmp_intval.phpt | 2 +- ext/gmp/tests/gmp_nextprime.phpt | 2 +- ext/gmp/tests/gmp_strval.phpt | 2 +- ext/gmp/tests/gmp_sub.phpt | 4 +- .../breakiterator/breakiterator_iterators.cpp | 2 +- ext/intl/calendar/calendar_methods.cpp | 4 +- ext/intl/common/common_date.cpp | 2 +- ext/intl/converter/converter.cpp | 2 +- ext/intl/tests/breakiter_setText_basic.phpt | 2 +- ext/intl/tests/bug75193.phpt | 2 +- .../tests/calendar_createInstance_basic.phpt | 6 +- .../calendar_createInstance_variation1.phpt | 20 +- .../tests/calendar_setTimeZone_error2.phpt | 4 +- .../calendar_setTimeZone_variation2.phpt | 4 +- ext/intl/tests/calendar_toDateTime_basic.phpt | 2 +- .../dateformat___construct_bad_tz_cal.phpt | 2 +- .../tests/dateformat_formatObject_error.phpt | 2 +- ...format_get_set_calendar_variant_icu70.phpt | 2 +- .../dateformat_get_set_timezone_variant5.phpt | 2 +- .../gregoriancalendar___construct_basic.phpt | 10 +- ...regoriancalendar___construct_variant1.phpt | 2 +- .../tests/intltz_get_canonical_id_refs.phpt | 2 +- ext/intl/tests/locale_subtags.phpt | 4 +- ext/intl/tests/msgfmt_format_error5.phpt | 2 +- ext/intl/tests/spoofchecker_008.phpt | 2 +- .../timezone_fromDateTimeZone_basic.phpt | 4 +- .../timezone_fromDateTimeZone_error.phpt | 2 +- .../tests/timezone_getCanonicalID_basic.phpt | 4 +- ext/intl/tests/timezone_getTZData_basic.phpt | 4 +- ext/json/json_encoder.c | 2 +- ext/json/tests/004.phpt | 2 +- ext/json/tests/bug54058.phpt | 4 +- ext/json/tests/serialize.phpt | 2 +- ext/libxml/tests/004.phpt | 2 +- ext/libxml/tests/bug79191.phpt | 2 +- ext/opcache/ZendAccelerator.c | 31 +- ext/opcache/ZendAccelerator.h | 3 +- ext/opcache/jit/zend_jit.c | 6 +- ext/opcache/jit/zend_jit_helpers.c | 10 +- ext/opcache/jit/zend_jit_ir.c | 6 +- .../array_map_foreach_optimization_004.phpt | 2 +- ext/opcache/tests/bug73402.phpt | 2 +- ext/opcache/tests/bug81046.phpt | 2 +- ext/opcache/tests/compact_literals.phpt | 22 +- ext/opcache/tests/gh18050.phpt | 2 +- ext/opcache/tests/jit/fetch_obj_003.phpt | 2 +- ext/opcache/tests/opt/gh14873.phpt | 14 +- ext/opcache/tests/opt/sccp_014.phpt | 2 +- ext/opcache/tests/opt/sccp_015.phpt | 2 +- ext/opcache/tests/opt/sccp_037.phpt | 2 +- .../opt/type_inference_class_consts4.phpt | 2 +- ext/opcache/zend_accelerator_util_funcs.c | 33 +- ext/opcache/zend_file_cache.c | 12 +- ext/opcache/zend_persist.c | 16 +- ext/opcache/zend_persist_calc.c | 6 +- .../tests/openssl_cms_decrypt_error.phpt | 4 +- ext/openssl/tests/openssl_encrypt_error.phpt | 2 +- .../tests/openssl_pkcs7_decrypt_error.phpt | 4 +- ext/pcre/tests/preg_grep_error1.phpt | 2 +- ext/pcre/tests/preg_match_all_error1.phpt | 2 +- ext/pcre/tests/preg_match_error1.phpt | 2 +- ext/pcre/tests/preg_replace_error1.phpt | 2 +- ext/pcre/tests/preg_replace_error2.phpt | 2 +- ext/pcre/tests/preg_split_error1.phpt | 2 +- ext/pdo/pdo_dbh.c | 11 +- ext/pdo/pdo_stmt.c | 8 +- ext/pdo/tests/pdo_017.phpt | 2 +- ext/pdo/tests/pdo_023.phpt | 2 +- ext/pdo/tests/pdo_026.phpt | 2 +- ext/pdo/tests/pdo_029.phpt | 2 +- ext/pdo/tests/pdo_030.phpt | 2 +- ext/pdo/tests/pdo_036.phpt | 4 +- ...do_fetch_function_incorrect_callables.phpt | 6 +- ...tch_function_overload_statement_class.phpt | 2 +- ext/pdo_dblib/tests/bug_38955.phpt | 2 +- .../tests/attr_datetime_format.phpt | 18 +- .../tests/autocommit_change_mode.phpt | 4 +- ext/pdo_firebird/tests/ddl.phpt | 2 +- ext/pdo_firebird/tests/ddl2.phpt | 2 +- ext/pdo_mysql/tests/bug41125.phpt | 8 +- ext/pdo_mysql/tests/gh16314.phpt | 4 +- .../tests/pdo_mysql_begintransaction.phpt | 4 +- .../pdo_mysql_multi_stmt_nextrowset.phpt | 4 +- .../pdo_mysql_stmt_fetch_non_select.phpt | 2 +- .../tests/pdo_mysql_stmt_nextrowset.phpt | 10 +- .../tests/pdo_mysql_stmt_unbuffered_2050.phpt | 2 +- .../pdo_mysql_stmt_variable_columncount.phpt | 2 +- ext/pdo_mysql/tests/pdomysql_002.phpt | 2 +- ext/pdo_mysql/tests/pdomysql_003.phpt | 2 +- .../tests/autocommit_change_mode.phpt | 4 +- ext/pdo_odbc/tests/common.phpt | 2 +- ext/pdo_odbc/tests/gh9372.phpt | 2 +- ext/pdo_pgsql/tests/bug46274.phpt | 8 +- ext/pdo_pgsql/tests/bug46274_2.phpt | 8 +- ext/pdo_pgsql/tests/bug66584.phpt | 2 +- ext/pdo_pgsql/tests/bug70861.phpt | 2 +- ext/pdo_pgsql/tests/bug_49985.phpt | 2 +- ext/pdo_pgsql/tests/copy_from.phpt | 18 +- ext/pdo_pgsql/tests/gh16314.phpt | 4 +- ext/pdo_pgsql/tests/gh9411.phpt | 2 +- ext/pdo_pgsql/tests/issue78621.inc | 2 +- ext/pdo_pgsql/tests/pdopgsql_002.phpt | 2 +- ext/pdo_pgsql/tests/pdopgsql_003.phpt | 2 +- ext/pdo_pgsql/tests/result_memory_size.phpt | 2 +- .../tests/pdo_sqlite_transaction.phpt | 2 +- ext/pdo_sqlite/tests/subclasses/gc.phpt | 2 +- .../pdo_sqlite_transaction_mode.phpt | 34 +- .../tests/subclasses/pdosqlite_002.phpt | 2 +- .../tests/subclasses/pdosqlite_003.phpt | 2 +- ext/phar/phar/pharcommand.inc | 2 +- ext/phar/tests/bug46032.phpt | 10 +- ext/phar/tests/bug54395.phpt | 2 +- ext/phar/tests/bug60164.phpt | 2 +- ext/phar/tests/bug69720.phpt | 4 +- ext/phar/tests/bug71391.phpt | 2 +- ext/phar/tests/bug73764.phpt | 2 +- ext/phar/tests/bug73768.phpt | 2 +- ext/phar/tests/bug75102.phpt | 2 +- ext/phar/tests/cached_manifest_1.phpt | 2 +- ext/phar/tests/gh20732.phpt | 4 +- ext/phar/tests/mounteddir.phpt | 2 +- ext/phar/tests/phar_copy.phpt | 10 +- ext/phar/tests/phar_ctx_001.phpt | 10 +- ext/phar/tests/phar_dir_iterate.phpt | 2 +- ext/phar/tests/phar_metadata_read.phpt | 12 +- ext/phar/tests/phar_metadata_write3.phpt | 4 +- ext/phar/tests/phar_oo_003.phpt | 2 +- ext/phar/tests/phar_oo_005.phpt | 2 +- ext/phar/tests/phar_stub_error.phpt | 2 +- ext/phar/tests/tar/bignames_overflow.phpt | 2 +- ext/phar/tests/tar/bug49910.phpt | 2 +- ext/phar/tests/tar/phar_copy.phpt | 10 +- ext/phar/tests/tar/phar_stub_error.phpt | 2 +- ext/phar/tests/tar/tar_003.phpt | 4 +- ext/phar/tests/tar/tar_004.phpt | 4 +- ext/phar/tests/tar/tar_bz2.phpt | 4 +- ext/phar/tests/tar/tar_gzip.phpt | 4 +- ext/phar/tests/zf_test.phpt | 2 +- ext/phar/tests/zip/files/zipmaker.php.inc | 6 +- ext/phar/tests/zip/odt.phpt | 4 +- ext/phar/tests/zip/phar_copy.phpt | 10 +- ext/phar/tests/zip/phar_stub_error.phpt | 2 +- ext/phar/tests/zip/unixzip.phpt | 8 +- ext/readline/readline_cli.c | 15 +- ext/reflection/php_reflection.c | 110 ++-- ext/reflection/php_reflection_arginfo.h | 72 +-- ext/reflection/tests/009.phpt | 6 +- ext/reflection/tests/025.phpt | 6 +- ...eflectionClass_getExtensionName_basic.phpt | 2 +- ...ctionClass_getExtensionName_variation.phpt | 2 +- .../ReflectionClass_getExtension_basic.phpt | 2 +- ...eflectionClass_getExtension_variation.phpt | 2 +- .../ReflectionClass_getInterfaces_003.phpt | 2 +- .../tests/ReflectionClass_getMethod_001.phpt | 48 +- .../ReflectionClass_getProperty_001.phpt | 8 +- .../ReflectionClass_getProperty_002.phpt | 8 +- .../ReflectionClass_getProperty_003.phpt | 8 +- .../ReflectionClass_getProperty_004.phpt | 8 +- .../tests/ReflectionClass_hasMethod_001.phpt | 12 +- .../ReflectionClass_hasMethod_basic.phpt | 2 +- .../ReflectionClass_isCloneable_001.phpt | 10 +- .../ReflectionClass_isInstantiable_basic.phpt | 4 +- ...lectionClass_isInstantiable_variation.phpt | 4 +- ...lectionClass_isIterateable_variation1.phpt | 2 +- ...onClass_newInstanceWithoutConstructor.phpt | 2 +- .../ReflectionMethod_getClosure_basic.phpt | 2 +- .../ReflectionMethod_getClosure_error.phpt | 2 +- .../ReflectionMethod_getModifiers_basic.phpt | 8 +- ...eflectionMethod_tentative_return_type.phpt | 2 +- .../ReflectionObject_FileInfo_basic.phpt | 2 +- .../ReflectionObject___toString_basic1.phpt | 2 +- .../ReflectionObject___toString_basic2.phpt | 2 +- ...ReflectionObject_isInstantiable_basic.phpt | 4 +- ...ectionObject_isInstantiable_variation.phpt | 4 +- ext/reflection/tests/bug26695.phpt | 4 +- ext/reflection/tests/bug29268.phpt | 2 +- ext/reflection/tests/bug36434.phpt | 2 +- ext/reflection/tests/bug46064.phpt | 8 +- ext/reflection/tests/bug46064_2.phpt | 2 +- ext/reflection/tests/bug49719.phpt | 2 +- ext/reflection/tests/bug52057.phpt | 4 +- ext/reflection/tests/bug60367.phpt | 2 +- ext/reflection/tests/types/dnf_types.phpt | 6 +- .../tests/types/dnf_types_with_null.phpt | 6 +- .../tests/types/intersection_types.phpt | 6 +- ext/reflection/tests/types/union_types.phpt | 8 +- ext/session/session.c | 13 +- .../user_session_module/save_handler.inc | 2 +- ext/simplexml/tests/036.phpt | 2 +- ext/simplexml/tests/037.phpt | 2 +- ext/simplexml/tests/bug38406.phpt | 2 +- ext/simplexml/tests/bug41175.phpt | 2 +- ext/simplexml/tests/bug41582.phpt | 2 +- ext/simplexml/tests/bug43221.phpt | 2 +- ext/simplexml/tests/bug44478.phpt | 2 +- ext/simplexml/tests/bug55098.phpt | 2 +- ext/simplexml/tests/bug63575.phpt | 4 +- .../tests/simplexml_import_new_dom.phpt | 2 +- .../tests/simplexml_import_old_dom.phpt | 2 +- ext/soap/php_encoding.c | 3 +- ext/soap/php_sdl.c | 13 +- ext/soap/soap.c | 21 +- ext/soap/tests/bugs/bug28985.phpt | 2 +- ext/soap/tests/bugs/bug31422.phpt | 2 +- ext/soap/tests/bugs/bug31755.phpt | 4 +- ext/soap/tests/bugs/bug36629.phpt | 4 +- ext/soap/tests/bugs/bug41566.phpt | 4 +- ext/soap/tests/bugs/bug48557.phpt | 2 +- ext/soap/tests/bugs/bug49169.phpt | 6 +- ext/soap/tests/bugs/bug50997.phpt | 2 +- ext/soap/tests/bugs/bug55639.phpt | 2 +- ext/soap/tests/bugs/bug66112.phpt | 2 +- ext/soap/tests/bugs/bug70875.phpt | 4 +- ext/soap/tests/bugs/bug73037.phpt | 2 +- ext/soap/tests/bugs/bug73182.phpt | 2 +- ext/soap/tests/bugs/bug76232.phpt | 2 +- ext/soap/tests/custom_content_type.phpt | 4 +- .../interop/Round2/Base/r2_base_001p.phpt | 4 +- .../interop/Round2/Base/r2_base_001s.phpt | 4 +- .../interop/Round2/Base/r2_base_001w.phpt | 4 +- .../interop/Round2/Base/r2_base_002p.phpt | 4 +- .../interop/Round2/Base/r2_base_002s.phpt | 4 +- .../interop/Round2/Base/r2_base_002w.phpt | 4 +- .../interop/Round2/Base/r2_base_003p.phpt | 4 +- .../interop/Round2/Base/r2_base_003s.phpt | 4 +- .../interop/Round2/Base/r2_base_003w.phpt | 4 +- .../interop/Round2/Base/r2_base_004p.phpt | 4 +- .../interop/Round2/Base/r2_base_004s.phpt | 4 +- .../interop/Round2/Base/r2_base_004w.phpt | 4 +- .../interop/Round2/Base/r2_base_005p.phpt | 4 +- .../interop/Round2/Base/r2_base_005s.phpt | 4 +- .../interop/Round2/Base/r2_base_005w.phpt | 4 +- .../interop/Round2/Base/r2_base_006p.phpt | 4 +- .../interop/Round2/Base/r2_base_006s.phpt | 4 +- .../interop/Round2/Base/r2_base_006w.phpt | 4 +- .../interop/Round2/Base/r2_base_007p.phpt | 4 +- .../interop/Round2/Base/r2_base_007s.phpt | 4 +- .../interop/Round2/Base/r2_base_007w.phpt | 4 +- .../interop/Round2/Base/r2_base_008p.phpt | 4 +- .../interop/Round2/Base/r2_base_008s.phpt | 4 +- .../interop/Round2/Base/r2_base_008w.phpt | 4 +- .../interop/Round2/Base/r2_base_009p.phpt | 4 +- .../interop/Round2/Base/r2_base_009s.phpt | 4 +- .../interop/Round2/Base/r2_base_009w.phpt | 4 +- .../interop/Round2/Base/r2_base_010p.phpt | 4 +- .../interop/Round2/Base/r2_base_010s.phpt | 6 +- .../interop/Round2/Base/r2_base_010w.phpt | 4 +- .../interop/Round2/Base/r2_base_011p.phpt | 4 +- .../interop/Round2/Base/r2_base_011s.phpt | 4 +- .../interop/Round2/Base/r2_base_011w.phpt | 4 +- .../interop/Round2/Base/r2_base_012p.phpt | 4 +- .../interop/Round2/Base/r2_base_012s.phpt | 4 +- .../interop/Round2/Base/r2_base_012w.phpt | 4 +- .../interop/Round2/Base/r2_base_013p.phpt | 4 +- .../interop/Round2/Base/r2_base_013s.phpt | 4 +- .../interop/Round2/Base/r2_base_013w.phpt | 4 +- .../interop/Round2/Base/r2_base_014p.phpt | 4 +- .../interop/Round2/Base/r2_base_014s.phpt | 4 +- .../interop/Round2/Base/r2_base_014w.phpt | 4 +- .../interop/Round2/Base/r2_base_015p.phpt | 4 +- .../interop/Round2/Base/r2_base_015s.phpt | 4 +- .../interop/Round2/Base/r2_base_015w.phpt | 4 +- .../interop/Round2/Base/r2_base_016p.phpt | 4 +- .../interop/Round2/Base/r2_base_016s.phpt | 4 +- .../interop/Round2/Base/r2_base_016w.phpt | 4 +- .../interop/Round2/Base/r2_base_017p.phpt | 4 +- .../interop/Round2/Base/r2_base_017s.phpt | 4 +- .../interop/Round2/Base/r2_base_017w.phpt | 4 +- .../interop/Round2/Base/r2_base_018p.phpt | 4 +- .../interop/Round2/Base/r2_base_018s.phpt | 4 +- .../interop/Round2/Base/r2_base_018w.phpt | 4 +- .../interop/Round2/Base/r2_base_019p.phpt | 4 +- .../interop/Round2/Base/r2_base_019s.phpt | 4 +- .../interop/Round2/Base/r2_base_019w.phpt | 4 +- .../interop/Round2/Base/r2_base_020p.phpt | 4 +- .../interop/Round2/Base/r2_base_020s.phpt | 4 +- .../interop/Round2/Base/r2_base_020w.phpt | 4 +- .../interop/Round2/Base/r2_base_021p.phpt | 4 +- .../interop/Round2/Base/r2_base_021s.phpt | 4 +- .../interop/Round2/Base/r2_base_021w.phpt | 4 +- .../interop/Round2/Base/r2_base_022p.phpt | 4 +- .../interop/Round2/Base/r2_base_022s.phpt | 4 +- .../interop/Round2/Base/r2_base_022w.phpt | 4 +- .../interop/Round2/Base/r2_base_023p.phpt | 4 +- .../interop/Round2/Base/r2_base_023s.phpt | 4 +- .../interop/Round2/Base/r2_base_023w.phpt | 4 +- .../interop/Round2/Base/r2_base_024p.phpt | 4 +- .../interop/Round2/Base/r2_base_024s.phpt | 4 +- .../interop/Round2/Base/r2_base_024w.phpt | 4 +- .../interop/Round2/GroupB/r2_groupB_001p.phpt | 4 +- .../interop/Round2/GroupB/r2_groupB_001s.phpt | 4 +- .../interop/Round2/GroupB/r2_groupB_001w.phpt | 4 +- .../interop/Round2/GroupB/r2_groupB_002p.phpt | 4 +- .../interop/Round2/GroupB/r2_groupB_002s.phpt | 4 +- .../interop/Round2/GroupB/r2_groupB_002w.phpt | 4 +- .../interop/Round2/GroupB/r2_groupB_003p.phpt | 4 +- .../interop/Round2/GroupB/r2_groupB_003s.phpt | 4 +- .../interop/Round2/GroupB/r2_groupB_003w.phpt | 4 +- .../interop/Round2/GroupB/r2_groupB_004p.phpt | 4 +- .../interop/Round2/GroupB/r2_groupB_004s.phpt | 4 +- .../interop/Round2/GroupB/r2_groupB_004w.phpt | 4 +- .../interop/Round2/GroupB/r2_groupB_005p.phpt | 4 +- .../interop/Round2/GroupB/r2_groupB_005s.phpt | 4 +- .../interop/Round2/GroupB/r2_groupB_005w.phpt | 4 +- .../GroupD/r3_groupD_compound1_001w.phpt | 4 +- .../GroupD/r3_groupD_compound1_002w.phpt | 4 +- .../GroupD/r3_groupD_compound1_003w.phpt | 4 +- .../GroupD/r3_groupD_compound2_001w.phpt | 4 +- .../Round3/GroupD/r3_groupD_doclit_001w.phpt | 4 +- .../Round3/GroupD/r3_groupD_doclit_002w.phpt | 4 +- .../Round3/GroupD/r3_groupD_doclit_003w.phpt | 4 +- .../Round3/GroupD/r3_groupD_doclit_004w.phpt | 4 +- .../GroupD/r3_groupD_doclitparams_001w.phpt | 4 +- .../GroupD/r3_groupD_doclitparams_002w.phpt | 4 +- .../GroupD/r3_groupD_doclitparams_003w.phpt | 4 +- .../GroupD/r3_groupD_doclitparams_004w.phpt | 4 +- .../Round3/GroupD/r3_groupD_emptysa_001w.phpt | 4 +- .../Round3/GroupD/r3_groupD_import1_001w.phpt | 4 +- .../Round3/GroupD/r3_groupD_import2_001w.phpt | 4 +- .../Round3/GroupD/r3_groupD_import3_001w.phpt | 4 +- .../Round3/GroupD/r3_groupD_import3_002w.phpt | 4 +- .../Round3/GroupD/r3_groupD_rpcenc_001w.phpt | 4 +- .../Round3/GroupD/r3_groupD_rpcenc_002w.phpt | 4 +- .../Round3/GroupD/r3_groupD_rpcenc_003w.phpt | 4 +- .../Round3/GroupD/r3_groupD_rpcenc_004w.phpt | 4 +- .../Round3/GroupE/r3_groupE_list_001w.phpt | 4 +- .../Round3/GroupE/r3_groupE_list_002w.phpt | 4 +- .../Round3/GroupE/r3_groupE_list_003w.phpt | 4 +- .../Round3/GroupE/r3_groupE_list_004w.phpt | 4 +- .../Round3/GroupE/r3_groupE_list_005w.phpt | 4 +- .../Round3/GroupE/r3_groupE_list_006w.phpt | 4 +- .../Round3/GroupF/r3_groupF_ext_001w.phpt | 4 +- .../Round3/GroupF/r3_groupF_extreq_001w.phpt | 4 +- .../Round3/GroupF/r3_groupF_headers_001w.phpt | 4 +- .../Round3/GroupF/r3_groupF_headers_002w.phpt | 4 +- .../Round3/GroupF/r3_groupF_headers_003w.phpt | 4 +- .../Round3/GroupF/r3_groupF_headers_004w.phpt | 4 +- .../GroupH/r4_groupH_complex_doclit_001w.phpt | 4 +- .../GroupH/r4_groupH_complex_doclit_002w.phpt | 4 +- .../GroupH/r4_groupH_complex_doclit_003w.phpt | 4 +- .../GroupH/r4_groupH_complex_doclit_004w.phpt | 4 +- .../GroupH/r4_groupH_complex_doclit_005w.phpt | 4 +- .../GroupH/r4_groupH_complex_doclit_006w.phpt | 4 +- .../GroupH/r4_groupH_complex_doclit_007w.phpt | 4 +- .../GroupH/r4_groupH_complex_doclit_008w.phpt | 4 +- .../GroupH/r4_groupH_complex_doclit_009w.phpt | 4 +- .../GroupH/r4_groupH_complex_doclit_010w.phpt | 4 +- .../GroupH/r4_groupH_complex_rpcenc_001w.phpt | 4 +- .../GroupH/r4_groupH_complex_rpcenc_002w.phpt | 4 +- .../GroupH/r4_groupH_complex_rpcenc_003w.phpt | 4 +- .../GroupH/r4_groupH_complex_rpcenc_004w.phpt | 4 +- .../GroupH/r4_groupH_complex_rpcenc_005w.phpt | 4 +- .../GroupH/r4_groupH_complex_rpcenc_006w.phpt | 4 +- .../GroupH/r4_groupH_complex_rpcenc_007w.phpt | 4 +- .../GroupH/r4_groupH_complex_rpcenc_008w.phpt | 4 +- .../GroupH/r4_groupH_complex_rpcenc_009w.phpt | 4 +- .../GroupH/r4_groupH_complex_rpcenc_010w.phpt | 4 +- .../GroupH/r4_groupH_simple_doclit_001w.phpt | 4 +- .../GroupH/r4_groupH_simple_doclit_002w.phpt | 4 +- .../GroupH/r4_groupH_simple_doclit_003w.phpt | 4 +- .../GroupH/r4_groupH_simple_doclit_004w.phpt | 4 +- .../GroupH/r4_groupH_simple_doclit_005w.phpt | 4 +- .../GroupH/r4_groupH_simple_doclit_006w.phpt | 4 +- .../GroupH/r4_groupH_simple_doclit_007w.phpt | 4 +- .../GroupH/r4_groupH_simple_doclit_008w.phpt | 4 +- .../GroupH/r4_groupH_simple_doclit_009w.phpt | 4 +- .../GroupH/r4_groupH_simple_doclit_010w.phpt | 4 +- .../GroupH/r4_groupH_simple_doclit_011w.phpt | 4 +- .../GroupH/r4_groupH_simple_doclit_012w.phpt | 4 +- .../GroupH/r4_groupH_simple_doclit_013w.phpt | 4 +- .../GroupH/r4_groupH_simple_doclit_014w.phpt | 4 +- .../GroupH/r4_groupH_simple_doclit_015w.phpt | 4 +- .../GroupH/r4_groupH_simple_doclit_016w.phpt | 4 +- .../GroupH/r4_groupH_simple_doclit_017w.phpt | 4 +- .../GroupH/r4_groupH_simple_rpcenc_001w.phpt | 4 +- .../GroupH/r4_groupH_simple_rpcenc_002w.phpt | 4 +- .../GroupH/r4_groupH_simple_rpcenc_003w.phpt | 4 +- .../GroupH/r4_groupH_simple_rpcenc_004w.phpt | 4 +- .../GroupH/r4_groupH_simple_rpcenc_005w.phpt | 4 +- .../GroupH/r4_groupH_simple_rpcenc_006w.phpt | 4 +- .../GroupH/r4_groupH_simple_rpcenc_007w.phpt | 4 +- .../GroupH/r4_groupH_simple_rpcenc_008w.phpt | 4 +- .../GroupH/r4_groupH_simple_rpcenc_009w.phpt | 4 +- .../GroupH/r4_groupH_simple_rpcenc_010w.phpt | 4 +- .../GroupH/r4_groupH_simple_rpcenc_011w.phpt | 4 +- .../GroupH/r4_groupH_simple_rpcenc_012w.phpt | 4 +- .../GroupH/r4_groupH_simple_rpcenc_013w.phpt | 4 +- .../GroupH/r4_groupH_simple_rpcenc_014w.phpt | 4 +- .../GroupH/r4_groupH_simple_rpcenc_015w.phpt | 4 +- .../GroupH/r4_groupH_simple_rpcenc_016w.phpt | 4 +- .../GroupH/r4_groupH_simple_rpcenc_017w.phpt | 4 +- .../GroupH/r4_groupH_soapfault_001w.phpt | 4 +- .../GroupH/r4_groupH_soapfault_002w.phpt | 4 +- .../GroupH/r4_groupH_soapfault_004w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_001w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_002w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_003w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_004w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_005w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_006w.phpt | Bin 1039 -> 1039 bytes .../Round4/GroupI/r4_groupI_xsd_007w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_008w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_009w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_010w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_011w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_012w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_013w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_014w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_015w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_016w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_017w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_018w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_019w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_020w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_021w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_022w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_023w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_024w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_025w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_026w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_027w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_028w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_029w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_030w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_031w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_032w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_033w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_034w.phpt | 4 +- .../Round4/GroupI/r4_groupI_xsd_035w.phpt | 4 +- ext/soap/tests/schema/test_schema.inc | 4 +- ext/soap/tests/server001.phpt | 4 +- ext/soap/tests/server002.phpt | 4 +- ext/soap/tests/server003.phpt | 4 +- ext/soap/tests/server004.phpt | 4 +- ext/soap/tests/server005.phpt | 4 +- ext/soap/tests/server006.phpt | 4 +- ext/soap/tests/server007.phpt | 6 +- ext/soap/tests/server008.phpt | 6 +- ext/soap/tests/server009.phpt | 6 +- ext/soap/tests/server010.phpt | 6 +- ext/soap/tests/server011.phpt | 2 +- ext/soap/tests/server012.phpt | 4 +- ext/soap/tests/server013.phpt | 6 +- ext/soap/tests/server014.phpt | 4 +- ext/soap/tests/server015.phpt | 4 +- ext/soap/tests/server016.phpt | 4 +- ext/soap/tests/server017.phpt | 4 +- ext/soap/tests/server018.phpt | 4 +- ext/soap/tests/server019.phpt | 4 +- ext/soap/tests/server020.phpt | 4 +- ext/soap/tests/server021.phpt | 4 +- ext/soap/tests/server022.phpt | 4 +- ext/soap/tests/server023.phpt | 4 +- ext/soap/tests/server024.phpt | 4 +- ext/soap/tests/server025.phpt | 4 +- ext/soap/tests/server026.phpt | 2 +- ext/soap/tests/server027.phpt | 2 +- ext/soap/tests/server029.phpt | 4 +- ext/soap/tests/soap12/soap12-test.inc | 2 +- ext/spl/php_spl.c | 33 +- ext/spl/spl_array.c | 8 +- ext/spl/spl_directory.c | 2 +- ext/spl/spl_iterators.c | 50 +- ext/spl/spl_observer.c | 2 +- ext/spl/tests/SplFileInfo_001.phpt | 2 +- ext/spl/tests/SplFileObject/bug46053.phpt | 4 +- .../tests/SplFileObject/fileobject_003.phpt | 10 +- .../SplObjectStorage_coalesce.phpt | 4 +- .../SplObjectStorage_unserialize_nested.phpt | 4 +- .../SplObjectStorage_var_dump.phpt | 2 +- ext/spl/tests/SplObjectStorage/bug53144.phpt | 4 +- ext/spl/tests/SplObjectStorage/bug61453.phpt | 2 +- ext/spl/tests/SplObjectStorage/bug69108.phpt | 2 +- ext/spl/tests/SplObjectStorage/gh14639.phpt | 2 +- .../tests/SplObjectStorage/observer_008.phpt | 6 +- .../autoloading/{testclass => TestClass} | 0 ...estclass.class.inc => TestClass.class.inc} | 0 .../{testclass.inc => TestClass.inc} | 0 .../{testclass.php.inc => TestClass.php.inc} | 0 .../tests/autoloading/spl_autoload_001.phpt | 8 +- .../tests/autoloading/spl_autoload_009.phpt | 6 +- .../autoloading/spl_autoload_call_basic.phpt | 4 +- .../spl_autoload_warn_on_false_do_throw.phpt | 4 +- ext/spl/tests/bug31185.phpt | 2 +- ext/spl/tests/bug36287.phpt | 2 +- ext/spl/tests/bug45826.phpt | 4 +- ext/spl/tests/bug46051.phpt | 4 +- ext/spl/tests/bug46115.phpt | 2 +- ext/spl/tests/bug46160.phpt | 2 +- ext/spl/tests/bug47534.phpt | 2 +- ext/spl/tests/bug64228.phpt | 2 +- ext/spl/tests/bug66834.phpt | 12 +- ext/spl/tests/bug67359.phpt | 4 +- ext/spl/tests/dit_005.phpt | 2 +- ext/spl/tests/filesystemiterator_flags.phpt | 16 +- .../filesystemiterator_no_skip_dots.phpt | 6 +- ext/spl/tests/heap_004.phpt | 2 +- ext/spl/tests/iterator_071.phpt | 14 +- ext/spl/tests/pqueue_002.phpt | 2 +- ...eIteratorIterator_beginchildren_error.phpt | 6 +- ...iveIteratorIterator_endchildren_error.phpt | 6 +- ...iveIteratorIterator_nextelement_error.phpt | 6 +- ext/sqlite3/tests/bug63921-32bit.phpt | 2 +- ext/sqlite3/tests/bug63921-64bit.phpt | 2 +- .../tests/exception_from_toString.phpt | 2 +- .../tests/setauthorizer_cycle_leak.phpt | 2 +- .../tests/sqlite3_22_loadextension.phpt | 2 +- .../tests/sqlite3_29_createfunction.phpt | 6 +- .../sqlite3_37_createfunction_flags.phpt | 6 +- .../tests/sqlite3_40_setauthorizer.phpt | 2 +- ext/sqlite3/tests/sqlite3_explain.phpt | 12 +- ext/sqlite3/tests/sqlite3_fetch_all.phpt | 2 +- .../sqlite3_trampoline_createfunction.phpt | 2 +- ...te3_trampoline_createfunction_no_leak.phpt | 10 +- ext/standard/tests/array/array_map_001.phpt | 2 +- .../array/array_walk/array_walk_objects.phpt | 2 +- .../array_walk/array_walk_rec_objects.phpt | 2 +- .../tests/array/array_walk/bug70713.phpt | 2 +- ext/standard/tests/array/bug76713.phpt | 2 +- ext/standard/tests/array/gh19300_1.phpt | 2 +- ext/standard/tests/array/max.phpt | 2 +- ext/standard/tests/array/min.phpt | 2 +- .../tests/array/sort/arsort_object1.phpt | 2 +- .../tests/array/sort/arsort_object2.phpt | 2 +- .../tests/array/sort/asort_object1.phpt | 2 +- .../tests/array/sort/asort_object2.phpt | 2 +- .../tests/array/sort/krsort_object.phpt | 2 +- .../tests/array/sort/ksort_object.phpt | 2 +- .../tests/array/sort/natcasesort_object1.phpt | 2 +- .../tests/array/sort/natcasesort_object2.phpt | 2 +- .../tests/array/sort/rsort_object1.phpt | 2 +- .../tests/array/sort/rsort_object2.phpt | 2 +- .../tests/array/sort/sort_object1.phpt | 2 +- .../tests/array/sort/sort_object2.phpt | 2 +- ext/standard/tests/class_object/AutoTest.inc | 2 +- .../class_object/class_exists_basic_001.phpt | 6 +- .../class_exists_variation_003.phpt | 2 +- .../get_class_methods_variation_001.phpt | 2 +- .../get_class_methods_variation_002.phpt | 2 +- .../class_object/get_class_variation_002.phpt | 2 +- .../get_parent_class_variation_001.phpt | 4 +- .../get_parent_class_variation_002.phpt | 2 +- .../class_object/is_a_variation_003.phpt | 2 +- .../is_subclass_of_variation_003.phpt | 2 +- .../class_object/method_exists_basic_002.phpt | 24 +- .../method_exists_variation_003.phpt | 6 +- .../trait_class_exists_variation_003.phpt | 2 +- .../constant_with_typed_class_constant.phpt | 4 +- .../tests/file/windows_mb_path/bug71509.phpt | 2 +- ...ilter_register_class_throwing_onclose.phpt | 6 +- ...lter_register_class_throwing_oncreate.phpt | 6 +- ext/standard/tests/filters/userfilters.phpt | 2 +- .../tests/general_functions/bug77638_1.phpt | 2 +- .../tests/general_functions/is_array.phpt | 2 +- .../tests/general_functions/is_bool.phpt | 2 +- .../tests/general_functions/is_int.phpt | 2 +- .../tests/general_functions/is_int_64bit.phpt | 2 +- .../tests/general_functions/is_null.phpt | 4 +- .../tests/general_functions/is_numeric.phpt | 2 +- .../tests/general_functions/is_object.phpt | 2 +- .../tests/general_functions/is_scalar.phpt | 4 +- .../tests/general_functions/is_string.phpt | 2 +- .../tests/general_functions/type.phpt | 2 +- .../general_functions/var_export-locale.phpt | 2 +- .../var_export-locale_32.phpt | 2 +- .../general_functions/var_export_basic6.phpt | 4 +- .../general_functions/var_export_basic8.phpt | 4 +- ext/standard/tests/image/bug13213.phpt | 2 +- .../tests/image/getimagesize_variation2.phpt | 4 +- ext/standard/tests/mail/mail_basic7.phpt | 2 +- ext/standard/tests/network/http-stream.phpt | 2 +- .../tests/password/password_hash_error.phpt | 2 +- ext/standard/tests/serialize/006.phpt | 2 +- .../SplObjectStorage_object_reference.phpt | 2 +- ext/standard/tests/serialize/bug26762.phpt | 2 +- ext/standard/tests/serialize/bug30234.phpt | 4 +- ext/standard/tests/serialize/bug68594.phpt | 2 +- ext/standard/tests/serialize/bug69152.phpt | 4 +- ext/standard/tests/serialize/bug70963.phpt | 6 +- ext/standard/tests/serialize/bug71995.phpt | 2 +- .../serialization_miscTypes_001.phpt | 2 +- .../serialize/serialization_objects_012.phpt | 12 +- .../serialize/serialization_objects_016.phpt | 2 +- ...lowed_classes_option_stringable_value.phpt | 2 +- .../tests/serialize/unserialize_classes.phpt | 10 +- ext/standard/tests/strings/bug68710.phpt | 2 +- ext/standard/tests/strings/bug72434.phpt | 2 +- .../strings/quoted_printable_encode_002.phpt | 2 +- ext/standard/user_filters.c | 4 +- ext/standard/var.c | 4 +- ext/standard/var_unserializer.re | 18 +- ext/sysvshm/tests/005.phpt | 2 +- ext/tidy/tests/007.phpt | 8 +- ext/tidy/tests/023.phpt | 2 +- ext/tidy/tests/025.phpt | 10 +- ext/tidy/tests/bug54682.phpt | 2 +- ext/tidy/tests/gh12980.phpt | 2 +- ext/uri/php_uri_arginfo.h | 4 +- ext/uri/tests/026_userinfo.phpt | 2 +- ext/uri/tests/045.phpt | 2 +- ext/uri/tests/046.phpt | 6 +- ext/xml/tests/bug78563_final.phpt | 2 +- .../xml_set_notation_decl_handler_basic.phpt | 2 +- ..._processing_instruction_handler_basic.phpt | 2 +- ext/xml/xml.c | 2 +- ext/xmlreader/php_xmlreader.c | 4 +- ext/xmlreader/tests/003-get-errors.phpt | 4 +- ext/xmlreader/tests/003-mb.phpt | 4 +- ext/xmlreader/tests/003-move-errors.phpt | 4 +- ext/xmlreader/tests/003.phpt | 4 +- ext/xmlreader/tests/004.phpt | 4 +- ext/xmlreader/tests/006.phpt | 4 +- ext/xmlreader/tests/008.phpt | 8 +- ext/xmlreader/tests/014.phpt | 4 +- ext/xmlreader/tests/015-get-errors.phpt | 4 +- ext/xmlreader/tests/015-move-errors.phpt | 4 +- ext/xmlreader/tests/015.phpt | 4 +- ext/xmlreader/tests/bug36743.phpt | 2 +- ext/xmlreader/tests/bug51936.phpt | 2 +- ext/xmlreader/tests/bug64230.phpt | 4 +- ext/xmlreader/tests/bug71805.phpt | 2 +- ...xml_global_state_entity_loader_bypass.phpt | 2 +- ext/xmlreader/tests/readString_basic.phpt | 2 +- ext/xmlwriter/tests/OO_006.phpt | 2 +- ext/xmlwriter/tests/OO_007.phpt | 6 +- ext/xmlwriter/tests/OO_010.phpt | 4 +- ext/xmlwriter/tests/OO_011.phpt | 4 +- ext/xmlwriter/tests/OO_012.phpt | 4 +- ext/xmlwriter/tests/OO_013.phpt | 2 +- ext/xmlwriter/tests/bug41287.phpt | 8 +- ext/xmlwriter/tests/bug41326.phpt | 14 +- ext/xmlwriter/tests/bug79344.phpt | 4 +- ext/xsl/tests/XSLTProcessor_callables.phpt | 8 +- .../tests/XSLTProcessor_callables_errors.phpt | 16 +- ...LTProcessor_namespace_mapper_lifetime.phpt | 2 +- .../auto_registration_namespaces_new_dom.phpt | 2 +- ext/xsl/tests/bug26384.phpt | 6 +- ext/xsl/tests/bug33853.phpt | 8 +- ext/xsl/tests/bug49634.phpt | 2 +- ext/xsl/tests/bug53965.phpt | 4 +- ext/xsl/tests/bug54446.phpt | 6 +- ext/xsl/tests/bug54446_with_ini.phpt | 6 +- ext/xsl/tests/bug69168.phpt | 4 +- ext/xsl/tests/bug70078.phpt | 4 +- ext/xsl/tests/bug70535.phpt | 4 +- ext/xsl/tests/bug71571_a.phpt | 2 +- ext/xsl/tests/bug71571_b.phpt | 2 +- ext/xsl/tests/php_function_edge_cases.phpt | 8 +- ext/xsl/tests/prepare.inc | 6 +- ext/xsl/tests/registerPHPFunctionNS.phpt | 4 +- .../tests/registerPHPFunctionNS_errors.phpt | 12 +- ext/xsl/tests/req30622.phpt | 10 +- ext/xsl/tests/throw_in_autoload.phpt | 8 +- ext/xsl/tests/xpath_callables.inc | 4 +- ext/xsl/tests/xslt002.phpt | 2 +- ext/xsl/tests/xslt004.phpt | 2 +- ext/xsl/tests/xslt005.phpt | 2 +- ext/xsl/tests/xslt008-mb.phpt | 4 +- ext/xsl/tests/xslt008.phpt | 4 +- ext/xsl/tests/xslt009.phpt | 4 +- ext/xsl/tests/xslt010.phpt | 8 +- ext/xsl/tests/xslt010_gt10129.phpt | 8 +- ext/xsl/tests/xslt011.phpt | 8 +- ext/xsl/tests/xslt012.phpt | 6 +- ext/xsl/tests/xslt_non_dom_node.phpt | 6 +- ...tprocessor_exsl_registerPhpFunctionNs.phpt | 6 +- ...ocessor_registerPHPFunctions-allfuncs.phpt | 2 +- ...r_registerPHPFunctions-array-multiple.phpt | 2 +- ...registerPHPFunctions-array-notallowed.phpt | 2 +- ...tprocessor_registerPHPFunctions-array.phpt | 2 +- ...sor_registerPHPFunctions-funcnostring.phpt | 2 +- ...cessor_registerPHPFunctions-funcundef.phpt | 2 +- ...ltprocessor_registerPHPFunctions-null.phpt | 2 +- ..._registerPHPFunctions-string-multiple.phpt | 2 +- ...egisterPHPFunctions-string-notallowed.phpt | 2 +- ...processor_registerPHPFunctions-string.phpt | 2 +- .../tests/xsltprocessor_transformToDoc.phpt | 2 +- .../tests/xsltprocessor_transformToURI.phpt | 4 +- .../tests/xsltprocessor_transformToXML.phpt | 4 +- ext/zend_test/test_arginfo.h | 6 +- .../tests/observer_declarations_01.phpt | 8 +- .../observer_declarations_file_cache.phpt | 4 +- ext/zend_test/tests/observer_preload.phpt | 2 +- ext/zip/php_zip_arginfo.h | 6 +- ext/zip/tests/ZipArchive_bailout.phpt | 2 +- ext/zip/tests/ZipArchive_destruct.phpt | 2 +- ext/zip/tests/bug11216.phpt | 2 +- ext/zip/tests/bug14962.phpt | 2 +- ext/zip/tests/bug38944.phpt | 2 +- ext/zip/tests/bug40228-mb.phpt | 2 +- ext/zip/tests/bug40228.phpt | 2 +- ext/zip/tests/bug53885.phpt | 4 +- ext/zip/tests/bug64342_1-mb.phpt | 2 +- ext/zip/tests/bug64342_1.phpt | 2 +- ext/zip/tests/bug72660.phpt | 2 +- ext/zip/tests/doubleclose.phpt | 2 +- ext/zip/tests/gh18431.phpt | 2 +- ext/zip/tests/gh18438.phpt | 2 +- ext/zip/tests/gh18439.phpt | 2 +- ext/zip/tests/oo_add_encoding.phpt | 2 +- ext/zip/tests/oo_addemptydir.phpt | 2 +- ext/zip/tests/oo_addfile.phpt | 2 +- ext/zip/tests/oo_addfile_proc.phpt | 4 +- ext/zip/tests/oo_addglob.phpt | 2 +- ext/zip/tests/oo_addglob2.phpt | 2 +- ext/zip/tests/oo_addpattern.phpt | 2 +- ext/zip/tests/oo_cancel.phpt | 2 +- ext/zip/tests/oo_cancel_non_int_return.phpt | 2 +- ext/zip/tests/oo_cancel_trampoline.phpt | 4 +- ext/zip/tests/oo_close.phpt | 2 +- ext/zip/tests/oo_close_empty.phpt | 2 +- ext/zip/tests/oo_delete.phpt | 6 +- ext/zip/tests/oo_encryption.phpt | 2 +- ext/zip/tests/oo_externalattributes.phpt | 2 +- .../oo_getexternalattributesname_error.phpt | 2 +- ext/zip/tests/oo_getnameindex.phpt | 4 +- ext/zip/tests/oo_getstatusstring.phpt | 2 +- ext/zip/tests/oo_getstreamindex.phpt | 2 +- ext/zip/tests/oo_namelocate.phpt | 8 +- ext/zip/tests/oo_open.phpt | 4 +- ext/zip/tests/oo_progress.phpt | 2 +- ext/zip/tests/oo_progress_trampoline.phpt | 4 +- ext/zip/tests/oo_rename.phpt | 4 +- ext/zip/tests/oo_replacefile.phpt | 2 +- ext/zip/tests/oo_setcomment.phpt | 4 +- ext/zip/tests/oo_setcomment_error.phpt | 2 +- ext/zip/tests/oo_setmtime.phpt | 4 +- ext/zip/tests/oo_torrentzip.phpt | 2 +- sapi/cli/php_cli.c | 2 +- sapi/cli/tests/005.phpt | 4 +- sapi/cli/tests/bug70470.phpt | 2 +- sapi/cli/tests/emptyheader.phpt | 2 +- sapi/phpdbg/phpdbg_bp.c | 4 +- sapi/phpdbg/phpdbg_list.c | 10 +- sapi/phpdbg/phpdbg_print.c | 25 +- sapi/phpdbg/phpdbg_prompt.c | 2 +- sapi/phpdbg/phpdbg_utils.c | 39 +- sapi/phpdbg/tests/print_001.phpt | 2 +- tests/classes/__set__get_001.phpt | 2 +- tests/classes/autoload_006.phpt | 4 +- tests/classes/autoload_019.phpt | 3 +- tests/classes/constants_basic_004.phpt | 2 +- tests/classes/destructor_and_exceptions.phpt | 2 +- ..._object_set_iterator_class_wrong_case.phpt | 22 + ...bject_unserialize_iterator_wrong_case.phpt | 27 + .../attribute_new_instance_wrong_case.phpt | 26 + .../attribute_wrong_case.phpt | 29 + .../call_user_func_wrong_case.phpt | 17 + .../callable_mixed_case_method.phpt | 21 + .../case_sensitivity/callable_wrong_case.phpt | 28 + .../class_alias_wrong_case.phpt | 14 + .../class_parents_wrong_case.phpt | 28 + .../closure_bind_wrong_case.phpt | 23 + .../dynamic_call_wrong_case.phpt | 17 + .../existence_check_wrong_case.phpt | 18 + .../case_sensitivity/extends_wrong_case.phpt | 14 + .../extends_wrong_case_base.inc | 2 + .../function_call_wrong_case.phpt | 13 + .../generator_return_type_wrong_case.phpt | 10 + ...t_attributes_is_instanceof_wrong_case.phpt | 24 + .../implements_wrong_case.phpt | 19 + .../is_subclass_of_subject_wrong_case.phpt | 19 + .../iterator_iterator_wrong_case.phpt | 19 + .../namespace_declaration_wrong_case.phpt | 23 + .../namespaced_constant_wrong_case.phpt | 33 ++ .../namespaced_type_hint_wrong_case.phpt | 20 + .../pdo_attr_statement_class_wrong_case.phpt | 22 + .../pdo_fetch_class_wrong_case.phpt | 28 + .../property_method_exists_wrong_case.phpt | 19 + .../property_type_wrong_case.phpt | 19 + .../reflection_class_constant_wrong_case.phpt | 20 + .../reflection_class_wrong_case.phpt | 20 + .../reflection_function_wrong_case.phpt | 20 + ...eflection_get_property_fqn_wrong_case.phpt | 28 + ...ction_implements_interface_wrong_case.phpt | 19 + .../reflection_is_subclass_of_wrong_case.phpt | 19 + .../reflection_method_wrong_case.phpt | 20 + .../reflection_parameter_wrong_case.phpt | 20 + .../reflection_property_scope_wrong_case.phpt | 19 + .../reflection_property_wrong_case.phpt | 20 + .../soap_classmap_wrong_case.phpt | 47 ++ .../soap_operation_wrong_case.phpt | 34 ++ .../stream_filter_wrong_case.phpt | 29 + .../trait_alias_interface_method.phpt | 30 + .../type_hint_wrong_case.phpt | 18 + .../union_type_case_distinct.phpt | 24 + .../unserialize_enum_wrong_case.phpt | 24 + .../unserialize_object_wrong_case.phpt | 23 + .../use_import_alias_wrong_case.phpt | 35 ++ .../use_import_wrong_case.phpt | 36 ++ .../use_trait_wrong_case.phpt | 22 + .../user_function_wrong_case.phpt | 17 + tests/lang/catchable_error_001.phpt | 2 +- tests/lang/catchable_error_002.phpt | 2 +- .../lang/engine_assignExecutionOrder_008.phpt | 2 +- tests/lang/foreachLoopObjects.006.phpt | 2 +- tests/lang/operators/coalesce.phpt | 2 +- tests/output/ob_start_basic_006.phpt | 2 +- 1214 files changed, 4677 insertions(+), 4529 deletions(-) create mode 100644 Zend/tests/class_name_case/backslash_prefix.phpt create mode 100644 Zend/tests/class_name_case/catch_clause.phpt create mode 100644 Zend/tests/class_name_case/catch_clause_user_handler.phpt create mode 100644 Zend/tests/class_name_case/class_constant.phpt create mode 100644 Zend/tests/class_name_case/class_exists_functions.phpt create mode 100644 Zend/tests/class_name_case/class_keyword_case_insensitive.phpt create mode 100644 Zend/tests/class_name_case/instanceof.phpt create mode 100644 Zend/tests/class_name_case/is_a_functions.phpt create mode 100644 Zend/tests/class_name_case/magic_method.phpt create mode 100644 Zend/tests/class_name_case/magic_method_wrong_case_callstatic.phpt create mode 100644 Zend/tests/class_name_case/magic_method_wrong_case_construct.phpt create mode 100644 Zend/tests/class_name_case/magic_method_wrong_case_tostring.phpt create mode 100644 Zend/tests/class_name_case/new_dynamic.phpt create mode 100644 Zend/tests/class_name_case/new_operator.phpt create mode 100644 Zend/tests/class_name_case/no_warn.phpt create mode 100644 Zend/tests/class_name_case/static_method.phpt create mode 100644 Zend/tests/class_name_case/static_property.phpt delete mode 100644 Zend/tests/debug_info/debug_info-error-case-insensitive.phpt delete mode 100644 Zend/tests/magic_methods/stringable_automatic_implementation_case_insensitive.phpt rename ext/spl/tests/autoloading/{testclass => TestClass} (100%) rename ext/spl/tests/autoloading/{testclass.class.inc => TestClass.class.inc} (100%) rename ext/spl/tests/autoloading/{testclass.inc => TestClass.inc} (100%) rename ext/spl/tests/autoloading/{testclass.php.inc => TestClass.php.inc} (100%) create mode 100644 tests/lang/case_sensitivity/array_object_set_iterator_class_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/array_object_unserialize_iterator_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/attribute_new_instance_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/attribute_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/call_user_func_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/callable_mixed_case_method.phpt create mode 100644 tests/lang/case_sensitivity/callable_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/class_alias_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/class_parents_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/closure_bind_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/dynamic_call_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/existence_check_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/extends_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/extends_wrong_case_base.inc create mode 100644 tests/lang/case_sensitivity/function_call_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/generator_return_type_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/get_attributes_is_instanceof_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/implements_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/is_subclass_of_subject_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/iterator_iterator_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/namespace_declaration_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/namespaced_constant_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/namespaced_type_hint_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/pdo_attr_statement_class_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/pdo_fetch_class_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/property_method_exists_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/property_type_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/reflection_class_constant_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/reflection_class_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/reflection_function_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/reflection_get_property_fqn_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/reflection_implements_interface_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/reflection_is_subclass_of_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/reflection_method_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/reflection_parameter_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/reflection_property_scope_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/reflection_property_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/soap_classmap_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/soap_operation_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/stream_filter_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/trait_alias_interface_method.phpt create mode 100644 tests/lang/case_sensitivity/type_hint_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/union_type_case_distinct.phpt create mode 100644 tests/lang/case_sensitivity/unserialize_enum_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/unserialize_object_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/use_import_alias_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/use_import_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/use_trait_wrong_case.phpt create mode 100644 tests/lang/case_sensitivity/user_function_wrong_case.phpt diff --git a/NEWS b/NEWS index 2bbe43032ece..c7e25fb071f9 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,15 @@ PHP NEWS ?? ??? ????, PHP 8.6.0alpha1 - Core: + . PHP is now case-sensitive for function and class names. Calling a function + using incorrect casing (e.g. STRLEN() instead of strlen()) now raises a + fatal Error. (jorgsowa) + . Class, interface, trait, and enum names are now stored and looked up using + their canonical casing. Referencing them with incorrect casing now raises a + fatal Error across all language constructs and APIs that accept a class + name. (jorgsowa) + . Namespace segments in references and use imports are now matched + case-sensitively. Using incorrect casing raises a fatal Error. (jorgsowa) . Added first-class callable cache to share instances for the duration of the request. (ilutov) . It is now possible to use reference assign on WeakMap without the key diff --git a/UPGRADING b/UPGRADING index bdadc6efbefc..ee5716858ef6 100644 --- a/UPGRADING +++ b/UPGRADING @@ -19,6 +19,58 @@ PHP 8.6 UPGRADE NOTES 1. Backward Incompatible Changes ======================================== +- Core: + . PHP is now case-sensitive for function and class names. The global function + table and class table are now keyed by the canonical (declared) name rather + than its lowercase equivalent. As a result, calling a function with + incorrect casing (e.g. STRLEN() instead of strlen()) now raises a fatal + Error ("Call to undefined function STRLEN()"), and referencing a class, + interface, trait, or enum with incorrect casing (e.g. new FOO() when the + class is declared as Foo) now raises a fatal Error ("Class 'FOO' not + found"). This applies to all language constructs and APIs that perform a + name lookup: new, instanceof, catch, extends, implements, use (trait), type + declarations, callable strings/arrays, class_exists() and related + introspection functions, Closure::bind()/bindTo(), Reflection constructors + and methods, and the SOAP classmap option. + RFC: https://wiki.php.net/rfc/case_sensitive_php + . Namespace segments in use imports are now matched case-sensitively. A use + import whose path does not match the canonical casing of the target + namespace segment will produce a fatal Error when the imported name is + first resolved. + RFC: https://wiki.php.net/rfc/case_sensitive_php + . Declaring a magic method with incorrect casing (e.g. __tostring() instead + of __toString()) is now a compile-time fatal Error. Previously magic + method names were matched case-insensitively; under case-sensitive method + names a wrong-cased declaration would otherwise silently lose its magic + behavior. + RFC: https://wiki.php.net/rfc/case_sensitive_php + . Attribute names are now matched case-sensitively, consistent with class + names. Internal attributes such as #[\Deprecated], #[\Override] or + #[\AllowDynamicProperties] are only recognized with their exact casing, + and the name filter of ReflectionFunctionAbstract::getAttributes() and + related methods compares case-sensitively. The "self", "parent" and + "static" keywords in callable strings remain case-insensitive. + RFC: https://wiki.php.net/rfc/case_sensitive_php + . The namespace portion of constant names is now case-sensitive, matching + the constant base name. Referencing a namespaced constant with incorrect + namespace casing (e.g. myapp\FOO when defined as MyApp\FOO) now raises + an "Undefined constant" Error, including via constant() and defined(). + RFC: https://wiki.php.net/rfc/case_sensitive_php + +- SOAP: + . WSDL operation names are now matched case-sensitively when dispatching + requests and when calling operations through SoapClient. This matches + XML, where element names are case-sensitive. SoapServer::addFunction() + also requires the exact case of the registered PHP function. + RFC: https://wiki.php.net/rfc/case_sensitive_php + +- SPL: + . The default spl_autoload() implementation now builds the include file + name from the case-preserved class name instead of its lowercased form. + On case-sensitive file systems the file name must match the class name + casing (e.g. MyClass.php instead of myclass.php). + RFC: https://wiki.php.net/rfc/case_sensitive_php + - DOM: . Properties previously documented as @readonly (e.g. DOMNode::$nodeType, DOMDocument::$xmlEncoding, DOMEntity::$actualEncoding, ::$encoding, diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 1f24fb82fcf9..b9b2b67489a3 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -14,6 +14,24 @@ PHP 8.6 INTERNALS UPGRADE NOTES 1. Internal API changes ======================== + . Function, class, and method tables (EG(function_table), EG(class_table), + zend_class_entry.function_table) are now keyed by the canonical (declared) + name instead of its lowercase form, and lookups are case-sensitive. + Extensions performing lowercased lookups in these tables must pass the + exact name instead. Related changes: + - zend_class_name lost its lc_name field and zend_attribute lost its + lcname field. + - zend_get_attribute_str() and zend_get_parameter_attribute_str() now + match attribute names case-sensitively; pass the exact attribute name + instead of a lowercased one. + - The "key" argument of the get_method and get_static_method object + handlers is no longer a pre-lowercased copy of the method name; when + non-NULL it holds the same string as the method name itself (with a + precomputed hash). + - zend_perform_class_autoload() lost its lowercase-name parameter; + autoloaders receive the case-preserved class name. + - do_bind_class() and zend_bind_class_in_slot() changed signatures + (the separate lowercase-name literal no longer exists). . ZSTR_INIT_LITERAL(), zend_string_starts_with_literal(), and zend_string_starts_with_literal_ci() now support strings containing NUL bytes. Passing non-literal char* is no longer supported. diff --git a/Zend/Optimizer/compact_literals.c b/Zend/Optimizer/compact_literals.c index cf74dd8fc147..da69bc0c4e1a 100644 --- a/Zend/Optimizer/compact_literals.c +++ b/Zend/Optimizer/compact_literals.c @@ -134,43 +134,43 @@ void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx LITERAL_INFO(opline->op1.constant, 1); break; case ZEND_INIT_FCALL_BY_NAME: - LITERAL_INFO(opline->op2.constant, 2); + LITERAL_INFO(opline->op2.constant, 1); break; case ZEND_INIT_NS_FCALL_BY_NAME: - LITERAL_INFO(opline->op2.constant, 3); + LITERAL_INFO(opline->op2.constant, 2); break; case ZEND_INIT_METHOD_CALL: if (opline->op1_type == IS_CONST) { LITERAL_INFO(opline->op1.constant, 1); } if (opline->op2_type == IS_CONST) { - LITERAL_INFO(opline->op2.constant, 2); + LITERAL_INFO(opline->op2.constant, 1); } break; case ZEND_INIT_STATIC_METHOD_CALL: if (opline->op1_type == IS_CONST) { - LITERAL_INFO(opline->op1.constant, 2); + LITERAL_INFO(opline->op1.constant, 1); } if (opline->op2_type == IS_CONST) { - LITERAL_INFO(opline->op2.constant, 2); + LITERAL_INFO(opline->op2.constant, 1); } break; case ZEND_INIT_PARENT_PROPERTY_HOOK_CALL: LITERAL_INFO(opline->op1.constant, 1); break; case ZEND_CATCH: - LITERAL_INFO(opline->op1.constant, 2); + LITERAL_INFO(opline->op1.constant, 1); break; case ZEND_FETCH_CONSTANT: if (opline->op1.num & IS_CONSTANT_UNQUALIFIED_IN_NAMESPACE) { - LITERAL_INFO(opline->op2.constant, 3); - } else { LITERAL_INFO(opline->op2.constant, 2); + } else { + LITERAL_INFO(opline->op2.constant, 1); } break; case ZEND_FETCH_CLASS_CONSTANT: if (opline->op1_type == IS_CONST) { - LITERAL_INFO(opline->op1.constant, 2); + LITERAL_INFO(opline->op1.constant, 1); } if (opline->op2_type == IS_CONST) { LITERAL_INFO(opline->op2.constant, 1); @@ -192,7 +192,7 @@ void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx case ZEND_POST_DEC_STATIC_PROP: case ZEND_ASSIGN_STATIC_PROP_OP: if (opline->op2_type == IS_CONST) { - LITERAL_INFO(opline->op2.constant, 2); + LITERAL_INFO(opline->op2.constant, 1); } if (opline->op1_type == IS_CONST) { LITERAL_INFO(opline->op1.constant, 1); @@ -201,12 +201,12 @@ void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx case ZEND_FETCH_CLASS: case ZEND_INSTANCEOF: if (opline->op2_type == IS_CONST) { - LITERAL_INFO(opline->op2.constant, 2); + LITERAL_INFO(opline->op2.constant, 1); } break; case ZEND_NEW: if (opline->op1_type == IS_CONST) { - LITERAL_INFO(opline->op1.constant, 2); + LITERAL_INFO(opline->op1.constant, 1); } break; case ZEND_DECLARE_CLASS: diff --git a/Zend/Optimizer/dfa_pass.c b/Zend/Optimizer/dfa_pass.c index 77dc322fbdec..19aefd7085f0 100644 --- a/Zend/Optimizer/dfa_pass.c +++ b/Zend/Optimizer/dfa_pass.c @@ -277,9 +277,7 @@ static inline bool can_elide_list_type( return can_elide_list_type(script, op_array, use_info, *single_type); } if (ZEND_TYPE_HAS_NAME(*single_type)) { - zend_string *lcname = zend_string_tolower(ZEND_TYPE_NAME(*single_type)); - const zend_class_entry *ce = zend_optimizer_get_class_entry(script, op_array, lcname); - zend_string_release(lcname); + const zend_class_entry *ce = zend_optimizer_get_class_entry(script, op_array, ZEND_TYPE_NAME(*single_type)); bool result = ce && safe_instanceof(use_info->ce, ce); if (result == !is_intersection) { return result; @@ -410,7 +408,7 @@ static uint32_t zend_dfa_optimize_calls(zend_op_array *op_array, zend_ssa *ssa) if ((op->opcode == ZEND_FRAMELESS_ICALL_2 || (op->opcode == ZEND_FRAMELESS_ICALL_3 && (op + 1)->op1_type == IS_CONST)) && call_info->callee_func - && zend_string_equals_literal_ci(call_info->callee_func->common.function_name, "in_array")) { + && zend_string_equals_literal(call_info->callee_func->common.function_name, "in_array")) { bool strict = false; bool has_opdata = op->opcode == ZEND_FRAMELESS_ICALL_3; ZEND_ASSERT(!call_info->is_prototype); diff --git a/Zend/Optimizer/optimize_func_calls.c b/Zend/Optimizer/optimize_func_calls.c index 69c371207ddc..066ea0eed2d2 100644 --- a/Zend/Optimizer/optimize_func_calls.c +++ b/Zend/Optimizer/optimize_func_calls.c @@ -200,14 +200,12 @@ void zend_optimize_func_calls(zend_op_array *op_array, zend_optimizer_ctx *ctx) } else if (fcall->opcode == ZEND_INIT_FCALL_BY_NAME) { fcall->opcode = ZEND_INIT_FCALL; fcall->op1.num = zend_vm_calc_used_stack(fcall->extended_value, call_stack[call].func); - literal_dtor(&ZEND_OP2_LITERAL(fcall)); - fcall->op2.constant = fcall->op2.constant + 1; } else if (fcall->opcode == ZEND_INIT_NS_FCALL_BY_NAME) { fcall->opcode = ZEND_INIT_FCALL; fcall->op1.num = zend_vm_calc_used_stack(fcall->extended_value, call_stack[call].func); - literal_dtor(&op_array->literals[fcall->op2.constant]); - literal_dtor(&op_array->literals[fcall->op2.constant + 2]); - fcall->op2.constant = fcall->op2.constant + 1; + /* The func was resolved by the ns-qualified name (slot 0); + * drop the unqualified fallback (slot 1). */ + literal_dtor(&op_array->literals[fcall->op2.constant + 1]); } else if (fcall->opcode == ZEND_INIT_STATIC_METHOD_CALL || fcall->opcode == ZEND_INIT_METHOD_CALL || fcall->opcode == ZEND_INIT_PARENT_PROPERTY_HOOK_CALL diff --git a/Zend/Optimizer/pass1.c b/Zend/Optimizer/pass1.c index 962bdb6e4be3..c43b2230dcad 100644 --- a/Zend/Optimizer/pass1.c +++ b/Zend/Optimizer/pass1.c @@ -220,7 +220,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx) } /* define("name", scalar); */ - if (zend_string_equals_literal_ci(Z_STR(ZEND_OP2_LITERAL(init_opline)), "define")) { + if (zend_string_equals_literal(Z_STR(ZEND_OP2_LITERAL(init_opline)), "define")) { if (Z_TYPE(ZEND_OP1_LITERAL(send1_opline)) == IS_STRING && send2_opline) { diff --git a/Zend/Optimizer/zend_cfg.c b/Zend/Optimizer/zend_cfg.c index 837515169d70..b437bce4675c 100644 --- a/Zend/Optimizer/zend_cfg.c +++ b/Zend/Optimizer/zend_cfg.c @@ -333,8 +333,8 @@ ZEND_API void zend_build_cfg(zend_arena **arena, const zend_op_array *op_array, case ZEND_INIT_NS_FCALL_BY_NAME: zv = CRT_CONSTANT(opline->op2); if (opline->opcode == ZEND_INIT_NS_FCALL_BY_NAME) { - /* The third literal is the lowercased unqualified name */ - zv += 2; + /* The second literal is the unqualified fallback name */ + zv += 1; } if ((fn = zend_hash_find_ptr(EG(function_table), Z_STR_P(zv))) != NULL) { if (fn->type == ZEND_INTERNAL_FUNCTION) { diff --git a/Zend/Optimizer/zend_inference.c b/Zend/Optimizer/zend_inference.c index 05d33d3d75fb..a970f1b5dd28 100644 --- a/Zend/Optimizer/zend_inference.c +++ b/Zend/Optimizer/zend_inference.c @@ -2387,10 +2387,8 @@ static uint32_t zend_convert_type(const zend_script *script, zend_type type, zen /* As we only have space to store one CE, * we use a plain object type for class unions. */ if (ZEND_TYPE_HAS_NAME(type)) { - zend_string *lcname = zend_string_tolower(ZEND_TYPE_NAME(type)); // TODO: Pass through op_array. - *pce = zend_optimizer_get_class_entry(script, NULL, lcname); - zend_string_release_ex(lcname, 0); + *pce = zend_optimizer_get_class_entry(script, NULL, ZEND_TYPE_NAME(type)); } } } @@ -2477,7 +2475,7 @@ static const zend_property_info *zend_fetch_static_prop_info(const zend_script * } } else if (opline->op2_type == IS_CONST) { const zval *zv = CRT_CONSTANT(opline->op2); - ce = zend_optimizer_get_class_entry(script, op_array, Z_STR_P(zv + 1)); + ce = zend_optimizer_get_class_entry(script, op_array, Z_STR_P(zv)); } if (ce) { @@ -3369,7 +3367,7 @@ static zend_always_inline zend_result _zend_update_type_info( } else if (opline->op2_type == IS_CONST) { zval *zv = CRT_CONSTANT(opline->op2); if (Z_TYPE_P(zv) == IS_STRING) { - ce = zend_optimizer_get_class_entry(script, op_array, Z_STR_P(zv+1)); + ce = zend_optimizer_get_class_entry(script, op_array, Z_STR_P(zv)); UPDATE_SSA_OBJ_TYPE(ce, 0, ssa_op->result_def); } else { UPDATE_SSA_OBJ_TYPE(NULL, 0, ssa_op->result_def); diff --git a/Zend/Optimizer/zend_optimizer.c b/Zend/Optimizer/zend_optimizer.c index d10b4d83fc3e..ecd1b1b4813b 100644 --- a/Zend/Optimizer/zend_optimizer.c +++ b/Zend/Optimizer/zend_optimizer.c @@ -104,9 +104,7 @@ zend_result zend_optimizer_eval_special_func_call( zval *result, const zend_string *name, zend_string *arg) { if (zend_string_equals_literal(name, "function_exists") || zend_string_equals_literal(name, "is_callable")) { - zend_string *lc_name = zend_string_tolower(arg); - const zend_internal_function *func = zend_hash_find_ptr(EG(function_table), lc_name); - zend_string_release_ex(lc_name, 0); + const zend_internal_function *func = zend_hash_find_ptr(EG(function_table), arg); if (func && func->type == ZEND_INTERNAL_FUNCTION && func->module->type == MODULE_PERSISTENT @@ -218,13 +216,6 @@ uint32_t zend_optimizer_add_literal(zend_op_array *op_array, const zval *zv) return i; } -static inline uint32_t zend_optimizer_add_literal_string(zend_op_array *op_array, zend_string *str) { - zval zv; - ZVAL_STR(&zv, str); - zend_string_hash_val(str); - return zend_optimizer_add_literal(op_array, &zv); -} - static inline void drop_leading_backslash(zval *val) { if (Z_STRVAL_P(val)[0] == '\\') { zend_string *str = zend_string_init(Z_STRVAL_P(val) + 1, Z_STRLEN_P(val) - 1, 0); @@ -290,21 +281,18 @@ bool zend_optimizer_update_op1_const(zend_op_array *op_array, drop_leading_backslash(val); opline->op1.constant = zend_optimizer_add_literal(op_array, val); opline->extended_value = alloc_cache_slots(op_array, 1) | (opline->extended_value & ZEND_LAST_CATCH); - zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); break; case ZEND_DEFINED: REQUIRES_STRING(val); drop_leading_backslash(val); opline->op1.constant = zend_optimizer_add_literal(op_array, val); opline->extended_value = alloc_cache_slots(op_array, 1); - zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); break; case ZEND_NEW: REQUIRES_STRING(val); drop_leading_backslash(val); opline->op1.constant = zend_optimizer_add_literal(op_array, val); opline->op2.num = alloc_cache_slots(op_array, 1); - zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); break; case ZEND_INIT_STATIC_METHOD_CALL: REQUIRES_STRING(val); @@ -313,7 +301,6 @@ bool zend_optimizer_update_op1_const(zend_op_array *op_array, if (opline->op2_type != IS_CONST) { opline->result.num = alloc_cache_slots(op_array, 1); } - zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); break; case ZEND_FETCH_CLASS_CONSTANT: REQUIRES_STRING(val); @@ -322,7 +309,6 @@ bool zend_optimizer_update_op1_const(zend_op_array *op_array, if (opline->op2_type != IS_CONST) { opline->extended_value = alloc_cache_slots(op_array, 1); } - zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); break; case ZEND_ASSIGN_OP: case ZEND_ASSIGN_DIM_OP: @@ -428,14 +414,12 @@ bool zend_optimizer_update_op2_const(zend_op_array *op_array, REQUIRES_STRING(val); drop_leading_backslash(val); opline->op2.constant = zend_optimizer_add_literal(op_array, val); - zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); opline->extended_value = alloc_cache_slots(op_array, 1); break; case ZEND_INIT_FCALL_BY_NAME: REQUIRES_STRING(val); drop_leading_backslash(val); opline->op2.constant = zend_optimizer_add_literal(op_array, val); - zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); opline->result.num = alloc_cache_slots(op_array, 1); break; case ZEND_ASSIGN_STATIC_PROP: @@ -456,20 +440,12 @@ bool zend_optimizer_update_op2_const(zend_op_array *op_array, REQUIRES_STRING(val); drop_leading_backslash(val); opline->op2.constant = zend_optimizer_add_literal(op_array, val); - zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); if (opline->op1_type != IS_CONST) { opline->extended_value = alloc_cache_slots(op_array, 1) | (opline->extended_value & (ZEND_RETURNS_FUNCTION|ZEND_ISEMPTY|ZEND_FETCH_OBJ_FLAGS)); } break; case ZEND_INIT_FCALL: REQUIRES_STRING(val); - if (Z_REFCOUNT_P(val) == 1) { - zend_str_tolower(Z_STRVAL_P(val), Z_STRLEN_P(val)); - } else { - ZVAL_STR(&tmp, zend_string_tolower(Z_STR_P(val))); - zval_ptr_dtor_nogc(val); - val = &tmp; - } opline->op2.constant = zend_optimizer_add_literal(op_array, val); opline->result.num = alloc_cache_slots(op_array, 1); break; @@ -488,7 +464,6 @@ bool zend_optimizer_update_op2_const(zend_op_array *op_array, opline->opcode = ZEND_INIT_FCALL_BY_NAME; drop_leading_backslash(val); opline->op2.constant = zend_optimizer_add_literal(op_array, val); - zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); opline->result.num = alloc_cache_slots(op_array, 1); } else { opline->op2.constant = zend_optimizer_add_literal(op_array, val); @@ -497,13 +472,11 @@ bool zend_optimizer_update_op2_const(zend_op_array *op_array, case ZEND_INIT_METHOD_CALL: REQUIRES_STRING(val); opline->op2.constant = zend_optimizer_add_literal(op_array, val); - zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); opline->result.num = alloc_cache_slots(op_array, 2); break; case ZEND_INIT_STATIC_METHOD_CALL: REQUIRES_STRING(val); opline->op2.constant = zend_optimizer_add_literal(op_array, val); - zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); if (opline->op1_type != IS_CONST) { opline->result.num = alloc_cache_slots(op_array, 2); } @@ -815,18 +788,18 @@ static bool zend_optimizer_ignore_function(zval *fbc_zv, const zend_string *file } zend_class_entry *zend_optimizer_get_class_entry( - const zend_script *script, const zend_op_array *op_array, zend_string *lcname) { - zend_class_entry *ce = script ? zend_hash_find_ptr(&script->class_table, lcname) : NULL; + const zend_script *script, const zend_op_array *op_array, zend_string *name) { + zend_class_entry *ce = script ? zend_hash_find_ptr(&script->class_table, name) : NULL; if (ce) { return ce; } - zval *ce_zv = zend_hash_find(CG(class_table), lcname); + zval *ce_zv = zend_hash_find(CG(class_table), name); if (ce_zv && !zend_optimizer_ignore_class(ce_zv, op_array ? op_array->filename : NULL)) { return Z_PTR_P(ce_zv); } - if (op_array && op_array->scope && zend_string_equals_ci(op_array->scope->name, lcname)) { + if (op_array && op_array->scope && zend_string_equals(op_array->scope->name, name)) { return op_array->scope; } @@ -838,7 +811,7 @@ zend_class_entry *zend_optimizer_get_class_entry_from_op1( if (opline->op1_type == IS_CONST) { const zval *op1 = CRT_CONSTANT(opline->op1); if (Z_TYPE_P(op1) == IS_STRING) { - return zend_optimizer_get_class_entry(script, op_array, Z_STR_P(op1 + 1)); + return zend_optimizer_get_class_entry(script, op_array, Z_STR_P(op1)); } } else if (opline->op1_type == IS_UNUSED && op_array->scope && !(op_array->scope->ce_flags & ZEND_ACC_TRAIT) @@ -862,9 +835,9 @@ const zend_class_constant *zend_fetch_class_const_info( const zval *op1 = CRT_CONSTANT(opline->op1); if (Z_TYPE_P(op1) == IS_STRING) { if (script) { - ce = zend_optimizer_get_class_entry(script, op_array, Z_STR_P(op1 + 1)); + ce = zend_optimizer_get_class_entry(script, op_array, Z_STR_P(op1)); } else { - zval *ce_zv = zend_hash_find(EG(class_table), Z_STR_P(op1 + 1)); + zval *ce_zv = zend_hash_find(EG(class_table), Z_STR_P(op1)); if (ce_zv && !zend_optimizer_ignore_class(ce_zv, op_array->filename)) { ce = Z_PTR_P(ce_zv); } @@ -924,7 +897,11 @@ zend_function *zend_optimizer_get_called_func( case ZEND_INIT_FCALL_BY_NAME: case ZEND_INIT_NS_FCALL_BY_NAME: if (opline->op2_type == IS_CONST && Z_TYPE_P(CRT_CONSTANT(opline->op2)) == IS_STRING) { - const zval *function_name = CRT_CONSTANT(opline->op2) + 1; + /* For ZEND_INIT_NS_FCALL_BY_NAME only the ns-qualified name (slot 0) + * is considered: resolving the unqualified global fallback at + * optimization time would be unsound, as another file may declare + * the namespaced function and shadow the global one at runtime. */ + const zval *function_name = CRT_CONSTANT(opline->op2); zend_function *func; zval *func_zv; if (script && (func = zend_hash_find_ptr(&script->function_table, Z_STR_P(function_name)))) { @@ -941,7 +918,7 @@ zend_function *zend_optimizer_get_called_func( const zend_class_entry *ce = zend_optimizer_get_class_entry_from_op1( script, op_array, opline); if (ce) { - zend_string *func_name = Z_STR_P(CRT_CONSTANT(opline->op2) + 1); + zend_string *func_name = Z_STR_P(CRT_CONSTANT(opline->op2)); zend_function *fbc = zend_hash_find_ptr(&ce->function_table, func_name); if (fbc && !(fbc->common.fn_flags & ZEND_ACC_ABSTRACT)) { bool is_public = (fbc->common.fn_flags & ZEND_ACC_PUBLIC) != 0; @@ -959,7 +936,7 @@ zend_function *zend_optimizer_get_called_func( && op_array->scope && !(op_array->fn_flags & ZEND_ACC_TRAIT_CLONE) && !(op_array->scope->ce_flags & ZEND_ACC_TRAIT)) { - zend_string *method_name = Z_STR_P(CRT_CONSTANT(opline->op2) + 1); + zend_string *method_name = Z_STR_P(CRT_CONSTANT(opline->op2)); zend_function *fbc = zend_hash_find_ptr( &op_array->scope->function_table, method_name); if (fbc) { diff --git a/Zend/Optimizer/zend_optimizer_internal.h b/Zend/Optimizer/zend_optimizer_internal.h index d01df56260bc..d850b0df7752 100644 --- a/Zend/Optimizer/zend_optimizer_internal.h +++ b/Zend/Optimizer/zend_optimizer_internal.h @@ -100,7 +100,7 @@ bool zend_optimizer_replace_by_const(zend_op_array *op_array, zval *val); zend_op *zend_optimizer_get_loop_var_def(const zend_op_array *op_array, zend_op *free_opline); zend_class_entry *zend_optimizer_get_class_entry( - const zend_script *script, const zend_op_array *op_array, zend_string *lcname); + const zend_script *script, const zend_op_array *op_array, zend_string *name); zend_class_entry *zend_optimizer_get_class_entry_from_op1( const zend_script *script, const zend_op_array *op_array, const zend_op *opline); const zend_class_constant *zend_fetch_class_const_info( diff --git a/Zend/Optimizer/zend_ssa.c b/Zend/Optimizer/zend_ssa.c index fa2901b89421..018285e3b720 100644 --- a/Zend/Optimizer/zend_ssa.c +++ b/Zend/Optimizer/zend_ssa.c @@ -523,8 +523,8 @@ static void place_essa_pis( opline->op1.var == (opline-1)->result.var && (opline-1)->op1_type == IS_CV && (opline-1)->op2_type == IS_CONST) { int var = EX_VAR_TO_NUM((opline-1)->op1.var); - zend_string *lcname = Z_STR_P(CRT_CONSTANT_EX(op_array, (opline-1), (opline-1)->op2) + 1); - zend_class_entry *ce = zend_optimizer_get_class_entry(script, op_array, lcname); + zend_string *class_name = Z_STR_P(CRT_CONSTANT_EX(op_array, (opline-1), (opline-1)->op2)); + zend_class_entry *ce = zend_optimizer_get_class_entry(script, op_array, class_name); if (!ce) { continue; } diff --git a/Zend/tests/add_002.phpt b/Zend/tests/add_002.phpt index 9077ece08587..0ed1b84bf202 100644 --- a/Zend/tests/add_002.phpt +++ b/Zend/tests/add_002.phpt @@ -5,7 +5,7 @@ adding objects to arrays $a = array(1,2,3); -$o = new stdclass; +$o = new stdClass; $o->prop = "value"; try { diff --git a/Zend/tests/add_003.phpt b/Zend/tests/add_003.phpt index 6d27863e893f..a9d58c5f7d3f 100644 --- a/Zend/tests/add_003.phpt +++ b/Zend/tests/add_003.phpt @@ -5,7 +5,7 @@ adding arrays to objects $a = array(1,2,3); -$o = new stdclass; +$o = new stdClass; $o->prop = "value"; try { diff --git a/Zend/tests/arg_unpack/invalid_type.phpt b/Zend/tests/arg_unpack/invalid_type.phpt index a0e649371528..6857cec11a0b 100644 --- a/Zend/tests/arg_unpack/invalid_type.phpt +++ b/Zend/tests/arg_unpack/invalid_type.phpt @@ -29,7 +29,7 @@ try { echo $e::class . ": " . $e->getMessage(), "\n"; } try { - test(1, 2, 3, ...new StdClass, ...3.14, ...[4, 5]); + test(1, 2, 3, ...new stdClass, ...3.14, ...[4, 5]); } catch (Error $e) { echo $e::class . ": " . $e->getMessage(), "\n"; } diff --git a/Zend/tests/asymmetric_visibility/protected.phpt b/Zend/tests/asymmetric_visibility/protected.phpt index 49a39b399362..1b51b0d348da 100644 --- a/Zend/tests/asymmetric_visibility/protected.phpt +++ b/Zend/tests/asymmetric_visibility/protected.phpt @@ -48,10 +48,10 @@ try { echo $e->getMessage(), "\n"; } -$foo->setbazPrivate('baz2'); +$foo->setBazPrivate('baz2'); var_dump($foo->baz); -$foo->setbazProtected('baz3'); +$foo->setBazProtected('baz3'); var_dump($foo->baz); diff --git a/Zend/tests/attributes/deprecated/traits/insteadof_unused_warnings.phpt b/Zend/tests/attributes/deprecated/traits/insteadof_unused_warnings.phpt index 390455f73ba7..df6331b72f56 100644 --- a/Zend/tests/attributes/deprecated/traits/insteadof_unused_warnings.phpt +++ b/Zend/tests/attributes/deprecated/traits/insteadof_unused_warnings.phpt @@ -24,7 +24,7 @@ trait DemoTraitB { } class DemoClass { - use DemoTraita, DemoTraitB { + use DemoTraitA, DemoTraitB { DemoTraitA::lowerCase insteadof DemoTraitB; DemoTraitA::upperCase insteadof DemoTraitB; } diff --git a/Zend/tests/attributes/deprecated/traits/with_conflicts.phpt b/Zend/tests/attributes/deprecated/traits/with_conflicts.phpt index 5adbb3c57d49..cf3028001550 100644 --- a/Zend/tests/attributes/deprecated/traits/with_conflicts.phpt +++ b/Zend/tests/attributes/deprecated/traits/with_conflicts.phpt @@ -24,7 +24,7 @@ trait DemoTraitB { } class DemoClass { - use DemoTraita, DemoTraitB { + use DemoTraitA, DemoTraitB { DemoTraitA::lowerCase insteadof DemoTraitB; DemoTraitB::upperCase insteadof DemoTraitA; } diff --git a/Zend/tests/bug18556.phpt b/Zend/tests/bug18556.phpt index 94e12097de13..360a63d3ea35 100644 --- a/Zend/tests/bug18556.phpt +++ b/Zend/tests/bug18556.phpt @@ -13,8 +13,8 @@ class InfoBlob { } } -echo "Instantiating an infoBlob with a lowercase i\n"; -$foobar = new infoBlob(); +echo "Instantiating an InfoBlob\n"; +$foobar = new InfoBlob(); echo $foobar->foo; echo "\nInstantiating an InfoBlob with an uppercase I\n"; $foobar = new InfoBlob(); @@ -30,7 +30,7 @@ foreach(get_declared_classes() as $class) echo "Done.\n"; ?> --EXPECT-- -Instantiating an infoBlob with a lowercase i +Instantiating an InfoBlob Foo Instantiating an InfoBlob with an uppercase I Foo diff --git a/Zend/tests/bug45180.phpt b/Zend/tests/bug45180.phpt index 77daa07b4db1..cd52b8665878 100644 --- a/Zend/tests/bug45180.phpt +++ b/Zend/tests/bug45180.phpt @@ -5,11 +5,11 @@ Testing callback formats within class method class foo { public function test() { - call_user_func(array('FOO', 'ABC')); + call_user_func(array('foo', 'ABC')); call_user_func(array($this, 'ABC')); foo::XYZ(); self::WWW(); - call_user_func('FOO::ABC'); + call_user_func('foo::ABC'); } function __call($a, $b) { print "__call:\n"; @@ -29,7 +29,7 @@ $x::A(); foo::B(); -$f = 'FOO'; +$f = 'foo'; $f::C(); @@ -56,6 +56,6 @@ string(1) "B" __callstatic: string(1) "C" __callstatic: -string(3) "FOO" +string(3) "foo" __callstatic: -string(3) "FOO" +string(3) "foo" diff --git a/Zend/tests/bug51827.phpt b/Zend/tests/bug51827.phpt index 1b91345e34a3..81ac1d9255f7 100644 --- a/Zend/tests/bug51827.phpt +++ b/Zend/tests/bug51827.phpt @@ -8,9 +8,9 @@ function abc() { var_dump(1); } -register_shutdown_function('timE'); -register_shutdown_function('ABC'); -register_shutdown_function('exploDe'); +register_shutdown_function('time'); +register_shutdown_function('abc'); +register_shutdown_function('explode'); ?> --EXPECT-- diff --git a/Zend/tests/bug70124.phpt b/Zend/tests/bug70124.phpt index 51f592d24d19..80d4b79fdc68 100644 --- a/Zend/tests/bug70124.phpt +++ b/Zend/tests/bug70124.phpt @@ -13,7 +13,7 @@ class A { } try { - echo base_convert([array_search(chr(48),chr(48),chr(48),chr(48),chr(48),a::y("test"))],chr(48)); + echo base_convert([array_search(chr(48),chr(48),chr(48),chr(48),chr(48),A::y("test"))],chr(48)); } catch (Error $e) { var_dump($e->getMessage()); } diff --git a/Zend/tests/bug70262.phpt b/Zend/tests/bug70262.phpt index 7e285e8002f8..06dc02da32cd 100644 --- a/Zend/tests/bug70262.phpt +++ b/Zend/tests/bug70262.phpt @@ -10,7 +10,7 @@ $extra = $array; // make the refcount == 2 class A { public function getObj($array) { - $obj = new Stdclass; + $obj = new stdClass; $obj->arr = $array; // make the refcount == 3; return $obj; } diff --git a/Zend/tests/bug70288.phpt b/Zend/tests/bug70288.phpt index 502bfc7bf006..0745d6edadc6 100644 --- a/Zend/tests/bug70288.phpt +++ b/Zend/tests/bug70288.phpt @@ -4,7 +4,7 @@ Bug #70288 (Apache crash related to ZEND_SEND_REF) name = array(); test($arg)->name[1] = "xxxx"; diff --git a/Zend/tests/bug78502.phpt b/Zend/tests/bug78502.phpt index 1f83e27644a3..2e709e35b004 100644 --- a/Zend/tests/bug78502.phpt +++ b/Zend/tests/bug78502.phpt @@ -14,7 +14,7 @@ $tree = [ ], ]; -function tree_map($tree, $recursive_attr, closure $callback){ +function tree_map($tree, $recursive_attr, Closure $callback){ if(isset($tree[$recursive_attr])){ $tree[$recursive_attr] = array_map(function($c) use($recursive_attr, $callback){ return tree_map($c, $recursive_attr, $callback); diff --git a/Zend/tests/call_user_functions/call_user_func_005.phpt b/Zend/tests/call_user_functions/call_user_func_005.phpt index ea79e149f27a..5cc848946925 100644 --- a/Zend/tests/call_user_functions/call_user_func_005.phpt +++ b/Zend/tests/call_user_functions/call_user_func_005.phpt @@ -4,7 +4,7 @@ Passing Closure as parameter to an non-existent function --EXPECTF-- -Warning: Cannot redeclare class FOO (previously declared in %s:%d) in %s on line %d +Warning: Cannot redeclare class foo (previously declared in %s:%d) in %s on line %d diff --git a/Zend/tests/class_alias/class_alias_006.phpt b/Zend/tests/class_alias/class_alias_006.phpt index 2548d8f143ae..3ac3f5538e0f 100644 --- a/Zend/tests/class_alias/class_alias_006.phpt +++ b/Zend/tests/class_alias/class_alias_006.phpt @@ -3,7 +3,7 @@ Testing creation of alias to an internal class --FILE-- --EXPECT-- bool(false) -bool(true) +bool(false) bool(false) bool(false) diff --git a/Zend/tests/class_name_case/backslash_prefix.phpt b/Zend/tests/class_name_case/backslash_prefix.phpt new file mode 100644 index 000000000000..36468af155f6 --- /dev/null +++ b/Zend/tests/class_name_case/backslash_prefix.phpt @@ -0,0 +1,32 @@ +--TEST-- +Class name with leading backslash uses correct case +--FILE-- +getMessage() . "\n"; +} +?> +--EXPECT-- +bool(true) +bool(true) +bool(true) +bool(false) +bool(false) +Class "\FOO" not found diff --git a/Zend/tests/class_name_case/catch_clause.phpt b/Zend/tests/class_name_case/catch_clause.phpt new file mode 100644 index 000000000000..b445e39e73b3 --- /dev/null +++ b/Zend/tests/class_name_case/catch_clause.phpt @@ -0,0 +1,39 @@ +--TEST-- +Class name with incorrect case fails in catch clause +--FILE-- + +--EXPECT-- +caught +not caught by wrong case +rethrown diff --git a/Zend/tests/class_name_case/catch_clause_user_handler.phpt b/Zend/tests/class_name_case/catch_clause_user_handler.phpt new file mode 100644 index 000000000000..b8a6b09a127e --- /dev/null +++ b/Zend/tests/class_name_case/catch_clause_user_handler.phpt @@ -0,0 +1,18 @@ +--TEST-- +Class name with incorrect case in catch clause is not caught +--FILE-- + +--EXPECT-- +not caught by wrong case diff --git a/Zend/tests/class_name_case/class_constant.phpt b/Zend/tests/class_name_case/class_constant.phpt new file mode 100644 index 000000000000..dd27591eba9c --- /dev/null +++ b/Zend/tests/class_name_case/class_constant.phpt @@ -0,0 +1,26 @@ +--TEST-- +Class name with incorrect case fails in class constant access +--FILE-- +getMessage() . "\n"; +} + +try { + var_dump(foo::BAR); // wrong case +} catch (Error $e) { + echo $e->getMessage() . "\n"; +} +?> +--EXPECT-- +int(42) +Class "FOO" not found +Class "foo" not found diff --git a/Zend/tests/class_name_case/class_exists_functions.phpt b/Zend/tests/class_name_case/class_exists_functions.phpt new file mode 100644 index 000000000000..b8c026e1ef59 --- /dev/null +++ b/Zend/tests/class_name_case/class_exists_functions.phpt @@ -0,0 +1,25 @@ +--TEST-- +Class name with incorrect case returns false in class_exists, interface_exists, trait_exists +--FILE-- + +--EXPECT-- +bool(true) +bool(true) +bool(true) +bool(false) +bool(false) +bool(false) diff --git a/Zend/tests/class_name_case/class_keyword_case_insensitive.phpt b/Zend/tests/class_name_case/class_keyword_case_insensitive.phpt new file mode 100644 index 000000000000..1bd9a549f0bb --- /dev/null +++ b/Zend/tests/class_name_case/class_keyword_case_insensitive.phpt @@ -0,0 +1,16 @@ +--TEST-- +The ::class keyword stays case-insensitive (it is a keyword, not a member name) +--FILE-- + +--EXPECT-- +string(3) "Foo" +string(3) "Foo" +string(3) "Foo" diff --git a/Zend/tests/class_name_case/instanceof.phpt b/Zend/tests/class_name_case/instanceof.phpt new file mode 100644 index 000000000000..4834e8b38414 --- /dev/null +++ b/Zend/tests/class_name_case/instanceof.phpt @@ -0,0 +1,16 @@ +--TEST-- +Class name with incorrect case fails in instanceof operator +--FILE-- + +--EXPECT-- +bool(true) +bool(false) +bool(false) diff --git a/Zend/tests/class_name_case/is_a_functions.phpt b/Zend/tests/class_name_case/is_a_functions.phpt new file mode 100644 index 000000000000..6d7e0d8f5400 --- /dev/null +++ b/Zend/tests/class_name_case/is_a_functions.phpt @@ -0,0 +1,21 @@ +--TEST-- +Class name with incorrect case returns false in is_a and is_subclass_of +--FILE-- + +--EXPECT-- +bool(true) +bool(true) +bool(false) +bool(false) diff --git a/Zend/tests/class_name_case/magic_method.phpt b/Zend/tests/class_name_case/magic_method.phpt new file mode 100644 index 000000000000..52bbb2972bdc --- /dev/null +++ b/Zend/tests/class_name_case/magic_method.phpt @@ -0,0 +1,12 @@ +--TEST-- +Magic method with incorrect casing is a compile error +--FILE-- + +--EXPECTF-- +Fatal error: Method Foo::__CONSTRUCT() must be spelled __construct() in %s on line %d diff --git a/Zend/tests/class_name_case/magic_method_wrong_case_callstatic.phpt b/Zend/tests/class_name_case/magic_method_wrong_case_callstatic.phpt new file mode 100644 index 000000000000..bcbeb6f281b8 --- /dev/null +++ b/Zend/tests/class_name_case/magic_method_wrong_case_callstatic.phpt @@ -0,0 +1,10 @@ +--TEST-- +Declaring a magic method with wrong case is a compile error (__callstatic) +--FILE-- + +--EXPECTF-- +Fatal error: Method Foo::__callstatic() must be spelled __callStatic() in %s on line %d diff --git a/Zend/tests/class_name_case/magic_method_wrong_case_construct.phpt b/Zend/tests/class_name_case/magic_method_wrong_case_construct.phpt new file mode 100644 index 000000000000..2f7f65e79987 --- /dev/null +++ b/Zend/tests/class_name_case/magic_method_wrong_case_construct.phpt @@ -0,0 +1,10 @@ +--TEST-- +Declaring a magic method with wrong case is a compile error (__Construct) +--FILE-- + +--EXPECTF-- +Fatal error: Method Foo::__Construct() must be spelled __construct() in %s on line %d diff --git a/Zend/tests/class_name_case/magic_method_wrong_case_tostring.phpt b/Zend/tests/class_name_case/magic_method_wrong_case_tostring.phpt new file mode 100644 index 000000000000..ce2718fd51e9 --- /dev/null +++ b/Zend/tests/class_name_case/magic_method_wrong_case_tostring.phpt @@ -0,0 +1,10 @@ +--TEST-- +Declaring a magic method with wrong case is a compile error (__tostring) +--FILE-- + +--EXPECTF-- +Fatal error: Method Foo::__tostring() must be spelled __toString() in %s on line %d diff --git a/Zend/tests/class_name_case/new_dynamic.phpt b/Zend/tests/class_name_case/new_dynamic.phpt new file mode 100644 index 000000000000..97426ff8e4f6 --- /dev/null +++ b/Zend/tests/class_name_case/new_dynamic.phpt @@ -0,0 +1,20 @@ +--TEST-- +Class name with incorrect case fails in dynamic new operator +--FILE-- +getMessage() . "\n"; +} +?> +--EXPECT-- +bool(true) +Class "FOO" not found diff --git a/Zend/tests/class_name_case/new_operator.phpt b/Zend/tests/class_name_case/new_operator.phpt new file mode 100644 index 000000000000..034fdffc2c41 --- /dev/null +++ b/Zend/tests/class_name_case/new_operator.phpt @@ -0,0 +1,25 @@ +--TEST-- +Class name with incorrect case fails in new operator +--FILE-- +getMessage() . "\n"; +} + +try { + $o = new foo(); // wrong case +} catch (Error $e) { + echo $e->getMessage() . "\n"; +} +?> +--EXPECT-- +bool(true) +Class "FOO" not found +Class "foo" not found diff --git a/Zend/tests/class_name_case/no_warn.phpt b/Zend/tests/class_name_case/no_warn.phpt new file mode 100644 index 000000000000..06f703908523 --- /dev/null +++ b/Zend/tests/class_name_case/no_warn.phpt @@ -0,0 +1,43 @@ +--TEST-- +Class name with correct case does not produce deprecation warnings +--FILE-- + +--EXPECT-- +ok +1 +2 +bool(true) +bool(true) +bool(true) +caught +bool(true) +No deprecations diff --git a/Zend/tests/class_name_case/static_method.phpt b/Zend/tests/class_name_case/static_method.phpt new file mode 100644 index 000000000000..a45374be32c5 --- /dev/null +++ b/Zend/tests/class_name_case/static_method.phpt @@ -0,0 +1,26 @@ +--TEST-- +Class name with incorrect case fails in static method call +--FILE-- +getMessage() . "\n"; +} + +try { + echo foo::bar() . "\n"; // wrong case +} catch (Error $e) { + echo $e->getMessage() . "\n"; +} +?> +--EXPECT-- +ok +Class "FOO" not found +Class "foo" not found diff --git a/Zend/tests/class_name_case/static_property.phpt b/Zend/tests/class_name_case/static_property.phpt new file mode 100644 index 000000000000..c713147f5d38 --- /dev/null +++ b/Zend/tests/class_name_case/static_property.phpt @@ -0,0 +1,26 @@ +--TEST-- +Class name with incorrect case fails in static property access +--FILE-- +getMessage() . "\n"; +} + +try { + var_dump(foo::$x); // wrong case +} catch (Error $e) { + echo $e->getMessage() . "\n"; +} +?> +--EXPECT-- +int(42) +Class "FOO" not found +Class "foo" not found diff --git a/Zend/tests/closures/bug52193.phpt b/Zend/tests/closures/bug52193.phpt index 7fe0f1c71a60..3d12555d0b63 100644 --- a/Zend/tests/closures/bug52193.phpt +++ b/Zend/tests/closures/bug52193.phpt @@ -31,90 +31,8 @@ array(1) { } array(0) { } -array(0) { -} -array(1) { - [0]=> - object(Closure)#%d (3) { - ["name"]=> - string(%d) "{closure:%s:%d}" - ["file"]=> - string(%d) "%s" - ["line"]=> - int(%d) - } -} -int(2) -array(1) { - [0]=> - object(Closure)#%d (4) { - ["name"]=> - string(%d) "{closure:%s:%d}" - ["file"]=> - string(%d) "%s" - ["line"]=> - int(%d) - ["static"]=> - array(1) { - ["h"]=> - &array(1) { - [0]=> - object(Closure)#%d (3) { - ["name"]=> - string(%d) "{closure:%s:%d}" - ["file"]=> - string(%d) "%s" - ["line"]=> - int(%d) - } - } - } - } -} -object(Closure)#%d (4) { - ["name"]=> - string(%d) "{closure:%s:%d}" - ["file"]=> - string(%d) "%s" - ["line"]=> - int(%d) - ["static"]=> - array(1) { - ["h"]=> - &array(1) { - [0]=> - object(Closure)#%d (3) { - ["name"]=> - string(%d) "{closure:%s:%d}" - ["file"]=> - string(%d) "%s" - ["line"]=> - int(%d) - } - } - } -} -array(1) { - [0]=> - object(Closure)#%d (3) { - ["name"]=> - string(%d) "{closure:%s:%d}" - ["file"]=> - string(%d) "%s" - ["line"]=> - int(%d) - } -} -array(2) { - [0]=> - object(Closure)#%d (3) { - ["name"]=> - string(%d) "{closure:%s:%d}" - ["file"]=> - string(%d) "%s" - ["line"]=> - int(%d) - } - [1]=> - int(5) -} + +Fatal error: Uncaught Error: Class "stdclass" not found in %s:%d +Stack trace: +#%d {main} + thrown in %s on line %d diff --git a/Zend/tests/closures/bug77627.phpt b/Zend/tests/closures/bug77627.phpt index a67a8c2fad78..6cd29b0b3d45 100644 --- a/Zend/tests/closures/bug77627.phpt +++ b/Zend/tests/closures/bug77627.phpt @@ -11,5 +11,5 @@ var_dump(method_exists($closure, "__INVOKE")); ?> --EXPECT-- bool(true) -bool(true) -bool(true) +bool(false) +bool(false) diff --git a/Zend/tests/closures/closure_020.phpt b/Zend/tests/closures/closure_020.phpt index 658a1a232e44..e25b58ed0b79 100644 --- a/Zend/tests/closures/closure_020.phpt +++ b/Zend/tests/closures/closure_020.phpt @@ -30,11 +30,11 @@ object(foo)#%d (2) { ["a"]=> object(Closure)#%d (5) { ["name"]=> - string(%d) "{closure:%s:%d}" + string(%d) "{closure:foo::x():%d}" ["file"]=> string(%d) "%s" ["line"]=> - int(%d) + int(9) ["static"]=> array(1) { ["a"]=> @@ -44,10 +44,10 @@ object(foo)#%d (2) { *RECURSION* } } -bool(true) +bool(false) bool(true) Fatal error: Uncaught Error: Cannot access private property foo::$test in %s:%d Stack trace: -#0 {main} +#%d {main} thrown in %s on line %d diff --git a/Zend/tests/closures/closure_027.phpt b/Zend/tests/closures/closure_027.phpt index 6e467856100a..b4252b0f285c 100644 --- a/Zend/tests/closures/closure_027.phpt +++ b/Zend/tests/closures/closure_027.phpt @@ -23,15 +23,9 @@ test(new stdclass); ?> --EXPECTF-- -object(stdClass)#%d (0) { -} -NULL - -Warning: Undefined variable $y in %s on line %d -Exception: Too few arguments to function {closure:%s:%d}(), 0 passed in %s on line %d and exactly 1 expected - -Fatal error: Uncaught TypeError: test(): Argument #1 ($a) must be of type Closure, stdClass given, called in %s:%d +Fatal error: Uncaught Error: Class "stdclass" not found in %s:%d Stack trace: -#0 %s(%d): test(Object(stdClass)) -#1 {main} +#%d %s(4): {closure:%s:%d}() +#%d %s(8): test(Object(Closure)) +#%d {main} thrown in %s on line %d diff --git a/Zend/tests/closures/closure_029.phpt b/Zend/tests/closures/closure_029.phpt index 8d909c025699..52db9539f20a 100644 --- a/Zend/tests/closures/closure_029.phpt +++ b/Zend/tests/closures/closure_029.phpt @@ -9,6 +9,6 @@ var_dump(@function(&$x) use ($y, $z) { } instanceof closure); ?> --EXPECT-- -bool(true) -bool(true) -bool(true) +bool(false) +bool(false) +bool(false) diff --git a/Zend/tests/closures/closure_032.phpt b/Zend/tests/closures/closure_032.phpt index 1606b4c2466f..dc270608d051 100644 --- a/Zend/tests/closures/closure_032.phpt +++ b/Zend/tests/closures/closure_032.phpt @@ -19,7 +19,7 @@ Array [0] => Array ( [file] => %s - [line] => %d + [line] => 10 [function] => {closure:%s:%d} [args] => Array ( @@ -29,44 +29,10 @@ Array ) ) -#0 %s(%d): {closure:%s:%d}(23) -Array -( - [0] => Array - ( - [file] => %s - [line] => %d - [function] => {closure:%s:%d} - [args] => Array - ( - [0] => 23 - ) - - ) +#%d %s(10): {closure:%s:%d}(23) - [1] => Array - ( - [file] => %s - [line] => %d - [function] => test - [args] => Array - ( - [0] => Closure Object - ( - [name] => {closure:%s:%d} - [file] => %s - [line] => 8 - [parameter] => Array - ( - [$param] => - ) - - ) - - ) - - ) - -) -#0 %s(%d): {closure:%s:%d}(23) -#1 %s(%d): test(Object(Closure)) +Fatal error: Uncaught TypeError: test(): Argument #%d ($a) must be of type closure, Closure given, called in %s on line %d and defined in %s:%d +Stack trace: +#%d %s(11): test(Object(Closure)) +#%d {main} + thrown in %s on line %d diff --git a/Zend/tests/closures/closure_call.phpt b/Zend/tests/closures/closure_call.phpt index cfc5f51af966..8f39bce01488 100644 --- a/Zend/tests/closures/closure_call.phpt +++ b/Zend/tests/closures/closure_call.phpt @@ -61,7 +61,7 @@ int(0) int(0) int(3) -Warning: Cannot bind closure to scope of internal class stdClass, this will be an error in PHP 9 in %s line %d -NULL -int(21) -int(3) +Fatal error: Uncaught Error: Class "StdClass" not found in %s:%d +Stack trace: +#%d {main} + thrown in %s on line %d diff --git a/Zend/tests/closures/closure_from_callable_basic.phpt b/Zend/tests/closures/closure_from_callable_basic.phpt index 7c7fdf5a288b..f938027eb6ce 100644 --- a/Zend/tests/closures/closure_from_callable_basic.phpt +++ b/Zend/tests/closures/closure_from_callable_basic.phpt @@ -98,30 +98,9 @@ echo $fn(" OK".PHP_EOL); ?> --EXPECTF-- Access public static function OK -Access public static function with different case OK -Access public static function with colon scheme OK -Access public instance method of object OK -Access public instance method of parent object through parent:: OK -Function that exists OK -Function that exists with different spelling OK -Closure is already a closure OK -Class with public invocable OK -Instance return private method as callable OK -Instance return private static method as callable OK -Instance return protected static method as callable OK -Subclass closure over parent class protected method OK -Subclass closure over parent class static protected method OK -Access public instance method of parent object through "parent::" -Deprecated: Use of "parent" in callables is deprecated in %s on line %d - OK -Access public instance method of self object through "self::" -Deprecated: Use of "self" in callables is deprecated in %s on line %d - OK -Access public instance method of parent object through "self::" to parent method -Deprecated: Use of "self" in callables is deprecated in %s on line %d - OK -Access protected instance method of parent object through "self::" to parent method -Deprecated: Use of "self" in callables is deprecated in %s on line %d - OK -MagicCall __call instance method __call,nonExistentMethod, OK -MagicCall __callStatic static method __callStatic,nonExistentMethod, OK +Access public static function with different case +Fatal error: Uncaught TypeError: Failed to create closure from callable: class "fOo" not found in %s:%d +Stack trace: +#%d %s(10): Closure::fromCallable(Array) +#%d {main} + thrown in %s on line %d diff --git a/Zend/tests/closures/closure_invoke_case_insensitive.phpt b/Zend/tests/closures/closure_invoke_case_insensitive.phpt index d41d58a747c3..a2aaf893feb8 100644 --- a/Zend/tests/closures/closure_invoke_case_insensitive.phpt +++ b/Zend/tests/closures/closure_invoke_case_insensitive.phpt @@ -12,5 +12,8 @@ $inc->__INVOKE($n); var_dump($n); ?> ---EXPECT-- -int(2) +--EXPECTF-- +Fatal error: Uncaught Error: Call to undefined method Closure::__INVOKE() in %s:%d +Stack trace: +#%d {main} + thrown in %s on line %d diff --git a/Zend/tests/closures/closure_static_property_error.phpt b/Zend/tests/closures/closure_static_property_error.phpt index 7fe8b2f6bf4f..2683a3243ae3 100644 --- a/Zend/tests/closures/closure_static_property_error.phpt +++ b/Zend/tests/closures/closure_static_property_error.phpt @@ -16,7 +16,7 @@ var_dump($x::$x); --EXPECTF-- int(1) -Fatal error: Uncaught Error: Access to undeclared static property Closure::$x in %s:%d +Fatal error: Uncaught Error: Class "closure" not found in %s:%d Stack trace: -#0 {main} +#%d {main} thrown in %s on line %d diff --git a/Zend/tests/comparison/compare_001.phpt b/Zend/tests/comparison/compare_001.phpt index adab47f76824..fd6add855232 100644 --- a/Zend/tests/comparison/compare_001.phpt +++ b/Zend/tests/comparison/compare_001.phpt @@ -20,8 +20,8 @@ $a = array( NULL, true, false, - new stdclass, - new stdclass, + new stdClass, + new stdClass, new test, array(), -PHP_INT_MAX-1, diff --git a/Zend/tests/comparison/compare_001_64bit.phpt b/Zend/tests/comparison/compare_001_64bit.phpt index abccceb8de76..68806cd1d8b9 100644 --- a/Zend/tests/comparison/compare_001_64bit.phpt +++ b/Zend/tests/comparison/compare_001_64bit.phpt @@ -20,8 +20,8 @@ $a = array( NULL, true, false, - new stdclass, - new stdclass, + new stdClass, + new stdClass, new test, array(), -PHP_INT_MAX-1, diff --git a/Zend/tests/comparison/compare_002.phpt b/Zend/tests/comparison/compare_002.phpt index f4646c84fa68..402aefa69feb 100644 --- a/Zend/tests/comparison/compare_002.phpt +++ b/Zend/tests/comparison/compare_002.phpt @@ -20,8 +20,8 @@ $a = array( NULL, true, false, - new stdclass, - new stdclass, + new stdClass, + new stdClass, new test, array(), -PHP_INT_MAX-1, diff --git a/Zend/tests/comparison/compare_002_64bit.phpt b/Zend/tests/comparison/compare_002_64bit.phpt index b0418cca1103..66ec96c87a41 100644 --- a/Zend/tests/comparison/compare_002_64bit.phpt +++ b/Zend/tests/comparison/compare_002_64bit.phpt @@ -20,8 +20,8 @@ $a = array( NULL, true, false, - new stdclass, - new stdclass, + new stdClass, + new stdClass, new test, array(), -PHP_INT_MAX-1, diff --git a/Zend/tests/comparison/compare_003.phpt b/Zend/tests/comparison/compare_003.phpt index a47335633e05..0a385b16af71 100644 --- a/Zend/tests/comparison/compare_003.phpt +++ b/Zend/tests/comparison/compare_003.phpt @@ -20,8 +20,8 @@ $a = array( NULL, true, false, - new stdclass, - new stdclass, + new stdClass, + new stdClass, new test, array(), -PHP_INT_MAX-1, diff --git a/Zend/tests/comparison/compare_003_64bit.phpt b/Zend/tests/comparison/compare_003_64bit.phpt index 359f53a86199..c6b1e563e9e3 100644 --- a/Zend/tests/comparison/compare_003_64bit.phpt +++ b/Zend/tests/comparison/compare_003_64bit.phpt @@ -20,8 +20,8 @@ $a = array( NULL, true, false, - new stdclass, - new stdclass, + new stdClass, + new stdClass, new test, array(), -PHP_INT_MAX-1, diff --git a/Zend/tests/comparison/compare_004.phpt b/Zend/tests/comparison/compare_004.phpt index e6755101c27e..7f3382692865 100644 --- a/Zend/tests/comparison/compare_004.phpt +++ b/Zend/tests/comparison/compare_004.phpt @@ -20,8 +20,8 @@ $a = array( NULL, true, false, - new stdclass, - new stdclass, + new stdClass, + new stdClass, new test, array(), -PHP_INT_MAX-1, diff --git a/Zend/tests/comparison/compare_004_64bit.phpt b/Zend/tests/comparison/compare_004_64bit.phpt index db44ef473729..0c589e2dabc7 100644 --- a/Zend/tests/comparison/compare_004_64bit.phpt +++ b/Zend/tests/comparison/compare_004_64bit.phpt @@ -20,8 +20,8 @@ $a = array( NULL, true, false, - new stdclass, - new stdclass, + new stdClass, + new stdClass, new test, array(), -PHP_INT_MAX-1, diff --git a/Zend/tests/comparison/compare_005.phpt b/Zend/tests/comparison/compare_005.phpt index 0b5b0ed7fd67..457b922de58a 100644 --- a/Zend/tests/comparison/compare_005.phpt +++ b/Zend/tests/comparison/compare_005.phpt @@ -20,8 +20,8 @@ $a = array( NULL, true, false, - new stdclass, - new stdclass, + new stdClass, + new stdClass, new test, array(), -PHP_INT_MAX-1, diff --git a/Zend/tests/comparison/compare_005_64bit.phpt b/Zend/tests/comparison/compare_005_64bit.phpt index c29bd332bf40..642d1677f56e 100644 --- a/Zend/tests/comparison/compare_005_64bit.phpt +++ b/Zend/tests/comparison/compare_005_64bit.phpt @@ -20,8 +20,8 @@ $a = array( NULL, true, false, - new stdclass, - new stdclass, + new stdClass, + new stdClass, new test, array(), -PHP_INT_MAX-1, diff --git a/Zend/tests/comparison/compare_006.phpt b/Zend/tests/comparison/compare_006.phpt index 4657a0d0a579..c3636d6bfe7b 100644 --- a/Zend/tests/comparison/compare_006.phpt +++ b/Zend/tests/comparison/compare_006.phpt @@ -20,8 +20,8 @@ $a = array( NULL, true, false, - new stdclass, - new stdclass, + new stdClass, + new stdClass, new test, array(), -PHP_INT_MAX-1, diff --git a/Zend/tests/comparison/compare_006_64bit.phpt b/Zend/tests/comparison/compare_006_64bit.phpt index a284dc1f45fd..7baa12cd315e 100644 --- a/Zend/tests/comparison/compare_006_64bit.phpt +++ b/Zend/tests/comparison/compare_006_64bit.phpt @@ -20,8 +20,8 @@ $a = array( NULL, true, false, - new stdclass, - new stdclass, + new stdClass, + new stdClass, new test, array(), -PHP_INT_MAX-1, diff --git a/Zend/tests/constant_arrays.phpt b/Zend/tests/constant_arrays.phpt index eecc76847545..6702f2d92b55 100644 --- a/Zend/tests/constant_arrays.phpt +++ b/Zend/tests/constant_arrays.phpt @@ -24,7 +24,7 @@ $y[0] = 3; var_dump($x, $y, QUX); // objects are allowed in arrays -define('ELEPHPANT', [new StdClass]); +define('ELEPHPANT', [new stdClass]); var_dump(ELEPHPANT); // ensure recursion doesn't crash diff --git a/Zend/tests/constants/008.phpt b/Zend/tests/constants/008.phpt index 14e074e5d30a..123d51b8c589 100644 --- a/Zend/tests/constants/008.phpt +++ b/Zend/tests/constants/008.phpt @@ -16,7 +16,7 @@ var_dump(define("test const", 3)); var_dump(define("test const", 3)); var_dump(define("test", array(1))); var_dump(define("test1", fopen(__FILE__, 'r'))); -var_dump(define("test2", new stdclass)); +var_dump(define("test2", new stdClass)); var_dump(constant(" ")); var_dump(constant("[[[")); diff --git a/Zend/tests/constants/bug46304.phpt b/Zend/tests/constants/bug46304.phpt index c456a8bbc226..252da0ac5ee8 100644 --- a/Zend/tests/constants/bug46304.phpt +++ b/Zend/tests/constants/bug46304.phpt @@ -8,31 +8,18 @@ define('ns1\ns2\const2','value2'); define('ns1\NS2\coNSt3','value3'); print NS1\ns2\const1 . "\n"; -print ns1\ns2\const1 . "\n"; -print ns1\NS2\const1 . "\n"; - -print NS1\ns2\const2 . "\n"; print ns1\ns2\const2 . "\n"; -print ns1\NS2\const2 . "\n"; - -print NS1\ns2\coNSt3 . "\n"; -print ns1\ns2\coNSt3 . "\n"; -print ns1\ns2\coNSt3 . "\n"; +print ns1\NS2\coNSt3 . "\n"; -print NS1\ns2\coNSt1 . "\n"; +/* The namespace portion is case-sensitive, like the constant name itself. */ +print ns1\ns2\const1 . "\n"; ?> --EXPECTF-- value1 -value1 -value1 -value2 -value2 value2 value3 -value3 -value3 -Fatal error: Uncaught Error: Undefined constant "NS1\ns2\coNSt1" in %s:%d +Fatal error: Uncaught Error: Undefined constant "ns1\ns2\const1" in %s:%d Stack trace: #0 {main} thrown in %sbug46304.php on line %d diff --git a/Zend/tests/debug_info/debug_info-error-case-insensitive.phpt b/Zend/tests/debug_info/debug_info-error-case-insensitive.phpt deleted file mode 100644 index c2a6f4357a5c..000000000000 --- a/Zend/tests/debug_info/debug_info-error-case-insensitive.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -Testing __debugInfo() magic method declared with non-canonical case ---FILE-- -val; - } - public function __construct($val) { - $this->val = $val; - } -} - -$c = new C(1); -var_dump($c); -?> ---EXPECTF-- -Fatal error: __debugInfo() must return an array in %s on line %d diff --git a/Zend/tests/dereference/dereference_004.phpt b/Zend/tests/dereference/dereference_004.phpt index 1ffe4bf3886e..4b2e6ded2cb9 100644 --- a/Zend/tests/dereference/dereference_004.phpt +++ b/Zend/tests/dereference/dereference_004.phpt @@ -9,7 +9,7 @@ class foo { public $x = array(); public function __construct() { $h = array(); - $h[] = new stdclass; + $h[] = new stdClass; $this->x = $h; } public function __invoke() { diff --git a/Zend/tests/dereference/dereference_005.phpt b/Zend/tests/dereference/dereference_005.phpt index 7a1a36a24811..490f88d45cf9 100644 --- a/Zend/tests/dereference/dereference_005.phpt +++ b/Zend/tests/dereference/dereference_005.phpt @@ -5,7 +5,7 @@ Testing array dereference on object that implements ArrayAccess error_reporting(E_ALL); -class obj implements arrayaccess { +class obj implements ArrayAccess { private $container = array(); public function __construct() { $this->container = array( diff --git a/Zend/tests/dynamic_call/bug68475.phpt b/Zend/tests/dynamic_call/bug68475.phpt index fef8173fc643..0b2ee6c097f9 100644 --- a/Zend/tests/dynamic_call/bug68475.phpt +++ b/Zend/tests/dynamic_call/bug68475.phpt @@ -19,8 +19,8 @@ class TestClass $callback = 'TestClass::staticMethod'; $callback(); -// Case should not matter. -$callback = 'testclass::staticmethod'; +// Method names are case-sensitive; use the declared case. +$callback = 'TestClass::staticMethod'; $callback(); $args = ['arg1', 'arg2', 'arg3']; diff --git a/Zend/tests/errmsg/errmsg_026.phpt b/Zend/tests/errmsg/errmsg_026.phpt index 911b4f811d6c..7e299aa34332 100644 --- a/Zend/tests/errmsg/errmsg_026.phpt +++ b/Zend/tests/errmsg/errmsg_026.phpt @@ -3,7 +3,7 @@ errmsg: cannot redeclare class --FILE-- --EXPECTF-- diff --git a/Zend/tests/error_reporting/bug72162.phpt b/Zend/tests/error_reporting/bug72162.phpt index 721b0fc30680..ff1f6e43304f 100644 --- a/Zend/tests/error_reporting/bug72162.phpt +++ b/Zend/tests/error_reporting/bug72162.phpt @@ -3,7 +3,7 @@ Bug #72162 (use-after-free - error_reporting) --FILE-- file = ""; } diff --git a/Zend/tests/exceptions/bug64821.1.phpt b/Zend/tests/exceptions/bug64821.1.phpt index f59a9c5f14c6..f05be8a73d1f 100644 --- a/Zend/tests/exceptions/bug64821.1.phpt +++ b/Zend/tests/exceptions/bug64821.1.phpt @@ -4,7 +4,7 @@ Bug #64821 Custom Exceptions crash when internal properties overridden (variatio message = NULL; $this->string = NULL; diff --git a/Zend/tests/exceptions/bug64821.2.phpt b/Zend/tests/exceptions/bug64821.2.phpt index 61b17ff6da78..127a2fd6c80f 100644 --- a/Zend/tests/exceptions/bug64821.2.phpt +++ b/Zend/tests/exceptions/bug64821.2.phpt @@ -3,7 +3,7 @@ Bug #64821 Custom Exceptions crash when internal properties overridden (variatio --FILE-- line = 0; } diff --git a/Zend/tests/exceptions/bug64821.3.phpt b/Zend/tests/exceptions/bug64821.3.phpt index d1f1ec9a5165..59548f21c785 100644 --- a/Zend/tests/exceptions/bug64821.3.phpt +++ b/Zend/tests/exceptions/bug64821.3.phpt @@ -3,7 +3,7 @@ Bug #64821 Custom Exceptions crash when internal properties overridden (variatio --FILE-- line = 0; $this->file = ""; diff --git a/Zend/tests/exceptions/bug76025.phpt b/Zend/tests/exceptions/bug76025.phpt index ba89e8a3f9ec..678136273309 100644 --- a/Zend/tests/exceptions/bug76025.phpt +++ b/Zend/tests/exceptions/bug76025.phpt @@ -4,7 +4,7 @@ Bug #76025 (Segfault while throwing exception in error_handler) message = new stdclass ; + $this->message = new stdClass ; $this->file = new my_file ; $this->line = "12" ; } diff --git a/Zend/tests/exceptions/exception_handler/exception_handler_005.phpt b/Zend/tests/exceptions/exception_handler/exception_handler_005.phpt index cad39dc40115..de5ca05dc7ab 100644 --- a/Zend/tests/exceptions/exception_handler/exception_handler_005.phpt +++ b/Zend/tests/exceptions/exception_handler/exception_handler_005.phpt @@ -20,4 +20,4 @@ throw new excEption(); echo "Done\n"; ?> --EXPECT-- -string(25) "foo1(): Exception thrown!" +string(21) "foo1(): Error thrown!" diff --git a/Zend/tests/exceptions/exception_handler/exception_handler_006.phpt b/Zend/tests/exceptions/exception_handler/exception_handler_006.phpt index 7bed20bbf7f9..ebcebc0f2dd0 100644 --- a/Zend/tests/exceptions/exception_handler/exception_handler_006.phpt +++ b/Zend/tests/exceptions/exception_handler/exception_handler_006.phpt @@ -22,4 +22,4 @@ throw new excEption(); echo "Done\n"; ?> --EXPECT-- -string(24) "foo(): Exception thrown!" +string(20) "foo(): Error thrown!" diff --git a/Zend/tests/exceptions/exception_handler/exception_handler_007.phpt b/Zend/tests/exceptions/exception_handler/exception_handler_007.phpt index 757154dde51c..bafdd9112965 100644 --- a/Zend/tests/exceptions/exception_handler/exception_handler_007.phpt +++ b/Zend/tests/exceptions/exception_handler/exception_handler_007.phpt @@ -20,7 +20,7 @@ throw new excEption(); echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught Exception in %s:%d +Fatal error: Uncaught Error: Class "excEption" not found in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/first_class_callable/constexpr/case_insensitive.phpt b/Zend/tests/first_class_callable/constexpr/case_insensitive.phpt index 1feaa718793d..b0d23b90317f 100644 --- a/Zend/tests/first_class_callable/constexpr/case_insensitive.phpt +++ b/Zend/tests/first_class_callable/constexpr/case_insensitive.phpt @@ -1,5 +1,5 @@ --TEST-- -Allow defining FCC in const expressions with case-insensitive names. +FCC names in const expressions are case-sensitive. --FILE-- --EXPECTF-- -object(Closure)#%d (2) { - ["function"]=> - string(%d) "%s" - ["parameter"]=> - array(1) { - ["$string"]=> - string(10) "" - } -} -string(3) "cba" +Fatal error: Uncaught Error: Call to undefined function StrRev() in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d diff --git a/Zend/tests/foreach/bug34873.phpt b/Zend/tests/foreach/bug34873.phpt index fd31842d59d4..5801892224b8 100644 --- a/Zend/tests/foreach/bug34873.phpt +++ b/Zend/tests/foreach/bug34873.phpt @@ -17,7 +17,7 @@ class pwa { var_dump($this->var['value']); } } -$myPwa = new Pwa(); +$myPwa = new pwa(); $myPwa->test(); echo "Done\n"; diff --git a/Zend/tests/frameless_jmp_004.phpt b/Zend/tests/frameless_jmp_004.phpt index 2597754641ed..1fa96111b3d6 100644 --- a/Zend/tests/frameless_jmp_004.phpt +++ b/Zend/tests/frameless_jmp_004.phpt @@ -10,7 +10,7 @@ function declare_local_class_exists() { } } declare_local_class_exists(); -var_dump(CLASS_EXISTS('Foo')); +var_dump(class_exists('Foo')); ?> --EXPECT-- string(16) "Foo\class_exists" diff --git a/Zend/tests/function_exists_basic.phpt b/Zend/tests/function_exists_basic.phpt index a49b7589811a..4f38c5ceb5cc 100644 --- a/Zend/tests/function_exists_basic.phpt +++ b/Zend/tests/function_exists_basic.phpt @@ -31,6 +31,6 @@ var_dump(function_exists('C::f')); *** Testing function_exists() : basic functionality *** Internal function: bool(true) User defined function: bool(true) -Case sensitivity: bool(true) +Case sensitivity: bool(false) Non existent function: bool(false) Method: bool(false) diff --git a/Zend/tests/gc/bug64896.phpt b/Zend/tests/gc/bug64896.phpt index cae45e3b2eee..d16bacaa7ef5 100644 --- a/Zend/tests/gc/bug64896.phpt +++ b/Zend/tests/gc/bug64896.phpt @@ -21,7 +21,7 @@ class bad } } -$foo = new stdclass; +$foo = new stdClass; $foo->foo = $foo; $foo->bad = new bad; diff --git a/Zend/tests/gc/bug69446_2.phpt b/Zend/tests/gc/bug69446_2.phpt index be7dfec02104..8f470592ae77 100644 --- a/Zend/tests/gc/bug69446_2.phpt +++ b/Zend/tests/gc/bug69446_2.phpt @@ -21,7 +21,7 @@ class bad } } -$foo = new stdclass; +$foo = new stdClass; $foo->foo = $foo; $foo->bad = new bad; diff --git a/Zend/tests/gc/gc_033.phpt b/Zend/tests/gc/gc_033.phpt index cc28fd6a1062..f06c1a004e54 100644 --- a/Zend/tests/gc/gc_033.phpt +++ b/Zend/tests/gc/gc_033.phpt @@ -6,7 +6,7 @@ zend.enable_gc = 1 a = array(); -$a->a[0] = new Stdclass(); +$a->a[0] = new stdClass(); $a->a[0]->a = $a; $a->a[1] = &$a->a; diff --git a/Zend/tests/generators/bug76427.phpt b/Zend/tests/generators/bug76427.phpt index dbf466c2def1..8379324668ee 100644 --- a/Zend/tests/generators/bug76427.phpt +++ b/Zend/tests/generators/bug76427.phpt @@ -6,8 +6,8 @@ $func = function () { yield 2; }; -$a = new stdclass(); -$b = new stdclass(); +$a = new stdClass(); +$b = new stdClass(); $a->b = $b; $b->a = $a; diff --git a/Zend/tests/generators/gc_order.phpt b/Zend/tests/generators/gc_order.phpt index 5f192ae3a6f8..e34b0c0e43f8 100644 --- a/Zend/tests/generators/gc_order.phpt +++ b/Zend/tests/generators/gc_order.phpt @@ -7,7 +7,7 @@ $gen = function() { yield; throw new Exception; // Just to create a live range }; -$a = new stdclass; +$a = new stdClass; $a->a = $a; $a->gen = $gen(); diff --git a/Zend/tests/get_defined_functions_basic.phpt b/Zend/tests/get_defined_functions_basic.phpt index 5069275b0ebf..0572d59471ae 100644 --- a/Zend/tests/get_defined_functions_basic.phpt +++ b/Zend/tests/get_defined_functions_basic.phpt @@ -39,7 +39,7 @@ if (!is_array($func["user"])) { } $user = $func["user"]; -if (count($user) == 2 && in_array("foo", $user) && in_array("helloworld", $user)) { +if (count($user) == 2 && in_array("foo", $user) && in_array("HelloWorld", $user)) { echo "TEST PASSED\n"; } else { echo "TEST FAILED: missing elements from 'user' array\n"; diff --git a/Zend/tests/get_parent_class_basic.phpt b/Zend/tests/get_parent_class_basic.phpt index b439fbf9fb3e..b60abbe38f71 100644 --- a/Zend/tests/get_parent_class_basic.phpt +++ b/Zend/tests/get_parent_class_basic.phpt @@ -60,7 +60,7 @@ try { echo $exception->getMessage() . "\n"; } -var_dump(get_parent_class(new stdclass)); +var_dump(get_parent_class(new stdClass)); try { get_parent_class(array()); diff --git a/Zend/tests/gh_21699.phpt b/Zend/tests/gh_21699.phpt index 49b58365dabf..a982a7da5b08 100644 --- a/Zend/tests/gh_21699.phpt +++ b/Zend/tests/gh_21699.phpt @@ -6,7 +6,7 @@ set_error_handler(function () { throw new Exception; }); class bar { - public static function __callstatic($fusion, $b) + public static function __callStatic($fusion, $b) { } public function test() diff --git a/Zend/tests/gh_21699_static.phpt b/Zend/tests/gh_21699_static.phpt index 4d9604ebe77b..e2620d4f54bd 100644 --- a/Zend/tests/gh_21699_static.phpt +++ b/Zend/tests/gh_21699_static.phpt @@ -6,7 +6,7 @@ set_error_handler(function () { throw new Exception; }); class bar { - public static function __callstatic($fusion, $b) + public static function __callStatic($fusion, $b) { } public function test() diff --git a/Zend/tests/heredoc_nowdoc/flexible-heredoc-nowdoc-lineno.phpt b/Zend/tests/heredoc_nowdoc/flexible-heredoc-nowdoc-lineno.phpt index 8aeddbd10d07..e759220452d6 100644 --- a/Zend/tests/heredoc_nowdoc/flexible-heredoc-nowdoc-lineno.phpt +++ b/Zend/tests/heredoc_nowdoc/flexible-heredoc-nowdoc-lineno.phpt @@ -26,5 +26,8 @@ try { } ?> ---EXPECT-- -int(20) +--EXPECTF-- +Fatal error: Uncaught Error: Class "exception" not found in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d diff --git a/Zend/tests/indirect_function_call/indirect_call_array_002.phpt b/Zend/tests/indirect_function_call/indirect_call_array_002.phpt index 5ef12f5cfbe8..b4cfdf23cfaa 100644 --- a/Zend/tests/indirect_function_call/indirect_call_array_002.phpt +++ b/Zend/tests/indirect_function_call/indirect_call_array_002.phpt @@ -8,7 +8,7 @@ $arr(); ?> --EXPECTF-- -Fatal error: Uncaught Error: Call to undefined method stdClass::b() in %s:%d +Fatal error: Uncaught Error: Class "stdclass" not found in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/indirect_function_call/indirect_call_string_001.phpt b/Zend/tests/indirect_function_call/indirect_call_string_001.phpt index 89707caf0468..ebbd6d527256 100644 --- a/Zend/tests/indirect_function_call/indirect_call_string_001.phpt +++ b/Zend/tests/indirect_function_call/indirect_call_string_001.phpt @@ -38,8 +38,10 @@ namespace CallNamespace $callback(...$args); } ?> ---EXPECT-- +--EXPECTF-- Static method called! -Static method called! -Static method called with args: arg1, arg2, arg3 -Static method called with args: arg1, arg2, arg3 + +Fatal error: Uncaught Error: Class "testnamespace\testclass" not found in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d diff --git a/Zend/tests/indirect_function_call/indirect_method_call_004.phpt b/Zend/tests/indirect_function_call/indirect_method_call_004.phpt index 6a4055595c2f..43e5e0e24dfc 100644 --- a/Zend/tests/indirect_function_call/indirect_method_call_004.phpt +++ b/Zend/tests/indirect_function_call/indirect_method_call_004.phpt @@ -20,7 +20,8 @@ var_dump(clone (new bar)->getZ()); ?> --EXPECTF-- -object(stdClass)#%d (0) { -} -object(stdClass)#%d (0) { -} +Fatal error: Uncaught Error: Class "stdclass" not found in %s:%d +Stack trace: +#0 %s(%d): bar->__construct() +#1 {main} + thrown in %s on line %d diff --git a/Zend/tests/inheritance/bug48215_2.phpt b/Zend/tests/inheritance/bug48215_2.phpt index aa687196e114..15c9d77144ca 100644 --- a/Zend/tests/inheritance/bug48215_2.phpt +++ b/Zend/tests/inheritance/bug48215_2.phpt @@ -3,7 +3,7 @@ Bug #48215 - parent::method() calls __construct, case sensitive test --FILE-- f =& $this->b - $x > $y = new StdClass; + $obj->f =& $this->b - $x > $y = new stdClass; static $a = $a; $t = 'x'; foreach (get_defined_vars() as $key => $e) {} diff --git a/Zend/tests/lazy_objects/serialize___serialize_may_initialize.phpt b/Zend/tests/lazy_objects/serialize___serialize_may_initialize.phpt index 632f6e978088..817fe41f299c 100644 --- a/Zend/tests/lazy_objects/serialize___serialize_may_initialize.phpt +++ b/Zend/tests/lazy_objects/serialize___serialize_may_initialize.phpt @@ -29,7 +29,7 @@ test('Ghost', $obj); $obj = $reflector->newLazyProxy(function ($obj) { var_dump("initializer"); - $c = new c(); + $c = new C(); $c->a = 1; return $c; }); diff --git a/Zend/tests/list/list_001.phpt b/Zend/tests/list/list_001.phpt index 4e0053edeeab..b6296e1e0643 100644 --- a/Zend/tests/list/list_001.phpt +++ b/Zend/tests/list/list_001.phpt @@ -3,9 +3,9 @@ --FILE-- diff --git a/Zend/tests/list/list_002.phpt b/Zend/tests/list/list_002.phpt index ac0d8974be4c..e52cca5c976f 100644 --- a/Zend/tests/list/list_002.phpt +++ b/Zend/tests/list/list_002.phpt @@ -5,7 +5,7 @@ Testing full-reference on list() error_reporting(E_ALL); -$a = new stdclass; +$a = new stdClass; $b =& $a; list($a, list($b)) = array($a, array($b)); diff --git a/Zend/tests/list/list_keyed_ArrayAccess.phpt b/Zend/tests/list/list_keyed_ArrayAccess.phpt index 40f7fd0ce5ed..2d56e8add04f 100644 --- a/Zend/tests/list/list_keyed_ArrayAccess.phpt +++ b/Zend/tests/list/list_keyed_ArrayAccess.phpt @@ -13,9 +13,9 @@ var_dump($good, $happy); echo PHP_EOL; $stdClassCollection = new SplObjectStorage; -$foo = new StdClass; +$foo = new stdClass; $stdClassCollection[$foo] = "foo"; -$bar = new StdClass; +$bar = new stdClass; $stdClassCollection[$bar] = "bar"; list($foo => $fooStr, $bar => $barStr) = $stdClassCollection; diff --git a/Zend/tests/list/list_reference_002.phpt b/Zend/tests/list/list_reference_002.phpt index 32aad686d1eb..b274f26bb991 100644 --- a/Zend/tests/list/list_reference_002.phpt +++ b/Zend/tests/list/list_reference_002.phpt @@ -2,7 +2,7 @@ "Reference Unpacking - New Reference" list() --FILE-- ---EXPECT-- -string(2) "ok" -string(2) "ok" -string(2) "ok" -string(2) "ok" -string(2) "ok" -string(2) "ok" -string(2) "ok" -string(2) "ok" -string(2) "ok" -NULL -string(2) "ok" -string(2) "ok" ---- -string(2) "ok" -string(2) "ok" -string(2) "ok" -string(2) "ok" -string(2) "ok" -string(2) "ok" -string(2) "ok" -string(2) "ok" -string(2) "ok" -NULL -string(2) "ok" -string(2) "ok" ---- +--EXPECTF-- +Fatal error: Class Foo contains 4 abstract methods and must therefore be declared abstract or implement the remaining methods (ArrayAccess::offsetExists, ArrayAccess::offsetGet, ArrayAccess::offsetSet, ...) in %s on line %d diff --git a/Zend/tests/magic_methods/bug45186.phpt b/Zend/tests/magic_methods/bug45186.phpt index 9e0078d77002..cc073f5d1897 100644 --- a/Zend/tests/magic_methods/bug45186.phpt +++ b/Zend/tests/magic_methods/bug45186.phpt @@ -1,5 +1,5 @@ --TEST-- -Bug #45186 (__call depends on __callstatic in class scope) +Bug #45186 (__call depends on __callStatic in class scope) --FILE-- --EXPECTF-- __call: -string(3) "ABC" +string(%d) "ABC" __call: -string(3) "ABC" -__call: -string(3) "xyz" -__call: -string(3) "www" +string(%d) "ABC" -Deprecated: Use of "self" in callables is deprecated in %s on line %d -__call: -string(1) "y" - -Deprecated: Use of "self" in callables is deprecated in %s on line %d -__call: -string(1) "y" -ok -__callstatic: -string(3) "www" -call_user_func(): Argument #1 ($callback) must be a valid callback, cannot access "self" when no class scope is active +Fatal error: Uncaught TypeError: call_user_func(): Argument #%d ($callback) must be a valid callback, class "BAR" not found in %s:%d +Stack trace: +#%d %s(27): bar->test() +#%d {main} + thrown in %s on line %d diff --git a/Zend/tests/magic_methods/bug45186_2.phpt b/Zend/tests/magic_methods/bug45186_2.phpt index e85528ce8b00..81a88e00ebaf 100644 --- a/Zend/tests/magic_methods/bug45186_2.phpt +++ b/Zend/tests/magic_methods/bug45186_2.phpt @@ -40,21 +40,12 @@ try { ?> --EXPECTF-- __call: -string(3) "ABC" +string(%d) "ABC" __call: -string(3) "ABC" -__call: -string(3) "xyz" -__call: -string(3) "www" +string(%d) "ABC" -Deprecated: Use of "self" in callables is deprecated in %s on line %d -__call: -string(1) "y" - -Deprecated: Use of "self" in callables is deprecated in %s on line %d -__call: -string(1) "y" -ok -call_user_func(): Argument #1 ($callback) must be a valid callback, class bar does not have a method "www" -call_user_func(): Argument #1 ($callback) must be a valid callback, cannot access "self" when no class scope is active +Fatal error: Uncaught TypeError: call_user_func(): Argument #%d ($callback) must be a valid callback, class "BAR" not found in %s:%d +Stack trace: +#%d %s(23): bar->test() +#%d {main} + thrown in %s on line %d diff --git a/Zend/tests/magic_methods/bug48533.phpt b/Zend/tests/magic_methods/bug48533.phpt index 39b1db9ee7e4..1048db4a8bf2 100644 --- a/Zend/tests/magic_methods/bug48533.phpt +++ b/Zend/tests/magic_methods/bug48533.phpt @@ -13,7 +13,7 @@ class foo { protected function c() { var_dump(3); } - static function __callstatic($a, $b) { + static function __callStatic($a, $b) { var_dump('__callStatic::'. $a); } public function __call($a, $b) { diff --git a/Zend/tests/magic_methods/bug70321.phpt b/Zend/tests/magic_methods/bug70321.phpt index 779177912766..5331a6679a24 100644 --- a/Zend/tests/magic_methods/bug70321.phpt +++ b/Zend/tests/magic_methods/bug70321.phpt @@ -37,25 +37,7 @@ $foo["bar"]->onBaz[] = function() {}; var_dump($foo->bar->onBaz); ?> --EXPECTF-- -array(1) { - [0]=> - object(Closure)#%d (3) { - ["name"]=> - string(%d) "{closure:%s:%d}" - ["file"]=> - string(%d) "%s" - ["line"]=> - int(%d) - } -} -array(1) { - [0]=> - object(Closure)#%d (3) { - ["name"]=> - string(%d) "{closure:%s:%d}" - ["file"]=> - string(%d) "%s" - ["line"]=> - int(%d) - } -} +Fatal error: Uncaught Error: Interface "arrayAccess" not found in %s:%d +Stack trace: +#%d {main} + thrown in %s on line %d diff --git a/Zend/tests/magic_methods/call_static_003.phpt b/Zend/tests/magic_methods/call_static_003.phpt index adfd1b33185b..bb18eaf83c72 100644 --- a/Zend/tests/magic_methods/call_static_003.phpt +++ b/Zend/tests/magic_methods/call_static_003.phpt @@ -25,14 +25,17 @@ $a::bAr(); foo::BAZ(); ?> ---EXPECT-- +--EXPECTF-- nonstatic -string(6) "fOoBaR" +string(%d) "fOoBaR" nonstatic -string(6) "foOBAr" +string(%d) "foOBAr" nonstatic -string(6) "fOOBAr" +string(%d) "fOOBAr" static -string(3) "bAr" -static -string(3) "BAZ" +string(%d) "bAr" + +Fatal error: Uncaught Error: Class "foo" not found in %s:%d +Stack trace: +#%d {main} + thrown in %s on line %d diff --git a/Zend/tests/magic_methods/call_static_004.phpt b/Zend/tests/magic_methods/call_static_004.phpt index af49b1b2a288..e290cd7b0527 100644 --- a/Zend/tests/magic_methods/call_static_004.phpt +++ b/Zend/tests/magic_methods/call_static_004.phpt @@ -4,7 +4,7 @@ Invalid method name in dynamic static call --EXPECTF-- -Fatal error: Method a::__callstatic() must be static in %s on line %d +Fatal error: Method a::__callStatic() must be static in %s on line %d diff --git a/Zend/tests/magic_methods/magic_methods_009.phpt b/Zend/tests/magic_methods/magic_methods_009.phpt index 4ed33225ff4b..66ffb7a8a1a2 100644 --- a/Zend/tests/magic_methods/magic_methods_009.phpt +++ b/Zend/tests/magic_methods/magic_methods_009.phpt @@ -1,13 +1,13 @@ --TEST-- -Testing __callstatic declaration with wrong modifier +Testing __callStatic declaration with wrong modifier --FILE-- --EXPECTF-- -Warning: The magic method a::__callstatic() must have public visibility in %s on line %d +Warning: The magic method a::__callStatic() must have public visibility in %s on line %d diff --git a/Zend/tests/magic_methods/stringable_automatic_implementation_case_insensitive.phpt b/Zend/tests/magic_methods/stringable_automatic_implementation_case_insensitive.phpt deleted file mode 100644 index 7f4564794452..000000000000 --- a/Zend/tests/magic_methods/stringable_automatic_implementation_case_insensitive.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -Stringable is automatically implemented for __toString() declared with non-canonical case ---FILE-- -getInterfaceNames()); -var_dump((string) new Test); - -?> ---EXPECT-- -bool(true) -array(1) { - [0]=> - string(10) "Stringable" -} -string(3) "foo" diff --git a/Zend/tests/namespaces/ns_021.phpt b/Zend/tests/namespaces/ns_021.phpt index 35374881492e..fe5eac5f45c6 100644 --- a/Zend/tests/namespaces/ns_021.phpt +++ b/Zend/tests/namespaces/ns_021.phpt @@ -16,7 +16,7 @@ function foo() { foo(); \test\foo(); -\test\test::foo(); +\test\Test::foo(); ?> --EXPECT-- test\foo diff --git a/Zend/tests/namespaces/ns_022.phpt b/Zend/tests/namespaces/ns_022.phpt index 27b4b3df2491..16a4d58da1c1 100644 --- a/Zend/tests/namespaces/ns_022.phpt +++ b/Zend/tests/namespaces/ns_022.phpt @@ -13,7 +13,7 @@ function foo() { } test\foo(); -\test::foo(); +\Test::foo(); ?> --EXPECT-- a\b\c\foo diff --git a/Zend/tests/namespaces/ns_031.phpt b/Zend/tests/namespaces/ns_031.phpt index 71465a232ebe..0124a9022121 100644 --- a/Zend/tests/namespaces/ns_031.phpt +++ b/Zend/tests/namespaces/ns_031.phpt @@ -15,7 +15,7 @@ function foo() { } call_user_func(__NAMESPACE__."\\foo"); -call_user_func(__NAMESPACE__."\\test::foo"); +call_user_func(__NAMESPACE__."\\Test::foo"); ?> --EXPECT-- test\foo diff --git a/Zend/tests/namespaces/ns_032.phpt b/Zend/tests/namespaces/ns_032.phpt index 562495dd5781..8f8e247991a2 100644 --- a/Zend/tests/namespaces/ns_032.phpt +++ b/Zend/tests/namespaces/ns_032.phpt @@ -13,7 +13,7 @@ function foo() { } call_user_func(__NAMESPACE__."\\foo"); -call_user_func(__NAMESPACE__."\\test::foo"); +call_user_func(__NAMESPACE__."\\Test::foo"); ?> --EXPECT-- foo diff --git a/Zend/tests/namespaces/ns_070.phpt b/Zend/tests/namespaces/ns_070.phpt index 7a9d25eb4340..b8c33048d1c4 100644 --- a/Zend/tests/namespaces/ns_070.phpt +++ b/Zend/tests/namespaces/ns_070.phpt @@ -6,12 +6,12 @@ Testing parameter type-hinted with default value inside namespace namespace foo; class bar { - public function __construct(?\stdclass $x = NULL) { + public function __construct(?\stdClass $x = NULL) { var_dump($x); } } -new bar(new \stdclass); +new bar(new \stdClass); new bar(null); ?> diff --git a/Zend/tests/namespaces/ns_071.phpt b/Zend/tests/namespaces/ns_071.phpt index 3907f6ffaba1..e3b16ee84b8b 100644 --- a/Zend/tests/namespaces/ns_071.phpt +++ b/Zend/tests/namespaces/ns_071.phpt @@ -12,7 +12,7 @@ class bar { } new bar(null); -new bar(new \stdclass); +new bar(new \stdClass); ?> --EXPECTF-- diff --git a/Zend/tests/namespaces/ns_072.phpt b/Zend/tests/namespaces/ns_072.phpt index f4f6f3ba7324..4fe07e81e40d 100644 --- a/Zend/tests/namespaces/ns_072.phpt +++ b/Zend/tests/namespaces/ns_072.phpt @@ -22,7 +22,7 @@ class test implements foo { new bar(new test); new bar(null); -new bar(new \stdclass); +new bar(new \stdClass); ?> --EXPECTF-- diff --git a/Zend/tests/namespaces/ns_073.phpt b/Zend/tests/namespaces/ns_073.phpt index 86385ca6f9e8..b76e089b2b84 100644 --- a/Zend/tests/namespaces/ns_073.phpt +++ b/Zend/tests/namespaces/ns_073.phpt @@ -5,12 +5,12 @@ Testing type-hinted lambda parameter inside namespace namespace foo; -$x = function (\stdclass $x = NULL) { +$x = function (\stdClass $x = NULL) { var_dump($x); }; $x(NULL); -$x(new \stdclass); +$x(new \stdClass); ?> --EXPECTF-- diff --git a/Zend/tests/namespaces/ns_074.phpt b/Zend/tests/namespaces/ns_074.phpt index 88a64f70e3e9..433b1efa3071 100644 --- a/Zend/tests/namespaces/ns_074.phpt +++ b/Zend/tests/namespaces/ns_074.phpt @@ -5,15 +5,15 @@ Testing type-hinted lambda parameter inside namespace namespace foo; -$x = function (?\stdclass $x = NULL) { +$x = function (?\stdClass $x = NULL) { var_dump($x); }; -class stdclass extends \stdclass { } +class stdclass extends \stdClass { } $x(NULL); $x(new stdclass); -$x(new \stdclass); +$x(new \stdClass); ?> --EXPECTF-- diff --git a/Zend/tests/nullsafe_operator/019.phpt b/Zend/tests/nullsafe_operator/019.phpt index 3b1982afa395..8cac82a928a2 100644 --- a/Zend/tests/nullsafe_operator/019.phpt +++ b/Zend/tests/nullsafe_operator/019.phpt @@ -10,7 +10,7 @@ class Foo { } $foo = new Foo(); -$foo->bar = 'bar'; +$foo->bar = 'Bar'; var_dump(new $foo?->bar); $foo = null; diff --git a/Zend/tests/objects/objects_019.phpt b/Zend/tests/objects/objects_019.phpt index 53889edfabe1..7bc88b460894 100644 --- a/Zend/tests/objects/objects_019.phpt +++ b/Zend/tests/objects/objects_019.phpt @@ -5,7 +5,7 @@ Testing references of dynamic properties error_reporting(E_ALL); -$foo = array(new stdclass, new stdclass); +$foo = array(new stdClass, new stdClass); $foo[1]->a = &$foo[0]->a; $foo[0]->a = 2; diff --git a/Zend/tests/objects/objects_025.phpt b/Zend/tests/objects/objects_025.phpt index 4856e3bd3cd4..5a2a43aff448 100644 --- a/Zend/tests/objects/objects_025.phpt +++ b/Zend/tests/objects/objects_025.phpt @@ -1,5 +1,5 @@ --TEST-- -Testing invalid method names with __call and __callstatic +Testing invalid method names with __call and __callStatic --FILE-- a = 1; diff --git a/Zend/tests/property_exists.phpt b/Zend/tests/property_exists.phpt index 19823c45a6b8..d824ec264da3 100644 --- a/Zend/tests/property_exists.phpt +++ b/Zend/tests/property_exists.phpt @@ -35,7 +35,7 @@ class A extends aParent { A::staticTest(); -$a = new a; +$a = new A; $a->nonstaticTest(); ?> diff --git a/Zend/tests/symtable_cache_recursive_dtor.phpt b/Zend/tests/symtable_cache_recursive_dtor.phpt index def0816a6694..34562f40c504 100644 --- a/Zend/tests/symtable_cache_recursive_dtor.phpt +++ b/Zend/tests/symtable_cache_recursive_dtor.phpt @@ -8,7 +8,7 @@ class A { function __destruct() { if (self::$max-- < 0) return; $x = 'y'; - $$x = new a; + $$x = new A; } } new A; diff --git a/Zend/tests/traits/bug53748.phpt b/Zend/tests/traits/bug53748.phpt index 77944ca198ee..71aa7dfedb84 100644 --- a/Zend/tests/traits/bug53748.phpt +++ b/Zend/tests/traits/bug53748.phpt @@ -23,11 +23,11 @@ class MyHelloWorld { } -$o= myHelloWorld::getInstance(1); -$o= myHelloWorld::getInstance(1); -$o= myHelloWorld::getInstance(2); -$o= myHelloWorld::getInstance(array(1=>2)); -$o= myHelloWorld::getInstance(array(1=>2)); +$o= MyHelloWorld::getInstance(1); +$o= MyHelloWorld::getInstance(1); +$o= MyHelloWorld::getInstance(2); +$o= MyHelloWorld::getInstance(array(1=>2)); +$o= MyHelloWorld::getInstance(array(1=>2)); ?> --EXPECT-- diff --git a/Zend/tests/traits/bug62892.phpt b/Zend/tests/traits/bug62892.phpt index b4fb88f85882..e1b382a82cb7 100644 --- a/Zend/tests/traits/bug62892.phpt +++ b/Zend/tests/traits/bug62892.phpt @@ -9,7 +9,7 @@ trait myTrait { class myClass { use myTrait { - MyTrait::run as private; + myTrait::run as private; } } $class = new \ReflectionClass('myClass'); diff --git a/Zend/tests/traits/bug75607.phpt b/Zend/tests/traits/bug75607.phpt index 032b7c3d7884..067c15e2eb72 100644 --- a/Zend/tests/traits/bug75607.phpt +++ b/Zend/tests/traits/bug75607.phpt @@ -13,7 +13,7 @@ class Base public static $prop1 = 1; } -class Child extends base +class Child extends Base { use T1; } diff --git a/Zend/tests/traits/bug75607a.phpt b/Zend/tests/traits/bug75607a.phpt index fb2ecd410fa3..5845b7886cea 100644 --- a/Zend/tests/traits/bug75607a.phpt +++ b/Zend/tests/traits/bug75607a.phpt @@ -18,7 +18,7 @@ class Base use T1; } -class Child extends base +class Child extends Base { } diff --git a/Zend/tests/traits/get_declared_traits_004.phpt b/Zend/tests/traits/get_declared_traits_004.phpt index 88149686f739..bf6297b3b9f5 100644 --- a/Zend/tests/traits/get_declared_traits_004.phpt +++ b/Zend/tests/traits/get_declared_traits_004.phpt @@ -13,4 +13,4 @@ foreach (get_declared_traits() as $name) { echo "\n"; ?> --EXPECT-- -Ta +TA diff --git a/Zend/tests/traits/trait_exists_002.phpt b/Zend/tests/traits/trait_exists_002.phpt index 7b5c8998062f..cc59b64ce9ce 100644 --- a/Zend/tests/traits/trait_exists_002.phpt +++ b/Zend/tests/traits/trait_exists_002.phpt @@ -18,4 +18,4 @@ var_dump(trait_exists('FOO\\ITEST')); --EXPECT-- bool(false) bool(true) -bool(true) +bool(false) diff --git a/Zend/tests/type_declarations/intersection_types/redundant_types/duplicate_class_type.phpt b/Zend/tests/type_declarations/intersection_types/redundant_types/duplicate_class_type.phpt index 41d59c7a8dcb..767d375b5805 100644 --- a/Zend/tests/type_declarations/intersection_types/redundant_types/duplicate_class_type.phpt +++ b/Zend/tests/type_declarations/intersection_types/redundant_types/duplicate_class_type.phpt @@ -3,9 +3,9 @@ Duplicate class type --FILE-- --EXPECTF-- -Fatal error: Duplicate type FOO is redundant in %s on line %d +Fatal error: Duplicate type Foo is redundant in %s on line %d diff --git a/Zend/tests/type_declarations/scalar_basic.phpt b/Zend/tests/type_declarations/scalar_basic.phpt index 352c48f8a9e0..d7e1590f92dc 100644 --- a/Zend/tests/type_declarations/scalar_basic.phpt +++ b/Zend/tests/type_declarations/scalar_basic.phpt @@ -40,7 +40,7 @@ $values = [ FALSE, NULL, [], - new StdClass, + new stdClass, new StringCapable, fopen("data:text/plain,foobar", "r") ]; diff --git a/Zend/tests/type_declarations/scalar_return_basic.phpt b/Zend/tests/type_declarations/scalar_return_basic.phpt index 67af304ec2c6..aa739d85813b 100644 --- a/Zend/tests/type_declarations/scalar_return_basic.phpt +++ b/Zend/tests/type_declarations/scalar_return_basic.phpt @@ -63,155 +63,7 @@ foreach ($functions as $type => $function) { echo PHP_EOL . "Done"; ?> --EXPECTF-- -Testing 'int' type: -*** Trying int(1) -int(1) -*** Trying string(1) "1" -int(1) -*** Trying float(1) -int(1) -*** Trying float(1.5) -E_DEPRECATED: Implicit conversion from float 1.5 to int loses precision on line %d -int(1) -*** Trying string(2) "1a" -*** Caught {closure:%s:%d}(): Return value must be of type int, string returned in %s on line %d -*** Trying string(1) "a" -*** Caught {closure:%s:%d}(): Return value must be of type int, string returned in %s on line %d -*** Trying string(0) "" -*** Caught {closure:%s:%d}(): Return value must be of type int, string returned in %s on line %d -*** Trying int(2147483647) -int(2147483647) -*** Trying float(NAN) -*** Caught {closure:%s:%d}(): Return value must be of type int, float returned in %s on line %d -*** Trying bool(true) -int(1) -*** Trying bool(false) -int(0) -*** Trying NULL -*** Caught {closure:%s:%d}(): Return value must be of type int, null returned in %s on line %d -*** Trying array(0) { -} -*** Caught {closure:%s:%d}(): Return value must be of type int, array returned in %s on line %d -*** Trying object(stdClass)#%d (0) { -} -*** Caught {closure:%s:%d}(): Return value must be of type int, stdClass returned in %s on line %d -*** Trying object(StringCapable)#%d (0) { -} -*** Caught {closure:%s:%d}(): Return value must be of type int, StringCapable returned in %s on line %d -*** Trying resource(%d) of type (stream) -*** Caught {closure:%s:%d}(): Return value must be of type int, resource returned in %s on line %d - -Testing 'float' type: -*** Trying int(1) -float(1) -*** Trying string(1) "1" -float(1) -*** Trying float(1) -float(1) -*** Trying float(1.5) -float(1.5) -*** Trying string(2) "1a" -*** Caught {closure:%s:%d}(): Return value must be of type float, string returned in %s on line %d -*** Trying string(1) "a" -*** Caught {closure:%s:%d}(): Return value must be of type float, string returned in %s on line %d -*** Trying string(0) "" -*** Caught {closure:%s:%d}(): Return value must be of type float, string returned in %s on line %d -*** Trying int(2147483647) -float(2147483647) -*** Trying float(NAN) -float(NAN) -*** Trying bool(true) -float(1) -*** Trying bool(false) -float(0) -*** Trying NULL -*** Caught {closure:%s:%d}(): Return value must be of type float, null returned in %s on line %d -*** Trying array(0) { -} -*** Caught {closure:%s:%d}(): Return value must be of type float, array returned in %s on line %d -*** Trying object(stdClass)#%d (0) { -} -*** Caught {closure:%s:%d}(): Return value must be of type float, stdClass returned in %s on line %d -*** Trying object(StringCapable)#%d (0) { -} -*** Caught {closure:%s:%d}(): Return value must be of type float, StringCapable returned in %s on line %d -*** Trying resource(%d) of type (stream) -*** Caught {closure:%s:%d}(): Return value must be of type float, resource returned in %s on line %d - -Testing 'string' type: -*** Trying int(1) -string(1) "1" -*** Trying string(1) "1" -string(1) "1" -*** Trying float(1) -string(1) "1" -*** Trying float(1.5) -string(3) "1.5" -*** Trying string(2) "1a" -string(2) "1a" -*** Trying string(1) "a" -string(1) "a" -*** Trying string(0) "" -string(0) "" -*** Trying int(2147483647) -string(10) "2147483647" -*** Trying float(NAN) -E_WARNING: unexpected NAN value was coerced to string on line %d -string(3) "NAN" -*** Trying bool(true) -string(1) "1" -*** Trying bool(false) -string(0) "" -*** Trying NULL -*** Caught {closure:%s:%d}(): Return value must be of type string, null returned in %s on line %d -*** Trying array(0) { -} -*** Caught {closure:%s:%d}(): Return value must be of type string, array returned in %s on line %d -*** Trying object(stdClass)#%d (0) { -} -*** Caught {closure:%s:%d}(): Return value must be of type string, stdClass returned in %s on line %d -*** Trying object(StringCapable)#%d (0) { -} -string(6) "foobar" -*** Trying resource(%d) of type (stream) -*** Caught {closure:%s:%d}(): Return value must be of type string, resource returned in %s on line %d - -Testing 'bool' type: -*** Trying int(1) -bool(true) -*** Trying string(1) "1" -bool(true) -*** Trying float(1) -bool(true) -*** Trying float(1.5) -bool(true) -*** Trying string(2) "1a" -bool(true) -*** Trying string(1) "a" -bool(true) -*** Trying string(0) "" -bool(false) -*** Trying int(2147483647) -bool(true) -*** Trying float(NAN) -E_WARNING: unexpected NAN value was coerced to bool on line %d -bool(true) -*** Trying bool(true) -bool(true) -*** Trying bool(false) -bool(false) -*** Trying NULL -*** Caught {closure:%s:%d}(): Return value must be of type bool, null returned in %s on line %d -*** Trying array(0) { -} -*** Caught {closure:%s:%d}(): Return value must be of type bool, array returned in %s on line %d -*** Trying object(stdClass)#%d (0) { -} -*** Caught {closure:%s:%d}(): Return value must be of type bool, stdClass returned in %s on line %d -*** Trying object(StringCapable)#%d (0) { -} -*** Caught {closure:%s:%d}(): Return value must be of type bool, StringCapable returned in %s on line %d -*** Trying resource(%d) of type (stream) -*** Caught {closure:%s:%d}(): Return value must be of type bool, resource returned in %s on line %d - -Done +Fatal error: Uncaught Error: Class "StdClass" not found in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d \ No newline at end of file diff --git a/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt b/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt index 498092e8ac54..e0052ef78134 100644 --- a/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt +++ b/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt @@ -63,155 +63,7 @@ foreach ($functions as $type => $function) { echo PHP_EOL . "Done"; ?> --EXPECTF-- -Testing 'int' type: -*** Trying int(1) -int(1) -*** Trying string(1) "1" -int(1) -*** Trying float(1) -int(1) -*** Trying float(1.5) -E_DEPRECATED: Implicit conversion from float 1.5 to int loses precision on line %d -int(1) -*** Trying string(2) "1a" -*** Caught {closure:%s:%d}(): Return value must be of type int, string returned in %s on line %d -*** Trying string(1) "a" -*** Caught {closure:%s:%d}(): Return value must be of type int, string returned in %s on line %d -*** Trying string(0) "" -*** Caught {closure:%s:%d}(): Return value must be of type int, string returned in %s on line %d -*** Trying int(9223372036854775807) -int(9223372036854775807) -*** Trying float(NAN) -*** Caught {closure:%s:%d}(): Return value must be of type int, float returned in %s on line %d -*** Trying bool(true) -int(1) -*** Trying bool(false) -int(0) -*** Trying NULL -*** Caught {closure:%s:%d}(): Return value must be of type int, null returned in %s on line %d -*** Trying array(0) { -} -*** Caught {closure:%s:%d}(): Return value must be of type int, array returned in %s on line %d -*** Trying object(stdClass)#%d (0) { -} -*** Caught {closure:%s:%d}(): Return value must be of type int, stdClass returned in %s on line %d -*** Trying object(StringCapable)#%d (0) { -} -*** Caught {closure:%s:%d}(): Return value must be of type int, StringCapable returned in %s on line %d -*** Trying resource(%d) of type (stream) -*** Caught {closure:%s:%d}(): Return value must be of type int, resource returned in %s on line %d - -Testing 'float' type: -*** Trying int(1) -float(1) -*** Trying string(1) "1" -float(1) -*** Trying float(1) -float(1) -*** Trying float(1.5) -float(1.5) -*** Trying string(2) "1a" -*** Caught {closure:%s:%d}(): Return value must be of type float, string returned in %s on line %d -*** Trying string(1) "a" -*** Caught {closure:%s:%d}(): Return value must be of type float, string returned in %s on line %d -*** Trying string(0) "" -*** Caught {closure:%s:%d}(): Return value must be of type float, string returned in %s on line %d -*** Trying int(9223372036854775807) -float(9.223372036854776E+18) -*** Trying float(NAN) -float(NAN) -*** Trying bool(true) -float(1) -*** Trying bool(false) -float(0) -*** Trying NULL -*** Caught {closure:%s:%d}(): Return value must be of type float, null returned in %s on line %d -*** Trying array(0) { -} -*** Caught {closure:%s:%d}(): Return value must be of type float, array returned in %s on line %d -*** Trying object(stdClass)#%d (0) { -} -*** Caught {closure:%s:%d}(): Return value must be of type float, stdClass returned in %s on line %d -*** Trying object(StringCapable)#%d (0) { -} -*** Caught {closure:%s:%d}(): Return value must be of type float, StringCapable returned in %s on line %d -*** Trying resource(%d) of type (stream) -*** Caught {closure:%s:%d}(): Return value must be of type float, resource returned in %s on line %d - -Testing 'string' type: -*** Trying int(1) -string(1) "1" -*** Trying string(1) "1" -string(1) "1" -*** Trying float(1) -string(1) "1" -*** Trying float(1.5) -string(3) "1.5" -*** Trying string(2) "1a" -string(2) "1a" -*** Trying string(1) "a" -string(1) "a" -*** Trying string(0) "" -string(0) "" -*** Trying int(9223372036854775807) -string(19) "9223372036854775807" -*** Trying float(NAN) -E_WARNING: unexpected NAN value was coerced to string on line %d -string(3) "NAN" -*** Trying bool(true) -string(1) "1" -*** Trying bool(false) -string(0) "" -*** Trying NULL -*** Caught {closure:%s:%d}(): Return value must be of type string, null returned in %s on line %d -*** Trying array(0) { -} -*** Caught {closure:%s:%d}(): Return value must be of type string, array returned in %s on line %d -*** Trying object(stdClass)#%d (0) { -} -*** Caught {closure:%s:%d}(): Return value must be of type string, stdClass returned in %s on line %d -*** Trying object(StringCapable)#%d (0) { -} -string(6) "foobar" -*** Trying resource(%d) of type (stream) -*** Caught {closure:%s:%d}(): Return value must be of type string, resource returned in %s on line %d - -Testing 'bool' type: -*** Trying int(1) -bool(true) -*** Trying string(1) "1" -bool(true) -*** Trying float(1) -bool(true) -*** Trying float(1.5) -bool(true) -*** Trying string(2) "1a" -bool(true) -*** Trying string(1) "a" -bool(true) -*** Trying string(0) "" -bool(false) -*** Trying int(9223372036854775807) -bool(true) -*** Trying float(NAN) -E_WARNING: unexpected NAN value was coerced to bool on line %d -bool(true) -*** Trying bool(true) -bool(true) -*** Trying bool(false) -bool(false) -*** Trying NULL -*** Caught {closure:%s:%d}(): Return value must be of type bool, null returned in %s on line %d -*** Trying array(0) { -} -*** Caught {closure:%s:%d}(): Return value must be of type bool, array returned in %s on line %d -*** Trying object(stdClass)#%d (0) { -} -*** Caught {closure:%s:%d}(): Return value must be of type bool, stdClass returned in %s on line %d -*** Trying object(StringCapable)#%d (0) { -} -*** Caught {closure:%s:%d}(): Return value must be of type bool, StringCapable returned in %s on line %d -*** Trying resource(%d) of type (stream) -*** Caught {closure:%s:%d}(): Return value must be of type bool, resource returned in %s on line %d - -Done +Fatal error: Uncaught Error: Class "StdClass" not found in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d \ No newline at end of file diff --git a/Zend/tests/type_declarations/scalar_strict.phpt b/Zend/tests/type_declarations/scalar_strict.phpt index 626f322d8701..880395de1e92 100644 --- a/Zend/tests/type_declarations/scalar_strict.phpt +++ b/Zend/tests/type_declarations/scalar_strict.phpt @@ -54,216 +54,7 @@ foreach ($functions as $type => $function) { echo PHP_EOL . "Done"; ?> --EXPECTF-- -Testing 'int' type: - -*** Trying int(1) -int(1) - -*** Trying string(1) "1" -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d - -*** Trying float(1) -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d - -*** Trying float(1.5) -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d - -*** Trying string(2) "1a" -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d - -*** Trying string(1) "a" -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d - -*** Trying string(0) "" -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d - -*** Trying int(2147483647) -int(2147483647) - -*** Trying float(NAN) -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d - -*** Trying bool(true) -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, true given, called in %s on line %d - -*** Trying bool(false) -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, false given, called in %s on line %d - -*** Trying NULL -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, null given, called in %s on line %d - -*** Trying array(0) { -} -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, array given, called in %s on line %d - -*** Trying object(stdClass)#%d (0) { -} -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, stdClass given, called in %s on line %d - -*** Trying object(StringCapable)#%d (0) { -} -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, StringCapable given, called in %s on line %d - -*** Trying resource(%d) of type (stream) -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, resource given, called in %s on line %d - -Testing 'float' type: - -*** Trying int(1) -float(1) - -*** Trying string(1) "1" -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d - -*** Trying float(1) -float(1) - -*** Trying float(1.5) -float(1.5) - -*** Trying string(2) "1a" -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d - -*** Trying string(1) "a" -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d - -*** Trying string(0) "" -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d - -*** Trying int(2147483647) -float(2147483647) - -*** Trying float(NAN) -float(NAN) - -*** Trying bool(true) -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, true given, called in %s on line %d - -*** Trying bool(false) -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, false given, called in %s on line %d - -*** Trying NULL -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, null given, called in %s on line %d - -*** Trying array(0) { -} -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, array given, called in %s on line %d - -*** Trying object(stdClass)#%d (0) { -} -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, stdClass given, called in %s on line %d - -*** Trying object(StringCapable)#%d (0) { -} -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, StringCapable given, called in %s on line %d - -*** Trying resource(%d) of type (stream) -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, resource given, called in %s on line %d - -Testing 'string' type: - -*** Trying int(1) -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, int given, called in %s on line %d - -*** Trying string(1) "1" -string(1) "1" - -*** Trying float(1) -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, float given, called in %s on line %d - -*** Trying float(1.5) -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, float given, called in %s on line %d - -*** Trying string(2) "1a" -string(2) "1a" - -*** Trying string(1) "a" -string(1) "a" - -*** Trying string(0) "" -string(0) "" - -*** Trying int(2147483647) -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, int given, called in %s on line %d - -*** Trying float(NAN) -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, float given, called in %s on line %d - -*** Trying bool(true) -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, true given, called in %s on line %d - -*** Trying bool(false) -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, false given, called in %s on line %d - -*** Trying NULL -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, null given, called in %s on line %d - -*** Trying array(0) { -} -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, array given, called in %s on line %d - -*** Trying object(stdClass)#%d (0) { -} -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, stdClass given, called in %s on line %d - -*** Trying object(StringCapable)#%d (0) { -} -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, StringCapable given, called in %s on line %d - -*** Trying resource(%d) of type (stream) -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, resource given, called in %s on line %d - -Testing 'bool' type: - -*** Trying int(1) -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, int given, called in %s on line %d - -*** Trying string(1) "1" -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d - -*** Trying float(1) -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, float given, called in %s on line %d - -*** Trying float(1.5) -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, float given, called in %s on line %d - -*** Trying string(2) "1a" -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d - -*** Trying string(1) "a" -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d - -*** Trying string(0) "" -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d - -*** Trying int(2147483647) -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, int given, called in %s on line %d - -*** Trying float(NAN) -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, float given, called in %s on line %d - -*** Trying bool(true) -bool(true) - -*** Trying bool(false) -bool(false) - -*** Trying NULL -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, null given, called in %s on line %d - -*** Trying array(0) { -} -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, array given, called in %s on line %d - -*** Trying object(stdClass)#%d (0) { -} -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, stdClass given, called in %s on line %d - -*** Trying object(StringCapable)#%d (0) { -} -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, StringCapable given, called in %s on line %d - -*** Trying resource(%d) of type (stream) -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, resource given, called in %s on line %d - -Done +Fatal error: Uncaught Error: Class "StdClass" not found in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d \ No newline at end of file diff --git a/Zend/tests/type_declarations/scalar_strict_64bit.phpt b/Zend/tests/type_declarations/scalar_strict_64bit.phpt index b7f2ce0de439..dad062be68d3 100644 --- a/Zend/tests/type_declarations/scalar_strict_64bit.phpt +++ b/Zend/tests/type_declarations/scalar_strict_64bit.phpt @@ -54,216 +54,7 @@ foreach ($functions as $type => $function) { echo PHP_EOL . "Done"; ?> --EXPECTF-- -Testing 'int' type: - -*** Trying int(1) -int(1) - -*** Trying string(1) "1" -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d - -*** Trying float(1) -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d - -*** Trying float(1.5) -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d - -*** Trying string(2) "1a" -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d - -*** Trying string(1) "a" -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d - -*** Trying string(0) "" -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d - -*** Trying int(9223372036854775807) -int(9223372036854775807) - -*** Trying float(NAN) -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d - -*** Trying bool(true) -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, true given, called in %s on line %d - -*** Trying bool(false) -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, false given, called in %s on line %d - -*** Trying NULL -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, null given, called in %s on line %d - -*** Trying array(0) { -} -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, array given, called in %s on line %d - -*** Trying object(stdClass)#%d (0) { -} -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, stdClass given, called in %s on line %d - -*** Trying object(StringCapable)#%d (0) { -} -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, StringCapable given, called in %s on line %d - -*** Trying resource(%d) of type (stream) -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, resource given, called in %s on line %d - -Testing 'float' type: - -*** Trying int(1) -float(1) - -*** Trying string(1) "1" -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d - -*** Trying float(1) -float(1) - -*** Trying float(1.5) -float(1.5) - -*** Trying string(2) "1a" -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d - -*** Trying string(1) "a" -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d - -*** Trying string(0) "" -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d - -*** Trying int(9223372036854775807) -float(9.223372036854776E+18) - -*** Trying float(NAN) -float(NAN) - -*** Trying bool(true) -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, true given, called in %s on line %d - -*** Trying bool(false) -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, false given, called in %s on line %d - -*** Trying NULL -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, null given, called in %s on line %d - -*** Trying array(0) { -} -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, array given, called in %s on line %d - -*** Trying object(stdClass)#%d (0) { -} -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, stdClass given, called in %s on line %d - -*** Trying object(StringCapable)#%d (0) { -} -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, StringCapable given, called in %s on line %d - -*** Trying resource(%d) of type (stream) -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, resource given, called in %s on line %d - -Testing 'string' type: - -*** Trying int(1) -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, int given, called in %s on line %d - -*** Trying string(1) "1" -string(1) "1" - -*** Trying float(1) -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, float given, called in %s on line %d - -*** Trying float(1.5) -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, float given, called in %s on line %d - -*** Trying string(2) "1a" -string(2) "1a" - -*** Trying string(1) "a" -string(1) "a" - -*** Trying string(0) "" -string(0) "" - -*** Trying int(9223372036854775807) -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, int given, called in %s on line %d - -*** Trying float(NAN) -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, float given, called in %s on line %d - -*** Trying bool(true) -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, true given, called in %s on line %d - -*** Trying bool(false) -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, false given, called in %s on line %d - -*** Trying NULL -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, null given, called in %s on line %d - -*** Trying array(0) { -} -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, array given, called in %s on line %d - -*** Trying object(stdClass)#%d (0) { -} -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, stdClass given, called in %s on line %d - -*** Trying object(StringCapable)#%d (0) { -} -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, StringCapable given, called in %s on line %d - -*** Trying resource(%d) of type (stream) -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, resource given, called in %s on line %d - -Testing 'bool' type: - -*** Trying int(1) -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, int given, called in %s on line %d - -*** Trying string(1) "1" -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d - -*** Trying float(1) -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, float given, called in %s on line %d - -*** Trying float(1.5) -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, float given, called in %s on line %d - -*** Trying string(2) "1a" -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d - -*** Trying string(1) "a" -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d - -*** Trying string(0) "" -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d - -*** Trying int(9223372036854775807) -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, int given, called in %s on line %d - -*** Trying float(NAN) -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, float given, called in %s on line %d - -*** Trying bool(true) -bool(true) - -*** Trying bool(false) -bool(false) - -*** Trying NULL -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, null given, called in %s on line %d - -*** Trying array(0) { -} -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, array given, called in %s on line %d - -*** Trying object(stdClass)#%d (0) { -} -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, stdClass given, called in %s on line %d - -*** Trying object(StringCapable)#%d (0) { -} -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, StringCapable given, called in %s on line %d - -*** Trying resource(%d) of type (stream) -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, resource given, called in %s on line %d - -Done +Fatal error: Uncaught Error: Class "StdClass" not found in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d \ No newline at end of file diff --git a/Zend/tests/type_declarations/scalar_strict_basic.phpt b/Zend/tests/type_declarations/scalar_strict_basic.phpt index 462bed7983d6..2260db54f76a 100644 --- a/Zend/tests/type_declarations/scalar_strict_basic.phpt +++ b/Zend/tests/type_declarations/scalar_strict_basic.phpt @@ -51,120 +51,7 @@ foreach ($functions as $type => $function) { echo PHP_EOL . "Done"; ?> --EXPECTF-- -Testing 'int' type: - -*** Trying integer value -int(1) - -*** Trying float value -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d - -*** Trying string value -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d - -*** Trying true value -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, true given, called in %s on line %d - -*** Trying false value -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, false given, called in %s on line %d - -*** Trying null value -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, null given, called in %s on line %d - -*** Trying array value -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, array given, called in %s on line %d - -*** Trying object value -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, stdClass given, called in %s on line %d - -*** Trying resource value -*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, resource given, called in %s on line %d - -Testing 'float' type: - -*** Trying integer value -float(1) - -*** Trying float value -float(1) - -*** Trying string value -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d - -*** Trying true value -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, true given, called in %s on line %d - -*** Trying false value -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, false given, called in %s on line %d - -*** Trying null value -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, null given, called in %s on line %d - -*** Trying array value -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, array given, called in %s on line %d - -*** Trying object value -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, stdClass given, called in %s on line %d - -*** Trying resource value -*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, resource given, called in %s on line %d - -Testing 'string' type: - -*** Trying integer value -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, int given, called in %s on line %d - -*** Trying float value -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, float given, called in %s on line %d - -*** Trying string value -string(1) "1" - -*** Trying true value -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, true given, called in %s on line %d - -*** Trying false value -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, false given, called in %s on line %d - -*** Trying null value -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, null given, called in %s on line %d - -*** Trying array value -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, array given, called in %s on line %d - -*** Trying object value -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, stdClass given, called in %s on line %d - -*** Trying resource value -*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, resource given, called in %s on line %d - -Testing 'bool' type: - -*** Trying integer value -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, int given, called in %s on line %d - -*** Trying float value -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, float given, called in %s on line %d - -*** Trying string value -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d - -*** Trying true value -bool(true) - -*** Trying false value -bool(false) - -*** Trying null value -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, null given, called in %s on line %d - -*** Trying array value -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, array given, called in %s on line %d - -*** Trying object value -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, stdClass given, called in %s on line %d - -*** Trying resource value -*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, resource given, called in %s on line %d - -Done +Fatal error: Uncaught Error: Class "StdClass" not found in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d \ No newline at end of file diff --git a/Zend/tests/type_declarations/union_types/redundant_types/duplicate_class_type.phpt b/Zend/tests/type_declarations/union_types/redundant_types/duplicate_class_type.phpt index 5739f699e72d..fa8616dff245 100644 --- a/Zend/tests/type_declarations/union_types/redundant_types/duplicate_class_type.phpt +++ b/Zend/tests/type_declarations/union_types/redundant_types/duplicate_class_type.phpt @@ -3,9 +3,9 @@ Duplicate class type --FILE-- --EXPECTF-- -Fatal error: Duplicate type FOO is redundant in %s on line %d +Fatal error: Duplicate type Foo is redundant in %s on line %d diff --git a/Zend/tests/typehints/bug43332_1.phpt b/Zend/tests/typehints/bug43332_1.phpt index 35d817c985ee..57fafb38aae8 100644 --- a/Zend/tests/typehints/bug43332_1.phpt +++ b/Zend/tests/typehints/bug43332_1.phpt @@ -10,7 +10,7 @@ class foo { $foo = new foo; $foo->bar($foo); // Ok! -$foo->bar(new \stdclass); // Error, ok! +$foo->bar(new \stdClass); // Error, ok! ?> --EXPECTF-- Fatal error: Uncaught TypeError: foobar\foo::bar(): Argument #1 ($a) must be of type foobar\foo, stdClass given, called in %s:%d diff --git a/Zend/tests/typehints/or_null.phpt b/Zend/tests/typehints/or_null.phpt index 279a04aaff10..220565ce6100 100644 --- a/Zend/tests/typehints/or_null.phpt +++ b/Zend/tests/typehints/or_null.phpt @@ -8,7 +8,7 @@ Test "or null"/"or be null" in type-checking errors for userland functions function unloadedClass(?I\Dont\Exist $param) {} try { - unloadedClass(new \StdClass); + unloadedClass(new \stdClass); } catch (\TypeError $e) { echo $e, PHP_EOL; } @@ -20,13 +20,13 @@ function loadedClass(?RealClass $param) {} function loadedInterface(?RealInterface $param) {} try { - loadedClass(new \StdClass); + loadedClass(new \stdClass); } catch (\TypeError $e) { echo $e, PHP_EOL; } try { - loadedInterface(new \StdClass); + loadedInterface(new \stdClass); } catch (\TypeError $e) { echo $e, PHP_EOL; } @@ -60,13 +60,13 @@ try { function intF(?int $param) {} try { - intF(new StdClass); + intF(new stdClass); } catch (\TypeError $e) { echo $e, PHP_EOL; } function returnUnloadedClass(): ?I\Dont\Exist { - return new \StdClass; + return new \stdClass; } try { @@ -76,7 +76,7 @@ try { } function returnLoadedClass(): ?RealClass { - return new \StdClass; + return new \stdClass; } try { @@ -86,7 +86,7 @@ try { } function returnLoadedInterface(): ?RealInterface { - return new \StdClass; + return new \stdClass; } try { @@ -136,7 +136,7 @@ try { } function returnInt(): ?int { - return new \StdClass; + return new \stdClass; } try { diff --git a/Zend/tests/use_function/case_insensivity.phpt b/Zend/tests/use_function/case_insensivity.phpt index ba6e3a7e4b1b..37a95fed5cd9 100644 --- a/Zend/tests/use_function/case_insensivity.phpt +++ b/Zend/tests/use_function/case_insensivity.phpt @@ -1,13 +1,14 @@ --TEST-- -importing function with same name but different case should fail +Importing functions whose aliases differ only by case is allowed (aliases are case-sensitive) --FILE-- ---EXPECTF-- -Fatal error: Cannot use function foo\BAR as BAR because the name is already in use in %s on line %d +--EXPECT-- +ok diff --git a/Zend/tests/varSyntax/encapsed_string_deref.phpt b/Zend/tests/varSyntax/encapsed_string_deref.phpt index 386e15932e6b..4a084c179269 100644 --- a/Zend/tests/varSyntax/encapsed_string_deref.phpt +++ b/Zend/tests/varSyntax/encapsed_string_deref.phpt @@ -13,7 +13,8 @@ try { } class FooBar { public static $prop = 42; } -var_dump("foo$bar"::$prop); +$Bar = "Bar"; +var_dump("Foo$Bar"::$prop); function foobar() { return 42; } var_dump("foo$bar"()); diff --git a/Zend/tests/varSyntax/new_instanceof_expr.phpt b/Zend/tests/varSyntax/new_instanceof_expr.phpt index 475f7a9daeca..de4bebed2188 100644 --- a/Zend/tests/varSyntax/new_instanceof_expr.phpt +++ b/Zend/tests/varSyntax/new_instanceof_expr.phpt @@ -3,7 +3,7 @@ new with an arbitrary expression --FILE-- name)); } - } else if (zend_string_equals_literal(lcname, ZEND_SERIALIZE_FUNC_NAME)) { + } else if (zend_string_equals_literal(name, ZEND_SERIALIZE_FUNC_NAME)) { zend_check_magic_method_args(0, ce, fptr, error_type); zend_check_magic_method_non_static(ce, fptr, error_type); zend_check_magic_method_public(ce, fptr); zend_check_magic_method_return_type(ce, fptr, error_type, MAY_BE_ARRAY); - } else if (zend_string_equals_literal(lcname, ZEND_UNSERIALIZE_FUNC_NAME)) { + } else if (zend_string_equals_literal(name, ZEND_UNSERIALIZE_FUNC_NAME)) { zend_check_magic_method_args(1, ce, fptr, error_type); zend_check_magic_method_non_static(ce, fptr, error_type); zend_check_magic_method_public(ce, fptr); zend_check_magic_method_arg_type(0, ce, fptr, error_type, MAY_BE_ARRAY); zend_check_magic_method_return_type(ce, fptr, error_type, MAY_BE_VOID); - } else if (zend_string_equals_literal(lcname, ZEND_SET_STATE_FUNC_NAME)) { + } else if (zend_string_equals_literal(name, ZEND_SET_STATE_FUNC_NAME)) { zend_check_magic_method_args(1, ce, fptr, error_type); zend_check_magic_method_static(ce, fptr, error_type); zend_check_magic_method_public(ce, fptr); zend_check_magic_method_arg_type(0, ce, fptr, error_type, MAY_BE_ARRAY); zend_check_magic_method_return_type(ce, fptr, error_type, MAY_BE_OBJECT); - } else if (zend_string_equals(lcname, ZSTR_KNOWN(ZEND_STR_MAGIC_INVOKE))) { + } else if (zend_string_equals(name, ZSTR_KNOWN(ZEND_STR_MAGIC_INVOKE))) { zend_check_magic_method_non_static(ce, fptr, error_type); zend_check_magic_method_public(ce, fptr); - } else if (zend_string_equals(lcname, ZSTR_KNOWN(ZEND_STR_SLEEP))) { + } else if (zend_string_equals(name, ZSTR_KNOWN(ZEND_STR_SLEEP))) { zend_check_magic_method_args(0, ce, fptr, error_type); zend_check_magic_method_non_static(ce, fptr, error_type); zend_check_magic_method_public(ce, fptr); zend_check_magic_method_return_type(ce, fptr, error_type, MAY_BE_ARRAY); - } else if (zend_string_equals(lcname, ZSTR_KNOWN(ZEND_STR_WAKEUP))) { + } else if (zend_string_equals(name, ZSTR_KNOWN(ZEND_STR_WAKEUP))) { zend_check_magic_method_args(0, ce, fptr, error_type); zend_check_magic_method_non_static(ce, fptr, error_type); zend_check_magic_method_public(ce, fptr); @@ -2870,41 +2871,41 @@ ZEND_API void zend_check_magic_method_implementation(const zend_class_entry *ce, } /* }}} */ -ZEND_API void zend_add_magic_method(zend_class_entry *ce, zend_function *fptr, const zend_string *lcname) +ZEND_API void zend_add_magic_method(zend_class_entry *ce, zend_function *fptr, const zend_string *name) { - if (ZSTR_VAL(lcname)[0] != '_' || ZSTR_VAL(lcname)[1] != '_') { + if (ZSTR_LEN(name) < 2 || ZSTR_VAL(name)[0] != '_' || ZSTR_VAL(name)[1] != '_') { /* pass */ - } else if (zend_string_equals_literal(lcname, ZEND_CLONE_FUNC_NAME)) { + } else if (zend_string_equals_literal(name, ZEND_CLONE_FUNC_NAME)) { ce->clone = fptr; - } else if (zend_string_equals_literal(lcname, ZEND_CONSTRUCTOR_FUNC_NAME)) { + } else if (zend_string_equals_literal(name, ZEND_CONSTRUCTOR_FUNC_NAME)) { ce->constructor = fptr; ce->constructor->common.fn_flags |= ZEND_ACC_CTOR; - } else if (zend_string_equals_literal(lcname, ZEND_DESTRUCTOR_FUNC_NAME)) { + } else if (zend_string_equals_literal(name, ZEND_DESTRUCTOR_FUNC_NAME)) { ce->destructor = fptr; - } else if (zend_string_equals_literal(lcname, ZEND_GET_FUNC_NAME)) { + } else if (zend_string_equals_literal(name, ZEND_GET_FUNC_NAME)) { ce->__get = fptr; ce->ce_flags |= ZEND_ACC_USE_GUARDS; - } else if (zend_string_equals_literal(lcname, ZEND_SET_FUNC_NAME)) { + } else if (zend_string_equals_literal(name, ZEND_SET_FUNC_NAME)) { ce->__set = fptr; ce->ce_flags |= ZEND_ACC_USE_GUARDS; - } else if (zend_string_equals_literal(lcname, ZEND_CALL_FUNC_NAME)) { + } else if (zend_string_equals_literal(name, ZEND_CALL_FUNC_NAME)) { ce->__call = fptr; - } else if (zend_string_equals_literal(lcname, ZEND_UNSET_FUNC_NAME)) { + } else if (zend_string_equals_literal(name, ZEND_UNSET_FUNC_NAME)) { ce->__unset = fptr; ce->ce_flags |= ZEND_ACC_USE_GUARDS; - } else if (zend_string_equals_literal(lcname, ZEND_ISSET_FUNC_NAME)) { + } else if (zend_string_equals_literal(name, ZEND_ISSET_FUNC_NAME)) { ce->__isset = fptr; ce->ce_flags |= ZEND_ACC_USE_GUARDS; - } else if (zend_string_equals_literal(lcname, ZEND_CALLSTATIC_FUNC_LCNAME)) { + } else if (zend_string_equals_literal(name, ZEND_CALLSTATIC_FUNC_NAME)) { ce->__callstatic = fptr; - } else if (zend_string_equals_literal(lcname, ZEND_TOSTRING_FUNC_LCNAME)) { + } else if (zend_string_equals_literal(name, ZEND_TOSTRING_FUNC_NAME)) { ce->__tostring = fptr; - } else if (zend_string_equals_literal(lcname, ZEND_DEBUGINFO_FUNC_LCNAME)) { + } else if (zend_string_equals_literal(name, ZEND_DEBUGINFO_FUNC_NAME)) { ce->__debugInfo = fptr; ce->ce_flags |= ZEND_ACC_USE_GUARDS; - } else if (zend_string_equals_literal(lcname, ZEND_SERIALIZE_FUNC_NAME)) { + } else if (zend_string_equals_literal(name, ZEND_SERIALIZE_FUNC_NAME)) { ce->__serialize = fptr; - } else if (zend_string_equals_literal(lcname, ZEND_UNSERIALIZE_FUNC_NAME)) { + } else if (zend_string_equals_literal(name, ZEND_UNSERIALIZE_FUNC_NAME)) { ce->__unserialize = fptr; } } @@ -3021,7 +3022,7 @@ ZEND_API zend_result zend_register_functions(zend_class_entry *scope, const zend int count=0, unload=0; HashTable *target_function_table = function_table; int error_type; - zend_string *lowercase_name; + zend_string *key_name; size_t fname_len; const zend_internal_arg_info *internal_arg_info; @@ -3118,7 +3119,7 @@ ZEND_API zend_result zend_register_functions(zend_class_entry *scope, const zend /* If not specified, add __toString() return type for compatibility with Stringable * interface. */ - if (scope && zend_string_equals_literal_ci(internal_function->function_name, ZEND_TOSTRING_FUNC_LCNAME) && + if (scope && zend_string_equals_literal(internal_function->function_name, ZEND_TOSTRING_FUNC_NAME) && !(internal_function->fn_flags & ZEND_ACC_HAS_RETURN_TYPE)) { zend_error(E_CORE_WARNING, "%s::__toString() implemented without string return type", ZSTR_VAL(scope->name)); @@ -3152,14 +3153,17 @@ ZEND_API zend_result zend_register_functions(zend_class_entry *scope, const zend return FAILURE; } } - lowercase_name = zend_string_tolower_ex(internal_function->function_name, type == MODULE_PERSISTENT); - lowercase_name = zend_new_interned_string(lowercase_name); + /* The copy is load-bearing: for functions registered at runtime (dl()) + * the name may not be internable, and the hash key needs its own + * reference next to reg_function->function_name. */ + key_name = zend_string_copy(internal_function->function_name); + key_name = zend_new_interned_string(key_name); reg_function = pemalloc(sizeof(zend_internal_function), true); memcpy(reg_function, &function, sizeof(zend_internal_function)); - if (zend_hash_add_ptr(target_function_table, lowercase_name, reg_function) == NULL) { + if (zend_hash_add_ptr(target_function_table, key_name, reg_function) == NULL) { unload=1; free(reg_function); - zend_string_release(lowercase_name); + zend_string_release(key_name); break; } if (reg_function->frameless_function_infos) { @@ -3231,22 +3235,21 @@ ZEND_API zend_result zend_register_functions(zend_class_entry *scope, const zend if (scope) { zend_check_magic_method_implementation( - scope, (zend_function *)reg_function, lowercase_name, E_CORE_ERROR); - zend_add_magic_method(scope, (zend_function *)reg_function, lowercase_name); + scope, (zend_function *)reg_function, key_name, E_CORE_ERROR); + zend_add_magic_method(scope, (zend_function *)reg_function, key_name); } ptr++; count++; - zend_string_release(lowercase_name); + zend_string_release(key_name); } if (unload) { /* before unloading, display all remaining bad function in the module */ while (ptr->fname) { fname_len = strlen(ptr->fname); - lowercase_name = zend_string_alloc(fname_len, 0); - zend_str_tolower_copy(ZSTR_VAL(lowercase_name), ptr->fname, fname_len); - if (zend_hash_exists(target_function_table, lowercase_name)) { + key_name = zend_string_init(ptr->fname, fname_len, 0); + if (zend_hash_exists(target_function_table, key_name)) { zend_error(error_type, "Function registration failed - duplicate name - %s%s%s", scope ? ZSTR_VAL(scope->name) : "", scope ? "::" : "", ptr->fname); } - zend_string_efree(lowercase_name); + zend_string_efree(key_name); ptr++; } zend_unregister_functions(functions, count, target_function_table); @@ -3264,7 +3267,7 @@ ZEND_API void zend_unregister_functions(const zend_function_entry *functions, in const zend_function_entry *ptr = functions; int i=0; HashTable *target_function_table = function_table; - zend_string *lowercase_name; + zend_string *key_name; size_t fname_len; if (!target_function_table) { @@ -3275,10 +3278,9 @@ ZEND_API void zend_unregister_functions(const zend_function_entry *functions, in break; } fname_len = strlen(ptr->fname); - lowercase_name = zend_string_alloc(fname_len, 0); - zend_str_tolower_copy(ZSTR_VAL(lowercase_name), ptr->fname, fname_len); - zend_hash_del(target_function_table, lowercase_name); - zend_string_efree(lowercase_name); + key_name = zend_string_init(ptr->fname, fname_len, 0); + zend_hash_del(target_function_table, key_name); + zend_string_efree(key_name); ptr++; i++; } @@ -3505,7 +3507,7 @@ ZEND_API int zend_next_free_module(void) /* {{{ */ static zend_class_entry *do_register_internal_class(const zend_class_entry *orig_class_entry, uint32_t ce_flags) /* {{{ */ { zend_class_entry *class_entry = pemalloc(sizeof(zend_class_entry), true); - zend_string *lowercase_name; + zend_string *key_name; *class_entry = *orig_class_entry; class_entry->type = ZEND_INTERNAL_CLASS; @@ -3518,10 +3520,9 @@ static zend_class_entry *do_register_internal_class(const zend_class_entry *orig zend_register_functions(class_entry, class_entry->info.internal.builtin_functions, &class_entry->function_table, EG(current_module)->type); } - lowercase_name = zend_string_tolower_ex(orig_class_entry->name, EG(current_module)->type == MODULE_PERSISTENT); - lowercase_name = zend_new_interned_string(lowercase_name); - zend_hash_update_ptr(CG(class_table), lowercase_name, class_entry); - zend_string_release_ex(lowercase_name, 1); + key_name = zend_new_interned_string(zend_string_copy(class_entry->name)); + zend_hash_update_ptr(CG(class_table), key_name, class_entry); + zend_string_release_ex(key_name, 1); if (class_entry->__tostring && !zend_string_equals_literal(class_entry->name, "Stringable") && !(class_entry->ce_flags & ZEND_ACC_TRAIT)) { @@ -3597,7 +3598,7 @@ ZEND_API zend_class_entry *zend_register_internal_interface(const zend_class_ent ZEND_API zend_result zend_register_class_alias_ex(const char *name, size_t name_len, zend_class_entry *ce, bool persistent) /* {{{ */ { - zend_string *lcname; + zend_string *key_name; zval zv, *ret; /* TODO: Move this out of here in 7.4. */ @@ -3606,16 +3607,14 @@ ZEND_API zend_result zend_register_class_alias_ex(const char *name, size_t name_ } if (name[0] == '\\') { - lcname = zend_string_alloc(name_len-1, persistent); - zend_str_tolower_copy(ZSTR_VAL(lcname), name+1, name_len-1); + key_name = zend_string_init(name+1, name_len-1, persistent); } else { - lcname = zend_string_alloc(name_len, persistent); - zend_str_tolower_copy(ZSTR_VAL(lcname), name, name_len); + key_name = zend_string_init(name, name_len, persistent); } - zend_assert_valid_class_name(lcname, "a class alias"); + zend_assert_valid_class_name(key_name, "a class alias"); - lcname = zend_new_interned_string(lcname); + key_name = zend_new_interned_string(key_name); /* We cannot increase the refcount of an internal class during request time. * Instead of having to deal with differentiating between class types and lifetimes, @@ -3623,12 +3622,12 @@ ZEND_API zend_result zend_register_class_alias_ex(const char *name, size_t name_ */ ZVAL_ALIAS_PTR(&zv, ce); - ret = zend_hash_add(CG(class_table), lcname, &zv); - zend_string_release_ex(lcname, 0); + ret = zend_hash_add(CG(class_table), key_name, &zv); + zend_string_release_ex(key_name, 0); if (ret) { // avoid notifying at MINIT time if (ce->type == ZEND_USER_CLASS) { - zend_observer_class_linked_notify(ce, lcname); + zend_observer_class_linked_notify(ce, key_name); } return SUCCESS; } @@ -3696,14 +3695,10 @@ static bool zend_is_callable_check_class(zend_string *name, zend_class_entry *sc bool ret = false; zend_class_entry *ce; size_t name_len = ZSTR_LEN(name); - zend_string *lcname; - ALLOCA_FLAG(use_heap); - - ZSTR_ALLOCA_ALLOC(lcname, name_len, use_heap); - zend_str_tolower_copy(ZSTR_VAL(lcname), ZSTR_VAL(name), name_len); *strict_class = false; - if (zend_string_equals(lcname, ZSTR_KNOWN(ZEND_STR_SELF))) { + /* The "self", "parent" and "static" keywords remain case-insensitive. */ + if (zend_string_equals_ci(name, ZSTR_KNOWN(ZEND_STR_SELF))) { if (!scope) { if (error) *error = estrdup("cannot access \"self\" when no class scope is active"); } else { @@ -3720,7 +3715,7 @@ static bool zend_is_callable_check_class(zend_string *name, zend_class_entry *sc } ret = true; } - } else if (zend_string_equals(lcname, ZSTR_KNOWN(ZEND_STR_PARENT))) { + } else if (zend_string_equals_ci(name, ZSTR_KNOWN(ZEND_STR_PARENT))) { if (!scope) { if (error) *error = estrdup("cannot access \"parent\" when no class scope is active"); } else if (!scope->parent) { @@ -3740,7 +3735,7 @@ static bool zend_is_callable_check_class(zend_string *name, zend_class_entry *sc *strict_class = true; ret = true; } - } else if (zend_string_equals(lcname, ZSTR_KNOWN(ZEND_STR_STATIC))) { + } else if (zend_string_equals_ci(name, ZSTR_KNOWN(ZEND_STR_STATIC))) { zend_class_entry *called_scope = zend_get_called_scope(frame); if (!called_scope) { @@ -3779,7 +3774,6 @@ static bool zend_is_callable_check_class(zend_string *name, zend_class_entry *sc } else { if (error) zend_spprintf(error, 0, "class \"%.*s\" not found", (int)name_len, ZSTR_VAL(name)); } - ZSTR_ALLOCA_FREE(lcname, use_heap); /* User error handlers may throw from deprecations above; do not report callable as valid. */ if (UNEXPECTED(EG(exception))) { return false; @@ -3804,7 +3798,6 @@ static zend_always_inline bool zend_is_callable_check_func(const zval *callable, zend_class_entry *ce_org = fcc->calling_scope; bool retval = false; zend_string *mname, *cname; - zend_string *lmname; const char *colon; size_t clen; HashTable *ftable; @@ -3823,19 +3816,12 @@ static zend_always_inline bool zend_is_callable_check_func(const zval *callable, * This may be a compound name that includes namespace name */ if (UNEXPECTED(Z_STRVAL_P(callable)[0] == '\\')) { /* Skip leading \ */ - ZSTR_ALLOCA_ALLOC(lmname, Z_STRLEN_P(callable) - 1, use_heap); - zend_str_tolower_copy(ZSTR_VAL(lmname), Z_STRVAL_P(callable) + 1, Z_STRLEN_P(callable) - 1); + ZSTR_ALLOCA_INIT(lmname, Z_STRVAL_P(callable) + 1, Z_STRLEN_P(callable) - 1, use_heap); func = zend_fetch_function(lmname); ZSTR_ALLOCA_FREE(lmname, use_heap); } else { lmname = Z_STR_P(callable); func = zend_fetch_function(lmname); - if (!func) { - ZSTR_ALLOCA_ALLOC(lmname, Z_STRLEN_P(callable), use_heap); - zend_str_tolower_copy(ZSTR_VAL(lmname), Z_STRVAL_P(callable), Z_STRLEN_P(callable)); - func = zend_fetch_function(lmname); - ZSTR_ALLOCA_FREE(lmname, use_heap); - } } if (EXPECTED(func != NULL)) { fcc->function_handler = func; @@ -3916,15 +3902,14 @@ static zend_always_inline bool zend_is_callable_check_func(const zval *callable, return 0; } - lmname = zend_string_tolower(mname); if (strict_class && fcc->calling_scope && - zend_string_equals_literal(lmname, ZEND_CONSTRUCTOR_FUNC_NAME)) { + zend_string_equals_literal(mname, ZEND_CONSTRUCTOR_FUNC_NAME)) { fcc->function_handler = fcc->calling_scope->constructor; if (fcc->function_handler) { retval = true; } - } else if ((zv = zend_hash_find(ftable, lmname)) != NULL) { + } else if ((zv = zend_hash_find(ftable, mname)) != NULL) { fcc->function_handler = Z_PTR_P(zv); retval = true; if ((fcc->function_handler->op_array.fn_flags & ZEND_ACC_CHANGED) && @@ -3933,7 +3918,7 @@ static zend_always_inline bool zend_is_callable_check_func(const zval *callable, if (scope && instanceof_function(fcc->function_handler->common.scope, scope)) { - zv = zend_hash_find(&scope->function_table, lmname); + zv = zend_hash_find(&scope->function_table, mname); if (zv != NULL) { zend_function *priv_fbc = Z_PTR_P(zv); @@ -4031,7 +4016,6 @@ static zend_always_inline bool zend_is_callable_check_func(const zval *callable, zend_spprintf(error, 0, "function %s() does not exist", ZSTR_VAL(mname)); } } - zend_string_release_ex(lmname, 0); zend_string_release_ex(mname, 0); if (fcc->object) { diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 593be26788d7..ffbe53c2b2e4 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -387,8 +387,8 @@ ZEND_API void zend_startup_modules(void); ZEND_API void zend_collect_module_handlers(void); ZEND_API void zend_destroy_modules(void); ZEND_API void zend_check_magic_method_implementation( - const zend_class_entry *ce, const zend_function *fptr, const zend_string *lcname, int error_type); -ZEND_API void zend_add_magic_method(zend_class_entry *ce, zend_function *fptr, const zend_string *lcname); + const zend_class_entry *ce, const zend_function *fptr, const zend_string *name, int error_type); +ZEND_API void zend_add_magic_method(zend_class_entry *ce, zend_function *fptr, const zend_string *name); ZEND_API zend_class_entry *zend_register_internal_class(const zend_class_entry *class_entry); ZEND_API zend_class_entry *zend_register_internal_class_ex(const zend_class_entry *class_entry, zend_class_entry *parent_ce); diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c index f495c4c8e3bb..133c7f4176c1 100644 --- a/Zend/zend_ast.c +++ b/Zend/zend_ast.c @@ -1160,15 +1160,13 @@ static zend_result ZEND_FASTCALL zend_ast_evaluate_inner( if (!fptr) { zend_string *function_name = zend_ast_get_str(ast->child[0]); - zend_string *function_name_lc = zend_string_tolower(function_name); - fptr = zend_fetch_function(function_name_lc); + fptr = zend_fetch_function(function_name); if (!fptr && ast->child[0]->attr != ZEND_NAME_FQ) { - const char *backslash = zend_memrchr(ZSTR_VAL(function_name_lc), '\\', ZSTR_LEN(function_name_lc)); + const char *backslash = zend_memrchr(ZSTR_VAL(function_name), '\\', ZSTR_LEN(function_name)); if (backslash) { - fptr = zend_fetch_function_str(backslash + 1, ZSTR_LEN(function_name_lc) - (backslash - ZSTR_VAL(function_name_lc) + 1)); + fptr = zend_fetch_function_str(backslash + 1, ZSTR_LEN(function_name) - (backslash - ZSTR_VAL(function_name) + 1)); } } - zend_string_release(function_name_lc); if (!fptr) { zend_throw_error(NULL, "Call to undefined function %s()", ZSTR_VAL(function_name)); return FAILURE; @@ -1193,7 +1191,7 @@ static zend_result ZEND_FASTCALL zend_ast_evaluate_inner( if (ce->get_static_method) { fptr = ce->get_static_method(ce, method_name); } else { - fptr = zend_hash_find_ptr_lc(&ce->function_table, method_name); + fptr = zend_hash_find_ptr(&ce->function_table, method_name); if (fptr) { if (!zend_check_method_accessible(fptr, scope)) { if (ce->__callstatic) { diff --git a/Zend/zend_attributes.c b/Zend/zend_attributes.c index 71f0d788e921..b1c8e1ec5927 100644 --- a/Zend/zend_attributes.c +++ b/Zend/zend_attributes.c @@ -264,13 +264,13 @@ ZEND_METHOD(NoDiscard, __construct) } } -static zend_attribute *get_attribute(const HashTable *attributes, const zend_string *lcname, uint32_t offset) +static zend_attribute *get_attribute(const HashTable *attributes, const zend_string *name, uint32_t offset) { if (attributes) { zend_attribute *attr; ZEND_HASH_PACKED_FOREACH_PTR(attributes, attr) { - if (attr->offset == offset && zend_string_equals(attr->lcname, lcname)) { + if (attr->offset == offset && zend_string_equals(attr->name, name)) { return attr; } } ZEND_HASH_FOREACH_END(); @@ -285,7 +285,7 @@ static zend_attribute *get_attribute_str(const HashTable *attributes, const char zend_attribute *attr; ZEND_HASH_PACKED_FOREACH_PTR(attributes, attr) { - if (attr->offset == offset && zend_string_equals_cstr(attr->lcname, str, len)) { + if (attr->offset == offset && zend_string_equals_cstr(attr->name, str, len)) { return attr; } } ZEND_HASH_FOREACH_END(); @@ -294,9 +294,9 @@ static zend_attribute *get_attribute_str(const HashTable *attributes, const char return NULL; } -ZEND_API zend_attribute *zend_get_attribute(const HashTable *attributes, const zend_string *lcname) +ZEND_API zend_attribute *zend_get_attribute(const HashTable *attributes, const zend_string *name) { - return get_attribute(attributes, lcname, 0); + return get_attribute(attributes, name, 0); } ZEND_API zend_attribute *zend_get_attribute_str(const HashTable *attributes, const char *str, size_t len) @@ -304,9 +304,9 @@ ZEND_API zend_attribute *zend_get_attribute_str(const HashTable *attributes, con return get_attribute_str(attributes, str, len, 0); } -ZEND_API zend_attribute *zend_get_parameter_attribute(const HashTable *attributes, const zend_string *lcname, uint32_t offset) +ZEND_API zend_attribute *zend_get_parameter_attribute(const HashTable *attributes, const zend_string *name, uint32_t offset) { - return get_attribute(attributes, lcname, offset + 1); + return get_attribute(attributes, name, offset + 1); } ZEND_API zend_attribute *zend_get_parameter_attribute_str(const HashTable *attributes, const char *str, size_t len, uint32_t offset) @@ -452,7 +452,7 @@ ZEND_API bool zend_is_attribute_repeated(const HashTable *attributes, const zend ZEND_HASH_PACKED_FOREACH_PTR(attributes, other) { if (other != attr && other->offset == attr->offset) { - if (zend_string_equals(other->lcname, attr->lcname)) { + if (zend_string_equals(other->name, attr->name)) { return 1; } } @@ -467,7 +467,6 @@ static void attr_free(zval *v) bool persistent = attr->flags & ZEND_ATTRIBUTE_PERSISTENT; zend_string_release(attr->name); - zend_string_release(attr->lcname); if (attr->validation_error != NULL) { zend_string_release(attr->validation_error); } @@ -502,7 +501,6 @@ ZEND_API zend_attribute *zend_add_attribute(HashTable **attributes, zend_string attr->name = zend_string_dup(name, persistent); } - attr->lcname = zend_string_tolower_ex(attr->name, persistent); attr->validation_error = NULL; attr->flags = flags; attr->lineno = lineno; @@ -541,9 +539,7 @@ ZEND_API zend_internal_attribute *zend_mark_internal_attribute(zend_class_entry internal_attr->flags = Z_LVAL(attr->args[0].value); internal_attr->validator = NULL; - zend_string *lcname = zend_string_tolower_ex(ce->name, 1); - zend_hash_update_ptr(&internal_attributes, lcname, internal_attr); - zend_string_release(lcname); + zend_hash_update_ptr(&internal_attributes, ce->name, internal_attr); return internal_attr; } @@ -560,9 +556,9 @@ ZEND_API zend_internal_attribute *zend_internal_attribute_register(zend_class_en return zend_mark_internal_attribute(ce); } -ZEND_API zend_internal_attribute *zend_internal_attribute_get(zend_string *lcname) +ZEND_API zend_internal_attribute *zend_internal_attribute_get(zend_string *name) { - return zend_hash_find_ptr(&internal_attributes, lcname); + return zend_hash_find_ptr(&internal_attributes, name); } void zend_register_attribute_ce(void) diff --git a/Zend/zend_attributes.h b/Zend/zend_attributes.h index c044ef073cc8..51f61b32162c 100644 --- a/Zend/zend_attributes.h +++ b/Zend/zend_attributes.h @@ -58,7 +58,6 @@ typedef struct { typedef struct _zend_attribute { zend_string *name; - zend_string *lcname; /* Only non-null for internal attributes with validation errors that are * delayed until runtime via #[\DelayedTargetValidation] */ zend_string *validation_error; @@ -76,10 +75,10 @@ typedef struct _zend_internal_attribute { zend_string* (*validator)(zend_attribute *attr, uint32_t target, zend_class_entry *scope); } zend_internal_attribute; -ZEND_API zend_attribute *zend_get_attribute(const HashTable *attributes, const zend_string *lcname); +ZEND_API zend_attribute *zend_get_attribute(const HashTable *attributes, const zend_string *name); ZEND_API zend_attribute *zend_get_attribute_str(const HashTable *attributes, const char *str, size_t len); -ZEND_API zend_attribute *zend_get_parameter_attribute(const HashTable *attributes, const zend_string *lcname, uint32_t offset); +ZEND_API zend_attribute *zend_get_parameter_attribute(const HashTable *attributes, const zend_string *name, uint32_t offset); ZEND_API zend_attribute *zend_get_parameter_attribute_str(const HashTable *attributes, const char *str, size_t len, uint32_t offset); ZEND_API zend_result zend_get_attribute_value(zval *ret, const zend_attribute *attr, uint32_t i, zend_class_entry *scope); @@ -90,7 +89,7 @@ ZEND_API bool zend_is_attribute_repeated(const HashTable *attributes, const zend ZEND_API zend_internal_attribute *zend_mark_internal_attribute(zend_class_entry *ce); ZEND_API zend_internal_attribute *zend_internal_attribute_register(zend_class_entry *ce, uint32_t flags); -ZEND_API zend_internal_attribute *zend_internal_attribute_get(zend_string *lcname); +ZEND_API zend_internal_attribute *zend_internal_attribute_get(zend_string *name); ZEND_API zend_attribute *zend_add_attribute( HashTable **attributes, zend_string *name, uint32_t argc, diff --git a/Zend/zend_autoload.c b/Zend/zend_autoload.c index 2ca3d7eea022..a3ff47e2f389 100644 --- a/Zend/zend_autoload.c +++ b/Zend/zend_autoload.c @@ -43,7 +43,7 @@ static Bucket *autoload_find_registered_function(const HashTable *autoloader_tab return NULL; } -ZEND_API zend_class_entry *zend_perform_class_autoload(zend_string *class_name, zend_string *lc_name) +ZEND_API zend_class_entry *zend_perform_class_autoload(zend_string *class_name) { if (!zend_class_autoload_functions) { return NULL; @@ -72,7 +72,7 @@ ZEND_API zend_class_entry *zend_perform_class_autoload(zend_string *class_name, return (zend_class_entry*)ZSTR_GET_CE_CACHE(class_name); } - zend_class_entry *ce = zend_hash_find_ptr(EG(class_table), lc_name); + zend_class_entry *ce = zend_hash_find_ptr(EG(class_table), class_name); if (ce) { return ce; } diff --git a/Zend/zend_autoload.h b/Zend/zend_autoload.h index 84e6ab80b5af..e374b37f1be2 100644 --- a/Zend/zend_autoload.h +++ b/Zend/zend_autoload.h @@ -23,7 +23,7 @@ #include "zend_API.h" #include "zend.h" -ZEND_API zend_class_entry *zend_perform_class_autoload(zend_string *class_name, zend_string *lc_name); +ZEND_API zend_class_entry *zend_perform_class_autoload(zend_string *class_name); ZEND_API void zend_autoload_register_class_loader(zend_fcall_info_cache *fcc, bool prepend); ZEND_API bool zend_autoload_unregister_class_loader(const zend_fcall_info_cache *fcc); ZEND_API void zend_autoload_fcc_map_to_callable_zval_map(zval *return_value); diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 2dceac2512db..5c0753eb4ebb 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -712,7 +712,7 @@ static void is_a_impl(INTERNAL_FUNCTION_PARAMETERS, bool only_subclass) /* {{{ * RETURN_TRUE; } - const zend_class_entry *ce = zend_lookup_class_ex(class_name, NULL, ZEND_FETCH_CLASS_NO_AUTOLOAD); + const zend_class_entry *ce = zend_lookup_class_ex(class_name, ZEND_FETCH_CLASS_NO_AUTOLOAD); if (!ce) { RETURN_FALSE; } @@ -953,7 +953,6 @@ ZEND_FUNCTION(method_exists) { zval *klass; zend_string *method_name; - zend_string *lcname; zend_class_entry *ce; zend_function *func; @@ -974,9 +973,7 @@ ZEND_FUNCTION(method_exists) RETURN_THROWS(); } - lcname = zend_string_tolower(method_name); - func = zend_hash_find_ptr(&ce->function_table, lcname); - zend_string_release_ex(lcname, 0); + func = zend_hash_find_ptr(&ce->function_table, method_name); if (func) { /* Exclude shadow properties when checking a method on a specific class. Include @@ -993,7 +990,7 @@ ZEND_FUNCTION(method_exists) if (func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) { /* Returns true for the fake Closure's __invoke */ RETVAL_BOOL(func->common.scope == zend_ce_closure - && zend_string_equals_literal_ci(method_name, ZEND_INVOKE_FUNC_NAME)); + && zend_string_equals_literal(method_name, ZEND_INVOKE_FUNC_NAME)); zend_string_release_ex(func->common.function_name, 0); zend_free_trampoline(func); @@ -1004,7 +1001,7 @@ ZEND_FUNCTION(method_exists) } else { /* Returns true for fake Closure::__invoke */ if (ce == zend_ce_closure - && zend_string_equals_literal_ci(method_name, ZEND_INVOKE_FUNC_NAME)) { + && zend_string_equals_literal(method_name, ZEND_INVOKE_FUNC_NAME)) { RETURN_TRUE; } } @@ -1073,7 +1070,6 @@ flf_clean:; static zend_always_inline void _class_exists_impl(zval *return_value, zend_string *name, bool autoload, int flags, int skip_flags) /* {{{ */ { - zend_string *lcname; const zend_class_entry *ce; if (ZSTR_HAS_CE_CACHE(name)) { @@ -1085,15 +1081,13 @@ static zend_always_inline void _class_exists_impl(zval *return_value, zend_strin if (!autoload) { if (ZSTR_VAL(name)[0] == '\\') { - /* Ignore leading "\" */ - lcname = zend_string_alloc(ZSTR_LEN(name) - 1, 0); - zend_str_tolower_copy(ZSTR_VAL(lcname), ZSTR_VAL(name) + 1, ZSTR_LEN(name) - 1); + /* Skip leading \\ — class table keys carry no leading backslash */ + zend_string *lookup_name = zend_string_init(ZSTR_VAL(name) + 1, ZSTR_LEN(name) - 1, 0); + ce = zend_hash_find_ptr(EG(class_table), lookup_name); + zend_string_release_ex(lookup_name, 0); } else { - lcname = zend_string_tolower(name); + ce = zend_hash_find_ptr(EG(class_table), name); } - - ce = zend_hash_find_ptr(EG(class_table), lcname); - zend_string_release_ex(lcname, 0); } else { ce = zend_lookup_class(name); } @@ -1175,7 +1169,7 @@ ZEND_FUNCTION(function_exists) { zend_string *name; bool exists; - zend_string *lcname; + ALLOCA_FLAG(use_heap) ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) @@ -1183,15 +1177,14 @@ ZEND_FUNCTION(function_exists) if (ZSTR_VAL(name)[0] == '\\') { /* Ignore leading "\" */ - lcname = zend_string_alloc(ZSTR_LEN(name) - 1, 0); - zend_str_tolower_copy(ZSTR_VAL(lcname), ZSTR_VAL(name) + 1, ZSTR_LEN(name) - 1); + zend_string *stripped; + ZSTR_ALLOCA_INIT(stripped, ZSTR_VAL(name) + 1, ZSTR_LEN(name) - 1, use_heap); + exists = zend_hash_find_ptr(EG(function_table), stripped) != NULL; + ZSTR_ALLOCA_FREE(stripped, use_heap); } else { - lcname = zend_string_tolower(name); + exists = zend_hash_find_ptr(EG(function_table), name) != NULL; } - exists = zend_hash_exists(EG(function_table), lcname); - zend_string_release_ex(lcname, 0); - RETURN_BOOL(exists); } /* }}} */ @@ -1211,7 +1204,7 @@ ZEND_FUNCTION(class_alias) Z_PARAM_BOOL(autoload) ZEND_PARSE_PARAMETERS_END(); - ce = zend_lookup_class_ex(class_name, NULL, !autoload ? ZEND_FETCH_CLASS_NO_AUTOLOAD : 0); + ce = zend_lookup_class_ex(class_name, !autoload ? ZEND_FETCH_CLASS_NO_AUTOLOAD : 0); if (ce) { if (zend_register_class_alias_ex(ZSTR_VAL(alias_name), ZSTR_LEN(alias_name), ce, false) == SUCCESS) { @@ -1699,8 +1692,8 @@ static bool backtrace_is_arg_sensitive(const zend_execute_data *call, uint32_t o { const zend_attribute *attribute = zend_get_parameter_attribute_str( call->func->common.attributes, - "sensitiveparameter", - sizeof("sensitiveparameter") - 1, + "SensitiveParameter", + sizeof("SensitiveParameter") - 1, offset ); diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c index 840d2dbe32e1..9180d7549b8c 100644 --- a/Zend/zend_closures.c +++ b/Zend/zend_closures.c @@ -540,7 +540,7 @@ ZEND_API zval* zend_get_closure_this_ptr(zval *obj) /* {{{ */ static zend_function *zend_closure_get_method(zend_object **object, zend_string *method, const zval *key) /* {{{ */ { - if (zend_string_equals_literal_ci(method, ZEND_INVOKE_FUNC_NAME)) { + if (zend_string_equals_literal(method, ZEND_INVOKE_FUNC_NAME)) { return zend_get_closure_invoke_method(*object); } diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 7e9f7ceac8db..5f89ec262e28 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -324,7 +324,7 @@ static zend_always_inline bool zend_is_confusable_type(const zend_string *name, static bool zend_is_not_imported(zend_string *name) { /* Assuming "name" is unqualified here. */ - return !FC(imports) || zend_hash_find_ptr_lc(FC(imports), name) == NULL; + return !FC(imports) || zend_hash_find_ptr(FC(imports), name) == NULL; } void zend_oparray_context_begin(zend_oparray_context *prev_context, zend_op_array *op_array) /* {{{ */ @@ -612,16 +612,11 @@ static inline int zend_add_literal_string(zend_string **str) /* {{{ */ } /* }}} */ -static int zend_add_func_name_literal(zend_string *name) /* {{{ */ +/* Function, method and class tables are keyed by canonical case, so the + * name literal doubles as the lookup key. */ +static int zend_add_name_literal(zend_string *name) /* {{{ */ { - /* Original name */ - int ret = zend_add_literal_string(&name); - - /* Lowercased name */ - zend_string *lc_name = zend_string_tolower(name); - zend_add_literal_string(&lc_name); - - return ret; + return zend_add_literal_string(&name); } /* }}} */ @@ -630,66 +625,44 @@ static int zend_add_ns_func_name_literal(zend_string *name) /* {{{ */ const char *unqualified_name; size_t unqualified_name_len; - /* Original name */ + /* Original name (slot 0, used by INIT_NS_FCALL_BY_NAME for case-sensitive qualified lookup) */ int ret = zend_add_literal_string(&name); - /* Lowercased name */ - zend_string *lc_name = zend_string_tolower(name); - zend_add_literal_string(&lc_name); - - /* Lowercased unqualified name */ + /* Original unqualified name (slot 1, used by INIT_NS_FCALL_BY_NAME for global fallback) */ if (zend_get_unqualified_name(name, &unqualified_name, &unqualified_name_len)) { - lc_name = zend_string_alloc(unqualified_name_len, 0); - zend_str_tolower_copy(ZSTR_VAL(lc_name), unqualified_name, unqualified_name_len); - zend_add_literal_string(&lc_name); + zend_string *unqualified = zend_string_init(unqualified_name, unqualified_name_len, 0); + zend_add_literal_string(&unqualified); + } else { + /* An ns call name is always namespace-prefixed, so the fallback slot + * read unconditionally by ZEND_INIT_NS_FCALL_BY_NAME always exists. */ + ZEND_UNREACHABLE(); } return ret; } /* }}} */ -static int zend_add_class_name_literal(zend_string *name) /* {{{ */ -{ - /* Original name */ - int ret = zend_add_literal_string(&name); - - /* Lowercased name */ - zend_string *lc_name = zend_string_tolower(name); - zend_add_literal_string(&lc_name); - - return ret; -} -/* }}} */ - static int zend_add_const_name_literal(zend_string *name, bool unqualified) /* {{{ */ { - zend_string *tmp_name; - + /* Original name (slot 0, also the case-sensitive lookup key) */ int ret = zend_add_literal_string(&name); - size_t ns_len = 0, after_ns_len = ZSTR_LEN(name); - const char *after_ns = zend_memrchr(ZSTR_VAL(name), '\\', ZSTR_LEN(name)); - if (after_ns) { - after_ns += 1; - ns_len = after_ns - ZSTR_VAL(name) - 1; - after_ns_len = ZSTR_LEN(name) - ns_len - 1; + if (unqualified) { + /* Unqualified fallback name (slot 1, used when the namespaced + * lookup fails for an unqualified name used inside a namespace) */ + size_t after_ns_len = ZSTR_LEN(name); + const char *after_ns = zend_memrchr(ZSTR_VAL(name), '\\', ZSTR_LEN(name)); + if (after_ns) { + after_ns += 1; + after_ns_len = ZSTR_LEN(name) - (after_ns - ZSTR_VAL(name)); + } else { + after_ns = ZSTR_VAL(name); + } - /* lowercased namespace name & original constant name */ - tmp_name = zend_string_init(ZSTR_VAL(name), ZSTR_LEN(name), 0); - zend_str_tolower(ZSTR_VAL(tmp_name), ns_len); + zend_string *tmp_name = zend_string_init(after_ns, after_ns_len, 0); zend_add_literal_string(&tmp_name); - - if (!unqualified) { - return ret; - } - } else { - after_ns = ZSTR_VAL(name); } - /* original unqualified constant name */ - tmp_name = zend_string_init(after_ns, after_ns_len, 0); - zend_add_literal_string(&tmp_name); - return ret; } /* }}} */ @@ -1090,7 +1063,7 @@ static zend_string *zend_prefix_with_ns(zend_string *name) { static zend_string *zend_resolve_non_class_name( zend_string *name, uint32_t type, bool *is_fully_qualified, - bool case_sensitive, const HashTable *current_import_sub + const HashTable *current_import_sub ) { const char *compound; *is_fully_qualified = false; @@ -1113,12 +1086,7 @@ static zend_string *zend_resolve_non_class_name( if (current_import_sub) { /* If an unqualified name is a function/const alias, replace it. */ - zend_string *import_name; - if (case_sensitive) { - import_name = zend_hash_find_ptr(current_import_sub, name); - } else { - import_name = zend_hash_find_ptr_lc(current_import_sub, name); - } + zend_string *import_name = zend_hash_find_ptr(current_import_sub, name); if (import_name) { *is_fully_qualified = true; @@ -1134,7 +1102,7 @@ static zend_string *zend_resolve_non_class_name( if (compound && FC(imports)) { /* If the first part of a qualified name is an alias, substitute it. */ size_t len = compound - ZSTR_VAL(name); - const zend_string *import_name = zend_hash_str_find_ptr_lc(FC(imports), ZSTR_VAL(name), len); + const zend_string *import_name = zend_hash_str_find_ptr(FC(imports), ZSTR_VAL(name), len); if (import_name) { return zend_concat_names( @@ -1149,13 +1117,13 @@ static zend_string *zend_resolve_non_class_name( static zend_string *zend_resolve_function_name(zend_string *name, uint32_t type, bool *is_fully_qualified) { return zend_resolve_non_class_name( - name, type, is_fully_qualified, false, FC(imports_function)); + name, type, is_fully_qualified, FC(imports_function)); } static zend_string *zend_resolve_const_name(zend_string *name, uint32_t type, bool *is_fully_qualified) { return zend_resolve_non_class_name( - name, type, is_fully_qualified, true, FC(imports_const)); + name, type, is_fully_qualified, FC(imports_const)); } static zend_string *zend_resolve_class_name(zend_string *name, uint32_t type) /* {{{ */ @@ -1199,7 +1167,7 @@ static zend_string *zend_resolve_class_name(zend_string *name, uint32_t type) /* /* If the first part of a qualified name is an alias, substitute it. */ size_t len = compound - ZSTR_VAL(name); const zend_string *import_name = - zend_hash_str_find_ptr_lc(FC(imports), ZSTR_VAL(name), len); + zend_hash_str_find_ptr(FC(imports), ZSTR_VAL(name), len); if (import_name) { return zend_concat_names( @@ -1208,7 +1176,7 @@ static zend_string *zend_resolve_class_name(zend_string *name, uint32_t type) /* } else { /* If an unqualified name is an alias, replace it. */ zend_string *import_name - = zend_hash_find_ptr_lc(FC(imports), name); + = zend_hash_find_ptr(FC(imports), name); if (import_name) { return zend_string_copy(import_name); @@ -1279,9 +1247,9 @@ ZEND_API void function_add_ref(zend_function *function) /* {{{ */ } /* }}} */ -static zend_never_inline ZEND_COLD ZEND_NORETURN void do_bind_function_error(const zend_string *lcname, const zend_op_array *op_array, bool compile_time) /* {{{ */ +static zend_never_inline ZEND_COLD ZEND_NORETURN void do_bind_function_error(const zend_string *name_key, const zend_op_array *op_array, bool compile_time) /* {{{ */ { - const zval *zv = zend_hash_find_known_hash(compile_time ? CG(function_table) : EG(function_table), lcname); + const zval *zv = zend_hash_find_known_hash(compile_time ? CG(function_table) : EG(function_table), name_key); int error_level = compile_time ? E_COMPILE_ERROR : E_ERROR; const zend_function *old_function; @@ -1299,11 +1267,11 @@ static zend_never_inline ZEND_COLD ZEND_NORETURN void do_bind_function_error(con } } -ZEND_API zend_result do_bind_function(zend_function *func, const zval *lcname) /* {{{ */ +ZEND_API zend_result do_bind_function(zend_function *func, const zval *name_key) /* {{{ */ { - zend_function *added_func = zend_hash_add_ptr(EG(function_table), Z_STR_P(lcname), func); + zend_function *added_func = zend_hash_add_ptr(EG(function_table), Z_STR_P(name_key), func); if (UNEXPECTED(!added_func)) { - do_bind_function_error(Z_STR_P(lcname), &func->op_array, false); + do_bind_function_error(Z_STR_P(name_key), &func->op_array, false); return FAILURE; } @@ -1313,69 +1281,69 @@ ZEND_API zend_result do_bind_function(zend_function *func, const zval *lcname) / if (func->common.function_name) { zend_string_addref(func->common.function_name); } - zend_observer_function_declared_notify(&func->op_array, Z_STR_P(lcname)); + zend_observer_function_declared_notify(&func->op_array, Z_STR_P(name_key)); return SUCCESS; } /* }}} */ ZEND_API zend_class_entry *zend_bind_class_in_slot( - zval *class_table_slot, const zval *lcname, zend_string *lc_parent_name) + zval *class_table_slot, const zval *name_key) { zend_class_entry *ce = Z_PTR_P(class_table_slot); bool is_preloaded = (ce->ce_flags & ZEND_ACC_PRELOADED) && !(CG(compiler_options) & ZEND_COMPILE_PRELOAD); bool success; if (EXPECTED(!is_preloaded)) { - success = zend_hash_set_bucket_key(EG(class_table), (Bucket*) class_table_slot, Z_STR_P(lcname)) != NULL; + success = zend_hash_set_bucket_key(EG(class_table), (Bucket*) class_table_slot, Z_STR_P(name_key)) != NULL; } else { /* If preloading is used, don't replace the existing bucket, add a new one. */ - success = zend_hash_add_ptr(EG(class_table), Z_STR_P(lcname), ce) != NULL; + success = zend_hash_add_ptr(EG(class_table), Z_STR_P(name_key), ce) != NULL; } if (UNEXPECTED(!success)) { - zend_class_entry *old_class = zend_hash_find_ptr(EG(class_table), Z_STR_P(lcname)); + zend_class_entry *old_class = zend_hash_find_ptr(EG(class_table), Z_STR_P(name_key)); ZEND_ASSERT(old_class); zend_class_redeclaration_error(E_COMPILE_ERROR, old_class); return NULL; } if (ce->ce_flags & ZEND_ACC_LINKED) { - zend_observer_class_linked_notify(ce, Z_STR_P(lcname)); + zend_observer_class_linked_notify(ce, Z_STR_P(name_key)); return ce; } - ce = zend_do_link_class(ce, lc_parent_name, Z_STR_P(lcname)); + ce = zend_do_link_class(ce, Z_STR_P(name_key)); if (ce) { - zend_observer_class_linked_notify(ce, Z_STR_P(lcname)); + zend_observer_class_linked_notify(ce, Z_STR_P(name_key)); return ce; } if (!is_preloaded) { /* Reload bucket pointer, the hash table may have been reallocated */ - zval *zv = zend_hash_find(EG(class_table), Z_STR_P(lcname)); - zend_hash_set_bucket_key(EG(class_table), (Bucket *) zv, Z_STR_P(lcname + 1)); + zval *zv = zend_hash_find(EG(class_table), Z_STR_P(name_key)); + zend_hash_set_bucket_key(EG(class_table), (Bucket *) zv, Z_STR_P(name_key + 1)); } else { - zend_hash_del(EG(class_table), Z_STR_P(lcname)); + zend_hash_del(EG(class_table), Z_STR_P(name_key)); } return NULL; } -ZEND_API zend_result do_bind_class(zval *lcname, zend_string *lc_parent_name) /* {{{ */ +ZEND_API zend_result do_bind_class(zval *name_key) /* {{{ */ { zval *rtd_key, *zv; - rtd_key = lcname + 1; + rtd_key = name_key + 1; zv = zend_hash_find_known_hash(EG(class_table), Z_STR_P(rtd_key)); if (UNEXPECTED(!zv)) { - const zend_class_entry *ce = zend_hash_find_ptr(EG(class_table), Z_STR_P(lcname)); + const zend_class_entry *ce = zend_hash_find_ptr(EG(class_table), Z_STR_P(name_key)); ZEND_ASSERT(ce); zend_class_redeclaration_error(E_COMPILE_ERROR, ce); return FAILURE; } /* Register the derived class */ - return zend_bind_class_in_slot(zv, lcname, lc_parent_name) ? SUCCESS : FAILURE; + return zend_bind_class_in_slot(zv, name_key) ? SUCCESS : FAILURE; } /* }}} */ @@ -1537,9 +1505,9 @@ ZEND_API zend_string *zend_type_to_string(zend_type type) { } static bool is_generator_compatible_class_type(const zend_string *name) { - return zend_string_equals_ci(name, ZSTR_KNOWN(ZEND_STR_TRAVERSABLE)) - || zend_string_equals_literal_ci(name, "Iterator") - || zend_string_equals_literal_ci(name, "Generator"); + return zend_string_equals(name, ZSTR_KNOWN(ZEND_STR_TRAVERSABLE)) + || zend_string_equals_literal(name, "Iterator") + || zend_string_equals_literal(name, "Generator"); } static void zend_mark_function_as_generator(void) /* {{{ */ @@ -1740,7 +1708,7 @@ static inline bool class_name_refers_to_active_ce(const zend_string *class_name, return true; } return fetch_type == ZEND_FETCH_CLASS_DEFAULT - && zend_string_equals_ci(class_name, CG(active_class_entry)->name); + && zend_string_equals(class_name, CG(active_class_entry)->name); } /* }}} */ @@ -1864,7 +1832,7 @@ static bool zend_verify_ct_const_access(const zend_class_constant *c, const zend if (ce->ce_flags & ZEND_ACC_RESOLVED_PARENT) { ce = ce->parent; } else { - ce = zend_hash_find_ptr_lc(CG(class_table), ce->parent_name); + ce = zend_hash_find_ptr(CG(class_table), ce->parent_name); if (!ce) { break; } @@ -1884,7 +1852,7 @@ static bool zend_try_ct_eval_class_const(zval *zv, zend_string *class_name, zend if (class_name_refers_to_active_ce(class_name, fetch_type)) { cc = zend_hash_find_ptr(&CG(active_class_entry)->constants_table, name); } else if (fetch_type == ZEND_FETCH_CLASS_DEFAULT && !(CG(compiler_options) & ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION)) { - const zend_class_entry *ce = zend_hash_find_ptr_lc(CG(class_table), class_name); + const zend_class_entry *ce = zend_hash_find_ptr(CG(class_table), class_name); if (ce) { cc = zend_hash_find_ptr(&ce->constants_table, name); } else { @@ -2844,7 +2812,7 @@ static inline void zend_set_class_name_op1(zend_op *opline, znode *class_node) / { if (class_node->op_type == IS_CONST) { opline->op1_type = IS_CONST; - opline->op1.constant = zend_add_class_name_literal( + opline->op1.constant = zend_add_name_literal( Z_STR(class_node->u.constant)); } else { SET_NODE(opline->op1, class_node); @@ -3267,7 +3235,7 @@ static zend_op *zend_compile_static_prop(znode *result, zend_ast *ast, uint32_t } if (class_node.op_type == IS_CONST) { opline->op2_type = IS_CONST; - opline->op2.constant = zend_add_class_name_literal( + opline->op2.constant = zend_add_name_literal( Z_STR(class_node.u.constant)); if (opline->op1_type != IS_CONST) { opline->extended_value = zend_alloc_cache_slot(); @@ -4102,9 +4070,9 @@ static void zend_compile_dynamic_call(znode *result, znode *name_node, zend_ast opline->opcode = ZEND_INIT_STATIC_METHOD_CALL; opline->op1_type = IS_CONST; - opline->op1.constant = zend_add_class_name_literal(class); + opline->op1.constant = zend_add_name_literal(class); opline->op2_type = IS_CONST; - opline->op2.constant = zend_add_func_name_literal(method); + opline->op2.constant = zend_add_name_literal(method); /* 2 slots, for class and method */ opline->result.num = zend_alloc_cache_slots(2); zval_ptr_dtor(&name_node->u.constant); @@ -4113,7 +4081,7 @@ static void zend_compile_dynamic_call(znode *result, znode *name_node, zend_ast opline->opcode = ZEND_INIT_FCALL_BY_NAME; opline->op2_type = IS_CONST; - opline->op2.constant = zend_add_func_name_literal(str); + opline->op2.constant = zend_add_name_literal(str); opline->result.num = zend_alloc_cache_slot(); } } else { @@ -4313,7 +4281,7 @@ static bool zend_compile_ignore_function(const zend_function *fbc, const zend_st static zend_result zend_try_compile_ct_bound_init_user_func(zend_ast *name_ast, uint32_t num_args) /* {{{ */ { - zend_string *name, *lcname; + zend_string *name; zend_function *fbc; zend_op *opline; @@ -4322,13 +4290,11 @@ static zend_result zend_try_compile_ct_bound_init_user_func(zend_ast *name_ast, } name = zend_ast_get_str(name_ast); - lcname = zend_string_tolower(name); - fbc = zend_hash_find_ptr(CG(function_table), lcname); + fbc = zend_hash_find_ptr(CG(function_table), name); if (!fbc || !fbc_is_finalized(fbc) || zend_compile_ignore_function(fbc, CG(active_op_array)->filename)) { - zend_string_release_ex(lcname, 0); return FAILURE; } @@ -4336,7 +4302,7 @@ static zend_result zend_try_compile_ct_bound_init_user_func(zend_ast *name_ast, opline->extended_value = num_args; opline->op1.num = zend_vm_calc_used_stack(num_args, fbc); opline->op2_type = IS_CONST; - LITERAL_STR(opline->op2, lcname); + LITERAL_STR(opline->op2, zend_string_copy(name)); opline->result.num = zend_alloc_cache_slot(); return SUCCESS; @@ -4362,7 +4328,7 @@ static void zend_compile_init_user_func(zend_ast *name_ast, uint32_t num_args, z /* }}} */ /* cufa = call_user_func_array */ -static zend_result zend_compile_func_cufa(znode *result, zend_ast_list *args, zend_string *lcname, uint32_t type) /* {{{ */ +static zend_result zend_compile_func_cufa(znode *result, zend_ast_list *args, zend_string *name, uint32_t type) /* {{{ */ { znode arg_node; zend_op *opline; @@ -4371,7 +4337,7 @@ static zend_result zend_compile_func_cufa(znode *result, zend_ast_list *args, ze return FAILURE; } - zend_compile_init_user_func(args->child[0], 0, lcname); + zend_compile_init_user_func(args->child[0], 0, name); if (args->child[1]->kind == ZEND_AST_CALL && args->child[1]->child[0]->kind == ZEND_AST_ZVAL && Z_TYPE_P(zend_ast_get_zval(args->child[1]->child[0])) == IS_STRING @@ -4379,9 +4345,9 @@ static zend_result zend_compile_func_cufa(znode *result, zend_ast_list *args, ze zend_string *orig_name = zend_ast_get_str(args->child[1]->child[0]); zend_ast_list *list = zend_ast_get_list(args->child[1]->child[1]); bool is_fully_qualified; - zend_string *name = zend_resolve_function_name(orig_name, args->child[1]->child[0]->attr, &is_fully_qualified); + zend_string *resolved_name = zend_resolve_function_name(orig_name, args->child[1]->child[0]->attr, &is_fully_qualified); - if (zend_string_equals_literal_ci(name, "array_slice") + if (zend_string_equals_literal(resolved_name, "array_slice") && !zend_args_contain_unpack_or_named(list) && list->children == 3 && list->child[1]->kind == ZEND_AST_ZVAL) { @@ -4402,11 +4368,11 @@ static zend_result zend_compile_func_cufa(znode *result, zend_ast_list *args, ze opline->result_type = IS_TMP_VAR; result->op_type = IS_TMP_VAR; } - zend_string_release_ex(name, 0); + zend_string_release_ex(resolved_name, 0); return SUCCESS; } } - zend_string_release_ex(name, 0); + zend_string_release_ex(resolved_name, 0); } zend_compile_expr(&arg_node, args->child[1]); zend_emit_op(NULL, ZEND_SEND_ARRAY, &arg_node, NULL); @@ -4423,7 +4389,7 @@ static zend_result zend_compile_func_cufa(znode *result, zend_ast_list *args, ze /* }}} */ /* cuf = call_user_func */ -static zend_result zend_compile_func_cuf(znode *result, const zend_ast_list *args, zend_string *lcname, uint32_t type) /* {{{ */ +static zend_result zend_compile_func_cuf(znode *result, const zend_ast_list *args, zend_string *name, uint32_t type) /* {{{ */ { uint32_t i; @@ -4431,7 +4397,7 @@ static zend_result zend_compile_func_cuf(znode *result, const zend_ast_list *arg return FAILURE; } - zend_compile_init_user_func(args->child[0], args->children - 1, lcname); + zend_compile_init_user_func(args->child[0], args->children - 1, name); for (i = 1; i < args->children; ++i) { zend_ast *arg_ast = args->child[i]; znode arg_node; @@ -4588,7 +4554,7 @@ static zend_result zend_compile_func_in_array(znode *result, zend_ast_list *args } /* }}} */ -static zend_result zend_compile_func_count(znode *result, const zend_ast_list *args, const zend_string *lcname) /* {{{ */ +static zend_result zend_compile_func_count(znode *result, const zend_ast_list *args, const zend_string *name) /* {{{ */ { znode arg_node; zend_op *opline; @@ -4599,7 +4565,7 @@ static zend_result zend_compile_func_count(znode *result, const zend_ast_list *a zend_compile_expr(&arg_node, args->child[0]); opline = zend_emit_op_tmp(result, ZEND_COUNT, &arg_node, NULL); - opline->extended_value = zend_string_equals_literal(lcname, "sizeof"); + opline->extended_value = zend_string_equals_literal(name, "sizeof"); return SUCCESS; } @@ -4703,7 +4669,7 @@ static zend_result zend_compile_func_array_slice(znode *result, const zend_ast_l const zval *zv = zend_ast_get_zval(args->child[1]); znode first; - if (zend_string_equals_literal_ci(name, "func_get_args") + if (zend_string_equals_literal(name, "func_get_args") && list->children == 0 && Z_TYPE_P(zv) == IS_LONG && Z_LVAL_P(zv) >= 0) { @@ -4824,8 +4790,8 @@ static void zend_compile_ns_call(znode *result, const znode *name_node, zend_ast && !zend_args_contain_unpack_or_named(zend_ast_get_list(args_ast)) /* Avoid blowing up op count with nested frameless branches. */ && !CG(context).in_jmp_frameless_branch) { - zend_string *lc_func_name = Z_STR_P(CT_CONSTANT_EX(CG(active_op_array), name_constants + 2)); - frameless_function = zend_hash_find_ptr(CG(function_table), lc_func_name); + zend_string *func_name = Z_STR_P(CT_CONSTANT_EX(CG(active_op_array), name_constants + 1)); + frameless_function = zend_hash_find_ptr(CG(function_table), func_name); } /* Check whether any frameless handler may actually be used. */ @@ -4837,7 +4803,7 @@ static void zend_compile_ns_call(znode *result, const znode *name_node, zend_ast CG(context).in_jmp_frameless_branch = true; znode op1; op1.op_type = IS_CONST; - ZVAL_COPY(&op1.u.constant, CT_CONSTANT_EX(CG(active_op_array), name_constants + 1)); + ZVAL_COPY(&op1.u.constant, CT_CONSTANT_EX(CG(active_op_array), name_constants + 0)); jmp_fl_opnum = get_next_op_number(); zend_emit_op(NULL, ZEND_JMP_FRAMELESS, &op1, NULL); } @@ -5113,7 +5079,7 @@ static zend_result zend_compile_func_clone(znode *result, const zend_ast_list *a return SUCCESS; } -static zend_result zend_compile_func_array_map(znode *result, zend_ast_list *args, zend_string *lcname, uint32_t lineno) /* {{{ */ +static zend_result zend_compile_func_array_map(znode *result, zend_ast_list *args, zend_string *func_name, uint32_t lineno) /* {{{ */ { /* Bail out if we do not have exactly two parameters. */ if (args->children != 2) { @@ -5143,7 +5109,7 @@ static zend_result zend_compile_func_array_map(znode *result, zend_ast_list *arg if (callback->kind == ZEND_AST_CALL && callback->child[0]->kind == ZEND_AST_ZVAL && Z_TYPE_P(zend_ast_get_zval(callback->child[0])) == IS_STRING - && zend_string_equals_literal_ci(zend_ast_get_str(callback->child[0]), "assert")) { + && zend_string_equals_literal(zend_ast_get_str(callback->child[0]), "assert")) { return FAILURE; } @@ -5170,11 +5136,11 @@ static zend_result zend_compile_func_array_map(znode *result, zend_ast_list *arg /* Verify that the input array actually is an array. */ znode name; name.op_type = IS_CONST; - ZVAL_STR_COPY(&name.u.constant, lcname); + ZVAL_STR_COPY(&name.u.constant, func_name); opline = zend_emit_op(NULL, ZEND_TYPE_ASSERT, &name, &array); opline->lineno = lineno; opline->extended_value = (2 << 16) | IS_ARRAY; - const zval *fbc_zv = zend_hash_find(CG(function_table), lcname); + const zval *fbc_zv = zend_hash_find(CG(function_table), func_name); const Bucket *fbc_bucket = ZEND_CONTAINER_OF(fbc_zv, Bucket, val); Z_EXTRA_P(CT_CONSTANT(opline->op1)) = fbc_bucket - CG(function_table)->arData; @@ -5219,86 +5185,86 @@ static zend_result zend_compile_func_array_map(znode *result, zend_ast_list *arg return SUCCESS; } -static zend_result zend_try_compile_special_func_ex(znode *result, zend_string *lcname, zend_ast_list *args, uint32_t type, uint32_t lineno) /* {{{ */ +static zend_result zend_try_compile_special_func_ex(znode *result, zend_string *name, zend_ast_list *args, uint32_t type, uint32_t lineno) /* {{{ */ { - if (zend_string_equals_literal(lcname, "strlen")) { + if (zend_string_equals_literal(name, "strlen")) { return zend_compile_func_strlen(result, args); - } else if (zend_string_equals_literal(lcname, "is_null")) { + } else if (zend_string_equals_literal(name, "is_null")) { return zend_compile_func_typecheck(result, args, IS_NULL); - } else if (zend_string_equals_literal(lcname, "is_bool")) { + } else if (zend_string_equals_literal(name, "is_bool")) { return zend_compile_func_typecheck(result, args, _IS_BOOL); - } else if (zend_string_equals_literal(lcname, "is_long") - || zend_string_equals_literal(lcname, "is_int") - || zend_string_equals_literal(lcname, "is_integer") + } else if (zend_string_equals_literal(name, "is_long") + || zend_string_equals_literal(name, "is_int") + || zend_string_equals_literal(name, "is_integer") ) { return zend_compile_func_typecheck(result, args, IS_LONG); - } else if (zend_string_equals_literal(lcname, "is_float") - || zend_string_equals_literal(lcname, "is_double") + } else if (zend_string_equals_literal(name, "is_float") + || zend_string_equals_literal(name, "is_double") ) { return zend_compile_func_typecheck(result, args, IS_DOUBLE); - } else if (zend_string_equals_literal(lcname, "is_string")) { + } else if (zend_string_equals_literal(name, "is_string")) { return zend_compile_func_typecheck(result, args, IS_STRING); - } else if (zend_string_equals_literal(lcname, "is_array")) { + } else if (zend_string_equals_literal(name, "is_array")) { return zend_compile_func_typecheck(result, args, IS_ARRAY); - } else if (zend_string_equals_literal(lcname, "is_object")) { + } else if (zend_string_equals_literal(name, "is_object")) { return zend_compile_func_typecheck(result, args, IS_OBJECT); - } else if (zend_string_equals_literal(lcname, "is_resource")) { + } else if (zend_string_equals_literal(name, "is_resource")) { return zend_compile_func_typecheck(result, args, IS_RESOURCE); - } else if (zend_string_equals_literal(lcname, "is_scalar")) { + } else if (zend_string_equals_literal(name, "is_scalar")) { return zend_compile_func_is_scalar(result, args); - } else if (zend_string_equals_literal(lcname, "boolval")) { + } else if (zend_string_equals_literal(name, "boolval")) { return zend_compile_func_cast(result, args, _IS_BOOL); - } else if (zend_string_equals_literal(lcname, "intval")) { + } else if (zend_string_equals_literal(name, "intval")) { return zend_compile_func_cast(result, args, IS_LONG); - } else if (zend_string_equals_literal(lcname, "floatval") - || zend_string_equals_literal(lcname, "doubleval") + } else if (zend_string_equals_literal(name, "floatval") + || zend_string_equals_literal(name, "doubleval") ) { return zend_compile_func_cast(result, args, IS_DOUBLE); - } else if (zend_string_equals_literal(lcname, "strval")) { + } else if (zend_string_equals_literal(name, "strval")) { return zend_compile_func_cast(result, args, IS_STRING); - } else if (zend_string_equals_literal(lcname, "defined")) { + } else if (zend_string_equals_literal(name, "defined")) { return zend_compile_func_defined(result, args); - } else if (zend_string_equals_literal(lcname, "chr") && type == BP_VAR_R) { + } else if (zend_string_equals_literal(name, "chr") && type == BP_VAR_R) { return zend_compile_func_chr(result, args); - } else if (zend_string_equals_literal(lcname, "ord") && type == BP_VAR_R) { + } else if (zend_string_equals_literal(name, "ord") && type == BP_VAR_R) { return zend_compile_func_ord(result, args); - } else if (zend_string_equals_literal(lcname, "call_user_func_array")) { - return zend_compile_func_cufa(result, args, lcname, type); - } else if (zend_string_equals_literal(lcname, "call_user_func")) { - return zend_compile_func_cuf(result, args, lcname, type); - } else if (zend_string_equals_literal(lcname, "in_array")) { + } else if (zend_string_equals_literal(name, "call_user_func_array")) { + return zend_compile_func_cufa(result, args, name, type); + } else if (zend_string_equals_literal(name, "call_user_func")) { + return zend_compile_func_cuf(result, args, name, type); + } else if (zend_string_equals_literal(name, "in_array")) { return zend_compile_func_in_array(result, args); - } else if (zend_string_equals(lcname, ZSTR_KNOWN(ZEND_STR_COUNT)) - || zend_string_equals_literal(lcname, "sizeof")) { - return zend_compile_func_count(result, args, lcname); - } else if (zend_string_equals_literal(lcname, "get_class")) { + } else if (zend_string_equals(name, ZSTR_KNOWN(ZEND_STR_COUNT)) + || zend_string_equals_literal(name, "sizeof")) { + return zend_compile_func_count(result, args, name); + } else if (zend_string_equals_literal(name, "get_class")) { return zend_compile_func_get_class(result, args); - } else if (zend_string_equals_literal(lcname, "get_called_class")) { + } else if (zend_string_equals_literal(name, "get_called_class")) { return zend_compile_func_get_called_class(result, args); - } else if (zend_string_equals_literal(lcname, "gettype")) { + } else if (zend_string_equals_literal(name, "gettype")) { return zend_compile_func_gettype(result, args); - } else if (zend_string_equals_literal(lcname, "func_num_args")) { + } else if (zend_string_equals_literal(name, "func_num_args")) { return zend_compile_func_num_args(result, args); - } else if (zend_string_equals_literal(lcname, "func_get_args")) { + } else if (zend_string_equals_literal(name, "func_get_args")) { return zend_compile_func_get_args(result, args); - } else if (zend_string_equals_literal(lcname, "array_slice")) { + } else if (zend_string_equals_literal(name, "array_slice")) { return zend_compile_func_array_slice(result, args); - } else if (zend_string_equals_literal(lcname, "array_key_exists")) { + } else if (zend_string_equals_literal(name, "array_key_exists")) { return zend_compile_func_array_key_exists(result, args); - } else if (zend_string_equals_literal(lcname, "sprintf")) { + } else if (zend_string_equals_literal(name, "sprintf")) { return zend_compile_func_sprintf(result, args); - } else if (zend_string_equals_literal(lcname, "printf")) { + } else if (zend_string_equals_literal(name, "printf")) { return zend_compile_func_printf(result, args); - } else if (zend_string_equals(lcname, ZSTR_KNOWN(ZEND_STR_CLONE))) { + } else if (zend_string_equals(name, ZSTR_KNOWN(ZEND_STR_CLONE))) { return zend_compile_func_clone(result, args); - } else if (zend_string_equals_literal(lcname, "array_map")) { - return zend_compile_func_array_map(result, args, lcname, lineno); + } else if (zend_string_equals_literal(name, "array_map")) { + return zend_compile_func_array_map(result, args, name, lineno); } else { return FAILURE; } } -static zend_result zend_try_compile_special_func(znode *result, zend_string *lcname, zend_ast_list *args, const zend_function *fbc, uint32_t type, uint32_t lineno) /* {{{ */ +static zend_result zend_try_compile_special_func(znode *result, zend_string *name, zend_ast_list *args, const zend_function *fbc, uint32_t type, uint32_t lineno) /* {{{ */ { if (CG(compiler_options) & ZEND_COMPILE_NO_BUILTINS) { return FAILURE; @@ -5314,7 +5280,7 @@ static zend_result zend_try_compile_special_func(znode *result, zend_string *lcn return FAILURE; } - if (zend_try_compile_special_func_ex(result, lcname, args, type, lineno) == SUCCESS) { + if (zend_try_compile_special_func_ex(result, name, args, type, lineno) == SUCCESS) { return SUCCESS; } @@ -5422,7 +5388,7 @@ static void zend_compile_call(znode *result, const zend_ast *ast, uint32_t type) { bool runtime_resolution = zend_compile_function_name(&name_node, name_ast); if (runtime_resolution) { - if (zend_string_equals_literal_ci(zend_ast_get_str(name_ast), "assert") + if (zend_string_equals_literal(zend_ast_get_str(name_ast), "assert") && !is_callable_convert) { zend_compile_assert(result, zend_ast_get_list(args_ast), Z_STR(name_node.u.constant), NULL, ast->lineno, type); } else { @@ -5434,15 +5400,14 @@ static void zend_compile_call(znode *result, const zend_ast *ast, uint32_t type) { const zval *name = &name_node.u.constant; - zend_string *lcname = zend_string_tolower(Z_STR_P(name)); - zval *fbc_zv = zend_hash_find(CG(function_table), lcname); + zend_string *func_name = Z_STR_P(name); + zval *fbc_zv = zend_hash_find(CG(function_table), func_name); const zend_function *fbc = fbc_zv ? Z_PTR_P(fbc_zv) : NULL; zend_op *opline; /* Special assert() handling should apply independently of compiler flags. */ - if (fbc && zend_string_equals_literal(lcname, "assert") && !is_callable_convert) { - zend_compile_assert(result, zend_ast_get_list(args_ast), lcname, fbc, ast->lineno, type); - zend_string_release(lcname); + if (fbc && zend_string_equals_literal(func_name, "assert") && !is_callable_convert) { + zend_compile_assert(result, zend_ast_get_list(args_ast), func_name, fbc, ast->lineno, type); zval_ptr_dtor(&name_node.u.constant); return; } @@ -5450,23 +5415,18 @@ static void zend_compile_call(znode *result, const zend_ast *ast, uint32_t type) if (!fbc || !fbc_is_finalized(fbc) || zend_compile_ignore_function(fbc, CG(active_op_array)->filename)) { - zend_string_release_ex(lcname, 0); zend_compile_dynamic_call(result, &name_node, args_ast, ast->lineno, type); return; } if (!is_callable_convert && - zend_try_compile_special_func(result, lcname, + zend_try_compile_special_func(result, func_name, zend_ast_get_list(args_ast), fbc, type, ast->lineno) == SUCCESS ) { - zend_string_release_ex(lcname, 0); zval_ptr_dtor(&name_node.u.constant); return; } - zval_ptr_dtor(&name_node.u.constant); - ZVAL_STR(&name_node.u.constant, lcname); - opline = zend_emit_op(NULL, ZEND_INIT_FCALL, NULL, &name_node); opline->result.num = zend_alloc_cache_slot(); @@ -5520,7 +5480,7 @@ static void zend_compile_method_call(znode *result, zend_ast *ast, uint32_t type } opline->op2_type = IS_CONST; - opline->op2.constant = zend_add_func_name_literal( + opline->op2.constant = zend_add_name_literal( Z_STR(method_node.u.constant)); opline->result.num = zend_alloc_cache_slots(2); } else { @@ -5530,8 +5490,7 @@ static void zend_compile_method_call(znode *result, zend_ast *ast, uint32_t type /* Check if this calls a known method on $this */ if (opline->op1_type == IS_UNUSED && opline->op2_type == IS_CONST && CG(active_class_entry) && zend_is_scope_known()) { - zend_string *lcname = Z_STR_P(CT_CONSTANT(opline->op2) + 1); - fbc = zend_hash_find_ptr(&CG(active_class_entry)->function_table, lcname); + fbc = zend_hash_find_ptr(&CG(active_class_entry)->function_table, Z_STR_P(CT_CONSTANT(opline->op2))); /* We only know the exact method that is being called if it is either private or final. * Otherwise an overriding method in a child class may be called. */ @@ -5551,7 +5510,7 @@ static void zend_compile_method_call(znode *result, zend_ast *ast, uint32_t type static bool zend_is_constructor(const zend_string *name) /* {{{ */ { - return zend_string_equals_literal_ci(name, ZEND_CONSTRUCTOR_FUNC_NAME); + return zend_string_equals_literal(name, ZEND_CONSTRUCTOR_FUNC_NAME); } /* }}} */ @@ -5571,9 +5530,9 @@ static bool is_func_accessible(const zend_function *fbc) return false; } -static const zend_function *zend_get_compatible_func_or_null(const zend_class_entry *ce, zend_string *lcname) /* {{{ */ +static const zend_function *zend_get_compatible_func_or_null(const zend_class_entry *ce, zend_string *name) /* {{{ */ { - const zend_function *fbc = zend_hash_find_ptr(&ce->function_table, lcname); + const zend_function *fbc = zend_hash_find_ptr(&ce->function_table, name); if (!fbc || is_func_accessible(fbc)) { return fbc; @@ -5620,7 +5579,7 @@ static void zend_compile_static_call(znode *result, zend_ast *ast, uint32_t type if (method_node.op_type == IS_CONST) { opline->op2_type = IS_CONST; - opline->op2.constant = zend_add_func_name_literal( + opline->op2.constant = zend_add_name_literal( Z_STR(method_node.u.constant)); opline->result.num = zend_alloc_cache_slots(2); } else { @@ -5634,14 +5593,14 @@ static void zend_compile_static_call(znode *result, zend_ast *ast, uint32_t type if (opline->op2_type == IS_CONST) { zend_class_entry *ce = NULL; if (opline->op1_type == IS_CONST) { - zend_string *lcname = Z_STR_P(CT_CONSTANT(opline->op1) + 1); - ce = zend_hash_find_ptr(CG(class_table), lcname); + zend_string *class_name = Z_STR_P(CT_CONSTANT(opline->op1)); + ce = zend_hash_find_ptr(CG(class_table), class_name); if (ce) { if (zend_compile_ignore_class(ce, CG(active_op_array)->filename)) { ce = NULL; } } else if (CG(active_class_entry) - && zend_string_equals_ci(CG(active_class_entry)->name, lcname)) { + && zend_string_equals(CG(active_class_entry)->name, class_name)) { ce = CG(active_class_entry); } } else if (opline->op1_type == IS_UNUSED @@ -5650,8 +5609,7 @@ static void zend_compile_static_call(znode *result, zend_ast *ast, uint32_t type ce = CG(active_class_entry); } if (ce) { - zend_string *lcname = Z_STR_P(CT_CONSTANT(opline->op2) + 1); - fbc = zend_get_compatible_func_or_null(ce, lcname); + fbc = zend_get_compatible_func_or_null(ce, Z_STR_P(CT_CONSTANT(opline->op2))); } } @@ -5686,14 +5644,14 @@ static void zend_compile_new(znode *result, zend_ast *ast) /* {{{ */ zend_class_entry *ce = NULL; if (opline->op1_type == IS_CONST) { - zend_string *lcname = Z_STR_P(CT_CONSTANT(opline->op1) + 1); - ce = zend_hash_find_ptr(CG(class_table), lcname); + zend_string *class_name = Z_STR_P(CT_CONSTANT(opline->op1)); + ce = zend_hash_find_ptr(CG(class_table), class_name); if (ce) { if (zend_compile_ignore_class(ce, CG(active_op_array)->filename)) { ce = NULL; } } else if (CG(active_class_entry) - && zend_string_equals_ci(CG(active_class_entry)->name, lcname)) { + && zend_string_equals(CG(active_class_entry)->name, class_name)) { ce = CG(active_class_entry); } } else if (opline->op1_type == IS_UNUSED @@ -6764,7 +6722,7 @@ static bool zend_is_pipe_optimizable_callable_name(zend_ast *ast) * pipe optimization that uses a temporary znode for the reference elimination. * Therefore, disable the optimization for assert. * Note that "assert" as a name is always treated as fully qualified. */ - return !zend_string_equals_literal_ci(zend_ast_get_str(ast), "assert"); + return !zend_string_equals_literal(zend_ast_get_str(ast), "assert"); } return true; @@ -7096,7 +7054,7 @@ static void zend_compile_try(const zend_ast *ast) /* {{{ */ opline = get_next_op(); opline->opcode = ZEND_CATCH; opline->op1_type = IS_CONST; - opline->op1.constant = zend_add_class_name_literal( + opline->op1.constant = zend_add_name_literal( zend_resolve_class_name_ast(class_ast)); opline->extended_value = zend_alloc_cache_slot(); @@ -7473,7 +7431,7 @@ static void zend_are_intersection_types_redundant(const zend_type left_type, con ZEND_TYPE_LIST_FOREACH(smaller_type_list, outer_type) { const zend_type *inner_type; ZEND_TYPE_LIST_FOREACH(larger_type_list, inner_type) { - if (zend_string_equals_ci(ZEND_TYPE_NAME(*inner_type), ZEND_TYPE_NAME(*outer_type))) { + if (zend_string_equals(ZEND_TYPE_NAME(*inner_type), ZEND_TYPE_NAME(*outer_type))) { sum++; break; } @@ -7507,7 +7465,7 @@ static void zend_is_intersection_type_redundant_by_single_type(const zend_type i const zend_type *single_intersection_type = NULL; ZEND_TYPE_FOREACH(intersection_type, single_intersection_type) { - if (zend_string_equals_ci(ZEND_TYPE_NAME(*single_intersection_type), ZEND_TYPE_NAME(single_type))) { + if (zend_string_equals(ZEND_TYPE_NAME(*single_intersection_type), ZEND_TYPE_NAME(single_type))) { zend_string *single_type_str = zend_type_to_string(single_type); zend_string *complete_type = zend_type_to_string(intersection_type); zend_error_noreturn(E_COMPILE_ERROR, "Type %s is redundant as it is more restrictive than type %s", @@ -7525,7 +7483,7 @@ static void zend_is_type_list_redundant_by_single_type(const zend_type_list *typ zend_is_intersection_type_redundant_by_single_type(type_list->types[i], type); continue; } - if (zend_string_equals_ci(ZEND_TYPE_NAME(type_list->types[i]), ZEND_TYPE_NAME(type))) { + if (zend_string_equals(ZEND_TYPE_NAME(type_list->types[i]), ZEND_TYPE_NAME(type))) { zend_string *single_type_str = zend_type_to_string(type); zend_error_noreturn(E_COMPILE_ERROR, "Duplicate type %s is redundant", ZSTR_VAL(single_type_str)); } @@ -7812,11 +7770,9 @@ static void zend_compile_attributes( } zend_string *name = zend_resolve_class_name_ast(el->child[0]); - zend_string *lcname = zend_string_tolower_ex(name, false); zend_ast_list *args = el->child[1] ? zend_ast_get_list(el->child[1]) : NULL; - config = zend_internal_attribute_get(lcname); - zend_string_release(lcname); + config = zend_internal_attribute_get(name); /* Exclude internal attributes that do not match on promoted properties. */ if (config && !(target & (config->flags & ZEND_ATTRIBUTE_TARGET_ALL))) { @@ -7878,20 +7834,20 @@ static void zend_compile_attributes( /* zend_get_parameter_attribute_str will add 1 too */ delayed_target_validation = zend_get_parameter_attribute_str( *attributes, - "delayedtargetvalidation", - strlen("delayedtargetvalidation"), + "DelayedTargetValidation", + strlen("DelayedTargetValidation"), offset - 1 ); } else { delayed_target_validation = zend_get_attribute_str( *attributes, - "delayedtargetvalidation", - strlen("delayedtargetvalidation") + "DelayedTargetValidation", + strlen("DelayedTargetValidation") ); } /* Validate attributes in a secondary loop (needed to detect repeated attributes). */ ZEND_HASH_PACKED_FOREACH_PTR(*attributes, attr) { - if (attr->offset != offset || NULL == (config = zend_internal_attribute_get(attr->lcname))) { + if (attr->offset != offset || NULL == (config = zend_internal_attribute_get(attr->name))) { continue; } @@ -8272,7 +8228,7 @@ static void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast, uint32 zend_compile_attributes( &prop->attributes, attributes_ast, 0, ZEND_ATTRIBUTE_TARGET_PROPERTY, ZEND_ATTRIBUTE_TARGET_PARAMETER); - zend_attribute *override_attribute = zend_get_attribute_str(prop->attributes, "override", sizeof("override")-1); + zend_attribute *override_attribute = zend_get_attribute_str(prop->attributes, "Override", sizeof("Override")-1); if (override_attribute) { prop->flags |= ZEND_ACC_OVERRIDE; } @@ -8521,7 +8477,7 @@ static void zend_compile_implicit_closure_uses(const closure_info *info) static void add_stringable_interface(zend_class_entry *ce) { for (uint32_t i = 0; i < ce->num_interfaces; i++) { - if (zend_string_equals_literal(ce->interface_names[i].lc_name, "stringable")) { + if (zend_string_equals_literal(ce->interface_names[i].name, "Stringable")) { /* Interface already explicitly implemented */ return; } @@ -8533,17 +8489,53 @@ static void add_stringable_interface(zend_class_entry *ce) { // TODO: Add known interned strings instead? ce->interface_names[ce->num_interfaces - 1].name = ZSTR_INIT_LITERAL("Stringable", 0); - ce->interface_names[ce->num_interfaces - 1].lc_name = - ZSTR_INIT_LITERAL("stringable", 0); } +static void zend_check_magic_method_name_case(const zend_class_entry *ce, const zend_string *name) /* {{{ */ +{ + static const char *const magic_names[] = { + ZEND_CONSTRUCTOR_FUNC_NAME, + ZEND_DESTRUCTOR_FUNC_NAME, + ZEND_CLONE_FUNC_NAME, + ZEND_GET_FUNC_NAME, + ZEND_SET_FUNC_NAME, + ZEND_UNSET_FUNC_NAME, + ZEND_ISSET_FUNC_NAME, + ZEND_CALL_FUNC_NAME, + ZEND_CALLSTATIC_FUNC_NAME, + ZEND_TOSTRING_FUNC_NAME, + ZEND_INVOKE_FUNC_NAME, + ZEND_DEBUGINFO_FUNC_NAME, + "__serialize", + "__unserialize", + "__sleep", + "__wakeup", + "__set_state", + }; + + if (ZSTR_LEN(name) < 2 || ZSTR_VAL(name)[0] != '_' || ZSTR_VAL(name)[1] != '_') { + return; + } + + for (size_t i = 0; i < sizeof(magic_names) / sizeof(magic_names[0]); i++) { + size_t len = strlen(magic_names[i]); + if (ZSTR_LEN(name) == len + && zend_binary_strcasecmp(ZSTR_VAL(name), len, magic_names[i], len) == 0 + && memcmp(ZSTR_VAL(name), magic_names[i], len) != 0) { + zend_error_noreturn(E_COMPILE_ERROR, "Method %s::%s() must be spelled %s()", + ZSTR_VAL(ce->name), ZSTR_VAL(name), magic_names[i]); + } + } +} +/* }}} */ + static zend_string *zend_begin_method_decl(zend_op_array *op_array, zend_string *name, bool has_body) /* {{{ */ { zend_class_entry *ce = CG(active_class_entry); bool in_interface = (ce->ce_flags & ZEND_ACC_INTERFACE) != 0; uint32_t fn_flags = op_array->fn_flags; - zend_string *lcname; + zend_string *key_name; if (fn_flags & ZEND_ACC_READONLY) { zend_error(E_COMPILE_ERROR, "Cannot use 'readonly' as method modifier"); @@ -8601,21 +8593,24 @@ static zend_string *zend_begin_method_decl(zend_op_array *op_array, zend_string op_array->scope = ce; op_array->function_name = zend_string_copy(name); - lcname = zend_string_tolower(name); - lcname = zend_new_interned_string(lcname); + zend_check_magic_method_name_case(ce, name); - if (zend_hash_add_ptr(&ce->function_table, lcname, op_array) == NULL) { + key_name = zend_string_copy(name); + key_name = zend_new_interned_string(key_name); + + if (zend_hash_add_ptr(&ce->function_table, key_name, op_array) == NULL) { zend_error_noreturn(E_COMPILE_ERROR, "Cannot redeclare %s::%s()", ZSTR_VAL(ce->name), ZSTR_VAL(name)); } - zend_add_magic_method(ce, (zend_function *) op_array, lcname); - if (zend_string_equals_literal(lcname, ZEND_TOSTRING_FUNC_LCNAME) + zend_add_magic_method(ce, (zend_function *) op_array, key_name); + + if (zend_string_equals_literal(key_name, ZEND_TOSTRING_FUNC_NAME) && !(ce->ce_flags & ZEND_ACC_TRAIT)) { add_stringable_interface(ce); } - return lcname; + return key_name; } /* }}} */ @@ -8636,7 +8631,7 @@ enum func_decl_level { static zend_string *zend_begin_func_decl(znode *result, zend_op_array *op_array, const zend_ast_decl *decl, enum func_decl_level level) /* {{{ */ { - zend_string *unqualified_name, *name, *lcname; + zend_string *unqualified_name, *name, *key_name; zend_op *opline; if (op_array->fn_flags & ZEND_ACC_CLOSURE) { @@ -8681,29 +8676,29 @@ static zend_string *zend_begin_func_decl(znode *result, zend_op_array *op_array, op_array->function_name = name = zend_prefix_with_ns(unqualified_name); } - lcname = zend_string_tolower(name); + key_name = zend_string_copy(name); if (FC(imports_function)) { const zend_string *import_name = - zend_hash_find_ptr_lc(FC(imports_function), unqualified_name); - if (import_name && !zend_string_equals_ci(lcname, import_name)) { + zend_hash_find_ptr(FC(imports_function), unqualified_name); + if (import_name && !zend_string_equals(key_name, import_name)) { zend_error_noreturn(E_COMPILE_ERROR, "Cannot redeclare function %s() (previously declared as local import)", ZSTR_VAL(name)); } } - if (zend_string_equals_literal(lcname, "__autoload")) { + if (zend_string_equals_literal(key_name, "__autoload")) { zend_error_noreturn(E_COMPILE_ERROR, "__autoload() is no longer supported, use spl_autoload_register() instead"); } - if (zend_string_equals_literal_ci(unqualified_name, "assert")) { + if (zend_string_equals_literal(unqualified_name, "assert")) { zend_error(E_COMPILE_ERROR, "Defining a custom assert() function is not allowed, " "as the function has special semantics"); } - zend_register_seen_symbol(lcname, ZEND_SYMBOL_FUNCTION); + zend_register_seen_symbol(key_name, ZEND_SYMBOL_FUNCTION); switch (level) { case FUNC_DECL_LEVEL_NESTED: { uint32_t func_ref = zend_add_dynamic_func_def(op_array); @@ -8714,7 +8709,7 @@ static zend_string *zend_begin_func_decl(znode *result, zend_op_array *op_array, opline = get_next_op(); opline->opcode = ZEND_DECLARE_FUNCTION; opline->op1_type = IS_CONST; - LITERAL_STR(opline->op1, zend_string_copy(lcname)); + LITERAL_STR(opline->op1, zend_string_copy(key_name)); opline->op2.num = func_ref; } break; @@ -8724,7 +8719,7 @@ static zend_string *zend_begin_func_decl(znode *result, zend_op_array *op_array, /* Nothing to do. */ break; } - return lcname; + return key_name; } /* }}} */ @@ -8739,7 +8734,7 @@ static zend_op_array *zend_compile_func_decl_ex( zend_ast *stmt_ast = decl->child[2]; zend_ast *return_type_ast = decl->child[3]; bool is_method = decl->kind == ZEND_AST_METHOD; - zend_string *lcname = NULL; + zend_string *key_name = NULL; bool is_hook = decl->kind == ZEND_AST_PROPERTY_HOOK; zend_class_entry *orig_class_entry = CG(active_class_entry); @@ -8772,9 +8767,9 @@ static zend_op_array *zend_compile_func_decl_ex( op_array->function_name = zend_string_copy(decl->name); } else if (is_method) { bool has_body = stmt_ast != NULL; - lcname = zend_begin_method_decl(op_array, decl->name, has_body); + key_name = zend_begin_method_decl(op_array, decl->name, has_body); } else { - lcname = zend_begin_func_decl(result, op_array, decl, level); + key_name = zend_begin_func_decl(result, op_array, decl, level); if (decl->kind == ZEND_AST_ARROW_FUNC) { find_implicit_binds(&info, params_ast, stmt_ast); compile_implicit_lexical_binds(&info, result, op_array); @@ -8800,8 +8795,8 @@ static zend_op_array *zend_compile_func_decl_ex( const zend_attribute *override_attribute = zend_get_attribute_str( op_array->attributes, - "override", - sizeof("override")-1 + "Override", + sizeof("Override")-1 ); if (override_attribute) { @@ -8810,8 +8805,8 @@ static zend_op_array *zend_compile_func_decl_ex( const zend_attribute *deprecated_attribute = zend_get_attribute_str( op_array->attributes, - "deprecated", - sizeof("deprecated")-1 + "Deprecated", + sizeof("Deprecated")-1 ); if (deprecated_attribute) { @@ -8841,7 +8836,7 @@ static zend_op_array *zend_compile_func_decl_ex( } zend_compile_params(params_ast, return_type_ast, - is_method && zend_string_equals_literal(lcname, ZEND_TOSTRING_FUNC_LCNAME) ? IS_STRING : 0); + is_method && zend_string_equals_literal(key_name, ZEND_TOSTRING_FUNC_NAME) ? IS_STRING : 0); if (CG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR) { zend_mark_function_as_generator(); zend_emit_op(NULL, ZEND_GENERATOR_CREATE, NULL, NULL); @@ -8894,12 +8889,12 @@ static zend_op_array *zend_compile_func_decl_ex( if (is_method) { CG(zend_lineno) = decl->start_lineno; zend_check_magic_method_implementation( - CG(active_class_entry), (zend_function *) op_array, lcname, E_COMPILE_ERROR); + CG(active_class_entry), (zend_function *) op_array, key_name, E_COMPILE_ERROR); } else if (level == FUNC_DECL_LEVEL_TOPLEVEL) { /* Only register the function after a successful compile */ - if (UNEXPECTED(zend_hash_add_ptr(CG(function_table), lcname, op_array) == NULL)) { + if (UNEXPECTED(zend_hash_add_ptr(CG(function_table), key_name, op_array) == NULL)) { CG(zend_lineno) = decl->start_lineno; - do_bind_function_error(lcname, op_array, true); + do_bind_function_error(key_name, op_array, true); } } @@ -8916,11 +8911,11 @@ static zend_op_array *zend_compile_func_decl_ex( zend_stack_del_top(&CG(loop_var_stack)); if (level == FUNC_DECL_LEVEL_TOPLEVEL) { - zend_observer_function_declared_notify(op_array, lcname); + zend_observer_function_declared_notify(op_array, key_name); } - if (lcname != NULL) { - zend_string_release_ex(lcname, 0); + if (key_name != NULL) { + zend_string_release_ex(key_name, 0); } CG(active_op_array) = orig_op_array; @@ -9261,7 +9256,7 @@ static void zend_compile_prop_decl(zend_ast *ast, zend_ast *type_ast, uint32_t f if (attr_ast) { zend_compile_attributes(&info->attributes, attr_ast, 0, ZEND_ATTRIBUTE_TARGET_PROPERTY, 0); - const zend_attribute *override_attribute = zend_get_attribute_str(info->attributes, "override", sizeof("override")-1); + const zend_attribute *override_attribute = zend_get_attribute_str(info->attributes, "Override", sizeof("Override")-1); if (override_attribute) { info->flags |= ZEND_ACC_OVERRIDE; } @@ -9343,7 +9338,7 @@ static void zend_compile_class_const_decl(zend_ast *ast, uint32_t flags, zend_as if (attr_ast) { zend_compile_attributes(&c->attributes, attr_ast, 0, ZEND_ATTRIBUTE_TARGET_CLASS_CONST, 0); - const zend_attribute *deprecated = zend_get_attribute_str(c->attributes, "deprecated", sizeof("deprecated")-1); + const zend_attribute *deprecated = zend_get_attribute_str(c->attributes, "Deprecated", sizeof("Deprecated")-1); if (deprecated) { ZEND_CLASS_CONST_FLAGS(c) |= ZEND_ACC_DEPRECATED; @@ -9446,7 +9441,6 @@ static void zend_compile_use_trait(const zend_ast *ast) /* {{{ */ ce->trait_names[ce->num_traits].name = zend_resolve_const_class_name_reference(trait_ast, "trait name"); - ce->trait_names[ce->num_traits].lc_name = zend_string_tolower(ce->trait_names[ce->num_traits].name); ce->num_traits++; } @@ -9482,7 +9476,6 @@ static void zend_compile_implements(zend_ast *ast) /* {{{ */ zend_ast *class_ast = list->child[i]; interface_names[i].name = zend_resolve_const_class_name_reference(class_ast, "interface name"); - interface_names[i].lc_name = zend_string_tolower(interface_names[i].name); } ce->num_interfaces = list->children; @@ -9537,7 +9530,7 @@ static void zend_compile_class_decl(znode *result, const zend_ast *ast, bool top zend_ast *implements_ast = decl->child[1]; zend_ast *stmt_ast = decl->child[2]; zend_ast *enum_backing_type_ast = decl->child[4]; - zend_string *name, *lcname; + zend_string *name, *key_name; zend_class_entry *ce = zend_arena_alloc(&CG(arena), sizeof(zend_class_entry)); zend_op *opline; @@ -9561,30 +9554,31 @@ static void zend_compile_class_decl(znode *result, const zend_ast *ast, bool top zend_assert_valid_class_name(unqualified_name, type); name = zend_prefix_with_ns(unqualified_name); name = zend_new_interned_string(name); - lcname = zend_string_tolower(name); + /* Use canonical name as key — class table is now case-sensitive. */ + key_name = zend_string_copy(name); if (FC(imports)) { zend_string *import_name = - zend_hash_find_ptr_lc(FC(imports), unqualified_name); - if (import_name && !zend_string_equals_ci(lcname, import_name)) { + zend_hash_find_ptr(FC(imports), unqualified_name); + if (import_name && !zend_string_equals(key_name, import_name)) { zend_error_noreturn(E_COMPILE_ERROR, "Cannot redeclare class %s " "(previously declared as local import)", ZSTR_VAL(name)); } } - zend_register_seen_symbol(lcname, ZEND_SYMBOL_CLASS); + zend_register_seen_symbol(key_name, ZEND_SYMBOL_CLASS); } else { /* Find an anon class name that is not in use yet. */ name = NULL; - lcname = NULL; + key_name = NULL; do { zend_tmp_string_release(name); - zend_tmp_string_release(lcname); + zend_tmp_string_release(key_name); name = zend_generate_anon_class_name(decl); - lcname = zend_string_tolower(name); - } while (zend_hash_exists(CG(class_table), lcname)); + key_name = zend_string_copy(name); + } while (zend_hash_exists(CG(class_table), key_name)); } - lcname = zend_new_interned_string(lcname); + key_name = zend_new_interned_string(key_name); ce->type = ZEND_USER_CLASS; ce->name = name; @@ -9661,21 +9655,21 @@ static void zend_compile_class_decl(znode *result, const zend_ast *ast, bool top if (toplevel) { if (extends_ast) { zend_class_entry *parent_ce = zend_lookup_class_ex( - ce->parent_name, NULL, ZEND_FETCH_CLASS_NO_AUTOLOAD); + ce->parent_name, ZEND_FETCH_CLASS_NO_AUTOLOAD); if (parent_ce && !zend_compile_ignore_class(parent_ce, ce->info.user.filename)) { - if (zend_try_early_bind(ce, parent_ce, lcname, NULL)) { - zend_string_release(lcname); + if (zend_try_early_bind(ce, parent_ce, key_name, NULL)) { + zend_string_release(key_name); return; } } - } else if (EXPECTED(zend_hash_add_ptr(CG(class_table), lcname, ce) != NULL)) { - zend_string_release(lcname); + } else if (EXPECTED(zend_hash_add_ptr(CG(class_table), key_name, ce) != NULL)) { + zend_string_release(key_name); zend_build_properties_info_table(ce); zend_inheritance_check_override(ce); ce->ce_flags |= ZEND_ACC_LINKED; - zend_observer_class_linked_notify(ce, lcname); + zend_observer_class_linked_notify(ce, key_name); return; } else { goto link_unbound; @@ -9692,26 +9686,25 @@ static void zend_compile_class_decl(znode *result, const zend_ast *ast, bool top opline = get_next_op(); if (ce->parent_name) { - /* Lowercased parent name */ - zend_string *lc_parent_name = zend_string_tolower(ce->parent_name); + /* Parent name in canonical case (class table is now case-sensitive). */ opline->op2_type = IS_CONST; - LITERAL_STR(opline->op2, lc_parent_name); + LITERAL_STR(opline->op2, zend_string_copy(ce->parent_name)); } opline->op1_type = IS_CONST; - /* It's possible that `lcname` is not an interned string because it was not yet in the interned string table. - * However, by this point another thread may have caused `lcname` to be added in the interned string table. - * This will cause `lcname` to get freed once it is found in the interned string table. If we were to use - * LITERAL_STR() here we would not change the `lcname` pointer to the new value, and it would point to the - * now-freed string. This will cause issues when we use `lcname` in the code below. We solve this by using + /* It's possible that `key_name` is not an interned string because it was not yet in the interned string table. + * However, by this point another thread may have caused `key_name` to be added in the interned string table. + * This will cause `key_name` to get freed once it is found in the interned string table. If we were to use + * LITERAL_STR() here we would not change the `key_name` pointer to the new value, and it would point to the + * now-freed string. This will cause issues when we use `key_name` in the code below. We solve this by using * zend_add_literal_string() which gives us the new value. */ - opline->op1.constant = zend_add_literal_string(&lcname); + opline->op1.constant = zend_add_literal_string(&key_name); if (decl->flags & ZEND_ACC_ANON_CLASS) { opline->opcode = ZEND_DECLARE_ANON_CLASS; opline->extended_value = zend_alloc_cache_slot(); zend_make_var_result(result, opline); - if (!zend_hash_add_ptr(CG(class_table), lcname, ce)) { + if (!zend_hash_add_ptr(CG(class_table), key_name, ce)) { /* We checked above that the class name is not used. This really shouldn't happen. */ zend_error_noreturn(E_ERROR, "Runtime definition key collision for %s. This is a bug", ZSTR_VAL(name)); @@ -9721,10 +9714,10 @@ static void zend_compile_class_decl(znode *result, const zend_ast *ast, bool top zend_string *key = NULL; do { zend_tmp_string_release(key); - key = zend_build_runtime_definition_key(lcname, decl->start_lineno); + key = zend_build_runtime_definition_key(key_name, decl->start_lineno); } while (!zend_hash_add_ptr(CG(class_table), key, ce)); - /* RTD key is placed after lcname literal in op1 */ + /* RTD key is placed after key_name literal in op1 */ zend_add_literal_string(&key); opline->opcode = ZEND_DECLARE_CLASS; @@ -9806,7 +9799,7 @@ static void zend_compile_enum_case(zend_ast *ast) if (attr_ast) { zend_compile_attributes(&c->attributes, attr_ast, 0, ZEND_ATTRIBUTE_TARGET_CLASS_CONST, 0); - zend_attribute *deprecated = zend_get_attribute_str(c->attributes, "deprecated", sizeof("deprecated")-1); + zend_attribute *deprecated = zend_get_attribute_str(c->attributes, "Deprecated", sizeof("Deprecated")-1); if (deprecated) { ZEND_CLASS_CONST_FLAGS(c) |= ZEND_ACC_DEPRECATED; @@ -9860,7 +9853,7 @@ static char *zend_get_use_type_str(uint32_t type) /* {{{ */ static void zend_check_already_in_use(uint32_t type, const zend_string *old_name, const zend_string *new_name, const zend_string *check_name) /* {{{ */ { - if (zend_string_equals_ci(old_name, check_name)) { + if (zend_string_equals(old_name, check_name)) { return; } @@ -9876,14 +9869,13 @@ static void zend_compile_use(zend_ast *ast) /* {{{ */ zend_string *current_ns = FC(current_namespace); uint32_t type = ast->attr; HashTable *current_import = zend_get_import_ht(type); - bool case_sensitive = type == ZEND_SYMBOL_CONST; for (i = 0; i < list->children; ++i) { const zend_ast *use_ast = list->child[i]; zend_ast *old_name_ast = use_ast->child[0]; zend_ast *new_name_ast = use_ast->child[1]; zend_string *old_name = zend_ast_get_str(old_name_ast); - zend_string *new_name, *lookup_name; + zend_string *new_name; if (new_name_ast) { new_name = zend_string_copy(zend_ast_get_str(new_name_ast)); @@ -9903,12 +9895,6 @@ static void zend_compile_use(zend_ast *ast) /* {{{ */ } } - if (case_sensitive) { - lookup_name = zend_string_copy(new_name); - } else { - lookup_name = zend_string_tolower(new_name); - } - if (type == ZEND_SYMBOL_CLASS && zend_is_reserved_class_name(new_name)) { zend_error_noreturn(E_COMPILE_ERROR, "Cannot use %s as %s because '%s' " "is a special class name", ZSTR_VAL(old_name), ZSTR_VAL(new_name), ZSTR_VAL(new_name)); @@ -9916,27 +9902,26 @@ static void zend_compile_use(zend_ast *ast) /* {{{ */ if (current_ns) { zend_string *ns_name = zend_string_alloc(ZSTR_LEN(current_ns) + 1 + ZSTR_LEN(new_name), 0); - zend_str_tolower_copy(ZSTR_VAL(ns_name), ZSTR_VAL(current_ns), ZSTR_LEN(current_ns)); + memcpy(ZSTR_VAL(ns_name), ZSTR_VAL(current_ns), ZSTR_LEN(current_ns)); ZSTR_VAL(ns_name)[ZSTR_LEN(current_ns)] = '\\'; - memcpy(ZSTR_VAL(ns_name) + ZSTR_LEN(current_ns) + 1, ZSTR_VAL(lookup_name), ZSTR_LEN(lookup_name) + 1); + memcpy(ZSTR_VAL(ns_name) + ZSTR_LEN(current_ns) + 1, ZSTR_VAL(new_name), ZSTR_LEN(new_name) + 1); if (zend_have_seen_symbol(ns_name, type)) { zend_check_already_in_use(type, old_name, new_name, ns_name); } zend_string_efree(ns_name); - } else if (zend_have_seen_symbol(lookup_name, type)) { - zend_check_already_in_use(type, old_name, new_name, lookup_name); + } else if (zend_have_seen_symbol(new_name, type)) { + zend_check_already_in_use(type, old_name, new_name, new_name); } zend_string_addref(old_name); old_name = zend_new_interned_string(old_name); - if (!zend_hash_add_ptr(current_import, lookup_name, old_name)) { + if (!zend_hash_add_ptr(current_import, new_name, old_name)) { zend_error_noreturn(E_COMPILE_ERROR, "Cannot use%s %s as %s because the name " "is already in use", zend_get_use_type_str(type), ZSTR_VAL(old_name), ZSTR_VAL(new_name)); } - zend_string_release_ex(lookup_name, 0); zend_string_release_ex(new_name, 0); } } @@ -11084,7 +11069,7 @@ static void zend_compile_instanceof(znode *result, zend_ast *ast) /* {{{ */ if (class_node.op_type == IS_CONST) { opline->op2_type = IS_CONST; - opline->op2.constant = zend_add_class_name_literal( + opline->op2.constant = zend_add_name_literal( Z_STR(class_node.u.constant)); opline->extended_value = zend_alloc_cache_slot(); } else { diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 2351882a560d..27bf5f4c4389 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -940,9 +940,9 @@ uint32_t zend_modifier_list_to_flags(zend_modifier_target target, zend_ast *modi bool zend_handle_encoding_declaration(zend_ast *ast); ZEND_API zend_class_entry *zend_bind_class_in_slot( - zval *class_table_slot, const zval *lcname, zend_string *lc_parent_name); -ZEND_API zend_result do_bind_function(zend_function *func, const zval *lcname); -ZEND_API zend_result do_bind_class(zval *lcname, zend_string *lc_parent_name); + zval *class_table_slot, const zval *name_key); +ZEND_API zend_result do_bind_function(zend_function *func, const zval *name_key); +ZEND_API zend_result do_bind_class(zval *name_key); void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline); @@ -1250,12 +1250,9 @@ END_EXTERN_C() #define ZEND_ISSET_FUNC_NAME "__isset" #define ZEND_CALL_FUNC_NAME "__call" #define ZEND_CALLSTATIC_FUNC_NAME "__callStatic" -#define ZEND_CALLSTATIC_FUNC_LCNAME "__callstatic" #define ZEND_TOSTRING_FUNC_NAME "__toString" -#define ZEND_TOSTRING_FUNC_LCNAME "__tostring" #define ZEND_INVOKE_FUNC_NAME "__invoke" #define ZEND_DEBUGINFO_FUNC_NAME "__debugInfo" -#define ZEND_DEBUGINFO_FUNC_LCNAME "__debuginfo" #define ZEND_SLEEP_FUNC_NAME "__sleep" #define ZEND_WAKEUP_FUNC_NAME "__wakeup" #define ZEND_SERIALIZE_FUNC_NAME "__serialize" diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c index 18292203bee9..a6a9494552a1 100644 --- a/Zend/zend_constants.c +++ b/Zend/zend_constants.c @@ -439,39 +439,19 @@ ZEND_API zval *zend_get_constant_ex(zend_string *cname, const zend_class_entry * return ret_constant; } - /* non-class constant */ - if ((colon = zend_memrchr(name, '\\', name_len)) != NULL) { - /* compound constant name */ - int prefix_len = colon - name; - size_t const_name_len = name_len - prefix_len - 1; - const char *constant_name = colon + 1; - char *lcname; - size_t lcname_len; - ALLOCA_FLAG(use_heap) - - /* Lowercase the namespace portion */ - lcname_len = prefix_len + 1 + const_name_len; - lcname = do_alloca(lcname_len + 1, use_heap); - zend_str_tolower_copy(lcname, name, prefix_len); - - lcname[prefix_len] = '\\'; - memcpy(lcname + prefix_len + 1, constant_name, const_name_len + 1); - - c = zend_hash_str_find_ptr(EG(zend_constants), lcname, lcname_len); - free_alloca(lcname, use_heap); - - if (!c) { - if (flags & IS_CONSTANT_UNQUALIFIED_IN_NAMESPACE) { - /* name requires runtime resolution, need to check non-namespaced name */ - c = zend_get_constant_str_impl(constant_name, const_name_len); - } - } + /* non-class constant — the namespace portion is case-sensitive */ + if (cname) { + c = zend_get_constant_ptr(cname); } else { - if (cname) { - c = zend_get_constant_ptr(cname); - } else { - c = zend_get_constant_str_impl(name, name_len); - } + c = zend_get_constant_str_impl(name, name_len); + } + + if (!c && (flags & IS_CONSTANT_UNQUALIFIED_IN_NAMESPACE) + && (colon = zend_memrchr(name, '\\', name_len)) != NULL) { + /* name requires runtime resolution, need to check non-namespaced name */ + const char *constant_name = colon + 1; + size_t const_name_len = name_len - (constant_name - name); + c = zend_get_constant_str_impl(constant_name, const_name_len); } if (!c) { @@ -509,7 +489,6 @@ static void* zend_hash_add_constant(HashTable *ht, zend_string *key, const zend_ ZEND_API zend_constant *zend_register_constant(zend_constant *c) { - zend_string *lowercase_name = NULL; zend_string *name; zend_constant *ret = NULL; bool persistent = (ZEND_CONSTANT_FLAGS(c) & CONST_PERSISTENT) != 0; @@ -518,15 +497,9 @@ ZEND_API zend_constant *zend_register_constant(zend_constant *c) printf("Registering constant for module %d\n", c->module_number); #endif - const char *slash = strrchr(ZSTR_VAL(c->name), '\\'); - if (slash) { - lowercase_name = zend_string_init(ZSTR_VAL(c->name), ZSTR_LEN(c->name), persistent); - zend_str_tolower(ZSTR_VAL(lowercase_name), slash - ZSTR_VAL(c->name)); - lowercase_name = zend_new_interned_string(lowercase_name); - name = lowercase_name; - } else { - name = c->name; - } + /* Constants are stored under their canonical name — the namespace + * portion is case-sensitive like everything else. */ + name = c->name; c->filename = NULL; if (ZEND_CONSTANT_MODULE_NUMBER(c) == PHP_USER_CONSTANT) { @@ -553,9 +526,6 @@ ZEND_API zend_constant *zend_register_constant(zend_constant *c) zval_ptr_dtor_nogc(&c->value); } } - if (lowercase_name) { - zend_string_release(lowercase_name); - } return ret; } @@ -565,8 +535,8 @@ void zend_constant_add_attributes(zend_constant *c, HashTable *attributes) { zend_attribute *deprecated_attribute = zend_get_attribute_str( c->attributes, - "deprecated", - strlen("deprecated") + "Deprecated", + strlen("Deprecated") ); if (deprecated_attribute) { diff --git a/Zend/zend_enum.c b/Zend/zend_enum.c index 7f0b58575387..9b2d53e2e757 100644 --- a/Zend/zend_enum.c +++ b/Zend/zend_enum.c @@ -194,11 +194,9 @@ void zend_enum_add_interfaces(zend_class_entry *ce) ce->interface_names = erealloc(ce->interface_names, sizeof(zend_class_name) * ce->num_interfaces); ce->interface_names[num_interfaces_before].name = zend_string_copy(zend_ce_unit_enum->name); - ce->interface_names[num_interfaces_before].lc_name = ZSTR_INIT_LITERAL("unitenum", 0); if (ce->enum_backing_type != IS_UNDEF) { ce->interface_names[num_interfaces_before + 1].name = zend_string_copy(zend_ce_backed_enum->name); - ce->interface_names[num_interfaces_before + 1].lc_name = ZSTR_INIT_LITERAL("backedenum", 0); } ce->default_object_handlers = &zend_enum_object_handlers; @@ -478,7 +476,7 @@ void zend_enum_register_funcs(zend_class_entry *ce) try_from_function->num_args = 1; try_from_function->required_num_args = 1; try_from_function->arg_info = zarginfo_class_BackedEnum_tryFrom + 1; - zend_enum_register_func(ce, ZEND_STR_TRYFROM_LOWERCASE, try_from_function); + zend_enum_register_func(ce, ZEND_STR_TRYFROM, try_from_function); } } diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index a1301b8c20b2..a8d60fae3c9f 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -717,7 +717,7 @@ ZEND_METHOD(Exception, __toString) base_ce = i_get_exception_base(Z_OBJ_P(exception)); /* As getTraceAsString method is final we can grab it once */ - zend_function *getTraceAsString = zend_hash_str_find_ptr(&base_ce->function_table, ZEND_STRL("gettraceasstring")); + zend_function *getTraceAsString = zend_hash_str_find_ptr(&base_ce->function_table, ZEND_STRL("getTraceAsString")); ZEND_ASSERT(getTraceAsString && "Method getTraceAsString must exist"); diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 1b28ce25fe37..ef7997277d32 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -967,7 +967,7 @@ static const zend_class_entry *resolve_single_class_type(zend_string *name, cons } else if (zend_string_equals_ci(name, ZSTR_KNOWN(ZEND_STR_PARENT))) { return self_ce->parent; } else { - return zend_lookup_class_ex(name, NULL, ZEND_FETCH_CLASS_NO_AUTOLOAD); + return zend_lookup_class_ex(name, ZEND_FETCH_CLASS_NO_AUTOLOAD); } } @@ -978,7 +978,7 @@ static zend_always_inline const zend_class_entry *zend_ce_from_type( if (ZSTR_HAS_CE_CACHE(name)) { zend_class_entry *ce = ZSTR_GET_CE_CACHE(name); if (!ce) { - ce = zend_lookup_class_ex(name, NULL, ZEND_FETCH_CLASS_NO_AUTOLOAD); + ce = zend_lookup_class_ex(name, ZEND_FETCH_CLASS_NO_AUTOLOAD); } return ce; } @@ -1118,7 +1118,7 @@ static zend_always_inline zend_class_entry *zend_fetch_ce_from_type( if (ZSTR_HAS_CE_CACHE(name)) { ce = ZSTR_GET_CE_CACHE(name); if (!ce) { - ce = zend_lookup_class_ex(name, NULL, ZEND_FETCH_CLASS_NO_AUTOLOAD); + ce = zend_lookup_class_ex(name, ZEND_FETCH_CLASS_NO_AUTOLOAD); if (UNEXPECTED(!ce)) { /* Cannot resolve */ return NULL; @@ -1808,7 +1808,7 @@ ZEND_COLD static zend_result ZEND_FASTCALL get_deprecation_suffix_from_attribute return SUCCESS; } - zend_attribute *deprecated = zend_get_attribute_str(attributes, "deprecated", sizeof("deprecated")-1); + zend_attribute *deprecated = zend_get_attribute_str(attributes, "Deprecated", sizeof("Deprecated")-1); if (!deprecated) { return SUCCESS; @@ -1899,7 +1899,7 @@ ZEND_COLD static zend_result ZEND_FASTCALL get_nodiscard_suffix_from_attribute(H return SUCCESS; } - zend_attribute *nodiscard = zend_get_attribute_str(attributes, "nodiscard", sizeof("nodiscard")-1); + zend_attribute *nodiscard = zend_get_attribute_str(attributes, "NoDiscard", sizeof("NoDiscard")-1); if (!nodiscard) { return SUCCESS; @@ -3746,7 +3746,7 @@ static zend_never_inline zval* zend_fetch_static_property_address_ex(zend_proper ZEND_ASSERT(op1_type != IS_CONST || CACHED_PTR(cache_slot) == NULL); if (EXPECTED((ce = CACHED_PTR(cache_slot)) == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(class_name), Z_STR_P(class_name + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(class_name), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { FREE_OP(op1_type, opline->op1.var); return NULL; @@ -5097,7 +5097,7 @@ static zend_never_inline zend_execute_data *zend_init_dynamic_call_string(zend_s zend_function *fbc; zval *func; zend_class_entry *called_scope; - zend_string *lcname; + zend_string *name; const char *colon; if ((colon = zend_memrchr(ZSTR_VAL(function), ':', ZSTR_LEN(function))) != NULL && @@ -5108,11 +5108,11 @@ static zend_never_inline zend_execute_data *zend_init_dynamic_call_string(zend_s size_t cname_length = colon - ZSTR_VAL(function) - 1; size_t mname_length = ZSTR_LEN(function) - cname_length - (sizeof("::") - 1); - lcname = zend_string_init(ZSTR_VAL(function), cname_length, 0); + name = zend_string_init(ZSTR_VAL(function), cname_length, 0); - called_scope = zend_fetch_class_by_name(lcname, NULL, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + called_scope = zend_fetch_class_by_name(name, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(called_scope == NULL)) { - zend_string_release_ex(lcname, 0); + zend_string_release_ex(name, 0); return NULL; } @@ -5127,12 +5127,12 @@ static zend_never_inline zend_execute_data *zend_init_dynamic_call_string(zend_s if (EXPECTED(!EG(exception))) { zend_undefined_method(called_scope, mname); } - zend_string_release_ex(lcname, 0); + zend_string_release_ex(name, 0); zend_string_release_ex(mname, 0); return NULL; } - zend_string_release_ex(lcname, 0); + zend_string_release_ex(name, 0); zend_string_release_ex(mname, 0); if (UNEXPECTED(!(fbc->common.fn_flags & ZEND_ACC_STATIC))) { @@ -5148,17 +5148,16 @@ static zend_never_inline zend_execute_data *zend_init_dynamic_call_string(zend_s } } else { if (ZSTR_VAL(function)[0] == '\\') { - lcname = zend_string_alloc(ZSTR_LEN(function) - 1, 0); - zend_str_tolower_copy(ZSTR_VAL(lcname), ZSTR_VAL(function) + 1, ZSTR_LEN(function) - 1); + name = zend_string_init(ZSTR_VAL(function) + 1, ZSTR_LEN(function) - 1, 0); + func = zend_hash_find(EG(function_table), name); + zend_string_release_ex(name, 0); } else { - lcname = zend_string_tolower(function); + func = zend_hash_find(EG(function_table), function); } - if (UNEXPECTED((func = zend_hash_find(EG(function_table), lcname)) == NULL)) { + if (UNEXPECTED(func == NULL)) { zend_throw_error(NULL, "Call to undefined function %s()", ZSTR_VAL(function)); - zend_string_release_ex(lcname, 0); return NULL; } - zend_string_release_ex(lcname, 0); fbc = Z_FUNC_P(func); if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!RUN_TIME_CACHE(&fbc->op_array))) { @@ -5246,7 +5245,7 @@ static zend_never_inline zend_execute_data *zend_init_dynamic_call_array(const z } if (Z_TYPE_P(obj) == IS_STRING) { - zend_class_entry *called_scope = zend_fetch_class_by_name(Z_STR_P(obj), NULL, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + zend_class_entry *called_scope = zend_fetch_class_by_name(Z_STR_P(obj), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(called_scope == NULL)) { return NULL; diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index ba48b19bcfe1..f7e8ed0d7ea0 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -33,8 +33,7 @@ struct _zend_fcall_info; ZEND_API extern void (*zend_execute_ex)(zend_execute_data *execute_data); ZEND_API extern void (*zend_execute_internal)(zend_execute_data *execute_data, zval *return_value); -/* The lc_name may be stack allocated! */ -ZEND_API extern zend_class_entry *(*zend_autoload)(zend_string *name, zend_string *lc_name); +ZEND_API extern zend_class_entry *(*zend_autoload)(zend_string *name); void init_executor(void); void shutdown_executor(void); @@ -49,7 +48,7 @@ ZEND_API void execute_ex(zend_execute_data *execute_data); ZEND_API void execute_internal(zend_execute_data *execute_data, zval *return_value); ZEND_API bool zend_is_valid_class_name(const zend_string *name); ZEND_API zend_class_entry *zend_lookup_class(zend_string *name); -ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, zend_string *lcname, uint32_t flags); +ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, uint32_t flags); ZEND_API zend_class_entry *zend_get_called_scope(const zend_execute_data *ex); ZEND_API zend_object *zend_get_this_object(const zend_execute_data *ex); ZEND_API zend_result zend_eval_string(const char *str, zval *retval_ptr, const char *string_name); @@ -478,7 +477,7 @@ ZEND_API void zend_unset_timeout(void); ZEND_API ZEND_NORETURN void ZEND_FASTCALL zend_timeout(void); ZEND_API zend_class_entry *zend_fetch_class(zend_string *class_name, uint32_t fetch_type); ZEND_API zend_class_entry *zend_fetch_class_with_scope(zend_string *class_name, uint32_t fetch_type, zend_class_entry *scope); -ZEND_API zend_class_entry *zend_fetch_class_by_name(zend_string *class_name, zend_string *lcname, uint32_t fetch_type); +ZEND_API zend_class_entry *zend_fetch_class_by_name(zend_string *class_name, uint32_t fetch_type); ZEND_API zend_function * ZEND_FASTCALL zend_fetch_function(zend_string *name); ZEND_API zend_function * ZEND_FASTCALL zend_fetch_function_str(const char *name, size_t len); diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 71e0c56a51c8..5959ac389f1c 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -50,7 +50,7 @@ ZEND_API void (*zend_execute_ex)(zend_execute_data *execute_data); ZEND_API void (*zend_execute_internal)(zend_execute_data *execute_data, zval *return_value); -ZEND_API zend_class_entry *(*zend_autoload)(zend_string *name, zend_string *lc_name); +ZEND_API zend_class_entry *(*zend_autoload)(zend_string *name); #ifdef ZEND_WIN32 ZEND_TLS HANDLE tq_timer = NULL; @@ -1176,12 +1176,12 @@ ZEND_API bool zend_is_valid_class_name(const zend_string *name) { return 1; } -ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, zend_string *key, uint32_t flags) /* {{{ */ +ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, uint32_t flags) /* {{{ */ { zend_class_entry *ce = NULL; zval *zv; - zend_string *lc_name; - zend_string *autoload_name; + zend_string *lookup_name; + bool release_lookup_name = false; uint32_t ce_cache = 0; if (ZSTR_HAS_CE_CACHE(name) && ZSTR_VALID_CE_CACHE(name)) { @@ -1192,25 +1192,21 @@ ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, zend_string * } } - if (key) { - lc_name = key; - } else { - if (!ZSTR_LEN(name)) { - return NULL; - } + if (!ZSTR_LEN(name)) { + return NULL; + } - if (ZSTR_VAL(name)[0] == '\\') { - lc_name = zend_string_alloc(ZSTR_LEN(name) - 1, 0); - zend_str_tolower_copy(ZSTR_VAL(lc_name), ZSTR_VAL(name) + 1, ZSTR_LEN(name) - 1); - } else { - lc_name = zend_string_tolower(name); - } + if (UNEXPECTED(ZSTR_VAL(name)[0] == '\\')) { + lookup_name = zend_string_init(ZSTR_VAL(name) + 1, ZSTR_LEN(name) - 1, 0); + release_lookup_name = true; + } else { + lookup_name = name; } - zv = zend_hash_find(EG(class_table), lc_name); + zv = zend_hash_find(EG(class_table), lookup_name); if (zv) { - if (!key) { - zend_string_release_ex(lc_name, 0); + if (release_lookup_name) { + zend_string_release_ex(lookup_name, 0); } ce = (zend_class_entry*)Z_PTR_P(zv); if (UNEXPECTED(!(ce->ce_flags & ZEND_ACC_LINKED))) { @@ -1237,51 +1233,34 @@ ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, zend_string * /* The compiler is not-reentrant. Make sure we autoload only during run-time. */ if ((flags & ZEND_FETCH_CLASS_NO_AUTOLOAD) || zend_is_compiling()) { - if (!key) { - zend_string_release_ex(lc_name, 0); - } - return NULL; + goto fail; } if (!zend_autoload) { - if (!key) { - zend_string_release_ex(lc_name, 0); - } - return NULL; + goto fail; } /* Verify class name before passing it to the autoloader. */ - if (!key && !ZSTR_HAS_CE_CACHE(name) && !zend_is_valid_class_name(name)) { - zend_string_release_ex(lc_name, 0); - return NULL; - } - - if (zend_hash_add_empty_element(&EG(autoload_current_classnames), lc_name) == NULL) { - if (!key) { - zend_string_release_ex(lc_name, 0); - } - return NULL; + if (!ZSTR_HAS_CE_CACHE(name) && !zend_is_valid_class_name(lookup_name)) { + goto fail; } - if (ZSTR_VAL(name)[0] == '\\') { - autoload_name = zend_string_init(ZSTR_VAL(name) + 1, ZSTR_LEN(name) - 1, 0); - } else { - autoload_name = zend_string_copy(name); + if (zend_hash_add_empty_element(&EG(autoload_current_classnames), lookup_name) == NULL) { + goto fail; } zend_string *previous_filename = EG(filename_override); zend_long previous_lineno = EG(lineno_override); EG(filename_override) = NULL; EG(lineno_override) = -1; - ce = zend_autoload(autoload_name, lc_name); + ce = zend_autoload(lookup_name); EG(filename_override) = previous_filename; EG(lineno_override) = previous_lineno; - zend_string_release_ex(autoload_name, 0); - zend_hash_del(&EG(autoload_current_classnames), lc_name); + zend_hash_del(&EG(autoload_current_classnames), lookup_name); - if (!key) { - zend_string_release_ex(lc_name, 0); + if (release_lookup_name) { + zend_string_release_ex(lookup_name, 0); } if (ce) { ZEND_ASSERT(!CG(in_compilation)); @@ -1290,12 +1269,18 @@ ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, zend_string * } } return ce; + +fail: + if (release_lookup_name) { + zend_string_release_ex(lookup_name, 0); + } + return NULL; } /* }}} */ ZEND_API zend_class_entry *zend_lookup_class(zend_string *name) /* {{{ */ { - return zend_lookup_class_ex(name, NULL, 0); + return zend_lookup_class_ex(name, 0); } /* }}} */ @@ -1748,7 +1733,7 @@ zend_class_entry *zend_fetch_class(zend_string *class_name, uint32_t fetch_type) break; } - ce = zend_lookup_class_ex(class_name, NULL, fetch_type); + ce = zend_lookup_class_ex(class_name, fetch_type); if (!ce) { report_class_fetch_error(class_name, fetch_type); return NULL; @@ -1782,7 +1767,7 @@ zend_class_entry *zend_fetch_class_with_scope( default: ZEND_UNREACHABLE(); } - ce = zend_lookup_class_ex(class_name, NULL, fetch_type); + ce = zend_lookup_class_ex(class_name, fetch_type); if (!ce) { report_class_fetch_error(class_name, fetch_type); return NULL; @@ -1790,9 +1775,9 @@ zend_class_entry *zend_fetch_class_with_scope( return ce; } -zend_class_entry *zend_fetch_class_by_name(zend_string *class_name, zend_string *key, uint32_t fetch_type) /* {{{ */ +zend_class_entry *zend_fetch_class_by_name(zend_string *class_name, uint32_t fetch_type) /* {{{ */ { - zend_class_entry *ce = zend_lookup_class_ex(class_name, key, fetch_type); + zend_class_entry *ce = zend_lookup_class_ex(class_name, fetch_type); if (!ce) { report_class_fetch_error(class_name, fetch_type); return NULL; diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 8df6a5599d30..74681147724f 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -264,11 +264,7 @@ static zend_class_entry *lookup_class_ex( bool in_preload = CG(compiler_options) & ZEND_COMPILE_PRELOAD; if (UNEXPECTED(!EG(active) && !in_preload)) { - zend_string *lc_name = zend_string_tolower(name); - - ce = zend_hash_find_ptr(CG(class_table), lc_name); - - zend_string_release(lc_name); + ce = zend_hash_find_ptr(CG(class_table), name); if (register_unresolved && !ce) { zend_error_noreturn( @@ -280,7 +276,7 @@ static zend_class_entry *lookup_class_ex( } ce = zend_lookup_class_ex( - name, NULL, ZEND_FETCH_CLASS_ALLOW_UNLINKED | ZEND_FETCH_CLASS_NO_AUTOLOAD); + name, ZEND_FETCH_CLASS_ALLOW_UNLINKED | ZEND_FETCH_CLASS_NO_AUTOLOAD); if (!CG(in_compilation) || in_preload) { if (ce) { @@ -323,7 +319,7 @@ static bool unlinked_instanceof(const zend_class_entry *ce1, const zend_class_en if (ce1->ce_flags & ZEND_ACC_RESOLVED_PARENT) { parent_ce = ce1->parent; } else { - parent_ce = zend_lookup_class_ex(ce1->parent_name, NULL, + parent_ce = zend_lookup_class_ex(ce1->parent_name, ZEND_FETCH_CLASS_ALLOW_UNLINKED | ZEND_FETCH_CLASS_NO_AUTOLOAD); } @@ -347,7 +343,7 @@ static bool unlinked_instanceof(const zend_class_entry *ce1, const zend_class_en } else { for (i = 0; i < ce1->num_interfaces; i++) { const zend_class_entry *ce = zend_lookup_class_ex( - ce1->interface_names[i].name, ce1->interface_names[i].lc_name, + ce1->interface_names[i].name, ZEND_FETCH_CLASS_ALLOW_UNLINKED | ZEND_FETCH_CLASS_NO_AUTOLOAD); /* Avoid recursing if class implements itself. */ if (ce && ce != ce1 && unlinked_instanceof(ce, ce2)) { @@ -1073,8 +1069,8 @@ static void ZEND_COLD emit_incompatible_method_error( } else if (status == INHERITANCE_WARNING) { const zend_attribute *return_type_will_change_attribute = zend_get_attribute_str( child->common.attributes, - "returntypewillchange", - sizeof("returntypewillchange")-1 + "ReturnTypeWillChange", + sizeof("ReturnTypeWillChange")-1 ); if (!return_type_will_change_attribute) { @@ -2283,7 +2279,6 @@ static void zend_do_implement_interfaces(zend_class_entry *ce, zend_class_entry if (!(ce->ce_flags & ZEND_ACC_CACHED)) { for (i = 0; i < ce->num_interfaces; i++) { zend_string_release_ex(ce->interface_names[i].name, 0); - zend_string_release_ex(ce->interface_names[i].lc_name, 0); } efree(ce->interface_names); } @@ -2435,7 +2430,7 @@ static void zend_traits_check_private_final_inheritance(uint32_t original_fn_fla * already final. */ if (!(original_fn_flags & ZEND_ACC_FINAL) && (fn_copy->common.fn_flags & (ZEND_ACC_PRIVATE | ZEND_ACC_FINAL)) == (ZEND_ACC_PRIVATE | ZEND_ACC_FINAL) - && !zend_string_equals_literal_ci(name, ZEND_CONSTRUCTOR_FUNC_NAME)) { + && !zend_string_equals_literal(name, ZEND_CONSTRUCTOR_FUNC_NAME)) { zend_error(E_COMPILE_WARNING, "Private methods cannot be final as they are never overridden by other classes"); } } @@ -2466,9 +2461,7 @@ static void zend_traits_copy_functions(zend_string *fnname, zend_function *fn, z zend_traits_check_private_final_inheritance(fn->common.fn_flags, &fn_copy, alias->alias); - zend_string *lcname = zend_string_tolower(alias->alias); - zend_add_trait_method(ce, alias->alias, lcname, &fn_copy); - zend_string_release_ex(lcname, 0); + zend_add_trait_method(ce, alias->alias, alias->alias, &fn_copy); } alias_ptr++; alias = *alias_ptr; @@ -2530,8 +2523,7 @@ static void zend_traits_init_trait_structures(zend_class_entry *ce, zend_class_e size_t i, j = 0; zend_trait_precedence *cur_precedence; zend_trait_method_reference *cur_method_ref; - zend_string *lc_trait_name; - zend_string *lcname; + zend_string *method_name_key; HashTable **exclude_tables = NULL; zend_class_entry **aliases = NULL; zend_class_entry *trait; @@ -2545,17 +2537,15 @@ static void zend_traits_init_trait_structures(zend_class_entry *ce, zend_class_e while ((cur_precedence = precedences[i])) { /** Resolve classes for all precedence operations. */ cur_method_ref = &cur_precedence->trait_method; - lc_trait_name = zend_string_tolower(cur_method_ref->class_name); - trait = zend_hash_find_ptr(EG(class_table), lc_trait_name); - zend_string_release_ex(lc_trait_name, 0); + trait = zend_hash_find_ptr(EG(class_table), cur_method_ref->class_name); if (!trait || !(trait->ce_flags & ZEND_ACC_LINKED)) { zend_error_noreturn(E_COMPILE_ERROR, "Could not find trait %s", ZSTR_VAL(cur_method_ref->class_name)); } zend_check_trait_usage(ce, trait, traits); /** Ensure that the preferred method is actually available. */ - lcname = zend_string_tolower(cur_method_ref->method_name); - if (!zend_hash_exists(&trait->function_table, lcname)) { + method_name_key = cur_method_ref->method_name; + if (!zend_hash_exists(&trait->function_table, method_name_key)) { zend_error_noreturn(E_COMPILE_ERROR, "A precedence rule was defined for %s::%s but this method does not exist", ZSTR_VAL(trait->name), @@ -2574,9 +2564,7 @@ static void zend_traits_init_trait_structures(zend_class_entry *ce, zend_class_e zend_class_entry *exclude_ce; uint32_t trait_num; - lc_trait_name = zend_string_tolower(class_name); - exclude_ce = zend_hash_find_ptr(EG(class_table), lc_trait_name); - zend_string_release_ex(lc_trait_name, 0); + exclude_ce = zend_hash_find_ptr(EG(class_table), class_name); if (!exclude_ce || !(exclude_ce->ce_flags & ZEND_ACC_LINKED)) { zend_error_noreturn(E_COMPILE_ERROR, "Could not find trait %s", ZSTR_VAL(class_name)); } @@ -2585,7 +2573,7 @@ static void zend_traits_init_trait_structures(zend_class_entry *ce, zend_class_e ALLOC_HASHTABLE(exclude_tables[trait_num]); zend_hash_init(exclude_tables[trait_num], 0, NULL, NULL, 0); } - if (zend_hash_add_empty_element(exclude_tables[trait_num], lcname) == NULL) { + if (zend_hash_add_empty_element(exclude_tables[trait_num], cur_method_ref->method_name) == NULL) { zend_error_noreturn(E_COMPILE_ERROR, "Failed to evaluate a trait precedence (%s). Method of trait %s was defined to be excluded multiple times", ZSTR_VAL(precedences[i]->trait_method.method_name), ZSTR_VAL(exclude_ce->name)); } @@ -2600,7 +2588,6 @@ static void zend_traits_init_trait_structures(zend_class_entry *ce, zend_class_e ZSTR_VAL(trait->name)); } } - zend_string_release_ex(lcname, 0); i++; } ce->trait_precedences = precedences; @@ -2616,12 +2603,10 @@ static void zend_traits_init_trait_structures(zend_class_entry *ce, zend_class_e while (ce->trait_aliases[i]) { const zend_trait_alias *cur_alias = ce->trait_aliases[i]; cur_method_ref = &ce->trait_aliases[i]->trait_method; - lcname = zend_string_tolower(cur_method_ref->method_name); + method_name_key = cur_method_ref->method_name; if (cur_method_ref->class_name) { /* For all aliases with an explicit class name, resolve the class now. */ - lc_trait_name = zend_string_tolower(cur_method_ref->class_name); - trait = zend_hash_find_ptr(EG(class_table), lc_trait_name); - zend_string_release_ex(lc_trait_name, 0); + trait = zend_hash_find_ptr(EG(class_table), cur_method_ref->class_name); if (!trait || !(trait->ce_flags & ZEND_ACC_LINKED)) { zend_error_noreturn(E_COMPILE_ERROR, "Could not find trait %s", ZSTR_VAL(cur_method_ref->class_name)); } @@ -2629,7 +2614,7 @@ static void zend_traits_init_trait_structures(zend_class_entry *ce, zend_class_e aliases[i] = trait; /* And, ensure that the referenced method is resolvable, too. */ - if (!zend_hash_exists(&trait->function_table, lcname)) { + if (!zend_hash_exists(&trait->function_table, method_name_key)) { zend_error_noreturn(E_COMPILE_ERROR, "An alias was defined for %s::%s but this method does not exist", ZSTR_VAL(trait->name), ZSTR_VAL(cur_method_ref->method_name)); } } else { @@ -2637,7 +2622,7 @@ static void zend_traits_init_trait_structures(zend_class_entry *ce, zend_class_e trait = NULL; for (j = 0; j < ce->num_traits; j++) { if (traits[j]) { - if (zend_hash_exists(&traits[j]->function_table, lcname)) { + if (zend_hash_exists(&traits[j]->function_table, method_name_key)) { if (!trait) { trait = traits[j]; continue; @@ -2669,7 +2654,6 @@ static void zend_traits_init_trait_structures(zend_class_entry *ce, zend_class_e aliases[i] = trait; } - zend_string_release_ex(lcname, 0); i++; } } @@ -3482,7 +3466,7 @@ static zend_class_entry *zend_lazy_class_load(const zend_class_entry *pce) } while (0) #endif -ZEND_API zend_class_entry *zend_do_link_class(zend_class_entry *ce, zend_string *lc_parent_name, const zend_string *key) /* {{{ */ +ZEND_API zend_class_entry *zend_do_link_class(zend_class_entry *ce, const zend_string *key) /* {{{ */ { /* Load parent/interface dependencies first, so we can still gracefully abort linking * with an exception and remove the class from the class table. This is only possible @@ -3501,7 +3485,7 @@ ZEND_API zend_class_entry *zend_do_link_class(zend_class_entry *ce, zend_string if (ce->parent_name) { parent = zend_fetch_class_by_name( - ce->parent_name, lc_parent_name, + ce->parent_name, ZEND_FETCH_CLASS_ALLOW_NEARLY_LINKED | ZEND_FETCH_CLASS_EXCEPTION); if (!parent) { check_unrecoverable_load_failure(ce); @@ -3515,7 +3499,7 @@ ZEND_API zend_class_entry *zend_do_link_class(zend_class_entry *ce, zend_string for (i = 0; i < ce->num_traits; i++) { zend_class_entry *trait = zend_fetch_class_by_name(ce->trait_names[i].name, - ce->trait_names[i].lc_name, ZEND_FETCH_CLASS_TRAIT | ZEND_FETCH_CLASS_EXCEPTION); + ZEND_FETCH_CLASS_TRAIT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(trait == NULL)) { free_alloca(traits_and_interfaces, use_heap); return NULL; @@ -3549,7 +3533,7 @@ ZEND_API zend_class_entry *zend_do_link_class(zend_class_entry *ce, zend_string if (ce->num_interfaces) { for (i = 0; i < ce->num_interfaces; i++) { zend_class_entry *iface = zend_fetch_class_by_name( - ce->interface_names[i].name, ce->interface_names[i].lc_name, + ce->interface_names[i].name, ZEND_FETCH_CLASS_INTERFACE | ZEND_FETCH_CLASS_ALLOW_NEARLY_LINKED | ZEND_FETCH_CLASS_EXCEPTION); if (!iface) { @@ -3883,31 +3867,31 @@ static inheritance_status zend_can_early_bind(zend_class_entry *ce, const zend_c } /* }}} */ -static zend_always_inline bool register_early_bound_ce(zval *delayed_early_binding, zend_string *lcname, zend_class_entry *ce) { +static zend_always_inline bool register_early_bound_ce(zval *delayed_early_binding, zend_string *key_name, zend_class_entry *ce) { if (delayed_early_binding) { if (EXPECTED(!(ce->ce_flags & ZEND_ACC_PRELOADED))) { - if (zend_hash_set_bucket_key(EG(class_table), (Bucket *)delayed_early_binding, lcname) != NULL) { + if (zend_hash_set_bucket_key(EG(class_table), (Bucket *)delayed_early_binding, key_name) != NULL) { Z_CE_P(delayed_early_binding) = ce; return true; } } else { /* If preloading is used, don't replace the existing bucket, add a new one. */ - if (zend_hash_add_ptr(EG(class_table), lcname, ce) != NULL) { + if (zend_hash_add_ptr(EG(class_table), key_name, ce) != NULL) { return true; } } - zend_class_entry *old_ce = zend_hash_find_ptr(EG(class_table), lcname); + zend_class_entry *old_ce = zend_hash_find_ptr(EG(class_table), key_name); ZEND_ASSERT(old_ce); zend_class_redeclaration_error(E_COMPILE_ERROR, old_ce); return false; } - if (zend_hash_add_ptr(CG(class_table), lcname, ce) != NULL) { + if (zend_hash_add_ptr(CG(class_table), key_name, ce) != NULL) { return true; } return false; } -ZEND_API zend_class_entry *zend_try_early_bind(zend_class_entry *ce, zend_class_entry *parent_ce, zend_string *lcname, zval *delayed_early_binding) /* {{{ */ +ZEND_API zend_class_entry *zend_try_early_bind(zend_class_entry *ce, zend_class_entry *parent_ce, zend_string *key_name, zval *delayed_early_binding) /* {{{ */ { inheritance_status status; zend_class_entry *proto = NULL; @@ -3915,10 +3899,10 @@ ZEND_API zend_class_entry *zend_try_early_bind(zend_class_entry *ce, zend_class_ if (ce->ce_flags & ZEND_ACC_LINKED) { ZEND_ASSERT(ce->parent == NULL); - if (UNEXPECTED(!register_early_bound_ce(delayed_early_binding, lcname, ce))) { + if (UNEXPECTED(!register_early_bound_ce(delayed_early_binding, key_name, ce))) { return NULL; } - zend_observer_class_linked_notify(ce, lcname); + zend_observer_class_linked_notify(ce, key_name); return ce; } @@ -3928,10 +3912,10 @@ ZEND_API zend_class_entry *zend_try_early_bind(zend_class_entry *ce, zend_class_ if (zend_inheritance_cache_get && zend_inheritance_cache_add) { zend_class_entry *ret = zend_inheritance_cache_get(ce, parent_ce, NULL); if (ret) { - if (UNEXPECTED(!register_early_bound_ce(delayed_early_binding, lcname, ret))) { + if (UNEXPECTED(!register_early_bound_ce(delayed_early_binding, key_name, ret))) { return NULL; } - zend_observer_class_linked_notify(ret, lcname); + zend_observer_class_linked_notify(ret, key_name); return ret; } } else { @@ -3954,7 +3938,7 @@ ZEND_API zend_class_entry *zend_try_early_bind(zend_class_entry *ce, zend_class_ ce->ce_flags &= ~ZEND_ACC_FILE_CACHED; } - if (UNEXPECTED(!register_early_bound_ce(delayed_early_binding, lcname, ce))) { + if (UNEXPECTED(!register_early_bound_ce(delayed_early_binding, key_name, ce))) { return NULL; } @@ -4002,7 +3986,7 @@ ZEND_API zend_class_entry *zend_try_early_bind(zend_class_entry *ce, zend_class_ ce->inheritance_cache = NULL; new_ce = zend_inheritance_cache_add(ce, proto, parent_ce, NULL, ht); if (new_ce) { - zval *zv = zend_hash_find_known_hash(CG(class_table), lcname); + zval *zv = zend_hash_find_known_hash(CG(class_table), key_name); ce = new_ce; Z_CE_P(zv) = ce; } @@ -4020,7 +4004,7 @@ ZEND_API zend_class_entry *zend_try_early_bind(zend_class_entry *ce, zend_class_ if (ZSTR_HAS_CE_CACHE(ce->name)) { ZSTR_SET_CE_CACHE(ce->name, ce); } - zend_observer_class_linked_notify(ce, lcname); + zend_observer_class_linked_notify(ce, key_name); return ce; } diff --git a/Zend/zend_inheritance.h b/Zend/zend_inheritance.h index fdcbd95764b3..8c85f09e4767 100644 --- a/Zend/zend_inheritance.h +++ b/Zend/zend_inheritance.h @@ -31,11 +31,11 @@ static zend_always_inline void zend_do_inheritance(zend_class_entry *ce, zend_cl zend_do_inheritance_ex(ce, parent_ce, 0); } -ZEND_API zend_class_entry *zend_do_link_class(zend_class_entry *ce, zend_string *lc_parent_name, const zend_string *key); +ZEND_API zend_class_entry *zend_do_link_class(zend_class_entry *ce, const zend_string *key); void zend_verify_abstract_class(zend_class_entry *ce); void zend_build_properties_info_table(zend_class_entry *ce); -ZEND_API zend_class_entry *zend_try_early_bind(zend_class_entry *ce, zend_class_entry *parent_ce, zend_string *lcname, zval *delayed_early_binding); +ZEND_API zend_class_entry *zend_try_early_bind(zend_class_entry *ce, zend_class_entry *parent_ce, zend_string *key_name, zval *delayed_early_binding); void zend_inheritance_check_override(const zend_class_entry *ce); diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index 49169dfca234..6b1479016d4f 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -53,7 +53,7 @@ ZEND_API zval* zend_call_method(zend_object *object, zend_class_entry *obj_ce, z } if (!fn_proxy || !*fn_proxy) { if (EXPECTED(obj_ce)) { - fn = zend_hash_str_find_ptr_lc( + fn = zend_hash_str_find_ptr( &obj_ce->function_table, function_name, function_name_len); if (UNEXPECTED(fn == NULL)) { /* error at c-level */ @@ -301,7 +301,7 @@ static int zend_implement_aggregate(zend_class_entry *interface, zend_class_entr memset(funcs_ptr, 0, sizeof(zend_class_iterator_funcs)); funcs_ptr->zf_new_iterator = zend_hash_str_find_ptr( - &class_type->function_table, "getiterator", sizeof("getiterator") - 1); + &class_type->function_table, "getIterator", sizeof("getIterator") - 1); if (class_type->get_iterator && class_type->get_iterator != zend_user_it_get_new_iterator @@ -389,13 +389,13 @@ static int zend_implement_arrayaccess(zend_class_entry *interface, zend_class_en class_type->arrayaccess_funcs_ptr = funcs_ptr; funcs_ptr->zf_offsetget = zend_hash_str_find_ptr( - &class_type->function_table, "offsetget", sizeof("offsetget") - 1); + &class_type->function_table, "offsetGet", sizeof("offsetGet") - 1); funcs_ptr->zf_offsetexists = zend_hash_str_find_ptr( - &class_type->function_table, "offsetexists", sizeof("offsetexists") - 1); + &class_type->function_table, "offsetExists", sizeof("offsetExists") - 1); funcs_ptr->zf_offsetset = zend_hash_str_find_ptr( - &class_type->function_table, "offsetset", sizeof("offsetset") - 1); + &class_type->function_table, "offsetSet", sizeof("offsetSet") - 1); funcs_ptr->zf_offsetunset = zend_hash_str_find_ptr( - &class_type->function_table, "offsetunset", sizeof("offsetunset") - 1); + &class_type->function_table, "offsetUnset", sizeof("offsetUnset") - 1); return SUCCESS; } diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 9e993627a74a..e57f9c4a8a41 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -1943,23 +1943,9 @@ ZEND_API zend_function *zend_std_get_method(zend_object **obj_ptr, zend_string * zend_object *zobj = *obj_ptr; zval *func; zend_function *fbc; - zend_string *lc_method_name; - ALLOCA_FLAG(use_heap); + zend_string *lookup_name = (key != NULL) ? Z_STR_P(key) : method_name; - if (EXPECTED(key != NULL)) { - lc_method_name = Z_STR_P(key); -#ifdef ZEND_ALLOCA_MAX_SIZE - use_heap = 0; -#endif - } else { - ZSTR_ALLOCA_ALLOC(lc_method_name, ZSTR_LEN(method_name), use_heap); - zend_str_tolower_copy(ZSTR_VAL(lc_method_name), ZSTR_VAL(method_name), ZSTR_LEN(method_name)); - } - - if (UNEXPECTED((func = zend_hash_find(&zobj->ce->function_table, lc_method_name)) == NULL)) { - if (UNEXPECTED(!key)) { - ZSTR_ALLOCA_FREE(lc_method_name, use_heap); - } + if (UNEXPECTED((func = zend_hash_find(&zobj->ce->function_table, lookup_name)) == NULL)) { if (zobj->ce->__call) { return zend_get_call_trampoline_func(zobj->ce->__call, method_name); } else { @@ -1975,7 +1961,7 @@ ZEND_API zend_function *zend_std_get_method(zend_object **obj_ptr, zend_string * if (fbc->common.scope != scope) { if (fbc->op_array.fn_flags & ZEND_ACC_CHANGED) { - zend_function *updated_fbc = zend_get_parent_private_method(scope, zobj->ce, lc_method_name); + zend_function *updated_fbc = zend_get_parent_private_method(scope, zobj->ce, lookup_name); if (EXPECTED(updated_fbc != NULL)) { fbc = updated_fbc; @@ -2001,9 +1987,6 @@ ZEND_API zend_function *zend_std_get_method(zend_object **obj_ptr, zend_string * zend_abstract_method_call(fbc); fbc = NULL; } - if (UNEXPECTED(!key)) { - ZSTR_ALLOCA_FREE(lc_method_name, use_heap); - } return fbc; } /* }}} */ @@ -2029,15 +2012,10 @@ static zend_always_inline zend_function *get_static_method_fallback( ZEND_API zend_function *zend_std_get_static_method(const zend_class_entry *ce, zend_string *function_name, const zval *key) /* {{{ */ { - zend_string *lc_function_name; - if (EXPECTED(key != NULL)) { - lc_function_name = Z_STR_P(key); - } else { - lc_function_name = zend_string_tolower(function_name); - } + zend_string *lookup_name = (key != NULL) ? Z_STR_P(key) : function_name; zend_function *fbc; - zval *func = zend_hash_find(&ce->function_table, lc_function_name); + zval *func = zend_hash_find(&ce->function_table, lookup_name); if (EXPECTED(func)) { fbc = Z_FUNC_P(func); if (!(fbc->common.fn_flags & ZEND_ACC_PUBLIC)) { @@ -2055,10 +2033,6 @@ ZEND_API zend_function *zend_std_get_static_method(const zend_class_entry *ce, z fbc = get_static_method_fallback(ce, function_name); } - if (UNEXPECTED(!key)) { - zend_string_release_ex(lc_function_name, 0); - } - if (EXPECTED(fbc)) { if (UNEXPECTED(fbc->common.fn_flags & ZEND_ACC_ABSTRACT)) { zend_abstract_method_call(fbc); diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h index 8ed4803c3f0e..684565dc8ab9 100644 --- a/Zend/zend_object_handlers.h +++ b/Zend/zend_object_handlers.h @@ -152,6 +152,9 @@ typedef zend_array *(*zend_object_get_properties_for_t)(zend_object *object, zen /* args on stack! */ /* Andi - EX(fbc) (function being called) needs to be initialized already in the INIT fcall opcode so that the parameters can be parsed the right way. We need to add another callback for this. */ +/* If non-NULL, "key" is the method-name literal usable as a method-table hash + * key with a precomputed hash. Method names are case-sensitive, so it holds the + * same string as "method" (before PHP 8.6 it was a pre-lowercased copy). */ typedef zend_function *(*zend_object_get_method_t)(zend_object **object, zend_string *method, const zval *key); typedef zend_function *(*zend_object_get_constructor_t)(zend_object *object); diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index 538eff3ea34d..59c86f5b0858 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -216,7 +216,6 @@ static void _destroy_zend_class_traits_info(zend_class_entry *ce) for (i = 0; i < ce->num_traits; i++) { zend_string_release_ex(ce->trait_names[i].name, 0); - zend_string_release_ex(ce->trait_names[i].lc_name, 0); } efree(ce->trait_names); @@ -367,7 +366,6 @@ ZEND_API void destroy_zend_class(zval *zv) for (i = 0; i < ce->num_interfaces; i++) { zend_string_release_ex(ce->interface_names[i].name, 0); - zend_string_release_ex(ce->interface_names[i].lc_name, 0); } efree(ce->interface_names); } diff --git a/Zend/zend_string.h b/Zend/zend_string.h index 930d733307f4..bb130ac2125b 100644 --- a/Zend/zend_string.h +++ b/Zend/zend_string.h @@ -652,7 +652,6 @@ default: ZEND_UNREACHABLE(); _(ZEND_STR_CASES, "cases") \ _(ZEND_STR_FROM, "from") \ _(ZEND_STR_TRYFROM, "tryFrom") \ - _(ZEND_STR_TRYFROM_LOWERCASE, "tryfrom") \ _(ZEND_STR_AUTOGLOBAL_SERVER, "_SERVER") \ _(ZEND_STR_AUTOGLOBAL_ENV, "_ENV") \ _(ZEND_STR_AUTOGLOBAL_REQUEST, "_REQUEST") \ diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index a0bfad488f85..ae27463393c4 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -3574,7 +3574,7 @@ ZEND_VM_HANDLER(109, ZEND_FETCH_CLASS, UNUSED|CLASS_FETCH, CONST|TMP|UNUSED|CV, if (UNEXPECTED(ce == NULL)) { class_name = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R); - ce = zend_fetch_class_by_name(Z_STR_P(class_name), Z_STR_P(class_name + 1), opline->op1.num); + ce = zend_fetch_class_by_name(Z_STR_P(class_name), opline->op1.num); CACHE_PTR(opline->extended_value, ce); } Z_CE_P(EX_VAR(opline->result.var)) = ce; @@ -3700,7 +3700,7 @@ ZEND_VM_HOT_OBJ_HANDLER(112, ZEND_INIT_METHOD_CALL, CONST|TMP|UNUSED|THIS|CV, CO } /* First, locate the function. */ - fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((OP2_TYPE == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((OP2_TYPE == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(orig_obj->ce, Z_STR_P(function_name)); @@ -3773,7 +3773,7 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, UNUSED|CLASS_FETCH|CONST|VAR, /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { FREE_OP2(); HANDLE_EXCEPTION(); @@ -3826,7 +3826,7 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, UNUSED|CLASS_FETCH|CONST|VAR, if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((OP2_TYPE == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((OP2_TYPE == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { @@ -3901,7 +3901,7 @@ ZEND_VM_HOT_HANDLER(59, ZEND_INIT_FCALL_BY_NAME, ANY, CONST, NUM|CACHE_SLOT) fbc = CACHED_PTR(opline->result.num); if (UNEXPECTED(fbc == NULL)) { function_name = (zval*)RT_CONSTANT(opline, opline->op2); - func = zend_hash_find_known_hash(EG(function_table), Z_STR_P(function_name+1)); + func = zend_hash_find_known_hash(EG(function_table), Z_STR_P(function_name)); if (UNEXPECTED(func == NULL)) { ZEND_VM_DISPATCH_TO_HELPER(zend_undefined_function_helper); } @@ -4055,9 +4055,9 @@ ZEND_VM_HOT_HANDLER(69, ZEND_INIT_NS_FCALL_BY_NAME, ANY, CONST, NUM|CACHE_SLOT) fbc = CACHED_PTR(opline->result.num); if (UNEXPECTED(fbc == NULL)) { func_name = (zval *)RT_CONSTANT(opline, opline->op2); - func = zend_hash_find_known_hash(EG(function_table), Z_STR_P(func_name + 1)); + func = zend_hash_find_known_hash(EG(function_table), Z_STR_P(func_name)); if (func == NULL) { - func = zend_hash_find_known_hash(EG(function_table), Z_STR_P(func_name + 2)); + func = zend_hash_find_known_hash(EG(function_table), Z_STR_P(func_name + 1)); if (UNEXPECTED(func == NULL)) { ZEND_VM_DISPATCH_TO_HELPER(zend_undefined_function_helper); } @@ -4861,8 +4861,7 @@ ZEND_VM_HANDLER(107, ZEND_CATCH, CONST, JMP_ADDR, LAST_CATCH|CACHE_SLOT) } catch_ce = CACHED_PTR(opline->extended_value & ~ZEND_LAST_CATCH); if (UNEXPECTED(catch_ce == NULL)) { - catch_ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_NO_AUTOLOAD | ZEND_FETCH_CLASS_SILENT); - + catch_ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_NO_AUTOLOAD | ZEND_FETCH_CLASS_SILENT); CACHE_PTR(opline->extended_value & ~ZEND_LAST_CATCH, catch_ce); } ce = EG(exception)->ce; @@ -5987,7 +5986,7 @@ ZEND_VM_HANDLER(68, ZEND_NEW, UNUSED|CLASS_FETCH|CONST|VAR, UNUSED|CACHE_SLOT, N if (OP1_TYPE == IS_CONST) { ce = CACHED_PTR(opline->op2.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); @@ -6121,7 +6120,7 @@ ZEND_VM_HOT_HANDLER(99, ZEND_FETCH_CONSTANT, UNUSED|CONST_FETCH, CONST, CACHE_SL } SAVE_OPLINE(); - zend_quick_get_constant(RT_CONSTANT(opline, opline->op2) + 1, opline->op1.num OPLINE_CC EXECUTE_DATA_CC); + zend_quick_get_constant(RT_CONSTANT(opline, opline->op2), opline->op1.num OPLINE_CC EXECUTE_DATA_CC); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -6146,7 +6145,7 @@ ZEND_VM_HANDLER(181, ZEND_FETCH_CLASS_CONSTANT, VAR|CONST|UNUSED|CLASS_FETCH, CO if (EXPECTED(CACHED_PTR(opline->extended_value))) { ce = CACHED_PTR(opline->extended_value); } else { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); FREE_OP2(); @@ -6729,7 +6728,7 @@ ZEND_VM_COLD_HANDLER(179, ZEND_UNSET_STATIC_PROP, ANY, ANY, CACHE_SLOT) if (OP2_TYPE == IS_CONST) { ce = CACHED_PTR(opline->extended_value); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op2)), Z_STR_P(RT_CONSTANT(opline, opline->op2) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op2)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { FREE_OP1(); HANDLE_EXCEPTION(); @@ -8006,7 +8005,7 @@ ZEND_VM_HANDLER(144, ZEND_DECLARE_CLASS, CONST, ANY) USE_OPLINE SAVE_OPLINE(); - do_bind_class(RT_CONSTANT(opline, opline->op1), (OP2_TYPE == IS_CONST) ? Z_STR_P(RT_CONSTANT(opline, opline->op2)) : NULL); + do_bind_class(RT_CONSTANT(opline, opline->op1)); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -8016,11 +8015,12 @@ ZEND_VM_HANDLER(145, ZEND_DECLARE_CLASS_DELAYED, CONST, CONST) zend_class_entry *ce = CACHED_PTR(opline->extended_value); if (ce == NULL) { - zval *lcname = RT_CONSTANT(opline, opline->op1); - zval *zv = zend_hash_find_known_hash(EG(class_table), Z_STR_P(lcname + 1)); + /* slot 0 = canonical class name, slot 1 = RTD key */ + zval *name = RT_CONSTANT(opline, opline->op1); + zval *zv = zend_hash_find_known_hash(EG(class_table), Z_STR_P(name + 1)); if (zv) { SAVE_OPLINE(); - ce = zend_bind_class_in_slot(zv, lcname, Z_STR_P(RT_CONSTANT(opline, opline->op2))); + ce = zend_bind_class_in_slot(zv, name); if (EG(exception)) { HANDLE_EXCEPTION(); } @@ -8044,7 +8044,7 @@ ZEND_VM_HANDLER(146, ZEND_DECLARE_ANON_CLASS, ANY, ANY, CACHE_SLOT) ce = Z_CE_P(zv); if (!(ce->ce_flags & ZEND_ACC_LINKED)) { SAVE_OPLINE(); - ce = zend_do_link_class(ce, (OP2_TYPE == IS_CONST) ? Z_STR_P(RT_CONSTANT(opline, opline->op2)) : NULL, rtd_key); + ce = zend_do_link_class(ce, rtd_key); if (EG(exception)) { HANDLE_EXCEPTION(); } @@ -8099,7 +8099,7 @@ ZEND_VM_C_LABEL(try_instanceof): if (OP2_TYPE == IS_CONST) { ce = CACHED_PTR(opline->extended_value); if (UNEXPECTED(ce == NULL)) { - ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), Z_STR_P(RT_CONSTANT(opline, opline->op2) + 1), ZEND_FETCH_CLASS_NO_AUTOLOAD); + ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), ZEND_FETCH_CLASS_NO_AUTOLOAD); if (EXPECTED(ce)) { CACHE_PTR(opline->extended_value, ce); } diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index cedc735bbb1e..d34630fe159a 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -2999,7 +2999,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_ if (opline->op2_type == IS_CONST) { ce = CACHED_PTR(opline->extended_value); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op2)), Z_STR_P(RT_CONSTANT(opline, opline->op2) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op2)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { FREE_OP(opline->op1_type, opline->op1.var); HANDLE_EXCEPTION(); @@ -3265,7 +3265,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_DECLARE_ANON_ ce = Z_CE_P(zv); if (!(ce->ce_flags & ZEND_ACC_LINKED)) { SAVE_OPLINE(); - ce = zend_do_link_class(ce, (opline->op2_type == IS_CONST) ? Z_STR_P(RT_CONSTANT(opline, opline->op2)) : NULL, rtd_key); + ce = zend_do_link_class(ce, rtd_key); if (EG(exception)) { HANDLE_EXCEPTION(); } @@ -4070,7 +4070,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_I fbc = CACHED_PTR(opline->result.num); if (UNEXPECTED(fbc == NULL)) { function_name = (zval*)RT_CONSTANT(opline, opline->op2); - func = zend_hash_find_known_hash(EG(function_table), Z_STR_P(function_name+1)); + func = zend_hash_find_known_hash(EG(function_table), Z_STR_P(function_name)); if (UNEXPECTED(func == NULL)) { ZEND_VM_TAIL_CALL(zend_undefined_function_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)); } @@ -4153,9 +4153,9 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_I fbc = CACHED_PTR(opline->result.num); if (UNEXPECTED(fbc == NULL)) { func_name = (zval *)RT_CONSTANT(opline, opline->op2); - func = zend_hash_find_known_hash(EG(function_table), Z_STR_P(func_name + 1)); + func = zend_hash_find_known_hash(EG(function_table), Z_STR_P(func_name)); if (func == NULL) { - func = zend_hash_find_known_hash(EG(function_table), Z_STR_P(func_name + 2)); + func = zend_hash_find_known_hash(EG(function_table), Z_STR_P(func_name + 1)); if (UNEXPECTED(func == NULL)) { ZEND_VM_TAIL_CALL(zend_undefined_function_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)); } @@ -5176,8 +5176,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_CATCH_SPEC_CO } catch_ce = CACHED_PTR(opline->extended_value & ~ZEND_LAST_CATCH); if (UNEXPECTED(catch_ce == NULL)) { - catch_ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_NO_AUTOLOAD | ZEND_FETCH_CLASS_SILENT); - + catch_ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_NO_AUTOLOAD | ZEND_FETCH_CLASS_SILENT); CACHE_PTR(opline->extended_value & ~ZEND_LAST_CATCH, catch_ce); } ce = EG(exception)->ce; @@ -5911,7 +5910,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_DECLARE_CLASS USE_OPLINE SAVE_OPLINE(); - do_bind_class(RT_CONSTANT(opline, opline->op1), (opline->op2_type == IS_CONST) ? Z_STR_P(RT_CONSTANT(opline, opline->op2)) : NULL); + do_bind_class(RT_CONSTANT(opline, opline->op1)); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -7474,7 +7473,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_ } /* First, locate the function. */ - fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(orig_obj->ce, Z_STR_P(function_name)); @@ -7549,7 +7548,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_STATIC_M /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { @@ -7605,7 +7604,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_STATIC_M if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { @@ -7834,7 +7833,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_FETCH_CLASS_C if (EXPECTED(CACHED_PTR(opline->extended_value))) { ce = CACHED_PTR(opline->extended_value); } else { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); @@ -8264,11 +8263,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_DECLARE_CLASS zend_class_entry *ce = CACHED_PTR(opline->extended_value); if (ce == NULL) { - zval *lcname = RT_CONSTANT(opline, opline->op1); - zval *zv = zend_hash_find_known_hash(EG(class_table), Z_STR_P(lcname + 1)); + /* slot 0 = canonical class name, slot 1 = RTD key */ + zval *name = RT_CONSTANT(opline, opline->op1); + zval *zv = zend_hash_find_known_hash(EG(class_table), Z_STR_P(name + 1)); if (zv) { SAVE_OPLINE(); - ce = zend_bind_class_in_slot(zv, lcname, Z_STR_P(RT_CONSTANT(opline, opline->op2))); + ce = zend_bind_class_in_slot(zv, name); if (EG(exception)) { HANDLE_EXCEPTION(); } @@ -9095,7 +9095,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_FETCH_CLASS_C if (EXPECTED(CACHED_PTR(opline->extended_value))) { ce = CACHED_PTR(opline->extended_value); } else { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); FREE_OP(opline->op2_type, opline->op2.var); @@ -10210,7 +10210,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_ } /* First, locate the function. */ - fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(orig_obj->ce, Z_STR_P(function_name)); @@ -10283,7 +10283,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_STATIC_M /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); HANDLE_EXCEPTION(); @@ -10336,7 +10336,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_STATIC_M if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { @@ -11070,7 +11070,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_STATIC_M /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { @@ -11126,7 +11126,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_STATIC_M if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_UNUSED == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_UNUSED == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { @@ -11380,7 +11380,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_NEW_SPEC_CONS if (IS_CONST == IS_CONST) { ce = CACHED_PTR(opline->op2.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); @@ -12820,7 +12820,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_ } /* First, locate the function. */ - fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(orig_obj->ce, Z_STR_P(function_name)); @@ -12895,7 +12895,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_STATIC_M /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { @@ -12951,7 +12951,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_STATIC_M if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { @@ -19199,7 +19199,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_METHOD_C } /* First, locate the function. */ - fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(orig_obj->ce, Z_STR_P(function_name)); @@ -19662,7 +19662,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INSTANCEOF_SP if (IS_CONST == IS_CONST) { ce = CACHED_PTR(opline->extended_value); if (UNEXPECTED(ce == NULL)) { - ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), Z_STR_P(RT_CONSTANT(opline, opline->op2) + 1), ZEND_FETCH_CLASS_NO_AUTOLOAD); + ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), ZEND_FETCH_CLASS_NO_AUTOLOAD); if (EXPECTED(ce)) { CACHE_PTR(opline->extended_value, ce); } @@ -20775,7 +20775,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_METHOD_C } /* First, locate the function. */ - fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(orig_obj->ce, Z_STR_P(function_name)); @@ -21316,7 +21316,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INSTANCEOF_SP if (IS_VAR == IS_CONST) { ce = CACHED_PTR(opline->extended_value); if (UNEXPECTED(ce == NULL)) { - ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), Z_STR_P(RT_CONSTANT(opline, opline->op2) + 1), ZEND_FETCH_CLASS_NO_AUTOLOAD); + ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), ZEND_FETCH_CLASS_NO_AUTOLOAD); if (EXPECTED(ce)) { CACHE_PTR(opline->extended_value, ce); } @@ -21843,7 +21843,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INSTANCEOF_SP if (IS_UNUSED == IS_CONST) { ce = CACHED_PTR(opline->extended_value); if (UNEXPECTED(ce == NULL)) { - ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), Z_STR_P(RT_CONSTANT(opline, opline->op2) + 1), ZEND_FETCH_CLASS_NO_AUTOLOAD); + ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), ZEND_FETCH_CLASS_NO_AUTOLOAD); if (EXPECTED(ce)) { CACHE_PTR(opline->extended_value, ce); } @@ -22636,7 +22636,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_METHOD_C } /* First, locate the function. */ - fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(orig_obj->ce, Z_STR_P(function_name)); @@ -25530,7 +25530,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_STATIC_M /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { @@ -25586,7 +25586,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_STATIC_M if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { @@ -25967,7 +25967,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_FETCH_CLASS_C if (EXPECTED(CACHED_PTR(opline->extended_value))) { ce = CACHED_PTR(opline->extended_value); } else { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); @@ -26511,7 +26511,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_FETCH_CLASS_C if (EXPECTED(CACHED_PTR(opline->extended_value))) { ce = CACHED_PTR(opline->extended_value); } else { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); FREE_OP(opline->op2_type, opline->op2.var); @@ -28230,7 +28230,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_STATIC_M /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); HANDLE_EXCEPTION(); @@ -28283,7 +28283,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_STATIC_M if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { @@ -29430,7 +29430,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_STATIC_M /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { @@ -29486,7 +29486,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_STATIC_M if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_UNUSED == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_UNUSED == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { @@ -30062,7 +30062,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_NEW_SPEC_VAR_ if (IS_VAR == IS_CONST) { ce = CACHED_PTR(opline->op2.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); @@ -32104,7 +32104,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_STATIC_M /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { @@ -32160,7 +32160,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_STATIC_M if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { @@ -34109,7 +34109,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_FETCH_CLASS_S if (UNEXPECTED(ce == NULL)) { class_name = RT_CONSTANT(opline, opline->op2); - ce = zend_fetch_class_by_name(Z_STR_P(class_name), Z_STR_P(class_name + 1), opline->op1.num); + ce = zend_fetch_class_by_name(Z_STR_P(class_name), opline->op1.num); CACHE_PTR(opline->extended_value, ce); } Z_CE_P(EX_VAR(opline->result.var)) = ce; @@ -34241,7 +34241,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_I } /* First, locate the function. */ - fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(orig_obj->ce, Z_STR_P(function_name)); @@ -34316,7 +34316,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_STATIC_M /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { @@ -34372,7 +34372,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_STATIC_M if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { @@ -34483,7 +34483,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_F } SAVE_OPLINE(); - zend_quick_get_constant(RT_CONSTANT(opline, opline->op2) + 1, opline->op1.num OPLINE_CC EXECUTE_DATA_CC); + zend_quick_get_constant(RT_CONSTANT(opline, opline->op2), opline->op1.num OPLINE_CC EXECUTE_DATA_CC); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -34508,7 +34508,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_FETCH_CLASS_C if (EXPECTED(CACHED_PTR(opline->extended_value))) { ce = CACHED_PTR(opline->extended_value); } else { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); @@ -34893,7 +34893,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_FETCH_CLASS_C if (EXPECTED(CACHED_PTR(opline->extended_value))) { ce = CACHED_PTR(opline->extended_value); } else { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); FREE_OP(opline->op2_type, opline->op2.var); @@ -36201,7 +36201,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_FETCH_CLASS_S if (UNEXPECTED(ce == NULL)) { class_name = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC); - ce = zend_fetch_class_by_name(Z_STR_P(class_name), Z_STR_P(class_name + 1), opline->op1.num); + ce = zend_fetch_class_by_name(Z_STR_P(class_name), opline->op1.num); CACHE_PTR(opline->extended_value, ce); } Z_CE_P(EX_VAR(opline->result.var)) = ce; @@ -36330,7 +36330,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_METHOD_C } /* First, locate the function. */ - fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(orig_obj->ce, Z_STR_P(function_name)); @@ -36403,7 +36403,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_STATIC_M /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); HANDLE_EXCEPTION(); @@ -36456,7 +36456,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_STATIC_M if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { @@ -36776,7 +36776,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_FETCH_CLASS_S if (UNEXPECTED(ce == NULL)) { class_name = NULL; - ce = zend_fetch_class_by_name(Z_STR_P(class_name), Z_STR_P(class_name + 1), opline->op1.num); + ce = zend_fetch_class_by_name(Z_STR_P(class_name), opline->op1.num); CACHE_PTR(opline->extended_value, ce); } Z_CE_P(EX_VAR(opline->result.var)) = ce; @@ -36820,7 +36820,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_STATIC_M /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { @@ -36876,7 +36876,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_STATIC_M if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_UNUSED == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_UNUSED == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { @@ -37110,7 +37110,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_NEW_SPEC_UNUS if (IS_UNUSED == IS_CONST) { ce = CACHED_PTR(opline->op2.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); @@ -38779,7 +38779,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_FETCH_CLASS_S if (UNEXPECTED(ce == NULL)) { class_name = EX_VAR(opline->op2.var); - ce = zend_fetch_class_by_name(Z_STR_P(class_name), Z_STR_P(class_name + 1), opline->op1.num); + ce = zend_fetch_class_by_name(Z_STR_P(class_name), opline->op1.num); CACHE_PTR(opline->extended_value, ce); } Z_CE_P(EX_VAR(opline->result.var)) = ce; @@ -38911,7 +38911,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_METHOD_C } /* First, locate the function. */ - fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(orig_obj->ce, Z_STR_P(function_name)); @@ -38986,7 +38986,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_STATIC_M /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { @@ -39042,7 +39042,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_STATIC_M if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { @@ -43861,7 +43861,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_I } /* First, locate the function. */ - fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(orig_obj->ce, Z_STR_P(function_name)); @@ -44534,7 +44534,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INSTANCEOF_SP if (IS_CONST == IS_CONST) { ce = CACHED_PTR(opline->extended_value); if (UNEXPECTED(ce == NULL)) { - ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), Z_STR_P(RT_CONSTANT(opline, opline->op2) + 1), ZEND_FETCH_CLASS_NO_AUTOLOAD); + ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), ZEND_FETCH_CLASS_NO_AUTOLOAD); if (EXPECTED(ce)) { CACHE_PTR(opline->extended_value, ce); } @@ -47672,7 +47672,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_METHOD_C } /* First, locate the function. */ - fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(orig_obj->ce, Z_STR_P(function_name)); @@ -48355,7 +48355,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INSTANCEOF_SP if (IS_VAR == IS_CONST) { ce = CACHED_PTR(opline->extended_value); if (UNEXPECTED(ce == NULL)) { - ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), Z_STR_P(RT_CONSTANT(opline, opline->op2) + 1), ZEND_FETCH_CLASS_NO_AUTOLOAD); + ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), ZEND_FETCH_CLASS_NO_AUTOLOAD); if (EXPECTED(ce)) { CACHE_PTR(opline->extended_value, ce); } @@ -49735,7 +49735,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INSTANCEOF_SP if (IS_UNUSED == IS_CONST) { ce = CACHED_PTR(opline->extended_value); if (UNEXPECTED(ce == NULL)) { - ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), Z_STR_P(RT_CONSTANT(opline, opline->op2) + 1), ZEND_FETCH_CLASS_NO_AUTOLOAD); + ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), ZEND_FETCH_CLASS_NO_AUTOLOAD); if (EXPECTED(ce)) { CACHE_PTR(opline->extended_value, ce); } @@ -52843,7 +52843,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_INIT_METHOD_C } /* First, locate the function. */ - fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(orig_obj->ce, Z_STR_P(function_name)); @@ -55764,7 +55764,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_UNSET if (opline->op2_type == IS_CONST) { ce = CACHED_PTR(opline->extended_value); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op2)), Z_STR_P(RT_CONSTANT(opline, opline->op2) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op2)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { FREE_OP(opline->op1_type, opline->op1.var); HANDLE_EXCEPTION(); @@ -56030,7 +56030,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_DECLARE_ANON_CLASS ce = Z_CE_P(zv); if (!(ce->ce_flags & ZEND_ACC_LINKED)) { SAVE_OPLINE(); - ce = zend_do_link_class(ce, (opline->op2_type == IS_CONST) ? Z_STR_P(RT_CONSTANT(opline, opline->op2)) : NULL, rtd_key); + ce = zend_do_link_class(ce, rtd_key); if (EG(exception)) { HANDLE_EXCEPTION(); } @@ -56759,7 +56759,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_F fbc = CACHED_PTR(opline->result.num); if (UNEXPECTED(fbc == NULL)) { function_name = (zval*)RT_CONSTANT(opline, opline->op2); - func = zend_hash_find_known_hash(EG(function_table), Z_STR_P(function_name+1)); + func = zend_hash_find_known_hash(EG(function_table), Z_STR_P(function_name)); if (UNEXPECTED(func == NULL)) { ZEND_VM_TAIL_CALL(zend_undefined_function_helper_SPEC_TAILCALL(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)); } @@ -56842,9 +56842,9 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_N fbc = CACHED_PTR(opline->result.num); if (UNEXPECTED(fbc == NULL)) { func_name = (zval *)RT_CONSTANT(opline, opline->op2); - func = zend_hash_find_known_hash(EG(function_table), Z_STR_P(func_name + 1)); + func = zend_hash_find_known_hash(EG(function_table), Z_STR_P(func_name)); if (func == NULL) { - func = zend_hash_find_known_hash(EG(function_table), Z_STR_P(func_name + 2)); + func = zend_hash_find_known_hash(EG(function_table), Z_STR_P(func_name + 1)); if (UNEXPECTED(func == NULL)) { ZEND_VM_TAIL_CALL(zend_undefined_function_helper_SPEC_TAILCALL(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)); } @@ -57865,8 +57865,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_CATCH_SPEC_CONST_T } catch_ce = CACHED_PTR(opline->extended_value & ~ZEND_LAST_CATCH); if (UNEXPECTED(catch_ce == NULL)) { - catch_ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_NO_AUTOLOAD | ZEND_FETCH_CLASS_SILENT); - + catch_ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_NO_AUTOLOAD | ZEND_FETCH_CLASS_SILENT); CACHE_PTR(opline->extended_value & ~ZEND_LAST_CATCH, catch_ce); } ce = EG(exception)->ce; @@ -58600,7 +58599,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_DECLARE_CLASS_SPEC USE_OPLINE SAVE_OPLINE(); - do_bind_class(RT_CONSTANT(opline, opline->op1), (opline->op2_type == IS_CONST) ? Z_STR_P(RT_CONSTANT(opline, opline->op2)) : NULL); + do_bind_class(RT_CONSTANT(opline, opline->op1)); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -60163,7 +60162,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_ } /* First, locate the function. */ - fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(orig_obj->ce, Z_STR_P(function_name)); @@ -60238,7 +60237,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_STATIC_METHOD /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { @@ -60294,7 +60293,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_STATIC_METHOD if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { @@ -60523,7 +60522,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_FETCH_CLASS_CONSTA if (EXPECTED(CACHED_PTR(opline->extended_value))) { ce = CACHED_PTR(opline->extended_value); } else { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); @@ -60953,11 +60952,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_DECLARE_CLASS_DELA zend_class_entry *ce = CACHED_PTR(opline->extended_value); if (ce == NULL) { - zval *lcname = RT_CONSTANT(opline, opline->op1); - zval *zv = zend_hash_find_known_hash(EG(class_table), Z_STR_P(lcname + 1)); + /* slot 0 = canonical class name, slot 1 = RTD key */ + zval *name = RT_CONSTANT(opline, opline->op1); + zval *zv = zend_hash_find_known_hash(EG(class_table), Z_STR_P(name + 1)); if (zv) { SAVE_OPLINE(); - ce = zend_bind_class_in_slot(zv, lcname, Z_STR_P(RT_CONSTANT(opline, opline->op2))); + ce = zend_bind_class_in_slot(zv, name); if (EG(exception)) { HANDLE_EXCEPTION(); } @@ -61784,7 +61784,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_FETCH_CLASS_CONSTA if (EXPECTED(CACHED_PTR(opline->extended_value))) { ce = CACHED_PTR(opline->extended_value); } else { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); FREE_OP(opline->op2_type, opline->op2.var); @@ -62899,7 +62899,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_ } /* First, locate the function. */ - fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(orig_obj->ce, Z_STR_P(function_name)); @@ -62972,7 +62972,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_STATIC_METHOD /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); HANDLE_EXCEPTION(); @@ -63025,7 +63025,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_STATIC_METHOD if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { @@ -63657,7 +63657,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_STATIC_METHOD /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { @@ -63713,7 +63713,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_STATIC_METHOD if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_UNUSED == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_UNUSED == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { @@ -63967,7 +63967,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_NEW_SPEC_CONST_UNU if (IS_CONST == IS_CONST) { ce = CACHED_PTR(opline->op2.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); @@ -65407,7 +65407,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_ } /* First, locate the function. */ - fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(orig_obj->ce, Z_STR_P(function_name)); @@ -65482,7 +65482,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_STATIC_METHOD /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { @@ -65538,7 +65538,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_STATIC_METHOD if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { @@ -71786,7 +71786,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_METHOD_CALL_S } /* First, locate the function. */ - fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(orig_obj->ce, Z_STR_P(function_name)); @@ -72249,7 +72249,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INSTANCEOF_SPEC_TM if (IS_CONST == IS_CONST) { ce = CACHED_PTR(opline->extended_value); if (UNEXPECTED(ce == NULL)) { - ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), Z_STR_P(RT_CONSTANT(opline, opline->op2) + 1), ZEND_FETCH_CLASS_NO_AUTOLOAD); + ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), ZEND_FETCH_CLASS_NO_AUTOLOAD); if (EXPECTED(ce)) { CACHE_PTR(opline->extended_value, ce); } @@ -73362,7 +73362,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_METHOD_CALL_S } /* First, locate the function. */ - fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(orig_obj->ce, Z_STR_P(function_name)); @@ -73903,7 +73903,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INSTANCEOF_SPEC_TM if (IS_VAR == IS_CONST) { ce = CACHED_PTR(opline->extended_value); if (UNEXPECTED(ce == NULL)) { - ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), Z_STR_P(RT_CONSTANT(opline, opline->op2) + 1), ZEND_FETCH_CLASS_NO_AUTOLOAD); + ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), ZEND_FETCH_CLASS_NO_AUTOLOAD); if (EXPECTED(ce)) { CACHE_PTR(opline->extended_value, ce); } @@ -74330,7 +74330,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INSTANCEOF_SPEC_TM if (IS_UNUSED == IS_CONST) { ce = CACHED_PTR(opline->extended_value); if (UNEXPECTED(ce == NULL)) { - ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), Z_STR_P(RT_CONSTANT(opline, opline->op2) + 1), ZEND_FETCH_CLASS_NO_AUTOLOAD); + ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), ZEND_FETCH_CLASS_NO_AUTOLOAD); if (EXPECTED(ce)) { CACHE_PTR(opline->extended_value, ce); } @@ -75123,7 +75123,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_METHOD_CALL_S } /* First, locate the function. */ - fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(orig_obj->ce, Z_STR_P(function_name)); @@ -78017,7 +78017,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_STATIC_METHOD /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { @@ -78073,7 +78073,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_STATIC_METHOD if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { @@ -78454,7 +78454,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_FETCH_CLASS_CONSTA if (EXPECTED(CACHED_PTR(opline->extended_value))) { ce = CACHED_PTR(opline->extended_value); } else { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); @@ -78998,7 +78998,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_FETCH_CLASS_CONSTA if (EXPECTED(CACHED_PTR(opline->extended_value))) { ce = CACHED_PTR(opline->extended_value); } else { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); FREE_OP(opline->op2_type, opline->op2.var); @@ -80717,7 +80717,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_STATIC_METHOD /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); HANDLE_EXCEPTION(); @@ -80770,7 +80770,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_STATIC_METHOD if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { @@ -81917,7 +81917,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_STATIC_METHOD /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { @@ -81973,7 +81973,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_STATIC_METHOD if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_UNUSED == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_UNUSED == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { @@ -82549,7 +82549,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_NEW_SPEC_VAR_UNUSE if (IS_VAR == IS_CONST) { ce = CACHED_PTR(opline->op2.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); @@ -84591,7 +84591,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_STATIC_METHOD /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { @@ -84647,7 +84647,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_STATIC_METHOD if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { @@ -86596,7 +86596,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_FETCH_CLASS_SPEC_U if (UNEXPECTED(ce == NULL)) { class_name = RT_CONSTANT(opline, opline->op2); - ce = zend_fetch_class_by_name(Z_STR_P(class_name), Z_STR_P(class_name + 1), opline->op1.num); + ce = zend_fetch_class_by_name(Z_STR_P(class_name), opline->op1.num); CACHE_PTR(opline->extended_value, ce); } Z_CE_P(EX_VAR(opline->result.var)) = ce; @@ -86728,7 +86728,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_M } /* First, locate the function. */ - fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(orig_obj->ce, Z_STR_P(function_name)); @@ -86803,7 +86803,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_STATIC_METHOD /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { @@ -86859,7 +86859,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_STATIC_METHOD if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { @@ -86970,7 +86970,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_FETCH_ } SAVE_OPLINE(); - zend_quick_get_constant(RT_CONSTANT(opline, opline->op2) + 1, opline->op1.num OPLINE_CC EXECUTE_DATA_CC); + zend_quick_get_constant(RT_CONSTANT(opline, opline->op2), opline->op1.num OPLINE_CC EXECUTE_DATA_CC); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -86995,7 +86995,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_FETCH_CLASS_CONSTA if (EXPECTED(CACHED_PTR(opline->extended_value))) { ce = CACHED_PTR(opline->extended_value); } else { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); @@ -87380,7 +87380,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_FETCH_CLASS_CONSTA if (EXPECTED(CACHED_PTR(opline->extended_value))) { ce = CACHED_PTR(opline->extended_value); } else { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); FREE_OP(opline->op2_type, opline->op2.var); @@ -88688,7 +88688,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_FETCH_CLASS_SPEC_U if (UNEXPECTED(ce == NULL)) { class_name = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC); - ce = zend_fetch_class_by_name(Z_STR_P(class_name), Z_STR_P(class_name + 1), opline->op1.num); + ce = zend_fetch_class_by_name(Z_STR_P(class_name), opline->op1.num); CACHE_PTR(opline->extended_value, ce); } Z_CE_P(EX_VAR(opline->result.var)) = ce; @@ -88817,7 +88817,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_METHOD_CALL_S } /* First, locate the function. */ - fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(orig_obj->ce, Z_STR_P(function_name)); @@ -88890,7 +88890,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_STATIC_METHOD /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); HANDLE_EXCEPTION(); @@ -88943,7 +88943,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_STATIC_METHOD if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { @@ -89263,7 +89263,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_FETCH_CLASS_SPEC_U if (UNEXPECTED(ce == NULL)) { class_name = NULL; - ce = zend_fetch_class_by_name(Z_STR_P(class_name), Z_STR_P(class_name + 1), opline->op1.num); + ce = zend_fetch_class_by_name(Z_STR_P(class_name), opline->op1.num); CACHE_PTR(opline->extended_value, ce); } Z_CE_P(EX_VAR(opline->result.var)) = ce; @@ -89307,7 +89307,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_STATIC_METHOD /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { @@ -89363,7 +89363,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_STATIC_METHOD if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_UNUSED == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_UNUSED == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { @@ -89597,7 +89597,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_NEW_SPEC_UNUSED_UN if (IS_UNUSED == IS_CONST) { ce = CACHED_PTR(opline->op2.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); @@ -91266,7 +91266,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_FETCH_CLASS_SPEC_U if (UNEXPECTED(ce == NULL)) { class_name = EX_VAR(opline->op2.var); - ce = zend_fetch_class_by_name(Z_STR_P(class_name), Z_STR_P(class_name + 1), opline->op1.num); + ce = zend_fetch_class_by_name(Z_STR_P(class_name), opline->op1.num); CACHE_PTR(opline->extended_value, ce); } Z_CE_P(EX_VAR(opline->result.var)) = ce; @@ -91398,7 +91398,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_METHOD_CALL_S } /* First, locate the function. */ - fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(orig_obj->ce, Z_STR_P(function_name)); @@ -91473,7 +91473,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_STATIC_METHOD /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { @@ -91529,7 +91529,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_STATIC_METHOD if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { @@ -96348,7 +96348,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_M } /* First, locate the function. */ - fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(orig_obj->ce, Z_STR_P(function_name)); @@ -97021,7 +97021,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INSTANCEOF_SPEC_CV if (IS_CONST == IS_CONST) { ce = CACHED_PTR(opline->extended_value); if (UNEXPECTED(ce == NULL)) { - ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), Z_STR_P(RT_CONSTANT(opline, opline->op2) + 1), ZEND_FETCH_CLASS_NO_AUTOLOAD); + ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), ZEND_FETCH_CLASS_NO_AUTOLOAD); if (EXPECTED(ce)) { CACHE_PTR(opline->extended_value, ce); } @@ -100159,7 +100159,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_METHOD_CALL_S } /* First, locate the function. */ - fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(orig_obj->ce, Z_STR_P(function_name)); @@ -100842,7 +100842,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INSTANCEOF_SPEC_CV if (IS_VAR == IS_CONST) { ce = CACHED_PTR(opline->extended_value); if (UNEXPECTED(ce == NULL)) { - ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), Z_STR_P(RT_CONSTANT(opline, opline->op2) + 1), ZEND_FETCH_CLASS_NO_AUTOLOAD); + ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), ZEND_FETCH_CLASS_NO_AUTOLOAD); if (EXPECTED(ce)) { CACHE_PTR(opline->extended_value, ce); } @@ -102120,7 +102120,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INSTANCEOF_SPEC_CV if (IS_UNUSED == IS_CONST) { ce = CACHED_PTR(opline->extended_value); if (UNEXPECTED(ce == NULL)) { - ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), Z_STR_P(RT_CONSTANT(opline, opline->op2) + 1), ZEND_FETCH_CLASS_NO_AUTOLOAD); + ce = zend_lookup_class_ex(Z_STR_P(RT_CONSTANT(opline, opline->op2)), ZEND_FETCH_CLASS_NO_AUTOLOAD); if (EXPECTED(ce)) { CACHE_PTR(opline->extended_value, ce); } @@ -105228,7 +105228,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_INIT_METHOD_CALL_S } /* First, locate the function. */ - fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2) + 1) : NULL)); + fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (RT_CONSTANT(opline, opline->op2)) : NULL)); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(orig_obj->ce, Z_STR_P(function_name)); diff --git a/build/gen_stub.php b/build/gen_stub.php index 34bbd34fd37f..aeb89f2c10c6 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -84,7 +84,7 @@ function processDirectory(string $dir, Context $context): array { RecursiveIteratorIterator::LEAVES_ONLY ); foreach ($it as $file) { - $pathName = $file->getPathName(); + $pathName = $file->getPathname(); if (str_ends_with($pathName, '.stub.php')) { $pathNames[] = $pathName; } @@ -973,7 +973,7 @@ public function getMethodSynopsisFilename(): string { } public function getNameForAttributes(): string { - return strtolower($this->name->toString()); + return $this->name->toString(); } public function __toString(): string { @@ -1016,7 +1016,7 @@ public function getMethodSynopsisFilename(): string } public function getNameForAttributes(): string { - return strtolower($this->methodName); + return $this->methodName; } public function __toString(): string { @@ -5541,7 +5541,7 @@ function replacePredefinedConstants(string $targetDirectory, array $constMap, ar ); foreach ($it as $file) { - $pathName = $file->getPathName(); + $pathName = $file->getPathname(); if (!preg_match('/(?:[\w\.]*constants[\w\._]*|tokens).xml$/i', basename($pathName))) { continue; } @@ -5722,7 +5722,7 @@ function replaceClassSynopses( ); foreach ($it as $file) { - $pathName = $file->getPathName(); + $pathName = $file->getPathname(); if (!preg_match('/\.xml$/i', $pathName)) { continue; } @@ -5939,7 +5939,7 @@ function replaceMethodSynopses( ); foreach ($it as $file) { - $pathName = $file->getPathName(); + $pathName = $file->getPathname(); if (!preg_match('/\.xml$/i', $pathName)) { continue; } diff --git a/ext/bcmath/tests/gh15968.phpt b/ext/bcmath/tests/gh15968.phpt index aa91534e7738..cd5147c5c197 100644 --- a/ext/bcmath/tests/gh15968.phpt +++ b/ext/bcmath/tests/gh15968.phpt @@ -10,7 +10,7 @@ class MyString { } } -$a = new BCMath\Number("1"); +$a = new BcMath\Number("1"); $b = new MyString(); try { var_dump($a + $b); diff --git a/ext/bcmath/tests/number/gh18641.phpt b/ext/bcmath/tests/number/gh18641.phpt index ed8f55e9145a..bcce1c9c2e17 100644 --- a/ext/bcmath/tests/number/gh18641.phpt +++ b/ext/bcmath/tests/number/gh18641.phpt @@ -4,7 +4,7 @@ GH-18641 (Accessing a BcMath\Number property by ref crashes) bcmath --FILE-- value; var_dump($x); diff --git a/ext/com_dotnet/tests/27974.phpt b/ext/com_dotnet/tests/27974.phpt index ca7735a829f8..37d2ac05ce92 100644 --- a/ext/com_dotnet/tests/27974.phpt +++ b/ext/com_dotnet/tests/27974.phpt @@ -7,7 +7,7 @@ com_dotnet error_reporting(E_ALL); try { - $v = new VARIANT(array("123", "456", "789")); + $v = new variant(array("123", "456", "789")); var_dump($v); print $v[0] . "\n"; print $v[1] . "\n"; diff --git a/ext/com_dotnet/tests/bug33386.phpt b/ext/com_dotnet/tests/bug33386.phpt index 10e9021a0bc5..cc62ea0103bc 100644 --- a/ext/com_dotnet/tests/bug33386.phpt +++ b/ext/com_dotnet/tests/bug33386.phpt @@ -18,7 +18,7 @@ class twoFuncs { try { $ciTF = new twoFuncs; - $oScript = new COM("MSScriptControl.ScriptControl"); + $oScript = new com("MSScriptControl.ScriptControl"); $oScript->Language = "VBScript"; $oScript->AddObject ("tfA", $ciTF, true); diff --git a/ext/com_dotnet/tests/bug34272.phpt b/ext/com_dotnet/tests/bug34272.phpt index 27dc5142d322..d2c679b57323 100644 --- a/ext/com_dotnet/tests/bug34272.phpt +++ b/ext/com_dotnet/tests/bug34272.phpt @@ -7,7 +7,7 @@ com_dotnet error_reporting(E_ALL); try { - $dict = new COM("Scripting.Dictionary"); + $dict = new com("Scripting.Dictionary"); $dict->add('foo', array()); print sizeof($dict['foo'])."\n"; $dict->add('bar', array(23)); diff --git a/ext/com_dotnet/tests/bug39596.phpt b/ext/com_dotnet/tests/bug39596.phpt index d6215f059659..a31651dbe1e3 100644 --- a/ext/com_dotnet/tests/bug39596.phpt +++ b/ext/com_dotnet/tests/bug39596.phpt @@ -8,7 +8,7 @@ error_reporting(E_ALL); try { $binding_string = array('aaa','bbb','ccc'); - $v = new VARIANT( $binding_string, VT_ARRAY ); + $v = new variant( $binding_string, VT_ARRAY ); foreach ($v AS $element) { print $element."\n"; } diff --git a/ext/com_dotnet/tests/bug45280.phpt b/ext/com_dotnet/tests/bug45280.phpt index a461871f2f3c..195511ed0fce 100644 --- a/ext/com_dotnet/tests/bug45280.phpt +++ b/ext/com_dotnet/tests/bug45280.phpt @@ -4,7 +4,7 @@ Bug #45280 (Reflection of instantiated COM classes causes PHP to crash) com_dotnet --FILE-- --EXPECT-- diff --git a/ext/com_dotnet/tests/bug63208.phpt b/ext/com_dotnet/tests/bug63208.phpt index 67ea9f50f953..e2780e920d88 100644 --- a/ext/com_dotnet/tests/bug63208.phpt +++ b/ext/com_dotnet/tests/bug63208.phpt @@ -5,7 +5,7 @@ com_dotnet --FILE-- --FILE-- Documents->Add(); $ph = new COMPersistHelper($doc); $filename = __DIR__ . '\\..\\' . basename(__DIR__) . '\\66322.docx'; diff --git a/ext/com_dotnet/tests/bug66431_0.phpt b/ext/com_dotnet/tests/bug66431_0.phpt index ef4d63f44140..d33914ba0f4c 100644 --- a/ext/com_dotnet/tests/bug66431_0.phpt +++ b/ext/com_dotnet/tests/bug66431_0.phpt @@ -8,7 +8,7 @@ com_dotnet $text= "Xin chào cộng đồng PHP"; $fpath = str_replace("/", "\\", __DIR__ . "/bug66431.txt"); -$fso = new COM("Scripting.FileSystemObject"); +$fso = new com("Scripting.FileSystemObject"); $fh = $fso->OpenTextFile($fpath, 2, true); $fh->Write($text); $fh->Close(); diff --git a/ext/com_dotnet/tests/bug66431_1.phpt b/ext/com_dotnet/tests/bug66431_1.phpt index 7f783dbf645d..585bdaad35d6 100644 --- a/ext/com_dotnet/tests/bug66431_1.phpt +++ b/ext/com_dotnet/tests/bug66431_1.phpt @@ -5,7 +5,7 @@ com_dotnet --SKIPIF-- getMessage()); } @@ -19,7 +19,7 @@ $fpath = str_replace("/", "\\", __DIR__ . "/bug66431.docx"); com_load_typelib('Word.Application'); -$Wrd = new COM("word.application", NULL, CP_UTF8); +$Wrd = new com("word.application", NULL, CP_UTF8); $Wrd->Documents->Add(); $Wrd->Selection->TypeText($text); $Wrd->ActiveDocument->SaveAs($fpath); @@ -27,7 +27,7 @@ $Wrd->ActiveDocument->Close(false); $Wrd->Application->Quit(); unset($Wrd); -$Wrd = new COM("word.application", NULL, CP_UTF8); +$Wrd = new com("word.application", NULL, CP_UTF8); $Wrd->Documents->Open($fpath, NULL, false); $check_text = $Wrd->ActiveDocument->Range($Wrd->ActiveDocument->Sentences(1)->Start, $Wrd->ActiveDocument->Sentences(1)->End)->Text; $Wrd->ActiveDocument->Close(false); diff --git a/ext/com_dotnet/tests/bug69939.phpt b/ext/com_dotnet/tests/bug69939.phpt index d650382d9315..314c6007fd7e 100644 --- a/ext/com_dotnet/tests/bug69939.phpt +++ b/ext/com_dotnet/tests/bug69939.phpt @@ -4,7 +4,7 @@ Bug #69939 (Casting object to bool returns false) com_dotnet --FILE-- --EXPECT-- bool(true) diff --git a/ext/com_dotnet/tests/bug73679.phpt b/ext/com_dotnet/tests/bug73679.phpt index 56f02dd8f723..57406128e450 100644 --- a/ext/com_dotnet/tests/bug73679.phpt +++ b/ext/com_dotnet/tests/bug73679.phpt @@ -10,7 +10,7 @@ if (!class_exists("dotnet")) die("skip mscoree not available"); --FILE-- Push(".Net"); $stack->Push("Hello "); echo $stack->Pop() . $stack->Pop(); diff --git a/ext/com_dotnet/tests/bug77177.phpt b/ext/com_dotnet/tests/bug77177.phpt index 3395f4ed810d..201984d7b2ba 100644 --- a/ext/com_dotnet/tests/bug77177.phpt +++ b/ext/com_dotnet/tests/bug77177.phpt @@ -8,8 +8,8 @@ if (!class_exists("dotnet")) die("skip mscoree not available"); ?> --FILE-- GetFolder($fname); $folder->ParentFolder->Name = 'baz'; diff --git a/ext/com_dotnet/tests/bug79299.phpt b/ext/com_dotnet/tests/bug79299.phpt index ac4a94cd7708..e1bcf24ed5c3 100644 --- a/ext/com_dotnet/tests/bug79299.phpt +++ b/ext/com_dotnet/tests/bug79299.phpt @@ -4,7 +4,7 @@ Bug #79299 (com_print_typeinfo prints duplicate variables) com_dotnet --FILE-- unknownProperty; } catch (com_exception $ex) { diff --git a/ext/com_dotnet/tests/variants.phpt b/ext/com_dotnet/tests/variants.phpt index a145fec87ae2..c23fb0b53e48 100644 --- a/ext/com_dotnet/tests/variants.phpt +++ b/ext/com_dotnet/tests/variants.phpt @@ -9,7 +9,7 @@ if (4 != PHP_INT_SIZE) print "skip x86 only"; ?> $val) { - $v = new VARIANT($val); + $v = new variant($val); if ($t != variant_get_type($v)) { printf("Bork: [%d] %d: %s\n", $t, variant_get_type($v), $val); print $v . "\n"; diff --git a/ext/com_dotnet/tests/variants_x64.phpt b/ext/com_dotnet/tests/variants_x64.phpt index 0017ec64fd8e..34d9342aea1c 100644 --- a/ext/com_dotnet/tests/variants_x64.phpt +++ b/ext/com_dotnet/tests/variants_x64.phpt @@ -5,14 +5,14 @@ com_dotnet --SKIPIF-- --FILE-- $val) { - $v = new VARIANT($val); + $v = new variant($val); if ($t != variant_get_type($v)) { printf("Bork: [%d] %d: %s\n", $t, variant_get_type($v), $val); print $v . "\n"; diff --git a/ext/curl/tests/curl_file_upload.phpt b/ext/curl/tests/curl_file_upload.phpt index 8b85190ff41e..374ac30b6ac2 100644 --- a/ext/curl/tests/curl_file_upload.phpt +++ b/ext/curl/tests/curl_file_upload.phpt @@ -8,11 +8,11 @@ curl function testcurl($ch, $name, $mime = '', $postname = '') { if(!empty($postname)) { - $file = new CurlFile($name, $mime, $postname); + $file = new CURLFile($name, $mime, $postname); } else if(!empty($mime)) { - $file = new CurlFile($name, $mime); + $file = new CURLFile($name, $mime); } else { - $file = new CurlFile($name); + $file = new CURLFile($name); } curl_setopt($ch, CURLOPT_POSTFIELDS, array("file" => $file)); var_dump(curl_exec($ch)); @@ -29,7 +29,7 @@ testcurl($ch, __DIR__ . '/curl_testdata1.txt', 'text/plain'); testcurl($ch, __DIR__ . '/curl_testdata1.txt', '', 'foo.txt'); testcurl($ch, __DIR__ . '/curl_testdata1.txt', 'text/plain', 'foo.txt'); -$file = new CurlFile(__DIR__ . '/curl_testdata1.txt'); +$file = new CURLFile(__DIR__ . '/curl_testdata1.txt'); $file->setMimeType('text/plain'); var_dump($file->getMimeType()); var_dump($file->getFilename()); diff --git a/ext/date/php_date_arginfo.h b/ext/date/php_date_arginfo.h index 4a5a4ad32dec..a1c7052d3420 100644 --- a/ext/date/php_date_arginfo.h +++ b/ext/date/php_date_arginfo.h @@ -1046,47 +1046,47 @@ static zend_class_entry *register_class_DateTimeImmutable(zend_class_entry *clas ZVAL_STR(&attribute_NoDiscard_func_sub_0->args[0].value, attribute_NoDiscard_func_sub_0_arg0_str); attribute_NoDiscard_func_sub_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_string *attribute_name_NoDiscard_func_settimezone_0 = zend_string_init_interned("NoDiscard", sizeof("NoDiscard") - 1, true); - zend_attribute *attribute_NoDiscard_func_settimezone_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "settimezone", sizeof("settimezone") - 1), attribute_name_NoDiscard_func_settimezone_0, 1); - zend_string_release_ex(attribute_name_NoDiscard_func_settimezone_0, true); - zend_string *attribute_NoDiscard_func_settimezone_0_arg0_str = zend_string_init("as DateTimeImmutable::setTimezone() does not modify the object itself", strlen("as DateTimeImmutable::setTimezone() does not modify the object itself"), 1); - ZVAL_STR(&attribute_NoDiscard_func_settimezone_0->args[0].value, attribute_NoDiscard_func_settimezone_0_arg0_str); - attribute_NoDiscard_func_settimezone_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - - zend_string *attribute_name_NoDiscard_func_settime_0 = zend_string_init_interned("NoDiscard", sizeof("NoDiscard") - 1, true); - zend_attribute *attribute_NoDiscard_func_settime_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "settime", sizeof("settime") - 1), attribute_name_NoDiscard_func_settime_0, 1); - zend_string_release_ex(attribute_name_NoDiscard_func_settime_0, true); - zend_string *attribute_NoDiscard_func_settime_0_arg0_str = zend_string_init("as DateTimeImmutable::setTime() does not modify the object itself", strlen("as DateTimeImmutable::setTime() does not modify the object itself"), 1); - ZVAL_STR(&attribute_NoDiscard_func_settime_0->args[0].value, attribute_NoDiscard_func_settime_0_arg0_str); - attribute_NoDiscard_func_settime_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - - zend_string *attribute_name_NoDiscard_func_setdate_0 = zend_string_init_interned("NoDiscard", sizeof("NoDiscard") - 1, true); - zend_attribute *attribute_NoDiscard_func_setdate_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setdate", sizeof("setdate") - 1), attribute_name_NoDiscard_func_setdate_0, 1); - zend_string_release_ex(attribute_name_NoDiscard_func_setdate_0, true); - zend_string *attribute_NoDiscard_func_setdate_0_arg0_str = zend_string_init("as DateTimeImmutable::setDate() does not modify the object itself", strlen("as DateTimeImmutable::setDate() does not modify the object itself"), 1); - ZVAL_STR(&attribute_NoDiscard_func_setdate_0->args[0].value, attribute_NoDiscard_func_setdate_0_arg0_str); - attribute_NoDiscard_func_setdate_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - - zend_string *attribute_name_NoDiscard_func_setisodate_0 = zend_string_init_interned("NoDiscard", sizeof("NoDiscard") - 1, true); - zend_attribute *attribute_NoDiscard_func_setisodate_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setisodate", sizeof("setisodate") - 1), attribute_name_NoDiscard_func_setisodate_0, 1); - zend_string_release_ex(attribute_name_NoDiscard_func_setisodate_0, true); - zend_string *attribute_NoDiscard_func_setisodate_0_arg0_str = zend_string_init("as DateTimeImmutable::setISODate() does not modify the object itself", strlen("as DateTimeImmutable::setISODate() does not modify the object itself"), 1); - ZVAL_STR(&attribute_NoDiscard_func_setisodate_0->args[0].value, attribute_NoDiscard_func_setisodate_0_arg0_str); - attribute_NoDiscard_func_setisodate_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - - zend_string *attribute_name_NoDiscard_func_settimestamp_0 = zend_string_init_interned("NoDiscard", sizeof("NoDiscard") - 1, true); - zend_attribute *attribute_NoDiscard_func_settimestamp_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "settimestamp", sizeof("settimestamp") - 1), attribute_name_NoDiscard_func_settimestamp_0, 1); - zend_string_release_ex(attribute_name_NoDiscard_func_settimestamp_0, true); - zend_string *attribute_NoDiscard_func_settimestamp_0_arg0_str = zend_string_init("as DateTimeImmutable::setTimestamp() does not modify the object itself", strlen("as DateTimeImmutable::setTimestamp() does not modify the object itself"), 1); - ZVAL_STR(&attribute_NoDiscard_func_settimestamp_0->args[0].value, attribute_NoDiscard_func_settimestamp_0_arg0_str); - attribute_NoDiscard_func_settimestamp_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - - zend_string *attribute_name_NoDiscard_func_setmicrosecond_0 = zend_string_init_interned("NoDiscard", sizeof("NoDiscard") - 1, true); - zend_attribute *attribute_NoDiscard_func_setmicrosecond_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setmicrosecond", sizeof("setmicrosecond") - 1), attribute_name_NoDiscard_func_setmicrosecond_0, 1); - zend_string_release_ex(attribute_name_NoDiscard_func_setmicrosecond_0, true); - zend_string *attribute_NoDiscard_func_setmicrosecond_0_arg0_str = zend_string_init("as DateTimeImmutable::setMicrosecond() does not modify the object itself", strlen("as DateTimeImmutable::setMicrosecond() does not modify the object itself"), 1); - ZVAL_STR(&attribute_NoDiscard_func_setmicrosecond_0->args[0].value, attribute_NoDiscard_func_setmicrosecond_0_arg0_str); - attribute_NoDiscard_func_setmicrosecond_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + zend_string *attribute_name_NoDiscard_func_setTimezone_0 = zend_string_init_interned("NoDiscard", sizeof("NoDiscard") - 1, true); + zend_attribute *attribute_NoDiscard_func_setTimezone_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setTimezone", sizeof("setTimezone") - 1), attribute_name_NoDiscard_func_setTimezone_0, 1); + zend_string_release_ex(attribute_name_NoDiscard_func_setTimezone_0, true); + zend_string *attribute_NoDiscard_func_setTimezone_0_arg0_str = zend_string_init("as DateTimeImmutable::setTimezone() does not modify the object itself", strlen("as DateTimeImmutable::setTimezone() does not modify the object itself"), 1); + ZVAL_STR(&attribute_NoDiscard_func_setTimezone_0->args[0].value, attribute_NoDiscard_func_setTimezone_0_arg0_str); + attribute_NoDiscard_func_setTimezone_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_string *attribute_name_NoDiscard_func_setTime_0 = zend_string_init_interned("NoDiscard", sizeof("NoDiscard") - 1, true); + zend_attribute *attribute_NoDiscard_func_setTime_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setTime", sizeof("setTime") - 1), attribute_name_NoDiscard_func_setTime_0, 1); + zend_string_release_ex(attribute_name_NoDiscard_func_setTime_0, true); + zend_string *attribute_NoDiscard_func_setTime_0_arg0_str = zend_string_init("as DateTimeImmutable::setTime() does not modify the object itself", strlen("as DateTimeImmutable::setTime() does not modify the object itself"), 1); + ZVAL_STR(&attribute_NoDiscard_func_setTime_0->args[0].value, attribute_NoDiscard_func_setTime_0_arg0_str); + attribute_NoDiscard_func_setTime_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_string *attribute_name_NoDiscard_func_setDate_0 = zend_string_init_interned("NoDiscard", sizeof("NoDiscard") - 1, true); + zend_attribute *attribute_NoDiscard_func_setDate_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setDate", sizeof("setDate") - 1), attribute_name_NoDiscard_func_setDate_0, 1); + zend_string_release_ex(attribute_name_NoDiscard_func_setDate_0, true); + zend_string *attribute_NoDiscard_func_setDate_0_arg0_str = zend_string_init("as DateTimeImmutable::setDate() does not modify the object itself", strlen("as DateTimeImmutable::setDate() does not modify the object itself"), 1); + ZVAL_STR(&attribute_NoDiscard_func_setDate_0->args[0].value, attribute_NoDiscard_func_setDate_0_arg0_str); + attribute_NoDiscard_func_setDate_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_string *attribute_name_NoDiscard_func_setISODate_0 = zend_string_init_interned("NoDiscard", sizeof("NoDiscard") - 1, true); + zend_attribute *attribute_NoDiscard_func_setISODate_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setISODate", sizeof("setISODate") - 1), attribute_name_NoDiscard_func_setISODate_0, 1); + zend_string_release_ex(attribute_name_NoDiscard_func_setISODate_0, true); + zend_string *attribute_NoDiscard_func_setISODate_0_arg0_str = zend_string_init("as DateTimeImmutable::setISODate() does not modify the object itself", strlen("as DateTimeImmutable::setISODate() does not modify the object itself"), 1); + ZVAL_STR(&attribute_NoDiscard_func_setISODate_0->args[0].value, attribute_NoDiscard_func_setISODate_0_arg0_str); + attribute_NoDiscard_func_setISODate_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_string *attribute_name_NoDiscard_func_setTimestamp_0 = zend_string_init_interned("NoDiscard", sizeof("NoDiscard") - 1, true); + zend_attribute *attribute_NoDiscard_func_setTimestamp_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setTimestamp", sizeof("setTimestamp") - 1), attribute_name_NoDiscard_func_setTimestamp_0, 1); + zend_string_release_ex(attribute_name_NoDiscard_func_setTimestamp_0, true); + zend_string *attribute_NoDiscard_func_setTimestamp_0_arg0_str = zend_string_init("as DateTimeImmutable::setTimestamp() does not modify the object itself", strlen("as DateTimeImmutable::setTimestamp() does not modify the object itself"), 1); + ZVAL_STR(&attribute_NoDiscard_func_setTimestamp_0->args[0].value, attribute_NoDiscard_func_setTimestamp_0_arg0_str); + attribute_NoDiscard_func_setTimestamp_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_string *attribute_name_NoDiscard_func_setMicrosecond_0 = zend_string_init_interned("NoDiscard", sizeof("NoDiscard") - 1, true); + zend_attribute *attribute_NoDiscard_func_setMicrosecond_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setMicrosecond", sizeof("setMicrosecond") - 1), attribute_name_NoDiscard_func_setMicrosecond_0, 1); + zend_string_release_ex(attribute_name_NoDiscard_func_setMicrosecond_0, true); + zend_string *attribute_NoDiscard_func_setMicrosecond_0_arg0_str = zend_string_init("as DateTimeImmutable::setMicrosecond() does not modify the object itself", strlen("as DateTimeImmutable::setMicrosecond() does not modify the object itself"), 1); + ZVAL_STR(&attribute_NoDiscard_func_setMicrosecond_0->args[0].value, attribute_NoDiscard_func_setMicrosecond_0_arg0_str); + attribute_NoDiscard_func_setMicrosecond_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); return class_entry; } diff --git a/ext/date/tests/DatePeriod_getter.phpt b/ext/date/tests/DatePeriod_getter.phpt index 06fa03164009..66ad645c7b54 100644 --- a/ext/date/tests/DatePeriod_getter.phpt +++ b/ext/date/tests/DatePeriod_getter.phpt @@ -11,10 +11,10 @@ $period = new DatePeriod($start, $interval, $end); $recurrences = 4; var_dump($period->getStartDate()->format('Y-m-d H:i:s')); -var_dump($period->getStartDate()->getTimeZone()->getName()); +var_dump($period->getStartDate()->getTimezone()->getName()); var_dump($period->getEndDate()->format('Y-m-d H:i:s')); -var_dump($period->getEndDate()->getTimeZone()->getName()); +var_dump($period->getEndDate()->getTimezone()->getName()); var_dump($period->getDateInterval()->format('%R%y-%m-%d-%h-%i-%s')); var_dump($period->getRecurrences()); diff --git a/ext/date/tests/DateTimeImmutable_set_state.phpt b/ext/date/tests/DateTimeImmutable_set_state.phpt index 6ffbd8715028..5dcd4ac02a05 100644 --- a/ext/date/tests/DateTimeImmutable_set_state.phpt +++ b/ext/date/tests/DateTimeImmutable_set_state.phpt @@ -5,7 +5,7 @@ Mark Baker mark@lange.demon.co.uk at the PHPNW2017 Conference for PHP Testfest 2 --FILE-- $mdti->modify("+1 day")); check(fn() => $mdti->add($di)); check(fn() => $mdti->sub($di)); check(fn() => date_timezone_get($mdti)); -check(fn() => $mdti->getTimeZone()); -check(fn() => $mdti->setTimeZone($dtz)); +check(fn() => $mdti->getTimezone()); +check(fn() => $mdti->setTimezone($dtz)); check(fn() => date_offset_get($mdti)); check(fn() => $mdti->getOffset()); check(fn() => $mdti->setTime(17, 59, 53)); diff --git a/ext/date/tests/DateTimeZone_set_state.phpt b/ext/date/tests/DateTimeZone_set_state.phpt index 66c87c430f21..005b6b2f0c59 100644 --- a/ext/date/tests/DateTimeZone_set_state.phpt +++ b/ext/date/tests/DateTimeZone_set_state.phpt @@ -5,7 +5,7 @@ Mark Baker mark@lange.demon.co.uk at the PHPNW2017 Conference for PHP Testfest 2 --FILE-- getTimeZone()->getName() ); +var_dump( $object->getTimezone()->getName() ); date_default_timezone_set("America/New_York"); $object = new DateTime("2009-01-30 17:57:32"); -var_dump( $object->getTimeZone()->getName() ); +var_dump( $object->getTimezone()->getName() ); $la_time = new DateTimeZone("America/Los_Angeles"); -$object->setTimeZone($la_time); -var_dump( $object->getTimeZone()->getName() ); +$object->setTimezone($la_time); +var_dump( $object->getTimezone()->getName() ); ?> --EXPECT-- diff --git a/ext/date/tests/DateTime_setTimezone_basic1.phpt b/ext/date/tests/DateTime_setTimezone_basic1.phpt index f5d97083ae8a..a4a8f0958fee 100644 --- a/ext/date/tests/DateTime_setTimezone_basic1.phpt +++ b/ext/date/tests/DateTime_setTimezone_basic1.phpt @@ -10,7 +10,7 @@ date_default_timezone_set("Europe/London"); $datetime = new DateTime("2009-01-30 17:57:32"); echo "Default timezone: " . date_timezone_get($datetime)->getName() . "\n"; -$la_time = new DateTimezone("America/Los_Angeles"); +$la_time = new DateTimeZone("America/Los_Angeles"); $datetime->setTimezone($la_time); echo "New timezone: " . date_timezone_get($datetime)->getName() . "\n"; diff --git a/ext/date/tests/DateTime_set_state.phpt b/ext/date/tests/DateTime_set_state.phpt index cca8e3753d5d..c2434252f622 100644 --- a/ext/date/tests/DateTime_set_state.phpt +++ b/ext/date/tests/DateTime_set_state.phpt @@ -5,7 +5,7 @@ Mark Baker mark@lange.demon.co.uk at the PHPNW2017 Conference for PHP Testfest 2 --FILE-- $mdt->modify("+1 day")); check(fn() => $mdt->add($di)); check(fn() => $mdt->sub($di)); check(fn() => date_timezone_get($mdt)); -check(fn() => $mdt->getTimeZone()); +check(fn() => $mdt->getTimezone()); check(fn() => date_timezone_set($mdt, $dtz)); -check(fn() => $mdt->setTimeZone($dtz)); +check(fn() => $mdt->setTimezone($dtz)); check(fn() => date_offset_get($mdt)); check(fn() => $mdt->getOffset()); check(fn() => date_time_set($mdt, 17, 59, 53)); diff --git a/ext/date/tests/bug45529.phpt b/ext/date/tests/bug45529.phpt index 25c6f131b534..983ceb797e35 100644 --- a/ext/date/tests/bug45529.phpt +++ b/ext/date/tests/bug45529.phpt @@ -4,14 +4,14 @@ Bug #45529 (UTC not properly recognised as timezone identifier while parsing) getTimeZone(); +$tz2 = date_create('UTC')->getTimezone(); echo $tz1->getName(), PHP_EOL; echo $tz2->getName(), PHP_EOL; $d = new DateTime('2008-01-01 12:00:00+0200'); -$d->setTimeZone($tz1); +$d->setTimezone($tz1); echo $d->format(DATE_ISO8601), PHP_EOL; $d = new DateTime('2008-01-01 12:00:00+0200'); -$d->setTimeZone($tz2); +$d->setTimezone($tz2); echo $d->format(DATE_ISO8601), PHP_EOL; ?> --EXPECT-- diff --git a/ext/date/tests/bug45543.phpt b/ext/date/tests/bug45543.phpt index b96428a3d0e9..6d94e7db81ae 100644 --- a/ext/date/tests/bug45543.phpt +++ b/ext/date/tests/bug45543.phpt @@ -15,8 +15,8 @@ foreach ($test_dates as $test_date) $d2 = new DateTime('2008-01-01 12:00:00 UTC'); echo $d1->format(DATE_ISO8601), PHP_EOL; echo $d2->format(DATE_ISO8601), PHP_EOL; - $tz = $d1->getTimeZone(); - $d2->setTimeZone($tz); + $tz = $d1->getTimezone(); + $d2->setTimezone($tz); echo $d1->format(DATE_ISO8601), PHP_EOL; echo $d2->format(DATE_ISO8601), PHP_EOL; echo PHP_EOL; diff --git a/ext/date/tests/bug46108.phpt b/ext/date/tests/bug46108.phpt index 08af3356d080..bcfea76a35a1 100644 --- a/ext/date/tests/bug46108.phpt +++ b/ext/date/tests/bug46108.phpt @@ -5,7 +5,7 @@ Bug #46108 (DateTime - Memory leak when unserializing) date_default_timezone_set('America/Sao_Paulo'); -var_dump(unserialize(serialize(new Datetime))); +var_dump(unserialize(serialize(new DateTime))); ?> --EXPECTF-- diff --git a/ext/date/tests/bug48097.phpt b/ext/date/tests/bug48097.phpt index f5fbcf3ed937..4644ae350f3e 100644 --- a/ext/date/tests/bug48097.phpt +++ b/ext/date/tests/bug48097.phpt @@ -9,7 +9,7 @@ var_dump( $d ); echo $d->format( DATE_ISO8601 ), "\n"; echo $d->format( 'U' ), "\n\n"; -$d->setTimeZone( new DateTimeZone( 'Europe/Budapest' ) ); +$d->setTimezone( new DateTimeZone( 'Europe/Budapest' ) ); var_dump( $d ); echo $d->format( DATE_ISO8601 ), "\n\n"; echo $d->format( 'U' ), "\n\n"; diff --git a/ext/date/tests/bug48476.phpt b/ext/date/tests/bug48476.phpt index 4b219e541e85..a508196575a1 100644 --- a/ext/date/tests/bug48476.phpt +++ b/ext/date/tests/bug48476.phpt @@ -26,7 +26,7 @@ try { clone $o; try { - var_dump(timezone_location_get(clone new MyDateTimezone)); + var_dump(timezone_location_get(clone new MyDateTimeZone)); } catch (Error $e) { echo $e::class, ': ', $e->getMessage(), "\n"; } diff --git a/ext/date/tests/bug51987.phpt b/ext/date/tests/bug51987.phpt index 640a02177f36..9c692f0cebe9 100644 --- a/ext/date/tests/bug51987.phpt +++ b/ext/date/tests/bug51987.phpt @@ -3,7 +3,7 @@ Bug #51987 (Datetime fails to parse an ISO 8601 ordinal date (extended format)) --FILE-- --EXPECTF-- diff --git a/ext/date/tests/bug63435.phpt b/ext/date/tests/bug63435.phpt index 2bded722298f..862ef0918c0f 100644 --- a/ext/date/tests/bug63435.phpt +++ b/ext/date/tests/bug63435.phpt @@ -5,7 +5,7 @@ date.timezone=UTC --FILE-- format("u"); if ($res != $i) { echo "$i != $res\n"; diff --git a/ext/date/tests/bug67118.phpt b/ext/date/tests/bug67118.phpt index e5109aac0237..4b536777eae6 100644 --- a/ext/date/tests/bug67118.phpt +++ b/ext/date/tests/bug67118.phpt @@ -4,7 +4,7 @@ Bug #67118 crashes in DateTime when this used after failed __construct date.timezone=Europe/Berlin --FILE-- getTimestamp()); -$datetime->setTimeZone(new DateTimeZone('-03:00')); -$datetime->setTimeZone(new DateTimeZone('-03:00')); +$datetime->setTimezone(new DateTimeZone('-03:00')); +$datetime->setTimezone(new DateTimeZone('-03:00')); var_dump($datetime->getTimestamp()); -// example 2 - Timestamp keeps if you use getTimestamp() before second setTimeZone() calls +// example 2 - Timestamp keeps if you use getTimestamp() before second setTimezone() calls $datetime = new DateTime('2016-11-09 20:00:00', new DateTimeZone('UTC')); var_dump($datetime->getTimestamp()); -$datetime->setTimeZone(new DateTimeZone('-03:00')); +$datetime->setTimezone(new DateTimeZone('-03:00')); $datetime->getTimestamp(); -$datetime->setTimeZone(new DateTimeZone('-03:00')); +$datetime->setTimezone(new DateTimeZone('-03:00')); var_dump($datetime->getTimestamp()); ?> --EXPECT-- diff --git a/ext/date/tests/bug74173.phpt b/ext/date/tests/bug74173.phpt index 98d74ab59c3e..7bc5e2d7f6b7 100644 --- a/ext/date/tests/bug74173.phpt +++ b/ext/date/tests/bug74173.phpt @@ -4,7 +4,7 @@ Bug #74173 (DateTimeImmutable::getTimestamp() triggers DST switch in incorrect t setTimeZone(new \DateTimeZone('Europe/Prague')); +$prg = $utc->setTimezone(new \DateTimeZone('Europe/Prague')); echo $prg->format('c') . "\n"; $prg->getTimestamp(); echo $prg->format('c') . "\n"; diff --git a/ext/date/tests/bug76374.phpt b/ext/date/tests/bug76374.phpt index b1bf511b9772..c59cd4d6a007 100644 --- a/ext/date/tests/bug76374.phpt +++ b/ext/date/tests/bug76374.phpt @@ -4,13 +4,13 @@ Bug #76374 (Date difference varies according day time) diff($objDateFrom); echo $interval->m, "\n"; -$objDateTo = new dateTime('2017-10-01 12:00:00'); -$objDateFrom = new dateTime('2017-01-01 12:00:00'); +$objDateTo = new DateTime('2017-10-01 12:00:00'); +$objDateFrom = new DateTime('2017-01-01 12:00:00'); $interval = $objDateTo->diff($objDateFrom); echo $interval->m, "\n"; ?> diff --git a/ext/date/tests/bug76770.phpt b/ext/date/tests/bug76770.phpt index 9d01bf1d61c9..61f9d43c0ff1 100644 --- a/ext/date/tests/bug76770.phpt +++ b/ext/date/tests/bug76770.phpt @@ -2,7 +2,7 @@ Bug #76770 'U' modifier in 'datetime::createFromFormat' adds seconds to other specifiers --FILE-- getTimestamp()); +var_dump(DateTime::createFromFormat('U H', '3600 01')->getTimestamp()); ?> --EXPECT-- int(3600) diff --git a/ext/date/tests/bug80483.phpt b/ext/date/tests/bug80483.phpt index 17dbcc10aba2..119a7959e12f 100644 --- a/ext/date/tests/bug80483.phpt +++ b/ext/date/tests/bug80483.phpt @@ -6,8 +6,8 @@ date.timezone=UTC SetTime(0, 0, 0); -$the_date->SetDate(20201, 01, 01); +$the_date->setTime(0, 0, 0); +$the_date->setDate(20201, 01, 01); var_dump($the_date); diff --git a/ext/date/tests/bug81097.phpt b/ext/date/tests/bug81097.phpt index 7a3baf06a638..581126294149 100644 --- a/ext/date/tests/bug81097.phpt +++ b/ext/date/tests/bug81097.phpt @@ -2,7 +2,7 @@ Bug #81097 (DateTimeZone silently falls back to UTC when providing an offset with seconds) --FILE-- --EXPECTF-- diff --git a/ext/date/tests/bug81565.phpt b/ext/date/tests/bug81565.phpt index fff5766c7ffe..e61b79d52d00 100644 --- a/ext/date/tests/bug81565.phpt +++ b/ext/date/tests/bug81565.phpt @@ -9,7 +9,7 @@ var_export( ) ); -echo "\n", (new DatetimeZone('+01:45:30'))->getName(); +echo "\n", (new DateTimeZone('+01:45:30'))->getName(); ?> --EXPECT-- \DateTime::__set_state(array( diff --git a/ext/date/tests/date_time_immutable.phpt b/ext/date/tests/date_time_immutable.phpt index a7e0348288fa..7a64153274b3 100644 --- a/ext/date/tests/date_time_immutable.phpt +++ b/ext/date/tests/date_time_immutable.phpt @@ -78,14 +78,14 @@ $z = $v; $x = $z->setDate(5, 7, 19); dump($v, $z, $x); -echo "\nsetIsoDate():\n"; +echo "\nsetISODate():\n"; $v = date_create_immutable($current); $z = $v; -$x = $z->setIsoDate(2012, 2, 6); +$x = $z->setISODate(2012, 2, 6); dump($v, $z, $x); $v = date_create($current); $z = $v; -$x = $z->setIsoDate(2012, 2, 6); +$x = $z->setISODate(2012, 2, 6); dump($v, $z, $x); echo "\nsetTimestamp():\n"; @@ -150,7 +150,7 @@ orig: 0005-07-19 16:24:08 Europe/London copy: 0005-07-19 16:24:08 Europe/London changed: 0005-07-19 16:24:08 Europe/London -setIsoDate(): +setISODate(): orig: 2012-12-27 16:24:08 Europe/London copy: 2012-12-27 16:24:08 Europe/London changed: 2012-01-14 16:24:08 Europe/London diff --git a/ext/date/tests/date_timestamp_get.phpt b/ext/date/tests/date_timestamp_get.phpt index 2aade6db606a..a031536106b1 100644 --- a/ext/date/tests/date_timestamp_get.phpt +++ b/ext/date/tests/date_timestamp_get.phpt @@ -16,7 +16,7 @@ $beginTimestamp = date_timestamp_get($beginDtObj); var_dump($beginTimestamp); // Test the DateTime feature alias in function date_timestamp_get(). -$dateTimeTz = (new DateTime('1970-01-01T00:00:00UTC'))->getTimeStamp(); +$dateTimeTz = (new DateTime('1970-01-01T00:00:00UTC'))->getTimestamp(); var_dump($dateTimeTz === $beginTimestamp); ?> --EXPECT-- diff --git a/ext/date/tests/gh9891.phpt b/ext/date/tests/gh9891.phpt index 6d8832b0d923..951705a9812a 100644 --- a/ext/date/tests/gh9891.phpt +++ b/ext/date/tests/gh9891.phpt @@ -4,11 +4,11 @@ Bug GH-9891 (DateTime modify with unixtimestamp (@) must work like setTimestamp) modify('@1234567890'); -var_dump($m->getTimeStamp()); +var_dump($m->getTimestamp()); echo "=======\n"; -$a = new DateTime('2022-11-01 13:30:00', new DateTimezone('America/Lima')); +$a = new DateTime('2022-11-01 13:30:00', new DateTimeZone('America/Lima')); $b = clone $a; echo '$a: ', $a->format(DateTime::ATOM), "\n"; echo '$b: ', $b->format(DateTime::ATOM), "\n"; diff --git a/ext/date/tests/rfc-datetime_and_daylight_saving_time-type3-bd2.phpt b/ext/date/tests/rfc-datetime_and_daylight_saving_time-type3-bd2.phpt index 6639c4218e9e..9bfc0f51eb62 100644 --- a/ext/date/tests/rfc-datetime_and_daylight_saving_time-type3-bd2.phpt +++ b/ext/date/tests/rfc-datetime_and_daylight_saving_time-type3-bd2.phpt @@ -22,31 +22,31 @@ $tz = new DateTimeZone('America/New_York'); */ $end = new DateTime('2010-11-07 01:00:00 EST'); -$end->setTimeZone($tz); +$end->setTimezone($tz); $start = new DateTime('2010-11-07 01:59:59'); echo 'bd0 ' . $end->format($date_format) . ' - ' . $start->format($date_format) . ' = ' . $start->diff($end)->format('P%dDT%hH%iM%sS') . "\n"; $end = new DateTime('2010-11-07 01:30:00 EST'); -$end->setTimeZone($tz); +$end->setTimezone($tz); $start = new DateTime('2010-11-06 04:30:00'); echo 'bd5 ' . $end->format($date_format) . ' - ' . $start->format($date_format) . ' = ' . $start->diff($end)->format($interval_format) . "\n"; $end = new DateTime('2010-11-07 01:30:00 EDT'); -$end->setTimeZone($tz); +$end->setTimezone($tz); $start = new DateTime('2010-11-06 04:30:00'); echo 'bd6 ' . $end->format($date_format) . ' - ' . $start->format($date_format) . ' = ' . $start->diff($end)->format($interval_format) . "\n"; $end = new DateTime('2010-11-07 01:00:00 EST'); -$end->setTimeZone($tz); +$end->setTimezone($tz); $start = new DateTime('2010-11-06 01:00:00'); echo 'bd8a ' . $end->format($date_format) . ' - ' . $start->format($date_format) . ' = ' . $start->diff($end)->format($interval_format) . "\n"; $end = new DateTime('2010-11-07 01:00:00 EDT'); -$end->setTimeZone($tz); +$end->setTimezone($tz); $start = new DateTime('2010-11-06 01:00:00'); echo 'bd8b ' . $end->format($date_format) . ' - ' . $start->format($date_format) . ' = ' . $start->diff($end)->format($interval_format) . "\n"; diff --git a/ext/date/tests/rfc-datetime_and_daylight_saving_time-type3-bs.phpt b/ext/date/tests/rfc-datetime_and_daylight_saving_time-type3-bs.phpt index d195cb2f758a..37311360fdc1 100644 --- a/ext/date/tests/rfc-datetime_and_daylight_saving_time-type3-bs.phpt +++ b/ext/date/tests/rfc-datetime_and_daylight_saving_time-type3-bs.phpt @@ -15,7 +15,7 @@ $interval_format = 'P%dDT%hH'; */ $end = new DateTime('2010-11-07 01:00:00 EST'); -$end->setTimeZone($tz); +$end->setTimezone($tz); $interval_spec = 'PT1S'; $interval = new DateInterval($interval_spec); echo 'bs1 ' . $end->format($date_format) . " - $interval_spec = " @@ -40,14 +40,14 @@ echo 'bs4 ' . $end->format($date_format) . " - $interval_spec = " . $end->sub($interval)->format($date_format) . "\n"; $end = new DateTime('2010-11-07 01:30:00 EST'); -$end->setTimeZone($tz); +$end->setTimezone($tz); $interval_spec = 'PT22H'; $interval = new DateInterval($interval_spec); echo 'bs5 ' . $end->format($date_format) . " - $interval_spec = " . $end->sub($interval)->format($date_format) . "\n"; $end = new DateTime('2010-11-07 01:30:00 EDT'); -$end->setTimeZone($tz); +$end->setTimezone($tz); $interval_spec = 'PT21H'; $interval = new DateInterval($interval_spec); echo 'bs6 ' . $end->format($date_format) . " - $interval_spec = " @@ -60,7 +60,7 @@ echo 'bs7 ' . $end->format($date_format) . " - $interval_spec = " . $end->sub($interval)->format($date_format) . "\n"; $end = new DateTime('2010-11-07 01:30:00 EST'); -$end->setTimeZone($tz); +$end->setTimezone($tz); $interval_spec = 'P1DT1H'; $interval = new DateInterval($interval_spec); echo 'bs8 ' . $end->format($date_format) . " - $interval_spec = " diff --git a/ext/date/tests/timezones-list.phpt b/ext/date/tests/timezones-list.phpt index 599849874219..369f2c67b09e 100644 --- a/ext/date/tests/timezones-list.phpt +++ b/ext/date/tests/timezones-list.phpt @@ -3,9 +3,9 @@ timezone_identifiers_list() --FILE-- getMessage(); } diff --git a/ext/dom/tests/DOMComment_appendData_basic.phpt b/ext/dom/tests/DOMComment_appendData_basic.phpt index 5411df7e6619..eb19c034aa11 100644 --- a/ext/dom/tests/DOMComment_appendData_basic.phpt +++ b/ext/dom/tests/DOMComment_appendData_basic.phpt @@ -8,7 +8,7 @@ dom --FILE-- createComment('test-comment'); $comment->appendData('-more-data'); $dom->appendChild($comment); diff --git a/ext/dom/tests/DOMComment_insertData_basic.phpt b/ext/dom/tests/DOMComment_insertData_basic.phpt index 0d679cdefcab..0309aa1158a4 100644 --- a/ext/dom/tests/DOMComment_insertData_basic.phpt +++ b/ext/dom/tests/DOMComment_insertData_basic.phpt @@ -9,7 +9,7 @@ dom createComment('test-comment'); $comment->insertData(4,'-inserted'); $dom->appendChild($comment); diff --git a/ext/dom/tests/DOMComment_insertData_error1.phpt b/ext/dom/tests/DOMComment_insertData_error1.phpt index 013ad8865e6d..ed879c0238cb 100644 --- a/ext/dom/tests/DOMComment_insertData_error1.phpt +++ b/ext/dom/tests/DOMComment_insertData_error1.phpt @@ -9,7 +9,7 @@ dom createComment('test-comment'); try { $comment->insertData(-1,'-inserted'); diff --git a/ext/dom/tests/DOMComment_insertData_error2.phpt b/ext/dom/tests/DOMComment_insertData_error2.phpt index 06e36354cd9a..c6c84cad9e45 100644 --- a/ext/dom/tests/DOMComment_insertData_error2.phpt +++ b/ext/dom/tests/DOMComment_insertData_error2.phpt @@ -9,7 +9,7 @@ dom createComment('test-comment'); try { $comment->insertData(999,'-inserted'); diff --git a/ext/dom/tests/DOMComment_replaceData_basic.phpt b/ext/dom/tests/DOMComment_replaceData_basic.phpt index 6f8e7a36eb9f..be4d33ac2bec 100644 --- a/ext/dom/tests/DOMComment_replaceData_basic.phpt +++ b/ext/dom/tests/DOMComment_replaceData_basic.phpt @@ -8,14 +8,14 @@ dom --FILE-- createComment('test-comment'); $comment->replaceData(4,1,'replaced'); $dom->appendChild($comment); echo $dom->saveXML(); // Replaces rest of string if count is greater than length of existing string -$dom = new DomDocument(); +$dom = new DOMDocument(); $comment = $dom->createComment('test-comment'); $comment->replaceData(0,50,'replaced'); $dom->appendChild($comment); diff --git a/ext/dom/tests/DOMComment_replaceData_error1.phpt b/ext/dom/tests/DOMComment_replaceData_error1.phpt index 86c6d4b23a5c..60ab0372565b 100644 --- a/ext/dom/tests/DOMComment_replaceData_error1.phpt +++ b/ext/dom/tests/DOMComment_replaceData_error1.phpt @@ -9,7 +9,7 @@ dom createComment('test-comment'); try { $comment->replaceData(-1,4,'-inserted'); diff --git a/ext/dom/tests/DOMComment_replaceData_error2.phpt b/ext/dom/tests/DOMComment_replaceData_error2.phpt index ca1c5ae9b34c..da3b4a081ef5 100644 --- a/ext/dom/tests/DOMComment_replaceData_error2.phpt +++ b/ext/dom/tests/DOMComment_replaceData_error2.phpt @@ -9,7 +9,7 @@ dom createComment('test-comment'); try { $comment->replaceData(999,4,'-inserted'); diff --git a/ext/dom/tests/DOMDocument_createEntityReference_error1.phpt b/ext/dom/tests/DOMDocument_createEntityReference_error1.phpt index 381dd3d5557f..3181defd9d68 100644 --- a/ext/dom/tests/DOMDocument_createEntityReference_error1.phpt +++ b/ext/dom/tests/DOMDocument_createEntityReference_error1.phpt @@ -4,7 +4,7 @@ DomDocument::createEntityReference() - DOM_INVALID_CHARACTER_ERR raised if name dom --FILE-- createEntityReference('!'); diff --git a/ext/dom/tests/DOMDocument_saveHTML_variant2.phpt b/ext/dom/tests/DOMDocument_saveHTML_variant2.phpt index dcea0875c36d..f25435d12577 100644 --- a/ext/dom/tests/DOMDocument_saveHTML_variant2.phpt +++ b/ext/dom/tests/DOMDocument_saveHTML_variant2.phpt @@ -17,8 +17,8 @@ EOD; $d->loadHTML($str); $e = $d->getElementsByTagName("p"); $e = $e->item(0); -echo $d->saveXml($e),"\n"; -echo $d->saveHtml($e),"\n"; +echo $d->saveXML($e),"\n"; +echo $d->saveHTML($e),"\n"; ?> --EXPECT--

Hi.
there

diff --git a/ext/dom/tests/DOMNamedNodeMap_count.phpt b/ext/dom/tests/DOMNamedNodeMap_count.phpt index d5e36b9157d5..61fc81271870 100644 --- a/ext/dom/tests/DOMNamedNodeMap_count.phpt +++ b/ext/dom/tests/DOMNamedNodeMap_count.phpt @@ -7,7 +7,7 @@ dom --FILE-- createElement('root'); $document->appendChild($root); for($i = 0; $i < 5; $i++) { diff --git a/ext/dom/tests/DOMNamedNodeMap_edge_case_offset.phpt b/ext/dom/tests/DOMNamedNodeMap_edge_case_offset.phpt index 30a961143c77..578728658188 100644 --- a/ext/dom/tests/DOMNamedNodeMap_edge_case_offset.phpt +++ b/ext/dom/tests/DOMNamedNodeMap_edge_case_offset.phpt @@ -5,7 +5,7 @@ dom --FILE-- createElement('root'); $document->appendChild($root); $root->setAttribute('attrib', 'value'); diff --git a/ext/dom/tests/DOMXPath_callables.phpt b/ext/dom/tests/DOMXPath_callables.phpt index 3d20527475da..57219cc9434d 100644 --- a/ext/dom/tests/DOMXPath_callables.phpt +++ b/ext/dom/tests/DOMXPath_callables.phpt @@ -36,7 +36,7 @@ try { echo "--- Legit cases: all ---\n"; -$xpath->registerPHPFunctions(null); +$xpath->registerPhpFunctions(null); $xpath->evaluate("//a[php:function('var_dump', string(@href))]"); $xpath->evaluate("//a[php:function('MyClass::dump', string(@href))]"); @@ -45,7 +45,7 @@ echo "--- Legit cases: set ---\n"; $xpath = new DOMXPath($doc); $xpath->registerNamespace("php", "http://php.net/xpath"); $xpath->registerPhpFunctions([]); -$xpath->registerPHPFunctions(["xyz" => MyClass::dump(...), "mydump" => function (string $x) { +$xpath->registerPhpFunctions(["xyz" => MyClass::dump(...), "mydump" => function (string $x) { var_dump($x); }]); $xpath->registerPhpFunctions(str_repeat("var_dump", mt_rand(1, 1) /* defeat SCCP */)); diff --git a/ext/dom/tests/DomNodeList_count.phpt b/ext/dom/tests/DomNodeList_count.phpt index 08ce2ada7dc9..2454bd486d9d 100644 --- a/ext/dom/tests/DomNodeList_count.phpt +++ b/ext/dom/tests/DomNodeList_count.phpt @@ -7,7 +7,7 @@ dom --FILE-- createElement('root'); $document->appendChild($root); for($i = 0; $i < 5; $i++) { diff --git a/ext/dom/tests/bug28721.phpt b/ext/dom/tests/bug28721.phpt index 791d9605ea99..e2c2ceae0859 100644 --- a/ext/dom/tests/bug28721.phpt +++ b/ext/dom/tests/bug28721.phpt @@ -4,11 +4,11 @@ Bug #28721 (appendChild() and insertBefore() unset DOMText) dom --FILE-- nodeName . " (" . $node->nodeValue . ")\n"; } -function print_node_r(DomNode $node) { +function print_node_r(DOMNode $node) { static $indent = ""; echo "\n" . $indent; print_node($node); @@ -50,7 +50,7 @@ function err_handler($errno, $errstr, $errfile, $errline) { // Record 'DocumentFragment is empty' warnings set_error_handler("err_handler", E_WARNING); -$xml = new DomDocument(); +$xml = new DOMDocument(); $p = $xml->createElement("p"); @@ -94,7 +94,7 @@ $frag = $xml->createDocumentFragment(); $t5 = $frag->appendChild($xml->createTextNode(" t5 ")); $frag->appendChild($i = $xml->createElement("i")); $i->appendChild($xml->createTextNode(" frob ")); -$frag->appendChild($xml->createTextNOde(" t6 ")); +$frag->appendChild($xml->createTextNode(" t6 ")); echo "\np:\n"; print_node_r($p); diff --git a/ext/dom/tests/bug28817.phpt b/ext/dom/tests/bug28817.phpt index 6298038e5ec5..2ae8c6e09da7 100644 --- a/ext/dom/tests/bug28817.phpt +++ b/ext/dom/tests/bug28817.phpt @@ -5,7 +5,7 @@ dom --FILE-- createDocumentFragment(); $frag->appendChild(new DOMElement('root')); $dom->appendChild($frag); diff --git a/ext/dom/tests/bug36756.phpt b/ext/dom/tests/bug36756.phpt index 9a6ec8ed3f4a..1da1acbfa3e0 100644 --- a/ext/dom/tests/bug36756.phpt +++ b/ext/dom/tests/bug36756.phpt @@ -8,14 +8,14 @@ dom /* Node is preserved from removeChild */ $dom = new DOMDocument(); $dom->loadXML(''); -$xpath = new DOMXpath($dom); +$xpath = new DOMXPath($dom); $node = $xpath->query('/root')->item(0); echo $node->nodeName . "\n"; $dom->removeChild($GLOBALS['dom']->firstChild); echo "nodeType: " . $node->nodeType . "\n"; /* Node gets destroyed during removeChild */ $dom->loadXML(''); -$xpath = new DOMXpath($dom); +$xpath = new DOMXPath($dom); $node = $xpath->query('//child')->item(0); echo $node->nodeName . "\n"; $GLOBALS['dom']->removeChild($GLOBALS['dom']->firstChild); diff --git a/ext/dom/tests/bug37277.phpt b/ext/dom/tests/bug37277.phpt index 8c21d9aa2609..5d95fe8ed3dd 100644 --- a/ext/dom/tests/bug37277.phpt +++ b/ext/dom/tests/bug37277.phpt @@ -4,14 +4,14 @@ Bug #37277 (cloning Dom Documents or Nodes does not work) dom --FILE-- '; -$dom1->loadXml($xml); +$dom1->loadXML($xml); $node = clone $dom1->documentElement; -$dom2 = new DomDocument('1.0', 'UTF-8'); +$dom2 = new DOMDocument('1.0', 'UTF-8'); $dom2->appendChild($dom2->importNode($node->cloneNode(true), TRUE)); print $dom2->saveXML(); diff --git a/ext/dom/tests/bug38474.phpt b/ext/dom/tests/bug38474.phpt index 81989f30bd8e..56247d419114 100644 --- a/ext/dom/tests/bug38474.phpt +++ b/ext/dom/tests/bug38474.phpt @@ -13,7 +13,7 @@ if (version_compare(LIBXML_DOTTED_VERSION, "2.6.20", "<")) { $xml = ''; -$dom = new DomDocument(); +$dom = new DOMDocument(); $dom->loadXML($xml); echo $dom->firstChild->getAttribute('type')."\n"; echo $dom->firstChild->getAttribute('pre:type')."\n"; diff --git a/ext/dom/tests/bug43364.phpt b/ext/dom/tests/bug43364.phpt index ea7b52742e2a..22524669f4a2 100644 --- a/ext/dom/tests/bug43364.phpt +++ b/ext/dom/tests/bug43364.phpt @@ -30,8 +30,8 @@ $xml = << DOC; -$doc = new DomDocument(); -$doc->loadXml($xml); +$doc = new DOMDocument(); +$doc->loadXML($xml); $doc->xinclude(); $count = loopElements(array($doc->documentElement)); diff --git a/ext/dom/tests/bug45251.phpt b/ext/dom/tests/bug45251.phpt index 2dbbd0d0cb96..872df2231a40 100644 --- a/ext/dom/tests/bug45251.phpt +++ b/ext/dom/tests/bug45251.phpt @@ -5,7 +5,7 @@ dom --FILE-- loadXml(<<loadXML(<< diff --git a/ext/dom/tests/bug66783.phpt b/ext/dom/tests/bug66783.phpt index a9feba9529a3..0387404590de 100644 --- a/ext/dom/tests/bug66783.phpt +++ b/ext/dom/tests/bug66783.phpt @@ -4,7 +4,7 @@ Bug #66783 (UAF when appending DOMDocument to element) dom --FILE-- loadXML(''); $e = $doc->createElement('e'); try { diff --git a/ext/dom/tests/bug69373.phpt b/ext/dom/tests/bug69373.phpt index b51557a3cafd..3ede7597c63e 100644 --- a/ext/dom/tests/bug69373.phpt +++ b/ext/dom/tests/bug69373.phpt @@ -7,7 +7,7 @@ dom $doc = new DOMDocument(); for( $i=0; $i<20; $i++ ) { $doc->loadXML(""); - $xpath = new DOMXpath($doc); + $xpath = new DOMXPath($doc); $all = $xpath->query('//*'); $doc->firstChild->nodeValue = ''; } diff --git a/ext/dom/tests/bug75451.phpt b/ext/dom/tests/bug75451.phpt index 7552d673272f..30a11b32390d 100644 --- a/ext/dom/tests/bug75451.phpt +++ b/ext/dom/tests/bug75451.phpt @@ -6,7 +6,7 @@ dom loadXML(''); -$xpath = new DOMXpath($dom); +$xpath = new DOMXPath($dom); foreach($xpath->query('/root/noexist') as $child) { var_dump($child); } diff --git a/ext/dom/tests/bug79852.phpt b/ext/dom/tests/bug79852.phpt index 9832994be502..5600309bf393 100644 --- a/ext/dom/tests/bug79852.phpt +++ b/ext/dom/tests/bug79852.phpt @@ -13,8 +13,8 @@ $XML = <<< XML XML; -$dom = new DomDocument(); -$dom->loadXml($XML); +$dom = new DOMDocument(); +$dom->loadXML($XML); $items = $dom->getElementsByTagName('item'); echo "Count: ".count($items)."\n"; diff --git a/ext/dom/tests/clone_attribute_namespace_01.phpt b/ext/dom/tests/clone_attribute_namespace_01.phpt index 7870cbe82afd..a76acb9cfef8 100644 --- a/ext/dom/tests/clone_attribute_namespace_01.phpt +++ b/ext/dom/tests/clone_attribute_namespace_01.phpt @@ -8,9 +8,9 @@ dom function createTestDocument() { $dom = new DOMDocument; $dom->loadXML(''); - $dom->documentElement->setAttributeNs("some:ns", "foo:bar", "value"); + $dom->documentElement->setAttributeNS("some:ns", "foo:bar", "value"); - $attr = $dom->documentElement->getAttributeNodeNs("some:ns", "bar"); + $attr = $dom->documentElement->getAttributeNodeNS("some:ns", "bar"); $clone = $attr->cloneNode(true); return [$dom, $clone]; @@ -22,16 +22,16 @@ var_dump($clone->prefix, $clone->namespaceURI); echo "--- Re-adding a namespaced attribute ---\n"; [$dom, $clone] = createTestDocument(); -$dom->documentElement->removeAttributeNs("some:ns", "bar"); +$dom->documentElement->removeAttributeNS("some:ns", "bar"); echo $dom->saveXML(); -$dom->documentElement->setAttributeNodeNs($clone); +$dom->documentElement->setAttributeNodeNS($clone); echo $dom->saveXML(); echo "--- Re-adding a namespaced attribute, with the namespace deleted (setAttributeNodeNs variation) ---\n"; function readd_test(string $method) { [$dom, $clone] = createTestDocument(); - $dom->documentElement->removeAttributeNs("some:ns", "bar"); + $dom->documentElement->removeAttributeNS("some:ns", "bar"); $dom->documentElement->removeAttribute("xmlns:foo"); echo $dom->saveXML(); $child = $dom->documentElement->appendChild($dom->createElement("child")); @@ -39,7 +39,7 @@ function readd_test(string $method) { echo $dom->saveXML(); } -readd_test("setAttributeNodeNs"); +readd_test("setAttributeNodeNS"); echo "--- Re-adding a namespaced attribute, with the namespace deleted (setAttributeNode variation) ---\n"; diff --git a/ext/dom/tests/clone_attribute_namespace_02.phpt b/ext/dom/tests/clone_attribute_namespace_02.phpt index 382be68cedb9..31fdf657019b 100644 --- a/ext/dom/tests/clone_attribute_namespace_02.phpt +++ b/ext/dom/tests/clone_attribute_namespace_02.phpt @@ -13,8 +13,8 @@ $dom->loadXML(<< XML); -$clone = $dom->documentElement->getAttributeNodeNs("some:ns", "bar")->cloneNode(true); -$dom->documentElement->firstElementChild->setAttributeNodeNs($clone); +$clone = $dom->documentElement->getAttributeNodeNS("some:ns", "bar")->cloneNode(true); +$dom->documentElement->firstElementChild->setAttributeNodeNS($clone); echo $dom->saveXML(); diff --git a/ext/dom/tests/delayed_freeing/element_uaf_crash.phpt b/ext/dom/tests/delayed_freeing/element_uaf_crash.phpt index 0a49773d3551..f7f39a3cde81 100644 --- a/ext/dom/tests/delayed_freeing/element_uaf_crash.phpt +++ b/ext/dom/tests/delayed_freeing/element_uaf_crash.phpt @@ -4,7 +4,7 @@ Delayed freeing should not cause a UAF dom --FILE-- createElement("div"); $d->appendChild($b = $xml->createElement("b")); $ret = $d->appendChild($xml->createElement("xxx")); diff --git a/ext/dom/tests/dom001.phpt b/ext/dom/tests/dom001.phpt index 3f2ddef825ff..bb6eefb640a5 100644 --- a/ext/dom/tests/dom001.phpt +++ b/ext/dom/tests/dom001.phpt @@ -7,8 +7,8 @@ dom require_once("dom_test.inc"); echo "Test 1: accessing single nodes from php\n"; -$dom = new domDocument; -$dom->loadxml($xmlstr); +$dom = new DOMDocument; +$dom->loadXML($xmlstr); if(!$dom) { echo "Error while parsing the document\n"; exit; @@ -69,7 +69,7 @@ $children = $attrs->item(0)->childNodes; print_node_list($children); echo "--------- Add child to root\n"; -$myelement = new domElement("Silly", "Symphony"); +$myelement = new DOMElement("Silly", "Symphony"); $newchild = $rootnode->appendChild($myelement); print_node($newchild); print $dom->saveXML(); @@ -77,7 +77,7 @@ print "\n"; echo "--------- Find element by tagname\n"; echo " Using dom\n"; -$children = $dom->getElementsByTagname("Silly"); +$children = $dom->getElementsByTagName("Silly"); print_node_list($children); echo " Using elem\n"; @@ -88,7 +88,7 @@ echo "--------- Unlink Node\n"; print_node($children->item(0)); $rootnode->removeChild($children->item(0)); print_node_list($rootnode->childNodes); -print $dom->savexml(); +print $dom->saveXML(); echo "--------- Find element by id\n"; print ("Not implemented\n"); diff --git a/ext/dom/tests/dom003.phpt b/ext/dom/tests/dom003.phpt index eb7c70cffbb6..dc30998b3a30 100644 --- a/ext/dom/tests/dom003.phpt +++ b/ext/dom/tests/dom003.phpt @@ -5,13 +5,13 @@ dom --FILE-- load(__DIR__."/book.xml"); $rootNode = $dom->documentElement; print "--- Catch exception with try/catch\n"; try { $rootNode->appendChild($rootNode); -} catch (domexception $e) { +} catch (DOMException $e) { ob_start(); var_dump($e); $contents = ob_get_contents(); diff --git a/ext/dom/tests/dom004.phpt b/ext/dom/tests/dom004.phpt index 8656d2becf7b..2470d0ce1815 100644 --- a/ext/dom/tests/dom004.phpt +++ b/ext/dom/tests/dom004.phpt @@ -8,7 +8,7 @@ in_array('compress.zlib', stream_get_wrappers()) or die('skip compress.zlib wrap ?> --FILE-- load("compress.zlib://" . str_replace("\\", "/", __DIR__) . "/book.xml.gz"); print $dom->saveXML(); ?> diff --git a/ext/dom/tests/dom005.phpt b/ext/dom/tests/dom005.phpt index f8dd1d730c13..5f7a66269505 100644 --- a/ext/dom/tests/dom005.phpt +++ b/ext/dom/tests/dom005.phpt @@ -4,7 +4,7 @@ Test 5: HTML Test dom --FILE-- loadHTMLFile(__DIR__."/test.html", LIBXML_NOBLANKS); print "--- save as XML\n"; diff --git a/ext/dom/tests/dom006.phpt b/ext/dom/tests/dom006.phpt index 9b0d714712d5..e1c4401ffc7b 100644 --- a/ext/dom/tests/dom006.phpt +++ b/ext/dom/tests/dom006.phpt @@ -5,7 +5,7 @@ dom --FILE-- createElement("title"); $titleElement->appendChild($this->createTextNode($title)); diff --git a/ext/dom/tests/dom_create_element.phpt b/ext/dom/tests/dom_create_element.phpt index 19acb5614d57..676f569032be 100644 --- a/ext/dom/tests/dom_create_element.phpt +++ b/ext/dom/tests/dom_create_element.phpt @@ -7,7 +7,7 @@ dom print " 1 DOMDocument::createElement('valid')\n"; try { - $dom = new domDocument; + $dom = new DOMDocument; $dom->createElement('valid'); print "valid\n"; } catch (Exception $e) { @@ -16,7 +16,7 @@ try { print " 2 DOMDocument::createElement('-invalid')\n"; try { - $dom = new domDocument; + $dom = new DOMDocument; $dom->createElement('-invalid'); print "valid\n"; } catch (Exception $e) { @@ -25,7 +25,7 @@ try { print " 3 DOMDocument::createElement(' ')\n"; try { - $dom = new domDocument; + $dom = new DOMDocument; $dom->createElement(' '); print "valid\n"; } catch (Exception $e) { @@ -34,7 +34,7 @@ try { print " 4 DOMDocument::createElement('prefix:valid')\n"; try { - $dom = new domDocument; + $dom = new DOMDocument; $dom->createElement('prefix:valid'); print "valid\n"; } catch (Exception $e) { @@ -43,7 +43,7 @@ try { print " 5 DOMDocument::createElementNS('http://valid.com', 'valid')\n"; try { - $dom = new domDocument; + $dom = new DOMDocument; $dom->createElementNS('http://valid.com', 'valid'); print "valid\n"; } catch (Exception $e) { @@ -52,7 +52,7 @@ try { print " 6 DOMDocument::createElementNS('http://valid.com', 'prefix:valid')\n"; try { - $dom = new domDocument; + $dom = new DOMDocument; $dom->createElementNS('http://valid.com', 'prefix:valid'); print "valid\n"; } catch (Exception $e) { @@ -61,7 +61,7 @@ try { print " 7 DOMDocument::createElementNS('http://valid.com', '-invalid')\n"; try { - $dom = new domDocument; + $dom = new DOMDocument; $dom->createElementNS('http://valid.com', '-invalid'); print "valid\n"; } catch (Exception $e) { @@ -70,7 +70,7 @@ try { print " 8 DOMDocument::createElementNS('http://valid.com', 'prefix:-invalid')\n"; try { - $dom = new domDocument; + $dom = new DOMDocument; $dom->createElementNS('http://valid.com', 'prefix:-invalid'); print "valid\n"; } catch (Exception $e) { @@ -79,7 +79,7 @@ try { print " 9 DOMDocument::createElementNS('', 'prefix:invalid')\n"; try { - $dom = new domDocument; + $dom = new DOMDocument; $dom->createElementNS('', 'prefix:invalid'); print "valid\n"; } catch (Exception $e) { @@ -88,7 +88,7 @@ try { print "10 DOMDocument::createElementNS('http://valid.com', 'prefix:valid:invalid')\n"; try { - $dom = new domDocument; + $dom = new DOMDocument; $dom->createElementNS('http://valid.com', 'prefix:valid:invalid'); print "valid\n"; } catch (Exception $e) { @@ -97,7 +97,7 @@ try { print "11 DOMDocument::createElementNS('http://valid.com', '-prefix:valid')\n"; try { - $dom = new domDocument; + $dom = new DOMDocument; $dom->createElementNS('http://valid.com', '-prefix:valid'); print "valid\n"; } catch (Exception $e) { @@ -106,7 +106,7 @@ try { print "12 DOMDocument::createElementNS('-', 'prefix:valid')\n"; try { - $dom = new domDocument; + $dom = new DOMDocument; $dom->createElementNS('-', 'prefix:valid'); print "valid\n"; } catch (Exception $e) { @@ -116,7 +116,7 @@ try { print "13 DOMElement::__construct('valid')\n"; try { - $element = new DomElement('valid'); + $element = new DOMElement('valid'); print "valid\n"; } catch (Exception $e) { print $e->getMessage() . "\n"; @@ -124,7 +124,7 @@ try { print "14 DOMElement::__construct('-invalid')\n"; try { - $element = new DomElement('-invalid'); + $element = new DOMElement('-invalid'); print "valid\n"; } catch (Exception $e) { print $e->getMessage() . "\n"; @@ -132,7 +132,7 @@ try { print "15 DOMElement::__construct(' ')\n"; try { - $element = new DomElement(' '); + $element = new DOMElement(' '); print "valid\n"; } catch (Exception $e) { print $e->getMessage() . "\n"; @@ -140,7 +140,7 @@ try { print "16 DOMElement::__construct('prefix:valid')\n"; try { - $element = new DomElement('prefix:valid'); + $element = new DOMElement('prefix:valid'); print "valid\n"; } catch (Exception $e) { print $e->getMessage() . "\n"; @@ -148,7 +148,7 @@ try { print "17 DOMElement::__construct('valid', '', 'http://valid.com')\n"; try { - $element = new DomElement('valid', '', 'http://valid.com'); + $element = new DOMElement('valid', '', 'http://valid.com'); print "valid\n"; } catch (Exception $e) { print $e->getMessage() . "\n"; @@ -156,7 +156,7 @@ try { print "18 DOMElement::__construct('prefix:valid', '', 'http://valid.com')\n"; try { - $element = new DomElement('prefix:valid', '', 'http://valid.com'); + $element = new DOMElement('prefix:valid', '', 'http://valid.com'); print "valid\n"; } catch (Exception $e) { print $e->getMessage() . "\n"; @@ -164,7 +164,7 @@ try { print "19 DOMElement::__construct('-invalid', '', 'http://valid.com')\n"; try { - $element = new DomElement('-invalid', '', 'http://valid.com'); + $element = new DOMElement('-invalid', '', 'http://valid.com'); print "valid\n"; } catch (Exception $e) { print $e->getMessage() . "\n"; @@ -172,7 +172,7 @@ try { print "20 DOMElement::__construct('prefix:-invalid', '', 'http://valid.com')\n"; try { - $element = new DomElement('prefix:-invalid', '', 'http://valid.com'); + $element = new DOMElement('prefix:-invalid', '', 'http://valid.com'); print "valid\n"; } catch (Exception $e) { print $e->getMessage() . "\n"; @@ -180,7 +180,7 @@ try { print "21 DOMElement::__construct('prefix:invalid', '', '')\n"; try { - $element = new DomElement('prefix:invalid', '', ''); + $element = new DOMElement('prefix:invalid', '', ''); print "valid\n"; } catch (Exception $e) { print $e->getMessage() . "\n"; @@ -188,7 +188,7 @@ try { print "22 DOMElement::__construct('prefix:valid:invalid', '', 'http://valid.com')\n"; try { - $element = new DomElement('prefix:valid:invalid', '', 'http://valid.com'); + $element = new DOMElement('prefix:valid:invalid', '', 'http://valid.com'); print "valid\n"; } catch (Exception $e) { print $e->getMessage() . "\n"; @@ -196,7 +196,7 @@ try { print "23 DOMElement::__construct('-prefix:valid', '', 'http://valid.com')\n"; try { - $element = new DomElement('-prefix:valid', '', 'http://valid.com'); + $element = new DOMElement('-prefix:valid', '', 'http://valid.com'); print "valid\n"; } catch (Exception $e) { print $e->getMessage() . "\n"; @@ -204,7 +204,7 @@ try { print "24 DOMElement::__construct('prefix:valid', '', '-')\n"; try { - $element = new DomElement('prefix:valid', '', '-'); + $element = new DOMElement('prefix:valid', '', '-'); print "valid\n"; } catch (Exception $e) { print $e->getMessage() . "\n"; @@ -214,7 +214,7 @@ try { print "25 DOMDocument::createElementNS('', 'prefix:valid')\n"; try { - $dom = new domDocument; + $dom = new DOMDocument; $dom->createElementNS('', 'prefix:valid'); print "valid\n"; } catch (Exception $e) { @@ -226,7 +226,7 @@ try { print "26 DOMDocument::createElementNS('http://wrong.namespaceURI.com', 'xml:valid')\n"; try { - $dom = new domDocument; + $dom = new DOMDocument; $dom->createElementNS('http://wrong.namespaceURI.com', 'xml:valid'); print "valid\n"; } catch (Exception $e) { @@ -235,7 +235,7 @@ try { print "27 DOMElement::__construct('xml:valid', '', 'http://wrong.namespaceURI.com')\n"; try { - $element = new DomElement('xml:valid', '', 'http://wrong.namespaceURI.com'); + $element = new DOMElement('xml:valid', '', 'http://wrong.namespaceURI.com'); print "valid\n"; } catch (Exception $e) { print $e->getMessage() . "\n"; @@ -244,7 +244,7 @@ try { /* This is okay because we reuse the xml namespace from the document */ print "28 DOMDocument::createElementNS('http://www.w3.org/XML/1998/namespace', 'xml:valid')\n"; try { - $dom = new domDocument; + $dom = new DOMDocument; $dom->createElementNS('http://www.w3.org/XML/1998/namespace', 'xml:valid'); print "valid\n"; } catch (Exception $e) { @@ -262,7 +262,7 @@ try { print "30 DOMDocument::createElementNS('http://wrong.namespaceURI.com', 'xmlns:valid')\n"; try { - $dom = new domDocument; + $dom = new DOMDocument; $dom->createElementNS('http://wrong.namespaceURI.com', 'xmlns:valid'); print "valid\n"; } catch (Exception $e) { @@ -271,7 +271,7 @@ try { print "31 DOMElement::__construct('xmlns:valid', '', 'http://wrong.namespaceURI.com')\n"; try { - $element = new DomElement('xmlns:valid', '', 'http://wrong.namespaceURI.com'); + $element = new DOMElement('xmlns:valid', '', 'http://wrong.namespaceURI.com'); print "valid\n"; } catch (Exception $e) { print $e->getMessage() . "\n"; @@ -279,7 +279,7 @@ try { print "32 DOMDocument::createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns:valid')\n"; try { - $dom = new domDocument; + $dom = new DOMDocument; $dom->createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns:valid'); print "valid\n"; } catch (Exception $e) { @@ -288,7 +288,7 @@ try { print "33 DOMElement::__construct('xmlns:valid', '', 'http://www.w3.org/2000/xmlns/')\n"; try { - $element = new DomElement('xmlns:valid', '', 'http://www.w3.org/2000/xmlns/'); + $element = new DOMElement('xmlns:valid', '', 'http://www.w3.org/2000/xmlns/'); print "valid\n"; } catch (Exception $e) { print $e->getMessage() . "\n"; @@ -299,7 +299,7 @@ try { print "34 DOMDocument::createElementNS('http://www.w3.org/2000/xmlns/', 'wrongprefix:valid')\n"; try { - $dom = new domDocument; + $dom = new DOMDocument; $dom->createElementNS('http://www.w3.org/2000/xmlns/', 'wrongprefix:valid'); print "valid\n"; } catch (Exception $e) { @@ -308,7 +308,7 @@ try { print "35 DOMElement::__construct('wrongprefix:valid', '', 'http://www.w3.org/2000/xmlns/')\n"; try { - $element = new DomElement('wrongprefix:valid', '', 'http://www.w3.org/2000/xmlns/'); + $element = new DOMElement('wrongprefix:valid', '', 'http://www.w3.org/2000/xmlns/'); print "valid\n"; } catch (Exception $e) { print $e->getMessage() . "\n"; diff --git a/ext/dom/tests/dom_set_attr_node.phpt b/ext/dom/tests/dom_set_attr_node.phpt index 17382106e4c0..d1d88e502c47 100644 --- a/ext/dom/tests/dom_set_attr_node.phpt +++ b/ext/dom/tests/dom_set_attr_node.phpt @@ -25,7 +25,7 @@ $dom2->loadXML($xml2); $root2 = $dom2->documentElement; try { $root2->setAttributeNode($attr); -} catch (domexception $e) { +} catch (DOMException $e) { ob_start(); var_dump($e); $contents = ob_get_contents(); diff --git a/ext/dom/tests/dom_xinclude.phpt b/ext/dom/tests/dom_xinclude.phpt index 0dfeb2dfb4a0..5711d10358ea 100644 --- a/ext/dom/tests/dom_xinclude.phpt +++ b/ext/dom/tests/dom_xinclude.phpt @@ -15,7 +15,7 @@ if (DIRECTORY_SEPARATOR == '\\') { } $data = str_replace('compress.zlib://ext/dom/tests/','compress.zlib://'.$reldir."/", $data); -$dom = new domdocument; +$dom = new DOMDocument; $dom->loadXML($data); $dom->xinclude(); print $dom->saveXML()."\n"; @@ -25,7 +25,7 @@ foreach ($dom->documentElement->childNodes as $node) { $dom = Dom\XMLDocument::createFromString($data); $dom->xinclude(); -print $dom->saveXML()."\n"; +print $dom->saveXml()."\n"; foreach ($dom->documentElement->childNodes as $node) { print $node->nodeName."\n"; } diff --git a/ext/dom/tests/domchardata.phpt b/ext/dom/tests/domchardata.phpt index fe7a0a69b8e8..10d1b81c7493 100644 --- a/ext/dom/tests/domchardata.phpt +++ b/ext/dom/tests/domchardata.phpt @@ -29,7 +29,7 @@ echo "New Comment Length: ".$comment->length."\n"; echo "New Comment Data: ".$comment->data."\n"; /* DOMCDataSection */ -$cdata = new DOMCDataSection('Chars: <>&"'); +$cdata = new DOMCdataSection('Chars: <>&"'); $charnode->appendChild($cdata); echo "Substring: ".$cdata->substringData(7, 4)."\n"; diff --git a/ext/dom/tests/domdocument_createentityreference_001.phpt b/ext/dom/tests/domdocument_createentityreference_001.phpt index 7576207a7ab0..3c53aed42788 100644 --- a/ext/dom/tests/domdocument_createentityreference_001.phpt +++ b/ext/dom/tests/domdocument_createentityreference_001.phpt @@ -6,7 +6,7 @@ Clint Priest @ PhpTek09 dom --FILE-- createEntityReference('Test'); echo $objRef->nodeName . "\n"; diff --git a/ext/dom/tests/domelement.phpt b/ext/dom/tests/domelement.phpt index 96f03cbc0a12..c4f8ec16c786 100644 --- a/ext/dom/tests/domelement.phpt +++ b/ext/dom/tests/domelement.phpt @@ -72,17 +72,17 @@ for ($x = 0; $x < $mylen; $x++) { $current->setIdAttributeNS('urn::dummyns', 'idatt', TRUE); } -echo 'Element Name: '.(($elem = $dom->getElementByID('n1'))?$elem->localName:'Not Found')."\n"; +echo 'Element Name: '.(($elem = $dom->getElementById('n1'))?$elem->localName:'Not Found')."\n"; $idatt = $node->getAttributeNode('idatt'); $node->setIdAttributeNode($idatt, FALSE); -echo 'Element Name: '.(($elem = $dom->getElementByID('n1'))?$elem->localName:'Not Found')."\n"; +echo 'Element Name: '.(($elem = $dom->getElementById('n1'))?$elem->localName:'Not Found')."\n"; -echo 'Element Name: '.(($elem = $dom->getElementByID('n3'))?$elem->nodeName:'Not Found')."\n"; +echo 'Element Name: '.(($elem = $dom->getElementById('n3'))?$elem->nodeName:'Not Found')."\n"; for ($x = 0; $x < $mylen; $x++) { $node = $myelements->item($x); $node->setIdAttributeNS('urn::dummyns', 'idatt', FALSE); } -echo 'Element Name: '.(($elem = $dom->getElementByID('n3'))?$elem->nodeName:'Not Found')."\n"; +echo 'Element Name: '.(($elem = $dom->getElementById('n3'))?$elem->nodeName:'Not Found')."\n"; ?> --EXPECT-- Tag Name: chapter diff --git a/ext/dom/tests/domobject_debug_handler.phpt b/ext/dom/tests/domobject_debug_handler.phpt index a1cbabffbb23..dcab124cb643 100644 --- a/ext/dom/tests/domobject_debug_handler.phpt +++ b/ext/dom/tests/domobject_debug_handler.phpt @@ -9,8 +9,8 @@ $xml = <<foobar XML; -$d = new domdocument; -$d->dynamicProperty = new stdclass; +$d = new DOMDocument; +$d->dynamicProperty = new stdClass; $d->loadXML($xml); var_dump($d); ?> diff --git a/ext/dom/tests/domxpath.phpt b/ext/dom/tests/domxpath.phpt index cead1f8d5b7c..81101b93adc4 100644 --- a/ext/dom/tests/domxpath.phpt +++ b/ext/dom/tests/domxpath.phpt @@ -25,7 +25,7 @@ $dom->loadXML('myval'); $xpath = new DOMXPath($dom); -$xpath->registerPHPFunctions('MyAverage'); +$xpath->registerPhpFunctions('MyAverage'); $xpath->registerNamespace("php", "http://php.net/xpath"); $xpath->registerNamespace("def", "urn::default"); @@ -52,7 +52,7 @@ $avg = $xpath->evaluate('number(php:function("MyAverage", //def:testnode))'); var_dump($avg); try { - $xpath->registerPHPFunctions('non_existent'); + $xpath->registerPhpFunctions('non_existent'); $avg = $xpath->evaluate('number(php:function("non_existent", //def:testnode))'); } catch (\Error $e) { echo $e->getMessage() . \PHP_EOL; diff --git a/ext/dom/tests/gh11347.phpt b/ext/dom/tests/gh11347.phpt index 189231f92508..67529b042b08 100644 --- a/ext/dom/tests/gh11347.phpt +++ b/ext/dom/tests/gh11347.phpt @@ -14,9 +14,9 @@ class MyClass $doc = new DOMDocument(); $doc->loadHTML('hello'); -$xpath = new DOMXpath($doc); +$xpath = new DOMXPath($doc); $xpath->registerNamespace("php", "http://php.net/xpath"); -$xpath->registerPHPFunctions(); +$xpath->registerPhpFunctions(); $xpath->query("//a[php:function('MyClass::dump', string(@href))]"); ?> diff --git a/ext/dom/tests/gh12455.phpt b/ext/dom/tests/gh12455.phpt index 700bf644e722..8367d9868799 100644 --- a/ext/dom/tests/gh12455.phpt +++ b/ext/dom/tests/gh12455.phpt @@ -11,7 +11,7 @@ $doc->appendChild($element); $element1 = $doc->createElementNS('http://test', 'b:y'); $element->appendChild($element1); $element1->appendChild($doc->createElementNS('http://test', 'b:z')); -echo $doc->saveXml(); +echo $doc->saveXML(); $xpath = new DOMXPath($doc); $xpath->registerNodeNamespaces = true; diff --git a/ext/dom/tests/gh13863.phpt b/ext/dom/tests/gh13863.phpt index bf761438ac88..a526117218d4 100644 --- a/ext/dom/tests/gh13863.phpt +++ b/ext/dom/tests/gh13863.phpt @@ -50,7 +50,7 @@ foreach ([DomType::Legacy, DomType::Modern] as $case) { } } - echo $doc->saveXML(), "\n"; + echo $doc instanceof Dom\XMLDocument ? $doc->saveXml() : $doc->saveXML(), "\n"; echo "--- $name test remove index 1 at index 2 ---\n"; @@ -64,7 +64,7 @@ foreach ([DomType::Legacy, DomType::Modern] as $case) { } } - echo $doc->saveXML(), "\n"; + echo $doc instanceof Dom\XMLDocument ? $doc->saveXml() : $doc->saveXML(), "\n"; echo "--- $name test remove all ---\n"; @@ -76,7 +76,7 @@ foreach ([DomType::Legacy, DomType::Modern] as $case) { $node->remove(); } - echo $doc->saveXML(), "\n"; + echo $doc instanceof Dom\XMLDocument ? $doc->saveXml() : $doc->saveXML(), "\n"; } ?> diff --git a/ext/dom/tests/gh15192.phpt b/ext/dom/tests/gh15192.phpt index f6031c2a40b0..b56c07d8fce6 100644 --- a/ext/dom/tests/gh15192.phpt +++ b/ext/dom/tests/gh15192.phpt @@ -7,7 +7,7 @@ dom $dom = @Dom\HTMLDocument::createFromString("

foo

"); $dom2 = clone $dom; $element = $dom2->firstChild; -$dom = new DomDocument(); +$dom = new DOMDocument(); var_dump($element); ?> --EXPECT-- diff --git a/ext/dom/tests/gh15570.phpt b/ext/dom/tests/gh15570.phpt index f2337cca2259..b51653426a0c 100644 --- a/ext/dom/tests/gh15570.phpt +++ b/ext/dom/tests/gh15570.phpt @@ -12,7 +12,7 @@ $html = <<head->firstChild->cloneNode(false); -var_dump($dom->saveHTML($a)); +var_dump($dom->saveHtml($a)); ?> --EXPECT-- string(1) " diff --git a/ext/dom/tests/gh15670.phpt b/ext/dom/tests/gh15670.phpt index d042803ae1e3..39a3bca9b711 100644 --- a/ext/dom/tests/gh15670.phpt +++ b/ext/dom/tests/gh15670.phpt @@ -6,7 +6,7 @@ dom loadHTML('

foo

'); -$dom = DOM\XMLDocument::createFromString(''); +$dom = Dom\XMLDocument::createFromString(''); $child = $dom->documentElement->appendChild($dom->createElementNS('urn:a', 'child')); function test($child, $html) { try { @@ -17,7 +17,7 @@ function test($child, $html) { test($child, '--> diff --git a/ext/dom/tests/modern/css_selectors/pseudo_classes_has.phpt b/ext/dom/tests/modern/css_selectors/pseudo_classes_has.phpt index 6ffcf806d4c5..139c7e90e4a4 100644 --- a/ext/dom/tests/modern/css_selectors/pseudo_classes_has.phpt +++ b/ext/dom/tests/modern/css_selectors/pseudo_classes_has.phpt @@ -7,7 +7,7 @@ dom require __DIR__ . '/test_utils.inc'; -$dom = DOM\XMLDocument::createFromString(<<

diff --git a/ext/dom/tests/modern/css_selectors/pseudo_classes_is_where.phpt b/ext/dom/tests/modern/css_selectors/pseudo_classes_is_where.phpt index 7e99958375be..99a88fa09c03 100644 --- a/ext/dom/tests/modern/css_selectors/pseudo_classes_is_where.phpt +++ b/ext/dom/tests/modern/css_selectors/pseudo_classes_is_where.phpt @@ -7,7 +7,7 @@ dom require __DIR__ . '/test_utils.inc'; -$dom = DOM\XMLDocument::createFromString(<<

1

diff --git a/ext/dom/tests/modern/css_selectors/pseudo_classes_lang.phpt b/ext/dom/tests/modern/css_selectors/pseudo_classes_lang.phpt index 16c25036564b..1234c744d56d 100644 --- a/ext/dom/tests/modern/css_selectors/pseudo_classes_lang.phpt +++ b/ext/dom/tests/modern/css_selectors/pseudo_classes_lang.phpt @@ -7,7 +7,7 @@ dom require __DIR__ . '/test_utils.inc'; -$dom = DOM\XMLDocument::createFromString(<<

1

diff --git a/ext/dom/tests/modern/css_selectors/pseudo_classes_links.phpt b/ext/dom/tests/modern/css_selectors/pseudo_classes_links.phpt index 7afcb6e3cfbd..59a030d80cda 100644 --- a/ext/dom/tests/modern/css_selectors/pseudo_classes_links.phpt +++ b/ext/dom/tests/modern/css_selectors/pseudo_classes_links.phpt @@ -7,7 +7,7 @@ dom require __DIR__ . '/test_utils.inc'; -$dom = DOM\XMLDocument::createFromString(<< Link Link diff --git a/ext/dom/tests/modern/css_selectors/pseudo_classes_no_op.phpt b/ext/dom/tests/modern/css_selectors/pseudo_classes_no_op.phpt index 0422dcc9002f..5a881ccd8d45 100644 --- a/ext/dom/tests/modern/css_selectors/pseudo_classes_no_op.phpt +++ b/ext/dom/tests/modern/css_selectors/pseudo_classes_no_op.phpt @@ -7,7 +7,7 @@ dom require __DIR__ . '/test_utils.inc'; -$dom = DOM\XMLDocument::createFromString(<<
diff --git a/ext/dom/tests/modern/css_selectors/pseudo_classes_nth_child.phpt b/ext/dom/tests/modern/css_selectors/pseudo_classes_nth_child.phpt index b13d0b1571d8..975e1d78abba 100644 --- a/ext/dom/tests/modern/css_selectors/pseudo_classes_nth_child.phpt +++ b/ext/dom/tests/modern/css_selectors/pseudo_classes_nth_child.phpt @@ -7,7 +7,7 @@ dom require __DIR__ . '/test_utils.inc'; -$dom = DOM\XMLDocument::createFromString(<<

1

2

diff --git a/ext/dom/tests/modern/css_selectors/pseudo_classes_nth_child_of.phpt b/ext/dom/tests/modern/css_selectors/pseudo_classes_nth_child_of.phpt index 389611da861a..3b8b29721c5f 100644 --- a/ext/dom/tests/modern/css_selectors/pseudo_classes_nth_child_of.phpt +++ b/ext/dom/tests/modern/css_selectors/pseudo_classes_nth_child_of.phpt @@ -7,7 +7,7 @@ dom require __DIR__ . '/test_utils.inc'; -$dom = DOM\XMLDocument::createFromString(<<

1

2

diff --git a/ext/dom/tests/modern/css_selectors/pseudo_classes_nth_col.phpt b/ext/dom/tests/modern/css_selectors/pseudo_classes_nth_col.phpt index fc32b73bfd75..97aa89de838d 100644 --- a/ext/dom/tests/modern/css_selectors/pseudo_classes_nth_col.phpt +++ b/ext/dom/tests/modern/css_selectors/pseudo_classes_nth_col.phpt @@ -7,7 +7,7 @@ dom require __DIR__ . '/test_utils.inc'; -$dom = DOM\HTMLDocument::createFromString(<< diff --git a/ext/dom/tests/modern/css_selectors/pseudo_classes_only_child.phpt b/ext/dom/tests/modern/css_selectors/pseudo_classes_only_child.phpt index ef05a48c516a..f68c05931346 100644 --- a/ext/dom/tests/modern/css_selectors/pseudo_classes_only_child.phpt +++ b/ext/dom/tests/modern/css_selectors/pseudo_classes_only_child.phpt @@ -7,7 +7,7 @@ dom require __DIR__ . '/test_utils.inc'; -$dom = DOM\XMLDocument::createFromString(<<

Lonely

diff --git a/ext/dom/tests/modern/css_selectors/pseudo_classes_only_of_type.phpt b/ext/dom/tests/modern/css_selectors/pseudo_classes_only_of_type.phpt index 3fcba69a7b50..a9c364b248b8 100644 --- a/ext/dom/tests/modern/css_selectors/pseudo_classes_only_of_type.phpt +++ b/ext/dom/tests/modern/css_selectors/pseudo_classes_only_of_type.phpt @@ -7,7 +7,7 @@ dom require __DIR__ . '/test_utils.inc'; -$dom = DOM\XMLDocument::createFromString(<<

Alone

diff --git a/ext/dom/tests/modern/css_selectors/pseudo_classes_optional_required.phpt b/ext/dom/tests/modern/css_selectors/pseudo_classes_optional_required.phpt index 51c276dd90e0..268c7c029382 100644 --- a/ext/dom/tests/modern/css_selectors/pseudo_classes_optional_required.phpt +++ b/ext/dom/tests/modern/css_selectors/pseudo_classes_optional_required.phpt @@ -7,7 +7,7 @@ dom require __DIR__ . '/test_utils.inc'; -$dom = DOM\XMLDocument::createFromString(<< \0-->"; -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; ?> --EXPECT-- diff --git a/ext/dom/tests/modern/html/parser/Element_outerHTML.phpt b/ext/dom/tests/modern/html/parser/Element_outerHTML.phpt index 401e11b16456..1ee0f4ca90ab 100644 --- a/ext/dom/tests/modern/html/parser/Element_outerHTML.phpt +++ b/ext/dom/tests/modern/html/parser/Element_outerHTML.phpt @@ -8,16 +8,16 @@ dom $dom = Dom\HTMLDocument::createFromString('

foo

', LIBXML_NOERROR); $p = $dom->body->firstChild; $p->outerHTML = '
 

'; // intentionally unclosed -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; echo $dom->saveHtml(), "\n"; $div = $dom->body->firstChild; $div->outerHTML = "invalid\xffutf-8𐍈𐍈𐍈"; -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; echo $dom->saveHtml(), "\n"; $dom->body->outerHTML = ''; var_dump($dom->body->querySelector('p')); // Should be NULL because the template contents do not participate in the DOM tree -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; echo $dom->saveHtml(), "\n"; ?> diff --git a/ext/dom/tests/modern/html/parser/gh17485.phpt b/ext/dom/tests/modern/html/parser/gh17485.phpt index 3f2c6245113d..76dbccdb7c25 100644 --- a/ext/dom/tests/modern/html/parser/gh17485.phpt +++ b/ext/dom/tests/modern/html/parser/gh17485.phpt @@ -6,7 +6,7 @@ dom \n
\n"; $Document = \Dom\HTMLDocument::createFromString( $Data ); -echo $Document->saveHTML(); +echo $Document->saveHtml(); ?> --EXPECT--
diff --git a/ext/dom/tests/modern/html/parser/gh18090.phpt b/ext/dom/tests/modern/html/parser/gh18090.phpt index c32f5ddb5133..fdecd157f73b 100644 --- a/ext/dom/tests/modern/html/parser/gh18090.phpt +++ b/ext/dom/tests/modern/html/parser/gh18090.phpt @@ -4,10 +4,10 @@ GH-18090 (Svg attributes and tag names are being lowercased) dom --FILE-- ', LIBXML_NOERROR)->saveHTML(), "\n"; +echo \Dom\HTMLDocument::createFromString('', LIBXML_NOERROR)->saveHtml(), "\n"; echo \Dom\HTMLDocument::createFromString('', LIBXML_NOERROR)->saveHTML(), "\n"; +10" />', LIBXML_NOERROR)->saveHtml(), "\n"; echo \Dom\HTMLDocument::createFromString('', LIBXML_NOERROR)->querySelector('svg')->attributes[0]->name, "\n"; ?> diff --git a/ext/dom/tests/modern/html/serializer/Element_innerHTML.phpt b/ext/dom/tests/modern/html/serializer/Element_innerHTML.phpt index 637008e30b7b..d20b0bd04c95 100644 --- a/ext/dom/tests/modern/html/serializer/Element_innerHTML.phpt +++ b/ext/dom/tests/modern/html/serializer/Element_innerHTML.phpt @@ -5,7 +5,7 @@ dom --FILE-- Test

Hello, World!

'); +$dom = Dom\HTMLDocument::createFromString('Test

Hello, World!

'); var_dump($dom->getElementsByTagName('body')[0]->innerHTML); var_dump($dom->getElementsByTagName('head')[0]->innerHTML); var_dump($dom->getElementsByTagName('html')[0]->innerHTML); diff --git a/ext/dom/tests/modern/html/serializer/Element_outerHTML_invalid_tree.phpt b/ext/dom/tests/modern/html/serializer/Element_outerHTML_invalid_tree.phpt index 4803e2067639..9f75e9196a8e 100644 --- a/ext/dom/tests/modern/html/serializer/Element_outerHTML_invalid_tree.phpt +++ b/ext/dom/tests/modern/html/serializer/Element_outerHTML_invalid_tree.phpt @@ -10,7 +10,7 @@ Dennis Snell $dom = Dom\HTMLDocument::createFromString('

Link

', LIBXML_NOERROR); $p = $dom->body->querySelector('p'); $p->outerHTML = 'Another Link'; -echo $dom->saveHTML(); +echo $dom->saveHtml(); ?> --EXPECT-- diff --git a/ext/dom/tests/modern/html/serializer/legacy_null_content.phpt b/ext/dom/tests/modern/html/serializer/legacy_null_content.phpt index eaedfbe23232..2e63a48e0ee2 100644 --- a/ext/dom/tests/modern/html/serializer/legacy_null_content.phpt +++ b/ext/dom/tests/modern/html/serializer/legacy_null_content.phpt @@ -12,7 +12,7 @@ $root->appendChild($dom->importLegacyNode(new DOMComment)); $root->appendChild($dom->importLegacyNode(new DOMProcessingInstruction('target'))); $root->appendChild($dom->importLegacyNode(new DOMCdataSection(''))); -echo $dom->saveHTML(), "\n"; +echo $dom->saveHtml(), "\n"; echo $dom->documentElement->innerHTML, "\n"; ?> --EXPECT-- diff --git a/ext/dom/tests/modern/spec/CharacterData_deleteData_negative_in_bounds_length.phpt b/ext/dom/tests/modern/spec/CharacterData_deleteData_negative_in_bounds_length.phpt index f29a201ca106..7c66828cb57d 100644 --- a/ext/dom/tests/modern/spec/CharacterData_deleteData_negative_in_bounds_length.phpt +++ b/ext/dom/tests/modern/spec/CharacterData_deleteData_negative_in_bounds_length.phpt @@ -21,7 +21,7 @@ try { } catch (DOMException $e) { echo $e->getMessage(), "\n"; } -echo $dom->saveHtml($comment), "\n"; +echo $dom->saveHTML($comment), "\n"; ?> --EXPECT-- diff --git a/ext/dom/tests/modern/spec/CharacterData_insertData_negative_offset_mod32.phpt b/ext/dom/tests/modern/spec/CharacterData_insertData_negative_offset_mod32.phpt index 7c27c3bc8dd5..52aeba6fbaf7 100644 --- a/ext/dom/tests/modern/spec/CharacterData_insertData_negative_offset_mod32.phpt +++ b/ext/dom/tests/modern/spec/CharacterData_insertData_negative_offset_mod32.phpt @@ -31,13 +31,13 @@ try { } catch (DOMException $e) { echo $e->getMessage(), "\n"; } -echo $dom->saveHtml($comment), "\n"; +echo $dom->saveHTML($comment), "\n"; try { $comment->insertData(-(2**32 - 1), "A"); } catch (DOMException $e) { echo $e->getMessage(), "\n"; } -echo $dom->saveHtml($comment), "\n"; +echo $dom->saveHTML($comment), "\n"; ?> --EXPECT-- diff --git a/ext/dom/tests/modern/spec/CharacterData_replaceData_negative_count_mod32.phpt b/ext/dom/tests/modern/spec/CharacterData_replaceData_negative_count_mod32.phpt index 64634b099257..b47ca0ae6792 100644 --- a/ext/dom/tests/modern/spec/CharacterData_replaceData_negative_count_mod32.phpt +++ b/ext/dom/tests/modern/spec/CharacterData_replaceData_negative_count_mod32.phpt @@ -28,13 +28,13 @@ try { } catch (DOMException $e) { echo $e->getMessage(), "\n"; } -echo $dom->saveHtml($comment), "\n"; +echo $dom->saveHTML($comment), "\n"; try { $comment->replaceData(2, -(2**32 - 2), "A"); } catch (DOMException $e) { echo $e->getMessage(), "\n"; } -echo $dom->saveHtml($comment), "\n"; +echo $dom->saveHTML($comment), "\n"; ?> --EXPECT-- diff --git a/ext/dom/tests/modern/spec/CharacterData_substringData_negative_arguments_mod32.phpt b/ext/dom/tests/modern/spec/CharacterData_substringData_negative_arguments_mod32.phpt index 7d38bd28d441..ac6ab9b70e06 100644 --- a/ext/dom/tests/modern/spec/CharacterData_substringData_negative_arguments_mod32.phpt +++ b/ext/dom/tests/modern/spec/CharacterData_substringData_negative_arguments_mod32.phpt @@ -29,19 +29,19 @@ try { } catch (DOMException $e) { echo $e->getMessage(), "\n"; } -echo $dom->saveHtml($comment), "\n"; +echo $dom->saveHTML($comment), "\n"; try { var_dump($comment->substringData(2, -(2**32 - 2))); } catch (DOMException $e) { echo $e->getMessage(), "\n"; } -echo $dom->saveHtml($comment), "\n"; +echo $dom->saveHTML($comment), "\n"; try { var_dump($comment->substringData(-(2**32 - 2), 2)); } catch (DOMException $e) { echo $e->getMessage(), "\n"; } -echo $dom->saveHtml($comment), "\n"; +echo $dom->saveHTML($comment), "\n"; ?> --EXPECT-- diff --git a/ext/dom/tests/modern/spec/appendChild_dtd_legacy.phpt b/ext/dom/tests/modern/spec/appendChild_dtd_legacy.phpt index 20a69b3b545d..25a106479f16 100644 --- a/ext/dom/tests/modern/spec/appendChild_dtd_legacy.phpt +++ b/ext/dom/tests/modern/spec/appendChild_dtd_legacy.phpt @@ -27,7 +27,7 @@ try { } catch (DOMException $e) { echo $e->getMessage(), "\n"; } -echo $other->saveXml(); +echo $other->saveXML(); ?> --EXPECT-- diff --git a/ext/dom/tests/modern/spec/attribute_entity_expansion_legacy.phpt b/ext/dom/tests/modern/spec/attribute_entity_expansion_legacy.phpt index f2b00c9ad2b5..f34bebb3a66a 100644 --- a/ext/dom/tests/modern/spec/attribute_entity_expansion_legacy.phpt +++ b/ext/dom/tests/modern/spec/attribute_entity_expansion_legacy.phpt @@ -8,33 +8,33 @@ $doc = new DOMDocument; $elt = $doc->createElement('elt'); $doc->appendChild($elt); $elt->setAttribute('a','&'); -print $doc->saveXml($elt) . "\n"; +print $doc->saveXML($elt) . "\n"; $attr = $elt->getAttributeNode('a'); $attr->value = '&'; print "$attr->value\n"; -print $doc->saveXml($elt) . "\n"; +print $doc->saveXML($elt) . "\n"; $attr->removeChild($attr->firstChild); -print $doc->saveXml($elt) . "\n"; +print $doc->saveXML($elt) . "\n"; // Note: since libxml2 commit aca16fb3d45e0b2c45364ffc1cea8eb4abaca87d this no longer explicitly warns. This seems intentional. @$attr->nodeValue = '&'; print "$attr->nodeValue\n"; -print $doc->saveXml($elt) . "\n"; +print $doc->saveXML($elt) . "\n"; $attr->nodeValue = '&'; print "$attr->nodeValue\n"; -print $doc->saveXml($elt) . "\n"; +print $doc->saveXML($elt) . "\n"; $elt->removeAttributeNode($attr); $elt->setAttributeNS('http://www.w3.org/2000/svg', 'svg:id','&'); -print $doc->saveXml($elt) . "\n"; +print $doc->saveXML($elt) . "\n"; $attr = $elt->getAttributeNodeNS('http://www.w3.org/2000/svg', 'id'); $attr->value = '<&'; print "$attr->value\n"; -print $doc->saveXml($elt) . "\n"; +print $doc->saveXML($elt) . "\n"; ?> --EXPECTF-- diff --git a/ext/dom/tests/modern/spec/dump_attr.inc b/ext/dom/tests/modern/spec/dump_attr.inc index fe3effd492b9..6d1afd86e8e3 100644 --- a/ext/dom/tests/modern/spec/dump_attr.inc +++ b/ext/dom/tests/modern/spec/dump_attr.inc @@ -1,12 +1,12 @@ name}\n"; var_dump($attr->prefix); var_dump($attr->nodeName); var_dump($attr->namespaceURI); } -function dumpAttrs(DOM\Element $element) { +function dumpAttrs(Dom\Element $element) { foreach ($element->attributes as $attr) { dumpAttr($attr); } diff --git a/ext/dom/tests/modern/spec/element_dump.inc b/ext/dom/tests/modern/spec/element_dump.inc index 652debbfbabd..d16144d030d9 100644 --- a/ext/dom/tests/modern/spec/element_dump.inc +++ b/ext/dom/tests/modern/spec/element_dump.inc @@ -1,9 +1,9 @@ tagName); echo "nodeName: ", var_dump($element->nodeName); echo "textContent: ", var_dump($element->textContent); echo "prefix: ", var_dump($element->prefix); echo "namespaceURI: ", var_dump($element->namespaceURI); - echo $element->ownerDocument->saveHTML($element), "\n\n"; + echo $element->ownerDocument->saveHtml($element), "\n\n"; } diff --git a/ext/dom/tests/modern/token_list/add.phpt b/ext/dom/tests/modern/token_list/add.phpt index c2817682a242..11993c5eb4ba 100644 --- a/ext/dom/tests/modern/token_list/add.phpt +++ b/ext/dom/tests/modern/token_list/add.phpt @@ -5,7 +5,7 @@ dom --FILE-- '); +$dom = Dom\XMLDocument::createFromString(''); $list = $dom->documentElement->classList; $list->add(); @@ -17,12 +17,12 @@ $ref =& $str; $list->add($ref); -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; $list->value = ''; $list->add('e'); -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; ?> --EXPECT-- diff --git a/ext/dom/tests/modern/token_list/add_errors.phpt b/ext/dom/tests/modern/token_list/add_errors.phpt index 94db0d293114..430e6dc43974 100644 --- a/ext/dom/tests/modern/token_list/add_errors.phpt +++ b/ext/dom/tests/modern/token_list/add_errors.phpt @@ -5,7 +5,7 @@ dom --FILE-- "); +$dom = Dom\XMLDocument::createFromString(""); $list = $dom->documentElement->classList; try { @@ -29,7 +29,7 @@ try { echo $e->getMessage(), "\n"; } -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; ?> --EXPECT-- diff --git a/ext/dom/tests/modern/token_list/attlist.phpt b/ext/dom/tests/modern/token_list/attlist.phpt index c28f0a7f6258..b1b329573fb4 100644 --- a/ext/dom/tests/modern/token_list/attlist.phpt +++ b/ext/dom/tests/modern/token_list/attlist.phpt @@ -5,7 +5,7 @@ dom --FILE-- @@ -22,7 +22,7 @@ var_dump($list); $list->remove('first'); var_dump($list); -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; ?> --EXPECT-- diff --git a/ext/dom/tests/modern/token_list/change_attribute.phpt b/ext/dom/tests/modern/token_list/change_attribute.phpt index cae840063327..e7461cb7ff94 100644 --- a/ext/dom/tests/modern/token_list/change_attribute.phpt +++ b/ext/dom/tests/modern/token_list/change_attribute.phpt @@ -5,7 +5,7 @@ dom --FILE-- '); +$dom = Dom\XMLDocument::createFromString(''); $element = $dom->documentElement; $list = $element->classList; diff --git a/ext/dom/tests/modern/token_list/clone.phpt b/ext/dom/tests/modern/token_list/clone.phpt index e0c71e9fd791..9cb617804984 100644 --- a/ext/dom/tests/modern/token_list/clone.phpt +++ b/ext/dom/tests/modern/token_list/clone.phpt @@ -5,7 +5,7 @@ dom --FILE-- '); +$dom = Dom\XMLDocument::createFromString(''); $element = $dom->documentElement; try { clone $element->classList; diff --git a/ext/dom/tests/modern/token_list/contains.phpt b/ext/dom/tests/modern/token_list/contains.phpt index 3786769ec39d..ccc449999643 100644 --- a/ext/dom/tests/modern/token_list/contains.phpt +++ b/ext/dom/tests/modern/token_list/contains.phpt @@ -5,7 +5,7 @@ dom --FILE-- '); +$dom = Dom\XMLDocument::createFromString(''); $element = $dom->documentElement; $list = $element->classList; diff --git a/ext/dom/tests/modern/token_list/contains_empty.phpt b/ext/dom/tests/modern/token_list/contains_empty.phpt index 443be1e13d08..ca2fed2f8a6f 100644 --- a/ext/dom/tests/modern/token_list/contains_empty.phpt +++ b/ext/dom/tests/modern/token_list/contains_empty.phpt @@ -5,7 +5,7 @@ dom --FILE-- '); +$dom = Dom\XMLDocument::createFromString(''); $element = $dom->documentElement; $list = $element->classList; diff --git a/ext/dom/tests/modern/token_list/contains_error.phpt b/ext/dom/tests/modern/token_list/contains_error.phpt index 9f402e685f4d..65295ca35258 100644 --- a/ext/dom/tests/modern/token_list/contains_error.phpt +++ b/ext/dom/tests/modern/token_list/contains_error.phpt @@ -5,7 +5,7 @@ dom --FILE-- '); +$dom = Dom\XMLDocument::createFromString(''); $element = $dom->documentElement; $list = $element->classList; diff --git a/ext/dom/tests/modern/token_list/count.phpt b/ext/dom/tests/modern/token_list/count.phpt index faee8736dcf9..23dcac24aba5 100644 --- a/ext/dom/tests/modern/token_list/count.phpt +++ b/ext/dom/tests/modern/token_list/count.phpt @@ -5,7 +5,7 @@ dom --FILE-- '); +$dom = Dom\XMLDocument::createFromString(''); $element = $dom->documentElement; var_dump($element->classList->count(), count($element->classList), $element->classList->length); diff --git a/ext/dom/tests/modern/token_list/debug.phpt b/ext/dom/tests/modern/token_list/debug.phpt index 2c56809ef98b..a0eb946587fc 100644 --- a/ext/dom/tests/modern/token_list/debug.phpt +++ b/ext/dom/tests/modern/token_list/debug.phpt @@ -5,7 +5,7 @@ dom --FILE-- '); +$dom = Dom\XMLDocument::createFromString(''); $element = $dom->documentElement; var_dump($element->classList); diff --git a/ext/dom/tests/modern/token_list/dimensions.phpt b/ext/dom/tests/modern/token_list/dimensions.phpt index e1507d61b08a..2eb465b75a2f 100644 --- a/ext/dom/tests/modern/token_list/dimensions.phpt +++ b/ext/dom/tests/modern/token_list/dimensions.phpt @@ -5,7 +5,7 @@ dom --FILE-- '); +$dom = Dom\XMLDocument::createFromString(''); $list = $dom->documentElement->classList; foreach (range(-1, 4) as $i) { diff --git a/ext/dom/tests/modern/token_list/dimensions_error.phpt b/ext/dom/tests/modern/token_list/dimensions_error.phpt index c29fc058ef94..c05a8380c631 100644 --- a/ext/dom/tests/modern/token_list/dimensions_error.phpt +++ b/ext/dom/tests/modern/token_list/dimensions_error.phpt @@ -5,7 +5,7 @@ dom --FILE-- '); +$dom = Dom\XMLDocument::createFromString(''); $list = $dom->documentElement->classList; $testOffsets = [ diff --git a/ext/dom/tests/modern/token_list/entities.phpt b/ext/dom/tests/modern/token_list/entities.phpt index 5ac1a52cb426..43b84b705115 100644 --- a/ext/dom/tests/modern/token_list/entities.phpt +++ b/ext/dom/tests/modern/token_list/entities.phpt @@ -5,7 +5,7 @@ dom --FILE-- @@ -23,7 +23,7 @@ var_dump($list->contains("foo")); $list->add("test"); -echo $dom->saveXML(); +echo $dom->saveXml(); ?> --EXPECT-- diff --git a/ext/dom/tests/modern/token_list/equality.phpt b/ext/dom/tests/modern/token_list/equality.phpt index 9ed798ca4c6a..81279a38855f 100644 --- a/ext/dom/tests/modern/token_list/equality.phpt +++ b/ext/dom/tests/modern/token_list/equality.phpt @@ -5,7 +5,7 @@ dom --FILE-- '); +$dom = Dom\XMLDocument::createFromString(''); $element = $dom->documentElement; var_dump($element->classList === $element->classList); diff --git a/ext/dom/tests/modern/token_list/foreach_by_ref.phpt b/ext/dom/tests/modern/token_list/foreach_by_ref.phpt index b13b4c51c7c0..ccd8fa48bd9d 100644 --- a/ext/dom/tests/modern/token_list/foreach_by_ref.phpt +++ b/ext/dom/tests/modern/token_list/foreach_by_ref.phpt @@ -5,7 +5,7 @@ dom --FILE-- '); +$dom = Dom\XMLDocument::createFromString(''); try { foreach ($dom->documentElement->classList as &$class) { diff --git a/ext/dom/tests/modern/token_list/getIterator.phpt b/ext/dom/tests/modern/token_list/getIterator.phpt index d90ad54ae41a..91e7bc4df81a 100644 --- a/ext/dom/tests/modern/token_list/getIterator.phpt +++ b/ext/dom/tests/modern/token_list/getIterator.phpt @@ -5,7 +5,7 @@ dom --FILE-- '); +$dom = Dom\XMLDocument::createFromString(''); $element = $dom->documentElement; $list = $element->classList; diff --git a/ext/dom/tests/modern/token_list/item.phpt b/ext/dom/tests/modern/token_list/item.phpt index 091be4ef0f46..137e080ea0d8 100644 --- a/ext/dom/tests/modern/token_list/item.phpt +++ b/ext/dom/tests/modern/token_list/item.phpt @@ -5,7 +5,7 @@ dom --FILE-- '); +$dom = Dom\XMLDocument::createFromString(''); $list = $dom->documentElement->classList; foreach (range(-1, 3) as $i) { diff --git a/ext/dom/tests/modern/token_list/iteration_01.phpt b/ext/dom/tests/modern/token_list/iteration_01.phpt index cd4621483cb5..0d0480635e7f 100644 --- a/ext/dom/tests/modern/token_list/iteration_01.phpt +++ b/ext/dom/tests/modern/token_list/iteration_01.phpt @@ -5,7 +5,7 @@ dom --FILE-- '); +$dom = Dom\XMLDocument::createFromString(''); $list = $dom->documentElement->classList; foreach ($list as $i => $item) { diff --git a/ext/dom/tests/modern/token_list/iteration_02.phpt b/ext/dom/tests/modern/token_list/iteration_02.phpt index 39f921a8a5a0..60227c02ca4c 100644 --- a/ext/dom/tests/modern/token_list/iteration_02.phpt +++ b/ext/dom/tests/modern/token_list/iteration_02.phpt @@ -5,7 +5,7 @@ dom --FILE-- '); +$dom = Dom\XMLDocument::createFromString(''); $list = $dom->documentElement->classList; foreach ($list as $i => $item) { diff --git a/ext/dom/tests/modern/token_list/iterator_modification_invalidation.phpt b/ext/dom/tests/modern/token_list/iterator_modification_invalidation.phpt index f013d7615057..2b7df2027fed 100644 --- a/ext/dom/tests/modern/token_list/iterator_modification_invalidation.phpt +++ b/ext/dom/tests/modern/token_list/iterator_modification_invalidation.phpt @@ -5,7 +5,7 @@ dom --FILE-- '); +$dom = Dom\XMLDocument::createFromString(''); $list = $dom->documentElement->classList; diff --git a/ext/dom/tests/modern/token_list/remove.phpt b/ext/dom/tests/modern/token_list/remove.phpt index d6d8f05c4fd2..d289524fe980 100644 --- a/ext/dom/tests/modern/token_list/remove.phpt +++ b/ext/dom/tests/modern/token_list/remove.phpt @@ -5,26 +5,26 @@ dom --FILE-- '); +$dom = Dom\XMLDocument::createFromString(''); $list = $dom->documentElement->classList; $list->remove(); $list->remove('test1'); -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; $list->remove('nope'); -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; $list->remove('test2'); -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; $list->value = 'test3 test4'; $list->remove('test4'); -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; ?> --EXPECT-- diff --git a/ext/dom/tests/modern/token_list/remove_errors.phpt b/ext/dom/tests/modern/token_list/remove_errors.phpt index fe0e58c334c9..9f840a564cb6 100644 --- a/ext/dom/tests/modern/token_list/remove_errors.phpt +++ b/ext/dom/tests/modern/token_list/remove_errors.phpt @@ -5,7 +5,7 @@ dom --FILE-- "); +$dom = Dom\XMLDocument::createFromString(""); $list = $dom->documentElement->classList; try { @@ -29,7 +29,7 @@ try { echo $e->getMessage(), "\n"; } -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; ?> --EXPECT-- diff --git a/ext/dom/tests/modern/token_list/removed_element.phpt b/ext/dom/tests/modern/token_list/removed_element.phpt index 548aa30e6fff..9217cef0c50f 100644 --- a/ext/dom/tests/modern/token_list/removed_element.phpt +++ b/ext/dom/tests/modern/token_list/removed_element.phpt @@ -5,7 +5,7 @@ dom --FILE-- '); +$dom = Dom\XMLDocument::createFromString(''); $element = $dom->documentElement; $list = $element->classList; diff --git a/ext/dom/tests/modern/token_list/replace.phpt b/ext/dom/tests/modern/token_list/replace.phpt index 7d8f81ab9784..383a2236df06 100644 --- a/ext/dom/tests/modern/token_list/replace.phpt +++ b/ext/dom/tests/modern/token_list/replace.phpt @@ -5,34 +5,34 @@ dom --FILE-- '); +$dom = Dom\XMLDocument::createFromString(''); $element = $dom->documentElement; $list = $element->classList; var_dump($list->replace('nonexistent', 'X')); -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; var_dump($list->replace('B', 'X')); -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; var_dump($list->replace('C', 'X')); -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; var_dump($list->replace('A', 'B')); -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; var_dump($list->replace('X', 'B')); -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; $list->value = 'A'; $list->replace('A', 'AA'); -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; ?> --EXPECT-- diff --git a/ext/dom/tests/modern/token_list/replace_error.phpt b/ext/dom/tests/modern/token_list/replace_error.phpt index 14b02373d57d..4eca691357ec 100644 --- a/ext/dom/tests/modern/token_list/replace_error.phpt +++ b/ext/dom/tests/modern/token_list/replace_error.phpt @@ -5,7 +5,7 @@ dom --FILE-- '); +$dom = Dom\XMLDocument::createFromString(''); $element = $dom->documentElement; $list = $element->classList; diff --git a/ext/dom/tests/modern/token_list/supports.phpt b/ext/dom/tests/modern/token_list/supports.phpt index 6fc1d7f22549..a6da3846f1ea 100644 --- a/ext/dom/tests/modern/token_list/supports.phpt +++ b/ext/dom/tests/modern/token_list/supports.phpt @@ -5,7 +5,7 @@ dom --FILE-- '); +$dom = Dom\XMLDocument::createFromString(''); $element = $dom->documentElement; try { $element->classList->supports('a'); diff --git a/ext/dom/tests/modern/token_list/toggle.phpt b/ext/dom/tests/modern/token_list/toggle.phpt index 494368024b64..820b9f99096f 100644 --- a/ext/dom/tests/modern/token_list/toggle.phpt +++ b/ext/dom/tests/modern/token_list/toggle.phpt @@ -5,7 +5,7 @@ dom --FILE-- '); +$dom = Dom\XMLDocument::createFromString(''); $element = $dom->documentElement; $list = $element->classList; @@ -13,44 +13,44 @@ echo "--- Toggle A (forced add) ---\n"; var_dump($list->toggle("A", true)); -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; echo "--- Toggle A (not forced) ---\n"; var_dump($list->toggle("A")); -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; echo "--- Toggle A (forced remove) ---\n"; var_dump($list->toggle("A", false)); -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; echo "--- Toggle B (forced remove) ---\n"; var_dump($list->toggle("B", false)); -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; echo "--- Toggle D ---\n"; var_dump($list->toggle("D")); -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; echo "--- Toggle C ---\n"; var_dump($list->toggle("C")); -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; echo "--- Toggle E ---\n"; $list->value = 'E'; $list->toggle('E'); -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; ?> --EXPECT-- diff --git a/ext/dom/tests/modern/token_list/toggle_error.phpt b/ext/dom/tests/modern/token_list/toggle_error.phpt index 7e3cfd462023..43818f765820 100644 --- a/ext/dom/tests/modern/token_list/toggle_error.phpt +++ b/ext/dom/tests/modern/token_list/toggle_error.phpt @@ -5,7 +5,7 @@ dom --FILE-- '); +$dom = Dom\XMLDocument::createFromString(''); $element = $dom->documentElement; $list = $element->classList; diff --git a/ext/dom/tests/modern/token_list/value_edge_cases.phpt b/ext/dom/tests/modern/token_list/value_edge_cases.phpt index af32d84180ba..c84f6d36b312 100644 --- a/ext/dom/tests/modern/token_list/value_edge_cases.phpt +++ b/ext/dom/tests/modern/token_list/value_edge_cases.phpt @@ -5,7 +5,7 @@ dom --FILE-- '); +$dom = Dom\XMLDocument::createFromString(''); $list = $dom->documentElement->classList; var_dump($list->value); diff --git a/ext/dom/tests/modern/xml/Element_innerHTML_prefixed_writing.phpt b/ext/dom/tests/modern/xml/Element_innerHTML_prefixed_writing.phpt index 2bdbc8c82d55..649414878f3a 100644 --- a/ext/dom/tests/modern/xml/Element_innerHTML_prefixed_writing.phpt +++ b/ext/dom/tests/modern/xml/Element_innerHTML_prefixed_writing.phpt @@ -6,7 +6,7 @@ dom '); $dom->documentElement->innerHTML = ''; -echo $dom->saveXML(); +echo $dom->saveXml(); ?> --EXPECT-- diff --git a/ext/dom/tests/modern/xml/Element_innerHTML_writing.phpt b/ext/dom/tests/modern/xml/Element_innerHTML_writing.phpt index f820b42c7de7..5dd8ffbe84ac 100644 --- a/ext/dom/tests/modern/xml/Element_innerHTML_writing.phpt +++ b/ext/dom/tests/modern/xml/Element_innerHTML_writing.phpt @@ -5,31 +5,31 @@ dom --FILE-- createElementNS('urn:a', 'root'); $dom->appendChild($el); $el->innerHTML = '

foo

bar

'; -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; $el->innerHTML = ''; -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; $el->innerHTML = '&'; -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; $el->innerHTML = '<foo>'; -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; echo "----------------\n"; -$dom = DOM\XMLDocument::createFromString(''); +$dom = Dom\XMLDocument::createFromString(''); $child = $dom->documentElement->appendChild($dom->createElementNS('urn:a', 'child')); $child->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns', 'urn:b'); $child->innerHTML = ''; -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; var_dump($child->namespaceURI); var_dump($child->firstChild->namespaceURI); echo "----------------\n"; -$dom = DOM\XMLDocument::createFromString(<< @@ -41,7 +41,7 @@ $dom = DOM\XMLDocument::createFromString(<< XML); $dom->documentElement->innerHTML = $dom->documentElement->innerHTML; -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; echo "----------------\n"; $dom->documentElement->innerHTML = <<documentElement->innerHTML = << XML; -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; ?> --EXPECT-- diff --git a/ext/dom/tests/modern/xml/Element_innerHTML_writing_errors.phpt b/ext/dom/tests/modern/xml/Element_innerHTML_writing_errors.phpt index 0316ac88439f..667ceedfc3b2 100644 --- a/ext/dom/tests/modern/xml/Element_innerHTML_writing_errors.phpt +++ b/ext/dom/tests/modern/xml/Element_innerHTML_writing_errors.phpt @@ -5,14 +5,14 @@ dom --FILE-- ]> XML); $child = $dom->documentElement->appendChild($dom->createElementNS('urn:a', 'child')); -$original = $dom->saveXML(); +$original = $dom->saveXml(); function test($child, $html) { global $dom, $original; @@ -21,7 +21,7 @@ function test($child, $html) { } catch (DOMException $e) { echo $e->getMessage(), "\n"; } - var_dump($dom->saveXML() === $original); + var_dump($dom->saveXml() === $original); } test($child, '&foo;'); diff --git a/ext/dom/tests/modern/xml/Element_innerOuterHTML_reading.phpt b/ext/dom/tests/modern/xml/Element_innerOuterHTML_reading.phpt index 76f2d6fecd20..3ad3b069242e 100644 --- a/ext/dom/tests/modern/xml/Element_innerOuterHTML_reading.phpt +++ b/ext/dom/tests/modern/xml/Element_innerOuterHTML_reading.phpt @@ -5,7 +5,7 @@ dom --FILE-- setAttributeNS('urn:b', 'name', ''); var_dump($container->innerHTML); var_dump($container->outerHTML); -$dom = DOM\XMLDocument::createFromFile(__DIR__ . '/../../book.xml'); +$dom = Dom\XMLDocument::createFromFile(__DIR__ . '/../../book.xml'); var_dump($dom->documentElement->innerHTML); var_dump($dom->documentElement->outerHTML); diff --git a/ext/dom/tests/modern/xml/Element_innerOuterHTML_reading_errors.phpt b/ext/dom/tests/modern/xml/Element_innerOuterHTML_reading_errors.phpt index 585c9c5fd875..f9f8073c2508 100644 --- a/ext/dom/tests/modern/xml/Element_innerOuterHTML_reading_errors.phpt +++ b/ext/dom/tests/modern/xml/Element_innerOuterHTML_reading_errors.phpt @@ -5,7 +5,7 @@ dom --FILE-- insertAdjacentHTML($position, $xml); - echo $dom->saveXML(), "\n"; + echo $dom->saveXml(), "\n"; var_dump($div->childNodes->length); var_dump($dom->documentElement->childNodes->length); } diff --git a/ext/dom/tests/modern/xml/Element_outerHTML_writing.phpt b/ext/dom/tests/modern/xml/Element_outerHTML_writing.phpt index f4bb3c8c4fce..58e09110518f 100644 --- a/ext/dom/tests/modern/xml/Element_outerHTML_writing.phpt +++ b/ext/dom/tests/modern/xml/Element_outerHTML_writing.phpt @@ -7,21 +7,21 @@ dom $dom = Dom\XMLDocument::createFromString(""); $dom->documentElement->firstChild->outerHTML = '

foo

bar

'; -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; $dom->documentElement->firstChild->outerHTML = $dom->documentElement->firstChild->outerHTML; $element = $dom->documentElement->firstChild->firstChild; -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; $dom->documentElement->firstChild->outerHTML = 'tést'; -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; var_dump($element->tagName); $fragment = $dom->createDocumentFragment(); $fragment->appendChild($dom->createElement('p')); $fragment->firstChild->outerHTML = 'bar'; -echo $dom->saveXML($fragment), "\n"; +echo $dom->saveXml($fragment), "\n"; ?> --EXPECT-- diff --git a/ext/dom/tests/modern/xml/return_dom_node_from_xpath.phpt b/ext/dom/tests/modern/xml/return_dom_node_from_xpath.phpt index 4388139c43cb..4f4664eb2d4b 100644 --- a/ext/dom/tests/modern/xml/return_dom_node_from_xpath.phpt +++ b/ext/dom/tests/modern/xml/return_dom_node_from_xpath.phpt @@ -7,7 +7,7 @@ dom $dom = Dom\XMLDocument::createFromString(''); $xpath = new Dom\XPath($dom); -$xpath->registerPhpFunctionNs('urn:x', 'test', fn() => $dom->createElement('foo')); +$xpath->registerPhpFunctionNS('urn:x', 'test', fn() => $dom->createElement('foo')); $xpath->registerNamespace('x', 'urn:x'); $test = $xpath->query('x:test()'); var_dump($test[0]->nodeName); diff --git a/ext/dom/tests/php_function_edge_cases.phpt b/ext/dom/tests/php_function_edge_cases.phpt index 1091b50ce19b..077ec6b4b1ec 100644 --- a/ext/dom/tests/php_function_edge_cases.phpt +++ b/ext/dom/tests/php_function_edge_cases.phpt @@ -7,9 +7,9 @@ dom $doc = new DOMDocument(); $doc->loadHTML('hello'); -$xpath = new DOMXpath($doc); +$xpath = new DOMXPath($doc); $xpath->registerNamespace("php", "http://php.net/xpath"); -$xpath->registerPHPFunctions(); +$xpath->registerPhpFunctions(); try { $xpath->query("//a[php:function(3)]"); } catch (TypeError $e) { diff --git a/ext/dom/tests/xml_parsing_LIBXML_NO_XXE.phpt b/ext/dom/tests/xml_parsing_LIBXML_NO_XXE.phpt index 9033ce50f9ea..983fb6eaa369 100644 --- a/ext/dom/tests/xml_parsing_LIBXML_NO_XXE.phpt +++ b/ext/dom/tests/xml_parsing_LIBXML_NO_XXE.phpt @@ -18,7 +18,7 @@ $xml = <<< XML XML; $doc = Dom\XMLDocument::createFromString($xml, LIBXML_NOENT | LIBXML_NO_XXE); -echo $doc->saveXML(); +echo $doc->saveXml(); ?> --EXPECT-- diff --git a/ext/dom/tests/xml_parsing_LIBXML_RECOVER.phpt b/ext/dom/tests/xml_parsing_LIBXML_RECOVER.phpt index 09ff6803b444..309bf9a39271 100644 --- a/ext/dom/tests/xml_parsing_LIBXML_RECOVER.phpt +++ b/ext/dom/tests/xml_parsing_LIBXML_RECOVER.phpt @@ -10,7 +10,7 @@ $dom->loadXML('', options: LIBXML_RECOVER); echo $dom->saveXML(); $dom = Dom\XMLDocument::createFromString('', options: LIBXML_RECOVER); -echo $dom->saveXML(), "\n"; +echo $dom->saveXml(), "\n"; ?> --EXPECTF-- diff --git a/ext/dom/tests/xpath_context_node.phpt b/ext/dom/tests/xpath_context_node.phpt index 8e60c8686d1e..646bdfadda59 100644 --- a/ext/dom/tests/xpath_context_node.phpt +++ b/ext/dom/tests/xpath_context_node.phpt @@ -16,7 +16,7 @@ $dom->loadXML(<< XML); -$xpath = new DOMXpath($dom); +$xpath = new DOMXPath($dom); foreach ($xpath->query("p", $dom->documentElement->firstElementChild->nextElementSibling) as $p) { echo $p->textContent, "\n"; diff --git a/ext/dom/tests/xpath_domnamespacenode.phpt b/ext/dom/tests/xpath_domnamespacenode.phpt index b7c8196ce641..892936d66039 100644 --- a/ext/dom/tests/xpath_domnamespacenode.phpt +++ b/ext/dom/tests/xpath_domnamespacenode.phpt @@ -9,7 +9,7 @@ $xml = <<<'XML' XML; -$doc = new DomDocument; +$doc = new DOMDocument; $doc->loadXML($xml); $xpath = new DOMXPath($doc); $nodes = $xpath->query('//namespace::*'); diff --git a/ext/dom/tests/xpath_evaluate_basic_types.phpt b/ext/dom/tests/xpath_evaluate_basic_types.phpt index fcb07d5949c5..f2457ff15dbc 100644 --- a/ext/dom/tests/xpath_evaluate_basic_types.phpt +++ b/ext/dom/tests/xpath_evaluate_basic_types.phpt @@ -7,7 +7,7 @@ dom $dom = new DOMDocument(); $dom->loadHTML('

foo

'); -$xpath = new DOMXpath($dom); +$xpath = new DOMXPath($dom); var_dump($xpath->evaluate("count(//p) > 0")); var_dump($xpath->evaluate("string(//p/@align)")); diff --git a/ext/ffi/tests/038.phpt b/ext/ffi/tests/038.phpt index 29fad9e25227..b4f8e4419d66 100644 --- a/ext/ffi/tests/038.phpt +++ b/ext/ffi/tests/038.phpt @@ -15,7 +15,7 @@ for ($i = 0; $i < 10; $i++) { $p = $ffi->cast("int*", $a); var_dump($p[0]); var_dump($p[2]); -vaR_dump($p) +var_dump($p) ?> --EXPECTF-- int(0) diff --git a/ext/ffi/tests/list.phpt b/ext/ffi/tests/list.phpt index cd4bb1f768f5..24604e3b2bdd 100644 --- a/ext/ffi/tests/list.phpt +++ b/ext/ffi/tests/list.phpt @@ -81,7 +81,7 @@ class DList { } } -$dlist = new Dlist; +$dlist = new DList; $dlist->add(1); $dlist->add(3); $dlist->add(5); diff --git a/ext/fileinfo/tests/mime_content_type_001.phpt b/ext/fileinfo/tests/mime_content_type_001.phpt index 98c1325959d8..fb486d5adb77 100644 --- a/ext/fileinfo/tests/mime_content_type_001.phpt +++ b/ext/fileinfo/tests/mime_content_type_001.phpt @@ -16,7 +16,7 @@ try { echo $e->getMessage() . \PHP_EOL; } try { - mime_content_type(new stdclass); + mime_content_type(new stdClass); } catch (\TypeError $e) { echo $e->getMessage() . \PHP_EOL; } diff --git a/ext/filter/tests/039.phpt b/ext/filter/tests/039.phpt index 229feecd4475..ef5ee48d6e6c 100644 --- a/ext/filter/tests/039.phpt +++ b/ext/filter/tests/039.phpt @@ -40,7 +40,7 @@ try { echo "-- (4)\n"; try { - filter_var_array(array(), new stdclass); + filter_var_array(array(), new stdClass); } catch (TypeError $exception) { echo $exception->getMessage() . "\n"; } diff --git a/ext/filter/tests/bug67167.01.phpt b/ext/filter/tests/bug67167.01.phpt index a55fabda304f..ba10fd341ff1 100644 --- a/ext/filter/tests/bug67167.01.phpt +++ b/ext/filter/tests/bug67167.01.phpt @@ -5,7 +5,7 @@ filter --FILE-- diff --git a/ext/gd/tests/bug22544-mb.phpt b/ext/gd/tests/bug22544-mb.phpt index f99307df1212..2fc3709302e8 100644 --- a/ext/gd/tests/bug22544-mb.phpt +++ b/ext/gd/tests/bug22544-mb.phpt @@ -10,11 +10,11 @@ if (!(imagetypes() & IMG_PNG)) { ?> --FILE-- diff --git a/ext/gd/tests/bug22544.phpt b/ext/gd/tests/bug22544.phpt index 28fc6bdfbb0c..f5634327f7c8 100644 --- a/ext/gd/tests/bug22544.phpt +++ b/ext/gd/tests/bug22544.phpt @@ -10,11 +10,11 @@ if (!(imagetypes() & IMG_PNG)) { ?> --FILE-- diff --git a/ext/gd/tests/bug27582_1.phpt b/ext/gd/tests/bug27582_1.phpt index 1f15474f50d4..7ab99455b55a 100644 --- a/ext/gd/tests/bug27582_1.phpt +++ b/ext/gd/tests/bug27582_1.phpt @@ -12,12 +12,12 @@ if (!(imagetypes() & IMG_PNG)) { --FILE-- diff --git a/ext/gd/tests/bug48555.phpt b/ext/gd/tests/bug48555.phpt index 37158812cb8c..12180ac9c00e 100644 --- a/ext/gd/tests/bug48555.phpt +++ b/ext/gd/tests/bug48555.phpt @@ -10,10 +10,10 @@ gd getMessage(), "\n"; } try { - var_dump(gmp_intval(new stdclass)); + var_dump(gmp_intval(new stdClass)); } catch (TypeError $e) { echo $e->getMessage(), "\n"; } diff --git a/ext/gmp/tests/gmp_nextprime.phpt b/ext/gmp/tests/gmp_nextprime.phpt index b907d7a84e99..68308b934478 100644 --- a/ext/gmp/tests/gmp_nextprime.phpt +++ b/ext/gmp/tests/gmp_nextprime.phpt @@ -28,7 +28,7 @@ try { echo $e->getMessage() . \PHP_EOL; } try { - $n = gmp_nextprime(new stdclass()); + $n = gmp_nextprime(new stdClass()); var_dump(gmp_strval($n)); } catch (\TypeError $e) { echo $e->getMessage() . \PHP_EOL; diff --git a/ext/gmp/tests/gmp_strval.phpt b/ext/gmp/tests/gmp_strval.phpt index 1221d04b3b1d..6155d99bbe08 100644 --- a/ext/gmp/tests/gmp_strval.phpt +++ b/ext/gmp/tests/gmp_strval.phpt @@ -57,7 +57,7 @@ try { echo $e->getMessage() . \PHP_EOL; } try { - var_dump(gmp_strval(new stdclass)); + var_dump(gmp_strval(new stdClass)); } catch (\TypeError $e) { echo $e->getMessage() . \PHP_EOL; } diff --git a/ext/gmp/tests/gmp_sub.phpt b/ext/gmp/tests/gmp_sub.phpt index 5161bce10356..42635e1b6502 100644 --- a/ext/gmp/tests/gmp_sub.phpt +++ b/ext/gmp/tests/gmp_sub.phpt @@ -22,13 +22,13 @@ var_dump($g = gmp_sub(10000, -1)); var_dump(gmp_strval($g)); try { - var_dump($g = gmp_sub(10000, new stdclass)); + var_dump($g = gmp_sub(10000, new stdClass)); var_dump(gmp_strval($g)); } catch (\TypeError $e) { echo $e->getMessage() . \PHP_EOL; } try { - var_dump($g = gmp_sub(new stdclass, 100)); + var_dump($g = gmp_sub(new stdClass, 100)); var_dump(gmp_strval($g)); } catch (\TypeError $e) { echo $e->getMessage() . \PHP_EOL; diff --git a/ext/intl/breakiterator/breakiterator_iterators.cpp b/ext/intl/breakiterator/breakiterator_iterators.cpp index 805057489013..87f86d107cac 100644 --- a/ext/intl/breakiterator/breakiterator_iterators.cpp +++ b/ext/intl/breakiterator/breakiterator_iterators.cpp @@ -275,7 +275,7 @@ U_CFUNC PHP_METHOD(IntlPartsIterator, getRuleStatus) zval *iter = &ii->iterator->data; ZEND_ASSERT(Z_TYPE_P(iter) == IS_OBJECT); zend_call_method_with_0_params( - Z_OBJ_P(iter), Z_OBJCE_P(iter), NULL, "getrulestatus", return_value); + Z_OBJ_P(iter), Z_OBJCE_P(iter), NULL, "getRuleStatus", return_value); } U_CFUNC void breakiterator_register_IntlPartsIterator_class(void) diff --git a/ext/intl/calendar/calendar_methods.cpp b/ext/intl/calendar/calendar_methods.cpp index fe4749d6d62d..1c9e252da5c4 100644 --- a/ext/intl/calendar/calendar_methods.cpp +++ b/ext/intl/calendar/calendar_methods.cpp @@ -1055,7 +1055,7 @@ U_CFUNC PHP_FUNCTION(intlcal_from_date_time) goto error; } - zend_call_method_with_0_params(date_obj, php_date_get_date_ce(), NULL, "gettimestamp", &zv_timestamp); + zend_call_method_with_0_params(date_obj, php_date_get_date_ce(), NULL, "getTimestamp", &zv_timestamp); if (Z_TYPE(zv_timestamp) != IS_LONG) { intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "bad DateTime; call to DateTime::getTimestamp() failed"); @@ -1162,7 +1162,7 @@ U_CFUNC PHP_FUNCTION(intlcal_to_date_time) zval_ptr_dtor(&ts_zval); /* due to bug #40743, we have to set the time zone again */ - zend_call_method_with_1_params(Z_OBJ_P(return_value), NULL, NULL, "settimezone", + zend_call_method_with_1_params(Z_OBJ_P(return_value), NULL, NULL, "setTimezone", &retval, timezone_zval); if (Z_ISUNDEF(retval) || Z_TYPE(retval) == IS_FALSE) { intl_errors_set(CALENDAR_ERROR_P(co), U_ILLEGAL_ARGUMENT_ERROR, diff --git a/ext/intl/common/common_date.cpp b/ext/intl/common/common_date.cpp index fb5ca6edaebe..e0f91e767d1d 100644 --- a/ext/intl/common/common_date.cpp +++ b/ext/intl/common/common_date.cpp @@ -106,7 +106,7 @@ U_CFUNC zend_result intl_datetime_decompose(zend_object *obj, double *millis, Ti } if (millis) { - auto getTimestampMethod = static_cast(zend_hash_str_find_ptr(&obj->ce->function_table, ZEND_STRL("gettimestamp"))); + auto getTimestampMethod = static_cast(zend_hash_str_find_ptr(&obj->ce->function_table, ZEND_STRL("getTimestamp"))); zval retval; ZEND_ASSERT(getTimestampMethod && "DateTimeInterface is sealed and thus must have this method"); diff --git a/ext/intl/converter/converter.cpp b/ext/intl/converter/converter.cpp index 88f05136bbbd..17822d2dd915 100644 --- a/ext/intl/converter/converter.cpp +++ b/ext/intl/converter/converter.cpp @@ -509,7 +509,7 @@ static void php_converter_resolve_callback( const char *callback_name, size_t callback_name_len ) { - zend_function *fn = reinterpret_cast(zend_hash_str_find_ptr_lc(&obj->ce->function_table, callback_name, callback_name_len)); + zend_function *fn = reinterpret_cast(zend_hash_str_find_ptr(&obj->ce->function_table, callback_name, callback_name_len)); ZEND_ASSERT(fn != nullptr); fcc->function_handler = fn; diff --git a/ext/intl/tests/breakiter_setText_basic.phpt b/ext/intl/tests/breakiter_setText_basic.phpt index 1262e4a1e488..bc91555972a7 100644 --- a/ext/intl/tests/breakiter_setText_basic.phpt +++ b/ext/intl/tests/breakiter_setText_basic.phpt @@ -6,7 +6,7 @@ intl sort($b)); ?> --EXPECT-- diff --git a/ext/intl/tests/calendar_createInstance_basic.phpt b/ext/intl/tests/calendar_createInstance_basic.phpt index f19f7c053588..92d4c4618f34 100644 --- a/ext/intl/tests/calendar_createInstance_basic.phpt +++ b/ext/intl/tests/calendar_createInstance_basic.phpt @@ -9,10 +9,10 @@ date.timezone=Europe/Amsterdam getTimeZone()); -print_R($cal->getLocale(Locale::ACTUAL_LOCALE)); +print_r($cal->getTimeZone()); +print_r($cal->getLocale(Locale::ACTUAL_LOCALE)); echo "\n"; -print_R($cal->getType()); +print_r($cal->getType()); echo "\n"; $timeMillis = $cal->getTime(); diff --git a/ext/intl/tests/calendar_createInstance_variation1.phpt b/ext/intl/tests/calendar_createInstance_variation1.phpt index 4c0848d80f1c..6c04aeae81d4 100644 --- a/ext/intl/tests/calendar_createInstance_variation1.phpt +++ b/ext/intl/tests/calendar_createInstance_variation1.phpt @@ -9,28 +9,28 @@ intl.default_locale=nl getTimeZone()); -print_R($cal->getLocale(Locale::ACTUAL_LOCALE)); +print_r($cal->getTimeZone()); +print_r($cal->getLocale(Locale::ACTUAL_LOCALE)); echo "\n"; $cal = intlcal_create_instance('Europe/Lisbon', null); -print_R($cal->getTimeZone()); -print_R($cal->getLocale(Locale::ACTUAL_LOCALE)); +print_r($cal->getTimeZone()); +print_r($cal->getLocale(Locale::ACTUAL_LOCALE)); echo "\n"; $cal = intlcal_create_instance(IntlTimeZone::createTimeZone('Europe/Lisbon')); -print_R($cal->getTimeZone()); -print_R($cal->getLocale(Locale::ACTUAL_LOCALE)); +print_r($cal->getTimeZone()); +print_r($cal->getLocale(Locale::ACTUAL_LOCALE)); echo "\n"; $cal = intlcal_create_instance(null, "pt"); -print_R($cal->getTimeZone()); -print_R($cal->getLocale(Locale::ACTUAL_LOCALE)); +print_r($cal->getTimeZone()); +print_r($cal->getLocale(Locale::ACTUAL_LOCALE)); echo "\n"; $cal = intlcal_create_instance("Europe/Lisbon", "pt"); -print_R($cal->getTimeZone()); -print_R($cal->getLocale(Locale::ACTUAL_LOCALE)); +print_r($cal->getTimeZone()); +print_r($cal->getLocale(Locale::ACTUAL_LOCALE)); echo "\n"; ?> diff --git a/ext/intl/tests/calendar_setTimeZone_error2.phpt b/ext/intl/tests/calendar_setTimeZone_error2.phpt index 6b65aa1a0e7c..590346f894ab 100644 --- a/ext/intl/tests/calendar_setTimeZone_error2.phpt +++ b/ext/intl/tests/calendar_setTimeZone_error2.phpt @@ -11,12 +11,12 @@ intl.default_locale=nl $intlcal = new IntlGregorianCalendar(); $pstdate = new DateTime('2012-01-01 00:00:00 WEST'); -var_dump($intlcal->setTimeZone($pstdate->getTimeZone())); +var_dump($intlcal->setTimeZone($pstdate->getTimezone())); var_dump($intlcal->getErrorMessage()); var_dump($intlcal->getTimeZone()->getID()); $pstdate = new DateTime('2012-01-01 00:00:00 +24:00'); -var_dump($intlcal->setTimeZone($pstdate->getTimeZone())); +var_dump($intlcal->setTimeZone($pstdate->getTimezone())); var_dump($intlcal->getErrorMessage()); var_dump($intlcal->getTimeZone()->getID()); ?> diff --git a/ext/intl/tests/calendar_setTimeZone_variation2.phpt b/ext/intl/tests/calendar_setTimeZone_variation2.phpt index e9866e88c688..b64b06080311 100644 --- a/ext/intl/tests/calendar_setTimeZone_variation2.phpt +++ b/ext/intl/tests/calendar_setTimeZone_variation2.phpt @@ -12,11 +12,11 @@ $intlcal->setTimeZone(new DateTimeZone('Europe/Madrid')); var_dump($intlcal->getTimeZone()->getID()); $pstdate = new DateTime('2012-01-01 00:00:00 PST'); -$intlcal->setTimeZone($pstdate->getTimeZone()); +$intlcal->setTimeZone($pstdate->getTimezone()); var_dump($intlcal->getTimeZone()->getID()); $offsetdate = new DateTime('2012-01-01 00:00:00 -02:30'); -$intlcal->setTimeZone($offsetdate->getTimeZone()); +$intlcal->setTimeZone($offsetdate->getTimezone()); var_dump($intlcal->getTimeZone()->getID()); ?> --EXPECTF-- diff --git a/ext/intl/tests/calendar_toDateTime_basic.phpt b/ext/intl/tests/calendar_toDateTime_basic.phpt index 09942cbe3d8f..eedcc9d7bea7 100644 --- a/ext/intl/tests/calendar_toDateTime_basic.phpt +++ b/ext/intl/tests/calendar_toDateTime_basic.phpt @@ -11,7 +11,7 @@ $cal = new IntlGregorianCalendar(2012,04,17,17,35,36); $dt = $cal->toDateTime(); -var_dump($dt->format("c"), $dt->getTimeZone()->getName()); +var_dump($dt->format("c"), $dt->getTimezone()->getName()); ?> --EXPECTF-- Deprecated: Calling IntlGregorianCalendar::__construct() with more than 2 arguments is deprecated, use either IntlGregorianCalendar::createFromDate() or IntlGregorianCalendar::createFromDateTime() instead in %s on line %d diff --git a/ext/intl/tests/dateformat___construct_bad_tz_cal.phpt b/ext/intl/tests/dateformat___construct_bad_tz_cal.phpt index e33464a40a44..3d1d1ac09f32 100644 --- a/ext/intl/tests/dateformat___construct_bad_tz_cal.phpt +++ b/ext/intl/tests/dateformat___construct_bad_tz_cal.phpt @@ -16,7 +16,7 @@ try { echo $e::class, ': ', $e->getMessage(), "\n"; } try { - var_dump(new IntlDateFormatter(NULL, 0, 0, NULL, new stdclass)); + var_dump(new IntlDateFormatter(NULL, 0, 0, NULL, new stdClass)); } catch (Throwable $e) { echo $e::class, ': ', $e->getMessage(), "\n"; } diff --git a/ext/intl/tests/dateformat_formatObject_error.phpt b/ext/intl/tests/dateformat_formatObject_error.phpt index b38a379b9f5a..59c19ff90732 100644 --- a/ext/intl/tests/dateformat_formatObject_error.phpt +++ b/ext/intl/tests/dateformat_formatObject_error.phpt @@ -21,7 +21,7 @@ try { echo $e::class, ': ', $e->getMessage(), "\n"; } -var_dump(IntlDateFormatter::formatObject(new stdclass)); +var_dump(IntlDateFormatter::formatObject(new stdClass)); var_dump(intl_get_error_message()); var_dump(IntlDateFormatter::formatObject(new A)); var_dump(intl_get_error_message()); diff --git a/ext/intl/tests/dateformat_get_set_calendar_variant_icu70.phpt b/ext/intl/tests/dateformat_get_set_calendar_variant_icu70.phpt index d34c93bfb369..ef79efc756be 100644 --- a/ext/intl/tests/dateformat_get_set_calendar_variant_icu70.phpt +++ b/ext/intl/tests/dateformat_get_set_calendar_variant_icu70.phpt @@ -19,7 +19,7 @@ global $ts; echo $df->format($ts), "\n"; var_dump($df->getCalendar(), $df->getCalendarObject()->getType(), -$df->getCalendarObject()->getTimeZone()->getId()); +$df->getCalendarObject()->getTimeZone()->getID()); echo "\n"; } diff --git a/ext/intl/tests/dateformat_get_set_timezone_variant5.phpt b/ext/intl/tests/dateformat_get_set_timezone_variant5.phpt index 428e67fc24e3..95f405c82c33 100644 --- a/ext/intl/tests/dateformat_get_set_timezone_variant5.phpt +++ b/ext/intl/tests/dateformat_get_set_timezone_variant5.phpt @@ -14,7 +14,7 @@ function d(IntlDateFormatter $df) { global $ts; echo $df->format($ts), "\n"; var_dump( -$df->getTimeZoneID(), +$df->getTimeZoneId(), $df->getTimeZone()->getID()); echo "\n"; } diff --git a/ext/intl/tests/gregoriancalendar___construct_basic.phpt b/ext/intl/tests/gregoriancalendar___construct_basic.phpt index 8ebe683f8d16..abb9a7711b10 100644 --- a/ext/intl/tests/gregoriancalendar___construct_basic.phpt +++ b/ext/intl/tests/gregoriancalendar___construct_basic.phpt @@ -9,23 +9,23 @@ intl.default_locale=nl getTimeZone()->getId()); +var_dump($intlcal->getTimeZone()->getID()); var_dump($intlcal->getLocale(1)); $intlcal = new IntlGregorianCalendar('Europe/Lisbon', NULL); -var_dump($intlcal->getTimeZone()->getId()); +var_dump($intlcal->getTimeZone()->getID()); var_dump($intlcal->getLocale(1)); $intlcal = new IntlGregorianCalendar(NULL, 'pt_PT'); -var_dump($intlcal->getTimeZone()->getId()); +var_dump($intlcal->getTimeZone()->getID()); var_dump($intlcal->getLocale(1)); $intlcal = new IntlGregorianCalendar('Europe/Lisbon', 'pt_PT'); -var_dump($intlcal->getTimeZone()->getId()); +var_dump($intlcal->getTimeZone()->getID()); var_dump($intlcal->getLocale(1)); $intlcal = new IntlGregorianCalendar('Europe/Paris', 'fr_CA', NULL, NULL, NULL, NULL); -var_dump($intlcal->getTimeZone()->getId()); +var_dump($intlcal->getTimeZone()->getID()); var_dump($intlcal->getLocale(1)); var_dump($intlcal->getType()); diff --git a/ext/intl/tests/gregoriancalendar___construct_variant1.phpt b/ext/intl/tests/gregoriancalendar___construct_variant1.phpt index 6cf057f0a098..8c2a9f5385de 100644 --- a/ext/intl/tests/gregoriancalendar___construct_variant1.phpt +++ b/ext/intl/tests/gregoriancalendar___construct_variant1.phpt @@ -8,7 +8,7 @@ date.timezone=Europe/Amsterdam getTimeZone()->getId()); +var_dump($intlcal->getTimeZone()->getID()); var_dump($intlcal->getTime(), (float)strtotime('2012-02-29 16:00:00') * 1000); $intlcal = new IntlGregorianCalendar(2012, 1, 29, 16, 7, 8); diff --git a/ext/intl/tests/intltz_get_canonical_id_refs.phpt b/ext/intl/tests/intltz_get_canonical_id_refs.phpt index 973b7006c7d1..4f4ac495c52b 100644 --- a/ext/intl/tests/intltz_get_canonical_id_refs.phpt +++ b/ext/intl/tests/intltz_get_canonical_id_refs.phpt @@ -9,7 +9,7 @@ class Test { } $test = new Test; $ref =& $test->prop; -print_R(intltz_get_canonical_id('Portugal', $ref)); +print_r(intltz_get_canonical_id('Portugal', $ref)); var_dump($test); ?> --EXPECT-- diff --git a/ext/intl/tests/locale_subtags.phpt b/ext/intl/tests/locale_subtags.phpt index f6cb7d1e957d..9d1a97409966 100644 --- a/ext/intl/tests/locale_subtags.phpt +++ b/ext/intl/tests/locale_subtags.phpt @@ -15,9 +15,9 @@ var_dump(Locale::addLikelySubtags("%%%invalid%%%locale%%%")); var_dump(intl_get_error_message()); var_dump(Locale::minimizeSubtags("%%%Invalid%%%maximized%%%locale%%%")); var_dump(intl_get_error_message()); -var_dump(Locale::addLikelySubTags(str_repeat($locale, 1024))); +var_dump(Locale::addLikelySubtags(str_repeat($locale, 1024))); var_dump(intl_get_error_message()); -var_dump(Locale::minimizeSubTags(str_repeat($max, 1024))); +var_dump(Locale::minimizeSubtags(str_repeat($max, 1024))); var_dump(intl_get_error_message()); ?> --EXPECTF-- diff --git a/ext/intl/tests/msgfmt_format_error5.phpt b/ext/intl/tests/msgfmt_format_error5.phpt index d5d7e6a4dc8e..f618c3610f8b 100644 --- a/ext/intl/tests/msgfmt_format_error5.phpt +++ b/ext/intl/tests/msgfmt_format_error5.phpt @@ -14,7 +14,7 @@ EOD; $mf = new MessageFormatter('en_US', $fmt); try { - var_dump($mf->format(array("foo" => new stdclass()))); + var_dump($mf->format(array("foo" => new stdClass()))); } catch (Throwable $e) { echo $e::class, ': ', $e->getMessage(), PHP_EOL; } diff --git a/ext/intl/tests/spoofchecker_008.phpt b/ext/intl/tests/spoofchecker_008.phpt index 66e39967c788..24c45690cf91 100644 --- a/ext/intl/tests/spoofchecker_008.phpt +++ b/ext/intl/tests/spoofchecker_008.phpt @@ -13,7 +13,7 @@ $s->setAllowedChars('[a-z]'); var_dump($s->isSuspicious("123")); $s->setAllowedChars('[1-3]'); var_dump($s->isSuspicious("123")); -$s->setAllowedChars('[a-z]', SpoofChecker::IGNORE_SPACE | SpoofChecker::CASE_INSENSITIVE); +$s->setAllowedChars('[a-z]', Spoofchecker::IGNORE_SPACE | Spoofchecker::CASE_INSENSITIVE); var_dump($s->isSuspicious("ABC")); try { diff --git a/ext/intl/tests/timezone_fromDateTimeZone_basic.phpt b/ext/intl/tests/timezone_fromDateTimeZone_basic.phpt index 3e9597de0bb8..24fbc9ab2439 100644 --- a/ext/intl/tests/timezone_fromDateTimeZone_basic.phpt +++ b/ext/intl/tests/timezone_fromDateTimeZone_basic.phpt @@ -13,7 +13,7 @@ var_dump($tz->getID(), $tz->getRawOffset()); $dt = new DateTime('2012-01-01 00:00:00 CET'); -$dtz = $dt->getTimeZone(); +$dtz = $dt->getTimezone(); /* this is different from new DateTimeZone('CET'), * which gives a Europe/Berlin timezone */ var_dump($dtz->getName()); @@ -22,7 +22,7 @@ var_dump($tz->getID(), $tz->getRawOffset()); $dt = new DateTime('2012-01-01 00:00:00 +0340'); -$dtz = $dt->getTimeZone(); +$dtz = $dt->getTimezone(); /* I don't think this timezone can be generated without a DateTime object */ var_dump($dtz->getName()); $tz = IntlTimeZone::fromDateTimeZone($dtz); diff --git a/ext/intl/tests/timezone_fromDateTimeZone_error.phpt b/ext/intl/tests/timezone_fromDateTimeZone_error.phpt index acd608bc376c..86ee6734103d 100644 --- a/ext/intl/tests/timezone_fromDateTimeZone_error.phpt +++ b/ext/intl/tests/timezone_fromDateTimeZone_error.phpt @@ -8,7 +8,7 @@ intl getTimeZone())); +var_dump(IntlTimeZone::fromDateTimeZone($dt->getTimezone())); var_dump(intl_get_error_message()); ?> diff --git a/ext/intl/tests/timezone_getCanonicalID_basic.phpt b/ext/intl/tests/timezone_getCanonicalID_basic.phpt index 0bc18e4c8b65..7e12758a0bd0 100644 --- a/ext/intl/tests/timezone_getCanonicalID_basic.phpt +++ b/ext/intl/tests/timezone_getCanonicalID_basic.phpt @@ -4,9 +4,9 @@ IntlTimeZone::getCanonicalID: basic test intl --FILE-- --EXPECT-- diff --git a/ext/intl/tests/timezone_getTZData_basic.phpt b/ext/intl/tests/timezone_getTZData_basic.phpt index 99d21357b556..075819c748ba 100644 --- a/ext/intl/tests/timezone_getTZData_basic.phpt +++ b/ext/intl/tests/timezone_getTZData_basic.phpt @@ -4,9 +4,9 @@ IntlTimeZone::getTZDataVersion: basic test intl --FILE-- --EXPECTF-- diff --git a/ext/json/json_encoder.c b/ext/json/json_encoder.c index 424315eca7ec..d278c4f8d84e 100644 --- a/ext/json/json_encoder.c +++ b/ext/json/json_encoder.c @@ -577,7 +577,7 @@ static zend_result php_json_encode_serializable_object(smart_str *buf, zend_obje ZEND_GUARD_PROTECT_RECURSION(guard, JSON); - zend_function *json_serialize_method = zend_hash_str_find_ptr(&ce->function_table, ZEND_STRL("jsonserialize")); + zend_function *json_serialize_method = zend_hash_str_find_ptr(&ce->function_table, ZEND_STRL("jsonSerialize")); ZEND_ASSERT(json_serialize_method != NULL && "This should be guaranteed prior to calling this function"); zend_call_known_function(json_serialize_method, obj, ce, &retval, 0, NULL, NULL); /* An exception has occurred */ diff --git a/ext/json/tests/004.phpt b/ext/json/tests/004.phpt index 7c000c67ad68..66436a31f299 100644 --- a/ext/json/tests/004.phpt +++ b/ext/json/tests/004.phpt @@ -3,7 +3,7 @@ json_encode() & endless loop - 2 --FILE-- prop = $a; var_dump($a); diff --git a/ext/json/tests/bug54058.phpt b/ext/json/tests/bug54058.phpt index 25c5b6f5ceba..6dce91cb8ceb 100644 --- a/ext/json/tests/bug54058.phpt +++ b/ext/json/tests/bug54058.phpt @@ -8,12 +8,12 @@ $bad_utf8 = quoted_printable_decode('=B0'); json_encode($bad_utf8); var_dump(json_last_error(), json_last_error_msg()); -$a = new stdclass; +$a = new stdClass; $a->foo = quoted_printable_decode('=B0'); json_encode($a); var_dump(json_last_error(), json_last_error_msg()); -$b = new stdclass; +$b = new stdClass; $b->foo = $bad_utf8; $b->bar = 1; json_encode($b); diff --git a/ext/json/tests/serialize.phpt b/ext/json/tests/serialize.phpt index 31b36221ef9e..c47299721422 100644 --- a/ext/json/tests/serialize.phpt +++ b/ext/json/tests/serialize.phpt @@ -46,7 +46,7 @@ $adata = array( 'bool' => false, 'nil' => null, 'arr' => array(1,2,3), - 'obj' => new StdClass, + 'obj' => new stdClass, ); $ndata = array_values($adata); diff --git a/ext/libxml/tests/004.phpt b/ext/libxml/tests/004.phpt index 718f8cbdc202..d1b0fd24e356 100644 --- a/ext/libxml/tests/004.phpt +++ b/ext/libxml/tests/004.phpt @@ -9,7 +9,7 @@ $ctxs = array( NULL, 'bogus', 123, - new stdclass, + new stdClass, array('a'), stream_context_create(), ); diff --git a/ext/libxml/tests/bug79191.phpt b/ext/libxml/tests/bug79191.phpt index 8f0ef963293a..77e517b57ccd 100644 --- a/ext/libxml/tests/bug79191.phpt +++ b/ext/libxml/tests/bug79191.phpt @@ -11,7 +11,7 @@ try { } $dom = new DOMDocument; -$dom->loadxml(''); +$dom->loadXML(''); var_dump($dom->save(__DIR__ . '/bug79191.xml')); ?> --CLEAN-- diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 3d005b3835a7..5aefab9cbb45 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -2308,7 +2308,7 @@ static zend_always_inline zend_inheritance_cache_entry* zend_accel_inheritance_c } if (found && entry->dependencies) { for (i = 0; i < entry->dependencies_count; i++) { - const zend_class_entry *dependency_ce = zend_lookup_class_ex(entry->dependencies[i].name, NULL, ZEND_FETCH_CLASS_NO_AUTOLOAD); + const zend_class_entry *dependency_ce = zend_lookup_class_ex(entry->dependencies[i].name, ZEND_FETCH_CLASS_NO_AUTOLOAD); if (dependency_ce != entry->dependencies[i].ce) { if (!dependency_ce) { @@ -2352,7 +2352,7 @@ static zend_class_entry* zend_accel_inheritance_cache_get(zend_class_entry *ce, } for (uint32_t i = 0; i < entry->dependencies_count; i++) { - const zend_class_entry *dependency_ce = zend_lookup_class_ex(entry->dependencies[i].name, NULL, 0); + const zend_class_entry *dependency_ce = zend_lookup_class_ex(entry->dependencies[i].name, 0); if (dependency_ce == NULL) { return NULL; @@ -3847,9 +3847,7 @@ static zend_result preload_resolve_deps(preload_error *error, const zend_class_e memset(error, 0, sizeof(preload_error)); if (ce->parent_name) { - zend_string *key = zend_string_tolower(ce->parent_name); - const zend_class_entry *parent = zend_hash_find_ptr(EG(class_table), key); - zend_string_release(key); + const zend_class_entry *parent = zend_hash_find_ptr(EG(class_table), ce->parent_name); if (!parent) { error->kind = "Unknown parent "; error->name = ZSTR_VAL(ce->parent_name); @@ -3860,7 +3858,7 @@ static zend_result preload_resolve_deps(preload_error *error, const zend_class_e if (ce->num_interfaces) { for (uint32_t i = 0; i < ce->num_interfaces; i++) { const zend_class_entry *interface = - zend_hash_find_ptr(EG(class_table), ce->interface_names[i].lc_name); + zend_hash_find_ptr(EG(class_table), ce->interface_names[i].name); if (!interface) { error->kind = "Unknown interface "; error->name = ZSTR_VAL(ce->interface_names[i].name); @@ -3872,7 +3870,7 @@ static zend_result preload_resolve_deps(preload_error *error, const zend_class_e if (ce->num_traits) { for (uint32_t i = 0; i < ce->num_traits; i++) { const zend_class_entry *trait = - zend_hash_find_ptr(EG(class_table), ce->trait_names[i].lc_name); + zend_hash_find_ptr(EG(class_table), ce->trait_names[i].name); if (!trait) { error->kind = "Unknown trait "; error->name = ZSTR_VAL(ce->trait_names[i].name); @@ -4058,21 +4056,22 @@ static void preload_link(void) continue; } - zend_string *lcname = zend_string_tolower(ce->name); + /* Held across linking: ce may be replaced or destroyed on bailout */ + zend_string *key_name = zend_string_copy(ce->name); if (!(ce->ce_flags & ZEND_ACC_ANON_CLASS)) { - if (zend_hash_exists(EG(class_table), lcname)) { - zend_string_release(lcname); + if (zend_hash_exists(EG(class_table), key_name)) { + zend_string_release(key_name); continue; } } preload_error error_info; if (preload_resolve_deps(&error_info, ce) == FAILURE) { - zend_string_release(lcname); + zend_string_release(key_name); continue; } - zv = zend_hash_set_bucket_key(EG(class_table), (Bucket*)zv, lcname); + zv = zend_hash_set_bucket_key(EG(class_table), (Bucket*)zv, key_name); ZEND_ASSERT(zv && "We already checked above that the class doesn't exist yet"); /* Set the FILE_CACHED flag to force a lazy load, and the CACHED flag to @@ -4095,7 +4094,7 @@ static void preload_link(void) CG(compiled_filename) = ce->info.user.filename; CG(zend_lineno) = ce->info.user.line_start; zend_try { - ce = zend_do_link_class(ce, NULL, lcname); + ce = zend_do_link_class(ce, key_name); if (!ce) { ZEND_ASSERT(0 && "Class linking failed?"); } @@ -4128,7 +4127,7 @@ static void preload_link(void) CG(in_compilation) = false; CG(compiled_filename) = NULL; zend_free_recorded_errors(); - zend_string_release(lcname); + zend_string_release(key_name); } ZEND_HASH_FOREACH_END(); } while (changed); @@ -4171,10 +4170,9 @@ static void preload_link(void) if ((ce->ce_flags & (ZEND_ACC_TOP_LEVEL|ZEND_ACC_ANON_CLASS)) && !(ce->ce_flags & ZEND_ACC_LINKED)) { - zend_string *lcname = zend_string_tolower(ce->name); preload_error error; if (!(ce->ce_flags & ZEND_ACC_ANON_CLASS) - && zend_hash_exists(EG(class_table), lcname)) { + && zend_hash_exists(EG(class_table), ce->name)) { zend_error_at( E_WARNING, ce->info.user.filename, ce->info.user.line_start, "Can't preload already declared class %s", ZSTR_VAL(ce->name)); @@ -4190,7 +4188,6 @@ static void preload_link(void) "Can't preload unlinked class %s: %s", ZSTR_VAL(ce->name), ZSTR_VAL(error->message)); } - zend_string_release(lcname); } } ZEND_HASH_FOREACH_END(); diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h index 91642e288d31..8d58f2b4476a 100644 --- a/ext/opcache/ZendAccelerator.h +++ b/ext/opcache/ZendAccelerator.h @@ -109,9 +109,8 @@ typedef enum _zend_accel_restart_reason { } zend_accel_restart_reason; typedef struct _zend_early_binding { - zend_string *lcname; + zend_string *name; zend_string *rtd_key; - zend_string *lc_parent_name; uint32_t cache_slot; } zend_early_binding; diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index fbbfab6b243c..3c35f3243a0d 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -574,7 +574,7 @@ static zend_class_entry* zend_get_known_class(const zend_op_array *op_array, con ZEND_ASSERT(Z_TYPE_P(zv) == IS_STRING); class_name = Z_STR_P(zv); - ce = zend_lookup_class_ex(class_name, NULL, ZEND_FETCH_CLASS_NO_AUTOLOAD); + ce = zend_lookup_class_ex(class_name, ZEND_FETCH_CLASS_NO_AUTOLOAD); if (ce && (ce->type == ZEND_INTERNAL_CLASS || ce->info.user.filename != op_array->filename)) { ce = NULL; } @@ -735,7 +735,6 @@ static bool zend_jit_class_may_be_modified(const zend_class_entry *ce, const zen } for (i=0; i < ce->num_traits; i++) { zend_class_entry *trait = zend_fetch_class_by_name(ce->trait_names[i].name, - ce->trait_names[i].lc_name, ZEND_FETCH_CLASS_TRAIT | ZEND_FETCH_CLASS_NO_AUTOLOAD | ZEND_FETCH_CLASS_SILENT); if (!trait || zend_jit_class_may_be_modified(trait, called_from)) { return 1; @@ -2833,8 +2832,7 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op if (opline->op1_type == IS_CONST) { zval *zv = RT_CONSTANT(opline, opline->op1); if (Z_TYPE_P(zv) == IS_STRING) { - zval *lc = zv + 1; - ce = (zend_class_entry*)zend_hash_find_ptr(EG(class_table), Z_STR_P(lc)); + ce = (zend_class_entry*)zend_hash_find_ptr(EG(class_table), Z_STR_P(zv)); } } } diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c index 64a48068f378..1e87cc423b2c 100644 --- a/ext/opcache/jit/zend_jit_helpers.c +++ b/ext/opcache/jit/zend_jit_helpers.c @@ -77,11 +77,11 @@ static uint32_t ZEND_FASTCALL zend_jit_jmp_frameless_helper(zval *func_name, voi static zend_function* ZEND_FASTCALL zend_jit_find_ns_func_helper(zval *func_name, void **cache_slot) { - zval *func = zend_hash_find_known_hash(EG(function_table), Z_STR_P(func_name + 1)); + zval *func = zend_hash_find_known_hash(EG(function_table), Z_STR_P(func_name)); zend_function *fbc; if (func == NULL) { - func = zend_hash_find_known_hash(EG(function_table), Z_STR_P(func_name + 2)); + func = zend_hash_find_known_hash(EG(function_table), Z_STR_P(func_name + 1)); if (UNEXPECTED(func == NULL)) { return NULL; } @@ -143,7 +143,7 @@ static zend_function* ZEND_FASTCALL zend_jit_find_method_helper(zend_object *obj zend_class_entry *called_scope = obj->ce; zend_function *fbc; - fbc = obj->handlers->get_method(obj_ptr, Z_STR_P(function_name), function_name + 1); + fbc = obj->handlers->get_method(obj_ptr, Z_STR_P(function_name), function_name); if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { zend_undefined_method(called_scope, Z_STR_P(function_name)); @@ -194,7 +194,7 @@ static zend_class_entry* ZEND_FASTCALL zend_jit_find_class_helper(zend_execute_d /* no function found. try a static method in class */ ce = CACHED_PTR(opline->result.num); if (UNEXPECTED(ce == NULL)) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); } } else if (opline->op1_type == IS_UNUSED) { ce = zend_fetch_class(NULL, opline->op1.num); @@ -224,7 +224,7 @@ static zend_function* ZEND_FASTCALL zend_jit_find_static_method_helper(zend_exec if (ce->get_static_method) { fbc = ce->get_static_method(ce, Z_STR_P(function_name)); } else { - fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), RT_CONSTANT(opline, opline->op2) + 1); + fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), RT_CONSTANT(opline, opline->op2)); } if (UNEXPECTED(fbc == NULL)) { if (EXPECTED(!EG(exception))) { diff --git a/ext/opcache/jit/zend_jit_ir.c b/ext/opcache/jit/zend_jit_ir.c index cf43d3ad840f..da5da2a0047b 100644 --- a/ext/opcache/jit/zend_jit_ir.c +++ b/ext/opcache/jit/zend_jit_ir.c @@ -8115,7 +8115,7 @@ static int zend_jit_fetch_constant(zend_jit_ctx *jit, const zend_ssa_op *ssa_op, zend_jit_addr res_addr) { - zval *zv = RT_CONSTANT(opline, opline->op2) + 1; + zval *zv = RT_CONSTANT(opline, opline->op2); uint32_t res_info = RES_INFO(); ir_ref ref, ref2, if_set, if_special, not_set_path, special_path, fast_path; @@ -8142,7 +8142,7 @@ static int zend_jit_fetch_constant(zend_jit_ctx *jit, ir_IF_FALSE_cold(if_set); } - // JIT: zend_jit_get_constant(RT_CONSTANT(opline, opline->op2) + 1, opline->op1.num); + // JIT: zend_jit_get_constant(RT_CONSTANT(opline, opline->op2), opline->op1.num); jit_SET_EX_OPLINE(jit, opline); ref2 = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_get_constant), ir_CONST_ADDR(zv), @@ -8893,7 +8893,7 @@ static int zend_jit_init_fcall(zend_jit_ctx *jit, const zend_op *opline, uint32_ cache_slot_ref); } else if (opline->opcode == ZEND_INIT_FCALL_BY_NAME) { ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_find_func_helper), - ir_CONST_ADDR(Z_STR_P(zv + 1)), + ir_CONST_ADDR(Z_STR_P(zv)), cache_slot_ref); } else if (opline->opcode == ZEND_INIT_NS_FCALL_BY_NAME) { ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(zend_jit_find_ns_func_helper), diff --git a/ext/opcache/tests/array_map_foreach_optimization_004.phpt b/ext/opcache/tests/array_map_foreach_optimization_004.phpt index d4ead73983ba..14bd2786b71a 100644 --- a/ext/opcache/tests/array_map_foreach_optimization_004.phpt +++ b/ext/opcache/tests/array_map_foreach_optimization_004.phpt @@ -32,7 +32,7 @@ $_main: 0006 T1 = INIT_ARRAY 0 (packed) NEXT 0007 V2 = FE_RESET_R CV0($array) 0014 0008 T4 = FE_FETCH_R V2 T3 0014 -0009 INIT_FCALL 1 %d string("stdclass") +0009 INIT_FCALL 1 %d string("stdClass") 0010 SEND_VAL T3 1 0011 T3 = DO_UCALL 0012 T1 = ADD_ARRAY_ELEMENT T3 T4 diff --git a/ext/opcache/tests/bug73402.phpt b/ext/opcache/tests/bug73402.phpt index e60537efa44c..b64a290416c0 100644 --- a/ext/opcache/tests/bug73402.phpt +++ b/ext/opcache/tests/bug73402.phpt @@ -15,7 +15,7 @@ class Logger { class B { - const LOG_LEVEL = 'Info'; + const LOG_LEVEL = 'info'; public function test() { $logger = new \Logger(); diff --git a/ext/opcache/tests/bug81046.phpt b/ext/opcache/tests/bug81046.phpt index f01890cb781b..c57865bef47d 100644 --- a/ext/opcache/tests/bug81046.phpt +++ b/ext/opcache/tests/bug81046.phpt @@ -11,7 +11,7 @@ class Test { const methoD = 1; var_dump(methoD); -test::methoD(); +Test::methoD(); ?> --EXPECT-- diff --git a/ext/opcache/tests/compact_literals.phpt b/ext/opcache/tests/compact_literals.phpt index ceb116f82a5f..43ccf17f3b7f 100644 --- a/ext/opcache/tests/compact_literals.phpt +++ b/ext/opcache/tests/compact_literals.phpt @@ -54,7 +54,7 @@ if (!class_exists("C")) { } A::say(); -B::Say(); +B::say(); A::say(); B::say(); C::say(); @@ -91,8 +91,8 @@ var_dump(F::F); //"F" var_dump(E::TEST); //"NULL" var_dump(F::TEST); //"FALSE" var_dump(E::$E); //"EP" -var_dumP(F::$F); //"FP" -var_dumP(F::$E); //"FEP" +var_dump(F::$F); //"FP" +var_dump(F::$E); //"FEP" echo "propertes and methods" . EOL; @@ -121,40 +121,40 @@ function geti() { $h = new CH; echo "-->H" . PHP_EOL; -$h->H(); +$h->h(); var_dump($h::H); var_dump(CH::H); -$h->H(); +$h->h(); var_dump($h::H); var_dump(CH::H); echo "-->I" . PHP_EOL; $h = new CI; -$h->H(); +$h->h(); var_dump($h::H); var_dump(CI::H); -$h->H(); +$h->h(); var_dump($h::H); var_dump(CI::H); echo "-->H" . PHP_EOL; change($h); -$h->H(); +$h->h(); var_dump($h::H); var_dump(CH::H); -$h->H(); +$h->h(); var_dump($h::H); var_dump(CH::H); echo "-->I" . PHP_EOL; $h = geti(); -$h->H(); +$h->h(); var_dump($h::H); var_dump(CI::H); -$h->H(); +$h->h(); var_dump($h::H); var_dump(CI::H); ?> diff --git a/ext/opcache/tests/gh18050.phpt b/ext/opcache/tests/gh18050.phpt index b641e1ae236c..a32bf76e4b88 100644 --- a/ext/opcache/tests/gh18050.phpt +++ b/ext/opcache/tests/gh18050.phpt @@ -14,7 +14,7 @@ function test($v) { $ary = ['x', 'y']; var_dump(in_array($v, $ary)); var_dump(in_array($v, $ary, false)); - var_dump(IN_ARRAY($v, $ary, true)); + var_dump(in_array($v, $ary, true)); if (in_array($v, $ary, true)) { echo "True\n"; diff --git a/ext/opcache/tests/jit/fetch_obj_003.phpt b/ext/opcache/tests/jit/fetch_obj_003.phpt index 8ccc673b6aa3..728986a35425 100644 --- a/ext/opcache/tests/jit/fetch_obj_003.phpt +++ b/ext/opcache/tests/jit/fetch_obj_003.phpt @@ -8,7 +8,7 @@ opcache.file_update_protection=0 opcache --FILE-- a = 1; foreach ($entity_information as $info) { $entity_types->a = 0; diff --git a/ext/opcache/tests/opt/sccp_015.phpt b/ext/opcache/tests/opt/sccp_015.phpt index 91c78236fd4d..c27e506743c2 100644 --- a/ext/opcache/tests/opt/sccp_015.phpt +++ b/ext/opcache/tests/opt/sccp_015.phpt @@ -9,7 +9,7 @@ opcache --FILE-- b = 0; foreach ($entity_information as $ex) { var_dump((bool)$entity_types->b); diff --git a/ext/opcache/tests/opt/sccp_037.phpt b/ext/opcache/tests/opt/sccp_037.phpt index 130db36052b3..3891a7e53d31 100644 --- a/ext/opcache/tests/opt/sccp_037.phpt +++ b/ext/opcache/tests/opt/sccp_037.phpt @@ -6,7 +6,7 @@ opcache.enable_cli=1 opcache.optimization_level=-1 --FILE-- DONE --EXPECT-- diff --git a/ext/opcache/tests/opt/type_inference_class_consts4.phpt b/ext/opcache/tests/opt/type_inference_class_consts4.phpt index 03c0c1248bce..a36ba6b0dad1 100644 --- a/ext/opcache/tests/opt/type_inference_class_consts4.phpt +++ b/ext/opcache/tests/opt/type_inference_class_consts4.phpt @@ -49,7 +49,7 @@ $_main: ; (lines=2, args=0, vars=0, tmps=0) ; (after optimizer) ; %s -0000 DECLARE_CLASS string("test4") +0000 DECLARE_CLASS string("Test4") 0001 RETURN int(1) Test4::getSelfA: diff --git a/ext/opcache/zend_accelerator_util_funcs.c b/ext/opcache/zend_accelerator_util_funcs.c index 90496e456593..bc0b486404f9 100644 --- a/ext/opcache/zend_accelerator_util_funcs.c +++ b/ext/opcache/zend_accelerator_util_funcs.c @@ -262,11 +262,9 @@ void zend_accel_build_delayed_early_binding_list(zend_persistent_script *persist for (zend_op *opline = op_array->opcodes; opline < end; opline++) { if (opline->opcode == ZEND_DECLARE_CLASS_DELAYED) { - const zval *lcname = RT_CONSTANT(opline, opline->op1); - early_binding->lcname = zend_string_copy(Z_STR_P(lcname)); - early_binding->rtd_key = zend_string_copy(Z_STR_P(lcname + 1)); - early_binding->lc_parent_name = - zend_string_copy(Z_STR_P(RT_CONSTANT(opline, opline->op2))); + const zval *name = RT_CONSTANT(opline, opline->op1); + early_binding->name = zend_string_copy(Z_STR_P(name)); + early_binding->rtd_key = zend_string_copy(Z_STR_P(name + 1)); early_binding->cache_slot = (uint32_t) -1; early_binding++; } @@ -309,9 +307,8 @@ void zend_accel_free_delayed_early_binding_list(zend_persistent_script *persiste if (persistent_script->num_early_bindings) { for (uint32_t i = 0; i < persistent_script->num_early_bindings; i++) { const zend_early_binding *early_binding = &persistent_script->early_bindings[i]; - zend_string_release(early_binding->lcname); + zend_string_release(early_binding->name); zend_string_release(early_binding->rtd_key); - zend_string_release(early_binding->lc_parent_name); } efree(persistent_script->early_bindings); persistent_script->early_bindings = NULL; @@ -335,22 +332,26 @@ static void zend_accel_do_delayed_early_binding( CG(in_compilation) = 1; for (uint32_t i = 0; i < persistent_script->num_early_bindings; i++) { const zend_early_binding *early_binding = &persistent_script->early_bindings[i]; - zend_class_entry *ce = zend_hash_find_ex_ptr(EG(class_table), early_binding->lcname, 1); + zend_class_entry *ce = zend_hash_find_ex_ptr(EG(class_table), early_binding->name, 1); if (!ce) { zval *zv = zend_hash_find_known_hash(EG(class_table), early_binding->rtd_key); if (zv) { zend_class_entry *orig_ce = Z_CE_P(zv); - zend_class_entry *parent_ce = !(orig_ce->ce_flags & ZEND_ACC_LINKED) - ? zend_hash_find_ex_ptr(EG(class_table), early_binding->lc_parent_name, 1) + /* parent_name is a union with the resolved parent pointer; an + * unlinked persisted class must still carry the string form */ + ZEND_ASSERT((orig_ce->ce_flags & ZEND_ACC_LINKED) + || !(orig_ce->ce_flags & ZEND_ACC_RESOLVED_PARENT)); + zend_class_entry *parent_ce = !(orig_ce->ce_flags & ZEND_ACC_LINKED) && orig_ce->parent_name + ? zend_hash_find_ptr(EG(class_table), orig_ce->parent_name) : NULL; if (parent_ce || (orig_ce->ce_flags & ZEND_ACC_LINKED)) { - ce = zend_try_early_bind(orig_ce, parent_ce, early_binding->lcname, zv); - } else if (ZSTR_LEN(early_binding->lc_parent_name) == 0) { + ce = zend_try_early_bind(orig_ce, parent_ce, early_binding->name, zv); + } else if (!orig_ce->parent_name) { /* Parentless class: use the same binding path as the VM handler */ - zval lcname_zv[2]; - ZVAL_STR(&lcname_zv[0], early_binding->lcname); - ZVAL_STR(&lcname_zv[1], early_binding->rtd_key); - ce = zend_bind_class_in_slot(zv, lcname_zv, early_binding->lc_parent_name); + zval name_zv[2]; + ZVAL_STR(&name_zv[0], early_binding->name); + ZVAL_STR(&name_zv[1], early_binding->rtd_key); + ce = zend_bind_class_in_slot(zv, name_zv); } } if (ce && early_binding->cache_slot != (uint32_t) -1) { diff --git a/ext/opcache/zend_file_cache.c b/ext/opcache/zend_file_cache.c index af59b9b2c34a..0412204eb623 100644 --- a/ext/opcache/zend_file_cache.c +++ b/ext/opcache/zend_file_cache.c @@ -461,7 +461,6 @@ static void zend_file_cache_serialize_attribute(zval *zv, UNSERIALIZE_PTR(attr); SERIALIZE_STR(attr->name); - SERIALIZE_STR(attr->lcname); SERIALIZE_STR(attr->validation_error); for (i = 0; i < attr->argc; i++) { @@ -858,7 +857,6 @@ static void zend_file_cache_serialize_class(zval *zv, for (i = 0; i < ce->num_interfaces; i++) { SERIALIZE_STR(interface_names[i].name); - SERIALIZE_STR(interface_names[i].lc_name); } } @@ -872,7 +870,6 @@ static void zend_file_cache_serialize_class(zval *zv, for (i = 0; i < ce->num_traits; i++) { SERIALIZE_STR(trait_names[i].name); - SERIALIZE_STR(trait_names[i].lc_name); } if (ce->trait_aliases) { @@ -1000,9 +997,8 @@ static void zend_file_cache_serialize_early_bindings( zend_early_binding *early_bindings = script->early_bindings; UNSERIALIZE_PTR(early_bindings); for (uint32_t i = 0; i < script->num_early_bindings; i++) { - SERIALIZE_STR(early_bindings[i].lcname); + SERIALIZE_STR(early_bindings[i].name); SERIALIZE_STR(early_bindings[i].rtd_key); - SERIALIZE_STR(early_bindings[i].lc_parent_name); } } } @@ -1377,7 +1373,6 @@ static void zend_file_cache_unserialize_attribute(zval *zv, zend_persistent_scri attr = Z_PTR_P(zv); UNSERIALIZE_STR(attr->name); - UNSERIALIZE_STR(attr->lcname); UNSERIALIZE_STR(attr->validation_error); for (i = 0; i < attr->argc; i++) { @@ -1740,7 +1735,6 @@ static void zend_file_cache_unserialize_class(zval *zv, for (i = 0; i < ce->num_interfaces; i++) { UNSERIALIZE_STR(ce->interface_names[i].name); - UNSERIALIZE_STR(ce->interface_names[i].lc_name); } } @@ -1751,7 +1745,6 @@ static void zend_file_cache_unserialize_class(zval *zv, for (i = 0; i < ce->num_traits; i++) { UNSERIALIZE_STR(ce->trait_names[i].name); - UNSERIALIZE_STR(ce->trait_names[i].lc_name); } if (ce->trait_aliases) { @@ -1876,9 +1869,8 @@ static void zend_file_cache_unserialize_early_bindings(zend_persistent_script *s if (script->early_bindings) { UNSERIALIZE_PTR(script->early_bindings); for (uint32_t i = 0; i < script->num_early_bindings; i++) { - UNSERIALIZE_STR(script->early_bindings[i].lcname); + UNSERIALIZE_STR(script->early_bindings[i].name); UNSERIALIZE_STR(script->early_bindings[i].rtd_key); - UNSERIALIZE_STR(script->early_bindings[i].lc_parent_name); } } } diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c index c06452e6acf2..e55dff4eefb8 100644 --- a/ext/opcache/zend_persist.c +++ b/ext/opcache/zend_persist.c @@ -309,7 +309,6 @@ static HashTable *zend_persist_attributes(HashTable *attributes) zend_attribute *copy = zend_shared_memdup_put_free(attr, ZEND_ATTRIBUTE_SIZE(attr->argc)); zend_accel_store_interned_string(copy->name); - zend_accel_store_interned_string(copy->lcname); if (copy->validation_error) { zend_accel_store_interned_string(copy->validation_error); } @@ -1071,7 +1070,6 @@ zend_class_entry *zend_persist_class_entry(zend_class_entry *orig_ce) for (i = 0; i < ce->num_interfaces; i++) { zend_accel_store_interned_string(ce->interface_names[i].name); - zend_accel_store_interned_string(ce->interface_names[i].lc_name); } ce->interface_names = zend_shared_memdup_free(ce->interface_names, sizeof(zend_class_name) * ce->num_interfaces); } @@ -1081,7 +1079,6 @@ zend_class_entry *zend_persist_class_entry(zend_class_entry *orig_ce) for (i = 0; i < ce->num_traits; i++) { zend_accel_store_interned_string(ce->trait_names[i].name); - zend_accel_store_interned_string(ce->trait_names[i].lc_name); } ce->trait_names = zend_shared_memdup_free(ce->trait_names, sizeof(zend_class_name) * ce->num_traits); @@ -1185,7 +1182,7 @@ void zend_update_parent_ce(zend_class_entry *ce) if (ce->iterator_funcs_ptr) { memset(ce->iterator_funcs_ptr, 0, sizeof(zend_class_iterator_funcs)); if (zend_class_implements_interface(ce, zend_ce_aggregate)) { - ce->iterator_funcs_ptr->zf_new_iterator = zend_hash_str_find_ptr(&ce->function_table, "getiterator", sizeof("getiterator") - 1); + ce->iterator_funcs_ptr->zf_new_iterator = zend_hash_str_find_ptr(&ce->function_table, "getIterator", sizeof("getIterator") - 1); } if (zend_class_implements_interface(ce, zend_ce_iterator)) { ce->iterator_funcs_ptr->zf_rewind = zend_hash_str_find_ptr(&ce->function_table, "rewind", sizeof("rewind") - 1); @@ -1198,10 +1195,10 @@ void zend_update_parent_ce(zend_class_entry *ce) if (ce->arrayaccess_funcs_ptr) { ZEND_ASSERT(zend_class_implements_interface(ce, zend_ce_arrayaccess)); - ce->arrayaccess_funcs_ptr->zf_offsetget = zend_hash_str_find_ptr(&ce->function_table, "offsetget", sizeof("offsetget") - 1); - ce->arrayaccess_funcs_ptr->zf_offsetexists = zend_hash_str_find_ptr(&ce->function_table, "offsetexists", sizeof("offsetexists") - 1); - ce->arrayaccess_funcs_ptr->zf_offsetset = zend_hash_str_find_ptr(&ce->function_table, "offsetset", sizeof("offsetset") - 1); - ce->arrayaccess_funcs_ptr->zf_offsetunset = zend_hash_str_find_ptr(&ce->function_table, "offsetunset", sizeof("offsetunset") - 1); + ce->arrayaccess_funcs_ptr->zf_offsetget = zend_hash_str_find_ptr(&ce->function_table, "offsetGet", sizeof("offsetGet") - 1); + ce->arrayaccess_funcs_ptr->zf_offsetexists = zend_hash_str_find_ptr(&ce->function_table, "offsetExists", sizeof("offsetExists") - 1); + ce->arrayaccess_funcs_ptr->zf_offsetset = zend_hash_str_find_ptr(&ce->function_table, "offsetSet", sizeof("offsetSet") - 1); + ce->arrayaccess_funcs_ptr->zf_offsetunset = zend_hash_str_find_ptr(&ce->function_table, "offsetUnset", sizeof("offsetUnset") - 1); } } @@ -1413,9 +1410,8 @@ static zend_early_binding *zend_persist_early_bindings( early_bindings = zend_shared_memdup_free( early_bindings, num_early_bindings * sizeof(zend_early_binding)); for (uint32_t i = 0; i < num_early_bindings; i++) { - zend_accel_store_interned_string(early_bindings[i].lcname); + zend_accel_store_interned_string(early_bindings[i].name); zend_accel_store_interned_string(early_bindings[i].rtd_key); - zend_accel_store_interned_string(early_bindings[i].lc_parent_name); } } return early_bindings; diff --git a/ext/opcache/zend_persist_calc.c b/ext/opcache/zend_persist_calc.c index 9ff37079193b..b570823d7dfa 100644 --- a/ext/opcache/zend_persist_calc.c +++ b/ext/opcache/zend_persist_calc.c @@ -180,7 +180,6 @@ static void zend_persist_attributes_calc(HashTable *attributes) ZEND_HASH_PACKED_FOREACH_PTR(attributes, attr) { ADD_SIZE(ZEND_ATTRIBUTE_SIZE(attr->argc)); ADD_INTERNED_STRING(attr->name); - ADD_INTERNED_STRING(attr->lcname); if (attr->validation_error != NULL) { ADD_INTERNED_STRING(attr->validation_error); } @@ -543,7 +542,6 @@ void zend_persist_class_entry_calc(zend_class_entry *ce) if (!(ce->ce_flags & ZEND_ACC_LINKED)) { for (i = 0; i < ce->num_interfaces; i++) { ADD_INTERNED_STRING(ce->interface_names[i].name); - ADD_INTERNED_STRING(ce->interface_names[i].lc_name); } ADD_SIZE(sizeof(zend_class_name) * ce->num_interfaces); } @@ -554,7 +552,6 @@ void zend_persist_class_entry_calc(zend_class_entry *ce) for (i = 0; i < ce->num_traits; i++) { ADD_INTERNED_STRING(ce->trait_names[i].name); - ADD_INTERNED_STRING(ce->trait_names[i].lc_name); } ADD_SIZE(sizeof(zend_class_name) * ce->num_traits); @@ -624,9 +621,8 @@ static void zend_persist_early_bindings_calc( ADD_SIZE(sizeof(zend_early_binding) * num_early_bindings); for (uint32_t i = 0; i < num_early_bindings; i++) { zend_early_binding *early_binding = &early_bindings[i]; - ADD_INTERNED_STRING(early_binding->lcname); + ADD_INTERNED_STRING(early_binding->name); ADD_INTERNED_STRING(early_binding->rtd_key); - ADD_INTERNED_STRING(early_binding->lc_parent_name); } } diff --git a/ext/openssl/tests/openssl_cms_decrypt_error.phpt b/ext/openssl/tests/openssl_cms_decrypt_error.phpt index 3c128be64d09..9857dfb4f02e 100644 --- a/ext/openssl/tests/openssl_cms_decrypt_error.phpt +++ b/ext/openssl/tests/openssl_cms_decrypt_error.phpt @@ -12,8 +12,8 @@ set_error_handler("myErrorHandler"); $a = 1; $b = 1; -$c = new stdclass; -$d = new stdclass; +$c = new stdClass; +$d = new stdClass; try { var_dump(openssl_cms_decrypt($a, $b, $c, $d)); diff --git a/ext/openssl/tests/openssl_encrypt_error.phpt b/ext/openssl/tests/openssl_encrypt_error.phpt index 9af65bc0847c..a2d1b40f1ee8 100644 --- a/ext/openssl/tests/openssl_encrypt_error.phpt +++ b/ext/openssl/tests/openssl_encrypt_error.phpt @@ -9,7 +9,7 @@ $method = "AES-128-CBC"; $password = "openssl"; $iv = str_repeat("\0", openssl_cipher_iv_length($method)); $wrong = "wrong"; -$object = new stdclass; +$object = new stdClass; $arr = array(1); // wrong parameters tests diff --git a/ext/openssl/tests/openssl_pkcs7_decrypt_error.phpt b/ext/openssl/tests/openssl_pkcs7_decrypt_error.phpt index 480e662e4145..20663e2aeec4 100644 --- a/ext/openssl/tests/openssl_pkcs7_decrypt_error.phpt +++ b/ext/openssl/tests/openssl_pkcs7_decrypt_error.phpt @@ -12,8 +12,8 @@ set_error_handler("myErrorHandler"); $a = 1; $b = 1; -$c = new stdclass; -$d = new stdclass; +$c = new stdClass; +$d = new stdClass; try { var_dump(openssl_pkcs7_decrypt($a, $b, $c, $d)); diff --git a/ext/pcre/tests/preg_grep_error1.phpt b/ext/pcre/tests/preg_grep_error1.phpt index ae80ecc3506f..b1895c6f0a39 100644 --- a/ext/pcre/tests/preg_grep_error1.phpt +++ b/ext/pcre/tests/preg_grep_error1.phpt @@ -28,7 +28,7 @@ foreach ($values as $value) { echo $e->getMessage(), "\n"; } } -$value = new stdclass(); //Object +$value = new stdClass(); //Object try { var_dump(preg_grep($value, $array)); } catch (TypeError $e) { diff --git a/ext/pcre/tests/preg_match_all_error1.phpt b/ext/pcre/tests/preg_match_all_error1.phpt index 92d1a6aff664..0d5804c89cbf 100644 --- a/ext/pcre/tests/preg_match_all_error1.phpt +++ b/ext/pcre/tests/preg_match_all_error1.phpt @@ -29,7 +29,7 @@ foreach ($regex_array as $regex_value) { } var_dump($matches1); } -$regex_value = new stdclass(); //Object +$regex_value = new stdClass(); //Object try { var_dump(preg_match_all($regex_value, $subject, $matches)); } catch (TypeError $e) { diff --git a/ext/pcre/tests/preg_match_error1.phpt b/ext/pcre/tests/preg_match_error1.phpt index 870cc498792c..73bd7a6ec9d0 100644 --- a/ext/pcre/tests/preg_match_error1.phpt +++ b/ext/pcre/tests/preg_match_error1.phpt @@ -26,7 +26,7 @@ foreach ($regex_array as $regex_value) { echo $e->getMessage(), "\n"; } } -$regex_value = new stdclass(); //Object +$regex_value = new stdClass(); //Object try { var_dump(preg_match($regex_value, $subject)); } catch (TypeError $e) { diff --git a/ext/pcre/tests/preg_replace_error1.phpt b/ext/pcre/tests/preg_replace_error1.phpt index 0a8a79751a9a..05b5e10cfc0f 100644 --- a/ext/pcre/tests/preg_replace_error1.phpt +++ b/ext/pcre/tests/preg_replace_error1.phpt @@ -25,7 +25,7 @@ $subject = 'a'; foreach ($regex_array as $regex_value) { var_dump(preg_replace($regex_value, $replace, $subject)); } -$regex_value = new stdclass(); //Object +$regex_value = new stdClass(); //Object try { var_dump(preg_replace($regex_value, $replace, $subject)); } catch (Error $e) { diff --git a/ext/pcre/tests/preg_replace_error2.phpt b/ext/pcre/tests/preg_replace_error2.phpt index 9bc36f655f48..728c61e142c7 100644 --- a/ext/pcre/tests/preg_replace_error2.phpt +++ b/ext/pcre/tests/preg_replace_error2.phpt @@ -18,7 +18,7 @@ foreach($replace as $value) { echo $e->getMessage(), "\n"; } } -$value = new stdclass(); //Object +$value = new stdClass(); //Object try { var_dump(preg_replace($regex, $value, $subject)); } catch (Error $e) { diff --git a/ext/pcre/tests/preg_split_error1.phpt b/ext/pcre/tests/preg_split_error1.phpt index 6555f21366ad..da3104ed9dab 100644 --- a/ext/pcre/tests/preg_split_error1.phpt +++ b/ext/pcre/tests/preg_split_error1.phpt @@ -28,7 +28,7 @@ foreach ($regex_array as $regex_value) { echo $e->getMessage(), "\n"; } } -$regex_value = new stdclass(); //Object +$regex_value = new stdClass(); //Object try { var_dump(preg_split($regex_value, $subject)); } catch (TypeError $e) { diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index 6a47ec30c862..7ec3c80ad106 100644 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -1372,7 +1372,6 @@ bool pdo_hash_methods(pdo_dbh_object_t *dbh_obj, int kind) const zend_function_entry *funcs; zend_internal_function func; size_t namelen; - char *lc_name; pdo_dbh_t *dbh = dbh_obj->inner; if (!dbh || !dbh->methods || !dbh->methods->get_driver_methods) { @@ -1442,10 +1441,7 @@ bool pdo_hash_methods(pdo_dbh_object_t *dbh_obj, int kind) } zend_set_function_arg_flags((zend_function*)&func); namelen = strlen(funcs->fname); - lc_name = emalloc(namelen+1); - zend_str_tolower_copy(lc_name, funcs->fname, namelen); - zend_function *func_p = zend_hash_str_add_mem(dbh->cls_methods[kind], lc_name, namelen, &func, sizeof(func)); - efree(lc_name); + zend_function *func_p = zend_hash_str_add_mem(dbh->cls_methods[kind], funcs->fname, namelen, &func, sizeof(func)); const char *new_name = NULL; for (const struct driver_specific_method_deprecation *d = driver_specific_method_deprecations; @@ -1484,7 +1480,6 @@ static zend_function *dbh_method_get(zend_object **object, zend_string *method_n { zend_function *fbc = NULL; pdo_dbh_object_t *dbh_obj = php_pdo_dbh_fetch_object(*object); - zend_string *lc_method_name; if ((fbc = zend_std_get_method(object, method_name, key)) == NULL) { /* not a pre-defined method, nor a user-defined method; check @@ -1497,9 +1492,7 @@ static zend_function *dbh_method_get(zend_object **object, zend_string *method_n } } - lc_method_name = zend_string_tolower(method_name); - fbc = zend_hash_find_ptr(dbh_obj->inner->cls_methods[PDO_DBH_DRIVER_METHOD_KIND_DBH], lc_method_name); - zend_string_release_ex(lc_method_name, 0); + fbc = zend_hash_find_ptr(dbh_obj->inner->cls_methods[PDO_DBH_DRIVER_METHOD_KIND_DBH], method_name); } out: diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 09b9fd3550e6..104c21a7942f 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -1943,12 +1943,9 @@ static void dbstmt_prop_delete(zend_object *object, zend_string *name, void **ca static zend_function *dbstmt_method_get(zend_object **object_pp, zend_string *method_name, const zval *key) { zend_function *fbc = NULL; - zend_string *lc_method_name; zend_object *object = *object_pp; - lc_method_name = zend_string_tolower(method_name); - - if ((fbc = zend_hash_find_ptr(&object->ce->function_table, lc_method_name)) == NULL) { + if ((fbc = zend_hash_find_ptr(&object->ce->function_table, method_name)) == NULL) { pdo_stmt_t *stmt = php_pdo_stmt_fetch_object(object); /* instance not created by PDO object */ if (!stmt->dbh) { @@ -1964,14 +1961,13 @@ static zend_function *dbstmt_method_get(zend_object **object_pp, zend_string *me } } - if ((fbc = zend_hash_find_ptr(stmt->dbh->cls_methods[PDO_DBH_DRIVER_METHOD_KIND_STMT], lc_method_name)) == NULL) { + if ((fbc = zend_hash_find_ptr(stmt->dbh->cls_methods[PDO_DBH_DRIVER_METHOD_KIND_STMT], method_name)) == NULL) { goto out; } /* got it */ } out: - zend_string_release_ex(lc_method_name, 0); if (!fbc) { fbc = zend_std_get_method(object_pp, method_name, key); } diff --git a/ext/pdo/tests/pdo_017.phpt b/ext/pdo/tests/pdo_017.phpt index b9171ce0cd58..60db3f8d7c3f 100644 --- a/ext/pdo/tests/pdo_017.phpt +++ b/ext/pdo/tests/pdo_017.phpt @@ -12,7 +12,7 @@ PDOTest::skip(); $db = PDOTest::factory(); try { $db->beginTransaction(); - $db->rollback(); + $db->rollBack(); } catch (PDOException $e) { die('skip no working transactions: ' . $e->getMessage()); } diff --git a/ext/pdo/tests/pdo_023.phpt b/ext/pdo/tests/pdo_023.phpt index cc92b5bc15f3..f0fa0f25ef1b 100644 --- a/ext/pdo/tests/pdo_023.phpt +++ b/ext/pdo/tests/pdo_023.phpt @@ -53,7 +53,7 @@ class PDODatabaseX extends PDO function query($sql, ...$rest): PDOStatement|false { echo __METHOD__ . "()\n"; - $stmt = parent::prepare($sql, array(PDO::ATTR_STATEMENT_CLASS=>array('PDOStatementx'))); + $stmt = parent::prepare($sql, array(PDO::ATTR_STATEMENT_CLASS=>array('PDOStatementX'))); $stmt->execute(); return $stmt; } diff --git a/ext/pdo/tests/pdo_026.phpt b/ext/pdo/tests/pdo_026.phpt index 66374e26ae6b..30a9d02f7d60 100644 --- a/ext/pdo/tests/pdo_026.phpt +++ b/ext/pdo/tests/pdo_026.phpt @@ -46,7 +46,7 @@ class PDODatabase extends PDO function query($sql, ...$rest): PDOStatement|false { echo __METHOD__ . "()\n"; - $stmt = $this->prepare($sql, array(PDO::ATTR_STATEMENT_CLASS=>array('PDOStatementx', array($this)))); + $stmt = $this->prepare($sql, array(PDO::ATTR_STATEMENT_CLASS=>array('PDOStatementX', array($this)))); $stmt->setFetchMode(PDO::FETCH_ASSOC); $stmt->execute(); return $stmt; diff --git a/ext/pdo/tests/pdo_029.phpt b/ext/pdo/tests/pdo_029.phpt index 205150b65d80..5323562effeb 100644 --- a/ext/pdo/tests/pdo_029.phpt +++ b/ext/pdo/tests/pdo_029.phpt @@ -52,7 +52,7 @@ class PDODatabase extends PDO function query($sql, ...$rest): PDOStatement|false { echo __METHOD__ . "()\n"; - $stmt = $this->prepare($sql, array(PDO::ATTR_STATEMENT_CLASS=>array('PDOStatementx', array($this)))); + $stmt = $this->prepare($sql, array(PDO::ATTR_STATEMENT_CLASS=>array('PDOStatementX', array($this)))); $stmt->setFetchMode(PDO::FETCH_ASSOC); $stmt->execute(); return $stmt; diff --git a/ext/pdo/tests/pdo_030.phpt b/ext/pdo/tests/pdo_030.phpt index 88308c18ca83..e4294de0679d 100644 --- a/ext/pdo/tests/pdo_030.phpt +++ b/ext/pdo/tests/pdo_030.phpt @@ -73,7 +73,7 @@ unset($stmt); echo "===QUERY===\n"; var_dump($db->getAttribute(PDO::ATTR_STATEMENT_CLASS)); -$db->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('PDOStatementx', array($db))); +$db->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('PDOStatementX', array($db))); var_dump($db->getAttribute(PDO::ATTR_STATEMENT_CLASS)); $stmt = $db->query('SELECT * FROM test030'); var_dump(get_class($stmt)); diff --git a/ext/pdo/tests/pdo_036.phpt b/ext/pdo/tests/pdo_036.phpt index 10fe22193017..f71abf5b23d6 100644 --- a/ext/pdo/tests/pdo_036.phpt +++ b/ext/pdo/tests/pdo_036.phpt @@ -5,7 +5,7 @@ pdo --FILE-- newInstance(); var_dump($x); @@ -20,7 +20,7 @@ try { echo $e->getMessage(), "\n"; } -$instance = new reflectionclass('pdorow'); +$instance = new ReflectionClass('PDORow'); $x = $instance->newInstance(); var_dump($x); diff --git a/ext/pdo/tests/pdo_fetch_function_incorrect_callables.phpt b/ext/pdo/tests/pdo_fetch_function_incorrect_callables.phpt index f06ae3c6a6b6..81f28a65862c 100644 --- a/ext/pdo/tests/pdo_fetch_function_incorrect_callables.phpt +++ b/ext/pdo/tests/pdo_fetch_function_incorrect_callables.phpt @@ -61,19 +61,19 @@ try { } try { - var_dump($stmt->fetchAll(PDO::FETCH_FUNC, ['bar', 'instanceMethod'])); + var_dump($stmt->fetchAll(PDO::FETCH_FUNC, ['Bar', 'instanceMethod'])); } catch (\Throwable $e) { echo $e::class, ': ', $e->getMessage(), \PHP_EOL; } try { - var_dump($stmt->fetchAll(PDO::FETCH_FUNC, ['bar', 'privateStatic'])); + var_dump($stmt->fetchAll(PDO::FETCH_FUNC, ['Bar', 'privateStatic'])); } catch (\Throwable $e) { echo $e::class, ': ', $e->getMessage(), \PHP_EOL; } try { - var_dump($stmt->fetchAll(PDO::FETCH_FUNC, ['bar', 'nonexistent'])); + var_dump($stmt->fetchAll(PDO::FETCH_FUNC, ['Bar', 'nonexistent'])); } catch (\Throwable $e) { echo $e::class, ': ', $e->getMessage(), \PHP_EOL; } diff --git a/ext/pdo/tests/pdo_fetch_function_overload_statement_class.phpt b/ext/pdo/tests/pdo_fetch_function_overload_statement_class.phpt index d9c1a01eeeaa..ffa7749c51af 100644 --- a/ext/pdo/tests/pdo_fetch_function_overload_statement_class.phpt +++ b/ext/pdo/tests/pdo_fetch_function_overload_statement_class.phpt @@ -37,7 +37,7 @@ class DerivedStatement extends PDOStatement $derived = $db->prepare('SELECT id, val FROM pdo_fetch_function_overload_statement_class', [PDO::ATTR_STATEMENT_CLASS => ['DerivedStatement', ['Overloaded', $db]]]); var_dump(get_class($derived)); $derived->execute(); -var_dump($derived->fetchAll(PDO::FETCH_FUNC, [$derived, 'retrieve'])); +var_dump($derived->fetchAll(PDO::FETCH_FUNC, [$derived, 'reTrieve'])); ?> --CLEAN-- diff --git a/ext/pdo_dblib/tests/bug_38955.phpt b/ext/pdo_dblib/tests/bug_38955.phpt index cd244ba1ec33..2af2e7ec68f0 100644 --- a/ext/pdo_dblib/tests/bug_38955.phpt +++ b/ext/pdo_dblib/tests/bug_38955.phpt @@ -28,7 +28,7 @@ $db->query("INSERT INTO test38955(val) values(5)"); $db->query("INSERT INTO test38955(val) values(6)"); $db->query("INSERT INTO test38955(val) values(7)"); $db->query("INSERT INTO test38955(val) values(8)"); -$db->rollback(); +$db->rollBack(); $rs = $db->query("SELECT * FROM test38955"); $rows = $rs->fetchAll(PDO::FETCH_ASSOC); diff --git a/ext/pdo_firebird/tests/attr_datetime_format.phpt b/ext/pdo_firebird/tests/attr_datetime_format.phpt index f783fa3475b8..d5598a67d745 100644 --- a/ext/pdo_firebird/tests/attr_datetime_format.phpt +++ b/ext/pdo_firebird/tests/attr_datetime_format.phpt @@ -10,20 +10,20 @@ require("testdb.inc"); $dbh = getDbConnection(); echo "== Default state with nothing set. ==\n"; -echo 'ATTR_DATE_FORMAT: ', $dbh->getAttribute(Pdo\firebird::ATTR_DATE_FORMAT), "\n"; -echo 'ATTR_TIME_FORMAT: ', $dbh->getAttribute(Pdo\firebird::ATTR_TIME_FORMAT), "\n"; -echo 'ATTR_TIMESTAMP_FORMAT: ', $dbh->getAttribute(Pdo\firebird::ATTR_TIMESTAMP_FORMAT), "\n"; +echo 'ATTR_DATE_FORMAT: ', $dbh->getAttribute(Pdo\Firebird::ATTR_DATE_FORMAT), "\n"; +echo 'ATTR_TIME_FORMAT: ', $dbh->getAttribute(Pdo\Firebird::ATTR_TIME_FORMAT), "\n"; +echo 'ATTR_TIMESTAMP_FORMAT: ', $dbh->getAttribute(Pdo\Firebird::ATTR_TIMESTAMP_FORMAT), "\n"; -$dbh->setAttribute(Pdo\firebird::ATTR_DATE_FORMAT, 'Y----m----d'); -$dbh->setAttribute(Pdo\firebird::ATTR_TIME_FORMAT, 'H::::i::::s'); -$dbh->setAttribute(Pdo\firebird::ATTR_TIMESTAMP_FORMAT, 'Y----m----d....H::::i::::s'); +$dbh->setAttribute(Pdo\Firebird::ATTR_DATE_FORMAT, 'Y----m----d'); +$dbh->setAttribute(Pdo\Firebird::ATTR_TIME_FORMAT, 'H::::i::::s'); +$dbh->setAttribute(Pdo\Firebird::ATTR_TIMESTAMP_FORMAT, 'Y----m----d....H::::i::::s'); echo "\n"; echo "== State after setting value. ==\n"; -echo 'ATTR_DATE_FORMAT: ', $dbh->getAttribute(Pdo\firebird::ATTR_DATE_FORMAT), "\n"; -echo 'ATTR_TIME_FORMAT: ', $dbh->getAttribute(Pdo\firebird::ATTR_TIME_FORMAT), "\n"; -echo 'ATTR_TIMESTAMP_FORMAT: ', $dbh->getAttribute(Pdo\firebird::ATTR_TIMESTAMP_FORMAT), "\n"; +echo 'ATTR_DATE_FORMAT: ', $dbh->getAttribute(Pdo\Firebird::ATTR_DATE_FORMAT), "\n"; +echo 'ATTR_TIME_FORMAT: ', $dbh->getAttribute(Pdo\Firebird::ATTR_TIME_FORMAT), "\n"; +echo 'ATTR_TIMESTAMP_FORMAT: ', $dbh->getAttribute(Pdo\Firebird::ATTR_TIMESTAMP_FORMAT), "\n"; ?> --EXPECT-- == Default state with nothing set. == diff --git a/ext/pdo_firebird/tests/autocommit_change_mode.phpt b/ext/pdo_firebird/tests/autocommit_change_mode.phpt index 8a7f0933203f..7463f8e05429 100644 --- a/ext/pdo_firebird/tests/autocommit_change_mode.phpt +++ b/ext/pdo_firebird/tests/autocommit_change_mode.phpt @@ -55,7 +55,7 @@ try { } echo "end transaction\n"; -$dbh->rollback(); +$dbh->rollBack(); echo "auto commit OFF\n"; $dbh->setAttribute(PDO::ATTR_AUTOCOMMIT, false); @@ -81,7 +81,7 @@ try { } echo "end transaction\n"; -$dbh->rollback(); +$dbh->rollBack(); echo "\n"; echo "done!"; diff --git a/ext/pdo_firebird/tests/ddl.phpt b/ext/pdo_firebird/tests/ddl.phpt index 2f1abc67d3fb..72da971b097b 100644 --- a/ext/pdo_firebird/tests/ddl.phpt +++ b/ext/pdo_firebird/tests/ddl.phpt @@ -25,7 +25,7 @@ $dbh->setAttribute(PDO::ATTR_AUTOCOMMIT,0); $dbh->beginTransaction(); var_dump($dbh->exec("INSERT INTO test_ddl (text) VALUES ('bla')")); var_dump($dbh->exec("UPDATE test_ddl SET text='blabla'")); -$dbh->rollback(); +$dbh->rollBack(); $dbh->beginTransaction(); var_dump($dbh->exec("DELETE FROM test_ddl")); diff --git a/ext/pdo_firebird/tests/ddl2.phpt b/ext/pdo_firebird/tests/ddl2.phpt index 6dac6b32dd16..c54b6fa6b0c0 100644 --- a/ext/pdo_firebird/tests/ddl2.phpt +++ b/ext/pdo_firebird/tests/ddl2.phpt @@ -14,7 +14,7 @@ $dbh->exec("CREATE TABLE test_ddl2 (val int)"); $dbh->beginTransaction(); $dbh->exec("INSERT INTO test_ddl2 (val) VALUES (120)"); $dbh->exec("CREATE TABLE test_ddl2_2 (val INT)"); -$dbh->rollback(); +$dbh->rollBack(); $result = $dbh->query("SELECT * FROM test_ddl2"); var_dump($result->fetchAll()); diff --git a/ext/pdo_mysql/tests/bug41125.phpt b/ext/pdo_mysql/tests/bug41125.phpt index aa488c131098..799bab16f727 100644 --- a/ext/pdo_mysql/tests/bug41125.phpt +++ b/ext/pdo_mysql/tests/bug41125.phpt @@ -17,7 +17,7 @@ $sql = "SELECT 1 FROM DUAL WHERE 'o''riley' LIKE " . $db->quote('%' . $search . $stmt = $db->prepare($sql); $stmt->execute(); print implode(' - ', (($r = @$stmt->fetch(PDO::FETCH_NUM)) ? $r : array())) ."\n"; -print implode(' - ', $stmt->errorinfo()) ."\n"; +print implode(' - ', $stmt->errorInfo()) ."\n"; print "-------------------------------------------------------\n"; @@ -33,7 +33,7 @@ foreach ($queries as $k => $query) { $stmt->execute(array(1)); printf("[%d] Query: [[%s]]\n", $k + 1, $query); print implode(' - ', (($r = @$stmt->fetch(PDO::FETCH_NUM)) ? $r : array())) ."\n"; - print implode(' - ', $stmt->errorinfo()) ."\n"; + print implode(' - ', $stmt->errorInfo()) ."\n"; print "--------\n"; } @@ -46,7 +46,7 @@ $stmt->bindParam(':id', $id); $stmt->execute(); printf("Query: [[%s]]\n", $sql); print implode(' - ', (($r = @$stmt->fetch(PDO::FETCH_NUM)) ? $r : array())) ."\n"; -print implode(' - ', $stmt->errorinfo()) ."\n"; +print implode(' - ', $stmt->errorInfo()) ."\n"; print "-------------------------------------------------------\n"; @@ -76,7 +76,7 @@ foreach ($queries as $k => $query) { printf("[%d] Query: [[%s]]\n", $k + 1, $query); print implode(' - ', (($r = @$stmt->fetch(PDO::FETCH_NUM)) ? $r : array())) ."\n"; - print implode(' - ', $stmt->errorinfo()) ."\n"; + print implode(' - ', $stmt->errorInfo()) ."\n"; print "--------\n"; } diff --git a/ext/pdo_mysql/tests/gh16314.phpt b/ext/pdo_mysql/tests/gh16314.phpt index 01955d3ba4a0..0e1dc2943cda 100644 --- a/ext/pdo_mysql/tests/gh16314.phpt +++ b/ext/pdo_mysql/tests/gh16314.phpt @@ -22,10 +22,10 @@ var_dump($pdo->query('SELECT 1;')->fetchAll()); $pdo = MySQLPDOTest::factory(Pdo\Mysql::class, null, $attr, true); var_dump($pdo->query('SELECT 1;')->fetchAll()); -$pdo = MySQLPDOTest::factory(Pdo::class, null, $attr, false); +$pdo = MySQLPDOTest::factory(PDO::class, null, $attr, false); var_dump($pdo->query('SELECT 1;')->fetchAll()); -$pdo = MySQLPDOTest::factory(Pdo::class, null, $attr, true); +$pdo = MySQLPDOTest::factory(PDO::class, null, $attr, true); var_dump($pdo->query('SELECT 1;')->fetchAll()); ?> --EXPECT-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_begintransaction.phpt b/ext/pdo_mysql/tests/pdo_mysql_begintransaction.phpt index bdea4319b062..e3c05c9965e8 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_begintransaction.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_begintransaction.phpt @@ -88,7 +88,7 @@ MySQLPDOTest::skipNotTransactionalEngine(); if (1 !== $db->exec(sprintf('DELETE FROM %s WHERE id = %d', $table, $row['id']))) printf("[017] DELETE should have indicated 1 deleted row, [%s] %s\n", $db->errorCode(), implode(' ', $db->errorInfo())); - if (!$db->rollback()) + if (!$db->rollBack()) printf("[018] [%s] %s\n", $db->errorCode(), implode(' ', $db->errorInfo())); if (true !== $db->getAttribute(PDO::ATTR_AUTOCOMMIT)) @@ -173,7 +173,7 @@ MySQLPDOTest::skipNotTransactionalEngine(); $db->errorCode(), implode(' ', $db->errorInfo())); // Should cause a Server warning but no error - if (!$db->rollback()) + if (!$db->rollBack()) printf("[037] [%s] %s\n", $db->errorCode(), implode(' ', $db->errorInfo())); var_dump($db->errorCode()); diff --git a/ext/pdo_mysql/tests/pdo_mysql_multi_stmt_nextrowset.phpt b/ext/pdo_mysql/tests/pdo_mysql_multi_stmt_nextrowset.phpt index 75abb0ca39d5..348d9572e8c5 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_multi_stmt_nextrowset.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_multi_stmt_nextrowset.phpt @@ -26,8 +26,8 @@ MySQLPDOTest::skip(); $stmt = $db->query("CALL {$procedure}()"); do { var_dump($stmt->fetchAll(PDO::FETCH_ASSOC)); - } while ($stmt->nextRowSet()); - var_dump($stmt->nextRowSet()); + } while ($stmt->nextRowset()); + var_dump($stmt->nextRowset()); } try { diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_non_select.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_non_select.phpt index 421276c570d7..75879bd660c3 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_non_select.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_non_select.phpt @@ -175,7 +175,7 @@ MySQLPDOTest::skip(); $stmt->execute(); $stmt->execute(); // libmysql needs this - otherwise we get a 2015 error - if (!MYSQLPDOTest::isPDOMySQLnd()) + if (!MySQLPDOTest::isPDOMySQLnd()) $stmt->fetchAll(PDO::FETCH_ASSOC); } catch (PDOException $e) { diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt index 0415a04fdab6..f70b1c1d5a3f 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt @@ -20,7 +20,7 @@ MySQLPDOTest::skipNotMySQLnd(); MySQLPDOTest::createTestTable($table, $db); $stmt = $db->query("SELECT id FROM {$table}"); - if (false !== ($tmp = $stmt->nextRowSet())) + if (false !== ($tmp = $stmt->nextRowset())) printf("[002] Expecting false got %s\n", var_export($tmp, true)); function test_proc1($db) { @@ -36,7 +36,7 @@ MySQLPDOTest::skipNotMySQLnd(); $db->exec("CALL {$procedure}(@VERSION)"); $stmt = $db->query('SELECT @VERSION as _version'); var_dump($stmt->fetchAll(PDO::FETCH_ASSOC)); - var_dump($stmt->nextRowSet()); + var_dump($stmt->nextRowset()); } function test_proc2($db) { @@ -48,13 +48,13 @@ MySQLPDOTest::skipNotMySQLnd(); $stmt = $db->query("CALL {$procedure}()"); do { var_dump($stmt->fetchAll(PDO::FETCH_ASSOC)); - } while ($stmt->nextRowSet()); - var_dump($stmt->nextRowSet()); + } while ($stmt->nextRowset()); + var_dump($stmt->nextRowset()); echo "Skip fetchAll(): "; unset($stmt); $stmt = $db->query("CALL {$procedure}()"); - var_dump($stmt->nextRowSet()); + var_dump($stmt->nextRowset()); $stmt->closeCursor(); } diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_unbuffered_2050.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_unbuffered_2050.phpt index fcba9e44e694..7cb11f3ffeaf 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_unbuffered_2050.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_unbuffered_2050.phpt @@ -6,7 +6,7 @@ pdo_mysql --FILE-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt index 48353f4cbdb3..5a927185c7c7 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt @@ -16,7 +16,7 @@ MySQLPDOTest::skip(); function check_result($offset, $stmt, $columns) { $row = $stmt->fetch(PDO::FETCH_ASSOC); - $stmt->nextRowSet(); + $stmt->nextRowset(); if (!isset($row['one']) || ($row['one'] != 1)) { printf("[%03d + 1] Expecting array('one' => 1), got %s\n", $offset, var_export($row, true)); diff --git a/ext/pdo_mysql/tests/pdomysql_002.phpt b/ext/pdo_mysql/tests/pdomysql_002.phpt index 2ede0eefaa11..cc0b50e43577 100644 --- a/ext/pdo_mysql/tests/pdomysql_002.phpt +++ b/ext/pdo_mysql/tests/pdomysql_002.phpt @@ -12,7 +12,7 @@ MySQLPDOTest::skip(); require_once __DIR__ . '/inc/mysql_pdo_test.inc'; -$db = Pdo::connect(PDO_MYSQL_TEST_DSN, PDO_MYSQL_TEST_USER, PDO_MYSQL_TEST_PASS); +$db = PDO::connect(PDO_MYSQL_TEST_DSN, PDO_MYSQL_TEST_USER, PDO_MYSQL_TEST_PASS); if (!$db instanceof Pdo\Mysql) { echo "Wrong class type. Should be Pdo\Mysql but is " . get_class($db) . "\n"; } diff --git a/ext/pdo_mysql/tests/pdomysql_003.phpt b/ext/pdo_mysql/tests/pdomysql_003.phpt index 24d86b335c1f..9faf4825c179 100644 --- a/ext/pdo_mysql/tests/pdomysql_003.phpt +++ b/ext/pdo_mysql/tests/pdomysql_003.phpt @@ -12,7 +12,7 @@ MySQLPDOTest::skip(); require_once __DIR__ . '/inc/mysql_pdo_test.inc'; -$db = Pdo::connect(PDO_MYSQL_TEST_DSN, PDO_MYSQL_TEST_USER, PDO_MYSQL_TEST_PASS); +$db = PDO::connect(PDO_MYSQL_TEST_DSN, PDO_MYSQL_TEST_USER, PDO_MYSQL_TEST_PASS); if (!$db instanceof Pdo\Mysql) { echo "Wrong class type. Should be Pdo\Mysql but is " . get_class($db) . "\n"; } diff --git a/ext/pdo_odbc/tests/autocommit_change_mode.phpt b/ext/pdo_odbc/tests/autocommit_change_mode.phpt index c44f124a6cf6..7648998c5b07 100644 --- a/ext/pdo_odbc/tests/autocommit_change_mode.phpt +++ b/ext/pdo_odbc/tests/autocommit_change_mode.phpt @@ -58,7 +58,7 @@ try { } echo "end transaction\n"; -$db->rollback(); +$db->rollBack(); echo "auto commit OFF\n"; $db->setAttribute(PDO::ATTR_AUTOCOMMIT, false); @@ -84,7 +84,7 @@ try { } echo "end transaction\n"; -$db->rollback(); +$db->rollBack(); echo "\n"; echo "done!"; diff --git a/ext/pdo_odbc/tests/common.phpt b/ext/pdo_odbc/tests/common.phpt index 880df9b0a317..e8e5db2ead35 100644 --- a/ext/pdo_odbc/tests/common.phpt +++ b/ext/pdo_odbc/tests/common.phpt @@ -52,7 +52,7 @@ if (false !== getenv('PDOTEST_DSN')) { if (!file_exists($path)) { try { // try to create database - $adox = new COM('ADOX.Catalog'); + $adox = new com('ADOX.Catalog'); $adox->Create('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' . $path); $adox = null; diff --git a/ext/pdo_odbc/tests/gh9372.phpt b/ext/pdo_odbc/tests/gh9372.phpt index 9f9b884932a5..26cff0c2bd4b 100644 --- a/ext/pdo_odbc/tests/gh9372.phpt +++ b/ext/pdo_odbc/tests/gh9372.phpt @@ -34,7 +34,7 @@ $stmt = $db->prepare("SELECT * FROM gh9372 WHERE col = ?"); $stream = fopen("php://memory", "w+"); fwrite($stream, 'something else'); rewind($stream); -$stmt->bindvalue(1, $stream, PDO::PARAM_LOB); +$stmt->bindValue(1, $stream, PDO::PARAM_LOB); try { $stmt->execute(); } catch (PDOException $ex) { diff --git a/ext/pdo_pgsql/tests/bug46274.phpt b/ext/pdo_pgsql/tests/bug46274.phpt index e31dae00a8d0..7218a1c75c10 100644 --- a/ext/pdo_pgsql/tests/bug46274.phpt +++ b/ext/pdo_pgsql/tests/bug46274.phpt @@ -29,11 +29,11 @@ $blob = fopen('php://memory', 'a'); fwrite($blob, $data); rewind($blob); -$stmt->bindparam(':foo', $blob, PDO::PARAM_LOB); +$stmt->bindParam(':foo', $blob, PDO::PARAM_LOB); $stmt->execute(); $blob = ''; -$stmt->bindparam(':foo', $blob, PDO::PARAM_LOB); +$stmt->bindParam(':foo', $blob, PDO::PARAM_LOB); $stmt->execute(); $data = ''; @@ -41,11 +41,11 @@ $blob = fopen('php://memory', 'a'); fwrite($blob, $data); rewind($blob); -$stmt->bindparam(':foo', $blob, PDO::PARAM_LOB); +$stmt->bindParam(':foo', $blob, PDO::PARAM_LOB); $stmt->execute(); $blob = NULL; -$stmt->bindparam(':foo', $blob, PDO::PARAM_LOB); +$stmt->bindParam(':foo', $blob, PDO::PARAM_LOB); $stmt->execute(); $res = $db->query("SELECT blob1 from test_one_blob_46274_1"); diff --git a/ext/pdo_pgsql/tests/bug46274_2.phpt b/ext/pdo_pgsql/tests/bug46274_2.phpt index 62341e958421..829449d2f886 100644 --- a/ext/pdo_pgsql/tests/bug46274_2.phpt +++ b/ext/pdo_pgsql/tests/bug46274_2.phpt @@ -29,11 +29,11 @@ $blob = fopen('php://memory', 'a'); fwrite($blob, $data); rewind($blob); -$stmt->bindparam(':foo', $blob, PDO::PARAM_LOB); +$stmt->bindParam(':foo', $blob, PDO::PARAM_LOB); $stmt->execute(); $blob = ''; -$stmt->bindparam(':foo', $blob, PDO::PARAM_LOB); +$stmt->bindParam(':foo', $blob, PDO::PARAM_LOB); $stmt->execute(); $data = ''; @@ -41,11 +41,11 @@ $blob = fopen('php://memory', 'a'); fwrite($blob, $data); rewind($blob); -$stmt->bindparam(':foo', $blob, PDO::PARAM_LOB); +$stmt->bindParam(':foo', $blob, PDO::PARAM_LOB); $stmt->execute(); $blob = NULL; -$stmt->bindparam(':foo', $blob, PDO::PARAM_LOB); +$stmt->bindParam(':foo', $blob, PDO::PARAM_LOB); $stmt->execute(); $res = $db->query("SELECT blob1 from test_one_blob_46274_2"); diff --git a/ext/pdo_pgsql/tests/bug66584.phpt b/ext/pdo_pgsql/tests/bug66584.phpt index f73e2de8429f..4007299fb4e6 100644 --- a/ext/pdo_pgsql/tests/bug66584.phpt +++ b/ext/pdo_pgsql/tests/bug66584.phpt @@ -38,7 +38,7 @@ for ($i = 1; $i >= 0; $i--) { try { $pdo->query("DROP TABLE test66584"); - $pdo->rollback(); + $pdo->rollBack(); } catch (\Exception $e) { } diff --git a/ext/pdo_pgsql/tests/bug70861.phpt b/ext/pdo_pgsql/tests/bug70861.phpt index 5003ac9c39b2..81f425a0be89 100644 --- a/ext/pdo_pgsql/tests/bug70861.phpt +++ b/ext/pdo_pgsql/tests/bug70861.phpt @@ -34,7 +34,7 @@ $f = fopen("hello://there", "r"); $stmt = $db->prepare("INSERT INTO test70861 (blob1) VALUES (:foo)", array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL)); -$stmt->bindparam(':foo', $f, PDO::PARAM_LOB); +$stmt->bindParam(':foo', $f, PDO::PARAM_LOB); $stmt->execute(); fclose($f); diff --git a/ext/pdo_pgsql/tests/bug_49985.phpt b/ext/pdo_pgsql/tests/bug_49985.phpt index 0cd4b7210591..9541c051acf4 100644 --- a/ext/pdo_pgsql/tests/bug_49985.phpt +++ b/ext/pdo_pgsql/tests/bug_49985.phpt @@ -24,7 +24,7 @@ for ($i = 0; $i < 3; $i++) { $db->commit(); } catch (Exception $e) { echo trim(current(explode("\n", $e->getMessage())))."\n"; - $db->rollback(); + $db->rollBack(); } } diff --git a/ext/pdo_pgsql/tests/copy_from.phpt b/ext/pdo_pgsql/tests/copy_from.phpt index ded3efd9cad2..6601fb803c62 100644 --- a/ext/pdo_pgsql/tests/copy_from.phpt +++ b/ext/pdo_pgsql/tests/copy_from.phpt @@ -45,7 +45,7 @@ $stmt = $db->query("select * from test_copy_from"); foreach($stmt as $r) { var_dump($r); } -$db->rollback(); +$db->rollBack(); echo "Testing pgsqlCopyFromArray() with different field separator and not null indicator\n"; $db->beginTransaction(); @@ -54,7 +54,7 @@ $stmt = $db->query("select * from test_copy_from"); foreach($stmt as $r) { var_dump($r); } -$db->rollback(); +$db->rollBack(); echo "Testing pgsqlCopyFromArray() with only selected fields\n"; $db->beginTransaction(); @@ -63,7 +63,7 @@ $stmt = $db->query("select * from test_copy_from"); foreach($stmt as $r) { var_dump($r); } -$db->rollback(); +$db->rollBack(); echo "Testing pgsqlCopyFromArray() with error\n"; $db->beginTransaction(); @@ -72,7 +72,7 @@ try { } catch (Exception $e) { echo "Exception: {$e->getMessage()}\n"; } -$db->rollback(); +$db->rollBack(); echo "Testing pgsqlCopyFromFile() with default parameters\n"; $db->beginTransaction(); @@ -82,7 +82,7 @@ $stmt = $db->query("select * from test_copy_from"); foreach($stmt as $r) { var_dump($r); } -$db->rollback(); +$db->rollBack(); echo "Testing pgsqlCopyFromFile() with different field separator and not null indicator\n"; $db->beginTransaction(); @@ -91,7 +91,7 @@ $stmt = $db->query("select * from test_copy_from"); foreach($stmt as $r) { var_dump($r); } -$db->rollback(); +$db->rollBack(); echo "Testing pgsqlCopyFromFile() with only selected fields\n"; $db->beginTransaction(); @@ -100,7 +100,7 @@ $stmt = $db->query("select * from test_copy_from"); foreach($stmt as $r) { var_dump($r); } -$db->rollback(); +$db->rollBack(); echo "Testing pgsqlCopyFromFile() with error\n"; $db->beginTransaction(); @@ -109,7 +109,7 @@ try { } catch (Exception $e) { echo "Exception: {$e->getMessage()}\n"; } -$db->rollback(); +$db->rollBack(); echo "Testing pgsqlCopyFromFile() with non existing file\n"; $db->beginTransaction(); @@ -118,7 +118,7 @@ try { } catch (Exception $e) { echo "Exception: {$e->getMessage()}\n"; } -$db->rollback(); +$db->rollBack(); // Clean up foreach (array($filename, $filenameWithDifferentNullValues, $filenameWithDifferentNullValuesAndSelectedFields) as $f) { diff --git a/ext/pdo_pgsql/tests/gh16314.phpt b/ext/pdo_pgsql/tests/gh16314.phpt index 0dde12a4e0e3..e3660337e87b 100644 --- a/ext/pdo_pgsql/tests/gh16314.phpt +++ b/ext/pdo_pgsql/tests/gh16314.phpt @@ -20,10 +20,10 @@ var_dump($pdo->query('SELECT 1;')->fetchAll()); $pdo = PDOTest::test_factory(__DIR__ . '/common.phpt', Pdo\Pgsql::class, true); var_dump($pdo->query('SELECT 1;')->fetchAll()); -$pdo = PDOTest::test_factory(__DIR__ . '/common.phpt', Pdo::class, false); +$pdo = PDOTest::test_factory(__DIR__ . '/common.phpt', PDO::class, false); var_dump($pdo->query('SELECT 1;')->fetchAll()); -$pdo = PDOTest::test_factory(__DIR__ . '/common.phpt', Pdo::class, true); +$pdo = PDOTest::test_factory(__DIR__ . '/common.phpt', PDO::class, true); var_dump($pdo->query('SELECT 1;')->fetchAll()); ?> --EXPECT-- diff --git a/ext/pdo_pgsql/tests/gh9411.phpt b/ext/pdo_pgsql/tests/gh9411.phpt index 2e8eadf8d3e0..baeef10bda91 100644 --- a/ext/pdo_pgsql/tests/gh9411.phpt +++ b/ext/pdo_pgsql/tests/gh9411.phpt @@ -19,7 +19,7 @@ $db->beginTransaction(); $oid = $db->pgsqlLOBCreate(); var_dump($lob = $db->pgsqlLOBOpen($oid, 'wb')); fwrite($lob, 'test'); -$db->rollback(); +$db->rollBack(); var_dump($lob); $db->beginTransaction(); diff --git a/ext/pdo_pgsql/tests/issue78621.inc b/ext/pdo_pgsql/tests/issue78621.inc index c89aefec9c89..833d9f854c4e 100644 --- a/ext/pdo_pgsql/tests/issue78621.inc +++ b/ext/pdo_pgsql/tests/issue78621.inc @@ -34,5 +34,5 @@ $db->exec("delete from t"); $db->exec("insert into t values ('ah')"); var_dump($db->query("select * from t")->fetchAll(PDO::FETCH_ASSOC)); echo "Done\n"; -$db->rollback(); +$db->rollBack(); ?> diff --git a/ext/pdo_pgsql/tests/pdopgsql_002.phpt b/ext/pdo_pgsql/tests/pdopgsql_002.phpt index 22bc660daea7..810bc1466bbd 100644 --- a/ext/pdo_pgsql/tests/pdopgsql_002.phpt +++ b/ext/pdo_pgsql/tests/pdopgsql_002.phpt @@ -13,7 +13,7 @@ PDOTest::skip(); require_once __DIR__ . "/config.inc"; -$db = Pdo::connect($config['ENV']['PDOTEST_DSN']); +$db = PDO::connect($config['ENV']['PDOTEST_DSN']); if (!$db instanceof Pdo\Pgsql) { echo "Wrong class type. Should be Pdo\Pgsql but is " . get_class($db) . "\n"; } diff --git a/ext/pdo_pgsql/tests/pdopgsql_003.phpt b/ext/pdo_pgsql/tests/pdopgsql_003.phpt index 60a5bcc0775f..94ec426befcf 100644 --- a/ext/pdo_pgsql/tests/pdopgsql_003.phpt +++ b/ext/pdo_pgsql/tests/pdopgsql_003.phpt @@ -13,7 +13,7 @@ PDOTest::skip(); require_once __DIR__ . "/config.inc"; -$db = Pdo::connect($config['ENV']['PDOTEST_DSN']); +$db = PDO::connect($config['ENV']['PDOTEST_DSN']); if (!$db instanceof Pdo\Pgsql) { echo "Wrong class type. Should be Pdo\Pgsql but is " . get_class($db) . "\n"; } diff --git a/ext/pdo_pgsql/tests/result_memory_size.phpt b/ext/pdo_pgsql/tests/result_memory_size.phpt index 7b382ea63e8b..8b9891ea504a 100644 --- a/ext/pdo_pgsql/tests/result_memory_size.phpt +++ b/ext/pdo_pgsql/tests/result_memory_size.phpt @@ -14,7 +14,7 @@ if (!defined('Pgsql::ATTR_RESULT_MEMORY_SIZE')) die('skip constant Pgsql::ATTR_R require_once __DIR__ . "/config.inc"; /** @var Pdo */ -$db = Pdo::connect($config['ENV']['PDOTEST_DSN']); +$db = PDO::connect($config['ENV']['PDOTEST_DSN']); echo 'Result set with only 1 row: '; $statement = $db->query('select 1'); diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_transaction.phpt b/ext/pdo_sqlite/tests/pdo_sqlite_transaction.phpt index c8c39d18f3ac..43d9793814ac 100644 --- a/ext/pdo_sqlite/tests/pdo_sqlite_transaction.phpt +++ b/ext/pdo_sqlite/tests/pdo_sqlite_transaction.phpt @@ -15,7 +15,7 @@ $db->commit(); $db->beginTransaction(); $db->query("INSERT INTO test_pdo_sqlite_transaction VALUES (NULL, 'PHP'), (NULL, 'PHP6')"); -$db->rollback(); +$db->rollBack(); $r = $db->query('SELECT COUNT(*) FROM test_pdo_sqlite_transaction'); var_dump($r->rowCount()); diff --git a/ext/pdo_sqlite/tests/subclasses/gc.phpt b/ext/pdo_sqlite/tests/subclasses/gc.phpt index 5975dca32fd8..c7e4ee916e2e 100644 --- a/ext/pdo_sqlite/tests/subclasses/gc.phpt +++ b/ext/pdo_sqlite/tests/subclasses/gc.phpt @@ -12,7 +12,7 @@ class Obj { } $obj = new Obj; -$obj->a = Pdo::connect('sqlite::memory:'); +$obj->a = PDO::connect('sqlite::memory:'); if (!$obj->a instanceof Pdo\Sqlite) { echo "Wrong class type. Should be Pdo\Sqlite but is " . get_class($obj->a) . "]\n"; diff --git a/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_transaction_mode.phpt b/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_transaction_mode.phpt index b342ece3adeb..c23c1c103937 100644 --- a/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_transaction_mode.phpt +++ b/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_transaction_mode.phpt @@ -10,33 +10,33 @@ $pdo = PDO::connect($dsn); $pdo2 = PDO::connect($dsn); // Deferred by default before any transaction mode is set -var_dump($pdo->getAttribute(PDO\Sqlite::ATTR_TRANSACTION_MODE) === PDO\Sqlite::TRANSACTION_MODE_DEFERRED); +var_dump($pdo->getAttribute(Pdo\Sqlite::ATTR_TRANSACTION_MODE) === Pdo\Sqlite::TRANSACTION_MODE_DEFERRED); // Both should return true - setting DEFERRED -var_dump($pdo->setAttribute(PDO\Sqlite::ATTR_TRANSACTION_MODE, PDO\Sqlite::TRANSACTION_MODE_DEFERRED)); -var_dump($pdo->getAttribute(PDO\Sqlite::ATTR_TRANSACTION_MODE) === PDO\Sqlite::TRANSACTION_MODE_DEFERRED); +var_dump($pdo->setAttribute(Pdo\Sqlite::ATTR_TRANSACTION_MODE, Pdo\Sqlite::TRANSACTION_MODE_DEFERRED)); +var_dump($pdo->getAttribute(Pdo\Sqlite::ATTR_TRANSACTION_MODE) === Pdo\Sqlite::TRANSACTION_MODE_DEFERRED); // Both should return true - setting IMMEDIATE -var_dump($pdo->setAttribute(PDO\Sqlite::ATTR_TRANSACTION_MODE, PDO\Sqlite::TRANSACTION_MODE_IMMEDIATE)); -var_dump($pdo->getAttribute(PDO\Sqlite::ATTR_TRANSACTION_MODE) === PDO\Sqlite::TRANSACTION_MODE_IMMEDIATE); +var_dump($pdo->setAttribute(Pdo\Sqlite::ATTR_TRANSACTION_MODE, Pdo\Sqlite::TRANSACTION_MODE_IMMEDIATE)); +var_dump($pdo->getAttribute(Pdo\Sqlite::ATTR_TRANSACTION_MODE) === Pdo\Sqlite::TRANSACTION_MODE_IMMEDIATE); // Both should return true - setting EXCLUSIVE -var_dump($pdo->setAttribute(PDO\Sqlite::ATTR_TRANSACTION_MODE, PDO\Sqlite::TRANSACTION_MODE_EXCLUSIVE)); -var_dump($pdo->getAttribute(PDO\Sqlite::ATTR_TRANSACTION_MODE) === PDO\Sqlite::TRANSACTION_MODE_EXCLUSIVE); +var_dump($pdo->setAttribute(Pdo\Sqlite::ATTR_TRANSACTION_MODE, Pdo\Sqlite::TRANSACTION_MODE_EXCLUSIVE)); +var_dump($pdo->getAttribute(Pdo\Sqlite::ATTR_TRANSACTION_MODE) === Pdo\Sqlite::TRANSACTION_MODE_EXCLUSIVE); // Setting the numeric equivalents of the above. All should return true -var_dump($pdo->setAttribute(PDO\Sqlite::ATTR_TRANSACTION_MODE, 0)); -var_dump($pdo->getAttribute(PDO\Sqlite::ATTR_TRANSACTION_MODE) === PDO\Sqlite::TRANSACTION_MODE_DEFERRED); -var_dump($pdo->setAttribute(PDO\Sqlite::ATTR_TRANSACTION_MODE, 1)); -var_dump($pdo->getAttribute(PDO\Sqlite::ATTR_TRANSACTION_MODE) === PDO\Sqlite::TRANSACTION_MODE_IMMEDIATE); -var_dump($pdo->setAttribute(PDO\Sqlite::ATTR_TRANSACTION_MODE, 2)); -var_dump($pdo->getAttribute(PDO\Sqlite::ATTR_TRANSACTION_MODE) === PDO\Sqlite::TRANSACTION_MODE_EXCLUSIVE); +var_dump($pdo->setAttribute(Pdo\Sqlite::ATTR_TRANSACTION_MODE, 0)); +var_dump($pdo->getAttribute(Pdo\Sqlite::ATTR_TRANSACTION_MODE) === Pdo\Sqlite::TRANSACTION_MODE_DEFERRED); +var_dump($pdo->setAttribute(Pdo\Sqlite::ATTR_TRANSACTION_MODE, 1)); +var_dump($pdo->getAttribute(Pdo\Sqlite::ATTR_TRANSACTION_MODE) === Pdo\Sqlite::TRANSACTION_MODE_IMMEDIATE); +var_dump($pdo->setAttribute(Pdo\Sqlite::ATTR_TRANSACTION_MODE, 2)); +var_dump($pdo->getAttribute(Pdo\Sqlite::ATTR_TRANSACTION_MODE) === Pdo\Sqlite::TRANSACTION_MODE_EXCLUSIVE); // Cannot set a random numeric value -var_dump($pdo->setAttribute(PDO\Sqlite::ATTR_TRANSACTION_MODE, 4)); +var_dump($pdo->setAttribute(Pdo\Sqlite::ATTR_TRANSACTION_MODE, 4)); // Set $pdo to deferred, try to get immediate transaction in $pdo2. There should be no lock contention -$pdo->setAttribute(PDO\Sqlite::ATTR_TRANSACTION_MODE, PDO\Sqlite::TRANSACTION_MODE_DEFERRED); +$pdo->setAttribute(Pdo\Sqlite::ATTR_TRANSACTION_MODE, Pdo\Sqlite::TRANSACTION_MODE_DEFERRED); $pdo->beginTransaction(); try { $pdo2->exec('begin immediate transaction'); @@ -48,7 +48,7 @@ try { $pdo->rollBack(); // Set $pdo to immediate, try to get immediate transaction in $pdo2. There SHOULD be lock contention -$pdo->setAttribute(PDO\Sqlite::ATTR_TRANSACTION_MODE, PDO\Sqlite::TRANSACTION_MODE_IMMEDIATE); +$pdo->setAttribute(Pdo\Sqlite::ATTR_TRANSACTION_MODE, Pdo\Sqlite::TRANSACTION_MODE_IMMEDIATE); $pdo->beginTransaction(); try { $pdo2->exec('begin immediate transaction'); @@ -59,7 +59,7 @@ try { $pdo->rollBack(); // Set $pdo to exclusive, try to get immediate transaction in $pdo2. There SHOULD be lock contention -$pdo->setAttribute(PDO\Sqlite::ATTR_TRANSACTION_MODE, PDO\Sqlite::TRANSACTION_MODE_EXCLUSIVE); +$pdo->setAttribute(Pdo\Sqlite::ATTR_TRANSACTION_MODE, Pdo\Sqlite::TRANSACTION_MODE_EXCLUSIVE); $pdo->beginTransaction(); try { $pdo2->exec('begin immediate transaction'); diff --git a/ext/pdo_sqlite/tests/subclasses/pdosqlite_002.phpt b/ext/pdo_sqlite/tests/subclasses/pdosqlite_002.phpt index fddf2138f84e..a326e7fae8b7 100644 --- a/ext/pdo_sqlite/tests/subclasses/pdosqlite_002.phpt +++ b/ext/pdo_sqlite/tests/subclasses/pdosqlite_002.phpt @@ -9,7 +9,7 @@ if (!defined('Pdo\Sqlite::DETERMINISTIC')) die('skip Pdo\Sqlite::DETERMINISTIC r --FILE-- getRealPath() != $stub->getRealPath()) && !is_dir($file)) { - self::phar_add_file($phar, $level, $dir->getSubPathName(), $file, $compress, $noloader); + self::phar_add_file($phar, $level, $dir->getSubPathname(), $file, $compress, $noloader); } } } catch(Exception $e) { diff --git a/ext/phar/tests/bug46032.phpt b/ext/phar/tests/bug46032.phpt index c17b538ce85b..1c29dc9acd6f 100644 --- a/ext/phar/tests/bug46032.phpt +++ b/ext/phar/tests/bug46032.phpt @@ -10,18 +10,18 @@ phar $a = __DIR__ .'/mytest'; try { - new phar($a); -} catch (exception $e) { } + new Phar($a); +} catch (Exception $e) { } var_dump($a); try { - new phar($a); -} catch (exception $e) { } + new Phar($a); +} catch (Exception $e) { } var_dump($a); -new phardata('0000000000000000000'); +new PharData('0000000000000000000'); ?> ===DONE=== --EXPECTF-- diff --git a/ext/phar/tests/bug54395.phpt b/ext/phar/tests/bug54395.phpt index 44c3de0e3226..665e482fa21b 100644 --- a/ext/phar/tests/bug54395.phpt +++ b/ext/phar/tests/bug54395.phpt @@ -6,7 +6,7 @@ phar getMessage()); } diff --git a/ext/phar/tests/bug60164.phpt b/ext/phar/tests/bug60164.phpt index 2053a5a50eea..67ea6d550959 100644 --- a/ext/phar/tests/bug60164.phpt +++ b/ext/phar/tests/bug60164.phpt @@ -9,7 +9,7 @@ phar.readonly=0 getFileName()); + var_dump($item->getFilename()); } ?> --EXPECT-- diff --git a/ext/phar/tests/bug69720.phpt b/ext/phar/tests/bug69720.phpt index a6afe0f15e7f..5169a723e0a5 100644 --- a/ext/phar/tests/bug69720.phpt +++ b/ext/phar/tests/bug69720.phpt @@ -12,8 +12,8 @@ try { foreach (new RecursiveIteratorIterator($p) as $file) { // $file is a PharFileInfo class, and inherits from SplFileInfo $temp=""; - $temp= $file->getFileName() . "\n"; - $temp.=file_get_contents($file->getPathName()) . "\n"; // display contents + $temp= $file->getFilename() . "\n"; + $temp.=file_get_contents($file->getPathname()) . "\n"; // display contents var_dump($file->getMetadata()); } } diff --git a/ext/phar/tests/bug71391.phpt b/ext/phar/tests/bug71391.phpt index 9294a2f5e61a..bb5b07dfa3b3 100644 --- a/ext/phar/tests/bug71391.phpt +++ b/ext/phar/tests/bug71391.phpt @@ -7,7 +7,7 @@ phar // duplicate since the tar will change copy(__DIR__."/bug71391.tar", __DIR__."/bug71391.test.tar"); $p = new PharData(__DIR__."/bug71391.test.tar"); -$p->delMetaData(); +$p->delMetadata(); ?> DONE --CLEAN-- diff --git a/ext/phar/tests/bug73764.phpt b/ext/phar/tests/bug73764.phpt index 7082049b1948..fc0103c889d0 100644 --- a/ext/phar/tests/bug73764.phpt +++ b/ext/phar/tests/bug73764.phpt @@ -6,7 +6,7 @@ phar getMessage(); diff --git a/ext/phar/tests/bug73768.phpt b/ext/phar/tests/bug73768.phpt index be73d45cfd57..c46e8a084c1f 100644 --- a/ext/phar/tests/bug73768.phpt +++ b/ext/phar/tests/bug73768.phpt @@ -6,7 +6,7 @@ phar getMessage(); diff --git a/ext/phar/tests/bug75102.phpt b/ext/phar/tests/bug75102.phpt index 5621c3db933c..b053e02a08f1 100644 --- a/ext/phar/tests/bug75102.phpt +++ b/ext/phar/tests/bug75102.phpt @@ -5,7 +5,7 @@ phar --FILE-- getPathName())); +var_dump(file_get_contents($phar['test.txt']->getPathname())); ?> --EXPECT-- string(9) "yada yada" diff --git a/ext/phar/tests/cached_manifest_1.phpt b/ext/phar/tests/cached_manifest_1.phpt index e11879ee6dfe..abf6931ca754 100644 --- a/ext/phar/tests/cached_manifest_1.phpt +++ b/ext/phar/tests/cached_manifest_1.phpt @@ -13,7 +13,7 @@ while (false !== ($b = readdir($a))) { var_dump($b); } foreach (new RecursiveIteratorIterator(new Phar($pname)) as $f) { - var_dump($f->getPathName()); + var_dump($f->getPathname()); } var_dump(is_dir($pname . '/b')); var_dump(is_dir($pname . '/d')); diff --git a/ext/phar/tests/gh20732.phpt b/ext/phar/tests/gh20732.phpt index b938d16d42ca..4a05dbc6ac4b 100644 --- a/ext/phar/tests/gh20732.phpt +++ b/ext/phar/tests/gh20732.phpt @@ -1,11 +1,11 @@ --TEST-- -GH-20732 (Phar::LoadPhar undefined behavior when loading directory) +GH-20732 (Phar::loadPhar undefined behavior when loading directory) --EXTENSIONS-- phar --FILE-- getMessage(), "\n"; } diff --git a/ext/phar/tests/mounteddir.phpt b/ext/phar/tests/mounteddir.phpt index 2f6be58eb4d4..6abf04cae0c1 100644 --- a/ext/phar/tests/mounteddir.phpt +++ b/ext/phar/tests/mounteddir.phpt @@ -53,7 +53,7 @@ foreach ($out as $b) { } $out = array(); foreach (new Phar($pname . '/testit') as $b) { - $out[] = $b->getPathName(); + $out[] = $b->getPathname(); } sort($out); foreach ($out as $b) { diff --git a/ext/phar/tests/phar_copy.phpt b/ext/phar/tests/phar_copy.phpt index ed0a1b60486b..2c97bb9c8e3f 100644 --- a/ext/phar/tests/phar_copy.phpt +++ b/ext/phar/tests/phar_copy.phpt @@ -23,12 +23,12 @@ try $p['a'] = 'hi'; $p->startBuffering(); $p->copy('a', 'b'); - echo file_get_contents($p['b']->getPathName()); + echo file_get_contents($p['b']->getPathname()); $p['a']->compress(Phar::GZ); $p['b']->setMetadata('a'); $p->copy('b', 'c'); $p->stopBuffering(); - echo file_get_contents($p['c']->getPathName()); + echo file_get_contents($p['c']->getPathname()); copy($fname, $fname2); $p->copy('a', $ename); } @@ -39,9 +39,9 @@ catch(Exception $e) ini_set('phar.readonly',1); $p2 = new Phar($fname2); echo "\n"; -echo 'a: ' , file_get_contents($p2['a']->getPathName()); -echo 'b: ' ,file_get_contents($p2['b']->getPathName()); -echo 'c: ' ,file_get_contents($p2['c']->getPathName()), $p2['c']->getMetaData(), "\n"; +echo 'a: ' , file_get_contents($p2['a']->getPathname()); +echo 'b: ' ,file_get_contents($p2['b']->getPathname()); +echo 'c: ' ,file_get_contents($p2['c']->getPathname()), $p2['c']->getMetadata(), "\n"; ini_set('phar.readonly', 0); try { $p2->copy('notexisting', 'another'); diff --git a/ext/phar/tests/phar_ctx_001.phpt b/ext/phar/tests/phar_ctx_001.phpt index d1358ac8d92e..a8893156a4b3 100644 --- a/ext/phar/tests/phar_ctx_001.phpt +++ b/ext/phar/tests/phar_ctx_001.phpt @@ -38,16 +38,16 @@ file_put_contents($pname . '/d', 'new d', 0, $context2); $phar = new Phar($fname); var_dump(file_get_contents($pname . '/a')); var_dump($phar['a']->isCompressed()); -var_dump($phar['a']->getMetaData()); +var_dump($phar['a']->getMetadata()); var_dump(file_get_contents($pname . '/b')); var_dump($phar['b']->isCompressed()); -var_dump($phar['b']->getMetaData()); +var_dump($phar['b']->getMetadata()); var_dump(file_get_contents($pname . '/c')); var_dump($phar['c']->isCompressed()); -var_dump($phar['c']->getMetaData()); +var_dump($phar['c']->getMetadata()); var_dump(file_get_contents($pname . '/d')); var_dump($phar['d']->isCompressed()); -var_dump($phar['d']->getMetaData()); +var_dump($phar['d']->getMetadata()); $context2 = stream_context_create(array('phar' => array('metadata' => array(4)))); $fp = fopen($pname . '/b', 'r+', 0, $context2); fclose($fp); @@ -56,7 +56,7 @@ fclose($fp); isCompressed()); -var_dump($phar['b']->getMetaData()); +var_dump($phar['b']->getMetadata()); ?> --CLEAN-- $obj) { - var_dump($obj->getPathName()); + var_dump($obj->getPathname()); } ?> --CLEAN-- diff --git a/ext/phar/tests/phar_metadata_read.phpt b/ext/phar/tests/phar_metadata_read.phpt index f8b0f670bcbb..d0b5a6384cb9 100644 --- a/ext/phar/tests/phar_metadata_read.phpt +++ b/ext/phar/tests/phar_metadata_read.phpt @@ -24,12 +24,12 @@ foreach($files as $name => $cont) { } $phar = new Phar($fname); -var_dump($phar->hasMetaData()); -var_dump($phar->getMetaData()); -var_dump($phar->delMetaData()); -var_dump($phar->getMetaData()); -var_dump($phar->delMetaData()); -var_dump($phar->getMetaData()); +var_dump($phar->hasMetadata()); +var_dump($phar->getMetadata()); +var_dump($phar->delMetadata()); +var_dump($phar->getMetadata()); +var_dump($phar->delMetadata()); +var_dump($phar->getMetadata()); foreach($files as $name => $cont) { echo " meta $name\n"; var_dump($phar[$name]->hasMetadata()); diff --git a/ext/phar/tests/phar_metadata_write3.phpt b/ext/phar/tests/phar_metadata_write3.phpt index 304ed65b46e9..0fd015112efa 100644 --- a/ext/phar/tests/phar_metadata_write3.phpt +++ b/ext/phar/tests/phar_metadata_write3.phpt @@ -30,7 +30,7 @@ echo "Original metadata\n"; var_dump($phar->getMetadata()); $phar->setMetadata(new EchoesOnWakeup()); unset($phar); -// NOTE: Phar will use the cached value of metadata if setMetaData was called on that Phar path before. +// NOTE: Phar will use the cached value of metadata if setMetadata was called on that Phar path before. // Save the writes to the phar and use a different file path. $fname_new = "$fname.copy.php"; copy($fname, $fname_new); @@ -42,7 +42,7 @@ var_dump($phar->getMetadata(['allowed_classes' => []])); echo "Calling getMetadata with EchoesOnWakeup allowed\n"; var_dump($phar->getMetadata(['allowed_classes' => [EchoesOnWakeup::class]])); // Part of this is a test that there are no unexpected behaviors when both selMetadata and getMetadata are used -$phar->setMetaData([new EchoesOnWakeup(), new stdClass()]); +$phar->setMetadata([new EchoesOnWakeup(), new stdClass()]); echo "Calling getMetadata with too low max_depth\n"; var_dump($phar->getMetadata(['max_depth' => 1])); echo "Calling getMetadata with some allowed classes\n"; diff --git a/ext/phar/tests/phar_oo_003.phpt b/ext/phar/tests/phar_oo_003.phpt index f886c820045e..b1ba608fd5cc 100644 --- a/ext/phar/tests/phar_oo_003.phpt +++ b/ext/phar/tests/phar_oo_003.phpt @@ -18,7 +18,7 @@ foreach($phar as $name => $ent) var_dump('DIR'); } else { var_dump($ent->openFile()->fgets()); - include $ent->getPathName(); + include $ent->getPathname(); } } diff --git a/ext/phar/tests/phar_oo_005.phpt b/ext/phar/tests/phar_oo_005.phpt index fb2af5ed5421..15aecbd20e1a 100644 --- a/ext/phar/tests/phar_oo_005.phpt +++ b/ext/phar/tests/phar_oo_005.phpt @@ -18,7 +18,7 @@ foreach($it as $name => $ent) var_dump(str_replace(array('\\', $fname), array('/', '*'), $name)); var_dump(str_replace(array('\\', $fname), array('/', '*'), $ent->getPathname())); var_dump(str_replace('\\', '/', $it->getSubPath())); - var_dump(str_replace('\\', '/', $it->getSubPathName())); + var_dump(str_replace('\\', '/', $it->getSubPathname())); $sub = $it->getPathInfo(); var_dump(str_replace('\\', '/', $sub->getFilename())); } diff --git a/ext/phar/tests/phar_stub_error.phpt b/ext/phar/tests/phar_stub_error.phpt index 9515e8675a4b..c140ae29e766 100644 --- a/ext/phar/tests/phar_stub_error.phpt +++ b/ext/phar/tests/phar_stub_error.phpt @@ -27,7 +27,7 @@ try { $phar->setStub($newstub); } -catch(exception $e) +catch(Exception $e) { echo 'Exception: ' . $e->getMessage() . "\n"; } diff --git a/ext/phar/tests/tar/bignames_overflow.phpt b/ext/phar/tests/tar/bignames_overflow.phpt index 411c25a3f02d..c6a42587a13e 100644 --- a/ext/phar/tests/tar/bignames_overflow.phpt +++ b/ext/phar/tests/tar/bignames_overflow.phpt @@ -19,7 +19,7 @@ $tar->close(); $p1 = new PharData($fname); foreach ($p1 as $file) { - echo $file->getFileName(), "\n"; + echo $file->getFilename(), "\n"; } echo $p1['a/' . str_repeat('a', 100)]->getContent() . "\n"; echo $p1[str_repeat('a', 155) . '/' . str_repeat('a', 100)]->getContent() . "\n"; diff --git a/ext/phar/tests/tar/bug49910.phpt b/ext/phar/tests/tar/bug49910.phpt index dd87a806b0b3..06ffa67b9cce 100644 --- a/ext/phar/tests/tar/bug49910.phpt +++ b/ext/phar/tests/tar/bug49910.phpt @@ -9,7 +9,7 @@ $fname = str_replace('\\', '/', __DIR__ . '/files/Structures_Graph-1.0.3.tgz'); $tar = new PharData($fname); $files = array(); foreach (new RecursiveIteratorIterator($tar) as $file) { - $files[] = str_replace($fname, '*', $file->getPathName()); + $files[] = str_replace($fname, '*', $file->getPathname()); } print_r($files); ?> diff --git a/ext/phar/tests/tar/phar_copy.phpt b/ext/phar/tests/tar/phar_copy.phpt index 52b42b6c46e2..407d06be8560 100644 --- a/ext/phar/tests/tar/phar_copy.phpt +++ b/ext/phar/tests/tar/phar_copy.phpt @@ -23,10 +23,10 @@ try $p['a'] = 'hi'; $p->startBuffering(); $p->copy('a', 'b'); - echo file_get_contents($p['b']->getPathName()); + echo file_get_contents($p['b']->getPathname()); $p->copy('b', 'c'); $p->stopBuffering(); - echo file_get_contents($p['c']->getPathName()); + echo file_get_contents($p['c']->getPathname()); copy($fname, $fname2); var_dump($p->isFileFormat(Phar::TAR)); $p->copy('a', $ename); @@ -39,9 +39,9 @@ ini_set('phar.readonly',1); $p2 = new Phar($fname2); var_dump($p2->isFileFormat(Phar::TAR)); echo "\n"; -echo 'a: ' , file_get_contents($p2['a']->getPathName()); -echo 'b: ' ,file_get_contents($p2['b']->getPathName()); -echo 'c: ' ,file_get_contents($p2['c']->getPathName()); +echo 'a: ' , file_get_contents($p2['a']->getPathname()); +echo 'b: ' ,file_get_contents($p2['b']->getPathname()); +echo 'c: ' ,file_get_contents($p2['c']->getPathname()); ?> ===DONE=== --CLEAN-- diff --git a/ext/phar/tests/tar/phar_stub_error.phpt b/ext/phar/tests/tar/phar_stub_error.phpt index 2cfeb4d43fa7..7c4db901c6ec 100644 --- a/ext/phar/tests/tar/phar_stub_error.phpt +++ b/ext/phar/tests/tar/phar_stub_error.phpt @@ -24,7 +24,7 @@ $newstub = ''; try { $phar->setStub($newstub); -} catch(exception $e) { +} catch(Exception $e) { echo 'Exception: ' . $e->getMessage() . "\n"; } diff --git a/ext/phar/tests/tar/tar_003.phpt b/ext/phar/tests/tar/tar_003.phpt index 388f8362a6a2..14b01bc63b7d 100644 --- a/ext/phar/tests/tar/tar_003.phpt +++ b/ext/phar/tests/tar/tar_003.phpt @@ -17,8 +17,8 @@ $tar->init(); $tar->addFile('.phar/stub.php', "addFile('tar_003.phpt', $g = fopen(__FILE__, 'r')); $tar->addFile('internal/file/here', "hi there!\n"); -$tar->mkDir('internal/dir'); -$tar->mkDir('dir'); +$tar->mkdir('internal/dir'); +$tar->mkdir('dir'); $tar->close(); fclose($g); diff --git a/ext/phar/tests/tar/tar_004.phpt b/ext/phar/tests/tar/tar_004.phpt index 7ab26cd9253c..43bc631690ed 100644 --- a/ext/phar/tests/tar/tar_004.phpt +++ b/ext/phar/tests/tar/tar_004.phpt @@ -17,8 +17,8 @@ $tar = new tarmaker($fname, 'none'); $tar->init(); $tar->addFile('tar_004.php', 'addFile('internal/file/here', "hi there!\n"); -$tar->mkDir('internal/dir'); -$tar->mkDir('dir'); +$tar->mkdir('internal/dir'); +$tar->mkdir('dir'); $tar->addFile('.phar/stub.php', 'init(); $tar->addFile('tar_004.php', 'addFile('internal/file/here', "hi there!\n"); -$tar->mkDir('internal/dir'); -$tar->mkDir('dir'); +$tar->mkdir('internal/dir'); +$tar->mkdir('dir'); $tar->addFile('.phar/stub.php', 'init(); $a->addFile('tar_004.php', 'addFile('internal/file/here', "hi there!\n"); -$a->mkDir('internal/dir'); -$a->mkDir('dir'); +$a->mkdir('internal/dir'); +$a->mkdir('dir'); $a->addFile('.phar/stub.php', 'stopBuffering(); foreach(new RecursiveIteratorIterator($phar) as $path) { - echo str_replace('\\', '/', $path->getPathName()) . "\n"; + echo str_replace('\\', '/', $path->getPathname()) . "\n"; } ?> diff --git a/ext/phar/tests/zip/files/zipmaker.php.inc b/ext/phar/tests/zip/files/zipmaker.php.inc index c9eebad7edc1..e1576aa61d0e 100644 --- a/ext/phar/tests/zip/files/zipmaker.php.inc +++ b/ext/phar/tests/zip/files/zipmaker.php.inc @@ -9,13 +9,13 @@ class zipmaker */ protected $archive; /** - * @var ZIPArchive + * @var ZipArchive */ protected $zip; protected $path; function __construct($path) { - if (!class_exists('ZIPArchive')) { + if (!class_exists('ZipArchive')) { throw new Exception( 'Zip extension is not available'); } @@ -42,7 +42,7 @@ class zipmaker function init() { $this->zip = new ZipArchive; - if (true !== $this->zip->open($this->path, ZIPARCHIVE::CREATE)) { + if (true !== $this->zip->open($this->path, ZipArchive::CREATE)) { throw new Exception( 'Cannot open ZIP archive ' . $this->path ); diff --git a/ext/phar/tests/zip/odt.phpt b/ext/phar/tests/zip/odt.phpt index 53683c4ae110..37169cb131b0 100644 --- a/ext/phar/tests/zip/odt.phpt +++ b/ext/phar/tests/zip/odt.phpt @@ -8,9 +8,9 @@ zlib $a = new PharData(__DIR__ . '/files/odt.odt'); foreach (new RecursiveIteratorIterator($a, RecursiveIteratorIterator::LEAVES_ONLY) as $b) { if ($b->isDir()) { - echo "dir " . $b->getPathName() . "\n"; + echo "dir " . $b->getPathname() . "\n"; } else { - echo $b->getPathName() . "\n"; + echo $b->getPathname() . "\n"; } } // this next line is for increased code coverage diff --git a/ext/phar/tests/zip/phar_copy.phpt b/ext/phar/tests/zip/phar_copy.phpt index de9b1c9dd76d..87116a87ab53 100644 --- a/ext/phar/tests/zip/phar_copy.phpt +++ b/ext/phar/tests/zip/phar_copy.phpt @@ -22,10 +22,10 @@ try $p['a'] = 'hi'; $p->startBuffering(); $p->copy('a', 'b'); - echo file_get_contents($p['b']->getPathName()); + echo file_get_contents($p['b']->getPathname()); $p->copy('b', 'c'); $p->stopBuffering(); - echo file_get_contents($p['c']->getPathName()); + echo file_get_contents($p['c']->getPathname()); copy($fname, $fname2); var_dump($p->isFileFormat(Phar::ZIP)); $p->copy('a', $ename); @@ -38,9 +38,9 @@ ini_set('phar.readonly',1); $p2 = new Phar($fname2); var_dump($p2->isFileFormat(Phar::ZIP)); echo "\n"; -echo 'a: ' , file_get_contents($p2['a']->getPathName()); -echo 'b: ' ,file_get_contents($p2['b']->getPathName()); -echo 'c: ' ,file_get_contents($p2['c']->getPathName()); +echo 'a: ' , file_get_contents($p2['a']->getPathname()); +echo 'b: ' ,file_get_contents($p2['b']->getPathname()); +echo 'c: ' ,file_get_contents($p2['c']->getPathname()); ?> ===DONE=== --CLEAN-- diff --git a/ext/phar/tests/zip/phar_stub_error.phpt b/ext/phar/tests/zip/phar_stub_error.phpt index 74319c906077..10fbc70b398d 100644 --- a/ext/phar/tests/zip/phar_stub_error.phpt +++ b/ext/phar/tests/zip/phar_stub_error.phpt @@ -24,7 +24,7 @@ try { $phar->setStub($newstub); } -catch(exception $e) +catch(Exception $e) { echo 'Exception: ' . $e->getMessage() . "\n"; } diff --git a/ext/phar/tests/zip/unixzip.phpt b/ext/phar/tests/zip/unixzip.phpt index 54e364ee52dc..6228455d701f 100644 --- a/ext/phar/tests/zip/unixzip.phpt +++ b/ext/phar/tests/zip/unixzip.phpt @@ -7,14 +7,14 @@ phar $a = new PharData(__DIR__ . '/files/zip.zip'); foreach ($a as $b) { if ($b->isDir()) { - echo "dir " . $b->getPathName() . "\n"; + echo "dir " . $b->getPathname() . "\n"; } else { - echo $b->getPathName(), "\n"; - echo file_get_contents($b->getPathName()), "\n"; + echo $b->getPathname(), "\n"; + echo file_get_contents($b->getPathname()), "\n"; } } if (isset($a['notempty/hi.txt'])) { - echo $a['notempty/hi.txt']->getPathName() . "\n"; + echo $a['notempty/hi.txt']->getPathname() . "\n"; } ?> --EXPECTF-- diff --git a/ext/readline/readline_cli.c b/ext/readline/readline_cli.c index 3b2a08a15843..adce2a9cc9a9 100644 --- a/ext/readline/readline_cli.c +++ b/ext/readline/readline_cli.c @@ -527,7 +527,7 @@ static char *cli_completion_generator(const char *text, int index) /* {{{ */ } else if (text[0] == '#' && text[1] != '[') { retval = cli_completion_generator_ini(text, textlen, &cli_completion_state); } else { - char *lc_text; + char *member_text; const char *class_name_end; zend_string *class_name = NULL; zend_class_entry *ce = NULL; @@ -535,22 +535,21 @@ static char *cli_completion_generator(const char *text, int index) /* {{{ */ class_name_end = strstr(text, "::"); if (class_name_end) { size_t class_name_len = class_name_end - text; - class_name = zend_string_alloc(class_name_len, 0); - zend_str_tolower_copy(ZSTR_VAL(class_name), text, class_name_len); + class_name = zend_string_init(text, class_name_len, 0); if ((ce = zend_lookup_class(class_name)) == NULL) { zend_string_release_ex(class_name, 0); return NULL; } - lc_text = zend_str_tolower_dup(class_name_end + 2, textlen - 2 - class_name_len); + member_text = estrndup(class_name_end + 2, textlen - 2 - class_name_len); textlen -= (class_name_len + 2); } else { - lc_text = zend_str_tolower_dup(text, textlen); + member_text = estrndup(text, textlen); } switch (cli_completion_state) { case 0: case 1: - retval = cli_completion_generator_func(lc_text, textlen, &cli_completion_state, ce ? &ce->function_table : EG(function_table)); + retval = cli_completion_generator_func(member_text, textlen, &cli_completion_state, ce ? &ce->function_table : EG(function_table)); if (retval) { break; } @@ -564,12 +563,12 @@ static char *cli_completion_generator(const char *text, int index) /* {{{ */ ZEND_FALLTHROUGH; case 4: case 5: - retval = cli_completion_generator_class(lc_text, textlen, &cli_completion_state); + retval = cli_completion_generator_class(member_text, textlen, &cli_completion_state); break; default: break; } - efree(lc_text); + efree(member_text); if (class_name) { zend_string_release_ex(class_name, 0); } diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index a208741b1590..1412bfd9199f 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -859,7 +859,6 @@ static void _function_string(smart_str *str, zend_function *fptr, zend_class_ent { smart_str param_indent = {0}; zend_function *overwrites; - zend_string *lc_name; /* TBD: Repair indenting of doc comment (or is this to be done in the parser?) * What's "wrong" is that any whitespace before the doc comment start is @@ -885,13 +884,11 @@ static void _function_string(smart_str *str, zend_function *fptr, zend_class_ent if (fptr->common.scope != scope) { smart_str_append_printf(str, ", inherits %s", ZSTR_VAL(fptr->common.scope->name)); } else if (fptr->common.scope->parent) { - lc_name = zend_string_tolower(fptr->common.function_name); - if ((overwrites = zend_hash_find_ptr(&fptr->common.scope->parent->function_table, lc_name)) != NULL) { + if ((overwrites = zend_hash_find_ptr(&fptr->common.scope->parent->function_table, fptr->common.function_name)) != NULL) { if (fptr->common.scope != overwrites->common.scope && !(overwrites->common.fn_flags & ZEND_ACC_PRIVATE)) { smart_str_append_printf(str, ", overwrites %s", ZSTR_VAL(overwrites->common.scope->name)); } } - zend_string_release_ex(lc_name, 0); } } if (fptr->common.prototype && fptr->common.prototype->common.scope) { @@ -1267,17 +1264,14 @@ static zend_result read_attributes(zval *ret, HashTable *attributes, zend_class_ zval tmp; if (name) { - // Name based filtering using lowercased key. - zend_string *filter = zend_string_tolower(name); - + // Name based filtering (case-sensitive, like class names). ZEND_HASH_PACKED_FOREACH_PTR(attributes, attr) { - if (attr->offset == offset && zend_string_equals(attr->lcname, filter)) { + if (attr->offset == offset && zend_string_equals(attr->name, name)) { reflection_attribute_factory(&tmp, attributes, attr, scope, target, filename); add_next_index_zval(ret, &tmp); } } ZEND_HASH_FOREACH_END(); - zend_string_release(filter); return SUCCESS; } @@ -1288,7 +1282,7 @@ static zend_result read_attributes(zval *ret, HashTable *attributes, zend_class_ if (base) { // Base type filtering. - zend_class_entry *ce = zend_lookup_class_ex(attr->name, attr->lcname, 0); + zend_class_entry *ce = zend_lookup_class_ex(attr->name, 0); if (ce == NULL) { // Bailout on error, otherwise ignore unavailable class. @@ -1714,7 +1708,7 @@ ZEND_METHOD(ReflectionFunction, __construct) zend_object *closure_obj = NULL; reflection_object *intern; zend_function *fptr; - zend_string *fname, *lcname; + zend_string *fname, *name; object = ZEND_THIS; intern = Z_REFLECTION_P(object); @@ -1728,15 +1722,11 @@ ZEND_METHOD(ReflectionFunction, __construct) } else { if (UNEXPECTED(ZSTR_VAL(fname)[0] == '\\')) { /* Ignore leading "\" */ - ALLOCA_FLAG(use_heap) - ZSTR_ALLOCA_ALLOC(lcname, ZSTR_LEN(fname) - 1, use_heap); - zend_str_tolower_copy(ZSTR_VAL(lcname), ZSTR_VAL(fname) + 1, ZSTR_LEN(fname) - 1); - fptr = zend_fetch_function(lcname); - ZSTR_ALLOCA_FREE(lcname, use_heap); + name = zend_string_init(ZSTR_VAL(fname) + 1, ZSTR_LEN(fname) - 1, 0); + fptr = zend_fetch_function(name); + zend_string_release_ex(name, 0); } else { - lcname = zend_string_tolower(fname); - fptr = zend_fetch_function(lcname); - zend_string_release(lcname); + fptr = zend_fetch_function(fname); } if (fptr == NULL) { @@ -2478,18 +2468,13 @@ ZEND_METHOD(ReflectionParameter, __construct) case IS_STRING: { zend_string *fname = Z_STR_P(reference); - zend_string *lcname; if (UNEXPECTED(ZSTR_VAL(fname)[0] == '\\')) { /* Ignore leading "\" */ - ALLOCA_FLAG(use_heap) - ZSTR_ALLOCA_ALLOC(lcname, ZSTR_LEN(fname) - 1, use_heap); - zend_str_tolower_copy(ZSTR_VAL(lcname), ZSTR_VAL(fname) + 1, ZSTR_LEN(fname) - 1); - fptr = zend_fetch_function(lcname); - ZSTR_ALLOCA_FREE(lcname, use_heap); + zend_string *name = zend_string_init(ZSTR_VAL(fname) + 1, ZSTR_LEN(fname) - 1, 0); + fptr = zend_fetch_function(name); + zend_string_release_ex(name, 0); } else { - lcname = zend_string_tolower(fname); - fptr = zend_fetch_function(lcname); - zend_string_release(lcname); + fptr = zend_fetch_function(fname); } if (!fptr) { zend_throw_exception_ex(reflection_exception_ptr, 0, @@ -2503,7 +2488,7 @@ ZEND_METHOD(ReflectionParameter, __construct) case IS_ARRAY: { zval *classref; zval *method; - zend_string *name, *lcname; + zend_string *name; if (((classref = zend_hash_index_find(Z_ARRVAL_P(reference), 0)) == NULL) || ((method = zend_hash_index_find(Z_ARRVAL_P(reference), 1)) == NULL)) @@ -2533,21 +2518,18 @@ ZEND_METHOD(ReflectionParameter, __construct) return; } - lcname = zend_string_tolower(name); - if (Z_TYPE_P(classref) == IS_OBJECT && is_closure_invoke(ce, lcname) + if (Z_TYPE_P(classref) == IS_OBJECT && is_closure_invoke(ce, name) && (fptr = zend_get_closure_invoke_method(Z_OBJ_P(classref))) != NULL) { /* nothing to do. don't set is_closure since is the invoke handler, not the closure itself */ - } else if ((fptr = zend_hash_find_ptr(&ce->function_table, lcname)) == NULL) { + } else if ((fptr = zend_hash_find_ptr(&ce->function_table, name)) == NULL) { zend_throw_exception_ex(reflection_exception_ptr, 0, "Method %s::%s() does not exist", ZSTR_VAL(ce->name), ZSTR_VAL(name)); zend_string_release(name); - zend_string_release(lcname); RETURN_THROWS(); } zend_string_release(name); - zend_string_release(lcname); } break; @@ -3243,7 +3225,6 @@ static void instantiate_reflection_method(INTERNAL_FUNCTION_PARAMETERS, bool is_ zend_string *class_name = NULL; char *method_name; size_t method_name_len; - char *lcname; zval *object; reflection_object *intern; @@ -3319,22 +3300,18 @@ static void instantiate_reflection_method(INTERNAL_FUNCTION_PARAMETERS, bool is_ } intern = Z_REFLECTION_P(object); - lcname = zend_str_tolower_dup(method_name, method_name_len); - if (ce == zend_ce_closure && orig_obj && (method_name_len == sizeof(ZEND_INVOKE_FUNC_NAME)-1) - && memcmp(lcname, ZEND_INVOKE_FUNC_NAME, sizeof(ZEND_INVOKE_FUNC_NAME)-1) == 0 + && memcmp(method_name, ZEND_INVOKE_FUNC_NAME, sizeof(ZEND_INVOKE_FUNC_NAME)-1) == 0 && (mptr = zend_get_closure_invoke_method(orig_obj)) != NULL) { /* Store the original closure object so we can validate it in invoke/invokeArgs. * Each closure has a unique __invoke signature, so we must reject different closures. */ ZVAL_OBJ_COPY(&intern->obj, orig_obj); - } else if ((mptr = zend_hash_str_find_ptr(&ce->function_table, lcname, method_name_len)) == NULL) { - efree(lcname); + } else if ((mptr = zend_hash_str_find_ptr(&ce->function_table, method_name, method_name_len)) == NULL) { zend_throw_exception_ex(reflection_exception_ptr, 0, "Method %s::%s() does not exist", ZSTR_VAL(ce->name), method_name); RETURN_THROWS(); } - efree(lcname); ZVAL_STR_COPY(reflection_prop_name(object), mptr->common.function_name); ZVAL_STR_COPY(reflection_prop_class(object), mptr->common.scope->name); @@ -4473,16 +4450,14 @@ ZEND_METHOD(ReflectionClass, hasMethod) { reflection_object *intern; zend_class_entry *ce; - zend_string *name, *lc_name; + zend_string *name; if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &name) == FAILURE) { RETURN_THROWS(); } GET_REFLECTION_OBJECT_PTR(ce); - lc_name = zend_string_tolower(name); - RETVAL_BOOL(zend_hash_exists(&ce->function_table, lc_name) || is_closure_invoke(ce, lc_name)); - zend_string_release(lc_name); + RETVAL_BOOL(zend_hash_exists(&ce->function_table, name) || is_closure_invoke(ce, name)); } /* }}} */ @@ -4493,33 +4468,31 @@ ZEND_METHOD(ReflectionClass, getMethod) zend_class_entry *ce; zend_function *mptr; zval obj_tmp; - zend_string *name, *lc_name; + zend_string *name; if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &name) == FAILURE) { RETURN_THROWS(); } GET_REFLECTION_OBJECT_PTR(ce); - lc_name = zend_string_tolower(name); - if (!Z_ISUNDEF(intern->obj) && is_closure_invoke(ce, lc_name) + if (!Z_ISUNDEF(intern->obj) && is_closure_invoke(ce, name) && (mptr = zend_get_closure_invoke_method(Z_OBJ(intern->obj))) != NULL) { /* don't assign closure_object since we only reflect the invoke handler method and not the closure definition itself */ reflection_method_factory(ce, mptr, NULL, return_value); - } else if (Z_ISUNDEF(intern->obj) && is_closure_invoke(ce, lc_name) + } else if (Z_ISUNDEF(intern->obj) && is_closure_invoke(ce, name) && object_init_ex(&obj_tmp, ce) == SUCCESS && (mptr = zend_get_closure_invoke_method(Z_OBJ(obj_tmp))) != NULL) { /* don't assign closure_object since we only reflect the invoke handler method and not the closure definition itself */ reflection_method_factory(ce, mptr, NULL, return_value); zval_ptr_dtor(&obj_tmp); - } else if ((mptr = zend_hash_find_ptr(&ce->function_table, lc_name)) != NULL) { + } else if ((mptr = zend_hash_find_ptr(&ce->function_table, name)) != NULL) { reflection_method_factory(ce, mptr, NULL, return_value); } else { zend_throw_exception_ex(reflection_exception_ptr, 0, "Method %s::%s() does not exist", ZSTR_VAL(ce->name), ZSTR_VAL(name)); } - zend_string_release(lc_name); } /* }}} */ @@ -5398,8 +5371,7 @@ ZEND_METHOD(ReflectionClass, getTraits) zval trait; zend_class_entry *trait_ce; - trait_ce = zend_fetch_class_by_name(ce->trait_names[i].name, - ce->trait_names[i].lc_name, ZEND_FETCH_CLASS_TRAIT); + trait_ce = zend_fetch_class_by_name(ce->trait_names[i].name, ZEND_FETCH_CLASS_TRAIT); ZEND_ASSERT(trait_ce); zend_reflection_class_factory(trait_ce, &trait); zend_hash_update(Z_ARRVAL_P(return_value), ce->trait_names[i].name, &trait); @@ -5452,18 +5424,16 @@ ZEND_METHOD(ReflectionClass, getTraitAliases) if (!class_name) { uint32_t j = 0; - zend_string *lcname = zend_string_tolower(cur_ref->method_name); for (j = 0; j < ce->num_traits; j++) { zend_class_entry *trait = - zend_hash_find_ptr(CG(class_table), ce->trait_names[j].lc_name); + zend_hash_find_ptr(CG(class_table), ce->trait_names[j].name); ZEND_ASSERT(trait && "Trait must exist"); - if (zend_hash_exists(&trait->function_table, lcname)) { + if (zend_hash_exists(&trait->function_table, cur_ref->method_name)) { class_name = trait->name; break; } } - zend_string_release_ex(lcname, 0); ZEND_ASSERT(class_name != NULL); } @@ -7552,7 +7522,7 @@ ZEND_METHOD(ReflectionAttribute, newInstance) RETURN_THROWS(); } - if (NULL == (marker = zend_get_attribute_str(ce->attributes, ZEND_STRL("attribute")))) { + if (NULL == (marker = zend_get_attribute_str(ce->attributes, ZEND_STRL("Attribute")))) { zend_throw_error(NULL, "Attempting to use non-attribute class \"%s\" as attribute", ZSTR_VAL(attr->data->name)); RETURN_THROWS(); } @@ -7600,8 +7570,8 @@ ZEND_METHOD(ReflectionAttribute, newInstance) #if ZEND_DEBUG zend_attribute *delayed_target_validation = zend_get_attribute_str( attr->attributes, - "delayedtargetvalidation", - strlen("delayedtargetvalidation") + "DelayedTargetValidation", + strlen("DelayedTargetValidation") ); ZEND_ASSERT(delayed_target_validation != NULL); #endif @@ -7964,21 +7934,13 @@ ZEND_METHOD(ReflectionConstant, __construct) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); - /* Build name with lowercased ns. */ + /* Strip a leading backslash; the rest of the name is case-sensitive. */ bool backslash_prefixed = ZSTR_VAL(name)[0] == '\\'; - char *source = ZSTR_VAL(name) + backslash_prefixed; - size_t source_len = ZSTR_LEN(name) - backslash_prefixed; - zend_string *lc_name = zend_string_alloc(source_len, /* persistent */ false); - const char *ns_end = zend_memrchr(source, '\\', source_len); - size_t ns_len = 0; - if (ns_end) { - ns_len = ns_end - ZSTR_VAL(name); - zend_str_tolower_copy(ZSTR_VAL(lc_name), source, ns_len); - } - memcpy(ZSTR_VAL(lc_name) + ns_len, source + ns_len, source_len - ns_len); - - zend_constant *const_ = zend_get_constant_ptr(lc_name); - zend_string_release_ex(lc_name, /* persistent */ false); + zend_string *lookup_name = zend_string_init( + ZSTR_VAL(name) + backslash_prefixed, ZSTR_LEN(name) - backslash_prefixed, 0); + + zend_constant *const_ = zend_get_constant_ptr(lookup_name); + zend_string_release_ex(lookup_name, /* persistent */ false); if (!const_) { zend_throw_exception_ex(reflection_exception_ptr, 0, "Constant \"%s\" does not exist", ZSTR_VAL(name)); RETURN_THROWS(); diff --git a/ext/reflection/php_reflection_arginfo.h b/ext/reflection/php_reflection_arginfo.h index 65571f38d43c..f705f2a16657 100644 --- a/ext/reflection/php_reflection_arginfo.h +++ b/ext/reflection/php_reflection_arginfo.h @@ -1446,12 +1446,12 @@ static zend_class_entry *register_class_ReflectionFunction(zend_class_entry *cla zend_string_release_ex(const_IS_DEPRECATED_name, true); - zend_attribute *attribute_Deprecated_func_isdisabled_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "isdisabled", sizeof("isdisabled") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); - ZVAL_STR(&attribute_Deprecated_func_isdisabled_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); - attribute_Deprecated_func_isdisabled_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); - zend_string *attribute_Deprecated_func_isdisabled_0_arg1_str = zend_string_init("as ReflectionFunction can no longer be constructed for disabled functions", strlen("as ReflectionFunction can no longer be constructed for disabled functions"), 1); - ZVAL_STR(&attribute_Deprecated_func_isdisabled_0->args[1].value, attribute_Deprecated_func_isdisabled_0_arg1_str); - attribute_Deprecated_func_isdisabled_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + zend_attribute *attribute_Deprecated_func_isDisabled_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "isDisabled", sizeof("isDisabled") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + ZVAL_STR(&attribute_Deprecated_func_isDisabled_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); + attribute_Deprecated_func_isDisabled_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zend_string *attribute_Deprecated_func_isDisabled_0_arg1_str = zend_string_init("as ReflectionFunction can no longer be constructed for disabled functions", strlen("as ReflectionFunction can no longer be constructed for disabled functions"), 1); + ZVAL_STR(&attribute_Deprecated_func_isDisabled_0->args[1].value, attribute_Deprecated_func_isDisabled_0_arg1_str); + attribute_Deprecated_func_isDisabled_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); return class_entry; } @@ -1514,12 +1514,12 @@ static zend_class_entry *register_class_ReflectionMethod(zend_class_entry *class zend_declare_typed_property(class_entry, ZSTR_KNOWN(ZEND_STR_CLASS), &property_class_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING)); - zend_attribute *attribute_Deprecated_func_setaccessible_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setaccessible", sizeof("setaccessible") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); - ZVAL_STR(&attribute_Deprecated_func_setaccessible_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_5)); - attribute_Deprecated_func_setaccessible_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); - zend_string *attribute_Deprecated_func_setaccessible_0_arg1_str = zend_string_init("as it has no effect since PHP 8.1", strlen("as it has no effect since PHP 8.1"), 1); - ZVAL_STR(&attribute_Deprecated_func_setaccessible_0->args[1].value, attribute_Deprecated_func_setaccessible_0_arg1_str); - attribute_Deprecated_func_setaccessible_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + zend_attribute *attribute_Deprecated_func_setAccessible_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setAccessible", sizeof("setAccessible") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + ZVAL_STR(&attribute_Deprecated_func_setAccessible_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_5)); + attribute_Deprecated_func_setAccessible_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zend_string *attribute_Deprecated_func_setAccessible_0_arg1_str = zend_string_init("as it has no effect since PHP 8.1", strlen("as it has no effect since PHP 8.1"), 1); + ZVAL_STR(&attribute_Deprecated_func_setAccessible_0->args[1].value, attribute_Deprecated_func_setAccessible_0_arg1_str); + attribute_Deprecated_func_setAccessible_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); return class_entry; } @@ -1679,12 +1679,12 @@ static zend_class_entry *register_class_ReflectionProperty(zend_class_entry *cla zend_declare_typed_property(class_entry, ZSTR_KNOWN(ZEND_STR_CLASS), &property_class_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING)); - zend_attribute *attribute_Deprecated_func_setaccessible_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setaccessible", sizeof("setaccessible") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); - ZVAL_STR(&attribute_Deprecated_func_setaccessible_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_5)); - attribute_Deprecated_func_setaccessible_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); - zend_string *attribute_Deprecated_func_setaccessible_0_arg1_str = zend_string_init("as it has no effect since PHP 8.1", strlen("as it has no effect since PHP 8.1"), 1); - ZVAL_STR(&attribute_Deprecated_func_setaccessible_0->args[1].value, attribute_Deprecated_func_setaccessible_0_arg1_str); - attribute_Deprecated_func_setaccessible_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + zend_attribute *attribute_Deprecated_func_setAccessible_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setAccessible", sizeof("setAccessible") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + ZVAL_STR(&attribute_Deprecated_func_setAccessible_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_5)); + attribute_Deprecated_func_setAccessible_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zend_string *attribute_Deprecated_func_setAccessible_0_arg1_str = zend_string_init("as it has no effect since PHP 8.1", strlen("as it has no effect since PHP 8.1"), 1); + ZVAL_STR(&attribute_Deprecated_func_setAccessible_0->args[1].value, attribute_Deprecated_func_setAccessible_0_arg1_str); + attribute_Deprecated_func_setAccessible_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); return class_entry; } @@ -1745,24 +1745,24 @@ static zend_class_entry *register_class_ReflectionParameter(zend_class_entry *cl zend_declare_typed_property(class_entry, ZSTR_KNOWN(ZEND_STR_NAME), &property_name_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING)); - zend_attribute *attribute_Deprecated_func_getclass_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "getclass", sizeof("getclass") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); - ZVAL_STR(&attribute_Deprecated_func_getclass_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); - attribute_Deprecated_func_getclass_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); - zend_string *attribute_Deprecated_func_getclass_0_arg1_str = zend_string_init("use ReflectionParameter::getType() instead", strlen("use ReflectionParameter::getType() instead"), 1); - ZVAL_STR(&attribute_Deprecated_func_getclass_0->args[1].value, attribute_Deprecated_func_getclass_0_arg1_str); - attribute_Deprecated_func_getclass_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - - zend_attribute *attribute_Deprecated_func_isarray_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "isarray", sizeof("isarray") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); - ZVAL_STR(&attribute_Deprecated_func_isarray_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); - attribute_Deprecated_func_isarray_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); - ZVAL_STR_COPY(&attribute_Deprecated_func_isarray_0->args[1].value, attribute_Deprecated_func_getclass_0_arg1_str); - attribute_Deprecated_func_isarray_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - - zend_attribute *attribute_Deprecated_func_iscallable_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "iscallable", sizeof("iscallable") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); - ZVAL_STR(&attribute_Deprecated_func_iscallable_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); - attribute_Deprecated_func_iscallable_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); - ZVAL_STR_COPY(&attribute_Deprecated_func_iscallable_0->args[1].value, attribute_Deprecated_func_getclass_0_arg1_str); - attribute_Deprecated_func_iscallable_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + zend_attribute *attribute_Deprecated_func_getClass_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "getClass", sizeof("getClass") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + ZVAL_STR(&attribute_Deprecated_func_getClass_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); + attribute_Deprecated_func_getClass_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zend_string *attribute_Deprecated_func_getClass_0_arg1_str = zend_string_init("use ReflectionParameter::getType() instead", strlen("use ReflectionParameter::getType() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_getClass_0->args[1].value, attribute_Deprecated_func_getClass_0_arg1_str); + attribute_Deprecated_func_getClass_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_func_isArray_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "isArray", sizeof("isArray") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + ZVAL_STR(&attribute_Deprecated_func_isArray_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); + attribute_Deprecated_func_isArray_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + ZVAL_STR_COPY(&attribute_Deprecated_func_isArray_0->args[1].value, attribute_Deprecated_func_getClass_0_arg1_str); + attribute_Deprecated_func_isArray_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_func_isCallable_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "isCallable", sizeof("isCallable") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + ZVAL_STR(&attribute_Deprecated_func_isCallable_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); + attribute_Deprecated_func_isCallable_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + ZVAL_STR_COPY(&attribute_Deprecated_func_isCallable_0->args[1].value, attribute_Deprecated_func_getClass_0_arg1_str); + attribute_Deprecated_func_isCallable_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); return class_entry; } diff --git a/ext/reflection/tests/009.phpt b/ext/reflection/tests/009.phpt index 8a57ed9d1d3b..dc48b0efe209 100644 --- a/ext/reflection/tests/009.phpt +++ b/ext/reflection/tests/009.phpt @@ -22,11 +22,11 @@ var_dump($func->isInternal()); echo "--isUserDefined--\n"; var_dump($func->isUserDefined()); echo "--getFilename--\n"; -var_dump($func->getFilename()); +var_dump($func->getFileName()); echo "--getStartline--\n"; -var_dump($func->getStartline()); +var_dump($func->getStartLine()); echo "--getEndline--\n"; -var_dump($func->getEndline()); +var_dump($func->getEndLine()); echo "--getDocComment--\n"; var_dump($func->getDocComment()); echo "--getStaticVariables--\n"; diff --git a/ext/reflection/tests/025.phpt b/ext/reflection/tests/025.phpt index 2e3316d3c0ac..c7097d4619f6 100644 --- a/ext/reflection/tests/025.phpt +++ b/ext/reflection/tests/025.phpt @@ -22,11 +22,11 @@ var_dump($func->isInternal()); echo "--isUserDefined--\n"; var_dump($func->isUserDefined()); echo "--getFilename--\n"; -var_dump($func->getFilename()); +var_dump($func->getFileName()); echo "--getStartline--\n"; -var_dump($func->getStartline()); +var_dump($func->getStartLine()); echo "--getEndline--\n"; -var_dump($func->getEndline()); +var_dump($func->getEndLine()); echo "--getDocComment--\n"; var_dump($func->getDocComment()); echo "--getStaticVariables--\n"; diff --git a/ext/reflection/tests/ReflectionClass_getExtensionName_basic.phpt b/ext/reflection/tests/ReflectionClass_getExtensionName_basic.phpt index f51dcac6d8ad..b088c637dc42 100644 --- a/ext/reflection/tests/ReflectionClass_getExtensionName_basic.phpt +++ b/ext/reflection/tests/ReflectionClass_getExtensionName_basic.phpt @@ -7,7 +7,7 @@ Rein Velt #testFest Roosendaal 2008-05-10 --FILE-- getExtensionName()) ; ?> --EXPECT-- diff --git a/ext/reflection/tests/ReflectionClass_getExtensionName_variation.phpt b/ext/reflection/tests/ReflectionClass_getExtensionName_variation.phpt index 4b4ed125a495..da93ebe95521 100644 --- a/ext/reflection/tests/ReflectionClass_getExtensionName_variation.phpt +++ b/ext/reflection/tests/ReflectionClass_getExtensionName_variation.phpt @@ -11,7 +11,7 @@ Rein Velt public $varX; public $varY; } - $rc=new reflectionClass('myClass'); + $rc=new ReflectionClass('myClass'); var_dump( $rc->getExtensionName()) ; ?> --EXPECT-- diff --git a/ext/reflection/tests/ReflectionClass_getExtension_basic.phpt b/ext/reflection/tests/ReflectionClass_getExtension_basic.phpt index 171a26b59c5b..26880c7e84a0 100644 --- a/ext/reflection/tests/ReflectionClass_getExtension_basic.phpt +++ b/ext/reflection/tests/ReflectionClass_getExtension_basic.phpt @@ -7,7 +7,7 @@ Rein Velt #testFest Roosendaal 2008-05-10 --FILE-- getExtension()) ; ?> --EXPECTF-- diff --git a/ext/reflection/tests/ReflectionClass_getExtension_variation.phpt b/ext/reflection/tests/ReflectionClass_getExtension_variation.phpt index b8a881f9b353..b45fd68d0d8d 100644 --- a/ext/reflection/tests/ReflectionClass_getExtension_variation.phpt +++ b/ext/reflection/tests/ReflectionClass_getExtension_variation.phpt @@ -11,7 +11,7 @@ Rein Velt public $varX; public $varY; } - $rc=new reflectionClass('myClass'); + $rc=new ReflectionClass('myClass'); var_dump( $rc->getExtension()) ; ?> --EXPECT-- diff --git a/ext/reflection/tests/ReflectionClass_getInterfaces_003.phpt b/ext/reflection/tests/ReflectionClass_getInterfaces_003.phpt index b5fbf59b4393..7f9ece624abb 100644 --- a/ext/reflection/tests/ReflectionClass_getInterfaces_003.phpt +++ b/ext/reflection/tests/ReflectionClass_getInterfaces_003.phpt @@ -7,7 +7,7 @@ Steve Seear Check for s(): "; var_dump($rc->getMethod("s")); echo " --> Check for F(): "; - var_dump($rc->getMethod("F")); + try { + var_dump($rc->getMethod("F")); + } catch (Exception $e) { + echo $e->getMessage() . "\n"; + } echo " --> Check for doesNotExist(): "; try { var_dump($rc->getMethod("doesNotExist")); @@ -59,12 +63,7 @@ Reflecting on class pubf: ["class"]=> string(4) "pubf" } - --> Check for F(): object(ReflectionMethod)#%d (2) { - ["name"]=> - string(1) "f" - ["class"]=> - string(4) "pubf" -} + --> Check for F(): Method pubf::F() does not exist --> Check for doesNotExist(): Method pubf::doesNotExist() does not exist Reflecting on class subpubf: --> Check for f(): object(ReflectionMethod)#%d (2) { @@ -79,12 +78,7 @@ Reflecting on class subpubf: ["class"]=> string(4) "pubf" } - --> Check for F(): object(ReflectionMethod)#%d (2) { - ["name"]=> - string(1) "f" - ["class"]=> - string(4) "pubf" -} + --> Check for F(): Method subpubf::F() does not exist --> Check for doesNotExist(): Method subpubf::doesNotExist() does not exist Reflecting on class protf: --> Check for f(): object(ReflectionMethod)#%d (2) { @@ -99,12 +93,7 @@ Reflecting on class protf: ["class"]=> string(5) "protf" } - --> Check for F(): object(ReflectionMethod)#%d (2) { - ["name"]=> - string(1) "f" - ["class"]=> - string(5) "protf" -} + --> Check for F(): Method protf::F() does not exist --> Check for doesNotExist(): Method protf::doesNotExist() does not exist Reflecting on class subprotf: --> Check for f(): object(ReflectionMethod)#%d (2) { @@ -119,12 +108,7 @@ Reflecting on class subprotf: ["class"]=> string(5) "protf" } - --> Check for F(): object(ReflectionMethod)#%d (2) { - ["name"]=> - string(1) "f" - ["class"]=> - string(5) "protf" -} + --> Check for F(): Method subprotf::F() does not exist --> Check for doesNotExist(): Method subprotf::doesNotExist() does not exist Reflecting on class privf: --> Check for f(): object(ReflectionMethod)#%d (2) { @@ -139,12 +123,7 @@ Reflecting on class privf: ["class"]=> string(5) "privf" } - --> Check for F(): object(ReflectionMethod)#%d (2) { - ["name"]=> - string(1) "f" - ["class"]=> - string(5) "privf" -} + --> Check for F(): Method privf::F() does not exist --> Check for doesNotExist(): Method privf::doesNotExist() does not exist Reflecting on class subprivf: --> Check for f(): object(ReflectionMethod)#%d (2) { @@ -159,10 +138,5 @@ Reflecting on class subprivf: ["class"]=> string(5) "privf" } - --> Check for F(): object(ReflectionMethod)#%d (2) { - ["name"]=> - string(1) "f" - ["class"]=> - string(5) "privf" -} + --> Check for F(): Method subprivf::F() does not exist --> Check for doesNotExist(): Method subprivf::doesNotExist() does not exist diff --git a/ext/reflection/tests/ReflectionClass_getProperty_001.phpt b/ext/reflection/tests/ReflectionClass_getProperty_001.phpt index e2e6e3ba3cbe..0e852ee424b9 100644 --- a/ext/reflection/tests/ReflectionClass_getProperty_001.phpt +++ b/ext/reflection/tests/ReflectionClass_getProperty_001.phpt @@ -34,25 +34,25 @@ foreach($classes as $class) { try { echo " --> Check for s: "; var_dump($rc->getProperty("s")); - } catch (exception $e) { + } catch (Exception $e) { echo $e->getMessage() . "\n"; } try { echo " --> Check for a: "; var_dump($rc->getProperty("a")); - } catch (exception $e) { + } catch (Exception $e) { echo $e->getMessage() . "\n"; } try { echo " --> Check for A: "; var_dump($rc->getProperty("A")); - } catch (exception $e) { + } catch (Exception $e) { echo $e->getMessage() . "\n"; } try { echo " --> Check for doesNotExist: "; var_dump($rc->getProperty("doesNotExist")); - } catch (exception $e) { + } catch (Exception $e) { echo $e->getMessage() . "\n"; } diff --git a/ext/reflection/tests/ReflectionClass_getProperty_002.phpt b/ext/reflection/tests/ReflectionClass_getProperty_002.phpt index c2f8419a1ea7..c23b660ebee6 100644 --- a/ext/reflection/tests/ReflectionClass_getProperty_002.phpt +++ b/ext/reflection/tests/ReflectionClass_getProperty_002.phpt @@ -23,22 +23,22 @@ try { } try { var_dump($rc->getProperty(null)); -} catch (exception $e) { +} catch (Exception $e) { echo $e->getMessage() . "\n"; } try { var_dump($rc->getProperty(1)); -} catch (exception $e) { +} catch (Exception $e) { echo $e->getMessage() . "\n"; } try { var_dump($rc->getProperty(1.5)); -} catch (exception $e) { +} catch (Exception $e) { echo $e->getMessage() . "\n"; } try { var_dump($rc->getProperty(true)); -} catch (exception $e) { +} catch (Exception $e) { echo $e->getMessage() . "\n"; } try { diff --git a/ext/reflection/tests/ReflectionClass_getProperty_003.phpt b/ext/reflection/tests/ReflectionClass_getProperty_003.phpt index 8be2f4bf85b6..353e12ca728b 100644 --- a/ext/reflection/tests/ReflectionClass_getProperty_003.phpt +++ b/ext/reflection/tests/ReflectionClass_getProperty_003.phpt @@ -76,8 +76,8 @@ showInfo("B::pubC"); showInfo("B::protC"); showInfo("B::privC"); -showInfo("c::pubC"); -showInfo("c::PUBC"); +showInfo("C::pubC"); +showInfo("C::PUBC"); showInfo("C::pubC"); showInfo("C::protC"); showInfo("C::privC"); @@ -201,7 +201,7 @@ object(ReflectionProperty)#%d (2) { string(1) "B" } string(10) "privC in B" ---- (Reflecting on c::pubC) --- +--- (Reflecting on C::pubC) --- object(ReflectionProperty)#%d (2) { ["name"]=> string(4) "pubC" @@ -209,7 +209,7 @@ object(ReflectionProperty)#%d (2) { string(1) "C" } string(9) "pubC in C" ---- (Reflecting on c::PUBC) --- +--- (Reflecting on C::PUBC) --- Property C::$PUBC does not exist --- (Reflecting on C::pubC) --- object(ReflectionProperty)#%d (2) { diff --git a/ext/reflection/tests/ReflectionClass_getProperty_004.phpt b/ext/reflection/tests/ReflectionClass_getProperty_004.phpt index 6a4f44ee5977..977c6ef28158 100644 --- a/ext/reflection/tests/ReflectionClass_getProperty_004.phpt +++ b/ext/reflection/tests/ReflectionClass_getProperty_004.phpt @@ -80,8 +80,8 @@ showInfo("B::pubC"); showInfo("B::protC"); showInfo("B::privC"); -showInfo("c::pubC"); -showInfo("c::PUBC"); +showInfo("C::pubC"); +showInfo("C::PUBC"); showInfo("C::pubC"); showInfo("C::protC"); showInfo("C::privC"); @@ -205,7 +205,7 @@ object(ReflectionProperty)#%d (2) { string(1) "B" } string(10) "privC in B" ---- (Reflecting on c::pubC) --- +--- (Reflecting on C::pubC) --- object(ReflectionProperty)#%d (2) { ["name"]=> string(4) "pubC" @@ -213,7 +213,7 @@ object(ReflectionProperty)#%d (2) { string(1) "C" } string(9) "pubC in C" ---- (Reflecting on c::PUBC) --- +--- (Reflecting on C::PUBC) --- Property C::$PUBC does not exist --- (Reflecting on C::pubC) --- object(ReflectionProperty)#%d (2) { diff --git a/ext/reflection/tests/ReflectionClass_hasMethod_001.phpt b/ext/reflection/tests/ReflectionClass_hasMethod_001.phpt index d987897a6e5c..5ee00030f098 100644 --- a/ext/reflection/tests/ReflectionClass_hasMethod_001.phpt +++ b/ext/reflection/tests/ReflectionClass_hasMethod_001.phpt @@ -45,31 +45,31 @@ foreach($classes as $class) { Reflecting on class pubf: --> Check for f(): bool(true) --> Check for s(): bool(true) - --> Check for F(): bool(true) + --> Check for F(): bool(false) --> Check for doesNotExist(): bool(false) Reflecting on class subpubf: --> Check for f(): bool(true) --> Check for s(): bool(true) - --> Check for F(): bool(true) + --> Check for F(): bool(false) --> Check for doesNotExist(): bool(false) Reflecting on class protf: --> Check for f(): bool(true) --> Check for s(): bool(true) - --> Check for F(): bool(true) + --> Check for F(): bool(false) --> Check for doesNotExist(): bool(false) Reflecting on class subprotf: --> Check for f(): bool(true) --> Check for s(): bool(true) - --> Check for F(): bool(true) + --> Check for F(): bool(false) --> Check for doesNotExist(): bool(false) Reflecting on class privf: --> Check for f(): bool(true) --> Check for s(): bool(true) - --> Check for F(): bool(true) + --> Check for F(): bool(false) --> Check for doesNotExist(): bool(false) Reflecting on class subprivf: --> Check for f(): bool(true) --> Check for s(): bool(true) - --> Check for F(): bool(true) + --> Check for F(): bool(false) --> Check for doesNotExist(): bool(false) diff --git a/ext/reflection/tests/ReflectionClass_hasMethod_basic.phpt b/ext/reflection/tests/ReflectionClass_hasMethod_basic.phpt index d3ce9155a92b..c93ff2578d7b 100644 --- a/ext/reflection/tests/ReflectionClass_hasMethod_basic.phpt +++ b/ext/reflection/tests/ReflectionClass_hasMethod_basic.phpt @@ -54,4 +54,4 @@ bool(true) bool(true) bool(true) bool(false) -bool(true) +bool(false) diff --git a/ext/reflection/tests/ReflectionClass_isCloneable_001.phpt b/ext/reflection/tests/ReflectionClass_isCloneable_001.phpt index bde3a60a1e7f..ed28701f1b41 100644 --- a/ext/reflection/tests/ReflectionClass_isCloneable_001.phpt +++ b/ext/reflection/tests/ReflectionClass_isCloneable_001.phpt @@ -38,19 +38,19 @@ var_dump($obj->isCloneable()); $h = clone $closure; print "Internal class - SimpleXMLElement\n"; -$obj = new ReflectionClass('simplexmlelement'); +$obj = new ReflectionClass('SimpleXMLElement'); var_dump($obj->isCloneable()); -$obj = new ReflectionObject(new simplexmlelement('')); +$obj = new ReflectionObject(new SimpleXMLElement('')); var_dump($obj->isCloneable()); -$h = clone new simplexmlelement(''); +$h = clone new SimpleXMLElement(''); print "Internal class - XMLWriter\n"; -$obj = new ReflectionClass('xmlwriter'); +$obj = new ReflectionClass('XMLWriter'); var_dump($obj->isCloneable()); $obj = new ReflectionObject(new XMLWriter); var_dump($obj->isCloneable()); try { - $h = clone new xmlwriter; + $h = clone new XMLWriter; } catch (Throwable $e) { echo $e::class, ": ", $e->getMessage(), PHP_EOL; } diff --git a/ext/reflection/tests/ReflectionClass_isInstantiable_basic.phpt b/ext/reflection/tests/ReflectionClass_isInstantiable_basic.phpt index 3bc79b3e7919..122792960899 100644 --- a/ext/reflection/tests/ReflectionClass_isInstantiable_basic.phpt +++ b/ext/reflection/tests/ReflectionClass_isInstantiable_basic.phpt @@ -1,5 +1,5 @@ --TEST-- -ReflectionClass::IsInstantiable() +ReflectionClass::isInstantiable() --FILE-- IsInstantiable()); + var_dump($reflectionClass->isInstantiable()); } diff --git a/ext/reflection/tests/ReflectionClass_isInstantiable_variation.phpt b/ext/reflection/tests/ReflectionClass_isInstantiable_variation.phpt index cdfaf911e408..ef306db292d7 100644 --- a/ext/reflection/tests/ReflectionClass_isInstantiable_variation.phpt +++ b/ext/reflection/tests/ReflectionClass_isInstantiable_variation.phpt @@ -1,5 +1,5 @@ --TEST-- -ReflectionClass::IsInstantiable() +ReflectionClass::isInstantiable() --FILE-- IsInstantiable()); + var_dump($reflectionClass->isInstantiable()); } ?> diff --git a/ext/reflection/tests/ReflectionClass_isIterateable_variation1.phpt b/ext/reflection/tests/ReflectionClass_isIterateable_variation1.phpt index 839867893a1b..85296751486c 100644 --- a/ext/reflection/tests/ReflectionClass_isIterateable_variation1.phpt +++ b/ext/reflection/tests/ReflectionClass_isIterateable_variation1.phpt @@ -14,7 +14,7 @@ function dump_iterateable($obj) } $basicClass = new BasicClass(); -$stdClass = new StdClass(); +$stdClass = new stdClass(); dump_iterateable($basicClass); dump_iterateable($stdClass); diff --git a/ext/reflection/tests/ReflectionClass_newInstanceWithoutConstructor.phpt b/ext/reflection/tests/ReflectionClass_newInstanceWithoutConstructor.phpt index 59337f09e8b4..97350d2804d0 100644 --- a/ext/reflection/tests/ReflectionClass_newInstanceWithoutConstructor.phpt +++ b/ext/reflection/tests/ReflectionClass_newInstanceWithoutConstructor.phpt @@ -15,7 +15,7 @@ class Foo $class = new ReflectionClass('Foo'); var_dump($class->newInstanceWithoutConstructor()); -$class = new ReflectionClass('StdClass'); +$class = new ReflectionClass('stdClass'); var_dump($class->newInstanceWithoutConstructor()); $class = new ReflectionClass('DateTime'); diff --git a/ext/reflection/tests/ReflectionMethod_getClosure_basic.phpt b/ext/reflection/tests/ReflectionMethod_getClosure_basic.phpt index 75810c01059b..d751558c3d15 100644 --- a/ext/reflection/tests/ReflectionMethod_getClosure_basic.phpt +++ b/ext/reflection/tests/ReflectionMethod_getClosure_basic.phpt @@ -25,7 +25,7 @@ class Example $class = new ReflectionClass( 'Example' ); $staticclass = new ReflectionClass( 'StaticExample' ); $object = new Example(); -$fakeobj = new StdClass(); +$fakeobj = new stdClass(); $method = $staticclass->getMethod( 'foo' ); diff --git a/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt b/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt index 0dc24897a345..3a3b13898e97 100644 --- a/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt +++ b/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt @@ -27,7 +27,7 @@ $staticclass = new ReflectionClass( 'StaticExample' ); $method = $class->getMethod( 'foo' ); $staticmethod = $staticclass->getMethod( 'foo' ); $object = new Example(); -$fakeobj = new StdClass(); +$fakeobj = new stdClass(); echo "\n-- Testing ReflectionMethod::getClosure() function with invalid object --\n"; try { diff --git a/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt b/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt index e66ec7393794..190dca5a9988 100644 --- a/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt +++ b/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt @@ -4,7 +4,7 @@ ReflectionMethod::getModifiers() getMethods(); foreach ($methodArray as $method) { @@ -52,7 +52,7 @@ class TestClass public function __isset($a) {} - public function __tostring() {} + public function __toString() {} public function __sleep() {} @@ -154,7 +154,7 @@ Modifiers for method TestClass::__isset(): 0x00000001 -Modifiers for method TestClass::__tostring(): +Modifiers for method TestClass::__toString(): 0x00000001 @@ -242,7 +242,7 @@ Modifiers for method TestClass::__isset(): 0x00000001 -Modifiers for method TestClass::__tostring(): +Modifiers for method TestClass::__toString(): 0x00000001 diff --git a/ext/reflection/tests/ReflectionMethod_tentative_return_type.phpt b/ext/reflection/tests/ReflectionMethod_tentative_return_type.phpt index 05d18084f210..4da80ba36a95 100644 --- a/ext/reflection/tests/ReflectionMethod_tentative_return_type.phpt +++ b/ext/reflection/tests/ReflectionMethod_tentative_return_type.phpt @@ -23,7 +23,7 @@ function printInfo(ReflectionMethod $methodInfo) { printInfo(new ReflectionMethod(DateTimeZone::class, 'listIdentifiers')); printInfo(new ReflectionMethod(MyDateTimeZone::class, 'listIdentifiers')); -printInfo(new ReflectionMethod(FileSystemIterator::class, 'current')); +printInfo(new ReflectionMethod(FilesystemIterator::class, 'current')); ?> --EXPECTF-- diff --git a/ext/reflection/tests/ReflectionObject_FileInfo_basic.phpt b/ext/reflection/tests/ReflectionObject_FileInfo_basic.phpt index 82c68bbabe24..309435ab339f 100644 --- a/ext/reflection/tests/ReflectionObject_FileInfo_basic.phpt +++ b/ext/reflection/tests/ReflectionObject_FileInfo_basic.phpt @@ -7,7 +7,7 @@ var_dump($rc->getFileName()); var_dump($rc->getStartLine()); var_dump($rc->getEndLine()); -$rc = new ReflectionObject(new stdclass); +$rc = new ReflectionObject(new stdClass); var_dump($rc->getFileName()); var_dump($rc->getStartLine()); var_dump($rc->getEndLine()); diff --git a/ext/reflection/tests/ReflectionObject___toString_basic1.phpt b/ext/reflection/tests/ReflectionObject___toString_basic1.phpt index 9da648f3a2b3..478b5653494d 100644 --- a/ext/reflection/tests/ReflectionObject___toString_basic1.phpt +++ b/ext/reflection/tests/ReflectionObject___toString_basic1.phpt @@ -6,7 +6,7 @@ ReflectionObject::__toString() : very basic test with no dynamic properties class Foo { public $bar = 1; } -$f = new foo; +$f = new Foo; echo new ReflectionObject($f); diff --git a/ext/reflection/tests/ReflectionObject___toString_basic2.phpt b/ext/reflection/tests/ReflectionObject___toString_basic2.phpt index 4d0a48d91131..60863b980d0b 100644 --- a/ext/reflection/tests/ReflectionObject___toString_basic2.phpt +++ b/ext/reflection/tests/ReflectionObject___toString_basic2.phpt @@ -7,7 +7,7 @@ ReflectionObject::__toString() : very basic test with dynamic properties class Foo { public $bar = 1; } -$f = new foo; +$f = new Foo; $f->dynProp = 'hello'; $f->dynProp2 = 'hello again'; echo new ReflectionObject($f); diff --git a/ext/reflection/tests/ReflectionObject_isInstantiable_basic.phpt b/ext/reflection/tests/ReflectionObject_isInstantiable_basic.phpt index 1b30debc9d5e..8b3c731d875b 100644 --- a/ext/reflection/tests/ReflectionObject_isInstantiable_basic.phpt +++ b/ext/reflection/tests/ReflectionObject_isInstantiable_basic.phpt @@ -1,5 +1,5 @@ --TEST-- -ReflectionObject::IsInstantiable() - basic function test +ReflectionObject::isInstantiable() - basic function test --FILE-- IsInstantiable()); + var_dump($ro->isInstantiable()); } ?> --EXPECT-- diff --git a/ext/reflection/tests/ReflectionObject_isInstantiable_variation.phpt b/ext/reflection/tests/ReflectionObject_isInstantiable_variation.phpt index dada6ffc789b..a947c517b2bd 100644 --- a/ext/reflection/tests/ReflectionObject_isInstantiable_variation.phpt +++ b/ext/reflection/tests/ReflectionObject_isInstantiable_variation.phpt @@ -1,5 +1,5 @@ --TEST-- -ReflectionObject::IsInstantiable() - variation - constructors +ReflectionObject::isInstantiable() - variation - constructors --FILE-- getName(); echo "Is $name instantiable? "; - var_dump($reflectionObject->IsInstantiable()); + var_dump($reflectionObject->isInstantiable()); } ?> --EXPECT-- diff --git a/ext/reflection/tests/bug26695.phpt b/ext/reflection/tests/bug26695.phpt index b87bf8baf6bb..b8409875f739 100644 --- a/ext/reflection/tests/bug26695.phpt +++ b/ext/reflection/tests/bug26695.phpt @@ -7,11 +7,11 @@ class Foo { } class Bar { - function demo(foo $f) { + function demo(Foo $f) { } } -$class = new ReflectionClass('bar'); +$class = new ReflectionClass('Bar'); $methods = $class->getMethods(); $params = $methods[0]->getParameters(); diff --git a/ext/reflection/tests/bug29268.phpt b/ext/reflection/tests/bug29268.phpt index d4750d6246f1..bdd501a0ca4c 100644 --- a/ext/reflection/tests/bug29268.phpt +++ b/ext/reflection/tests/bug29268.phpt @@ -12,7 +12,7 @@ class B{ } } -$ref = new reflectionMethod('B','doit'); +$ref = new ReflectionMethod('B','doit'); $parameters = $ref->getParameters(); foreach($parameters as $parameter) { diff --git a/ext/reflection/tests/bug36434.phpt b/ext/reflection/tests/bug36434.phpt index 3f4cc70c7554..e05f17636f16 100644 --- a/ext/reflection/tests/bug36434.phpt +++ b/ext/reflection/tests/bug36434.phpt @@ -20,7 +20,7 @@ class foo extends ancestor } $r = new ReflectionClass('foo'); -foreach ($r->GetProperties() as $p) +foreach ($r->getProperties() as $p) { echo $p->getName(). " ". $p->getDeclaringClass()->getName()."\n"; } diff --git a/ext/reflection/tests/bug46064.phpt b/ext/reflection/tests/bug46064.phpt index 49d3760941e2..50d664c384ed 100644 --- a/ext/reflection/tests/bug46064.phpt +++ b/ext/reflection/tests/bug46064.phpt @@ -12,7 +12,7 @@ $o = new x; $o->z = 1000; $o->zzz = 3; -var_dump($h = new reflectionproperty($o, 'z')); +var_dump($h = new ReflectionProperty($o, 'z')); var_dump($h->isDefault()); var_dump($h->isPublic()); var_dump($h->isStatic()); @@ -22,12 +22,12 @@ var_dump($h->getValue($o)); print "---------------------------\n"; try { - var_dump(new reflectionproperty($o, 'zz')); + var_dump(new ReflectionProperty($o, 'zz')); } catch (Exception $e) { var_dump($e->getMessage()); } -var_dump(new reflectionproperty($o, 'zzz')); +var_dump(new ReflectionProperty($o, 'zzz')); class test { protected $a = 1; @@ -39,7 +39,7 @@ class bar extends test { $this->foobar = 2; $this->a = 200; - $p = new reflectionproperty($this, 'foobar'); + $p = new ReflectionProperty($this, 'foobar'); var_dump($p->getValue($this), $p->isDefault(), $p->isPublic()); } } diff --git a/ext/reflection/tests/bug46064_2.phpt b/ext/reflection/tests/bug46064_2.phpt index f2af7b475fcb..a3ff8072dd98 100644 --- a/ext/reflection/tests/bug46064_2.phpt +++ b/ext/reflection/tests/bug46064_2.phpt @@ -28,7 +28,7 @@ class test extends bar { public function __construct() { parent::__construct(); - $p = new reflectionobject($this); + $p = new ReflectionObject($this); var_dump($h = $p->getProperty('a')); var_dump($h->isDefault(), $h->isProtected(), $h->isPrivate(), $h->isPublic(), $h->isStatic()); var_dump($p->getProperties()); diff --git a/ext/reflection/tests/bug49719.phpt b/ext/reflection/tests/bug49719.phpt index 1a0ffca4bd2d..f00cf195bc5c 100644 --- a/ext/reflection/tests/bug49719.phpt +++ b/ext/reflection/tests/bug49719.phpt @@ -32,7 +32,7 @@ class B2 extends A2 { $b2 = new ReflectionClass('B2'); $prop = $b2->getProperty('a'); -var_dump($prop->getValue(new b2)); +var_dump($prop->getValue(new B2)); ?> --EXPECT-- diff --git a/ext/reflection/tests/bug52057.phpt b/ext/reflection/tests/bug52057.phpt index b807035718b2..f2b84993e634 100644 --- a/ext/reflection/tests/bug52057.phpt +++ b/ext/reflection/tests/bug52057.phpt @@ -5,7 +5,7 @@ Bug #52057 (ReflectionClass fails on Closure class) $closure = function($a) { echo $a; }; -$reflection = new ReflectionClass('closure'); +$reflection = new ReflectionClass('Closure'); var_dump($reflection->hasMethod('__invoke')); // true $reflection = new ReflectionClass($closure); @@ -14,7 +14,7 @@ var_dump($reflection->hasMethod('__invoke')); // true $reflection = new ReflectionObject($closure); var_dump($reflection->hasMethod('__invoke')); // true -$reflection = new ReflectionClass('closure'); +$reflection = new ReflectionClass('Closure'); var_dump($h = $reflection->getMethod('__invoke')); // true var_dump($h->class.'::'.$h->getName()); diff --git a/ext/reflection/tests/bug60367.phpt b/ext/reflection/tests/bug60367.phpt index 191b28a09d7d..b1b7a1958be7 100644 --- a/ext/reflection/tests/bug60367.phpt +++ b/ext/reflection/tests/bug60367.phpt @@ -18,7 +18,7 @@ class B extends A { } -$method = ReflectionMethod::createFromMethodName("b::call"); +$method = ReflectionMethod::createFromMethodName("B::call"); $method->invoke(null); $method->invokeArgs(null, array()); $method = ReflectionMethod::createFromMethodName("A::call"); diff --git a/ext/reflection/tests/types/dnf_types.phpt b/ext/reflection/tests/types/dnf_types.phpt index 46f3ab0f55f1..03a4e55d247d 100644 --- a/ext/reflection/tests/types/dnf_types.phpt +++ b/ext/reflection/tests/types/dnf_types.phpt @@ -31,12 +31,12 @@ dumpType($rp->getType()); /* Force CE resolution of the property type */ -interface y {} -class x implements Y, Countable { +interface Y {} +class X implements Y, Countable { public function count(): int { return 0; } } $test = new Test; -$test->prop = new x; +$test->prop = new X; $rp = $rc->getProperty('prop'); dumpType($rp->getType()); diff --git a/ext/reflection/tests/types/dnf_types_with_null.phpt b/ext/reflection/tests/types/dnf_types_with_null.phpt index ade219939958..8c244fa3c699 100644 --- a/ext/reflection/tests/types/dnf_types_with_null.phpt +++ b/ext/reflection/tests/types/dnf_types_with_null.phpt @@ -31,12 +31,12 @@ dumpType($rp->getType()); /* Force CE resolution of the property type */ -interface y {} -class x implements Y, Countable { +interface Y {} +class X implements Y, Countable { public function count(): int { return 0; } } $test = new Test; -$test->prop = new x; +$test->prop = new X; $rp = $rc->getProperty('prop'); dumpType($rp->getType()); diff --git a/ext/reflection/tests/types/intersection_types.phpt b/ext/reflection/tests/types/intersection_types.phpt index 4ee3ac637957..2f4db46c64f9 100644 --- a/ext/reflection/tests/types/intersection_types.phpt +++ b/ext/reflection/tests/types/intersection_types.phpt @@ -27,12 +27,12 @@ dumpType($rp->getType()); /* Force CE resolution of the property type */ -interface y {} -class x implements Y, Countable { +interface Y {} +class X implements Y, Countable { public function count(): int { return 0; } } $test = new Test; -$test->prop = new x; +$test->prop = new X; $rp = $rc->getProperty('prop'); dumpType($rp->getType()); diff --git a/ext/reflection/tests/types/union_types.phpt b/ext/reflection/tests/types/union_types.phpt index 22de6b8dfe40..b851c3eb6c90 100644 --- a/ext/reflection/tests/types/union_types.phpt +++ b/ext/reflection/tests/types/union_types.phpt @@ -46,15 +46,15 @@ dumpType($rp->getType()); /* Force CE resolution of the property type */ -class x {} +class X {} $test = new Test; -$test->prop = new x; +$test->prop = new X; $rp = $rc->getProperty('prop'); dumpType($rp->getType()); -class y {} -$test->prop = new y; +class Y {} +$test->prop = new Y; $rp = $rc->getProperty('prop'); dumpType($rp->getType()); diff --git a/ext/session/session.c b/ext/session/session.c index 1fdfc5d1073f..ed22a72128f6 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -2141,25 +2141,20 @@ PHP_FUNCTION(session_set_save_handler) /* First release old handlers */ SESSION_RELEASE_USER_HANDLER_OO(ps_validate_sid); SESSION_RELEASE_USER_HANDLER_OO(ps_update_timestamp); - /* Method names need to be lowercase */ - zend_string *validate_sid_name = ZSTR_INIT_LITERAL("validateid", false); - zend_string *update_timestamp_name = ZSTR_INIT_LITERAL("updatetimestamp", false); + zend_string *validate_sid_name = ZSTR_INIT_LITERAL("validateId", false); + zend_string *update_timestamp_name = ZSTR_INIT_LITERAL("updateTimestamp", false); if (instanceof_function(Z_OBJCE_P(obj), php_session_update_timestamp_iface_entry)) { /* Validate ID handler */ SESSION_SET_USER_HANDLER_OO(ps_validate_sid, zend_string_copy(validate_sid_name)); /* Update Timestamp handler */ - /* We need to provide a new string with the correct casing so that error messages work */ - SESSION_SET_USER_HANDLER_OO(ps_update_timestamp, ZSTR_INIT_LITERAL("updateTimestamp", false)); + SESSION_SET_USER_HANDLER_OO(ps_update_timestamp, zend_string_copy(update_timestamp_name)); } else { /* For BC reasons we accept methods even if the class does not implement the interface */ if (zend_hash_find_ptr(object_methods, validate_sid_name)) { - /* For BC reasons we accept methods even if the class does not implement the interface */ SESSION_SET_USER_HANDLER_OO(ps_validate_sid, zend_string_copy(validate_sid_name)); } if (zend_hash_find_ptr(object_methods, update_timestamp_name)) { - /* For BC reasons we accept methods even if the class does not implement the interface */ - /* We need to provide a new string with the correct casing so that error messages work */ - SESSION_SET_USER_HANDLER_OO(ps_update_timestamp, ZSTR_INIT_LITERAL("updateTimestamp", false)); + SESSION_SET_USER_HANDLER_OO(ps_update_timestamp, zend_string_copy(update_timestamp_name)); } } zend_string_release_ex(validate_sid_name, false); diff --git a/ext/session/tests/user_session_module/save_handler.inc b/ext/session/tests/user_session_module/save_handler.inc index 43475d33b802..99ce8734b03c 100644 --- a/ext/session/tests/user_session_module/save_handler.inc +++ b/ext/session/tests/user_session_module/save_handler.inc @@ -1,6 +1,6 @@
'; -$sxe = new SimpleXmlElement($str); +$sxe = new SimpleXMLElement($str); var_dump($sxe instanceof Countable); ?> --EXPECT-- diff --git a/ext/simplexml/tests/bug38406.phpt b/ext/simplexml/tests/bug38406.phpt index 41f2df7aaf60..c3bcc7394988 100644 --- a/ext/simplexml/tests/bug38406.phpt +++ b/ext/simplexml/tests/bug38406.phpt @@ -15,7 +15,7 @@ var_dump($item->otherAttribute); $a = array(); try { - $item->$a = new stdclass; + $item->$a = new stdClass; } catch (TypeError $exception) { echo $exception->getMessage() . "\n"; } diff --git a/ext/simplexml/tests/bug41175.phpt b/ext/simplexml/tests/bug41175.phpt index 2f887963d00f..48d61436dae6 100644 --- a/ext/simplexml/tests/bug41175.phpt +++ b/ext/simplexml/tests/bug41175.phpt @@ -5,7 +5,7 @@ simplexml --FILE-- "); +$xml = new SimpleXMLElement(""); $xml->addAttribute("src", "foo"); $xml->addAttribute("alt", ""); echo $xml->asXML(); diff --git a/ext/simplexml/tests/bug41582.phpt b/ext/simplexml/tests/bug41582.phpt index f611310485d7..bd7ac44e02f9 100644 --- a/ext/simplexml/tests/bug41582.phpt +++ b/ext/simplexml/tests/bug41582.phpt @@ -10,7 +10,7 @@ $xml = new SimpleXMLElement(' $xml->movie[]->characters->character[0]->name = 'Miss Coder'; -echo($xml->asXml()); +echo($xml->asXML()); ?> --EXPECT-- diff --git a/ext/simplexml/tests/bug43221.phpt b/ext/simplexml/tests/bug43221.phpt index 4958829250a0..f1faceafcf25 100644 --- a/ext/simplexml/tests/bug43221.phpt +++ b/ext/simplexml/tests/bug43221.phpt @@ -9,7 +9,7 @@ $n = $xml->addChild("node", "value"); $n->addAttribute("a", "b"); $n->addAttribute("c", "d", "http://bar.com"); $n->addAttribute("foo:e", "f", "http://bar.com"); -print_r($xml->asXml()); +print_r($xml->asXML()); ?> --EXPECTF-- Warning: SimpleXMLElement::addAttribute(): Attribute requires prefix for namespace in %sbug43221.php on line %d diff --git a/ext/simplexml/tests/bug44478.phpt b/ext/simplexml/tests/bug44478.phpt index 211db36a2db4..c80acb0ae9f3 100644 --- a/ext/simplexml/tests/bug44478.phpt +++ b/ext/simplexml/tests/bug44478.phpt @@ -4,7 +4,7 @@ Bug #44478 (Inconsistent behaviour when assigning new nodes) simplexml --FILE--
'); +$xml_element = new SimpleXMLElement(''); $xml_element->node1 = 'a & b'; print $xml_element->node1."\n"; $xml_element->node1 = 'a & b'; diff --git a/ext/simplexml/tests/bug55098.phpt b/ext/simplexml/tests/bug55098.phpt index 71c8b424ecdc..69dd5b733932 100644 --- a/ext/simplexml/tests/bug55098.phpt +++ b/ext/simplexml/tests/bug55098.phpt @@ -17,7 +17,7 @@ function test($nodes, $name, $callable) { } } -test($nodes, "asXml", fn ($n) => $n->asXml()); +test($nodes, "asXml", fn ($n) => $n->asXML()); test($nodes, "attributes", fn ($n) => $n->attributes()); test($nodes, "children", fn ($n) => $n->children()); test($nodes, "getNamespaces", fn ($n) => $n->getNamespaces()); diff --git a/ext/simplexml/tests/bug63575.phpt b/ext/simplexml/tests/bug63575.phpt index 315d9b9a0f8b..1e6ad4740c04 100644 --- a/ext/simplexml/tests/bug63575.phpt +++ b/ext/simplexml/tests/bug63575.phpt @@ -6,11 +6,11 @@ simplexml '; -$o1 = new SimpleXMlElement($xml); +$o1 = new SimpleXMLElement($xml); $o2 = clone $o1; $r = current($o2->xpath('/a')); -$r->addChild('c', new SimpleXMlElement('')); +$r->addChild('c', new SimpleXMLElement('')); echo $o1->asXML(), PHP_EOL, $o2->asXML(); ?> diff --git a/ext/simplexml/tests/simplexml_import_new_dom.phpt b/ext/simplexml/tests/simplexml_import_new_dom.phpt index 4e205bd59012..78428e318280 100644 --- a/ext/simplexml/tests/simplexml_import_new_dom.phpt +++ b/ext/simplexml/tests/simplexml_import_new_dom.phpt @@ -13,7 +13,7 @@ foreach ($books as $book) { } $s->book[0]->title = "test"; -echo $dom->saveXML(); +echo $dom->saveXml(); ?> --EXPECT-- diff --git a/ext/simplexml/tests/simplexml_import_old_dom.phpt b/ext/simplexml/tests/simplexml_import_old_dom.phpt index 26f30b368164..494f10a036e1 100644 --- a/ext/simplexml/tests/simplexml_import_old_dom.phpt +++ b/ext/simplexml/tests/simplexml_import_old_dom.phpt @@ -5,7 +5,7 @@ simplexml dom --FILE-- load(__DIR__."/book.xml"); if(!$dom) { echo "Error while parsing the document\n"; diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index 151fa811b0fa..7aae1a9c717b 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -437,8 +437,7 @@ static xmlNodePtr master_to_xml_int(encodePtr encode, zval *data, int style, xml ZEND_HASH_MAP_FOREACH_STR_KEY_VAL(SOAP_GLOBAL(class_map), type_name, tmp) { ZVAL_DEREF(tmp); if (Z_TYPE_P(tmp) == IS_STRING && - ZSTR_LEN(ce->name) == Z_STRLEN_P(tmp) && - zend_binary_strncasecmp(ZSTR_VAL(ce->name), ZSTR_LEN(ce->name), Z_STRVAL_P(tmp), ZSTR_LEN(ce->name), ZSTR_LEN(ce->name)) == 0 && + zend_string_equals_cstr(ce->name, Z_STRVAL_P(tmp), Z_STRLEN_P(tmp)) && type_name) { /* TODO: namespace isn't stored */ diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c index 07c5dbf4f12e..0fc75545b697 100644 --- a/ext/soap/php_sdl.c +++ b/ext/soap/php_sdl.c @@ -1094,13 +1094,13 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri) function->binding = tmpbinding; { + /* Operation names are stored in canonical case — XML names + * and PHP function names are case-sensitive. */ size_t function_name_len = strlen(function->functionName); - char *lc_function_name = zend_str_tolower_dup(function->functionName, function_name_len); - if (zend_hash_str_add_ptr(&ctx.sdl->functions, lc_function_name, function_name_len, function) == NULL) { + if (zend_hash_str_add_ptr(&ctx.sdl->functions, function->functionName, function_name_len, function) == NULL) { zend_hash_next_index_insert_ptr(&ctx.sdl->functions, function); } - efree(lc_function_name); if (function->requestName != NULL && strcmp(function->requestName,function->functionName) != 0) { if (ctx.sdl->requests == NULL) { @@ -1108,10 +1108,7 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri) zend_hash_init(ctx.sdl->requests, 0, NULL, NULL, 0); } - size_t request_name_len = strlen(function->requestName); - char *lc_request_name = zend_str_tolower_dup(function->requestName, request_name_len); - zend_hash_str_add_ptr(ctx.sdl->requests, lc_request_name, request_name_len, function); - efree(lc_request_name); + zend_hash_str_add_ptr(ctx.sdl->requests, function->requestName, strlen(function->requestName), function); } } trav2 = trav2->next; @@ -1150,7 +1147,7 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri) return ctx.sdl; } -#define WSDL_CACHE_VERSION 0x10 +#define WSDL_CACHE_VERSION 0x11 #define WSDL_CACHE_GET(ret,type,buf) memcpy(&ret,*buf,sizeof(type)); *buf += sizeof(type); #define WSDL_CACHE_GET_INT(ret,buf) ret = ((unsigned char)(*buf)[0])|((unsigned char)(*buf)[1]<<8)|((unsigned char)(*buf)[2]<<16)|((unsigned)(*buf)[3]<<24); *buf += 4; diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 83584283740d..7bea57cfc731 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -763,7 +763,7 @@ PHP_METHOD(SoapFault, __toString) line = zend_read_property_ex(soap_fault_class_entry, Z_OBJ_P(this_ptr), ZSTR_KNOWN(ZEND_STR_LINE), /* silent */ true, &rv4); zend_call_method_with_0_params( - Z_OBJ_P(ZEND_THIS), Z_OBJCE_P(ZEND_THIS), NULL, "gettraceasstring", &trace); + Z_OBJ_P(ZEND_THIS), Z_OBJCE_P(ZEND_THIS), NULL, "getTraceAsString", &trace); faultcode_val = zval_get_string(faultcode); faultstring_val = zval_get_string(faultstring); @@ -1219,28 +1219,24 @@ PHP_METHOD(SoapServer, addFunction) RETURN_THROWS(); } - key = zend_string_tolower(Z_STR_P(tmp_function)); + key = Z_STR_P(tmp_function); if ((f = zend_hash_find_ptr(EG(function_table), key)) == NULL) { - zend_string_release_ex(key, false); zend_type_error("SoapServer::addFunction(): Function \"%s\" not found", Z_STRVAL_P(tmp_function)); RETURN_THROWS(); } ZVAL_STR_COPY(&function_copy, f->common.function_name); zend_hash_update(service->soap_functions.ft, key, &function_copy); - - zend_string_release_ex(key, 0); } ZEND_HASH_FOREACH_END(); } } else if (Z_TYPE_P(function_name) == IS_STRING) { zend_string *key; zend_function *f; - key = zend_string_tolower(Z_STR_P(function_name)); + key = Z_STR_P(function_name); if ((f = zend_hash_find_ptr(EG(function_table), key)) == NULL) { - zend_string_release_ex(key, false); zend_argument_type_error(1, "must be a valid function name, function \"%s\" not found", Z_STRVAL_P(function_name)); RETURN_THROWS(); } @@ -1251,7 +1247,6 @@ PHP_METHOD(SoapServer, addFunction) ZVAL_STR_COPY(&function_copy, f->common.function_name); zend_hash_update(service->soap_functions.ft, key, &function_copy); - zend_string_release_ex(key, 0); } else if (Z_TYPE_P(function_name) == IS_LONG) { if (Z_LVAL_P(function_name) == SOAP_FUNCTIONS_ALL) { php_error_docref(NULL, E_DEPRECATED, "Enabling all functions via SOAP_FUNCTIONS_ALL is deprecated since 8.4, due to possible security concerns." @@ -1568,7 +1563,7 @@ PHP_METHOD(SoapServer, handle) } } #endif - if (zend_hash_find_ptr_lc(function_table, Z_STR(h->function_name)) != NULL || + if (zend_hash_find_ptr(function_table, Z_STR(h->function_name)) != NULL || ((service->type == SOAP_CLASS || service->type == SOAP_OBJECT) && zend_hash_str_exists(function_table, ZEND_CALL_FUNC_NAME, sizeof(ZEND_CALL_FUNC_NAME)-1))) { if (service->type == SOAP_CLASS || service->type == SOAP_OBJECT) { @@ -1606,7 +1601,7 @@ PHP_METHOD(SoapServer, handle) } } - if (zend_hash_find_ptr_lc(function_table, Z_STR(function_name)) != NULL || + if (zend_hash_find_ptr(function_table, Z_STR(function_name)) != NULL || ((service->type == SOAP_CLASS || service->type == SOAP_OBJECT) && zend_hash_str_exists(function_table, ZEND_CALL_FUNC_NAME, sizeof(ZEND_CALL_FUNC_NAME)-1))) { if (service->type == SOAP_CLASS || service->type == SOAP_OBJECT) { @@ -2288,7 +2283,7 @@ static bool do_request(zval *this_ptr, xmlDoc *request, const char *location, co ZVAL_COPY(Z_CLIENT_LAST_REQUEST_P(this_ptr), ¶ms[0]); } - zend_function *func = zend_hash_str_find_ptr(&Z_OBJCE_P(this_ptr)->function_table, ZEND_STRL("__dorequest")); + zend_function *func = zend_hash_str_find_ptr(&Z_OBJCE_P(this_ptr)->function_table, ZEND_STRL("__doRequest")); ZEND_ASSERT(func != NULL); zend_call_known_instance_method(func, Z_OBJ_P(this_ptr), response, 5, params); @@ -4299,9 +4294,9 @@ static sdlFunctionPtr get_function(sdlPtr sdl, const char *function_name, size_t sdlFunctionPtr tmp; if (sdl != NULL) { - if ((tmp = zend_hash_str_find_ptr_lc(&sdl->functions, function_name, function_name_length)) != NULL) { + if ((tmp = zend_hash_str_find_ptr(&sdl->functions, function_name, function_name_length)) != NULL) { return tmp; - } else if (sdl->requests != NULL && (tmp = zend_hash_str_find_ptr_lc(sdl->requests, function_name, function_name_length)) != NULL) { + } else if (sdl->requests != NULL && (tmp = zend_hash_str_find_ptr(sdl->requests, function_name, function_name_length)) != NULL) { return tmp; } } diff --git a/ext/soap/tests/bugs/bug28985.phpt b/ext/soap/tests/bugs/bug28985.phpt index 4b8bd423e329..214a48fad718 100644 --- a/ext/soap/tests/bugs/bug28985.phpt +++ b/ext/soap/tests/bugs/bug28985.phpt @@ -6,7 +6,7 @@ soap soap.wsdl_cache_enabled=0 --FILE-- 1)); +$client = new SoapClient(__DIR__.'/bug28985.wsdl', array('trace'=>1)); var_dump($client->__getTypes()); ?> --EXPECT-- diff --git a/ext/soap/tests/bugs/bug31422.phpt b/ext/soap/tests/bugs/bug31422.phpt index cce7d2aa0f14..5d00a1382532 100644 --- a/ext/soap/tests/bugs/bug31422.phpt +++ b/ext/soap/tests/bugs/bug31422.phpt @@ -14,7 +14,7 @@ function Add($x,$y) { } $server = new SoapServer(null,array('uri'=>"http://testuri.org")); -$server->addfunction("Add"); +$server->addFunction("Add"); $HTTP_RAW_POST_DATA = << diff --git a/ext/soap/tests/bugs/bug31755.phpt b/ext/soap/tests/bugs/bug31755.phpt index c4b2c622b6af..457fdef17330 100644 --- a/ext/soap/tests/bugs/bug31755.phpt +++ b/ext/soap/tests/bugs/bug31755.phpt @@ -15,12 +15,12 @@ $client = new MySoapClient(null, array( )); try { - new SOAPHeader('', 'foo', 'bar'); + new SoapHeader('', 'foo', 'bar'); } catch (ValueError $exception) { echo $exception->getMessage() . "\n"; } -$header = new SOAPHeader('namespace', 'foo', 'bar'); +$header = new SoapHeader('namespace', 'foo', 'bar'); $response= $client->__soapCall('function', array(), null, $header); print $client->__getLastRequest(); diff --git a/ext/soap/tests/bugs/bug36629.phpt b/ext/soap/tests/bugs/bug36629.phpt index 3b90ba6f45c4..ec704628a27c 100644 --- a/ext/soap/tests/bugs/bug36629.phpt +++ b/ext/soap/tests/bugs/bug36629.phpt @@ -11,8 +11,8 @@ function test2() { return new SoapFault("Server", "test2"); } -$server = new soapserver(null,array('uri'=>"http://testuri.org")); -$server->addfunction(array("test1","test2")); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->addFunction(array("test1","test2")); $HTTP_RAW_POST_DATA = << diff --git a/ext/soap/tests/bugs/bug41566.phpt b/ext/soap/tests/bugs/bug41566.phpt index 909be76c81cf..ff13f00640fe 100644 --- a/ext/soap/tests/bugs/bug41566.phpt +++ b/ext/soap/tests/bugs/bug41566.phpt @@ -22,8 +22,8 @@ Class User { public $sName; } -$server = new soapserver(null,array('uri'=>"http://testuri.org", 'soap_version'=>SOAP_1_2)); -$server->addfunction("test"); +$server = new SoapServer(null,array('uri'=>"http://testuri.org", 'soap_version'=>SOAP_1_2)); +$server->addFunction("test"); $HTTP_RAW_POST_DATA = << diff --git a/ext/soap/tests/bugs/bug48557.phpt b/ext/soap/tests/bugs/bug48557.phpt index 5c5671d240cd..35396887ffce 100644 --- a/ext/soap/tests/bugs/bug48557.phpt +++ b/ext/soap/tests/bugs/bug48557.phpt @@ -13,7 +13,7 @@ function test($map) { } $y = new SoapServer(__DIR__ . '/bug48557.wsdl'); -$y->addfunction("test"); +$y->addFunction("test"); $request = << diff --git a/ext/soap/tests/bugs/bug49169.phpt b/ext/soap/tests/bugs/bug49169.phpt index d0989add92bc..90f75acaeeaf 100644 --- a/ext/soap/tests/bugs/bug49169.phpt +++ b/ext/soap/tests/bugs/bug49169.phpt @@ -29,9 +29,9 @@ function test2($input) { return strlen($input); } -$server = new soapserver(__DIR__.'/bug49169.wsdl', []); -$server->addfunction("test"); -$server->addfunction("test2"); +$server = new SoapServer(__DIR__.'/bug49169.wsdl', []); +$server->addFunction("test"); +$server->addFunction("test2"); $_SERVER["HTTP_SOAPACTION"] = "#test"; $server->handle(); $_SERVER["HTTP_SOAPACTION"] = "#test2"; diff --git a/ext/soap/tests/bugs/bug50997.phpt b/ext/soap/tests/bugs/bug50997.phpt index 8d5756a3671f..ca8e0fe8d6a7 100644 --- a/ext/soap/tests/bugs/bug50997.phpt +++ b/ext/soap/tests/bugs/bug50997.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 1, 'exceptions'=>0)); $params = array('code'=>'foo'); -$soapClient->newOperation($params); +$soapClient->NewOperation($params); echo $soapClient->__getLastRequest(); ?> --EXPECT-- diff --git a/ext/soap/tests/bugs/bug55639.phpt b/ext/soap/tests/bugs/bug55639.phpt index 16d7f7a37719..72f6872c7483 100644 --- a/ext/soap/tests/bugs/bug55639.phpt +++ b/ext/soap/tests/bugs/bug55639.phpt @@ -31,7 +31,7 @@ PHP; php_cli_server_start($code, null, $args); -$client = new soapclient(NULL, [ +$client = new SoapClient(NULL, [ 'location' => 'http://' . PHP_CLI_SERVER_ADDRESS, 'uri' => 'misc-uri', 'authentication' => SOAP_AUTHENTICATION_DIGEST, diff --git a/ext/soap/tests/bugs/bug66112.phpt b/ext/soap/tests/bugs/bug66112.phpt index d0a353be8669..9e2e99b602e6 100644 --- a/ext/soap/tests/bugs/bug66112.phpt +++ b/ext/soap/tests/bugs/bug66112.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 array(array("type_ns"=>"uri:mist", "type_name"=>"A")))); + $client=new SoapClient(WSDL, array('typemap'=>array(array("type_ns"=>"uri:mist", "type_name"=>"A")))); try{ $client->Mist(array("XX"=>"xx")); }catch(SoapFault $x){ diff --git a/ext/soap/tests/bugs/bug70875.phpt b/ext/soap/tests/bugs/bug70875.phpt index 14aed578156b..ee54ce768f6e 100644 --- a/ext/soap/tests/bugs/bug70875.phpt +++ b/ext/soap/tests/bugs/bug70875.phpt @@ -7,7 +7,7 @@ soap.wsdl_cache_enabled=0 --FILE-- TestServiceRQ = new TestServiceRQ(); $r->TestServiceRQ->RqHeader = new RqHeader(); -$c->testService($r); +$c->TestService($r); ?> --EXPECT-- diff --git a/ext/soap/tests/bugs/bug73037.phpt b/ext/soap/tests/bugs/bug73037.phpt index 7a5b99776772..ed65f74bda14 100644 --- a/ext/soap/tests/bugs/bug73037.phpt +++ b/ext/soap/tests/bugs/bug73037.phpt @@ -67,7 +67,7 @@ if (php_ini_loaded_file()) { } $code = <<<'PHP' $s = new SoapServer(NULL, array('uri' => 'http://here')); -$s->setObject(new stdclass()); +$s->setObject(new stdClass()); $s->handle(); PHP; diff --git a/ext/soap/tests/bugs/bug73182.phpt b/ext/soap/tests/bugs/bug73182.phpt index 1e89f262101f..9e785a3e10cd 100644 --- a/ext/soap/tests/bugs/bug73182.phpt +++ b/ext/soap/tests/bugs/bug73182.phpt @@ -26,7 +26,7 @@ PHP; php_cli_server_start($code, null, $args); -$client = new soapclient(NULL, [ +$client = new SoapClient(NULL, [ 'location' => 'http://' . PHP_CLI_SERVER_ADDRESS, 'uri' => 'misc-uri', 'trace' => true, diff --git a/ext/soap/tests/bugs/bug76232.phpt b/ext/soap/tests/bugs/bug76232.phpt index 58db3c57d581..74e067429b21 100644 --- a/ext/soap/tests/bugs/bug76232.phpt +++ b/ext/soap/tests/bugs/bug76232.phpt @@ -26,7 +26,7 @@ PHP; php_cli_server_start($code, null, $args); -$client = new soapclient(NULL, [ +$client = new SoapClient(NULL, [ 'location' => 'http://' . PHP_CLI_SERVER_ADDRESS, 'uri' => 'misc-uri', 'trace' => true, diff --git a/ext/soap/tests/custom_content_type.phpt b/ext/soap/tests/custom_content_type.phpt index d32f1df78359..c21796208f79 100644 --- a/ext/soap/tests/custom_content_type.phpt +++ b/ext/soap/tests/custom_content_type.phpt @@ -26,7 +26,7 @@ PHP; php_cli_server_start($code, null, $args); -$client = new soapclient(NULL, [ +$client = new SoapClient(NULL, [ 'location' => 'http://' . PHP_CLI_SERVER_ADDRESS, 'uri' => 'misc-uri', 'soap_version' => SOAP_1_2, @@ -52,7 +52,7 @@ else /* * In case of an empty content-type, let's fallback to the default content. */ -$client2 = new soapclient(NULL, [ +$client2 = new SoapClient(NULL, [ 'location' => 'http://' . PHP_CLI_SERVER_ADDRESS, 'uri' => 'misc-uri', 'soap_version' => SOAP_1_2, diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_001p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_001p.phpt index b5935df2b743..ead074074cf5 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_001p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_001p.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoString", array("Hello World!"), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_001s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_001s.phpt index aedb9fb8cbc5..a64f051c5394 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_001s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_001s.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoString", array(new SoapParam(new SoapVar("Hello World!",XSD_STRING),"inputString")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_001w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_001w.phpt index 7c18a7035cc9..a4cea64634ca 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_001w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_001w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoString("Hello World!"); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_002p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_002p.phpt index 0e688cb7dd10..c15d4648331d 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_002p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_002p.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoString", array(""), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_002s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_002s.phpt index a289ee37d30d..fdbeb28695fc 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_002s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_002s.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoString", array(new SoapParam(new SoapVar("",XSD_STRING),"inputString")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_002w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_002w.phpt index 070314a998f8..10b2f5c31fcf 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_002w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_002w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoString(""); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_003p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_003p.phpt index 15bd49cf9842..327e485c283e 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_003p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_003p.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoString", array(NULL), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_003s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_003s.phpt index c3e62afb87d2..2d912bf95cc7 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_003s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_003s.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoString", array(new SoapParam(new SoapVar(NULL,XSD_STRING),"inputString")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_003w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_003w.phpt index 328be0bcd119..135585eaef24 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_003w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_003w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoString(NULL); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_004p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_004p.phpt index 1bc04a80d962..72725a2d3318 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_004p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_004p.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoString", array(">,<,&,\",',\\,\n"), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_004s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_004s.phpt index 6f4f3c117ab3..808a00d4cc82 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_004s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_004s.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoString", array(new SoapParam(new SoapVar(">,<,&,\",',\\,\n",XSD_STRING),"inputString")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_004w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_004w.phpt index 40a4c18686ae..432824078fcf 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_004w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_004w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoString(">,<,&,\",',\\,\n"); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt index ebed16ce89a4..a4b36107cbdb 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoString", array('ỗÈéóÒ₧⅜ỗỸ'), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt index 6c76c2d5ed96..05e468ee7cb1 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoString", array(new SoapParam(new SoapVar('ỗÈéóÒ₧⅜ỗỸ',XSD_STRING),"inputString")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt index 6c2da485c2b0..c5e03a7d8220 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoString('ỗÈéóÒ₧⅜ỗỸ'); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_006p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_006p.phpt index b561955e12fe..32eb557f6310 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_006p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_006p.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoStringArray", array(array('good','bad')), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_006s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_006s.phpt index 84cdf0405655..932790f4e355 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_006s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_006s.phpt @@ -10,8 +10,8 @@ $param = new SoapParam(new SoapVar(array( ), SOAP_ENC_ARRAY, "ArrayOfstring","http://soapinterop.org/xsd"), "inputStringArray"); $client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoStringArray", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_006w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_006w.phpt index b936d05500f5..2a2e146c05e5 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_006w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_006w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoStringArray(array('good','bad')); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_007p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_007p.phpt index 8a4b314e0283..63534a86a344 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_007p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_007p.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoStringArray", array(array('good')), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_007s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_007s.phpt index 5886802bf5c2..503655443726 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_007s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_007s.phpt @@ -9,8 +9,8 @@ $param = new SoapParam(new SoapVar(array( ), SOAP_ENC_ARRAY, "ArrayOfstring","http://soapinterop.org/xsd"), "inputStringArray"); $client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoStringArray", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_007w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_007w.phpt index 1905c4fbbe80..16ffa6f484a0 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_007w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_007w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoStringArray(array('good')); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_008p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_008p.phpt index 376d8c25637b..3bdd1d441aff 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_008p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_008p.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoStringArray", array(array()), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_008s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_008s.phpt index 743299ff831a..777046aadb08 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_008s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_008s.phpt @@ -8,8 +8,8 @@ $param = new SoapParam(new SoapVar(array( ), SOAP_ENC_ARRAY, "ArrayOfstring","http://soapinterop.org/xsd"), "inputStringArray"); $client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoStringArray", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_008w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_008w.phpt index 234a56defe40..e777f80c3a3d 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_008w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_008w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoStringArray(array()); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_009p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_009p.phpt index 063bf93dc42f..e97ba17a9ea0 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_009p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_009p.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoStringArray", array(NULL), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_009s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_009s.phpt index 6d5a36c19c4b..172c66c692a3 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_009s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_009s.phpt @@ -7,8 +7,8 @@ soap $param = new SoapParam(new SoapVar(NULL, SOAP_ENC_ARRAY, "ArrayOfstring","http://soapinterop.org/xsd"), "inputStringArray"); $client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoStringArray", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_009w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_009w.phpt index 502c414ea704..f98ff0354c62 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_009w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_009w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoStringArray(NULL); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_010p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_010p.phpt index 5e3355472936..5354cf49ef3d 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_010p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_010p.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoInteger", array(34345), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_010s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_010s.phpt index 6047f6e909af..daf4a61bf0db 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_010s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_010s.phpt @@ -5,9 +5,9 @@ soap --FILE-- "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); -$client->__soapCall("echoInteger", array(new SoapParam(new soapVar(34345, XSD_INT), "inputInteger")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +$client->__soapCall("echoInteger", array(new SoapParam(new SoapVar(34345, XSD_INT), "inputInteger")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_010w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_010w.phpt index 3271bf357457..f7b4bd93930c 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_010w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_010w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoInteger(34345); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_011p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_011p.phpt index bbbba365f0a1..9f94a486d7d1 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_011p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_011p.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoIntegerArray", array(array(1,234324324,2)), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_011s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_011s.phpt index 73fb6bc973e0..e45496985e33 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_011s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_011s.phpt @@ -11,8 +11,8 @@ $param = new SoapParam(new SoapVar(array( ), SOAP_ENC_ARRAY, "ArrayOfint","http://soapinterop.org/xsd"), "inputIntegerArray"); $client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoIntegerArray", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_011w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_011w.phpt index 04a5b4d49daa..c121ddb6b9b8 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_011w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_011w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoIntegerArray(array(1,234324324,2)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_012p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_012p.phpt index 0b364930229d..9f5e1299bac4 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_012p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_012p.phpt @@ -8,8 +8,8 @@ precision=14 "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoFloat", array(342.23), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_012s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_012s.phpt index cd25a7b5ca2d..ad4479135409 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_012s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_012s.phpt @@ -8,8 +8,8 @@ precision=14 "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoFloat", array(new SoapParam(new SoapVar(342.23,XSD_FLOAT),"inputFloat")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_012w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_012w.phpt index 8e778fd32c89..8efd8192ec28 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_012w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_012w.phpt @@ -9,8 +9,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoFloat(342.23); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_013p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_013p.phpt index d88ec52b10f0..7120b2e43b52 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_013p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_013p.phpt @@ -8,8 +8,8 @@ precision=14 "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoFloatArray", array(array(1.3223,34.2,325.325)), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_013s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_013s.phpt index 1e546f40ab00..ed943706d0b8 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_013s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_013s.phpt @@ -13,8 +13,8 @@ $param = new SoapParam(new SoapVar(array( ), SOAP_ENC_ARRAY, "ArrayOffloat","http://soapinterop.org/xsd"), "inputFloatArray"); $client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoFloatArray", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_013w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_013w.phpt index 6245fe836987..eeaf14b7e378 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_013w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_013w.phpt @@ -9,8 +9,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoFloatArray(array(1.3223,34.2,325.325)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_014p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_014p.phpt index 06e0e55d0b82..3aed60b61832 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_014p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_014p.phpt @@ -12,8 +12,8 @@ class SOAPStruct { $client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoStruct", array(new SOAPStruct('arg',34,325.325)), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_014s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_014s.phpt index 520e6b4d1887..35586cd466df 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_014s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_014s.phpt @@ -13,8 +13,8 @@ $param = new SoapParam(new SoapVar(array( ),SOAP_ENC_OBJECT,"SOAPStruct","http://soapinterop.org/xsd"), "inputStruct"); $client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoStruct", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_014w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_014w.phpt index 5314c46c8976..98fbc4b7a634 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_014w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_014w.phpt @@ -13,8 +13,8 @@ class SOAPStruct { $client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStruct(new SOAPStruct('arg',34,325.325)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_015p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_015p.phpt index 78ddfe83c807..a11f37760e1f 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_015p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_015p.phpt @@ -14,8 +14,8 @@ $struct1 = new SOAPStruct('arg',34,325.325); $struct2 = new SOAPStruct('arg',34,325.325); $client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoStructArray", array(array($struct1,$struct2)), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_015s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_015s.phpt index a14d9cf1264e..950b42e828a3 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_015s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_015s.phpt @@ -31,8 +31,8 @@ $param = new SoapParam(new SoapVar(array( ),SOAP_ENC_ARRAY,"ArrayOfSOAPStruct","http://soapinterop.org/xsd"), "inputStructArray"); $client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoStructArray", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt index 2481f818675e..6009e07da6fa 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt @@ -15,8 +15,8 @@ $struct1 = new SOAPStruct('arg',34,325.325); $struct2 = new SOAPStruct('arg',34,325.325); $client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStructArray(array($struct1,$struct2)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_016p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_016p.phpt index 611b0f7235df..a65a8f97ffa6 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_016p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_016p.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoVoid", array(), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_016s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_016s.phpt index 6d56e994670a..170b92f16789 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_016s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_016s.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoVoid", array(), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_016w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_016w.phpt index 740c68d07d49..854185cf347f 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_016w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_016w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoVoid(); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_017p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_017p.phpt index 9e56079784ce..da67f1f31ec5 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_017p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_017p.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoBase64", array('Nebraska'), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_017s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_017s.phpt index 3017c218028a..fdc3fbaa7920 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_017s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_017s.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoBase64", array(new SoapParam(new SoapVar('Nebraska',XSD_BASE64BINARY),"inputBase64")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_017w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_017w.phpt index 37587b59bf33..ab35ce18d2a2 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_017w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_017w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoBase64('Nebraska'); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_018p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_018p.phpt index e0b593b41a5a..c1b7191052de 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_018p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_018p.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoHexBinary", array('soapx4'), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_018s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_018s.phpt index b025a1918d62..a57ac7017aa5 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_018s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_018s.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoHexBinary", array(new SoapParam(new SoapVar('soapx4',XSD_HEXBINARY),"inputHexBinary")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_018w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_018w.phpt index 52fdd92fa490..4e0cc9175fef 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_018w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_018w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoHexBinary('soapx4'); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_019p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_019p.phpt index 80f29f0bd48e..0bedb5db1834 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_019p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_019p.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoDecimal", array('12345.67890'), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_019s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_019s.phpt index f4b81287319d..0b0c8450090a 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_019s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_019s.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoDecimal", array(new SoapParam(new SoapVar('12345.67890',XSD_DECIMAL), "inputDecimal")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_019w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_019w.phpt index 4997308dafaa..605ac3b11d77 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_019w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_019w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoDecimal('12345.67890'); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_020p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_020p.phpt index 71acc6424789..0f476595c54d 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_020p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_020p.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoDate", array('2001-05-24T17:31:41Z'), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_020s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_020s.phpt index e33943bee9fc..9f6dda31982a 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_020s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_020s.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoDate", array(new SoapParam(new SoapVar('2001-05-24T17:31:41Z', XSD_DATETIME), "inputDate")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_020w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_020w.phpt index 2bb80c75a930..1bb0a859b679 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_020w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_020w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoDate('2001-05-24T17:31:41Z'); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_021p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_021p.phpt index ad967845916b..96d178b87583 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_021p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_021p.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoBoolean", array(true), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_021s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_021s.phpt index 1af84ff3b854..6de2b5d40254 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_021s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_021s.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoBoolean", array(new SoapParam(new SoapVar(true, XSD_BOOLEAN), "inputBoolean")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_021w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_021w.phpt index 33e06331b883..ed651f474c6e 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_021w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_021w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoBoolean(true); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_022p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_022p.phpt index e5da6fe4c271..85f96785496c 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_022p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_022p.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoBoolean", array(false), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_022s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_022s.phpt index 1aef099eda15..9373957863c7 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_022s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_022s.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoBoolean", array(new SoapParam(new SoapVar(false, XSD_BOOLEAN), "inputBoolean")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_022w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_022w.phpt index 02374c8972df..758fbbe8e772 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_022w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_022w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoBoolean(false); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_023p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_023p.phpt index 6ad2cc608252..ff9f39fd2f19 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_023p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_023p.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoBoolean", array(1), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_023s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_023s.phpt index 6c70508e292e..a626405349a5 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_023s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_023s.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoBoolean", array(new SoapParam(new SoapVar(1, XSD_BOOLEAN), "inputBoolean")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_023w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_023w.phpt index e5cfe76d713c..82c7b2c80bba 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_023w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_023w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoBoolean(1); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_024p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_024p.phpt index 37118aeaa12d..a025255101bb 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_024p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_024p.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoBoolean", array(0), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_024s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_024s.phpt index 3d122818779d..13a767cb2bcf 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_024s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_024s.phpt @@ -6,8 +6,8 @@ soap "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoBoolean", array(new SoapParam(new SoapVar(0, XSD_BOOLEAN), "inputBoolean")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_024w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_024w.phpt index 1c474704b3eb..899511b18377 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_024w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_024w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoBoolean(0); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_base.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001p.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001p.phpt index b5a0d814af07..428361ed3897 100644 --- a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001p.phpt +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001p.phpt @@ -8,8 +8,8 @@ precision=14 "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoStructAsSimpleTypes", array((object)array('varString'=>"arg",'varInt'=>34,'varFloat'=>34.345)), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_groupB.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001s.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001s.phpt index 45498981cbd9..3cb6c6bc6b53 100644 --- a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001s.phpt +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001s.phpt @@ -13,8 +13,8 @@ $param = new SoapParam(new SoapVar(array( ), SOAP_ENC_OBJECT, "SOAPStruct", "http://soapinterop.org/xsd"), "inputStruct"); $client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoStructAsSimpleTypes", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_groupB.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001w.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001w.phpt index 2686128aaf31..b67574624999 100644 --- a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001w.phpt +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001w.phpt @@ -9,8 +9,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoStructAsSimpleTypes((object)array('varString'=>"arg",'varInt'=>34,'varFloat'=>34.345)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_groupB.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002p.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002p.phpt index a9e731a7d28d..fe14f78237bb 100644 --- a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002p.phpt +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002p.phpt @@ -8,8 +8,8 @@ precision=14 "test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoSimpleTypesAsStruct", array("arg",34,34.345), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_groupB.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002s.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002s.phpt index fc7dd9e10b6c..887dbdc3be46 100644 --- a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002s.phpt +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002s.phpt @@ -11,8 +11,8 @@ $client->__soapCall("echoSimpleTypesAsStruct", array( new SoapParam(new SoapVar("arg",XSD_STRING), "inputString"), new SoapParam(new SoapVar(34,XSD_INT), "inputInteger"), new SoapParam(new SoapVar(34.345,XSD_FLOAT), "inputFloat")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_groupB.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002w.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002w.phpt index 221628e47d6e..ec9d6cd76a81 100644 --- a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002w.phpt +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002w.phpt @@ -9,8 +9,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoSimpleTypesAsStruct("arg",34,34.345); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_groupB.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003p.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003p.phpt index 74d1309ece98..b775ef168ae2 100644 --- a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003p.phpt +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003p.phpt @@ -9,8 +9,8 @@ $param = array( array('row1col0', 'row1col1', 'row1col2')); $client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echo2DStringArray", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_groupB.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003s.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003s.phpt index 6647e6e9ff85..5fd909c505d6 100644 --- a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003s.phpt +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003s.phpt @@ -18,8 +18,8 @@ $param = new SoapParam(new SoapVar(array( ), SOAP_ENC_ARRAY, "ArrayOfString2D", "http://soapinterop.org/xsd"),"input2DStringArray"); $client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echo2DStringArray", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_groupB.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003w.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003w.phpt index 0b53b3ded0a8..17fa0105889e 100644 --- a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003w.phpt +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003w.phpt @@ -11,8 +11,8 @@ $param = array( array('row1col0', 'row1col1', 'row1col2')); $client = new SoapClient(__DIR__."/round2_groupB.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echo2DStringArray($param); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_groupB.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004p.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004p.phpt index ce8368fd4e3c..4c6a0d207386 100644 --- a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004p.phpt +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004p.phpt @@ -18,8 +18,8 @@ $param = (object)array( $client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoNestedStruct", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_groupB.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004s.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004s.phpt index 6a84a7ef18c7..3b78fa5e69da 100644 --- a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004s.phpt +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004s.phpt @@ -18,8 +18,8 @@ $param = new SoapParam(new SoapVar(array( ), SOAP_ENC_OBJECT, "SOAPStructStruct", "http://soapinterop.org/xsd"), "inputStruct"); $client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoNestedStruct", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_groupB.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004w.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004w.phpt index 6d74e5e4e80c..59be6722de60 100644 --- a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004w.phpt +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004w.phpt @@ -19,8 +19,8 @@ $param = (object)array( $client = new SoapClient(__DIR__."/round2_groupB.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoNestedStruct($param); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_groupB.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005p.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005p.phpt index e19a973f3233..b9545dad0013 100644 --- a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005p.phpt +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005p.phpt @@ -13,8 +13,8 @@ $param = (object)array( 'varArray' => array('red','blue','green')); $client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoNestedArray", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_groupB.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005s.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005s.phpt index b07ee043ceee..e050957677df 100644 --- a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005s.phpt +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005s.phpt @@ -18,8 +18,8 @@ $param = new SoapParam(new SoapVar(array( ), SOAP_ENC_OBJECT, "SOAPArrayStruct", "http://soapinterop.org/xsd"), "inputStruct"); $client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoNestedArray", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_groupB.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005w.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005w.phpt index ebc886c3a2e3..f2ff5438c044 100644 --- a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005w.phpt +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005w.phpt @@ -14,8 +14,8 @@ $param = (object)array( 'varArray' => array('red','blue','green')); $client = new SoapClient(__DIR__."/round2_groupB.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoNestedArray($param); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round2_groupB.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_001w.phpt index 3be8e12536e6..d2589faca4a2 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_001w.phpt @@ -13,8 +13,8 @@ class Person { $person = new Person(32,12345,'Shane',TRUE); $client = new SoapClient(__DIR__."/round3_groupD_compound1.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoPerson($person); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupD_compound1.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_002w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_002w.phpt index c647593603f5..2ef5a79d5ae0 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_002w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_002w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoDocument("Test Document Here"); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupD_compound1.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_003w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_003w.phpt index aec35c98475f..63fff0e3201c 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_003w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_003w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoDocument((object)array("_"=>"Test Document Here","ID"=>1)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupD_compound1.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound2_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound2_001w.phpt index 733a20b1a41a..d942107d4f5a 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound2_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound2_001w.phpt @@ -18,8 +18,8 @@ $employee = new Employee($person,12345,1000000.00); $client = new SoapClient(__DIR__."/round3_groupD_compound2.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoEmployee($employee); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupD_compound2.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_001w.phpt index 476de336d6aa..ab18a1b8dd26 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_001w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoString("Hello World"); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupD_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_002w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_002w.phpt index b3dd6e085203..659b9279fc1f 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_002w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_002w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoStringArray(array("one","two","three")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupD_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_003w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_003w.phpt index 1e9a139a674e..39a8744d6b78 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_003w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_003w.phpt @@ -13,8 +13,8 @@ class SOAPStruct { $struct = new SOAPStruct('arg',34,325.325); $client = new SoapClient(__DIR__."/round3_groupD_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStruct($struct); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupD_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_004w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_004w.phpt index 6f5d745b92bf..ef35065871f0 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_004w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_004w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoVoid(); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupD_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_001w.phpt index b38ac8e20a08..6c17a7fff115 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_001w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoString(array("param0"=>"Hello World")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupD_doclitparams.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_002w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_002w.phpt index b216acf04603..fb9d369b6233 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_002w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_002w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoStringArray(array("param0"=>array("one","two","three"))); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupD_doclitparams.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_003w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_003w.phpt index 307b73dc72c7..dc9efc71a868 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_003w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_003w.phpt @@ -13,8 +13,8 @@ class SOAPStruct { $struct = new SOAPStruct('arg',34,325.325); $client = new SoapClient(__DIR__."/round3_groupD_doclitparams.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStruct(array("param0"=>$struct)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupD_doclitparams.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_004w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_004w.phpt index 4f63550d54b4..27ce54b6cbbb 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_004w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_004w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoVoid(); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupD_doclitparams.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_emptysa_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_emptysa_001w.phpt index 212a212f08fd..57015a272b27 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_emptysa_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_emptysa_001w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoString("Hello World"); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupD_emptysa.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import1_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import1_001w.phpt index 0823b1c24143..82c97b788e2c 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import1_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import1_001w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoString("Hello World"); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupD_import1.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import2_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import2_001w.phpt index 15b659246d43..478cd15f8ad0 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import2_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import2_001w.phpt @@ -13,8 +13,8 @@ class SOAPStruct { $struct = new SOAPStruct('arg',34,325.325); $client = new SoapClient(__DIR__."/round3_groupD_import2.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStruct($struct); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupD_import2.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_001w.phpt index b0715e39b7b4..c013f6ad0174 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_001w.phpt @@ -13,8 +13,8 @@ class SOAPStruct { $struct = new SOAPStruct('arg',34,325.325); $client = new SoapClient(__DIR__."/round3_groupD_import3.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStruct($struct); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupD_import3.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt index 590e0b114e6c..e73840d12663 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt @@ -14,8 +14,8 @@ $struct1 = new SOAPStruct('arg',34,325.325); $struct2 = new SOAPStruct('arg',34,325.325); $client = new SoapClient(__DIR__."/round3_groupD_import3.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStructArray(array($struct1,$struct2)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupD_import3.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_001w.phpt index 548fa5bc4754..2e73379dadb9 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_001w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoString("Hello World"); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupD_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_002w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_002w.phpt index dd8745ecb07b..d33a8f587e52 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_002w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_002w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoStringArray(array("one","two","three")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupD_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_003w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_003w.phpt index 0378d698f7a6..8d511f49d6f6 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_003w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_003w.phpt @@ -13,8 +13,8 @@ class SOAPStruct { $struct = new SOAPStruct('arg',34,325.325); $client = new SoapClient(__DIR__."/round3_groupD_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStruct($struct); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupD_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_004w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_004w.phpt index 69aa465eacd9..b4e1bf84a51a 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_004w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_004w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoVoid(); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupD_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt index c63cf57d4bd0..0f36ce5611ba 100644 --- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt @@ -12,8 +12,8 @@ class SOAPList { $struct = new SOAPList('arg1',1,NULL); $client = new SoapClient(__DIR__."/round3_groupE_list.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoLinkedList($struct); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupE_list.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt index 0d1d4c2fbb64..223bd49dbf4b 100644 --- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt @@ -12,8 +12,8 @@ class SOAPList { $struct = new SOAPList('arg1',1, new SOAPList('arg2',2,NULL)); $client = new SoapClient(__DIR__."/round3_groupE_list.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoLinkedList($struct); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupE_list.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt index a545a7d36034..124acbbc589c 100644 --- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt @@ -12,8 +12,8 @@ class SOAPList { $struct = new SOAPList('arg1',1,new SOAPList('arg2',2,new SOAPList('arg3',3,NULL))); $client = new SoapClient(__DIR__."/round3_groupE_list.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoLinkedList($struct); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupE_list.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_004w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_004w.phpt index e2e261df4c60..3be12341685b 100644 --- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_004w.phpt +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_004w.phpt @@ -16,8 +16,8 @@ class SOAPList { $struct = NULL; $client = new SoapClient(__DIR__."/round3_groupE_list.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoLinkedList($struct); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupE_list.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt index 23314a976eea..8711228da62a 100644 --- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt @@ -13,8 +13,8 @@ $struct = new SOAPList('arg1',1,new SOAPList('arg2',2,new SOAPList('arg3',3,NULL $struct->child->child->child = $struct; $client = new SoapClient(__DIR__."/round3_groupE_list.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoLinkedList($struct); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupE_list.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt index 203b5a5df54c..58418dcabb78 100644 --- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt @@ -13,8 +13,8 @@ $struct = new SOAPList('arg1',1,new SOAPList('arg2',2,new SOAPList('arg3',3,NULL $struct->child->child->child = $struct->child; $client = new SoapClient(__DIR__."/round3_groupE_list.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoLinkedList($struct); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupE_list.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_ext_001w.phpt b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_ext_001w.phpt index 5e454d472141..ef4a1d8ec4fa 100644 --- a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_ext_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_ext_001w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoString("Hello World"); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupF_ext.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_extreq_001w.phpt b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_extreq_001w.phpt index e47323f15af8..f3d8a8780945 100644 --- a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_extreq_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_extreq_001w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoString("Hello World"); -echo $client->__getlastrequest(); -//$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +//$HTTP_RAW_POST_DATA = $client->__getLastRequest(); //include("round3_groupF_extreq.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_001w.phpt b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_001w.phpt index e999a621fbb7..4ac227adde33 100644 --- a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_001w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoString("Hello World"); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupF_headers.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_002w.phpt b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_002w.phpt index b0427e35cf37..f1e6f67bfe73 100644 --- a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_002w.phpt +++ b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_002w.phpt @@ -9,8 +9,8 @@ soap.wsdl_cache_enabled=0 $hdr = new SoapHeader("http://soapinterop.org/xsd","Header1", array("int"=>34,"string"=>"arg")); $client = new SoapClient(__DIR__."/round3_groupF_headers.wsdl",array("trace"=>1,"exceptions"=>0)); $client->__soapCall("echoString",array("Hello World"),null,$hdr); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupF_headers.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_003w.phpt b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_003w.phpt index 834f26dfbaad..9659ac2a99a9 100644 --- a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_003w.phpt +++ b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_003w.phpt @@ -9,8 +9,8 @@ soap.wsdl_cache_enabled=0 $hdr = new SoapHeader("http://soapinterop.org/xsd","Header2", array("int"=>34,"string"=>"arg")); $client = new SoapClient(__DIR__."/round3_groupF_headers.wsdl",array("trace"=>1,"exceptions"=>0)); $client->__soapCall("echoString",array("Hello World"),null,$hdr); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupF_headers.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_004w.phpt b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_004w.phpt index 8059f5ecac7d..c07489218974 100644 --- a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_004w.phpt +++ b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_004w.phpt @@ -12,8 +12,8 @@ $hdr = array( ); $client = new SoapClient(__DIR__."/round3_groupF_headers.wsdl",array("trace"=>1,"exceptions"=>0)); $client->__soapCall("echoString",array("Hello World"),null,$hdr); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round3_groupF_headers.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_001w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_001w.phpt index 13c484c573da..d0f1453003a5 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_001w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_001w.phpt @@ -13,8 +13,8 @@ class SOAPStruct { $struct = new SOAPStruct('arg',34,325.325); $client = new SoapClient(__DIR__."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoSOAPStructFault($struct); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_complex_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_002w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_002w.phpt index d93d9b05c27f..006d1526946b 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_002w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_002w.phpt @@ -16,8 +16,8 @@ class BaseStruct { $struct = new BaseStruct(new SOAPStruct("a1",11,12.345),11); $client = new SoapClient(__DIR__."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoBaseStructFault($struct); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_complex_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_003w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_003w.phpt index 093e7c04ce99..4cc7e64754e8 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_003w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_003w.phpt @@ -24,8 +24,8 @@ class ExtendedStruct extends BaseStruct { $struct = new ExtendedStruct(new SOAPStruct("a1",11,12.345),12,"arg",-3,5); $client = new SoapClient(__DIR__."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoExtendedStructFault($struct); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_complex_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_004w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_004w.phpt index 6a5fbffe0fff..41c998857374 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_004w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_004w.phpt @@ -19,8 +19,8 @@ $client = new SoapClient(__DIR__."/round4_groupH_complex_doclit.wsdl",array("tra $client->echoMultipleFaults1(array("whichFault" => 1, "param1" => $s1, "param2" => $s2)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_complex_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_005w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_005w.phpt index b3c09c43fb96..6ef4d3818513 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_005w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_005w.phpt @@ -19,8 +19,8 @@ $client = new SoapClient(__DIR__."/round4_groupH_complex_doclit.wsdl",array("tra $client->echoMultipleFaults1(array("whichFault" => 2, "param1" => $s1, "param2" => $s2)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_complex_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_006w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_006w.phpt index 2c7b488dfda4..65f667ef03b4 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_006w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_006w.phpt @@ -19,8 +19,8 @@ $client = new SoapClient(__DIR__."/round4_groupH_complex_doclit.wsdl",array("tra $client->echoMultipleFaults1(array("whichFault" => 3, "param1" => $s1, "param2" => $s2)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_complex_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_007w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_007w.phpt index 85414a55672c..29934444b16e 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_007w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_007w.phpt @@ -33,8 +33,8 @@ $client->echoMultipleFaults2(array("whichFault" => 1, "param1" => $s1, "param2" => $s2, "param3" => $s3)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_complex_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_008w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_008w.phpt index 7bb19ae618d4..25508089ab07 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_008w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_008w.phpt @@ -33,8 +33,8 @@ $client->echoMultipleFaults2(array("whichFault" => 2, "param1" => $s1, "param2" => $s2, "param3" => $s3)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_complex_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_009w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_009w.phpt index ed4e8e2cdd6f..7404ada08eb5 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_009w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_009w.phpt @@ -33,8 +33,8 @@ $client->echoMultipleFaults2(array("whichFault" => 3, "param1" => $s1, "param2" => $s2, "param3" => $s3)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_complex_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_010w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_010w.phpt index 315ddd201e4b..f591f349a767 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_010w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_010w.phpt @@ -33,8 +33,8 @@ $client->echoMultipleFaults2(array("whichFault" => 4, "param1" => $s1, "param2" => $s2, "param3" => $s3)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_complex_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_001w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_001w.phpt index 84949d4ecee0..3687ef4d7617 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_001w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_001w.phpt @@ -13,8 +13,8 @@ class SOAPStruct { $struct = new SOAPStruct('arg',34,325.325); $client = new SoapClient(__DIR__."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoSOAPStructFault(array("soapStruct"=>$struct)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_complex_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_002w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_002w.phpt index a53fd36c57c0..82ab9f08afae 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_002w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_002w.phpt @@ -13,8 +13,8 @@ class BaseStruct { $struct = new BaseStruct(12.345,12); $client = new SoapClient(__DIR__."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoBaseStructFault($struct); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_complex_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_003w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_003w.phpt index d407314786a5..55eea2b279ca 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_003w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_003w.phpt @@ -21,8 +21,8 @@ class ExtendedStruct extends BaseStruct { $struct = new ExtendedStruct(12.345,12,"arg",-3,5); $client = new SoapClient(__DIR__."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoExtendedStructFault($struct); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_complex_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_004w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_004w.phpt index a9975a867315..2bc93c3fbf33 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_004w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_004w.phpt @@ -17,8 +17,8 @@ $s1 = new SOAPStruct('arg',34,325.325); $s2 = new BaseStruct(12.345,12); $client = new SoapClient(__DIR__."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults1(1,$s1,$s2); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_complex_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_005w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_005w.phpt index 223237465744..3952e699b636 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_005w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_005w.phpt @@ -17,8 +17,8 @@ $s1 = new SOAPStruct('arg',34,325.325); $s2 = new BaseStruct(12.345,12); $client = new SoapClient(__DIR__."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults1(2,$s1,$s2); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_complex_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_006w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_006w.phpt index 763ac692a0d6..9f0496d7e685 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_006w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_006w.phpt @@ -17,8 +17,8 @@ $s1 = new SOAPStruct('arg',34,325.325); $s2 = new BaseStruct(12.345,12); $client = new SoapClient(__DIR__."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults1(3,$s1,$s2); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_complex_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_007w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_007w.phpt index da3aa1ae8b11..dc80037cf5d2 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_007w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_007w.phpt @@ -28,8 +28,8 @@ $s2 = new ExtendedStruct(12.345,2,"arg",-3,5); $s3 = new MoreExtendedStruct(12.345,3,"arg",-3,5,true); $client = new SoapClient(__DIR__."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults2(1,$s1,$s2,$s3); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_complex_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_008w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_008w.phpt index 57ebda31987d..cff094748a72 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_008w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_008w.phpt @@ -28,8 +28,8 @@ $s2 = new ExtendedStruct(12.345,2,"arg",-3,5); $s3 = new MoreExtendedStruct(12.345,3,"arg",-3,5,true); $client = new SoapClient(__DIR__."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults2(2,$s1,$s2,$s3); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_complex_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_009w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_009w.phpt index 0608d3f536fd..89a4e9fd652e 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_009w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_009w.phpt @@ -28,8 +28,8 @@ $s2 = new ExtendedStruct(12.345,2,"arg",-3,5); $s3 = new MoreExtendedStruct(12.345,3,"arg",-3,5,true); $client = new SoapClient(__DIR__."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults2(3,$s1,$s2,$s3); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_complex_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_010w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_010w.phpt index 853f92f7f861..65de49df98f1 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_010w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_010w.phpt @@ -28,8 +28,8 @@ $s2 = new ExtendedStruct(12.345,2,"arg",-3,5); $s3 = new MoreExtendedStruct(12.345,3,"arg",-3,5,true); $client = new SoapClient(__DIR__."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults2(4,$s1,$s2,$s3); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_complex_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_001w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_001w.phpt index 43597971d2e6..e4053b54c755 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_001w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_001w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoEmptyFault(); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_002w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_002w.phpt index 0996ffc2f13e..8b4ac07f1d7a 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_002w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_002w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoStringFault("Hello World"); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_003w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_003w.phpt index d96d739fafc2..cf6979aeacf6 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_003w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_003w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoIntArrayFault(array(34,12.345)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_004w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_004w.phpt index e316cea812a7..655c134d1f5d 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_004w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_004w.phpt @@ -11,8 +11,8 @@ $client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trac $client->echoMultipleFaults1(array("whichFault" => 1, "param1" => "Hello world", "param2" => array(12.345,45,678))); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_005w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_005w.phpt index 5a9eb5e3ea16..1fbda013aaed 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_005w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_005w.phpt @@ -11,8 +11,8 @@ $client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trac $client->echoMultipleFaults1(array("whichFault" => 2, "param1" => "Hello world", "param2" => array(12.345,45,678))); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_006w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_006w.phpt index 9116e58d7e09..1178ba1d1d22 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_006w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_006w.phpt @@ -11,8 +11,8 @@ $client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trac $client->echoMultipleFaults1(array("whichFault" => 3, "param1" => "Hello world", "param2" => array(12.345,45,678))); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_007w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_007w.phpt index fc4224815346..2bc4a93b6dbb 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_007w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_007w.phpt @@ -11,8 +11,8 @@ $client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trac $client->echoMultipleFaults1(array("whichFault" => 4, "param1" => "Hello world", "param2" => array(12.345,45,678))); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_008w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_008w.phpt index 8938fde5d54c..0c386cb1cba2 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_008w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_008w.phpt @@ -12,8 +12,8 @@ $client->echoMultipleFaults2(array("whichFault" => 1, "param1" => "Hello world", "param2" => 12.345, "param3" => array("one","two","three"))); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_009w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_009w.phpt index c9a3fddce6c1..3235358225c8 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_009w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_009w.phpt @@ -12,8 +12,8 @@ $client->echoMultipleFaults2(array("whichFault" => 2, "param1" => "Hello world", "param2" => 12.345, "param3" => array("one","two","three"))); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_010w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_010w.phpt index 8e8d21a80431..8e9d1154fe4d 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_010w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_010w.phpt @@ -12,8 +12,8 @@ $client->echoMultipleFaults2(array("whichFault" => 3, "param1" => "Hello world", "param2" => 12.345, "param3" => array("one","two","three"))); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_011w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_011w.phpt index fc6ec524c75a..12fff25d7d38 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_011w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_011w.phpt @@ -12,8 +12,8 @@ $client->echoMultipleFaults2(array("whichFault" => 4, "param1" => "Hello world", "param2" => 12.345, "param3" => array("one","two","three"))); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_012w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_012w.phpt index 900b5cef0e05..3796277e19a1 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_012w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_012w.phpt @@ -10,8 +10,8 @@ $client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trac $client->echoMultipleFaults3(array("whichFault" => 1, "param1" => "arg1", "param2" => "arg2")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_013w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_013w.phpt index 1a2a88592611..c0738cffa2cd 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_013w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_013w.phpt @@ -10,8 +10,8 @@ $client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trac $client->echoMultipleFaults3(array("whichFault" => 2, "param1" => "arg1", "param2" => "arg2")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_014w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_014w.phpt index 3760221e8a9e..a6d0f254d846 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_014w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_014w.phpt @@ -10,8 +10,8 @@ $client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trac $client->echoMultipleFaults3(array("whichFault" => 3, "param1" => "arg1", "param2" => "arg2")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_015w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_015w.phpt index feada9274a85..c7a23ebe5cb1 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_015w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_015w.phpt @@ -10,8 +10,8 @@ $client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trac $client->echoMultipleFaults4(array("whichFault" => 1, "param1" => 162, "param2" => 1)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_016w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_016w.phpt index ec72de989a12..c49d487a3589 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_016w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_016w.phpt @@ -10,8 +10,8 @@ $client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trac $client->echoMultipleFaults4(array("whichFault" => 2, "param1" => 162, "param2" => 1)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_017w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_017w.phpt index b97d278fb70a..d858e05221c5 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_017w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_017w.phpt @@ -10,8 +10,8 @@ $client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trac $client->echoMultipleFaults4(array("whichFault" => 3, "param1" => 162, "param2" => 1)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_doclit.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_001w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_001w.phpt index a98081f8cc03..41a39c5d4c3b 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_001w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_001w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoEmptyFault(); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_002w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_002w.phpt index 43ed1b8fb317..9c146c64f6ca 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_002w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_002w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoStringFault("Hello World"); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_003w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_003w.phpt index 4fa3e83d747b..c365b1e20462 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_003w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_003w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoIntArrayFault(array(34,12.345)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_004w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_004w.phpt index 8c9f414614f4..b18648dc7f1a 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_004w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_004w.phpt @@ -9,8 +9,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoMultipleFaults1(1,"Hello world",array(12.345,45,678)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_005w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_005w.phpt index 450097fae39c..a4240b16b5a2 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_005w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_005w.phpt @@ -9,8 +9,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoMultipleFaults1(2,"Hello world",array(12.345,45,678)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_006w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_006w.phpt index 8aa99e87577f..60d9187f39c0 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_006w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_006w.phpt @@ -9,8 +9,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoMultipleFaults1(3,"Hello world",array(12.345,45,678)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_007w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_007w.phpt index ad4fcd761224..ba774997c977 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_007w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_007w.phpt @@ -9,8 +9,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoMultipleFaults1(4,"Hello world",array(12.345,45,678)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_008w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_008w.phpt index 17f8c93bcda4..4802fd6a2b9e 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_008w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_008w.phpt @@ -9,8 +9,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoMultipleFaults2(1, "Hello World", 12.345, array("one","two","three")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_009w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_009w.phpt index c6a3983dcb45..2c78195d92dd 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_009w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_009w.phpt @@ -9,8 +9,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoMultipleFaults2(2, "Hello World", 12.345, array("one","two","three")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_010w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_010w.phpt index 3c597368780b..706645c0a88a 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_010w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_010w.phpt @@ -9,8 +9,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoMultipleFaults2(3, "Hello World", 12.345, array("one","two","three")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_011w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_011w.phpt index 155de2f56b85..2f0e0fc58396 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_011w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_011w.phpt @@ -9,8 +9,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoMultipleFaults2(4, "Hello World", 12.345, array("one","two","three")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_012w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_012w.phpt index eadfa49bed8e..a38e51619e28 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_012w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_012w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoMultipleFaults3(1,"arg1","arg2"); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_013w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_013w.phpt index 5bf679a8425a..71f693a5fb2c 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_013w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_013w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoMultipleFaults3(2,"arg1","arg2"); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_014w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_014w.phpt index 8869398537f8..64055275a0c5 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_014w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_014w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoMultipleFaults3(3,"arg1","arg2"); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_015w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_015w.phpt index 28f117f8042e..64066cc2de5c 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_015w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_015w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoMultipleFaults4(1, 162, 1); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_016w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_016w.phpt index 7ebb5bb9332c..084db0932770 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_016w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_016w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoMultipleFaults4(2, 162, 1); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_017w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_017w.phpt index 4d41d5162722..29603a30a943 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_017w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_017w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoMultipleFaults4(3, 162, 1); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_simple_rpcenc.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_001w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_001w.phpt index 0f54418a735d..1c5bcf1aabd9 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_001w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_001w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoVersionMismatchFault(); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_soapfault.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_002w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_002w.phpt index 4bcb6d391b14..b1707e11e4c6 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_002w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_002w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0,"soap_version"=>SOAP_1_2)); $client->echoVersionMismatchFault(); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_soapfault.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_004w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_004w.phpt index 69ba8880ad58..72f7d6102acb 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_004w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_004w.phpt @@ -9,8 +9,8 @@ soap.wsdl_cache_enabled=0 $hdr = new SoapHeader("http://soapinterop.org/wsdl", "UnknownHeaderRequest", "Hello World", true); $client = new SoapClient(__DIR__."/round4_groupH_soapfault.wsdl",array("trace"=>1,"exceptions"=>0)); $client->__soapCall("echoVersionMismatchFault",array(), null, $hdr); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupH_soapfault.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_001w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_001w.phpt index 632ca3a7ddbc..ded19f17957e 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_001w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_001w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoVoid(); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_002w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_002w.phpt index b0da17903a16..e303fd97f809 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_002w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_002w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoInteger(array("inputInteger"=>22)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_003w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_003w.phpt index 62f009cbdd3e..4107af83f1ed 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_003w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_003w.phpt @@ -9,8 +9,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoFloat(array("inputFloat"=>12.345)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_004w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_004w.phpt index 735a0f304f46..8724a60408ea 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_004w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_004w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoString(array("inputString"=>"Hello World")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_005w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_005w.phpt index ddcfafb6fc97..df480184ca9c 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_005w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_005w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoString(array()); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_006w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_006w.phpt index 6652ee36e78a4db454e3f5030c8f47fade241b73..47fb1e60266aea29d61f80d514ae1522095a8cd3 100644 GIT binary patch delta 28 fcmeC@=;zqr%E;=ISX>e`*^5yR!rENRIEe`Wedh?w delta 28 fcmeC@=;zqr%E+3NSX@#x*^5yR!rENRIEe`Wgl7p% diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_007w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_007w.phpt index 97ab55154af3..634ba40ddae1 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_007w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_007w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoDate(array("inputDate"=>"2002-12-22T21:41:17Z")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_008w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_008w.phpt index 197cb07e8b06..e7326bdbc1d8 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_008w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_008w.phpt @@ -13,8 +13,8 @@ class SOAPComplexType { $struct = new SOAPComplexType('arg',34,325.325); $client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoComplexType(array("inputComplexType"=>$struct)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_009w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_009w.phpt index 81fd4d37a088..4975ddbdf8a1 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_009w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_009w.phpt @@ -14,8 +14,8 @@ $struct = new SOAPComplexType('arg',34,325.325); unset($struct->varString); $client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoComplexType(array("inputComplexType"=>$struct)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_010w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_010w.phpt index 72b0c291c7c5..9b0c27275d08 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_010w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_010w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoIntegerMultiOccurs(array("inputIntegerMultiOccurs"=>array(22,29,36))); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_011w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_011w.phpt index d5775e92fd86..a19e4b5ea295 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_011w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_011w.phpt @@ -9,8 +9,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoFloatMultiOccurs(array("inputFloatMultiOccurs"=>array(22.5,12.345))); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_012w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_012w.phpt index 775513ff4b62..e6b7ac5eb76a 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_012w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_012w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoStringMultiOccurs(array("inputStringMultiOccurs"=>array("arg1","arg2","arg3"))); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_013w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_013w.phpt index 83b8b5a132b4..379533251aaa 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_013w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_013w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoStringMultiOccurs(array("inputStringMultiOccurs"=>array("arg1",NULL,"arg3"))); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt index 5f8d8a8e5c7f..79910a389dc7 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt @@ -15,8 +15,8 @@ $struct2 = new SOAPComplexType('arg',34,325.325); $struct3 = new SOAPComplexType('arg',34,325.325); $client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoComplexTypeMultiOccurs(array("inputComplexTypeMultiOccurs"=>array($struct1,$struct2,$struct3))); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt index ee80b0aceb3d..2fe0e9e17492 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt @@ -14,8 +14,8 @@ $struct1 = new SOAPComplexType('arg',34,325.325); $struct2 = new SOAPComplexType('arg',34,325.325); $client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoComplexTypeMultiOccurs(array("inputComplexTypeMultiOccurs"=>array($struct1,null,$struct2))); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_016w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_016w.phpt index 289173826111..df1c027de124 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_016w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_016w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoDecimal(array("inputDecimal"=>"123456789.123456789")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_017w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_017w.phpt index 87e3ad8a6db0..8b0108781118 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_017w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_017w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoBoolean(array("inputBoolean"=>true)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_018w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_018w.phpt index 539f3333a3cc..b92b0461a4ae 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_018w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_018w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoHexBinary(array("inputHexBinary"=>"\x80\xFF\x00\x01\x7F")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_019w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_019w.phpt index f3c1c97227a4..c0e9c0a1c406 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_019w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_019w.phpt @@ -13,8 +13,8 @@ class SOAPComplexType { $struct = new SOAPComplexType('arg',34,325.325); $client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoComplexTypeAsSimpleTypes(array("inputComplexType"=>$struct)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_020w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_020w.phpt index 43f5ceb2f469..cb26ebf89f3c 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_020w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_020w.phpt @@ -14,8 +14,8 @@ $struct = new SOAPComplexType('arg',34,325.325); unset($struct->varString); $client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoComplexTypeAsSimpleTypes(array("inputComplexType"=>$struct)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_021w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_021w.phpt index fd460b713098..9ed2c7661f8c 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_021w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_021w.phpt @@ -11,8 +11,8 @@ $client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exc $client->echoSimpleTypesAsComplexType(array("inputInteger"=>34, "inputFloat"=>12.345, "inputString"=>"arg")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_022w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_022w.phpt index 0ad6888f784d..6097889f61b1 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_022w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_022w.phpt @@ -10,8 +10,8 @@ soap.wsdl_cache_enabled=0 $client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoSimpleTypesAsComplexType(array("inputInteger"=>34, "inputFloat"=>12.345)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_023w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_023w.phpt index fb1b62426f3f..73e5ac0eafdb 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_023w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_023w.phpt @@ -18,8 +18,8 @@ class SOAPComplexTypeComplexType { $struct = new SOAPComplexTypeComplexType("arg",34,12.345,new SOAPComplexType("arg",43,54.321)); $client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoNestedComplexType(array("inputComplexType"=>$struct)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_024w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_024w.phpt index 081bee0e05b6..a1e7b3140e69 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_024w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_024w.phpt @@ -16,8 +16,8 @@ $struct = new SOAPComplexTypeComplexType("arg",34,12.345,NULL); unset($struct->varComplexType); $client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoNestedComplexType(array("inputComplexType"=>$struct)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_025w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_025w.phpt index a55e7bf42fe1..e26f35d29672 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_025w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_025w.phpt @@ -15,8 +15,8 @@ class SOAPMultiOccursComplexType { $struct = new SOAPMultiOccursComplexType("arg",34,12.345,array("red","green","blue")); $client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoNestedMultiOccurs(array("inputComplexType"=>$struct)); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_026w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_026w.phpt index 77b374236ab1..92c66292185b 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_026w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_026w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoChoice(array("inputChoice"=>(object)array("name1"=>"Hello World"))); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_027w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_027w.phpt index df4e0081d36d..c33753f9f18a 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_027w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_027w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoEnum(array("inputEnum"=>"bitTwo")); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_028w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_028w.phpt index d717349e4f0c..158e434debc9 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_028w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_028w.phpt @@ -13,8 +13,8 @@ class SOAPComplexType { $struct = new SOAPComplexType('arg',34,325.325); $client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoAnyType(array('inputAnyType'=>new SoapVar($struct,SOAP_ENC_OBJECT,"SOAPComplexType","http://soapinterop.org/xsd"))); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_029w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_029w.phpt index 52f9dee604ab..517b217c98fd 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_029w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_029w.phpt @@ -8,8 +8,8 @@ soap.wsdl_cache_enabled=0 1,"exceptions"=>0)); $client->echoAnyElement(array("inputAny"=>array("any"=>"Hello World"))); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_030w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_030w.phpt index cc5c5e608a78..0a9850a5945e 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_030w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_030w.phpt @@ -9,8 +9,8 @@ soap.wsdl_cache_enabled=0 $hdr = new SoapHeader("http://soapinterop.org/","echoMeStringRequest", array("varString"=>"Hello World"), true); $client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->__soapCall("echoVoidSoapHeader",array(),null,$hdr); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_031w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_031w.phpt index d0255f1de547..37792d05f0b0 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_031w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_031w.phpt @@ -9,8 +9,8 @@ soap.wsdl_cache_enabled=0 $hdr = new SoapHeader("http://soapinterop.org/","echoMeStringRequest", array(), true); $client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->__soapCall("echoVoidSoapHeader",array(),null,$hdr); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_032w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_032w.phpt index 57b3292764c1..95328c29908b 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_032w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_032w.phpt @@ -10,8 +10,8 @@ soap.wsdl_cache_enabled=0 $hdr = new SoapHeader("http://soapinterop.org/","echoMeComplexTypeRequest", array("varInt"=>34,"varString"=>"arg","varFloat"=>12.345), true); $client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->__soapCall("echoVoidSoapHeader",array(),null,$hdr); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_033w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_033w.phpt index 677641c98153..329d38227027 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_033w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_033w.phpt @@ -10,8 +10,8 @@ soap.wsdl_cache_enabled=0 $hdr = new SoapHeader("http://soapinterop.org/","echoMeComplexTypeRequest", array("varInt"=>34,"varFloat"=>12.345), true); $client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->__soapCall("echoVoidSoapHeader",array(),null,$hdr); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_034w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_034w.phpt index cbb3b4ed3487..730905e1ea30 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_034w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_034w.phpt @@ -9,8 +9,8 @@ soap.wsdl_cache_enabled=0 $hdr = new SoapHeader("http://soapinterop.org/","echoMeStringRequest", array("varString"=>"Hello World"), true, SOAP_ACTOR_NEXT); $client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->__soapCall("echoVoidSoapHeader",array(),null,$hdr); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_035w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_035w.phpt index 0e2674c9bf4e..7c7595b57d27 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_035w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_035w.phpt @@ -10,8 +10,8 @@ soap.wsdl_cache_enabled=0 $hdr = new SoapHeader("http://soapinterop.org/","echoMeComplexTypeRequest", array("varInt"=>34,"varString"=>"arg","varFloat"=>12.345), true, SOAP_ACTOR_NEXT); $client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->__soapCall("echoVoidSoapHeader",array(),null,$hdr); -echo $client->__getlastrequest(); -$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +echo $client->__getLastRequest(); +$HTTP_RAW_POST_DATA = $client->__getLastRequest(); include("round4_groupI_xsd.inc"); echo "ok\n"; ?> diff --git a/ext/soap/tests/schema/test_schema.inc b/ext/soap/tests/schema/test_schema.inc index a0ba2c4dc1e2..5d55f6915790 100644 --- a/ext/soap/tests/schema/test_schema.inc +++ b/ext/soap/tests/schema/test_schema.inc @@ -57,12 +57,12 @@ EOF; ini_set("soap.wsdl_cache_enabled",0); $x = new SoapClient($fname, array("trace"=>1,"exceptions"=>0,"features"=>$features)); $y = new SoapServer($fname, array("features"=>$features)); - $y->addfunction("test"); + $y->addFunction("test"); unlink($fname); $x->test($param); $xml = xml_parser_create(); - $req = $x->__getlastrequest(); + $req = $x->__getLastRequest(); if ($style == "rpc") { $HTTP_RAW_POST_DATA = $req; ob_start(); diff --git a/ext/soap/tests/server001.phpt b/ext/soap/tests/server001.phpt index 90a09aea4804..6f0aff34f7c4 100644 --- a/ext/soap/tests/server001.phpt +++ b/ext/soap/tests/server001.phpt @@ -8,8 +8,8 @@ function test() { return "Hello World"; } -$server = new soapserver(null,array('uri'=>"http://testuri.org")); -$server->addfunction("test"); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->addFunction("test"); $HTTP_RAW_POST_DATA = << diff --git a/ext/soap/tests/server002.phpt b/ext/soap/tests/server002.phpt index a331fb1f2aef..b6a0adbea5f6 100644 --- a/ext/soap/tests/server002.phpt +++ b/ext/soap/tests/server002.phpt @@ -8,8 +8,8 @@ function Add($x,$y) { return $x+$y; } -$server = new soapserver(null,array('uri'=>"http://testuri.org")); -$server->addfunction("Add"); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->addFunction("Add"); $HTTP_RAW_POST_DATA = << diff --git a/ext/soap/tests/server003.phpt b/ext/soap/tests/server003.phpt index c278ca23a195..bff55957ada2 100644 --- a/ext/soap/tests/server003.phpt +++ b/ext/soap/tests/server003.phpt @@ -4,8 +4,8 @@ SOAP Server 3: all functions soap --FILE-- "http://testuri.org")); -$server->addfunction(SOAP_FUNCTIONS_ALL); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->addFunction(SOAP_FUNCTIONS_ALL); $HTTP_RAW_POST_DATA = << diff --git a/ext/soap/tests/server004.phpt b/ext/soap/tests/server004.phpt index 87176219f70e..c4f7606d5dca 100644 --- a/ext/soap/tests/server004.phpt +++ b/ext/soap/tests/server004.phpt @@ -11,8 +11,8 @@ function Sub($x,$y) { return $x-$y; } -$server = new soapserver(null,array('uri'=>"http://testuri.org")); -$server->addfunction(array("Sub","Add")); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->addFunction(array("Sub","Add")); $HTTP_RAW_POST_DATA = << diff --git a/ext/soap/tests/server005.phpt b/ext/soap/tests/server005.phpt index 0a367933e9ba..e40db77fedc8 100644 --- a/ext/soap/tests/server005.phpt +++ b/ext/soap/tests/server005.phpt @@ -10,8 +10,8 @@ class Foo { } } -$server = new soapserver(null,array('uri'=>"http://testuri.org")); -$server->setclass("Foo"); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->setClass("Foo"); $HTTP_RAW_POST_DATA = << diff --git a/ext/soap/tests/server006.phpt b/ext/soap/tests/server006.phpt index 65783aba6244..96a79d7a340a 100644 --- a/ext/soap/tests/server006.phpt +++ b/ext/soap/tests/server006.phpt @@ -16,8 +16,8 @@ class Foo { } } -$server = new soapserver(null,array('uri'=>"http://testuri.org")); -$server->setclass("Foo","Hello"); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->setClass("Foo","Hello"); $HTTP_RAW_POST_DATA = << diff --git a/ext/soap/tests/server007.phpt b/ext/soap/tests/server007.phpt index 9ee8edc45d42..16e1b1a04b92 100644 --- a/ext/soap/tests/server007.phpt +++ b/ext/soap/tests/server007.phpt @@ -11,9 +11,9 @@ function Sub($x,$y) { return $x-$y; } -$server = new soapserver(null,array('uri'=>"http://testuri.org")); -$server->addfunction(array("Sub","Add")); -var_dump($server->getfunctions()); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->addFunction(array("Sub","Add")); +var_dump($server->getFunctions()); echo "ok\n"; ?> --EXPECT-- diff --git a/ext/soap/tests/server008.phpt b/ext/soap/tests/server008.phpt index 20309da1cf21..890ddd5bdd9d 100644 --- a/ext/soap/tests/server008.phpt +++ b/ext/soap/tests/server008.phpt @@ -14,9 +14,9 @@ class Foo { } } -$server = new soapserver(null,array('uri'=>"http://testuri.org")); -$server->setclass("Foo"); -var_dump($server->getfunctions()); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->setClass("Foo"); +var_dump($server->getFunctions()); echo "ok\n"; ?> --EXPECT-- diff --git a/ext/soap/tests/server009.phpt b/ext/soap/tests/server009.phpt index f91d3eecfd13..8518796cf21f 100644 --- a/ext/soap/tests/server009.phpt +++ b/ext/soap/tests/server009.phpt @@ -16,9 +16,9 @@ class foo { } } -$server = new soapserver(null,array('uri'=>"http://testuri.org")); -$server->setclass("foo"); -$server->setpersistence(SOAP_PERSISTENCE_SESSION); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->setClass("foo"); +$server->setPersistence(SOAP_PERSISTENCE_SESSION); ob_start(); $HTTP_RAW_POST_DATA = <<"http://testuri.org")); -$server->setclass("foo"); -$server->setpersistence(SOAP_PERSISTENCE_REQUEST); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->setClass("foo"); +$server->setPersistence(SOAP_PERSISTENCE_REQUEST); ob_start(); diff --git a/ext/soap/tests/server011.phpt b/ext/soap/tests/server011.phpt index f236ec3affc5..ba26f72847be 100644 --- a/ext/soap/tests/server011.phpt +++ b/ext/soap/tests/server011.phpt @@ -18,7 +18,7 @@ function Add($x,$y) { return $x+$y; } -$server = new soapserver(__DIR__."/test.wsdl"); +$server = new SoapServer(__DIR__."/test.wsdl"); ob_start(); $server->handle(); $wsdl = ob_get_contents(); diff --git a/ext/soap/tests/server012.phpt b/ext/soap/tests/server012.phpt index 703aefbaa787..44bcb14734ac 100644 --- a/ext/soap/tests/server012.phpt +++ b/ext/soap/tests/server012.phpt @@ -16,8 +16,8 @@ function Add($x,$y) { return $x+$y; } -$server = new soapserver(null,array('uri'=>"http://testuri.org")); -$server->addfunction("Add"); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->addFunction("Add"); $server->handle(); echo "ok\n"; ?> diff --git a/ext/soap/tests/server013.phpt b/ext/soap/tests/server013.phpt index d1b6de2b1299..1d0bec7c56d0 100644 --- a/ext/soap/tests/server013.phpt +++ b/ext/soap/tests/server013.phpt @@ -4,7 +4,7 @@ SOAP Server 13: array handling soap --FILE-- "http://testuri.org")); -$server->addfunction("Sum"); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->addFunction("sum"); $HTTP_RAW_POST_DATA = << diff --git a/ext/soap/tests/server014.phpt b/ext/soap/tests/server014.phpt index 9e95569509a7..8e0bf26d5f89 100644 --- a/ext/soap/tests/server014.phpt +++ b/ext/soap/tests/server014.phpt @@ -9,8 +9,8 @@ function Add($x,$y) { return $x+$y; } -$server = new soapserver(null,array('uri'=>"http://testuri.org")); -$server->addfunction("Add"); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->addFunction("Add"); $HTTP_RAW_POST_DATA = << diff --git a/ext/soap/tests/server015.phpt b/ext/soap/tests/server015.phpt index 78d02ed1019a..0a2b76667d9a 100644 --- a/ext/soap/tests/server015.phpt +++ b/ext/soap/tests/server015.phpt @@ -8,8 +8,8 @@ function test() { return "Hello World"; } -$server = new soapserver(null,array('uri'=>"http://testuri.org")); -$server->addfunction("test"); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->addFunction("test"); $envelope = << diff --git a/ext/soap/tests/server016.phpt b/ext/soap/tests/server016.phpt index 29448e76f1c4..a4819ca293bb 100644 --- a/ext/soap/tests/server016.phpt +++ b/ext/soap/tests/server016.phpt @@ -9,8 +9,8 @@ function test() { $server->fault("MyFault","My fault string"); } -$server = new soapserver(null,array('uri'=>"http://testuri.org")); -$server->addfunction("test"); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->addFunction("test"); $HTTP_RAW_POST_DATA = << diff --git a/ext/soap/tests/server017.phpt b/ext/soap/tests/server017.phpt index f072a99b344f..cc601347519f 100644 --- a/ext/soap/tests/server017.phpt +++ b/ext/soap/tests/server017.phpt @@ -8,8 +8,8 @@ function test() { return new SoapFault("MyFault","My fault string"); } -$server = new soapserver(null,array('uri'=>"http://testuri.org")); -$server->addfunction("test"); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->addFunction("test"); $HTTP_RAW_POST_DATA = << diff --git a/ext/soap/tests/server018.phpt b/ext/soap/tests/server018.phpt index 5dd9e3afe5ad..aa72b84a1eb0 100644 --- a/ext/soap/tests/server018.phpt +++ b/ext/soap/tests/server018.phpt @@ -8,8 +8,8 @@ function test() { throw new SoapFault("MyFault","My fault string"); } -$server = new soapserver(null,array('uri'=>"http://testuri.org")); -$server->addfunction("test"); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->addFunction("test"); $HTTP_RAW_POST_DATA = << diff --git a/ext/soap/tests/server019.phpt b/ext/soap/tests/server019.phpt index 7f92a1b84c69..81ce74dd1237 100644 --- a/ext/soap/tests/server019.phpt +++ b/ext/soap/tests/server019.phpt @@ -26,8 +26,8 @@ function test() { return "Hello World"; } -$server = new soapserver(null,array('uri'=>"http://testuri.org")); -$server->addfunction("test"); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->addFunction("test"); $server->handle(); echo "ok\n"; ?> diff --git a/ext/soap/tests/server020.phpt b/ext/soap/tests/server020.phpt index d98f7fdd1f8b..2deba8b81ed7 100644 --- a/ext/soap/tests/server020.phpt +++ b/ext/soap/tests/server020.phpt @@ -27,8 +27,8 @@ function test() { return "Hello World"; } -$server = new soapserver(null,array('uri'=>"http://testuri.org")); -$server->addfunction("test"); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->addFunction("test"); $server->handle(); echo "ok\n"; ?> diff --git a/ext/soap/tests/server021.phpt b/ext/soap/tests/server021.phpt index d7bdef7a01a9..fc0eff1ed3ab 100644 --- a/ext/soap/tests/server021.phpt +++ b/ext/soap/tests/server021.phpt @@ -14,8 +14,8 @@ class Foo { } } -$server = new soapserver(null,array('uri'=>"http://testuri.org")); -$server->setclass("Foo"); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->setClass("Foo"); $HTTP_RAW_POST_DATA = << diff --git a/ext/soap/tests/server022.phpt b/ext/soap/tests/server022.phpt index 4fdc21292da2..120229a02328 100644 --- a/ext/soap/tests/server022.phpt +++ b/ext/soap/tests/server022.phpt @@ -15,8 +15,8 @@ function test() { throw new MyFault; } -$server = new soapserver(null,array('uri'=>"http://testuri.org")); -$server->addfunction("test"); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->addFunction("test"); $HTTP_RAW_POST_DATA = << diff --git a/ext/soap/tests/server023.phpt b/ext/soap/tests/server023.phpt index fec253f798aa..a0bbc86592fe 100644 --- a/ext/soap/tests/server023.phpt +++ b/ext/soap/tests/server023.phpt @@ -11,8 +11,8 @@ function test() { return "Hello Body!"; } -$server = new soapserver(null,array('uri'=>"http://testuri.org")); -$server->addfunction("test"); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->addFunction("test"); $HTTP_RAW_POST_DATA = << diff --git a/ext/soap/tests/server024.phpt b/ext/soap/tests/server024.phpt index 4cee7c85b241..6b050f86f5f4 100644 --- a/ext/soap/tests/server024.phpt +++ b/ext/soap/tests/server024.phpt @@ -23,8 +23,8 @@ function test() { return "Hello Body!"; } -$server = new soapserver(null,array('uri'=>"http://testuri.org")); -$server->addfunction("test"); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->addFunction("test"); $HTTP_RAW_POST_DATA = << diff --git a/ext/soap/tests/server025.phpt b/ext/soap/tests/server025.phpt index 6d310a8ecfbc..b0370b0921c3 100644 --- a/ext/soap/tests/server025.phpt +++ b/ext/soap/tests/server025.phpt @@ -25,8 +25,8 @@ function test() { return "Hello Body!"; } -$server = new soapserver(__DIR__."/server025.wsdl"); -$server->addfunction("test"); +$server = new SoapServer(__DIR__."/server025.wsdl"); +$server->addFunction("test"); $HTTP_RAW_POST_DATA = << diff --git a/ext/soap/tests/server026.phpt b/ext/soap/tests/server026.phpt index 7d69aa3f17cd..c7a5da6e8d25 100644 --- a/ext/soap/tests/server026.phpt +++ b/ext/soap/tests/server026.phpt @@ -11,7 +11,7 @@ class Foo { } $foo = new Foo(); -$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); $server->setObject($foo); $HTTP_RAW_POST_DATA = <<"http://testuri.org")); $server->setObject($foo); -var_dump($server->getfunctions()); +var_dump($server->getFunctions()); echo "ok\n"; ?> --EXPECT-- diff --git a/ext/soap/tests/server029.phpt b/ext/soap/tests/server029.phpt index db693b3df92e..22792253f086 100644 --- a/ext/soap/tests/server029.phpt +++ b/ext/soap/tests/server029.phpt @@ -29,8 +29,8 @@ function test() { return "Hello World"; } -$server = new soapserver(null,array('uri'=>"http://testuri.org")); -$server->addfunction("test"); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->addFunction("test"); $server->handle(); echo "ok\n"; ?> diff --git a/ext/soap/tests/soap12/soap12-test.inc b/ext/soap/tests/soap12/soap12-test.inc index 550494e51655..b022e31b35e6 100644 --- a/ext/soap/tests/soap12/soap12-test.inc +++ b/ext/soap/tests/soap12/soap12-test.inc @@ -123,7 +123,7 @@ class Soap12test { } ini_set("soap.wsdl_cache_enabled",0); -$server = new soapserver(dirname(__FILE__)."/soap12-test.wsdl", array('soap_version'=>SOAP_1_2,'actor'=>"http://example.org/ts-tests/C")); +$server = new SoapServer(dirname(__FILE__)."/soap12-test.wsdl", array('soap_version'=>SOAP_1_2,'actor'=>"http://example.org/ts-tests/C")); $server->setClass("Soap12test"); $server->handle($HTTP_RAW_POST_DATA); diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c index 0610e79196f9..f554ce0c1766 100644 --- a/ext/spl/php_spl.c +++ b/ext/spl/php_spl.c @@ -40,16 +40,7 @@ ZEND_TLS zend_string *spl_autoload_extensions; static zend_class_entry * spl_find_ce_by_name(zend_string *name, bool autoload) { - zend_class_entry *ce; - - if (!autoload) { - zend_string *lc_name = zend_string_tolower(name); - - ce = zend_hash_find_ptr(EG(class_table), lc_name); - zend_string_release(lc_name); - } else { - ce = zend_lookup_class(name); - } + zend_class_entry *ce = zend_lookup_class_ex(name, autoload ? 0 : ZEND_FETCH_CLASS_NO_AUTOLOAD); if (ce == NULL) { php_error_docref(NULL, E_WARNING, "Class %s does not exist%s", ZSTR_VAL(name), autoload ? " and could not be loaded" : ""); return NULL; @@ -258,14 +249,14 @@ PHP_FUNCTION(spl_classes) } /* }}} */ -static bool spl_autoload(zend_string *lc_name, const char *ext, size_t ext_len) /* {{{ */ +static bool spl_autoload(zend_string *class_name, const char *ext, size_t ext_len) /* {{{ */ { zend_string *class_file; zval dummy; zend_file_handle file_handle; zval result; - class_file = zend_string_concat2(ZSTR_VAL(lc_name), ZSTR_LEN(lc_name), ext, ext_len); + class_file = zend_string_concat2(ZSTR_VAL(class_name), ZSTR_LEN(class_name), ext, ext_len); #if DEFAULT_SLASH != '\\' { @@ -303,7 +294,7 @@ static bool spl_autoload(zend_string *lc_name, const char *ext, size_t ext_len) efree(new_op_array); zval_ptr_dtor(&result); - ret = zend_hash_exists(EG(class_table), lc_name); + ret = zend_hash_exists(EG(class_table), class_name); } } zend_destroy_file_handle(&file_handle); @@ -316,7 +307,7 @@ PHP_FUNCTION(spl_autoload) { size_t pos_len, pos1_len; char *pos, *pos1; - zend_string *class_name, *lc_name, *file_exts = NULL; + zend_string *class_name, *file_exts = NULL; if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|S!", &class_name, &file_exts) == FAILURE) { RETURN_THROWS(); @@ -334,7 +325,6 @@ PHP_FUNCTION(spl_autoload) pos_len = ZSTR_LEN(file_exts); } - lc_name = zend_string_tolower(class_name); while (pos && *pos && !EG(exception)) { pos1 = strchr(pos, ','); if (pos1) { @@ -342,13 +332,12 @@ PHP_FUNCTION(spl_autoload) } else { pos1_len = pos_len; } - if (spl_autoload(lc_name, pos, pos1_len)) { + if (spl_autoload(class_name, pos, pos1_len)) { break; /* loaded */ } pos = pos1 ? pos1 + 1 : NULL; pos_len = pos1? pos_len - pos1_len - 1 : 0; } - zend_string_release(lc_name); } /* }}} */ /* {{{ Register and return default file extensions for spl_autoload */ @@ -384,9 +373,13 @@ PHP_FUNCTION(spl_autoload_call) RETURN_THROWS(); } - zend_string *lc_name = zend_string_tolower(class_name); - zend_perform_class_autoload(class_name, lc_name); - zend_string_release(lc_name); + if (ZSTR_VAL(class_name)[0] == '\\') { + zend_string *stripped = zend_string_init(ZSTR_VAL(class_name) + 1, ZSTR_LEN(class_name) - 1, 0); + zend_perform_class_autoload(stripped); + zend_string_release(stripped); + } else { + zend_perform_class_autoload(class_name); + } } /* }}} */ /* {{{ Register given function as autoloader */ diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index 39d27bc40105..37676a597c73 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -203,19 +203,19 @@ static zend_object *spl_array_object_new_ex(zend_class_entry *class_type, zend_o ZEND_ASSERT(parent); if (inherited) { - intern->fptr_offset_get = zend_hash_str_find_ptr(&class_type->function_table, "offsetget", sizeof("offsetget") - 1); + intern->fptr_offset_get = zend_hash_str_find_ptr(&class_type->function_table, "offsetGet", sizeof("offsetGet") - 1); if (intern->fptr_offset_get->common.scope == parent) { intern->fptr_offset_get = NULL; } - intern->fptr_offset_set = zend_hash_str_find_ptr(&class_type->function_table, "offsetset", sizeof("offsetset") - 1); + intern->fptr_offset_set = zend_hash_str_find_ptr(&class_type->function_table, "offsetSet", sizeof("offsetSet") - 1); if (intern->fptr_offset_set->common.scope == parent) { intern->fptr_offset_set = NULL; } - intern->fptr_offset_has = zend_hash_str_find_ptr(&class_type->function_table, "offsetexists", sizeof("offsetexists") - 1); + intern->fptr_offset_has = zend_hash_str_find_ptr(&class_type->function_table, "offsetExists", sizeof("offsetExists") - 1); if (intern->fptr_offset_has->common.scope == parent) { intern->fptr_offset_has = NULL; } - intern->fptr_offset_del = zend_hash_str_find_ptr(&class_type->function_table, "offsetunset", sizeof("offsetunset") - 1); + intern->fptr_offset_del = zend_hash_str_find_ptr(&class_type->function_table, "offsetUnset", sizeof("offsetUnset") - 1); if (intern->fptr_offset_del->common.scope == parent) { intern->fptr_offset_del = NULL; } diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index f662bb8a1dbd..ebe2ec9d208a 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -371,7 +371,7 @@ static zend_result spl_filesystem_file_open(spl_filesystem_object *intern, bool intern->u.file.escape = (unsigned char) '\\'; intern->u.file.is_escape_default = true; - intern->u.file.func_getCurr = zend_hash_str_find_ptr(&intern->std.ce->function_table, "getcurrentline", sizeof("getcurrentline") - 1); + intern->u.file.func_getCurr = zend_hash_str_find_ptr(&intern->std.ce->function_table, "getCurrentLine", sizeof("getCurrentLine") - 1); return SUCCESS; } /* }}} */ diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c index 86652ae4f5cc..c6f2bd46e4fa 100644 --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@ -283,7 +283,7 @@ static void spl_recursive_it_move_forward_ex(spl_recursive_it_object *object, zv zend_object *obj = Z_OBJ(object->iterators[object->level].zobject); zend_function **cache = &object->iterators[object->level].haschildren; - zend_call_method_with_0_params(obj, ce, cache, "haschildren", &retval); + zend_call_method_with_0_params(obj, ce, cache, "hasChildren", &retval); } if (EG(exception)) { if (!(object->flags & RIT_CATCH_GET_CHILD)) { @@ -318,7 +318,7 @@ static void spl_recursive_it_move_forward_ex(spl_recursive_it_object *object, zv } } if (object->nextElement) { - zend_call_method_with_0_params(Z_OBJ_P(zthis), object->ce, &object->nextElement, "nextelement", NULL); + zend_call_method_with_0_params(Z_OBJ_P(zthis), object->ce, &object->nextElement, "nextElement", NULL); } object->iterators[object->level].state = RS_NEXT; if (EG(exception)) { @@ -331,7 +331,7 @@ static void spl_recursive_it_move_forward_ex(spl_recursive_it_object *object, zv return /* self */; case RS_SELF: if (object->nextElement && (object->mode == RIT_SELF_FIRST || object->mode == RIT_CHILD_FIRST)) { - zend_call_method_with_0_params(Z_OBJ_P(zthis), object->ce, &object->nextElement, "nextelement", NULL); + zend_call_method_with_0_params(Z_OBJ_P(zthis), object->ce, &object->nextElement, "nextElement", NULL); } if (object->mode == RIT_SELF_FIRST) { object->iterators[object->level].state = RS_CHILD; @@ -347,7 +347,7 @@ static void spl_recursive_it_move_forward_ex(spl_recursive_it_object *object, zv zend_object *obj = Z_OBJ(object->iterators[object->level].zobject); zend_function **cache = &object->iterators[object->level].getchildren; - zend_call_method_with_0_params(obj, ce, cache, "getchildren", &child); + zend_call_method_with_0_params(obj, ce, cache, "getChildren", &child); } if (EG(exception)) { @@ -393,7 +393,7 @@ static void spl_recursive_it_move_forward_ex(spl_recursive_it_object *object, zv sub_iter->funcs->rewind(sub_iter); } if (object->beginChildren) { - zend_call_method_with_0_params(Z_OBJ_P(zthis), object->ce, &object->beginChildren, "beginchildren", NULL); + zend_call_method_with_0_params(Z_OBJ_P(zthis), object->ce, &object->beginChildren, "beginChildren", NULL); if (EG(exception)) { if (!(object->flags & RIT_CATCH_GET_CHILD)) { return; @@ -407,7 +407,7 @@ static void spl_recursive_it_move_forward_ex(spl_recursive_it_object *object, zv /* no more elements */ if (object->level > 0) { if (object->endChildren) { - zend_call_method_with_0_params(Z_OBJ_P(zthis), object->ce, &object->endChildren, "endchildren", NULL); + zend_call_method_with_0_params(Z_OBJ_P(zthis), object->ce, &object->endChildren, "endChildren", NULL); if (EG(exception)) { if (!(object->flags & RIT_CATCH_GET_CHILD)) { return; @@ -441,7 +441,7 @@ static void spl_recursive_it_rewind_ex(spl_recursive_it_object *object, zval *zt zend_iterator_dtor(sub_iter); zval_ptr_dtor(&object->iterators[object->level--].zobject); if (!EG(exception) && (!object->endChildren || object->endChildren->common.scope != spl_ce_RecursiveIteratorIterator)) { - zend_call_method_with_0_params(Z_OBJ_P(zthis), object->ce, &object->endChildren, "endchildren", NULL); + zend_call_method_with_0_params(Z_OBJ_P(zthis), object->ce, &object->endChildren, "endChildren", NULL); } } object->iterators = erealloc(object->iterators, sizeof(spl_sub_iterator)); @@ -502,7 +502,7 @@ static zend_object_iterator *spl_recursive_it_get_iterator(zend_class_entry *ce, static zend_result spl_get_iterator_from_aggregate(zval *retval, zend_class_entry *ce, zend_object *obj) { zend_function **getiterator_cache = ce->iterator_funcs_ptr ? &ce->iterator_funcs_ptr->zf_new_iterator : NULL; - zend_call_method_with_0_params(obj, ce, getiterator_cache, "getiterator", retval); + zend_call_method_with_0_params(obj, ce, getiterator_cache, "getIterator", retval); if (EG(exception)) { return FAILURE; } @@ -610,31 +610,31 @@ static void spl_recursive_it_it_construct(INTERNAL_FUNCTION_PARAMETERS, zend_cla intern->in_iteration = false; intern->ce = Z_OBJCE_P(object); - intern->beginIteration = zend_hash_str_find_ptr(&intern->ce->function_table, "beginiteration", sizeof("beginiteration") - 1); + intern->beginIteration = zend_hash_str_find_ptr(&intern->ce->function_table, "beginIteration", sizeof("beginIteration") - 1); if (intern->beginIteration->common.scope == ce_base) { intern->beginIteration = NULL; } - intern->endIteration = zend_hash_str_find_ptr(&intern->ce->function_table, "enditeration", sizeof("enditeration") - 1); + intern->endIteration = zend_hash_str_find_ptr(&intern->ce->function_table, "endIteration", sizeof("endIteration") - 1); if (intern->endIteration->common.scope == ce_base) { intern->endIteration = NULL; } - intern->callHasChildren = zend_hash_str_find_ptr(&intern->ce->function_table, "callhaschildren", sizeof("callHasChildren") - 1); + intern->callHasChildren = zend_hash_str_find_ptr(&intern->ce->function_table, "callHasChildren", sizeof("callHasChildren") - 1); if (intern->callHasChildren->common.scope == ce_base) { intern->callHasChildren = NULL; } - intern->callGetChildren = zend_hash_str_find_ptr(&intern->ce->function_table, "callgetchildren", sizeof("callGetChildren") - 1); + intern->callGetChildren = zend_hash_str_find_ptr(&intern->ce->function_table, "callGetChildren", sizeof("callGetChildren") - 1); if (intern->callGetChildren->common.scope == ce_base) { intern->callGetChildren = NULL; } - intern->beginChildren = zend_hash_str_find_ptr(&intern->ce->function_table, "beginchildren", sizeof("beginchildren") - 1); + intern->beginChildren = zend_hash_str_find_ptr(&intern->ce->function_table, "beginChildren", sizeof("beginChildren") - 1); if (intern->beginChildren->common.scope == ce_base) { intern->beginChildren = NULL; } - intern->endChildren = zend_hash_str_find_ptr(&intern->ce->function_table, "endchildren", sizeof("endchildren") - 1); + intern->endChildren = zend_hash_str_find_ptr(&intern->ce->function_table, "endChildren", sizeof("endChildren") - 1); if (intern->endChildren->common.scope == ce_base) { intern->endChildren = NULL; } - intern->nextElement = zend_hash_str_find_ptr(&intern->ce->function_table, "nextelement", sizeof("nextElement") - 1); + intern->nextElement = zend_hash_str_find_ptr(&intern->ce->function_table, "nextElement", sizeof("nextElement") - 1); if (intern->nextElement->common.scope == ce_base) { intern->nextElement = NULL; } @@ -799,7 +799,7 @@ PHP_METHOD(RecursiveIteratorIterator, callHasChildren) if (Z_TYPE_P(zobject) == IS_UNDEF) { RETURN_FALSE; } else { - zend_call_method_with_0_params(Z_OBJ_P(zobject), ce, &object->iterators[object->level].haschildren, "haschildren", return_value); + zend_call_method_with_0_params(Z_OBJ_P(zobject), ce, &object->iterators[object->level].haschildren, "hasChildren", return_value); if (Z_TYPE_P(return_value) == IS_UNDEF) { RETURN_FALSE; } @@ -821,7 +821,7 @@ PHP_METHOD(RecursiveIteratorIterator, callGetChildren) if (Z_TYPE_P(zobject) == IS_UNDEF) { RETURN_NULL(); } else { - zend_call_method_with_0_params(Z_OBJ_P(zobject), ce, &object->iterators[object->level].getchildren, "getchildren", return_value); + zend_call_method_with_0_params(Z_OBJ_P(zobject), ce, &object->iterators[object->level].getchildren, "getChildren", return_value); if (Z_TYPE_P(return_value) == IS_UNDEF) { RETURN_NULL(); } @@ -991,7 +991,7 @@ static zend_string *spl_recursive_tree_iterator_get_prefix(spl_recursive_it_obje smart_str_append(&str, object->prefix[0]); for (level = 0; level < object->level; ++level) { - zend_call_method_with_0_params(Z_OBJ(object->iterators[level].zobject), object->iterators[level].ce, NULL, "hasnext", &has_next); + zend_call_method_with_0_params(Z_OBJ(object->iterators[level].zobject), object->iterators[level].ce, NULL, "hasNext", &has_next); if (Z_TYPE(has_next) != IS_UNDEF) { if (Z_TYPE(has_next) == IS_TRUE) { smart_str_append(&str, object->prefix[1]); @@ -1001,7 +1001,7 @@ static zend_string *spl_recursive_tree_iterator_get_prefix(spl_recursive_it_obje zval_ptr_dtor(&has_next); } } - zend_call_method_with_0_params(Z_OBJ(object->iterators[level].zobject), object->iterators[level].ce, NULL, "hasnext", &has_next); + zend_call_method_with_0_params(Z_OBJ(object->iterators[level].zobject), object->iterators[level].ce, NULL, "hasNext", &has_next); if (Z_TYPE(has_next) != IS_UNDEF) { if (Z_TYPE(has_next) == IS_TRUE) { smart_str_append(&str, object->prefix[3]); @@ -1649,7 +1649,7 @@ PHP_METHOD(RecursiveFilterIterator, hasChildren) SPL_FETCH_AND_CHECK_DUAL_IT(intern, ZEND_THIS); - zend_call_method_with_0_params(Z_OBJ(intern->inner.zobject), intern->inner.ce, NULL, "haschildren", return_value); + zend_call_method_with_0_params(Z_OBJ(intern->inner.zobject), intern->inner.ce, NULL, "hasChildren", return_value); } /* }}} */ /* {{{ Return the inner iterator's children contained in a RecursiveFilterIterator */ @@ -1662,7 +1662,7 @@ PHP_METHOD(RecursiveFilterIterator, getChildren) SPL_FETCH_AND_CHECK_DUAL_IT(intern, ZEND_THIS); zval childrens; - zend_call_method_with_0_params(Z_OBJ(intern->inner.zobject), intern->inner.ce, NULL, "getchildren", &childrens); + zend_call_method_with_0_params(Z_OBJ(intern->inner.zobject), intern->inner.ce, NULL, "getChildren", &childrens); if (Z_TYPE(childrens) == IS_UNDEF) { RETURN_THROWS(); } @@ -1684,7 +1684,7 @@ PHP_METHOD(RecursiveCallbackFilterIterator, getChildren) SPL_FETCH_AND_CHECK_DUAL_IT(intern, ZEND_THIS); zval params[2]; - zend_call_method_with_0_params(Z_OBJ(intern->inner.zobject), intern->inner.ce, NULL, "getchildren", ¶ms[0]); + zend_call_method_with_0_params(Z_OBJ(intern->inner.zobject), intern->inner.ce, NULL, "getChildren", ¶ms[0]); if (Z_TYPE(params[0]) == IS_UNDEF) { RETURN_THROWS(); } @@ -1953,7 +1953,7 @@ PHP_METHOD(RecursiveRegexIterator, getChildren) SPL_FETCH_AND_CHECK_DUAL_IT(intern, ZEND_THIS); - zend_call_method_with_0_params(Z_OBJ(intern->inner.zobject), intern->inner.ce, NULL, "getchildren", &retval); + zend_call_method_with_0_params(Z_OBJ(intern->inner.zobject), intern->inner.ce, NULL, "getChildren", &retval); if (EG(exception)) { zval_ptr_dtor(&retval); RETURN_THROWS(); @@ -2257,7 +2257,7 @@ static inline void spl_caching_it_next(spl_dual_it_object *intern) /* Recursion ? */ if (intern->dit_type == DIT_RecursiveCachingIterator) { zval retval; - zend_call_method_with_0_params(Z_OBJ(intern->inner.zobject), intern->inner.ce, NULL, "haschildren", &retval); + zend_call_method_with_0_params(Z_OBJ(intern->inner.zobject), intern->inner.ce, NULL, "hasChildren", &retval); if (EG(exception)) { zval_ptr_dtor(&retval); if (intern->u.caching.flags & CIT_CATCH_GET_CHILD) { @@ -2273,7 +2273,7 @@ static inline void spl_caching_it_next(spl_dual_it_object *intern) zval args[2]; /* Store the children in the first constructor argument */ - zend_call_method_with_0_params(Z_OBJ(intern->inner.zobject), intern->inner.ce, NULL, "getchildren", &args[0]); + zend_call_method_with_0_params(Z_OBJ(intern->inner.zobject), intern->inner.ce, NULL, "getChildren", &args[0]); if (EG(exception)) { zval_ptr_dtor(&args[0]); if (intern->u.caching.flags & CIT_CATCH_GET_CHILD) { diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c index 613bf5384dcb..15ef2fffd421 100644 --- a/ext/spl/spl_observer.c +++ b/ext/spl/spl_observer.c @@ -313,7 +313,7 @@ static zend_object *spl_object_storage_new_ex(zend_class_entry *class_type, zend /* Possible optimization: Cache these results with a map from class entry to IS_NULL/IS_PTR. * Or maybe just a single item with the result for the most recently loaded subclass. */ if (class_type != spl_ce_SplObjectStorage) { - zend_function *get_hash = zend_hash_str_find_ptr(&class_type->function_table, "gethash", sizeof("gethash") - 1); + zend_function *get_hash = zend_hash_str_find_ptr(&class_type->function_table, "getHash", sizeof("getHash") - 1); if (get_hash->common.scope != spl_ce_SplObjectStorage) { intern->fptr_get_hash = get_hash; } diff --git a/ext/spl/tests/SplFileInfo_001.phpt b/ext/spl/tests/SplFileInfo_001.phpt index 72060f0dba68..4f07652d94d7 100644 --- a/ext/spl/tests/SplFileInfo_001.phpt +++ b/ext/spl/tests/SplFileInfo_001.phpt @@ -2,7 +2,7 @@ Testing SplFileInfo calling the constructor twice --FILE-- __construct(1); echo "done!\n"; diff --git a/ext/spl/tests/SplFileObject/bug46053.phpt b/ext/spl/tests/SplFileObject/bug46053.phpt index a18705bb5e92..79e54b667361 100644 --- a/ext/spl/tests/SplFileObject/bug46053.phpt +++ b/ext/spl/tests/SplFileObject/bug46053.phpt @@ -3,8 +3,8 @@ Bug #46053 (SplFileObject::seek - Endless loop) --FILE-- getPathName(); +$x = new SplFileObject(__FILE__); +$x->getPathname(); $x->seek(10); $x->seek(0); var_dump(trim($x->fgets())); diff --git a/ext/spl/tests/SplFileObject/fileobject_003.phpt b/ext/spl/tests/SplFileObject/fileobject_003.phpt index 9758ec763418..4111290a5690 100644 --- a/ext/spl/tests/SplFileObject/fileobject_003.phpt +++ b/ext/spl/tests/SplFileObject/fileobject_003.phpt @@ -21,11 +21,11 @@ function test($name, $lc, $lp) try { $f = new SplFileObject($name); var_dump($name); - var_dump($f->getPathName()); - $l = substr($f->getPathName(), -1); + var_dump($f->getPathname()); + $l = substr($f->getPathname(), -1); var_dump($l != '/' && $l != '\\' && $l == $lc); - var_dump($f->getFileName()); - $l = substr($f->getFileName(), -1); + var_dump($f->getFilename()); + $l = substr($f->getFilename(), -1); var_dump($l != '/' && $l != '\\' && $l == $lc); var_dump($f->getPath()); $l = substr($f->getPath(), -1); @@ -35,7 +35,7 @@ function test($name, $lc, $lp) } try { $fo = $o->openFile(); - var_dump($fo->getPathName(), $fo->getFileName(), $fo->getPath()); + var_dump($fo->getPathname(), $fo->getFilename(), $fo->getPath()); } catch (LogicException $e) { echo "LogicException: ".$e->getMessage()."\n"; } diff --git a/ext/spl/tests/SplObjectStorage/SplObjectStorage_coalesce.phpt b/ext/spl/tests/SplObjectStorage/SplObjectStorage_coalesce.phpt index d4075018d341..841ec3beea9e 100644 --- a/ext/spl/tests/SplObjectStorage/SplObjectStorage_coalesce.phpt +++ b/ext/spl/tests/SplObjectStorage/SplObjectStorage_coalesce.phpt @@ -5,8 +5,8 @@ SplObjectStorage magic operators $i = 'dynamic'; $v = $i . '_'; $s = new SplObjectStorage(); -$o1 = new Stdclass; -$o2 = new Stdclass; +$o1 = new stdClass; +$o2 = new stdClass; var_dump($s[$o1] ?? 'default'); var_dump($s[$o1] ??= $i); var_dump($s[$o1] ??= null); diff --git a/ext/spl/tests/SplObjectStorage/SplObjectStorage_unserialize_nested.phpt b/ext/spl/tests/SplObjectStorage/SplObjectStorage_unserialize_nested.phpt index 97c87cdb3784..831ff7fba513 100644 --- a/ext/spl/tests/SplObjectStorage/SplObjectStorage_unserialize_nested.phpt +++ b/ext/spl/tests/SplObjectStorage/SplObjectStorage_unserialize_nested.phpt @@ -2,8 +2,8 @@ SPL: Test unserializing tested & linked storage --FILE-- a = $a; diff --git a/ext/spl/tests/SplObjectStorage/SplObjectStorage_var_dump.phpt b/ext/spl/tests/SplObjectStorage/SplObjectStorage_var_dump.phpt index 39a283caeddd..92192f7a1079 100644 --- a/ext/spl/tests/SplObjectStorage/SplObjectStorage_var_dump.phpt +++ b/ext/spl/tests/SplObjectStorage/SplObjectStorage_var_dump.phpt @@ -4,7 +4,7 @@ SPL: SplObjectStorage: recursive var_dump diff --git a/ext/spl/tests/SplObjectStorage/bug53144.phpt b/ext/spl/tests/SplObjectStorage/bug53144.phpt index f228f968dc32..4d8b2ee3d13b 100644 --- a/ext/spl/tests/SplObjectStorage/bug53144.phpt +++ b/ext/spl/tests/SplObjectStorage/bug53144.phpt @@ -3,8 +3,8 @@ Bug #53144 (Segfault in SplObjectStorage::removeAll) --FILE-- 0; $i--) { - $object = new StdClass(); + $object = new stdClass(); $a[] = $object; $b->offsetSet($object); } diff --git a/ext/spl/tests/SplObjectStorage/gh14639.phpt b/ext/spl/tests/SplObjectStorage/gh14639.phpt index 41260855b252..50400b5018a9 100644 --- a/ext/spl/tests/SplObjectStorage/gh14639.phpt +++ b/ext/spl/tests/SplObjectStorage/gh14639.phpt @@ -12,7 +12,7 @@ if (getenv("USE_ZEND_ALLOC") === "0") { 0; $i--) { - $object = new StdClass(); + $object = new stdClass(); $object->a = str_repeat("a", 2); $b->offsetSet($object); } diff --git a/ext/spl/tests/SplObjectStorage/observer_008.phpt b/ext/spl/tests/SplObjectStorage/observer_008.phpt index 36769c57d524..cd5f5d3396a8 100644 --- a/ext/spl/tests/SplObjectStorage/observer_008.phpt +++ b/ext/spl/tests/SplObjectStorage/observer_008.phpt @@ -4,9 +4,9 @@ SPL: SplObjectStorage addAll/removeAll offsetSet($o1); diff --git a/ext/spl/tests/autoloading/testclass b/ext/spl/tests/autoloading/TestClass similarity index 100% rename from ext/spl/tests/autoloading/testclass rename to ext/spl/tests/autoloading/TestClass diff --git a/ext/spl/tests/autoloading/testclass.class.inc b/ext/spl/tests/autoloading/TestClass.class.inc similarity index 100% rename from ext/spl/tests/autoloading/testclass.class.inc rename to ext/spl/tests/autoloading/TestClass.class.inc diff --git a/ext/spl/tests/autoloading/testclass.inc b/ext/spl/tests/autoloading/TestClass.inc similarity index 100% rename from ext/spl/tests/autoloading/testclass.inc rename to ext/spl/tests/autoloading/TestClass.inc diff --git a/ext/spl/tests/autoloading/testclass.php.inc b/ext/spl/tests/autoloading/TestClass.php.inc similarity index 100% rename from ext/spl/tests/autoloading/testclass.php.inc rename to ext/spl/tests/autoloading/TestClass.php.inc diff --git a/ext/spl/tests/autoloading/spl_autoload_001.phpt b/ext/spl/tests/autoloading/spl_autoload_001.phpt index befb96570950..021763c1395a 100644 --- a/ext/spl/tests/autoloading/spl_autoload_001.phpt +++ b/ext/spl/tests/autoloading/spl_autoload_001.phpt @@ -74,15 +74,15 @@ try { --EXPECTF-- ===EMPTY=== string(9) ".inc,.php" -%stestclass.inc +%sTestClass.inc Class TestClass could not be loaded ===()=== Class TestClass could not be loaded ===(1)=== Class TestClass could not be loaded ===(.inc,,.php.inc)=== -%stestclass -%stestclass.php.inc +%sTestClass +%sTestClass.php.inc Class TestClass could not be loaded ===()=== Class TestClass could not be loaded @@ -97,7 +97,7 @@ bool(false) ===LOAD=== TestFunc1(TestClass) TestFunc2(TestClass) -%stestclass.class.inc +%sTestClass.class.inc bool(true) ===NOFUNCTION=== spl_autoload_register(): Argument #1 ($callback) must be a valid callback or null, function "unavailable_autoload_function" not found or invalid function name diff --git a/ext/spl/tests/autoloading/spl_autoload_009.phpt b/ext/spl/tests/autoloading/spl_autoload_009.phpt index f12fd0af7e70..13dda73705a8 100644 --- a/ext/spl/tests/autoloading/spl_autoload_009.phpt +++ b/ext/spl/tests/autoloading/spl_autoload_009.phpt @@ -14,10 +14,10 @@ function my_autoload($name) spl_autoload_register("spl_autoload"); spl_autoload_register("my_autoload"); -$obj = new testclass; +$obj = new TestClass; ?> --EXPECTF-- -%stestclass.inc -%stestclass.class.inc +%sTestClass.inc +%sTestClass.class.inc bool(true) diff --git a/ext/spl/tests/autoloading/spl_autoload_call_basic.phpt b/ext/spl/tests/autoloading/spl_autoload_call_basic.phpt index 2bd65c22be4b..b69b1a1d536c 100644 --- a/ext/spl/tests/autoloading/spl_autoload_call_basic.phpt +++ b/ext/spl/tests/autoloading/spl_autoload_call_basic.phpt @@ -6,7 +6,7 @@ Jean-Marc Fontaine --FILE-- --EXPECTF-- -%stestclass.class.inc +%sTestClass.class.inc bool(true) diff --git a/ext/spl/tests/autoloading/spl_autoload_warn_on_false_do_throw.phpt b/ext/spl/tests/autoloading/spl_autoload_warn_on_false_do_throw.phpt index f16976e78ce2..a7708c5f9e13 100644 --- a/ext/spl/tests/autoloading/spl_autoload_warn_on_false_do_throw.phpt +++ b/ext/spl/tests/autoloading/spl_autoload_warn_on_false_do_throw.phpt @@ -3,7 +3,7 @@ spl_autoload_register() function - warn when using false as second argument for --FILE-- --EXPECTF-- Notice: spl_autoload_register(): Argument #2 ($do_throw) has been ignored, spl_autoload_register() will always throw in %s on line %d -%stestclass.class.inc +%sTestClass.class.inc bool(true) diff --git a/ext/spl/tests/bug31185.phpt b/ext/spl/tests/bug31185.phpt index 70ae1c00983d..f19396e3cb2d 100644 --- a/ext/spl/tests/bug31185.phpt +++ b/ext/spl/tests/bug31185.phpt @@ -40,7 +40,7 @@ catch (Exception $e) echo "CAUGHT: " . $e->getMessage() . "\n"; } -print_R($foo); +print_r($foo); ?> --EXPECT-- FooBar::offsetSet(0, 0) diff --git a/ext/spl/tests/bug36287.phpt b/ext/spl/tests/bug36287.phpt index 8ea9123eb8a4..660500e387f5 100644 --- a/ext/spl/tests/bug36287.phpt +++ b/ext/spl/tests/bug36287.phpt @@ -9,7 +9,7 @@ $idx = 0; foreach($it as $file) { echo "First\n"; - var_Dump($file->getFilename()); + var_dump($file->getFilename()); echo "Second\n"; var_dump($file->getFilename()); if (++$idx > 1) diff --git a/ext/spl/tests/bug45826.phpt b/ext/spl/tests/bug45826.phpt index 4cb6fa6483ea..bad73436f9eb 100644 --- a/ext/spl/tests/bug45826.phpt +++ b/ext/spl/tests/bug45826.phpt @@ -3,7 +3,7 @@ ArrayObject/ArrayIterator : serialization --FILE-- append($y); $o->append($y); $o->append($o); @@ -41,7 +41,7 @@ class ArrayObject2 extends ArrayObject { } $o = new ArrayObject2(); -$y = new StdClass; +$y = new stdClass; $o->append($y); $o->append($y); $o->append($o); diff --git a/ext/spl/tests/bug46051.phpt b/ext/spl/tests/bug46051.phpt index 535dd2ddaecc..825cff2313a8 100644 --- a/ext/spl/tests/bug46051.phpt +++ b/ext/spl/tests/bug46051.phpt @@ -3,13 +3,13 @@ Bug #46051 (SplFileInfo::openFile - memory overlap) --FILE-- openFile("", false, []); } catch (TypeError $e) { } -var_dump($x->getPathName()); +var_dump($x->getPathname()); ?> --EXPECTF-- string(%d) "%sbug46051.php" diff --git a/ext/spl/tests/bug46115.phpt b/ext/spl/tests/bug46115.phpt index 71207d8a25ee..da9ff82a6c20 100644 --- a/ext/spl/tests/bug46115.phpt +++ b/ext/spl/tests/bug46115.phpt @@ -3,7 +3,7 @@ Bug #46115 (Memory leak when calling a method using Reflection) --FILE-- invoke($h); ?> DONE diff --git a/ext/spl/tests/bug46160.phpt b/ext/spl/tests/bug46160.phpt index 3e03f094d376..e12ac584ac21 100644 --- a/ext/spl/tests/bug46160.phpt +++ b/ext/spl/tests/bug46160.phpt @@ -4,7 +4,7 @@ Bug #46160 (SPL - Memory leak when exception is throwed in offsetSet method) offsetSet(0, 0); } catch (Exception $e) { } diff --git a/ext/spl/tests/bug47534.phpt b/ext/spl/tests/bug47534.phpt index e0b48f44e3e6..74af64f52d35 100644 --- a/ext/spl/tests/bug47534.phpt +++ b/ext/spl/tests/bug47534.phpt @@ -2,7 +2,7 @@ SPL: RecursiveDirectoryIterator bug 47534 --FILE-- rewind(); echo gettype($it1->current())."\n"; diff --git a/ext/spl/tests/bug64228.phpt b/ext/spl/tests/bug64228.phpt index fd7b1b628bb8..1f9120c67512 100644 --- a/ext/spl/tests/bug64228.phpt +++ b/ext/spl/tests/bug64228.phpt @@ -8,7 +8,7 @@ $empty_dir = __DIR__ . "/empty"; $i = new RecursiveDirectoryIterator($empty_dir, FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO); // Note the absence of FilesystemIterator::SKIP_DOTS foreach ($i as $key => $value) { - $dirs[] = $value->getFileName(); + $dirs[] = $value->getFilename(); } @rmdir($empty_dir); diff --git a/ext/spl/tests/bug66834.phpt b/ext/spl/tests/bug66834.phpt index 864ac3725c29..851ba97b4d0a 100644 --- a/ext/spl/tests/bug66834.phpt +++ b/ext/spl/tests/bug66834.phpt @@ -55,22 +55,22 @@ echo "==== class with offsetExists() and offsetGet() ====\n"; $object = new ArrayObjectBoth($values); var_dump($object->offsetExists('foo'), isset($object['foo']), empty($object['foo'])); var_dump($object->offsetExists('bar'), isset($object['bar']), empty($object['bar'])); -var_dump($object->offsetexists('baz'), isset($object['baz']), empty($object['baz'])); -var_dump($object->offsetexists('qux'), isset($object['qux']), empty($object['qux'])); +var_dump($object->offsetExists('baz'), isset($object['baz']), empty($object['baz'])); +var_dump($object->offsetExists('qux'), isset($object['qux']), empty($object['qux'])); echo "==== class with offsetExists() ====\n"; $object = new ArrayObjectExists($values); var_dump($object->offsetExists('foo'), isset($object['foo']), empty($object['foo'])); var_dump($object->offsetExists('bar'), isset($object['bar']), empty($object['bar'])); -var_dump($object->offsetexists('baz'), isset($object['baz']), empty($object['baz'])); -var_dump($object->offsetexists('qux'), isset($object['qux']), empty($object['qux'])); +var_dump($object->offsetExists('baz'), isset($object['baz']), empty($object['baz'])); +var_dump($object->offsetExists('qux'), isset($object['qux']), empty($object['qux'])); echo "==== class with offsetGet() ====\n"; $object = new ArrayObjectGet($values); var_dump($object->offsetExists('foo'), isset($object['foo']), empty($object['foo'])); var_dump($object->offsetExists('bar'), isset($object['bar']), empty($object['bar'])); -var_dump($object->offsetexists('baz'), isset($object['baz']), empty($object['baz'])); -var_dump($object->offsetexists('qux'), isset($object['qux']), empty($object['qux'])); +var_dump($object->offsetExists('baz'), isset($object['baz']), empty($object['baz'])); +var_dump($object->offsetExists('qux'), isset($object['qux']), empty($object['qux'])); echo "==== class with offsetGet() and offsetSet() ====\n"; $object = new ArrayObjectGetSet; diff --git a/ext/spl/tests/bug67359.phpt b/ext/spl/tests/bug67359.phpt index 3a867f1f8766..a06d969b56a8 100644 --- a/ext/spl/tests/bug67359.phpt +++ b/ext/spl/tests/bug67359.phpt @@ -4,8 +4,8 @@ Bug #67359 (Segfault in recursiveDirectoryIterator) seek(1); while( $it->valid()) { diff --git a/ext/spl/tests/dit_005.phpt b/ext/spl/tests/dit_005.phpt index ebdc56e03170..89b05f1b8569 100644 --- a/ext/spl/tests/dit_005.phpt +++ b/ext/spl/tests/dit_005.phpt @@ -3,7 +3,7 @@ SPL: FilesystemIterator and clone --FILE-- key() == $b->key()); diff --git a/ext/spl/tests/filesystemiterator_flags.phpt b/ext/spl/tests/filesystemiterator_flags.phpt index b4e582b77ae1..574602a583af 100644 --- a/ext/spl/tests/filesystemiterator_flags.phpt +++ b/ext/spl/tests/filesystemiterator_flags.phpt @@ -5,13 +5,13 @@ Joshua Thijssen --FILE-- setFlags(FileSystemIterator::CURRENT_AS_SELF | - FileSystemIterator::KEY_AS_FILENAME | - FileSystemIterator::SKIP_DOTS | - FileSystemIterator::UNIX_PATHS); +$it->setFlags(FilesystemIterator::CURRENT_AS_SELF | + FilesystemIterator::KEY_AS_FILENAME | + FilesystemIterator::SKIP_DOTS | + FilesystemIterator::UNIX_PATHS); printflags($it); $it->setFlags(-1); @@ -19,9 +19,9 @@ printflags($it); function printflags($it) { printf("%08X\n", $it->getFlags()); - printf("%08X\n", ($it->getFlags() & FileSystemIterator::CURRENT_MODE_MASK)); - printf("%08X\n", ($it->getFlags() & FileSystemIterator::KEY_MODE_MASK)); - printf("%08X\n", ($it->getFlags() & FileSystemIterator::OTHER_MODE_MASK)); + printf("%08X\n", ($it->getFlags() & FilesystemIterator::CURRENT_MODE_MASK)); + printf("%08X\n", ($it->getFlags() & FilesystemIterator::KEY_MODE_MASK)); + printf("%08X\n", ($it->getFlags() & FilesystemIterator::OTHER_MODE_MASK)); } ?> diff --git a/ext/spl/tests/filesystemiterator_no_skip_dots.phpt b/ext/spl/tests/filesystemiterator_no_skip_dots.phpt index f04bd59268b6..4a9e69a25e91 100644 --- a/ext/spl/tests/filesystemiterator_no_skip_dots.phpt +++ b/ext/spl/tests/filesystemiterator_no_skip_dots.phpt @@ -1,5 +1,5 @@ --TEST-- -FileSystemIterator without SKIP_DOTS +FilesystemIterator without SKIP_DOTS --FILE-- getFileName(); + $files[] = $f->getFilename(); } sort($files); var_dump($files); diff --git a/ext/spl/tests/heap_004.phpt b/ext/spl/tests/heap_004.phpt index 3db18b673383..30163b3211d9 100644 --- a/ext/spl/tests/heap_004.phpt +++ b/ext/spl/tests/heap_004.phpt @@ -4,7 +4,7 @@ SPL: SplHeap: exceptions $val) echo "$key\n"; ?> --EXPECT-- -MyRecursiveIteratorIterator::nextelement +MyRecursiveIteratorIterator::nextElement 0 -MyRecursiveIteratorIterator::nextelement +MyRecursiveIteratorIterator::nextElement 1 -MyRecursiveIteratorIterator::nextelement +MyRecursiveIteratorIterator::nextElement 0 -MyRecursiveIteratorIterator::nextelement +MyRecursiveIteratorIterator::nextElement 0 -MyRecursiveIteratorIterator::nextelement +MyRecursiveIteratorIterator::nextElement 1 -MyRecursiveIteratorIterator::nextelement +MyRecursiveIteratorIterator::nextElement 1 diff --git a/ext/spl/tests/pqueue_002.phpt b/ext/spl/tests/pqueue_002.phpt index df4a64f4b2d0..fdab3803416b 100644 --- a/ext/spl/tests/pqueue_002.phpt +++ b/ext/spl/tests/pqueue_002.phpt @@ -4,7 +4,7 @@ SPL: SplPriorityQueue: exceptions beginchildren() +#0 [internal function]: MyRecursiveIteratorIterator->beginChildren() #1 %s: RecursiveIteratorIterator->next() #2 {main} thrown in %s on line %d diff --git a/ext/spl/tests/recursiveIteratorIterator_endchildren_error.phpt b/ext/spl/tests/recursiveIteratorIterator_endchildren_error.phpt index 07dee9c4acbb..c0459e80e159 100644 --- a/ext/spl/tests/recursiveIteratorIterator_endchildren_error.phpt +++ b/ext/spl/tests/recursiveIteratorIterator_endchildren_error.phpt @@ -1,5 +1,5 @@ --TEST-- -SPL: RecursiveIteratorIterator - Exception thrown in endchildren which should be handled in next() +SPL: RecursiveIteratorIterator - Exception thrown in endChildren which should be handled in next() --FILE-- endchildren() +#0 %s(%d): MyRecursiveIteratorIterator->endChildren() #1 {main} thrown in %s on line %d diff --git a/ext/spl/tests/recursiveIteratorIterator_nextelement_error.phpt b/ext/spl/tests/recursiveIteratorIterator_nextelement_error.phpt index f89f47e849b2..686b82ca3acc 100644 --- a/ext/spl/tests/recursiveIteratorIterator_nextelement_error.phpt +++ b/ext/spl/tests/recursiveIteratorIterator_nextelement_error.phpt @@ -1,5 +1,5 @@ --TEST-- -SPL: RecursiveIteratorIterator - Exception thrown in nextelement which should be handled in next() +SPL: RecursiveIteratorIterator - Exception thrown in nextElement which should be handled in next() --FILE-- nextelement() +#0 [internal function]: MyRecursiveIteratorIterator->nextElement() #1 %s: RecursiveIteratorIterator->next() #2 {main} thrown in %s on line %d diff --git a/ext/sqlite3/tests/bug63921-32bit.phpt b/ext/sqlite3/tests/bug63921-32bit.phpt index 45a85869f968..bfdec4b33296 100644 --- a/ext/sqlite3/tests/bug63921-32bit.phpt +++ b/ext/sqlite3/tests/bug63921-32bit.phpt @@ -9,7 +9,7 @@ if (PHP_INT_SIZE > 4) die('skip 32-bit only'); // skip for 64bit builds - there --FILE-- query('CREATE TABLE users (id INTEGER NOT NULL, num INTEGER NOT NULL, PRIMARY KEY(id))'); $stmt = $conn->prepare('insert into users (id, num) values (:id, :num)'); diff --git a/ext/sqlite3/tests/bug63921-64bit.phpt b/ext/sqlite3/tests/bug63921-64bit.phpt index 19637663088a..521b2a83a49c 100644 --- a/ext/sqlite3/tests/bug63921-64bit.phpt +++ b/ext/sqlite3/tests/bug63921-64bit.phpt @@ -9,7 +9,7 @@ if (PHP_INT_SIZE < 8) die('skip'); // skip for 32bit builds - there is another t --FILE-- query('CREATE TABLE users (id INTEGER NOT NULL, num INTEGER NOT NULL, PRIMARY KEY(id))'); $stmt = $conn->prepare('insert into users (id, num) values (:id, :num)'); diff --git a/ext/sqlite3/tests/exception_from_toString.phpt b/ext/sqlite3/tests/exception_from_toString.phpt index 549276eab353..e45793c05532 100644 --- a/ext/sqlite3/tests/exception_from_toString.phpt +++ b/ext/sqlite3/tests/exception_from_toString.phpt @@ -11,7 +11,7 @@ class throws { } } -$db = new sqlite3(':memory:'); +$db = new SQLite3(':memory:'); $db->exec('CREATE TABLE t(id int, v varchar(255))'); $stmt = $db->prepare('INSERT INTO t VALUES(:i, :v)'); diff --git a/ext/sqlite3/tests/setauthorizer_cycle_leak.phpt b/ext/sqlite3/tests/setauthorizer_cycle_leak.phpt index b0ff384c7227..5484c5f63249 100644 --- a/ext/sqlite3/tests/setauthorizer_cycle_leak.phpt +++ b/ext/sqlite3/tests/setauthorizer_cycle_leak.phpt @@ -4,7 +4,7 @@ setAuthorizer() cycle leak sqlite3 --FILE-- setAuthorizer([$this, "foo"]); diff --git a/ext/sqlite3/tests/sqlite3_22_loadextension.phpt b/ext/sqlite3/tests/sqlite3_22_loadextension.phpt index cdc7f4d4dc6e..0f49a14e173d 100644 --- a/ext/sqlite3/tests/sqlite3_22_loadextension.phpt +++ b/ext/sqlite3/tests/sqlite3_22_loadextension.phpt @@ -4,7 +4,7 @@ SQLite3 load extension sqlite3 --SKIPIF-- hasMethod("loadExtension")) { die("skip - sqlite3 doesn't have loadExtension enabled"); } diff --git a/ext/sqlite3/tests/sqlite3_29_createfunction.phpt b/ext/sqlite3/tests/sqlite3_29_createfunction.phpt index 1a511ee13996..0d200fc66ba8 100644 --- a/ext/sqlite3/tests/sqlite3_29_createfunction.phpt +++ b/ext/sqlite3/tests/sqlite3_29_createfunction.phpt @@ -8,14 +8,14 @@ sqlite3 require_once(__DIR__ . '/new_db.inc'); $func = 'strtoupper'; -var_dump($db->createfunction($func, $func)); +var_dump($db->createFunction($func, $func)); var_dump($db->querySingle("SELECT strtoupper('test')")); $func2 = 'strtolower'; -var_dump($db->createfunction($func2, $func2)); +var_dump($db->createFunction($func2, $func2)); var_dump($db->querySingle("SELECT strtolower('TEST')")); -var_dump($db->createfunction($func, $func2)); +var_dump($db->createFunction($func, $func2)); var_dump($db->querySingle("SELECT strtoupper('tEst')")); diff --git a/ext/sqlite3/tests/sqlite3_37_createfunction_flags.phpt b/ext/sqlite3/tests/sqlite3_37_createfunction_flags.phpt index c9762a11e154..3007a204c33b 100644 --- a/ext/sqlite3/tests/sqlite3_37_createfunction_flags.phpt +++ b/ext/sqlite3/tests/sqlite3_37_createfunction_flags.phpt @@ -12,14 +12,14 @@ if (!defined('SQLITE3_DETERMINISTIC')) die('skip SQLITE3_DETERMINISTIC requires require_once(__DIR__ . '/new_db.inc'); $func = 'strtoupper'; -var_dump($db->createfunction($func, $func, 1, SQLITE3_DETERMINISTIC)); +var_dump($db->createFunction($func, $func, 1, SQLITE3_DETERMINISTIC)); var_dump($db->querySingle("SELECT strtoupper('test')")); $func2 = 'strtolower'; -var_dump($db->createfunction($func2, $func2, 1, SQLITE3_DETERMINISTIC)); +var_dump($db->createFunction($func2, $func2, 1, SQLITE3_DETERMINISTIC)); var_dump($db->querySingle("SELECT strtolower('TEST')")); -var_dump($db->createfunction($func, $func2, 1, SQLITE3_DETERMINISTIC)); +var_dump($db->createFunction($func, $func2, 1, SQLITE3_DETERMINISTIC)); var_dump($db->querySingle("SELECT strtoupper('tEst')")); diff --git a/ext/sqlite3/tests/sqlite3_40_setauthorizer.phpt b/ext/sqlite3/tests/sqlite3_40_setauthorizer.phpt index a4f30040334c..d93a056d977d 100644 --- a/ext/sqlite3/tests/sqlite3_40_setauthorizer.phpt +++ b/ext/sqlite3/tests/sqlite3_40_setauthorizer.phpt @@ -39,7 +39,7 @@ $db->setAuthorizer(function (int $action) { $constants = array_flip($constants); var_dump($constants[$action], implode(',', array_slice(func_get_args(), 1))); - return SQLITE3::OK; + return SQLite3::OK; }); var_dump($db->exec('SELECT * FROM test WHERE a = 42;')); diff --git a/ext/sqlite3/tests/sqlite3_explain.phpt b/ext/sqlite3/tests/sqlite3_explain.phpt index 1f9d4fc940e4..192a81415d4b 100644 --- a/ext/sqlite3/tests/sqlite3_explain.phpt +++ b/ext/sqlite3/tests/sqlite3_explain.phpt @@ -15,24 +15,24 @@ require_once(__DIR__ . '/new_db.inc'); $db->exec('CREATE TABLE test_explain (a string);'); $stmt = $db->prepare("INSERT INTO test_explain VALUES ('first insert'), ('second_insert')"); -$stmt->setExplain(Sqlite3Stmt::EXPLAIN_MODE_EXPLAIN); -var_dump($stmt->explain() == Sqlite3Stmt::EXPLAIN_MODE_EXPLAIN); +$stmt->setExplain(SQLite3Stmt::EXPLAIN_MODE_EXPLAIN); +var_dump($stmt->explain() == SQLite3Stmt::EXPLAIN_MODE_EXPLAIN); $r = $stmt->execute(); $result = []; while (($arr = $r->fetchArray(SQLITE3_ASSOC)) !== false) $result[] = $arr; var_dump($result); $stmts = $db->prepare('SELECT * FROM test_explain'); -$stmts->setExplain(Sqlite3Stmt::EXPLAIN_MODE_EXPLAIN_QUERY_PLAN); +$stmts->setExplain(SQLite3Stmt::EXPLAIN_MODE_EXPLAIN_QUERY_PLAN); $r = $stmts->execute(); $result = []; while (($arr = $r->fetchArray(SQLITE3_ASSOC)) !== false) $result[] = $arr; var_dump($result); $stmt = $db->prepare("INSERT INTO test_explain VALUES ('first insert'), ('second_insert')"); -$stmt->setExplain(Sqlite3Stmt::EXPLAIN_MODE_PREPARED); +$stmt->setExplain(SQLite3Stmt::EXPLAIN_MODE_PREPARED); $stmt->execute(); $stmts = $db->prepare('SELECT * FROM test_explain'); -$stmts->setExplain(Sqlite3Stmt::EXPLAIN_MODE_PREPARED); +$stmts->setExplain(SQLite3Stmt::EXPLAIN_MODE_PREPARED); $r = $stmts->execute(); $result = []; while (($arr = $r->fetchArray(SQLITE3_ASSOC)) !== false) $result[] = $arr; @@ -50,7 +50,7 @@ try { echo $e->getMessage(), PHP_EOL; } -var_dump($stmts->explain() == Sqlite3Stmt::EXPLAIN_MODE_PREPARED); +var_dump($stmts->explain() == SQLite3Stmt::EXPLAIN_MODE_PREPARED); ?> --EXPECTF-- bool(true) diff --git a/ext/sqlite3/tests/sqlite3_fetch_all.phpt b/ext/sqlite3/tests/sqlite3_fetch_all.phpt index 5a318afb1256..537bcdae4c14 100644 --- a/ext/sqlite3/tests/sqlite3_fetch_all.phpt +++ b/ext/sqlite3/tests/sqlite3_fetch_all.phpt @@ -4,7 +4,7 @@ SQLite3Result::fetchAll usage sqlite3 --FILE-- query('CREATE TABLE users (id INTEGER NOT NULL, num INTEGER NOT NULL, PRIMARY KEY(id))'); $stmt = $conn->query('insert into users (id, num) values (1, 1)'); diff --git a/ext/sqlite3/tests/sqlite3_trampoline_createfunction.phpt b/ext/sqlite3/tests/sqlite3_trampoline_createfunction.phpt index 52d5b726415e..ddf3adc8bf26 100644 --- a/ext/sqlite3/tests/sqlite3_trampoline_createfunction.phpt +++ b/ext/sqlite3/tests/sqlite3_trampoline_createfunction.phpt @@ -15,7 +15,7 @@ class TrampolineTest { } $o = new TrampolineTest(); $callback = [$o, 'strtoupper']; -var_dump($db->createfunction('strtoupper', $callback)); +var_dump($db->createFunction('strtoupper', $callback)); var_dump($db->querySingle("SELECT strtoupper('test')")); var_dump($db->querySingle("SELECT strtoupper('test')")); diff --git a/ext/sqlite3/tests/sqlite3_trampoline_createfunction_no_leak.phpt b/ext/sqlite3/tests/sqlite3_trampoline_createfunction_no_leak.phpt index dea0f6c5210b..f4f155c4cab4 100644 --- a/ext/sqlite3/tests/sqlite3_trampoline_createfunction_no_leak.phpt +++ b/ext/sqlite3/tests/sqlite3_trampoline_createfunction_no_leak.phpt @@ -16,16 +16,16 @@ class TrampolineTest { $o = new TrampolineTest(); $callback = [$o, 'strtoupper']; -var_dump($db->createfunction('', $callback)); +var_dump($db->createFunction('', $callback)); try { - var_dump($db->createfunction(new stdClass(), $callback, new stdClass())); + var_dump($db->createFunction(new stdClass(), $callback, new stdClass())); } catch (\Throwable $e) { echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { - var_dump($db->createfunction('strtoupper', $callback, new stdClass())); + var_dump($db->createFunction('strtoupper', $callback, new stdClass())); } catch (\Throwable $e) { echo $e::class, ': ', $e->getMessage(), PHP_EOL; } @@ -35,12 +35,12 @@ $rc = new ReflectionClass(SQLite3::class); $obj = $rc->newInstanceWithoutConstructor(); try { - var_dump($obj->createfunction('strtoupper', $callback)); + var_dump($obj->createFunction('strtoupper', $callback)); } catch (\Throwable $e) { echo $e::class, ': ', $e->getMessage(), PHP_EOL; } -var_dump($db->createfunction('strtoupper', $callback)); +var_dump($db->createFunction('strtoupper', $callback)); ?> --EXPECT-- diff --git a/ext/standard/tests/array/array_map_001.phpt b/ext/standard/tests/array/array_map_001.phpt index ffa56c130917..5e9f7a945aff 100644 --- a/ext/standard/tests/array/array_map_001.phpt +++ b/ext/standard/tests/array/array_map_001.phpt @@ -6,7 +6,7 @@ array_map() and exceptions in the callback $a = array(1,2,3); function foo() { - throw new exception(1); + throw new Exception(1); } try { diff --git a/ext/standard/tests/array/array_walk/array_walk_objects.phpt b/ext/standard/tests/array/array_walk/array_walk_objects.phpt index 44b5b27e51e8..847a2307cc81 100644 --- a/ext/standard/tests/array/array_walk/array_walk_objects.phpt +++ b/ext/standard/tests/array/array_walk/array_walk_objects.phpt @@ -13,7 +13,7 @@ class test { public $var_pub = "test_public"; } -$stdclass = new stdclass; +$stdclass = new stdClass; $stdclass->foo = "foo"; $stdclass->bar = "bar"; array_walk($stdclass, "walk"); diff --git a/ext/standard/tests/array/array_walk/array_walk_rec_objects.phpt b/ext/standard/tests/array/array_walk/array_walk_rec_objects.phpt index 91a97437d217..458942214631 100644 --- a/ext/standard/tests/array/array_walk/array_walk_rec_objects.phpt +++ b/ext/standard/tests/array/array_walk/array_walk_rec_objects.phpt @@ -13,7 +13,7 @@ class test { public $var_pub = "test_public"; } -$stdclass = new stdclass; +$stdclass = new stdClass; $stdclass->foo = "foo"; $stdclass->bar = "bar"; array_walk_recursive($stdclass, "walk"); diff --git a/ext/standard/tests/array/array_walk/bug70713.phpt b/ext/standard/tests/array/array_walk/bug70713.phpt index fab1661e84e0..c21acd496211 100644 --- a/ext/standard/tests/array/array_walk/bug70713.phpt +++ b/ext/standard/tests/array/array_walk/bug70713.phpt @@ -5,7 +5,7 @@ Bug #70713: Use After Free Vulnerability in array_walk()/array_walk_recursive() class obj { - function __tostring() + function __toString() { global $arr; diff --git a/ext/standard/tests/array/bug76713.phpt b/ext/standard/tests/array/bug76713.phpt index 8bb8bf221fe8..4fdcababc508 100644 --- a/ext/standard/tests/array/bug76713.phpt +++ b/ext/standard/tests/array/bug76713.phpt @@ -7,7 +7,7 @@ function test($obj) { return array_column(array($obj), "prop"); } -$obj = new Stdclass(); +$obj = new stdClass(); $obj->prop = str_pad("a", 10, 'a'); diff --git a/ext/standard/tests/array/gh19300_1.phpt b/ext/standard/tests/array/gh19300_1.phpt index 18b639bf425b..38a27b6f04fe 100644 --- a/ext/standard/tests/array/gh19300_1.phpt +++ b/ext/standard/tests/array/gh19300_1.phpt @@ -4,7 +4,7 @@ GH-19300 (Nested array_multisort invocation with error breaks) - correct invocat data; } diff --git a/ext/standard/tests/array/max.phpt b/ext/standard/tests/array/max.phpt index 065461001690..f07e30ef3729 100644 --- a/ext/standard/tests/array/max.phpt +++ b/ext/standard/tests/array/max.phpt @@ -18,7 +18,7 @@ try { } try { - var_dump(max(new stdclass)); + var_dump(max(new stdClass)); } catch (\TypeError $e) { echo $e->getMessage() . "\n"; } diff --git a/ext/standard/tests/array/min.phpt b/ext/standard/tests/array/min.phpt index 97be4ad6828e..7a19ae37feec 100644 --- a/ext/standard/tests/array/min.phpt +++ b/ext/standard/tests/array/min.phpt @@ -18,7 +18,7 @@ try { } try { - var_dump(min(new stdclass)); + var_dump(min(new stdClass)); } catch (\TypeError $e) { echo $e->getMessage() . "\n"; } diff --git a/ext/standard/tests/array/sort/arsort_object1.phpt b/ext/standard/tests/array/sort/arsort_object1.phpt index 468b4f291695..92ab662aa094 100644 --- a/ext/standard/tests/array/sort/arsort_object1.phpt +++ b/ext/standard/tests/array/sort/arsort_object1.phpt @@ -31,7 +31,7 @@ class for_string_arsort } // return string value - function __tostring() { + function __toString() { return (string)$this->value; } diff --git a/ext/standard/tests/array/sort/arsort_object2.phpt b/ext/standard/tests/array/sort/arsort_object2.phpt index e9252c73512e..4baeff3dfab2 100644 --- a/ext/standard/tests/array/sort/arsort_object2.phpt +++ b/ext/standard/tests/array/sort/arsort_object2.phpt @@ -39,7 +39,7 @@ class for_string_arsort } // return string value - function __tostring() { + function __toString() { return (string)$this->value; } } diff --git a/ext/standard/tests/array/sort/asort_object1.phpt b/ext/standard/tests/array/sort/asort_object1.phpt index 080e3f920332..1f932dec429b 100644 --- a/ext/standard/tests/array/sort/asort_object1.phpt +++ b/ext/standard/tests/array/sort/asort_object1.phpt @@ -31,7 +31,7 @@ class for_string_asort } // return string value - function __tostring() { + function __toString() { return (string)$this->value; } diff --git a/ext/standard/tests/array/sort/asort_object2.phpt b/ext/standard/tests/array/sort/asort_object2.phpt index b98b27040baf..7b58c7d998d0 100644 --- a/ext/standard/tests/array/sort/asort_object2.phpt +++ b/ext/standard/tests/array/sort/asort_object2.phpt @@ -39,7 +39,7 @@ class for_string_asort } // return string value - function __tostring() { + function __toString() { return (string)$this->value; } } diff --git a/ext/standard/tests/array/sort/krsort_object.phpt b/ext/standard/tests/array/sort/krsort_object.phpt index 1ecab77b0821..61c65a3869e6 100644 --- a/ext/standard/tests/array/sort/krsort_object.phpt +++ b/ext/standard/tests/array/sort/krsort_object.phpt @@ -30,7 +30,7 @@ class StringObject } // return string value - function __tostring() { + function __toString() { return (string)$this->value; } diff --git a/ext/standard/tests/array/sort/ksort_object.phpt b/ext/standard/tests/array/sort/ksort_object.phpt index cd51f81cd501..b8adaab2c653 100644 --- a/ext/standard/tests/array/sort/ksort_object.phpt +++ b/ext/standard/tests/array/sort/ksort_object.phpt @@ -31,7 +31,7 @@ class StringObject } // return string value - function __tostring() { + function __toString() { return (string)$this->value; } diff --git a/ext/standard/tests/array/sort/natcasesort_object1.phpt b/ext/standard/tests/array/sort/natcasesort_object1.phpt index 8d94201b1249..b9fd79968a5e 100644 --- a/ext/standard/tests/array/sort/natcasesort_object1.phpt +++ b/ext/standard/tests/array/sort/natcasesort_object1.phpt @@ -18,7 +18,7 @@ class for_string_natcasesort } // return string value - function __tostring() { + function __toString() { return (string)$this->class_value; } diff --git a/ext/standard/tests/array/sort/natcasesort_object2.phpt b/ext/standard/tests/array/sort/natcasesort_object2.phpt index 5f3afe1e1b22..b1f2a8f235f9 100644 --- a/ext/standard/tests/array/sort/natcasesort_object2.phpt +++ b/ext/standard/tests/array/sort/natcasesort_object2.phpt @@ -23,7 +23,7 @@ class for_string_natcasesort } // return string value - function __tostring() { + function __toString() { return (string)$this->public_class_value; } diff --git a/ext/standard/tests/array/sort/rsort_object1.phpt b/ext/standard/tests/array/sort/rsort_object1.phpt index 0cfeb443f99b..31e5a2c508ab 100644 --- a/ext/standard/tests/array/sort/rsort_object1.phpt +++ b/ext/standard/tests/array/sort/rsort_object1.phpt @@ -29,7 +29,7 @@ class for_string_rsort } // return string value - function __tostring() { + function __toString() { return (string)$this->value; } diff --git a/ext/standard/tests/array/sort/rsort_object2.phpt b/ext/standard/tests/array/sort/rsort_object2.phpt index 4b60e345cf92..bf179ba04f29 100644 --- a/ext/standard/tests/array/sort/rsort_object2.phpt +++ b/ext/standard/tests/array/sort/rsort_object2.phpt @@ -38,7 +38,7 @@ class for_string_rsort } // return string value - function __tostring() { + function __toString() { return (string)$this->value; } diff --git a/ext/standard/tests/array/sort/sort_object1.phpt b/ext/standard/tests/array/sort/sort_object1.phpt index 07243be2c6e6..7b41b8a882cc 100644 --- a/ext/standard/tests/array/sort/sort_object1.phpt +++ b/ext/standard/tests/array/sort/sort_object1.phpt @@ -29,7 +29,7 @@ class for_string_sort } // return string value - function __tostring() { + function __toString() { return (string)$this->value; } diff --git a/ext/standard/tests/array/sort/sort_object2.phpt b/ext/standard/tests/array/sort/sort_object2.phpt index 7c9bb9867cbd..413ef8223047 100644 --- a/ext/standard/tests/array/sort/sort_object2.phpt +++ b/ext/standard/tests/array/sort/sort_object2.phpt @@ -37,7 +37,7 @@ class for_string_sort } // return string value - function __tostring() { + function __toString() { return (string)$this->value; } diff --git a/ext/standard/tests/class_object/AutoTest.inc b/ext/standard/tests/class_object/AutoTest.inc index fb487fb07146..c9898b7075a0 100644 --- a/ext/standard/tests/class_object/AutoTest.inc +++ b/ext/standard/tests/class_object/AutoTest.inc @@ -1,6 +1,6 @@ diff --git a/ext/standard/tests/class_object/class_exists_variation_003.phpt b/ext/standard/tests/class_object/class_exists_variation_003.phpt index 564d4add2f48..5f6a4ec22e6e 100644 --- a/ext/standard/tests/class_object/class_exists_variation_003.phpt +++ b/ext/standard/tests/class_object/class_exists_variation_003.phpt @@ -8,5 +8,5 @@ var_dump(class_exists('casesensitivitytest')); echo "Done" ?> --EXPECT-- -bool(true) +bool(false) 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 f7b86a2977ac..d7c1817ee761 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 @@ -57,7 +57,7 @@ $values = array( 'string', // object data - new stdclass(), + new stdClass(), // undefined data $undefined_var, diff --git a/ext/standard/tests/class_object/get_class_methods_variation_002.phpt b/ext/standard/tests/class_object/get_class_methods_variation_002.phpt index a4ca690f04a3..7dbf05636b54 100644 --- a/ext/standard/tests/class_object/get_class_methods_variation_002.phpt +++ b/ext/standard/tests/class_object/get_class_methods_variation_002.phpt @@ -8,7 +8,7 @@ class caseSensitivityTest { function MyMeThOd() {} } -var_dump( get_class_methods('CasesensitivitytesT') ); +var_dump( get_class_methods('caseSensitivityTest') ); echo "Done"; ?> diff --git a/ext/standard/tests/class_object/get_class_variation_002.phpt b/ext/standard/tests/class_object/get_class_variation_002.phpt index d5d08dde30d1..b6a2f2e8e0f8 100644 --- a/ext/standard/tests/class_object/get_class_variation_002.phpt +++ b/ext/standard/tests/class_object/get_class_variation_002.phpt @@ -3,7 +3,7 @@ Test get_class() function : usage variations - ensure class name case is preser --FILE-- diff --git a/ext/standard/tests/class_object/get_parent_class_variation_001.phpt b/ext/standard/tests/class_object/get_parent_class_variation_001.phpt index 766efb850531..8bb2a7239109 100644 --- a/ext/standard/tests/class_object/get_parent_class_variation_001.phpt +++ b/ext/standard/tests/class_object/get_parent_class_variation_001.phpt @@ -9,8 +9,8 @@ echo "*** Testing get_parent_class() : variation ***\n"; class caseSensitivityTest {} class caseSensitivityTestChild extends caseSensitivityTest {} -var_dump(get_parent_class('CasesensitivitytestCHILD')); -var_dump(get_parent_class(new CasesensitivitytestCHILD)); +var_dump(get_parent_class('caseSensitivityTestChild')); +var_dump(get_parent_class(new caseSensitivityTestChild)); echo "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 8faeff9dd8dc..10ca10c2daf4 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 @@ -59,7 +59,7 @@ $values = array( 'String', // object data - new stdclass(), + new stdClass(), // undefined data $undefined_var, diff --git a/ext/standard/tests/class_object/is_a_variation_003.phpt b/ext/standard/tests/class_object/is_a_variation_003.phpt index 621cef10708c..86129a646b7e 100644 --- a/ext/standard/tests/class_object/is_a_variation_003.phpt +++ b/ext/standard/tests/class_object/is_a_variation_003.phpt @@ -13,5 +13,5 @@ echo "Done"; ?> --EXPECT-- *** Testing is_a() : usage variations *** -bool(true) +bool(false) Done diff --git a/ext/standard/tests/class_object/is_subclass_of_variation_003.phpt b/ext/standard/tests/class_object/is_subclass_of_variation_003.phpt index e757084edb7f..8842074c0bb3 100644 --- a/ext/standard/tests/class_object/is_subclass_of_variation_003.phpt +++ b/ext/standard/tests/class_object/is_subclass_of_variation_003.phpt @@ -16,5 +16,5 @@ echo "Done" --EXPECT-- *** Testing is_subclass_of() : usage variations *** *** Testing is_a() : usage variations *** -bool(true) +bool(false) Done diff --git a/ext/standard/tests/class_object/method_exists_basic_002.phpt b/ext/standard/tests/class_object/method_exists_basic_002.phpt index 70f85f806966..03531c0637e2 100644 --- a/ext/standard/tests/class_object/method_exists_basic_002.phpt +++ b/ext/standard/tests/class_object/method_exists_basic_002.phpt @@ -3,25 +3,25 @@ method_exists() on internal classes --FILE-- --EXPECT-- ---(Internal classes, using string class name)--- -Does exception::getmessage exist? bool(true) -Does stdclass::nonexistent exist? bool(false) +Does Exception::getMessage exist? bool(true) +Does stdClass::nonexistent exist? bool(false) ---(Internal classes, using class instance)--- -Does exception::getmessage exist? bool(true) -Does stdclass::nonexistent exist? bool(false) +Does Exception::getMessage exist? bool(true) +Does stdClass::nonexistent exist? bool(false) Done diff --git a/ext/standard/tests/class_object/method_exists_variation_003.phpt b/ext/standard/tests/class_object/method_exists_variation_003.phpt index cf57e283dd2a..ae58781f2d21 100644 --- a/ext/standard/tests/class_object/method_exists_variation_003.phpt +++ b/ext/standard/tests/class_object/method_exists_variation_003.phpt @@ -8,13 +8,13 @@ Class caseSensitivityTest { public function myMethod() {} } -var_dump(method_exists(new casesensitivitytest, 'myMetHOD')); +var_dump(method_exists(new caseSensitivityTest, 'myMetHOD')); var_dump(method_exists('casesensiTivitytest', 'myMetHOD')); echo "Done"; ?> --EXPECT-- *** Testing method_exists() : variation *** -bool(true) -bool(true) +bool(false) +bool(false) Done diff --git a/ext/standard/tests/class_object/trait_class_exists_variation_003.phpt b/ext/standard/tests/class_object/trait_class_exists_variation_003.phpt index d68992509393..bb340f98d14e 100644 --- a/ext/standard/tests/class_object/trait_class_exists_variation_003.phpt +++ b/ext/standard/tests/class_object/trait_class_exists_variation_003.phpt @@ -8,5 +8,5 @@ var_dump(trait_exists('casesensitivitytest')); echo "Done" ?> --EXPECT-- -bool(true) +bool(false) Done diff --git a/ext/standard/tests/constant_with_typed_class_constant.phpt b/ext/standard/tests/constant_with_typed_class_constant.phpt index 87a1c006426d..9951a0461e6c 100644 --- a/ext/standard/tests/constant_with_typed_class_constant.phpt +++ b/ext/standard/tests/constant_with_typed_class_constant.phpt @@ -10,10 +10,10 @@ class Foo { define("C", new stdClass()); -var_dump(constant("FOO::CONST1")); +var_dump(constant("Foo::CONST1")); try { - constant("FOO::CONST2"); + constant("Foo::CONST2"); } catch (TypeError $e) { echo $e->getMessage() . "\n"; } diff --git a/ext/standard/tests/file/windows_mb_path/bug71509.phpt b/ext/standard/tests/file/windows_mb_path/bug71509.phpt index f7606a26e597..4dbf85aa9d4a 100644 --- a/ext/standard/tests/file/windows_mb_path/bug71509.phpt +++ b/ext/standard/tests/file/windows_mb_path/bug71509.phpt @@ -27,7 +27,7 @@ $zipfile = new ZipArchive; $return_code = $zipfile->open($outputfile_zip, ZipArchive::CREATE); if ($return_code != true) die("Failed to open file: " . $return_code); -$return_code = $zipfile->addfile($testfile_zip, basename($testfile_zip)); +$return_code = $zipfile->addFile($testfile_zip, basename($testfile_zip)); if ($return_code != true) print("Failed to add file: " . $zipfile->getStatusString()); $return_code = $zipfile->close(); diff --git a/ext/standard/tests/filters/stream_filter_register_class_throwing_onclose.phpt b/ext/standard/tests/filters/stream_filter_register_class_throwing_onclose.phpt index 76b925cc0483..d2f41571d32f 100644 --- a/ext/standard/tests/filters/stream_filter_register_class_throwing_onclose.phpt +++ b/ext/standard/tests/filters/stream_filter_register_class_throwing_onclose.phpt @@ -1,9 +1,9 @@ --TEST-- -stream_filter_register() with a class that has a onclose method that throws +stream_filter_register() with a class that has a onClose method that throws --FILE-- onclose() +#0 [internal function]: foo->onClose() #1 {main} thrown in %s on line %d diff --git a/ext/standard/tests/filters/stream_filter_register_class_throwing_oncreate.phpt b/ext/standard/tests/filters/stream_filter_register_class_throwing_oncreate.phpt index 3e429a2cc343..5e69bc339408 100644 --- a/ext/standard/tests/filters/stream_filter_register_class_throwing_oncreate.phpt +++ b/ext/standard/tests/filters/stream_filter_register_class_throwing_oncreate.phpt @@ -1,9 +1,9 @@ --TEST-- -stream_filter_register() with a class that has a oncreate method that throws +stream_filter_register() with a class that has a onCreate method that throws --FILE-- oncreate() +#0 [internal function]: foo->onCreate() #1 %s(%d): stream_filter_append(Resource id #2, 'invalid_filter') #2 {main} thrown in %s on line %d diff --git a/ext/standard/tests/filters/userfilters.phpt b/ext/standard/tests/filters/userfilters.phpt index 6193778df83a..35bc9c08b60e 100644 --- a/ext/standard/tests/filters/userfilters.phpt +++ b/ext/standard/tests/filters/userfilters.phpt @@ -13,7 +13,7 @@ class testfilter extends php_user_filter { return PSFS_PASS_ON; } - function oncreate(): bool { + function onCreate(): bool { echo "params: {$this->params}\n"; return true; } diff --git a/ext/standard/tests/general_functions/bug77638_1.phpt b/ext/standard/tests/general_functions/bug77638_1.phpt index 9d75a9a7ce49..7532c68fbcdd 100644 --- a/ext/standard/tests/general_functions/bug77638_1.phpt +++ b/ext/standard/tests/general_functions/bug77638_1.phpt @@ -4,7 +4,7 @@ Bug #77638 (var_export'ing certain class instances segfaults) com_dotnet --FILE-- --EXPECT-- \com::__set_state(array( diff --git a/ext/standard/tests/general_functions/is_array.phpt b/ext/standard/tests/general_functions/is_array.phpt index 15ff46e22dfe..32f96bcc3d27 100644 --- a/ext/standard/tests/general_functions/is_array.phpt +++ b/ext/standard/tests/general_functions/is_array.phpt @@ -66,7 +66,7 @@ $varient_arrays = array ( 1e5, /* objects */ - new stdclass, + new stdClass, /* resources */ $fp, diff --git a/ext/standard/tests/general_functions/is_bool.phpt b/ext/standard/tests/general_functions/is_bool.phpt index 88c53882b45c..9042a6a9109a 100644 --- a/ext/standard/tests/general_functions/is_bool.phpt +++ b/ext/standard/tests/general_functions/is_bool.phpt @@ -85,7 +85,7 @@ $not_bool_types = array ( -1E7, /* objects */ - new stdclass, + new stdClass, /* resources */ $fp, diff --git a/ext/standard/tests/general_functions/is_int.phpt b/ext/standard/tests/general_functions/is_int.phpt index 6dfcf9e1b422..def69eaf6749 100644 --- a/ext/standard/tests/general_functions/is_int.phpt +++ b/ext/standard/tests/general_functions/is_int.phpt @@ -68,7 +68,7 @@ $not_int_types = array ( 10.5e+5, /* objects */ - new stdclass, + new stdClass, /* resources */ $fp, diff --git a/ext/standard/tests/general_functions/is_int_64bit.phpt b/ext/standard/tests/general_functions/is_int_64bit.phpt index 9676deea4cd1..985f827cb5ae 100644 --- a/ext/standard/tests/general_functions/is_int_64bit.phpt +++ b/ext/standard/tests/general_functions/is_int_64bit.phpt @@ -70,7 +70,7 @@ $not_int_types = array ( 10.5e+5, /* objects */ - new stdclass, + new stdClass, /* resources */ $fp, diff --git a/ext/standard/tests/general_functions/is_null.phpt b/ext/standard/tests/general_functions/is_null.phpt index 7b12bca6345e..1a50a522b13b 100644 --- a/ext/standard/tests/general_functions/is_null.phpt +++ b/ext/standard/tests/general_functions/is_null.phpt @@ -8,7 +8,7 @@ $unset_array = array(); $unset_int = 10; $unset_float = 10.5; $unset_bool = true; -$unset_object = new stdclass; +$unset_object = new stdClass; $unset_resource = fopen(__FILE__, "r"); // unset them to make it null. unset ($unset_array, $unset_int, $unset_float, $unset_bool, $unset_object, $unset_resource); @@ -95,7 +95,7 @@ $not_null_types = array ( -1E7, /* objects */ - new stdclass, + new stdClass, /* resources */ $fp, diff --git a/ext/standard/tests/general_functions/is_numeric.phpt b/ext/standard/tests/general_functions/is_numeric.phpt index a4f7b79f79b9..205ba8e63bbc 100644 --- a/ext/standard/tests/general_functions/is_numeric.phpt +++ b/ext/standard/tests/general_functions/is_numeric.phpt @@ -110,7 +110,7 @@ $not_numerics = array( "+0x80001", "-0x80001.5", "0x80001.5", - new stdclass, // object + new stdClass, // object $fp, // resource $dfp, array(), diff --git a/ext/standard/tests/general_functions/is_object.phpt b/ext/standard/tests/general_functions/is_object.phpt index 6a0123d23ebf..df314851b629 100644 --- a/ext/standard/tests/general_functions/is_object.phpt +++ b/ext/standard/tests/general_functions/is_object.phpt @@ -73,7 +73,7 @@ $Value_object = new Value(); $concreteClass_object = new concreteClass(); $valid_objects = array( - new stdclass, + new stdClass, new foo, new concreteClass, new Value, diff --git a/ext/standard/tests/general_functions/is_scalar.phpt b/ext/standard/tests/general_functions/is_scalar.phpt index 151a5bca1878..16bded61811b 100644 --- a/ext/standard/tests/general_functions/is_scalar.phpt +++ b/ext/standard/tests/general_functions/is_scalar.phpt @@ -56,7 +56,7 @@ $int_var = 10; $float_var = 1e5; $string_var = "string"; $boolean_var = true; -$object = new stdclass; +$object = new stdClass; $array = array(10); $resource = opendir('.'); unset($int_var, $float_var, $string_var, $boolean_var, $object, $array, $resource); @@ -78,7 +78,7 @@ $variation_array = array( $fp, // resources $dfp, - new stdclass, // object + new stdClass, // object @$int_var, // scalars that are unset @$float_var, diff --git a/ext/standard/tests/general_functions/is_string.phpt b/ext/standard/tests/general_functions/is_string.phpt index d2f8eeffcc8e..312e66be2ee1 100644 --- a/ext/standard/tests/general_functions/is_string.phpt +++ b/ext/standard/tests/general_functions/is_string.phpt @@ -102,7 +102,7 @@ $not_strings = array ( -1E7, /* objects */ - new stdclass, + new stdClass, /* resources */ $fp, diff --git a/ext/standard/tests/general_functions/type.phpt b/ext/standard/tests/general_functions/type.phpt index a43640f09eba..939a209f8978 100644 --- a/ext/standard/tests/general_functions/type.phpt +++ b/ext/standard/tests/general_functions/type.phpt @@ -27,7 +27,7 @@ $array = array( "some string", $fp, $fp1, - new stdclass, + new stdClass, ); $types = array( diff --git a/ext/standard/tests/general_functions/var_export-locale.phpt b/ext/standard/tests/general_functions/var_export-locale.phpt index 18fb957871b3..ff09d2311347 100644 --- a/ext/standard/tests/general_functions/var_export-locale.phpt +++ b/ext/standard/tests/general_functions/var_export-locale.phpt @@ -247,7 +247,7 @@ $Value_object = new Value(); $concreteClass_object = new concreteClass(); $valid_objects = array( - new stdclass, + new stdClass, new foo, new concreteClass, new Value, 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 2cf6cf341d44..50ce75a28429 100644 --- a/ext/standard/tests/general_functions/var_export-locale_32.phpt +++ b/ext/standard/tests/general_functions/var_export-locale_32.phpt @@ -247,7 +247,7 @@ $Value_object = new Value(); $concreteClass_object = new concreteClass(); $valid_objects = array( - new stdclass, + new stdClass, new foo, new concreteClass, new Value, diff --git a/ext/standard/tests/general_functions/var_export_basic6.phpt b/ext/standard/tests/general_functions/var_export_basic6.phpt index 42d072bcb3b5..a0eddc423bd1 100644 --- a/ext/standard/tests/general_functions/var_export_basic6.phpt +++ b/ext/standard/tests/general_functions/var_export_basic6.phpt @@ -71,7 +71,7 @@ $Value_object = new Value(); $concreteClass_object = new concreteClass(); $valid_objects = array( - "new stdclass" => new stdclass, + "new stdClass" => new stdClass, "new foo" => new foo, "new concreteClass" => new concreteClass, "new Value" => new Value, @@ -100,7 +100,7 @@ foreach($valid_objects as $key => $obj) { *** Output for objects *** --- Iteration: new stdclass -- +-- Iteration: new stdClass -- (object) array( ) (object) array( diff --git a/ext/standard/tests/general_functions/var_export_basic8.phpt b/ext/standard/tests/general_functions/var_export_basic8.phpt index 182bdd107e8d..ee79168a7a2d 100644 --- a/ext/standard/tests/general_functions/var_export_basic8.phpt +++ b/ext/standard/tests/general_functions/var_export_basic8.phpt @@ -3,9 +3,9 @@ var_export(): simple test with arrays and objects --FILE-- p = '22'; -$o2 = new stdclass; +$o2 = new stdClass; $o2->a = 1; $o2->b = array('k'=>2); $o2->x = $o1; diff --git a/ext/standard/tests/image/bug13213.phpt b/ext/standard/tests/image/bug13213.phpt index dd5821a83035..d1543dcf03bf 100644 --- a/ext/standard/tests/image/bug13213.phpt +++ b/ext/standard/tests/image/bug13213.phpt @@ -2,7 +2,7 @@ Bug #13213 (GetImageSize and wrong JPEG Comments) --FILE-- --EXPECTF-- Warning: getimagesize(): Corrupt JPEG data: 2 extraneous bytes before marker in %s%ebug13213.php on line %d diff --git a/ext/standard/tests/image/getimagesize_variation2.phpt b/ext/standard/tests/image/getimagesize_variation2.phpt index 045d9141a6bd..39ed2ed521f5 100644 --- a/ext/standard/tests/image/getimagesize_variation2.phpt +++ b/ext/standard/tests/image/getimagesize_variation2.phpt @@ -54,7 +54,7 @@ $values = array( "''" => '', // object data - "new stdclass()" => new stdclass(), + "new stdClass()" => new stdClass(), // undefined data "undefined_var" => $undefined_var, @@ -143,7 +143,7 @@ string(28) "4a46494600010201006000600000" -- Arg value '' -- string(28) "4a46494600010201006000600000" --- Arg value new stdclass() -- +-- Arg value new stdClass() -- string(28) "4a46494600010201006000600000" -- Arg value undefined_var -- diff --git a/ext/standard/tests/mail/mail_basic7.phpt b/ext/standard/tests/mail/mail_basic7.phpt index ffc3fd241f00..fa04f8497baf 100644 --- a/ext/standard/tests/mail/mail_basic7.phpt +++ b/ext/standard/tests/mail/mail_basic7.phpt @@ -133,7 +133,7 @@ try { } try { - mail($to, $subject, $message, ['foo7' => array(new StdClass)]); + mail($to, $subject, $message, ['foo7' => array(new stdClass)]); } catch (TypeError|ValueError $exception) { echo get_class($exception) . ": " . $exception->getMessage() . "\n"; } diff --git a/ext/standard/tests/network/http-stream.phpt b/ext/standard/tests/network/http-stream.phpt index e31602d33048..a5710610501f 100644 --- a/ext/standard/tests/network/http-stream.phpt +++ b/ext/standard/tests/network/http-stream.phpt @@ -16,7 +16,7 @@ require __DIR__.'/../http/server.inc'; ['pid' => $pid, 'uri' => $uri] = http_server([__DIR__."/news.rss"]); -$d = new DomDocument; +$d = new DOMDocument; $e = $d->load("$uri/news.rss"); echo "ALIVE\n"; http_server_kill($pid); diff --git a/ext/standard/tests/password/password_hash_error.phpt b/ext/standard/tests/password/password_hash_error.phpt index a9e26f091675..78bf880646b5 100644 --- a/ext/standard/tests/password/password_hash_error.phpt +++ b/ext/standard/tests/password/password_hash_error.phpt @@ -17,7 +17,7 @@ try { } try { - var_dump(password_hash("foo", 19, new StdClass)); + var_dump(password_hash("foo", 19, new stdClass)); } catch (TypeError $e) { echo $e->getMessage(), "\n"; } diff --git a/ext/standard/tests/serialize/006.phpt b/ext/standard/tests/serialize/006.phpt index 24b3cbbe2d7d..a4c0a894a40c 100644 --- a/ext/standard/tests/serialize/006.phpt +++ b/ext/standard/tests/serialize/006.phpt @@ -9,7 +9,7 @@ serialize()/unserialize() with exotic letters public $ber = ''; } - $foo = new berkli(); + $foo = new berKli(); var_dump(serialize($foo)); var_dump(unserialize(serialize($foo))); diff --git a/ext/standard/tests/serialize/SplObjectStorage_object_reference.phpt b/ext/standard/tests/serialize/SplObjectStorage_object_reference.phpt index 763cedbc9d6d..778e7b7d15af 100644 --- a/ext/standard/tests/serialize/SplObjectStorage_object_reference.phpt +++ b/ext/standard/tests/serialize/SplObjectStorage_object_reference.phpt @@ -6,7 +6,7 @@ Reference to SplObjectStorage key (not supported) $inner = 'x:i:1;O:8:"stdClass":0:{};m:a:0:{}'; $inner_len = strlen($inner); $str = <<test(); @@ -11,6 +11,6 @@ $x->test(); --EXPECTF-- Fatal error: Uncaught TypeError: Cannot assign string to property Exception::$trace of type array in %s:%d Stack trace: -#0 %s(%d): unserialize('O:9:"exception"...') +#0 %s(%d): unserialize('O:9:"Exception"...') #1 {main} thrown in %s on line %d diff --git a/ext/standard/tests/serialize/bug70963.phpt b/ext/standard/tests/serialize/bug70963.phpt index 63f5845ae0d8..857ec819de3d 100644 --- a/ext/standard/tests/serialize/bug70963.phpt +++ b/ext/standard/tests/serialize/bug70963.phpt @@ -2,12 +2,12 @@ Bug #70963 (Unserialize shows UNKNOW in result) --FILE-- --EXPECTF-- Fatal error: Uncaught TypeError: Cannot assign string to property Exception::$trace of type array in %s:%d Stack trace: -#0 %s(%d): unserialize('a:2:{i:0;O:9:"e...') +#0 %s(%d): unserialize('a:2:{i:0;O:9:"E...') #1 {main} thrown in %s on line %d diff --git a/ext/standard/tests/serialize/bug71995.phpt b/ext/standard/tests/serialize/bug71995.phpt index 9d51ace750e1..4334ffeb40c8 100644 --- a/ext/standard/tests/serialize/bug71995.phpt +++ b/ext/standard/tests/serialize/bug71995.phpt @@ -6,7 +6,7 @@ Bug #71995 (Returning the same var twice from __sleep() produces broken serializ class A { public $b; public function __construct() { - $this->b = new StdClass(); + $this->b = new stdClass(); } public function __sleep() { return array("b", "b"); diff --git a/ext/standard/tests/serialize/serialization_miscTypes_001.phpt b/ext/standard/tests/serialize/serialization_miscTypes_001.phpt index ea5a0fd808f9..2a74c599bd56 100644 --- a/ext/standard/tests/serialize/serialization_miscTypes_001.phpt +++ b/ext/standard/tests/serialize/serialization_miscTypes_001.phpt @@ -39,7 +39,7 @@ $Variation_arr = array( array(), // zero elements array(1, 2, 3, 12345666, -2344), array(0, 1, 2, 3.333, -4, -5.555, TRUE, FALSE, NULL, "", '', " ", - array(), array(1,2,array()), "string", new stdclass + array(), array(1,2,array()), "string", new stdClass ), &$arr_var, // Reference to an array diff --git a/ext/standard/tests/serialize/serialization_objects_012.phpt b/ext/standard/tests/serialize/serialization_objects_012.phpt index 9887e9f4db1a..52a2d11ab14b 100644 --- a/ext/standard/tests/serialize/serialization_objects_012.phpt +++ b/ext/standard/tests/serialize/serialization_objects_012.phpt @@ -3,7 +3,7 @@ Object serialization / unserialization: real references and COW references --FILE-- a = $obj; $contaner->b = $contaner->a; var_dump($contaner); @@ -54,8 +54,8 @@ var_dump($ucontainer); echo "\n\nObject containing object and reference to that object:\n"; -$obj = new stdclass; -$contaner = new stdclass; +$obj = new stdClass; +$contaner = new stdClass; $contaner->a = $obj; $contaner->b = &$contaner->a; var_dump($contaner); diff --git a/ext/standard/tests/serialize/serialization_objects_016.phpt b/ext/standard/tests/serialize/serialization_objects_016.phpt index 92b83f5f3c9d..22bce2ff3dd9 100644 --- a/ext/standard/tests/serialize/serialization_objects_016.phpt +++ b/ext/standard/tests/serialize/serialization_objects_016.phpt @@ -11,7 +11,7 @@ $s=serialize($y); var_dump($s); $x=unserialize($s); var_dump($x); -vaR_dump(serialize($x)); +var_dump(serialize($x)); ?> --EXPECTF-- array(1) { diff --git a/ext/standard/tests/serialize/unserialize_allowed_classes_option_stringable_value.phpt b/ext/standard/tests/serialize/unserialize_allowed_classes_option_stringable_value.phpt index 5868cf9e923f..9f40c3f84b3d 100644 --- a/ext/standard/tests/serialize/unserialize_allowed_classes_option_stringable_value.phpt +++ b/ext/standard/tests/serialize/unserialize_allowed_classes_option_stringable_value.phpt @@ -10,7 +10,7 @@ $s = serialize($z); class Name { public function __toString(): string { - return 'Foo'; + return 'foo'; } } diff --git a/ext/standard/tests/serialize/unserialize_classes.phpt b/ext/standard/tests/serialize/unserialize_classes.phpt index c4947089a2fe..2e351848c97f 100644 --- a/ext/standard/tests/serialize/unserialize_classes.phpt +++ b/ext/standard/tests/serialize/unserialize_classes.phpt @@ -66,7 +66,9 @@ array(3) { } array(3) { [0]=> - object(foo)#%d (1) { + object(__PHP_Incomplete_Class)#%d (2) { + ["__PHP_Incomplete_Class_Name"]=> + string(3) "foo" ["x"]=> string(3) "bar" } @@ -77,7 +79,9 @@ array(3) { } array(3) { [0]=> - object(foo)#%d (1) { + object(__PHP_Incomplete_Class)#%d (2) { + ["__PHP_Incomplete_Class_Name"]=> + string(3) "foo" ["x"]=> string(3) "bar" } @@ -85,4 +89,4 @@ array(3) { int(2) [2]=> string(1) "3" -} +} \ No newline at end of file diff --git a/ext/standard/tests/strings/bug68710.phpt b/ext/standard/tests/strings/bug68710.phpt index 5eeb09b3d65a..e6e7644b6538 100644 --- a/ext/standard/tests/strings/bug68710.phpt +++ b/ext/standard/tests/strings/bug68710.phpt @@ -4,7 +4,7 @@ CVE-2014-8142 fix) --FILE-- allowed_classes; @@ -368,7 +368,7 @@ static inline int unserialize_allowed_class( return 0; } - return zend_hash_exists(classes, lcname); + return zend_hash_exists(classes, name); } #define YYFILL(n) do { } while (0) @@ -1183,8 +1183,6 @@ object ":" uiv ":" ["] { class_name = zend_string_init_interned(str, len, 0); do { - zend_string *lc_name; - if (!(*var_hash)->allowed_classes && ZSTR_HAS_CE_CACHE(class_name)) { ce = ZSTR_GET_CE_CACHE(class_name); if (ce) { @@ -1192,9 +1190,7 @@ object ":" uiv ":" ["] { } } - lc_name = zend_string_tolower(class_name); - if(!unserialize_allowed_class(lc_name, var_hash)) { - zend_string_release_ex(lc_name, 0); + if(!unserialize_allowed_class(class_name, var_hash)) { if (!zend_is_valid_class_name(class_name)) { zend_string_release_ex(class_name, 0); return 0; @@ -1207,30 +1203,26 @@ object ":" uiv ":" ["] { if ((*var_hash)->allowed_classes && ZSTR_HAS_CE_CACHE(class_name)) { ce = ZSTR_GET_CE_CACHE(class_name); if (ce) { - zend_string_release_ex(lc_name, 0); break; } } - ce = zend_hash_find_ptr(EG(class_table), lc_name); + ce = zend_hash_find_ptr(EG(class_table), class_name); if (ce && (ce->ce_flags & ZEND_ACC_LINKED) && !(ce->ce_flags & ZEND_ACC_ANON_CLASS)) { - zend_string_release_ex(lc_name, 0); break; } if (!ZSTR_HAS_CE_CACHE(class_name) && !zend_is_valid_class_name(class_name)) { - zend_string_release_ex(lc_name, 0); zend_string_release_ex(class_name, 0); return 0; } /* Try to find class directly */ BG(serialize_lock)++; - ce = zend_lookup_class_ex(class_name, lc_name, 0); + ce = zend_lookup_class_ex(class_name, 0); BG(serialize_lock)--; - zend_string_release_ex(lc_name, 0); if (EG(exception)) { zend_string_release_ex(class_name, 0); return 0; diff --git a/ext/sysvshm/tests/005.phpt b/ext/sysvshm/tests/005.phpt index e428b59f9911..3472ab859fd3 100644 --- a/ext/sysvshm/tests/005.phpt +++ b/ext/sysvshm/tests/005.phpt @@ -14,7 +14,7 @@ $key = ftok(__FILE__, 't'); $s = shm_attach($key, 1024); shm_put_var($s, -1, "test string"); -shm_put_var($s, 0, new stdclass); +shm_put_var($s, 0, new stdClass); shm_put_var($s, 1, array(1,2,3)); shm_put_var($s, 2, false); shm_put_var($s, 3, null); diff --git a/ext/tidy/tests/007.phpt b/ext/tidy/tests/007.phpt index fbb3731b1d01..b4a584779b76 100644 --- a/ext/tidy/tests/007.phpt +++ b/ext/tidy/tests/007.phpt @@ -8,14 +8,14 @@ tidy.default_config= getopt("tidy-mark")); +var_dump($a->getOpt("tidy-mark")); echo "Current Value of 'error-file': "; -var_dump($a->getopt("error-file")); +var_dump($a->getOpt("error-file")); echo "Current Value of 'tab-size': "; -var_dump($a->getopt("tab-size")); +var_dump($a->getOpt("tab-size")); try { - $a->getopt('bogus-opt'); + $a->getOpt('bogus-opt'); } catch (ValueError $exception) { echo $exception->getMessage() . "\n"; } diff --git a/ext/tidy/tests/023.phpt b/ext/tidy/tests/023.phpt index 7b27452e4bbb..3aed0e59399b 100644 --- a/ext/tidy/tests/023.phpt +++ b/ext/tidy/tests/023.phpt @@ -18,7 +18,7 @@ var_dump(rtrim($tidy->value)); echo "-------\n"; var_dump(tidy_get_root($tidy)->child[0]->isHtml()); -var_dump(tidy_get_root($tidy)->child[0]->child[0]->isPHP()); +var_dump(tidy_get_root($tidy)->child[0]->child[0]->isPhp()); var_dump(tidy_get_root($tidy)->child[0]->child[0]->isAsp()); var_dump(tidy_get_root($tidy)->child[0]->child[0]->isJste()); var_dump(tidy_get_root($tidy)->child[0]->child[0]->type === TIDY_NODETYPE_PHP); diff --git a/ext/tidy/tests/025.phpt b/ext/tidy/tests/025.phpt index d64199349110..1f90314a264a 100644 --- a/ext/tidy/tests/025.phpt +++ b/ext/tidy/tests/025.phpt @@ -6,22 +6,22 @@ tidy ', array('newline' => 'LF')); -var_dump($tidy->Root()->child[0]->isAsp()); +var_dump($tidy->root()->child[0]->isAsp()); $tidy=tidy_parse_string('<# #>', array('newline' => 'LF')); -var_dump($tidy->Root()->child[0]->isJste()); +var_dump($tidy->root()->child[0]->isJste()); $tidy=tidy_parse_string('text'); -var_dump($tidy->Root()->child[0]->child[1]->child[0]->isText()); +var_dump($tidy->root()->child[0]->child[1]->child[0]->isText()); $tidy=tidy_parse_string('', array('newline' => 'LF')); -$n = $tidy->Root()->child[0]->child[1]->child[0]; +$n = $tidy->root()->child[0]->child[1]->child[0]; var_dump($n->isComment()); var_dump((string)$n); var_dump((bool)$n); var_dump((float)$n); var_dump((int)$n); -var_dump($tidy->Root()->child[0]->child[0]->hasSiblings()); +var_dump($tidy->root()->child[0]->child[0]->hasSiblings()); ?> --EXPECT-- diff --git a/ext/tidy/tests/bug54682.phpt b/ext/tidy/tests/bug54682.phpt index 333b89e804c4..86643b92a0b6 100644 --- a/ext/tidy/tests/bug54682.phpt +++ b/ext/tidy/tests/bug54682.phpt @@ -5,7 +5,7 @@ tidy --FILE-- diagnose(); var_dump($nx); diff --git a/ext/tidy/tests/gh12980.phpt b/ext/tidy/tests/gh12980.phpt index 042701388a4e..9902525b3898 100644 --- a/ext/tidy/tests/gh12980.phpt +++ b/ext/tidy/tests/gh12980.phpt @@ -7,7 +7,7 @@ tidy $html = ''; $tidy = new tidy(); -$tidy->ParseString($html); +$tidy->parseString($html); echo tidy_get_output($tidy), "\n"; var_dump($tidy->root()->child[1]->attribute); diff --git a/ext/uri/php_uri_arginfo.h b/ext/uri/php_uri_arginfo.h index 0fb464ee74aa..fc38726d5ebf 100644 --- a/ext/uri/php_uri_arginfo.h +++ b/ext/uri/php_uri_arginfo.h @@ -411,7 +411,7 @@ static zend_class_entry *register_class_Uri_Rfc3986_Uri(void) class_entry = zend_register_internal_class_with_flags(&ce, NULL, ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES|ZEND_ACC_READONLY_CLASS); - zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "withuserinfo", sizeof("withuserinfo") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "withUserInfo", sizeof("withUserInfo") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); return class_entry; } @@ -549,7 +549,7 @@ static zend_class_entry *register_class_Uri_WhatWg_Url(void) class_entry = zend_register_internal_class_with_flags(&ce, NULL, ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES|ZEND_ACC_READONLY_CLASS); - zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "withpassword", sizeof("withpassword") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "withPassword", sizeof("withPassword") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); return class_entry; } diff --git a/ext/uri/tests/026_userinfo.phpt b/ext/uri/tests/026_userinfo.phpt index cff2665803a4..ecbe81fd3a21 100644 --- a/ext/uri/tests/026_userinfo.phpt +++ b/ext/uri/tests/026_userinfo.phpt @@ -30,7 +30,7 @@ try { } $uri5 = Uri\Rfc3986\Uri::parse("file:///foo/bar/"); -$uri6 = $uri5->withUserinfo("user:pass"); +$uri6 = $uri5->withUserInfo("user:pass"); var_dump($uri5->getUserInfo()); var_dump($uri6->getUserInfo()); diff --git a/ext/uri/tests/045.phpt b/ext/uri/tests/045.phpt index f968716f9fcd..42a0c2e22f4a 100644 --- a/ext/uri/tests/045.phpt +++ b/ext/uri/tests/045.phpt @@ -9,7 +9,7 @@ var_dump($uri->toRawString()); var_dump($uri->getPath()); var_dump($uri->getRawPath()); -$url = new Uri\Whatwg\Url("https://example.com/foo/bar%2Fbaz"); +$url = new Uri\WhatWg\Url("https://example.com/foo/bar%2Fbaz"); var_dump($url->toAsciiString()); var_dump($url->getPath()); diff --git a/ext/uri/tests/046.phpt b/ext/uri/tests/046.phpt index 10d56024698e..61bfbea711a8 100644 --- a/ext/uri/tests/046.phpt +++ b/ext/uri/tests/046.phpt @@ -41,17 +41,17 @@ var_dump($uri->toRawString()); var_dump($uri->getPath()); var_dump($uri->getRawPath()); -$url = new Uri\Whatwg\Url("mailto:johndoe@example.com"); +$url = new Uri\WhatWg\Url("mailto:johndoe@example.com"); var_dump($url->toAsciiString()); var_dump($url->getPath()); -$url = new Uri\Whatwg\Url("https://example.com"); +$url = new Uri\WhatWg\Url("https://example.com"); var_dump($url->toAsciiString()); var_dump($url->getPath()); -$url = new Uri\Whatwg\Url("https://example.com/"); +$url = new Uri\WhatWg\Url("https://example.com/"); var_dump($url->toAsciiString()); var_dump($url->getPath()); diff --git a/ext/xml/tests/bug78563_final.phpt b/ext/xml/tests/bug78563_final.phpt index b2ffef0f8b47..86987082dfbc 100644 --- a/ext/xml/tests/bug78563_final.phpt +++ b/ext/xml/tests/bug78563_final.phpt @@ -5,7 +5,7 @@ xml --FILE-- parse($xml); echo "Done\n"; ?> diff --git a/ext/xml/tests/xml_set_processing_instruction_handler_basic.phpt b/ext/xml/tests/xml_set_processing_instruction_handler_basic.phpt index 57bbaba20851..a0db564c78c8 100644 --- a/ext/xml/tests/xml_set_processing_instruction_handler_basic.phpt +++ b/ext/xml/tests/xml_set_processing_instruction_handler_basic.phpt @@ -29,7 +29,7 @@ $xml = <<parse($xml); echo "Done\n"; ?> diff --git a/ext/xml/xml.c b/ext/xml/xml.c index d1bb4bbda23f..fb4f231d71e1 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -1143,7 +1143,7 @@ static bool php_xml_check_string_method_arg( } zend_class_entry *ce = object->ce; - zend_function *method_ptr = zend_hash_find_ptr_lc(&ce->function_table, method_name); + zend_function *method_ptr = zend_hash_find_ptr(&ce->function_table, method_name); if (!method_ptr) { if (arg_num) { zend_argument_value_error(arg_num, "method %s::%s() does not exist", ZSTR_VAL(ce->name), ZSTR_VAL(method_name)); diff --git a/ext/xmlreader/php_xmlreader.c b/ext/xmlreader/php_xmlreader.c index 6a7fb65e2af0..c8587ee5920b 100644 --- a/ext/xmlreader/php_xmlreader.c +++ b/ext/xmlreader/php_xmlreader.c @@ -1330,7 +1330,7 @@ static zend_result xmlreader_fixup_temporaries(void) { } #ifndef ZTS ZEND_MAP_PTR(xmlreader_open_fn.run_time_cache) = ZEND_MAP_PTR(((zend_internal_function *)zend_hash_str_find_ptr(&xmlreader_class_entry->function_table, "open", sizeof("open")-1))->run_time_cache); - ZEND_MAP_PTR(xmlreader_xml_fn.run_time_cache) = ZEND_MAP_PTR(((zend_internal_function *)zend_hash_str_find_ptr(&xmlreader_class_entry->function_table, "xml", sizeof("xml")-1))->run_time_cache); + ZEND_MAP_PTR(xmlreader_xml_fn.run_time_cache) = ZEND_MAP_PTR(((zend_internal_function *)zend_hash_str_find_ptr(&xmlreader_class_entry->function_table, "XML", sizeof("XML")-1))->run_time_cache); #endif if (prev_zend_post_startup_cb) { return prev_zend_post_startup_cb(); @@ -1360,7 +1360,7 @@ PHP_MINIT_FUNCTION(xmlreader) memcpy(&xmlreader_open_fn, zend_hash_str_find_ptr(&xmlreader_class_entry->function_table, "open", sizeof("open")-1), sizeof(zend_internal_function)); xmlreader_open_fn.fn_flags &= ~ZEND_ACC_STATIC; - memcpy(&xmlreader_xml_fn, zend_hash_str_find_ptr(&xmlreader_class_entry->function_table, "xml", sizeof("xml")-1), sizeof(zend_internal_function)); + memcpy(&xmlreader_xml_fn, zend_hash_str_find_ptr(&xmlreader_class_entry->function_table, "XML", sizeof("XML")-1), sizeof(zend_internal_function)); xmlreader_xml_fn.fn_flags &= ~ZEND_ACC_STATIC; prev_zend_post_startup_cb = zend_post_startup_cb; diff --git a/ext/xmlreader/tests/003-get-errors.phpt b/ext/xmlreader/tests/003-get-errors.phpt index 6cb2f20b8d5f..534b42003ee2 100644 --- a/ext/xmlreader/tests/003-get-errors.phpt +++ b/ext/xmlreader/tests/003-get-errors.phpt @@ -20,9 +20,9 @@ if (!$reader->open($filename)) { // Parse the data while ($reader->read()) { - if ($reader->nodeType != XMLREADER::END_ELEMENT) { + if ($reader->nodeType != XMLReader::END_ELEMENT) { // Find the book node - if ($reader->nodeType == XMLREADER::ELEMENT && $reader->name == 'book') { + if ($reader->nodeType == XMLReader::ELEMENT && $reader->name == 'book') { echo $reader->name . "\n"; $attr = $reader->moveToNextAttribute(); diff --git a/ext/xmlreader/tests/003-mb.phpt b/ext/xmlreader/tests/003-mb.phpt index 6808ed7d056b..505d61662dca 100644 --- a/ext/xmlreader/tests/003-mb.phpt +++ b/ext/xmlreader/tests/003-mb.phpt @@ -17,8 +17,8 @@ if (!$reader->open($filename)) { // Only go through while ($reader->read()) { - if ($reader->nodeType != XMLREADER::END_ELEMENT) { - if ($reader->nodeType == XMLREADER::ELEMENT && $reader->hasAttributes) { + if ($reader->nodeType != XMLReader::END_ELEMENT) { + if ($reader->nodeType == XMLReader::ELEMENT && $reader->hasAttributes) { $attr = $reader->moveToFirstAttribute(); echo $reader->name . ": "; echo $reader->value . "\n"; diff --git a/ext/xmlreader/tests/003-move-errors.phpt b/ext/xmlreader/tests/003-move-errors.phpt index be36d252c453..87581e781d44 100644 --- a/ext/xmlreader/tests/003-move-errors.phpt +++ b/ext/xmlreader/tests/003-move-errors.phpt @@ -20,9 +20,9 @@ if (!$reader->open($filename)) { // Parse the data while ($reader->read()) { - if ($reader->nodeType != XMLREADER::END_ELEMENT) { + if ($reader->nodeType != XMLReader::END_ELEMENT) { // Find the book node - if ($reader->nodeType == XMLREADER::ELEMENT && $reader->name == 'book') { + if ($reader->nodeType == XMLReader::ELEMENT && $reader->name == 'book') { echo $reader->name . "\n"; $attr = $reader->moveToNextAttribute(); diff --git a/ext/xmlreader/tests/003.phpt b/ext/xmlreader/tests/003.phpt index a581d0dea02d..7de05cea5f2a 100644 --- a/ext/xmlreader/tests/003.phpt +++ b/ext/xmlreader/tests/003.phpt @@ -17,8 +17,8 @@ if (!$reader->open($filename)) { // Only go through while ($reader->read()) { - if ($reader->nodeType != XMLREADER::END_ELEMENT) { - if ($reader->nodeType == XMLREADER::ELEMENT && $reader->hasAttributes) { + if ($reader->nodeType != XMLReader::END_ELEMENT) { + if ($reader->nodeType == XMLReader::ELEMENT && $reader->hasAttributes) { $attr = $reader->moveToFirstAttribute(); echo $reader->name . ": "; echo $reader->value . "\n"; diff --git a/ext/xmlreader/tests/004.phpt b/ext/xmlreader/tests/004.phpt index bd9887ad145c..f5804c36419a 100644 --- a/ext/xmlreader/tests/004.phpt +++ b/ext/xmlreader/tests/004.phpt @@ -16,9 +16,9 @@ if (!$reader->open($filename)) { } while ($reader->read()) { - if ($reader->nodeType != XMLREADER::END_ELEMENT) { + if ($reader->nodeType != XMLReader::END_ELEMENT) { echo $reader->name."\n"; - if ($reader->nodeType == XMLREADER::ELEMENT && $reader->hasAttributes) { + if ($reader->nodeType == XMLReader::ELEMENT && $reader->hasAttributes) { $attr = $reader->moveToFirstAttribute(); while ($attr) { echo " Attribute Name: ".$reader->name."\n"; diff --git a/ext/xmlreader/tests/006.phpt b/ext/xmlreader/tests/006.phpt index 6fde67903ca5..536e56a4c741 100644 --- a/ext/xmlreader/tests/006.phpt +++ b/ext/xmlreader/tests/006.phpt @@ -16,8 +16,8 @@ $reader->XML($xmlstring); $reader->read(); $reader->read(); -if ($reader->nodeType != XMLREADER::END_ELEMENT) { - if ($reader->nodeType == XMLREADER::ELEMENT && $reader->hasAttributes) { +if ($reader->nodeType != XMLReader::END_ELEMENT) { + if ($reader->nodeType == XMLReader::ELEMENT && $reader->hasAttributes) { $attr = $reader->moveToFirstAttribute(); if ($reader->moveToElement()) { if ($reader->name == 'book') { diff --git a/ext/xmlreader/tests/008.phpt b/ext/xmlreader/tests/008.phpt index fd9aa24cfc47..3c714a07bc9a 100644 --- a/ext/xmlreader/tests/008.phpt +++ b/ext/xmlreader/tests/008.phpt @@ -28,8 +28,8 @@ file_put_contents($file, $xmlstring); $reader = new XMLReader(); $reader->open($file); -$reader->setParserProperty(XMLREADER::LOADDTD, TRUE); -$reader->setParserProperty(XMLREADER::VALIDATE, TRUE); +$reader->setParserProperty(XMLReader::LOADDTD, TRUE); +$reader->setParserProperty(XMLReader::VALIDATE, TRUE); while($reader->read()); if ($reader->isValid()) { echo "file DTD: ok\n"; @@ -56,8 +56,8 @@ $xmlstring = ' $reader = new XMLReader(); $reader->XML($xmlstring); -$reader->setParserProperty(XMLREADER::LOADDTD, TRUE); -$reader->setParserProperty(XMLREADER::VALIDATE, TRUE); +$reader->setParserProperty(XMLReader::LOADDTD, TRUE); +$reader->setParserProperty(XMLReader::VALIDATE, TRUE); while($reader->read()); if ($reader->isValid()) { echo "string DTD: ok\n"; diff --git a/ext/xmlreader/tests/014.phpt b/ext/xmlreader/tests/014.phpt index 26886ae26e6e..4b6135e89bac 100644 --- a/ext/xmlreader/tests/014.phpt +++ b/ext/xmlreader/tests/014.phpt @@ -20,9 +20,9 @@ if (!$reader->open($filename)) { // Parse the data while ($reader->read()) { - if ($reader->nodeType != XMLREADER::END_ELEMENT) { + if ($reader->nodeType != XMLReader::END_ELEMENT) { // Find a node to try modifying - if ($reader->nodeType == XMLREADER::ELEMENT && $reader->name == 'book') { + if ($reader->nodeType == XMLReader::ELEMENT && $reader->name == 'book') { // Try to set the value of the element from book1 to movie1 try { $reader->value = 'movie1'; diff --git a/ext/xmlreader/tests/015-get-errors.phpt b/ext/xmlreader/tests/015-get-errors.phpt index 3cf6134df205..3106d10f98c0 100644 --- a/ext/xmlreader/tests/015-get-errors.phpt +++ b/ext/xmlreader/tests/015-get-errors.phpt @@ -20,9 +20,9 @@ if (!$reader->open($filename)) { // Parse the data while ($reader->read()) { - if ($reader->nodeType != XMLREADER::END_ELEMENT) { + if ($reader->nodeType != XMLReader::END_ELEMENT) { // Find the book node - if ($reader->nodeType == XMLREADER::ELEMENT && $reader->name == 'book') { + if ($reader->nodeType == XMLReader::ELEMENT && $reader->name == 'book') { $attr = $reader->moveToNextAttribute(); // Test for missing namespace argument diff --git a/ext/xmlreader/tests/015-move-errors.phpt b/ext/xmlreader/tests/015-move-errors.phpt index d885c5a6fe97..72f5069fdad9 100644 --- a/ext/xmlreader/tests/015-move-errors.phpt +++ b/ext/xmlreader/tests/015-move-errors.phpt @@ -20,9 +20,9 @@ if (!$reader->open($filename)) { // Parse the data while ($reader->read()) { - if ($reader->nodeType != XMLREADER::END_ELEMENT) { + if ($reader->nodeType != XMLReader::END_ELEMENT) { // Find the book node - if ($reader->nodeType == XMLREADER::ELEMENT && $reader->name == 'book') { + if ($reader->nodeType == XMLReader::ELEMENT && $reader->name == 'book') { // Test for missing namespace argument try { $reader->moveToAttributeNs('idx', null); diff --git a/ext/xmlreader/tests/015.phpt b/ext/xmlreader/tests/015.phpt index 3d95ac107796..4692300ac2c1 100644 --- a/ext/xmlreader/tests/015.phpt +++ b/ext/xmlreader/tests/015.phpt @@ -20,9 +20,9 @@ if (!$reader->open($filename)) { // Parse the data while ($reader->read()) { - if ($reader->nodeType != XMLREADER::END_ELEMENT) { + if ($reader->nodeType != XMLReader::END_ELEMENT) { // Find the book node - if ($reader->nodeType == XMLREADER::ELEMENT && $reader->name == 'book') { + if ($reader->nodeType == XMLReader::ELEMENT && $reader->name == 'book') { $attr = $reader->moveToFirstAttribute(); $attr = $reader->moveToAttributeNs('idx', 'http://www.ns1.namespace.org/'); echo $reader->name . ": "; diff --git a/ext/xmlreader/tests/bug36743.phpt b/ext/xmlreader/tests/bug36743.phpt index b8c72cba30f9..542dfa292d10 100644 --- a/ext/xmlreader/tests/bug36743.phpt +++ b/ext/xmlreader/tests/bug36743.phpt @@ -15,7 +15,7 @@ class Test extends XMLReader } } -$t = new test; +$t = new Test; echo "Done\n"; ?> diff --git a/ext/xmlreader/tests/bug51936.phpt b/ext/xmlreader/tests/bug51936.phpt index 6014c5550a62..66accb4bf982 100644 --- a/ext/xmlreader/tests/bug51936.phpt +++ b/ext/xmlreader/tests/bug51936.phpt @@ -6,7 +6,7 @@ xmlreader xml(""); +$xmlreader->XML(""); $xmlreader->next(); diff --git a/ext/xmlreader/tests/bug64230.phpt b/ext/xmlreader/tests/bug64230.phpt index fc739c1fcad8..f1d20684d845 100644 --- a/ext/xmlreader/tests/bug64230.phpt +++ b/ext/xmlreader/tests/bug64230.phpt @@ -17,7 +17,7 @@ echo "Internal errors TRUE\n"; libxml_use_internal_errors(true); $x = new XMLReader; -$x->xml(""); +$x->XML(""); $x->read(); show_internal_errors(); @@ -26,7 +26,7 @@ echo "Internal errors FALSE\n"; libxml_use_internal_errors(false); $x = new XMLReader; -$x->xml(""); +$x->XML(""); $x->read(); show_internal_errors(); diff --git a/ext/xmlreader/tests/bug71805.phpt b/ext/xmlreader/tests/bug71805.phpt index 67e4c97d30c9..3b3759552c9d 100644 --- a/ext/xmlreader/tests/bug71805.phpt +++ b/ext/xmlreader/tests/bug71805.phpt @@ -15,7 +15,7 @@ function TestXML($file) { while (($lastRead = $XR->read()) && ($XR->name !== 'records')); while (($lastRead = $XR->read()) && ($XR->name !== 'record')); while ($lastRead) { - $xml = $XR->readOuterXML(); + $xml = $XR->readOuterXml(); if ($xml === '') { $err = ''; if ($e = libxml_get_last_error()) { $err = $e->message.' (line: '.$e->line.')'; } diff --git a/ext/xmlreader/tests/libxml_global_state_entity_loader_bypass.phpt b/ext/xmlreader/tests/libxml_global_state_entity_loader_bypass.phpt index a2b5adbb0f83..5747b23aea2f 100644 --- a/ext/xmlreader/tests/libxml_global_state_entity_loader_bypass.phpt +++ b/ext/xmlreader/tests/libxml_global_state_entity_loader_bypass.phpt @@ -17,7 +17,7 @@ libxml_use_internal_errors(true); zend_test_override_libxml_global_state(); echo "--- String test ---\n"; -$reader = XMLReader::xml($xml); +$reader = XMLReader::XML($xml); $reader->read(); echo "--- File test ---\n"; diff --git a/ext/xmlreader/tests/readString_basic.phpt b/ext/xmlreader/tests/readString_basic.phpt index cf12d745e844..a63a77a37da9 100644 --- a/ext/xmlreader/tests/readString_basic.phpt +++ b/ext/xmlreader/tests/readString_basic.phpt @@ -8,7 +8,7 @@ xmlreader $xml = 'Book1Book2'; $reader = new XMLReader(); -$reader->xml($xml); +$reader->XML($xml); $reader->read(); echo $reader->readString(); ?> diff --git a/ext/xmlwriter/tests/OO_006.phpt b/ext/xmlwriter/tests/OO_006.phpt index ae2bd29bfd27..f2f257262e9c 100644 --- a/ext/xmlwriter/tests/OO_006.phpt +++ b/ext/xmlwriter/tests/OO_006.phpt @@ -11,7 +11,7 @@ $xw->openUri($doc_dest); $xw->startDtd('foo', NULL, 'urn:bar'); $xw->endDtd(); $xw->startElement('foo'); -$xw->writeElementNS('foo', 'bar', 'urn:foo', 'dummy content'); +$xw->writeElementNs('foo', 'bar', 'urn:foo', 'dummy content'); $xw->endElement(); // Force to write and empty the buffer diff --git a/ext/xmlwriter/tests/OO_007.phpt b/ext/xmlwriter/tests/OO_007.phpt index e8ad2d5de26c..69fb581ae9c2 100644 --- a/ext/xmlwriter/tests/OO_007.phpt +++ b/ext/xmlwriter/tests/OO_007.phpt @@ -11,12 +11,12 @@ $xw->setIndent(TRUE); $xw->setIndentString(' '); $xw->startDocument('1.0', "UTF-8"); $xw->startElement('root'); -$xw->startElementNS('ns1', 'child1', 'urn:ns1'); -$xw->startAttributeNS('ns1', 'att1', 'urn:ns1'); +$xw->startElementNs('ns1', 'child1', 'urn:ns1'); +$xw->startAttributeNs('ns1', 'att1', 'urn:ns1'); $xw->text('a&b'); $xw->endAttribute(); $xw->writeAttribute('att2', "double\" single'"); -$xw->startAttributeNS('ns1', 'att2', 'urn:ns1'); +$xw->startAttributeNs('ns1', 'att2', 'urn:ns1'); $xw->text("<>\"'&"); $xw->endAttribute(); $xw->writeElement('chars', "special characters: <>\"'&"); diff --git a/ext/xmlwriter/tests/OO_010.phpt b/ext/xmlwriter/tests/OO_010.phpt index 3e8c91993b2d..59e72c50043d 100644 --- a/ext/xmlwriter/tests/OO_010.phpt +++ b/ext/xmlwriter/tests/OO_010.phpt @@ -14,8 +14,8 @@ $xw->setIndent(TRUE); $xw->setIndentString(' '); $xw->startDocument('1.0', "UTF-8"); $xw->startElement('root'); -$xw->startElementNS('ns1', 'child1', 'urn:ns1'); -$xw->writeAttributeNS('ns1', 'att1', 'urn:ns1', '<>"\'&'); +$xw->startElementNs('ns1', 'child1', 'urn:ns1'); +$xw->writeAttributeNs('ns1', 'att1', 'urn:ns1', '<>"\'&'); $xw->writeElement('chars', "special characters: <>\"'&"); $xw->endElement(); $xw->endDocument(); diff --git a/ext/xmlwriter/tests/OO_011.phpt b/ext/xmlwriter/tests/OO_011.phpt index 9a2b9122846a..3aae18038770 100644 --- a/ext/xmlwriter/tests/OO_011.phpt +++ b/ext/xmlwriter/tests/OO_011.phpt @@ -14,8 +14,8 @@ $xw->setIndent(TRUE); $xw->setIndentString(' '); $xw->startDocument('1.0', "UTF-8"); $xw->startElement('root'); -$xw->startElementNS('ns1', 'child1', 'urn:ns1'); -$xw->writeAttributeNS('ns1', 'att1', 'urn:ns1', '<>"\'&'); +$xw->startElementNs('ns1', 'child1', 'urn:ns1'); +$xw->writeAttributeNs('ns1', 'att1', 'urn:ns1', '<>"\'&'); $xw->writeElement('chars', "special characters: <>\"'&"); $xw->endElement(); $xw->startElement('empty'); diff --git a/ext/xmlwriter/tests/OO_012.phpt b/ext/xmlwriter/tests/OO_012.phpt index 6da45358ef51..ecda05e13d08 100644 --- a/ext/xmlwriter/tests/OO_012.phpt +++ b/ext/xmlwriter/tests/OO_012.phpt @@ -8,7 +8,7 @@ xmlwriter , &, and quotes like ' and \""; -$xmlWriter = new XmlWriter(); +$xmlWriter = new XMLWriter(); $xmlWriter->openMemory(); $xmlWriter->startDocument('1.0', 'UTF-8'); @@ -16,7 +16,7 @@ $xmlWriter->startElement('myDocumentRoot'); $xmlWriter->startElement('myElement'); // CData output $xmlWriter->startElement('cdataElement'); -$xmlWriter->writeCData($cDataString); +$xmlWriter->writeCdata($cDataString); $xmlWriter->endElement(); // end the document and output $xmlWriter->endElement(); diff --git a/ext/xmlwriter/tests/OO_013.phpt b/ext/xmlwriter/tests/OO_013.phpt index 4b5a27b99849..394c2386e990 100644 --- a/ext/xmlwriter/tests/OO_013.phpt +++ b/ext/xmlwriter/tests/OO_013.phpt @@ -8,7 +8,7 @@ xmlwriter , &, and quotes like ' and \"]]>"; -$xmlWriter = new XmlWriter(); +$xmlWriter = new XMLWriter(); $xmlWriter->openMemory(); $xmlWriter->startDocument('1.0', 'UTF-8'); diff --git a/ext/xmlwriter/tests/bug41287.phpt b/ext/xmlwriter/tests/bug41287.phpt index 4468ee6ff441..fdf04d0dced1 100644 --- a/ext/xmlwriter/tests/bug41287.phpt +++ b/ext/xmlwriter/tests/bug41287.phpt @@ -21,10 +21,10 @@ $xw = new XMLWriter(); $xw->openMemory(); $xw->setIndent(true); $xw->startDocument(); -$xw->startElementNS('test', 'test', 'urn:x-test:'); -$xw->writeElementNS('test', 'foo', null, ''); -$xw->writeElementNS(null, 'bar', 'urn:x-test:', ''); -$xw->writeElementNS(null, 'bar', '', ''); +$xw->startElementNs('test', 'test', 'urn:x-test:'); +$xw->writeElementNs('test', 'foo', null, ''); +$xw->writeElementNs(null, 'bar', 'urn:x-test:', ''); +$xw->writeElementNs(null, 'bar', '', ''); $xw->endElement(); $xw->endDocument(); print $xw->flush(true); diff --git a/ext/xmlwriter/tests/bug41326.phpt b/ext/xmlwriter/tests/bug41326.phpt index 70823dbf0f7f..7aa01a8ab75a 100644 --- a/ext/xmlwriter/tests/bug41326.phpt +++ b/ext/xmlwriter/tests/bug41326.phpt @@ -4,7 +4,7 @@ Bug #41287 (Writing empty tags with Xmlwriter::WriteElement[ns]) xmlwriter --FILE-- openMemory(); $xml->setIndent(true); $xml->startDocument(); @@ -23,12 +23,12 @@ $xw = new XMLWriter(); $xw->openMemory(); $xw->setIndent(true); $xw->startDocument(); -$xw->startElementNS('test', 'test', 'urn:x-test:'); -$xw->writeElementNS('test', 'foo', null, ''); -$xw->writeElementNS(null, 'bar', 'urn:x-test:', ''); -$xw->writeElementNS(null, 'bar', 'urn:x-test:', NULL); -$xw->writeElementNS(null, 'bar', 'urn:x-test:'); -$xw->writeElementNS(null, 'bar', '', ''); +$xw->startElementNs('test', 'test', 'urn:x-test:'); +$xw->writeElementNs('test', 'foo', null, ''); +$xw->writeElementNs(null, 'bar', 'urn:x-test:', ''); +$xw->writeElementNs(null, 'bar', 'urn:x-test:', NULL); +$xw->writeElementNs(null, 'bar', 'urn:x-test:'); +$xw->writeElementNs(null, 'bar', '', ''); $xw->endElement(); $xw->endDocument(); print $xw->flush(true); diff --git a/ext/xmlwriter/tests/bug79344.phpt b/ext/xmlwriter/tests/bug79344.phpt index b8cb0964223b..7e3662bcfce8 100644 --- a/ext/xmlwriter/tests/bug79344.phpt +++ b/ext/xmlwriter/tests/bug79344.phpt @@ -9,8 +9,8 @@ $writer->openMemory(); $writer->setIndent(true); $writer->startElement('foo'); -$writer->writeAttributeNS(null, 'test1', null, 'test1'); -$writer->startAttributeNS(null, 'test2', null); +$writer->writeAttributeNs(null, 'test1', null, 'test1'); +$writer->startAttributeNs(null, 'test2', null); $writer->text('test2'); $writer->endAttribute(); diff --git a/ext/xsl/tests/XSLTProcessor_callables.phpt b/ext/xsl/tests/XSLTProcessor_callables.phpt index a7f21335e736..c03a5d854967 100644 --- a/ext/xsl/tests/XSLTProcessor_callables.phpt +++ b/ext/xsl/tests/XSLTProcessor_callables.phpt @@ -7,7 +7,7 @@ xsl require __DIR__ . '/xpath_callables.inc'; -$inputdom = new DomDocument(); +$inputdom = new DOMDocument(); $inputdom->loadXML('hello'); echo "--- Legit cases: none ---\n"; @@ -28,15 +28,15 @@ var_dump($proc->transformToXml($inputdom)); echo "--- Legit cases: set ---\n"; $proc = createProcessor(["'mydump', string(@href)", "'xyz', string(@href)", "'var_dump', string(@href)"]); -$proc->registerPhpFunctions([]); +$proc->registerPHPFunctions([]); $proc->registerPHPFunctions(["xyz" => MyClass::dump(...), "mydump" => function (string $x) { var_dump($x); }]); -$proc->registerPhpFunctions(str_repeat("var_dump", mt_rand(1, 1) /* defeat SCCP */)); +$proc->registerPHPFunctions(str_repeat("var_dump", mt_rand(1, 1) /* defeat SCCP */)); var_dump($proc->transformToXml($inputdom)); $proc = createProcessor(["'notinset', string(@href)"]); -$proc->registerPhpFunctions([]); +$proc->registerPHPFunctions([]); try { var_dump($proc->transformToXml($inputdom)); } catch (Throwable $e) { diff --git a/ext/xsl/tests/XSLTProcessor_callables_errors.phpt b/ext/xsl/tests/XSLTProcessor_callables_errors.phpt index 12571f2496d0..75a855b5f32a 100644 --- a/ext/xsl/tests/XSLTProcessor_callables_errors.phpt +++ b/ext/xsl/tests/XSLTProcessor_callables_errors.phpt @@ -9,49 +9,49 @@ require __DIR__ . '/xpath_callables.inc'; $proc = createProcessor([]); try { - $proc->registerPhpFunctions("nonexistent"); + $proc->registerPHPFunctions("nonexistent"); } catch (TypeError $e) { echo $e->getMessage(), "\n"; } try { - $proc->registerPhpFunctions(function () {}); + $proc->registerPHPFunctions(function () {}); } catch (TypeError $e) { echo $e->getMessage(), "\n"; } try { - $proc->registerPhpFunctions([function () {}]); + $proc->registerPHPFunctions([function () {}]); } catch (Throwable $e) { echo $e->getMessage(), "\n"; } try { - $proc->registerPhpFunctions([var_dump(...)]); + $proc->registerPHPFunctions([var_dump(...)]); } catch (Throwable $e) { echo $e->getMessage(), "\n"; } try { - $proc->registerPhpFunctions(["nonexistent"]); + $proc->registerPHPFunctions(["nonexistent"]); } catch (Throwable $e) { echo $e->getMessage(), "\n"; } try { - $proc->registerPhpFunctions(["" => var_dump(...)]); + $proc->registerPHPFunctions(["" => var_dump(...)]); } catch (Throwable $e) { echo $e->getMessage(), "\n"; } try { - $proc->registerPhpFunctions(["\0" => var_dump(...)]); + $proc->registerPHPFunctions(["\0" => var_dump(...)]); } catch (Throwable $e) { echo $e->getMessage(), "\n"; } try { - $proc->registerPhpFunctions(""); + $proc->registerPHPFunctions(""); } catch (Throwable $e) { echo $e->getMessage(), "\n"; } diff --git a/ext/xsl/tests/XSLTProcessor_namespace_mapper_lifetime.phpt b/ext/xsl/tests/XSLTProcessor_namespace_mapper_lifetime.phpt index 0d334031df78..1050308c4de0 100644 --- a/ext/xsl/tests/XSLTProcessor_namespace_mapper_lifetime.phpt +++ b/ext/xsl/tests/XSLTProcessor_namespace_mapper_lifetime.phpt @@ -29,7 +29,7 @@ $processor = new XSLTProcessor(); $processor->importStylesheet(Dom\XMLDocument::createFromString($xslXML)); $processor->importStylesheet(Dom\XMLDocument::createFromString($xslXML)); $processor->registerPHPFunctions(); -echo $processor->transformToXML($input), "\n"; +echo $processor->transformToXml($input), "\n"; ?> --EXPECT-- diff --git a/ext/xsl/tests/auto_registration_namespaces_new_dom.phpt b/ext/xsl/tests/auto_registration_namespaces_new_dom.phpt index f68f18413bde..a7b27ade5d73 100644 --- a/ext/xsl/tests/auto_registration_namespaces_new_dom.phpt +++ b/ext/xsl/tests/auto_registration_namespaces_new_dom.phpt @@ -36,7 +36,7 @@ $processor = new XSLTProcessor(); $processor->importStylesheet($sheet); $processor->registerPHPFunctions(); $processor->registerPHPFunctionNS('urn:test', 'reverse', 'strrev'); -echo $processor->transformToXML($input), "\n"; +echo $processor->transformToXml($input), "\n"; ?> --EXPECT-- diff --git a/ext/xsl/tests/bug26384.phpt b/ext/xsl/tests/bug26384.phpt index a85136e5c8f3..1ec23d493a2b 100644 --- a/ext/xsl/tests/bug26384.phpt +++ b/ext/xsl/tests/bug26384.phpt @@ -4,19 +4,19 @@ Bug #26384 (domxslt->process causes segfault with xsl:key) xsl --FILE-- load(__DIR__."/area_name.xml"); if(!$dom) { echo "Error while parsing the document\n"; exit; } -$xsl = new domDocument; +$xsl = new DOMDocument; $xsl->load(__DIR__."/area_list.xsl"); if(!$xsl) { echo "Error while parsing the document\n"; exit; } -$proc = new xsltprocessor; +$proc = new XSLTProcessor; if(!$proc) { echo "Error while making xsltprocessor object\n"; exit; diff --git a/ext/xsl/tests/bug33853.phpt b/ext/xsl/tests/bug33853.phpt index 858f9dac012f..c94bf523797b 100644 --- a/ext/xsl/tests/bug33853.phpt +++ b/ext/xsl/tests/bug33853.phpt @@ -10,7 +10,7 @@ spl_autoload_register(function ($className) { exit(); }); -$xsl = new DomDocument(); +$xsl = new DOMDocument(); $xsl->loadXML(' '); -$inputdom = new DomDocument(); +$inputdom = new DOMDocument(); $inputdom->loadXML(' '); -$proc = new XsltProcessor(); -$proc->registerPhpFunctions(); +$proc = new XSLTProcessor(); +$proc->registerPHPFunctions(); $xsl = $proc->importStylesheet($xsl); $newdom = $proc->transformToDoc($inputdom); ?> diff --git a/ext/xsl/tests/bug49634.phpt b/ext/xsl/tests/bug49634.phpt index 357f8308f942..479d0f0e46bc 100644 --- a/ext/xsl/tests/bug49634.phpt +++ b/ext/xsl/tests/bug49634.phpt @@ -40,7 +40,7 @@ for ($i = 0; $i < 10; $i++) { $xsltProcessor = new XSLTProcessor(); $xsltProcessor->registerPHPFunctions(array('testFunction')); - $xsltProcessor->importStyleSheet($domXsl); + $xsltProcessor->importStylesheet($domXsl); try { @$xsltProcessor->transformToDoc($domXml); } catch (Exception $e) { diff --git a/ext/xsl/tests/bug53965.phpt b/ext/xsl/tests/bug53965.phpt index 3faa7e8886a3..9d3ed0e2d8f4 100644 --- a/ext/xsl/tests/bug53965.phpt +++ b/ext/xsl/tests/bug53965.phpt @@ -14,9 +14,9 @@ $xsl = new DOMDocument(); $xsl->load($base . DIRECTORY_SEPARATOR . 'collection.xsl'); $proc = new XSLTProcessor; -$proc->importStyleSheet($xsl); +$proc->importStylesheet($xsl); -echo $proc->transformToXML($xml); +echo $proc->transformToXml($xml); ?> --EXPECT-- Hey! Welcome to Nicolas Eliaszewicz's sweet CD collection! diff --git a/ext/xsl/tests/bug54446.phpt b/ext/xsl/tests/bug54446.phpt index 869edc131add..be7ce05042fe 100644 --- a/ext/xsl/tests/bug54446.phpt +++ b/ext/xsl/tests/bug54446.phpt @@ -32,7 +32,7 @@ $xsl->loadXML( $sXsl ); $proc->importStylesheet( $xsl ); # TRASNFORM & PRINT -print $proc->transformToXML( $dom ); +print $proc->transformToXml( $dom ); if (file_exists($outputfile)) { @@ -45,7 +45,7 @@ if (file_exists($outputfile)) { $proc->setSecurityPrefs(XSL_SECPREF_NONE); # TRASNFORM & PRINT -print $proc->transformToXML( $dom ); +print $proc->transformToXml( $dom ); if (file_exists($outputfile)) { @@ -60,7 +60,7 @@ unlink($outputfile); $proc->setSecurityPrefs( XSL_SECPREF_WRITE_FILE | XSL_SECPREF_WRITE_NETWORK | XSL_SECPREF_CREATE_DIRECTORY); # TRASNFORM & PRINT -print $proc->transformToXML( $dom ); +print $proc->transformToXml( $dom ); if (file_exists($outputfile)) { print "$outputfile exists, but shouldn't!\n"; diff --git a/ext/xsl/tests/bug54446_with_ini.phpt b/ext/xsl/tests/bug54446_with_ini.phpt index 6cacc284c77b..456d8dcde1f1 100644 --- a/ext/xsl/tests/bug54446_with_ini.phpt +++ b/ext/xsl/tests/bug54446_with_ini.phpt @@ -32,7 +32,7 @@ $xsl->loadXML( $sXsl ); $proc->importStylesheet( $xsl ); # TRASNFORM & PRINT -print $proc->transformToXML( $dom ); +print $proc->transformToXml( $dom ); if (file_exists($outputfile)) { @@ -45,7 +45,7 @@ if (file_exists($outputfile)) { $proc->setSecurityPrefs(XSL_SECPREF_NONE); # TRANSFORM & PRINT -print $proc->transformToXML( $dom ); +print $proc->transformToXml( $dom ); if (file_exists($outputfile)) { @@ -60,7 +60,7 @@ unlink($outputfile); $proc->setSecurityPrefs(XSL_SECPREF_WRITE_FILE | XSL_SECPREF_WRITE_NETWORK | XSL_SECPREF_CREATE_DIRECTORY); # TRANSFORM & PRINT -print $proc->transformToXML( $dom ); +print $proc->transformToXml( $dom ); if (file_exists($outputfile)) { print "$outputfile exists, but shouldn't!\n"; diff --git a/ext/xsl/tests/bug69168.phpt b/ext/xsl/tests/bug69168.phpt index 41fc3aafd820..d75163aa7601 100644 --- a/ext/xsl/tests/bug69168.phpt +++ b/ext/xsl/tests/bug69168.phpt @@ -27,10 +27,10 @@ $proc = new XSLTProcessor(); $proc->registerPHPFunctions(); $xslDoc = new DOMDocument(); $xslDoc->loadXML($xsl); -@$proc->importStyleSheet($xslDoc); +@$proc->importStylesheet($xslDoc); $xmlDoc = new DOMDocument(); $xmlDoc->loadXML($xml); -echo @$proc->transformToXML($xmlDoc); +echo @$proc->transformToXml($xmlDoc); // Tests modification of the nodes var_dump($xmlDoc->firstChild->firstChild->firstChild->getNodePath()); diff --git a/ext/xsl/tests/bug70078.phpt b/ext/xsl/tests/bug70078.phpt index 99c77d0785bb..55ea0059f710 100644 --- a/ext/xsl/tests/bug70078.phpt +++ b/ext/xsl/tests/bug70078.phpt @@ -40,9 +40,9 @@ $xsl = new \DOMDocument(); $xsl->loadXML($xslStr); $xslt = new \XSLTProcessor(); $xslt->registerPHPFunctions('testPhpFunction'); -$xslt->importStyleSheet($xsl); +$xslt->importStylesheet($xsl); -echo $xslt->transformToXML($dom); +echo $xslt->transformToXml($dom); ?> --EXPECT-- diff --git a/ext/xsl/tests/bug70535.phpt b/ext/xsl/tests/bug70535.phpt index 62fd0b1e3b1c..8c32aa808461 100644 --- a/ext/xsl/tests/bug70535.phpt +++ b/ext/xsl/tests/bug70535.phpt @@ -9,9 +9,9 @@ simplexml $xmlInput = simplexml_load_string(''); $xslInput = 'success'; -$xsl = new \DomDocument(); +$xsl = new \DOMDocument(); $xsl->loadXML($xslInput); -$xslt = new \XsltProcessor(); +$xslt = new \XSLTProcessor(); $xslt->importStylesheet($xsl); $xmloutput = $xslt->transformToXml($xmlInput); ?> diff --git a/ext/xsl/tests/bug71571_a.phpt b/ext/xsl/tests/bug71571_a.phpt index ee19a9189650..bdfb0a6c7130 100644 --- a/ext/xsl/tests/bug71571_a.phpt +++ b/ext/xsl/tests/bug71571_a.phpt @@ -27,7 +27,7 @@ $doc = new DOMDocument(); $proc = new XSLTProcessor; $proc->maxTemplateDepth = 2; -$proc->importStyleSheet($xsl); +$proc->importStylesheet($xsl); $proc->transformToDoc($doc); ?> diff --git a/ext/xsl/tests/bug71571_b.phpt b/ext/xsl/tests/bug71571_b.phpt index b40076bfd368..275bf6c9f088 100644 --- a/ext/xsl/tests/bug71571_b.phpt +++ b/ext/xsl/tests/bug71571_b.phpt @@ -32,7 +32,7 @@ $proc = new XSLTProcessor; // Set the template depth limit so high that we will certainly hit the variable depth limit first. $proc->maxTemplateDepth = 2**30; $proc->maxTemplateVars = 2; -$proc->importStyleSheet($xsl); +$proc->importStylesheet($xsl); $proc->transformToDoc($doc); ?> diff --git a/ext/xsl/tests/php_function_edge_cases.phpt b/ext/xsl/tests/php_function_edge_cases.phpt index a8e0eb098d16..afa3a5016f68 100644 --- a/ext/xsl/tests/php_function_edge_cases.phpt +++ b/ext/xsl/tests/php_function_edge_cases.phpt @@ -6,7 +6,7 @@ xsl loadXML(' '); - $inputdom = new DomDocument(); + $inputdom = new DOMDocument(); $inputdom->loadXML(' '); - $proc = new XsltProcessor(); - $proc->registerPhpFunctions(); + $proc = new XSLTProcessor(); + $proc->registerPHPFunctions(); $proc->importStylesheet($xsl); $proc->transformToDoc($inputdom); } diff --git a/ext/xsl/tests/prepare.inc b/ext/xsl/tests/prepare.inc index bd5bbee40cbc..50ada593ffda 100644 --- a/ext/xsl/tests/prepare.inc +++ b/ext/xsl/tests/prepare.inc @@ -1,17 +1,17 @@ load(dirname(__FILE__)."/xslt.xml"); if(!$dom) { echo "Error while parsing the document\n"; exit; } -$xsl = new domDocument; +$xsl = new DOMDocument; $xsl->load(dirname(__FILE__)."/xslt.xsl"); if(!$xsl) { echo "Error while parsing the document\n"; exit; } -$proc = new xsltprocessor; +$proc = new XSLTProcessor; if(!$proc) { echo "Error while making xsltprocessor object\n"; exit; diff --git a/ext/xsl/tests/registerPHPFunctionNS.phpt b/ext/xsl/tests/registerPHPFunctionNS.phpt index 543830b4d05a..8084332192b4 100644 --- a/ext/xsl/tests/registerPHPFunctionNS.phpt +++ b/ext/xsl/tests/registerPHPFunctionNS.phpt @@ -26,7 +26,7 @@ class StatefulClass { } function createProcessor($inputs) { - $xsl = new DomDocument(); + $xsl = new DOMDocument(); $xsl->loadXML(' loadXML('hello'); echo "--- Legit cases: none ---\n"; diff --git a/ext/xsl/tests/registerPHPFunctionNS_errors.phpt b/ext/xsl/tests/registerPHPFunctionNS_errors.phpt index d8ccd52f5b34..6d9649705090 100644 --- a/ext/xsl/tests/registerPHPFunctionNS_errors.phpt +++ b/ext/xsl/tests/registerPHPFunctionNS_errors.phpt @@ -13,37 +13,37 @@ class TrampolineClass { require __DIR__ . '/xpath_callables.inc'; try { - createProcessor([])->registerPhpFunctionNS('http://php.net/xsl', 'strtolower', strtolower(...)); + createProcessor([])->registerPHPFunctionNS('http://php.net/xsl', 'strtolower', strtolower(...)); } catch (ValueError $e) { echo $e->getMessage(), "\n"; } try { - createProcessor([])->registerPhpFunctionNS('http://php.net/xsl', 'test', [new TrampolineClass, 'test']); + createProcessor([])->registerPHPFunctionNS('http://php.net/xsl', 'test', [new TrampolineClass, 'test']); } catch (ValueError $e) { echo $e->getMessage(), "\n"; } try { - createProcessor([])->registerPhpFunctionNS('urn:foo', '$$$', [new TrampolineClass, 'test']); + createProcessor([])->registerPHPFunctionNS('urn:foo', '$$$', [new TrampolineClass, 'test']); } catch (ValueError $e) { echo $e->getMessage(), "\n"; } try { - createProcessor([])->registerPhpFunctionNS('urn:foo', 'x:a', strtolower(...)); + createProcessor([])->registerPHPFunctionNS('urn:foo', 'x:a', strtolower(...)); } catch (ValueError $e) { echo $e->getMessage(), "\n"; } try { - createProcessor([])->registerPhpFunctionNS("urn:foo", "\0", strtolower(...)); + createProcessor([])->registerPHPFunctionNS("urn:foo", "\0", strtolower(...)); } catch (ValueError $e) { echo $e->getMessage(), "\n"; } try { - createProcessor([])->registerPhpFunctionNS("\0", 'strtolower', strtolower(...)); + createProcessor([])->registerPHPFunctionNS("\0", 'strtolower', strtolower(...)); } catch (ValueError $e) { echo $e->getMessage(), "\n"; } diff --git a/ext/xsl/tests/req30622.phpt b/ext/xsl/tests/req30622.phpt index e5e0244fc38f..b8502cf95fa3 100644 --- a/ext/xsl/tests/req30622.phpt +++ b/ext/xsl/tests/req30622.phpt @@ -27,7 +27,7 @@ $xslDom->loadXML(<<<'XML' XML); $proc = new XSLTProcessor(); -$proc->importStyleSheet($xslDom); +$proc->importStylesheet($xslDom); echo "--- Set both empty and non-empty namespace ---\n"; @@ -36,7 +36,7 @@ $proc->setParameter("http://www.php.net/test", "foo", "SET2"); var_dump($proc->getParameter("", "foo")); var_dump($proc->getParameter("http://www.php.net/test", "foo")); -print $proc->transformToXML($xmlDom); +print $proc->transformToXml($xmlDom); echo "--- Remove empty namespace entry ---\n"; @@ -44,7 +44,7 @@ var_dump($proc->removeParameter("", "foo")); var_dump($proc->getParameter("", "foo")); var_dump($proc->getParameter("http://www.php.net/test", "foo")); -print $proc->transformToXML($xmlDom); +print $proc->transformToXml($xmlDom); echo "--- Remove non-empty namespace entry ---\n"; @@ -52,14 +52,14 @@ var_dump($proc->removeParameter("http://www.php.net/test", "foo")); var_dump($proc->getParameter("", "foo")); var_dump($proc->getParameter("http://www.php.net/test", "foo")); -print $proc->transformToXML($xmlDom); +print $proc->transformToXml($xmlDom); echo "--- Set via array ---\n"; $proc->setParameter("", ["foo" => "SET1"]); $proc->setParameter("http://www.php.net/test", ["foo" => "SET2"]); -print $proc->transformToXML($xmlDom); +print $proc->transformToXml($xmlDom); ?> --EXPECT-- diff --git a/ext/xsl/tests/throw_in_autoload.phpt b/ext/xsl/tests/throw_in_autoload.phpt index 2df7d3690bed..8dcb42299ea5 100644 --- a/ext/xsl/tests/throw_in_autoload.phpt +++ b/ext/xsl/tests/throw_in_autoload.phpt @@ -10,7 +10,7 @@ spl_autoload_register(function ($className) { throw new Exception("Autoload exception"); }); -$xsl = new DomDocument(); +$xsl = new DOMDocument(); $xsl->loadXML(' '); -$inputdom = new DomDocument(); +$inputdom = new DOMDocument(); $inputdom->loadXML(' '); -$proc = new XsltProcessor(); -$proc->registerPhpFunctions(); +$proc = new XSLTProcessor(); +$proc->registerPHPFunctions(); $xsl = $proc->importStylesheet($xsl); try { $newdom = $proc->transformToDoc($inputdom); diff --git a/ext/xsl/tests/xpath_callables.inc b/ext/xsl/tests/xpath_callables.inc index 5db8d484eccf..7703e2313ab2 100644 --- a/ext/xsl/tests/xpath_callables.inc +++ b/ext/xsl/tests/xpath_callables.inc @@ -9,7 +9,7 @@ class MyClass { class MyXSLTProcessor extends XSLTProcessor { public function registerCycle() { - $this->registerPhpFunctions(["cycle" => array($this, "dummy")]); + $this->registerPHPFunctions(["cycle" => array($this, "dummy")]); } public function dummy(string $var) { @@ -18,7 +18,7 @@ class MyXSLTProcessor extends XSLTProcessor { } function createProcessor($inputs, $class = "XSLTProcessor") { - $xsl = new DomDocument(); + $xsl = new DOMDocument(); $xsl->loadXML(' query("/xsl:stylesheet/xsl:output/@method"); if ($res->length != 1) { print "No or more than one xsl:output/@method found"; diff --git a/ext/xsl/tests/xslt004.phpt b/ext/xsl/tests/xslt004.phpt index be3469cb5c9b..5934e15eafc4 100644 --- a/ext/xsl/tests/xslt004.phpt +++ b/ext/xsl/tests/xslt004.phpt @@ -6,7 +6,7 @@ xsl query("/xsl:stylesheet/xsl:output/@encoding"); if ($res->length != 1) { print "No or more than one xsl:output/@encoding found"; diff --git a/ext/xsl/tests/xslt005.phpt b/ext/xsl/tests/xslt005.phpt index c8f04331f32f..d0efdcd8c555 100644 --- a/ext/xsl/tests/xslt005.phpt +++ b/ext/xsl/tests/xslt005.phpt @@ -6,7 +6,7 @@ xsl query("/xsl:stylesheet/xsl:output/@indent"); if ($res->length != 1) { print "No or more than one xsl:output/@indent found"; diff --git a/ext/xsl/tests/xslt008-mb.phpt b/ext/xsl/tests/xslt008-mb.phpt index 0b3353b3aaa0..3a015c822408 100644 --- a/ext/xsl/tests/xslt008-mb.phpt +++ b/ext/xsl/tests/xslt008-mb.phpt @@ -7,7 +7,7 @@ xsl load(__DIR__."/私はガラスを食べられますstreamsinclude.xsl"); if(!$xsl) { echo "Error while parsing the document\n"; @@ -16,7 +16,7 @@ if(!$xsl) { chdir(__DIR__); $proc->importStylesheet($xsl); print "\n"; -print $proc->transformToXML($dom); +print $proc->transformToXml($dom); ?> --EXPECT-- Test 8: Stream Wrapper Includes diff --git a/ext/xsl/tests/xslt008.phpt b/ext/xsl/tests/xslt008.phpt index f5ac6f69f249..423b319d80c8 100644 --- a/ext/xsl/tests/xslt008.phpt +++ b/ext/xsl/tests/xslt008.phpt @@ -7,7 +7,7 @@ xsl load(__DIR__."/streamsinclude.xsl"); if(!$xsl) { echo "Error while parsing the document\n"; @@ -16,7 +16,7 @@ if(!$xsl) { chdir(__DIR__); $proc->importStylesheet($xsl); print "\n"; -print $proc->transformToXML($dom); +print $proc->transformToXml($dom); ?> --EXPECT-- Test 8: Stream Wrapper Includes diff --git a/ext/xsl/tests/xslt009.phpt b/ext/xsl/tests/xslt009.phpt index 099ff731006d..4e4f3176119f 100644 --- a/ext/xsl/tests/xslt009.phpt +++ b/ext/xsl/tests/xslt009.phpt @@ -8,7 +8,7 @@ xsl echo "Test 9: Stream Wrapper XPath-Document()"; include("prepare.inc"); -$xsl = new domDocument; +$xsl = new DOMDocument; $xsl->load(__DIR__."/documentxpath.xsl"); if(!$xsl) { echo "Error while parsing the document\n"; @@ -17,7 +17,7 @@ if(!$xsl) { $proc->importStylesheet($xsl); print "\n"; -print $proc->transformToXML($dom); +print $proc->transformToXml($dom); ?> --EXPECT-- Test 9: Stream Wrapper XPath-Document() diff --git a/ext/xsl/tests/xslt010.phpt b/ext/xsl/tests/xslt010.phpt index 7530be7bd884..77049b4782a7 100644 --- a/ext/xsl/tests/xslt010.phpt +++ b/ext/xsl/tests/xslt010.phpt @@ -4,7 +4,7 @@ Test 10: EXSLT Support xsl --SKIPIF-- hasExsltSupport()) die('skip EXSLT support not available'); if (LIBXSLT_VERSION < 10117) die('skip too old libxsl'); if (LIBXSLT_VERSION > 10129) die('skip for libxsl < 10130'); @@ -13,12 +13,12 @@ if (LIBXSLT_VERSION > 10129) die('skip for libxsl < 10130'); load(__DIR__."/exslt.xsl"); - $proc = new xsltprocessor; + $proc = new XSLTProcessor; $xsl = $proc->importStylesheet($dom); - $xml = new DomDocument(); + $xml = new DOMDocument(); $xml->load(__DIR__."/exslt.xml"); print $proc->transformToXml($xml); diff --git a/ext/xsl/tests/xslt010_gt10129.phpt b/ext/xsl/tests/xslt010_gt10129.phpt index d0d61d7ced35..39940a781824 100644 --- a/ext/xsl/tests/xslt010_gt10129.phpt +++ b/ext/xsl/tests/xslt010_gt10129.phpt @@ -4,7 +4,7 @@ Test 10: EXSLT Support xsl --SKIPIF-- hasExsltSupport()) die('skip EXSLT support not available'); if (LIBXSLT_VERSION < 10130) die('skip too old libxsl'); require __DIR__.'/skip_upstream_issue113.inc'; @@ -13,12 +13,12 @@ require __DIR__.'/skip_upstream_issue113.inc'; load(__DIR__."/exslt.xsl"); - $proc = new xsltprocessor; + $proc = new XSLTProcessor; $xsl = $proc->importStylesheet($dom); - $xml = new DomDocument(); + $xml = new DOMDocument(); $xml->load(__DIR__."/exslt.xml"); print $proc->transformToXml($xml); diff --git a/ext/xsl/tests/xslt011.phpt b/ext/xsl/tests/xslt011.phpt index d7b42f0395ce..fd0b73b88722 100644 --- a/ext/xsl/tests/xslt011.phpt +++ b/ext/xsl/tests/xslt011.phpt @@ -6,12 +6,12 @@ xsl load(__DIR__."/xslt011.xsl"); -$proc = new xsltprocessor; +$proc = new XSLTProcessor; $xsl = $proc->importStylesheet($dom); -$xml = new DomDocument(); +$xml = new DOMDocument(); $xml->load(__DIR__."/xslt011.xml"); $proc->registerPHPFunctions(); print $proc->transformToXml($xml); @@ -27,7 +27,7 @@ function nodeSet($id = null) { if ($id and is_array($id)) { return $id[0]; } else { - $dom = new domdocument; + $dom = new DOMDocument; $dom->loadXML("this is from an external DomDocument"); return $dom->documentElement; } diff --git a/ext/xsl/tests/xslt012.phpt b/ext/xsl/tests/xslt012.phpt index 0bcec2895835..034d75b4d20b 100644 --- a/ext/xsl/tests/xslt012.phpt +++ b/ext/xsl/tests/xslt012.phpt @@ -6,21 +6,21 @@ xsl load(__DIR__."/xslt.xml"); if(!$dom) { echo "Error while parsing the document\n"; exit; } -$xsl = new domDocument; +$xsl = new DOMDocument; $xsl->load(__DIR__."/xslt012.xsl"); if(!$xsl) { echo "Error while parsing the document\n"; exit; } -$proc = new xsltprocessor; +$proc = new XSLTProcessor; if(!$proc) { echo "Error while making xsltprocessor object\n"; exit; diff --git a/ext/xsl/tests/xslt_non_dom_node.phpt b/ext/xsl/tests/xslt_non_dom_node.phpt index 0fbebc122874..70571fca38cd 100644 --- a/ext/xsl/tests/xslt_non_dom_node.phpt +++ b/ext/xsl/tests/xslt_non_dom_node.phpt @@ -13,12 +13,12 @@ function nonDomNode() { return new foo(); } -$dom = new domDocument(); +$dom = new DOMDocument(); $dom->load(__DIR__."/xslt_non_dom_node.xsl"); -$proc = new xsltprocessor; +$proc = new XSLTProcessor; $xsl = $proc->importStylesheet($dom); -$xml = new DomDocument(); +$xml = new DOMDocument(); $xml->load(__DIR__."/xslt011.xml"); $proc->registerPHPFunctions(); try { diff --git a/ext/xsl/tests/xsltprocessor_exsl_registerPhpFunctionNs.phpt b/ext/xsl/tests/xsltprocessor_exsl_registerPhpFunctionNs.phpt index fab072ced0dc..74ac7a8ba305 100644 --- a/ext/xsl/tests/xsltprocessor_exsl_registerPhpFunctionNs.phpt +++ b/ext/xsl/tests/xsltprocessor_exsl_registerPhpFunctionNs.phpt @@ -4,7 +4,7 @@ Overriding an EXSLT builtin xsl --SKIPIF-- hasExsltSupport()) die('skip EXSLT support not available'); if (LIBXSLT_VERSION < 10130) die('skip too old libxsl'); require __DIR__.'/skip_upstream_issue113.inc'; @@ -49,11 +49,11 @@ $proc->importStylesheet($xsldoc); // Should override the builtin function $proc->registerPHPFunctionNS('http://exslt.org/dates-and-times', 'year', dummy_year(...)); -echo $proc->transformToXML($xmldoc), "\n"; +echo $proc->transformToXml($xmldoc), "\n"; // Should not exit $proc->registerPHPFunctionNS('http://www.w3.org/1999/XSL/Transform', 'value-of', dummy_exit(...)); -echo $proc->transformToXML($xmldoc), "\n"; +echo $proc->transformToXml($xmldoc), "\n"; ?> --EXPECT-- diff --git a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-allfuncs.phpt b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-allfuncs.phpt index 1898e8a46dce..d140848f8a8c 100644 --- a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-allfuncs.phpt +++ b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-allfuncs.phpt @@ -5,7 +5,7 @@ xsl --FILE-- load(__DIR__."/phpfunc.xsl"); if(!$phpfuncxsl) { echo "Error while parsing the xsl document\n"; diff --git a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-array-multiple.phpt b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-array-multiple.phpt index 70acb90fba04..51bd331eeb65 100644 --- a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-array-multiple.phpt +++ b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-array-multiple.phpt @@ -9,7 +9,7 @@ xsl --FILE-- load(__DIR__."/phpfunc.xsl"); if(!$phpfuncxsl) { echo "Error while parsing the xsl document\n"; diff --git a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-array-notallowed.phpt b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-array-notallowed.phpt index 6c3761f00431..0ea4ab32a94a 100644 --- a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-array-notallowed.phpt +++ b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-array-notallowed.phpt @@ -5,7 +5,7 @@ xsl --FILE-- load(__DIR__."/phpfunc.xsl"); if(!$phpfuncxsl) { echo "Error while parsing the xsl document\n"; diff --git a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-array.phpt b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-array.phpt index 92994b6763e2..6e62f454283a 100644 --- a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-array.phpt +++ b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-array.phpt @@ -5,7 +5,7 @@ xsl --FILE-- load(__DIR__."/phpfunc.xsl"); if(!$phpfuncxsl) { echo "Error while parsing the xsl document\n"; diff --git a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt index 5356ff39e87d..9db029cf05bd 100644 --- a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt +++ b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt @@ -8,7 +8,7 @@ xsl --FILE-- load(__DIR__."/phpfunc-nostring.xsl"); if(!$phpfuncxsl) { echo "Error while parsing the xsl document\n"; diff --git a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt index 42ebcbb6c086..5a46e99d70ef 100644 --- a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt +++ b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt @@ -7,7 +7,7 @@ xsl --FILE-- load(__DIR__."/phpfunc-undef.xsl"); if(!$phpfuncxsl) { echo "Error while parsing the xsl document\n"; diff --git a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-null.phpt b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-null.phpt index d487da066def..8b3ed426f3da 100644 --- a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-null.phpt +++ b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-null.phpt @@ -9,7 +9,7 @@ xsl --FILE-- load(__DIR__."/phpfunc.xsl"); if(!$phpfuncxsl) { echo "Error while parsing the xsl document\n"; diff --git a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string-multiple.phpt b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string-multiple.phpt index 158e2f38f47c..d128aac6bf0a 100644 --- a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string-multiple.phpt +++ b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string-multiple.phpt @@ -9,7 +9,7 @@ xsl --FILE-- load(__DIR__."/phpfunc.xsl"); if(!$phpfuncxsl) { echo "Error while parsing the xsl document\n"; diff --git a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string-notallowed.phpt b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string-notallowed.phpt index 17323d769fe3..760e26027c16 100644 --- a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string-notallowed.phpt +++ b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string-notallowed.phpt @@ -5,7 +5,7 @@ xsl --FILE-- load(__DIR__."/phpfunc.xsl"); if(!$phpfuncxsl) { echo "Error while parsing the xsl document\n"; diff --git a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string.phpt b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string.phpt index d3d69ee150e3..e9df36e48058 100644 --- a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string.phpt +++ b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string.phpt @@ -5,7 +5,7 @@ xsl --FILE-- load(__DIR__."/phpfunc.xsl"); if(!$phpfuncxsl) { echo "Error while parsing the xsl document\n"; diff --git a/ext/xsl/tests/xsltprocessor_transformToDoc.phpt b/ext/xsl/tests/xsltprocessor_transformToDoc.phpt index fe020eaa1c99..61b11ca39bcc 100644 --- a/ext/xsl/tests/xsltprocessor_transformToDoc.phpt +++ b/ext/xsl/tests/xsltprocessor_transformToDoc.phpt @@ -43,7 +43,7 @@ $xsldoc->loadXML($xsl); $proc = new XSLTProcessor(); $proc->registerPHPFunctions(); -$proc->importStyleSheet($xsldoc); +$proc->importStylesheet($xsldoc); var_dump($proc->transformToDoc($xmldoc)->firstChild->tagName); ?> diff --git a/ext/xsl/tests/xsltprocessor_transformToURI.phpt b/ext/xsl/tests/xsltprocessor_transformToURI.phpt index b3d4ae63d595..ce87df0bf62f 100644 --- a/ext/xsl/tests/xsltprocessor_transformToURI.phpt +++ b/ext/xsl/tests/xsltprocessor_transformToURI.phpt @@ -45,9 +45,9 @@ $xsldoc->loadXML($xsl); $proc = new XSLTProcessor(); $proc->registerPHPFunctions(); -$proc->importStyleSheet($xsldoc); +$proc->importStylesheet($xsldoc); -var_dump($proc->transformToURI($xsldoc, 'php://output')); +var_dump($proc->transformToUri($xsldoc, 'php://output')); ?> --EXPECT-- int(56) diff --git a/ext/xsl/tests/xsltprocessor_transformToXML.phpt b/ext/xsl/tests/xsltprocessor_transformToXML.phpt index a2b5e7566b61..f8e09e467dd4 100644 --- a/ext/xsl/tests/xsltprocessor_transformToXML.phpt +++ b/ext/xsl/tests/xsltprocessor_transformToXML.phpt @@ -46,9 +46,9 @@ $xsldoc->loadXML($xsl); $proc = new XSLTProcessor(); $proc->registerPHPFunctions(); -$proc->importStyleSheet($xsldoc); +$proc->importStylesheet($xsldoc); -var_dump($proc->transformToXML($xmldoc)); +var_dump($proc->transformToXml($xmldoc)); ?> --EXPECT-- string(135) " diff --git a/ext/zend_test/test_arginfo.h b/ext/zend_test/test_arginfo.h index 94f75cdb3601..35340476bbad 100644 --- a/ext/zend_test/test_arginfo.h +++ b/ext/zend_test/test_arginfo.h @@ -970,9 +970,9 @@ static zend_class_entry *register_class_ZendAttributeTest(void) ZVAL_STR(&attribute_ZendTestPropertyAttribute_property_testProp_1->args[0].value, attribute_ZendTestPropertyAttribute_property_testProp_1_arg0_str); - zend_string *attribute_name_ZendTestAttribute_func_testmethod_0 = zend_string_init_interned("ZendTestAttribute", sizeof("ZendTestAttribute") - 1, true); - zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "testmethod", sizeof("testmethod") - 1), attribute_name_ZendTestAttribute_func_testmethod_0, 0); - zend_string_release_ex(attribute_name_ZendTestAttribute_func_testmethod_0, true); + zend_string *attribute_name_ZendTestAttribute_func_testMethod_0 = zend_string_init_interned("ZendTestAttribute", sizeof("ZendTestAttribute") - 1, true); + zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "testMethod", sizeof("testMethod") - 1), attribute_name_ZendTestAttribute_func_testMethod_0, 0); + zend_string_release_ex(attribute_name_ZendTestAttribute_func_testMethod_0, true); return class_entry; } diff --git a/ext/zend_test/tests/observer_declarations_01.phpt b/ext/zend_test/tests/observer_declarations_01.phpt index c03d72ed0940..2faae61c783f 100644 --- a/ext/zend_test/tests/observer_declarations_01.phpt +++ b/ext/zend_test/tests/observer_declarations_01.phpt @@ -38,16 +38,16 @@ foo(); ?> --EXPECTF-- - - + + - - + + foo diff --git a/ext/zend_test/tests/observer_declarations_file_cache.phpt b/ext/zend_test/tests/observer_declarations_file_cache.phpt index 37865a83d5d2..d10206bb259d 100644 --- a/ext/zend_test/tests/observer_declarations_file_cache.phpt +++ b/ext/zend_test/tests/observer_declarations_file_cache.phpt @@ -19,6 +19,6 @@ class B extends A {} ?> --EXPECTF-- - - + + diff --git a/ext/zend_test/tests/observer_preload.phpt b/ext/zend_test/tests/observer_preload.phpt index 042c9e088e53..ff313705dcec 100644 --- a/ext/zend_test/tests/observer_preload.phpt +++ b/ext/zend_test/tests/observer_preload.phpt @@ -29,7 +29,7 @@ foo(); echo 'Done' . PHP_EOL; ?> --EXPECTF-- - + diff --git a/ext/zip/php_zip_arginfo.h b/ext/zip/php_zip_arginfo.h index faa6feb1cb1e..8147243f57f9 100644 --- a/ext/zip/php_zip_arginfo.h +++ b/ext/zip/php_zip_arginfo.h @@ -1282,12 +1282,12 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry #endif - zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setpassword", sizeof("setpassword") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setPassword", sizeof("setPassword") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #if defined(HAVE_ENCRYPTION) - zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setencryptionname", sizeof("setencryptionname") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setEncryptionName", sizeof("setEncryptionName") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setencryptionindex", sizeof("setencryptionindex") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setEncryptionIndex", sizeof("setEncryptionIndex") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #endif return class_entry; diff --git a/ext/zip/tests/ZipArchive_bailout.phpt b/ext/zip/tests/ZipArchive_bailout.phpt index c7e4ede8446d..677a2b59aa4a 100644 --- a/ext/zip/tests/ZipArchive_bailout.phpt +++ b/ext/zip/tests/ZipArchive_bailout.phpt @@ -9,7 +9,7 @@ function &cb() {} $file = __DIR__ . '/gh18907.zip'; $zip = new ZipArchive; -$zip->open($file, ZIPARCHIVE::CREATE); +$zip->open($file, ZipArchive::CREATE); $zip->registerCancelCallback(cb(...)); $zip->addFromString('test', 'test'); $fusion = $zip; diff --git a/ext/zip/tests/ZipArchive_destruct.phpt b/ext/zip/tests/ZipArchive_destruct.phpt index 7e3ef6c5dae4..020429480aad 100644 --- a/ext/zip/tests/ZipArchive_destruct.phpt +++ b/ext/zip/tests/ZipArchive_destruct.phpt @@ -14,7 +14,7 @@ class MyZipArchive extends ZipArchive { new MyZipArchive; $file = __DIR__ . '/ZipArchive_destruct.zip'; -$leak->open($file, ZIPARCHIVE::CREATE); +$leak->open($file, ZipArchive::CREATE); $leak->addFromString('test', 'test'); ?> diff --git a/ext/zip/tests/bug11216.phpt b/ext/zip/tests/bug11216.phpt index ce32c7419b62..267ebd63ec58 100644 --- a/ext/zip/tests/bug11216.phpt +++ b/ext/zip/tests/bug11216.phpt @@ -5,7 +5,7 @@ zip --FILE-- open('__test.zip', ZIPARCHIVE::CREATE); +$archive->open('__test.zip', ZipArchive::CREATE); var_dump($archive->addEmptyDir('test')); print_r($archive); var_dump($archive->addEmptyDir('test')); diff --git a/ext/zip/tests/bug14962.phpt b/ext/zip/tests/bug14962.phpt index 5e0dfd0a958a..1ec7550a4eef 100644 --- a/ext/zip/tests/bug14962.phpt +++ b/ext/zip/tests/bug14962.phpt @@ -9,7 +9,7 @@ $dir = __DIR__; $file = '__tmp14962.txt'; $fullpath = $dir . '/' . $file; $za = new ZipArchive; -$za->open($dir . '/__14962.zip', ZIPARCHIVE::CREATE); +$za->open($dir . '/__14962.zip', ZipArchive::CREATE); $za->addFromString($file, '1234'); $za->close(); diff --git a/ext/zip/tests/bug38944.phpt b/ext/zip/tests/bug38944.phpt index fa062f70be30..be1f3fcc5007 100644 --- a/ext/zip/tests/bug38944.phpt +++ b/ext/zip/tests/bug38944.phpt @@ -7,7 +7,7 @@ zip $arc_name = __DIR__."/bug38944.zip"; $foo = new ZipArchive; -$foo->open($arc_name, ZIPARCHIVE::CREATE); +$foo->open($arc_name, ZipArchive::CREATE); var_dump($foo->status); var_dump($foo->statusSys); diff --git a/ext/zip/tests/bug40228-mb.phpt b/ext/zip/tests/bug40228-mb.phpt index 28fdacd49343..ff328d37a7f7 100644 --- a/ext/zip/tests/bug40228-mb.phpt +++ b/ext/zip/tests/bug40228-mb.phpt @@ -7,7 +7,7 @@ zip $dest = __DIR__ . "/bug40228-mb"; $arc_name = __DIR__ . "/bug40228私はガラスを食べられます.zip"; $zip = new ZipArchive; -$zip->open($arc_name, ZIPARCHIVE::CREATE); +$zip->open($arc_name, ZipArchive::CREATE); $zip->extractTo($dest); if (is_dir($dest . '/test/empty')) { echo "Ok\n"; diff --git a/ext/zip/tests/bug40228.phpt b/ext/zip/tests/bug40228.phpt index ac180f6c58b4..c8c4eb800c28 100644 --- a/ext/zip/tests/bug40228.phpt +++ b/ext/zip/tests/bug40228.phpt @@ -7,7 +7,7 @@ zip $dest = __DIR__ . "/bug40228"; $arc_name = __DIR__ . "/bug40228.zip"; $zip = new ZipArchive; -$zip->open($arc_name, ZIPARCHIVE::CREATE); +$zip->open($arc_name, ZipArchive::CREATE); $zip->extractTo($dest); if (is_dir($dest . '/test/empty')) { echo "Ok\n"; diff --git a/ext/zip/tests/bug53885.phpt b/ext/zip/tests/bug53885.phpt index aebc508eeea3..bd6e8ab5689d 100644 --- a/ext/zip/tests/bug53885.phpt +++ b/ext/zip/tests/bug53885.phpt @@ -9,8 +9,8 @@ if(file_exists($fname)) unlink($fname); touch($fname); $nx=new ZipArchive(); $nx->open($fname); -$nx->locateName("a",ZIPARCHIVE::FL_UNCHANGED); -$nx->statName("a",ZIPARCHIVE::FL_UNCHANGED); +$nx->locateName("a",ZipArchive::FL_UNCHANGED); +$nx->statName("a",ZipArchive::FL_UNCHANGED); ?> ==DONE== --CLEAN-- diff --git a/ext/zip/tests/bug64342_1-mb.phpt b/ext/zip/tests/bug64342_1-mb.phpt index e0a71626bdea..54fbb975f89f 100644 --- a/ext/zip/tests/bug64342_1-mb.phpt +++ b/ext/zip/tests/bug64342_1-mb.phpt @@ -18,7 +18,7 @@ if (!$zip->open($file)) { if (!$zip->addFile($dirname . 'cant_find_me.txt', 'test.php')) { echo "failed\n"; } -if ($zip->status == ZIPARCHIVE::ER_OK) { +if ($zip->status == ZipArchive::ER_OK) { if (!verify_entries($zip, [ "bar", "foobar/", diff --git a/ext/zip/tests/bug64342_1.phpt b/ext/zip/tests/bug64342_1.phpt index 88b247e2684d..b133ba5bbd2b 100644 --- a/ext/zip/tests/bug64342_1.phpt +++ b/ext/zip/tests/bug64342_1.phpt @@ -18,7 +18,7 @@ if (!$zip->open($file)) { if (!$zip->addFile($dirname . 'cant_find_me.txt', 'test.php')) { echo "failed\n"; } -if ($zip->status == ZIPARCHIVE::ER_OK) { +if ($zip->status == ZipArchive::ER_OK) { if (!verify_entries($zip, [ "bar", "foobar/", diff --git a/ext/zip/tests/bug72660.phpt b/ext/zip/tests/bug72660.phpt index 9a9625ff7c40..37ac4f06b181 100644 --- a/ext/zip/tests/bug72660.phpt +++ b/ext/zip/tests/bug72660.phpt @@ -9,7 +9,7 @@ if(!PHP_ZTS) { die('skip ZTS required'); } --FILE-- open(__DIR__ . "/bug72660.zip", ZIPARCHIVE::CREATE); +$zip->open(__DIR__ . "/bug72660.zip", ZipArchive::CREATE); $zip->addPattern("/noexists/"); ?> okey diff --git a/ext/zip/tests/doubleclose.phpt b/ext/zip/tests/doubleclose.phpt index 611a3b713f84..f03c65597b53 100644 --- a/ext/zip/tests/doubleclose.phpt +++ b/ext/zip/tests/doubleclose.phpt @@ -22,7 +22,7 @@ $zip = new ZipArchive(); if (!$zip->open(__DIR__ . '/test.zip')) { die('Failure'); } -if ($zip->status == ZIPARCHIVE::ER_OK) { +if ($zip->status == ZipArchive::ER_OK) { var_dump($zip->close()); try { $zip->close(); diff --git a/ext/zip/tests/gh18431.phpt b/ext/zip/tests/gh18431.phpt index d4eb89c36c6b..498d8c8633c2 100644 --- a/ext/zip/tests/gh18431.phpt +++ b/ext/zip/tests/gh18431.phpt @@ -7,7 +7,7 @@ zip $file = __DIR__ . '/gh18431.zip'; $callback = var_dump(...); $zip = new ZipArchive; -$zip->open($file, ZIPARCHIVE::CREATE); +$zip->open($file, ZipArchive::CREATE); $zip->registerProgressCallback(0.5, $callback); $zip->registerProgressCallback(0.5, $callback); $zip->addFromString('foo', 'entry #1'); diff --git a/ext/zip/tests/gh18438.phpt b/ext/zip/tests/gh18438.phpt index b997931c7088..dec68f411015 100644 --- a/ext/zip/tests/gh18438.phpt +++ b/ext/zip/tests/gh18438.phpt @@ -26,7 +26,7 @@ class CustomStreamWrapper { $file = __DIR__ . '/gh18438.zip'; $zip = new ZipArchive; -$zip->open($file, ZIPARCHIVE::CREATE); +$zip->open($file, ZipArchive::CREATE); var_dump($zip->addPattern('/nomatches/')); var_dump($zip->addPattern('/invalid')); diff --git a/ext/zip/tests/gh18439.phpt b/ext/zip/tests/gh18439.phpt index 5235bd99e47b..e41992795459 100644 --- a/ext/zip/tests/gh18439.phpt +++ b/ext/zip/tests/gh18439.phpt @@ -12,7 +12,7 @@ function &cb() { $file = __DIR__ . '/gh18439.zip'; $zip = new ZipArchive; -$zip->open($file, ZIPARCHIVE::CREATE); +$zip->open($file, ZipArchive::CREATE); $zip->registerCancelCallback(cb(...)); $zip->addFromString('test', 'test'); echo "Done\n"; diff --git a/ext/zip/tests/oo_add_encoding.phpt b/ext/zip/tests/oo_add_encoding.phpt index e8d173ba9b20..595bc5bfada7 100644 --- a/ext/zip/tests/oo_add_encoding.phpt +++ b/ext/zip/tests/oo_add_encoding.phpt @@ -27,7 +27,7 @@ $zip->addFromString('bar', __FILE__); $zip->addFromString(chr(0x91), __FILE__, ZipArchive::FL_ENC_CP437); $zip->addFromString('€', __FILE__, ZipArchive::FL_ENC_UTF_8); -if ($zip->status == ZIPARCHIVE::ER_OK) { +if ($zip->status == ZipArchive::ER_OK) { dump_entries_name($zip); $zip->close(); } else { diff --git a/ext/zip/tests/oo_addemptydir.phpt b/ext/zip/tests/oo_addemptydir.phpt index 149118dafd10..b648767fc2d1 100644 --- a/ext/zip/tests/oo_addemptydir.phpt +++ b/ext/zip/tests/oo_addemptydir.phpt @@ -23,7 +23,7 @@ $zip->addEmptyDir('emptydir'); var_dump($zip->lastId); // -1 (already exists) $zip->addEmptyDir('emptydir', ZipArchive::FL_OVERWRITE); var_dump($zip->lastId); // 4 -if ($zip->status == ZIPARCHIVE::ER_OK) { +if ($zip->status == ZipArchive::ER_OK) { if (!verify_entries($zip, [ "bar", "foobar/", diff --git a/ext/zip/tests/oo_addfile.phpt b/ext/zip/tests/oo_addfile.phpt index 1564106c56bf..0052b312f63f 100644 --- a/ext/zip/tests/oo_addfile.phpt +++ b/ext/zip/tests/oo_addfile.phpt @@ -37,7 +37,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { unlink($del); } var_dump($zip->lastId); -if ($zip->status == ZIPARCHIVE::ER_OK) { +if ($zip->status == ZipArchive::ER_OK) { if (!verify_entries($zip, [ "bar", "foobar/", diff --git a/ext/zip/tests/oo_addfile_proc.phpt b/ext/zip/tests/oo_addfile_proc.phpt index eb4b5cbbbecd..2a1b14fb3e94 100644 --- a/ext/zip/tests/oo_addfile_proc.phpt +++ b/ext/zip/tests/oo_addfile_proc.phpt @@ -14,7 +14,7 @@ include __DIR__ . '/utils.inc'; $file = __DIR__ . '/__tmp_oo_addfile_proc.zip'; $zip = new ZipArchive; -if (!$zip->open($file, ZIPARCHIVE::CREATE)) { +if (!$zip->open($file, ZipArchive::CREATE)) { exit('failed'); } if (!$zip->addFile('/proc/cpuinfo', 'cpu.txt', 0, ZipArchive::LENGTH_UNCHECKED)) { @@ -24,7 +24,7 @@ if (!$zip->addFile('/proc/meminfo', 'mem.txt', 0, ZipArchive::LENGTH_UNCHECKED)) echo "failed\n"; } -if ($zip->status == ZIPARCHIVE::ER_OK) { +if ($zip->status == ZipArchive::ER_OK) { dump_entries_name($zip); $zip->close(); } else { diff --git a/ext/zip/tests/oo_addglob.phpt b/ext/zip/tests/oo_addglob.phpt index b702227e606c..541c486ec4e9 100644 --- a/ext/zip/tests/oo_addglob.phpt +++ b/ext/zip/tests/oo_addglob.phpt @@ -40,7 +40,7 @@ $options['flags'] = ZipArchive::FL_OVERWRITE; if (!$zip->addGlob($dirname . '*.{txt,baz}', GLOB_BRACE, $options)) { echo "failed 3\n"; } -if ($zip->status == ZIPARCHIVE::ER_OK) { +if ($zip->status == ZipArchive::ER_OK) { if (!verify_entries($zip, [ "bar", "foobar/", diff --git a/ext/zip/tests/oo_addglob2.phpt b/ext/zip/tests/oo_addglob2.phpt index a98a22271205..1f8bfde76177 100644 --- a/ext/zip/tests/oo_addglob2.phpt +++ b/ext/zip/tests/oo_addglob2.phpt @@ -56,7 +56,7 @@ $options['comp_flags'] = 5; if (!$zip->addGlob($dirname . 'bar.*', GLOB_BRACE, $options)) { echo "failed 2\n"; } -if ($zip->status == ZIPARCHIVE::ER_OK) { +if ($zip->status == ZipArchive::ER_OK) { $zip->close(); $zip = new ZipArchive(); diff --git a/ext/zip/tests/oo_addpattern.phpt b/ext/zip/tests/oo_addpattern.phpt index 324b3bafafc4..f177274859fb 100644 --- a/ext/zip/tests/oo_addpattern.phpt +++ b/ext/zip/tests/oo_addpattern.phpt @@ -36,7 +36,7 @@ if (!$zip->addPattern('/\.txt$/', $dir, $options)) { echo "failed 2\n"; } -if ($zip->status == ZIPARCHIVE::ER_OK) { +if ($zip->status == ZipArchive::ER_OK) { if (!verify_entries($zip, [ "bar", "foobar/", diff --git a/ext/zip/tests/oo_cancel.phpt b/ext/zip/tests/oo_cancel.phpt index 85f418414d5d..735f6a11f6b6 100644 --- a/ext/zip/tests/oo_cancel.phpt +++ b/ext/zip/tests/oo_cancel.phpt @@ -15,7 +15,7 @@ $dirname = dirname(__FILE__) . '/'; $file = $dirname . '__tmp_oo_cancel.zip'; $zip = new ZipArchive; -if (!$zip->open($file, ZIPARCHIVE::CREATE)) { +if (!$zip->open($file, ZipArchive::CREATE)) { exit('failed'); } diff --git a/ext/zip/tests/oo_cancel_non_int_return.phpt b/ext/zip/tests/oo_cancel_non_int_return.phpt index 6068a0ac60dc..c003210876c4 100644 --- a/ext/zip/tests/oo_cancel_non_int_return.phpt +++ b/ext/zip/tests/oo_cancel_non_int_return.phpt @@ -15,7 +15,7 @@ $dirname = dirname(__FILE__) . '/'; $file = $dirname . '__tmp_oo_cancel_incorrect_return.zip'; $zip = new ZipArchive; -if (!$zip->open($file, ZIPARCHIVE::CREATE)) { +if (!$zip->open($file, ZipArchive::CREATE)) { exit('failed'); } diff --git a/ext/zip/tests/oo_cancel_trampoline.phpt b/ext/zip/tests/oo_cancel_trampoline.phpt index 2ea26c2cd7dd..61b0632b5212 100644 --- a/ext/zip/tests/oo_cancel_trampoline.phpt +++ b/ext/zip/tests/oo_cancel_trampoline.phpt @@ -30,7 +30,7 @@ $callback = [$o, 'trampoline']; $callbackThrow = [$o, 'trampolineThrow']; $zip = new ZipArchive; -if (!$zip->open($file, ZIPARCHIVE::CREATE)) { +if (!$zip->open($file, ZipArchive::CREATE)) { exit('failed'); } @@ -51,7 +51,7 @@ try { unset($zip); $zip = new ZipArchive; -if (!$zip->open($file, ZIPARCHIVE::CREATE)) { +if (!$zip->open($file, ZipArchive::CREATE)) { exit('failed'); } diff --git a/ext/zip/tests/oo_close.phpt b/ext/zip/tests/oo_close.phpt index e7609876ebf6..3bca591b11c9 100644 --- a/ext/zip/tests/oo_close.phpt +++ b/ext/zip/tests/oo_close.phpt @@ -11,7 +11,7 @@ if (!$zip->open($dirname . 'test.zip')) { exit('failed'); } -if ($zip->status == ZIPARCHIVE::ER_OK) { +if ($zip->status == ZipArchive::ER_OK) { $zip->close(); echo "ok\n"; } else { diff --git a/ext/zip/tests/oo_close_empty.phpt b/ext/zip/tests/oo_close_empty.phpt index defeab70605a..3da300d6437a 100644 --- a/ext/zip/tests/oo_close_empty.phpt +++ b/ext/zip/tests/oo_close_empty.phpt @@ -14,7 +14,7 @@ function run($name, $keep) { copy(__DIR__ . '/test.zip', $name); $zip = new ZipArchive(); - $zip->open($name, ZIPARCHIVE::CREATE); + $zip->open($name, ZipArchive::CREATE); if ($keep) { echo "\nClose and keep\n"; var_dump($zip->setArchiveFlag(ZipArchive::AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE, 1), $zip->status === ZipArchive::ER_OK); diff --git a/ext/zip/tests/oo_delete.phpt b/ext/zip/tests/oo_delete.phpt index 2b4677ec18fc..82cc9dafe737 100644 --- a/ext/zip/tests/oo_delete.phpt +++ b/ext/zip/tests/oo_delete.phpt @@ -11,14 +11,14 @@ if (file_exists($file)) { } $zip = new ZipArchive; -if (!$zip->open($file, ZIPARCHIVE::CREATE)) { +if (!$zip->open($file, ZipArchive::CREATE)) { exit('failed'); } $zip->addFromString('entry1.txt', 'entry #1'); $zip->addFromString('entry2.txt', 'entry #2'); $zip->addFromString('dir/entry2.txt', 'entry #2'); -if ($zip->status == ZIPARCHIVE::ER_OK) { +if ($zip->status == ZipArchive::ER_OK) { $zip->close(); echo "ok\n"; } else { @@ -26,7 +26,7 @@ if ($zip->status == ZIPARCHIVE::ER_OK) { echo "failed\n"; } -if (!$zip->open($file, ZIPARCHIVE::CREATE)) { +if (!$zip->open($file, ZipArchive::CREATE)) { exit('failed'); } diff --git a/ext/zip/tests/oo_encryption.phpt b/ext/zip/tests/oo_encryption.phpt index f5207e307599..8d5587768a18 100644 --- a/ext/zip/tests/oo_encryption.phpt +++ b/ext/zip/tests/oo_encryption.phpt @@ -14,7 +14,7 @@ $pass = 'secret'; echo "== Write\n"; $zip = new ZipArchive; -$r = $zip->open($name, ZIPARCHIVE::CREATE); +$r = $zip->open($name, ZipArchive::CREATE); // Clear $zip->addFromString('foo.txt', 'foo'); // Encrypted diff --git a/ext/zip/tests/oo_externalattributes.phpt b/ext/zip/tests/oo_externalattributes.phpt index ea60b9494cdd..abbbeb6d75fa 100644 --- a/ext/zip/tests/oo_externalattributes.phpt +++ b/ext/zip/tests/oo_externalattributes.phpt @@ -9,7 +9,7 @@ $name = __DIR__ . '/withattr.zip'; echo "== Set\n"; $zip = new ZipArchive; -$r = $zip->open($name, ZIPARCHIVE::CREATE); +$r = $zip->open($name, ZipArchive::CREATE); $zip->addFromString('foo.txt', 'foo'); $zip->addFromString('bar.txt', 'bar'); var_dump($zip->setExternalAttributesName('foo.txt', ZipArchive::OPSYS_UNIX, 123)); diff --git a/ext/zip/tests/oo_getexternalattributesname_error.phpt b/ext/zip/tests/oo_getexternalattributesname_error.phpt index 175fdc4b7bb8..3b8b9a089a07 100644 --- a/ext/zip/tests/oo_getexternalattributesname_error.phpt +++ b/ext/zip/tests/oo_getexternalattributesname_error.phpt @@ -8,7 +8,7 @@ zip $zip = new ZipArchive(); $dirname = __DIR__ . '/'; -$zip->open($dirname . "test.zip", ZIPARCHIVE::CREATE); +$zip->open($dirname . "test.zip", ZipArchive::CREATE); $a = ZipArchive::OPSYS_DEFAULT; $b = ZipArchive::OPSYS_DEFAULT; diff --git a/ext/zip/tests/oo_getnameindex.phpt b/ext/zip/tests/oo_getnameindex.phpt index 000508290e54..04d813235387 100644 --- a/ext/zip/tests/oo_getnameindex.phpt +++ b/ext/zip/tests/oo_getnameindex.phpt @@ -11,7 +11,7 @@ $file = $dirname . 'oo_getnameindex.zip'; @unlink($file); $zip = new ZipArchive; -if (!$zip->open($file, ZIPARCHIVE::CREATE)) { +if (!$zip->open($file, ZipArchive::CREATE)) { exit('failed'); } @@ -19,7 +19,7 @@ $zip->addFromString('entry1.txt', 'entry #1'); $zip->addFromString('entry2.txt', 'entry #2'); $zip->addFromString('dir/entry2d.txt', 'entry #2'); -if (!$zip->status == ZIPARCHIVE::ER_OK) { +if (!$zip->status == ZipArchive::ER_OK) { echo "failed to write zip\n"; } $zip->close(); diff --git a/ext/zip/tests/oo_getstatusstring.phpt b/ext/zip/tests/oo_getstatusstring.phpt index 489b77195632..df080782d67f 100644 --- a/ext/zip/tests/oo_getstatusstring.phpt +++ b/ext/zip/tests/oo_getstatusstring.phpt @@ -10,7 +10,7 @@ zip $dirname = __DIR__ . '/'; $arch = new ZipArchive; -$arch->open($dirname.'foo.zip',ZIPARCHIVE::CREATE); +$arch->open($dirname.'foo.zip',ZipArchive::CREATE); var_dump($arch->getStatusString()); //delete an index that does not exist - trigger error $arch->deleteIndex(2); diff --git a/ext/zip/tests/oo_getstreamindex.phpt b/ext/zip/tests/oo_getstreamindex.phpt index 5703b2c8e528..da3df8fb88ae 100644 --- a/ext/zip/tests/oo_getstreamindex.phpt +++ b/ext/zip/tests/oo_getstreamindex.phpt @@ -8,7 +8,7 @@ zip $name = __DIR__ . '/getstream.zip'; $zip = new ZipArchive; -$r = $zip->open($name, ZIPARCHIVE::CREATE); +$r = $zip->open($name, ZipArchive::CREATE); $zip->addFromString('foo.txt', 'foo'); $zip->addFromString('bar.txt', 'bar'); $zip->close(); diff --git a/ext/zip/tests/oo_namelocate.phpt b/ext/zip/tests/oo_namelocate.phpt index 939fb19014c1..6e8553d6f19a 100644 --- a/ext/zip/tests/oo_namelocate.phpt +++ b/ext/zip/tests/oo_namelocate.phpt @@ -11,7 +11,7 @@ $file = $dirname . 'oo_namelocate.zip'; @unlink($file); $zip = new ZipArchive; -if (!$zip->open($file, ZIPARCHIVE::CREATE)) { +if (!$zip->open($file, ZipArchive::CREATE)) { exit('failed'); } @@ -19,7 +19,7 @@ $zip->addFromString('entry1.txt', 'entry #1'); $zip->addFromString('entry2.txt', 'entry #2'); $zip->addFromString('dir/entry2d.txt', 'entry #2'); -if (!$zip->status == ZIPARCHIVE::ER_OK) { +if (!$zip->status == ZipArchive::ER_OK) { echo "failed to write zip\n"; } $zip->close(); @@ -31,8 +31,8 @@ if (!$zip->open($file)) { var_dump($zip->locateName('entry1.txt')); var_dump($zip->locateName('eNtry2.txt')); -var_dump($zip->locateName('eNtry2.txt', ZIPARCHIVE::FL_NOCASE)); -var_dump($zip->locateName('enTRy2d.txt', ZIPARCHIVE::FL_NOCASE|ZIPARCHIVE::FL_NODIR)); +var_dump($zip->locateName('eNtry2.txt', ZipArchive::FL_NOCASE)); +var_dump($zip->locateName('enTRy2d.txt', ZipArchive::FL_NOCASE|ZipArchive::FL_NODIR)); $zip->close(); ?> diff --git a/ext/zip/tests/oo_open.phpt b/ext/zip/tests/oo_open.phpt index 44fa46a9a6ea..f3d2db9accfe 100644 --- a/ext/zip/tests/oo_open.phpt +++ b/ext/zip/tests/oo_open.phpt @@ -14,7 +14,7 @@ if ($r !== TRUE) { echo "ER_OPEN: FAILED\n"; } -$r = $zip->open($dirname . 'nofile', ZIPARCHIVE::CREATE); +$r = $zip->open($dirname . 'nofile', ZipArchive::CREATE); if (!$r) { echo "create: failed\n"; } else { @@ -33,7 +33,7 @@ if (!$zip->open($dirname . 'test.zip')) { exit("failed 1\n"); } -if ($zip->status == ZIPARCHIVE::ER_OK) { +if ($zip->status == ZipArchive::ER_OK) { echo "OK\n"; } else { echo "failed\n"; diff --git a/ext/zip/tests/oo_progress.phpt b/ext/zip/tests/oo_progress.phpt index 103a8556c2d9..8de02891dbb8 100644 --- a/ext/zip/tests/oo_progress.phpt +++ b/ext/zip/tests/oo_progress.phpt @@ -15,7 +15,7 @@ $dirname = dirname(__FILE__) . '/'; $file = $dirname . '__tmp_oo_progress.zip'; $zip = new ZipArchive; -if (!$zip->open($file, ZIPARCHIVE::CREATE)) { +if (!$zip->open($file, ZipArchive::CREATE)) { exit('failed'); } diff --git a/ext/zip/tests/oo_progress_trampoline.phpt b/ext/zip/tests/oo_progress_trampoline.phpt index f37bc26182db..52ee8aab555d 100644 --- a/ext/zip/tests/oo_progress_trampoline.phpt +++ b/ext/zip/tests/oo_progress_trampoline.phpt @@ -32,7 +32,7 @@ $callbackThrow = [$o, 'trampolineThrow']; $zip = new ZipArchive; -if (!$zip->open($file, ZIPARCHIVE::CREATE)) { +if (!$zip->open($file, ZipArchive::CREATE)) { exit('failed'); } var_dump($zip->registerProgressCallback(0.5, $callback)); @@ -50,7 +50,7 @@ unlink($file); unset($zip); $zip = new ZipArchive; -if (!$zip->open($file, ZIPARCHIVE::CREATE)) { +if (!$zip->open($file, ZipArchive::CREATE)) { exit('failed'); } diff --git a/ext/zip/tests/oo_rename.phpt b/ext/zip/tests/oo_rename.phpt index 605652446f6d..76b79c5578b8 100644 --- a/ext/zip/tests/oo_rename.phpt +++ b/ext/zip/tests/oo_rename.phpt @@ -11,7 +11,7 @@ $file = $dirname . 'oo_rename.zip'; @unlink($file); $zip = new ZipArchive; -if (!$zip->open($file, ZIPARCHIVE::CREATE)) { +if (!$zip->open($file, ZipArchive::CREATE)) { exit('failed'); } @@ -19,7 +19,7 @@ $zip->addFromString('entry1.txt', 'entry #1'); $zip->addFromString('entry2.txt', 'entry #2'); $zip->addFromString('dir/entry2.txt', 'entry #2'); -if (!$zip->status == ZIPARCHIVE::ER_OK) { +if (!$zip->status == ZipArchive::ER_OK) { var_dump($zip); echo "failed2\n"; } diff --git a/ext/zip/tests/oo_replacefile.phpt b/ext/zip/tests/oo_replacefile.phpt index e1108145d84b..a84ccf9f8501 100644 --- a/ext/zip/tests/oo_replacefile.phpt +++ b/ext/zip/tests/oo_replacefile.phpt @@ -24,7 +24,7 @@ if (!$zip->replaceFile($dirname . 'utils.inc', 0)) { if (!$zip->replaceFile($dirname . 'utils.inc', 2, 12, 42)) { echo "replace 2 failed\n"; } -if ($zip->status == ZIPARCHIVE::ER_OK) { +if ($zip->status == ZipArchive::ER_OK) { if (!verify_entries($zip, [ "bar", "foobar/", diff --git a/ext/zip/tests/oo_setcomment.phpt b/ext/zip/tests/oo_setcomment.phpt index 714634d815b7..bc2b5b94800d 100644 --- a/ext/zip/tests/oo_setcomment.phpt +++ b/ext/zip/tests/oo_setcomment.phpt @@ -11,7 +11,7 @@ $file = $dirname . 'oo_setcomment.zip'; @unlink($file); $zip = new ZipArchive; -if (!$zip->open($file, ZIPARCHIVE::CREATE)) { +if (!$zip->open($file, ZipArchive::CREATE)) { exit('failed'); } @@ -31,7 +31,7 @@ var_dump($zip->setArchiveComment('archive')); var_dump($zip->setArchiveComment('archive')); -if (!$zip->status == ZIPARCHIVE::ER_OK) { +if (!$zip->status == ZipArchive::ER_OK) { echo "failed to write zip\n"; } $zip->close(); diff --git a/ext/zip/tests/oo_setcomment_error.phpt b/ext/zip/tests/oo_setcomment_error.phpt index 82b718ee1872..f05178aa3e7d 100644 --- a/ext/zip/tests/oo_setcomment_error.phpt +++ b/ext/zip/tests/oo_setcomment_error.phpt @@ -9,7 +9,7 @@ $file = __DIR__ . '/__tmp_oo_set_comment_error.zip'; @unlink($file); $zip = new ZipArchive; -if (!$zip->open($file, ZIPARCHIVE::CREATE)) { +if (!$zip->open($file, ZipArchive::CREATE)) { exit('failed'); } diff --git a/ext/zip/tests/oo_setmtime.phpt b/ext/zip/tests/oo_setmtime.phpt index bf34dd722b51..88ef54c0a501 100644 --- a/ext/zip/tests/oo_setmtime.phpt +++ b/ext/zip/tests/oo_setmtime.phpt @@ -13,7 +13,7 @@ $file = $dirname . '__tmp_oo_set_mtime.zip'; @unlink($file); $zip = new ZipArchive; -if (!$zip->open($file, ZIPARCHIVE::CREATE)) { +if (!$zip->open($file, ZipArchive::CREATE)) { exit('failed'); } @@ -37,7 +37,7 @@ var_dump($zip->setMtimeIndex(1, $t2)); $s = $zip->statIndex(1); // ONLY with 1.6.0 - var_dump($s['mtime'] == $t2); -if (!$zip->status == ZIPARCHIVE::ER_OK) { +if (!$zip->status == ZipArchive::ER_OK) { echo "failed to write zip\n"; } $zip->close(); diff --git a/ext/zip/tests/oo_torrentzip.phpt b/ext/zip/tests/oo_torrentzip.phpt index 47d26e0ff591..ea7e3c290652 100644 --- a/ext/zip/tests/oo_torrentzip.phpt +++ b/ext/zip/tests/oo_torrentzip.phpt @@ -13,7 +13,7 @@ $name = __DIR__ . '/torrent.zip'; $zip = new ZipArchive(); echo "Open write\n"; -$zip->open($name, ZIPARCHIVE::CREATE); +$zip->open($name, ZipArchive::CREATE); var_dump($zip->getArchiveFlag(ZipArchive::AFL_IS_TORRENTZIP)); var_dump($zip->setArchiveFlag(ZipArchive::AFL_WANT_TORRENTZIP, 1), $zip->status === ZipArchive::ER_OK); var_dump($zip->addFile(__FILE__, "test.php")); diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 9a05f8e68547..ac1864d8af00 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -1063,7 +1063,7 @@ static int do_cli(int argc, char **argv) /* {{{ */ if (pce == reflection_method_ptr) { zend_function *create_from_method = zend_hash_str_find_ptr( &(pce->function_table), - "createfrommethodname", + "createFromMethodName", strlen( "createFromMethodName" ) ); zend_call_known_function( diff --git a/sapi/cli/tests/005.phpt b/sapi/cli/tests/005.phpt index ca168ecfe20e..8d34422163e8 100644 --- a/sapi/cli/tests/005.phpt +++ b/sapi/cli/tests/005.phpt @@ -10,8 +10,8 @@ include "skipif.inc"; $php = getenv('TEST_PHP_EXECUTABLE_ESCAPED'); var_dump(shell_exec("$php -n --rc unknown")); -var_dump(shell_exec("$php -n --rc stdclass")); -var_dump(shell_exec("$php -n --rc exception")); +var_dump(shell_exec("$php -n --rc stdClass")); +var_dump(shell_exec("$php -n --rc Exception")); echo "Done\n"; ?> diff --git a/sapi/cli/tests/bug70470.phpt b/sapi/cli/tests/bug70470.phpt index 13b9f2b34325..4f646624c7fb 100644 --- a/sapi/cli/tests/bug70470.phpt +++ b/sapi/cli/tests/bug70470.phpt @@ -7,7 +7,7 @@ include "skipif.inc"; --FILE-- class_name != NULL) { zend_class_entry *ce; - if (!(ce = zend_hash_str_find_ptr(EG(class_table), zend_str_tolower_dup(new_break->class_name, new_break->class_len), new_break->class_len))) { + if (!(ce = zend_hash_str_find_ptr(EG(class_table), new_break->class_name, new_break->class_len))) { return FAILURE; } func_table = &ce->function_table; } - if (!(func = zend_hash_str_find_ptr(func_table, zend_str_tolower_dup(new_break->func_name, new_break->func_len), new_break->func_len))) { + if (!(func = zend_hash_str_find_ptr(func_table, new_break->func_name, new_break->func_len))) { if (new_break->class_name != NULL && new_break->func_name != NULL) { phpdbg_error("Method %s doesn't exist in class %s", new_break->func_name, new_break->class_name); return 2; diff --git a/sapi/phpdbg/phpdbg_list.c b/sapi/phpdbg/phpdbg_list.c index 505b04e81f91..110789b2c856 100644 --- a/sapi/phpdbg/phpdbg_list.c +++ b/sapi/phpdbg/phpdbg_list.c @@ -88,15 +88,12 @@ PHPDBG_LIST(method) /* {{{ */ if (phpdbg_safe_class_lookup(param->method.class, strlen(param->method.class), &ce) == SUCCESS) { zend_function *function; - char *lcname = zend_str_tolower_dup(param->method.name, strlen(param->method.name)); - if ((function = zend_hash_str_find_ptr(&ce->function_table, lcname, strlen(lcname)))) { + if ((function = zend_hash_str_find_ptr(&ce->function_table, param->method.name, strlen(param->method.name)))) { phpdbg_list_function(function); } else { phpdbg_error("Could not find %s::%s", param->method.class, param->method.name); } - - efree(lcname); } else { phpdbg_error("Could not find the class %s", param->method.class); } @@ -207,9 +204,6 @@ void phpdbg_list_function_byname(const char *str, size_t len) /* {{{ */ func_table = EG(function_table); } - /* use lowercase names, case insensitive */ - func_name = zend_str_tolower_dup(func_name, func_name_len); - phpdbg_try_access { if ((fbc = zend_hash_str_find_ptr(func_table, func_name, func_name_len))) { phpdbg_list_function(fbc); @@ -219,8 +213,6 @@ void phpdbg_list_function_byname(const char *str, size_t len) /* {{{ */ } phpdbg_catch_access { phpdbg_error("Could not list function %s, invalid data source", func_name); } phpdbg_end_try_access(); - - efree(func_name); } /* }}} */ /* Note: do not free the original file handler, let original compile_file() or caller do that. Caller may rely on its value to check success */ diff --git a/sapi/phpdbg/phpdbg_print.c b/sapi/phpdbg/phpdbg_print.c index 5075ce924d72..412587e35fac 100644 --- a/sapi/phpdbg/phpdbg_print.c +++ b/sapi/phpdbg/phpdbg_print.c @@ -153,10 +153,8 @@ PHPDBG_PRINT(method) /* {{{ */ if (phpdbg_safe_class_lookup(param->method.class, strlen(param->method.class), &ce) == SUCCESS) { zend_function *fbc; - zend_string *lcname = zend_string_alloc(strlen(param->method.name), 0); - zend_str_tolower_copy(ZSTR_VAL(lcname), param->method.name, ZSTR_LEN(lcname)); - if ((fbc = zend_hash_find_ptr(&ce->function_table, lcname))) { + if ((fbc = zend_hash_str_find_ptr(&ce->function_table, param->method.name, strlen(param->method.name)))) { phpdbg_notice("%s Method %s (%d ops)", (fbc->type == ZEND_USER_FUNCTION) ? "User" : "Internal", ZSTR_VAL(fbc->common.function_name), @@ -166,8 +164,6 @@ PHPDBG_PRINT(method) /* {{{ */ } else { phpdbg_error("The method %s::%s could not be found", param->method.class, param->method.name); } - - zend_string_release(lcname); } else { phpdbg_error("The class %s could not be found", param->method.class); } @@ -181,7 +177,6 @@ PHPDBG_PRINT(func) /* {{{ */ zend_function* fbc; const char *func_name = param->str; size_t func_name_len = param->len; - zend_string *lcname; /* search active scope if begins with period */ if (func_name[0] == '.') { zend_class_entry *scope = zend_get_executed_scope(); @@ -202,11 +197,8 @@ PHPDBG_PRINT(func) /* {{{ */ func_table = EG(function_table); } - lcname = zend_string_alloc(func_name_len, 0); - zend_str_tolower_copy(ZSTR_VAL(lcname), func_name, ZSTR_LEN(lcname)); - phpdbg_try_access { - if ((fbc = zend_hash_find_ptr(func_table, lcname))) { + if ((fbc = zend_hash_str_find_ptr(func_table, func_name, func_name_len))) { phpdbg_notice("%s %s %s (%d ops)", (fbc->type == ZEND_USER_FUNCTION) ? "User" : "Internal", (fbc->common.scope) ? "Method" : "Function", @@ -221,8 +213,6 @@ PHPDBG_PRINT(func) /* {{{ */ phpdbg_error("Couldn't fetch function %.*s, invalid data source", (int) func_name_len, func_name); } phpdbg_end_try_access(); - efree(lcname); - return SUCCESS; } /* }}} */ @@ -341,12 +331,13 @@ void phpdbg_print_opcodes(const char *function) } } ZEND_HASH_FOREACH_END(); } else { - char *function_lowercase = zend_str_tolower_dup(function, strlen(function)); + /* duplicate so strtok() can modify the buffer */ + char *function_dup = estrdup(function); - if (strstr(function_lowercase, "::") == NULL) { - phpdbg_print_opcodes_function(function_lowercase, strlen(function_lowercase)); + if (strstr(function_dup, "::") == NULL) { + phpdbg_print_opcodes_function(function_dup, strlen(function_dup)); } else { - char *method_name, *class_name = strtok(function_lowercase, "::"); + char *method_name, *class_name = strtok(function_dup, "::"); if ((method_name = strtok(NULL, "::")) == NULL) { phpdbg_print_opcodes_class(class_name); } else { @@ -354,7 +345,7 @@ void phpdbg_print_opcodes(const char *function) } } - efree(function_lowercase); + efree(function_dup); } } diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index 2da7e4193001..c857df669cc0 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -1403,7 +1403,7 @@ PHPDBG_COMMAND(register) /* {{{ */ size_t lcname_len = param->len; if (!zend_hash_str_exists(&PHPDBG_G(registered), lcname, lcname_len)) { - if ((function = zend_hash_str_find_ptr(EG(function_table), lcname, lcname_len))) { + if ((function = zend_hash_str_find_ptr(EG(function_table), param->str, param->len))) { zend_hash_str_update_ptr(&PHPDBG_G(registered), lcname, lcname_len, function); phpdbg_notice("Registered %s", lcname); diff --git a/sapi/phpdbg/phpdbg_utils.c b/sapi/phpdbg/phpdbg_utils.c index 758f75766c81..f1b6cab2242c 100644 --- a/sapi/phpdbg/phpdbg_utils.c +++ b/sapi/phpdbg/phpdbg_utils.c @@ -166,29 +166,23 @@ PHPDBG_API const char *phpdbg_current_file(void) /* {{{ */ PHPDBG_API const zend_function *phpdbg_get_function(const char *fname, const char *cname) /* {{{ */ { zend_function *func = NULL; - zend_string *lfname = zend_string_init(fname, strlen(fname), 0); - zend_string *tmp = zend_string_tolower(lfname); - zend_string_release(lfname); - lfname = tmp; + zend_string *fname_str = zend_string_init(fname, strlen(fname), 0); if (cname) { zend_class_entry *ce; - zend_string *lcname = zend_string_init(cname, strlen(cname), 0); - tmp = zend_string_tolower(lcname); - zend_string_release(lcname); - lcname = tmp; - ce = zend_lookup_class(lcname); + zend_string *cname_str = zend_string_init(cname, strlen(cname), 0); + ce = zend_lookup_class(cname_str); - zend_string_release(lcname); + zend_string_release(cname_str); if (ce) { - func = zend_hash_find_ptr(&ce->function_table, lfname); + func = zend_hash_find_ptr(&ce->function_table, fname_str); } } else { - func = zend_hash_find_ptr(EG(function_table), lfname); + func = zend_hash_find_ptr(EG(function_table), fname_str); } - zend_string_release(lfname); + zend_string_release(fname_str); return func; } /* }}} */ @@ -395,29 +389,20 @@ PHPDBG_API void phpdbg_set_async_io(int fd) { int phpdbg_safe_class_lookup(const char *name, int name_length, zend_class_entry **ce) { if (PHPDBG_G(flags) & PHPDBG_IN_SIGNAL_HANDLER) { - char *lc_name, *lc_free; - int lc_length; - if (name == NULL || !name_length) { return FAILURE; } - lc_free = lc_name = emalloc(name_length + 1); - zend_str_tolower_copy(lc_name, name, name_length); - lc_length = name_length + 1; - - if (lc_name[0] == '\\') { - lc_name += 1; - lc_length -= 1; + if (name[0] == '\\') { + name += 1; + name_length -= 1; } phpdbg_try_access { - *ce = zend_hash_str_find_ptr(EG(class_table), lc_name, lc_length); + *ce = zend_hash_str_find_ptr(EG(class_table), name, name_length); } phpdbg_catch_access { phpdbg_error("Could not fetch class %.*s, invalid data source", name_length, name); } phpdbg_end_try_access(); - - efree(lc_free); } else { zend_string *str_name = zend_string_init(name, name_length, 0); *ce = zend_lookup_class(str_name); @@ -633,7 +618,7 @@ PHPDBG_API bool phpdbg_check_caught_ex(zend_execute_data *execute_data, zend_obj zend_class_entry *ce; if (!(ce = CACHED_PTR(cur->extended_value & ~ZEND_LAST_CATCH))) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(cur, cur->op1)), Z_STR_P(RT_CONSTANT(cur, cur->op1) + 1), ZEND_FETCH_CLASS_NO_AUTOLOAD); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(cur, cur->op1)), ZEND_FETCH_CLASS_NO_AUTOLOAD); CACHE_PTR(cur->extended_value & ~ZEND_LAST_CATCH, ce); } diff --git a/sapi/phpdbg/tests/print_001.phpt b/sapi/phpdbg/tests/print_001.phpt index 031b4d5a961b..0a6045f9952c 100644 --- a/sapi/phpdbg/tests/print_001.phpt +++ b/sapi/phpdbg/tests/print_001.phpt @@ -4,7 +4,7 @@ Basic print functionality opcache.enable_cli=0 --PHPDBG-- p foo -p class \Foo\bar +p class \Foo\Bar p p e q diff --git a/tests/classes/__set__get_001.phpt b/tests/classes/__set__get_001.phpt index f240817f4a41..13b2e76c8860 100644 --- a/tests/classes/__set__get_001.phpt +++ b/tests/classes/__set__get_001.phpt @@ -32,7 +32,7 @@ class setter { } } -$foo = new Setter(); +$foo = new setter(); // this doesn't go through __set()... should it? $foo->n = 1; diff --git a/tests/classes/autoload_006.phpt b/tests/classes/autoload_006.phpt index fd3c85580f60..f9f36195455a 100644 --- a/tests/classes/autoload_006.phpt +++ b/tests/classes/autoload_006.phpt @@ -15,7 +15,7 @@ spl_autoload_register(function ($class_name) { var_dump(interface_exists('autoload_interface', false)); var_dump(class_exists('autoload_implements', false)); -$o = new Autoload_Implements; +$o = new autoload_implements; var_dump($o); var_dump($o instanceof autoload_interface); unset($o); @@ -28,7 +28,7 @@ var_dump(class_exists('autoload_implements', false)); bool(false) bool(false) autoload(autoload_interface) -autoload(Autoload_Implements) +autoload(autoload_implements) object(autoload_implements)#%d (0) { } bool(true) diff --git a/tests/classes/autoload_019.phpt b/tests/classes/autoload_019.phpt index aefb6f825340..e9f495814336 100644 --- a/tests/classes/autoload_019.phpt +++ b/tests/classes/autoload_019.phpt @@ -1,5 +1,5 @@ --TEST-- -Ensure __autoload() recursion is guarded for multiple lookups of same class using difference case. +Ensure __autoload() recursion is guarded for multiple lookups of the same class, and that differently-cased names are distinct classes. --FILE-- --EXPECT-- autoload unDefinedClass +autoload undefinedCLASS diff --git a/tests/classes/constants_basic_004.phpt b/tests/classes/constants_basic_004.phpt index 8cbac55dfaff..f903663d5626 100644 --- a/tests/classes/constants_basic_004.phpt +++ b/tests/classes/constants_basic_004.phpt @@ -36,7 +36,7 @@ Test properties with array default values using class constants as keys and valu var_dump(X::$sa_x, B::$sa_b, C::$sa_b, C::$sa_c_parent, C::$sa_c_self); echo "\nInstance properties:\n"; - $x = new x; + $x = new X; $b = new B; $c = new C; var_dump($x, $b, $c); diff --git a/tests/classes/destructor_and_exceptions.phpt b/tests/classes/destructor_and_exceptions.phpt index 0f51a21a09d0..fee0c2567a92 100644 --- a/tests/classes/destructor_and_exceptions.phpt +++ b/tests/classes/destructor_and_exceptions.phpt @@ -10,7 +10,7 @@ class FailClass function __destruct() { echo __METHOD__ . "\n"; - throw new exception("FailClass"); + throw new Exception("FailClass"); echo "Done: " . __METHOD__ . "\n"; } } diff --git a/tests/lang/case_sensitivity/array_object_set_iterator_class_wrong_case.phpt b/tests/lang/case_sensitivity/array_object_set_iterator_class_wrong_case.phpt new file mode 100644 index 000000000000..f34addd5953a --- /dev/null +++ b/tests/lang/case_sensitivity/array_object_set_iterator_class_wrong_case.phpt @@ -0,0 +1,22 @@ +--TEST-- +ArrayObject::setIteratorClass() with wrong-case class name fails with wrong case +--FILE-- +setIteratorClass("MYARRAYITERATOR"); +echo $ao->getIteratorClass() . "\n"; + +$ao->setIteratorClass("myarrayiterator"); +echo $ao->getIteratorClass() . "\n"; + +$ao->setIteratorClass("MyArrayIterator"); +echo $ao->getIteratorClass() . "\n"; +?> +--EXPECTF-- +Fatal error: Uncaught TypeError: ArrayObject::setIteratorClass(): Argument #1 ($iteratorClass) must be a class name derived from ArrayIterator, MYARRAYITERATOR given in %s:%d +Stack trace: +#0 %s(5): ArrayObject->setIteratorClass('MYARRAYITERATOR') +#1 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/array_object_unserialize_iterator_wrong_case.phpt b/tests/lang/case_sensitivity/array_object_unserialize_iterator_wrong_case.phpt new file mode 100644 index 000000000000..57444558613e --- /dev/null +++ b/tests/lang/case_sensitivity/array_object_unserialize_iterator_wrong_case.phpt @@ -0,0 +1,27 @@ +--TEST-- +ArrayObject::__unserialize() with wrong-case iterator class name fails with wrong case +--FILE-- +setIteratorClass(MyIterator::class); + +$serialized = serialize($ao); +$ao2 = unserialize($serialized); +echo $ao2->getIteratorClass() . "\n"; + +// Manually craft serialized data with wrong-case iterator class +$wrong = 'O:11:"ArrayObject":4:{i:0;i:0;i:1;a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}i:2;a:0:{}i:3;s:10:"MYITERATOR";}'; +$ao3 = unserialize($wrong); +echo $ao3->getIteratorClass() . "\n"; +?> +--EXPECTF-- +MyIterator + +Fatal error: Uncaught UnexpectedValueException: Cannot deserialize ArrayObject with iterator class 'MYITERATOR'; no such class exists in %s:%d +Stack trace: +#0 [internal function]: ArrayObject->__unserialize(Array) +#1 %s(13): unserialize('O:11:"ArrayObje...') +#2 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/attribute_new_instance_wrong_case.phpt b/tests/lang/case_sensitivity/attribute_new_instance_wrong_case.phpt new file mode 100644 index 000000000000..9bbb902609fb --- /dev/null +++ b/tests/lang/case_sensitivity/attribute_new_instance_wrong_case.phpt @@ -0,0 +1,26 @@ +--TEST-- +ReflectionAttribute::newInstance() with wrong-case attribute name fails with wrong case +--FILE-- +getAttributes(); +foreach ($attrs as $attr) { + $instance = $attr->newInstance(); + echo get_class($instance) . "\n"; + echo $instance->value . "\n"; +} +?> +--EXPECTF-- +Fatal error: Uncaught Error: Attribute class "MYATTR" not found in %s:%d +Stack trace: +#0 %s(13): ReflectionAttribute->newInstance() +#1 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/attribute_wrong_case.phpt b/tests/lang/case_sensitivity/attribute_wrong_case.phpt new file mode 100644 index 000000000000..97393bffd87f --- /dev/null +++ b/tests/lang/case_sensitivity/attribute_wrong_case.phpt @@ -0,0 +1,29 @@ +--TEST-- +Internal attribute recognition and getAttributes() filtering are case-sensitive +--FILE-- +getAttributes('Deprecated'))); +var_dump(count($r->getAttributes('DEPRECATED'))); + +$r2 = new ReflectionFunction('bar'); +var_dump($r2->getAttributes()[0]->getName()); +?> +--EXPECTF-- +Deprecated: Function foo() is deprecated, use bar() instead in %s on line %d +int(1) +int(0) +string(10) "deprecated" diff --git a/tests/lang/case_sensitivity/call_user_func_wrong_case.phpt b/tests/lang/case_sensitivity/call_user_func_wrong_case.phpt new file mode 100644 index 000000000000..dd764b0d27e3 --- /dev/null +++ b/tests/lang/case_sensitivity/call_user_func_wrong_case.phpt @@ -0,0 +1,17 @@ +--TEST-- +call_user_func with wrong case fails +--FILE-- +getMessage() . "\n"; +} + +$result2 = call_user_func("strlen", "hello"); +echo $result2 . "\n"; +?> +--EXPECTF-- +call_user_func(): Argument #1 ($callback) must be a valid callback, function "STRLEN" not found or invalid function name +5 diff --git a/tests/lang/case_sensitivity/callable_mixed_case_method.phpt b/tests/lang/case_sensitivity/callable_mixed_case_method.phpt new file mode 100644 index 000000000000..e389e7fad8b5 --- /dev/null +++ b/tests/lang/case_sensitivity/callable_mixed_case_method.phpt @@ -0,0 +1,21 @@ +--TEST-- +Callables referencing mixed-case method names resolve with exact case +--FILE-- + +--EXPECT-- +string(8) "instance" +string(6) "static" +string(6) "static" +bool(false) +bool(false) diff --git a/tests/lang/case_sensitivity/callable_wrong_case.phpt b/tests/lang/case_sensitivity/callable_wrong_case.phpt new file mode 100644 index 000000000000..3eb3a908efbf --- /dev/null +++ b/tests/lang/case_sensitivity/callable_wrong_case.phpt @@ -0,0 +1,28 @@ +--TEST-- +Array and string callables with wrong-case class name fails with wrong case +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught TypeError: call_user_func(): Argument #1 ($callback) must be a valid callback, class "MYSERVICE" not found in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/class_alias_wrong_case.phpt b/tests/lang/case_sensitivity/class_alias_wrong_case.phpt new file mode 100644 index 000000000000..84c04fb2115b --- /dev/null +++ b/tests/lang/case_sensitivity/class_alias_wrong_case.phpt @@ -0,0 +1,14 @@ +--TEST-- +class_alias() with wrong-case class name fails with wrong case +--FILE-- + +--EXPECTF-- +Warning: Class "myclass" not found in %s on line %d + +Warning: Class "MYCLASS" not found in %s on line %d +done diff --git a/tests/lang/case_sensitivity/class_parents_wrong_case.phpt b/tests/lang/case_sensitivity/class_parents_wrong_case.phpt new file mode 100644 index 000000000000..b068f3297194 --- /dev/null +++ b/tests/lang/case_sensitivity/class_parents_wrong_case.phpt @@ -0,0 +1,28 @@ +--TEST-- +class_parents(), class_implements(), class_uses() with wrong-case class name fails with wrong case +--FILE-- + +--EXPECTF-- +Warning: class_parents(): Class CHILD does not exist and could not be loaded in %s on line %d + +Fatal error: Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array, false given in %s:%d +Stack trace: +#0 %s(10): array_keys(false) +#1 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/closure_bind_wrong_case.phpt b/tests/lang/case_sensitivity/closure_bind_wrong_case.phpt new file mode 100644 index 000000000000..cb4dfeb5ec7e --- /dev/null +++ b/tests/lang/case_sensitivity/closure_bind_wrong_case.phpt @@ -0,0 +1,23 @@ +--TEST-- +Closure::bind() and bindTo() with wrong-case scope fails with wrong case +--FILE-- +x; }; + +$bound1 = Closure::bind($f, new MyScope, "myscope"); +echo $bound1() . "\n"; + +$bound2 = $f->bindTo(new MyScope, "MYSCOPE"); +echo $bound2() . "\n"; +?> +--EXPECTF-- +Warning: Class "myscope" not found in %s on line %d + +Fatal error: Uncaught Error: Value of type null is not callable in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/dynamic_call_wrong_case.phpt b/tests/lang/case_sensitivity/dynamic_call_wrong_case.phpt new file mode 100644 index 000000000000..4632e2df906e --- /dev/null +++ b/tests/lang/case_sensitivity/dynamic_call_wrong_case.phpt @@ -0,0 +1,17 @@ +--TEST-- +Dynamic function call with wrong case fails +--FILE-- +getMessage() . "\n"; +} + +$fn2 = "strlen"; +echo $fn2("hello") . "\n"; +?> +--EXPECT-- +Call to undefined function STRLEN() +5 diff --git a/tests/lang/case_sensitivity/existence_check_wrong_case.phpt b/tests/lang/case_sensitivity/existence_check_wrong_case.phpt new file mode 100644 index 000000000000..2dc41150b36a --- /dev/null +++ b/tests/lang/case_sensitivity/existence_check_wrong_case.phpt @@ -0,0 +1,18 @@ +--TEST-- +function_exists is case-sensitive, method_exists is case-insensitive +--FILE-- + +--EXPECT-- +bool(false) +bool(true) +bool(false) +bool(true) diff --git a/tests/lang/case_sensitivity/extends_wrong_case.phpt b/tests/lang/case_sensitivity/extends_wrong_case.phpt new file mode 100644 index 000000000000..7e870f5905f3 --- /dev/null +++ b/tests/lang/case_sensitivity/extends_wrong_case.phpt @@ -0,0 +1,14 @@ +--TEST-- +Extending a class with wrong-case parent name fails with wrong case +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught Error: Class "BASECLASS" not found in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/extends_wrong_case_base.inc b/tests/lang/case_sensitivity/extends_wrong_case_base.inc new file mode 100644 index 000000000000..29a8101959db --- /dev/null +++ b/tests/lang/case_sensitivity/extends_wrong_case_base.inc @@ -0,0 +1,2 @@ +getMessage() . "\n"; +} +?> +--EXPECT-- +Call to undefined function STRLEN() diff --git a/tests/lang/case_sensitivity/generator_return_type_wrong_case.phpt b/tests/lang/case_sensitivity/generator_return_type_wrong_case.phpt new file mode 100644 index 000000000000..84d03bca5b28 --- /dev/null +++ b/tests/lang/case_sensitivity/generator_return_type_wrong_case.phpt @@ -0,0 +1,10 @@ +--TEST-- +Generator return type with wrong case is not generator-compatible +--FILE-- + +--EXPECTF-- +Fatal error: Generator return type must be a supertype of Generator, iterator given in %s on line %d diff --git a/tests/lang/case_sensitivity/get_attributes_is_instanceof_wrong_case.phpt b/tests/lang/case_sensitivity/get_attributes_is_instanceof_wrong_case.phpt new file mode 100644 index 000000000000..f8de9a4423f9 --- /dev/null +++ b/tests/lang/case_sensitivity/get_attributes_is_instanceof_wrong_case.phpt @@ -0,0 +1,24 @@ +--TEST-- +ReflectionClass::getAttributes() with wrong-case class name and IS_INSTANCEOF fails with wrong case +--FILE-- +getAttributes("MYATTR", ReflectionAttribute::IS_INSTANCEOF); +echo "count: " . count($attrs) . "\n"; + +$attrs2 = $rc->getAttributes("myattr", ReflectionAttribute::IS_INSTANCEOF); +echo "count: " . count($attrs2) . "\n"; +?> +--EXPECTF-- +Fatal error: Uncaught Error: Class "MYATTR" not found in %s:%d +Stack trace: +#0 %s(10): ReflectionClass->getAttributes('MYATTR', 2) +#1 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/implements_wrong_case.phpt b/tests/lang/case_sensitivity/implements_wrong_case.phpt new file mode 100644 index 000000000000..e8e92627f3ce --- /dev/null +++ b/tests/lang/case_sensitivity/implements_wrong_case.phpt @@ -0,0 +1,19 @@ +--TEST-- +Implementing an interface with wrong-case name fails with wrong case +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught Error: Interface "MYINTERFACE" not found in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/is_subclass_of_subject_wrong_case.phpt b/tests/lang/case_sensitivity/is_subclass_of_subject_wrong_case.phpt new file mode 100644 index 000000000000..8b486cadb339 --- /dev/null +++ b/tests/lang/case_sensitivity/is_subclass_of_subject_wrong_case.phpt @@ -0,0 +1,19 @@ +--TEST-- +is_subclass_of() and is_a() with wrong-case subject string fails with wrong case +--FILE-- + +--EXPECTF-- +bool(false) +bool(false) +bool(true) +bool(false) diff --git a/tests/lang/case_sensitivity/iterator_iterator_wrong_case.phpt b/tests/lang/case_sensitivity/iterator_iterator_wrong_case.phpt new file mode 100644 index 000000000000..6062ce26afbf --- /dev/null +++ b/tests/lang/case_sensitivity/iterator_iterator_wrong_case.phpt @@ -0,0 +1,19 @@ +--TEST-- +IteratorIterator and RecursiveIteratorIterator class cast with wrong case fails with wrong case +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught LogicException: Class to downcast to not found or not base class or does not implement Traversable in %s:%d +Stack trace: +#0 %s(8): IteratorIterator->__construct(Object(MyAggregate), 'MYAGGREGATE') +#1 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/namespace_declaration_wrong_case.phpt b/tests/lang/case_sensitivity/namespace_declaration_wrong_case.phpt new file mode 100644 index 000000000000..90ba234597f5 --- /dev/null +++ b/tests/lang/case_sensitivity/namespace_declaration_wrong_case.phpt @@ -0,0 +1,23 @@ +--TEST-- +Namespace declarations work regardless of casing +--FILE-- + +--EXPECT-- +done diff --git a/tests/lang/case_sensitivity/namespaced_constant_wrong_case.phpt b/tests/lang/case_sensitivity/namespaced_constant_wrong_case.phpt new file mode 100644 index 000000000000..ce0d34d4e0b1 --- /dev/null +++ b/tests/lang/case_sensitivity/namespaced_constant_wrong_case.phpt @@ -0,0 +1,33 @@ +--TEST-- +Namespaced constant lookup is fully case-sensitive +--FILE-- + +--EXPECTF-- +string(5) "hello" +string(7) "defined" +string(5) "hello" +bool(true) +bool(false) + +Fatal error: Uncaught Error: Undefined constant "MYAPP\DEFINED_CONST" in %s:%d +Stack trace: +#0 %s(%d): constant('MYAPP\\DEFINED_C...') +#1 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/namespaced_type_hint_wrong_case.phpt b/tests/lang/case_sensitivity/namespaced_type_hint_wrong_case.phpt new file mode 100644 index 000000000000..c093aed6fd77 --- /dev/null +++ b/tests/lang/case_sensitivity/namespaced_type_hint_wrong_case.phpt @@ -0,0 +1,20 @@ +--TEST-- +Namespaced type declarations with wrong-cased namespace fails with wrong case +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught TypeError: MyApp\test(): Argument #1 ($x) must be of type myapp\Foo, MyApp\Foo given, called in %s on line %d and defined in %s:%d +Stack trace: +#0 %s(9): MyApp\test(Object(MyApp\Foo)) +#1 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/pdo_attr_statement_class_wrong_case.phpt b/tests/lang/case_sensitivity/pdo_attr_statement_class_wrong_case.phpt new file mode 100644 index 000000000000..a2fb089321dd --- /dev/null +++ b/tests/lang/case_sensitivity/pdo_attr_statement_class_wrong_case.phpt @@ -0,0 +1,22 @@ +--TEST-- +PDO::ATTR_STATEMENT_CLASS with wrong-case class name fails with wrong case +--EXTENSIONS-- +pdo +pdo_sqlite +--FILE-- +setAttribute(PDO::ATTR_STATEMENT_CLASS, ["MYSTATEMENT"]); +$stmt = $pdo->query("SELECT 1"); +echo get_class($stmt) . "\n"; +?> +--EXPECTF-- +Fatal error: Uncaught TypeError: PDO::setAttribute(): Argument #2 ($value) PDO::ATTR_STATEMENT_CLASS class must be a valid class in %s:%d +Stack trace: +#0 %s(7): PDO->setAttribute(13, Array) +#1 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/pdo_fetch_class_wrong_case.phpt b/tests/lang/case_sensitivity/pdo_fetch_class_wrong_case.phpt new file mode 100644 index 000000000000..4d09349a2f66 --- /dev/null +++ b/tests/lang/case_sensitivity/pdo_fetch_class_wrong_case.phpt @@ -0,0 +1,28 @@ +--TEST-- +PDOStatement::setFetchMode(FETCH_CLASS) with wrong-case class name fails with wrong case +--EXTENSIONS-- +pdo +pdo_sqlite +--FILE-- +exec("CREATE TABLE t (a TEXT)"); +$pdo->exec("INSERT INTO t VALUES ('hello')"); + +$stmt = $pdo->prepare("SELECT a FROM t"); +$stmt->execute(); +$stmt->setFetchMode(PDO::FETCH_CLASS, "MYROW"); +$row = $stmt->fetch(); +echo get_class($row) . "\n"; +echo $row->a . "\n"; +?> +--EXPECTF-- +Fatal error: Uncaught TypeError: PDOStatement::setFetchMode(): Argument #2 must be a valid class in %s:%d +Stack trace: +#0 %s(12): PDOStatement->setFetchMode(8, 'MYROW') +#1 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/property_method_exists_wrong_case.phpt b/tests/lang/case_sensitivity/property_method_exists_wrong_case.phpt new file mode 100644 index 000000000000..05304a514f99 --- /dev/null +++ b/tests/lang/case_sensitivity/property_method_exists_wrong_case.phpt @@ -0,0 +1,19 @@ +--TEST-- +property_exists() and method_exists() with wrong-case class name fails with wrong case +--FILE-- + +--EXPECTF-- +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/tests/lang/case_sensitivity/property_type_wrong_case.phpt b/tests/lang/case_sensitivity/property_type_wrong_case.phpt new file mode 100644 index 000000000000..3783be4eaec5 --- /dev/null +++ b/tests/lang/case_sensitivity/property_type_wrong_case.phpt @@ -0,0 +1,19 @@ +--TEST-- +Property type declarations with wrong-cased class names fails with wrong case +--FILE-- +value = new MyClass(); +echo get_class($c->value) . "\n"; +?> +--EXPECTF-- +Fatal error: Uncaught TypeError: Cannot assign MyClass to property Container::$value of type MYCLASS in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/reflection_class_constant_wrong_case.phpt b/tests/lang/case_sensitivity/reflection_class_constant_wrong_case.phpt new file mode 100644 index 000000000000..ac31f8ed4f31 --- /dev/null +++ b/tests/lang/case_sensitivity/reflection_class_constant_wrong_case.phpt @@ -0,0 +1,20 @@ +--TEST-- +ReflectionClassConstant with wrong-case class name fails with wrong case +--FILE-- +getValue() . "\n"; + +$rcc2 = new ReflectionClassConstant("MYCLASS", "MY_CONST"); +echo $rcc2->getValue() . "\n"; +?> +--EXPECTF-- +Fatal error: Uncaught ReflectionException: Class "myclass" does not exist in %s:%d +Stack trace: +#0 %s(6): ReflectionClassConstant->__construct('myclass', 'MY_CONST') +#1 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/reflection_class_wrong_case.phpt b/tests/lang/case_sensitivity/reflection_class_wrong_case.phpt new file mode 100644 index 000000000000..80c84c7faf3b --- /dev/null +++ b/tests/lang/case_sensitivity/reflection_class_wrong_case.phpt @@ -0,0 +1,20 @@ +--TEST-- +ReflectionClass with wrong-case class name fails with wrong case +--FILE-- +getName() . "\n"; + +$rc2 = new ReflectionClass("MYCLASS"); +echo $rc2->getName() . "\n"; +?> +--EXPECTF-- +Fatal error: Uncaught ReflectionException: Class "myclass" does not exist in %s:%d +Stack trace: +#0 %s(6): ReflectionClass->__construct('myclass') +#1 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/reflection_function_wrong_case.phpt b/tests/lang/case_sensitivity/reflection_function_wrong_case.phpt new file mode 100644 index 000000000000..669404577af8 --- /dev/null +++ b/tests/lang/case_sensitivity/reflection_function_wrong_case.phpt @@ -0,0 +1,20 @@ +--TEST-- +ReflectionFunction with wrong-case function name throws +--FILE-- +getMessage() . "\n"; +} + +$rf2 = new ReflectionFunction("myFunc"); +echo $rf2->getName() . "\n"; +?> +--EXPECT-- +Function MYFUNC() does not exist +myFunc diff --git a/tests/lang/case_sensitivity/reflection_get_property_fqn_wrong_case.phpt b/tests/lang/case_sensitivity/reflection_get_property_fqn_wrong_case.phpt new file mode 100644 index 000000000000..7f7b156b6462 --- /dev/null +++ b/tests/lang/case_sensitivity/reflection_get_property_fqn_wrong_case.phpt @@ -0,0 +1,28 @@ +--TEST-- +ReflectionClass::getProperty() with fully-qualified name and wrong-case class fails with wrong case +--FILE-- +getProperty("Base::value"); +echo $rp->getName() . "\n"; + +// Wrong case fails +$rp2 = $rc->getProperty("BASE::value"); +echo $rp2->getName() . "\n"; +?> +--EXPECTF-- +value + +Fatal error: Uncaught ReflectionException: Class "BASE" does not exist in %s:%d +Stack trace: +#0 %s(%d): ReflectionClass->getProperty('BASE::value') +#1 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/reflection_implements_interface_wrong_case.phpt b/tests/lang/case_sensitivity/reflection_implements_interface_wrong_case.phpt new file mode 100644 index 000000000000..f6a6a0cc03cc --- /dev/null +++ b/tests/lang/case_sensitivity/reflection_implements_interface_wrong_case.phpt @@ -0,0 +1,19 @@ +--TEST-- +ReflectionClass::implementsInterface() with wrong-case interface name fails with wrong case +--FILE-- +implementsInterface("myinterface")); +var_dump($rc->implementsInterface("MYINTERFACE")); +var_dump($rc->implementsInterface("MyInterface")); +?> +--EXPECTF-- +Fatal error: Uncaught ReflectionException: Interface "myinterface" does not exist in %s:%d +Stack trace: +#0 %s(7): ReflectionClass->implementsInterface('myinterface') +#1 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/reflection_is_subclass_of_wrong_case.phpt b/tests/lang/case_sensitivity/reflection_is_subclass_of_wrong_case.phpt new file mode 100644 index 000000000000..2c5624b940f5 --- /dev/null +++ b/tests/lang/case_sensitivity/reflection_is_subclass_of_wrong_case.phpt @@ -0,0 +1,19 @@ +--TEST-- +ReflectionClass::isSubclassOf() with wrong-case class name fails with wrong case +--FILE-- +isSubclassOf("base")); +var_dump($rc->isSubclassOf("BASE")); +var_dump($rc->isSubclassOf("Base")); +?> +--EXPECTF-- +Fatal error: Uncaught ReflectionException: Class "base" does not exist in %s:%d +Stack trace: +#0 %s(7): ReflectionClass->isSubclassOf('base') +#1 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/reflection_method_wrong_case.phpt b/tests/lang/case_sensitivity/reflection_method_wrong_case.phpt new file mode 100644 index 000000000000..c60e6811e0b6 --- /dev/null +++ b/tests/lang/case_sensitivity/reflection_method_wrong_case.phpt @@ -0,0 +1,20 @@ +--TEST-- +ReflectionMethod with wrong-case class name fails with wrong case +--FILE-- +getName() . "\n"; + +$rm2 = new ReflectionMethod("MYCLASS", "myMethod"); +echo $rm2->getName() . "\n"; +?> +--EXPECTF-- +Fatal error: Uncaught ReflectionException: Class "myclass" does not exist in %s:%d +Stack trace: +#0 %s(6): ReflectionMethod->__construct('myclass', 'myMethod') +#1 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/reflection_parameter_wrong_case.phpt b/tests/lang/case_sensitivity/reflection_parameter_wrong_case.phpt new file mode 100644 index 000000000000..4abf6de20d5f --- /dev/null +++ b/tests/lang/case_sensitivity/reflection_parameter_wrong_case.phpt @@ -0,0 +1,20 @@ +--TEST-- +ReflectionParameter with wrong-case class name in array callable fails with wrong case +--FILE-- +getName() . "\n"; + +$rp2 = new ReflectionParameter(["myclass", "myMethod"], 1); +echo $rp2->getName() . "\n"; +?> +--EXPECTF-- +Fatal error: Uncaught ReflectionException: Class "MYCLASS" does not exist in %s:%d +Stack trace: +#0 %s(6): ReflectionParameter->__construct(Array, 0) +#1 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/reflection_property_scope_wrong_case.phpt b/tests/lang/case_sensitivity/reflection_property_scope_wrong_case.phpt new file mode 100644 index 000000000000..d39a8624f3d2 --- /dev/null +++ b/tests/lang/case_sensitivity/reflection_property_scope_wrong_case.phpt @@ -0,0 +1,19 @@ +--TEST-- +ReflectionProperty::isReadable() and isWritable() with wrong-case scope name fails with wrong case +--FILE-- +isReadable("MYCLASS")); +var_dump($rp->isWritable("MYCLASS")); +?> +--EXPECTF-- +Fatal error: Uncaught Error: Class "MYCLASS" not found in %s:%d +Stack trace: +#0 %s(8): ReflectionProperty->isReadable('MYCLASS') +#1 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/reflection_property_wrong_case.phpt b/tests/lang/case_sensitivity/reflection_property_wrong_case.phpt new file mode 100644 index 000000000000..322658ad04bc --- /dev/null +++ b/tests/lang/case_sensitivity/reflection_property_wrong_case.phpt @@ -0,0 +1,20 @@ +--TEST-- +ReflectionProperty with wrong-case class name fails with wrong case +--FILE-- +getName() . "\n"; + +$rp2 = new ReflectionProperty("MYCLASS", "value"); +echo $rp2->getName() . "\n"; +?> +--EXPECTF-- +Fatal error: Uncaught ReflectionException: Class "myclass" does not exist in %s:%d +Stack trace: +#0 %s(6): ReflectionProperty->__construct('myclass', 'value') +#1 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/soap_classmap_wrong_case.phpt b/tests/lang/case_sensitivity/soap_classmap_wrong_case.phpt new file mode 100644 index 000000000000..55a110830eb1 --- /dev/null +++ b/tests/lang/case_sensitivity/soap_classmap_wrong_case.phpt @@ -0,0 +1,47 @@ +--TEST-- +SoapServer classmap with wrong-case class name throws Error +--EXTENSIONS-- +soap +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- + + + + + Hello + World + + + + +'; + +class Book { + public string $a = ''; + public string $b = ''; +} + +class TestService { + public function dotest(Book $book): string { + return get_class($book); + } +} + +$server = new SoapServer(__DIR__ . "/../../../ext/soap/tests/classmap.wsdl", [ + 'actor' => 'http://schema.nothing.com', + 'classmap' => ['book' => 'BOOK'], +]); +$server->setClass('TestService'); +$server->handle($GLOBALS['HTTP_RAW_POST_DATA']); +?> +--EXPECT-- + +SOAP-ENV:ServerClass "BOOK" not found diff --git a/tests/lang/case_sensitivity/soap_operation_wrong_case.phpt b/tests/lang/case_sensitivity/soap_operation_wrong_case.phpt new file mode 100644 index 000000000000..a75a9462cc37 --- /dev/null +++ b/tests/lang/case_sensitivity/soap_operation_wrong_case.phpt @@ -0,0 +1,34 @@ +--TEST-- +SoapClient WSDL operation names are matched case-sensitively +--EXTENSIONS-- +soap +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +' + . '' + . 'ok' + . ''; + } +} + +$client = new LocalClient(__DIR__ . '/../../../ext/soap/tests/interop/Round2/Base/round2_base.wsdl', ['exceptions' => true]); + +// Exact case works. +var_dump($client->echoString('Hello')); + +// Wrong case is not a WSDL operation. +try { + $client->echostring('Hello'); +} catch (SoapFault $e) { + echo $e->getMessage(), "\n"; +} +?> +--EXPECTF-- +string(2) "ok" +Function ("echostring") is not a valid method for this service diff --git a/tests/lang/case_sensitivity/stream_filter_wrong_case.phpt b/tests/lang/case_sensitivity/stream_filter_wrong_case.phpt new file mode 100644 index 000000000000..b95a2803bbe2 --- /dev/null +++ b/tests/lang/case_sensitivity/stream_filter_wrong_case.phpt @@ -0,0 +1,29 @@ +--TEST-- +stream_filter_register() with wrong-case class name fails with wrong case +--FILE-- +data = strtoupper($bucket->data); + $consumed += $bucket->datalen; + stream_bucket_append($out, $bucket); + } + return PSFS_PASS_ON; + } +} + +stream_filter_register("my.upper", "MYFILTER"); + +$fp = fopen("php://memory", "r+"); +fwrite($fp, "hello"); +rewind($fp); +stream_filter_append($fp, "my.upper"); +echo fread($fp, 10) . "\n"; +fclose($fp); +?> +--EXPECTF-- +Warning: stream_filter_append(): User-filter "my.upper" requires class "MYFILTER", but that class is not defined in %s on line %d + +Warning: stream_filter_append(): Unable to create or locate filter "my.upper" in %s on line %d +hello diff --git a/tests/lang/case_sensitivity/trait_alias_interface_method.phpt b/tests/lang/case_sensitivity/trait_alias_interface_method.phpt new file mode 100644 index 000000000000..e667923c3ca1 --- /dev/null +++ b/tests/lang/case_sensitivity/trait_alias_interface_method.phpt @@ -0,0 +1,30 @@ +--TEST-- +Trait method aliasing and interface methods are matched case-sensitively +--FILE-- + +--EXPECTF-- +int(1) +int(2) +int(3) + +Fatal error: Class Bad contains 1 abstract method and must therefore be declared abstract or implement the remaining method (IteratorAggregate::getIterator) in %s on line %d diff --git a/tests/lang/case_sensitivity/type_hint_wrong_case.phpt b/tests/lang/case_sensitivity/type_hint_wrong_case.phpt new file mode 100644 index 000000000000..9fc3986552af --- /dev/null +++ b/tests/lang/case_sensitivity/type_hint_wrong_case.phpt @@ -0,0 +1,18 @@ +--TEST-- +Type declarations with wrong-cased class names fails with wrong case +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught TypeError: acceptMyClass(): Argument #1 ($x) must be of type MYCLASS, MyClass given, called in %s on line %d and defined in %s:%d +Stack trace: +#0 %s(7): acceptMyClass(Object(MyClass)) +#1 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/union_type_case_distinct.phpt b/tests/lang/case_sensitivity/union_type_case_distinct.phpt new file mode 100644 index 000000000000..99311d4b8c96 --- /dev/null +++ b/tests/lang/case_sensitivity/union_type_case_distinct.phpt @@ -0,0 +1,24 @@ +--TEST-- +Class types differing only in case are distinct in union and intersection types +--FILE-- +getMessage(), "\n"; +} +?> +--EXPECTF-- +string(3) "Foo" +string(3) "foo" +test(): Argument #1 ($x) must be of type Foo|foo, stdClass given, called in %s on line %d \ No newline at end of file diff --git a/tests/lang/case_sensitivity/unserialize_enum_wrong_case.phpt b/tests/lang/case_sensitivity/unserialize_enum_wrong_case.phpt new file mode 100644 index 000000000000..80b7f1b5fd09 --- /dev/null +++ b/tests/lang/case_sensitivity/unserialize_enum_wrong_case.phpt @@ -0,0 +1,24 @@ +--TEST-- +unserialize() with wrong-case enum name fails with wrong case +--FILE-- +name . "\n"; + +// Wrong case is not found +$s2 = unserialize('E:11:"SUIT:Hearts";'); +var_dump($s2); +?> +--EXPECTF-- +Hearts + +Warning: unserialize(): Class 'SUIT' not found in %s on line %d + +Warning: unserialize(): Error at offset 0 of 19 bytes in %s on line %d +bool(false) diff --git a/tests/lang/case_sensitivity/unserialize_object_wrong_case.phpt b/tests/lang/case_sensitivity/unserialize_object_wrong_case.phpt new file mode 100644 index 000000000000..fe326fc47dff --- /dev/null +++ b/tests/lang/case_sensitivity/unserialize_object_wrong_case.phpt @@ -0,0 +1,23 @@ +--TEST-- +unserialize() with wrong-case class name fails with wrong case +--FILE-- + +--EXPECTF-- +MyRow +__PHP_Incomplete_Class +__PHP_Incomplete_Class diff --git a/tests/lang/case_sensitivity/use_import_alias_wrong_case.phpt b/tests/lang/case_sensitivity/use_import_alias_wrong_case.phpt new file mode 100644 index 000000000000..85b39bfb10a0 --- /dev/null +++ b/tests/lang/case_sensitivity/use_import_alias_wrong_case.phpt @@ -0,0 +1,35 @@ +--TEST-- +use-import aliases are matched case-sensitively +--FILE-- +getMessage(), "\n"; + } + try { + HELPER(); + } catch (\Error $e) { + echo $e->getMessage(), "\n"; + } +} +?> +--EXPECT-- +string(10) "App\Widget" +string(6) "helper" +Class "widget" not found +Call to undefined function HELPER() diff --git a/tests/lang/case_sensitivity/use_import_wrong_case.phpt b/tests/lang/case_sensitivity/use_import_wrong_case.phpt new file mode 100644 index 000000000000..38e437d2e187 --- /dev/null +++ b/tests/lang/case_sensitivity/use_import_wrong_case.phpt @@ -0,0 +1,36 @@ +--TEST-- +File-level use import with wrong-cased namespace path fails with wrong case +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught Error: Class "myapp\service\UserService" not found in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/use_trait_wrong_case.phpt b/tests/lang/case_sensitivity/use_trait_wrong_case.phpt new file mode 100644 index 000000000000..0b9022b2d6cb --- /dev/null +++ b/tests/lang/case_sensitivity/use_trait_wrong_case.phpt @@ -0,0 +1,22 @@ +--TEST-- +Using a trait with wrong-case name fails with wrong case +--FILE-- +hello() . "\n"; +?> +--EXPECTF-- +Fatal error: Uncaught Error: Trait "MYTRAIT" not found in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d diff --git a/tests/lang/case_sensitivity/user_function_wrong_case.phpt b/tests/lang/case_sensitivity/user_function_wrong_case.phpt new file mode 100644 index 000000000000..f72aec5d5119 --- /dev/null +++ b/tests/lang/case_sensitivity/user_function_wrong_case.phpt @@ -0,0 +1,17 @@ +--TEST-- +User-defined function called with wrong case fails +--FILE-- +getMessage() . "\n"; +} +echo myUserFunction() . "\n"; +?> +--EXPECT-- +Call to undefined function MYUSERFUNCTION() +user func result diff --git a/tests/lang/catchable_error_001.phpt b/tests/lang/catchable_error_001.phpt index a7481b6ea6c4..cdcf8478c7e5 100644 --- a/tests/lang/catchable_error_001.phpt +++ b/tests/lang/catchable_error_001.phpt @@ -15,7 +15,7 @@ Catchable fatal error [1] var_dump($a); } - blah (new StdClass); + blah (new stdClass); echo "ALIVE!\n"; ?> --EXPECTF-- diff --git a/tests/lang/catchable_error_002.phpt b/tests/lang/catchable_error_002.phpt index 50f06051e303..b92aa26ff020 100644 --- a/tests/lang/catchable_error_002.phpt +++ b/tests/lang/catchable_error_002.phpt @@ -18,7 +18,7 @@ Catchable fatal error [2] set_error_handler('error'); try { - blah (new StdClass); + blah (new stdClass); } catch (Error $ex) { echo $ex->getMessage(), "\n"; } diff --git a/tests/lang/engine_assignExecutionOrder_008.phpt b/tests/lang/engine_assignExecutionOrder_008.phpt index 4b2aeb345179..ce8dc7e19e02 100644 --- a/tests/lang/engine_assignExecutionOrder_008.phpt +++ b/tests/lang/engine_assignExecutionOrder_008.phpt @@ -62,7 +62,7 @@ C::$p = array(); echo $a[C::$p[0]=f()][++C::$p[0]]; echo "\n" . 'C::$p->q=f(): '; -C::$p = new stdclass; +C::$p = new stdClass; echo $a[C::$p->q=f()][++C::$p->q]; ?> --EXPECT-- diff --git a/tests/lang/foreachLoopObjects.006.phpt b/tests/lang/foreachLoopObjects.006.phpt index 0d8c3f96a95d..6608bae45040 100644 --- a/tests/lang/foreachLoopObjects.006.phpt +++ b/tests/lang/foreachLoopObjects.006.phpt @@ -13,7 +13,7 @@ class C { echo "\nSubstituting the iterated object for a different object.\n"; $obj = new C; -$obj2 = new stdclass; +$obj2 = new stdClass; $obj2->a = "new a"; $obj2->b = "new b"; $obj2->c = "new c"; diff --git a/tests/lang/operators/coalesce.phpt b/tests/lang/operators/coalesce.phpt index 7035eac84c37..31dbf38312d0 100644 --- a/tests/lang/operators/coalesce.phpt +++ b/tests/lang/operators/coalesce.phpt @@ -6,7 +6,7 @@ Test ?? operator $var = 7; $var2 = NULL; -$obj = new StdClass; +$obj = new stdClass; $obj->boo = 7; $arr = [ diff --git a/tests/output/ob_start_basic_006.phpt b/tests/output/ob_start_basic_006.phpt index af63aabab712..916850634700 100644 --- a/tests/output/ob_start_basic_006.phpt +++ b/tests/output/ob_start_basic_006.phpt @@ -58,7 +58,7 @@ checkAndClean(); var_dump(ob_start(array("f", "non_existent", "f", "f"))); checkAndClean(); -$c = new c('originalID'); +$c = new C('originalID'); var_dump(ob_start(array($c, "h"))); checkAndClean();