From 68d8dc19b3d7c59ee16fb3da9f6091ce28e7e105 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 | 45 ++ Zend/Optimizer/compact_literals.c | 24 +- Zend/Optimizer/dfa_pass.c | 6 +- Zend/Optimizer/optimize_func_calls.c | 15 +- Zend/Optimizer/pass1.c | 2 +- Zend/Optimizer/zend_inference.c | 8 +- Zend/Optimizer/zend_optimizer.c | 70 +-- Zend/Optimizer/zend_ssa.c | 4 +- .../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 ++ 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/constants/bug46304.phpt | 21 +- .../exception_handler_005.phpt | 2 +- .../exception_handler_006.phpt | 2 +- .../exception_handler_007.phpt | 2 +- Zend/tests/function_exists_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 +- .../serialize___serialize_may_initialize.phpt | 2 +- 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 +- 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/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_64bit.phpt | 156 +------ .../scalar_strict_64bit.phpt | 217 +--------- .../scalar_strict_basic.phpt | 121 +----- .../redundant_types/duplicate_class_type.phpt | 4 +- Zend/tests/use_function/case_insensivity.phpt | 7 +- Zend/zend.h | 1 - Zend/zend_API.c | 94 ++-- 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 | 57 +-- Zend/zend_closures.c | 2 +- Zend/zend_compile.c | 403 +++++++++--------- Zend/zend_compile.h | 12 +- Zend/zend_constants.c | 40 +- Zend/zend_enum.c | 4 +- Zend/zend_exceptions.c | 2 +- Zend/zend_execute.c | 27 +- Zend/zend_execute.h | 7 +- Zend/zend_execute_API.c | 87 ++-- Zend/zend_inheritance.c | 86 ++-- Zend/zend_inheritance.h | 2 +- Zend/zend_interfaces.c | 12 +- Zend/zend_object_handlers.c | 36 +- Zend/zend_opcode.c | 2 - Zend/zend_string.h | 1 - Zend/zend_vm_def.h | 33 +- Zend/zend_vm_execute.h | 258 ++++++----- build/gen_stub.php | 2 +- ext/date/php_date_arginfo.h | 82 ++-- ext/json/json_encoder.c | 2 +- ext/opcache/ZendAccelerator.c | 32 +- ext/opcache/ZendAccelerator.h | 3 +- ext/opcache/jit/zend_jit.c | 3 +- ext/opcache/jit/zend_jit_helpers.c | 10 +- ext/opcache/jit/zend_jit_ir.c | 6 +- ext/opcache/tests/jit/fetch_obj_003.phpt | 2 +- ext/opcache/zend_accelerator_util_funcs.c | 29 +- ext/opcache/zend_file_cache.c | 12 +- ext/opcache/zend_persist.c | 16 +- ext/opcache/zend_persist_calc.c | 6 +- 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 +- .../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/readline/readline_cli.c | 15 +- ext/reflection/php_reflection.c | 102 ++--- ext/reflection/php_reflection_arginfo.h | 72 ++-- 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/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 | 27 +- ext/spl/spl_array.c | 8 +- ext/spl/spl_directory.c | 2 +- ext/spl/spl_iterators.c | 50 +-- ext/spl/spl_observer.c | 2 +- .../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 +- ...lowed_classes_option_stringable_value.phpt | 2 +- .../tests/serialize/unserialize_classes.phpt | 10 +- ext/standard/var.c | 4 +- ext/standard/var_unserializer.re | 18 +- ext/uri/php_uri_arginfo.h | 4 +- ext/xml/xml.c | 2 +- ext/xmlreader/php_xmlreader.c | 4 +- ext/zend_test/test_arginfo.h | 6 +- ext/zip/php_zip_arginfo.h | 6 +- sapi/phpdbg/phpdbg_utils.c | 22 +- sapi/phpdbg/tests/print_001.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 ++ .../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 + 468 files changed, 3067 insertions(+), 2465 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/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 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/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 3c4d6993f46c..07c0ca7616f5 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 95299dd5117f..450f103523ba 100644 --- a/UPGRADING +++ b/UPGRADING @@ -19,6 +19,51 @@ 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 + - DOM: . Properties previously documented as @readonly (e.g. DOMNode::$nodeType, DOMDocument::$xmlEncoding, DOMEntity::$actualEncoding, ::$encoding, 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..4db911eba0b7 100644 --- a/Zend/Optimizer/optimize_func_calls.c +++ b/Zend/Optimizer/optimize_func_calls.c @@ -200,14 +200,19 @@ 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; + /* slot 0 = ns-qualified name, slot 1 = unqualified fallback */ + zval *ns_slot = &op_array->literals[fcall->op2.constant]; + zval *unq_slot = &op_array->literals[fcall->op2.constant + 1]; + if (!zend_hash_find(EG(function_table), Z_STR_P(ns_slot)) + && Z_TYPE_P(unq_slot) == IS_STRING) { + literal_dtor(ns_slot); + fcall->op2.constant++; + } else { + 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_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..5d7dfa8694ef 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 @@ -290,21 +288,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 +308,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 +316,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 +421,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 +447,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 +471,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 +479,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 +795,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 +818,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 +842,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); } @@ -922,9 +902,8 @@ zend_function *zend_optimizer_get_called_func( break; } 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; + 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)))) { @@ -936,12 +915,39 @@ zend_function *zend_optimizer_get_called_func( } } break; + case ZEND_INIT_NS_FCALL_BY_NAME: + if (opline->op2_type == IS_CONST && Z_TYPE_P(CRT_CONSTANT(opline->op2)) == IS_STRING) { + /* slot 0 = ns-qualified name, slot 1 = unqualified fallback */ + const zval *ns_name = CRT_CONSTANT(opline->op2); + const zval *unqualified_name = CRT_CONSTANT(opline->op2) + 1; + zend_function *func; + zval *func_zv; + /* Try ns-qualified first */ + if (script && (func = zend_hash_find_ptr(&script->function_table, Z_STR_P(ns_name)))) { + return func; + } else if ((func_zv = zend_hash_find(EG(function_table), Z_STR_P(ns_name))) != NULL) { + if (!zend_optimizer_ignore_function(func_zv, op_array->filename)) { + return Z_PTR_P(func_zv); + } + } + /* Fall back to unqualified global name */ + if (Z_TYPE_P(unqualified_name) == IS_STRING) { + if (script && (func = zend_hash_find_ptr(&script->function_table, Z_STR_P(unqualified_name)))) { + return func; + } else if ((func_zv = zend_hash_find(EG(function_table), Z_STR_P(unqualified_name))) != NULL) { + if (!zend_optimizer_ignore_function(func_zv, op_array->filename)) { + return Z_PTR_P(func_zv); + } + } + } + } + break; case ZEND_INIT_STATIC_METHOD_CALL: if (opline->op2_type == IS_CONST && Z_TYPE_P(CRT_CONSTANT(opline->op2)) == IS_STRING) { 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 +965,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_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/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/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/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/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/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/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-- newLazyProxy(function ($obj) { var_dump("initializer"); - $c = new c(); + $c = new C(); $c->a = 1; return $c; }); diff --git a/Zend/tests/magic_methods/bug31683.phpt b/Zend/tests/magic_methods/bug31683.phpt index be2dfc807cc2..9b4ca5401895 100644 --- a/Zend/tests/magic_methods/bug31683.phpt +++ b/Zend/tests/magic_methods/bug31683.phpt @@ -67,30 +67,5 @@ for ($i=0; $i < 2; $i++) { echo "---\n"; } ?> ---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/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/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_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_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/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/zend.h b/Zend/zend.h index 0d5303192b57..8cd60d8d63fa 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -83,7 +83,6 @@ typedef struct _zend_unserialize_data zend_unserialize_data; typedef struct _zend_class_name { zend_string *name; - zend_string *lc_name; } zend_class_name; typedef struct _zend_trait_method_reference { diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 65834adbafff..04ac28fda035 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2865,7 +2865,7 @@ 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) { - if (ZSTR_VAL(lcname)[0] != '_' || ZSTR_VAL(lcname)[1] != '_') { + if (ZSTR_LEN(lcname) < 2 || ZSTR_VAL(lcname)[0] != '_' || ZSTR_VAL(lcname)[1] != '_') { /* pass */ } else if (zend_string_equals_literal(lcname, ZEND_CLONE_FUNC_NAME)) { ce->clone = fptr; @@ -3014,7 +3014,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; @@ -3111,7 +3111,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, "__tostring") && + 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)); @@ -3145,14 +3145,14 @@ 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); + 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) { @@ -3224,22 +3224,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); @@ -3257,7 +3256,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) { @@ -3268,10 +3267,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++; } @@ -3498,7 +3496,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; @@ -3511,10 +3509,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)) { @@ -3590,7 +3587,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. */ @@ -3599,16 +3596,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, @@ -3616,12 +3611,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; } @@ -3689,14 +3684,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 { @@ -3713,7 +3704,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) { @@ -3733,7 +3724,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) { @@ -3772,7 +3763,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; @@ -3797,7 +3787,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; @@ -3816,19 +3805,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; @@ -3909,15 +3891,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) && @@ -3926,7 +3907,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); @@ -4024,7 +4005,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_ast.c b/Zend/zend_ast.c index a7e26711cd17..e11525bac9c4 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 c19bf2779fbf..82678562ae8d 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -712,11 +712,12 @@ 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; } + if (only_subclass && instance_ce == ce) { RETURN_FALSE; } @@ -953,7 +954,6 @@ ZEND_FUNCTION(method_exists) { zval *klass; zend_string *method_name; - zend_string *lcname; zend_class_entry *ce; zend_function *func; @@ -974,9 +974,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 +991,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 +1002,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,28 +1071,34 @@ 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; + zend_string *effective_name = name; + if (ZSTR_VAL(name)[0] == '\\') { + effective_name = zend_string_init(ZSTR_VAL(name) + 1, ZSTR_LEN(name) - 1, 0); + } + if (ZSTR_HAS_CE_CACHE(name)) { ce = ZSTR_GET_CE_CACHE(name); if (ce) { + if (effective_name != name) { + zend_string_release_ex(effective_name, 0); + } RETURN_BOOL(((ce->ce_flags & flags) == flags) && !(ce->ce_flags & skip_flags)); } } 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); - } else { - lcname = zend_string_tolower(name); + ce = zend_hash_find_ptr(EG(class_table), effective_name); + if (effective_name != name) { + zend_string_release_ex(effective_name, 0); + effective_name = name; } - - ce = zend_hash_find_ptr(EG(class_table), lcname); - zend_string_release_ex(lcname, 0); } else { + if (effective_name != name) { + zend_string_release_ex(effective_name, 0); + effective_name = name; + } ce = zend_lookup_class(name); } @@ -1175,7 +1179,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 +1187,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 +1214,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 +1702,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 105f99d24171..09a4027fb8d3 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) /* {{{ */ @@ -614,14 +614,8 @@ static inline int zend_add_literal_string(zend_string **str) /* {{{ */ static int zend_add_func_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; + /* Original name (slot 0, used for case-sensitive function and method table lookup) */ + return zend_add_literal_string(&name); } /* }}} */ @@ -630,18 +624,13 @@ 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); } return ret; @@ -650,46 +639,33 @@ static int zend_add_ns_func_name_literal(zend_string *name) /* {{{ */ 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; + /* The class table is keyed by canonical case, so the class name literal + * doubles as the lookup key. */ + return zend_add_literal_string(&name); } /* }}} */ 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 +1066,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 +1089,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 +1105,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 +1120,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 +1170,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 +1179,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 +1250,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 +1270,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 +1284,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 +1508,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 +1711,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 +1835,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 +1855,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 { @@ -4313,7 +4284,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 +4293,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 +4305,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; @@ -4381,7 +4350,7 @@ static zend_result zend_compile_func_cufa(znode *result, zend_ast_list *args, ze bool is_fully_qualified; zend_string *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(name, "array_slice") && !zend_args_contain_unpack_or_named(list) && list->children == 3 && list->child[1]->kind == ZEND_AST_ZVAL) { @@ -4703,7 +4672,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 +4793,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 +4806,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); } @@ -5143,7 +5112,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; } @@ -5422,7 +5391,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 +5403,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 +5418,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(); @@ -5530,8 +5493,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 +5513,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); } /* }}} */ @@ -5634,14 +5596,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 +5612,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 +5647,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 +6725,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; @@ -7473,7 +7434,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 +7468,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 +7486,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 +7773,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 +7837,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 +8231,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 +8480,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 +8492,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 +8596,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_NAME) + 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 +8634,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 +8679,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 +8712,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 +8722,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 +8737,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 +8770,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 +8798,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 +8808,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 +8839,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_NAME) ? 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 +8892,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 +8914,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 +9259,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 +9341,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 +9444,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 +9479,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 +9533,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 +9557,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 +9658,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 +9689,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 +9717,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 +9802,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 +9856,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,7 +9872,6 @@ 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]; @@ -9903,11 +9898,7 @@ 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); - } + lookup_name = zend_string_copy(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' " @@ -9916,7 +9907,7 @@ 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); diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 0e31332c97f0..4561c1eb0068 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); @@ -1249,10 +1249,10 @@ END_EXTERN_C() #define ZEND_UNSET_FUNC_NAME "__unset" #define ZEND_ISSET_FUNC_NAME "__isset" #define ZEND_CALL_FUNC_NAME "__call" -#define ZEND_CALLSTATIC_FUNC_NAME "__callstatic" -#define ZEND_TOSTRING_FUNC_NAME "__tostring" +#define ZEND_CALLSTATIC_FUNC_NAME "__callStatic" +#define ZEND_TOSTRING_FUNC_NAME "__toString" #define ZEND_INVOKE_FUNC_NAME "__invoke" -#define ZEND_DEBUGINFO_FUNC_NAME "__debuginfo" +#define ZEND_DEBUGINFO_FUNC_NAME "__debugInfo" /* The following constants may be combined in CG(compiler_options) * to change the default compiler behavior */ diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c index 18292203bee9..5e64b275949e 100644 --- a/Zend/zend_constants.c +++ b/Zend/zend_constants.c @@ -441,24 +441,16 @@ ZEND_API zval *zend_get_constant_ex(zend_string *cname, const zend_class_entry * /* non-class constant */ if ((colon = zend_memrchr(name, '\\', name_len)) != NULL) { - /* compound constant name */ + /* compound constant name — the namespace portion is case-sensitive */ 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 (cname) { + c = zend_get_constant_ptr(cname); + } else { + c = zend_get_constant_str_impl(name, name_len); + } if (!c) { if (flags & IS_CONSTANT_UNQUALIFIED_IN_NAMESPACE) { @@ -509,7 +501,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 +509,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 +538,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 +547,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 a5091f6c1b6f..6fbb9573d338 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 4253037fda52..3a4060be6bb6 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; @@ -5103,7 +5103,7 @@ static zend_never_inline zend_execute_data *zend_init_dynamic_call_string(zend_s lcname = 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(lcname, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(called_scope == NULL)) { zend_string_release_ex(lcname, 0); return NULL; @@ -5141,17 +5141,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); + lcname = zend_string_init(ZSTR_VAL(function) + 1, ZSTR_LEN(function) - 1, 0); + func = zend_hash_find(EG(function_table), lcname); + zend_string_release_ex(lcname, 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))) { @@ -5239,7 +5238,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 e85b4ea42250..0356f4a0ba44 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) { @@ -3870,31 +3854,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; @@ -3902,10 +3886,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; } @@ -3915,10 +3899,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 { @@ -3941,7 +3925,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; } @@ -3989,7 +3973,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; } @@ -4007,7 +3991,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..67c9cf790129 100644 --- a/Zend/zend_inheritance.h +++ b/Zend/zend_inheritance.h @@ -31,7 +31,7 @@ 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); 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 e7ddd466a51a..236504972bda 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -1931,23 +1931,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 { @@ -1963,7 +1949,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; @@ -1989,9 +1975,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; } /* }}} */ @@ -2017,15 +2000,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)) { @@ -2043,10 +2021,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_opcode.c b/Zend/zend_opcode.c index 0c6b22473514..286b48f12d50 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 3f0c9abd2596..4ca6fd8a4baa 100644 --- a/Zend/zend_string.h +++ b/Zend/zend_string.h @@ -641,7 +641,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 1de7a7cd4195..1b3ab8bd5871 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); } @@ -4858,8 +4858,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; @@ -5984,7 +5983,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(); @@ -6118,7 +6117,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(); } @@ -6143,7 +6142,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(); @@ -6726,7 +6725,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(); @@ -8003,7 +8002,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(); } @@ -8017,7 +8016,7 @@ ZEND_VM_HANDLER(145, ZEND_DECLARE_CLASS_DELAYED, CONST, CONST) zval *zv = zend_hash_find_known_hash(EG(class_table), Z_STR_P(lcname + 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, lcname); if (EG(exception)) { HANDLE_EXCEPTION(); } @@ -8041,7 +8040,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(); } @@ -8096,7 +8095,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 5b52f1941845..2d3cb8902cb2 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)); @@ -8268,7 +8267,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_DECLARE_CLASS zval *zv = zend_hash_find_known_hash(EG(class_table), Z_STR_P(lcname + 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, lcname); if (EG(exception)) { HANDLE_EXCEPTION(); } @@ -9095,7 +9094,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 +10209,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 +10282,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 +10335,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 +11069,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 +11125,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))) { @@ -11377,7 +11376,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(); @@ -12817,7 +12816,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)); @@ -12892,7 +12891,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)) { @@ -12948,7 +12947,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))) { @@ -19196,7 +19195,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)); @@ -19659,7 +19658,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); } @@ -20772,7 +20771,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)); @@ -21313,7 +21312,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); } @@ -21837,7 +21836,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); } @@ -22630,7 +22629,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)); @@ -25524,7 +25523,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)) { @@ -25580,7 +25579,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))) { @@ -25961,7 +25960,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)); @@ -26505,7 +26504,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); @@ -28224,7 +28223,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(); @@ -28277,7 +28276,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))) { @@ -29424,7 +29423,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)) { @@ -29480,7 +29479,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))) { @@ -30053,7 +30052,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(); @@ -32095,7 +32094,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)) { @@ -32151,7 +32150,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))) { @@ -34100,7 +34099,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; @@ -34232,7 +34231,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)); @@ -34307,7 +34306,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)) { @@ -34363,7 +34362,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))) { @@ -34474,7 +34473,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(); } @@ -34499,7 +34498,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)); @@ -34884,7 +34883,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); @@ -36192,7 +36191,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; @@ -36321,7 +36320,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)); @@ -36394,7 +36393,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(); @@ -36447,7 +36446,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))) { @@ -36767,7 +36766,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; @@ -36811,7 +36810,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)) { @@ -36867,7 +36866,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))) { @@ -37098,7 +37097,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(); @@ -38767,7 +38766,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; @@ -38899,7 +38898,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)); @@ -38974,7 +38973,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)) { @@ -39030,7 +39029,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))) { @@ -43849,7 +43848,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)); @@ -44522,7 +44521,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); } @@ -47660,7 +47659,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)); @@ -48343,7 +48342,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); } @@ -49720,7 +49719,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); } @@ -52828,7 +52827,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)); @@ -55749,7 +55748,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(); @@ -56015,7 +56014,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(); } @@ -56744,7 +56743,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)); } @@ -56827,9 +56826,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)); } @@ -57850,8 +57849,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; @@ -58585,7 +58583,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(); } @@ -60148,7 +60146,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)); @@ -60223,7 +60221,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)) { @@ -60279,7 +60277,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))) { @@ -60508,7 +60506,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)); @@ -60942,7 +60940,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_DECLARE_CLASS_DELA zval *zv = zend_hash_find_known_hash(EG(class_table), Z_STR_P(lcname + 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, lcname); if (EG(exception)) { HANDLE_EXCEPTION(); } @@ -61769,7 +61767,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); @@ -62884,7 +62882,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)); @@ -62957,7 +62955,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(); @@ -63010,7 +63008,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))) { @@ -63642,7 +63640,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)) { @@ -63698,7 +63696,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))) { @@ -63949,7 +63947,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(); @@ -65389,7 +65387,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)); @@ -65464,7 +65462,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)) { @@ -65520,7 +65518,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))) { @@ -71768,7 +71766,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)); @@ -72231,7 +72229,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); } @@ -73344,7 +73342,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)); @@ -73885,7 +73883,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); } @@ -74309,7 +74307,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); } @@ -75102,7 +75100,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)); @@ -77996,7 +77994,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)) { @@ -78052,7 +78050,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))) { @@ -78433,7 +78431,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)); @@ -78977,7 +78975,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); @@ -80696,7 +80694,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(); @@ -80749,7 +80747,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))) { @@ -81896,7 +81894,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)) { @@ -81952,7 +81950,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))) { @@ -82525,7 +82523,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(); @@ -84567,7 +84565,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)) { @@ -84623,7 +84621,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))) { @@ -86572,7 +86570,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; @@ -86704,7 +86702,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)); @@ -86779,7 +86777,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)) { @@ -86835,7 +86833,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))) { @@ -86946,7 +86944,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(); } @@ -86971,7 +86969,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)); @@ -87356,7 +87354,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); @@ -88664,7 +88662,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; @@ -88793,7 +88791,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)); @@ -88866,7 +88864,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(); @@ -88919,7 +88917,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))) { @@ -89239,7 +89237,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; @@ -89283,7 +89281,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)) { @@ -89339,7 +89337,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))) { @@ -89570,7 +89568,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(); @@ -91239,7 +91237,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; @@ -91371,7 +91369,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)); @@ -91446,7 +91444,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)) { @@ -91502,7 +91500,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))) { @@ -96321,7 +96319,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)); @@ -96994,7 +96992,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); } @@ -100132,7 +100130,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)); @@ -100815,7 +100813,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); } @@ -102090,7 +102088,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); } @@ -105198,7 +105196,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..d58e67f55e78 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -1016,7 +1016,7 @@ public function getMethodSynopsisFilename(): string } public function getNameForAttributes(): string { - return strtolower($this->methodName); + return $this->methodName; } public function __toString(): string { 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/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/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 3d005b3835a7..eda280bcf77d 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,21 @@ static void preload_link(void) continue; } - zend_string *lcname = zend_string_tolower(ce->name); + 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 +4093,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 +4126,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 +4169,10 @@ 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); + zend_string *key_name = zend_string_copy(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), key_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,7 @@ 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_string_release(key_name); } } 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..86c91d881707 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; 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/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-- 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,22 @@ 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) + 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/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 2b4e5a8f8239..5af33fa7d758 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -1944,12 +1944,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) { @@ -1965,14 +1962,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_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/readline/readline_cli.c b/ext/readline/readline_cli.c index 9f42b33596c0..85ccd8855f34 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 af565ed53a32..0eeb55684557 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. @@ -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); + lcname = zend_string_init(ZSTR_VAL(fname) + 1, ZSTR_LEN(fname) - 1, 0); fptr = zend_fetch_function(lcname); - ZSTR_ALLOCA_FREE(lcname, use_heap); + zend_string_release_ex(lcname, 0); } else { - lcname = zend_string_tolower(fname); - fptr = zend_fetch_function(lcname); - zend_string_release(lcname); + fptr = zend_fetch_function(fname); } if (fptr == NULL) { @@ -1744,6 +1734,7 @@ ZEND_METHOD(ReflectionFunction, __construct) "Function %s() does not exist", ZSTR_VAL(fname)); RETURN_THROWS(); } + } if (intern->ptr) { @@ -2477,9 +2468,7 @@ ZEND_METHOD(ReflectionParameter, __construct) switch (Z_TYPE_P(reference)) { case IS_STRING: { - zend_string *lcname = zend_string_tolower(Z_STR_P(reference)); - fptr = zend_hash_find_ptr(EG(function_table), lcname); - zend_string_release(lcname); + fptr = zend_hash_find_ptr(EG(function_table), Z_STR_P(reference)); if (!fptr) { zend_throw_exception_ex(reflection_exception_ptr, 0, "Function %s() does not exist", Z_STRVAL_P(reference)); @@ -2492,7 +2481,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)) @@ -2522,21 +2511,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; @@ -3232,7 +3218,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; @@ -3308,22 +3293,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); @@ -4462,16 +4443,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)); } /* }}} */ @@ -4482,33 +4461,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); } /* }}} */ @@ -4635,9 +4612,7 @@ ZEND_METHOD(ReflectionClass, getProperty) str_name = ZSTR_VAL(name); if ((tmp = strstr(ZSTR_VAL(name), "::")) != NULL) { classname_len = tmp - ZSTR_VAL(name); - classname = zend_string_alloc(classname_len, 0); - zend_str_tolower_copy(ZSTR_VAL(classname), ZSTR_VAL(name), classname_len); - ZSTR_VAL(classname)[classname_len] = '\0'; + classname = zend_string_init(ZSTR_VAL(name), classname_len, 0); str_name_len = ZSTR_LEN(name) - (classname_len + 2); str_name = tmp + 2; @@ -5389,8 +5364,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); @@ -5443,18 +5417,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); } @@ -7543,7 +7515,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(); } @@ -7591,8 +7563,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 @@ -7955,21 +7927,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/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 2c2c5b7fa986..07945a6b9ccf 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); @@ -4295,9 +4290,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/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 43fd04f7d021..60ec9cae507b 100644 --- a/ext/spl/php_spl.c +++ b/ext/spl/php_spl.c @@ -43,10 +43,7 @@ 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); + ce = zend_hash_find_ptr(EG(class_table), name); } else { ce = zend_lookup_class(name); } @@ -258,14 +255,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 +300,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 +313,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 +331,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 +338,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 +379,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 a3df888a6102..a35d2eec6466 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 f897ab1350cc..1146b79b8042 100644 --- a/ext/spl/spl_observer.c +++ b/ext/spl/spl_observer.c @@ -308,7 +308,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/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/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/var.c b/ext/standard/var.c index 3137a270f661..e41175e16d2e 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -1432,9 +1432,7 @@ PHPAPI void php_unserialize_with_options(zval *return_value, const char *buf, co zend_tmp_string_release(tmp_str); goto cleanup; } - zend_string *lcname = zend_string_tolower(name); - zend_hash_add_empty_element(class_hash, lcname); - zend_string_release_ex(lcname, false); + zend_hash_add_empty_element(class_hash, name); zend_tmp_string_release(tmp_str); } ZEND_HASH_FOREACH_END(); } diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re index d5019d94dc0c..eff0c75ba175 100644 --- a/ext/standard/var_unserializer.re +++ b/ext/standard/var_unserializer.re @@ -357,7 +357,7 @@ static zend_string *unserialize_str(const unsigned char **p, size_t len, size_t } static inline int unserialize_allowed_class( - zend_string *lcname, php_unserialize_data_t *var_hashx) + zend_string *name, php_unserialize_data_t *var_hashx) { HashTable *classes = (*var_hashx)->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/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/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/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/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/sapi/phpdbg/phpdbg_utils.c b/sapi/phpdbg/phpdbg_utils.c index 758f75766c81..f0ac195128ef 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; } /* }}} */ @@ -633,7 +627,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/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/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