summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2015-06-23 18:49:42 +0200
committerAnatol Belski <ab@php.net>2015-06-23 18:49:42 +0200
commit29711264a8b4d832a2228a6ccf9008e7f2343412 (patch)
tree1ff156a4426fb6b9c167d5c513f75516ef2b21d3
parentdbf30365aa15b9044d75b8f77db570bf8fdf2726 (diff)
parent95b6575a5931ac3bd5f9c9d3aadc55d752505178 (diff)
downloadphp-git-29711264a8b4d832a2228a6ccf9008e7f2343412.tar.gz
Merge branch 'master' into PHP-7.0.0
* master: (239 commits) Moved NEWS entry for bug #69864 to proper category Moved NEWS entry for bug #69864 to proper category Moved NEWS entry for bug #69864 to proper category updated NEWS updated NEWS Fixed two errors in LDAP tests Fixed two errors in LDAP tests Revert "Simplify php_implode(). Fill the resulting string in direct order." The patch slightly improved performance of string imploding, but reduced speed of integers imploding. Encapsulate FastCGI implementation details. Previously fcgi_request defined in main/fastcgi.h might be treated differently in different files, because of different behavior of #ifdef TCP_NODELAY. This leaded to stack memory corruption and unpredictable crashes. Fixed bug #69905 (null ptr deref and segfault in ZEND_FETCH_DIM_RW_SPEC_VAR_UNUSED_HANDLER) updated NEWS Fixed bug #69864 (Segfault in preg_replace_callback) Simplify php_implode(). Fill the resulting string in direct order. bump API version to 6.8 bump API version to 6.8 bump API version to 6.8 Drop duplicate object-to-type notices Added comments Drop superfluous __toString handling code This macro is defined in zend_virtual_cwd.h, avoid redef ...
-rw-r--r--.gdbinit2
-rw-r--r--.gitignore3
-rw-r--r--EXTENSIONS86
-rw-r--r--UPGRADING54
-rw-r--r--Zend/tests/028.phpt2
-rw-r--r--Zend/tests/030.phpt6
-rw-r--r--Zend/tests/037.phpt2
-rw-r--r--Zend/tests/access_modifiers_010.phpt2
-rw-r--r--Zend/tests/add_002.phpt4
-rw-r--r--Zend/tests/add_003.phpt4
-rw-r--r--Zend/tests/add_004.phpt4
-rw-r--r--Zend/tests/add_007.phpt4
-rw-r--r--Zend/tests/anon/006.phpt2
-rw-r--r--Zend/tests/anon/007.phpt2
-rw-r--r--Zend/tests/arg_unpack/string_keys.phpt4
-rw-r--r--Zend/tests/array_offset.phpt21
-rw-r--r--Zend/tests/array_type_hint_001.phpt2
-rw-r--r--Zend/tests/assert/expect_002.phpt2
-rw-r--r--Zend/tests/assert/expect_003.phpt2
-rw-r--r--Zend/tests/assert/expect_004.phpt2
-rw-r--r--Zend/tests/assert/expect_005.phpt2
-rw-r--r--Zend/tests/assert/expect_007.phpt6
-rw-r--r--Zend/tests/assert/expect_008.phpt2
-rw-r--r--Zend/tests/assert/expect_009.phpt2
-rw-r--r--Zend/tests/assert/expect_010.phpt2
-rw-r--r--Zend/tests/assert/expect_011.phpt4
-rw-r--r--Zend/tests/assert/expect_015.phpt6
-rw-r--r--Zend/tests/bug24773.phpt2
-rw-r--r--Zend/tests/bug26166.phpt12
-rw-r--r--Zend/tests/bug29015.phpt2
-rw-r--r--Zend/tests/bug29674.phpt2
-rw-r--r--Zend/tests/bug31102.phpt2
-rw-r--r--Zend/tests/bug32660.phpt2
-rw-r--r--Zend/tests/bug33318.phpt2
-rw-r--r--Zend/tests/bug33996.phpt2
-rw-r--r--Zend/tests/bug34064.phpt2
-rw-r--r--Zend/tests/bug36071.phpt2
-rw-r--r--Zend/tests/bug36268.phpt2
-rw-r--r--Zend/tests/bug37251.phpt2
-rw-r--r--Zend/tests/bug37632.phpt2
-rw-r--r--Zend/tests/bug39003.phpt2
-rw-r--r--Zend/tests/bug40621.phpt2
-rw-r--r--Zend/tests/bug41633_2.phpt2
-rw-r--r--Zend/tests/bug41633_3.phpt2
-rw-r--r--Zend/tests/bug41813.phpt2
-rw-r--r--Zend/tests/bug41919.phpt2
-rw-r--r--Zend/tests/bug42802.phpt2
-rw-r--r--Zend/tests/bug42817.phpt2
-rw-r--r--Zend/tests/bug42818.phpt2
-rw-r--r--Zend/tests/bug42819.phpt2
-rw-r--r--Zend/tests/bug42937.phpt2
-rw-r--r--Zend/tests/bug43332_1.phpt2
-rw-r--r--Zend/tests/bug43344_10.phpt2
-rw-r--r--Zend/tests/bug43344_11.phpt2
-rw-r--r--Zend/tests/bug43344_12.phpt2
-rw-r--r--Zend/tests/bug43344_13.phpt2
-rw-r--r--Zend/tests/bug43344_2.phpt2
-rw-r--r--Zend/tests/bug43344_6.phpt2
-rw-r--r--Zend/tests/bug43344_7.phpt2
-rw-r--r--Zend/tests/bug43344_8.phpt2
-rw-r--r--Zend/tests/bug43344_9.phpt2
-rw-r--r--Zend/tests/bug44141.phpt2
-rw-r--r--Zend/tests/bug46304.phpt2
-rw-r--r--Zend/tests/bug46381.phpt2
-rw-r--r--Zend/tests/bug47054.phpt2
-rw-r--r--Zend/tests/bug47699.phpt2
-rw-r--r--Zend/tests/bug47704.phpt2
-rw-r--r--Zend/tests/bug48215_2.phpt2
-rw-r--r--Zend/tests/bug48693.phpt12
-rw-r--r--Zend/tests/bug49866.phpt2
-rw-r--r--Zend/tests/bug50146.phpt2
-rw-r--r--Zend/tests/bug52484.phpt2
-rw-r--r--Zend/tests/bug52484_2.phpt2
-rw-r--r--Zend/tests/bug52484_3.phpt2
-rw-r--r--Zend/tests/bug55156.phpt1
-rw-r--r--Zend/tests/bug55705.phpt2
-rw-r--r--Zend/tests/bug61025.phpt2
-rw-r--r--Zend/tests/bug61362.phpt23
-rw-r--r--Zend/tests/bug63111.phpt2
-rw-r--r--Zend/tests/bug63173.phpt2
-rw-r--r--Zend/tests/bug64135.phpt2
-rw-r--r--Zend/tests/bug64720.phpt8
-rw-r--r--Zend/tests/bug64966.phpt2
-rw-r--r--Zend/tests/bug65784.phpt2
-rw-r--r--Zend/tests/bug65911.phpt2
-rw-r--r--Zend/tests/bug68446.phpt2
-rw-r--r--Zend/tests/bug68475.phpt4
-rw-r--r--Zend/tests/bug68652.phpt2
-rw-r--r--Zend/tests/bug69551.phpt16
-rw-r--r--Zend/tests/bug69640.phpt4
-rw-r--r--Zend/tests/bug69740.phpt28
-rw-r--r--Zend/tests/bug69761.phpt15
-rw-r--r--Zend/tests/bug69788.phpt8
-rw-r--r--Zend/tests/bug69802.phpt27
-rw-r--r--Zend/tests/bug69802_2.phpt13
-rw-r--r--Zend/tests/bug69805.phpt8
-rw-r--r--Zend/tests/bug69825.phpt30
-rw-r--r--Zend/tests/bug69832.phpt32
-rw-r--r--Zend/tests/bug69871.phpt17
-rw-r--r--Zend/tests/bug69889.phpt22
-rw-r--r--Zend/tests/bug69891.phpt12
-rw-r--r--Zend/tests/bug69892.phpt10
-rw-r--r--Zend/tests/bug69893.phpt8
-rw-r--r--Zend/tests/bug69905.phpt11
-rw-r--r--Zend/tests/call_static_004.phpt2
-rw-r--r--Zend/tests/call_static_005.phpt2
-rw-r--r--Zend/tests/call_static_006.phpt2
-rw-r--r--Zend/tests/call_user_func_004.phpt2
-rw-r--r--Zend/tests/call_with_refs.phpt1
-rw-r--r--Zend/tests/class_alias_008.phpt2
-rw-r--r--Zend/tests/class_alias_016.phpt2
-rw-r--r--Zend/tests/class_alias_020.phpt2
-rw-r--r--Zend/tests/class_constants_001.phpt2
-rw-r--r--Zend/tests/class_name_as_scalar_error_005.phpt2
-rw-r--r--Zend/tests/class_name_as_scalar_error_006.phpt2
-rw-r--r--Zend/tests/class_name_as_scalar_error_007.phpt2
-rw-r--r--Zend/tests/clone_001.phpt2
-rw-r--r--Zend/tests/clone_003.phpt2
-rw-r--r--Zend/tests/clone_004.phpt2
-rw-r--r--Zend/tests/closure_005.phpt2
-rw-r--r--Zend/tests/closure_019.phpt2
-rw-r--r--Zend/tests/closure_020.phpt2
-rw-r--r--Zend/tests/closure_022.phpt2
-rw-r--r--Zend/tests/closure_027.phpt2
-rw-r--r--Zend/tests/closure_031.phpt2
-rw-r--r--Zend/tests/closure_033.phpt2
-rw-r--r--Zend/tests/closure_038.phpt4
-rw-r--r--Zend/tests/closure_039.phpt4
-rw-r--r--Zend/tests/closure_059.phpt6
-rw-r--r--Zend/tests/closure_060.phpt25
-rw-r--r--Zend/tests/constant_expressions_exceptions_002.phpt2
-rw-r--r--Zend/tests/constant_expressions_invalid_offset_type_error.phpt2
-rw-r--r--Zend/tests/constant_expressions_self_referencing_array.phpt2
-rw-r--r--Zend/tests/dereference_002.phpt2
-rw-r--r--Zend/tests/dereference_010.phpt2
-rw-r--r--Zend/tests/div_002.phpt4
-rw-r--r--Zend/tests/dynamic_call_001.phpt2
-rw-r--r--Zend/tests/dynamic_call_002.phpt2
-rw-r--r--Zend/tests/dynamic_call_003.phpt2
-rw-r--r--Zend/tests/dynamic_call_004.phpt2
-rw-r--r--Zend/tests/errmsg_044.phpt2
-rw-r--r--Zend/tests/exception_004.phpt2
-rw-r--r--Zend/tests/exception_005.phpt2
-rw-r--r--Zend/tests/exception_006.phpt2
-rw-r--r--Zend/tests/exception_010.phpt14
-rw-r--r--Zend/tests/exception_011.phpt2
-rw-r--r--Zend/tests/exception_012.phpt2
-rw-r--r--Zend/tests/exception_013.phpt8
-rw-r--r--Zend/tests/exception_014.phpt4
-rw-r--r--Zend/tests/exception_015.phpt4
-rw-r--r--Zend/tests/exception_016.phpt4
-rw-r--r--Zend/tests/exception_017.phpt8
-rw-r--r--Zend/tests/exception_018.phpt15
-rw-r--r--Zend/tests/exception_019.phpt14
-rw-r--r--Zend/tests/exception_020.phpt15
-rw-r--r--Zend/tests/exception_021.phpt15
-rw-r--r--Zend/tests/exception_022.phpt14
-rw-r--r--Zend/tests/exception_before_fatal.phpt14
-rw-r--r--Zend/tests/generators/aborted_yield_during_new.phpt19
-rw-r--r--Zend/tests/generators/bug63066.phpt2
-rw-r--r--Zend/tests/generators/bug65161.phpt2
-rw-r--r--Zend/tests/generators/bug67497.phpt2
-rw-r--r--Zend/tests/generators/clone.phpt2
-rw-r--r--Zend/tests/generators/errors/generator_instantiate_error.phpt2
-rw-r--r--Zend/tests/generators/errors/resume_running_generator_error.phpt4
-rw-r--r--Zend/tests/generators/errors/yield_in_force_closed_finally_error.phpt2
-rw-r--r--Zend/tests/generators/throw_not_an_exception.phpt2
-rw-r--r--Zend/tests/generators/yield_from_already_running.phpt2
-rw-r--r--Zend/tests/indirect_call_array_001.phpt2
-rw-r--r--Zend/tests/indirect_call_array_002.phpt2
-rw-r--r--Zend/tests/indirect_method_call_002.phpt2
-rw-r--r--Zend/tests/list_005.phpt2
-rw-r--r--Zend/tests/list_007.phpt2
-rw-r--r--Zend/tests/methods-on-non-objects-catch.phpt2
-rw-r--r--Zend/tests/methods-on-non-objects-usort.phpt2
-rw-r--r--Zend/tests/methods-on-non-objects.phpt2
-rw-r--r--Zend/tests/mul_001.phpt4
-rw-r--r--Zend/tests/not_002.phpt4
-rw-r--r--Zend/tests/ns_004.phpt2
-rw-r--r--Zend/tests/ns_026.phpt2
-rw-r--r--Zend/tests/ns_038.phpt2
-rw-r--r--Zend/tests/ns_057.phpt2
-rw-r--r--Zend/tests/ns_058.phpt2
-rw-r--r--Zend/tests/ns_071.phpt2
-rw-r--r--Zend/tests/ns_072.phpt2
-rw-r--r--Zend/tests/ns_076.phpt2
-rw-r--r--Zend/tests/ns_077_1.phpt2
-rw-r--r--Zend/tests/ns_077_2.phpt2
-rw-r--r--Zend/tests/ns_077_3.phpt2
-rw-r--r--Zend/tests/ns_077_4.phpt2
-rw-r--r--Zend/tests/ns_077_5.phpt2
-rw-r--r--Zend/tests/ns_077_6.phpt2
-rw-r--r--Zend/tests/ns_077_7.phpt2
-rw-r--r--Zend/tests/ns_077_8.phpt2
-rw-r--r--Zend/tests/ns_092.phpt2
-rw-r--r--Zend/tests/objects_017.phpt2
-rw-r--r--Zend/tests/objects_022.phpt2
-rw-r--r--Zend/tests/objects_025.phpt2
-rw-r--r--Zend/tests/objects_026.phpt2
-rw-r--r--Zend/tests/objects_029.phpt2
-rw-r--r--Zend/tests/objects_030.phpt2
-rw-r--r--Zend/tests/offset_assign.phpt2
-rw-r--r--Zend/tests/offset_object.phpt2
-rw-r--r--Zend/tests/parent_class_name_without_parent.phpt2
-rw-r--r--Zend/tests/require_parse_exception.phpt2
-rw-r--r--Zend/tests/return_types/001.phpt2
-rw-r--r--Zend/tests/return_types/002.phpt2
-rw-r--r--Zend/tests/return_types/003.phpt2
-rw-r--r--Zend/tests/return_types/004.phpt2
-rw-r--r--Zend/tests/return_types/005.phpt2
-rw-r--r--Zend/tests/return_types/010.phpt2
-rw-r--r--Zend/tests/return_types/013.phpt2
-rw-r--r--Zend/tests/return_types/028.phpt2
-rw-r--r--Zend/tests/return_types/rfc001.phpt2
-rw-r--r--Zend/tests/return_types/rfc003.phpt2
-rw-r--r--Zend/tests/str_offset_002.phpt6
-rw-r--r--Zend/tests/sub_001.phpt4
-rw-r--r--Zend/tests/throwable_001.phpt18
-rw-r--r--Zend/tests/throwable_002.phpt18
-rw-r--r--Zend/tests/throwable_003.phpt11
-rw-r--r--Zend/tests/traits/bug60173.phpt2
-rw-r--r--Zend/tests/traits/bugs/alias01.phpt2
-rw-r--r--Zend/tests/traits/error_007.phpt2
-rw-r--r--Zend/tests/traits/error_012.phpt2
-rw-r--r--Zend/tests/traits/language008a.phpt2
-rw-r--r--Zend/tests/traits/language008b.phpt2
-rw-r--r--Zend/tests/typehints/explicit_weak_include_strict.phpt2
-rw-r--r--Zend/tests/typehints/inexistent_class_hint_with_scalar_arg.phpt16
-rw-r--r--Zend/tests/typehints/internal_function_strict_mode.phpt6
-rw-r--r--Zend/tests/typehints/scalar_basic.phpt2
-rw-r--r--Zend/tests/typehints/scalar_constant_defaults_error.phpt2
-rw-r--r--Zend/tests/typehints/scalar_none.phpt2
-rw-r--r--Zend/tests/typehints/scalar_null.phpt2
-rw-r--r--Zend/tests/typehints/scalar_return_basic.phpt2
-rw-r--r--Zend/tests/typehints/scalar_return_basic_64bit.phpt2
-rw-r--r--Zend/tests/typehints/scalar_strict.phpt2
-rw-r--r--Zend/tests/typehints/scalar_strict_64bit.phpt2
-rw-r--r--Zend/tests/typehints/scalar_strict_basic.phpt2
-rw-r--r--Zend/tests/typehints/strict_call_weak.phpt2
-rw-r--r--Zend/tests/typehints/strict_call_weak_explicit.phpt2
-rw-r--r--Zend/tests/typehints/weak_include_strict.phpt2
-rw-r--r--Zend/tests/use_const/no_global_fallback.phpt2
-rw-r--r--Zend/tests/use_function/no_global_fallback.phpt2
-rw-r--r--Zend/tests/use_function/no_global_fallback2.phpt2
-rw-r--r--Zend/tests/varSyntax/method_call_on_string_literal.phpt2
-rw-r--r--Zend/tests/varSyntax/tempDimFetchByRefError.phpt2
-rw-r--r--Zend/tests/varSyntax/tempPropFetchByRefError.phpt2
-rw-r--r--Zend/tests/variadic/typehint_error.phpt2
-rw-r--r--Zend/tests/variadic/typehint_suppressed_error.phpt2
-rw-r--r--Zend/tests/vm_stack_with_arg_extend.phpt17
-rw-r--r--Zend/zend.c8
-rw-r--r--Zend/zend_API.c13
-rw-r--r--Zend/zend_API.h39
-rw-r--r--Zend/zend_alloc.c14
-rw-r--r--Zend/zend_ast.c7
-rw-r--r--Zend/zend_builtin_functions.c17
-rw-r--r--Zend/zend_closures.c39
-rw-r--r--Zend/zend_compile.c340
-rw-r--r--Zend/zend_compile.h5
-rw-r--r--Zend/zend_exceptions.c277
-rw-r--r--Zend/zend_exceptions.h9
-rw-r--r--Zend/zend_execute.c311
-rw-r--r--Zend/zend_execute.h27
-rw-r--r--Zend/zend_generators.c81
-rw-r--r--Zend/zend_hash.c90
-rw-r--r--Zend/zend_ini_scanner.c2
-rw-r--r--Zend/zend_ini_scanner.l2
-rw-r--r--Zend/zend_interfaces.c25
-rw-r--r--Zend/zend_interfaces.h11
-rw-r--r--Zend/zend_language_parser.y2
-rw-r--r--Zend/zend_language_scanner.c10
-rw-r--r--Zend/zend_language_scanner.l10
-rw-r--r--Zend/zend_object_handlers.c56
-rw-r--r--Zend/zend_objects.c16
-rw-r--r--Zend/zend_opcode.c1
-rw-r--r--Zend/zend_operators.c115
-rw-r--r--Zend/zend_operators.h6
-rw-r--r--Zend/zend_portability.h15
-rw-r--r--Zend/zend_types.h24
-rw-r--r--Zend/zend_virtual_cwd.c8
-rw-r--r--Zend/zend_vm_def.h260
-rw-r--r--Zend/zend_vm_execute.h2507
-rw-r--r--Zend/zend_vm_gen.php36
-rw-r--r--ext/bz2/package.xml1
-rw-r--r--ext/ctype/package.xml1
-rw-r--r--ext/curl/interface.c2
-rw-r--r--ext/curl/package.xml3
-rw-r--r--ext/date/lib/timezonedb.h1559
-rw-r--r--ext/date/php_date.c82
-rw-r--r--ext/date/tests/014.phpt2
-rw-r--r--ext/date/tests/DateTimeZone_construct_error.phpt2
-rw-r--r--ext/date/tests/DateTimeZone_construct_variation1.phpt2
-rw-r--r--ext/date/tests/DateTime_construct_error.phpt2
-rw-r--r--ext/date/tests/DateTime_construct_variation1.phpt4
-rw-r--r--ext/date/tests/DateTime_construct_variation2.phpt2
-rw-r--r--ext/date/tests/bug55407.phpt2
-rw-r--r--ext/date/tests/timezone_offset_get_error.phpt18
-rw-r--r--ext/date/tests/timezone_offset_get_variation1.phpt2
-rw-r--r--ext/date/tests/timezone_offset_get_variation2.phpt2
-rw-r--r--ext/dom/dom_iterators.c10
-rw-r--r--ext/dom/tests/DOMAttr_construct_error_001.phpt2
-rw-r--r--ext/dom/tests/DOMCDATASection_construct_error_001.phpt2
-rw-r--r--ext/dom/tests/DOMComment_construct_error_001.phpt2
-rw-r--r--ext/dom/tests/DOMDocumentFragment_construct_error_001.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_saveHTML_error2.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_validate_error2.phpt2
-rw-r--r--ext/dom/tests/bug69846.phpt162
-rw-r--r--ext/dom/tests/dom003.phpt6
-rw-r--r--ext/dom/tests/dom_set_attr_node.phpt6
-rw-r--r--ext/dom/tests/regsiter_node_class.phpt2
-rw-r--r--ext/exif/package.xml1
-rw-r--r--ext/fileinfo/tests/bug61173.phpt2
-rw-r--r--ext/fileinfo/tests/finfo_open_error.phpt2
-rw-r--r--ext/ftp/package.xml1
-rw-r--r--ext/gd/gd.c5
-rw-r--r--ext/gd/php_gd.h10
-rw-r--r--ext/gd/tests/bug61221.phpt23
-rw-r--r--ext/gmp/gmp.c26
-rw-r--r--ext/gmp/tests/bug69803.phpt22
-rw-r--r--ext/gmp/tests/gmp_random_range.phpt4
-rw-r--r--ext/hash/hash.c15
-rw-r--r--ext/hash/tests/skip_mhash.inc2
-rw-r--r--ext/iconv/config.m44
-rw-r--r--ext/iconv/iconv.c16
-rw-r--r--ext/iconv/tests/bug69840.phpt20
-rw-r--r--ext/intl/breakiterator/breakiterator_iterators.cpp3
-rw-r--r--ext/intl/common/common_enum.cpp3
-rw-r--r--ext/intl/tests/badargs.phpt2
-rw-r--r--ext/intl/tests/breakiter___construct.phpt2
-rw-r--r--ext/intl/tests/breakiter___construct_error.phpt6
-rw-r--r--ext/intl/tests/calendar_add_error.phpt2
-rw-r--r--ext/intl/tests/calendar_before_after_error.phpt16
-rw-r--r--ext/intl/tests/calendar_clear_error.phpt2
-rw-r--r--ext/intl/tests/calendar_equals_error.phpt10
-rw-r--r--ext/intl/tests/calendar_fieldDifference_error.phpt2
-rw-r--r--ext/intl/tests/calendar_getDayOfWeekType_error.phpt2
-rw-r--r--ext/intl/tests/calendar_getErrorCode_error.phpt2
-rw-r--r--ext/intl/tests/calendar_getErrorMessage_error.phpt2
-rw-r--r--ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt2
-rw-r--r--ext/intl/tests/calendar_getLocale_error.phpt2
-rw-r--r--ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt2
-rw-r--r--ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt2
-rw-r--r--ext/intl/tests/calendar_getTimeZone_error.phpt2
-rw-r--r--ext/intl/tests/calendar_getTime_error.phpt2
-rw-r--r--ext/intl/tests/calendar_getType_error.phpt2
-rw-r--r--ext/intl/tests/calendar_getWeekendTransition_error.phpt2
-rw-r--r--ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt8
-rw-r--r--ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt24
-rw-r--r--ext/intl/tests/calendar_inDaylightTime_error.phpt2
-rw-r--r--ext/intl/tests/calendar_isEquivalentTo_error.phpt12
-rw-r--r--ext/intl/tests/calendar_isLenient_error.phpt2
-rw-r--r--ext/intl/tests/calendar_isSet_error.phpt2
-rw-r--r--ext/intl/tests/calendar_isWeekend_error.phpt2
-rw-r--r--ext/intl/tests/calendar_roll_error.phpt2
-rw-r--r--ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt2
-rw-r--r--ext/intl/tests/calendar_setLenient_error.phpt2
-rw-r--r--ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt2
-rw-r--r--ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt2
-rw-r--r--ext/intl/tests/calendar_setTimeZone_error.phpt8
-rw-r--r--ext/intl/tests/calendar_setTime_error.phpt2
-rw-r--r--ext/intl/tests/calendar_set_error.phpt2
-rw-r--r--ext/intl/tests/calendar_toDateTime_error.phpt2
-rw-r--r--ext/intl/tests/formatter_fail.phpt8
-rw-r--r--ext/intl/tests/gregoriancalendar___construct_error.phpt2
-rw-r--r--ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt2
-rw-r--r--ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt2
-rw-r--r--ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt2
-rw-r--r--ext/intl/tests/msgfmt_fail.phpt12
-rw-r--r--ext/intl/tests/msgfmt_fail2.phpt12
-rw-r--r--ext/intl/tests/timezone_getCanonicalID_error.phpt2
-rw-r--r--ext/intl/tests/timezone_getDSTSavings_error.phpt2
-rw-r--r--ext/intl/tests/timezone_getDisplayName_error.phpt2
-rw-r--r--ext/intl/tests/timezone_getErrorCode_error.phpt2
-rw-r--r--ext/intl/tests/timezone_getErrorMessage_error.phpt2
-rw-r--r--ext/intl/tests/timezone_getID_error.phpt2
-rw-r--r--ext/intl/tests/timezone_getOffset_error.phpt2
-rw-r--r--ext/intl/tests/timezone_getRawOffset_error.phpt2
-rw-r--r--ext/intl/tests/timezone_hasSameRules_error.phpt4
-rw-r--r--ext/intl/tests/timezone_toDateTimeZone_error.phpt2
-rw-r--r--ext/intl/tests/timezone_useDaylightTime_error.phpt2
-rw-r--r--ext/intl/tests/transliterator_create_inverse_error.phpt2
-rw-r--r--ext/intl/tests/transliterator_get_error_code_error.phpt2
-rw-r--r--ext/intl/tests/transliterator_get_error_message_error.phpt2
-rw-r--r--ext/intl/timezone/timezone_methods.cpp2
-rw-r--r--ext/json/json.c3
-rw-r--r--ext/json/json_parser.tab.c24
-rw-r--r--ext/json/json_parser.y18
-rw-r--r--ext/json/php_json.h1
-rw-r--r--ext/json/tests/bug68546.phpt25
-rw-r--r--ext/ldap/ldap.c72
-rw-r--r--ext/ldap/tests/bug48441.phpt20
-rw-r--r--ext/ldap/tests/connect.inc33
-rw-r--r--ext/ldap/tests/ldap_add_basic.phpt10
-rw-r--r--ext/ldap/tests/ldap_add_error.phpt28
-rw-r--r--ext/ldap/tests/ldap_compare_basic.phpt8
-rw-r--r--ext/ldap/tests/ldap_compare_error.phpt6
-rw-r--r--ext/ldap/tests/ldap_connect_error.phpt2
-rw-r--r--ext/ldap/tests/ldap_control_paged_results_variation1.phpt10
-rw-r--r--ext/ldap/tests/ldap_control_paged_results_variation2.phpt12
-rw-r--r--ext/ldap/tests/ldap_control_paged_results_variation3.phpt14
-rw-r--r--ext/ldap/tests/ldap_count_entries_basic.phpt6
-rw-r--r--ext/ldap/tests/ldap_delete_basic.phpt8
-rw-r--r--ext/ldap/tests/ldap_delete_error.phpt4
-rw-r--r--ext/ldap/tests/ldap_errno_basic.phpt2
-rw-r--r--ext/ldap/tests/ldap_error_basic.phpt2
-rw-r--r--ext/ldap/tests/ldap_first_attribute_basic.phpt6
-rw-r--r--ext/ldap/tests/ldap_first_entry_basic.phpt6
-rw-r--r--ext/ldap/tests/ldap_first_reference_basic.phpt14
-rw-r--r--ext/ldap/tests/ldap_free_result_basic.phpt6
-rw-r--r--ext/ldap/tests/ldap_get_attributes_basic.phpt31
-rw-r--r--ext/ldap/tests/ldap_get_dn_basic.phpt10
-rw-r--r--ext/ldap/tests/ldap_get_entries_basic.phpt33
-rw-r--r--ext/ldap/tests/ldap_get_entries_variation.phpt6
-rw-r--r--ext/ldap/tests/ldap_get_values_len_basic.phpt8
-rw-r--r--ext/ldap/tests/ldap_get_values_len_error.phpt6
-rw-r--r--ext/ldap/tests/ldap_list_basic.phpt10
-rw-r--r--ext/ldap/tests/ldap_list_error.phpt2
-rw-r--r--ext/ldap/tests/ldap_mod_add_basic.phpt37
-rw-r--r--ext/ldap/tests/ldap_mod_add_error.phpt14
-rw-r--r--ext/ldap/tests/ldap_mod_del_basic.phpt8
-rw-r--r--ext/ldap/tests/ldap_mod_del_error.phpt10
-rw-r--r--ext/ldap/tests/ldap_mod_replace_basic.phpt12
-rw-r--r--ext/ldap/tests/ldap_mod_replace_error.phpt10
-rw-r--r--ext/ldap/tests/ldap_modify_basic.phpt41
-rw-r--r--ext/ldap/tests/ldap_modify_batch_basic.phpt12
-rw-r--r--ext/ldap/tests/ldap_modify_batch_error.phpt14
-rw-r--r--ext/ldap/tests/ldap_modify_error.phpt14
-rw-r--r--ext/ldap/tests/ldap_next_attribute_basic.phpt8
-rw-r--r--ext/ldap/tests/ldap_next_attribute_error.phpt6
-rw-r--r--ext/ldap/tests/ldap_next_entry_basic.phpt6
-rw-r--r--ext/ldap/tests/ldap_next_reference_basic.phpt20
-rw-r--r--ext/ldap/tests/ldap_parse_reference_basic.phpt14
-rw-r--r--ext/ldap/tests/ldap_parse_result_basic.phpt18
-rw-r--r--ext/ldap/tests/ldap_read_basic.phpt35
-rw-r--r--ext/ldap/tests/ldap_read_error.phpt2
-rw-r--r--ext/ldap/tests/ldap_rename_basic.phpt16
-rw-r--r--ext/ldap/tests/ldap_rename_error.phpt2
-rw-r--r--ext/ldap/tests/ldap_search_basic.phpt12
-rw-r--r--ext/ldap/tests/ldap_search_error.phpt2
-rw-r--r--ext/ldap/tests/ldap_search_variation1.phpt16
-rw-r--r--ext/ldap/tests/ldap_search_variation2.phpt12
-rw-r--r--ext/ldap/tests/ldap_search_variation3.phpt14
-rw-r--r--ext/ldap/tests/ldap_search_variation4.phpt8
-rw-r--r--ext/ldap/tests/ldap_search_variation5.phpt12
-rw-r--r--ext/ldap/tests/ldap_search_variation6.phpt12
-rw-r--r--ext/ldap/tests/ldap_sort_basic.phpt32
-rw-r--r--ext/ldap/tests/ldap_sort_variation.phpt32
-rw-r--r--ext/mysqli/mysqli.c4
-rw-r--r--ext/mysqli/package.xml1
-rw-r--r--ext/mysqli/tests/bug33491.phpt2
-rw-r--r--ext/mysqli/tests/bug38003.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_driver_unclonable.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_fetch_object.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_fetch_object_oo.phpt6
-rw-r--r--ext/mysqli/tests/mysqli_result_unclonable.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_unclonable.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_unclonable.phpt2
-rw-r--r--ext/mysqlnd/mysqlnd_ps.c2
-rw-r--r--ext/oci8/oci8.c4
-rw-r--r--ext/oci8/oci8_interface.c8
-rw-r--r--ext/oci8/oci8_statement.c2
-rw-r--r--ext/oci8/package.xml1
-rw-r--r--ext/opcache/Optimizer/compact_literals.c33
-rw-r--r--ext/opcache/README5
-rw-r--r--ext/opcache/ZendAccelerator.c5
-rw-r--r--ext/opcache/ZendAccelerator.h1
-rw-r--r--ext/opcache/tests/bu69838.phpt17
-rw-r--r--ext/opcache/tests/optimize_func_calls.phpt2
-rw-r--r--ext/opcache/zend_accelerator_module.c2
-rw-r--r--ext/opcache/zend_accelerator_util_funcs.c21
-rw-r--r--ext/opcache/zend_persist.c2
-rw-r--r--ext/openssl/openssl.c2
-rw-r--r--ext/openssl/tests/003.phpt1
-rw-r--r--ext/pcre/pcrelib/pcre.h4
-rw-r--r--ext/pcre/php_pcre.c126
-rw-r--r--ext/pcre/tests/bug69864.phpt36
-rw-r--r--ext/pdo/tests/bug47769.phpt2
-rw-r--r--ext/pdo/tests/pdo_025.phpt2
-rw-r--r--ext/pdo/tests/pdo_037.phpt2
-rw-r--r--ext/pdo_mysql/tests/bug_37445.phpt2
-rw-r--r--ext/pdo_mysql/tests/pdo_mysql___construct.phpt2
-rw-r--r--ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt2
-rw-r--r--ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt2
-rw-r--r--ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt2
-rw-r--r--ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt2
-rw-r--r--ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt2
-rw-r--r--ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt2
-rw-r--r--ext/pdo_pgsql/pgsql_driver.c59
-rw-r--r--ext/pdo_pgsql/pgsql_statement.c12
-rw-r--r--ext/pdo_pgsql/tests/bug69344.phpt44
-rw-r--r--ext/pdo_pgsql/tests/bug69362.phpt63
-rw-r--r--ext/pdo_pgsql/tests/bug69752.phpt55
-rw-r--r--ext/pgsql/pgsql.c4
-rw-r--r--ext/phar/phar_object.c18
-rw-r--r--ext/phar/tests/badparameters.phpt2
-rw-r--r--ext/phar/tests/bug60261.phpt2
-rw-r--r--ext/phar/tests/cache_list/frontcontroller29.phpt2
-rw-r--r--ext/phar/tests/frontcontroller29.phpt2
-rw-r--r--ext/phar/tests/pharfileinfo_construct.phpt2
-rw-r--r--ext/reflection/php_reflection.c51
-rw-r--r--ext/reflection/tests/005.phpt1
-rw-r--r--ext/reflection/tests/009.phpt1
-rw-r--r--ext/reflection/tests/025.phpt1
-rw-r--r--ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt2
-rw-r--r--ext/reflection/tests/ReflectionClass_getDocComment_001.phpt1
-rw-r--r--ext/reflection/tests/ReflectionClass_getName_error1.phpt2
-rw-r--r--ext/reflection/tests/ReflectionClass_isCloneable_001.phpt2
-rw-r--r--ext/reflection/tests/ReflectionClass_isIterateable_001.phpt2
-rw-r--r--ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt2
-rw-r--r--ext/reflection/tests/ReflectionExtension_constructor_error.phpt6
-rw-r--r--ext/reflection/tests/ReflectionExtension_getClassNames_basic.phpt2
-rw-r--r--ext/reflection/tests/ReflectionFunction_construct.001.phpt8
-rw-r--r--ext/reflection/tests/ReflectionFunction_getDocComment.001.phpt1
-rw-r--r--ext/reflection/tests/ReflectionMethod_006.phpt4
-rw-r--r--ext/reflection/tests/ReflectionMethod_constructor_error2.phpt6
-rw-r--r--ext/reflection/tests/ReflectionMethod_getDocComment_basic.phpt1
-rw-r--r--ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt2
-rw-r--r--ext/reflection/tests/ReflectionObject_getName_error1.phpt2
-rw-r--r--ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt2
-rw-r--r--ext/reflection/tests/ReflectionProperty_basic2.phpt1
-rw-r--r--ext/reflection/tests/ReflectionProperty_error.phpt6
-rw-r--r--ext/reflection/tests/ReflectionProperty_getDocComment_basic.phpt1
-rw-r--r--ext/reflection/tests/bug36308.phpt1
-rw-r--r--ext/reflection/tests/bug64007.phpt2
-rw-r--r--ext/reflection/tests/bug64936.phpt1
-rw-r--r--ext/session/session.c3
-rw-r--r--ext/session/tests/bug60634_error_1.phpt2
-rw-r--r--ext/session/tests/bug60634_error_3.phpt2
-rw-r--r--ext/session/tests/bug60634_error_5.phpt2
-rw-r--r--ext/shmop/package.xml1
-rw-r--r--ext/shmop/package2.xml1
-rw-r--r--ext/simplexml/simplexml.c16
-rw-r--r--ext/simplexml/sxe.c11
-rw-r--r--ext/simplexml/tests/SimpleXMLElement_xpath_3.phpt2
-rw-r--r--ext/simplexml/tests/bug37565.phpt4
-rw-r--r--ext/snmp/tests/snmp-object-error.phpt6
-rw-r--r--ext/soap/package.xml1
-rw-r--r--ext/soap/php_encoding.c19
-rw-r--r--ext/soap/soap.c8
-rw-r--r--ext/sockets/conversions.c4
-rw-r--r--ext/sockets/package.xml1
-rw-r--r--ext/spl/spl_array.c10
-rw-r--r--ext/spl/spl_directory.c12
-rw-r--r--ext/spl/spl_heap.c8
-rw-r--r--ext/spl/spl_iterators.c25
-rw-r--r--ext/spl/spl_observer.c6
-rw-r--r--ext/spl/tests/CallbackFilterIteratorTest-002.phpt8
-rw-r--r--ext/spl/tests/RegexIterator_with_reference_replacement.phpt19
-rw-r--r--ext/spl/tests/SplFixedArray__construct_param_array.phpt2
-rw-r--r--ext/spl/tests/SplFixedArray__construct_param_string.phpt2
-rw-r--r--ext/spl/tests/SplFixedArray_construct_param_SplFixedArray.phpt2
-rw-r--r--ext/spl/tests/SplHeap_with_by_reference_compare.phpt16
-rw-r--r--ext/spl/tests/SplTempFileObject_constructor_error.phpt2
-rw-r--r--ext/spl/tests/arrayObject___construct_error1.phpt4
-rw-r--r--ext/spl/tests/arrayObject___construct_error2.phpt2
-rw-r--r--ext/spl/tests/arrayObject_setFlags_basic2.phpt2
-rw-r--r--ext/spl/tests/arrayObject_setIteratorClass_error1.phpt4
-rw-r--r--ext/spl/tests/bug48023.phpt2
-rw-r--r--ext/spl/tests/bug49972.phpt2
-rw-r--r--ext/spl/tests/bug54292.phpt2
-rw-r--r--ext/spl/tests/bug69737.phpt2
-rw-r--r--ext/spl/tests/bug69845.phpt13
-rw-r--r--ext/spl/tests/fixedarray_005.phpt6
-rw-r--r--ext/spl/tests/fixedarray_009.phpt2
-rw-r--r--ext/spl/tests/fixedarray_015.phpt2
-rw-r--r--ext/spl/tests/iterator_035.phpt2
-rw-r--r--ext/spl/tests/iterator_042.phpt2
-rw-r--r--ext/spl/tests/iterator_056.phpt12
-rw-r--r--ext/spl/tests/iterator_count.phpt2
-rw-r--r--ext/spl/tests/iterator_to_array.phpt2
-rw-r--r--ext/spl/tests/recursive_tree_iterator_003.phpt2
-rw-r--r--ext/spl/tests/spl_004.phpt2
-rw-r--r--ext/spl/tests/spl_iterator_iterator_constructor.phpt2
-rw-r--r--ext/spl/tests/spl_iterator_recursive_getiterator_error.phpt2
-rw-r--r--ext/sqlite3/sqlite3.c2
-rw-r--r--ext/sqlite3/tests/sqlite3_02_open.phpt2
-rw-r--r--ext/standard/array.c83
-rw-r--r--ext/standard/assert.c14
-rw-r--r--ext/standard/http.c12
-rw-r--r--ext/standard/info.c227
-rw-r--r--ext/standard/mail.c1
-rw-r--r--ext/standard/password.c19
-rw-r--r--ext/standard/streamsfuncs.c6
-rw-r--r--ext/standard/string.c55
-rw-r--r--ext/standard/tests/array/array_sum_on_reference.phpt15
-rw-r--r--ext/standard/tests/array/arsort_object1.phpt2
-rw-r--r--ext/standard/tests/array/arsort_object2.phpt2
-rw-r--r--ext/standard/tests/file/bug38450_3.phpt2
-rw-r--r--ext/standard/tests/general_functions/010.phpt2
-rw-r--r--ext/standard/tests/general_functions/bug47857.phpt2
-rw-r--r--ext/standard/tests/general_functions/bug69646.phpt47
-rw-r--r--ext/standard/tests/general_functions/type.phpt1
-rw-r--r--ext/standard/tests/serialize/bug69152.phpt2
-rw-r--r--ext/standard/tests/streams/bug62922.phpt12
-rw-r--r--ext/standard/tests/strings/substr.phptbin4770 -> 4782 bytes
-rw-r--r--ext/standard/type.c6
-rw-r--r--ext/standard/winver.h102
-rw-r--r--ext/sysvmsg/sysvmsg.c2
-rw-r--r--ext/tidy/tests/035.phpt2
-rw-r--r--ext/tokenizer/package.xml1
-rw-r--r--ext/tokenizer/tests/parse_errors.phpt2
-rw-r--r--ext/tokenizer/tests/token_get_all_TOKEN_PARSE_000.phpt2
-rw-r--r--ext/tokenizer/tokenizer.c5
-rw-r--r--ext/xmlreader/tests/bug51936.phpt2
-rw-r--r--ext/zip/php_zip.c6
-rw-r--r--ext/zlib/package.xml1
-rwxr-xr-xgenfiles11
-rw-r--r--main/fastcgi.c116
-rw-r--r--main/fastcgi.h104
-rw-r--r--main/win95nt.h4
-rw-r--r--pear/install-pear-nozlib.phar8328
-rw-r--r--php.ini-development64
-rw-r--r--php.ini-production64
-rw-r--r--sapi/cgi/cgi_main.c37
-rw-r--r--sapi/cgi/tests/004.phpt2
-rw-r--r--sapi/cli/tests/005.phpt20
-rw-r--r--sapi/cli/tests/008.phpt2
-rw-r--r--sapi/cli/tests/bug43177.phpt2
-rw-r--r--sapi/cli/tests/php_cli_server_015.phpt2
-rw-r--r--sapi/fpm/fpm/fpm_main.c27
-rw-r--r--sapi/litespeed/lsapi_main.c2
-rw-r--r--sapi/phpdbg/phpdbg.c158
-rw-r--r--sapi/phpdbg/phpdbg.h5
-rw-r--r--sapi/phpdbg/phpdbg_opcode.c10
-rw-r--r--sapi/phpdbg/phpdbg_opcode.h13
-rw-r--r--sapi/phpdbg/phpdbg_prompt.c2
-rw-r--r--tests/classes/abstract.phpt2
-rw-r--r--tests/classes/abstract_class.phpt2
-rw-r--r--tests/classes/abstract_inherit.phpt2
-rw-r--r--tests/classes/abstract_user_call.phpt2
-rw-r--r--tests/classes/array_access_012.phpt2
-rw-r--r--tests/classes/autoload_009.phpt2
-rw-r--r--tests/classes/autoload_021.phpt2
-rw-r--r--tests/classes/bug27504.phpt2
-rw-r--r--tests/classes/class_abstract.phpt2
-rw-r--r--tests/classes/constants_basic_001.phpt2
-rw-r--r--tests/classes/ctor_visibility.phpt2
-rw-r--r--tests/classes/destructor_visibility_001.phpt2
-rw-r--r--tests/classes/factory_and_singleton_003.phpt2
-rw-r--r--tests/classes/factory_and_singleton_004.phpt2
-rw-r--r--tests/classes/factory_and_singleton_005.phpt2
-rw-r--r--tests/classes/factory_and_singleton_006.phpt2
-rw-r--r--tests/classes/factory_and_singleton_007.phpt2
-rw-r--r--tests/classes/factory_and_singleton_008.phpt2
-rw-r--r--tests/classes/interface_instantiate.phpt2
-rw-r--r--tests/classes/interfaces_001.phpt4
-rw-r--r--tests/classes/interfaces_002.phpt6
-rw-r--r--tests/classes/interfaces_003.phpt2
-rw-r--r--tests/classes/private_001.phpt2
-rw-r--r--tests/classes/private_002.phpt2
-rw-r--r--tests/classes/private_003.phpt2
-rw-r--r--tests/classes/private_003b.phpt2
-rw-r--r--tests/classes/private_004.phpt2
-rw-r--r--tests/classes/private_004b.phpt2
-rw-r--r--tests/classes/private_005.phpt2
-rw-r--r--tests/classes/private_005b.phpt2
-rw-r--r--tests/classes/private_redeclare.phpt2
-rw-r--r--tests/classes/property_recreate_private.phpt2
-rw-r--r--tests/classes/property_recreate_protected.phpt2
-rw-r--r--tests/classes/protected_001.phpt2
-rw-r--r--tests/classes/protected_001b.phpt2
-rw-r--r--tests/classes/protected_002.phpt2
-rw-r--r--tests/classes/static_properties_003_error1.phpt2
-rw-r--r--tests/classes/static_properties_003_error2.phpt2
-rw-r--r--tests/classes/static_properties_003_error3.phpt2
-rw-r--r--tests/classes/static_properties_003_error4.phpt4
-rw-r--r--tests/classes/static_properties_undeclared_assign.phpt2
-rw-r--r--tests/classes/static_properties_undeclared_assignInc.phpt2
-rw-r--r--tests/classes/static_properties_undeclared_assignRef.phpt2
-rw-r--r--tests/classes/static_properties_undeclared_inc.phpt2
-rw-r--r--tests/classes/static_properties_undeclared_read.phpt2
-rw-r--r--tests/classes/tostring_004.phpt1
-rw-r--r--tests/classes/type_hinting_001.phpt2
-rw-r--r--tests/classes/type_hinting_002.phpt2
-rw-r--r--tests/classes/type_hinting_003.phpt2
-rw-r--r--tests/classes/type_hinting_004.phpt36
-rw-r--r--tests/lang/041.phpt2
-rw-r--r--tests/lang/042.phpt2
-rw-r--r--tests/lang/043.phpt2
-rw-r--r--tests/lang/044.phpt2
-rw-r--r--tests/lang/bug24658.phpt2
-rw-r--r--tests/lang/catchable_error_001.phpt2
-rw-r--r--tests/lang/catchable_error_002.phpt2
-rw-r--r--tests/lang/foreachLoopIterator.002.phpt2
-rw-r--r--tests/lang/type_hints_001.phpt2
-rw-r--r--win32/build/Makefile2
-rw-r--r--win32/install.txt144
689 files changed, 9348 insertions, 10268 deletions
diff --git a/.gdbinit b/.gdbinit
index 79dfd8f21b..7782138e95 100644
--- a/.gdbinit
+++ b/.gdbinit
@@ -181,7 +181,7 @@ define ____printzv_contents
printf "array: "
if ! $arg1
set $ind = $ind + 1
- ____print_ht &$zvalue->value.arr->ht 1
+ ____print_ht $zvalue->value.arr
set $ind = $ind - 1
set $i = $ind
while $i > 0
diff --git a/.gitignore b/.gitignore
index b191f2285d..5f267911a0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -188,6 +188,7 @@ ext/iconv/php_have_glibc_iconv.h
ext/iconv/php_php_iconv_impl.h
ext/iconv/php_have_iconv.h
ext/iconv/php_iconv_supports_errno.h
+ext/iconv/php_iconv_broken_ignore.h
ext/mbstring/libmbfl/Makefile.in
ext/mbstring/libmbfl/autoscan.log
ext/mbstring/libmbfl/config.sub
@@ -284,5 +285,3 @@ win32/*.positions
win32/ext
win32/phpts.def
win32/wsyslog.h
-win32/win32.dsp
-win32/php.dsw
diff --git a/EXTENSIONS b/EXTENSIONS
index 42479bac57..38a3b0789c 100644
--- a/EXTENSIONS
+++ b/EXTENSIONS
@@ -27,33 +27,11 @@ Status legend
== Server APIs ==
-------------------------------------------------------------------------------
-EXTENSION: aolserver
-MAINTENANCE: Unknown
-STATUS: Unknown
--------------------------------------------------------------------------------
-EXTENSION: apache
-PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: apache_hooks
-MAINTENANCE: Unknown
-STATUS: Unknown
--------------------------------------------------------------------------------
-EXTENSION: apache2filter
-PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>
-MAINTENANCE: Maintained
-STATUS: Experimental
--------------------------------------------------------------------------------
EXTENSION: apache2handler
PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>, Ilia Alshanetsky <iliaa@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
-EXTENSION: caudium
-MAINTENANCE: Unknown
-STATUS: Unknown
--------------------------------------------------------------------------------
EXTENSION: cgi
MAINTENANCE: Unknown
STATUS: Working
@@ -63,11 +41,6 @@ MAINTENANCE: Marcus Boerger <helly@php.net>, Edin Kadribasic <edink@php.
STATUS: Working
SINCE: 4.3.0
-------------------------------------------------------------------------------
-EXTENSION: continuity
-PRIMARY MAINTAINER: Alex Leigh <aleigh@php.net>
-MAINTENANCE: Unknown
-STATUS: Unknown
--------------------------------------------------------------------------------
EXTENSION: embed
PRIMARY MAINTAINER: Edin Kadribasic <edink@php.net>
MAINTENANCE: Maintained
@@ -79,50 +52,15 @@ MAINTENANCE: Maintained
STATUS: Working
SINCE: 5.3.3
-------------------------------------------------------------------------------
-EXTENSION: isapi
-MAINTENANCE: Unknown
-STATUS: Working
--------------------------------------------------------------------------------
EXTENSION: litespeed
PRIMARY MAINTAINER: George Wang <gwang@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 5.3
-------------------------------------------------------------------------------
-EXTENSION: milter
-MAINTENANCE: Unknown
-STATUS: Unknown
--------------------------------------------------------------------------------
-EXTENSION: nsapi
-PRIMARY MAINTAINER: Uwe Schindler <thetaphi@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: phttpd
-MAINTENANCE: Unknown
-STATUS: Unknown
--------------------------------------------------------------------------------
-EXTENSION: pi3web
-MAINTENANCE: Unknown
-STATUS: Unknown
--------------------------------------------------------------------------------
-EXTENSION: roxen
-MAINTENANCE: Unknown
-STATUS: Unknown
--------------------------------------------------------------------------------
-EXTENSION: thttpd
-PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
-MAINTENANCE: Odd fixes
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: tux
-MAINTENANCE: Unknown
-STATUS: Unknown
--------------------------------------------------------------------------------
-EXTENSION: webjames
-PRIMARY MAINTAINER: Alex Waugh <alex@alexwaugh.com>
-MAINTENANCE: Maintained
-STATUS: Experimental
+EXTENSION: phpdbg
+MAINTENANCE: Joe Watkins <krakjoe@php.net>, Bob Weinand <bwoebi@php.net>
+STATUS: 5.6
-------------------------------------------------------------------------------
@@ -140,17 +78,6 @@ PRIMARY MAINTAINER: Ard Biesheuvel <ard@ard.nu>
MAINTENANCE: Odd fixes
STATUS: Working
-------------------------------------------------------------------------------
-EXTENSION: mssql
-PRIMARY MAINTAINER: Frank M. Kromann <fmk@swwwing.com>
-MAINTENANCE: Maintained
-STATUS: Working
-COMMENT: Tested on phpts and isapi versions
--------------------------------------------------------------------------------
-EXTENSION: mysql
-PRIMARY MAINTAINER: Zak Greant <zak@mysql.com>, Georg Richter <georg@php.net>, Andrey Hristov <andrey@php.net>, Johannes Schlüter <johannes@php.net>, Ulf Wendel <uw@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
EXTENSION: mysqli
PRIMARY MAINTAINER: Georg Richter <georg@php.net>, Andrey Hristov <andrey@php.net>, Johannes Schlüter <johannes@php.net>, Ulf Wendel <uw@php.net>
MAINTENANCE: Maintained
@@ -235,11 +162,6 @@ STATUS: Working
SINCE: 5.3
COMMENT: Integrates SQLite 3 embeddable SQL database engine.
-------------------------------------------------------------------------------
-EXTENSION: sybase_ct
-PRIMARY MAINTAINER: Timm Friebe <thekid@thekid.de>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
== XML extensions ==
@@ -407,7 +329,7 @@ STATUS: Working
SINCE: 5.2
-------------------------------------------------------------------------------
EXTENSION: ldap
-PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>, Douglas Goldstein <cardoe@php.net>, Pierre-Alain Joye <pajoye@php.net>
+PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>, Douglas Goldstein <cardoe@php.net>, Pierre-Alain Joye <pajoye@php.net>, Côme Bernigaud <mcmic@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
diff --git a/UPGRADING b/UPGRADING
index 69265c8377..d1d3fd51cd 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -61,7 +61,7 @@ Changes to variable handling
$last = array_pop((getArray()));
// Strict Standards: Only variables should be passed by reference
- will now throw a strict standards error irregardless of whether parentheses
+ will now throw a strict standards error regardless of whether parentheses
are used. Previously no notice was generated in the second case.
* Array elements or object properties that are automatically created during
@@ -299,7 +299,7 @@ Changes to string handling
if (false === $int) {
throw new Exception("Invalid integer!");
}
- var_dump($num); // int(65535)
+ var_dump($int); // int(65535)
* Due to the addition of the Unicode Codepoint Escape Syntax for double-quoted
strings and heredocs, "\u{" followed by an invalid sequence will now result in
@@ -323,21 +323,21 @@ Relevant RFCs:
Changes to error handling
-------------------------
-* The new base class of the exception hierarchy is BaseException, from which
- Exception extends. Typehints in exception handling code may need to be changed
- to account for this.
+* There are now two exception classes: Exception and Error. Both classes
+ implement a new interface Throwable. Type hints in exception handling code
+ may need to be changed to account for this.
-* Some fatal errors and recoverable fatal errors now throw an EngineException
- instead. As EngineException extends BaseException but not Exception, these
- exceptions will not caught by existing try/catch blocks.
+* Some fatal errors and recoverable fatal errors now throw an Error instead.
+ As Error is a separate class from Exception, these exceptions will not be
+ caught by existing try/catch blocks.
For the recoverable fatal errors which have been converted into an exception,
it is no longer possible to silently ignore the error from an error handler.
- In particular, it is no longer possible to ignore typehint failures.
+ In particular, it is no longer possible to ignore type hint failures.
-* Parser errors now generate a ParseException (extends BaseException). Error
+* Parser errors now generate a ParseError that extends Error. Error
handling for eval()s on potentially invalid code should be changed to catch
- ParseException in addition to the previous return value / error_get_last()
+ ParseError in addition to the previous return value / error_get_last()
based handling.
* Constructors of internal classes will now always throw an exception on
@@ -347,6 +347,7 @@ Changes to error handling
Relevant RFCs:
* https://wiki.php.net/rfc/engine_exceptions_for_php7
+* https://wiki.php.net/rfc/throwable-interface
* https://wiki.php.net/rfc/internal_constructor_behaviour
* https://wiki.php.net/rfc/reclassify_e_strict
@@ -484,6 +485,10 @@ Other
. session.lazy_write(default=On) INI setting enables only write session data when
session data is updated.
+- Opcache
+ . Removed opcache.load_comments configuration directive. Now doc comments
+ loading costs nothing and always enabled.
+
- OpenSSL:
. Removed the "rsa_key_size" SSL context option in favor of automatically
setting the appropriate size given the negotiated crypto algorithm.
@@ -492,7 +497,7 @@ Other
- PCRE:
. Removed support for /e (PREG_REPLACE_EVAL) modifier. Use
- preg_reaplace_callback() instead.
+ preg_replace_callback() instead.
- PDO_pgsql:
. Removed PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT attribute in favor of
@@ -536,6 +541,20 @@ Other
(RFC: https://wiki.php.net/rfc/generator-delegation)
. Reserved keywords can now be used in various new contexts.
(RFC: https://wiki.php.net/rfc/context_sensitive_lexer)
+ . Added support for scalar type declatarations and strict mode using
+ declare(strict_types=1) (RFC: https://wiki.php.net/rfc/scalar_type_hints_v5)
+ . Added support for cryptographically secure user land RNG
+ (RFC: https://wiki.php.net/rfc/easy_userland_csprng)
+
+- Opcache
+ . Added second level file based opcode cache (experimental - disabled by
+ default). To enable it, PHP should be configured and built with
+ --enable-opcache-file, then opcache.file_cache=<DIR> configuration directive
+ should be set in php.ini. The second level cache may improve performance
+ at server restart or SHM reset. In addition, it's possibe to use file cache
+ without SHM at all, using opcache.file_cache_only=1 (this may be useful for
+ sharing hosting), and disable file cache consistency check, to speedup
+ loading in cost of safety, using opcache.file_cache_consistency_checks=0.
- OpenSSL
. Added "alpn_protocols" SSL context option allowing encrypted client/server
@@ -634,8 +653,14 @@ Other
- sapi/tux
- sapi/webjames
- ext/mssql
+- ext/mysql
- ext/sybase_ct
-For more details see https://wiki.php.net/rfc/removal_of_dead_sapis_and_exts
+- ext/ereg
+
+For more details see
+
+https://wiki.php.net/rfc/removal_of_dead_sapis_and_exts
+https://wiki.php.net/rfc/remove_deprecated_functionality_in_php7
NOTE NSAPI was not voted in the RFC, however it was removed afterwards. It turned
out, that the corresponding SDK isn't available anymore.
@@ -644,6 +669,9 @@ out, that the corresponding SDK isn't available anymore.
9. Other Changes to Extensions
========================================
+- Mhash
+ Mhash is not an extension anymore, use function_exists("mhash") to check whether
+ it is avaliable.
========================================
10. New Global Constants
diff --git a/Zend/tests/028.phpt b/Zend/tests/028.phpt
index 7152c99195..24dafffc68 100644
--- a/Zend/tests/028.phpt
+++ b/Zend/tests/028.phpt
@@ -20,7 +20,7 @@ bool(true)
Notice: Undefined offset: 2 in %s on line %d
-Fatal error: Uncaught EngineException: Function name must be a string in %s:%d
+Fatal error: Uncaught Error: Function name must be a string in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/030.phpt b/Zend/tests/030.phpt
index cff21d4935..8afcb66bd8 100644
--- a/Zend/tests/030.phpt
+++ b/Zend/tests/030.phpt
@@ -34,7 +34,7 @@ $test->bar();
object(Exception)#%d (7) {
["message":protected]=>
string(3) "foo"
- ["string":"BaseException":private]=>
+ ["string":"Exception":private]=>
string(0) ""
["code":protected]=>
int(0)
@@ -42,7 +42,7 @@ object(Exception)#%d (7) {
string(%d) "%s030.php"
["line":protected]=>
int(%d)
- ["trace":"BaseException":private]=>
+ ["trace":"Exception":private]=>
array(1) {
[0]=>
array(6) {
@@ -61,7 +61,7 @@ object(Exception)#%d (7) {
}
}
}
- ["previous":"BaseException":private]=>
+ ["previous":"Exception":private]=>
NULL
}
'test' => '0'
diff --git a/Zend/tests/037.phpt b/Zend/tests/037.phpt
index 12ae69b8c6..ef70310e6d 100644
--- a/Zend/tests/037.phpt
+++ b/Zend/tests/037.phpt
@@ -16,7 +16,7 @@ var_dump($x::$x);
--EXPECTF--
int(1)
-Fatal error: Uncaught EngineException: Access to undeclared static property: Closure::$x in %s:%d
+Fatal error: Uncaught Error: Access to undeclared static property: Closure::$x in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/access_modifiers_010.phpt b/Zend/tests/access_modifiers_010.phpt
index fe774fefbc..342ef522af 100644
--- a/Zend/tests/access_modifiers_010.phpt
+++ b/Zend/tests/access_modifiers_010.phpt
@@ -28,7 +28,7 @@ new c;
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to private method d::test2() from context 'a' in %s:%d
+Fatal error: Uncaught Error: Call to private method d::test2() from context 'a' in %s:%d
Stack trace:
#0 %s(%d): a->test()
#1 %s(%d): c->__construct()
diff --git a/Zend/tests/add_002.phpt b/Zend/tests/add_002.phpt
index 8868fca2e2..4d804fe3e8 100644
--- a/Zend/tests/add_002.phpt
+++ b/Zend/tests/add_002.phpt
@@ -10,7 +10,7 @@ $o->prop = "value";
try {
var_dump($a + $o);
-} catch (EngineException $e) {
+} catch (Error $e) {
echo "\nException: " . $e->getMessage() . "\n";
}
@@ -26,7 +26,7 @@ Exception: Unsupported operand types
Notice: Object of class stdClass could not be converted to int in %s on line %d
-Fatal error: Uncaught EngineException: Unsupported operand types in %s:%d
+Fatal error: Uncaught Error: Unsupported operand types in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/add_003.phpt b/Zend/tests/add_003.phpt
index 7a9391038c..a3705479e2 100644
--- a/Zend/tests/add_003.phpt
+++ b/Zend/tests/add_003.phpt
@@ -10,7 +10,7 @@ $o->prop = "value";
try {
var_dump($o + $a);
-} catch (EngineException $e) {
+} catch (Error $e) {
echo "\nException: " . $e->getMessage() . "\n";
}
@@ -26,7 +26,7 @@ Exception: Unsupported operand types
Notice: Object of class stdClass could not be converted to int in %s on line %d
-Fatal error: Uncaught EngineException: Unsupported operand types in %s:%d
+Fatal error: Uncaught Error: Unsupported operand types in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/add_004.phpt b/Zend/tests/add_004.phpt
index cf19f2fc1d..026d2494dc 100644
--- a/Zend/tests/add_004.phpt
+++ b/Zend/tests/add_004.phpt
@@ -7,7 +7,7 @@ $a = array(1,2,3);
try {
var_dump($a + 5);
-} catch (EngineException $e) {
+} catch (Error $e) {
echo "\nException: " . $e->getMessage() . "\n";
}
@@ -19,7 +19,7 @@ echo "Done\n";
--EXPECTF--
Exception: Unsupported operand types
-Fatal error: Uncaught EngineException: Unsupported operand types in %s:%d
+Fatal error: Uncaught Error: Unsupported operand types in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/add_007.phpt b/Zend/tests/add_007.phpt
index 2616196c90..66f5405706 100644
--- a/Zend/tests/add_007.phpt
+++ b/Zend/tests/add_007.phpt
@@ -9,7 +9,7 @@ $s1 = "some string";
try {
var_dump($a + $s1);
-} catch (EngineException $e) {
+} catch (Error $e) {
echo "\nException: " . $e->getMessage() . "\n";
}
@@ -21,7 +21,7 @@ echo "Done\n";
--EXPECTF--
Exception: Unsupported operand types
-Fatal error: Uncaught EngineException: Unsupported operand types in %s:%d
+Fatal error: Uncaught Error: Unsupported operand types in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/anon/006.phpt b/Zend/tests/anon/006.phpt
index e5dc1226d8..2b8888c497 100644
--- a/Zend/tests/anon/006.phpt
+++ b/Zend/tests/anon/006.phpt
@@ -10,6 +10,6 @@ namespace {
var_dump ($hello);
}
--EXPECTF--
-object(lone\class@%s)#1 (0) {
+object(class@%s)#1 (0) {
}
diff --git a/Zend/tests/anon/007.phpt b/Zend/tests/anon/007.phpt
index 12f4da6653..59d2441760 100644
--- a/Zend/tests/anon/007.phpt
+++ b/Zend/tests/anon/007.phpt
@@ -18,6 +18,6 @@ namespace lone {
new Outer();
}
--EXPECTF--
-object(lone\class@%s)#2 (0) {
+object(class@%s)#2 (0) {
}
diff --git a/Zend/tests/arg_unpack/string_keys.phpt b/Zend/tests/arg_unpack/string_keys.phpt
index 51db52e146..e448a417f6 100644
--- a/Zend/tests/arg_unpack/string_keys.phpt
+++ b/Zend/tests/arg_unpack/string_keys.phpt
@@ -9,12 +9,12 @@ set_error_handler(function($errno, $errstr) {
try {
var_dump(...[1, 2, "foo" => 3, 4]);
-} catch (EngineException $ex) {
+} catch (Error $ex) {
var_dump($ex->getMessage());
}
try {
var_dump(...new ArrayIterator([1, 2, "foo" => 3, 4]));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
var_dump($ex->getMessage());
}
diff --git a/Zend/tests/array_offset.phpt b/Zend/tests/array_offset.phpt
new file mode 100644
index 0000000000..76c25f9298
--- /dev/null
+++ b/Zend/tests/array_offset.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Ensure "undefined offset" notice formats message corectly when undefined key is negative
+--FILE--
+<?php
+
+[][-1];
+[][-1.1];
+(new ArrayObject)[-1];
+(new ArrayObject)[-1.1];
+
+echo "Done\n";
+?>
+--EXPECTF--
+Notice: Undefined offset: -1 in %s on line 3
+
+Notice: Undefined offset: -1 in %s on line 4
+
+Notice: Undefined offset: -1 in %s on line 5
+
+Notice: Undefined offset: -1 in %s on line 6
+Done
diff --git a/Zend/tests/array_type_hint_001.phpt b/Zend/tests/array_type_hint_001.phpt
index bad724679a..2b473c56b4 100644
--- a/Zend/tests/array_type_hint_001.phpt
+++ b/Zend/tests/array_type_hint_001.phpt
@@ -12,7 +12,7 @@ foo(123);
--EXPECTF--
3
-Fatal error: Uncaught TypeException: Argument 1 passed to foo() must be of the type array, integer given, called in %sarray_type_hint_001.php on line 7 and defined in %sarray_type_hint_001.php:2
+Fatal error: Uncaught TypeError: Argument 1 passed to foo() must be of the type array, integer given, called in %sarray_type_hint_001.php on line 7 and defined in %sarray_type_hint_001.php:2
Stack trace:
#0 %s(%d): foo(123)
#1 {main}
diff --git a/Zend/tests/assert/expect_002.phpt b/Zend/tests/assert/expect_002.phpt
index f3062b7997..3da88e6ece 100644
--- a/Zend/tests/assert/expect_002.phpt
+++ b/Zend/tests/assert/expect_002.phpt
@@ -9,7 +9,7 @@ assert(false);
var_dump(true);
?>
--EXPECTF--
-Fatal error: Uncaught AssertionException: assert(false) in %sexpect_002.php:%d
+Fatal error: Uncaught AssertionError: assert(false) in %sexpect_002.php:%d
Stack trace:
#0 %sexpect_002.php(%d): assert(false, 'assert(false)')
#1 {main}
diff --git a/Zend/tests/assert/expect_003.phpt b/Zend/tests/assert/expect_003.phpt
index 9a35f36cdf..350fca6e57 100644
--- a/Zend/tests/assert/expect_003.phpt
+++ b/Zend/tests/assert/expect_003.phpt
@@ -7,7 +7,7 @@ assert.exception=1
<?php
try {
assert(false);
-} catch (AssertionException $ex) {
+} catch (AssertionError $ex) {
var_dump($ex->getMessage());
}
?>
diff --git a/Zend/tests/assert/expect_004.phpt b/Zend/tests/assert/expect_004.phpt
index 8b1e648ac7..111e37295f 100644
--- a/Zend/tests/assert/expect_004.phpt
+++ b/Zend/tests/assert/expect_004.phpt
@@ -7,7 +7,7 @@ assert.exception=1
<?php
try {
assert(false, "I require this to succeed");
-} catch (AssertionException $ex) {
+} catch (AssertionError $ex) {
var_dump($ex->getMessage());
}
?>
diff --git a/Zend/tests/assert/expect_005.phpt b/Zend/tests/assert/expect_005.phpt
index 0a296d66b1..f2c91f2566 100644
--- a/Zend/tests/assert/expect_005.phpt
+++ b/Zend/tests/assert/expect_005.phpt
@@ -8,7 +8,7 @@ assert.exception=1
try {
/* by passing we test there are no leaks upon success */
assert(true, "I require this to succeed");
-} catch (AssertionException $ex) {
+} catch (AssertionError $ex) {
var_dump($ex->getMessage());
}
var_dump(true);
diff --git a/Zend/tests/assert/expect_007.phpt b/Zend/tests/assert/expect_007.phpt
index feed56e84f..d74425833d 100644
--- a/Zend/tests/assert/expect_007.phpt
+++ b/Zend/tests/assert/expect_007.phpt
@@ -11,12 +11,12 @@ $data = array(
"value" => "testing"
);
-class HeaderMalfunctionException extends AssertionException {}
+class HeaderMalfunctionError extends AssertionError {}
-assert (preg_match("~^([a-zA-Z0-9-]+)$~", $data["key"]), new HeaderMalfunctionException("malformed key found at {$next} \"{$data["key"]}\""));
+assert (preg_match("~^([a-zA-Z0-9-]+)$~", $data["key"]), new HeaderMalfunctionError("malformed key found at {$next} \"{$data["key"]}\""));
?>
--EXPECTF--
-Fatal error: Uncaught HeaderMalfunctionException: malformed key found at 1 "X-HTTP " in %sexpect_007.php:10
+Fatal error: Uncaught HeaderMalfunctionError: malformed key found at 1 "X-HTTP " in %sexpect_007.php:10
Stack trace:
#0 {main}
thrown in %sexpect_007.php on line 10
diff --git a/Zend/tests/assert/expect_008.phpt b/Zend/tests/assert/expect_008.phpt
index 64e524c352..10c56e5736 100644
--- a/Zend/tests/assert/expect_008.phpt
+++ b/Zend/tests/assert/expect_008.phpt
@@ -12,7 +12,7 @@ class One {
}
class Two extends One {}
-class OdEar extends AssertionException {}
+class OdEar extends AssertionError {}
function blah(){ return 1; }
diff --git a/Zend/tests/assert/expect_009.phpt b/Zend/tests/assert/expect_009.phpt
index a41cba44f4..984a9bf29e 100644
--- a/Zend/tests/assert/expect_009.phpt
+++ b/Zend/tests/assert/expect_009.phpt
@@ -17,7 +17,7 @@ class Two extends One {
new Two();
?>
--EXPECTF--
-Fatal error: Uncaught AssertionException: assert(false) in %sexpect_009.php:%d
+Fatal error: Uncaught AssertionError: assert(false) in %sexpect_009.php:%d
Stack trace:
#0 %sexpect_009.php(%d): assert(false, 'assert(false)')
#1 %sexpect_009.php(%d): Two->__construct()
diff --git a/Zend/tests/assert/expect_010.phpt b/Zend/tests/assert/expect_010.phpt
index 8301d40f72..c3665212fc 100644
--- a/Zend/tests/assert/expect_010.phpt
+++ b/Zend/tests/assert/expect_010.phpt
@@ -15,7 +15,7 @@ class Two extends One {}
new Two();
?>
--EXPECTF--
-Fatal error: Uncaught AssertionException: assert(false) in %sexpect_010.php:%d
+Fatal error: Uncaught AssertionError: assert(false) in %sexpect_010.php:%d
Stack trace:
#0 %sexpect_010.php(%d): assert(false, 'assert(false)')
#1 %sexpect_010.php(%d): One->__construct()
diff --git a/Zend/tests/assert/expect_011.phpt b/Zend/tests/assert/expect_011.phpt
index a48aa9f95f..e68852e69f 100644
--- a/Zend/tests/assert/expect_011.phpt
+++ b/Zend/tests/assert/expect_011.phpt
@@ -5,7 +5,7 @@ zend.assertions=1
assert.exception=1
--FILE--
<?php
-class MyExpectations extends AssertionException {
+class MyExpectations extends AssertionError {
public function __toString() {
return sprintf(
"[Message]: %s", __CLASS__);
@@ -22,7 +22,7 @@ class Two extends One {}
new Two();
?>
--EXPECTF--
-Fatal error: Uncaught AssertionException: [Message]: MyExpectations in %sexpect_011.php:%d
+Fatal error: Uncaught AssertionError: [Message]: MyExpectations in %sexpect_011.php:%d
Stack trace:
#0 %sexpect_011.php(%d): assert(false, '[Message]: MyEx...')
#1 %sexpect_011.php(%d): One->__construct()
diff --git a/Zend/tests/assert/expect_015.phpt b/Zend/tests/assert/expect_015.phpt
index 80f1bd8aa8..030913f7f9 100644
--- a/Zend/tests/assert/expect_015.phpt
+++ b/Zend/tests/assert/expect_015.phpt
@@ -144,12 +144,6 @@ assert(0 && ($a = function () {
?>
--EXPECTF--
-Warning: Unsupported declare 'A' in %sexpect_015.php on line %d
-
-Warning: Unsupported declare 'B' in %sexpect_015.php on line %d
-
-Warning: Unsupported declare 'C' in %sexpect_015.php on line %d
-
Warning: assert(): assert(0 && ($a = function () {
global $a;
global $$b;
diff --git a/Zend/tests/bug24773.phpt b/Zend/tests/bug24773.phpt
index d2b1db3985..4116492807 100644
--- a/Zend/tests/bug24773.phpt
+++ b/Zend/tests/bug24773.phpt
@@ -6,7 +6,7 @@ Bug #24773 (unset() of integers treated as arrays causes a crash)
unset($array["lvl1"]["lvl2"]["b"]);
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot use string offset as an array in %s:%d
+Fatal error: Uncaught Error: Cannot use string offset as an array in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/bug26166.phpt b/Zend/tests/bug26166.phpt
index 60624ed98e..9e31efa442 100644
--- a/Zend/tests/bug26166.phpt
+++ b/Zend/tests/bug26166.phpt
@@ -37,25 +37,25 @@ function my_error_handler($errno, $errstr, $errfile, $errline) {
set_error_handler('my_error_handler');
-class None
+class NoneTest
{
function __toString() {
}
}
-$o = new None;
+$o = new NoneTest;
echo $o;
echo "===THROW===\n";
-class Error
+class ErrorTest
{
function __toString() {
throw new Exception("This is an error!");
}
}
-$o = new Error;
+$o = new ErrorTest;
try {
echo $o;
}
@@ -68,7 +68,7 @@ catch (Exception $e) {
--EXPECTF--
Hello World!
===NONE===
-string(52) "Method None::__toString() must return a string value"
+string(56) "Method NoneTest::__toString() must return a string value"
===THROW===
-Fatal error: Method Error::__toString() must not throw an exception in %sbug26166.php on line %d
+Fatal error: Method ErrorTest::__toString() must not throw an exception in %sbug26166.php on line %d
diff --git a/Zend/tests/bug29015.phpt b/Zend/tests/bug29015.phpt
index 2b116383ff..a36ed923f3 100644
--- a/Zend/tests/bug29015.phpt
+++ b/Zend/tests/bug29015.phpt
@@ -8,7 +8,7 @@ $a->$x = "string('')";
var_dump($a);
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot access empty property in %sbug29015.php:4
+Fatal error: Uncaught Error: Cannot access empty property in %sbug29015.php:4
Stack trace:
#0 {main}
thrown in %sbug29015.php on line 4
diff --git a/Zend/tests/bug29674.phpt b/Zend/tests/bug29674.phpt
index 7aa7ba1ffc..39bc302463 100644
--- a/Zend/tests/bug29674.phpt
+++ b/Zend/tests/bug29674.phpt
@@ -38,7 +38,7 @@ NULL
===CHILD===
string(4) "Base"
-Fatal error: Uncaught EngineException: Cannot access private property ChildClass::$private_child in %sbug29674.php:%d
+Fatal error: Uncaught Error: Cannot access private property ChildClass::$private_child in %sbug29674.php:%d
Stack trace:
#0 %s(%d): BaseClass->printVars()
#1 {main}
diff --git a/Zend/tests/bug31102.phpt b/Zend/tests/bug31102.phpt
index 9937d2ad02..5de01f7282 100644
--- a/Zend/tests/bug31102.phpt
+++ b/Zend/tests/bug31102.phpt
@@ -45,7 +45,7 @@ __autoload(Test2,2)
Caught: __autoload
__autoload(Test3,3)
-Fatal error: Uncaught EngineException: Class 'Test3' not found in %sbug31102.php(%d) : eval()'d code:1
+Fatal error: Uncaught Error: Class 'Test3' not found in %sbug31102.php(%d) : eval()'d code:1
Stack trace:
#0 %s(%d): eval()
#1 {main}
diff --git a/Zend/tests/bug32660.phpt b/Zend/tests/bug32660.phpt
index e241eed44b..8651d491f8 100644
--- a/Zend/tests/bug32660.phpt
+++ b/Zend/tests/bug32660.phpt
@@ -36,7 +36,7 @@ A Object
Notice: Indirect modification of overloaded property A::$whatever has no effect in %sbug32660.php on line 23
-Fatal error: Uncaught EngineException: Cannot assign by reference to overloaded object in %sbug32660.php:23
+Fatal error: Uncaught Error: Cannot assign by reference to overloaded object in %sbug32660.php:23
Stack trace:
#0 {main}
thrown in %sbug32660.php on line 23
diff --git a/Zend/tests/bug33318.phpt b/Zend/tests/bug33318.phpt
index 24752cdccf..74ac9552bc 100644
--- a/Zend/tests/bug33318.phpt
+++ b/Zend/tests/bug33318.phpt
@@ -5,7 +5,7 @@ Bug #33318 (throw 1; results in Invalid opcode 108/1/8)
throw 1;
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Can only throw objects in %sbug33318.php:2
+Fatal error: Uncaught Error: Can only throw objects in %sbug33318.php:2
Stack trace:
#0 {main}
thrown in %sbug33318.php on line 2 \ No newline at end of file
diff --git a/Zend/tests/bug33996.phpt b/Zend/tests/bug33996.phpt
index 66ea0822a2..c399ee9975 100644
--- a/Zend/tests/bug33996.phpt
+++ b/Zend/tests/bug33996.phpt
@@ -26,7 +26,7 @@ FooTest(new Foo());
--EXPECTF--
Warning: Missing argument 1 for NormalTest(), called in %sbug33996.php on line %d and defined in %sbug33996.php on line %d
Hi!
-Fatal error: Uncaught TypeException: Argument 1 passed to FooTest() must be an instance of Foo, none given, called in %sbug33996.php on line %d and defined in %sbug33996.php:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to FooTest() must be an instance of Foo, none given, called in %sbug33996.php on line %d and defined in %sbug33996.php:%d
Stack trace:
#0 %s(%d): FooTest()
#1 {main}
diff --git a/Zend/tests/bug34064.phpt b/Zend/tests/bug34064.phpt
index 46bbaf8751..1b61f34775 100644
--- a/Zend/tests/bug34064.phpt
+++ b/Zend/tests/bug34064.phpt
@@ -31,7 +31,7 @@ array(1) {
string(2) "ok"
}
-Fatal error: Uncaught EngineException: Cannot use [] for reading in %sbug34064.php:18
+Fatal error: Uncaught Error: Cannot use [] for reading in %sbug34064.php:18
Stack trace:
#0 %s(%d): XmlTest->run()
#1 {main}
diff --git a/Zend/tests/bug36071.phpt b/Zend/tests/bug36071.phpt
index 08a0ddd94b..31179ea3f9 100644
--- a/Zend/tests/bug36071.phpt
+++ b/Zend/tests/bug36071.phpt
@@ -8,7 +8,7 @@ $a = clone 0;
$a[0]->b = 0;
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: __clone method called on non-object in %sbug36071.php:2
+Fatal error: Uncaught Error: __clone method called on non-object in %sbug36071.php:2
Stack trace:
#0 {main}
thrown in %sbug36071.php on line 2 \ No newline at end of file
diff --git a/Zend/tests/bug36268.phpt b/Zend/tests/bug36268.phpt
index 42f4b5076f..8c93186c73 100644
--- a/Zend/tests/bug36268.phpt
+++ b/Zend/tests/bug36268.phpt
@@ -11,7 +11,7 @@ $x = new Foo();
bar();
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to undefined function bar() in %sbug36268.php:8
+Fatal error: Uncaught Error: Call to undefined function bar() in %sbug36268.php:8
Stack trace:
#0 {main}
thrown in %sbug36268.php on line 8
diff --git a/Zend/tests/bug37251.phpt b/Zend/tests/bug37251.phpt
index 2b545a530f..12d1e3d974 100644
--- a/Zend/tests/bug37251.phpt
+++ b/Zend/tests/bug37251.phpt
@@ -10,7 +10,7 @@ class Foo {
try {
$foo = new Foo();
$foo->bar();
-} catch (EngineException $e) {
+} catch (Error $e) {
echo 'OK';
}
--EXPECT--
diff --git a/Zend/tests/bug37632.phpt b/Zend/tests/bug37632.phpt
index d97aba0f4c..a5a782508c 100644
--- a/Zend/tests/bug37632.phpt
+++ b/Zend/tests/bug37632.phpt
@@ -132,7 +132,7 @@ B2::doTest
C2::test
B4::doTest
-Fatal error: Uncaught EngineException: Call to protected C4::__construct() from context 'B4' in %sbug37632.php:%d
+Fatal error: Uncaught Error: Call to protected C4::__construct() from context 'B4' in %sbug37632.php:%d
Stack trace:
#0 %s(%d): B4::doTest()
#1 {main}
diff --git a/Zend/tests/bug39003.phpt b/Zend/tests/bug39003.phpt
index 87cce6fb35..add14512c8 100644
--- a/Zend/tests/bug39003.phpt
+++ b/Zend/tests/bug39003.phpt
@@ -21,7 +21,7 @@ test($obj);
echo "Done\n";
?>
--EXPECTF--
-Fatal error: Uncaught TypeException: Argument 1 passed to test() must be an instance of OtherClassName, instance of ClassName given, called in %s on line %d and defined in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to test() must be an instance of OtherClassName, instance of ClassName given, called in %s on line %d and defined in %s:%d
Stack trace:
#0 %s(%d): test(Object(ClassName))
#1 {main}
diff --git a/Zend/tests/bug40621.phpt b/Zend/tests/bug40621.phpt
index ef1e6c9383..5ed16bd173 100644
--- a/Zend/tests/bug40621.phpt
+++ b/Zend/tests/bug40621.phpt
@@ -17,7 +17,7 @@ echo "Done\n";
--EXPECTF--
Deprecated: Non-static method Foo::get() should not be called statically in %s on line %d
-Fatal error: Uncaught EngineException: Non-static method Foo::__construct() cannot be called statically in %s:%d
+Fatal error: Uncaught Error: Non-static method Foo::__construct() cannot be called statically in %s:%d
Stack trace:
#0 %s(%d): Foo::get()
#1 {main}
diff --git a/Zend/tests/bug41633_2.phpt b/Zend/tests/bug41633_2.phpt
index 2df51af924..df6705645f 100644
--- a/Zend/tests/bug41633_2.phpt
+++ b/Zend/tests/bug41633_2.phpt
@@ -8,7 +8,7 @@ class Foo {
echo Foo::A."\n";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Undefined class constant 'self::B' in %sbug41633_2.php:5
+Fatal error: Uncaught Error: Undefined class constant 'self::B' in %sbug41633_2.php:5
Stack trace:
#0 {main}
thrown in %sbug41633_2.php on line 5
diff --git a/Zend/tests/bug41633_3.phpt b/Zend/tests/bug41633_3.phpt
index beb32e8b8e..dd4b75c9d9 100644
--- a/Zend/tests/bug41633_3.phpt
+++ b/Zend/tests/bug41633_3.phpt
@@ -9,7 +9,7 @@ class Foo {
echo Foo::A;
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot declare self-referencing constant 'Foo::B' in %sbug41633_3.php:%d
+Fatal error: Uncaught Error: Cannot declare self-referencing constant 'Foo::B' in %sbug41633_3.php:%d
Stack trace:
#0 {main}
thrown in %sbug41633_3.php on line %d
diff --git a/Zend/tests/bug41813.phpt b/Zend/tests/bug41813.phpt
index 4a38e062e2..0bb693075a 100644
--- a/Zend/tests/bug41813.phpt
+++ b/Zend/tests/bug41813.phpt
@@ -9,7 +9,7 @@ $foo[0]->bar = "xyz";
echo "Done\n";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot use string offset as an array in %s:%d
+Fatal error: Uncaught Error: Cannot use string offset as an array in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/bug41919.phpt b/Zend/tests/bug41919.phpt
index cb6a87e83c..2af13acdc9 100644
--- a/Zend/tests/bug41919.phpt
+++ b/Zend/tests/bug41919.phpt
@@ -8,7 +8,7 @@ $foo[3]->bar[1] = "bang";
echo "ok\n";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot use string offset as an object in %sbug41919.php:%d
+Fatal error: Uncaught Error: Cannot use string offset as an object in %sbug41919.php:%d
Stack trace:
#0 {main}
thrown in %sbug41919.php on line %d
diff --git a/Zend/tests/bug42802.phpt b/Zend/tests/bug42802.phpt
index 9b7482f727..3b00408e01 100644
--- a/Zend/tests/bug42802.phpt
+++ b/Zend/tests/bug42802.phpt
@@ -37,7 +37,7 @@ ok
ok
ok
-Fatal error: Uncaught TypeException: Argument 1 passed to foo\test5() must be an instance of bar, instance of foo\bar given, called in %sbug42802.php on line %d and defined in %sbug42802.php:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to foo\test5() must be an instance of bar, instance of foo\bar given, called in %sbug42802.php on line %d and defined in %sbug42802.php:%d
Stack trace:
#0 %s(%d): foo\test5(Object(foo\bar))
#1 {main}
diff --git a/Zend/tests/bug42817.phpt b/Zend/tests/bug42817.phpt
index 0c2c531169..a681d861d0 100644
--- a/Zend/tests/bug42817.phpt
+++ b/Zend/tests/bug42817.phpt
@@ -6,7 +6,7 @@ $a = clone(null);
array_push($a->b, $c);
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: __clone method called on non-object in %sbug42817.php:2
+Fatal error: Uncaught Error: __clone method called on non-object in %sbug42817.php:2
Stack trace:
#0 {main}
thrown in %sbug42817.php on line 2
diff --git a/Zend/tests/bug42818.phpt b/Zend/tests/bug42818.phpt
index 11d9895be9..4ebe9cc35d 100644
--- a/Zend/tests/bug42818.phpt
+++ b/Zend/tests/bug42818.phpt
@@ -5,7 +5,7 @@ Bug #42818 ($foo = clone(array()); leaks memory)
$foo = clone(array());
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: __clone method called on non-object in %sbug42818.php:2
+Fatal error: Uncaught Error: __clone method called on non-object in %sbug42818.php:2
Stack trace:
#0 {main}
thrown in %sbug42818.php on line 2
diff --git a/Zend/tests/bug42819.phpt b/Zend/tests/bug42819.phpt
index 84a3bfb640..4630dc29b5 100644
--- a/Zend/tests/bug42819.phpt
+++ b/Zend/tests/bug42819.phpt
@@ -299,7 +299,7 @@ Array
[1] => 1
)
-Fatal error: Uncaught EngineException: Undefined constant 'foo\foo\unknown' in %sbug42819.php:%d
+Fatal error: Uncaught Error: Undefined constant 'foo\foo\unknown' in %sbug42819.php:%d
Stack trace:
#0 %s(%d): foo\oops()
#1 {main}
diff --git a/Zend/tests/bug42937.phpt b/Zend/tests/bug42937.phpt
index 9d13a79d93..2ade186b9c 100644
--- a/Zend/tests/bug42937.phpt
+++ b/Zend/tests/bug42937.phpt
@@ -39,7 +39,7 @@ test3
test4
test5
-Fatal error: Uncaught EngineException: Call to undefined method C::test6() in %sbug42937.php:21
+Fatal error: Uncaught Error: Call to undefined method C::test6() in %sbug42937.php:21
Stack trace:
#0 %s(%d): B->test()
#1 {main}
diff --git a/Zend/tests/bug43332_1.phpt b/Zend/tests/bug43332_1.phpt
index ce4ce52833..fc035ab2b6 100644
--- a/Zend/tests/bug43332_1.phpt
+++ b/Zend/tests/bug43332_1.phpt
@@ -12,7 +12,7 @@ $foo = new foo;
$foo->bar($foo); // Ok!
$foo->bar(new \stdclass); // Error, ok!
--EXPECTF--
-Fatal error: Uncaught TypeException: Argument 1 passed to foobar\foo::bar() must be an instance of foobar\foo, instance of stdClass given, called in %sbug43332_1.php on line 10 and defined in %sbug43332_1.php:5
+Fatal error: Uncaught TypeError: Argument 1 passed to foobar\foo::bar() must be an instance of foobar\foo, instance of stdClass given, called in %sbug43332_1.php on line 10 and defined in %sbug43332_1.php:5
Stack trace:
#0 %s(%d): foobar\foo->bar(Object(stdClass))
#1 {main}
diff --git a/Zend/tests/bug43344_10.phpt b/Zend/tests/bug43344_10.phpt
index 23bb8e9ad6..4916b039e1 100644
--- a/Zend/tests/bug43344_10.phpt
+++ b/Zend/tests/bug43344_10.phpt
@@ -5,7 +5,7 @@ Bug #43344.10 (Wrong error message for undefined namespace constant)
echo namespace\bar."\n";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Undefined constant 'bar' in %sbug43344_10.php:%d
+Fatal error: Uncaught Error: Undefined constant 'bar' in %sbug43344_10.php:%d
Stack trace:
#0 {main}
thrown in %sbug43344_10.php on line %d
diff --git a/Zend/tests/bug43344_11.phpt b/Zend/tests/bug43344_11.phpt
index 9529e7e582..27c3160f5a 100644
--- a/Zend/tests/bug43344_11.phpt
+++ b/Zend/tests/bug43344_11.phpt
@@ -8,7 +8,7 @@ function f($a=namespace\bar) {
echo f()."\n";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Undefined constant 'bar' in %sbug43344_11.php:%d
+Fatal error: Uncaught Error: Undefined constant 'bar' in %sbug43344_11.php:%d
Stack trace:
#0 %s(%d): f()
#1 {main}
diff --git a/Zend/tests/bug43344_12.phpt b/Zend/tests/bug43344_12.phpt
index b487421757..71031f5819 100644
--- a/Zend/tests/bug43344_12.phpt
+++ b/Zend/tests/bug43344_12.phpt
@@ -8,7 +8,7 @@ function f($a=array(namespace\bar)) {
echo f()."\n";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Undefined constant 'bar' in %sbug43344_12.php:%d
+Fatal error: Uncaught Error: Undefined constant 'bar' in %sbug43344_12.php:%d
Stack trace:
#0 %s(%d): f()
#1 {main}
diff --git a/Zend/tests/bug43344_13.phpt b/Zend/tests/bug43344_13.phpt
index aab7d93da2..bdce5a8a75 100644
--- a/Zend/tests/bug43344_13.phpt
+++ b/Zend/tests/bug43344_13.phpt
@@ -9,7 +9,7 @@ function f($a=array(namespace\bar=>0)) {
echo f()."\n";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Undefined constant 'bar' in %sbug43344_13.php:%d
+Fatal error: Uncaught Error: Undefined constant 'bar' in %sbug43344_13.php:%d
Stack trace:
#0 %s(%d): f()
#1 {main}
diff --git a/Zend/tests/bug43344_2.phpt b/Zend/tests/bug43344_2.phpt
index 6b74e76a0b..081f339a41 100644
--- a/Zend/tests/bug43344_2.phpt
+++ b/Zend/tests/bug43344_2.phpt
@@ -6,7 +6,7 @@ namespace Foo;
echo Foo::bar."\n";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Class 'Foo\Foo' not found in %sbug43344_2.php:%d
+Fatal error: Uncaught Error: Class 'Foo\Foo' not found in %sbug43344_2.php:%d
Stack trace:
#0 {main}
thrown in %sbug43344_2.php on line %d
diff --git a/Zend/tests/bug43344_6.phpt b/Zend/tests/bug43344_6.phpt
index c5c848f808..45aac8281f 100644
--- a/Zend/tests/bug43344_6.phpt
+++ b/Zend/tests/bug43344_6.phpt
@@ -6,7 +6,7 @@ namespace Foo;
echo namespace\bar."\n";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Undefined constant 'Foo\bar' in %sbug43344_6.php:%d
+Fatal error: Uncaught Error: Undefined constant 'Foo\bar' in %sbug43344_6.php:%d
Stack trace:
#0 {main}
thrown in %sbug43344_6.php on line %d
diff --git a/Zend/tests/bug43344_7.phpt b/Zend/tests/bug43344_7.phpt
index 6d536c1dd2..dfab0cad90 100644
--- a/Zend/tests/bug43344_7.phpt
+++ b/Zend/tests/bug43344_7.phpt
@@ -9,7 +9,7 @@ function f($a=namespace\bar) {
echo f()."\n";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Undefined constant 'Foo\bar' in %sbug43344_7.php:%d
+Fatal error: Uncaught Error: Undefined constant 'Foo\bar' in %sbug43344_7.php:%d
Stack trace:
#0 %s(%d): Foo\f()
#1 {main}
diff --git a/Zend/tests/bug43344_8.phpt b/Zend/tests/bug43344_8.phpt
index 7f621f9cbf..b1e6f61a54 100644
--- a/Zend/tests/bug43344_8.phpt
+++ b/Zend/tests/bug43344_8.phpt
@@ -9,7 +9,7 @@ function f($a=array(namespace\bar)) {
echo f()."\n";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Undefined constant 'Foo\bar' in %sbug43344_8.php:%d
+Fatal error: Uncaught Error: Undefined constant 'Foo\bar' in %sbug43344_8.php:%d
Stack trace:
#0 %s(%d): Foo\f()
#1 {main}
diff --git a/Zend/tests/bug43344_9.phpt b/Zend/tests/bug43344_9.phpt
index a6117385b6..7f7f2df38f 100644
--- a/Zend/tests/bug43344_9.phpt
+++ b/Zend/tests/bug43344_9.phpt
@@ -10,7 +10,7 @@ function f($a=array(namespace\bar=>0)) {
echo f()."\n";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Undefined constant 'Foo\bar' in %sbug43344_9.php:%d
+Fatal error: Uncaught Error: Undefined constant 'Foo\bar' in %sbug43344_9.php:%d
Stack trace:
#0 %s(%d): Foo\f()
#1 {main}
diff --git a/Zend/tests/bug44141.phpt b/Zend/tests/bug44141.phpt
index 021b4810f4..5ea737e46a 100644
--- a/Zend/tests/bug44141.phpt
+++ b/Zend/tests/bug44141.phpt
@@ -22,7 +22,7 @@ class Y extends X
$y = Y::cheat(5);
echo $y->x, PHP_EOL;
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to private X::__construct() from context 'Y' in %sbug44141.php:15
+Fatal error: Uncaught Error: Call to private X::__construct() from context 'Y' in %sbug44141.php:15
Stack trace:
#0 %s(%d): Y::cheat(5)
#1 {main}
diff --git a/Zend/tests/bug46304.phpt b/Zend/tests/bug46304.phpt
index 19374047cf..e2e031116d 100644
--- a/Zend/tests/bug46304.phpt
+++ b/Zend/tests/bug46304.phpt
@@ -62,7 +62,7 @@ value6
value6
value6
-Fatal error: Uncaught EngineException: Undefined constant 'NS1\ns2\coNSt1' in %sbug46304.php:%d
+Fatal error: Uncaught Error: Undefined constant 'NS1\ns2\coNSt1' in %sbug46304.php:%d
Stack trace:
#0 {main}
thrown in %sbug46304.php on line %d
diff --git a/Zend/tests/bug46381.phpt b/Zend/tests/bug46381.phpt
index f86b5f07d5..bfe11cdf28 100644
--- a/Zend/tests/bug46381.phpt
+++ b/Zend/tests/bug46381.phpt
@@ -14,7 +14,7 @@ $test->method();
echo "Done\n";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Non-static method ArrayIterator::current() cannot be called statically in %s:%d
+Fatal error: Uncaught Error: Non-static method ArrayIterator::current() cannot be called statically in %s:%d
Stack trace:
#0 %s(%d): test->method()
#1 {main}
diff --git a/Zend/tests/bug47054.phpt b/Zend/tests/bug47054.phpt
index 7433baba24..9e89c2c208 100644
--- a/Zend/tests/bug47054.phpt
+++ b/Zend/tests/bug47054.phpt
@@ -36,7 +36,7 @@ Warning: get_called_class() called from outside a class in %s on line %d
Deprecated: Non-static method D::m() should not be called statically in %s on line %d
-Fatal error: Uncaught EngineException: Using $this when not in object context in %s:%d
+Fatal error: Uncaught Error: Using $this when not in object context in %s:%d
Stack trace:
#0 %s(%d): D::m()
#1 {main}
diff --git a/Zend/tests/bug47699.phpt b/Zend/tests/bug47699.phpt
index 8cb3280bcf..6d4871bc2d 100644
--- a/Zend/tests/bug47699.phpt
+++ b/Zend/tests/bug47699.phpt
@@ -15,7 +15,7 @@ new X();
?>
--EXPECTF--
BB
-Fatal error: Uncaught EngineException: Class 'X' not found in %sbug47699.php:%d
+Fatal error: Uncaught Error: Class 'X' not found in %sbug47699.php:%d
Stack trace:
#0 {main}
thrown in %sbug47699.php on line %d
diff --git a/Zend/tests/bug47704.phpt b/Zend/tests/bug47704.phpt
index 306443f8bb..4fdaba8092 100644
--- a/Zend/tests/bug47704.phpt
+++ b/Zend/tests/bug47704.phpt
@@ -6,7 +6,7 @@ $s = "abd";
$s[0]->a += 1;
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot use string offset as an object in %sbug47704.php:%d
+Fatal error: Uncaught Error: Cannot use string offset as an object in %sbug47704.php:%d
Stack trace:
#0 {main}
thrown in %sbug47704.php on line %d
diff --git a/Zend/tests/bug48215_2.phpt b/Zend/tests/bug48215_2.phpt
index 034b3f1a4c..458e68144f 100644
--- a/Zend/tests/bug48215_2.phpt
+++ b/Zend/tests/bug48215_2.phpt
@@ -16,7 +16,7 @@ $c = new c();
?>
===DONE===
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to undefined method b::b() in %s:%d
+Fatal error: Uncaught Error: Call to undefined method b::b() in %s:%d
Stack trace:
#0 %s(%d): c->__construct()
#1 {main}
diff --git a/Zend/tests/bug48693.phpt b/Zend/tests/bug48693.phpt
index c4fbb4f297..41e0d82274 100644
--- a/Zend/tests/bug48693.phpt
+++ b/Zend/tests/bug48693.phpt
@@ -5,22 +5,22 @@ Bug #48693 (Double declaration of __lambda_func when lambda wrongly formatted)
try {
$x = create_function('', 'return 1; }');
-} catch (ParseException $e) {
+} catch (ParseError $e) {
echo "$e\n\n";
}
try {
$y = create_function('', 'function a() { }; return 2;');
-} catch (ParseException $e) {
+} catch (ParseError $e) {
echo "$e\n\n";
}
try {
$z = create_function('', '{');
-} catch (ParseException $e) {
+} catch (ParseError $e) {
echo "$e\n\n";
}
try {
$w = create_function('', 'return 3;');
-} catch (ParseException $e) {
+} catch (ParseError $e) {
echo "$e\n\n";
}
@@ -31,12 +31,12 @@ var_dump(
?>
--EXPECTF--
-ParseException: syntax error, unexpected '}', expecting end of file in %sbug48693.php(4) : runtime-created function:1
+ParseError: syntax error, unexpected '}', expecting end of file in %sbug48693.php(4) : runtime-created function:1
Stack trace:
#0 %sbug48693.php(4): create_function('', 'return 1; }')
#1 {main}
-ParseException: syntax error, unexpected end of file in %sbug48693.php(14) : runtime-created function:1
+ParseError: syntax error, unexpected end of file in %sbug48693.php(14) : runtime-created function:1
Stack trace:
#0 %sbug48693.php(14): create_function('', '{')
#1 {main}
diff --git a/Zend/tests/bug49866.phpt b/Zend/tests/bug49866.phpt
index 956367f693..3d96a59cd5 100644
--- a/Zend/tests/bug49866.phpt
+++ b/Zend/tests/bug49866.phpt
@@ -7,7 +7,7 @@ $b = &$a[1];
$b = "f";
echo $a;
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot create references to/from string offsets nor overloaded objects in %sbug49866.php:3
+Fatal error: Uncaught Error: Cannot create references to/from string offsets nor overloaded objects in %sbug49866.php:3
Stack trace:
#0 {main}
thrown in %sbug49866.php on line 3
diff --git a/Zend/tests/bug50146.phpt b/Zend/tests/bug50146.phpt
index ffd07edbd3..0ef9048b06 100644
--- a/Zend/tests/bug50146.phpt
+++ b/Zend/tests/bug50146.phpt
@@ -17,7 +17,7 @@ var_dump(isset($obj->a));
bool(false)
bool(false)
-Fatal error: Uncaught EngineException: Closure object cannot have properties in %s:%d
+Fatal error: Uncaught Error: Closure object cannot have properties in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/bug52484.phpt b/Zend/tests/bug52484.phpt
index 6000418a29..053529614d 100644
--- a/Zend/tests/bug52484.phpt
+++ b/Zend/tests/bug52484.phpt
@@ -16,7 +16,7 @@ unset($a->$prop);
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot access empty property in %s:%d
+Fatal error: Uncaught Error: Cannot access empty property in %s:%d
Stack trace:
#0 %s(%d): A->__unset('')
#1 {main}
diff --git a/Zend/tests/bug52484_2.phpt b/Zend/tests/bug52484_2.phpt
index 5181a425f0..6bb927535c 100644
--- a/Zend/tests/bug52484_2.phpt
+++ b/Zend/tests/bug52484_2.phpt
@@ -16,7 +16,7 @@ $a->$prop = 2;
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot access empty property in %s:%d
+Fatal error: Uncaught Error: Cannot access empty property in %s:%d
Stack trace:
#0 %s(%d): A->__set('', 2)
#1 {main}
diff --git a/Zend/tests/bug52484_3.phpt b/Zend/tests/bug52484_3.phpt
index b7646ab047..af32bc9be7 100644
--- a/Zend/tests/bug52484_3.phpt
+++ b/Zend/tests/bug52484_3.phpt
@@ -16,7 +16,7 @@ var_dump($a->$prop);
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot access empty property in %s:%d
+Fatal error: Uncaught Error: Cannot access empty property in %s:%d
Stack trace:
#0 %s(%d): A->__get('')
#1 {main}
diff --git a/Zend/tests/bug55156.phpt b/Zend/tests/bug55156.phpt
index 7d75ce3e94..137a43fcaa 100644
--- a/Zend/tests/bug55156.phpt
+++ b/Zend/tests/bug55156.phpt
@@ -2,7 +2,6 @@
Bug #55156 (ReflectionClass::getDocComment() returns comment even though the class has none)
--INI--
opcache.save_comments=1
-opcache.load_comments=1
--FILE--
<?php
diff --git a/Zend/tests/bug55705.phpt b/Zend/tests/bug55705.phpt
index 4b3e9413db..f051bca6dc 100644
--- a/Zend/tests/bug55705.phpt
+++ b/Zend/tests/bug55705.phpt
@@ -6,7 +6,7 @@ function f(callable $c) {}
f();
?>
--EXPECTF--
-Fatal error: Uncaught TypeException: Argument 1 passed to f() must be callable, none given, called in %s on line 3 and defined in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to f() must be callable, none given, called in %s on line 3 and defined in %s:%d
Stack trace:
#0 %s(%d): f()
#1 {main}
diff --git a/Zend/tests/bug61025.phpt b/Zend/tests/bug61025.phpt
index 4b06d7f704..f6731535fb 100644
--- a/Zend/tests/bug61025.phpt
+++ b/Zend/tests/bug61025.phpt
@@ -24,7 +24,7 @@ Warning: The magic method __invoke() must have public visibility and cannot be s
Warning: The magic method __invoke() must have public visibility and cannot be static in %sbug61025.php on line %d
Bar
-Fatal error: Uncaught EngineException: Call to private method Bar::__invoke() from context '' in %sbug61025.php:%d
+Fatal error: Uncaught Error: Call to private method Bar::__invoke() from context '' in %sbug61025.php:%d
Stack trace:
#0 {main}
thrown in %sbug61025.php on line %d
diff --git a/Zend/tests/bug61362.phpt b/Zend/tests/bug61362.phpt
new file mode 100644
index 0000000000..af216b566f
--- /dev/null
+++ b/Zend/tests/bug61362.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #61362 (Exception::getTraceAsString, Exception::__toString not able to handle unicode)
+--FILE--
+<?php
+function test($arg){
+ throw new Exception();
+}
+
+try {
+ test('теÑÑ‚');
+}
+catch(Exception $e) {
+ echo $e->getTraceAsString(), "\n";
+ echo (string)$e;
+}
+?>
+--EXPECTF--
+#0 %s(%d): test('\xD1\x82\xD0\xB5\xD1\x81\xD1\x82')
+#1 {main}
+Exception in %s:%d
+Stack trace:
+#0 %s(%d): test('\xD1\x82\xD0\xB5\xD1\x81\xD1\x82')
+#1 {main}
diff --git a/Zend/tests/bug63111.phpt b/Zend/tests/bug63111.phpt
index 38d6fafefc..3ac4618aea 100644
--- a/Zend/tests/bug63111.phpt
+++ b/Zend/tests/bug63111.phpt
@@ -31,7 +31,7 @@ bool(true)
bool(true)
ok
-Fatal error: Uncaught EngineException: Cannot call abstract method Foo::bar() in %sbug63111.php:20
+Fatal error: Uncaught Error: Cannot call abstract method Foo::bar() in %sbug63111.php:20
Stack trace:
#0 {main}
thrown in %sbug63111.php on line 20
diff --git a/Zend/tests/bug63173.phpt b/Zend/tests/bug63173.phpt
index af2611fc04..f6d76d8148 100644
--- a/Zend/tests/bug63173.phpt
+++ b/Zend/tests/bug63173.phpt
@@ -9,7 +9,7 @@ $callback();
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Array callback has to contain indices 0 and 1 in %s:%d
+Fatal error: Uncaught Error: Array callback has to contain indices 0 and 1 in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/bug64135.phpt b/Zend/tests/bug64135.phpt
index 53bcba1d0d..e4be3e0c64 100644
--- a/Zend/tests/bug64135.phpt
+++ b/Zend/tests/bug64135.phpt
@@ -10,7 +10,7 @@ function exception_error_handler() {
set_error_handler("exception_error_handler");
try {
$undefined->undefined();
-} catch(BaseException $e) {
+} catch(Throwable $e) {
echo "Exception is thrown";
}
--EXPECT--
diff --git a/Zend/tests/bug64720.phpt b/Zend/tests/bug64720.phpt
index 20fceff7fd..45dee3e8c4 100644
--- a/Zend/tests/bug64720.phpt
+++ b/Zend/tests/bug64720.phpt
@@ -22,7 +22,7 @@ class Foo {
}
}
-class Error {
+class ErrorTest {
private $trace;
public function __construct() {
$this->trace = debug_backtrace(1);
@@ -32,11 +32,11 @@ class Error {
class Bar {
public function __destruct() {
Stat::getInstance();
- new Error();
+ new ErrorTest();
}
public function test() {
- new Error();
+ new ErrorTest();
}
}
@@ -45,7 +45,7 @@ $bar = new Bar();
$bar->test();
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Access to undeclared static property: Stat::$requests in %sbug64720.php:12
+Fatal error: Uncaught Error: Access to undeclared static property: Stat::$requests in %sbug64720.php:12
Stack trace:
#0 [internal function]: Stat->__destruct()
#1 {main}
diff --git a/Zend/tests/bug64966.phpt b/Zend/tests/bug64966.phpt
index 0a4e1c77ca..329503e5af 100644
--- a/Zend/tests/bug64966.phpt
+++ b/Zend/tests/bug64966.phpt
@@ -5,7 +5,7 @@ Bug #64966 (segfault in zend_do_fcall_common_helper_SPEC)
function test($func) {
try {
$a = $func("");
- } catch (EngineException $e) {
+ } catch (Error $e) {
throw new Exception();
}
return true;
diff --git a/Zend/tests/bug65784.phpt b/Zend/tests/bug65784.phpt
index 8b9f7dfc75..c079b3d282 100644
--- a/Zend/tests/bug65784.phpt
+++ b/Zend/tests/bug65784.phpt
@@ -57,7 +57,7 @@ $bar = foo3();
string(9) "not catch"
NULL
-Fatal error: Uncaught EngineException: Class 'NotExists' not found in %sbug65784.php:%d
+Fatal error: Uncaught Error: Class 'NotExists' not found in %sbug65784.php:%d
Stack trace:
#0 %s(%d): foo3()
#1 {main}
diff --git a/Zend/tests/bug65911.phpt b/Zend/tests/bug65911.phpt
index 4f3a613834..753c8c6c7d 100644
--- a/Zend/tests/bug65911.phpt
+++ b/Zend/tests/bug65911.phpt
@@ -17,7 +17,7 @@ $obj = new B();
$obj->go();
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Access to undeclared static property: A::$this in %s:%d
+Fatal error: Uncaught Error: Access to undeclared static property: A::$this in %s:%d
Stack trace:
#0 %s(%d): B->go()
#1 {main}
diff --git a/Zend/tests/bug68446.phpt b/Zend/tests/bug68446.phpt
index a9507b89da..994699e5de 100644
--- a/Zend/tests/bug68446.phpt
+++ b/Zend/tests/bug68446.phpt
@@ -32,7 +32,7 @@ array(1) {
int(1)
}
-Fatal error: Uncaught TypeException: Argument 1 passed to a() must be of the type array, null given, called in %s on line %d and defined in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to a() must be of the type array, null given, called in %s on line %d and defined in %s:%d
Stack trace:
#0 %s(%d): a(NULL)
#1 {main}
diff --git a/Zend/tests/bug68475.phpt b/Zend/tests/bug68475.phpt
index 351edb2e94..1bf74f2603 100644
--- a/Zend/tests/bug68475.phpt
+++ b/Zend/tests/bug68475.phpt
@@ -36,7 +36,7 @@ $callback(...$args);
$callback = 'TestClass::undefinedMethod';
try {
$callback();
-} catch (EngineException $e) {
+} catch (Error $e) {
echo $e->getMessage() . "\n";
}
@@ -44,7 +44,7 @@ try {
$callback = 'UndefinedClass::testMethod';
try {
$callback();
-} catch (EngineException $e) {
+} catch (Error $e) {
echo $e->getMessage() . "\n";
}
?>
diff --git a/Zend/tests/bug68652.phpt b/Zend/tests/bug68652.phpt
index f0a66ceb60..e86312ba63 100644
--- a/Zend/tests/bug68652.phpt
+++ b/Zend/tests/bug68652.phpt
@@ -36,7 +36,7 @@ class Bar {
$foo = new Foo();
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Access to undeclared static property: Bar::$instance in %sbug68652.php:%d
+Fatal error: Uncaught Error: Access to undeclared static property: Bar::$instance in %sbug68652.php:%d
Stack trace:
#0 %s(%d): Bar::getInstance()
#1 [internal function]: Foo->__destruct()
diff --git a/Zend/tests/bug69551.phpt b/Zend/tests/bug69551.phpt
new file mode 100644
index 0000000000..096852a2fa
--- /dev/null
+++ b/Zend/tests/bug69551.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #69551 - parse_ini_file() and parse_ini_string() segmentation fault
+--FILE--
+<?php
+$ini = <<<INI
+[Network.eth0]
+SubnetMask = "
+"
+INI;
+$settings = parse_ini_string($ini, false, INI_SCANNER_RAW);
+var_dump($settings);
+?>
+--EXPECTF--
+Warning: syntax error, unexpected '"' in Unknown on line %d
+ in %s on line %d
+bool(false)
diff --git a/Zend/tests/bug69640.phpt b/Zend/tests/bug69640.phpt
index 9c4827ae08..e7ff7c99c1 100644
--- a/Zend/tests/bug69640.phpt
+++ b/Zend/tests/bug69640.phpt
@@ -1,8 +1,8 @@
--TEST--
-Bug #69640 Unhandled EngineExceptions thrown from userland do not produce any output
+Bug #69640 Unhandled Error thrown from userland do not produce any output
--FILE--
<?php
-throw new \ParseException('I mess everything up! :trollface:');
+throw new \ParseError('I mess everything up! :trollface:');
?>
--EXPECTF--
Fatal error: I mess everything up! :trollface: in %sbug69640.php on line 2
diff --git a/Zend/tests/bug69740.phpt b/Zend/tests/bug69740.phpt
new file mode 100644
index 0000000000..c8910b22d8
--- /dev/null
+++ b/Zend/tests/bug69740.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Bug #69740: finally in generator (yield) swallows exception in iteration
+--FILE--
+<?php
+
+function generate() {
+ try {
+ yield 1;
+ yield 2;
+ } finally {
+ echo "finally\n";
+ }
+}
+
+foreach (generate() as $i) {
+ echo $i, "\n";
+ throw new Exception();
+}
+
+?>
+--EXPECTF--
+1
+finally
+
+Fatal error: Uncaught Exception in %s:%d
+Stack trace:
+#0 {main}
+ thrown in %s on line %d
diff --git a/Zend/tests/bug69761.phpt b/Zend/tests/bug69761.phpt
new file mode 100644
index 0000000000..4b7e2787d8
--- /dev/null
+++ b/Zend/tests/bug69761.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #69761 (Serialization of anonymous classes should be prevented)
+--FILE--
+<?php
+$instance = new class('foo') {
+ public function __construct($i) {
+ }
+};
+var_dump(serialize($instance));
+?>
+--EXPECTF--
+Fatal error: Uncaught Exception: Serialization of 'class@%s' is not allowed in %sbug69761.php:%d
+Stack trace:
+#0 %sbug69761.php(%d): serialize(Object(class@%s
+ thrown in %sbug69761.php on line %d
diff --git a/Zend/tests/bug69788.phpt b/Zend/tests/bug69788.phpt
new file mode 100644
index 0000000000..63dd42d451
--- /dev/null
+++ b/Zend/tests/bug69788.phpt
@@ -0,0 +1,8 @@
+--TEST--
+Bug #69788: Malformed script causes Uncaught Error in php-cgi, valgrind SIGILL
+--FILE--
+<?php [t.[]]; ?>
+--EXPECTF--
+Notice: Array to string conversion in %s on line %d
+
+Notice: Use of undefined constant t - assumed 't' in %s on line %d
diff --git a/Zend/tests/bug69802.phpt b/Zend/tests/bug69802.phpt
new file mode 100644
index 0000000000..ed0430f6d2
--- /dev/null
+++ b/Zend/tests/bug69802.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Bug #69802 (Reflection on Closure::__invoke borks type hint class name)
+--FILE--
+<?php
+$f = function(stdClass $x): stdClass {};
+$r = new ReflectionMethod($f, '__invoke');
+var_dump($r->getParameters()[0]->getName());
+var_dump($r->getParameters()[0]->getClass());
+echo $r->getParameters()[0], "\n";
+echo $r->getReturnType(),"\n";
+echo $r,"\n";
+?>
+--EXPECT--
+string(1) "x"
+object(ReflectionClass)#4 (1) {
+ ["name"]=>
+ string(8) "stdClass"
+}
+Parameter #0 [ <required> stdClass $x ]
+stdClass
+Method [ <internal, prototype Closure> public method __invoke ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <required> stdClass $x ]
+ }
+ - Return [ stdClass ]
+}
diff --git a/Zend/tests/bug69802_2.phpt b/Zend/tests/bug69802_2.phpt
new file mode 100644
index 0000000000..a2de302707
--- /dev/null
+++ b/Zend/tests/bug69802_2.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Bug #69802 (Reflection on Closure::__invoke borks type hint class name)
+--FILE--
+<?php
+$f = (new ReflectionFunction('iterator_to_array'))->getClosure();
+$r = new ReflectionMethod($f, '__invoke');
+var_dump($r->getParameters()[0]->getClass());
+?>
+--EXPECT--
+object(ReflectionClass)#4 (1) {
+ ["name"]=>
+ string(11) "Traversable"
+}
diff --git a/Zend/tests/bug69805.phpt b/Zend/tests/bug69805.phpt
new file mode 100644
index 0000000000..c3ca62dc11
--- /dev/null
+++ b/Zend/tests/bug69805.phpt
@@ -0,0 +1,8 @@
+--TEST--
+Bug #69805 (null ptr deref and seg fault in zend_resolve_class_name)
+--FILE--
+<?php
+class p{public function c(){(0)::t;}}?>
+?>
+--EXPECTF--
+Fatal error: Illegal class name in %sbug69805.php on line %d
diff --git a/Zend/tests/bug69825.phpt b/Zend/tests/bug69825.phpt
new file mode 100644
index 0000000000..1349dee5ae
--- /dev/null
+++ b/Zend/tests/bug69825.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Bug #69825 (Short-circuiting failure)
+--FILE--
+<?php
+
+print "AND\n";
+var_dump(0 && 1);
+var_dump(0 && 0);
+var_dump(1 && 0);
+var_dump(1 && 1);
+
+print "OR\n";
+var_dump(0 || 1);
+var_dump(0 || 0);
+var_dump(1 || 0);
+var_dump(1 || 1);
+
+?>
+--EXPECT--
+AND
+bool(false)
+bool(false)
+bool(false)
+bool(true)
+OR
+bool(true)
+bool(false)
+bool(true)
+bool(true)
+
diff --git a/Zend/tests/bug69832.phpt b/Zend/tests/bug69832.phpt
new file mode 100644
index 0000000000..2617c7b24d
--- /dev/null
+++ b/Zend/tests/bug69832.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Bug #69832 (Assertion failed in zend_compile_const_expr_magic_const)
+--FILE--
+<?php
+
+class Test {
+ public $foo = [Bar::A, __CLASS__][__CLASS__ != ""];
+ public $bar = Bar::A && __CLASS__;
+ public $baz = Bar::A ?: __CLASS__;
+ public $buzz = Bar::A ? __CLASS__ : 0;
+}
+
+eval(<<<'PHP'
+class Bar {
+ const A = 1;
+}
+PHP
+);
+
+$t = new Test;
+var_dump($t->foo);
+var_dump($t->bar);
+var_dump($t->baz);
+var_dump($t->buzz);
+
+?>
+--EXPECT--
+string(4) "Test"
+bool(true)
+int(1)
+string(4) "Test"
+
diff --git a/Zend/tests/bug69871.phpt b/Zend/tests/bug69871.phpt
new file mode 100644
index 0000000000..f77be25885
--- /dev/null
+++ b/Zend/tests/bug69871.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #69871 (Short-circuiting failure with smart_branch)
+--INI--
+opcache.enable=0
+--FILE--
+<?php
+
+$a = true;
+if (isset($a) && 0) {
+ var_dump(true);
+} else {
+ var_dump(false);
+}
+
+?>
+--EXPECT--
+bool(false)
diff --git a/Zend/tests/bug69889.phpt b/Zend/tests/bug69889.phpt
new file mode 100644
index 0000000000..8aae7c16f7
--- /dev/null
+++ b/Zend/tests/bug69889.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Bug #69889: Null coalesce operator doesn't work for string offsets
+--FILE--
+<?php
+
+$foo = "test";
+var_dump($foo[0] ?? "default");
+
+var_dump($foo[5] ?? "default");
+var_dump(isset($foo[5]) ? $foo[5] : "default");
+
+var_dump($foo["str"] ?? "default");
+var_dump(isset($foo["str"]) ? $foo["str"] : "default");
+
+?>
+--EXPECT--
+string(1) "t"
+string(7) "default"
+string(7) "default"
+string(7) "default"
+string(7) "default"
+
diff --git a/Zend/tests/bug69891.phpt b/Zend/tests/bug69891.phpt
new file mode 100644
index 0000000000..f4b30948de
--- /dev/null
+++ b/Zend/tests/bug69891.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Bug #69891: Unexpected array comparison result
+--FILE--
+<?php
+
+var_dump([1, 2, 3] <=> []);
+var_dump([] <=> [1, 2, 3]);
+var_dump([1] <=> [2, 3]);
+--EXPECT--
+int(1)
+int(-1)
+int(-1)
diff --git a/Zend/tests/bug69892.phpt b/Zend/tests/bug69892.phpt
new file mode 100644
index 0000000000..d14f85fa52
--- /dev/null
+++ b/Zend/tests/bug69892.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #69892: Different arrays compare indentical due to integer key truncation
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platforms only"); ?>
+--FILE--
+<?php
+var_dump([0 => 0] === [0x100000000 => 0]);
+?>
+--EXPECT--
+bool(false)
diff --git a/Zend/tests/bug69893.phpt b/Zend/tests/bug69893.phpt
new file mode 100644
index 0000000000..7dc8d82eb3
--- /dev/null
+++ b/Zend/tests/bug69893.phpt
@@ -0,0 +1,8 @@
+--TEST--
+Bug #69893: Strict comparison between integer and empty string keys crashes
+--FILE--
+<?php
+var_dump([0 => 0] === ["" => 0]);
+?>
+--EXPECT--
+bool(false)
diff --git a/Zend/tests/bug69905.phpt b/Zend/tests/bug69905.phpt
new file mode 100644
index 0000000000..fb25341bde
--- /dev/null
+++ b/Zend/tests/bug69905.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Bug #69905 (null ptr deref and segfault in ZEND_FETCH_DIM_RW_SPEC_VAR_UNUSED_HANDLER)
+--FILE--
+<?php
+md5(0)[]--;
+?>
+--EXPECTF--
+Fatal error: Uncaught Error: [] operator not supported for strings in %sbug69905.php:2
+Stack trace:
+#0 {main}
+ thrown in %sbug69905.php on line 2
diff --git a/Zend/tests/call_static_004.phpt b/Zend/tests/call_static_004.phpt
index 022f4701ba..427c12fc96 100644
--- a/Zend/tests/call_static_004.phpt
+++ b/Zend/tests/call_static_004.phpt
@@ -18,7 +18,7 @@ foo::$a();
--EXPECTF--
string(3) "AaA"
-Fatal error: Uncaught EngineException: Function name must be a string in %s:%d
+Fatal error: Uncaught Error: Function name must be a string in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/call_static_005.phpt b/Zend/tests/call_static_005.phpt
index 273fc74a80..3b8d3465f6 100644
--- a/Zend/tests/call_static_005.phpt
+++ b/Zend/tests/call_static_005.phpt
@@ -12,7 +12,7 @@ class foo {
try {
$a = 'foo::';
$a();
-} catch (EngineException $e) {
+} catch (Error $e) {
echo $e->getMessage();
}
diff --git a/Zend/tests/call_static_006.phpt b/Zend/tests/call_static_006.phpt
index 2f55d71cc0..2887afa355 100644
--- a/Zend/tests/call_static_006.phpt
+++ b/Zend/tests/call_static_006.phpt
@@ -27,7 +27,7 @@ ok
Deprecated: Non-static method foo::aa() should not be called statically in %s on line %d
ok
-Fatal error: Uncaught EngineException: Cannot call constructor in %s:%d
+Fatal error: Uncaught Error: Cannot call constructor in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/call_user_func_004.phpt b/Zend/tests/call_user_func_004.phpt
index 6b5efcb6df..7a2c4b8ffd 100644
--- a/Zend/tests/call_user_func_004.phpt
+++ b/Zend/tests/call_user_func_004.phpt
@@ -15,7 +15,7 @@ call_user_func(array('foo', 'teste'));
--EXPECTF--
Deprecated: %son-static method foo::teste() should not be called statically in %s on line %d
-Fatal error: Uncaught EngineException: Using $this when not in object context in %s:%d
+Fatal error: Uncaught Error: Using $this when not in object context in %s:%d
Stack trace:
#0 %s(%d): foo::teste()
#1 {main}
diff --git a/Zend/tests/call_with_refs.phpt b/Zend/tests/call_with_refs.phpt
index acad134f87..84c4edfc20 100644
--- a/Zend/tests/call_with_refs.phpt
+++ b/Zend/tests/call_with_refs.phpt
@@ -14,5 +14,4 @@ $data = call_user_func_array("substr_replace",array(&$my_var, new StdClass(),1))
echo "OK!";
--EXPECT--
Object of class stdClass could not be converted to string
-Object of class stdClass to string conversion
OK!
diff --git a/Zend/tests/class_alias_008.phpt b/Zend/tests/class_alias_008.phpt
index df2b4b95ea..ab2aa2dcda 100644
--- a/Zend/tests/class_alias_008.phpt
+++ b/Zend/tests/class_alias_008.phpt
@@ -13,7 +13,7 @@ new $a;
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot instantiate abstract class foo in %s:%d
+Fatal error: Uncaught Error: Cannot instantiate abstract class foo in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/class_alias_016.phpt b/Zend/tests/class_alias_016.phpt
index 5ae6b64479..1d2b6752a4 100644
--- a/Zend/tests/class_alias_016.phpt
+++ b/Zend/tests/class_alias_016.phpt
@@ -18,7 +18,7 @@ var_dump(new foo);
object(foo\bar)#%d (0) {
}
-Fatal error: Uncaught EngineException: Class 'foo\foo' not found in %s:%d
+Fatal error: Uncaught Error: Class 'foo\foo' not found in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/class_alias_020.phpt b/Zend/tests/class_alias_020.phpt
index 861f928793..c7ba609f51 100644
--- a/Zend/tests/class_alias_020.phpt
+++ b/Zend/tests/class_alias_020.phpt
@@ -30,7 +30,7 @@ object(foo\foo)#1 (0) {
object(foo\bar\foo)#2 (0) {
}
-Fatal error: Uncaught EngineException: Class 'foo\bar' not found in %s:%d
+Fatal error: Uncaught Error: Class 'foo\bar' not found in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/class_constants_001.phpt b/Zend/tests/class_constants_001.phpt
index d7afc22e64..664ac35698 100644
--- a/Zend/tests/class_constants_001.phpt
+++ b/Zend/tests/class_constants_001.phpt
@@ -19,7 +19,7 @@ echo "Done\n";
string(6) "string"
int(1)
-Fatal error: Uncaught EngineException: Undefined class constant 'val3' in %s:%d
+Fatal error: Uncaught Error: Undefined class constant 'val3' in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/class_name_as_scalar_error_005.phpt b/Zend/tests/class_name_as_scalar_error_005.phpt
index 71eb9b84af..cbfaf108e2 100644
--- a/Zend/tests/class_name_as_scalar_error_005.phpt
+++ b/Zend/tests/class_name_as_scalar_error_005.phpt
@@ -7,7 +7,7 @@ $x = static::class;
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot use "static" when no class scope is active in %s:3
+Fatal error: Uncaught Error: Cannot use "static" when no class scope is active in %s:3
Stack trace:
#0 {main}
thrown in %s on line 3
diff --git a/Zend/tests/class_name_as_scalar_error_006.phpt b/Zend/tests/class_name_as_scalar_error_006.phpt
index 15f1ec347e..185e9f6be1 100644
--- a/Zend/tests/class_name_as_scalar_error_006.phpt
+++ b/Zend/tests/class_name_as_scalar_error_006.phpt
@@ -7,7 +7,7 @@ $x = parent::class;
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot use "parent" when no class scope is active in %s:3
+Fatal error: Uncaught Error: Cannot use "parent" when no class scope is active in %s:3
Stack trace:
#0 {main}
thrown in %s on line 3
diff --git a/Zend/tests/class_name_as_scalar_error_007.phpt b/Zend/tests/class_name_as_scalar_error_007.phpt
index 01241f4226..22099f6104 100644
--- a/Zend/tests/class_name_as_scalar_error_007.phpt
+++ b/Zend/tests/class_name_as_scalar_error_007.phpt
@@ -7,7 +7,7 @@ var_dump(self::class);
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot use "self" when no class scope is active in %s:3
+Fatal error: Uncaught Error: Cannot use "self" when no class scope is active in %s:3
Stack trace:
#0 {main}
thrown in %s on line 3
diff --git a/Zend/tests/clone_001.phpt b/Zend/tests/clone_001.phpt
index 8109aa6422..87024c3cd5 100644
--- a/Zend/tests/clone_001.phpt
+++ b/Zend/tests/clone_001.phpt
@@ -7,7 +7,7 @@ $a = clone array();
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: __clone method called on non-object in %s:%d
+Fatal error: Uncaught Error: __clone method called on non-object in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/clone_003.phpt b/Zend/tests/clone_003.phpt
index b3adc2b09f..2dd376cf65 100644
--- a/Zend/tests/clone_003.phpt
+++ b/Zend/tests/clone_003.phpt
@@ -9,7 +9,7 @@ $a = clone $b;
--EXPECTF--
Notice: Undefined variable: b in %s on line %d
-Fatal error: Uncaught EngineException: __clone method called on non-object in %s:%d
+Fatal error: Uncaught Error: __clone method called on non-object in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/clone_004.phpt b/Zend/tests/clone_004.phpt
index e24795ec0a..68ebd9da38 100644
--- a/Zend/tests/clone_004.phpt
+++ b/Zend/tests/clone_004.phpt
@@ -17,7 +17,7 @@ $a = clone $c->b[1];
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot use object of type foo as array in %s:%d
+Fatal error: Uncaught Error: Cannot use object of type foo as array in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/closure_005.phpt b/Zend/tests/closure_005.phpt
index 72535b466d..b9eb79eafd 100644
--- a/Zend/tests/closure_005.phpt
+++ b/Zend/tests/closure_005.phpt
@@ -71,7 +71,7 @@ echo "Done\n";
7
Destroyed
-Fatal error: Uncaught EngineException: Using $this when not in object context in %sclosure_005.php:28
+Fatal error: Uncaught Error: Using $this when not in object context in %sclosure_005.php:28
Stack trace:
#0 %s(%d): A::{closure}()
#1 {main}
diff --git a/Zend/tests/closure_019.phpt b/Zend/tests/closure_019.phpt
index 5505fd2937..c173108623 100644
--- a/Zend/tests/closure_019.phpt
+++ b/Zend/tests/closure_019.phpt
@@ -26,7 +26,7 @@ int(9)
Notice: Only variable references should be returned by reference in %sclosure_019.php on line 4
int(81)
-Fatal error: Uncaught EngineException: Cannot pass parameter 1 by reference in %s:%d
+Fatal error: Uncaught Error: Cannot pass parameter 1 by reference in %s:%d
Stack trace:
#0 %s(%d): test()
#1 {main}
diff --git a/Zend/tests/closure_020.phpt b/Zend/tests/closure_020.phpt
index a13d4a63c6..3e019aaa42 100644
--- a/Zend/tests/closure_020.phpt
+++ b/Zend/tests/closure_020.phpt
@@ -40,7 +40,7 @@ object(foo)#%d (2) {
bool(true)
bool(true)
-Fatal error: Uncaught EngineException: Cannot access private property foo::$test in %s:%d
+Fatal error: Uncaught Error: Cannot access private property foo::$test in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/closure_022.phpt b/Zend/tests/closure_022.phpt
index 1d48e6683e..b1ffebc0b4 100644
--- a/Zend/tests/closure_022.phpt
+++ b/Zend/tests/closure_022.phpt
@@ -8,7 +8,7 @@ $foo = function() use ($a) {
$foo->a = 1;
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Closure object cannot have properties in %sclosure_022.php:5
+Fatal error: Uncaught Error: Closure object cannot have properties in %sclosure_022.php:5
Stack trace:
#0 {main}
thrown in %sclosure_022.php on line 5
diff --git a/Zend/tests/closure_027.phpt b/Zend/tests/closure_027.phpt
index 0b604c3ac4..db42ae9307 100644
--- a/Zend/tests/closure_027.phpt
+++ b/Zend/tests/closure_027.phpt
@@ -28,7 +28,7 @@ Notice: Undefined variable: y in %s on line %d
Warning: Missing argument 1 for {closure}(), called in %s on line %d and defined in %s on line %d
NULL
-Fatal error: Uncaught TypeException: Argument 1 passed to test() must be an instance of Closure, instance of stdClass given, called in %s on line %d and defined in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to test() must be an instance of Closure, instance of stdClass given, called in %s on line %d and defined in %s:%d
Stack trace:
#0 %s(%d): test(Object(stdClass))
#1 {main}
diff --git a/Zend/tests/closure_031.phpt b/Zend/tests/closure_031.phpt
index 6b4586e8b0..241ddb42cd 100644
--- a/Zend/tests/closure_031.phpt
+++ b/Zend/tests/closure_031.phpt
@@ -10,7 +10,7 @@ $foo = function() {
};
try {
var_dump($foo->a);
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "Error: {$ex->getMessage()}\n";
}
?>
diff --git a/Zend/tests/closure_033.phpt b/Zend/tests/closure_033.phpt
index 4e445721ea..d92716aacc 100644
--- a/Zend/tests/closure_033.phpt
+++ b/Zend/tests/closure_033.phpt
@@ -25,7 +25,7 @@ $o->func();
--EXPECTF--
Test::{closure}()
-Fatal error: Uncaught EngineException: Call to private method Test::func() from context '' in %sclosure_033.php:%d
+Fatal error: Uncaught Error: Call to private method Test::func() from context '' in %sclosure_033.php:%d
Stack trace:
#0 {main}
thrown in %sclosure_033.php on line %d
diff --git a/Zend/tests/closure_038.phpt b/Zend/tests/closure_038.phpt
index f3bcd831a9..6d659be910 100644
--- a/Zend/tests/closure_038.phpt
+++ b/Zend/tests/closure_038.phpt
@@ -55,12 +55,12 @@ Testing with scope as string
int(23)
int(24)
-Fatal error: Uncaught EngineException: Cannot access private property B::$x in %s:%d
+Fatal error: Uncaught Error: Cannot access private property B::$x in %s:%d
Stack trace:
#0 %s(%d): Closure->{closure}()
#1 {main}
-Next EngineException: Cannot access private property B::$x in %s:%d
+Next Error: Cannot access private property B::$x in %s:%d
Stack trace:
#0 %s(%d): Closure->{closure}()
#1 {main}
diff --git a/Zend/tests/closure_039.phpt b/Zend/tests/closure_039.phpt
index 2afd920105..5de432459f 100644
--- a/Zend/tests/closure_039.phpt
+++ b/Zend/tests/closure_039.phpt
@@ -55,12 +55,12 @@ Testing with scope as string
int(23)
int(24)
-Fatal error: Uncaught EngineException: Cannot access private property B::$x in %s:%d
+Fatal error: Uncaught Error: Cannot access private property B::$x in %s:%d
Stack trace:
#0 %s(%d): Closure->{closure}()
#1 {main}
-Next EngineException: Cannot access private property B::$x in %s:%d
+Next Error: Cannot access private property B::$x in %s:%d
Stack trace:
#0 %s(%d): Closure->{closure}()
#1 {main}
diff --git a/Zend/tests/closure_059.phpt b/Zend/tests/closure_059.phpt
index de9c574746..1ee7fe6695 100644
--- a/Zend/tests/closure_059.phpt
+++ b/Zend/tests/closure_059.phpt
@@ -19,17 +19,17 @@ call_user_func(array($f,"__invoke"), $a);
try {
$f($b);
-} catch (EngineException $e) {
+} catch (Error $e) {
echo "Exception: " . $e->getMessage() . "\n";
}
try {
$f->__invoke($b);
-} catch (EngineException $e) {
+} catch (Error $e) {
echo "Exception: " . $e->getMessage() . "\n";
}
try {
call_user_func(array($f,"__invoke"), $b);
-} catch (EngineException $e) {
+} catch (Error $e) {
echo "Exception: " . $e->getMessage() . "\n";
}
--EXPECTF--
diff --git a/Zend/tests/closure_060.phpt b/Zend/tests/closure_060.phpt
new file mode 100644
index 0000000000..f03160dab9
--- /dev/null
+++ b/Zend/tests/closure_060.phpt
@@ -0,0 +1,25 @@
+--TEST--
+runtime cache must be invalidated for Closure::call()
+--FILE--
+<?php
+
+class A {
+ private static $priv = 7;
+
+ static function get() {
+ return function() {
+ var_dump(isset(A::$priv));
+ };
+ }
+}
+
+$closure = A::get();
+$closure(); // init rt_cache
+$closure->call(new class(){}, null);
+$closure();
+
+?>
+--EXPECT--
+bool(true)
+bool(false)
+bool(true)
diff --git a/Zend/tests/constant_expressions_exceptions_002.phpt b/Zend/tests/constant_expressions_exceptions_002.phpt
index 3259483197..fc15af5e9a 100644
--- a/Zend/tests/constant_expressions_exceptions_002.phpt
+++ b/Zend/tests/constant_expressions_exceptions_002.phpt
@@ -4,7 +4,7 @@ Constant Expressions with unsupported operands 002
<?php
try {
require("constant_expressions_exceptions.inc");
-} catch (EngineException $e) {
+} catch (Error $e) {
echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n";
}
?>
diff --git a/Zend/tests/constant_expressions_invalid_offset_type_error.phpt b/Zend/tests/constant_expressions_invalid_offset_type_error.phpt
index 5cee0a0bfe..52d2194e26 100644
--- a/Zend/tests/constant_expressions_invalid_offset_type_error.phpt
+++ b/Zend/tests/constant_expressions_invalid_offset_type_error.phpt
@@ -8,7 +8,7 @@ const C2 = [C1, [] => 1];
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Illegal offset type in %s:%d
+Fatal error: Uncaught Error: Illegal offset type in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/constant_expressions_self_referencing_array.phpt b/Zend/tests/constant_expressions_self_referencing_array.phpt
index fa14af2f28..63f2b20ef5 100644
--- a/Zend/tests/constant_expressions_self_referencing_array.phpt
+++ b/Zend/tests/constant_expressions_self_referencing_array.phpt
@@ -9,7 +9,7 @@ class A {
var_dump(A::FOO);
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot declare self-referencing constant 'self::FOO' in %s:%d
+Fatal error: Uncaught Error: Cannot declare self-referencing constant 'self::FOO' in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/dereference_002.phpt b/Zend/tests/dereference_002.phpt
index c206e70b3e..d16e1bb483 100644
--- a/Zend/tests/dereference_002.phpt
+++ b/Zend/tests/dereference_002.phpt
@@ -76,7 +76,7 @@ NULL
Notice: Undefined offset: 3 in %s on line %d
-Fatal error: Uncaught EngineException: Call to a member function bar() on null in %s:%d
+Fatal error: Uncaught Error: Call to a member function bar() on null in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/dereference_010.phpt b/Zend/tests/dereference_010.phpt
index ec62e5614e..981fe31160 100644
--- a/Zend/tests/dereference_010.phpt
+++ b/Zend/tests/dereference_010.phpt
@@ -24,7 +24,7 @@ var_dump(b()[1]);
NULL
NULL
-Fatal error: Uncaught EngineException: Cannot use object of type stdClass as array in %s:%d
+Fatal error: Uncaught Error: Cannot use object of type stdClass as array in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/div_002.phpt b/Zend/tests/div_002.phpt
index 34f377e229..bf5d512a65 100644
--- a/Zend/tests/div_002.phpt
+++ b/Zend/tests/div_002.phpt
@@ -8,7 +8,7 @@ $b = array(1);
try {
var_dump($a / $b);
-} catch (EngineException $e) {
+} catch (Error $e) {
echo "\nException: " . $e->getMessage() . "\n";
}
@@ -20,7 +20,7 @@ echo "Done\n";
--EXPECTF--
Exception: Unsupported operand types
-Fatal error: Uncaught EngineException: Unsupported operand types in %s:%d
+Fatal error: Uncaught Error: Unsupported operand types in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/dynamic_call_001.phpt b/Zend/tests/dynamic_call_001.phpt
index c3c92e07cf..377ebf222e 100644
--- a/Zend/tests/dynamic_call_001.phpt
+++ b/Zend/tests/dynamic_call_001.phpt
@@ -16,7 +16,7 @@ $a::$a();
--EXPECTF--
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; foo has a deprecated constructor in %s on line %d
-Fatal error: Uncaught EngineException: Non-static method foo::foo() cannot be called statically in %s:%d
+Fatal error: Uncaught Error: Non-static method foo::foo() cannot be called statically in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/dynamic_call_002.phpt b/Zend/tests/dynamic_call_002.phpt
index 5d05680918..e94f642681 100644
--- a/Zend/tests/dynamic_call_002.phpt
+++ b/Zend/tests/dynamic_call_002.phpt
@@ -9,7 +9,7 @@ $a::$a();
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Function name must be a string in %s:%d
+Fatal error: Uncaught Error: Function name must be a string in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/dynamic_call_003.phpt b/Zend/tests/dynamic_call_003.phpt
index c929e8b04c..b740ab3d4a 100644
--- a/Zend/tests/dynamic_call_003.phpt
+++ b/Zend/tests/dynamic_call_003.phpt
@@ -10,7 +10,7 @@ $a::$b();
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Function name must be a string in %s:%d
+Fatal error: Uncaught Error: Function name must be a string in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/dynamic_call_004.phpt b/Zend/tests/dynamic_call_004.phpt
index 59da5c7ca5..ad507c2953 100644
--- a/Zend/tests/dynamic_call_004.phpt
+++ b/Zend/tests/dynamic_call_004.phpt
@@ -9,7 +9,7 @@ $a::$b();
--EXPECTF--
Notice: Undefined variable: a in %s on line %d
-Fatal error: Uncaught EngineException: Class name must be a valid object or a string in %s:%d
+Fatal error: Uncaught Error: Class name must be a valid object or a string in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/errmsg_044.phpt b/Zend/tests/errmsg_044.phpt
index 4b60b1600e..4feecb308c 100644
--- a/Zend/tests/errmsg_044.phpt
+++ b/Zend/tests/errmsg_044.phpt
@@ -8,7 +8,7 @@ $a[0][0] = new stdclass;
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot use object of type stdClass as array in %s:%d
+Fatal error: Uncaught Error: Cannot use object of type stdClass as array in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/exception_004.phpt b/Zend/tests/exception_004.phpt
index b7b776572c..9afe81f9c1 100644
--- a/Zend/tests/exception_004.phpt
+++ b/Zend/tests/exception_004.phpt
@@ -15,7 +15,7 @@ try {
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Exceptions must be valid objects derived from the Exception base class in %s:%d
+Fatal error: Uncaught Error: Cannot throw objects that do not implement Throwable in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/exception_005.phpt b/Zend/tests/exception_005.phpt
index 0d55f0c6b0..15458ec3c4 100644
--- a/Zend/tests/exception_005.phpt
+++ b/Zend/tests/exception_005.phpt
@@ -9,7 +9,7 @@ throw new a();
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot instantiate interface a in %s:%d
+Fatal error: Uncaught Error: Cannot instantiate interface a in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/exception_006.phpt b/Zend/tests/exception_006.phpt
index 31dff03838..61eb5c7cb3 100644
--- a/Zend/tests/exception_006.phpt
+++ b/Zend/tests/exception_006.phpt
@@ -7,7 +7,7 @@ throw 1;
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Can only throw objects in %s:%d
+Fatal error: Uncaught Error: Can only throw objects in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/exception_010.phpt b/Zend/tests/exception_010.phpt
index d67cddab58..6bff8c6e5e 100644
--- a/Zend/tests/exception_010.phpt
+++ b/Zend/tests/exception_010.phpt
@@ -15,16 +15,16 @@ $x->getcode(1);
?>
--EXPECTF--
-Warning: BaseException::getTraceAsString() expects exactly 0 parameters, 1 given in %s on line %d
+Warning: Exception::getTraceAsString() expects exactly 0 parameters, 1 given in %s on line %d
-Warning: BaseException::__toString() expects exactly 0 parameters, 1 given in %s on line %d
+Warning: Exception::__toString() expects exactly 0 parameters, 1 given in %s on line %d
-Warning: BaseException::getTrace() expects exactly 0 parameters, 1 given in %s on line %d
+Warning: Exception::getTrace() expects exactly 0 parameters, 1 given in %s on line %d
-Warning: BaseException::getLine() expects exactly 0 parameters, 1 given in %s on line %d
+Warning: Exception::getLine() expects exactly 0 parameters, 1 given in %s on line %d
-Warning: BaseException::getFile() expects exactly 0 parameters, 1 given in %s on line %d
+Warning: Exception::getFile() expects exactly 0 parameters, 1 given in %s on line %d
-Warning: BaseException::getMessage() expects exactly 0 parameters, 1 given in %s on line %d
+Warning: Exception::getMessage() expects exactly 0 parameters, 1 given in %s on line %d
-Warning: BaseException::getCode() expects exactly 0 parameters, 1 given in %s on line %d
+Warning: Exception::getCode() expects exactly 0 parameters, 1 given in %s on line %d
diff --git a/Zend/tests/exception_011.phpt b/Zend/tests/exception_011.phpt
index d128f06ab8..850a3ecd9f 100644
--- a/Zend/tests/exception_011.phpt
+++ b/Zend/tests/exception_011.phpt
@@ -13,7 +13,7 @@ assert(false);
--EXPECTHEADERS--
Content-type: text/html; charset=UTF-8
--EXPECTF--
-Fatal error: Uncaught AssertionException: assert(false) in %sexception_011.php:%d
+Fatal error: Uncaught AssertionError: assert(false) in %sexception_011.php:%d
Stack trace:
#0 %sexception_011.php(%d): assert(false, 'assert(false)')
#1 {main}
diff --git a/Zend/tests/exception_012.phpt b/Zend/tests/exception_012.phpt
index eaeaef8604..bf00529a6c 100644
--- a/Zend/tests/exception_012.phpt
+++ b/Zend/tests/exception_012.phpt
@@ -13,7 +13,7 @@ $func();
--EXPECTHEADERS--
Content-type: text/html; charset=UTF-8
--EXPECTF--
-Fatal error: Uncaught AssertionException: assert(false) in %sexception_012.php(%d) : runtime-created function:%d
+Fatal error: Uncaught AssertionError: assert(false) in %sexception_012.php(%d) : runtime-created function:%d
Stack trace:
#0 %sexception_012.php(%d) : runtime-created function(%d): assert(false, 'assert(false)')
#1 %sexception_012.php(%d): __lambda_func()
diff --git a/Zend/tests/exception_013.phpt b/Zend/tests/exception_013.phpt
index e1a06cb0d0..d8f5d907e3 100644
--- a/Zend/tests/exception_013.phpt
+++ b/Zend/tests/exception_013.phpt
@@ -8,19 +8,19 @@ class C {
try {
var_dump(C::$a);
-} catch (EngineException $e) {
+} catch (Error $e) {
echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n";
}
try {
var_dump(C::$p);
-} catch (EngineException $e) {
+} catch (Error $e) {
echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n";
}
try {
unset(C::$a);
-} catch (EngineException $e) {
+} catch (Error $e) {
echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n";
}
@@ -33,7 +33,7 @@ Exception: Cannot access private property C::$p in %sexception_013.php on line 1
Exception: Attempt to unset static property C::$a in %sexception_013.php on line 19
-Fatal error: Uncaught EngineException: Access to undeclared static property: C::$a in %sexception_013.php:24
+Fatal error: Uncaught Error: Access to undeclared static property: C::$a in %sexception_013.php:24
Stack trace:
#0 {main}
thrown in %sexception_013.php on line 24
diff --git a/Zend/tests/exception_014.phpt b/Zend/tests/exception_014.phpt
index 8da20dccfa..fedeee21c9 100644
--- a/Zend/tests/exception_014.phpt
+++ b/Zend/tests/exception_014.phpt
@@ -9,7 +9,7 @@ class C {
$x = new C;
try {
var_dump($x->p);
-} catch (EngineException $e) {
+} catch (Error $e) {
echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n";
}
@@ -18,7 +18,7 @@ var_dump($x->p);
--EXPECTF--
Exception: Cannot access private property C::$p in %sexception_014.php on line %d
-Fatal error: Uncaught EngineException: Cannot access private property C::$p in %sexception_014.php:%d
+Fatal error: Uncaught Error: Cannot access private property C::$p in %sexception_014.php:%d
Stack trace:
#0 {main}
thrown in %sexception_014.php on line %d
diff --git a/Zend/tests/exception_015.phpt b/Zend/tests/exception_015.phpt
index a1b9ae48e2..e35a1eefe2 100644
--- a/Zend/tests/exception_015.phpt
+++ b/Zend/tests/exception_015.phpt
@@ -5,7 +5,7 @@ Exceptions on improper access to string
$s = "ABC";
try {
$s[] = "D";
-} catch (EngineException $e) {
+} catch (Error $e) {
echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n";
}
@@ -14,7 +14,7 @@ $s[] = "D";
--EXPECTF--
Exception: [] operator not supported for strings in %sexception_015.php on line %d
-Fatal error: Uncaught EngineException: [] operator not supported for strings in %sexception_015.php:%d
+Fatal error: Uncaught Error: [] operator not supported for strings in %sexception_015.php:%d
Stack trace:
#0 {main}
thrown in %sexception_015.php on line %d
diff --git a/Zend/tests/exception_016.phpt b/Zend/tests/exception_016.phpt
index 7e4c4c3e24..98831d933a 100644
--- a/Zend/tests/exception_016.phpt
+++ b/Zend/tests/exception_016.phpt
@@ -4,7 +4,7 @@ Exceptions on improper usage of $this
<?php
try {
$this->foo();
-} catch (EngineException $e) {
+} catch (Error $e) {
echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n";
}
@@ -13,7 +13,7 @@ $this->foo();
--EXPECTF--
Exception: Using $this when not in object context in %sexception_016.php on line %d
-Fatal error: Uncaught EngineException: Using $this when not in object context in %sexception_016.php:%d
+Fatal error: Uncaught Error: Using $this when not in object context in %sexception_016.php:%d
Stack trace:
#0 {main}
thrown in %sexception_016.php on line %d
diff --git a/Zend/tests/exception_017.phpt b/Zend/tests/exception_017.phpt
index 261ce3d091..f980b297fb 100644
--- a/Zend/tests/exception_017.phpt
+++ b/Zend/tests/exception_017.phpt
@@ -11,18 +11,18 @@ function foo(callable $x) {
try {
C::foo();
-} catch (EngineException $e) {
+} catch (Error $e) {
echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n";
}
try {
foo("C::foo");
-} catch (EngineException $e) {
+} catch (Error $e) {
echo "\n";
do {
echo "Exception: " . $e->getMessage() . "\n";
$e = $e->getPrevious();
- } while ($e instanceof EngineException);
+ } while ($e instanceof Error);
}
C::foo();
@@ -33,7 +33,7 @@ Exception: Cannot call abstract method C::foo() in %sexception_017.php on line %
Exception: Argument 1 passed to foo() must be callable, string given, called in %sexception_017.php on line %d
Exception: Cannot call abstract method C::foo()
-Fatal error: Uncaught EngineException: Cannot call abstract method C::foo() in %sexception_017.php:%d
+Fatal error: Uncaught Error: Cannot call abstract method C::foo() in %sexception_017.php:%d
Stack trace:
#0 {main}
thrown in %sexception_017.php on line %d
diff --git a/Zend/tests/exception_018.phpt b/Zend/tests/exception_018.phpt
new file mode 100644
index 0000000000..aa39d53b67
--- /dev/null
+++ b/Zend/tests/exception_018.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Testing throw exception doesn't crash with wrong params, variant 1
+--FILE--
+<?php
+
+class Hello extends Exception {}
+throw new Hello(new stdClass);
+
+?>
+--EXPECTF--
+Fatal error: Uncaught Error: Wrong parameters for Hello([string $message [, long $code [, Throwable $previous = NULL]]]) in %sexception_018.php:%d
+Stack trace:
+#0 %sexception_018.php(%d): Exception->__construct(Object(stdClass))
+#1 {main}
+ thrown in %sexception_018.php on line %d
diff --git a/Zend/tests/exception_019.phpt b/Zend/tests/exception_019.phpt
new file mode 100644
index 0000000000..4ebb077fe6
--- /dev/null
+++ b/Zend/tests/exception_019.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Testing throw exception doesn't crash with wrong params, variant 2
+--FILE--
+<?php
+
+throw new Exception(new stdClass);
+
+?>
+--EXPECTF--
+Fatal error: Uncaught Error: Wrong parameters for Exception([string $message [, long $code [, Throwable $previous = NULL]]]) in %sexception_019.php:%d
+Stack trace:
+#0 %sexception_019.php(%d): Exception->__construct(Object(stdClass))
+#1 {main}
+ thrown in %sexception_019.php on line %d
diff --git a/Zend/tests/exception_020.phpt b/Zend/tests/exception_020.phpt
new file mode 100644
index 0000000000..6f8981f5e6
--- /dev/null
+++ b/Zend/tests/exception_020.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Test that the original class name is present in the error out when extending ErrorException
+--FILE--
+<?php
+
+class MyErrorException extends ErrorException{}
+throw new MyErrorException(new stdClass);
+
+?>
+--EXPECTF--
+Fatal error: Uncaught Error: Wrong parameters for MyErrorException([string $message [, long $code, [ long $severity, [ string $filename, [ long $lineno [, Throwable $previous = NULL]]]]]]) in %sexception_020.php:%d
+Stack trace:
+#0 %sexception_020.php(%d): ErrorException->__construct(Object(stdClass))
+#1 {main}
+ thrown in %sexception_020.php on line %d
diff --git a/Zend/tests/exception_021.phpt b/Zend/tests/exception_021.phpt
new file mode 100644
index 0000000000..5955e7989b
--- /dev/null
+++ b/Zend/tests/exception_021.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Testing throw exception doesn't crash with wrong params, variant 3
+--FILE--
+<?php
+
+class Hello extends Error {}
+throw new Hello(new stdClass);
+
+?>
+--EXPECTF--
+Fatal error: Uncaught Error: Wrong parameters for Hello([string $message [, long $code [, Throwable $previous = NULL]]]) in %sexception_021.php:%d
+Stack trace:
+#0 %sexception_021.php(%d): Error->__construct(Object(stdClass))
+#1 {main}
+ thrown in %sexception_021.php on line %d
diff --git a/Zend/tests/exception_022.phpt b/Zend/tests/exception_022.phpt
new file mode 100644
index 0000000000..83d47145c3
--- /dev/null
+++ b/Zend/tests/exception_022.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Testing throw exception doesn't crash with wrong params, variant 4
+--FILE--
+<?php
+
+throw new Error(new stdClass);
+
+?>
+--EXPECTF--
+Fatal error: Uncaught Error: Wrong parameters for Error([string $message [, long $code [, Throwable $previous = NULL]]]) in %sexception_022.php:%d
+Stack trace:
+#0 %sexception_022.php(%d): Error->__construct(Object(stdClass))
+#1 {main}
+ thrown in %sexception_022.php on line %d
diff --git a/Zend/tests/exception_before_fatal.phpt b/Zend/tests/exception_before_fatal.phpt
index 1109097e1f..7a1399fb7a 100644
--- a/Zend/tests/exception_before_fatal.phpt
+++ b/Zend/tests/exception_before_fatal.phpt
@@ -10,38 +10,38 @@ set_error_handler("exception_error_handler");
try {
$foo->a();
-} catch(BaseException $e) {
+} catch(Throwable $e) {
var_dump($e->getMessage());
}
try {
new $foo();
-} catch(BaseException $e) {
+} catch(Throwable $e) {
var_dump($e->getMessage());
}
try {
throw $foo;
-} catch(BaseException $e) {
+} catch(Throwable $e) {
var_dump($e->getMessage());
}
try {
$foo();
-} catch(BaseException $e) {
+} catch(Throwable $e) {
var_dump($e->getMessage());
}
try {
$foo::b();
-} catch(BaseException $e) {
+} catch(Throwable $e) {
var_dump($e->getMessage());
}
try {
$b = clone $foo;
-} catch(BaseException $e) {
+} catch(Throwable $e) {
var_dump($e->getMessage());
}
@@ -50,7 +50,7 @@ class b {
try {
b::$foo();
-} catch(BaseException $e) {
+} catch(Throwable $e) {
var_dump($e->getMessage());
}
?>
diff --git a/Zend/tests/generators/aborted_yield_during_new.phpt b/Zend/tests/generators/aborted_yield_during_new.phpt
new file mode 100644
index 0000000000..957b251aad
--- /dev/null
+++ b/Zend/tests/generators/aborted_yield_during_new.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Aborted yield during object instantiation
+--FILE--
+<?php
+
+class Foo {
+ public function __construct() {}
+}
+
+function gen() {
+ $x = new Foo(yield);
+}
+
+gen()->rewind();
+
+?>
+===DONE===
+--EXPECT--
+===DONE===
diff --git a/Zend/tests/generators/bug63066.phpt b/Zend/tests/generators/bug63066.phpt
index a12eb0a809..3237c8a7a3 100644
--- a/Zend/tests/generators/bug63066.phpt
+++ b/Zend/tests/generators/bug63066.phpt
@@ -13,7 +13,7 @@ foreach(gen(new stdClass()) as $value)
--EXPECTF--
foo
-Fatal error: Uncaught EngineException: Call to undefined method stdClass::fatalError() in %sbug63066.php:5
+Fatal error: Uncaught Error: Call to undefined method stdClass::fatalError() in %sbug63066.php:5
Stack trace:
#0 %s(%d): gen(Object(stdClass))
#1 {main}
diff --git a/Zend/tests/generators/bug65161.phpt b/Zend/tests/generators/bug65161.phpt
index 8c838cbdd3..ea0d65a857 100644
--- a/Zend/tests/generators/bug65161.phpt
+++ b/Zend/tests/generators/bug65161.phpt
@@ -17,7 +17,7 @@ foreach (testGenerator() as $i);
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to undefined function foo() in %s:%d
+Fatal error: Uncaught Error: Call to undefined function foo() in %s:%d
Stack trace:
#0 [internal function]: autoload('SyntaxError')
#1 %s(%d): spl_autoload_call('SyntaxError')
diff --git a/Zend/tests/generators/bug67497.phpt b/Zend/tests/generators/bug67497.phpt
index 63e535d331..edbd578da5 100644
--- a/Zend/tests/generators/bug67497.phpt
+++ b/Zend/tests/generators/bug67497.phpt
@@ -10,7 +10,7 @@ function gen() {
try {
eval('abc');
-} catch (ParseException $ex) {
+} catch (ParseError $ex) {
}
$values = gen();
diff --git a/Zend/tests/generators/clone.phpt b/Zend/tests/generators/clone.phpt
index e6720e70c1..1e8da25136 100644
--- a/Zend/tests/generators/clone.phpt
+++ b/Zend/tests/generators/clone.phpt
@@ -12,7 +12,7 @@ clone $gen;
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Trying to clone an uncloneable object of class Generator in %s:%d
+Fatal error: Uncaught Error: Trying to clone an uncloneable object of class Generator in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/generators/errors/generator_instantiate_error.phpt b/Zend/tests/generators/errors/generator_instantiate_error.phpt
index 4244e9a90d..7e55fe357d 100644
--- a/Zend/tests/generators/errors/generator_instantiate_error.phpt
+++ b/Zend/tests/generators/errors/generator_instantiate_error.phpt
@@ -7,7 +7,7 @@ new Generator;
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: The "Generator" class is reserved for internal use and cannot be manually instantiated in %s:%d
+Fatal error: Uncaught Error: The "Generator" class is reserved for internal use and cannot be manually instantiated in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/generators/errors/resume_running_generator_error.phpt b/Zend/tests/generators/errors/resume_running_generator_error.phpt
index 48ad1e8df9..07dad42b01 100644
--- a/Zend/tests/generators/errors/resume_running_generator_error.phpt
+++ b/Zend/tests/generators/errors/resume_running_generator_error.phpt
@@ -7,7 +7,7 @@ function gen() {
$gen = yield;
try {
$gen->next();
- } catch (EngineException $e) {
+ } catch (Error $e) {
echo "\nException: " . $e->getMessage() . "\n";
}
$gen->next();
@@ -21,7 +21,7 @@ $gen->next();
--EXPECTF--
Exception: Cannot resume an already running generator
-Fatal error: Uncaught EngineException: Cannot resume an already running generator in %s:%d
+Fatal error: Uncaught Error: Cannot resume an already running generator in %s:%d
Stack trace:
#0 %s(%d): Generator->next()
#1 [internal function]: gen()
diff --git a/Zend/tests/generators/errors/yield_in_force_closed_finally_error.phpt b/Zend/tests/generators/errors/yield_in_force_closed_finally_error.phpt
index a9f56af041..af84e50215 100644
--- a/Zend/tests/generators/errors/yield_in_force_closed_finally_error.phpt
+++ b/Zend/tests/generators/errors/yield_in_force_closed_finally_error.phpt
@@ -26,7 +26,7 @@ unset($gen);
before yield
before yield in finally
-Fatal error: Uncaught EngineException: Cannot yield from finally in a force-closed generator in %s:%d
+Fatal error: Uncaught Error: Cannot yield from finally in a force-closed generator in %s:%d
Stack trace:
#0 %s(%d): gen()
#1 {main}
diff --git a/Zend/tests/generators/throw_not_an_exception.phpt b/Zend/tests/generators/throw_not_an_exception.phpt
index 29f25252a8..920d8eb847 100644
--- a/Zend/tests/generators/throw_not_an_exception.phpt
+++ b/Zend/tests/generators/throw_not_an_exception.phpt
@@ -12,7 +12,7 @@ $gen->throw(new stdClass);
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Exceptions must be valid objects derived from the Exception base class in %s:%d
+Fatal error: Uncaught Error: Cannot throw objects that do not implement Throwable in %s:%d
Stack trace:
#0 [internal function]: gen()
#1 %s(%d): Generator->throw(Object(stdClass))
diff --git a/Zend/tests/generators/yield_from_already_running.phpt b/Zend/tests/generators/yield_from_already_running.phpt
index 2242542525..5f2654dd6b 100644
--- a/Zend/tests/generators/yield_from_already_running.phpt
+++ b/Zend/tests/generators/yield_from_already_running.phpt
@@ -11,7 +11,7 @@ function gen() {
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Impossible to yield from the Generator being currently run in %s:%d
+Fatal error: Uncaught Error: Impossible to yield from the Generator being currently run in %s:%d
Stack trace:
#0 [internal function]: gen()
#1 %s(%d): Generator->send(Object(Generator))
diff --git a/Zend/tests/indirect_call_array_001.phpt b/Zend/tests/indirect_call_array_001.phpt
index f9075496fb..d76837c8eb 100644
--- a/Zend/tests/indirect_call_array_001.phpt
+++ b/Zend/tests/indirect_call_array_001.phpt
@@ -8,7 +8,7 @@ $arr();
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Class 'a' not found in %s:%d
+Fatal error: Uncaught Error: Class 'a' not found in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/indirect_call_array_002.phpt b/Zend/tests/indirect_call_array_002.phpt
index 2492793139..5ef12f5cfb 100644
--- a/Zend/tests/indirect_call_array_002.phpt
+++ b/Zend/tests/indirect_call_array_002.phpt
@@ -8,7 +8,7 @@ $arr();
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to undefined method stdClass::b() in %s:%d
+Fatal error: Uncaught Error: Call to undefined method stdClass::b() in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/indirect_method_call_002.phpt b/Zend/tests/indirect_method_call_002.phpt
index ec3df8f268..059061f211 100644
--- a/Zend/tests/indirect_method_call_002.phpt
+++ b/Zend/tests/indirect_method_call_002.phpt
@@ -29,7 +29,7 @@ string(7) "testing"
string(3) "foo"
NULL
-Fatal error: Uncaught EngineException: Call to undefined method foo::www() in %s:%d
+Fatal error: Uncaught Error: Call to undefined method foo::www() in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/list_005.phpt b/Zend/tests/list_005.phpt
index f03cf0a404..7dc3bf6fa3 100644
--- a/Zend/tests/list_005.phpt
+++ b/Zend/tests/list_005.phpt
@@ -44,7 +44,7 @@ NULL
NULL
----
-Fatal error: Uncaught EngineException: Cannot use object of type stdClass as array in %s:%d
+Fatal error: Uncaught Error: Cannot use object of type stdClass as array in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/list_007.phpt b/Zend/tests/list_007.phpt
index 62de5c318c..67c65245cc 100644
--- a/Zend/tests/list_007.phpt
+++ b/Zend/tests/list_007.phpt
@@ -9,7 +9,7 @@ var_dump($x, $y);
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot use object of type Closure as array in %slist_007.php:3
+Fatal error: Uncaught Error: Cannot use object of type Closure as array in %slist_007.php:3
Stack trace:
#0 {main}
thrown in %slist_007.php on line 3
diff --git a/Zend/tests/methods-on-non-objects-catch.phpt b/Zend/tests/methods-on-non-objects-catch.phpt
index 5e946161c1..2082433181 100644
--- a/Zend/tests/methods-on-non-objects-catch.phpt
+++ b/Zend/tests/methods-on-non-objects-catch.phpt
@@ -9,7 +9,7 @@ set_error_handler(function($code, $message) {
$x= null;
try {
var_dump($x->method());
-} catch (EngineException $e) {
+} catch (Error $e) {
var_dump($e->getCode(), $e->getMessage());
}
echo "Alive\n";
diff --git a/Zend/tests/methods-on-non-objects-usort.phpt b/Zend/tests/methods-on-non-objects-usort.phpt
index cb50d22561..d52a0fddb5 100644
--- a/Zend/tests/methods-on-non-objects-usort.phpt
+++ b/Zend/tests/methods-on-non-objects-usort.phpt
@@ -11,7 +11,7 @@ $list= [1, 4, 2, 3, -1];
usort($list, function($a, $b) use ($comparator) {
try {
return $comparator->compare($a, $b);
- } catch (EngineException $e) {
+ } catch (Error $e) {
var_dump($e->getCode(), $e->getMessage());
return 0;
}
diff --git a/Zend/tests/methods-on-non-objects.phpt b/Zend/tests/methods-on-non-objects.phpt
index 892424519f..13002c94a3 100644
--- a/Zend/tests/methods-on-non-objects.phpt
+++ b/Zend/tests/methods-on-non-objects.phpt
@@ -9,7 +9,7 @@ echo "Should not get here!\n";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to a member function method() on null in %s:%d
+Fatal error: Uncaught Error: Call to a member function method() on null in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/mul_001.phpt b/Zend/tests/mul_001.phpt
index 4c00c9cc76..d5843eef5f 100644
--- a/Zend/tests/mul_001.phpt
+++ b/Zend/tests/mul_001.phpt
@@ -8,7 +8,7 @@ $b = array(1);
try {
var_dump($a * $b);
-} catch (EngineException $e) {
+} catch (Error $e) {
echo "\nException: " . $e->getMessage() . "\n";
}
@@ -20,7 +20,7 @@ echo "Done\n";
--EXPECTF--
Exception: Unsupported operand types
-Fatal error: Uncaught EngineException: Unsupported operand types in %s:%d
+Fatal error: Uncaught Error: Unsupported operand types in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/not_002.phpt b/Zend/tests/not_002.phpt
index 7e1dafeaab..e59049c2a2 100644
--- a/Zend/tests/not_002.phpt
+++ b/Zend/tests/not_002.phpt
@@ -8,7 +8,7 @@ $b = array(1,2);
try {
var_dump(~$b);
-} catch (EngineException $e) {
+} catch (Error $e) {
echo "\nException: " . $e->getMessage() . "\n";
}
@@ -20,7 +20,7 @@ echo "Done\n";
--EXPECTF--
Exception: Unsupported operand types
-Fatal error: Uncaught EngineException: Unsupported operand types in %s:%d
+Fatal error: Uncaught Error: Unsupported operand types in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/ns_004.phpt b/Zend/tests/ns_004.phpt
index 542251a6e0..44b618cd70 100644
--- a/Zend/tests/ns_004.phpt
+++ b/Zend/tests/ns_004.phpt
@@ -6,7 +6,7 @@ namespace test\ns1;
echo get_class(new Exception()),"\n";
--EXPECTF--
-Fatal error: Uncaught EngineException: Class 'test\ns1\Exception' not found in %sns_004.php:%d
+Fatal error: Uncaught Error: Class 'test\ns1\Exception' not found in %sns_004.php:%d
Stack trace:
#0 {main}
thrown in %sns_004.php on line %d \ No newline at end of file
diff --git a/Zend/tests/ns_026.phpt b/Zend/tests/ns_026.phpt
index 7e4d14ede6..b8f8c3f83d 100644
--- a/Zend/tests/ns_026.phpt
+++ b/Zend/tests/ns_026.phpt
@@ -32,7 +32,7 @@ Method - Foo\Foo::__construct
Method - Foo\Foo::Bar
Func - Foo\Bar
-Fatal error: Uncaught EngineException: Call to undefined function Foo\Foo\Bar() in %sns_026.php:%d
+Fatal error: Uncaught Error: Call to undefined function Foo\Foo\Bar() in %sns_026.php:%d
Stack trace:
#0 {main}
thrown in %sns_026.php on line %d \ No newline at end of file
diff --git a/Zend/tests/ns_038.phpt b/Zend/tests/ns_038.phpt
index f40eb07c8d..9cef33d82b 100644
--- a/Zend/tests/ns_038.phpt
+++ b/Zend/tests/ns_038.phpt
@@ -11,7 +11,7 @@ function foo() {
--EXPECTF--
ok
-Fatal error: Uncaught EngineException: Call to undefined method Exception::bar() in %sns_038.php:7
+Fatal error: Uncaught Error: Call to undefined method Exception::bar() in %sns_038.php:7
Stack trace:
#0 {main}
thrown in %sns_038.php on line 7
diff --git a/Zend/tests/ns_057.phpt b/Zend/tests/ns_057.phpt
index 006b113e2e..639687ee0a 100644
--- a/Zend/tests/ns_057.phpt
+++ b/Zend/tests/ns_057.phpt
@@ -56,7 +56,7 @@ const ok
class ok
ok
-Fatal error: Uncaught EngineException: Undefined constant 'Test\ns1\unknown' in %sns_057.php:%d
+Fatal error: Uncaught Error: Undefined constant 'Test\ns1\unknown' in %sns_057.php:%d
Stack trace:
#0 {main}
thrown in %sns_057.php on line %d \ No newline at end of file
diff --git a/Zend/tests/ns_058.phpt b/Zend/tests/ns_058.phpt
index 77a4c71391..54e84aa030 100644
--- a/Zend/tests/ns_058.phpt
+++ b/Zend/tests/ns_058.phpt
@@ -54,7 +54,7 @@ const ok
class ok
ok
-Fatal error: Uncaught EngineException: Undefined constant 'unknown' in %sns_058.php:%d
+Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_058.php:%d
Stack trace:
#0 {main}
thrown in %sns_058.php on line %d
diff --git a/Zend/tests/ns_071.phpt b/Zend/tests/ns_071.phpt
index 7dbca07b8d..2f2fcfad1a 100644
--- a/Zend/tests/ns_071.phpt
+++ b/Zend/tests/ns_071.phpt
@@ -18,7 +18,7 @@ new bar(new \stdclass);
--EXPECTF--
NULL
-Fatal error: Uncaught TypeException: Argument 1 passed to foo\bar::__construct() must be of the type array, object given, called in %s on line %d and defined in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to foo\bar::__construct() must be of the type array, object given, called in %s on line %d and defined in %s:%d
Stack trace:
#0 %s(%d): foo\bar->__construct(Object(stdClass))
#1 {main}
diff --git a/Zend/tests/ns_072.phpt b/Zend/tests/ns_072.phpt
index c797cf0fac..6375682890 100644
--- a/Zend/tests/ns_072.phpt
+++ b/Zend/tests/ns_072.phpt
@@ -30,7 +30,7 @@ object(foo\test)#%d (0) {
}
NULL
-Fatal error: Uncaught TypeException: Argument 1 passed to foo\bar::__construct() must implement interface foo\foo, instance of stdClass given, called in %s on line %d and defined in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to foo\bar::__construct() must implement interface foo\foo, instance of stdClass given, called in %s on line %d and defined in %s:%d
Stack trace:
#0 %s(%d): foo\bar->__construct(Object(stdClass))
#1 {main}
diff --git a/Zend/tests/ns_076.phpt b/Zend/tests/ns_076.phpt
index 53df5d8077..1468654d55 100644
--- a/Zend/tests/ns_076.phpt
+++ b/Zend/tests/ns_076.phpt
@@ -22,7 +22,7 @@ array(1) {
%s(7) "unknown"
}
-Fatal error: Uncaught EngineException: Undefined constant 'unknown' in %sns_076.php:%d
+Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_076.php:%d
Stack trace:
#0 {main}
thrown in %sns_076.php on line %d
diff --git a/Zend/tests/ns_077_1.phpt b/Zend/tests/ns_077_1.phpt
index fdcf6cf954..b59f8172ea 100644
--- a/Zend/tests/ns_077_1.phpt
+++ b/Zend/tests/ns_077_1.phpt
@@ -10,7 +10,7 @@ function foo($a = array(0 => \unknown))
foo();
--EXPECTF--
-Fatal error: Uncaught EngineException: Undefined constant 'unknown' in %sns_077_%d.php:%d
+Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_077_%d.php:%d
Stack trace:
#0 %s(%d): foo\foo()
#1 {main}
diff --git a/Zend/tests/ns_077_2.phpt b/Zend/tests/ns_077_2.phpt
index f64b80939f..d51350c56a 100644
--- a/Zend/tests/ns_077_2.phpt
+++ b/Zend/tests/ns_077_2.phpt
@@ -10,7 +10,7 @@ function foo($a = array(\unknown => unknown))
foo();
--EXPECTF--
-Fatal error: Uncaught EngineException: Undefined constant 'unknown' in %sns_077_%d.php:%d
+Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_077_%d.php:%d
Stack trace:
#0 %s(%d): foo\foo()
#1 {main}
diff --git a/Zend/tests/ns_077_3.phpt b/Zend/tests/ns_077_3.phpt
index 05d1c91c47..0e90195c05 100644
--- a/Zend/tests/ns_077_3.phpt
+++ b/Zend/tests/ns_077_3.phpt
@@ -10,7 +10,7 @@ function foo($a = array(namespace\unknown => unknown))
foo();
--EXPECTF--
-Fatal error: Uncaught EngineException: Undefined constant 'foo\unknown' in %sns_077_%d.php:%d
+Fatal error: Uncaught Error: Undefined constant 'foo\unknown' in %sns_077_%d.php:%d
Stack trace:
#0 %s(%d): foo\foo()
#1 {main}
diff --git a/Zend/tests/ns_077_4.phpt b/Zend/tests/ns_077_4.phpt
index ce30aeedcc..72c3233a63 100644
--- a/Zend/tests/ns_077_4.phpt
+++ b/Zend/tests/ns_077_4.phpt
@@ -10,7 +10,7 @@ function foo($a = array(0 => namespace\unknown))
foo();
--EXPECTF--
-Fatal error: Uncaught EngineException: Undefined constant 'foo\unknown' in %sns_077_%d.php:%d
+Fatal error: Uncaught Error: Undefined constant 'foo\unknown' in %sns_077_%d.php:%d
Stack trace:
#0 %s(%d): foo\foo()
#1 {main}
diff --git a/Zend/tests/ns_077_5.phpt b/Zend/tests/ns_077_5.phpt
index 230d2acc63..05235442e5 100644
--- a/Zend/tests/ns_077_5.phpt
+++ b/Zend/tests/ns_077_5.phpt
@@ -9,7 +9,7 @@ function foo($a = array(0 => \unknown))
foo();
--EXPECTF--
-Fatal error: Uncaught EngineException: Undefined constant 'unknown' in %sns_077_%d.php:%d
+Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_077_%d.php:%d
Stack trace:
#0 %s(%d): foo()
#1 {main}
diff --git a/Zend/tests/ns_077_6.phpt b/Zend/tests/ns_077_6.phpt
index 230d2acc63..05235442e5 100644
--- a/Zend/tests/ns_077_6.phpt
+++ b/Zend/tests/ns_077_6.phpt
@@ -9,7 +9,7 @@ function foo($a = array(0 => \unknown))
foo();
--EXPECTF--
-Fatal error: Uncaught EngineException: Undefined constant 'unknown' in %sns_077_%d.php:%d
+Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_077_%d.php:%d
Stack trace:
#0 %s(%d): foo()
#1 {main}
diff --git a/Zend/tests/ns_077_7.phpt b/Zend/tests/ns_077_7.phpt
index 069d825073..166bf31cc7 100644
--- a/Zend/tests/ns_077_7.phpt
+++ b/Zend/tests/ns_077_7.phpt
@@ -9,7 +9,7 @@ function foo($a = array(0 => namespace\unknown))
foo();
--EXPECTF--
-Fatal error: Uncaught EngineException: Undefined constant 'unknown' in %sns_077_%d.php:%d
+Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_077_%d.php:%d
Stack trace:
#0 %s(%d): foo()
#1 {main}
diff --git a/Zend/tests/ns_077_8.phpt b/Zend/tests/ns_077_8.phpt
index b271effecf..e081842460 100644
--- a/Zend/tests/ns_077_8.phpt
+++ b/Zend/tests/ns_077_8.phpt
@@ -9,7 +9,7 @@ function foo($a = array(namespace\unknown => unknown))
foo();
--EXPECTF--
-Fatal error: Uncaught EngineException: Undefined constant 'unknown' in %sns_077_%d.php:%d
+Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_077_%d.php:%d
Stack trace:
#0 %s(%d): foo()
#1 {main}
diff --git a/Zend/tests/ns_092.phpt b/Zend/tests/ns_092.phpt
index 1d063e65fb..21a1dd916a 100644
--- a/Zend/tests/ns_092.phpt
+++ b/Zend/tests/ns_092.phpt
@@ -64,7 +64,7 @@ Foo\Bar\fiz
Foo\Bar\biz
Foo\Bar\buz
-Fatal error: Uncaught EngineException: Call to undefined function Foo\Bar\A() in %sns_092.php:45
+Fatal error: Uncaught Error: Call to undefined function Foo\Bar\A() in %sns_092.php:45
Stack trace:
#0 {main}
thrown in %sns_092.php on line 45
diff --git a/Zend/tests/objects_017.phpt b/Zend/tests/objects_017.phpt
index 0f9f3daa13..ab992b682e 100644
--- a/Zend/tests/objects_017.phpt
+++ b/Zend/tests/objects_017.phpt
@@ -15,7 +15,7 @@ test()->test = 2;
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot access private property foo::$test in %s:%d
+Fatal error: Uncaught Error: Cannot access private property foo::$test in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/objects_022.phpt b/Zend/tests/objects_022.phpt
index 982b2d1a62..01f961bae1 100644
--- a/Zend/tests/objects_022.phpt
+++ b/Zend/tests/objects_022.phpt
@@ -36,7 +36,7 @@ object(bar)#%d (0) {
object(baz)#%d (0) {
}
-Fatal error: Uncaught TypeException: Argument 1 passed to foo::testFoo() must be an instance of foo, instance of stdClass given, called in %s on line %d and defined in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to foo::testFoo() must be an instance of foo, instance of stdClass given, called in %s on line %d and defined in %s:%d
Stack trace:
#0 %s(%d): foo->testFoo(Object(stdClass))
#1 {main}
diff --git a/Zend/tests/objects_025.phpt b/Zend/tests/objects_025.phpt
index 7f58696efb..8f7e961748 100644
--- a/Zend/tests/objects_025.phpt
+++ b/Zend/tests/objects_025.phpt
@@ -43,7 +43,7 @@ static - ok
non-static - ok
static - ok
-Fatal error: Uncaught EngineException: Method name must be a string in %s:%d
+Fatal error: Uncaught Error: Method name must be a string in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/objects_026.phpt b/Zend/tests/objects_026.phpt
index 2ea8785658..b347cf721c 100644
--- a/Zend/tests/objects_026.phpt
+++ b/Zend/tests/objects_026.phpt
@@ -10,7 +10,7 @@ try {
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Using $this when not in object context in %s:%d
+Fatal error: Uncaught Error: Using $this when not in object context in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/objects_029.phpt b/Zend/tests/objects_029.phpt
index b8a01af260..afccfa3d61 100644
--- a/Zend/tests/objects_029.phpt
+++ b/Zend/tests/objects_029.phpt
@@ -23,7 +23,7 @@ new foo;
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Access to undeclared static property: foo::$f in %s:%d
+Fatal error: Uncaught Error: Access to undeclared static property: foo::$f in %s:%d
Stack trace:
#0 %s(%d): foo->__construct()
#1 {main}
diff --git a/Zend/tests/objects_030.phpt b/Zend/tests/objects_030.phpt
index 35db8528d0..c42babc183 100644
--- a/Zend/tests/objects_030.phpt
+++ b/Zend/tests/objects_030.phpt
@@ -23,7 +23,7 @@ new foo;
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Access to undeclared static property: bar::$f in %s:%d
+Fatal error: Uncaught Error: Access to undeclared static property: bar::$f in %s:%d
Stack trace:
#0 %s(%d): foo->__construct()
#1 {main}
diff --git a/Zend/tests/offset_assign.phpt b/Zend/tests/offset_assign.phpt
index b1d7fe444f..caa717935f 100644
--- a/Zend/tests/offset_assign.phpt
+++ b/Zend/tests/offset_assign.phpt
@@ -10,7 +10,7 @@ echo "Done\n";
--EXPECTF--
Warning: Illegal string offset 'x' in %soffset_assign.php on line %d
-Fatal error: Uncaught EngineException: Cannot use string offset as an array in %soffset_assign.php:%d
+Fatal error: Uncaught Error: Cannot use string offset as an array in %soffset_assign.php:%d
Stack trace:
#0 {main}
thrown in %soffset_assign.php on line %d
diff --git a/Zend/tests/offset_object.phpt b/Zend/tests/offset_object.phpt
index a4f970c636..7ab636b6a8 100644
--- a/Zend/tests/offset_object.phpt
+++ b/Zend/tests/offset_object.phpt
@@ -8,7 +8,7 @@ var_dump($object[1]);
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot use object of type stdClass as array in %s:%d
+Fatal error: Uncaught Error: Cannot use object of type stdClass as array in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/parent_class_name_without_parent.phpt b/Zend/tests/parent_class_name_without_parent.phpt
index f5ed611756..622aefeab0 100644
--- a/Zend/tests/parent_class_name_without_parent.phpt
+++ b/Zend/tests/parent_class_name_without_parent.phpt
@@ -17,7 +17,7 @@ class C {
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot use "parent" when current class scope has no parent in %s:5
+Fatal error: Uncaught Error: Cannot use "parent" when current class scope has no parent in %s:5
Stack trace:
#0 %s(%d): C->f()
#1 {main}
diff --git a/Zend/tests/require_parse_exception.phpt b/Zend/tests/require_parse_exception.phpt
index c1de21a4de..db6844c2ea 100644
--- a/Zend/tests/require_parse_exception.phpt
+++ b/Zend/tests/require_parse_exception.phpt
@@ -8,7 +8,7 @@ allow_url_include=1
function test_parse_error($code) {
try {
require 'data://text/plain;base64,' . base64_encode($code);
- } catch (ParseException $e) {
+ } catch (ParseError $e) {
echo $e->getMessage(), " on line ", $e->getLine(), "\n";
}
}
diff --git a/Zend/tests/return_types/001.phpt b/Zend/tests/return_types/001.phpt
index 2d2966aed3..13bf93f4df 100644
--- a/Zend/tests/return_types/001.phpt
+++ b/Zend/tests/return_types/001.phpt
@@ -9,7 +9,7 @@ function test1() : array {
test1();
--EXPECTF--
-Fatal error: Uncaught TypeException: Return value of test1() must be of the type array, none returned in %s:%d
+Fatal error: Uncaught TypeError: Return value of test1() must be of the type array, none returned in %s:%d
Stack trace:
#0 %s(%d): test1()
#1 {main}
diff --git a/Zend/tests/return_types/002.phpt b/Zend/tests/return_types/002.phpt
index 92553ee89e..5921634553 100644
--- a/Zend/tests/return_types/002.phpt
+++ b/Zend/tests/return_types/002.phpt
@@ -10,7 +10,7 @@ function test1() : array {
test1();
--EXPECTF--
-Fatal error: Uncaught TypeException: Return value of test1() must be of the type array, null returned in %s:%d
+Fatal error: Uncaught TypeError: Return value of test1() must be of the type array, null returned in %s:%d
Stack trace:
#0 %s(%d): test1()
#1 {main}
diff --git a/Zend/tests/return_types/003.phpt b/Zend/tests/return_types/003.phpt
index 20dd8bff62..e12e215de2 100644
--- a/Zend/tests/return_types/003.phpt
+++ b/Zend/tests/return_types/003.phpt
@@ -9,7 +9,7 @@ function test1() : array {
test1();
--EXPECTF--
-Fatal error: Uncaught TypeException: Return value of test1() must be of the type array, integer returned in %s:%d
+Fatal error: Uncaught TypeError: Return value of test1() must be of the type array, integer returned in %s:%d
Stack trace:
#0 %s(%d): test1()
#1 {main}
diff --git a/Zend/tests/return_types/004.phpt b/Zend/tests/return_types/004.phpt
index f7a4b3dea2..7865eb9d4d 100644
--- a/Zend/tests/return_types/004.phpt
+++ b/Zend/tests/return_types/004.phpt
@@ -10,7 +10,7 @@ function test1() : array {
test1();
--EXPECTF--
-Fatal error: Uncaught TypeException: Return value of test1() must be of the type array, string returned in %s:%d
+Fatal error: Uncaught TypeError: Return value of test1() must be of the type array, string returned in %s:%d
Stack trace:
#0 %s(%d): test1()
#1 {main}
diff --git a/Zend/tests/return_types/005.phpt b/Zend/tests/return_types/005.phpt
index edf54db07c..a114b3ee93 100644
--- a/Zend/tests/return_types/005.phpt
+++ b/Zend/tests/return_types/005.phpt
@@ -15,7 +15,7 @@ $qux = new qux();
$qux->foo();
--EXPECTF--
-Fatal error: Uncaught TypeException: Return value of qux::foo() must be an instance of foo, instance of qux returned in %s:%d
+Fatal error: Uncaught TypeError: Return value of qux::foo() must be an instance of foo, instance of qux returned in %s:%d
Stack trace:
#0 %s(%d): qux->foo()
#1 {main}
diff --git a/Zend/tests/return_types/010.phpt b/Zend/tests/return_types/010.phpt
index ce297b01b1..1a117d0cbc 100644
--- a/Zend/tests/return_types/010.phpt
+++ b/Zend/tests/return_types/010.phpt
@@ -11,7 +11,7 @@ $array = [1, 2, 3];
var_dump(foo($array));
--EXPECTF--
-Fatal error: Uncaught TypeException: Return value of foo() must be of the type array, null returned in %s:%d
+Fatal error: Uncaught TypeError: Return value of foo() must be of the type array, null returned in %s:%d
Stack trace:
#0 %s(%d): foo(Array)
#1 {main}
diff --git a/Zend/tests/return_types/013.phpt b/Zend/tests/return_types/013.phpt
index b0acb36132..673a8f9dbc 100644
--- a/Zend/tests/return_types/013.phpt
+++ b/Zend/tests/return_types/013.phpt
@@ -16,7 +16,7 @@ $baz = new foo();
var_dump($func=$baz->bar(), $func());
--EXPECTF--
-Fatal error: Uncaught TypeException: Return value of foo::{closure}() must be of the type array, null returned in %s:%d
+Fatal error: Uncaught TypeError: Return value of foo::{closure}() must be of the type array, null returned in %s:%d
Stack trace:
#0 %s(%d): foo->{closure}()
#1 {main}
diff --git a/Zend/tests/return_types/028.phpt b/Zend/tests/return_types/028.phpt
index d820b25b0e..d2a78ede4a 100644
--- a/Zend/tests/return_types/028.phpt
+++ b/Zend/tests/return_types/028.phpt
@@ -11,7 +11,7 @@ function foo(): stdClass {
try {
foo();
-} catch (BaseException $e) {
+} catch (Error $e) {
print $e->getMessage();
}
diff --git a/Zend/tests/return_types/rfc001.phpt b/Zend/tests/return_types/rfc001.phpt
index de308ca26c..5a1d42b446 100644
--- a/Zend/tests/return_types/rfc001.phpt
+++ b/Zend/tests/return_types/rfc001.phpt
@@ -11,7 +11,7 @@ function get_config(): array {
get_config();
--EXPECTF--
-Fatal error: Uncaught TypeException: Return value of get_config() must be of the type array, integer returned in %s:%d
+Fatal error: Uncaught TypeError: Return value of get_config() must be of the type array, integer returned in %s:%d
Stack trace:
#0 %s(%d): get_config()
#1 {main}
diff --git a/Zend/tests/return_types/rfc003.phpt b/Zend/tests/return_types/rfc003.phpt
index 2beb6f3650..ae4c5b7f60 100644
--- a/Zend/tests/return_types/rfc003.phpt
+++ b/Zend/tests/return_types/rfc003.phpt
@@ -10,7 +10,7 @@ function foo(): DateTime {
foo();
--EXPECTF--
-Fatal error: Uncaught TypeException: Return value of foo() must be an instance of DateTime, null returned in %s:%d
+Fatal error: Uncaught TypeError: Return value of foo() must be an instance of DateTime, null returned in %s:%d
Stack trace:
#0 %s(%d): foo()
#1 {main}
diff --git a/Zend/tests/str_offset_002.phpt b/Zend/tests/str_offset_002.phpt
index 8e29980d67..2f5e4ee890 100644
--- a/Zend/tests/str_offset_002.phpt
+++ b/Zend/tests/str_offset_002.phpt
@@ -6,7 +6,7 @@ $a = "aaa";
$x = array(&$a[1]);
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot create references to/from string offsets in %sstr_offset_002.php:3
-Stack trace:
-#0 {main}
+Fatal error: Uncaught Error: Cannot create references to/from string offsets in %sstr_offset_002.php:3
+Stack trace:
+#0 {main}
thrown in %sstr_offset_002.php on line 3
diff --git a/Zend/tests/sub_001.phpt b/Zend/tests/sub_001.phpt
index 8a0e60f928..27091d1c5f 100644
--- a/Zend/tests/sub_001.phpt
+++ b/Zend/tests/sub_001.phpt
@@ -8,7 +8,7 @@ $b = array(1);
try {
var_dump($a - $b);
-} catch (EngineException $e) {
+} catch (Error $e) {
echo "\nException: " . $e->getMessage() . "\n";
}
@@ -20,7 +20,7 @@ echo "Done\n";
--EXPECTF--
Exception: Unsupported operand types
-Fatal error: Uncaught EngineException: Unsupported operand types in %s:%d
+Fatal error: Uncaught Error: Unsupported operand types in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/throwable_001.phpt b/Zend/tests/throwable_001.phpt
new file mode 100644
index 0000000000..afcdd7224c
--- /dev/null
+++ b/Zend/tests/throwable_001.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Test using an Error as the previous Throwable for an Exception
+--CREDITS--
+Aaron Piotrowski <aaron@icicle.io>
+--FILE--
+<?php
+throw new Exception('Exception message', 0, new Error('Error message'));
+?>
+--EXPECTF--
+
+Fatal error: Uncaught Error: Error message in %s:%d
+Stack trace:
+#0 {main}
+
+Next Exception: Exception message in %s:%d
+Stack trace:
+#0 {main}
+ thrown in %s on line %d
diff --git a/Zend/tests/throwable_002.phpt b/Zend/tests/throwable_002.phpt
new file mode 100644
index 0000000000..10fd82bea5
--- /dev/null
+++ b/Zend/tests/throwable_002.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Test using an Exception as the previous Throwable for an Error
+--CREDITS--
+Aaron Piotrowski <aaron@icicle.io>
+--FILE--
+<?php
+throw new Error('Error message', 0, new Exception('Exception message'));
+?>
+--EXPECTF--
+
+Fatal error: Uncaught Exception: Exception message in %s:%d
+Stack trace:
+#0 {main}
+
+Next Error: Error message in %s:%d
+Stack trace:
+#0 {main}
+ thrown in %s on line %d
diff --git a/Zend/tests/throwable_003.phpt b/Zend/tests/throwable_003.phpt
new file mode 100644
index 0000000000..19626a3186
--- /dev/null
+++ b/Zend/tests/throwable_003.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Test user code implementing Throwable results in fatal error
+--CREDITS--
+Aaron Piotrowski <aaron@icicle.io>
+--FILE--
+<?php
+class Failure implements Throwable {}
+?>
+--EXPECTF--
+
+Fatal error: Class Failure cannot implement interface Throwable, extend Exception or Error instead in %s on line %d
diff --git a/Zend/tests/traits/bug60173.phpt b/Zend/tests/traits/bug60173.phpt
index 88381ded5a..f525a66aee 100644
--- a/Zend/tests/traits/bug60173.phpt
+++ b/Zend/tests/traits/bug60173.phpt
@@ -9,7 +9,7 @@ $rc = new ReflectionClass('foo');
$rc->newInstance();
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot instantiate trait foo in %s:%d
+Fatal error: Uncaught Error: Cannot instantiate trait foo in %s:%d
Stack trace:
#0 %s(%d): ReflectionClass->newInstance()
#1 {main}
diff --git a/Zend/tests/traits/bugs/alias01.phpt b/Zend/tests/traits/bugs/alias01.phpt
index 7d0dfed187..4b89a54dda 100644
--- a/Zend/tests/traits/bugs/alias01.phpt
+++ b/Zend/tests/traits/bugs/alias01.phpt
@@ -23,7 +23,7 @@ T:m1
T:m1
T:m2
-Fatal error: Uncaught EngineException: Call to undefined method C1::a2() in %s:%d
+Fatal error: Uncaught Error: Call to undefined method C1::a2() in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/traits/error_007.phpt b/Zend/tests/traits/error_007.phpt
index 85c65e48ae..c015f6ea76 100644
--- a/Zend/tests/traits/error_007.phpt
+++ b/Zend/tests/traits/error_007.phpt
@@ -10,7 +10,7 @@ new abc;
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot instantiate trait abc in %s:%d
+Fatal error: Uncaught Error: Cannot instantiate trait abc in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/traits/error_012.phpt b/Zend/tests/traits/error_012.phpt
index ba1055e161..50a454c324 100644
--- a/Zend/tests/traits/error_012.phpt
+++ b/Zend/tests/traits/error_012.phpt
@@ -16,7 +16,7 @@ var_dump($x->test());
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to protected method bar::test() from context '' in %s:%d
+Fatal error: Uncaught Error: Call to protected method bar::test() from context '' in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/traits/language008a.phpt b/Zend/tests/traits/language008a.phpt
index 34bfd38a58..0d7a694d57 100644
--- a/Zend/tests/traits/language008a.phpt
+++ b/Zend/tests/traits/language008a.phpt
@@ -20,7 +20,7 @@ $o->sayHello();
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to protected method MyClass::sayHello() from context '' in %s:%d
+Fatal error: Uncaught Error: Call to protected method MyClass::sayHello() from context '' in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d \ No newline at end of file
diff --git a/Zend/tests/traits/language008b.phpt b/Zend/tests/traits/language008b.phpt
index e3c099f74e..8f745126e3 100644
--- a/Zend/tests/traits/language008b.phpt
+++ b/Zend/tests/traits/language008b.phpt
@@ -27,7 +27,7 @@ $o->sayHelloWorld();
?>
--EXPECTF--
Hello World!Hello World!
-Fatal error: Uncaught EngineException: Call to private method MyClass::sayHelloWorld() from context '' in %s:%d
+Fatal error: Uncaught Error: Call to private method MyClass::sayHelloWorld() from context '' in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d \ No newline at end of file
diff --git a/Zend/tests/typehints/explicit_weak_include_strict.phpt b/Zend/tests/typehints/explicit_weak_include_strict.phpt
index 579ebcb3c0..fb53d8ce11 100644
--- a/Zend/tests/typehints/explicit_weak_include_strict.phpt
+++ b/Zend/tests/typehints/explicit_weak_include_strict.phpt
@@ -11,7 +11,7 @@ require 'weak_include_strict_2.inc';
// calls within that file should stay strict, despite being included by weak file
?>
--EXPECTF--
-Fatal error: Uncaught TypeException: Argument 1 passed to takes_int() must be of the type integer, float given, called in %sweak_include_strict_2.inc on line 9 and defined in %sweak_include_strict_2.inc:5
+Fatal error: Uncaught TypeError: Argument 1 passed to takes_int() must be of the type integer, float given, called in %sweak_include_strict_2.inc on line 9 and defined in %sweak_include_strict_2.inc:5
Stack trace:
#0 %s(%d): takes_int(1)
#1 %s(%d): require('%s')
diff --git a/Zend/tests/typehints/inexistent_class_hint_with_scalar_arg.phpt b/Zend/tests/typehints/inexistent_class_hint_with_scalar_arg.phpt
new file mode 100644
index 0000000000..3bacf826d5
--- /dev/null
+++ b/Zend/tests/typehints/inexistent_class_hint_with_scalar_arg.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Inexistent class as typehint receiving scalar argument
+--FILE--
+<?php
+
+function foo(bar $ex) {}
+foo(null);
+
+?>
+--EXPECTF--
+Fatal error: Uncaught TypeError: Argument 1 passed to foo() must be an instance of bar, null given, called in %s on line %d and defined in %s:%d
+Stack trace:
+#0 %s(%d): foo(NULL)
+#1 {main}
+ thrown in %s on line %d
+
diff --git a/Zend/tests/typehints/internal_function_strict_mode.phpt b/Zend/tests/typehints/internal_function_strict_mode.phpt
index 3e5629af95..f501c2b75f 100644
--- a/Zend/tests/typehints/internal_function_strict_mode.phpt
+++ b/Zend/tests/typehints/internal_function_strict_mode.phpt
@@ -7,21 +7,21 @@ declare(strict_types=1);
echo "*** Trying Ord With Integer" . PHP_EOL;
try {
var_dump(ord(1));
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo "*** Caught " . $e->getMessage() . PHP_EOL;
}
echo "*** Trying Array Map With Invalid Callback" . PHP_EOL;
try {
array_map([null, "bar"], []);
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo "*** Caught " . $e->getMessage() . PHP_EOL;
}
echo "*** Trying Strlen With Float" . PHP_EOL;
try {
var_dump(strlen(1.5));
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo "*** Caught " . $e->getMessage() . PHP_EOL;
}
diff --git a/Zend/tests/typehints/scalar_basic.phpt b/Zend/tests/typehints/scalar_basic.phpt
index 08a0121bbe..f27dc2b885 100644
--- a/Zend/tests/typehints/scalar_basic.phpt
+++ b/Zend/tests/typehints/scalar_basic.phpt
@@ -51,7 +51,7 @@ foreach ($functions as $type => $function) {
var_dump($value);
try {
var_dump($function($value));
- } catch (\TypeException $e) {
+ } catch (\TypeError $e) {
echo "*** Caught " . $e->getMessage() . PHP_EOL;
}
}
diff --git a/Zend/tests/typehints/scalar_constant_defaults_error.phpt b/Zend/tests/typehints/scalar_constant_defaults_error.phpt
index 4e037bafb3..f341d205af 100644
--- a/Zend/tests/typehints/scalar_constant_defaults_error.phpt
+++ b/Zend/tests/typehints/scalar_constant_defaults_error.phpt
@@ -13,7 +13,7 @@ var_dump(int_val());
?>
--EXPECTF--
-Fatal error: Uncaught TypeException: Argument 1 passed to int_val() must be of the type integer, string given, called in %s on line %d and defined in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to int_val() must be of the type integer, string given, called in %s on line %d and defined in %s:%d
Stack trace:
#0 %s(%d): int_val()
#1 {main}
diff --git a/Zend/tests/typehints/scalar_none.phpt b/Zend/tests/typehints/scalar_none.phpt
index af6d8c8dfa..5a98377022 100644
--- a/Zend/tests/typehints/scalar_none.phpt
+++ b/Zend/tests/typehints/scalar_none.phpt
@@ -28,7 +28,7 @@ foreach ($functions as $type => $function) {
echo "Testing $type:", PHP_EOL;
try {
var_dump($function());
- } catch (TypeException $e) {
+ } catch (TypeError $e) {
echo "*** Caught " . $e->getMessage() . PHP_EOL;
}
}
diff --git a/Zend/tests/typehints/scalar_null.phpt b/Zend/tests/typehints/scalar_null.phpt
index e149388ef0..f409e34867 100644
--- a/Zend/tests/typehints/scalar_null.phpt
+++ b/Zend/tests/typehints/scalar_null.phpt
@@ -28,7 +28,7 @@ foreach ($functions as $type => $function) {
echo "Testing $type:", PHP_EOL;
try {
var_dump($function(null));
- } catch (TypeException $e) {
+ } catch (TypeError $e) {
echo "*** Caught " . $e->getMessage() . PHP_EOL;
}
}
diff --git a/Zend/tests/typehints/scalar_return_basic.phpt b/Zend/tests/typehints/scalar_return_basic.phpt
index 76b01a8c89..b01a930485 100644
--- a/Zend/tests/typehints/scalar_return_basic.phpt
+++ b/Zend/tests/typehints/scalar_return_basic.phpt
@@ -54,7 +54,7 @@ foreach ($functions as $type => $function) {
var_dump($value);
try {
var_dump($function($value));
- } catch (TypeException $e) {
+ } catch (TypeError $e) {
echo "*** Caught " . $e->getMessage() . PHP_EOL;
}
}
diff --git a/Zend/tests/typehints/scalar_return_basic_64bit.phpt b/Zend/tests/typehints/scalar_return_basic_64bit.phpt
index edb5231dc0..6994817404 100644
--- a/Zend/tests/typehints/scalar_return_basic_64bit.phpt
+++ b/Zend/tests/typehints/scalar_return_basic_64bit.phpt
@@ -54,7 +54,7 @@ foreach ($functions as $type => $function) {
var_dump($value);
try {
var_dump($function($value));
- } catch (TypeException $e) {
+ } catch (TypeError $e) {
echo "*** Caught " . $e->getMessage() . PHP_EOL;
}
}
diff --git a/Zend/tests/typehints/scalar_strict.phpt b/Zend/tests/typehints/scalar_strict.phpt
index e0f89f95b1..59ec45ac4f 100644
--- a/Zend/tests/typehints/scalar_strict.phpt
+++ b/Zend/tests/typehints/scalar_strict.phpt
@@ -55,7 +55,7 @@ foreach ($functions as $type => $function) {
var_dump($value);
try {
var_dump($function($value));
- } catch (TypeException $e) {
+ } catch (TypeError $e) {
echo "*** Caught " . $e->getMessage() . PHP_EOL;
}
}
diff --git a/Zend/tests/typehints/scalar_strict_64bit.phpt b/Zend/tests/typehints/scalar_strict_64bit.phpt
index da3e1e4546..4671b07609 100644
--- a/Zend/tests/typehints/scalar_strict_64bit.phpt
+++ b/Zend/tests/typehints/scalar_strict_64bit.phpt
@@ -55,7 +55,7 @@ foreach ($functions as $type => $function) {
var_dump($value);
try {
var_dump($function($value));
- } catch (TypeException $e) {
+ } catch (TypeError $e) {
echo "*** Caught " . $e->getMessage() . PHP_EOL;
}
}
diff --git a/Zend/tests/typehints/scalar_strict_basic.phpt b/Zend/tests/typehints/scalar_strict_basic.phpt
index d56af159d7..15030e1c86 100644
--- a/Zend/tests/typehints/scalar_strict_basic.phpt
+++ b/Zend/tests/typehints/scalar_strict_basic.phpt
@@ -54,7 +54,7 @@ foreach ($functions as $type => $function) {
echo PHP_EOL . "*** Trying ", type($value), " value", PHP_EOL;
try {
var_dump($function($value));
- } catch (TypeException $e) {
+ } catch (TypeError $e) {
echo "*** Caught " . $e->getMessage() . PHP_EOL;
}
}
diff --git a/Zend/tests/typehints/strict_call_weak.phpt b/Zend/tests/typehints/strict_call_weak.phpt
index 5031644a7f..e3a606ec12 100644
--- a/Zend/tests/typehints/strict_call_weak.phpt
+++ b/Zend/tests/typehints/strict_call_weak.phpt
@@ -13,7 +13,7 @@ require 'strict_call_weak_2.inc';
function_declared_in_weak_mode(1.0);
?>
--EXPECTF--
-Fatal error: Uncaught TypeException: Argument 1 passed to function_declared_in_weak_mode() must be of the type integer, float given, called in %sstrict_call_weak.php on line 10 and defined in %sstrict_call_weak_2.inc:5
+Fatal error: Uncaught TypeError: Argument 1 passed to function_declared_in_weak_mode() must be of the type integer, float given, called in %sstrict_call_weak.php on line 10 and defined in %sstrict_call_weak_2.inc:5
Stack trace:
#0 %s(%d): function_declared_in_weak_mode(1)
#1 {main}
diff --git a/Zend/tests/typehints/strict_call_weak_explicit.phpt b/Zend/tests/typehints/strict_call_weak_explicit.phpt
index 37f527bb0b..22c5b4319c 100644
--- a/Zend/tests/typehints/strict_call_weak_explicit.phpt
+++ b/Zend/tests/typehints/strict_call_weak_explicit.phpt
@@ -13,7 +13,7 @@ require 'strict_call_weak_explicit_2.inc';
function_declared_in_weak_mode(1.0);
?>
--EXPECTF--
-Fatal error: Uncaught TypeException: Argument 1 passed to function_declared_in_weak_mode() must be of the type integer, float given, called in %sstrict_call_weak_explicit.php on line 10 and defined in %sstrict_call_weak_explicit_2.inc:5
+Fatal error: Uncaught TypeError: Argument 1 passed to function_declared_in_weak_mode() must be of the type integer, float given, called in %sstrict_call_weak_explicit.php on line 10 and defined in %sstrict_call_weak_explicit_2.inc:5
Stack trace:
#0 %s(%d): function_declared_in_weak_mode(1)
#1 {main}
diff --git a/Zend/tests/typehints/weak_include_strict.phpt b/Zend/tests/typehints/weak_include_strict.phpt
index da7c7a4d13..e49485dbe5 100644
--- a/Zend/tests/typehints/weak_include_strict.phpt
+++ b/Zend/tests/typehints/weak_include_strict.phpt
@@ -11,7 +11,7 @@ require 'weak_include_strict_2.inc';
// calls within that file should stay strict, despite being included by weak file
?>
--EXPECTF--
-Fatal error: Uncaught TypeException: Argument 1 passed to takes_int() must be of the type integer, float given, called in %sweak_include_strict_2.inc on line 9 and defined in %sweak_include_strict_2.inc:5
+Fatal error: Uncaught TypeError: Argument 1 passed to takes_int() must be of the type integer, float given, called in %sweak_include_strict_2.inc on line 9 and defined in %sweak_include_strict_2.inc:5
Stack trace:
#0 %s(%d): takes_int(1)
#1 %s(%d): require('%s')
diff --git a/Zend/tests/use_const/no_global_fallback.phpt b/Zend/tests/use_const/no_global_fallback.phpt
index 6db4be5d99..3adebd68f5 100644
--- a/Zend/tests/use_const/no_global_fallback.phpt
+++ b/Zend/tests/use_const/no_global_fallback.phpt
@@ -10,7 +10,7 @@ var_dump(baz);
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Undefined constant 'foo\bar\baz' in %s:%d
+Fatal error: Uncaught Error: Undefined constant 'foo\bar\baz' in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/use_function/no_global_fallback.phpt b/Zend/tests/use_function/no_global_fallback.phpt
index 2b57524a0a..1277d4e2c2 100644
--- a/Zend/tests/use_function/no_global_fallback.phpt
+++ b/Zend/tests/use_function/no_global_fallback.phpt
@@ -10,7 +10,7 @@ var_dump(baz());
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to undefined function foo\bar\baz() in %s:%d
+Fatal error: Uncaught Error: Call to undefined function foo\bar\baz() in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/use_function/no_global_fallback2.phpt b/Zend/tests/use_function/no_global_fallback2.phpt
index 294e7e8697..cf6026f56a 100644
--- a/Zend/tests/use_function/no_global_fallback2.phpt
+++ b/Zend/tests/use_function/no_global_fallback2.phpt
@@ -15,7 +15,7 @@ namespace foo {
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to undefined function bar\test() in %s:%d
+Fatal error: Uncaught Error: Call to undefined function bar\test() in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/varSyntax/method_call_on_string_literal.phpt b/Zend/tests/varSyntax/method_call_on_string_literal.phpt
index 34760a24be..40f48d1973 100644
--- a/Zend/tests/varSyntax/method_call_on_string_literal.phpt
+++ b/Zend/tests/varSyntax/method_call_on_string_literal.phpt
@@ -5,7 +5,7 @@ Method call on string literal
"string"->length();
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to a member function length() on string in %s:%d
+Fatal error: Uncaught Error: Call to a member function length() on string in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/varSyntax/tempDimFetchByRefError.phpt b/Zend/tests/varSyntax/tempDimFetchByRefError.phpt
index adf9601300..6a52acb99f 100644
--- a/Zend/tests/varSyntax/tempDimFetchByRefError.phpt
+++ b/Zend/tests/varSyntax/tempDimFetchByRefError.phpt
@@ -8,7 +8,7 @@ $fn([0, 1][0]);
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot use temporary expression in write context in %s:%d
+Fatal error: Uncaught Error: Cannot use temporary expression in write context in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/varSyntax/tempPropFetchByRefError.phpt b/Zend/tests/varSyntax/tempPropFetchByRefError.phpt
index eaba8ad2c6..2f1b3a9cdb 100644
--- a/Zend/tests/varSyntax/tempPropFetchByRefError.phpt
+++ b/Zend/tests/varSyntax/tempPropFetchByRefError.phpt
@@ -8,7 +8,7 @@ $fn([0, 1]->prop);
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot use temporary expression in write context in %s:%d
+Fatal error: Uncaught Error: Cannot use temporary expression in write context in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/variadic/typehint_error.phpt b/Zend/tests/variadic/typehint_error.phpt
index 2cbe2f32a2..26842bbcc2 100644
--- a/Zend/tests/variadic/typehint_error.phpt
+++ b/Zend/tests/variadic/typehint_error.phpt
@@ -33,7 +33,7 @@ array(3) {
}
}
-Fatal error: Uncaught TypeException: Argument 3 passed to test() must be of the type array, integer given, called in %s:%d
+Fatal error: Uncaught TypeError: Argument 3 passed to test() must be of the type array, integer given, called in %s:%d
Stack trace:
#0 %s(%d): test(Array, Array, 2)
#1 {main}
diff --git a/Zend/tests/variadic/typehint_suppressed_error.phpt b/Zend/tests/variadic/typehint_suppressed_error.phpt
index 5879de6d95..24109e0891 100644
--- a/Zend/tests/variadic/typehint_suppressed_error.phpt
+++ b/Zend/tests/variadic/typehint_suppressed_error.phpt
@@ -9,7 +9,7 @@ function test(array... $args) {
try {
test([0], [1], 2);
-} catch(EngineException $e) {
+} catch(Error $e) {
var_dump($e->getMessage());
}
diff --git a/Zend/tests/vm_stack_with_arg_extend.phpt b/Zend/tests/vm_stack_with_arg_extend.phpt
new file mode 100644
index 0000000000..10f3639d21
--- /dev/null
+++ b/Zend/tests/vm_stack_with_arg_extend.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Ensure valid vm_stack even when it needed to be copied to a new page
+--FILE--
+<?php
+
+function f(...$args) {
+ var_dump(count($args));
+}
+(function(){
+ $a = array_fill(0, 1024, true);
+ f(...$a);
+ yield;
+})()->valid();
+
+?>
+--EXPECT--
+int(1024)
diff --git a/Zend/zend.c b/Zend/zend.c
index 3bd0d6e714..7fd6f7fc7b 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -882,7 +882,7 @@ void zenderror(const char *error) /* {{{ */
return;
}
- zend_throw_exception(zend_get_parse_exception(), error, E_PARSE);
+ zend_throw_exception(zend_get_parse_error(), error, E_PARSE);
}
/* }}} */
@@ -1059,7 +1059,7 @@ static void zend_error_va_list(int type, const char *format, va_list args)
va_start(args, format);
#endif
zend_vspprintf(&message, 0, format, args);
- zend_throw_exception(zend_get_engine_exception(), message, type);
+ zend_throw_exception(zend_get_error(), message, type);
efree(message);
#if !defined(HAVE_NORETURN) || defined(HAVE_NORETURN_ALIAS)
va_end(args);
@@ -1318,7 +1318,7 @@ ZEND_API void zend_type_error(const char *format, ...) /* {{{ */
va_start(va, format);
zend_vspprintf(&message, 0, format, va);
- zend_throw_exception(zend_get_type_exception(), message, E_ERROR);
+ zend_throw_exception(zend_get_type_error(), message, E_ERROR);
efree(message);
va_end(va);
} /* }}} */
@@ -1331,7 +1331,7 @@ ZEND_API void zend_internal_type_error(zend_bool throw_exception, const char *fo
va_start(va, format);
zend_vspprintf(&message, 0, format, va);
if (throw_exception) {
- zend_throw_exception(zend_get_type_exception(), message, E_ERROR);
+ zend_throw_exception(zend_get_type_error(), message, E_ERROR);
} else {
zend_error(E_WARNING, message);
}
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 3a83f5f7f3..a1f4ef6618 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -458,16 +458,7 @@ ZEND_API int ZEND_FASTCALL zend_parse_arg_str_weak(zval *arg, zend_string **dest
*dest = Z_STR_P(arg);
return 1;
}
- }
- /* Standard PHP objects */
- if (Z_OBJ_HT_P(arg) == &std_object_handlers || !Z_OBJ_HANDLER_P(arg, cast_object)) {
- SEPARATE_ZVAL_NOREF(arg);
- if (zend_std_cast_object_tostring(arg, arg, IS_STRING) == SUCCESS) {
- *dest = Z_STR_P(arg);
- return 1;
- }
- }
- if (!Z_OBJ_HANDLER_P(arg, cast_object) && Z_OBJ_HANDLER_P(arg, get)) {
+ } else if (Z_OBJ_HANDLER_P(arg, get)) {
zval rv;
zval *z = Z_OBJ_HANDLER_P(arg, get)(arg, &rv);
@@ -476,7 +467,7 @@ ZEND_API int ZEND_FASTCALL zend_parse_arg_str_weak(zval *arg, zend_string **dest
zval_dtor(arg);
ZVAL_NULL(arg);
if (!zend_make_printable_zval(z, arg)) {
- ZVAL_ZVAL(arg, z, 1, 1);
+ ZVAL_COPY_VALUE(arg, z);
}
*dest = Z_STR_P(arg);
return 1;
diff --git a/Zend/zend_API.h b/Zend/zend_API.h
index 7de97ff336..83e5265fd4 100644
--- a/Zend/zend_API.h
+++ b/Zend/zend_API.h
@@ -68,9 +68,9 @@ typedef struct _zend_fcall_info_cache {
#define ZEND_FUNCTION(name) ZEND_NAMED_FUNCTION(ZEND_FN(name))
#define ZEND_METHOD(classname, name) ZEND_NAMED_FUNCTION(ZEND_MN(classname##_##name))
-#define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_arg_info)-1), flags },
+#define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags },
-#define ZEND_RAW_FENTRY(zend_name, name, arg_info, flags) { zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_arg_info)-1), flags },
+#define ZEND_RAW_FENTRY(zend_name, name, arg_info, flags) { zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags },
#define ZEND_RAW_NAMED_FE(zend_name, name, arg_info) ZEND_RAW_FENTRY(#zend_name, name, arg_info, 0)
#define ZEND_NAMED_FE(zend_name, name, arg_info) ZEND_FENTRY(zend_name, name, arg_info, 0)
@@ -593,20 +593,17 @@ END_EXTERN_C()
zval *__z = (z); \
zval *__zv = (zv); \
if (EXPECTED(!Z_ISREF_P(__zv))) { \
- ZVAL_COPY_VALUE(__z, __zv); \
- } else { \
- ZVAL_COPY_VALUE(__z, \
- Z_REFVAL_P(__zv)); \
- } \
- if (copy) { \
- zval_opt_copy_ctor(__z); \
- } \
- if (dtor) { \
- if (!copy) { \
- ZVAL_NULL(__zv); \
+ if (copy && !dtor) { \
+ ZVAL_COPY(__z, __zv); \
+ } else { \
+ ZVAL_COPY_VALUE(__z, __zv); \
+ } \
+ } else { \
+ ZVAL_COPY(__z, Z_REFVAL_P(__zv)); \
+ if (dtor || !copy) { \
+ zval_ptr_dtor(__zv); \
} \
- zval_ptr_dtor(__zv); \
- } \
+ } \
} while (0)
#define RETVAL_BOOL(b) ZVAL_BOOL(return_value, b)
@@ -645,18 +642,6 @@ END_EXTERN_C()
#define RETURN_FALSE { RETVAL_FALSE; return; }
#define RETURN_TRUE { RETVAL_TRUE; return; }
-#define RETVAL_ZVAL_FAST(z) do { \
- zval *_z = (z); \
- if (Z_ISREF_P(_z)) { \
- RETVAL_ZVAL(_z, 1, 0); \
- } else { \
- zval_ptr_dtor(return_value); \
- ZVAL_COPY(return_value, _z); \
- } \
-} while (0)
-
-#define RETURN_ZVAL_FAST(z) { RETVAL_ZVAL_FAST(z); return; }
-
#define HASH_OF(p) (Z_TYPE_P(p)==IS_ARRAY ? Z_ARRVAL_P(p) : ((Z_TYPE_P(p)==IS_OBJECT ? Z_OBJ_HT_P(p)->get_properties((p)) : NULL)))
#define ZVAL_IS_NULL(z) (Z_TYPE_P(z) == IS_NULL)
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index 2d47b643c3..f788737bf4 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -478,12 +478,10 @@ static void zend_mm_munmap(void *addr, size_t size)
/* number of trailing set (1) bits */
static zend_always_inline int zend_mm_bitset_nts(zend_mm_bitset bitset)
{
-#if defined(__GNUC__)
-# if SIZEOF_ZEND_LONG == SIZEOF_LONG
+#if (defined(__GNUC__) || __has_builtin(__builtin_ctzl)) && SIZEOF_ZEND_LONG == SIZEOF_LONG
return __builtin_ctzl(~bitset);
-# else
+#elif defined(__GNUC__) || __has_builtin(__builtin_ctzll)
return __builtin_ctzll(~bitset);
-# endif
#elif defined(_WIN32)
unsigned long index;
@@ -519,12 +517,10 @@ static zend_always_inline int zend_mm_bitset_nts(zend_mm_bitset bitset)
/* number of trailing zero bits (0x01 -> 1; 0x40 -> 6; 0x00 -> LEN) */
static zend_always_inline int zend_mm_bitset_ntz(zend_mm_bitset bitset)
{
-#if defined(__GNUC__)
-# if SIZEOF_ZEND_LONG == SIZEOF_LONG
+#if (defined(__GNUC__) || __has_builtin(__builtin_ctzl)) && SIZEOF_ZEND_LONG == SIZEOF_LONG
return __builtin_ctzl(bitset);
-# else
+#elif defined(__GNUC__) || __has_builtin(__builtin_ctzll)
return __builtin_ctzll(bitset);
-# endif
#elif defined(_WIN32)
unsigned long index;
@@ -1120,7 +1116,7 @@ static zend_always_inline void zend_mm_free_large(zend_mm_heap *heap, zend_mm_ch
/* higher set bit number (0->N/A, 1->1, 2->2, 4->3, 8->4, 127->7, 128->8 etc) */
static zend_always_inline int zend_mm_small_size_to_bit(int size)
{
-#if defined(__GNUC__)
+#if defined(__GNUC__) || __has_builtin(__builtin_clz)
return (__builtin_clz(size) ^ 0x1f) + 1;
#elif defined(_WIN32)
unsigned long index;
diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c
index aad9b64ffc..fe78bfd31b 100644
--- a/Zend/zend_ast.c
+++ b/Zend/zend_ast.c
@@ -394,7 +394,12 @@ ZEND_API int zend_ast_evaluate(zval *result, zend_ast *ast, zend_class_entry *sc
zval tmp;
zend_fetch_dimension_by_zval(&tmp, &op1, &op2);
- ZVAL_ZVAL(result, &tmp, 1, 1);
+ if (UNEXPECTED(Z_ISREF(tmp))) {
+ ZVAL_DUP(result, Z_REFVAL(tmp));
+ } else {
+ ZVAL_DUP(result, &tmp);
+ }
+ zval_ptr_dtor(&tmp);
zval_dtor(&op1);
zval_dtor(&op2);
}
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index 6b65bdd330..8ea758adcc 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -459,7 +459,8 @@ ZEND_FUNCTION(func_get_arg)
} else {
arg = ZEND_CALL_ARG(ex, requested_offset + 1);
}
- RETURN_ZVAL_FAST(arg);
+ ZVAL_DEREF(arg);
+ ZVAL_COPY(return_value, arg);
}
/* }}} */
@@ -1150,6 +1151,12 @@ ZEND_FUNCTION(get_object_vars)
if (!zobj->ce->default_properties_count && properties == zobj->properties) {
/* fast copy */
+ if (EXPECTED(zobj->handlers == &std_object_handlers)) {
+ if (EXPECTED(!(GC_FLAGS(properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(properties)++;
+ }
+ RETURN_ARR(properties);
+ }
RETURN_ARR(zend_array_dup(properties));
} else {
array_init_size(return_value, zend_hash_num_elements(properties));
@@ -1686,7 +1693,7 @@ ZEND_FUNCTION(set_error_handler)
}
if (Z_TYPE(EG(user_error_handler)) != IS_UNDEF) {
- RETVAL_ZVAL(&EG(user_error_handler), 1, 0);
+ ZVAL_COPY(return_value, &EG(user_error_handler));
zend_stack_push(&EG(user_error_handlers_error_reporting), &EG(user_error_handler_error_reporting));
zend_stack_push(&EG(user_error_handlers), &EG(user_error_handler));
@@ -1697,7 +1704,7 @@ ZEND_FUNCTION(set_error_handler)
return;
}
- ZVAL_DUP(&EG(user_error_handler), error_handler);
+ ZVAL_COPY(&EG(user_error_handler), error_handler);
EG(user_error_handler_error_reporting) = (int)error_type;
}
/* }}} */
@@ -1754,7 +1761,7 @@ ZEND_FUNCTION(set_exception_handler)
}
if (Z_TYPE(EG(user_exception_handler)) != IS_UNDEF) {
- RETVAL_ZVAL(&EG(user_exception_handler), 1, 0);
+ ZVAL_COPY(return_value, &EG(user_exception_handler));
zend_stack_push(&EG(user_exception_handlers), &EG(user_exception_handler));
}
@@ -1764,7 +1771,7 @@ ZEND_FUNCTION(set_exception_handler)
return;
}
- ZVAL_DUP(&EG(user_exception_handler), exception_handler);
+ ZVAL_COPY(&EG(user_exception_handler), exception_handler);
}
/* }}} */
diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c
index 2eeaec639d..4e642ffb1c 100644
--- a/Zend/zend_closures.c
+++ b/Zend/zend_closures.c
@@ -127,9 +127,19 @@ ZEND_METHOD(Closure, call)
my_function.common.scope = Z_OBJCE_P(newthis);
fci_cache.function_handler = &my_function;
+ /* Runtime cache relies on bound scope to be immutable, hence we need a separate rt cache in case scope changed */
+ if (ZEND_USER_CODE(my_function.type) && closure->func.common.scope != Z_OBJCE_P(newthis)) {
+ my_function.op_array.run_time_cache = emalloc(my_function.op_array.cache_size);
+ memset(my_function.op_array.run_time_cache, 0, my_function.op_array.cache_size);
+ }
+
if (zend_call_function(&fci, &fci_cache) == SUCCESS && Z_TYPE(closure_result) != IS_UNDEF) {
ZVAL_COPY_VALUE(return_value, &closure_result);
}
+
+ if (ZEND_USER_CODE(my_function.type) && closure->func.common.scope != Z_OBJCE_P(newthis)) {
+ efree(my_function.op_array.run_time_cache);
+ }
}
/* }}} */
@@ -138,7 +148,7 @@ ZEND_METHOD(Closure, call)
ZEND_METHOD(Closure, bind)
{
zval *newthis, *zclosure, *scope_arg = NULL;
- zend_closure *closure;
+ zend_closure *closure, *new_closure;
zend_class_entry *ce, *called_scope;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Oo!|z", &zclosure, zend_ce_closure, &newthis, &scope_arg) == FAILURE) {
@@ -183,6 +193,15 @@ ZEND_METHOD(Closure, bind)
}
zend_create_closure(return_value, &closure->func, ce, called_scope, newthis);
+ new_closure = (zend_closure *) Z_OBJ_P(return_value);
+
+ /* Runtime cache relies on bound scope to be immutable, hence we need a separate rt cache in case scope changed */
+ if (ZEND_USER_CODE(closure->func.type) && (closure->func.common.scope != new_closure->func.common.scope || (closure->func.op_array.fn_flags & ZEND_ACC_NO_RT_ARENA))) {
+ new_closure->func.op_array.run_time_cache = emalloc(new_closure->func.op_array.cache_size);
+ memset(new_closure->func.op_array.run_time_cache, 0, new_closure->func.op_array.cache_size);
+
+ new_closure->func.op_array.fn_flags |= ZEND_ACC_NO_RT_ARENA;
+ }
}
/* }}} */
@@ -210,10 +229,15 @@ ZEND_API zend_function *zend_get_closure_invoke_method(zend_object *object) /* {
/* We return ZEND_INTERNAL_FUNCTION, but arg_info representation is the
* same as for ZEND_USER_FUNCTION (uses zend_string* instead of char*).
* This is not a problem, because ZEND_ACC_HAS_TYPE_HINTS is never set,
- * and we won't check arguments on internal function */
+ * and we won't check arguments on internal function. We also set
+ * ZEND_ACC_USER_ARG_INFO flag to prevent invalid usage by Reflection */
invoke->type = ZEND_INTERNAL_FUNCTION;
invoke->internal_function.fn_flags =
ZEND_ACC_PUBLIC | ZEND_ACC_CALL_VIA_HANDLER | (closure->func.common.fn_flags & keep_flags);
+ if (closure->func.type != ZEND_INTERNAL_FUNCTION || (closure->func.common.fn_flags & ZEND_ACC_USER_ARG_INFO)) {
+ invoke->internal_function.fn_flags |=
+ ZEND_ACC_USER_ARG_INFO;
+ }
invoke->internal_function.handler = ZEND_MN(Closure___invoke);
invoke->internal_function.module = 0;
invoke->internal_function.scope = zend_ce_closure;
@@ -292,6 +316,10 @@ static void zend_closure_free_storage(zend_object *object) /* {{{ */
zend_object_std_dtor(&closure->std);
if (closure->func.type == ZEND_USER_FUNCTION) {
+ if (closure->func.op_array.fn_flags & ZEND_ACC_NO_RT_ARENA) {
+ efree(closure->func.op_array.run_time_cache);
+ closure->func.op_array.run_time_cache = NULL;
+ }
destroy_op_array(&closure->func.op_array);
}
@@ -487,7 +515,7 @@ ZEND_API void zend_create_closure(zval *res, zend_function *func, zend_class_ent
closure = (zend_closure *)Z_OBJ_P(res);
- closure->func = *func;
+ memcpy(&closure->func, func, func->type == ZEND_USER_FUNCTION ? sizeof(zend_op_array) : sizeof(zend_internal_function));
closure->func.common.prototype = (zend_function*)closure;
closure->func.common.fn_flags |= ZEND_ACC_CLOSURE;
@@ -505,7 +533,10 @@ ZEND_API void zend_create_closure(zval *res, zend_function *func, zend_class_ent
zend_hash_init(closure->func.op_array.static_variables, zend_hash_num_elements(static_variables), NULL, ZVAL_PTR_DTOR, 0);
zend_hash_apply_with_arguments(static_variables, zval_copy_static_var, 1, closure->func.op_array.static_variables);
}
- closure->func.op_array.run_time_cache = NULL;
+ if (UNEXPECTED(!closure->func.op_array.run_time_cache)) {
+ closure->func.op_array.run_time_cache = func->op_array.run_time_cache = zend_arena_alloc(&CG(arena), func->op_array.cache_size);
+ memset(func->op_array.run_time_cache, 0, func->op_array.cache_size);
+ }
if (closure->func.op_array.refcount) {
(*closure->func.op_array.refcount)++;
}
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index b3763e93a3..29018de4f7 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -855,8 +855,11 @@ zend_string *zend_resolve_class_name(zend_string *name, uint32_t type) /* {{{ */
zend_string *zend_resolve_class_name_ast(zend_ast *ast) /* {{{ */
{
- zend_string *name = zend_ast_get_str(ast);
- return zend_resolve_class_name(name, ast->attr);
+ zval *class_name = zend_ast_get_zval(ast);
+ if (Z_TYPE_P(class_name) != IS_STRING) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Illegal class name");
+ }
+ return zend_resolve_class_name(Z_STR_P(class_name), ast->attr);
}
/* }}} */
@@ -2029,7 +2032,6 @@ static zend_op *zend_delayed_compile_end(uint32_t offset) /* {{{ */
}
/* }}} */
-
static void zend_emit_return_type_check(znode *expr, zend_arg_info *return_info) /* {{{ */
{
if (return_info->type_hint != IS_UNDEF) {
@@ -2038,11 +2040,16 @@ static void zend_emit_return_type_check(znode *expr, zend_arg_info *return_info)
opline->result_type = expr->op_type = IS_TMP_VAR;
opline->result.var = expr->u.op.var = get_temporary_variable(CG(active_op_array));
}
+ if (return_info->class_name) {
+ opline->op2.num = CG(active_op_array)->cache_size;
+ CG(active_op_array)->cache_size += sizeof(void*);
+ } else {
+ opline->op2.num = -1;
+ }
}
}
/* }}} */
-
void zend_emit_final_return(zval *zv) /* {{{ */
{
znode zn;
@@ -2897,7 +2904,13 @@ int zend_compile_func_strlen(znode *result, zend_ast_list *args) /* {{{ */
}
zend_compile_expr(&arg_node, args->child[0]);
- zend_emit_op_tmp(result, ZEND_STRLEN, &arg_node, NULL);
+ if (arg_node.op_type == IS_CONST && Z_TYPE(arg_node.u.constant) == IS_STRING) {
+ result->op_type = IS_CONST;
+ ZVAL_LONG(&result->u.constant, Z_STRLEN(arg_node.u.constant));
+ zval_dtor(&arg_node.u.constant);
+ } else {
+ zend_emit_op_tmp(result, ZEND_STRLEN, &arg_node, NULL);
+ }
return SUCCESS;
}
/* }}} */
@@ -4213,7 +4226,6 @@ ZEND_API void zend_set_function_arg_flags(zend_function *func) /* {{{ */
}
/* }}} */
-
static void zend_compile_typename(zend_ast *ast, zend_arg_info *arg_info) /* {{{ */
{
if (ast->kind == ZEND_AST_TYPE) {
@@ -4241,7 +4253,6 @@ static void zend_compile_typename(zend_ast *ast, zend_arg_info *arg_info) /* {{{
}
/* }}} */
-
void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */
{
zend_ast_list *list = zend_ast_get_list(ast);
@@ -4379,7 +4390,29 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */
}
}
}
- }
+
+ /* Allocate cache slot to speed-up run-time class resolution */
+ if (opline->opcode == ZEND_RECV_INIT) {
+ if (arg_info->class_name) {
+ zend_alloc_cache_slot(opline->op2.constant);
+ } else {
+ Z_CACHE_SLOT(op_array->literals[opline->op2.constant]) = -1;
+ }
+ } else {
+ if (arg_info->class_name) {
+ opline->op2.num = op_array->cache_size;
+ op_array->cache_size += sizeof(void*);
+ } else {
+ opline->op2.num = -1;
+ }
+ }
+ } else {
+ if (opline->opcode == ZEND_RECV_INIT) {
+ Z_CACHE_SLOT(op_array->literals[opline->op2.constant]) = -1;
+ } else {
+ opline->op2.num = -1;
+ }
+ }
}
/* These are assigned at the end to avoid unitialized memory in case of an error */
@@ -4980,8 +5013,7 @@ void zend_compile_class_decl(zend_ast *ast) /* {{{ */
zend_ast *extends_ast = decl->child[0];
zend_ast *implements_ast = decl->child[1];
zend_ast *stmt_ast = decl->child[2];
-
- zend_string *name = decl->name, *lcname, *import_name = NULL;
+ zend_string *name, *lcname, *import_name = NULL;
zend_class_entry *ce = zend_arena_alloc(&CG(arena), sizeof(zend_class_entry));
zend_op *opline;
znode declare_node, extends_node;
@@ -4989,43 +5021,37 @@ void zend_compile_class_decl(zend_ast *ast) /* {{{ */
zend_class_entry *original_ce = CG(active_class_entry);
znode original_implementing_class = FC(implementing_class);
- if (decl->flags & ZEND_ACC_ANON_CLASS) {
- decl->name = name = zend_generate_anon_class_name(decl->lex_pos);
-
- /* Serialization is not supported for anonymous classes */
- ce->serialize = zend_class_serialize_deny;
- ce->unserialize = zend_class_unserialize_deny;
- }
-
- if (CG(active_class_entry) && !(decl->flags & ZEND_ACC_ANON_CLASS)) {
- zend_error_noreturn(E_COMPILE_ERROR, "Class declarations may not be nested");
- }
-
- zend_assert_valid_class_name(name);
+ if (EXPECTED((decl->flags & ZEND_ACC_ANON_CLASS) == 0)) {
+ if (CG(active_class_entry)) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Class declarations may not be nested");
+ }
+ name = decl->name;
+ zend_assert_valid_class_name(name);
+ lcname = zend_string_tolower(name);
+ if (FC(current_namespace)) {
+ name = zend_prefix_with_ns(name);
- lcname = zend_string_tolower(name);
+ zend_string_release(lcname);
+ lcname = zend_string_tolower(name);
+ } else {
+ zend_string_addref(name);
+ }
- if (FC(imports)) {
- import_name = zend_hash_find_ptr(FC(imports), lcname);
- }
+ if (FC(imports)) {
+ import_name = zend_hash_find_ptr(FC(imports), lcname);
+ }
- if (FC(current_namespace)) {
- name = zend_prefix_with_ns(name);
+ if (import_name && !zend_string_equals_ci(lcname, import_name)) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Cannot declare class %s "
+ "because the name is already in use", name->val);
+ }
- zend_string_release(lcname);
- lcname = zend_string_tolower(name);
+ name = zend_new_interned_string(name);
+ lcname = zend_new_interned_string(lcname);
} else {
- zend_string_addref(name);
+ lcname = name = zend_generate_anon_class_name(decl->lex_pos);
}
- if (import_name && !zend_string_equals_ci(lcname, import_name)) {
- zend_error_noreturn(E_COMPILE_ERROR, "Cannot declare class %s "
- "because the name is already in use", name->val);
- }
-
- name = zend_new_interned_string(name);
- lcname = zend_new_interned_string(lcname);
-
ce->type = ZEND_USER_CLASS;
ce->name = name;
zend_initialize_class_data(ce, 1);
@@ -5034,10 +5060,17 @@ void zend_compile_class_decl(zend_ast *ast) /* {{{ */
ce->info.user.filename = zend_get_compiled_filename();
ce->info.user.line_start = decl->start_lineno;
ce->info.user.line_end = decl->end_lineno;
+
if (decl->doc_comment) {
ce->info.user.doc_comment = zend_string_copy(decl->doc_comment);
}
+ if (UNEXPECTED((decl->flags & ZEND_ACC_ANON_CLASS))) {
+ /* Serialization is not supported for anonymous classes */
+ ce->serialize = zend_class_serialize_deny;
+ ce->unserialize = zend_class_unserialize_deny;
+ }
+
if (extends_ast) {
if (!zend_is_const_default_class_ref(extends_ast)) {
zend_string *extends_name = zend_ast_get_str(extends_ast);
@@ -5573,10 +5606,33 @@ static zend_bool zend_try_ct_eval_magic_const(zval *zv, zend_ast *ast) /* {{{ */
}
/* }}} */
-static inline void zend_ct_eval_binary_op(zval *result, uint32_t opcode, zval *op1, zval *op2) /* {{{ */
+static inline zend_bool zend_try_ct_eval_binary_op(zval *result, uint32_t opcode, zval *op1, zval *op2) /* {{{ */
{
binary_op_type fn = get_binary_op(opcode);
+
+ /* don't evaluate division by zero at compile-time */
+ if (opcode == ZEND_DIV) {
+ convert_scalar_to_number(op2);
+ if (Z_TYPE_P(op2) == IS_LONG) {
+ if (Z_LVAL_P(op2) == 0) {
+ return 0;
+ }
+ } else if (Z_TYPE_P(op2) == IS_DOUBLE) {
+ if (Z_DVAL_P(op2) == 0.0) {
+ return 0;
+ }
+ }
+ }
+
fn(result, op1, op2);
+ return 1;
+}
+/* }}} */
+
+static inline void zend_ct_eval_unary_op(zval *result, uint32_t opcode, zval *op) /* {{{ */
+{
+ unary_op_type fn = get_unary_op(opcode);
+ fn(result, op);
}
/* }}} */
@@ -5603,6 +5659,7 @@ static zend_bool zend_try_ct_eval_array(zval *result, zend_ast *ast) /* {{{ */
{
zend_ast_list *list = zend_ast_get_list(ast);
uint32_t i;
+ zend_bool is_constant = 1;
/* First ensure that *all* child nodes are constant and by-val */
for (i = 0; i < list->children; ++i) {
@@ -5614,10 +5671,14 @@ static zend_bool zend_try_ct_eval_array(zval *result, zend_ast *ast) /* {{{ */
if (by_ref || elem_ast->child[0]->kind != ZEND_AST_ZVAL
|| (elem_ast->child[1] && elem_ast->child[1]->kind != ZEND_AST_ZVAL)
) {
- return 0;
+ is_constant = 0;
}
}
+ if (!is_constant) {
+ return 0;
+ }
+
array_init_size(result, list->children);
for (i = 0; i < list->children; ++i) {
zend_ast *elem_ast = list->child[i];
@@ -5673,30 +5734,14 @@ void zend_compile_binary_op(znode *result, zend_ast *ast) /* {{{ */
zend_compile_expr(&right_node, right_ast);
if (left_node.op_type == IS_CONST && right_node.op_type == IS_CONST) {
- do {
- /* don't evaluate divsion by zero at compile-time */
- if (opcode == ZEND_DIV) {
- zval *op2 = &right_node.u.constant;
-
- convert_scalar_to_number(op2);
- if (Z_TYPE_P(op2) == IS_LONG) {
- if (Z_LVAL_P(op2) == 0) {
- break;
- }
- } else if (Z_TYPE_P(op2) == IS_DOUBLE) {
- if (Z_DVAL_P(op2) == 0.0) {
- break;
- }
- }
- }
-
+ if (zend_try_ct_eval_binary_op(&result->u.constant, opcode,
+ &left_node.u.constant, &right_node.u.constant)
+ ) {
result->op_type = IS_CONST;
- zend_ct_eval_binary_op(&result->u.constant, opcode,
- &left_node.u.constant, &right_node.u.constant);
zval_ptr_dtor(&left_node.u.constant);
zval_ptr_dtor(&right_node.u.constant);
return;
- } while (0);
+ }
}
do {
@@ -5773,6 +5818,14 @@ void zend_compile_unary_op(znode *result, zend_ast *ast) /* {{{ */
znode expr_node;
zend_compile_expr(&expr_node, expr_ast);
+ if (expr_node.op_type == IS_CONST) {
+ result->op_type = IS_CONST;
+ zend_ct_eval_unary_op(&result->u.constant, opcode,
+ &expr_node.u.constant);
+ zval_ptr_dtor(&expr_node.u.constant);
+ return;
+ }
+
zend_emit_op_tmp(result, opcode, &expr_node, NULL);
}
/* }}} */
@@ -5814,6 +5867,28 @@ void zend_compile_short_circuiting(znode *result, zend_ast *ast) /* {{{ */
zend_compile_expr(&left_node, left_ast);
+ if (left_node.op_type == IS_CONST) {
+ if ((ast->kind == ZEND_AST_AND && !zend_is_true(&left_node.u.constant))
+ || (ast->kind == ZEND_AST_OR && zend_is_true(&left_node.u.constant))) {
+ result->op_type = IS_CONST;
+ ZVAL_BOOL(&result->u.constant, zend_is_true(&left_node.u.constant));
+ } else {
+ zend_compile_expr(&right_node, right_ast);
+
+ if (right_node.op_type == IS_CONST) {
+ result->op_type = IS_CONST;
+ ZVAL_BOOL(&result->u.constant, zend_is_true(&right_node.u.constant));
+
+ zval_ptr_dtor(&right_node.u.constant);
+ } else {
+ zend_emit_op(result, ZEND_BOOL, &right_node, NULL);
+ }
+ }
+
+ zval_ptr_dtor(&left_node.u.constant);
+ return;
+ }
+
opnum_jmpz = get_next_op_number(CG(active_op_array));
opline_jmpz = zend_emit_op(NULL, ast->kind == ZEND_AST_AND ? ZEND_JMPZ_EX : ZEND_JMPNZ_EX,
&left_node, NULL);
@@ -5824,8 +5899,8 @@ void zend_compile_short_circuiting(znode *result, zend_ast *ast) /* {{{ */
opline_jmpz->result.var = get_temporary_variable(CG(active_op_array));
opline_jmpz->result_type = IS_TMP_VAR;
}
- GET_NODE(result, opline_jmpz->result);
+ GET_NODE(result, opline_jmpz->result);
zend_compile_expr(&right_node, right_ast);
opline_bool = zend_emit_op(NULL, ZEND_BOOL, &right_node, NULL);
@@ -7079,24 +7154,11 @@ void zend_eval_const_expr(zend_ast **ast_ptr) /* {{{ */
return;
}
- /* don't evaluate divsion by zero at compile-time */
- if (ast->attr == ZEND_DIV) {
- zval *op2 = zend_ast_get_zval(ast->child[1]);
-
- convert_scalar_to_number(op2);
- if (Z_TYPE_P(op2) == IS_LONG) {
- if (Z_LVAL_P(op2) == 0) {
- return;
- }
- } else if (Z_TYPE_P(op2) == IS_DOUBLE) {
- if (Z_DVAL_P(op2) == 0.0) {
- return;
- }
- }
+ if (!zend_try_ct_eval_binary_op(&result, ast->attr,
+ zend_ast_get_zval(ast->child[0]), zend_ast_get_zval(ast->child[1]))
+ ) {
+ return;
}
-
- zend_ct_eval_binary_op(&result, ast->attr,
- zend_ast_get_zval(ast->child[0]), zend_ast_get_zval(ast->child[1]));
break;
case ZEND_AST_GREATER:
case ZEND_AST_GREATER_EQUAL:
@@ -7109,6 +7171,39 @@ void zend_eval_const_expr(zend_ast **ast_ptr) /* {{{ */
zend_ct_eval_greater(&result, ast->kind,
zend_ast_get_zval(ast->child[0]), zend_ast_get_zval(ast->child[1]));
break;
+ case ZEND_AST_AND:
+ case ZEND_AST_OR:
+ {
+ int i;
+ for (i = 0; i <= 1; i++) {
+ zend_eval_const_expr(&ast->child[i]);
+ if (ast->child[i]->kind == ZEND_AST_ZVAL) {
+ if (zend_is_true(zend_ast_get_zval(ast->child[i])) == (ast->kind == ZEND_AST_OR)) {
+ ZVAL_BOOL(&result, ast->kind == ZEND_AST_OR);
+ return;
+ }
+ }
+ }
+
+ if (ast->child[0]->kind != ZEND_AST_ZVAL || ast->child[1]->kind != ZEND_AST_ZVAL) {
+ return;
+ }
+
+ if (ast->kind == ZEND_AST_OR) {
+ ZVAL_BOOL(&result, zend_is_true(zend_ast_get_zval(ast->child[0])) || zend_is_true(zend_ast_get_zval(ast->child[1])));
+ } else {
+ ZVAL_BOOL(&result, zend_is_true(zend_ast_get_zval(ast->child[0])) && zend_is_true(zend_ast_get_zval(ast->child[1])));
+ }
+ break;
+ }
+ case ZEND_AST_UNARY_OP:
+ zend_eval_const_expr(&ast->child[0]);
+ if (ast->child[0]->kind != ZEND_AST_ZVAL) {
+ return;
+ }
+
+ zend_ct_eval_unary_op(&result, ast->attr, zend_ast_get_zval(ast->child[0]));
+ break;
case ZEND_AST_UNARY_PLUS:
case ZEND_AST_UNARY_MINUS:
zend_eval_const_expr(&ast->child[0]);
@@ -7116,9 +7211,90 @@ void zend_eval_const_expr(zend_ast **ast_ptr) /* {{{ */
return;
}
- zend_ct_eval_unary_pm(&result, ast->kind,
- zend_ast_get_zval(ast->child[0]));
+ zend_ct_eval_unary_pm(&result, ast->kind, zend_ast_get_zval(ast->child[0]));
+ break;
+ case ZEND_AST_CONDITIONAL:
+ {
+ zend_ast **child, *child_ast;
+ zend_eval_const_expr(&ast->child[0]);
+ if (ast->child[0]->kind != ZEND_AST_ZVAL) {
+ /* ensure everything was compile-time evaluated at least once */
+ if (ast->child[1]) {
+ zend_eval_const_expr(&ast->child[1]);
+ }
+ zend_eval_const_expr(&ast->child[2]);
+ return;
+ }
+
+ child = &ast->child[2 - zend_is_true(zend_ast_get_zval(ast->child[0]))];
+ if (*child == NULL) {
+ child--;
+ }
+ child_ast = *child;
+ *child = NULL;
+ zend_ast_destroy(ast);
+ *ast_ptr = child_ast;
+ zend_eval_const_expr(ast_ptr);
+ return;
+ }
+ case ZEND_AST_DIM:
+ {
+ /* constant expression should be always read context ... */
+
+ zval *container, *dim;
+
+ zend_eval_const_expr(&ast->child[0]);
+ zend_eval_const_expr(&ast->child[1]);
+ if (ast->child[0]->kind != ZEND_AST_ZVAL || ast->child[1]->kind != ZEND_AST_ZVAL) {
+ return;
+ }
+
+ container = zend_ast_get_zval(ast->child[0]);
+ dim = zend_ast_get_zval(ast->child[1]);
+
+ if (Z_TYPE_P(container) == IS_ARRAY) {
+ zval *el;
+ if (Z_TYPE_P(dim) == IS_LONG) {
+ el = zend_hash_index_find(Z_ARR_P(container), Z_LVAL_P(dim));
+ if (el) {
+ ZVAL_COPY(&result, el);
+ } else {
+ return;
+ }
+ } else if (Z_TYPE_P(dim) == IS_STRING) {
+ el = zend_symtable_find(Z_ARR_P(container), Z_STR_P(dim));
+ if (el) {
+ ZVAL_COPY(&result, el);
+ } else {
+ return;
+ }
+ } else {
+ return; /* warning... handle at runtime */
+ }
+ } else if (Z_TYPE_P(container) == IS_STRING) {
+ zend_long offset;
+ zend_uchar c;
+ if (Z_TYPE_P(dim) == IS_LONG) {
+ offset = Z_LVAL_P(dim);
+ } else if (Z_TYPE_P(dim) != IS_STRING || is_numeric_string(Z_STRVAL_P(dim), Z_STRLEN_P(dim), &offset, NULL, 1) != IS_LONG) {
+ return;
+ }
+ if (offset < 0 || offset >= Z_STRLEN_P(container)) {
+ return;
+ }
+ c = (zend_uchar) Z_STRVAL_P(container)[offset];
+ if (CG(one_char_string)[c]) {
+ ZVAL_INTERNED_STR(&result, CG(one_char_string)[c]);
+ } else {
+ ZVAL_NEW_STR(&result, zend_string_init((char *) &c, 1, 0));
+ }
+ } else if (Z_TYPE_P(container) <= IS_FALSE) {
+ ZVAL_NULL(&result);
+ } else {
+ return;
+ }
break;
+ }
case ZEND_AST_ARRAY:
if (!zend_try_ct_eval_array(&result, ast)) {
return;
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h
index d258289a13..5da420b704 100644
--- a/Zend/zend_compile.h
+++ b/Zend/zend_compile.h
@@ -214,6 +214,9 @@ typedef struct _zend_try_catch_element {
#define ZEND_ACC_DTOR 0x4000
#define ZEND_ACC_CLONE 0x8000
+/* method flag used by Closure::__invoke() */
+#define ZEND_ACC_USER_ARG_INFO 0x80
+
/* method flag (bc only), any method that has this flag can be used statically and non statically. */
#define ZEND_ACC_ALLOW_STATIC 0x10000
@@ -237,6 +240,8 @@ typedef struct _zend_try_catch_element {
#define ZEND_ACC_CLOSURE 0x100000
#define ZEND_ACC_GENERATOR 0x800000
+#define ZEND_ACC_NO_RT_ARENA 0x80000
+
/* call through user function trampoline. e.g. __call, __callstatic */
#define ZEND_ACC_CALL_VIA_TRAMPOLINE 0x200000
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index e8c0706cf0..f157abb155 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -30,33 +30,56 @@
#include "zend_dtrace.h"
#include "zend_smart_str.h"
-static zend_class_entry *base_exception_ce;
+ZEND_API zend_class_entry *zend_ce_throwable;
+
static zend_class_entry *default_exception_ce;
static zend_class_entry *error_exception_ce;
-static zend_class_entry *engine_exception_ce;
-static zend_class_entry *parse_exception_ce;
-static zend_class_entry *type_exception_ce;
+static zend_class_entry *error_ce;
+static zend_class_entry *parse_error_ce;
+static zend_class_entry *type_error_ce;
static zend_object_handlers default_exception_handlers;
ZEND_API void (*zend_throw_exception_hook)(zval *ex);
+/* {{{ zend_implement_throwable */
+static int zend_implement_throwable(zend_class_entry *interface, zend_class_entry *class_type)
+{
+ if (instanceof_function(class_type, default_exception_ce) || instanceof_function(class_type, error_ce)) {
+ return SUCCESS;
+ }
+ zend_error_noreturn(E_ERROR, "Class %s cannot implement interface %s, extend %s or %s instead",
+ class_type->name->val,
+ interface->name->val,
+ default_exception_ce->name->val,
+ error_ce->name->val);
+ return FAILURE;
+}
+/* }}} */
+
+static inline zend_class_entry *zend_get_exception_base(zval *object)
+{
+ return instanceof_function(Z_OBJCE_P(object), default_exception_ce) ? default_exception_ce : error_ce;
+}
+
void zend_exception_set_previous(zend_object *exception, zend_object *add_previous)
{
zval tmp, *previous, zv, *pzv, rv;
+ zend_class_entry *base_ce;
if (exception == add_previous || !add_previous || !exception) {
return;
}
ZVAL_OBJ(&tmp, add_previous);
- if (!instanceof_function(Z_OBJCE(tmp), base_exception_ce)) {
- zend_error_noreturn(E_CORE_ERROR, "Cannot set non exception as previous exception");
+ if (!instanceof_function(Z_OBJCE(tmp), zend_ce_throwable)) {
+ zend_error_noreturn(E_CORE_ERROR, "Previous exception must implement Throwable");
return;
}
ZVAL_OBJ(&zv, exception);
pzv = &zv;
do {
- previous = zend_read_property(base_exception_ce, pzv, "previous", sizeof("previous")-1, 1, &rv);
+ base_ce = zend_get_exception_base(pzv);
+ previous = zend_read_property(base_ce, pzv, "previous", sizeof("previous")-1, 1, &rv);
if (Z_TYPE_P(previous) == IS_NULL) {
- zend_update_property(base_exception_ce, pzv, "previous", sizeof("previous")-1, &tmp);
+ zend_update_property(base_ce, pzv, "previous", sizeof("previous")-1, &tmp);
GC_REFCOUNT(add_previous)--;
return;
}
@@ -110,7 +133,7 @@ ZEND_API void zend_throw_exception_internal(zval *exception) /* {{{ */
}
}
if (!EG(current_execute_data)) {
- if (exception && Z_OBJCE_P(exception) == parse_exception_ce) {
+ if (exception && Z_OBJCE_P(exception) == parse_error_ce) {
return;
}
if(EG(exception)) {
@@ -158,6 +181,7 @@ static zend_object *zend_default_exception_new_ex(zend_class_entry *class_type,
zval obj;
zend_object *object;
zval trace;
+ zend_class_entry *base_ce;
zend_string *filename;
Z_OBJ(obj) = object = zend_objects_new(class_type);
@@ -171,15 +195,17 @@ static zend_object *zend_default_exception_new_ex(zend_class_entry *class_type,
array_init(&trace);
}
Z_SET_REFCOUNT(trace, 0);
+
+ base_ce = zend_get_exception_base(&obj);
- if (EXPECTED(class_type != parse_exception_ce || !(filename = zend_get_compiled_filename()))) {
- zend_update_property_string(base_exception_ce, &obj, "file", sizeof("file")-1, zend_get_executed_filename());
- zend_update_property_long(base_exception_ce, &obj, "line", sizeof("line")-1, zend_get_executed_lineno());
+ if (EXPECTED(class_type != parse_error_ce || !(filename = zend_get_compiled_filename()))) {
+ zend_update_property_string(base_ce, &obj, "file", sizeof("file")-1, zend_get_executed_filename());
+ zend_update_property_long(base_ce, &obj, "line", sizeof("line")-1, zend_get_executed_lineno());
} else {
- zend_update_property_string(base_exception_ce, &obj, "file", sizeof("file")-1, filename->val);
- zend_update_property_long(base_exception_ce, &obj, "line", sizeof("line")-1, zend_get_compiled_lineno());
+ zend_update_property_string(base_ce, &obj, "file", sizeof("file")-1, filename->val);
+ zend_update_property_long(base_ce, &obj, "line", sizeof("line")-1, zend_get_compiled_lineno());
}
- zend_update_property(base_exception_ce, &obj, "trace", sizeof("trace")-1, &trace);
+ zend_update_property(base_ce, &obj, "trace", sizeof("trace")-1, &trace);
return object;
}
@@ -197,7 +223,7 @@ static zend_object *zend_error_exception_new(zend_class_entry *class_type) /* {{
}
/* }}} */
-/* {{{ proto Exception Exception::__clone()
+/* {{{ proto Exception|Error Exception|Error::__clone()
Clone the exception object */
ZEND_METHOD(exception, __clone)
{
@@ -206,37 +232,46 @@ ZEND_METHOD(exception, __clone)
}
/* }}} */
-/* {{{ proto Exception::__construct(string message, int code [, Exception previous])
+/* {{{ proto Exception|Error::__construct(string message, int code [, Throwable previous])
Exception constructor */
ZEND_METHOD(exception, __construct)
{
zend_string *message = NULL;
zend_long code = 0;
zval *object, *previous = NULL;
+ zend_class_entry *base_ce;
int argc = ZEND_NUM_ARGS();
- if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|SlO!", &message, &code, &previous, base_exception_ce) == FAILURE) {
- zend_error(E_EXCEPTION | E_ERROR, "Wrong parameters for Exception([string $exception [, long $code [, Exception $previous = NULL]]])");
+ object = getThis();
+ base_ce = zend_get_exception_base(object);
+
+ if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|SlO!", &message, &code, &previous, zend_ce_throwable) == FAILURE) {
+ zend_class_entry *ce;
+
+ if (execute_data->called_scope) {
+ ce = execute_data->called_scope;
+ } else {
+ ce = base_ce;
+ }
+ zend_error(E_EXCEPTION | E_ERROR, "Wrong parameters for %s([string $message [, long $code [, Throwable $previous = NULL]]])", ce->name->val);
return;
}
- object = getThis();
-
if (message) {
- zend_update_property_str(base_exception_ce, object, "message", sizeof("message")-1, message);
+ zend_update_property_str(base_ce, object, "message", sizeof("message")-1, message);
}
if (code) {
- zend_update_property_long(base_exception_ce, object, "code", sizeof("code")-1, code);
+ zend_update_property_long(base_ce, object, "code", sizeof("code")-1, code);
}
if (previous) {
- zend_update_property(base_exception_ce, object, "previous", sizeof("previous")-1, previous);
+ zend_update_property(base_ce, object, "previous", sizeof("previous")-1, previous);
}
}
/* }}} */
-/* {{{ proto ErrorException::__construct(string message, int code, int severity [, string filename [, int lineno [, Exception previous]]])
+/* {{{ proto ErrorException::__construct(string message, int code, int severity [, string filename [, int lineno [, Throwable previous]]])
ErrorException constructor */
ZEND_METHOD(error_exception, __construct)
{
@@ -246,33 +281,40 @@ ZEND_METHOD(error_exception, __construct)
int argc = ZEND_NUM_ARGS();
size_t message_len, filename_len;
- if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|sllslO!", &message, &message_len, &code, &severity, &filename, &filename_len, &lineno, &previous, base_exception_ce) == FAILURE) {
- zend_error(E_EXCEPTION | E_ERROR, "Wrong parameters for ErrorException([string $exception [, long $code, [ long $severity, [ string $filename, [ long $lineno [, Exception $previous = NULL]]]]]])");
+ if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|sllslO!", &message, &message_len, &code, &severity, &filename, &filename_len, &lineno, &previous, zend_ce_throwable) == FAILURE) {
+ zend_class_entry *ce;
+
+ if (execute_data->called_scope) {
+ ce = execute_data->called_scope;
+ } else {
+ ce = error_exception_ce;
+ }
+ zend_error(E_EXCEPTION | E_ERROR, "Wrong parameters for %s([string $message [, long $code, [ long $severity, [ string $filename, [ long $lineno [, Throwable $previous = NULL]]]]]])", ce->name->val);
return;
}
object = getThis();
if (message) {
- zend_update_property_string(base_exception_ce, object, "message", sizeof("message")-1, message);
+ zend_update_property_string(default_exception_ce, object, "message", sizeof("message")-1, message);
}
if (code) {
- zend_update_property_long(base_exception_ce, object, "code", sizeof("code")-1, code);
+ zend_update_property_long(default_exception_ce, object, "code", sizeof("code")-1, code);
}
if (previous) {
- zend_update_property(base_exception_ce, object, "previous", sizeof("previous")-1, previous);
+ zend_update_property(default_exception_ce, object, "previous", sizeof("previous")-1, previous);
}
- zend_update_property_long(base_exception_ce, object, "severity", sizeof("severity")-1, severity);
+ zend_update_property_long(error_exception_ce, object, "severity", sizeof("severity")-1, severity);
if (argc >= 4) {
- zend_update_property_string(base_exception_ce, object, "file", sizeof("file")-1, filename);
+ zend_update_property_string(default_exception_ce, object, "file", sizeof("file")-1, filename);
if (argc < 5) {
lineno = 0; /* invalidate lineno */
}
- zend_update_property_long(base_exception_ce, object, "line", sizeof("line")-1, lineno);
+ zend_update_property_long(default_exception_ce, object, "line", sizeof("line")-1, lineno);
}
}
/* }}} */
@@ -283,11 +325,11 @@ ZEND_METHOD(error_exception, __construct)
}
#define GET_PROPERTY(object, name) \
- zend_read_property(base_exception_ce, (object), name, sizeof(name) - 1, 0, &rv)
+ zend_read_property(zend_get_exception_base(object), (object), name, sizeof(name) - 1, 0, &rv)
#define GET_PROPERTY_SILENT(object, name) \
- zend_read_property(base_exception_ce, (object), name, sizeof(name) - 1, 1, &rv)
+ zend_read_property(zend_get_exception_base(object), (object), name, sizeof(name) - 1, 1, &rv)
-/* {{{ proto string Exception::getFile()
+/* {{{ proto string Exception|Error::getFile()
Get the file in which the exception occurred */
ZEND_METHOD(exception, getFile)
{
@@ -299,7 +341,7 @@ ZEND_METHOD(exception, getFile)
}
/* }}} */
-/* {{{ proto int Exception::getLine()
+/* {{{ proto int Exception|Error::getLine()
Get the line in which the exception occurred */
ZEND_METHOD(exception, getLine)
{
@@ -311,7 +353,7 @@ ZEND_METHOD(exception, getLine)
}
/* }}} */
-/* {{{ proto string Exception::getMessage()
+/* {{{ proto string Exception|Error::getMessage()
Get the exception message */
ZEND_METHOD(exception, getMessage)
{
@@ -323,7 +365,7 @@ ZEND_METHOD(exception, getMessage)
}
/* }}} */
-/* {{{ proto int Exception::getCode()
+/* {{{ proto int Exception|Error::getCode()
Get the exception code */
ZEND_METHOD(exception, getCode)
{
@@ -335,7 +377,7 @@ ZEND_METHOD(exception, getCode)
}
/* }}} */
-/* {{{ proto array Exception::getTrace()
+/* {{{ proto array Exception|Error::getTrace()
Get the stack trace for the location in which the exception occurred */
ZEND_METHOD(exception, getTrace)
{
@@ -399,7 +441,7 @@ static void smart_str_append_escaped(smart_str *str, const char *s, size_t l) {
str->s->len += len;
for (i = 0; i < l; ++i) {
- char c = s[i];
+ unsigned char c = s[i];
if (c < 32 || c == '\\' || c > 126) {
*res++ = '\\';
switch (c) {
@@ -546,18 +588,23 @@ static void _build_trace_string(smart_str *str, HashTable *ht, uint32_t num) /*
}
/* }}} */
-/* {{{ proto string Exception::getTraceAsString()
+/* {{{ proto string Exception|Error::getTraceAsString()
Obtain the backtrace for the exception as a string (instead of an array) */
ZEND_METHOD(exception, getTraceAsString)
{
zval *trace, *frame, rv;
zend_ulong index;
+ zval *object;
+ zend_class_entry *base_ce;
smart_str str = {0};
uint32_t num = 0;
DEFAULT_0_PARAMS;
+
+ object = getThis();
+ base_ce = zend_get_exception_base(object);
- trace = zend_read_property(base_exception_ce, getThis(), "trace", sizeof("trace")-1, 1, &rv);
+ trace = zend_read_property(base_ce, object, "trace", sizeof("trace")-1, 1, &rv);
if (Z_TYPE_P(trace) != IS_ARRAY) {
RETURN_FALSE;
}
@@ -579,8 +626,8 @@ ZEND_METHOD(exception, getTraceAsString)
}
/* }}} */
-/* {{{ proto string Exception::getPrevious()
- Return previous Exception or NULL. */
+/* {{{ proto Throwable Exception|Error::getPrevious()
+ Return previous Throwable or NULL. */
ZEND_METHOD(exception, getPrevious)
{
zval rv;
@@ -614,11 +661,12 @@ zend_string *zend_strpprintf(size_t max_len, const char *format, ...) /* {{{ */
}
/* }}} */
-/* {{{ proto string Exception::__toString()
+/* {{{ proto string Exception|Error::__toString()
Obtain the string representation of the Exception object */
ZEND_METHOD(exception, __toString)
{
zval trace, *exception;
+ zend_class_entry *base_ce;
zend_string *str;
zend_fcall_info fci;
zval fname, rv;
@@ -653,7 +701,7 @@ ZEND_METHOD(exception, __toString)
ZVAL_UNDEF(&trace);
}
- if (Z_OBJCE_P(exception) == type_exception_ce && strstr(message->val, ", called in ")) {
+ if (Z_OBJCE_P(exception) == type_error_ce && strstr(message->val, ", called in ")) {
zend_string *real_message = zend_strpprintf(0, "%s and defined", message->val);
zend_string_release(message);
message = real_message;
@@ -682,14 +730,31 @@ ZEND_METHOD(exception, __toString)
}
zval_dtor(&fname);
+ exception = getThis();
+ base_ce = zend_get_exception_base(exception);
+
/* We store the result in the private property string so we can access
* the result in uncaught exception handlers without memleaks. */
- zend_update_property_str(base_exception_ce, getThis(), "string", sizeof("string")-1, str);
+ zend_update_property_str(base_ce, exception, "string", sizeof("string")-1, str);
RETURN_STR(str);
}
/* }}} */
+/** {{{ Throwable method definition */
+const zend_function_entry zend_funcs_throwable[] = {
+ ZEND_ABSTRACT_ME(throwable, getMessage, NULL)
+ ZEND_ABSTRACT_ME(throwable, getCode, NULL)
+ ZEND_ABSTRACT_ME(throwable, getFile, NULL)
+ ZEND_ABSTRACT_ME(throwable, getLine, NULL)
+ ZEND_ABSTRACT_ME(throwable, getTrace, NULL)
+ ZEND_ABSTRACT_ME(throwable, getPrevious, NULL)
+ ZEND_ABSTRACT_ME(throwable, getTraceAsString, NULL)
+ ZEND_ABSTRACT_ME(throwable, __toString, NULL)
+ ZEND_FE_END
+};
+/* }}} */
+
/* {{{ internal structs */
/* All functions that may be used in uncaught exception handlers must be final
* and must not throw exceptions. Otherwise we would need a facility to handle
@@ -739,68 +804,50 @@ static const zend_function_entry error_exception_functions[] = {
void zend_register_default_exception(void) /* {{{ */
{
zend_class_entry ce;
- zend_property_info *prop;
+
+ REGISTER_MAGIC_INTERFACE(throwable, Throwable);
- INIT_CLASS_ENTRY(ce, "BaseException", default_exception_functions);
- base_exception_ce = zend_register_internal_class(&ce);
- base_exception_ce->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS;
- base_exception_ce->create_object = NULL;
memcpy(&default_exception_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
default_exception_handlers.clone_obj = NULL;
- zend_declare_property_string(base_exception_ce, "message", sizeof("message")-1, "", ZEND_ACC_PROTECTED);
- zend_declare_property_string(base_exception_ce, "string", sizeof("string")-1, "", ZEND_ACC_PRIVATE);
- zend_declare_property_long(base_exception_ce, "code", sizeof("code")-1, 0, ZEND_ACC_PROTECTED);
- zend_declare_property_null(base_exception_ce, "file", sizeof("file")-1, ZEND_ACC_PROTECTED);
- zend_declare_property_null(base_exception_ce, "line", sizeof("line")-1, ZEND_ACC_PROTECTED);
- zend_declare_property_null(base_exception_ce, "trace", sizeof("trace")-1, ZEND_ACC_PRIVATE);
- zend_declare_property_null(base_exception_ce, "previous", sizeof("previous")-1, ZEND_ACC_PRIVATE);
-
- INIT_CLASS_ENTRY(ce, "Exception", NULL);
- default_exception_ce = zend_register_internal_class_ex(&ce, base_exception_ce);
+ INIT_CLASS_ENTRY(ce, "Exception", default_exception_functions);
+ default_exception_ce = zend_register_internal_class_ex(&ce, NULL);
default_exception_ce->create_object = zend_default_exception_new;
+ zend_class_implements(default_exception_ce, 1, zend_ce_throwable);
- /* A trick, to make visible private properties of BaseException */
- ZEND_HASH_FOREACH_PTR(&default_exception_ce->properties_info, prop) {
- if (prop->flags & ZEND_ACC_SHADOW) {
- if (prop->name->len == sizeof("\0BaseException\0string")-1) {
- prop->flags &= ~ZEND_ACC_SHADOW;
- prop->flags |= ZEND_ACC_PRIVATE;
- prop->ce = default_exception_ce;
- } else if (prop->name->len == sizeof("\0BaseException\0trace")-1) {
- prop->flags &= ~ZEND_ACC_SHADOW;
- prop->flags |= ZEND_ACC_PRIVATE;
- prop->ce = default_exception_ce;
- } else if (prop->name->len == sizeof("\0BaseException\0previous")-1) {
- prop->flags &= ~ZEND_ACC_SHADOW;
- prop->flags |= ZEND_ACC_PRIVATE;
- prop->ce = default_exception_ce;
- }
- }
- } ZEND_HASH_FOREACH_END();
+ zend_declare_property_string(default_exception_ce, "message", sizeof("message")-1, "", ZEND_ACC_PROTECTED);
+ zend_declare_property_string(default_exception_ce, "string", sizeof("string")-1, "", ZEND_ACC_PRIVATE);
+ zend_declare_property_long(default_exception_ce, "code", sizeof("code")-1, 0, ZEND_ACC_PROTECTED);
+ zend_declare_property_null(default_exception_ce, "file", sizeof("file")-1, ZEND_ACC_PROTECTED);
+ zend_declare_property_null(default_exception_ce, "line", sizeof("line")-1, ZEND_ACC_PROTECTED);
+ zend_declare_property_null(default_exception_ce, "trace", sizeof("trace")-1, ZEND_ACC_PRIVATE);
+ zend_declare_property_null(default_exception_ce, "previous", sizeof("previous")-1, ZEND_ACC_PRIVATE);
INIT_CLASS_ENTRY(ce, "ErrorException", error_exception_functions);
error_exception_ce = zend_register_internal_class_ex(&ce, default_exception_ce);
error_exception_ce->create_object = zend_error_exception_new;
zend_declare_property_long(error_exception_ce, "severity", sizeof("severity")-1, E_ERROR, ZEND_ACC_PROTECTED);
- INIT_CLASS_ENTRY(ce, "EngineException", NULL);
- engine_exception_ce = zend_register_internal_class_ex(&ce, base_exception_ce);
- engine_exception_ce->create_object = zend_default_exception_new;
-
- INIT_CLASS_ENTRY(ce, "ParseException", NULL);
- parse_exception_ce = zend_register_internal_class_ex(&ce, base_exception_ce);
- parse_exception_ce->create_object = zend_default_exception_new;
-
- INIT_CLASS_ENTRY(ce, "TypeException", NULL);
- type_exception_ce = zend_register_internal_class_ex(&ce, engine_exception_ce);
- type_exception_ce->create_object = zend_default_exception_new;
-}
-/* }}} */
-
-ZEND_API zend_class_entry *zend_exception_get_base(void) /* {{{ */
-{
- return base_exception_ce;
+ INIT_CLASS_ENTRY(ce, "Error", default_exception_functions);
+ error_ce = zend_register_internal_class_ex(&ce, NULL);
+ error_ce->create_object = zend_default_exception_new;
+ zend_class_implements(error_ce, 1, zend_ce_throwable);
+
+ zend_declare_property_string(error_ce, "message", sizeof("message")-1, "", ZEND_ACC_PROTECTED);
+ zend_declare_property_string(error_ce, "string", sizeof("string")-1, "", ZEND_ACC_PRIVATE);
+ zend_declare_property_long(error_ce, "code", sizeof("code")-1, 0, ZEND_ACC_PROTECTED);
+ zend_declare_property_null(error_ce, "file", sizeof("file")-1, ZEND_ACC_PROTECTED);
+ zend_declare_property_null(error_ce, "line", sizeof("line")-1, ZEND_ACC_PROTECTED);
+ zend_declare_property_null(error_ce, "trace", sizeof("trace")-1, ZEND_ACC_PRIVATE);
+ zend_declare_property_null(error_ce, "previous", sizeof("previous")-1, ZEND_ACC_PRIVATE);
+
+ INIT_CLASS_ENTRY(ce, "ParseError", NULL);
+ parse_error_ce = zend_register_internal_class_ex(&ce, error_ce);
+ parse_error_ce->create_object = zend_default_exception_new;
+
+ INIT_CLASS_ENTRY(ce, "TypeError", NULL);
+ type_error_ce = zend_register_internal_class_ex(&ce, error_ce);
+ type_error_ce->create_object = zend_default_exception_new;
}
/* }}} */
@@ -816,21 +863,21 @@ ZEND_API zend_class_entry *zend_get_error_exception(void) /* {{{ */
}
/* }}} */
-ZEND_API zend_class_entry *zend_get_engine_exception(void) /* {{{ */
+ZEND_API zend_class_entry *zend_get_error(void) /* {{{ */
{
- return engine_exception_ce;
+ return error_ce;
}
/* }}} */
-ZEND_API zend_class_entry *zend_get_parse_exception(void) /* {{{ */
+ZEND_API zend_class_entry *zend_get_parse_error(void) /* {{{ */
{
- return parse_exception_ce;
+ return parse_error_ce;
}
/* }}} */
-ZEND_API zend_class_entry *zend_get_type_exception(void) /* {{{ */
+ZEND_API zend_class_entry *zend_get_type_error(void) /* {{{ */
{
- return type_exception_ce;
+ return type_error_ce;
}
/* }}} */
@@ -840,8 +887,8 @@ ZEND_API zend_object *zend_throw_exception(zend_class_entry *exception_ce, const
zval ex;
if (exception_ce) {
- if (!instanceof_function(exception_ce, base_exception_ce)) {
- zend_error(E_NOTICE, "Exceptions must be derived from the Exception base class");
+ if (!instanceof_function(exception_ce, zend_ce_throwable)) {
+ zend_error(E_NOTICE, "Exceptions must implement Throwable");
exception_ce = default_exception_ce;
}
} else {
@@ -851,10 +898,10 @@ ZEND_API zend_object *zend_throw_exception(zend_class_entry *exception_ce, const
if (message) {
- zend_update_property_string(base_exception_ce, &ex, "message", sizeof("message")-1, message);
+ zend_update_property_string(exception_ce, &ex, "message", sizeof("message")-1, message);
}
if (code) {
- zend_update_property_long(base_exception_ce, &ex, "code", sizeof("code")-1, code);
+ zend_update_property_long(exception_ce, &ex, "code", sizeof("code")-1, code);
}
zend_throw_exception_internal(&ex);
@@ -882,7 +929,7 @@ ZEND_API zend_object *zend_throw_error_exception(zend_class_entry *exception_ce,
zval ex;
zend_object *obj = zend_throw_exception(exception_ce, message, code);
ZVAL_OBJ(&ex, obj);
- zend_update_property_long(base_exception_ce, &ex, "severity", sizeof("severity")-1, severity);
+ zend_update_property_long(error_exception_ce, &ex, "severity", sizeof("severity")-1, severity);
return obj;
}
/* }}} */
@@ -915,7 +962,7 @@ ZEND_API void zend_exception_error(zend_object *ex, int severity) /* {{{ */
ZVAL_OBJ(&exception, ex);
ce_exception = Z_OBJCE(exception);
EG(exception) = NULL;
- if (ce_exception == parse_exception_ce) {
+ if (ce_exception == parse_error_ce) {
zend_string *message = zval_get_string(GET_PROPERTY(&exception, "message"));
zend_string *file = zval_get_string(GET_PROPERTY_SILENT(&exception, "file"));
zend_long line = zval_get_long(GET_PROPERTY_SILENT(&exception, "line"));
@@ -925,7 +972,7 @@ ZEND_API void zend_exception_error(zend_object *ex, int severity) /* {{{ */
zend_string_release(file);
zend_string_release(message);
- } else if (instanceof_function(ce_exception, base_exception_ce)) {
+ } else if (instanceof_function(ce_exception, zend_ce_throwable)) {
zval tmp, rv;
zend_string *str, *file = NULL;
zend_long line = 0;
@@ -935,7 +982,7 @@ ZEND_API void zend_exception_error(zend_object *ex, int severity) /* {{{ */
if (Z_TYPE(tmp) != IS_STRING) {
zend_error(E_WARNING, "%s::__toString() must return a string", ce_exception->name->val);
} else {
- zend_update_property_string(base_exception_ce, &exception, "string", sizeof("string")-1, EG(exception) ? ce_exception->name->val : Z_STRVAL(tmp));
+ zend_update_property_string(zend_get_exception_base(&exception), &exception, "string", sizeof("string")-1, EG(exception) ? ce_exception->name->val : Z_STRVAL(tmp));
}
}
zval_ptr_dtor(&tmp);
@@ -945,7 +992,7 @@ ZEND_API void zend_exception_error(zend_object *ex, int severity) /* {{{ */
ZVAL_OBJ(&zv, EG(exception));
/* do the best we can to inform about the inner exception */
- if (instanceof_function(ce_exception, base_exception_ce)) {
+ if (instanceof_function(ce_exception, default_exception_ce) || instanceof_function(ce_exception, error_ce)) {
file = zval_get_string(GET_PROPERTY_SILENT(&zv, "file"));
line = zval_get_long(GET_PROPERTY_SILENT(&zv, "line"));
}
@@ -986,8 +1033,8 @@ ZEND_API void zend_throw_exception_object(zval *exception) /* {{{ */
exception_ce = Z_OBJCE_P(exception);
- if (!exception_ce || !instanceof_function(exception_ce, base_exception_ce)) {
- zend_error(E_EXCEPTION | E_ERROR, "Exceptions must be valid objects derived from the Exception base class");
+ if (!exception_ce || !instanceof_function(exception_ce, zend_ce_throwable)) {
+ zend_error(E_EXCEPTION | E_ERROR, "Cannot throw objects that do not implement Throwable");
return;
}
zend_throw_exception_internal(exception);
diff --git a/Zend/zend_exceptions.h b/Zend/zend_exceptions.h
index e2c1f1fac7..d22b99c262 100644
--- a/Zend/zend_exceptions.h
+++ b/Zend/zend_exceptions.h
@@ -26,6 +26,8 @@
BEGIN_EXTERN_C()
+extern ZEND_API zend_class_entry *zend_ce_throwable;
+
ZEND_API void zend_exception_set_previous(zend_object *exception, zend_object *add_previous);
ZEND_API void zend_exception_save(void);
ZEND_API void zend_exception_restore(void);
@@ -34,12 +36,11 @@ ZEND_API void zend_throw_exception_internal(zval *exception);
void zend_register_default_exception(void);
-ZEND_API zend_class_entry *zend_exception_get_base(void);
ZEND_API zend_class_entry *zend_exception_get_default(void);
ZEND_API zend_class_entry *zend_get_error_exception(void);
-ZEND_API zend_class_entry *zend_get_engine_exception(void);
-ZEND_API zend_class_entry *zend_get_parse_exception(void);
-ZEND_API zend_class_entry *zend_get_type_exception(void);
+ZEND_API zend_class_entry *zend_get_error(void);
+ZEND_API zend_class_entry *zend_get_parse_error(void);
+ZEND_API zend_class_entry *zend_get_type_error(void);
ZEND_API void zend_register_default_classes(void);
/* exception_ce NULL or zend_exception_get_default() or a derived class
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index 40868f0dc8..8fc40245c9 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -142,7 +142,7 @@ static const zend_internal_function zend_pass_function = {
((ZEND_VM_STACK_PAGE_SLOTS(gen) - ZEND_VM_STACK_HEADER_SLOTS) * sizeof(zval))
#define ZEND_VM_STACK_PAGE_ALIGNED_SIZE(gen, size) \
- (((size) + (ZEND_VM_STACK_FREE_PAGE_SIZE(gen) - 1)) & ~ZEND_VM_STACK_PAGE_SIZE(gen))
+ (((size) + (ZEND_VM_STACK_FREE_PAGE_SIZE(gen) - 1)) & ~(ZEND_VM_STACK_PAGE_SIZE(gen) - 1))
static zend_always_inline zend_vm_stack zend_vm_stack_new_page(size_t size, zend_vm_stack prev) {
zend_vm_stack page = (zend_vm_stack)emalloc(size);
@@ -585,16 +585,9 @@ ZEND_API char * zend_verify_internal_arg_class_kind(const zend_internal_arg_info
}
}
-ZEND_API char * zend_verify_arg_class_kind(const zend_arg_info *cur_arg_info, char **class_name, zend_class_entry **pce)
+static zend_always_inline zend_class_entry* zend_verify_arg_class_kind(const zend_arg_info *cur_arg_info)
{
- *pce = zend_fetch_class(cur_arg_info->class_name, (ZEND_FETCH_CLASS_AUTO | ZEND_FETCH_CLASS_NO_AUTOLOAD));
-
- *class_name = (*pce) ? (*pce)->name->val : cur_arg_info->class_name->val;
- if (*pce && (*pce)->ce_flags & ZEND_ACC_INTERFACE) {
- return "implement interface ";
- } else {
- return "be an instance of ";
- }
+ return zend_fetch_class(cur_arg_info->class_name, (ZEND_FETCH_CLASS_AUTO | ZEND_FETCH_CLASS_NO_AUTOLOAD));
}
ZEND_API void zend_verify_arg_error(const zend_function *zf, uint32_t arg_num, const char *need_msg, const char *need_kind, const char *given_msg, const char *given_kind, zval *arg)
@@ -744,15 +737,15 @@ static void zend_verify_internal_arg_type(zend_function *zf, uint32_t arg_num, z
}
}
-static int zend_verify_arg_type(zend_function *zf, uint32_t arg_num, zval *arg, zval *default_value)
+static zend_always_inline int zend_verify_arg_type(zend_function *zf, uint32_t arg_num, zval *arg, zval *default_value, void **cache_slot)
{
zend_arg_info *cur_arg_info;
- char *need_msg, *class_name;
+ char *need_msg;
zend_class_entry *ce;
if (EXPECTED(arg_num <= zf->common.num_args)) {
cur_arg_info = &zf->common.arg_info[arg_num-1];
- } else if (zf->common.fn_flags & ZEND_ACC_VARIADIC) {
+ } else if (UNEXPECTED(zf->common.fn_flags & ZEND_ACC_VARIADIC)) {
cur_arg_info = &zf->common.arg_info[zf->common.num_args];
} else {
return 1;
@@ -762,16 +755,44 @@ static int zend_verify_arg_type(zend_function *zf, uint32_t arg_num, zval *arg,
ZVAL_DEREF(arg);
if (EXPECTED(cur_arg_info->type_hint == Z_TYPE_P(arg))) {
if (cur_arg_info->class_name) {
- need_msg = zend_verify_arg_class_kind(cur_arg_info, &class_name, &ce);
- if (!ce || !instanceof_function(Z_OBJCE_P(arg), ce)) {
- zend_verify_arg_error(zf, arg_num, need_msg, class_name, "instance of ", Z_OBJCE_P(arg)->name->val, arg);
+ if (EXPECTED(*cache_slot)) {
+ ce = (zend_class_entry*)*cache_slot;
+ } else {
+ ce = zend_verify_arg_class_kind(cur_arg_info);
+ if (UNEXPECTED(!ce)) {
+ zend_verify_arg_error(zf, arg_num, "be an instance of ", cur_arg_info->class_name->val, "instance of ", Z_OBJCE_P(arg)->name->val, arg);
+ return 0;
+ }
+ *cache_slot = (void*)ce;
+ }
+ if (UNEXPECTED(!instanceof_function(Z_OBJCE_P(arg), ce))) {
+ need_msg =
+ (ce->ce_flags & ZEND_ACC_INTERFACE) ?
+ "implement interface " : "be an instance of ";
+ zend_verify_arg_error(zf, arg_num, need_msg, ce->name->val, "instance of ", Z_OBJCE_P(arg)->name->val, arg);
return 0;
}
}
} else if (Z_TYPE_P(arg) != IS_NULL || !(cur_arg_info->allow_null || (default_value && is_null_constant(default_value)))) {
if (cur_arg_info->class_name) {
- need_msg = zend_verify_arg_class_kind(cur_arg_info, &class_name, &ce);
- zend_verify_arg_error(zf, arg_num, need_msg, class_name, zend_zval_type_name(arg), "", arg);
+ if (EXPECTED(*cache_slot)) {
+ ce = (zend_class_entry*)*cache_slot;
+ } else {
+ ce = zend_verify_arg_class_kind(cur_arg_info);
+ if (UNEXPECTED(!ce)) {
+ if (Z_TYPE_P(arg) == IS_OBJECT) {
+ zend_verify_arg_error(zf, arg_num, "be an instance of ", cur_arg_info->class_name->val, "instance of ", Z_OBJCE_P(arg)->name->val, arg);
+ } else {
+ zend_verify_arg_error(zf, arg_num, "be an instance of ", cur_arg_info->class_name->val, "", zend_zval_type_name(arg), arg);
+ }
+ return 0;
+ }
+ *cache_slot = (void*)ce;
+ }
+ need_msg =
+ (ce->ce_flags & ZEND_ACC_INTERFACE) ?
+ "implement interface " : "be an instance of ";
+ zend_verify_arg_error(zf, arg_num, need_msg, ce->name->val, zend_zval_type_name(arg), "", arg);
return 0;
} else if (cur_arg_info->type_hint == IS_CALLABLE) {
if (!zend_is_callable(arg, IS_CALLABLE_CHECK_SILENT, NULL)) {
@@ -790,7 +811,7 @@ static int zend_verify_arg_type(zend_function *zf, uint32_t arg_num, zval *arg,
return 1;
}
-static inline int zend_verify_missing_arg_type(zend_function *zf, uint32_t arg_num)
+static zend_always_inline int zend_verify_missing_arg_type(zend_function *zf, uint32_t arg_num, void **cache_slot)
{
zend_arg_info *cur_arg_info;
char *need_msg;
@@ -798,7 +819,7 @@ static inline int zend_verify_missing_arg_type(zend_function *zf, uint32_t arg_n
if (EXPECTED(arg_num <= zf->common.num_args)) {
cur_arg_info = &zf->common.arg_info[arg_num-1];
- } else if (zf->common.fn_flags & ZEND_ACC_VARIADIC) {
+ } else if (UNEXPECTED(zf->common.fn_flags & ZEND_ACC_VARIADIC)) {
cur_arg_info = &zf->common.arg_info[zf->common.num_args];
} else {
return 1;
@@ -806,10 +827,20 @@ static inline int zend_verify_missing_arg_type(zend_function *zf, uint32_t arg_n
if (cur_arg_info->type_hint) {
if (cur_arg_info->class_name) {
- char *class_name;
-
- need_msg = zend_verify_arg_class_kind(cur_arg_info, &class_name, &ce);
- zend_verify_arg_error(zf, arg_num, need_msg, class_name, "none", "", NULL);
+ if (EXPECTED(*cache_slot)) {
+ ce = (zend_class_entry*)*cache_slot;
+ } else {
+ ce = zend_verify_arg_class_kind(cur_arg_info);
+ if (UNEXPECTED(!ce)) {
+ zend_verify_arg_error(zf, arg_num, "be an instance of ", cur_arg_info->class_name->val, "none", "", NULL);
+ return 0;
+ }
+ *cache_slot = (void*)ce;
+ }
+ need_msg =
+ (ce->ce_flags & ZEND_ACC_INTERFACE) ?
+ "implement interface " : "be an instance of ";
+ zend_verify_arg_error(zf, arg_num, need_msg, ce->name->val, "none", "", NULL);
} else if (cur_arg_info->type_hint == IS_CALLABLE) {
zend_verify_arg_error(zf, arg_num, "be callable", "", "none", "", NULL);
} else {
@@ -820,10 +851,10 @@ static inline int zend_verify_missing_arg_type(zend_function *zf, uint32_t arg_n
return 1;
}
-static int zend_verify_missing_arg(zend_execute_data *execute_data, uint32_t arg_num)
+static zend_always_inline int zend_verify_missing_arg(zend_execute_data *execute_data, uint32_t arg_num, void **cache_slot)
{
if (EXPECTED(!(EX(func)->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS)) ||
- zend_verify_missing_arg_type(EX(func), arg_num)) {
+ zend_verify_missing_arg_type(EX(func), arg_num, cache_slot)) {
const char *class_name = EX(func)->common.scope ? EX(func)->common.scope->name->val : "";
const char *space = EX(func)->common.scope ? "::" : "";
const char *func_name = EX(func)->common.function_name ? EX(func)->common.function_name->val : "main";
@@ -921,24 +952,48 @@ static int zend_verify_internal_return_type(zend_function *zf, zval *ret)
}
#endif
-static void zend_verify_return_type(zend_function *zf, zval *ret)
+static zend_always_inline void zend_verify_return_type(zend_function *zf, zval *ret, void **cache_slot)
{
zend_arg_info *ret_info = zf->common.arg_info - 1;
- char *need_msg, *class_name;
+ char *need_msg;
zend_class_entry *ce;
if (ret_info->type_hint) {
if (EXPECTED(ret_info->type_hint == Z_TYPE_P(ret))) {
if (ret_info->class_name) {
- need_msg = zend_verify_arg_class_kind(ret_info, &class_name, &ce);
- if (!ce || !instanceof_function(Z_OBJCE_P(ret), ce)) {
- zend_verify_return_error(zf, need_msg, class_name, "instance of ", Z_OBJCE_P(ret)->name->val);
+ if (EXPECTED(*cache_slot)) {
+ ce = (zend_class_entry*)*cache_slot;
+ } else {
+ ce = zend_verify_arg_class_kind(ret_info);
+ if (UNEXPECTED(!ce)) {
+ zend_verify_return_error(zf, "be an instance of ", ret_info->class_name->val, "instance of ", Z_OBJCE_P(ret)->name->val);
+ return;
+ }
+ *cache_slot = (void*)ce;
+ }
+ if (UNEXPECTED(!instanceof_function(Z_OBJCE_P(ret), ce))) {
+ need_msg =
+ (ce->ce_flags & ZEND_ACC_INTERFACE) ?
+ "implement interface " : "be an instance of ";
+ zend_verify_return_error(zf, need_msg, ce->name->val, "instance of ", Z_OBJCE_P(ret)->name->val);
}
}
} else if (Z_TYPE_P(ret) != IS_NULL || !ret_info->allow_null) {
if (ret_info->class_name) {
- need_msg = zend_verify_arg_class_kind(ret_info, &class_name, &ce);
- zend_verify_return_error(zf, need_msg, class_name, zend_zval_type_name(ret), "");
+ if (EXPECTED(*cache_slot)) {
+ ce = (zend_class_entry*)*cache_slot;
+ } else {
+ ce = zend_verify_arg_class_kind(ret_info);
+ if (UNEXPECTED(!ce)) {
+ zend_verify_return_error(zf, "be an instance of ", ret_info->class_name->val, zend_zval_type_name(ret), "");
+ return;
+ }
+ *cache_slot = (void*)ce;
+ }
+ need_msg =
+ (ce->ce_flags & ZEND_ACC_INTERFACE) ?
+ "implement interface " : "be an instance of ";
+ zend_verify_return_error(zf, need_msg, ce->name->val, zend_zval_type_name(ret), "");
} else if (ret_info->type_hint == IS_CALLABLE) {
if (!zend_is_callable(ret, IS_CALLABLE_CHECK_SILENT, NULL)) {
zend_verify_return_error(zf, "be callable", "", zend_zval_type_name(ret), "");
@@ -953,7 +1008,7 @@ static void zend_verify_return_type(zend_function *zf, zval *ret)
}
}
-static inline int zend_verify_missing_return_type(zend_function *zf)
+static zend_always_inline int zend_verify_missing_return_type(zend_function *zf, void **cache_slot)
{
zend_arg_info *ret_info = zf->common.arg_info - 1;
char *need_msg;
@@ -961,10 +1016,20 @@ static inline int zend_verify_missing_return_type(zend_function *zf)
if (ret_info->type_hint) {
if (ret_info->class_name) {
- char *class_name;
-
- need_msg = zend_verify_arg_class_kind(ret_info, &class_name, &ce);
- zend_verify_return_error(zf, need_msg, class_name, "none", "");
+ if (EXPECTED(*cache_slot)) {
+ ce = (zend_class_entry*)*cache_slot;
+ } else {
+ ce = zend_verify_arg_class_kind(ret_info);
+ if (UNEXPECTED(!ce)) {
+ zend_verify_return_error(zf, "be an instance of ", ret_info->class_name->val, "none", "");
+ return 0;
+ }
+ *cache_slot = (void*)ce;
+ }
+ need_msg =
+ (ce->ce_flags & ZEND_ACC_INTERFACE) ?
+ "implement interface " : "be an instance of ";
+ zend_verify_return_error(zf, need_msg, ce->name->val, "none", "");
return 0;
} else if (ret_info->type_hint == IS_CALLABLE) {
zend_verify_return_error(zf, "be callable", "", "none", "");
@@ -1438,14 +1503,14 @@ num_index:
if (retval == NULL) {
switch (type) {
case BP_VAR_R:
- zend_error(E_NOTICE,"Undefined offset: " ZEND_ULONG_FMT, hval);
+ zend_error(E_NOTICE,"Undefined offset: " ZEND_LONG_FMT, hval);
/* break missing intentionally */
case BP_VAR_UNSET:
case BP_VAR_IS:
retval = &EG(uninitialized_zval);
break;
case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined offset: " ZEND_ULONG_FMT, hval);
+ zend_error(E_NOTICE,"Undefined offset: " ZEND_LONG_FMT, hval);
/* break missing intentionally */
case BP_VAR_W:
retval = zend_hash_index_add_new(ht, hval, &EG(uninitialized_zval));
@@ -1617,11 +1682,11 @@ convert_to_array:
if (dim == NULL) {
zend_error(E_EXCEPTION | E_ERROR, "[] operator not supported for strings");
+ ZVAL_NULL(result);
} else {
zend_check_string_offset(dim, type);
+ ZVAL_INDIRECT(result, NULL); /* wrong string offset */
}
-
- ZVAL_INDIRECT(result, NULL); /* wrong string offset */
} else if (EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
if (!Z_OBJ_HT_P(container)->read_dimension) {
zend_error(E_EXCEPTION | E_ERROR, "Cannot use object as array");
@@ -1720,9 +1785,11 @@ try_string_offset:
if (IS_LONG == is_numeric_string(Z_STRVAL_P(dim), Z_STRLEN_P(dim), NULL, NULL, -1)) {
break;
}
- if (type != BP_VAR_IS) {
- zend_error(E_WARNING, "Illegal string offset '%s'", Z_STRVAL_P(dim));
+ if (type == BP_VAR_IS) {
+ ZVAL_NULL(result);
+ return;
}
+ zend_error(E_WARNING, "Illegal string offset '%s'", Z_STRVAL_P(dim));
break;
case IS_DOUBLE:
case IS_NULL:
@@ -1748,8 +1815,10 @@ try_string_offset:
if (UNEXPECTED(offset < 0) || UNEXPECTED(Z_STRLEN_P(container) <= (size_t)offset)) {
if (type != BP_VAR_IS) {
zend_error(E_NOTICE, "Uninitialized string offset: %pd", offset);
+ ZVAL_EMPTY_STRING(result);
+ } else {
+ ZVAL_NULL(result);
}
- ZVAL_EMPTY_STRING(result);
} else {
zend_uchar c = (zend_uchar)Z_STRVAL_P(container)[offset];
@@ -2265,6 +2334,8 @@ static zend_execute_data *zend_vm_stack_copy_call_frame(zend_execute_data *call,
/* copy call frame into new stack segment */
new_call = zend_vm_stack_extend(used_stack * sizeof(zval));
*new_call = *call;
+ ZEND_SET_CALL_INFO(new_call, ZEND_CALL_INFO(new_call) | ZEND_CALL_ALLOCATED);
+
if (passed_args) {
zval *src = ZEND_CALL_ARG(call, 1);
zval *dst = ZEND_CALL_ARG(new_call, 1);
@@ -2311,6 +2382,156 @@ static zend_always_inline zend_generator *zend_get_running_generator(zend_execut
}
/* }}} */
+static zend_always_inline void i_cleanup_unfinished_execution(zend_execute_data *execute_data, uint32_t op_num, uint32_t catch_op_num) /* {{{ */
+{
+ int i;
+ if (UNEXPECTED(EX(call))) {
+ zend_execute_data *call = EX(call);
+ zend_op *opline = EX(func)->op_array.opcodes + op_num;
+ int level;
+ int do_exit;
+
+ do {
+ /* If the exception was thrown during a function call there might be
+ * arguments pushed to the stack that have to be dtor'ed. */
+
+ /* find the number of actually passed arguments */
+ level = 0;
+ do_exit = 0;
+ do {
+ switch (opline->opcode) {
+ case ZEND_DO_FCALL:
+ case ZEND_DO_ICALL:
+ case ZEND_DO_UCALL:
+ case ZEND_DO_FCALL_BY_NAME:
+ level++;
+ break;
+ case ZEND_INIT_FCALL:
+ case ZEND_INIT_FCALL_BY_NAME:
+ case ZEND_INIT_NS_FCALL_BY_NAME:
+ case ZEND_INIT_DYNAMIC_CALL:
+ case ZEND_INIT_USER_CALL:
+ case ZEND_INIT_METHOD_CALL:
+ case ZEND_INIT_STATIC_METHOD_CALL:
+ case ZEND_NEW:
+ if (level == 0) {
+ ZEND_CALL_NUM_ARGS(call) = 0;
+ do_exit = 1;
+ }
+ level--;
+ break;
+ case ZEND_SEND_VAL:
+ case ZEND_SEND_VAL_EX:
+ case ZEND_SEND_VAR:
+ case ZEND_SEND_VAR_EX:
+ case ZEND_SEND_REF:
+ case ZEND_SEND_VAR_NO_REF:
+ case ZEND_SEND_USER:
+ if (level == 0) {
+ ZEND_CALL_NUM_ARGS(call) = opline->op2.num;
+ do_exit = 1;
+ }
+ break;
+ case ZEND_SEND_ARRAY:
+ case ZEND_SEND_UNPACK:
+ if (level == 0) {
+ do_exit = 1;
+ }
+ break;
+ }
+ if (!do_exit) {
+ opline--;
+ }
+ } while (!do_exit);
+ if (call->prev_execute_data) {
+ /* skip current call region */
+ level = 0;
+ do_exit = 0;
+ do {
+ switch (opline->opcode) {
+ case ZEND_DO_FCALL:
+ case ZEND_DO_ICALL:
+ case ZEND_DO_UCALL:
+ case ZEND_DO_FCALL_BY_NAME:
+ level++;
+ break;
+ case ZEND_INIT_FCALL:
+ case ZEND_INIT_FCALL_BY_NAME:
+ case ZEND_INIT_NS_FCALL_BY_NAME:
+ case ZEND_INIT_DYNAMIC_CALL:
+ case ZEND_INIT_USER_CALL:
+ case ZEND_INIT_METHOD_CALL:
+ case ZEND_INIT_STATIC_METHOD_CALL:
+ case ZEND_NEW:
+ if (level == 0) {
+ do_exit = 1;
+ }
+ level--;
+ break;
+ }
+ opline--;
+ } while (!do_exit);
+ }
+
+ zend_vm_stack_free_args(EX(call));
+
+ if (ZEND_CALL_INFO(call) & ZEND_CALL_RELEASE_THIS) {
+ if (ZEND_CALL_INFO(call) & ZEND_CALL_CTOR) {
+ if (!(ZEND_CALL_INFO(call) & ZEND_CALL_CTOR_RESULT_UNUSED)) {
+ GC_REFCOUNT(Z_OBJ(call->This))--;
+ }
+ if (GC_REFCOUNT(Z_OBJ(call->This)) == 1) {
+ zend_object_store_ctor_failed(Z_OBJ(call->This));
+ }
+ }
+ OBJ_RELEASE(Z_OBJ(call->This));
+ }
+ if (call->func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) {
+ zend_string_release(call->func->common.function_name);
+ zend_free_trampoline(call->func);
+ }
+
+ EX(call) = call->prev_execute_data;
+ zend_vm_stack_free_call_frame(call);
+ call = EX(call);
+ } while (call);
+ }
+
+ for (i = 0; i < EX(func)->op_array.last_brk_cont; i++) {
+ const zend_brk_cont_element *brk_cont = &EX(func)->op_array.brk_cont_array[i];
+ if (brk_cont->start < 0) {
+ continue;
+ } else if (brk_cont->start > op_num) {
+ /* further blocks will not be relevant... */
+ break;
+ } else if (op_num < brk_cont->brk) {
+ if (!catch_op_num || catch_op_num >= brk_cont->brk) {
+ zend_op *brk_opline = &EX(func)->op_array.opcodes[brk_cont->brk];
+
+ if (brk_opline->opcode == ZEND_FREE) {
+ zval_ptr_dtor_nogc(EX_VAR(brk_opline->op1.var));
+ } else if (brk_opline->opcode == ZEND_FE_FREE) {
+ zval *var = EX_VAR(brk_opline->op1.var);
+ if (Z_TYPE_P(var) != IS_ARRAY && Z_FE_ITER_P(var) != (uint32_t)-1) {
+ zend_hash_iterator_del(Z_FE_ITER_P(var));
+ }
+ zval_ptr_dtor_nogc(var);
+ } else if (brk_opline->opcode == ZEND_END_SILENCE) {
+ /* restore previous error_reporting value */
+ if (!EG(error_reporting) && Z_LVAL_P(EX_VAR(brk_opline->op1.var)) != 0) {
+ EG(error_reporting) = Z_LVAL_P(EX_VAR(brk_opline->op1.var));
+ }
+ }
+ }
+ }
+ }
+}
+/* }}} */
+
+void zend_cleanup_unfinished_execution(zend_execute_data *execute_data, uint32_t op_num, uint32_t catch_op_num) {
+ i_cleanup_unfinished_execution(execute_data, op_num, catch_op_num);
+}
+
#ifdef HAVE_GCC_GLOBAL_REGS
# if defined(__GNUC__) && ZEND_GCC_VERSION >= 4008 && defined(i386)
# define ZEND_VM_FP_GLOBAL_REG "%esi"
diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h
index 75d61ded53..9719eda42b 100644
--- a/Zend/zend_execute.h
+++ b/Zend/zend_execute.h
@@ -50,7 +50,6 @@ ZEND_API int zend_eval_string_ex(char *str, zval *retval_ptr, char *string_name,
ZEND_API int zend_eval_stringl_ex(char *str, size_t str_len, zval *retval_ptr, char *string_name, int handle_exceptions);
ZEND_API char * zend_verify_internal_arg_class_kind(const zend_internal_arg_info *cur_arg_info, char **class_name, zend_class_entry **pce);
-ZEND_API char * zend_verify_arg_class_kind(const zend_arg_info *cur_arg_info, char **class_name, zend_class_entry **pce);
ZEND_API void zend_verify_arg_error(const zend_function *zf, uint32_t arg_num, const char *need_msg, const char *need_kind, const char *given_msg, const char *given_kind, zval *arg);
ZEND_API void zend_verify_return_error(const zend_function *zf, const char *need_msg, const char *need_kind, const char *returned_msg, const char *returned_kind);
ZEND_API void zend_verify_internal_return_error(const zend_function *zf, const char *need_msg, const char *need_kind, const char *returned_msg, const char *returned_kind);
@@ -149,6 +148,21 @@ struct _zend_vm_stack {
#define ZEND_VM_STACK_ELEMETS(stack) \
(((zval*)(stack)) + ZEND_VM_STACK_HEADER_SLOTS)
+/*
+ * In general in RELEASE build ZEND_ASSERT() must be zero-cost, but for some
+ * reason, GCC generated worse code, performing CSE on assertion code and the
+ * following "slow path" and moving memory read operatins from slow path into
+ * common header. This made a degradation for the fast path.
+ * The following "#if ZEND_DEBUG" eliminates it.
+ */
+#if ZEND_DEBUG
+# define ZEND_ASSERT_VM_STACK(stack) ZEND_ASSERT(stack->top > (zval *) stack && stack->end > (zval *) stack && stack->top <= stack->end)
+# define ZEND_ASSERT_VM_STACK_GLOBAL ZEND_ASSERT(EG(vm_stack_top) > (zval *) EG(vm_stack) && EG(vm_stack_end) > (zval *) EG(vm_stack) && EG(vm_stack_top) <= EG(vm_stack_end))
+#else
+# define ZEND_ASSERT_VM_STACK(stack)
+# define ZEND_ASSERT_VM_STACK_GLOBAL
+#endif
+
ZEND_API void zend_vm_stack_init(void);
ZEND_API void zend_vm_stack_destroy(void);
ZEND_API void* zend_vm_stack_extend(size_t size);
@@ -157,6 +171,8 @@ static zend_always_inline zend_execute_data *zend_vm_stack_push_call_frame_ex(ui
{
zend_execute_data *call = (zend_execute_data*)EG(vm_stack_top);
+ ZEND_ASSERT_VM_STACK_GLOBAL;
+
if (UNEXPECTED(used_stack > (size_t)(((char*)EG(vm_stack_end)) - (char*)call))) {
call = (zend_execute_data*)zend_vm_stack_extend(used_stack);
ZEND_SET_CALL_INFO(call, call_info | ZEND_CALL_ALLOCATED);
@@ -164,6 +180,9 @@ static zend_always_inline zend_execute_data *zend_vm_stack_push_call_frame_ex(ui
EG(vm_stack_top) = (zval*)((char*)call + used_stack);
ZEND_SET_CALL_INFO(call, call_info);
}
+
+ ZEND_ASSERT_VM_STACK_GLOBAL;
+
call->func = func;
Z_OBJ(call->This) = object;
ZEND_CALL_NUM_ARGS(call) = num_args;
@@ -237,6 +256,8 @@ static zend_always_inline void zend_vm_stack_free_args(zend_execute_data *call)
static zend_always_inline void zend_vm_stack_free_call_frame_ex(uint32_t call_info, zend_execute_data *call)
{
+ ZEND_ASSERT_VM_STACK_GLOBAL;
+
if (UNEXPECTED(call_info & ZEND_CALL_ALLOCATED)) {
zend_vm_stack p = EG(vm_stack);
@@ -246,9 +267,12 @@ static zend_always_inline void zend_vm_stack_free_call_frame_ex(uint32_t call_in
EG(vm_stack_end) = prev->end;
EG(vm_stack) = prev;
efree(p);
+
} else {
EG(vm_stack_top) = (zval*)call;
}
+
+ ZEND_ASSERT_VM_STACK_GLOBAL;
}
static zend_always_inline void zend_vm_stack_free_call_frame(zend_execute_data *call)
@@ -293,6 +317,7 @@ ZEND_API zval *zend_get_zval_ptr(int op_type, const znode_op *node, const zend_e
ZEND_API void zend_clean_and_cache_symbol_table(zend_array *symbol_table);
void zend_free_compiled_variables(zend_execute_data *execute_data);
+void zend_cleanup_unfinished_execution(zend_execute_data *execute_data, uint32_t op_num, uint32_t catch_op_num);
#define CACHE_ADDR(num) \
((void**)((char*)EX_RUN_TIME_CACHE() + (num)))
diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c
index 706d913f72..6a04ebd123 100644
--- a/Zend/zend_generators.c
+++ b/Zend/zend_generators.c
@@ -34,52 +34,30 @@ static zend_object *zend_generator_create(zend_class_entry *class_type);
static void zend_generator_cleanup_unfinished_execution(zend_generator *generator) /* {{{ */
{
zend_execute_data *execute_data = generator->execute_data;
- zend_op_array *op_array = &execute_data->func->op_array;
+ /* -1 required because we want the last run opcode, not the next to-be-run one. */
+ uint32_t op_num = execute_data->opline - execute_data->func->op_array.opcodes - 1;
if (generator->send_target) {
if (Z_REFCOUNTED_P(generator->send_target)) Z_DELREF_P(generator->send_target);
generator->send_target = NULL;
}
- /* Manually free loop variables, as execution couldn't reach their
- * SWITCH_FREE / FREE opcodes. */
{
- /* -1 required because we want the last run opcode, not the
- * next to-be-run one. */
- uint32_t op_num = execute_data->opline - op_array->opcodes - 1;
+ /* There may be calls to zend_vm_stack_free_call_frame(), which modifies the VM stack
+ * globals, so need to load/restore those. */
+ zend_vm_stack original_stack = EG(vm_stack);
+ original_stack->top = EG(vm_stack_top);
+ EG(vm_stack_top) = generator->stack->top;
+ EG(vm_stack_end) = generator->stack->end;
+ EG(vm_stack) = generator->stack;
- int i;
- for (i = 0; i < op_array->last_brk_cont; ++i) {
- zend_brk_cont_element *brk_cont = op_array->brk_cont_array + i;
-
- if (brk_cont->start < 0) {
- continue;
- } else if ((uint32_t)brk_cont->start > op_num) {
- break;
- } else if (brk_cont->brk >= 0 && (uint32_t)brk_cont->brk > op_num) {
- zend_op *brk_opline = op_array->opcodes + brk_cont->brk;
-
- if (brk_opline->opcode == ZEND_FREE) {
- zval *var = EX_VAR(brk_opline->op1.var);
- zval_ptr_dtor_nogc(var);
- } else if (brk_opline->opcode == ZEND_FE_FREE) {
- zval *var = EX_VAR(brk_opline->op1.var);
- if (Z_TYPE_P(var) != IS_ARRAY && Z_FE_ITER_P(var) != (uint32_t)-1) {
- zend_hash_iterator_del(Z_FE_ITER_P(var));
- }
- zval_ptr_dtor_nogc(var);
- }
- }
- }
- }
+ zend_cleanup_unfinished_execution(execute_data, op_num, 0);
- /* If yield was used as a function argument there may be active
- * method calls those objects need to be freed */
- while (execute_data->call) {
- if (ZEND_CALL_INFO(execute_data->call) & ZEND_CALL_RELEASE_THIS) {
- OBJ_RELEASE(Z_OBJ(execute_data->call->This));
- }
- execute_data->call = execute_data->call->prev_execute_data;
+ generator->stack = EG(vm_stack);
+ generator->stack->top = EG(vm_stack_top);
+ EG(vm_stack_top) = original_stack->top;
+ EG(vm_stack_end) = original_stack->end;
+ EG(vm_stack) = original_stack;
}
}
/* }}} */
@@ -176,8 +154,10 @@ static void zend_generator_dtor_storage(zend_object *object) /* {{{ */
if (finally_op_num) {
zval *fast_call = ZEND_CALL_VAR(ex, ex->func->op_array.opcodes[finally_op_end].op1.var);
- Z_OBJ_P(fast_call) = NULL;
+ Z_OBJ_P(fast_call) = EG(exception);
+ EG(exception) = NULL;
fast_call->u2.lineno = (uint32_t)-1;
+
ex->opline = &ex->func->op_array.opcodes[finally_op_num];
generator->flags |= ZEND_GENERATOR_FORCED_CLOSE;
zend_generator_resume(generator);
@@ -817,7 +797,10 @@ ZEND_METHOD(Generator, current)
root = zend_generator_get_current(generator);
if (Z_TYPE(root->value) != IS_UNDEF) {
- RETURN_ZVAL_FAST(&root->value);
+ zval *value = &root->value;
+
+ ZVAL_DEREF(value);
+ ZVAL_COPY(return_value, value);
}
}
/* }}} */
@@ -838,7 +821,10 @@ ZEND_METHOD(Generator, key)
root = zend_generator_get_current(generator);
if (Z_TYPE(root->key) != IS_UNDEF) {
- RETURN_ZVAL_FAST(&root->key);
+ zval *key = &root->key;
+
+ ZVAL_DEREF(key);
+ ZVAL_COPY(return_value, key);
}
}
/* }}} */
@@ -892,7 +878,10 @@ ZEND_METHOD(Generator, send)
root = zend_generator_get_current(generator);
if (Z_TYPE(root->value) != IS_UNDEF) {
- RETURN_ZVAL_FAST(&root->value);
+ zval *value = &root->value;
+
+ ZVAL_DEREF(value);
+ ZVAL_COPY(return_value, value);
}
}
/* }}} */
@@ -923,7 +912,10 @@ ZEND_METHOD(Generator, throw)
root = zend_generator_get_current(generator);
if (Z_TYPE(root->value) != IS_UNDEF) {
- RETURN_ZVAL_FAST(&root->value);
+ zval *value = &root->value;
+
+ ZVAL_DEREF(value);
+ ZVAL_COPY(return_value, value);
}
} else {
/* If the generator is already closed throw the exception in the
@@ -1021,7 +1013,10 @@ static void zend_generator_iterator_get_key(zend_object_iterator *iterator, zval
root = zend_generator_get_current(generator);
if (Z_TYPE(root->key) != IS_UNDEF) {
- ZVAL_ZVAL(key, &root->key, 1, 0);
+ zval *zv = &root->key;
+
+ ZVAL_DEREF(zv);
+ ZVAL_COPY(key, zv);
} else {
ZVAL_NULL(key);
}
diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c
index 05426412fe..0ff506a6f4 100644
--- a/Zend/zend_hash.c
+++ b/Zend/zend_hash.c
@@ -107,7 +107,7 @@ static uint32_t zend_always_inline zend_hash_check_size(uint32_t nSize)
rather than using an undefined bis scan result. */
return nSize;
}
-#elif defined(__GNUC__)
+#elif defined(__GNUC__) || __has_builtin(__builtin_clz)
return 0x2 << (__builtin_clz(nSize - 1) ^ 0x1f);
#else
nSize -= 1;
@@ -2206,82 +2206,59 @@ ZEND_API int ZEND_FASTCALL zend_hash_sort_ex(HashTable *ht, sort_func_t sort, co
return SUCCESS;
}
-
-ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered)
-{
+static zend_always_inline int zend_hash_compare_impl(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered) {
uint32_t idx1, idx2;
- Bucket *p1, *p2 = NULL;
- int result;
- zval *pData1, *pData2;
-
- IS_CONSISTENT(ht1);
- IS_CONSISTENT(ht2);
-
- HASH_PROTECT_RECURSION(ht1);
- HASH_PROTECT_RECURSION(ht2);
- result = ht1->nNumOfElements - ht2->nNumOfElements;
- if (result!=0) {
- HASH_UNPROTECT_RECURSION(ht1);
- HASH_UNPROTECT_RECURSION(ht2);
- return result;
+ if (ht1->nNumOfElements != ht2->nNumOfElements) {
+ return ht1->nNumOfElements > ht2->nNumOfElements ? 1 : -1;
}
for (idx1 = 0, idx2 = 0; idx1 < ht1->nNumUsed; idx1++) {
- p1 = ht1->arData + idx1;
- if (Z_TYPE(p1->val) == IS_UNDEF) continue;
+ Bucket *p1 = ht1->arData + idx1, *p2;
+ zval *pData1, *pData2;
+ int result;
+ if (Z_TYPE(p1->val) == IS_UNDEF) continue;
if (ordered) {
while (1) {
+ ZEND_ASSERT(idx2 != ht2->nNumUsed);
p2 = ht2->arData + idx2;
- if (idx2 == ht2->nNumUsed) {
- HASH_UNPROTECT_RECURSION(ht1);
- HASH_UNPROTECT_RECURSION(ht2);
- return 1; /* That's not supposed to happen */
- }
if (Z_TYPE(p2->val) != IS_UNDEF) break;
idx2++;
}
if (p1->key == NULL && p2->key == NULL) { /* numeric indices */
- result = p1->h - p2->h;
- if (result != 0) {
- HASH_UNPROTECT_RECURSION(ht1);
- HASH_UNPROTECT_RECURSION(ht2);
- return result;
+ if (p1->h != p2->h) {
+ return p1->h > p2->h ? 1 : -1;
}
- } else { /* string indices */
- size_t len0 = (p1->key ? p1->key->len : 0);
- size_t len1 = (p2->key ? p2->key->len : 0);
- if (len0 != len1) {
- HASH_UNPROTECT_RECURSION(ht1);
- HASH_UNPROTECT_RECURSION(ht2);
- return len0 > len1 ? 1 : -1;
+ } else if (p1->key != NULL && p2->key != NULL) { /* string indices */
+ if (p1->key->len != p2->key->len) {
+ return p1->key->len > p2->key->len ? 1 : -1;
}
+
result = memcmp(p1->key->val, p2->key->val, p1->key->len);
if (result != 0) {
- HASH_UNPROTECT_RECURSION(ht1);
- HASH_UNPROTECT_RECURSION(ht2);
return result;
}
+ } else {
+ /* Mixed key types: A string key is considered as larger */
+ return p1->key != NULL ? 1 : -1;
}
pData2 = &p2->val;
+ idx2++;
} else {
if (p1->key == NULL) { /* numeric index */
pData2 = zend_hash_index_find(ht2, p1->h);
if (pData2 == NULL) {
- HASH_UNPROTECT_RECURSION(ht1);
- HASH_UNPROTECT_RECURSION(ht2);
return 1;
}
} else { /* string index */
pData2 = zend_hash_find(ht2, p1->key);
if (pData2 == NULL) {
- HASH_UNPROTECT_RECURSION(ht1);
- HASH_UNPROTECT_RECURSION(ht2);
return 1;
}
}
}
+
pData1 = &p1->val;
if (Z_TYPE_P(pData1) == IS_INDIRECT) {
pData1 = Z_INDIRECT_P(pData1);
@@ -2289,6 +2266,7 @@ ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t co
if (Z_TYPE_P(pData2) == IS_INDIRECT) {
pData2 = Z_INDIRECT_P(pData2);
}
+
if (Z_TYPE_P(pData1) == IS_UNDEF) {
if (Z_TYPE_P(pData2) != IS_UNDEF) {
return -1;
@@ -2297,20 +2275,28 @@ ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t co
return 1;
} else {
result = compar(pData1, pData2);
- }
- if (result != 0) {
- HASH_UNPROTECT_RECURSION(ht1);
- HASH_UNPROTECT_RECURSION(ht2);
- return result;
- }
- if (ordered) {
- idx2++;
+ if (result != 0) {
+ return result;
+ }
}
}
+ return 0;
+}
+
+ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered)
+{
+ int result;
+ IS_CONSISTENT(ht1);
+ IS_CONSISTENT(ht2);
+
+ HASH_PROTECT_RECURSION(ht1);
+ HASH_PROTECT_RECURSION(ht2);
+ result = zend_hash_compare_impl(ht1, ht2, compar, ordered);
HASH_UNPROTECT_RECURSION(ht1);
HASH_UNPROTECT_RECURSION(ht2);
- return 0;
+
+ return result;
}
diff --git a/Zend/zend_ini_scanner.c b/Zend/zend_ini_scanner.c
index 990a3733cd..6eb1ff716e 100644
--- a/Zend/zend_ini_scanner.c
+++ b/Zend/zend_ini_scanner.c
@@ -1937,7 +1937,7 @@ end_raw_value_chars:
}
/* Eat leading and trailing double quotes */
- if (yytext[0] == '"' && yytext[yyleng - 1] == '"') {
+ if (yyleng > 1 && yytext[0] == '"' && yytext[yyleng - 1] == '"') {
SCNG(yy_text)++;
yyleng = yyleng - 2;
} else if (sc) {
diff --git a/Zend/zend_ini_scanner.l b/Zend/zend_ini_scanner.l
index c82d79383f..8cc7266ebb 100644
--- a/Zend/zend_ini_scanner.l
+++ b/Zend/zend_ini_scanner.l
@@ -524,7 +524,7 @@ end_raw_value_chars:
}
/* Eat leading and trailing double quotes */
- if (yytext[0] == '"' && yytext[yyleng - 1] == '"') {
+ if (yyleng > 1 && yytext[0] == '"' && yytext[yyleng - 1] == '"') {
SCNG(yy_text)++;
yyleng = yyleng - 2;
} else if (sc) {
diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c
index 54f8f8c117..3b4d2042f1 100644
--- a/Zend/zend_interfaces.c
+++ b/Zend/zend_interfaces.c
@@ -551,31 +551,20 @@ const zend_function_entry zend_funcs_serializable[] = {
};
/* }}} */
-#define REGISTER_ITERATOR_INTERFACE(class_name, class_name_str) \
- {\
- zend_class_entry ce;\
- INIT_CLASS_ENTRY(ce, # class_name_str, zend_funcs_ ## class_name) \
- zend_ce_ ## class_name = zend_register_internal_interface(&ce);\
- zend_ce_ ## class_name->interface_gets_implemented = zend_implement_ ## class_name;\
- }
-
-#define REGISTER_ITERATOR_IMPLEMENT(class_name, interface_name) \
- zend_class_implements(zend_ce_ ## class_name, 1, zend_ce_ ## interface_name)
-
/* {{{ zend_register_interfaces */
ZEND_API void zend_register_interfaces(void)
{
- REGISTER_ITERATOR_INTERFACE(traversable, Traversable);
+ REGISTER_MAGIC_INTERFACE(traversable, Traversable);
- REGISTER_ITERATOR_INTERFACE(aggregate, IteratorAggregate);
- REGISTER_ITERATOR_IMPLEMENT(aggregate, traversable);
+ REGISTER_MAGIC_INTERFACE(aggregate, IteratorAggregate);
+ REGISTER_MAGIC_IMPLEMENT(aggregate, traversable);
- REGISTER_ITERATOR_INTERFACE(iterator, Iterator);
- REGISTER_ITERATOR_IMPLEMENT(iterator, traversable);
+ REGISTER_MAGIC_INTERFACE(iterator, Iterator);
+ REGISTER_MAGIC_IMPLEMENT(iterator, traversable);
- REGISTER_ITERATOR_INTERFACE(arrayaccess, ArrayAccess);
+ REGISTER_MAGIC_INTERFACE(arrayaccess, ArrayAccess);
- REGISTER_ITERATOR_INTERFACE(serializable, Serializable)
+ REGISTER_MAGIC_INTERFACE(serializable, Serializable);
}
/* }}} */
diff --git a/Zend/zend_interfaces.h b/Zend/zend_interfaces.h
index 8a8e0ce988..1f7b9b3860 100644
--- a/Zend/zend_interfaces.h
+++ b/Zend/zend_interfaces.h
@@ -49,6 +49,17 @@ ZEND_API zval* zend_call_method(zval *object_pp, zend_class_entry *obj_ce, zend_
#define zend_call_method_with_2_params(obj, obj_ce, fn_proxy, function_name, retval, arg1, arg2) \
zend_call_method(obj, obj_ce, fn_proxy, function_name, sizeof(function_name)-1, retval, 2, arg1, arg2)
+#define REGISTER_MAGIC_INTERFACE(class_name, class_name_str) \
+ {\
+ zend_class_entry ce;\
+ INIT_CLASS_ENTRY(ce, # class_name_str, zend_funcs_ ## class_name) \
+ zend_ce_ ## class_name = zend_register_internal_interface(&ce);\
+ zend_ce_ ## class_name->interface_gets_implemented = zend_implement_ ## class_name;\
+ }
+
+#define REGISTER_MAGIC_IMPLEMENT(class_name, interface_name) \
+ zend_class_implements(zend_ce_ ## class_name, 1, zend_ce_ ## interface_name)
+
ZEND_API void zend_user_it_rewind(zend_object_iterator *_iter);
ZEND_API int zend_user_it_valid(zend_object_iterator *_iter);
ZEND_API void zend_user_it_get_current_key(zend_object_iterator *_iter, zval *key);
diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y
index 9612324eac..5dd700158d 100644
--- a/Zend/zend_language_parser.y
+++ b/Zend/zend_language_parser.y
@@ -732,7 +732,7 @@ trait_alias:
{ zval zv; zend_lex_tstring(&zv); $$ = zend_ast_create_ex(ZEND_AST_TRAIT_ALIAS, 0, $1, zend_ast_create_zval(&zv)); }
| trait_method_reference T_AS member_modifier identifier
{ $$ = zend_ast_create_ex(ZEND_AST_TRAIT_ALIAS, $3, $1, $4); }
- | trait_method_reference T_AS member_modifier %prec '+'
+ | trait_method_reference T_AS member_modifier
{ $$ = zend_ast_create_ex(ZEND_AST_TRAIT_ALIAS, $3, $1, NULL); }
;
diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c
index 63d19483ba..6813cf4db2 100644
--- a/Zend/zend_language_scanner.c
+++ b/Zend/zend_language_scanner.c
@@ -1010,7 +1010,7 @@ static int zend_scan_escape_string(zval *zendlval, char *str, int len, char quot
}
if (!valid) {
- zend_throw_exception(zend_get_parse_exception(),
+ zend_throw_exception(zend_get_parse_error(),
"Invalid UTF-8 codepoint escape sequence", E_PARSE);
zval_ptr_dtor(zendlval);
return FAILURE;
@@ -1021,7 +1021,7 @@ static int zend_scan_escape_string(zval *zendlval, char *str, int len, char quot
/* per RFC 3629, UTF-8 can only represent 21 bits */
if (codepoint > 0x10FFFF || errno) {
- zend_throw_exception(zend_get_parse_exception(),
+ zend_throw_exception(zend_get_parse_error(),
"Invalid UTF-8 codepoint escape sequence: Codepoint too large", E_PARSE);
zval_ptr_dtor(zendlval);
return FAILURE;
@@ -2743,7 +2743,7 @@ yy136:
* Because the lexing itself doesn't do that for us
*/
if (end != yytext + yyleng) {
- zend_throw_exception(zend_get_parse_exception(), "Invalid numeric literal", E_PARSE);
+ zend_throw_exception(zend_get_parse_error(), "Invalid numeric literal", E_PARSE);
RETURN_TOKEN(T_ERROR);
}
} else {
@@ -2759,7 +2759,7 @@ yy136:
}
/* Also not an assert for the same reason */
if (end != yytext + yyleng) {
- zend_throw_exception(zend_get_parse_exception(),
+ zend_throw_exception(zend_get_parse_error(),
"Invalid numeric literal", E_PARSE);
RETURN_TOKEN(T_ERROR);
}
@@ -2768,7 +2768,7 @@ yy136:
}
/* Also not an assert for the same reason */
if (end != yytext + yyleng) {
- zend_throw_exception(zend_get_parse_exception(), "Invalid numeric literal", E_PARSE);
+ zend_throw_exception(zend_get_parse_error(), "Invalid numeric literal", E_PARSE);
RETURN_TOKEN(T_ERROR);
}
}
diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l
index cde0621df0..01c489cbe4 100644
--- a/Zend/zend_language_scanner.l
+++ b/Zend/zend_language_scanner.l
@@ -1008,7 +1008,7 @@ static int zend_scan_escape_string(zval *zendlval, char *str, int len, char quot
}
if (!valid) {
- zend_throw_exception(zend_get_parse_exception(),
+ zend_throw_exception(zend_get_parse_error(),
"Invalid UTF-8 codepoint escape sequence", E_PARSE);
zval_ptr_dtor(zendlval);
return FAILURE;
@@ -1019,7 +1019,7 @@ static int zend_scan_escape_string(zval *zendlval, char *str, int len, char quot
/* per RFC 3629, UTF-8 can only represent 21 bits */
if (codepoint > 0x10FFFF || errno) {
- zend_throw_exception(zend_get_parse_exception(),
+ zend_throw_exception(zend_get_parse_error(),
"Invalid UTF-8 codepoint escape sequence: Codepoint too large", E_PARSE);
zval_ptr_dtor(zendlval);
return FAILURE;
@@ -1658,7 +1658,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
* Because the lexing itself doesn't do that for us
*/
if (end != yytext + yyleng) {
- zend_throw_exception(zend_get_parse_exception(), "Invalid numeric literal", E_PARSE);
+ zend_throw_exception(zend_get_parse_error(), "Invalid numeric literal", E_PARSE);
RETURN_TOKEN(T_ERROR);
}
} else {
@@ -1674,7 +1674,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
}
/* Also not an assert for the same reason */
if (end != yytext + yyleng) {
- zend_throw_exception(zend_get_parse_exception(),
+ zend_throw_exception(zend_get_parse_error(),
"Invalid numeric literal", E_PARSE);
RETURN_TOKEN(T_ERROR);
}
@@ -1683,7 +1683,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
}
/* Also not an assert for the same reason */
if (end != yytext + yyleng) {
- zend_throw_exception(zend_get_parse_exception(), "Invalid numeric literal", E_PARSE);
+ zend_throw_exception(zend_get_parse_error(), "Invalid numeric literal", E_PARSE);
RETURN_TOKEN(T_ERROR);
}
}
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index 259679a57f..f284ca4b31 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -628,6 +628,12 @@ ZEND_API void zend_std_write_property(zval *object, zval *member, zval *value, v
goto found;
}
} else if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
if ((variable_ptr = zend_hash_find(zobj->properties, Z_STR_P(member))) != NULL) {
found:
zend_assign_to_variable(variable_ptr, value, IS_CV);
@@ -672,7 +678,7 @@ write_std_property:
if (Z_REFCOUNTED_P(value)) {
if (Z_ISREF_P(value)) {
/* if we assign referenced variable, we should separate it */
- ZVAL_DUP(&tmp, Z_REFVAL_P(value));
+ ZVAL_COPY(&tmp, Z_REFVAL_P(value));
value = &tmp;
} else {
Z_ADDREF_P(value);
@@ -815,20 +821,31 @@ static zval *zend_std_get_property_ptr_ptr(zval *object, zval *member, int type,
}
}
} else {
- if (UNEXPECTED(!zobj->properties) ||
- UNEXPECTED((retval = zend_hash_find(zobj->properties, name)) == NULL)) {
- if (EXPECTED(!zobj->ce->__get) ||
- UNEXPECTED((*zend_get_property_guard(zobj, name)) & IN_GET)) {
- if (UNEXPECTED(!zobj->properties)) {
- rebuild_object_properties(zobj);
+ if (EXPECTED(zobj->properties)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
}
- retval = zend_hash_update(zobj->properties, name, &EG(uninitialized_zval));
- /* Notice is thrown after creation of the property, to avoid EG(std_property_info)
- * being overwritten in an error handler. */
- if (UNEXPECTED(type == BP_VAR_RW || type == BP_VAR_R)) {
- zend_error(E_NOTICE, "Undefined property: %s::$%s", zobj->ce->name->val, name->val);
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ if (EXPECTED((retval = zend_hash_find(zobj->properties, name)) != NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(member) != IS_STRING)) {
+ zend_string_release(name);
}
- }
+ return retval;
+ }
+ }
+ if (EXPECTED(!zobj->ce->__get) ||
+ UNEXPECTED((*zend_get_property_guard(zobj, name)) & IN_GET)) {
+ if (UNEXPECTED(!zobj->properties)) {
+ rebuild_object_properties(zobj);
+ }
+ retval = zend_hash_update(zobj->properties, name, &EG(uninitialized_zval));
+ /* Notice is thrown after creation of the property, to avoid EG(std_property_info)
+ * being overwritten in an error handler. */
+ if (UNEXPECTED(type == BP_VAR_RW || type == BP_VAR_R)) {
+ zend_error(E_NOTICE, "Undefined property: %s::$%s", zobj->ce->name->val, name->val);
+ }
}
}
}
@@ -866,9 +883,16 @@ static void zend_std_unset_property(zval *object, zval *member, void **cache_slo
ZVAL_UNDEF(slot);
goto exit;
}
- } else if (EXPECTED(zobj->properties != NULL) &&
- EXPECTED(zend_hash_del(zobj->properties, Z_STR_P(member)) != FAILURE)) {
- goto exit;
+ } else if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ if (EXPECTED(zend_hash_del(zobj->properties, Z_STR_P(member)) != FAILURE)) {
+ goto exit;
+ }
}
} else if (UNEXPECTED(EG(exception))) {
goto exit;
diff --git a/Zend/zend_objects.c b/Zend/zend_objects.c
index 9007661f03..2a0655b258 100644
--- a/Zend/zend_objects.c
+++ b/Zend/zend_objects.c
@@ -55,7 +55,11 @@ ZEND_API void zend_object_std_dtor(zend_object *object)
zval *p, *end;
if (object->properties) {
- zend_array_destroy(object->properties);
+ if (EXPECTED(!(GC_FLAGS(object->properties) & IS_ARRAY_IMMUTABLE))) {
+ if (EXPECTED(--GC_REFCOUNT(object->properties) == 0)) {
+ zend_array_destroy(object->properties);
+ }
+ }
}
p = object->properties_table;
if (EXPECTED(object->ce->default_properties_count)) {
@@ -163,7 +167,17 @@ ZEND_API void zend_objects_clone_members(zend_object *new_object, zend_object *o
src++;
dst++;
} while (src != end);
+ } else if (old_object->properties && !old_object->ce->clone) {
+ /* fast copy */
+ if (EXPECTED(old_object->handlers == &std_object_handlers)) {
+ if (EXPECTED(!(GC_FLAGS(old_object->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(old_object->properties)++;
+ }
+ new_object->properties = old_object->properties;
+ return;
+ }
}
+
if (old_object->properties &&
EXPECTED(zend_hash_num_elements(old_object->properties))) {
zval *prop, new_prop;
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c
index 7365d6a518..1c760c5902 100644
--- a/Zend/zend_opcode.c
+++ b/Zend/zend_opcode.c
@@ -180,6 +180,7 @@ ZEND_API void zend_cleanup_internal_class_data(zend_class_entry *ce)
#else
ce->static_members_table = NULL;
#endif
+ ce->ce_flags &= ~ZEND_ACC_CONSTANTS_UPDATED;
while (p != end) {
i_zval_ptr_dtor(p ZEND_FILE_LINE_CC);
p++;
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index aa20bcaf59..d9670a5a49 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -135,17 +135,23 @@ ZEND_API zend_long ZEND_FASTCALL zend_atol(const char *str, int str_len) /* {{{
}
/* }}} */
+static zend_always_inline void zend_unwrap_reference(zval *op) /* {{{ */
+{
+ if (Z_REFCOUNT_P(op) == 1) {
+ ZVAL_UNREF(op);
+ } else {
+ Z_DELREF_P(op);
+ ZVAL_COPY(op, Z_REFVAL_P(op));
+ }
+}
+/* }}} */
+
ZEND_API void ZEND_FASTCALL convert_scalar_to_number(zval *op) /* {{{ */
{
try_again:
switch (Z_TYPE_P(op)) {
case IS_REFERENCE:
- if (Z_REFCOUNT_P(op) == 1) {
- ZVAL_UNREF(op);
- } else {
- Z_DELREF_P(op);
- ZVAL_COPY_VALUE(op, Z_REFVAL_P(op));
- }
+ zend_unwrap_reference(op);
goto try_again;
case IS_STRING:
{
@@ -209,7 +215,7 @@ try_again:
(op) = &(holder); \
break; \
case IS_OBJECT: \
- ZVAL_DUP(&(holder), op); \
+ ZVAL_COPY(&(holder), op); \
convert_to_long_base(&(holder), 10); \
if (Z_TYPE(holder) == IS_LONG) { \
(op) = &(holder); \
@@ -220,7 +226,7 @@ try_again:
/* }}} */
-/* {{{ convert_object_to_type */
+/* {{{ convert_object_to_type: dst will be either ctype or UNDEF */
#define convert_object_to_type(op, dst, ctype, conv_func) \
ZVAL_UNDEF(dst); \
if (Z_OBJ_HT_P(op)->cast_object) { \
@@ -284,6 +290,7 @@ ZEND_API void ZEND_FASTCALL convert_to_long_base(zval *op, int base) /* {{{ */
{
zend_long tmp;
+try_again:
switch (Z_TYPE_P(op)) {
case IS_NULL:
case IS_FALSE:
@@ -312,7 +319,7 @@ ZEND_API void ZEND_FASTCALL convert_to_long_base(zval *op, int base) /* {{{ */
break;
case IS_ARRAY:
tmp = (zend_hash_num_elements(Z_ARRVAL_P(op))?1:0);
- zval_dtor(op);
+ zval_ptr_dtor(op);
ZVAL_LONG(op, tmp);
break;
case IS_OBJECT:
@@ -325,12 +332,14 @@ ZEND_API void ZEND_FASTCALL convert_to_long_base(zval *op, int base) /* {{{ */
if (Z_TYPE(dst) == IS_LONG) {
ZVAL_COPY_VALUE(op, &dst);
} else {
- zend_error(E_NOTICE, "Object of class %s could not be converted to int", Z_OBJCE_P(op)->name->val);
ZVAL_LONG(op, 1);
}
return;
}
+ case IS_REFERENCE:
+ zend_unwrap_reference(op);
+ goto try_again;
EMPTY_SWITCH_DEFAULT_CASE()
}
}
@@ -340,6 +349,7 @@ ZEND_API void ZEND_FASTCALL convert_to_double(zval *op) /* {{{ */
{
double tmp;
+try_again:
switch (Z_TYPE_P(op)) {
case IS_NULL:
case IS_FALSE:
@@ -369,7 +379,7 @@ ZEND_API void ZEND_FASTCALL convert_to_double(zval *op) /* {{{ */
break;
case IS_ARRAY:
tmp = (zend_hash_num_elements(Z_ARRVAL_P(op))?1:0);
- zval_dtor(op);
+ zval_ptr_dtor(op);
ZVAL_DOUBLE(op, tmp);
break;
case IS_OBJECT:
@@ -382,12 +392,13 @@ ZEND_API void ZEND_FASTCALL convert_to_double(zval *op) /* {{{ */
if (Z_TYPE(dst) == IS_DOUBLE) {
ZVAL_COPY_VALUE(op, &dst);
} else {
- zend_error(E_NOTICE, "Object of class %s could not be converted to float", Z_OBJCE_P(op)->name->val);
-
ZVAL_DOUBLE(op, 1.0);
}
break;
}
+ case IS_REFERENCE:
+ zend_unwrap_reference(op);
+ goto try_again;
EMPTY_SWITCH_DEFAULT_CASE()
}
}
@@ -408,7 +419,7 @@ ZEND_API void ZEND_FASTCALL convert_to_null(zval *op) /* {{{ */
}
}
- zval_dtor(op);
+ zval_ptr_dtor(op);
ZVAL_NULL(op);
}
/* }}} */
@@ -417,6 +428,7 @@ ZEND_API void ZEND_FASTCALL convert_to_boolean(zval *op) /* {{{ */
{
int tmp;
+try_again:
switch (Z_TYPE_P(op)) {
case IS_FALSE:
case IS_TRUE:
@@ -452,7 +464,7 @@ ZEND_API void ZEND_FASTCALL convert_to_boolean(zval *op) /* {{{ */
break;
case IS_ARRAY:
tmp = (zend_hash_num_elements(Z_ARRVAL_P(op))?1:0);
- zval_dtor(op);
+ zval_ptr_dtor(op);
ZVAL_BOOL(op, tmp);
break;
case IS_OBJECT:
@@ -469,6 +481,9 @@ ZEND_API void ZEND_FASTCALL convert_to_boolean(zval *op) /* {{{ */
}
break;
}
+ case IS_REFERENCE:
+ zend_unwrap_reference(op);
+ goto try_again;
EMPTY_SWITCH_DEFAULT_CASE()
}
}
@@ -482,6 +497,7 @@ ZEND_API void ZEND_FASTCALL _convert_to_cstring(zval *op ZEND_FILE_LINE_DC) /* {
ZEND_API void ZEND_FASTCALL _convert_to_string(zval *op ZEND_FILE_LINE_DC) /* {{{ */
{
+try_again:
switch (Z_TYPE_P(op)) {
case IS_UNDEF:
case IS_NULL:
@@ -516,24 +532,25 @@ ZEND_API void ZEND_FASTCALL _convert_to_string(zval *op ZEND_FILE_LINE_DC) /* {{
}
case IS_ARRAY:
zend_error(E_NOTICE, "Array to string conversion");
- zval_dtor(op);
+ zval_ptr_dtor(op);
ZVAL_NEW_STR(op, zend_string_init("Array", sizeof("Array")-1, 0));
break;
case IS_OBJECT: {
zval dst;
convert_object_to_type(op, &dst, IS_STRING, convert_to_string);
+ zval_dtor(op);
if (Z_TYPE(dst) == IS_STRING) {
- zval_dtor(op);
ZVAL_COPY_VALUE(op, &dst);
} else {
- zend_error(E_NOTICE, "Object of class %s to string conversion", Z_OBJCE_P(op)->name->val);
- zval_dtor(op);
ZVAL_NEW_STR(op, zend_string_init("Object", sizeof("Object")-1, 0));
}
break;
}
+ case IS_REFERENCE:
+ zend_unwrap_reference(op);
+ goto try_again;
EMPTY_SWITCH_DEFAULT_CASE()
}
}
@@ -553,7 +570,7 @@ static void convert_scalar_to_array(zval *op) /* {{{ */
ZEND_API void ZEND_FASTCALL convert_to_array(zval *op) /* {{{ */
{
-
+try_again:
switch (Z_TYPE_P(op)) {
case IS_ARRAY:
break;
@@ -566,9 +583,24 @@ ZEND_API void ZEND_FASTCALL convert_to_array(zval *op) /* {{{ */
HashTable *obj_ht = Z_OBJ_HT_P(op)->get_properties(op);
if (obj_ht) {
zval arr;
- ZVAL_ARR(&arr, zend_array_dup(obj_ht));
- zval_dtor(op);
- ZVAL_COPY_VALUE(op, &arr);
+
+ if (!Z_OBJCE_P(op)->default_properties_count && obj_ht == Z_OBJ_P(op)->properties) {
+ /* fast copy */
+ if (EXPECTED(Z_OBJ_P(op)->handlers == &std_object_handlers)) {
+ ZVAL_ARR(&arr, obj_ht);
+ if (EXPECTED(!(GC_FLAGS(Z_OBJ_P(op)->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(Z_OBJ_P(op)->properties)++;
+ }
+ } else {
+ ZVAL_ARR(&arr, zend_array_dup(obj_ht));
+ }
+ zval_dtor(op);
+ ZVAL_COPY_VALUE(op, &arr);
+ } else {
+ ZVAL_ARR(&arr, zend_array_dup(obj_ht));
+ zval_dtor(op);
+ ZVAL_COPY_VALUE(op, &arr);
+ }
return;
}
} else {
@@ -590,6 +622,9 @@ ZEND_API void ZEND_FASTCALL convert_to_array(zval *op) /* {{{ */
ZVAL_NEW_ARR(op);
zend_hash_init(Z_ARRVAL_P(op), 8, NULL, ZVAL_PTR_DTOR, 0);
break;
+ case IS_REFERENCE:
+ zend_unwrap_reference(op);
+ goto try_again;
default:
convert_scalar_to_array(op);
break;
@@ -599,18 +634,14 @@ ZEND_API void ZEND_FASTCALL convert_to_array(zval *op) /* {{{ */
ZEND_API void ZEND_FASTCALL convert_to_object(zval *op) /* {{{ */
{
-
+try_again:
switch (Z_TYPE_P(op)) {
case IS_ARRAY:
{
- HashTable *properties = emalloc(sizeof(HashTable));
- zend_array *arr = Z_ARR_P(op);
-
- memcpy(properties, Z_ARRVAL_P(op), sizeof(HashTable));
- object_and_properties_init(op, zend_standard_class_def, properties);
- if (--GC_REFCOUNT(arr) == 0) {
- efree_size(arr, sizeof(zend_array));
- }
+ zval tmp;
+ ZVAL_COPY_VALUE(&tmp, op);
+ SEPARATE_ARRAY(&tmp);
+ object_and_properties_init(op, zend_standard_class_def, Z_ARR(tmp));
break;
}
case IS_OBJECT:
@@ -618,6 +649,9 @@ ZEND_API void ZEND_FASTCALL convert_to_object(zval *op) /* {{{ */
case IS_NULL:
object_init(op);
break;
+ case IS_REFERENCE:
+ zend_unwrap_reference(op);
+ goto try_again;
default: {
zval tmp;
ZVAL_COPY_VALUE(&tmp, op);
@@ -703,7 +737,6 @@ try_again:
if (Z_TYPE(dst) == IS_LONG) {
return Z_LVAL(dst);
} else {
- zend_error(E_NOTICE, "Object of class %s could not be converted to int", Z_OBJCE_P(op)->name->val);
return 1;
}
}
@@ -743,8 +776,6 @@ try_again:
if (Z_TYPE(dst) == IS_DOUBLE) {
return Z_DVAL(dst);
} else {
- zend_error(E_NOTICE, "Object of class %s could not be converted to double", Z_OBJCE_P(op)->name->val);
-
return 1.0;
}
}
@@ -1721,7 +1752,7 @@ static inline void zend_free_obj_get_result(zval *op) /* {{{ */
}
/* }}} */
-ZEND_API int compare_function(zval *result, zval *op1, zval *op2) /* {{{ */
+static zend_always_inline int i_compare_function(zval *result, zval *op1, zval *op2) /* {{{ */
{
int ret;
int converted = 0;
@@ -1903,6 +1934,18 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2) /* {{{ */
}
/* }}} */
+ZEND_API int ZEND_FASTCALL compare_function(zval *result, zval *op1, zval *op2) /* {{{ */
+{
+ return i_compare_function(result, op1, op2);
+}
+/* }}} */
+
+ZEND_API int zval_compare_function(zval *result, zval *op1, zval *op2) /* {{{ */
+{
+ return i_compare_function(result, op1, op2);
+}
+/* }}} */
+
static int hash_zval_identical_function(zval *z1, zval *z2) /* {{{ */
{
zval result;
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h
index c026f23415..601508ca27 100644
--- a/Zend/zend_operators.h
+++ b/Zend/zend_operators.h
@@ -327,7 +327,8 @@ again:
return result;
}
-ZEND_API int compare_function(zval *result, zval *op1, zval *op2);
+ZEND_API int ZEND_FASTCALL compare_function(zval *result, zval *op1, zval *op2);
+ZEND_API int zval_compare_function(zval *result, zval *op1, zval *op2);
ZEND_API int numeric_compare_function(zval *result, zval *op1, zval *op2);
ZEND_API int string_compare_function_ex(zval *result, zval *op1, zval *op2, zend_bool case_insensitive);
ZEND_API int string_compare_function(zval *result, zval *op1, zval *op2);
@@ -364,7 +365,6 @@ ZEND_API void ZEND_FASTCALL zend_locale_sprintf_double(zval *op ZEND_FILE_LINE_D
#define convert_to_ex_master(pzv, lower_type, upper_type) \
if (Z_TYPE_P(pzv)!=upper_type) { \
- SEPARATE_ZVAL_IF_NOT_REF(pzv); \
convert_to_##lower_type(pzv); \
}
@@ -400,7 +400,6 @@ ZEND_API void ZEND_FASTCALL zend_locale_sprintf_double(zval *op ZEND_FILE_LINE_D
#define convert_to_explicit_type_ex(pzv, str_type) \
if (Z_TYPE_P(pzv) != str_type) { \
- SEPARATE_ZVAL_IF_NOT_REF(pzv); \
convert_to_explicit_type(pzv, str_type); \
}
@@ -414,7 +413,6 @@ ZEND_API void ZEND_FASTCALL zend_locale_sprintf_double(zval *op ZEND_FILE_LINE_D
#define convert_scalar_to_number_ex(pzv) \
if (Z_TYPE_P(pzv)!=IS_LONG && Z_TYPE_P(pzv)!=IS_DOUBLE) { \
- SEPARATE_ZVAL_IF_NOT_REF(pzv); \
convert_scalar_to_number(pzv); \
}
diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h
index 65455ee10f..57080ca7b7 100644
--- a/Zend/zend_portability.h
+++ b/Zend/zend_portability.h
@@ -85,9 +85,17 @@
# define ZEND_GCC_VERSION 0
#endif
+/* Compatibility with non-clang compilers */
+#ifndef __has_attribute
+# define __has_attribute(x) 0
+#endif
+#ifndef __has_builtin
+# define __has_builtin(x) 0
+#endif
+
#if defined(ZEND_WIN32)
# define ZEND_ASSUME(c) __assume(c)
-#elif defined(__GNUC__) && PHP_HAVE_BUILTIN_EXPECT && ZEND_GCC_VERSION >= 4005
+#elif ((defined(__GNUC__) && ZEND_GCC_VERSION >= 4005) || __has_builtin(__builtin_unreachable)) && PHP_HAVE_BUILTIN_EXPECT
# define ZEND_ASSUME(c) do { \
if (__builtin_expect(!(c), 0)) __builtin_unreachable(); \
} while (0)
@@ -161,11 +169,6 @@ char *alloca();
# endif
#endif
-/* Compatibility with non-clang compilers */
-#ifndef __has_attribute
-# define __has_attribute(x) 0
-#endif
-
#if ZEND_GCC_VERSION >= 2096
# define ZEND_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
#else
diff --git a/Zend/zend_types.h b/Zend/zend_types.h
index 63565182ce..5eed487a33 100644
--- a/Zend/zend_types.h
+++ b/Zend/zend_types.h
@@ -645,14 +645,16 @@ static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
#define ZVAL_NEW_ARR(z) do { \
zval *__z = (z); \
- zend_array *_arr = emalloc(sizeof(zend_array)); \
+ zend_array *_arr = \
+ (zend_array *) emalloc(sizeof(zend_array)); \
Z_ARR_P(__z) = _arr; \
Z_TYPE_INFO_P(__z) = IS_ARRAY_EX; \
} while (0)
#define ZVAL_NEW_PERSISTENT_ARR(z) do { \
zval *__z = (z); \
- zend_array *_arr = malloc(sizeof(zend_array)); \
+ zend_array *_arr = \
+ (zend_array *) malloc(sizeof(zend_array)); \
Z_ARR_P(__z) = _arr; \
Z_TYPE_INFO_P(__z) = IS_ARRAY_EX; \
} while (0)
@@ -670,7 +672,8 @@ static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
} while (0)
#define ZVAL_NEW_RES(z, h, p, t) do { \
- zend_resource *_res = emalloc(sizeof(zend_resource)); \
+ zend_resource *_res = \
+ (zend_resource *) emalloc(sizeof(zend_resource)); \
zval *__z; \
GC_REFCOUNT(_res) = 1; \
GC_TYPE_INFO(_res) = IS_RESOURCE; \
@@ -683,7 +686,8 @@ static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
} while (0)
#define ZVAL_NEW_PERSISTENT_RES(z, h, p, t) do { \
- zend_resource *_res = malloc(sizeof(zend_resource)); \
+ zend_resource *_res = \
+ (zend_resource *) malloc(sizeof(zend_resource)); \
zval *__z; \
GC_REFCOUNT(_res) = 1; \
GC_TYPE_INFO(_res) = IS_RESOURCE; \
@@ -702,7 +706,8 @@ static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
} while (0)
#define ZVAL_NEW_EMPTY_REF(z) do { \
- zend_reference *_ref = emalloc(sizeof(zend_reference)); \
+ zend_reference *_ref = \
+ (zend_reference *) emalloc(sizeof(zend_reference)); \
GC_REFCOUNT(_ref) = 1; \
GC_TYPE_INFO(_ref) = IS_REFERENCE; \
Z_REF_P(z) = _ref; \
@@ -710,7 +715,8 @@ static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
} while (0)
#define ZVAL_NEW_REF(z, r) do { \
- zend_reference *_ref = emalloc(sizeof(zend_reference)); \
+ zend_reference *_ref = \
+ (zend_reference *) emalloc(sizeof(zend_reference)); \
GC_REFCOUNT(_ref) = 1; \
GC_TYPE_INFO(_ref) = IS_REFERENCE; \
ZVAL_COPY_VALUE(&_ref->val, r); \
@@ -719,7 +725,8 @@ static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
} while (0)
#define ZVAL_NEW_PERSISTENT_REF(z, r) do { \
- zend_reference *_ref = malloc(sizeof(zend_reference)); \
+ zend_reference *_ref = \
+ (zend_reference *) malloc(sizeof(zend_reference)); \
GC_REFCOUNT(_ref) = 1; \
GC_TYPE_INFO(_ref) = IS_REFERENCE; \
ZVAL_COPY_VALUE(&_ref->val, r); \
@@ -729,7 +736,8 @@ static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
#define ZVAL_NEW_AST(z, a) do { \
zval *__z = (z); \
- zend_ast_ref *_ast = emalloc(sizeof(zend_ast_ref)); \
+ zend_ast_ref *_ast = \
+ (zend_ast_ref *) emalloc(sizeof(zend_ast_ref)); \
GC_REFCOUNT(_ast) = 1; \
GC_TYPE_INFO(_ast) = IS_CONSTANT_AST; \
_ast->ast = (a); \
diff --git a/Zend/zend_virtual_cwd.c b/Zend/zend_virtual_cwd.c
index 330fff187d..cc3fff4416 100644
--- a/Zend/zend_virtual_cwd.c
+++ b/Zend/zend_virtual_cwd.c
@@ -553,6 +553,11 @@ CWD_API char *virtual_getcwd_ex(size_t *length) /* {{{ */
return retval;
}
#endif
+ if (!state->cwd) {
+ *length = 0;
+ return NULL;
+ }
+
*length = state->cwd_length;
return estrdup(state->cwd);
}
@@ -574,6 +579,9 @@ CWD_API char *virtual_getcwd(char *buf, size_t size) /* {{{ */
errno = ERANGE; /* Is this OK? */
return NULL;
}
+ if (!cwd) {
+ return NULL;
+ }
memcpy(buf, cwd, length+1);
efree(cwd);
return buf;
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index c3011eb9bc..8462d950cb 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -164,11 +164,12 @@ ZEND_VM_HANDLER(4, ZEND_DIV, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- fast_div_function(EX_VAR(opline->result.var),
- GET_OP1_ZVAL_PTR(BP_VAR_R),
- GET_OP2_ZVAL_PTR(BP_VAR_R));
+ op1 = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ fast_div_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
CHECK_EXCEPTION();
@@ -218,11 +219,12 @@ ZEND_VM_HANDLER(6, ZEND_SL, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- shift_left_function(EX_VAR(opline->result.var),
- GET_OP1_ZVAL_PTR(BP_VAR_R),
- GET_OP2_ZVAL_PTR(BP_VAR_R));
+ op1 = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ shift_left_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
CHECK_EXCEPTION();
@@ -233,11 +235,12 @@ ZEND_VM_HANDLER(7, ZEND_SR, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- shift_right_function(EX_VAR(opline->result.var),
- GET_OP1_ZVAL_PTR(BP_VAR_R),
- GET_OP2_ZVAL_PTR(BP_VAR_R));
+ op1 = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ shift_right_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
CHECK_EXCEPTION();
@@ -309,12 +312,13 @@ ZEND_VM_HANDLER(15, ZEND_IS_IDENTICAL, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_identical_function(
- GET_OP1_ZVAL_PTR_DEREF(BP_VAR_R),
- GET_OP2_ZVAL_PTR_DEREF(BP_VAR_R));
+ op1 = GET_OP1_ZVAL_PTR_DEREF(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR_DEREF(BP_VAR_R);
+ result = fast_is_identical_function(op1, op2);
FREE_OP1();
FREE_OP2();
ZEND_VM_SMART_BRANCH(result, (OP1_TYPE|OP2_TYPE) & (IS_VAR|IS_TMP_VAR));
@@ -329,12 +333,13 @@ ZEND_VM_HANDLER(16, ZEND_IS_NOT_IDENTICAL, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_not_identical_function(
- GET_OP1_ZVAL_PTR_DEREF(BP_VAR_R),
- GET_OP2_ZVAL_PTR_DEREF(BP_VAR_R));
+ op1 = GET_OP1_ZVAL_PTR_DEREF(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR_DEREF(BP_VAR_R);
+ result = fast_is_not_identical_function(op1, op2);
FREE_OP1();
FREE_OP2();
ZEND_VM_SMART_BRANCH(result, (OP1_TYPE|OP2_TYPE) & (IS_VAR|IS_TMP_VAR));
@@ -589,12 +594,12 @@ ZEND_VM_HANDLER(170, ZEND_SPACESHIP, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = EX_VAR(opline->result.var);
+ zval *op1, *op2;
SAVE_OPLINE();
- compare_function(result,
- GET_OP1_ZVAL_PTR(BP_VAR_R),
- GET_OP2_ZVAL_PTR(BP_VAR_R));
+ op1 = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ compare_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
CHECK_EXCEPTION();
@@ -605,11 +610,12 @@ ZEND_VM_HANDLER(9, ZEND_BW_OR, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_or_function(EX_VAR(opline->result.var),
- GET_OP1_ZVAL_PTR(BP_VAR_R),
- GET_OP2_ZVAL_PTR(BP_VAR_R));
+ op1 = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ bitwise_or_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
CHECK_EXCEPTION();
@@ -620,11 +626,12 @@ ZEND_VM_HANDLER(10, ZEND_BW_AND, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_and_function(EX_VAR(opline->result.var),
- GET_OP1_ZVAL_PTR(BP_VAR_R),
- GET_OP2_ZVAL_PTR(BP_VAR_R));
+ op1 = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ bitwise_and_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
CHECK_EXCEPTION();
@@ -635,11 +642,12 @@ ZEND_VM_HANDLER(11, ZEND_BW_XOR, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_xor_function(EX_VAR(opline->result.var),
- GET_OP1_ZVAL_PTR(BP_VAR_R),
- GET_OP2_ZVAL_PTR(BP_VAR_R));
+ op1 = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ bitwise_xor_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
CHECK_EXCEPTION();
@@ -650,11 +658,12 @@ ZEND_VM_HANDLER(14, ZEND_BOOL_XOR, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- boolean_xor_function(EX_VAR(opline->result.var),
- GET_OP1_ZVAL_PTR(BP_VAR_R),
- GET_OP2_ZVAL_PTR(BP_VAR_R));
+ op1 = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ boolean_xor_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
CHECK_EXCEPTION();
@@ -3910,13 +3919,11 @@ ZEND_VM_C_LABEL(fcall_end):
ZEND_VM_HANDLER(124, ZEND_VERIFY_RETURN_TYPE, CONST|TMP|VAR|UNUSED|CV, UNUSED)
{
-#if !defined(ZEND_VM_SPEC) || (OP1_TYPE != IS_UNUSED)
USE_OPLINE
-#endif
SAVE_OPLINE();
if (OP1_TYPE == IS_UNUSED) {
- zend_verify_missing_return_type(EX(func));
+ zend_verify_missing_return_type(EX(func), CACHE_ADDR(opline->op2.num));
} else {
/* prevents "undefined variable opline" errors */
#if !defined(ZEND_VM_SPEC) || (OP1_TYPE != IS_UNUSED)
@@ -3935,22 +3942,20 @@ ZEND_VM_HANDLER(124, ZEND_VERIFY_RETURN_TYPE, CONST|TMP|VAR|UNUSED|CV, UNUSED)
if (UNEXPECTED(!ret_info->class_name
&& ret_info->type_hint != IS_CALLABLE
- && !ZEND_SAME_FAKE_TYPE(ret_info->type_hint, Z_TYPE_P(retval_ptr)))) {
- /* A cast or an error will happen, so separate the zval to prevent overwriting it */
-
- if (EXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) == 0)) {
- /* Does not return by reference */
- if (retval_ref != retval_ptr && Z_REFCOUNT_P(retval_ref) == 1) {
- ZVAL_UNREF(retval_ref);
- } else {
- SEPARATE_ZVAL(retval_ref);
- }
- retval_ptr = retval_ref;
+ && !ZEND_SAME_FAKE_TYPE(ret_info->type_hint, Z_TYPE_P(retval_ptr))
+ && !(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)
+ && retval_ref != retval_ptr)
+ ) {
+ /* A cast might happen - unwrap the reference if this is a by-value return */
+ if (Z_REFCOUNT_P(retval_ref) == 1) {
+ ZVAL_UNREF(retval_ref);
} else {
- SEPARATE_ZVAL_NOREF(retval_ptr);
+ Z_DELREF_P(retval_ref);
+ ZVAL_COPY(retval_ref, retval_ptr);
}
+ retval_ptr = retval_ref;
}
- zend_verify_return_type(EX(func), retval_ptr);
+ zend_verify_return_type(EX(func), retval_ptr, CACHE_ADDR(opline->op2.num));
if (UNEXPECTED(EG(exception) != NULL)) {
FREE_OP1();
@@ -4743,14 +4748,14 @@ ZEND_VM_HANDLER(63, ZEND_RECV, ANY, ANY)
if (UNEXPECTED(arg_num > EX_NUM_ARGS())) {
SAVE_OPLINE();
- if (UNEXPECTED(!zend_verify_missing_arg(execute_data, arg_num))) {
+ if (UNEXPECTED(!zend_verify_missing_arg(execute_data, arg_num, CACHE_ADDR(opline->op2.num)))) {
HANDLE_EXCEPTION();
}
} else if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) != 0)) {
zval *param = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->result.var);
SAVE_OPLINE();
- if (UNEXPECTED(!zend_verify_arg_type(EX(func), arg_num, param, NULL))) {
+ if (UNEXPECTED(!zend_verify_arg_type(EX(func), arg_num, param, NULL, CACHE_ADDR(opline->op2.num)))) {
HANDLE_EXCEPTION();
}
}
@@ -4785,8 +4790,10 @@ ZEND_VM_HANDLER(64, ZEND_RECV_INIT, ANY, CONST)
}
if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) != 0)) {
+ zval *default_value = EX_CONSTANT(opline->op2);
+
SAVE_OPLINE();
- if (UNEXPECTED(!zend_verify_arg_type(EX(func), arg_num, param, EX_CONSTANT(opline->op2)))) {
+ if (UNEXPECTED(!zend_verify_arg_type(EX(func), arg_num, param, default_value, CACHE_ADDR(Z_CACHE_SLOT_P(default_value))))) {
HANDLE_EXCEPTION();
}
}
@@ -4815,7 +4822,7 @@ ZEND_VM_HANDLER(164, ZEND_RECV_VARIADIC, ANY, ANY)
param = EX_VAR_NUM(EX(func)->op_array.last_var + EX(func)->op_array.T);
if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) != 0)) {
do {
- zend_verify_arg_type(EX(func), arg_num, param, NULL);
+ zend_verify_arg_type(EX(func), arg_num, param, NULL, CACHE_ADDR(opline->op2.num));
if (Z_OPT_REFCOUNTED_P(param)) Z_ADDREF_P(param);
ZEND_HASH_FILL_ADD(param);
param++;
@@ -5423,8 +5430,7 @@ ZEND_VM_HANDLER(21, ZEND_CAST, CONST|TMP|VAR|CV, ANY)
}
}
} else {
- ZVAL_COPY_VALUE(result, expr);
- zval_opt_copy_ctor(result);
+ ZVAL_COPY(result, expr);
convert_to_object(result);
}
}
@@ -7202,146 +7208,7 @@ ZEND_VM_HANDLER(149, ZEND_HANDLE_EXCEPTION, ANY, ANY)
}
}
- if (UNEXPECTED(EX(call))) {
- zend_execute_data *call = EX(call);
- zend_op *opline = EX(func)->op_array.opcodes + op_num;
- int level;
- int do_exit;
-
- do {
- /* If the exception was thrown during a function call there might be
- * arguments pushed to the stack that have to be dtor'ed. */
-
- /* find the number of actually passed arguments */
- level = 0;
- do_exit = 0;
- do {
- switch (opline->opcode) {
- case ZEND_DO_FCALL:
- case ZEND_DO_ICALL:
- case ZEND_DO_UCALL:
- case ZEND_DO_FCALL_BY_NAME:
- level++;
- break;
- case ZEND_INIT_FCALL:
- case ZEND_INIT_FCALL_BY_NAME:
- case ZEND_INIT_NS_FCALL_BY_NAME:
- case ZEND_INIT_DYNAMIC_CALL:
- case ZEND_INIT_USER_CALL:
- case ZEND_INIT_METHOD_CALL:
- case ZEND_INIT_STATIC_METHOD_CALL:
- case ZEND_NEW:
- if (level == 0) {
- ZEND_CALL_NUM_ARGS(call) = 0;
- do_exit = 1;
- }
- level--;
- break;
- case ZEND_SEND_VAL:
- case ZEND_SEND_VAL_EX:
- case ZEND_SEND_VAR:
- case ZEND_SEND_VAR_EX:
- case ZEND_SEND_REF:
- case ZEND_SEND_VAR_NO_REF:
- case ZEND_SEND_USER:
- if (level == 0) {
- ZEND_CALL_NUM_ARGS(call) = opline->op2.num;
- do_exit = 1;
- }
- break;
- case ZEND_SEND_ARRAY:
- case ZEND_SEND_UNPACK:
- if (level == 0) {
- do_exit = 1;
- }
- break;
- }
- if (!do_exit) {
- opline--;
- }
- } while (!do_exit);
- if (call->prev_execute_data) {
- /* skip current call region */
- level = 0;
- do_exit = 0;
- do {
- switch (opline->opcode) {
- case ZEND_DO_FCALL:
- case ZEND_DO_ICALL:
- case ZEND_DO_UCALL:
- case ZEND_DO_FCALL_BY_NAME:
- level++;
- break;
- case ZEND_INIT_FCALL:
- case ZEND_INIT_FCALL_BY_NAME:
- case ZEND_INIT_NS_FCALL_BY_NAME:
- case ZEND_INIT_DYNAMIC_CALL:
- case ZEND_INIT_USER_CALL:
- case ZEND_INIT_METHOD_CALL:
- case ZEND_INIT_STATIC_METHOD_CALL:
- case ZEND_NEW:
- if (level == 0) {
- do_exit = 1;
- }
- level--;
- break;
- }
- opline--;
- } while (!do_exit);
- }
-
- zend_vm_stack_free_args(EX(call));
-
- if (ZEND_CALL_INFO(call) & ZEND_CALL_RELEASE_THIS) {
- if (ZEND_CALL_INFO(call) & ZEND_CALL_CTOR) {
- if (!(ZEND_CALL_INFO(call) & ZEND_CALL_CTOR_RESULT_UNUSED)) {
- GC_REFCOUNT(Z_OBJ(call->This))--;
- }
- if (GC_REFCOUNT(Z_OBJ(call->This)) == 1) {
- zend_object_store_ctor_failed(Z_OBJ(call->This));
- }
- }
- OBJ_RELEASE(Z_OBJ(call->This));
- }
- if (call->func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) {
- zend_string_release(call->func->common.function_name);
- zend_free_trampoline(call->func);
- }
-
- EX(call) = call->prev_execute_data;
- zend_vm_stack_free_call_frame(call);
- call = EX(call);
- } while (call);
- }
-
- for (i = 0; i < EX(func)->op_array.last_brk_cont; i++) {
- if (EX(func)->op_array.brk_cont_array[i].start < 0) {
- continue;
- } else if (EX(func)->op_array.brk_cont_array[i].start > op_num) {
- /* further blocks will not be relevant... */
- break;
- } else if (op_num < EX(func)->op_array.brk_cont_array[i].brk) {
- if (!catch_op_num ||
- catch_op_num >= EX(func)->op_array.brk_cont_array[i].brk) {
- zend_op *brk_opline = &EX(func)->op_array.opcodes[EX(func)->op_array.brk_cont_array[i].brk];
-
- if (brk_opline->opcode == ZEND_FREE) {
- zval_ptr_dtor_nogc(EX_VAR(brk_opline->op1.var));
- } else if (brk_opline->opcode == ZEND_FE_FREE) {
- zval *var = EX_VAR(brk_opline->op1.var);
- if (Z_TYPE_P(var) != IS_ARRAY && Z_FE_ITER_P(var) != (uint32_t)-1) {
- zend_hash_iterator_del(Z_FE_ITER_P(var));
- }
- zval_ptr_dtor_nogc(var);
- } else if (brk_opline->opcode == ZEND_END_SILENCE) {
- /* restore previous error_reporting value */
- if (!EG(error_reporting) && Z_LVAL_P(EX_VAR(brk_opline->op1.var)) != 0) {
- EG(error_reporting) = Z_LVAL_P(EX_VAR(brk_opline->op1.var));
- }
- }
- }
- }
- }
+ i_cleanup_unfinished_execution(execute_data, op_num, catch_op_num);
if (finally_op_num && (!catch_op_num || catch_op_num >= finally_op_num)) {
zval *fast_call = EX_VAR(EX(func)->op_array.opcodes[finally_op_end].op1.var);
@@ -7803,11 +7670,12 @@ ZEND_VM_HANDLER(166, ZEND_POW, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- pow_function(EX_VAR(opline->result.var),
- GET_OP1_ZVAL_PTR(BP_VAR_R),
- GET_OP2_ZVAL_PTR(BP_VAR_R));
+ op1 = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ pow_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
CHECK_EXCEPTION();
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 206cd86b07..df9b1ed58c 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -319,19 +319,29 @@ register const zend_op *opline __asm__(ZEND_VM_IP_GLOBAL_REG);
#endif
#ifdef ZEND_VM_FP_GLOBAL_REG
-# define ZEND_OPCODE_HANDLER_RET int
# define ZEND_OPCODE_HANDLER_ARGS void
# define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU
# define ZEND_OPCODE_HANDLER_ARGS_DC
# define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC
#else
-# define ZEND_OPCODE_HANDLER_RET int
# define ZEND_OPCODE_HANDLER_ARGS zend_execute_data *execute_data
# define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU execute_data
# define ZEND_OPCODE_HANDLER_ARGS_DC , ZEND_OPCODE_HANDLER_ARGS
# define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC , ZEND_OPCODE_HANDLER_ARGS_PASSTHRU
#endif
+#if defined(ZEND_VM_FP_GLOBAL_REG) && defined(ZEND_VM_IP_GLOBAL_REG)
+# define ZEND_OPCODE_HANDLER_RET void
+# define ZEND_VM_TAIL_CALL(call) call; return
+# define ZEND_VM_CONTINUE() return
+# define ZEND_VM_RETURN() opline = NULL; ZEND_VM_CONTINUE()
+#else
+# define ZEND_OPCODE_HANDLER_RET int
+# define ZEND_VM_TAIL_CALL(call) return call
+# define ZEND_VM_CONTINUE() return 0
+# define ZEND_VM_RETURN() return -1
+#endif
+
typedef ZEND_OPCODE_HANDLER_RET (ZEND_FASTCALL *opcode_handler_t) (ZEND_OPCODE_HANDLER_ARGS);
#undef OPLINE
@@ -357,9 +367,7 @@ typedef ZEND_OPCODE_HANDLER_RET (ZEND_FASTCALL *opcode_handler_t) (ZEND_OPCODE_H
#define CHECK_EXCEPTION() LOAD_OPLINE()
#define HANDLE_EXCEPTION() LOAD_OPLINE(); ZEND_VM_CONTINUE()
#define HANDLE_EXCEPTION_LEAVE() LOAD_OPLINE(); ZEND_VM_LEAVE()
-#define ZEND_VM_CONTINUE() return 0
-#define ZEND_VM_RETURN() return -1
-#ifdef ZEND_VM_FP_GLOBAL_REG
+#if defined(ZEND_VM_FP_GLOBAL_REG)
# define ZEND_VM_ENTER() execute_data = EG(current_execute_data); LOAD_OPLINE(); ZEND_VM_CONTINUE()
# define ZEND_VM_LEAVE() ZEND_VM_CONTINUE()
#elif defined(ZEND_VM_IP_GLOBAL_REG)
@@ -369,7 +377,7 @@ typedef ZEND_OPCODE_HANDLER_RET (ZEND_FASTCALL *opcode_handler_t) (ZEND_OPCODE_H
# define ZEND_VM_ENTER() return 1
# define ZEND_VM_LEAVE() return 2
#endif
-#define ZEND_VM_DISPATCH(opcode, opline) return ((opcode_handler_t)zend_vm_get_opcode_handler(opcode, opline))(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+#define ZEND_VM_DISPATCH(opcode, opline) ZEND_VM_TAIL_CALL(((opcode_handler_t)zend_vm_get_opcode_handler(opcode, opline))(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
ZEND_API void execute_ex(zend_execute_data *ex)
@@ -391,7 +399,12 @@ ZEND_API void execute_ex(zend_execute_data *ex)
while (1) {
int ret;
+#if defined(ZEND_VM_FP_GLOBAL_REG) && defined(ZEND_VM_IP_GLOBAL_REG)
+ ((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ if (UNEXPECTED(!OPLINE)) {
+#else
if (UNEXPECTED((ret = ((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)) != 0)) {
+#endif
#ifdef ZEND_VM_FP_GLOBAL_REG
execute_data = orig_execute_data;
# ifdef ZEND_VM_IP_GLOBAL_REG
@@ -1189,14 +1202,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RECV_SPEC_HANDLER(ZEND_OPCODE_
if (UNEXPECTED(arg_num > EX_NUM_ARGS())) {
SAVE_OPLINE();
- if (UNEXPECTED(!zend_verify_missing_arg(execute_data, arg_num))) {
+ if (UNEXPECTED(!zend_verify_missing_arg(execute_data, arg_num, CACHE_ADDR(opline->op2.num)))) {
HANDLE_EXCEPTION();
}
} else if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) != 0)) {
zval *param = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->result.var);
SAVE_OPLINE();
- if (UNEXPECTED(!zend_verify_arg_type(EX(func), arg_num, param, NULL))) {
+ if (UNEXPECTED(!zend_verify_arg_type(EX(func), arg_num, param, NULL, CACHE_ADDR(opline->op2.num)))) {
HANDLE_EXCEPTION();
}
}
@@ -1224,7 +1237,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RECV_VARIADIC_SPEC_HANDLER(ZEN
param = EX_VAR_NUM(EX(func)->op_array.last_var + EX(func)->op_array.T);
if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) != 0)) {
do {
- zend_verify_arg_type(EX(func), arg_num, param, NULL);
+ zend_verify_arg_type(EX(func), arg_num, param, NULL, CACHE_ADDR(opline->op2.num));
if (Z_OPT_REFCOUNTED_P(param)) Z_ADDREF_P(param);
ZEND_HASH_FILL_ADD(param);
param++;
@@ -1488,146 +1501,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(
}
}
- if (UNEXPECTED(EX(call))) {
- zend_execute_data *call = EX(call);
- zend_op *opline = EX(func)->op_array.opcodes + op_num;
- int level;
- int do_exit;
-
- do {
- /* If the exception was thrown during a function call there might be
- * arguments pushed to the stack that have to be dtor'ed. */
-
- /* find the number of actually passed arguments */
- level = 0;
- do_exit = 0;
- do {
- switch (opline->opcode) {
- case ZEND_DO_FCALL:
- case ZEND_DO_ICALL:
- case ZEND_DO_UCALL:
- case ZEND_DO_FCALL_BY_NAME:
- level++;
- break;
- case ZEND_INIT_FCALL:
- case ZEND_INIT_FCALL_BY_NAME:
- case ZEND_INIT_NS_FCALL_BY_NAME:
- case ZEND_INIT_DYNAMIC_CALL:
- case ZEND_INIT_USER_CALL:
- case ZEND_INIT_METHOD_CALL:
- case ZEND_INIT_STATIC_METHOD_CALL:
- case ZEND_NEW:
- if (level == 0) {
- ZEND_CALL_NUM_ARGS(call) = 0;
- do_exit = 1;
- }
- level--;
- break;
- case ZEND_SEND_VAL:
- case ZEND_SEND_VAL_EX:
- case ZEND_SEND_VAR:
- case ZEND_SEND_VAR_EX:
- case ZEND_SEND_REF:
- case ZEND_SEND_VAR_NO_REF:
- case ZEND_SEND_USER:
- if (level == 0) {
- ZEND_CALL_NUM_ARGS(call) = opline->op2.num;
- do_exit = 1;
- }
- break;
- case ZEND_SEND_ARRAY:
- case ZEND_SEND_UNPACK:
- if (level == 0) {
- do_exit = 1;
- }
- break;
- }
- if (!do_exit) {
- opline--;
- }
- } while (!do_exit);
- if (call->prev_execute_data) {
- /* skip current call region */
- level = 0;
- do_exit = 0;
- do {
- switch (opline->opcode) {
- case ZEND_DO_FCALL:
- case ZEND_DO_ICALL:
- case ZEND_DO_UCALL:
- case ZEND_DO_FCALL_BY_NAME:
- level++;
- break;
- case ZEND_INIT_FCALL:
- case ZEND_INIT_FCALL_BY_NAME:
- case ZEND_INIT_NS_FCALL_BY_NAME:
- case ZEND_INIT_DYNAMIC_CALL:
- case ZEND_INIT_USER_CALL:
- case ZEND_INIT_METHOD_CALL:
- case ZEND_INIT_STATIC_METHOD_CALL:
- case ZEND_NEW:
- if (level == 0) {
- do_exit = 1;
- }
- level--;
- break;
- }
- opline--;
- } while (!do_exit);
- }
-
- zend_vm_stack_free_args(EX(call));
-
- if (ZEND_CALL_INFO(call) & ZEND_CALL_RELEASE_THIS) {
- if (ZEND_CALL_INFO(call) & ZEND_CALL_CTOR) {
- if (!(ZEND_CALL_INFO(call) & ZEND_CALL_CTOR_RESULT_UNUSED)) {
- GC_REFCOUNT(Z_OBJ(call->This))--;
- }
- if (GC_REFCOUNT(Z_OBJ(call->This)) == 1) {
- zend_object_store_ctor_failed(Z_OBJ(call->This));
- }
- }
- OBJ_RELEASE(Z_OBJ(call->This));
- }
- if (call->func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) {
- zend_string_release(call->func->common.function_name);
- zend_free_trampoline(call->func);
- }
-
- EX(call) = call->prev_execute_data;
- zend_vm_stack_free_call_frame(call);
- call = EX(call);
- } while (call);
- }
-
- for (i = 0; i < EX(func)->op_array.last_brk_cont; i++) {
- if (EX(func)->op_array.brk_cont_array[i].start < 0) {
- continue;
- } else if (EX(func)->op_array.brk_cont_array[i].start > op_num) {
- /* further blocks will not be relevant... */
- break;
- } else if (op_num < EX(func)->op_array.brk_cont_array[i].brk) {
- if (!catch_op_num ||
- catch_op_num >= EX(func)->op_array.brk_cont_array[i].brk) {
- zend_op *brk_opline = &EX(func)->op_array.opcodes[EX(func)->op_array.brk_cont_array[i].brk];
-
- if (brk_opline->opcode == ZEND_FREE) {
- zval_ptr_dtor_nogc(EX_VAR(brk_opline->op1.var));
- } else if (brk_opline->opcode == ZEND_FE_FREE) {
- zval *var = EX_VAR(brk_opline->op1.var);
- if (Z_TYPE_P(var) != IS_ARRAY && Z_FE_ITER_P(var) != (uint32_t)-1) {
- zend_hash_iterator_del(Z_FE_ITER_P(var));
- }
- zval_ptr_dtor_nogc(var);
- } else if (brk_opline->opcode == ZEND_END_SILENCE) {
- /* restore previous error_reporting value */
- if (!EG(error_reporting) && Z_LVAL_P(EX_VAR(brk_opline->op1.var)) != 0) {
- EG(error_reporting) = Z_LVAL_P(EX_VAR(brk_opline->op1.var));
- }
- }
- }
- }
- }
+ i_cleanup_unfinished_execution(execute_data, op_num, catch_op_num);
if (finally_op_num && (!catch_op_num || catch_op_num >= finally_op_num)) {
zval *fast_call = EX_VAR(EX(func)->op_array.opcodes[finally_op_end].op1.var);
@@ -1658,7 +1532,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(
zend_generator_close(generator, 1);
ZEND_VM_RETURN();
} else {
- return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
}
}
@@ -1691,7 +1565,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_USER_OPCODE_SPEC_HANDLER(ZEND_
zend_generator_close(generator, 1);
ZEND_VM_RETURN();
} else {
- return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
case ZEND_USER_OPCODE_ENTER:
ZEND_VM_ENTER();
@@ -1769,7 +1643,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_RET_SPEC_HANDLER(ZEND_OPC
zend_generator_close(generator, 1);
ZEND_VM_RETURN();
} else {
- return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
}
}
@@ -2341,8 +2215,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RECV_INIT_SPEC_CONST_HANDLER(Z
}
if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) != 0)) {
+ zval *default_value = EX_CONSTANT(opline->op2);
+
SAVE_OPLINE();
- if (UNEXPECTED(!zend_verify_arg_type(EX(func), arg_num, param, EX_CONSTANT(opline->op2)))) {
+ if (UNEXPECTED(!zend_verify_arg_type(EX(func), arg_num, param, default_value, CACHE_ADDR(Z_CACHE_SLOT_P(default_value))))) {
HANDLE_EXCEPTION();
}
}
@@ -3280,7 +3156,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_SPEC_CONST_HANDLER(ZEND
}
}
}
- return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -3341,7 +3217,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_CONST_HANDL
}
} while (0);
- return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GENERATOR_RETURN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -3730,8 +3606,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_CONST_HANDLER(ZEND_O
}
}
} else {
- ZVAL_COPY_VALUE(result, expr);
- zval_opt_copy_ctor(result);
+ ZVAL_COPY(result, expr);
convert_to_object(result);
}
}
@@ -4606,11 +4481,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_CONST_CONST_HANDLER(Z
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- fast_div_function(EX_VAR(opline->result.var),
- EX_CONSTANT(opline->op1),
- EX_CONSTANT(opline->op2));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_CONSTANT(opline->op2);
+ fast_div_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -4660,11 +4536,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_CONST_CONST_HANDLER(ZE
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- shift_left_function(EX_VAR(opline->result.var),
- EX_CONSTANT(opline->op1),
- EX_CONSTANT(opline->op2));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_CONSTANT(opline->op2);
+ shift_left_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -4675,11 +4552,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_CONST_CONST_HANDLER(ZE
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- shift_right_function(EX_VAR(opline->result.var),
- EX_CONSTANT(opline->op1),
- EX_CONSTANT(opline->op2));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_CONSTANT(opline->op2);
+ shift_right_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -4751,12 +4629,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_CONST_
{
USE_OPLINE
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_identical_function(
- EX_CONSTANT(opline->op1),
- EX_CONSTANT(opline->op2));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_CONSTANT(opline->op2);
+ result = fast_is_identical_function(op1, op2);
ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_CONST) & (IS_VAR|IS_TMP_VAR));
@@ -4771,12 +4650,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CO
{
USE_OPLINE
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_not_identical_function(
- EX_CONSTANT(opline->op1),
- EX_CONSTANT(opline->op2));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_CONSTANT(opline->op2);
+ result = fast_is_not_identical_function(op1, op2);
ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_CONST) & (IS_VAR|IS_TMP_VAR));
@@ -5031,12 +4911,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_CONST_CONST_HAN
{
USE_OPLINE
- zval *result = EX_VAR(opline->result.var);
+ zval *op1, *op2;
SAVE_OPLINE();
- compare_function(result,
- EX_CONSTANT(opline->op1),
- EX_CONSTANT(opline->op2));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_CONSTANT(opline->op2);
+ compare_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -5047,11 +4927,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_CONST_CONST_HANDLER
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_or_function(EX_VAR(opline->result.var),
- EX_CONSTANT(opline->op1),
- EX_CONSTANT(opline->op2));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_CONSTANT(opline->op2);
+ bitwise_or_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -5062,11 +4943,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_CONST_CONST_HANDLE
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_and_function(EX_VAR(opline->result.var),
- EX_CONSTANT(opline->op1),
- EX_CONSTANT(opline->op2));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_CONSTANT(opline->op2);
+ bitwise_and_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -5077,11 +4959,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_CONST_CONST_HANDLE
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_xor_function(EX_VAR(opline->result.var),
- EX_CONSTANT(opline->op1),
- EX_CONSTANT(opline->op2));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_CONSTANT(opline->op2);
+ bitwise_xor_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -5092,11 +4975,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CONST_CONST_HAND
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- boolean_xor_function(EX_VAR(opline->result.var),
- EX_CONSTANT(opline->op1),
- EX_CONSTANT(opline->op2));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_CONSTANT(opline->op2);
+ boolean_xor_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -5256,17 +5140,17 @@ fetch_var_return:
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_R_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_W_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_RW_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -5274,20 +5158,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CONST_CONS
USE_OPLINE
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- return zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else {
- return zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -5548,7 +5432,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return ZEND_FETCH_OBJ_R_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
}
@@ -6276,7 +6160,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_CONST_HA
ZEND_VM_NEXT_OPCODE();
#if 0 || (IS_CONST != IS_UNUSED)
} else {
- return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
#endif
}
}
@@ -6835,11 +6719,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_CONST_CONST_HANDLER(Z
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- pow_function(EX_VAR(opline->result.var),
- EX_CONSTANT(opline->op1),
- EX_CONSTANT(opline->op2));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_CONSTANT(opline->op2);
+ pow_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -6850,12 +6735,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_TMP_HA
{
USE_OPLINE
zend_free_op free_op2;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_identical_function(
- EX_CONSTANT(opline->op1),
- _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
+ result = fast_is_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
@@ -6870,12 +6756,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_TM
{
USE_OPLINE
zend_free_op free_op2;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_not_identical_function(
- EX_CONSTANT(opline->op1),
- _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
+ result = fast_is_not_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
@@ -7031,12 +6918,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_VAR_HA
{
USE_OPLINE
zend_free_op free_op2;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_identical_function(
- EX_CONSTANT(opline->op1),
- _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2);
+ result = fast_is_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_VAR) & (IS_VAR|IS_TMP_VAR));
@@ -7051,12 +6939,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_VA
{
USE_OPLINE
zend_free_op free_op2;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_not_identical_function(
- EX_CONSTANT(opline->op1),
- _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2);
+ result = fast_is_not_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_VAR) & (IS_VAR|IS_TMP_VAR));
@@ -7220,17 +7109,17 @@ fetch_var_return:
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_R_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_W_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_RW_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -7238,20 +7127,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CONST_VAR_
USE_OPLINE
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else {
- return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -7735,17 +7624,17 @@ fetch_var_return:
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_R_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_W_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_RW_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -7753,20 +7642,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CONST_UNUS
USE_OPLINE
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else {
- return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -7947,13 +7836,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
-#if 0 || (IS_CONST != IS_UNUSED)
USE_OPLINE
-#endif
SAVE_OPLINE();
if (IS_CONST == IS_UNUSED) {
- zend_verify_missing_return_type(EX(func));
+ zend_verify_missing_return_type(EX(func), CACHE_ADDR(opline->op2.num));
} else {
/* prevents "undefined variable opline" errors */
#if 0 || (IS_CONST != IS_UNUSED)
@@ -7972,22 +7859,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_CONST_
if (UNEXPECTED(!ret_info->class_name
&& ret_info->type_hint != IS_CALLABLE
- && !ZEND_SAME_FAKE_TYPE(ret_info->type_hint, Z_TYPE_P(retval_ptr)))) {
- /* A cast or an error will happen, so separate the zval to prevent overwriting it */
-
- if (EXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) == 0)) {
- /* Does not return by reference */
- if (retval_ref != retval_ptr && Z_REFCOUNT_P(retval_ref) == 1) {
- ZVAL_UNREF(retval_ref);
- } else {
- SEPARATE_ZVAL(retval_ref);
- }
- retval_ptr = retval_ref;
+ && !ZEND_SAME_FAKE_TYPE(ret_info->type_hint, Z_TYPE_P(retval_ptr))
+ && !(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)
+ && retval_ref != retval_ptr)
+ ) {
+ /* A cast might happen - unwrap the reference if this is a by-value return */
+ if (Z_REFCOUNT_P(retval_ref) == 1) {
+ ZVAL_UNREF(retval_ref);
} else {
- SEPARATE_ZVAL_NOREF(retval_ptr);
+ Z_DELREF_P(retval_ref);
+ ZVAL_COPY(retval_ref, retval_ptr);
}
+ retval_ptr = retval_ref;
}
- zend_verify_return_type(EX(func), retval_ptr);
+ zend_verify_return_type(EX(func), retval_ptr, CACHE_ADDR(opline->op2.num));
if (UNEXPECTED(EG(exception) != NULL)) {
@@ -8124,7 +8009,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_UNUSED_H
ZEND_VM_NEXT_OPCODE();
#if 0 || (IS_CONST != IS_UNUSED)
} else {
- return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
#endif
}
}
@@ -8619,11 +8504,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_CONST_CV_HANDLER(ZEND
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- fast_div_function(EX_VAR(opline->result.var),
- EX_CONSTANT(opline->op1),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ fast_div_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -8673,11 +8559,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_CONST_CV_HANDLER(ZEND_
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- shift_left_function(EX_VAR(opline->result.var),
- EX_CONSTANT(opline->op1),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ shift_left_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -8688,11 +8575,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_CONST_CV_HANDLER(ZEND_
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- shift_right_function(EX_VAR(opline->result.var),
- EX_CONSTANT(opline->op1),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ shift_right_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -8764,12 +8652,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_CV_HAN
{
USE_OPLINE
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_identical_function(
- EX_CONSTANT(opline->op1),
- _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var);
+ result = fast_is_identical_function(op1, op2);
ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_CV) & (IS_VAR|IS_TMP_VAR));
@@ -8784,12 +8673,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CV
{
USE_OPLINE
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_not_identical_function(
- EX_CONSTANT(opline->op1),
- _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var);
+ result = fast_is_not_identical_function(op1, op2);
ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_CV) & (IS_VAR|IS_TMP_VAR));
@@ -9044,12 +8934,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_CONST_CV_HANDLE
{
USE_OPLINE
- zval *result = EX_VAR(opline->result.var);
+ zval *op1, *op2;
SAVE_OPLINE();
- compare_function(result,
- EX_CONSTANT(opline->op1),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ compare_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -9060,11 +8950,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_CONST_CV_HANDLER(ZE
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_or_function(EX_VAR(opline->result.var),
- EX_CONSTANT(opline->op1),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ bitwise_or_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -9075,11 +8966,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_CONST_CV_HANDLER(Z
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_and_function(EX_VAR(opline->result.var),
- EX_CONSTANT(opline->op1),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ bitwise_and_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -9090,11 +8982,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_CONST_CV_HANDLER(Z
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_xor_function(EX_VAR(opline->result.var),
- EX_CONSTANT(opline->op1),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ bitwise_xor_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -9105,11 +8998,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CONST_CV_HANDLER
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- boolean_xor_function(EX_VAR(opline->result.var),
- EX_CONSTANT(opline->op1),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ boolean_xor_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -9374,7 +9268,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return ZEND_FETCH_OBJ_R_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
}
@@ -9999,7 +9893,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_CV_HANDL
ZEND_VM_NEXT_OPCODE();
#if 0 || (IS_CONST != IS_UNUSED)
} else {
- return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
#endif
}
}
@@ -10334,11 +10228,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_CONST_CV_HANDLER(ZEND
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- pow_function(EX_VAR(opline->result.var),
- EX_CONSTANT(opline->op1),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ pow_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -10484,11 +10379,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_CONST_TMPVAR_HANDLER(
{
USE_OPLINE
zend_free_op free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- fast_div_function(EX_VAR(opline->result.var),
- EX_CONSTANT(opline->op1),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ fast_div_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -10538,11 +10434,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_CONST_TMPVAR_HANDLER(Z
{
USE_OPLINE
zend_free_op free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- shift_left_function(EX_VAR(opline->result.var),
- EX_CONSTANT(opline->op1),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ shift_left_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -10553,11 +10450,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_CONST_TMPVAR_HANDLER(Z
{
USE_OPLINE
zend_free_op free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- shift_right_function(EX_VAR(opline->result.var),
- EX_CONSTANT(opline->op1),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ shift_right_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -10869,12 +10767,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_CONST_TMPVAR_HA
{
USE_OPLINE
zend_free_op free_op2;
- zval *result = EX_VAR(opline->result.var);
+ zval *op1, *op2;
SAVE_OPLINE();
- compare_function(result,
- EX_CONSTANT(opline->op1),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ compare_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -10885,11 +10783,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_CONST_TMPVAR_HANDLE
{
USE_OPLINE
zend_free_op free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_or_function(EX_VAR(opline->result.var),
- EX_CONSTANT(opline->op1),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ bitwise_or_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -10900,11 +10799,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_CONST_TMPVAR_HANDL
{
USE_OPLINE
zend_free_op free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_and_function(EX_VAR(opline->result.var),
- EX_CONSTANT(opline->op1),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ bitwise_and_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -10915,11 +10815,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_CONST_TMPVAR_HANDL
{
USE_OPLINE
zend_free_op free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_xor_function(EX_VAR(opline->result.var),
- EX_CONSTANT(opline->op1),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ bitwise_xor_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -10930,11 +10831,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CONST_TMPVAR_HAN
{
USE_OPLINE
zend_free_op free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- boolean_xor_function(EX_VAR(opline->result.var),
- EX_CONSTANT(opline->op1),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ boolean_xor_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -11201,7 +11103,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return ZEND_FETCH_OBJ_R_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
}
@@ -11777,7 +11679,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_TMPVAR_H
ZEND_VM_NEXT_OPCODE();
#if 0 || (IS_CONST != IS_UNUSED)
} else {
- return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
#endif
}
}
@@ -11972,11 +11874,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_CONST_TMPVAR_HANDLER(
{
USE_OPLINE
zend_free_op free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- pow_function(EX_VAR(opline->result.var),
- EX_CONSTANT(opline->op1),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ pow_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -12030,7 +11933,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_SPEC_TMP_HANDLER(ZEND_O
}
}
}
- return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -12091,7 +11994,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER
}
} while (0);
- return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GENERATOR_RETURN_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -12318,8 +12221,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_TMP_HANDLER(ZEND_OPC
}
}
} else {
- ZVAL_COPY_VALUE(result, expr);
- zval_opt_copy_ctor(result);
+ ZVAL_COPY(result, expr);
convert_to_object(result);
}
}
@@ -12850,12 +12752,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_CONST_HA
{
USE_OPLINE
zend_free_op free_op1;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_identical_function(
- _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1),
- EX_CONSTANT(opline->op2));
+ op1 = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
+ op2 = EX_CONSTANT(opline->op2);
+ result = fast_is_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(result, (IS_TMP_VAR|IS_CONST) & (IS_VAR|IS_TMP_VAR));
@@ -12870,12 +12773,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_CONS
{
USE_OPLINE
zend_free_op free_op1;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_not_identical_function(
- _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1),
- EX_CONSTANT(opline->op2));
+ op1 = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
+ op2 = EX_CONSTANT(opline->op2);
+ result = fast_is_not_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(result, (IS_TMP_VAR|IS_CONST) & (IS_VAR|IS_TMP_VAR));
@@ -13041,7 +12945,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_TMP_CO
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return ZEND_FETCH_OBJ_R_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
}
@@ -13252,7 +13156,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_CONST_HAND
ZEND_VM_NEXT_OPCODE();
#if 0 || (IS_TMP_VAR != IS_UNUSED)
} else {
- return ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
#endif
}
}
@@ -13402,12 +13306,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_TMP_HAND
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_identical_function(
- _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
+ result = fast_is_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(result, (IS_TMP_VAR|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
@@ -13422,12 +13327,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_TMP_
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_not_identical_function(
- _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
+ result = fast_is_not_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(result, (IS_TMP_VAR|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
@@ -13583,12 +13489,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_VAR_HAND
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_identical_function(
- _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2);
+ result = fast_is_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(result, (IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_TMP_VAR));
@@ -13603,12 +13510,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_VAR_
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_not_identical_function(
- _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2);
+ result = fast_is_not_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(result, (IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_TMP_VAR));
@@ -13805,13 +13713,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_UN
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
-#if 0 || (IS_TMP_VAR != IS_UNUSED)
USE_OPLINE
-#endif
SAVE_OPLINE();
if (IS_TMP_VAR == IS_UNUSED) {
- zend_verify_missing_return_type(EX(func));
+ zend_verify_missing_return_type(EX(func), CACHE_ADDR(opline->op2.num));
} else {
/* prevents "undefined variable opline" errors */
#if 0 || (IS_TMP_VAR != IS_UNUSED)
@@ -13830,22 +13736,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_TMP_UN
if (UNEXPECTED(!ret_info->class_name
&& ret_info->type_hint != IS_CALLABLE
- && !ZEND_SAME_FAKE_TYPE(ret_info->type_hint, Z_TYPE_P(retval_ptr)))) {
- /* A cast or an error will happen, so separate the zval to prevent overwriting it */
-
- if (EXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) == 0)) {
- /* Does not return by reference */
- if (retval_ref != retval_ptr && Z_REFCOUNT_P(retval_ref) == 1) {
- ZVAL_UNREF(retval_ref);
- } else {
- SEPARATE_ZVAL(retval_ref);
- }
- retval_ptr = retval_ref;
+ && !ZEND_SAME_FAKE_TYPE(ret_info->type_hint, Z_TYPE_P(retval_ptr))
+ && !(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)
+ && retval_ref != retval_ptr)
+ ) {
+ /* A cast might happen - unwrap the reference if this is a by-value return */
+ if (Z_REFCOUNT_P(retval_ref) == 1) {
+ ZVAL_UNREF(retval_ref);
} else {
- SEPARATE_ZVAL_NOREF(retval_ptr);
+ Z_DELREF_P(retval_ref);
+ ZVAL_COPY(retval_ref, retval_ptr);
}
+ retval_ptr = retval_ref;
}
- zend_verify_return_type(EX(func), retval_ptr);
+ zend_verify_return_type(EX(func), retval_ptr, CACHE_ADDR(opline->op2.num));
if (UNEXPECTED(EG(exception) != NULL)) {
zval_ptr_dtor_nogc(free_op1);
@@ -13982,7 +13886,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_UNUSED_HAN
ZEND_VM_NEXT_OPCODE();
#if 0 || (IS_TMP_VAR != IS_UNUSED)
} else {
- return ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
#endif
}
}
@@ -14132,12 +14036,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_CV_HANDL
{
USE_OPLINE
zend_free_op free_op1;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_identical_function(
- _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var);
+ result = fast_is_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(result, (IS_TMP_VAR|IS_CV) & (IS_VAR|IS_TMP_VAR));
@@ -14152,12 +14057,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_CV_H
{
USE_OPLINE
zend_free_op free_op1;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_not_identical_function(
- _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var);
+ result = fast_is_not_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(result, (IS_TMP_VAR|IS_CV) & (IS_VAR|IS_TMP_VAR));
@@ -14323,7 +14229,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_TMP_CV
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return ZEND_FETCH_OBJ_R_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
}
@@ -14534,7 +14440,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_CV_HANDLER
ZEND_VM_NEXT_OPCODE();
#if 0 || (IS_TMP_VAR != IS_UNUSED)
} else {
- return ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
#endif
}
}
@@ -14836,7 +14742,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_TMP_TM
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return ZEND_FETCH_OBJ_R_SPEC_TMP_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_TMP_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
}
@@ -15047,7 +14953,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_TMPVAR_HAN
ZEND_VM_NEXT_OPCODE();
#if 0 || (IS_TMP_VAR != IS_UNUSED)
} else {
- return ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
#endif
}
}
@@ -15273,7 +15179,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_SPEC_VAR_HANDLER(ZEND_O
}
}
}
- return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -15335,7 +15241,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_VAR_HANDLER
} while (0);
if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GENERATOR_RETURN_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -15467,7 +15373,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_SPEC_VAR_HANDL
if (!(opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND)) {
if (!ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
- return ZEND_SEND_VAR_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_SEND_VAR_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
}
@@ -15549,7 +15455,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_EX_SPEC_VAR_HANDLER(Z
}
} else if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
send_var_by_ref:
- return ZEND_SEND_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_SEND_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
varptr = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
@@ -15787,8 +15693,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_VAR_HANDLER(ZEND_OPC
}
}
} else {
- ZVAL_COPY_VALUE(result, expr);
- zval_opt_copy_ctor(result);
+ ZVAL_COPY(result, expr);
convert_to_object(result);
}
}
@@ -16691,12 +16596,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_CONST_HA
{
USE_OPLINE
zend_free_op free_op1;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_identical_function(
- _get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1),
- EX_CONSTANT(opline->op2));
+ op1 = _get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1);
+ op2 = EX_CONSTANT(opline->op2);
+ result = fast_is_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(result, (IS_VAR|IS_CONST) & (IS_VAR|IS_TMP_VAR));
@@ -16711,12 +16617,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_CONS
{
USE_OPLINE
zend_free_op free_op1;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_not_identical_function(
- _get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1),
- EX_CONSTANT(opline->op2));
+ op1 = _get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1);
+ op2 = EX_CONSTANT(opline->op2);
+ result = fast_is_not_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(result, (IS_VAR|IS_CONST) & (IS_VAR|IS_TMP_VAR));
@@ -16912,16 +16819,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_VAR_CONST_HAND
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -16932,16 +16839,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_VAR_CONST_HAND
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -16952,16 +16859,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_VAR_CONST_HAND
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -16972,16 +16879,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_VAR_CONST_HAND
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -16992,16 +16899,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_VAR_CONST_HAND
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -17012,16 +16919,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_VAR_CONST_HANDL
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -17032,16 +16939,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_VAR_CONST_HANDL
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -17052,16 +16959,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_VAR_CONST_H
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -17072,16 +16979,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_VAR_CONST_HA
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -17092,16 +16999,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_VAR_CONST_H
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -17112,16 +17019,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_VAR_CONST_H
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -17198,12 +17105,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_pre_incdec_property_helper_SPEC_VAR_CONST(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_pre_incdec_property_helper_SPEC_VAR_CONST(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_pre_incdec_property_helper_SPEC_VAR_CONST(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_pre_incdec_property_helper_SPEC_VAR_CONST(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_CONST(int inc ZEND_OPCODE_HANDLER_ARGS_DC)
@@ -17275,12 +17182,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_post_incdec_property_helper_SPEC_VAR_CONST(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_post_incdec_property_helper_SPEC_VAR_CONST(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_post_incdec_property_helper_SPEC_VAR_CONST(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_post_incdec_property_helper_SPEC_VAR_CONST(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -17571,7 +17478,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_CO
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return ZEND_FETCH_OBJ_R_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
}
@@ -18144,7 +18051,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_VAR_CONST_HAND
ZEND_VM_NEXT_OPCODE();
#if 0 || (IS_VAR != IS_UNUSED)
} else {
- return ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
#endif
}
}
@@ -18436,19 +18343,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_CONST_HANDLER(Z
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_binary_assign_op_helper_SPEC_VAR_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_identical_function(
- _get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
+ result = fast_is_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(result, (IS_VAR|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
@@ -18463,12 +18371,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_TMP_
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_not_identical_function(
- _get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
+ result = fast_is_not_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(result, (IS_VAR|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
@@ -18654,12 +18563,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_VAR_HAND
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_identical_function(
- _get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2);
+ result = fast_is_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(result, (IS_VAR|IS_VAR) & (IS_VAR|IS_TMP_VAR));
@@ -18674,12 +18584,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_VAR_
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_not_identical_function(
- _get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2);
+ result = fast_is_not_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(result, (IS_VAR|IS_VAR) & (IS_VAR|IS_TMP_VAR));
@@ -18746,7 +18657,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_VAR_VAR_HANDLE
if (free_op2) {zval_ptr_dtor_nogc(free_op2);};
HANDLE_EXCEPTION();
}
- return ZEND_ASSIGN_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_ASSIGN_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
@@ -19004,16 +18915,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_VAR_UNUSED_HAN
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -19024,16 +18935,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_VAR_UNUSED_HAN
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -19044,16 +18955,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_VAR_UNUSED_HAN
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -19064,16 +18975,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_VAR_UNUSED_HAN
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -19084,16 +18995,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_VAR_UNUSED_HAN
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -19104,16 +19015,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_VAR_UNUSED_HAND
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -19124,16 +19035,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_VAR_UNUSED_HAND
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -19144,16 +19055,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_VAR_UNUSED_
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -19164,16 +19075,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_VAR_UNUSED_H
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -19184,16 +19095,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_VAR_UNUSED_
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -19204,16 +19115,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_VAR_UNUSED_
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -19549,13 +19460,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
-#if 0 || (IS_VAR != IS_UNUSED)
USE_OPLINE
-#endif
SAVE_OPLINE();
if (IS_VAR == IS_UNUSED) {
- zend_verify_missing_return_type(EX(func));
+ zend_verify_missing_return_type(EX(func), CACHE_ADDR(opline->op2.num));
} else {
/* prevents "undefined variable opline" errors */
#if 0 || (IS_VAR != IS_UNUSED)
@@ -19574,22 +19483,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_VAR_UN
if (UNEXPECTED(!ret_info->class_name
&& ret_info->type_hint != IS_CALLABLE
- && !ZEND_SAME_FAKE_TYPE(ret_info->type_hint, Z_TYPE_P(retval_ptr)))) {
- /* A cast or an error will happen, so separate the zval to prevent overwriting it */
-
- if (EXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) == 0)) {
- /* Does not return by reference */
- if (retval_ref != retval_ptr && Z_REFCOUNT_P(retval_ref) == 1) {
- ZVAL_UNREF(retval_ref);
- } else {
- SEPARATE_ZVAL(retval_ref);
- }
- retval_ptr = retval_ref;
+ && !ZEND_SAME_FAKE_TYPE(ret_info->type_hint, Z_TYPE_P(retval_ptr))
+ && !(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)
+ && retval_ref != retval_ptr)
+ ) {
+ /* A cast might happen - unwrap the reference if this is a by-value return */
+ if (Z_REFCOUNT_P(retval_ref) == 1) {
+ ZVAL_UNREF(retval_ref);
} else {
- SEPARATE_ZVAL_NOREF(retval_ptr);
+ Z_DELREF_P(retval_ref);
+ ZVAL_COPY(retval_ref, retval_ptr);
}
+ retval_ptr = retval_ref;
}
- zend_verify_return_type(EX(func), retval_ptr);
+ zend_verify_return_type(EX(func), retval_ptr, CACHE_ADDR(opline->op2.num));
if (UNEXPECTED(EG(exception) != NULL)) {
zval_ptr_dtor_nogc(free_op1);
@@ -19726,7 +19633,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_VAR_UNUSED_HAN
ZEND_VM_NEXT_OPCODE();
#if 0 || (IS_VAR != IS_UNUSED)
} else {
- return ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
#endif
}
}
@@ -19894,12 +19801,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_CV_HANDL
{
USE_OPLINE
zend_free_op free_op1;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_identical_function(
- _get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = _get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var);
+ result = fast_is_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(result, (IS_VAR|IS_CV) & (IS_VAR|IS_TMP_VAR));
@@ -19914,12 +19822,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_CV_H
{
USE_OPLINE
zend_free_op free_op1;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_not_identical_function(
- _get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = _get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var);
+ result = fast_is_not_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(result, (IS_VAR|IS_CV) & (IS_VAR|IS_TMP_VAR));
@@ -20115,16 +20024,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_VAR_CV_HANDLER
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -20135,16 +20044,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_VAR_CV_HANDLER
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -20155,16 +20064,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_VAR_CV_HANDLER
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -20175,16 +20084,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_VAR_CV_HANDLER
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -20195,16 +20104,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_VAR_CV_HANDLER
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -20215,16 +20124,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_VAR_CV_HANDLER(
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -20235,16 +20144,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_VAR_CV_HANDLER(
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -20255,16 +20164,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_VAR_CV_HAND
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -20275,16 +20184,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_VAR_CV_HANDL
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -20295,16 +20204,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_VAR_CV_HAND
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -20315,16 +20224,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_VAR_CV_HAND
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -20401,12 +20310,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_OBJ_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_pre_incdec_property_helper_SPEC_VAR_CV(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_pre_incdec_property_helper_SPEC_VAR_CV(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_OBJ_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_pre_incdec_property_helper_SPEC_VAR_CV(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_pre_incdec_property_helper_SPEC_VAR_CV(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_CV(int inc ZEND_OPCODE_HANDLER_ARGS_DC)
@@ -20478,12 +20387,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_OBJ_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_post_incdec_property_helper_SPEC_VAR_CV(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_post_incdec_property_helper_SPEC_VAR_CV(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_OBJ_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_post_incdec_property_helper_SPEC_VAR_CV(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_post_incdec_property_helper_SPEC_VAR_CV(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -20774,7 +20683,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_CV
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return ZEND_FETCH_OBJ_R_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
}
@@ -21006,7 +20915,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_VAR_CV_HANDLER
HANDLE_EXCEPTION();
}
- return ZEND_ASSIGN_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_ASSIGN_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
@@ -21299,7 +21208,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_VAR_CV_HANDLER
ZEND_VM_NEXT_OPCODE();
#if 0 || (IS_VAR != IS_UNUSED)
} else {
- return ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
#endif
}
}
@@ -21591,7 +21500,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_CV_HANDLER(ZEND
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_binary_assign_op_helper_SPEC_VAR_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(binary_op_type binary_op ZEND_OPCODE_HANDLER_ARGS_DC)
@@ -21781,16 +21690,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_VAR_TMPVAR_HAN
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -21801,16 +21710,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_VAR_TMPVAR_HAN
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -21821,16 +21730,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_VAR_TMPVAR_HAN
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -21841,16 +21750,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_VAR_TMPVAR_HAN
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -21861,16 +21770,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_VAR_TMPVAR_HAN
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -21881,16 +21790,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_VAR_TMPVAR_HAND
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -21901,16 +21810,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_VAR_TMPVAR_HAND
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -21921,16 +21830,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_VAR_TMPVAR_
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -21941,16 +21850,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_VAR_TMPVAR_H
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -21961,16 +21870,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_VAR_TMPVAR_
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -21981,16 +21890,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_VAR_TMPVAR_
# if 0 || (IS_VAR != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -22068,12 +21977,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_OBJ_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_pre_incdec_property_helper_SPEC_VAR_TMPVAR(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_pre_incdec_property_helper_SPEC_VAR_TMPVAR(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_OBJ_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_pre_incdec_property_helper_SPEC_VAR_TMPVAR(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_pre_incdec_property_helper_SPEC_VAR_TMPVAR(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_TMPVAR(int inc ZEND_OPCODE_HANDLER_ARGS_DC)
@@ -22146,12 +22055,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_OBJ_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_post_incdec_property_helper_SPEC_VAR_TMPVAR(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_post_incdec_property_helper_SPEC_VAR_TMPVAR(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_OBJ_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_post_incdec_property_helper_SPEC_VAR_TMPVAR(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_post_incdec_property_helper_SPEC_VAR_TMPVAR(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -22443,7 +22352,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_TM
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return ZEND_FETCH_OBJ_R_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
}
@@ -22878,7 +22787,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_VAR_TMPVAR_HAN
ZEND_VM_NEXT_OPCODE();
#if 0 || (IS_VAR != IS_UNUSED)
} else {
- return ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
#endif
}
}
@@ -23030,7 +22939,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_TMPVAR_HAND
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -23294,16 +23203,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_UNUSED_CONST_H
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -23314,16 +23223,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_UNUSED_CONST_H
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -23334,16 +23243,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_UNUSED_CONST_H
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -23354,16 +23263,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_UNUSED_CONST_H
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -23374,16 +23283,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_UNUSED_CONST_H
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -23394,16 +23303,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_UNUSED_CONST_HA
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -23414,16 +23323,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_UNUSED_CONST_HA
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -23434,16 +23343,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_UNUSED_CONS
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -23454,16 +23363,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_UNUSED_CONST
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -23474,16 +23383,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_UNUSED_CONS
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -23494,16 +23403,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_CONS
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -23580,12 +23489,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_pre_incdec_property_helper_SPEC_UNUSED_CONST(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_pre_incdec_property_helper_SPEC_UNUSED_CONST(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_pre_incdec_property_helper_SPEC_UNUSED_CONST(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_pre_incdec_property_helper_SPEC_UNUSED_CONST(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_CONST(int inc ZEND_OPCODE_HANDLER_ARGS_DC)
@@ -23657,12 +23566,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_post_incdec_property_helper_SPEC_UNUSED_CONST(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_post_incdec_property_helper_SPEC_UNUSED_CONST(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_post_incdec_property_helper_SPEC_UNUSED_CONST(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_post_incdec_property_helper_SPEC_UNUSED_CONST(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -23913,7 +23822,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return ZEND_FETCH_OBJ_R_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
}
@@ -24269,7 +24178,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_UNUSED_CONST_H
ZEND_VM_NEXT_OPCODE();
#if 0 || (IS_UNUSED != IS_UNUSED)
} else {
- return ZEND_ADD_ARRAY_ELEMENT_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_ADD_ARRAY_ELEMENT_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
#endif
}
}
@@ -25106,16 +25015,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_UNUSED_UNUSED_
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -25126,16 +25035,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_UNUSED_UNUSED_
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -25146,16 +25055,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_UNUSED_UNUSED_
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -25166,16 +25075,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_UNUSED_UNUSED_
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -25186,16 +25095,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_UNUSED_UNUSED_
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -25206,16 +25115,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_UNUSED_UNUSED_H
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -25226,16 +25135,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_UNUSED_UNUSED_H
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -25246,16 +25155,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_UNUSED_UNUS
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -25266,16 +25175,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_UNUSED_UNUSE
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -25286,16 +25195,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_UNUSED_UNUS
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -25306,28 +25215,26 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_UNUS
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_UNUSED_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
-#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
-#endif
SAVE_OPLINE();
if (IS_UNUSED == IS_UNUSED) {
- zend_verify_missing_return_type(EX(func));
+ zend_verify_missing_return_type(EX(func), CACHE_ADDR(opline->op2.num));
} else {
/* prevents "undefined variable opline" errors */
#if 0 || (IS_UNUSED != IS_UNUSED)
@@ -25346,22 +25253,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_UNUSED
if (UNEXPECTED(!ret_info->class_name
&& ret_info->type_hint != IS_CALLABLE
- && !ZEND_SAME_FAKE_TYPE(ret_info->type_hint, Z_TYPE_P(retval_ptr)))) {
- /* A cast or an error will happen, so separate the zval to prevent overwriting it */
-
- if (EXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) == 0)) {
- /* Does not return by reference */
- if (retval_ref != retval_ptr && Z_REFCOUNT_P(retval_ref) == 1) {
- ZVAL_UNREF(retval_ref);
- } else {
- SEPARATE_ZVAL(retval_ref);
- }
- retval_ptr = retval_ref;
+ && !ZEND_SAME_FAKE_TYPE(ret_info->type_hint, Z_TYPE_P(retval_ptr))
+ && !(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)
+ && retval_ref != retval_ptr)
+ ) {
+ /* A cast might happen - unwrap the reference if this is a by-value return */
+ if (Z_REFCOUNT_P(retval_ref) == 1) {
+ ZVAL_UNREF(retval_ref);
} else {
- SEPARATE_ZVAL_NOREF(retval_ptr);
+ Z_DELREF_P(retval_ref);
+ ZVAL_COPY(retval_ref, retval_ptr);
}
+ retval_ptr = retval_ref;
}
- zend_verify_return_type(EX(func), retval_ptr);
+ zend_verify_return_type(EX(func), retval_ptr, CACHE_ADDR(opline->op2.num));
if (UNEXPECTED(EG(exception) != NULL)) {
@@ -25398,7 +25303,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_UNUSED_UNUSED_
ZEND_VM_NEXT_OPCODE();
#if 0 || (IS_UNUSED != IS_UNUSED)
} else {
- return ZEND_ADD_ARRAY_ELEMENT_SPEC_UNUSED_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_ADD_ARRAY_ELEMENT_SPEC_UNUSED_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
#endif
}
}
@@ -25692,16 +25597,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_UNUSED_CV_HAND
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -25712,16 +25617,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_UNUSED_CV_HAND
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -25732,16 +25637,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_UNUSED_CV_HAND
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -25752,16 +25657,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_UNUSED_CV_HAND
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -25772,16 +25677,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_UNUSED_CV_HAND
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -25792,16 +25697,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_UNUSED_CV_HANDL
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -25812,16 +25717,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_UNUSED_CV_HANDL
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -25832,16 +25737,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_UNUSED_CV_H
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -25852,16 +25757,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_UNUSED_CV_HA
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -25872,16 +25777,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_UNUSED_CV_H
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -25892,16 +25797,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_CV_H
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -25978,12 +25883,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_pre_incdec_property_helper_SPEC_UNUSED_CV(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_pre_incdec_property_helper_SPEC_UNUSED_CV(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_pre_incdec_property_helper_SPEC_UNUSED_CV(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_pre_incdec_property_helper_SPEC_UNUSED_CV(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_CV(int inc ZEND_OPCODE_HANDLER_ARGS_DC)
@@ -26055,12 +25960,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_post_incdec_property_helper_SPEC_UNUSED_CV(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_post_incdec_property_helper_SPEC_UNUSED_CV(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_post_incdec_property_helper_SPEC_UNUSED_CV(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_post_incdec_property_helper_SPEC_UNUSED_CV(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -26311,7 +26216,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return ZEND_FETCH_OBJ_R_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
}
@@ -26558,7 +26463,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_UNUSED_CV_HAND
ZEND_VM_NEXT_OPCODE();
#if 0 || (IS_UNUSED != IS_UNUSED)
} else {
- return ZEND_ADD_ARRAY_ELEMENT_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_ADD_ARRAY_ELEMENT_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
#endif
}
}
@@ -27181,16 +27086,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_UNUSED_TMPVAR_
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -27201,16 +27106,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_UNUSED_TMPVAR_
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -27221,16 +27126,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_UNUSED_TMPVAR_
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -27241,16 +27146,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_UNUSED_TMPVAR_
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -27261,16 +27166,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_UNUSED_TMPVAR_
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -27281,16 +27186,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_UNUSED_TMPVAR_H
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -27301,16 +27206,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_UNUSED_TMPVAR_H
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -27321,16 +27226,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_UNUSED_TMPV
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -27341,16 +27246,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_UNUSED_TMPVA
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -27361,16 +27266,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_UNUSED_TMPV
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -27381,16 +27286,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_TMPV
# if 0 || (IS_UNUSED != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -27468,12 +27373,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_OBJ_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_pre_incdec_property_helper_SPEC_UNUSED_TMPVAR(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_pre_incdec_property_helper_SPEC_UNUSED_TMPVAR(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_OBJ_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_pre_incdec_property_helper_SPEC_UNUSED_TMPVAR(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_pre_incdec_property_helper_SPEC_UNUSED_TMPVAR(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_TMPVAR(int inc ZEND_OPCODE_HANDLER_ARGS_DC)
@@ -27546,12 +27451,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_OBJ_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_post_incdec_property_helper_SPEC_UNUSED_TMPVAR(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_post_incdec_property_helper_SPEC_UNUSED_TMPVAR(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_OBJ_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_post_incdec_property_helper_SPEC_UNUSED_TMPVAR(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_post_incdec_property_helper_SPEC_UNUSED_TMPVAR(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -27804,7 +27709,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return ZEND_FETCH_OBJ_R_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
}
@@ -28052,7 +27957,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_UNUSED_TMPVAR_
ZEND_VM_NEXT_OPCODE();
#if 0 || (IS_UNUSED != IS_UNUSED)
} else {
- return ZEND_ADD_ARRAY_ELEMENT_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_ADD_ARRAY_ELEMENT_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
#endif
}
}
@@ -28872,7 +28777,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_SPEC_CV_HANDLER(ZEND_OP
}
}
}
- return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -28933,7 +28838,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_CV_HANDLER(
}
} while (0);
- return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GENERATOR_RETURN_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -29065,7 +28970,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_SPEC_CV_HANDLE
if (!(opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND)) {
if (!ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
- return ZEND_SEND_VAR_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_SEND_VAR_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
}
@@ -29146,7 +29051,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_EX_SPEC_CV_HANDLER(ZE
}
} else if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
send_var_by_ref:
- return ZEND_SEND_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_SEND_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
varptr = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
@@ -29433,8 +29338,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_CV_HANDLER(ZEND_OPCO
}
}
} else {
- ZVAL_COPY_VALUE(result, expr);
- zval_opt_copy_ctor(result);
+ ZVAL_COPY(result, expr);
convert_to_object(result);
}
}
@@ -30289,11 +30193,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_CV_CONST_HANDLER(ZEND
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- fast_div_function(EX_VAR(opline->result.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- EX_CONSTANT(opline->op2));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ fast_div_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -30343,11 +30248,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_CV_CONST_HANDLER(ZEND_
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- shift_left_function(EX_VAR(opline->result.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- EX_CONSTANT(opline->op2));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ shift_left_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -30358,11 +30264,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_CV_CONST_HANDLER(ZEND_
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- shift_right_function(EX_VAR(opline->result.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- EX_CONSTANT(opline->op2));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ shift_right_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -30434,12 +30341,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_CONST_HAN
{
USE_OPLINE
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_identical_function(
- _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var),
- EX_CONSTANT(opline->op2));
+ op1 = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ result = fast_is_identical_function(op1, op2);
ZEND_VM_SMART_BRANCH(result, (IS_CV|IS_CONST) & (IS_VAR|IS_TMP_VAR));
@@ -30454,12 +30362,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_CONST
{
USE_OPLINE
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_not_identical_function(
- _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var),
- EX_CONSTANT(opline->op2));
+ op1 = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ result = fast_is_not_identical_function(op1, op2);
ZEND_VM_SMART_BRANCH(result, (IS_CV|IS_CONST) & (IS_VAR|IS_TMP_VAR));
@@ -30714,12 +30623,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_CV_CONST_HANDLE
{
USE_OPLINE
- zval *result = EX_VAR(opline->result.var);
+ zval *op1, *op2;
SAVE_OPLINE();
- compare_function(result,
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- EX_CONSTANT(opline->op2));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ compare_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -30730,11 +30639,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_CV_CONST_HANDLER(ZE
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_or_function(EX_VAR(opline->result.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- EX_CONSTANT(opline->op2));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ bitwise_or_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -30745,11 +30655,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_CV_CONST_HANDLER(Z
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_and_function(EX_VAR(opline->result.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- EX_CONSTANT(opline->op2));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ bitwise_and_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -30760,11 +30671,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_CV_CONST_HANDLER(Z
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_xor_function(EX_VAR(opline->result.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- EX_CONSTANT(opline->op2));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ bitwise_xor_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -30775,11 +30687,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CV_CONST_HANDLER
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- boolean_xor_function(EX_VAR(opline->result.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- EX_CONSTANT(opline->op2));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ boolean_xor_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -30971,16 +30884,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_CV_CONST_HANDL
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -30991,16 +30904,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_CV_CONST_HANDL
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -31011,16 +30924,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_CV_CONST_HANDL
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -31031,16 +30944,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_CV_CONST_HANDL
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -31051,16 +30964,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_CV_CONST_HANDL
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -31071,16 +30984,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_CV_CONST_HANDLE
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -31091,16 +31004,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_CV_CONST_HANDLE
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -31111,16 +31024,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_CV_CONST_HA
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -31131,16 +31044,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_CV_CONST_HAN
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -31151,16 +31064,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_CV_CONST_HA
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -31171,16 +31084,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_CV_CONST_HA
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -31257,12 +31170,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_pre_incdec_property_helper_SPEC_CV_CONST(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_pre_incdec_property_helper_SPEC_CV_CONST(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_pre_incdec_property_helper_SPEC_CV_CONST(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_pre_incdec_property_helper_SPEC_CV_CONST(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_CONST(int inc ZEND_OPCODE_HANDLER_ARGS_DC)
@@ -31334,12 +31247,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_post_incdec_property_helper_SPEC_CV_CONST(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_post_incdec_property_helper_SPEC_CV_CONST(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_post_incdec_property_helper_SPEC_CV_CONST(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_post_incdec_property_helper_SPEC_CV_CONST(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CV_CONST(int type ZEND_OPCODE_HANDLER_ARGS_DC)
@@ -31495,17 +31408,17 @@ fetch_var_return:
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_R_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_W_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_RW_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -31513,20 +31426,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CV_CONST_H
USE_OPLINE
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- return zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else {
- return zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -31920,7 +31833,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_CON
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return ZEND_FETCH_OBJ_R_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
}
@@ -32551,7 +32464,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CV_CONST_HANDL
ZEND_VM_NEXT_OPCODE();
#if 0 || (IS_CV != IS_UNUSED)
} else {
- return ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
#endif
}
}
@@ -33263,11 +33176,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_CV_CONST_HANDLER(ZEND
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- pow_function(EX_VAR(opline->result.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- EX_CONSTANT(opline->op2));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ pow_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -33276,7 +33190,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_CV_CONST_HANDLER(ZEND
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_binary_assign_op_helper_SPEC_CV_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BIND_GLOBAL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -33364,12 +33278,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_TMP_HANDL
{
USE_OPLINE
zend_free_op free_op2;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_identical_function(
- _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var),
- _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
+ result = fast_is_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(result, (IS_CV|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
@@ -33384,12 +33299,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_TMP_H
{
USE_OPLINE
zend_free_op free_op2;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_not_identical_function(
- _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var),
- _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
+ result = fast_is_not_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(result, (IS_CV|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
@@ -33574,12 +33490,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_VAR_HANDL
{
USE_OPLINE
zend_free_op free_op2;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_identical_function(
- _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var),
- _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2);
+ result = fast_is_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(result, (IS_CV|IS_VAR) & (IS_VAR|IS_TMP_VAR));
@@ -33594,12 +33511,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_VAR_H
{
USE_OPLINE
zend_free_op free_op2;
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_not_identical_function(
- _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var),
- _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2);
+ result = fast_is_not_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(result, (IS_CV|IS_VAR) & (IS_VAR|IS_TMP_VAR));
@@ -33763,17 +33681,17 @@ fetch_var_return:
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_R_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_W_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_RW_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -33781,20 +33699,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CV_VAR_HAN
USE_OPLINE
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- return zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else {
- return zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -33853,7 +33771,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_CV_VAR_HANDLER
if (free_op2) {zval_ptr_dtor_nogc(free_op2);};
HANDLE_EXCEPTION();
}
- return ZEND_ASSIGN_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_ASSIGN_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
variable_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
@@ -34343,16 +34261,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_CV_UNUSED_HAND
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -34363,16 +34281,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_CV_UNUSED_HAND
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -34383,16 +34301,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_CV_UNUSED_HAND
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -34403,16 +34321,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_CV_UNUSED_HAND
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -34423,16 +34341,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_CV_UNUSED_HAND
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -34443,16 +34361,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_CV_UNUSED_HANDL
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -34463,16 +34381,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_CV_UNUSED_HANDL
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -34483,16 +34401,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_CV_UNUSED_H
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -34503,16 +34421,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_CV_UNUSED_HA
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -34523,16 +34441,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_CV_UNUSED_H
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -34543,16 +34461,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_CV_UNUSED_H
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -34709,17 +34627,17 @@ fetch_var_return:
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_R_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CV_UNUSED(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_UNUSED(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_W_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CV_UNUSED(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_UNUSED(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_RW_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CV_UNUSED(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_UNUSED(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -34727,20 +34645,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CV_UNUSED_
USE_OPLINE
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- return zend_fetch_var_address_helper_SPEC_CV_UNUSED(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_UNUSED(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else {
- return zend_fetch_var_address_helper_SPEC_CV_UNUSED(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_UNUSED(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CV_UNUSED(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_UNUSED(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_CV_UNUSED(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_UNUSED(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -34942,13 +34860,11 @@ assign_dim_clean:
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
-#if 0 || (IS_CV != IS_UNUSED)
USE_OPLINE
-#endif
SAVE_OPLINE();
if (IS_CV == IS_UNUSED) {
- zend_verify_missing_return_type(EX(func));
+ zend_verify_missing_return_type(EX(func), CACHE_ADDR(opline->op2.num));
} else {
/* prevents "undefined variable opline" errors */
#if 0 || (IS_CV != IS_UNUSED)
@@ -34967,22 +34883,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_CV_UNU
if (UNEXPECTED(!ret_info->class_name
&& ret_info->type_hint != IS_CALLABLE
- && !ZEND_SAME_FAKE_TYPE(ret_info->type_hint, Z_TYPE_P(retval_ptr)))) {
- /* A cast or an error will happen, so separate the zval to prevent overwriting it */
-
- if (EXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) == 0)) {
- /* Does not return by reference */
- if (retval_ref != retval_ptr && Z_REFCOUNT_P(retval_ref) == 1) {
- ZVAL_UNREF(retval_ref);
- } else {
- SEPARATE_ZVAL(retval_ref);
- }
- retval_ptr = retval_ref;
+ && !ZEND_SAME_FAKE_TYPE(ret_info->type_hint, Z_TYPE_P(retval_ptr))
+ && !(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)
+ && retval_ref != retval_ptr)
+ ) {
+ /* A cast might happen - unwrap the reference if this is a by-value return */
+ if (Z_REFCOUNT_P(retval_ref) == 1) {
+ ZVAL_UNREF(retval_ref);
} else {
- SEPARATE_ZVAL_NOREF(retval_ptr);
+ Z_DELREF_P(retval_ref);
+ ZVAL_COPY(retval_ref, retval_ptr);
}
+ retval_ptr = retval_ref;
}
- zend_verify_return_type(EX(func), retval_ptr);
+ zend_verify_return_type(EX(func), retval_ptr, CACHE_ADDR(opline->op2.num));
if (UNEXPECTED(EG(exception) != NULL)) {
@@ -35119,7 +35033,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CV_UNUSED_HAND
ZEND_VM_NEXT_OPCODE();
#if 0 || (IS_CV != IS_UNUSED)
} else {
- return ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
#endif
}
}
@@ -35591,11 +35505,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_CV_CV_HANDLER(ZEND_OP
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- fast_div_function(EX_VAR(opline->result.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ fast_div_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -35645,11 +35560,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_CV_CV_HANDLER(ZEND_OPC
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- shift_left_function(EX_VAR(opline->result.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ shift_left_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -35660,11 +35576,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_CV_CV_HANDLER(ZEND_OPC
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- shift_right_function(EX_VAR(opline->result.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ shift_right_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -35736,12 +35653,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_CV_HANDLE
{
USE_OPLINE
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_identical_function(
- _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var),
- _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var);
+ result = fast_is_identical_function(op1, op2);
ZEND_VM_SMART_BRANCH(result, (IS_CV|IS_CV) & (IS_VAR|IS_TMP_VAR));
@@ -35756,12 +35674,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_CV_HA
{
USE_OPLINE
+ zval *op1, *op2;
int result;
SAVE_OPLINE();
- result = fast_is_not_identical_function(
- _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var),
- _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var);
+ result = fast_is_not_identical_function(op1, op2);
ZEND_VM_SMART_BRANCH(result, (IS_CV|IS_CV) & (IS_VAR|IS_TMP_VAR));
@@ -36016,12 +35935,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_CV_CV_HANDLER(Z
{
USE_OPLINE
- zval *result = EX_VAR(opline->result.var);
+ zval *op1, *op2;
SAVE_OPLINE();
- compare_function(result,
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ compare_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -36032,11 +35951,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_CV_CV_HANDLER(ZEND_
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_or_function(EX_VAR(opline->result.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ bitwise_or_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -36047,11 +35967,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_CV_CV_HANDLER(ZEND
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_and_function(EX_VAR(opline->result.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ bitwise_and_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -36062,11 +35983,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_CV_CV_HANDLER(ZEND
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_xor_function(EX_VAR(opline->result.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ bitwise_xor_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -36077,11 +35999,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CV_CV_HANDLER(ZE
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- boolean_xor_function(EX_VAR(opline->result.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ boolean_xor_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -36273,16 +36196,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_CV_CV_HANDLER(
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -36293,16 +36216,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_CV_CV_HANDLER(
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -36313,16 +36236,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_CV_CV_HANDLER(
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -36333,16 +36256,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_CV_CV_HANDLER(
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -36353,16 +36276,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_CV_CV_HANDLER(
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -36373,16 +36296,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_CV_CV_HANDLER(Z
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -36393,16 +36316,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_CV_CV_HANDLER(Z
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -36413,16 +36336,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_CV_CV_HANDL
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -36433,16 +36356,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_CV_CV_HANDLE
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -36453,16 +36376,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_CV_CV_HANDL
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -36473,16 +36396,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_CV_CV_HANDL
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -36559,12 +36482,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_pre_incdec_property_helper_SPEC_CV_CV(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_pre_incdec_property_helper_SPEC_CV_CV(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_pre_incdec_property_helper_SPEC_CV_CV(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_pre_incdec_property_helper_SPEC_CV_CV(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_CV(int inc ZEND_OPCODE_HANDLER_ARGS_DC)
@@ -36636,12 +36559,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_post_incdec_property_helper_SPEC_CV_CV(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_post_incdec_property_helper_SPEC_CV_CV(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_post_incdec_property_helper_SPEC_CV_CV(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_post_incdec_property_helper_SPEC_CV_CV(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -37035,7 +36958,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_CV_
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return ZEND_FETCH_OBJ_R_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
}
@@ -37267,7 +37190,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_CV_CV_HANDLER(
HANDLE_EXCEPTION();
}
- return ZEND_ASSIGN_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_ASSIGN_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
variable_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
@@ -37681,7 +37604,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CV_CV_HANDLER(
ZEND_VM_NEXT_OPCODE();
#if 0 || (IS_CV != IS_UNUSED)
} else {
- return ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
#endif
}
}
@@ -38159,11 +38082,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_CV_CV_HANDLER(ZEND_OP
{
USE_OPLINE
+ zval *op1, *op2;
SAVE_OPLINE();
- pow_function(EX_VAR(opline->result.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ pow_function(EX_VAR(opline->result.var), op1, op2);
CHECK_EXCEPTION();
@@ -38172,7 +38096,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_CV_CV_HANDLER(ZEND_OP
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_binary_assign_op_helper_SPEC_CV_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -38314,11 +38238,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_CV_TMPVAR_HANDLER(ZEN
{
USE_OPLINE
zend_free_op free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- fast_div_function(EX_VAR(opline->result.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ fast_div_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -38368,11 +38293,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_CV_TMPVAR_HANDLER(ZEND
{
USE_OPLINE
zend_free_op free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- shift_left_function(EX_VAR(opline->result.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ shift_left_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -38383,11 +38309,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_CV_TMPVAR_HANDLER(ZEND
{
USE_OPLINE
zend_free_op free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- shift_right_function(EX_VAR(opline->result.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ shift_right_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -38699,12 +38626,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_CV_TMPVAR_HANDL
{
USE_OPLINE
zend_free_op free_op2;
- zval *result = EX_VAR(opline->result.var);
+ zval *op1, *op2;
SAVE_OPLINE();
- compare_function(result,
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ compare_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -38715,11 +38642,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_CV_TMPVAR_HANDLER(Z
{
USE_OPLINE
zend_free_op free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_or_function(EX_VAR(opline->result.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ bitwise_or_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -38730,11 +38658,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_CV_TMPVAR_HANDLER(
{
USE_OPLINE
zend_free_op free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_and_function(EX_VAR(opline->result.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ bitwise_and_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -38745,11 +38674,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_CV_TMPVAR_HANDLER(
{
USE_OPLINE
zend_free_op free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_xor_function(EX_VAR(opline->result.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ bitwise_xor_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -38760,11 +38690,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CV_TMPVAR_HANDLE
{
USE_OPLINE
zend_free_op free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- boolean_xor_function(EX_VAR(opline->result.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ boolean_xor_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -38958,16 +38889,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_CV_TMPVAR_HAND
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -38978,16 +38909,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_CV_TMPVAR_HAND
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -38998,16 +38929,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_CV_TMPVAR_HAND
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -39018,16 +38949,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_CV_TMPVAR_HAND
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -39038,16 +38969,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_CV_TMPVAR_HAND
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -39058,16 +38989,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_CV_TMPVAR_HANDL
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -39078,16 +39009,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_CV_TMPVAR_HANDL
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -39098,16 +39029,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_CV_TMPVAR_H
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -39118,16 +39049,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_CV_TMPVAR_HA
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -39138,16 +39069,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_CV_TMPVAR_H
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -39158,16 +39089,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_CV_TMPVAR_H
# if 0 || (IS_CV != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- return zend_binary_assign_op_helper_SPEC_CV_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- return zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- return zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
- return zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
#endif
}
@@ -39245,12 +39176,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_OBJ_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_pre_incdec_property_helper_SPEC_CV_TMPVAR(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_pre_incdec_property_helper_SPEC_CV_TMPVAR(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_OBJ_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_pre_incdec_property_helper_SPEC_CV_TMPVAR(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_pre_incdec_property_helper_SPEC_CV_TMPVAR(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_TMPVAR(int inc ZEND_OPCODE_HANDLER_ARGS_DC)
@@ -39323,12 +39254,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_OBJ_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_post_incdec_property_helper_SPEC_CV_TMPVAR(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_post_incdec_property_helper_SPEC_CV_TMPVAR(1 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_OBJ_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_post_incdec_property_helper_SPEC_CV_TMPVAR(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_post_incdec_property_helper_SPEC_CV_TMPVAR(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -39724,7 +39655,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_TMP
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return ZEND_FETCH_OBJ_R_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
}
@@ -40282,7 +40213,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CV_TMPVAR_HAND
ZEND_VM_NEXT_OPCODE();
#if 0 || (IS_CV != IS_UNUSED)
} else {
- return ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ZEND_VM_TAIL_CALL(ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
#endif
}
}
@@ -40622,11 +40553,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_CV_TMPVAR_HANDLER(ZEN
{
USE_OPLINE
zend_free_op free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- pow_function(EX_VAR(opline->result.var),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ pow_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -40635,7 +40567,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_CV_TMPVAR_HANDLER(ZEN
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_binary_assign_op_helper_SPEC_CV_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_NOT_SPEC_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -41381,11 +41313,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_TMPVAR_CONST_HANDLER(
{
USE_OPLINE
zend_free_op free_op1;
+ zval *op1, *op2;
SAVE_OPLINE();
- fast_div_function(EX_VAR(opline->result.var),
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- EX_CONSTANT(opline->op2));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = EX_CONSTANT(opline->op2);
+ fast_div_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
CHECK_EXCEPTION();
@@ -41435,11 +41368,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_TMPVAR_CONST_HANDLER(Z
{
USE_OPLINE
zend_free_op free_op1;
+ zval *op1, *op2;
SAVE_OPLINE();
- shift_left_function(EX_VAR(opline->result.var),
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- EX_CONSTANT(opline->op2));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = EX_CONSTANT(opline->op2);
+ shift_left_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
CHECK_EXCEPTION();
@@ -41450,11 +41384,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_TMPVAR_CONST_HANDLER(Z
{
USE_OPLINE
zend_free_op free_op1;
+ zval *op1, *op2;
SAVE_OPLINE();
- shift_right_function(EX_VAR(opline->result.var),
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- EX_CONSTANT(opline->op2));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = EX_CONSTANT(opline->op2);
+ shift_right_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
CHECK_EXCEPTION();
@@ -41766,12 +41701,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_TMPVAR_CONST_HA
{
USE_OPLINE
zend_free_op free_op1;
- zval *result = EX_VAR(opline->result.var);
+ zval *op1, *op2;
SAVE_OPLINE();
- compare_function(result,
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- EX_CONSTANT(opline->op2));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = EX_CONSTANT(opline->op2);
+ compare_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
CHECK_EXCEPTION();
@@ -41782,11 +41717,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_TMPVAR_CONST_HANDLE
{
USE_OPLINE
zend_free_op free_op1;
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_or_function(EX_VAR(opline->result.var),
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- EX_CONSTANT(opline->op2));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = EX_CONSTANT(opline->op2);
+ bitwise_or_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
CHECK_EXCEPTION();
@@ -41797,11 +41733,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_TMPVAR_CONST_HANDL
{
USE_OPLINE
zend_free_op free_op1;
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_and_function(EX_VAR(opline->result.var),
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- EX_CONSTANT(opline->op2));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = EX_CONSTANT(opline->op2);
+ bitwise_and_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
CHECK_EXCEPTION();
@@ -41812,11 +41749,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_TMPVAR_CONST_HANDL
{
USE_OPLINE
zend_free_op free_op1;
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_xor_function(EX_VAR(opline->result.var),
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- EX_CONSTANT(opline->op2));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = EX_CONSTANT(opline->op2);
+ bitwise_xor_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
CHECK_EXCEPTION();
@@ -41827,11 +41765,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_TMPVAR_CONST_HAN
{
USE_OPLINE
zend_free_op free_op1;
+ zval *op1, *op2;
SAVE_OPLINE();
- boolean_xor_function(EX_VAR(opline->result.var),
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- EX_CONSTANT(opline->op2));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = EX_CONSTANT(opline->op2);
+ boolean_xor_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
CHECK_EXCEPTION();
@@ -41992,17 +41931,17 @@ fetch_var_return:
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_R_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_TMPVAR_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_W_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_TMPVAR_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_RW_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_TMPVAR_CONST(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_CONST(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -42010,20 +41949,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_TMPVAR_CON
USE_OPLINE
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- return zend_fetch_var_address_helper_SPEC_TMPVAR_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else {
- return zend_fetch_var_address_helper_SPEC_TMPVAR_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_TMPVAR_CONST(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_CONST(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_IS_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_TMPVAR_CONST(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_CONST(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -42854,11 +42793,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_TMPVAR_CONST_HANDLER(
{
USE_OPLINE
zend_free_op free_op1;
+ zval *op1, *op2;
SAVE_OPLINE();
- pow_function(EX_VAR(opline->result.var),
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- EX_CONSTANT(opline->op2));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = EX_CONSTANT(opline->op2);
+ pow_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
CHECK_EXCEPTION();
@@ -43019,17 +42959,17 @@ fetch_var_return:
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_R_SPEC_TMPVAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_TMPVAR_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_W_SPEC_TMPVAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_TMPVAR_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_RW_SPEC_TMPVAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_TMPVAR_VAR(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_VAR(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_TMPVAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -43037,20 +42977,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_TMPVAR_VAR
USE_OPLINE
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- return zend_fetch_var_address_helper_SPEC_TMPVAR_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else {
- return zend_fetch_var_address_helper_SPEC_TMPVAR_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_TMPVAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_TMPVAR_VAR(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_VAR(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_IS_SPEC_TMPVAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_TMPVAR_VAR(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_VAR(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_TMPVAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -43442,17 +43382,17 @@ fetch_var_return:
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_R_SPEC_TMPVAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_TMPVAR_UNUSED(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_UNUSED(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_W_SPEC_TMPVAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_TMPVAR_UNUSED(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_UNUSED(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_RW_SPEC_TMPVAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_TMPVAR_UNUSED(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_UNUSED(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_TMPVAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -43460,20 +43400,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_TMPVAR_UNU
USE_OPLINE
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- return zend_fetch_var_address_helper_SPEC_TMPVAR_UNUSED(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_UNUSED(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else {
- return zend_fetch_var_address_helper_SPEC_TMPVAR_UNUSED(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_UNUSED(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_TMPVAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_TMPVAR_UNUSED(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_UNUSED(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_IS_SPEC_TMPVAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_var_address_helper_SPEC_TMPVAR_UNUSED(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);
+ ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_UNUSED(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_TMPVAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -43803,11 +43743,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_TMPVAR_CV_HANDLER(ZEN
{
USE_OPLINE
zend_free_op free_op1;
+ zval *op1, *op2;
SAVE_OPLINE();
- fast_div_function(EX_VAR(opline->result.var),
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ fast_div_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
CHECK_EXCEPTION();
@@ -43857,11 +43798,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_TMPVAR_CV_HANDLER(ZEND
{
USE_OPLINE
zend_free_op free_op1;
+ zval *op1, *op2;
SAVE_OPLINE();
- shift_left_function(EX_VAR(opline->result.var),
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ shift_left_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
CHECK_EXCEPTION();
@@ -43872,11 +43814,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_TMPVAR_CV_HANDLER(ZEND
{
USE_OPLINE
zend_free_op free_op1;
+ zval *op1, *op2;
SAVE_OPLINE();
- shift_right_function(EX_VAR(opline->result.var),
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ shift_right_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
CHECK_EXCEPTION();
@@ -44188,12 +44131,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_TMPVAR_CV_HANDL
{
USE_OPLINE
zend_free_op free_op1;
- zval *result = EX_VAR(opline->result.var);
+ zval *op1, *op2;
SAVE_OPLINE();
- compare_function(result,
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ compare_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
CHECK_EXCEPTION();
@@ -44204,11 +44147,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_TMPVAR_CV_HANDLER(Z
{
USE_OPLINE
zend_free_op free_op1;
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_or_function(EX_VAR(opline->result.var),
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ bitwise_or_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
CHECK_EXCEPTION();
@@ -44219,11 +44163,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_TMPVAR_CV_HANDLER(
{
USE_OPLINE
zend_free_op free_op1;
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_and_function(EX_VAR(opline->result.var),
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ bitwise_and_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
CHECK_EXCEPTION();
@@ -44234,11 +44179,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_TMPVAR_CV_HANDLER(
{
USE_OPLINE
zend_free_op free_op1;
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_xor_function(EX_VAR(opline->result.var),
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ bitwise_xor_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
CHECK_EXCEPTION();
@@ -44249,11 +44195,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_TMPVAR_CV_HANDLE
{
USE_OPLINE
zend_free_op free_op1;
+ zval *op1, *op2;
SAVE_OPLINE();
- boolean_xor_function(EX_VAR(opline->result.var),
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ boolean_xor_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
CHECK_EXCEPTION();
@@ -44808,11 +44755,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_TMPVAR_CV_HANDLER(ZEN
{
USE_OPLINE
zend_free_op free_op1;
+ zval *op1, *op2;
SAVE_OPLINE();
- pow_function(EX_VAR(opline->result.var),
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ pow_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
CHECK_EXCEPTION();
@@ -44958,11 +44906,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_TMPVAR_TMPVAR_HANDLER
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- fast_div_function(EX_VAR(opline->result.var),
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ fast_div_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -45012,11 +44961,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_TMPVAR_TMPVAR_HANDLER(
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- shift_left_function(EX_VAR(opline->result.var),
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ shift_left_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -45027,11 +44977,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_TMPVAR_TMPVAR_HANDLER(
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- shift_right_function(EX_VAR(opline->result.var),
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ shift_right_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -45343,12 +45294,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_TMPVAR_TMPVAR_H
{
USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = EX_VAR(opline->result.var);
+ zval *op1, *op2;
SAVE_OPLINE();
- compare_function(result,
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ compare_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -45359,11 +45310,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_TMPVAR_TMPVAR_HANDL
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_or_function(EX_VAR(opline->result.var),
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ bitwise_or_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -45374,11 +45326,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_TMPVAR_TMPVAR_HAND
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_and_function(EX_VAR(opline->result.var),
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ bitwise_and_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -45389,11 +45342,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_TMPVAR_TMPVAR_HAND
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- bitwise_xor_function(EX_VAR(opline->result.var),
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ bitwise_xor_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -45404,11 +45358,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_TMPVAR_TMPVAR_HA
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- boolean_xor_function(EX_VAR(opline->result.var),
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ boolean_xor_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -45966,11 +45921,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_TMPVAR_TMPVAR_HANDLER
{
USE_OPLINE
zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
SAVE_OPLINE();
- pow_function(EX_VAR(opline->result.var),
- _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1),
- _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ pow_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
CHECK_EXCEPTION();
@@ -50359,7 +50315,12 @@ ZEND_API int zend_vm_call_opcode_handler(zend_execute_data* ex)
#endif
LOAD_OPLINE();
+#if defined(ZEND_VM_FP_GLOBAL_REG) && defined(ZEND_VM_IP_GLOBAL_REG)
+ ((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ ret = (opline) ? 0 : -1;
+#else
ret = ((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+#endif
SAVE_OPLINE();
#ifdef ZEND_VM_FP_GLOBAL_REG
execute_data = orig_execute_data;
diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php
index 0b8caadc74..c57cbad358 100644
--- a/Zend/zend_vm_gen.php
+++ b/Zend/zend_vm_gen.php
@@ -586,11 +586,11 @@ function gen_code($f, $spec, $kind, $export, $code, $op1, $op2, $name) {
if (strncasecmp($matches[0], "EXECUTE_DATA", strlen("EXECUTE_DATA")) == 0) {
return "execute_data";
} else if (strncasecmp($matches[0], "ZEND_VM_DISPATCH_TO_HANDLER", strlen("ZEND_VM_DISPATCH_TO_HANDLER")) == 0) {
- return "return " . $matches[1] . ($spec?"_SPEC":"") . $prefix[$op1] . $prefix[$op2] . "_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)";
+ return "ZEND_VM_TAIL_CALL(" . $matches[1] . ($spec?"_SPEC":"") . $prefix[$op1] . $prefix[$op2] . "_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU))";
} else if (strncasecmp($matches[0], "ZEND_VM_DISPATCH_TO_HELPER_EX", strlen("ZEND_VM_DISPATCH_TO_HELPER_EX")) == 0) {
- return "return " . helper_name($matches[1], $spec, $op1, $op2) . "(" . $matches[2]. " ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC);";
+ return "ZEND_VM_TAIL_CALL(" . helper_name($matches[1], $spec, $op1, $op2) . "(" . $matches[2]. " ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));";
} else {
- return "return " . helper_name($matches[1], $spec, $op1, $op2) . "(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)";
+ return "ZEND_VM_TAIL_CALL(" . helper_name($matches[1], $spec, $op1, $op2) . "(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU))";
}
},
$code);
@@ -1022,19 +1022,29 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
out($f,"#endif\n");
out($f,"\n");
out($f,"#ifdef ZEND_VM_FP_GLOBAL_REG\n");
- out($f,"# define ZEND_OPCODE_HANDLER_RET int\n");
out($f,"# define ZEND_OPCODE_HANDLER_ARGS void\n");
out($f,"# define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU\n");
out($f,"# define ZEND_OPCODE_HANDLER_ARGS_DC\n");
out($f,"# define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC\n");
out($f,"#else\n");
- out($f,"# define ZEND_OPCODE_HANDLER_RET int\n");
out($f,"# define ZEND_OPCODE_HANDLER_ARGS zend_execute_data *execute_data\n");
out($f,"# define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU execute_data\n");
out($f,"# define ZEND_OPCODE_HANDLER_ARGS_DC , ZEND_OPCODE_HANDLER_ARGS\n");
out($f,"# define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC , ZEND_OPCODE_HANDLER_ARGS_PASSTHRU\n");
out($f,"#endif\n");
out($f,"\n");
+ out($f,"#if defined(ZEND_VM_FP_GLOBAL_REG) && defined(ZEND_VM_IP_GLOBAL_REG)\n");
+ out($f,"# define ZEND_OPCODE_HANDLER_RET void\n");
+ out($f,"# define ZEND_VM_TAIL_CALL(call) call; return\n");
+ out($f,"# define ZEND_VM_CONTINUE() return\n");
+ out($f,"# define ZEND_VM_RETURN() opline = NULL; ZEND_VM_CONTINUE()\n");
+ out($f,"#else\n");
+ out($f,"# define ZEND_OPCODE_HANDLER_RET int\n");
+ out($f,"# define ZEND_VM_TAIL_CALL(call) return call\n");
+ out($f,"# define ZEND_VM_CONTINUE() return 0\n");
+ out($f,"# define ZEND_VM_RETURN() return -1\n");
+ out($f,"#endif\n");
+ out($f,"\n");
out($f,"typedef ZEND_OPCODE_HANDLER_RET (ZEND_FASTCALL *opcode_handler_t) (ZEND_OPCODE_HANDLER_ARGS);\n");
out($f,"\n");
out($f,"#undef OPLINE\n");
@@ -1060,9 +1070,7 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
out($f,"#define CHECK_EXCEPTION() LOAD_OPLINE()\n");
out($f,"#define HANDLE_EXCEPTION() LOAD_OPLINE(); ZEND_VM_CONTINUE()\n");
out($f,"#define HANDLE_EXCEPTION_LEAVE() LOAD_OPLINE(); ZEND_VM_LEAVE()\n");
- out($f,"#define ZEND_VM_CONTINUE() return 0\n");
- out($f,"#define ZEND_VM_RETURN() return -1\n");
- out($f,"#ifdef ZEND_VM_FP_GLOBAL_REG\n");
+ out($f,"#if defined(ZEND_VM_FP_GLOBAL_REG)\n");
out($f,"# define ZEND_VM_ENTER() execute_data = EG(current_execute_data); LOAD_OPLINE(); ZEND_VM_CONTINUE()\n");
out($f,"# define ZEND_VM_LEAVE() ZEND_VM_CONTINUE()\n");
out($f,"#elif defined(ZEND_VM_IP_GLOBAL_REG)\n");
@@ -1072,7 +1080,7 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
out($f,"# define ZEND_VM_ENTER() return 1\n");
out($f,"# define ZEND_VM_LEAVE() return 2\n");
out($f,"#endif\n");
- out($f,"#define ZEND_VM_DISPATCH(opcode, opline) return ((opcode_handler_t)zend_vm_get_opcode_handler(opcode, opline))(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);\n");
+ out($f,"#define ZEND_VM_DISPATCH(opcode, opline) ZEND_VM_TAIL_CALL(((opcode_handler_t)zend_vm_get_opcode_handler(opcode, opline))(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));\n");
out($f,"\n");
break;
case ZEND_VM_KIND_SWITCH:
@@ -1189,7 +1197,12 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
// Emit code that dispatches to opcode handler
switch ($kind) {
case ZEND_VM_KIND_CALL:
+ out($f,"#if defined(ZEND_VM_FP_GLOBAL_REG) && defined(ZEND_VM_IP_GLOBAL_REG)\n");
+ out($f, $m[1]."((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);\n");
+ out($f, $m[1]."if (UNEXPECTED(!OPLINE))".$m[3]."\n");
+ out($f,"#else\n");
out($f, $m[1]."if (UNEXPECTED((ret = ((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)) != 0))".$m[3]."\n");
+ out($f,"#endif\n");
break;
case ZEND_VM_KIND_SWITCH:
out($f, $m[1]."dispatch_handler = OPLINE->handler;\nzend_vm_dispatch:\n".$m[1]."switch ((int)(uintptr_t)dispatch_handler)".$m[3]."\n");
@@ -1571,7 +1584,12 @@ function gen_vm($def, $skel) {
out($f, "#endif\n");
out($f, "\n");
out($f, "\tLOAD_OPLINE();\n");
+ out($f,"#if defined(ZEND_VM_FP_GLOBAL_REG) && defined(ZEND_VM_IP_GLOBAL_REG)\n");
+ out($f, "\t((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);\n");
+ out($f, "\tret = (opline) ? 0 : -1;\n");
+ out($f, "#else\n");
out($f, "\tret = ((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);\n");
+ out($f, "#endif\n");
out($f, "\tSAVE_OPLINE();\n");
out($f, "#ifdef ZEND_VM_FP_GLOBAL_REG\n");
out($f, "\texecute_data = orig_execute_data;\n");
diff --git a/ext/bz2/package.xml b/ext/bz2/package.xml
index 107f218866..b1b3688b56 100644
--- a/ext/bz2/package.xml
+++ b/ext/bz2/package.xml
@@ -32,7 +32,6 @@ Bz2 is an extension to create and parse bzip2 compressed data.
<file role="src">config.m4</file>
<file role="doc">php_bz2.h</file>
<file role="src">bz2.c</file>
- <file role="src">bz2.dsp</file>
</dir>
</filelist>
</package>
diff --git a/ext/ctype/package.xml b/ext/ctype/package.xml
index 71c9cd9903..62a9812be7 100644
--- a/ext/ctype/package.xml
+++ b/ext/ctype/package.xml
@@ -29,7 +29,6 @@ package.xml added to support installation using pear installer
<file role="doc" name="README"/>
<file role="src" name="config.m4"/>
<file role="src" name="config.w32"/>
- <file role="src" name="ctype.dsp"/>
<file role="src" name="ctype.c"/>
<file role="src" name="php_ctype.h"/>
<file role="test" name="tests/001.phpt"/>
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index 6e76ba815b..cae8c46519 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -3008,7 +3008,7 @@ PHP_FUNCTION(curl_getinfo)
}
#endif
if (ch->header.str) {
- CAASTR("request_header", ch->header.str);
+ CAASTR("request_header", zend_string_copy(ch->header.str));
}
} else {
switch (option) {
diff --git a/ext/curl/package.xml b/ext/curl/package.xml
index c14321738d..f54abaf872 100644
--- a/ext/curl/package.xml
+++ b/ext/curl/package.xml
@@ -35,8 +35,7 @@ package.xml added to support installation using pear installer
<filelist>
<file role="doc" name="CREDITS"/>
<file role="src" name="config.m4"/>
- <file role="src" name="config.mw32"/>
- <file role="src" name="curl.dsp"/>
+ <file role="src" name="config.w32"/>
<file role="src" name="interface.c"/>
<file role="src" name="multi.c"/>
<file role="src" name="share.c"/>
diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h
index ff6c1724c0..b8d61e052b 100644
--- a/ext/date/lib/timezonedb.h
+++ b/ext/date/lib/timezonedb.h
@@ -14,577 +14,577 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[583] = {
{ "Africa/Bujumbura" , 0x000EF0 },
{ "Africa/Cairo" , 0x000FA7 },
{ "Africa/Casablanca" , 0x001767 },
- { "Africa/Ceuta" , 0x001DEC },
- { "Africa/Conakry" , 0x002622 },
- { "Africa/Dakar" , 0x0026D8 },
- { "Africa/Dar_es_Salaam" , 0x00278E },
- { "Africa/Djibouti" , 0x0028B5 },
- { "Africa/Douala" , 0x0029DC },
- { "Africa/El_Aaiun" , 0x002A93 },
- { "Africa/Freetown" , 0x00306E },
- { "Africa/Gaborone" , 0x003124 },
- { "Africa/Harare" , 0x0031DB },
- { "Africa/Johannesburg" , 0x003292 },
- { "Africa/Juba" , 0x0033AD },
- { "Africa/Kampala" , 0x003664 },
- { "Africa/Khartoum" , 0x00378B },
- { "Africa/Kigali" , 0x003A42 },
- { "Africa/Kinshasa" , 0x003AF9 },
- { "Africa/Lagos" , 0x003BC7 },
- { "Africa/Libreville" , 0x003C7E },
- { "Africa/Lome" , 0x003D35 },
- { "Africa/Luanda" , 0x003DEB },
- { "Africa/Lubumbashi" , 0x003EA2 },
- { "Africa/Lusaka" , 0x003F70 },
- { "Africa/Malabo" , 0x004027 },
- { "Africa/Maputo" , 0x0040DE },
- { "Africa/Maseru" , 0x004195 },
- { "Africa/Mbabane" , 0x0042B0 },
- { "Africa/Mogadishu" , 0x0043CB },
- { "Africa/Monrovia" , 0x0044F2 },
- { "Africa/Nairobi" , 0x0045EF },
- { "Africa/Ndjamena" , 0x004716 },
- { "Africa/Niamey" , 0x004803 },
- { "Africa/Nouakchott" , 0x0048BA },
- { "Africa/Ouagadougou" , 0x004970 },
- { "Africa/Porto-Novo" , 0x004A26 },
- { "Africa/Sao_Tome" , 0x004ADD },
- { "Africa/Timbuktu" , 0x004B93 },
- { "Africa/Tripoli" , 0x004C49 },
- { "Africa/Tunis" , 0x004EE4 },
- { "Africa/Windhoek" , 0x0051B6 },
- { "America/Adak" , 0x0057F0 },
- { "America/Anchorage" , 0x006149 },
- { "America/Anguilla" , 0x006AB0 },
- { "America/Antigua" , 0x006B66 },
- { "America/Araguaina" , 0x006C1C },
- { "America/Argentina/Buenos_Aires" , 0x006FB1 },
- { "America/Argentina/Catamarca" , 0x007411 },
- { "America/Argentina/ComodRivadavia" , 0x0078A1 },
- { "America/Argentina/Cordoba" , 0x007D16 },
- { "America/Argentina/Jujuy" , 0x0081BA },
- { "America/Argentina/La_Rioja" , 0x008649 },
- { "America/Argentina/Mendoza" , 0x008AD9 },
- { "America/Argentina/Rio_Gallegos" , 0x008F86 },
- { "America/Argentina/Salta" , 0x00940A },
- { "America/Argentina/San_Juan" , 0x009873 },
- { "America/Argentina/San_Luis" , 0x009D03 },
- { "America/Argentina/Tucuman" , 0x00A1AF },
- { "America/Argentina/Ushuaia" , 0x00A64C },
- { "America/Aruba" , 0x00AAD6 },
- { "America/Asuncion" , 0x00ABB2 },
- { "America/Atikokan" , 0x00B3CC },
- { "America/Atka" , 0x00B575 },
- { "America/Bahia" , 0x00BEBE },
- { "America/Bahia_Banderas" , 0x00C2DB },
- { "America/Barbados" , 0x00C943 },
- { "America/Belem" , 0x00CAA7 },
- { "America/Belize" , 0x00CD0C },
- { "America/Blanc-Sablon" , 0x00D0E8 },
- { "America/Boa_Vista" , 0x00D25A },
- { "America/Bogota" , 0x00D4F1 },
- { "America/Boise" , 0x00D5FE },
- { "America/Buenos_Aires" , 0x00DF96 },
- { "America/Cambridge_Bay" , 0x00E3E1 },
- { "America/Campo_Grande" , 0x00EC3B },
- { "America/Cancun" , 0x00F438 },
- { "America/Caracas" , 0x00F798 },
- { "America/Catamarca" , 0x00F8AE },
- { "America/Cayenne" , 0x00FD23 },
- { "America/Cayman" , 0x00FDF7 },
- { "America/Chicago" , 0x00FECE },
- { "America/Chihuahua" , 0x010CE7 },
- { "America/Coral_Harbour" , 0x01131A },
- { "America/Cordoba" , 0x01147F },
- { "America/Costa_Rica" , 0x0118F4 },
- { "America/Creston" , 0x011A55 },
- { "America/Cuiaba" , 0x011B7C },
- { "America/Curacao" , 0x012356 },
- { "America/Danmarkshavn" , 0x012432 },
- { "America/Dawson" , 0x012729 },
- { "America/Dawson_Creek" , 0x012F7C },
- { "America/Denver" , 0x0133F4 },
- { "America/Detroit" , 0x013DA2 },
- { "America/Dominica" , 0x01467E },
- { "America/Edmonton" , 0x014734 },
- { "America/Eirunepe" , 0x0150E4 },
- { "America/El_Salvador" , 0x0153A6 },
- { "America/Ensenada" , 0x0154AC },
- { "America/Fort_Wayne" , 0x0160EE },
- { "America/Fortaleza" , 0x015DEC },
- { "America/Glace_Bay" , 0x016785 },
- { "America/Godthab" , 0x017076 },
- { "America/Goose_Bay" , 0x0177E5 },
- { "America/Grand_Turk" , 0x0184AD },
- { "America/Grenada" , 0x0189C0 },
- { "America/Guadeloupe" , 0x018A76 },
- { "America/Guatemala" , 0x018B2C },
- { "America/Guayaquil" , 0x018C6A },
- { "America/Guyana" , 0x018D49 },
- { "America/Halifax" , 0x018E63 },
- { "America/Havana" , 0x019C0B },
- { "America/Hermosillo" , 0x01A59C },
- { "America/Indiana/Indianapolis" , 0x01A78D },
- { "America/Indiana/Knox" , 0x01AE4B },
- { "America/Indiana/Marengo" , 0x01B802 },
- { "America/Indiana/Petersburg" , 0x01BEF9 },
- { "America/Indiana/Tell_City" , 0x01CD39 },
- { "America/Indiana/Vevay" , 0x01D431 },
- { "America/Indiana/Vincennes" , 0x01D9F7 },
- { "America/Indiana/Winamac" , 0x01E0EA },
- { "America/Indianapolis" , 0x01C6A2 },
- { "America/Inuvik" , 0x01E818 },
- { "America/Iqaluit" , 0x01EFD6 },
- { "America/Jamaica" , 0x01F80C },
- { "America/Jujuy" , 0x01FA13 },
- { "America/Juneau" , 0x01FE98 },
- { "America/Kentucky/Louisville" , 0x0207FC },
- { "America/Kentucky/Monticello" , 0x02130E },
- { "America/Knox_IN" , 0x021C79 },
- { "America/Kralendijk" , 0x02260A },
- { "America/La_Paz" , 0x0226E6 },
- { "America/Lima" , 0x0227E5 },
- { "America/Los_Angeles" , 0x022992 },
- { "America/Louisville" , 0x0234C7 },
- { "America/Lower_Princes" , 0x023FB0 },
- { "America/Maceio" , 0x02408C },
- { "America/Managua" , 0x02439C },
- { "America/Manaus" , 0x024577 },
- { "America/Marigot" , 0x0247F5 },
- { "America/Martinique" , 0x0248AB },
- { "America/Matamoros" , 0x0249B8 },
- { "America/Mazatlan" , 0x024F96 },
- { "America/Mendoza" , 0x0255E6 },
- { "America/Menominee" , 0x025A87 },
- { "America/Merida" , 0x0263C5 },
- { "America/Metlakatla" , 0x0269A1 },
- { "America/Mexico_City" , 0x026CA7 },
- { "America/Miquelon" , 0x027322 },
- { "America/Moncton" , 0x0279C2 },
- { "America/Monterrey" , 0x028646 },
- { "America/Montevideo" , 0x028C2E },
- { "America/Montreal" , 0x0294AA },
- { "America/Montserrat" , 0x02A265 },
- { "America/Nassau" , 0x02A31B },
- { "America/New_York" , 0x02AC13 },
- { "America/Nipigon" , 0x02BA04 },
- { "America/Nome" , 0x02C2AE },
- { "America/Noronha" , 0x02CC1B },
- { "America/North_Dakota/Beulah" , 0x02CF0F },
- { "America/North_Dakota/Center" , 0x02D89B },
- { "America/North_Dakota/New_Salem" , 0x02E227 },
- { "America/Ojinaga" , 0x02EBC8 },
- { "America/Panama" , 0x02F1F1 },
- { "America/Pangnirtung" , 0x02F2C8 },
- { "America/Paramaribo" , 0x02FB33 },
- { "America/Phoenix" , 0x02FC73 },
- { "America/Port-au-Prince" , 0x02FE10 },
- { "America/Port_of_Spain" , 0x030683 },
- { "America/Porto_Acre" , 0x0303E7 },
- { "America/Porto_Velho" , 0x030739 },
- { "America/Puerto_Rico" , 0x030999 },
- { "America/Rainy_River" , 0x030AA4 },
- { "America/Rankin_Inlet" , 0x031335 },
- { "America/Recife" , 0x031AE9 },
- { "America/Regina" , 0x031DD7 },
- { "America/Resolute" , 0x0321FA },
- { "America/Rio_Branco" , 0x0329B0 },
- { "America/Rosario" , 0x032C50 },
- { "America/Santa_Isabel" , 0x0330C5 },
- { "America/Santarem" , 0x033A3F },
- { "America/Santiago" , 0x033CC3 },
- { "America/Santo_Domingo" , 0x03444E },
- { "America/Sao_Paulo" , 0x034643 },
- { "America/Scoresbysund" , 0x034E60 },
- { "America/Shiprock" , 0x035610 },
- { "America/Sitka" , 0x035FB1 },
- { "America/St_Barthelemy" , 0x036913 },
- { "America/St_Johns" , 0x0369C9 },
- { "America/St_Kitts" , 0x03784D },
- { "America/St_Lucia" , 0x037903 },
- { "America/St_Thomas" , 0x0379B9 },
- { "America/St_Vincent" , 0x037A6F },
- { "America/Swift_Current" , 0x037B25 },
- { "America/Tegucigalpa" , 0x037D9D },
- { "America/Thule" , 0x037EBF },
- { "America/Thunder_Bay" , 0x0384D3 },
- { "America/Tijuana" , 0x038DA5 },
- { "America/Toronto" , 0x039715 },
- { "America/Tortola" , 0x03A500 },
- { "America/Vancouver" , 0x03A5B6 },
- { "America/Virgin" , 0x03B13B },
- { "America/Whitehorse" , 0x03B1F1 },
- { "America/Winnipeg" , 0x03BA44 },
- { "America/Yakutat" , 0x03C5C1 },
- { "America/Yellowknife" , 0x03CEFA },
- { "Antarctica/Casey" , 0x03D6EF },
- { "Antarctica/Davis" , 0x03D82A },
- { "Antarctica/DumontDUrville" , 0x03D975 },
- { "Antarctica/Macquarie" , 0x03DA89 },
- { "Antarctica/Mawson" , 0x03E09F },
- { "Antarctica/McMurdo" , 0x03E190 },
- { "Antarctica/Palmer" , 0x03EB65 },
- { "Antarctica/Rothera" , 0x03F116 },
- { "Antarctica/South_Pole" , 0x03F1EF },
- { "Antarctica/Syowa" , 0x03FB97 },
- { "Antarctica/Troll" , 0x03FC69 },
- { "Antarctica/Vostok" , 0x04011C },
- { "Arctic/Longyearbyen" , 0x0401F1 },
- { "Asia/Aden" , 0x040AC8 },
- { "Asia/Almaty" , 0x040B7F },
- { "Asia/Amman" , 0x040F41 },
- { "Asia/Anadyr" , 0x0416A2 },
- { "Asia/Aqtau" , 0x041B8E },
- { "Asia/Aqtobe" , 0x042041 },
- { "Asia/Ashgabat" , 0x042478 },
- { "Asia/Ashkhabad" , 0x042723 },
- { "Asia/Baghdad" , 0x0429CE },
- { "Asia/Bahrain" , 0x042DB6 },
- { "Asia/Baku" , 0x042E93 },
- { "Asia/Bangkok" , 0x043643 },
- { "Asia/Beirut" , 0x04371B },
- { "Asia/Bishkek" , 0x043FA6 },
- { "Asia/Brunei" , 0x0443D7 },
- { "Asia/Calcutta" , 0x0444AC },
- { "Asia/Chita" , 0x0445DB },
- { "Asia/Choibalsan" , 0x044AEF },
- { "Asia/Chongqing" , 0x04513E },
- { "Asia/Chungking" , 0x0452E8 },
- { "Asia/Colombo" , 0x045492 },
- { "Asia/Dacca" , 0x045623 },
- { "Asia/Damascus" , 0x0457B5 },
- { "Asia/Dhaka" , 0x0460D1 },
- { "Asia/Dili" , 0x046263 },
- { "Asia/Dubai" , 0x0463A4 },
- { "Asia/Dushanbe" , 0x04645B },
- { "Asia/Gaza" , 0x0466CA },
- { "Asia/Harbin" , 0x046FEA },
- { "Asia/Hebron" , 0x047194 },
- { "Asia/Ho_Chi_Minh" , 0x047ACF },
- { "Asia/Hong_Kong" , 0x047C50 },
- { "Asia/Hovd" , 0x048101 },
- { "Asia/Irkutsk" , 0x048721 },
- { "Asia/Istanbul" , 0x048C2F },
- { "Asia/Jakarta" , 0x0496F6 },
- { "Asia/Jayapura" , 0x049882 },
- { "Asia/Jerusalem" , 0x0499B0 },
- { "Asia/Kabul" , 0x04A295 },
- { "Asia/Kamchatka" , 0x04A368 },
- { "Asia/Karachi" , 0x04A843 },
- { "Asia/Kashgar" , 0x04A9E2 },
- { "Asia/Kathmandu" , 0x04AA99 },
- { "Asia/Katmandu" , 0x04AB79 },
- { "Asia/Khandyga" , 0x04AC59 },
- { "Asia/Kolkata" , 0x04B1B2 },
- { "Asia/Krasnoyarsk" , 0x04B2E1 },
- { "Asia/Kuala_Lumpur" , 0x04B7D0 },
- { "Asia/Kuching" , 0x04B97D },
- { "Asia/Kuwait" , 0x04BB9F },
- { "Asia/Macao" , 0x04BC56 },
- { "Asia/Macau" , 0x04BF7D },
- { "Asia/Magadan" , 0x04C2A4 },
- { "Asia/Makassar" , 0x04C7AB },
- { "Asia/Manila" , 0x04C917 },
- { "Asia/Muscat" , 0x04CA8C },
- { "Asia/Nicosia" , 0x04CB43 },
- { "Asia/Novokuznetsk" , 0x04D32F },
- { "Asia/Novosibirsk" , 0x04D84C },
- { "Asia/Omsk" , 0x04DD27 },
- { "Asia/Oral" , 0x04E215 },
- { "Asia/Phnom_Penh" , 0x04E67C },
- { "Asia/Pontianak" , 0x04E754 },
- { "Asia/Pyongyang" , 0x04E8EC },
- { "Asia/Qatar" , 0x04EA0F },
- { "Asia/Qyzylorda" , 0x04EAEC },
- { "Asia/Rangoon" , 0x04EF52 },
- { "Asia/Riyadh" , 0x04F07B },
- { "Asia/Saigon" , 0x04F132 },
- { "Asia/Sakhalin" , 0x04F2B3 },
- { "Asia/Samarkand" , 0x04F7A5 },
- { "Asia/Seoul" , 0x04FA73 },
- { "Asia/Shanghai" , 0x04FCBA },
- { "Asia/Singapore" , 0x04FE70 },
- { "Asia/Srednekolymsk" , 0x050028 },
- { "Asia/Taipei" , 0x050528 },
- { "Asia/Tashkent" , 0x050854 },
- { "Asia/Tbilisi" , 0x050B18 },
- { "Asia/Tehran" , 0x050F9A },
- { "Asia/Tel_Aviv" , 0x051623 },
- { "Asia/Thimbu" , 0x051F08 },
- { "Asia/Thimphu" , 0x051FE5 },
- { "Asia/Tokyo" , 0x0520C2 },
- { "Asia/Ujung_Pandang" , 0x052231 },
- { "Asia/Ulaanbaatar" , 0x052355 },
- { "Asia/Ulan_Bator" , 0x052958 },
- { "Asia/Urumqi" , 0x052F4D },
- { "Asia/Ust-Nera" , 0x053011 },
- { "Asia/Vientiane" , 0x053541 },
- { "Asia/Vladivostok" , 0x053619 },
- { "Asia/Yakutsk" , 0x053B06 },
- { "Asia/Yekaterinburg" , 0x053FF2 },
- { "Asia/Yerevan" , 0x054545 },
- { "Atlantic/Azores" , 0x054A4E },
- { "Atlantic/Bermuda" , 0x055800 },
- { "Atlantic/Canary" , 0x055FE0 },
- { "Atlantic/Cape_Verde" , 0x056773 },
- { "Atlantic/Faeroe" , 0x05687D },
- { "Atlantic/Faroe" , 0x056FAE },
- { "Atlantic/Jan_Mayen" , 0x0576DF },
- { "Atlantic/Madeira" , 0x057FB6 },
- { "Atlantic/Reykjavik" , 0x058D67 },
- { "Atlantic/South_Georgia" , 0x059219 },
- { "Atlantic/St_Helena" , 0x0597A3 },
- { "Atlantic/Stanley" , 0x0592B9 },
- { "Australia/ACT" , 0x059859 },
- { "Australia/Adelaide" , 0x05A114 },
- { "Australia/Brisbane" , 0x05A9ED },
- { "Australia/Broken_Hill" , 0x05ABD8 },
- { "Australia/Canberra" , 0x05B4E2 },
- { "Australia/Currie" , 0x05BD9D },
- { "Australia/Darwin" , 0x05C66E },
- { "Australia/Eucla" , 0x05C7CF },
- { "Australia/Hobart" , 0x05C9E0 },
- { "Australia/LHI" , 0x05D324 },
- { "Australia/Lindeman" , 0x05DA73 },
- { "Australia/Lord_Howe" , 0x05DCA5 },
- { "Australia/Melbourne" , 0x05E404 },
- { "Australia/North" , 0x05ECC7 },
- { "Australia/NSW" , 0x05EE16 },
- { "Australia/Perth" , 0x05F6D1 },
- { "Australia/Queensland" , 0x05F8DE },
- { "Australia/South" , 0x05FAAE },
- { "Australia/Sydney" , 0x060378 },
- { "Australia/Tasmania" , 0x060C53 },
- { "Australia/Victoria" , 0x06157E },
- { "Australia/West" , 0x061E39 },
- { "Australia/Yancowinna" , 0x062024 },
- { "Brazil/Acre" , 0x062912 },
- { "Brazil/DeNoronha" , 0x062BAE },
- { "Brazil/East" , 0x062E92 },
- { "Brazil/West" , 0x06367D },
- { "Canada/Atlantic" , 0x0638F1 },
- { "Canada/Central" , 0x06466B },
- { "Canada/East-Saskatchewan" , 0x065F7D },
- { "Canada/Eastern" , 0x0651C2 },
- { "Canada/Mountain" , 0x06636B },
- { "Canada/Newfoundland" , 0x066CD9 },
- { "Canada/Pacific" , 0x067B35 },
- { "Canada/Saskatchewan" , 0x068696 },
- { "Canada/Yukon" , 0x068A84 },
- { "CET" , 0x0692BD },
- { "Chile/Continental" , 0x069AFF },
- { "Chile/EasterIsland" , 0x06A27C },
- { "CST6CDT" , 0x06A8D6 },
- { "Cuba" , 0x06B1D8 },
- { "EET" , 0x06BB69 },
- { "Egypt" , 0x06C2C9 },
- { "Eire" , 0x06CA89 },
- { "EST" , 0x06D87C },
- { "EST5EDT" , 0x06D907 },
- { "Etc/GMT" , 0x06E209 },
- { "Etc/GMT+0" , 0x06E3AA },
- { "Etc/GMT+1" , 0x06E4C9 },
- { "Etc/GMT+10" , 0x06E5F4 },
- { "Etc/GMT+11" , 0x06E723 },
- { "Etc/GMT+12" , 0x06E852 },
- { "Etc/GMT+2" , 0x06EAAD },
- { "Etc/GMT+3" , 0x06EBD4 },
- { "Etc/GMT+4" , 0x06ECFB },
- { "Etc/GMT+5" , 0x06EE22 },
- { "Etc/GMT+6" , 0x06EF49 },
- { "Etc/GMT+7" , 0x06F070 },
- { "Etc/GMT+8" , 0x06F197 },
- { "Etc/GMT+9" , 0x06F2BE },
- { "Etc/GMT-0" , 0x06E31F },
- { "Etc/GMT-1" , 0x06E435 },
- { "Etc/GMT-10" , 0x06E55C },
- { "Etc/GMT-11" , 0x06E68B },
- { "Etc/GMT-12" , 0x06E7BA },
- { "Etc/GMT-13" , 0x06E8E9 },
- { "Etc/GMT-14" , 0x06E981 },
- { "Etc/GMT-2" , 0x06EA19 },
- { "Etc/GMT-3" , 0x06EB40 },
- { "Etc/GMT-4" , 0x06EC67 },
- { "Etc/GMT-5" , 0x06ED8E },
- { "Etc/GMT-6" , 0x06EEB5 },
- { "Etc/GMT-7" , 0x06EFDC },
- { "Etc/GMT-8" , 0x06F103 },
- { "Etc/GMT-9" , 0x06F22A },
- { "Etc/GMT0" , 0x06E294 },
- { "Etc/Greenwich" , 0x06F351 },
- { "Etc/UCT" , 0x06F3DC },
- { "Etc/Universal" , 0x06F467 },
- { "Etc/UTC" , 0x06F4F2 },
- { "Etc/Zulu" , 0x06F57D },
- { "Europe/Amsterdam" , 0x06F608 },
- { "Europe/Andorra" , 0x070193 },
- { "Europe/Athens" , 0x070876 },
- { "Europe/Belfast" , 0x071161 },
- { "Europe/Belgrade" , 0x071FD4 },
- { "Europe/Berlin" , 0x072785 },
- { "Europe/Bratislava" , 0x0730BE },
- { "Europe/Brussels" , 0x0739AA },
- { "Europe/Bucharest" , 0x074550 },
- { "Europe/Budapest" , 0x074E09 },
- { "Europe/Busingen" , 0x07577A },
- { "Europe/Chisinau" , 0x075F0C },
- { "Europe/Copenhagen" , 0x076899 },
- { "Europe/Dublin" , 0x077115 },
- { "Europe/Gibraltar" , 0x077F08 },
- { "Europe/Guernsey" , 0x078B09 },
- { "Europe/Helsinki" , 0x07997C },
- { "Europe/Isle_of_Man" , 0x07A0FD },
- { "Europe/Istanbul" , 0x07AF70 },
- { "Europe/Jersey" , 0x07BA37 },
- { "Europe/Kaliningrad" , 0x07C8AA },
- { "Europe/Kiev" , 0x07CEDB },
- { "Europe/Lisbon" , 0x07D726 },
- { "Europe/Ljubljana" , 0x07E4B7 },
- { "Europe/London" , 0x07EC68 },
- { "Europe/Luxembourg" , 0x07FADB },
- { "Europe/Madrid" , 0x080685 },
- { "Europe/Malta" , 0x0810D4 },
- { "Europe/Mariehamn" , 0x081B25 },
- { "Europe/Minsk" , 0x0822A6 },
- { "Europe/Monaco" , 0x08280A },
- { "Europe/Moscow" , 0x08339F },
- { "Europe/Nicosia" , 0x0839BA },
- { "Europe/Oslo" , 0x0841A6 },
- { "Europe/Paris" , 0x084A7D },
- { "Europe/Podgorica" , 0x085624 },
- { "Europe/Prague" , 0x085DD5 },
- { "Europe/Riga" , 0x0866C1 },
- { "Europe/Rome" , 0x086F88 },
- { "Europe/Samara" , 0x087A0A },
- { "Europe/San_Marino" , 0x087FC1 },
- { "Europe/Sarajevo" , 0x088A43 },
- { "Europe/Simferopol" , 0x0891F4 },
- { "Europe/Skopje" , 0x0897F2 },
- { "Europe/Sofia" , 0x089FA3 },
- { "Europe/Stockholm" , 0x08A801 },
- { "Europe/Tallinn" , 0x08AF8B },
- { "Europe/Tirane" , 0x08B830 },
- { "Europe/Tiraspol" , 0x08C06E },
- { "Europe/Uzhgorod" , 0x08C9FB },
- { "Europe/Vaduz" , 0x08D246 },
- { "Europe/Vatican" , 0x08D9D0 },
- { "Europe/Vienna" , 0x08E452 },
- { "Europe/Vilnius" , 0x08ED1B },
- { "Europe/Volgograd" , 0x08F5BE },
- { "Europe/Warsaw" , 0x08FB0E },
- { "Europe/Zagreb" , 0x0905AB },
- { "Europe/Zaporozhye" , 0x090D5C },
- { "Europe/Zurich" , 0x0915D5 },
- { "Factory" , 0x091D5F },
- { "GB" , 0x091E73 },
- { "GB-Eire" , 0x092CE6 },
- { "GMT" , 0x093B59 },
- { "GMT+0" , 0x093CFA },
- { "GMT-0" , 0x093C6F },
- { "GMT0" , 0x093BE4 },
- { "Greenwich" , 0x093D85 },
- { "Hongkong" , 0x093E10 },
- { "HST" , 0x0942C1 },
- { "Iceland" , 0x09434D },
- { "Indian/Antananarivo" , 0x0947FF },
- { "Indian/Chagos" , 0x094926 },
- { "Indian/Christmas" , 0x0949FB },
- { "Indian/Cocos" , 0x094A9C },
- { "Indian/Comoro" , 0x094B40 },
- { "Indian/Kerguelen" , 0x094C67 },
- { "Indian/Mahe" , 0x094D1E },
- { "Indian/Maldives" , 0x094DD5 },
- { "Indian/Mauritius" , 0x094EAD },
- { "Indian/Mayotte" , 0x094FB6 },
- { "Indian/Reunion" , 0x0950DD },
- { "Iran" , 0x095194 },
- { "Israel" , 0x09581D },
- { "Jamaica" , 0x096102 },
- { "Japan" , 0x096309 },
- { "Kwajalein" , 0x096478 },
- { "Libya" , 0x096571 },
- { "MET" , 0x09680C },
- { "Mexico/BajaNorte" , 0x09704E },
- { "Mexico/BajaSur" , 0x09798E },
- { "Mexico/General" , 0x097FB6 },
- { "MST" , 0x098614 },
- { "MST7MDT" , 0x09869F },
- { "Navajo" , 0x098FA1 },
- { "NZ" , 0x099942 },
- { "NZ-CHAT" , 0x09A2EA },
- { "Pacific/Apia" , 0x09AAFF },
- { "Pacific/Auckland" , 0x09AF59 },
- { "Pacific/Bougainville" , 0x09B90F },
- { "Pacific/Chatham" , 0x09BA3F },
- { "Pacific/Chuuk" , 0x09C263 },
- { "Pacific/Easter" , 0x09C31C },
- { "Pacific/Efate" , 0x09C983 },
- { "Pacific/Enderbury" , 0x09CB6D },
- { "Pacific/Fakaofo" , 0x09CC6E },
- { "Pacific/Fiji" , 0x09CD3F },
- { "Pacific/Funafuti" , 0x09D17D },
- { "Pacific/Galapagos" , 0x09D21F },
- { "Pacific/Gambier" , 0x09D30F },
- { "Pacific/Guadalcanal" , 0x09D3D7 },
- { "Pacific/Guam" , 0x09D48F },
- { "Pacific/Honolulu" , 0x09D57C },
- { "Pacific/Johnston" , 0x09D6A2 },
- { "Pacific/Kiritimati" , 0x09D7D0 },
- { "Pacific/Kosrae" , 0x09D8CE },
- { "Pacific/Kwajalein" , 0x09D9C6 },
- { "Pacific/Majuro" , 0x09DAC8 },
- { "Pacific/Marquesas" , 0x09DBA7 },
- { "Pacific/Midway" , 0x09DC74 },
- { "Pacific/Nauru" , 0x09DD9E },
- { "Pacific/Niue" , 0x09DEA8 },
- { "Pacific/Norfolk" , 0x09DF96 },
- { "Pacific/Noumea" , 0x09E072 },
- { "Pacific/Pago_Pago" , 0x09E1B8 },
- { "Pacific/Palau" , 0x09E2D4 },
- { "Pacific/Pitcairn" , 0x09E375 },
- { "Pacific/Pohnpei" , 0x09E44C },
- { "Pacific/Ponape" , 0x09E501 },
- { "Pacific/Port_Moresby" , 0x09E5A6 },
- { "Pacific/Rarotonga" , 0x09E66C },
- { "Pacific/Saipan" , 0x09E8B6 },
- { "Pacific/Samoa" , 0x09E9A3 },
- { "Pacific/Tahiti" , 0x09EABF },
- { "Pacific/Tarawa" , 0x09EB88 },
- { "Pacific/Tongatapu" , 0x09EC3C },
- { "Pacific/Truk" , 0x09ED9B },
- { "Pacific/Wake" , 0x09EE40 },
- { "Pacific/Wallis" , 0x09EEF0 },
- { "Pacific/Yap" , 0x09EF92 },
- { "Poland" , 0x09F037 },
- { "Portugal" , 0x09FAD4 },
- { "PRC" , 0x0A085D },
- { "PST8PDT" , 0x0A0A07 },
- { "ROC" , 0x0A1309 },
- { "ROK" , 0x0A1635 },
- { "Singapore" , 0x0A187C },
- { "Turkey" , 0x0A1A34 },
- { "UCT" , 0x0A24FB },
- { "Universal" , 0x0A2586 },
- { "US/Alaska" , 0x0A2611 },
- { "US/Aleutian" , 0x0A2F6D },
- { "US/Arizona" , 0x0A38B6 },
- { "US/Central" , 0x0A3A23 },
- { "US/East-Indiana" , 0x0A5615 },
- { "US/Eastern" , 0x0A4830 },
- { "US/Hawaii" , 0x0A5CAC },
- { "US/Indiana-Starke" , 0x0A5DCC },
- { "US/Michigan" , 0x0A675D },
- { "US/Mountain" , 0x0A7011 },
- { "US/Pacific" , 0x0A79B2 },
- { "US/Pacific-New" , 0x0A84DB },
- { "US/Samoa" , 0x0A9004 },
- { "UTC" , 0x0A9120 },
- { "W-SU" , 0x0A9908 },
- { "WET" , 0x0A91AB },
- { "Zulu" , 0x0A9F0C },
+ { "Africa/Ceuta" , 0x001DD0 },
+ { "Africa/Conakry" , 0x002606 },
+ { "Africa/Dakar" , 0x0026BC },
+ { "Africa/Dar_es_Salaam" , 0x002772 },
+ { "Africa/Djibouti" , 0x002899 },
+ { "Africa/Douala" , 0x0029C0 },
+ { "Africa/El_Aaiun" , 0x002A77 },
+ { "Africa/Freetown" , 0x003036 },
+ { "Africa/Gaborone" , 0x0030EC },
+ { "Africa/Harare" , 0x0031A3 },
+ { "Africa/Johannesburg" , 0x00325A },
+ { "Africa/Juba" , 0x003375 },
+ { "Africa/Kampala" , 0x00362C },
+ { "Africa/Khartoum" , 0x003753 },
+ { "Africa/Kigali" , 0x003A0A },
+ { "Africa/Kinshasa" , 0x003AC1 },
+ { "Africa/Lagos" , 0x003B8F },
+ { "Africa/Libreville" , 0x003C46 },
+ { "Africa/Lome" , 0x003CFD },
+ { "Africa/Luanda" , 0x003DB3 },
+ { "Africa/Lubumbashi" , 0x003E6A },
+ { "Africa/Lusaka" , 0x003F38 },
+ { "Africa/Malabo" , 0x003FEF },
+ { "Africa/Maputo" , 0x0040A6 },
+ { "Africa/Maseru" , 0x00415D },
+ { "Africa/Mbabane" , 0x004278 },
+ { "Africa/Mogadishu" , 0x004393 },
+ { "Africa/Monrovia" , 0x0044BA },
+ { "Africa/Nairobi" , 0x0045B7 },
+ { "Africa/Ndjamena" , 0x0046DE },
+ { "Africa/Niamey" , 0x0047CB },
+ { "Africa/Nouakchott" , 0x004882 },
+ { "Africa/Ouagadougou" , 0x004938 },
+ { "Africa/Porto-Novo" , 0x0049EE },
+ { "Africa/Sao_Tome" , 0x004AA5 },
+ { "Africa/Timbuktu" , 0x004B5B },
+ { "Africa/Tripoli" , 0x004C11 },
+ { "Africa/Tunis" , 0x004EAC },
+ { "Africa/Windhoek" , 0x00517E },
+ { "America/Adak" , 0x0057B8 },
+ { "America/Anchorage" , 0x006111 },
+ { "America/Anguilla" , 0x006A78 },
+ { "America/Antigua" , 0x006B2E },
+ { "America/Araguaina" , 0x006BE4 },
+ { "America/Argentina/Buenos_Aires" , 0x006F79 },
+ { "America/Argentina/Catamarca" , 0x0073D9 },
+ { "America/Argentina/ComodRivadavia" , 0x007869 },
+ { "America/Argentina/Cordoba" , 0x007CDE },
+ { "America/Argentina/Jujuy" , 0x008182 },
+ { "America/Argentina/La_Rioja" , 0x008611 },
+ { "America/Argentina/Mendoza" , 0x008AA1 },
+ { "America/Argentina/Rio_Gallegos" , 0x008F4E },
+ { "America/Argentina/Salta" , 0x0093D2 },
+ { "America/Argentina/San_Juan" , 0x00983B },
+ { "America/Argentina/San_Luis" , 0x009CCB },
+ { "America/Argentina/Tucuman" , 0x00A177 },
+ { "America/Argentina/Ushuaia" , 0x00A614 },
+ { "America/Aruba" , 0x00AA9E },
+ { "America/Asuncion" , 0x00AB7A },
+ { "America/Atikokan" , 0x00B394 },
+ { "America/Atka" , 0x00B53D },
+ { "America/Bahia" , 0x00BE86 },
+ { "America/Bahia_Banderas" , 0x00C2A3 },
+ { "America/Barbados" , 0x00C90B },
+ { "America/Belem" , 0x00CA6F },
+ { "America/Belize" , 0x00CCD4 },
+ { "America/Blanc-Sablon" , 0x00D0B0 },
+ { "America/Boa_Vista" , 0x00D222 },
+ { "America/Bogota" , 0x00D4B9 },
+ { "America/Boise" , 0x00D5C6 },
+ { "America/Buenos_Aires" , 0x00DF5E },
+ { "America/Cambridge_Bay" , 0x00E3A9 },
+ { "America/Campo_Grande" , 0x00EC03 },
+ { "America/Cancun" , 0x00F400 },
+ { "America/Caracas" , 0x00F760 },
+ { "America/Catamarca" , 0x00F876 },
+ { "America/Cayenne" , 0x00FCEB },
+ { "America/Cayman" , 0x00FDBF },
+ { "America/Chicago" , 0x010128 },
+ { "America/Chihuahua" , 0x010F41 },
+ { "America/Coral_Harbour" , 0x011574 },
+ { "America/Cordoba" , 0x0116D9 },
+ { "America/Costa_Rica" , 0x011B4E },
+ { "America/Creston" , 0x011CAF },
+ { "America/Cuiaba" , 0x011DD6 },
+ { "America/Curacao" , 0x0125B0 },
+ { "America/Danmarkshavn" , 0x01268C },
+ { "America/Dawson" , 0x012983 },
+ { "America/Dawson_Creek" , 0x0131D6 },
+ { "America/Denver" , 0x01364E },
+ { "America/Detroit" , 0x013FFC },
+ { "America/Dominica" , 0x0148D8 },
+ { "America/Edmonton" , 0x01498E },
+ { "America/Eirunepe" , 0x01533E },
+ { "America/El_Salvador" , 0x015600 },
+ { "America/Ensenada" , 0x015706 },
+ { "America/Fort_Wayne" , 0x016348 },
+ { "America/Fortaleza" , 0x016046 },
+ { "America/Glace_Bay" , 0x0169DF },
+ { "America/Godthab" , 0x0172D0 },
+ { "America/Goose_Bay" , 0x017A3F },
+ { "America/Grand_Turk" , 0x018707 },
+ { "America/Grenada" , 0x018C1A },
+ { "America/Guadeloupe" , 0x018CD0 },
+ { "America/Guatemala" , 0x018D86 },
+ { "America/Guayaquil" , 0x018EC4 },
+ { "America/Guyana" , 0x018FA3 },
+ { "America/Halifax" , 0x0190BD },
+ { "America/Havana" , 0x019E65 },
+ { "America/Hermosillo" , 0x01A7F6 },
+ { "America/Indiana/Indianapolis" , 0x01A9E7 },
+ { "America/Indiana/Knox" , 0x01B0A5 },
+ { "America/Indiana/Marengo" , 0x01BA5C },
+ { "America/Indiana/Petersburg" , 0x01C153 },
+ { "America/Indiana/Tell_City" , 0x01CF93 },
+ { "America/Indiana/Vevay" , 0x01D68B },
+ { "America/Indiana/Vincennes" , 0x01DC51 },
+ { "America/Indiana/Winamac" , 0x01E344 },
+ { "America/Indianapolis" , 0x01C8FC },
+ { "America/Inuvik" , 0x01EA72 },
+ { "America/Iqaluit" , 0x01F230 },
+ { "America/Jamaica" , 0x01FA66 },
+ { "America/Jujuy" , 0x01FC6D },
+ { "America/Juneau" , 0x0200F2 },
+ { "America/Kentucky/Louisville" , 0x020A56 },
+ { "America/Kentucky/Monticello" , 0x021568 },
+ { "America/Knox_IN" , 0x021ED3 },
+ { "America/Kralendijk" , 0x022864 },
+ { "America/La_Paz" , 0x022940 },
+ { "America/Lima" , 0x022A3F },
+ { "America/Los_Angeles" , 0x022BEC },
+ { "America/Louisville" , 0x023721 },
+ { "America/Lower_Princes" , 0x02420A },
+ { "America/Maceio" , 0x0242E6 },
+ { "America/Managua" , 0x0245F6 },
+ { "America/Manaus" , 0x0247D1 },
+ { "America/Marigot" , 0x024A4F },
+ { "America/Martinique" , 0x024B05 },
+ { "America/Matamoros" , 0x024C12 },
+ { "America/Mazatlan" , 0x0251F0 },
+ { "America/Mendoza" , 0x025840 },
+ { "America/Menominee" , 0x025CE1 },
+ { "America/Merida" , 0x02661F },
+ { "America/Metlakatla" , 0x026BFB },
+ { "America/Mexico_City" , 0x026F01 },
+ { "America/Miquelon" , 0x02757C },
+ { "America/Moncton" , 0x027C1C },
+ { "America/Monterrey" , 0x0288A0 },
+ { "America/Montevideo" , 0x028E88 },
+ { "America/Montreal" , 0x029704 },
+ { "America/Montserrat" , 0x02A4BF },
+ { "America/Nassau" , 0x02A575 },
+ { "America/New_York" , 0x02AE6D },
+ { "America/Nipigon" , 0x02BC5E },
+ { "America/Nome" , 0x02C508 },
+ { "America/Noronha" , 0x02CE75 },
+ { "America/North_Dakota/Beulah" , 0x02D169 },
+ { "America/North_Dakota/Center" , 0x02DAF5 },
+ { "America/North_Dakota/New_Salem" , 0x02E481 },
+ { "America/Ojinaga" , 0x02EE22 },
+ { "America/Panama" , 0x02F44B },
+ { "America/Pangnirtung" , 0x02F522 },
+ { "America/Paramaribo" , 0x02FD8D },
+ { "America/Phoenix" , 0x02FECD },
+ { "America/Port-au-Prince" , 0x03006A },
+ { "America/Port_of_Spain" , 0x0308DD },
+ { "America/Porto_Acre" , 0x030641 },
+ { "America/Porto_Velho" , 0x030993 },
+ { "America/Puerto_Rico" , 0x030BF3 },
+ { "America/Rainy_River" , 0x030CFE },
+ { "America/Rankin_Inlet" , 0x03158F },
+ { "America/Recife" , 0x031D43 },
+ { "America/Regina" , 0x032031 },
+ { "America/Resolute" , 0x032454 },
+ { "America/Rio_Branco" , 0x032C0A },
+ { "America/Rosario" , 0x032EAA },
+ { "America/Santa_Isabel" , 0x03331F },
+ { "America/Santarem" , 0x033C99 },
+ { "America/Santiago" , 0x033F1D },
+ { "America/Santo_Domingo" , 0x0346A8 },
+ { "America/Sao_Paulo" , 0x03489D },
+ { "America/Scoresbysund" , 0x0350BA },
+ { "America/Shiprock" , 0x03586A },
+ { "America/Sitka" , 0x03620B },
+ { "America/St_Barthelemy" , 0x036B6D },
+ { "America/St_Johns" , 0x036C23 },
+ { "America/St_Kitts" , 0x037AA7 },
+ { "America/St_Lucia" , 0x037B5D },
+ { "America/St_Thomas" , 0x037C13 },
+ { "America/St_Vincent" , 0x037CC9 },
+ { "America/Swift_Current" , 0x037D7F },
+ { "America/Tegucigalpa" , 0x037FF7 },
+ { "America/Thule" , 0x038119 },
+ { "America/Thunder_Bay" , 0x03872D },
+ { "America/Tijuana" , 0x038FFF },
+ { "America/Toronto" , 0x03996F },
+ { "America/Tortola" , 0x03A75A },
+ { "America/Vancouver" , 0x03A810 },
+ { "America/Virgin" , 0x03B395 },
+ { "America/Whitehorse" , 0x03B44B },
+ { "America/Winnipeg" , 0x03BC9E },
+ { "America/Yakutat" , 0x03C81B },
+ { "America/Yellowknife" , 0x03D154 },
+ { "Antarctica/Casey" , 0x03D949 },
+ { "Antarctica/Davis" , 0x03DA84 },
+ { "Antarctica/DumontDUrville" , 0x03DBCF },
+ { "Antarctica/Macquarie" , 0x03DCE3 },
+ { "Antarctica/Mawson" , 0x03E2F9 },
+ { "Antarctica/McMurdo" , 0x03E3EA },
+ { "Antarctica/Palmer" , 0x03EDBF },
+ { "Antarctica/Rothera" , 0x03F370 },
+ { "Antarctica/South_Pole" , 0x03F449 },
+ { "Antarctica/Syowa" , 0x03FDF1 },
+ { "Antarctica/Troll" , 0x03FEC3 },
+ { "Antarctica/Vostok" , 0x040376 },
+ { "Arctic/Longyearbyen" , 0x04044B },
+ { "Asia/Aden" , 0x040D22 },
+ { "Asia/Almaty" , 0x040DD9 },
+ { "Asia/Amman" , 0x04119B },
+ { "Asia/Anadyr" , 0x0418FC },
+ { "Asia/Aqtau" , 0x041DE8 },
+ { "Asia/Aqtobe" , 0x04229B },
+ { "Asia/Ashgabat" , 0x0426D2 },
+ { "Asia/Ashkhabad" , 0x04297D },
+ { "Asia/Baghdad" , 0x042C28 },
+ { "Asia/Bahrain" , 0x043010 },
+ { "Asia/Baku" , 0x0430ED },
+ { "Asia/Bangkok" , 0x04389D },
+ { "Asia/Beirut" , 0x043975 },
+ { "Asia/Bishkek" , 0x044200 },
+ { "Asia/Brunei" , 0x044631 },
+ { "Asia/Calcutta" , 0x044706 },
+ { "Asia/Chita" , 0x044835 },
+ { "Asia/Choibalsan" , 0x044D49 },
+ { "Asia/Chongqing" , 0x045398 },
+ { "Asia/Chungking" , 0x045542 },
+ { "Asia/Colombo" , 0x0456EC },
+ { "Asia/Dacca" , 0x04587D },
+ { "Asia/Damascus" , 0x045A0F },
+ { "Asia/Dhaka" , 0x04632B },
+ { "Asia/Dili" , 0x0464BD },
+ { "Asia/Dubai" , 0x0465FE },
+ { "Asia/Dushanbe" , 0x0466B5 },
+ { "Asia/Gaza" , 0x046924 },
+ { "Asia/Harbin" , 0x047244 },
+ { "Asia/Hebron" , 0x0473EE },
+ { "Asia/Ho_Chi_Minh" , 0x047D29 },
+ { "Asia/Hong_Kong" , 0x047EAA },
+ { "Asia/Hovd" , 0x04835B },
+ { "Asia/Irkutsk" , 0x04897B },
+ { "Asia/Istanbul" , 0x048E89 },
+ { "Asia/Jakarta" , 0x049950 },
+ { "Asia/Jayapura" , 0x049ADC },
+ { "Asia/Jerusalem" , 0x049C0A },
+ { "Asia/Kabul" , 0x04A4EF },
+ { "Asia/Kamchatka" , 0x04A5C2 },
+ { "Asia/Karachi" , 0x04AA9D },
+ { "Asia/Kashgar" , 0x04AC3C },
+ { "Asia/Kathmandu" , 0x04ACF3 },
+ { "Asia/Katmandu" , 0x04ADD3 },
+ { "Asia/Khandyga" , 0x04AEB3 },
+ { "Asia/Kolkata" , 0x04B40C },
+ { "Asia/Krasnoyarsk" , 0x04B53B },
+ { "Asia/Kuala_Lumpur" , 0x04BA2A },
+ { "Asia/Kuching" , 0x04BBD7 },
+ { "Asia/Kuwait" , 0x04BDF9 },
+ { "Asia/Macao" , 0x04BEB0 },
+ { "Asia/Macau" , 0x04C1D7 },
+ { "Asia/Magadan" , 0x04C4FE },
+ { "Asia/Makassar" , 0x04CA05 },
+ { "Asia/Manila" , 0x04CB71 },
+ { "Asia/Muscat" , 0x04CCE6 },
+ { "Asia/Nicosia" , 0x04CD9D },
+ { "Asia/Novokuznetsk" , 0x04D589 },
+ { "Asia/Novosibirsk" , 0x04DAA6 },
+ { "Asia/Omsk" , 0x04DF81 },
+ { "Asia/Oral" , 0x04E46F },
+ { "Asia/Phnom_Penh" , 0x04E8D6 },
+ { "Asia/Pontianak" , 0x04E9AE },
+ { "Asia/Pyongyang" , 0x04EB46 },
+ { "Asia/Qatar" , 0x04EC69 },
+ { "Asia/Qyzylorda" , 0x04ED46 },
+ { "Asia/Rangoon" , 0x04F1AC },
+ { "Asia/Riyadh" , 0x04F2D5 },
+ { "Asia/Saigon" , 0x04F38C },
+ { "Asia/Sakhalin" , 0x04F50D },
+ { "Asia/Samarkand" , 0x04F9FF },
+ { "Asia/Seoul" , 0x04FCCD },
+ { "Asia/Shanghai" , 0x04FF14 },
+ { "Asia/Singapore" , 0x0500CA },
+ { "Asia/Srednekolymsk" , 0x050282 },
+ { "Asia/Taipei" , 0x050782 },
+ { "Asia/Tashkent" , 0x050AAE },
+ { "Asia/Tbilisi" , 0x050D72 },
+ { "Asia/Tehran" , 0x0511F4 },
+ { "Asia/Tel_Aviv" , 0x05187D },
+ { "Asia/Thimbu" , 0x052162 },
+ { "Asia/Thimphu" , 0x05223F },
+ { "Asia/Tokyo" , 0x05231C },
+ { "Asia/Ujung_Pandang" , 0x05248B },
+ { "Asia/Ulaanbaatar" , 0x0525AF },
+ { "Asia/Ulan_Bator" , 0x052BB2 },
+ { "Asia/Urumqi" , 0x0531A7 },
+ { "Asia/Ust-Nera" , 0x05326B },
+ { "Asia/Vientiane" , 0x05379B },
+ { "Asia/Vladivostok" , 0x053873 },
+ { "Asia/Yakutsk" , 0x053D60 },
+ { "Asia/Yekaterinburg" , 0x05424C },
+ { "Asia/Yerevan" , 0x05479F },
+ { "Atlantic/Azores" , 0x054CA8 },
+ { "Atlantic/Bermuda" , 0x055A5A },
+ { "Atlantic/Canary" , 0x05623A },
+ { "Atlantic/Cape_Verde" , 0x0569CD },
+ { "Atlantic/Faeroe" , 0x056AD7 },
+ { "Atlantic/Faroe" , 0x057208 },
+ { "Atlantic/Jan_Mayen" , 0x057939 },
+ { "Atlantic/Madeira" , 0x058210 },
+ { "Atlantic/Reykjavik" , 0x058FC1 },
+ { "Atlantic/South_Georgia" , 0x059473 },
+ { "Atlantic/St_Helena" , 0x0599FD },
+ { "Atlantic/Stanley" , 0x059513 },
+ { "Australia/ACT" , 0x059AB3 },
+ { "Australia/Adelaide" , 0x05A36E },
+ { "Australia/Brisbane" , 0x05AC47 },
+ { "Australia/Broken_Hill" , 0x05AE32 },
+ { "Australia/Canberra" , 0x05B73C },
+ { "Australia/Currie" , 0x05BFF7 },
+ { "Australia/Darwin" , 0x05C8C8 },
+ { "Australia/Eucla" , 0x05CA29 },
+ { "Australia/Hobart" , 0x05CC3A },
+ { "Australia/LHI" , 0x05D57E },
+ { "Australia/Lindeman" , 0x05DCCD },
+ { "Australia/Lord_Howe" , 0x05DEFF },
+ { "Australia/Melbourne" , 0x05E65E },
+ { "Australia/North" , 0x05EF21 },
+ { "Australia/NSW" , 0x05F070 },
+ { "Australia/Perth" , 0x05F92B },
+ { "Australia/Queensland" , 0x05FB38 },
+ { "Australia/South" , 0x05FD08 },
+ { "Australia/Sydney" , 0x0605D2 },
+ { "Australia/Tasmania" , 0x060EAD },
+ { "Australia/Victoria" , 0x0617D8 },
+ { "Australia/West" , 0x062093 },
+ { "Australia/Yancowinna" , 0x06227E },
+ { "Brazil/Acre" , 0x062B6C },
+ { "Brazil/DeNoronha" , 0x062E08 },
+ { "Brazil/East" , 0x0630EC },
+ { "Brazil/West" , 0x0638D7 },
+ { "Canada/Atlantic" , 0x063B4B },
+ { "Canada/Central" , 0x0648C5 },
+ { "Canada/East-Saskatchewan" , 0x0661D7 },
+ { "Canada/Eastern" , 0x06541C },
+ { "Canada/Mountain" , 0x0665C5 },
+ { "Canada/Newfoundland" , 0x066F33 },
+ { "Canada/Pacific" , 0x067D8F },
+ { "Canada/Saskatchewan" , 0x0688F0 },
+ { "Canada/Yukon" , 0x068CDE },
+ { "CET" , 0x069517 },
+ { "Chile/Continental" , 0x069D59 },
+ { "Chile/EasterIsland" , 0x06A4D6 },
+ { "CST6CDT" , 0x06AB30 },
+ { "Cuba" , 0x06B432 },
+ { "EET" , 0x06BDC3 },
+ { "Egypt" , 0x06C523 },
+ { "Eire" , 0x06CCE3 },
+ { "EST" , 0x06DAD6 },
+ { "EST5EDT" , 0x06DB61 },
+ { "Etc/GMT" , 0x06E463 },
+ { "Etc/GMT+0" , 0x06E604 },
+ { "Etc/GMT+1" , 0x06E723 },
+ { "Etc/GMT+10" , 0x06E84E },
+ { "Etc/GMT+11" , 0x06E97D },
+ { "Etc/GMT+12" , 0x06EAAC },
+ { "Etc/GMT+2" , 0x06ED07 },
+ { "Etc/GMT+3" , 0x06EE2E },
+ { "Etc/GMT+4" , 0x06EF55 },
+ { "Etc/GMT+5" , 0x06F07C },
+ { "Etc/GMT+6" , 0x06F1A3 },
+ { "Etc/GMT+7" , 0x06F2CA },
+ { "Etc/GMT+8" , 0x06F3F1 },
+ { "Etc/GMT+9" , 0x06F518 },
+ { "Etc/GMT-0" , 0x06E579 },
+ { "Etc/GMT-1" , 0x06E68F },
+ { "Etc/GMT-10" , 0x06E7B6 },
+ { "Etc/GMT-11" , 0x06E8E5 },
+ { "Etc/GMT-12" , 0x06EA14 },
+ { "Etc/GMT-13" , 0x06EB43 },
+ { "Etc/GMT-14" , 0x06EBDB },
+ { "Etc/GMT-2" , 0x06EC73 },
+ { "Etc/GMT-3" , 0x06ED9A },
+ { "Etc/GMT-4" , 0x06EEC1 },
+ { "Etc/GMT-5" , 0x06EFE8 },
+ { "Etc/GMT-6" , 0x06F10F },
+ { "Etc/GMT-7" , 0x06F236 },
+ { "Etc/GMT-8" , 0x06F35D },
+ { "Etc/GMT-9" , 0x06F484 },
+ { "Etc/GMT0" , 0x06E4EE },
+ { "Etc/Greenwich" , 0x06F5AB },
+ { "Etc/UCT" , 0x06F636 },
+ { "Etc/Universal" , 0x06F6C1 },
+ { "Etc/UTC" , 0x06F74C },
+ { "Etc/Zulu" , 0x06F7D7 },
+ { "Europe/Amsterdam" , 0x06F862 },
+ { "Europe/Andorra" , 0x0703ED },
+ { "Europe/Athens" , 0x070AD0 },
+ { "Europe/Belfast" , 0x0713BB },
+ { "Europe/Belgrade" , 0x07222E },
+ { "Europe/Berlin" , 0x0729DF },
+ { "Europe/Bratislava" , 0x073318 },
+ { "Europe/Brussels" , 0x073C04 },
+ { "Europe/Bucharest" , 0x0747AA },
+ { "Europe/Budapest" , 0x075063 },
+ { "Europe/Busingen" , 0x0759D4 },
+ { "Europe/Chisinau" , 0x076166 },
+ { "Europe/Copenhagen" , 0x076AF3 },
+ { "Europe/Dublin" , 0x07736F },
+ { "Europe/Gibraltar" , 0x078162 },
+ { "Europe/Guernsey" , 0x078D63 },
+ { "Europe/Helsinki" , 0x079BD6 },
+ { "Europe/Isle_of_Man" , 0x07A357 },
+ { "Europe/Istanbul" , 0x07B1CA },
+ { "Europe/Jersey" , 0x07BC91 },
+ { "Europe/Kaliningrad" , 0x07CB04 },
+ { "Europe/Kiev" , 0x07D135 },
+ { "Europe/Lisbon" , 0x07D980 },
+ { "Europe/Ljubljana" , 0x07E711 },
+ { "Europe/London" , 0x07EEC2 },
+ { "Europe/Luxembourg" , 0x07FD35 },
+ { "Europe/Madrid" , 0x0808DF },
+ { "Europe/Malta" , 0x08132E },
+ { "Europe/Mariehamn" , 0x081D7F },
+ { "Europe/Minsk" , 0x082500 },
+ { "Europe/Monaco" , 0x082A64 },
+ { "Europe/Moscow" , 0x0835F9 },
+ { "Europe/Nicosia" , 0x083C14 },
+ { "Europe/Oslo" , 0x084400 },
+ { "Europe/Paris" , 0x084CD7 },
+ { "Europe/Podgorica" , 0x08587E },
+ { "Europe/Prague" , 0x08602F },
+ { "Europe/Riga" , 0x08691B },
+ { "Europe/Rome" , 0x0871E2 },
+ { "Europe/Samara" , 0x087C64 },
+ { "Europe/San_Marino" , 0x08821B },
+ { "Europe/Sarajevo" , 0x088C9D },
+ { "Europe/Simferopol" , 0x08944E },
+ { "Europe/Skopje" , 0x089A4C },
+ { "Europe/Sofia" , 0x08A1FD },
+ { "Europe/Stockholm" , 0x08AA5B },
+ { "Europe/Tallinn" , 0x08B1E5 },
+ { "Europe/Tirane" , 0x08BA8A },
+ { "Europe/Tiraspol" , 0x08C2C8 },
+ { "Europe/Uzhgorod" , 0x08CC55 },
+ { "Europe/Vaduz" , 0x08D4A0 },
+ { "Europe/Vatican" , 0x08DC2A },
+ { "Europe/Vienna" , 0x08E6AC },
+ { "Europe/Vilnius" , 0x08EF75 },
+ { "Europe/Volgograd" , 0x08F818 },
+ { "Europe/Warsaw" , 0x08FD68 },
+ { "Europe/Zagreb" , 0x090805 },
+ { "Europe/Zaporozhye" , 0x090FB6 },
+ { "Europe/Zurich" , 0x09182F },
+ { "Factory" , 0x091FB9 },
+ { "GB" , 0x0920CD },
+ { "GB-Eire" , 0x092F40 },
+ { "GMT" , 0x093DB3 },
+ { "GMT+0" , 0x093F54 },
+ { "GMT-0" , 0x093EC9 },
+ { "GMT0" , 0x093E3E },
+ { "Greenwich" , 0x093FDF },
+ { "Hongkong" , 0x09406A },
+ { "HST" , 0x09451B },
+ { "Iceland" , 0x0945A7 },
+ { "Indian/Antananarivo" , 0x094A59 },
+ { "Indian/Chagos" , 0x094B80 },
+ { "Indian/Christmas" , 0x094C55 },
+ { "Indian/Cocos" , 0x094CF6 },
+ { "Indian/Comoro" , 0x094D9A },
+ { "Indian/Kerguelen" , 0x094EC1 },
+ { "Indian/Mahe" , 0x094F78 },
+ { "Indian/Maldives" , 0x09502F },
+ { "Indian/Mauritius" , 0x095107 },
+ { "Indian/Mayotte" , 0x095210 },
+ { "Indian/Reunion" , 0x095337 },
+ { "Iran" , 0x0953EE },
+ { "Israel" , 0x095A77 },
+ { "Jamaica" , 0x09635C },
+ { "Japan" , 0x096563 },
+ { "Kwajalein" , 0x0966D2 },
+ { "Libya" , 0x0967CB },
+ { "MET" , 0x096A66 },
+ { "Mexico/BajaNorte" , 0x0972A8 },
+ { "Mexico/BajaSur" , 0x097BE8 },
+ { "Mexico/General" , 0x098210 },
+ { "MST" , 0x09886E },
+ { "MST7MDT" , 0x0988F9 },
+ { "Navajo" , 0x0991FB },
+ { "NZ" , 0x099B9C },
+ { "NZ-CHAT" , 0x09A544 },
+ { "Pacific/Apia" , 0x09AD59 },
+ { "Pacific/Auckland" , 0x09B1B3 },
+ { "Pacific/Bougainville" , 0x09BB69 },
+ { "Pacific/Chatham" , 0x09BC99 },
+ { "Pacific/Chuuk" , 0x09C4BD },
+ { "Pacific/Easter" , 0x09C576 },
+ { "Pacific/Efate" , 0x09CBDD },
+ { "Pacific/Enderbury" , 0x09CDC7 },
+ { "Pacific/Fakaofo" , 0x09CEC8 },
+ { "Pacific/Fiji" , 0x09CF99 },
+ { "Pacific/Funafuti" , 0x09D3D7 },
+ { "Pacific/Galapagos" , 0x09D479 },
+ { "Pacific/Gambier" , 0x09D569 },
+ { "Pacific/Guadalcanal" , 0x09D631 },
+ { "Pacific/Guam" , 0x09D6E9 },
+ { "Pacific/Honolulu" , 0x09D7D6 },
+ { "Pacific/Johnston" , 0x09D8FC },
+ { "Pacific/Kiritimati" , 0x09DA2A },
+ { "Pacific/Kosrae" , 0x09DB28 },
+ { "Pacific/Kwajalein" , 0x09DC20 },
+ { "Pacific/Majuro" , 0x09DD22 },
+ { "Pacific/Marquesas" , 0x09DE01 },
+ { "Pacific/Midway" , 0x09DECE },
+ { "Pacific/Nauru" , 0x09DFF8 },
+ { "Pacific/Niue" , 0x09E102 },
+ { "Pacific/Norfolk" , 0x09E1F0 },
+ { "Pacific/Noumea" , 0x09E2CC },
+ { "Pacific/Pago_Pago" , 0x09E412 },
+ { "Pacific/Palau" , 0x09E52E },
+ { "Pacific/Pitcairn" , 0x09E5CF },
+ { "Pacific/Pohnpei" , 0x09E6A6 },
+ { "Pacific/Ponape" , 0x09E75B },
+ { "Pacific/Port_Moresby" , 0x09E800 },
+ { "Pacific/Rarotonga" , 0x09E8C6 },
+ { "Pacific/Saipan" , 0x09EB10 },
+ { "Pacific/Samoa" , 0x09EBFD },
+ { "Pacific/Tahiti" , 0x09ED19 },
+ { "Pacific/Tarawa" , 0x09EDE2 },
+ { "Pacific/Tongatapu" , 0x09EE96 },
+ { "Pacific/Truk" , 0x09EFF5 },
+ { "Pacific/Wake" , 0x09F09A },
+ { "Pacific/Wallis" , 0x09F14A },
+ { "Pacific/Yap" , 0x09F1EC },
+ { "Poland" , 0x09F291 },
+ { "Portugal" , 0x09FD2E },
+ { "PRC" , 0x0A0AB7 },
+ { "PST8PDT" , 0x0A0C61 },
+ { "ROC" , 0x0A1563 },
+ { "ROK" , 0x0A188F },
+ { "Singapore" , 0x0A1AD6 },
+ { "Turkey" , 0x0A1C8E },
+ { "UCT" , 0x0A2755 },
+ { "Universal" , 0x0A27E0 },
+ { "US/Alaska" , 0x0A286B },
+ { "US/Aleutian" , 0x0A31C7 },
+ { "US/Arizona" , 0x0A3B10 },
+ { "US/Central" , 0x0A3C7D },
+ { "US/East-Indiana" , 0x0A586F },
+ { "US/Eastern" , 0x0A4A8A },
+ { "US/Hawaii" , 0x0A5F06 },
+ { "US/Indiana-Starke" , 0x0A6026 },
+ { "US/Michigan" , 0x0A69B7 },
+ { "US/Mountain" , 0x0A726B },
+ { "US/Pacific" , 0x0A7C0C },
+ { "US/Pacific-New" , 0x0A8735 },
+ { "US/Samoa" , 0x0A925E },
+ { "UTC" , 0x0A937A },
+ { "W-SU" , 0x0A9B62 },
+ { "WET" , 0x0A9405 },
+ { "Zulu" , 0x0AA166 },
};
/* This is a generated file, do not modify */
-const unsigned char timelib_timezone_db_data_builtin[696215] = {
+const unsigned char timelib_timezone_db_data_builtin[696817] = {
/* Africa/Abidjan */
@@ -1001,7 +1001,7 @@ const unsigned char timelib_timezone_db_data_builtin[696215] = {
/* Africa/Casablanca */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0x80, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0x80, 0x00, 0x00, 0x00,
0x96, 0x51, 0xF9, 0x9C, 0xC6, 0xFF, 0x14, 0x80, 0xC7, 0x58, 0xAC, 0x70, 0xC7, 0xD9, 0xED, 0x80,
0xD2, 0xA1, 0x32, 0xF0, 0xDB, 0x35, 0xA4, 0x00, 0xDB, 0xEE, 0x27, 0xF0, 0xFB, 0x25, 0x72, 0x40,
0xFB, 0xC2, 0xEF, 0x70, 0x08, 0x6B, 0x84, 0x80, 0x08, 0xC6, 0x6D, 0xF0, 0x0B, 0xE8, 0x0C, 0x00,
@@ -1012,98 +1012,96 @@ const unsigned char timelib_timezone_db_data_builtin[696215] = {
0x50, 0x08, 0xBB, 0xA0, 0x50, 0x31, 0x9A, 0x20, 0x50, 0x67, 0xA7, 0xA0, 0x51, 0x7C, 0x82, 0xA0,
0x51, 0xD8, 0xCB, 0xA0, 0x52, 0x05, 0x9E, 0xA0, 0x52, 0x6C, 0x73, 0xA0, 0x53, 0x37, 0x7A, 0xA0,
0x53, 0xAE, 0x21, 0xA0, 0x53, 0xDC, 0x46, 0x20, 0x54, 0x4C, 0x55, 0xA0, 0x55, 0x17, 0x5C, 0xA0,
-0x55, 0x7B, 0x8E, 0xA0, 0x55, 0xA9, 0xB3, 0x20, 0x56, 0x2C, 0x37, 0xA0, 0x56, 0xF7, 0x3E, 0xA0,
-0x57, 0x52, 0x36, 0x20, 0x57, 0x80, 0x5A, 0xA0, 0x58, 0x15, 0x54, 0x20, 0x58, 0xD7, 0x20, 0xA0,
-0x59, 0x1F, 0xA3, 0x20, 0x59, 0x57, 0x02, 0x20, 0x59, 0xF5, 0x36, 0x20, 0x5A, 0xB7, 0x02, 0xA0,
-0x5A, 0xF6, 0x4A, 0xA0, 0x5B, 0x24, 0x6F, 0x20, 0x5B, 0xD5, 0x18, 0x20, 0x5C, 0xA0, 0x1F, 0x20,
-0x5C, 0xCC, 0xF2, 0x20, 0x5C, 0xFB, 0x16, 0xA0, 0x5D, 0xB4, 0xFA, 0x20, 0x5E, 0x80, 0x01, 0x20,
-0x5E, 0x9A, 0x5F, 0x20, 0x5E, 0xD1, 0xBE, 0x20, 0x5F, 0x94, 0xDC, 0x20, 0x60, 0x5F, 0xE3, 0x20,
-0x60, 0x71, 0x06, 0xA0, 0x60, 0x9F, 0x2B, 0x20, 0x61, 0x7D, 0xF8, 0xA0, 0x62, 0x3F, 0xC5, 0x20,
-0x62, 0x47, 0xAE, 0x20, 0x62, 0x75, 0xD2, 0xA0, 0x63, 0x5D, 0xDA, 0xA0, 0x64, 0x43, 0x3F, 0xA0,
-0x65, 0x3D, 0xBC, 0xA0, 0x66, 0x19, 0xE7, 0x20, 0x67, 0x1D, 0x9E, 0xA0, 0x67, 0xF0, 0x8E, 0xA0,
-0x68, 0xFD, 0x80, 0xA0, 0x69, 0xC8, 0x87, 0xA0, 0x6A, 0xDD, 0x62, 0xA0, 0x6B, 0xA8, 0x69, 0xA0,
-0x6C, 0xC6, 0x7F, 0x20, 0x6D, 0x88, 0x4B, 0xA0, 0x6E, 0xA6, 0x61, 0x20, 0x6F, 0x68, 0x2D, 0xA0,
-0x70, 0x86, 0x43, 0x20, 0x71, 0x51, 0x4A, 0x20, 0x72, 0x66, 0x25, 0x20, 0x73, 0x31, 0x2C, 0x20,
-0x74, 0x46, 0x07, 0x20, 0x75, 0x11, 0x0E, 0x20, 0x76, 0x2F, 0x23, 0xA0, 0x76, 0xF0, 0xF0, 0x20,
-0x78, 0x0F, 0x05, 0xA0, 0x78, 0xD0, 0xD2, 0x20, 0x79, 0xEE, 0xE7, 0xA0, 0x7A, 0xB0, 0xB4, 0x20,
-0x7B, 0xCD, 0x78, 0x20, 0x7C, 0x99, 0xD0, 0xA0, 0x7D, 0xA4, 0x1F, 0xA0, 0x7E, 0x79, 0xB2, 0xA0,
-0x7F, 0x7A, 0xC7, 0x20, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xF8, 0xE4, 0x00, 0x00,
-0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10,
-0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54,
-0x00, 0x57, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0x51, 0xF9, 0x9C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC6, 0xFF, 0x14, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xAC, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC7, 0xD9, 0xED, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xA1, 0x32, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xDB, 0x35, 0xA4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xEE, 0x27, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFB, 0x25, 0x72, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC2, 0xEF, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x08, 0x6B, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0xC6, 0x6D, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x0B, 0xE8, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x61, 0x47, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x0D, 0xC9, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8E, 0xF2, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x0F, 0xD3, 0x51, 0x80, 0x00, 0x00, 0x00, 0x00, 0x10, 0x27, 0xA3, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x1A, 0xB7, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x18, 0x6F, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x48, 0x41, 0xE6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x48, 0xBB, 0x22, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x4A, 0x23, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0x8D, 0xD5, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x4B, 0xDC, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x5D, 0xE5, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x4D, 0x97, 0xB8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x34, 0x8C, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x4F, 0x9C, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x08, 0xBB, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x50, 0x31, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x50, 0x67, 0xA7, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x51, 0x7C, 0x82, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x51, 0xD8, 0xCB, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x52, 0x05, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x73, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x53, 0x37, 0x7A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xAE, 0x21, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x53, 0xDC, 0x46, 0x20, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x55, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x55, 0x17, 0x5C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x55, 0x7B, 0x8E, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x55, 0xA9, 0xB3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x37, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x56, 0xF7, 0x3E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x57, 0x52, 0x36, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x57, 0x80, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x54, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x58, 0xD7, 0x20, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x59, 0x1F, 0xA3, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x59, 0x57, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x36, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x5A, 0xB7, 0x02, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xF6, 0x4A, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x5B, 0x24, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x18, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x5C, 0xA0, 0x1F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xCC, 0xF2, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x5C, 0xFB, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xFA, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x5E, 0x80, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x9A, 0x5F, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x5E, 0xD1, 0xBE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xDC, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x60, 0x5F, 0xE3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x71, 0x06, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x60, 0x9F, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xF8, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x62, 0x3F, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x62, 0x47, 0xAE, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x62, 0x75, 0xD2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xDA, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x64, 0x43, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xBC, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x66, 0x19, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x9E, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x67, 0xF0, 0x8E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x80, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x69, 0xC8, 0x87, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x62, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x6B, 0xA8, 0x69, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x7F, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x6D, 0x88, 0x4B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x61, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x6F, 0x68, 0x2D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x43, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x71, 0x51, 0x4A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x25, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x73, 0x31, 0x2C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x46, 0x07, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x75, 0x11, 0x0E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x23, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x76, 0xF0, 0xF0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0F, 0x05, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x78, 0xD0, 0xD2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xE7, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x7A, 0xB0, 0xB4, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCD, 0x78, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x7C, 0x99, 0xD0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA4, 0x1F, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x7E, 0x79, 0xB2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7A, 0xC7, 0x20, 0x00,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xF8, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x01,
-0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00,
-0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57,
-0x45, 0x54, 0x30, 0x57, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D,
-0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xBC, 0xAC, 0xC8, 0x01, 0x07, 0x16,
-0x42, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x7C, 0xE0, 0x20, 0x55, 0xAB, 0x04, 0xA0, 0x56, 0x2C, 0x37, 0xA0, 0x56, 0xF7, 0x3E, 0xA0,
+0x57, 0x53, 0x87, 0xA0, 0x57, 0x81, 0xAC, 0x20, 0x58, 0x15, 0x54, 0x20, 0x58, 0xD7, 0x20, 0xA0,
+0x59, 0x20, 0xF4, 0xA0, 0x59, 0x58, 0x53, 0xA0, 0x59, 0xF5, 0x36, 0x20, 0x5A, 0xB7, 0x02, 0xA0,
+0x5A, 0xF7, 0x9C, 0x20, 0x5B, 0x25, 0xC0, 0xA0, 0x5B, 0xD5, 0x18, 0x20, 0x5C, 0xA0, 0x1F, 0x20,
+0x5C, 0xCE, 0x43, 0xA0, 0x5C, 0xFC, 0x68, 0x20, 0x5D, 0xB4, 0xFA, 0x20, 0x5E, 0x80, 0x01, 0x20,
+0x5E, 0x9B, 0xB0, 0xA0, 0x5E, 0xC9, 0xD5, 0x20, 0x5F, 0x94, 0xDC, 0x20, 0x60, 0x5F, 0xE3, 0x20,
+0x60, 0x72, 0x58, 0x20, 0x60, 0xA0, 0x7C, 0xA0, 0x61, 0x7D, 0xF8, 0xA0, 0x62, 0x77, 0x24, 0x20,
+0x63, 0x5D, 0xDA, 0xA0, 0x64, 0x44, 0x91, 0x20, 0x65, 0x3D, 0xBC, 0xA0, 0x66, 0x1B, 0x38, 0xA0,
+0x67, 0x1D, 0x9E, 0xA0, 0x67, 0xF1, 0xE0, 0x20, 0x68, 0xFD, 0x80, 0xA0, 0x69, 0xC8, 0x87, 0xA0,
+0x6A, 0xDD, 0x62, 0xA0, 0x6B, 0xA8, 0x69, 0xA0, 0x6C, 0xC6, 0x7F, 0x20, 0x6D, 0x88, 0x4B, 0xA0,
+0x6E, 0xA6, 0x61, 0x20, 0x6F, 0x68, 0x2D, 0xA0, 0x70, 0x86, 0x43, 0x20, 0x71, 0x51, 0x4A, 0x20,
+0x72, 0x66, 0x25, 0x20, 0x73, 0x31, 0x2C, 0x20, 0x74, 0x46, 0x07, 0x20, 0x75, 0x11, 0x0E, 0x20,
+0x76, 0x2F, 0x23, 0xA0, 0x76, 0xF0, 0xF0, 0x20, 0x78, 0x0F, 0x05, 0xA0, 0x78, 0xD0, 0xD2, 0x20,
+0x79, 0xEE, 0xE7, 0xA0, 0x7A, 0xB0, 0xB4, 0x20, 0x7B, 0xCE, 0xC9, 0xA0, 0x7C, 0x99, 0xD0, 0xA0,
+0x7D, 0xA5, 0x71, 0x20, 0x7E, 0x79, 0xB2, 0xA0, 0x7F, 0x72, 0xDE, 0x20, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0xFF, 0xFF, 0xF8, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x4C, 0x4D,
+0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
+0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
+0xFF, 0x96, 0x51, 0xF9, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0xFF, 0x14, 0x80, 0xFF, 0xFF, 0xFF,
+0xFF, 0xC7, 0x58, 0xAC, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xD9, 0xED, 0x80, 0xFF, 0xFF, 0xFF,
+0xFF, 0xD2, 0xA1, 0x32, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0x35, 0xA4, 0x00, 0xFF, 0xFF, 0xFF,
+0xFF, 0xDB, 0xEE, 0x27, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0x25, 0x72, 0x40, 0xFF, 0xFF, 0xFF,
+0xFF, 0xFB, 0xC2, 0xEF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x08, 0x6B, 0x84, 0x80, 0x00, 0x00, 0x00,
+0x00, 0x08, 0xC6, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE8, 0x0C, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x0C, 0x61, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC9, 0x3F, 0x80, 0x00, 0x00, 0x00,
+0x00, 0x0E, 0x8E, 0xF2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xD3, 0x51, 0x80, 0x00, 0x00, 0x00,
+0x00, 0x10, 0x27, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xB7, 0xA6, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x1E, 0x18, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0xE6, 0x80, 0x00, 0x00, 0x00,
+0x00, 0x48, 0xBB, 0x22, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4A, 0x23, 0x1A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x4A, 0x8D, 0xD5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xDC, 0xC0, 0x80, 0x00, 0x00, 0x00,
+0x00, 0x4C, 0x5D, 0xE5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0xB8, 0x80, 0x00, 0x00, 0x00,
+0x00, 0x4E, 0x34, 0x8C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x9C, 0xA0, 0xA0, 0x00, 0x00, 0x00,
+0x00, 0x50, 0x08, 0xBB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x31, 0x9A, 0x20, 0x00, 0x00, 0x00,
+0x00, 0x50, 0x67, 0xA7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x7C, 0x82, 0xA0, 0x00, 0x00, 0x00,
+0x00, 0x51, 0xD8, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x05, 0x9E, 0xA0, 0x00, 0x00, 0x00,
+0x00, 0x52, 0x6C, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x7A, 0xA0, 0x00, 0x00, 0x00,
+0x00, 0x53, 0xAE, 0x21, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xDC, 0x46, 0x20, 0x00, 0x00, 0x00,
+0x00, 0x54, 0x4C, 0x55, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x5C, 0xA0, 0x00, 0x00, 0x00,
+0x00, 0x55, 0x7C, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x55, 0xAB, 0x04, 0xA0, 0x00, 0x00, 0x00,
+0x00, 0x56, 0x2C, 0x37, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x3E, 0xA0, 0x00, 0x00, 0x00,
+0x00, 0x57, 0x53, 0x87, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x57, 0x81, 0xAC, 0x20, 0x00, 0x00, 0x00,
+0x00, 0x58, 0x15, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x20, 0xA0, 0x00, 0x00, 0x00,
+0x00, 0x59, 0x20, 0xF4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x59, 0x58, 0x53, 0xA0, 0x00, 0x00, 0x00,
+0x00, 0x59, 0xF5, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB7, 0x02, 0xA0, 0x00, 0x00, 0x00,
+0x00, 0x5A, 0xF7, 0x9C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0x25, 0xC0, 0xA0, 0x00, 0x00, 0x00,
+0x00, 0x5B, 0xD5, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x1F, 0x20, 0x00, 0x00, 0x00,
+0x00, 0x5C, 0xCE, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xFC, 0x68, 0x20, 0x00, 0x00, 0x00,
+0x00, 0x5D, 0xB4, 0xFA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x80, 0x01, 0x20, 0x00, 0x00, 0x00,
+0x00, 0x5E, 0x9B, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xC9, 0xD5, 0x20, 0x00, 0x00, 0x00,
+0x00, 0x5F, 0x94, 0xDC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xE3, 0x20, 0x00, 0x00, 0x00,
+0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0xA0, 0x7C, 0xA0, 0x00, 0x00, 0x00,
+0x00, 0x61, 0x7D, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x77, 0x24, 0x20, 0x00, 0x00, 0x00,
+0x00, 0x63, 0x5D, 0xDA, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x44, 0x91, 0x20, 0x00, 0x00, 0x00,
+0x00, 0x65, 0x3D, 0xBC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x66, 0x1B, 0x38, 0xA0, 0x00, 0x00, 0x00,
+0x00, 0x67, 0x1D, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0xE0, 0x20, 0x00, 0x00, 0x00,
+0x00, 0x68, 0xFD, 0x80, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x87, 0xA0, 0x00, 0x00, 0x00,
+0x00, 0x6A, 0xDD, 0x62, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x69, 0xA0, 0x00, 0x00, 0x00,
+0x00, 0x6C, 0xC6, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x4B, 0xA0, 0x00, 0x00, 0x00,
+0x00, 0x6E, 0xA6, 0x61, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x2D, 0xA0, 0x00, 0x00, 0x00,
+0x00, 0x70, 0x86, 0x43, 0x20, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x4A, 0x20, 0x00, 0x00, 0x00,
+0x00, 0x72, 0x66, 0x25, 0x20, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x2C, 0x20, 0x00, 0x00, 0x00,
+0x00, 0x74, 0x46, 0x07, 0x20, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x0E, 0x20, 0x00, 0x00, 0x00,
+0x00, 0x76, 0x2F, 0x23, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xF0, 0x20, 0x00, 0x00, 0x00,
+0x00, 0x78, 0x0F, 0x05, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xD2, 0x20, 0x00, 0x00, 0x00,
+0x00, 0x79, 0xEE, 0xE7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xB4, 0x20, 0x00, 0x00, 0x00,
+0x00, 0x7B, 0xCE, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xD0, 0xA0, 0x00, 0x00, 0x00,
+0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xB2, 0xA0, 0x00, 0x00, 0x00,
+0x00, 0x7F, 0x72, 0xDE, 0x20, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xF8, 0xE4, 0x00, 0x00, 0x00,
+0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x00,
+0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00,
+0x57, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x0A, 0x57, 0x45, 0x54, 0x30, 0x57, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35,
+0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xBC, 0xAC,
+0xC8, 0x01, 0x07, 0x16, 0x42, 0x00, 0x00, 0x00, 0x00,
/* Africa/Ceuta */
0x50, 0x48, 0x50, 0x32, 0x01, 0x45, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1326,7 +1324,7 @@ const unsigned char timelib_timezone_db_data_builtin[696215] = {
/* Africa/El_Aaiun */
0x50, 0x48, 0x50, 0x32, 0x01, 0x45, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x5B, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0x80, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0x80, 0x00, 0x00, 0x00,
0xBC, 0x48, 0xF0, 0xE0, 0x0B, 0xD1, 0xB0, 0x90, 0x0B, 0xE8, 0x0C, 0x00, 0x0C, 0x61, 0x47, 0xF0,
0x0D, 0xC9, 0x3F, 0x80, 0x0E, 0x8E, 0xF2, 0x70, 0x0F, 0xD3, 0x51, 0x80, 0x10, 0x27, 0xA3, 0x70,
0x48, 0x41, 0xE6, 0x80, 0x48, 0xBB, 0x22, 0x70, 0x4A, 0x23, 0x1A, 0x00, 0x4A, 0x8D, 0xD5, 0x70,
@@ -1334,90 +1332,88 @@ const unsigned char timelib_timezone_db_data_builtin[696215] = {
0x4F, 0x9C, 0xA0, 0xA0, 0x50, 0x08, 0xBB, 0xA0, 0x50, 0x31, 0x9A, 0x20, 0x50, 0x67, 0xA7, 0xA0,
0x51, 0x7C, 0x82, 0xA0, 0x51, 0xD8, 0xCB, 0xA0, 0x52, 0x05, 0x9E, 0xA0, 0x52, 0x6C, 0x73, 0xA0,
0x53, 0x37, 0x7A, 0xA0, 0x53, 0xAE, 0x21, 0xA0, 0x53, 0xDC, 0x46, 0x20, 0x54, 0x4C, 0x55, 0xA0,
-0x55, 0x17, 0x5C, 0xA0, 0x55, 0x7B, 0x8E, 0xA0, 0x55, 0xA9, 0xB3, 0x20, 0x56, 0x2C, 0x37, 0xA0,
-0x56, 0xF7, 0x3E, 0xA0, 0x57, 0x52, 0x36, 0x20, 0x57, 0x80, 0x5A, 0xA0, 0x58, 0x15, 0x54, 0x20,
-0x58, 0xD7, 0x20, 0xA0, 0x59, 0x1F, 0xA3, 0x20, 0x59, 0x57, 0x02, 0x20, 0x59, 0xF5, 0x36, 0x20,
-0x5A, 0xB7, 0x02, 0xA0, 0x5A, 0xF6, 0x4A, 0xA0, 0x5B, 0x24, 0x6F, 0x20, 0x5B, 0xD5, 0x18, 0x20,
-0x5C, 0xA0, 0x1F, 0x20, 0x5C, 0xCC, 0xF2, 0x20, 0x5C, 0xFB, 0x16, 0xA0, 0x5D, 0xB4, 0xFA, 0x20,
-0x5E, 0x80, 0x01, 0x20, 0x5E, 0x9A, 0x5F, 0x20, 0x5E, 0xD1, 0xBE, 0x20, 0x5F, 0x94, 0xDC, 0x20,
-0x60, 0x5F, 0xE3, 0x20, 0x60, 0x71, 0x06, 0xA0, 0x60, 0x9F, 0x2B, 0x20, 0x61, 0x7D, 0xF8, 0xA0,
-0x62, 0x3F, 0xC5, 0x20, 0x62, 0x47, 0xAE, 0x20, 0x62, 0x75, 0xD2, 0xA0, 0x63, 0x5D, 0xDA, 0xA0,
-0x64, 0x43, 0x3F, 0xA0, 0x65, 0x3D, 0xBC, 0xA0, 0x66, 0x19, 0xE7, 0x20, 0x67, 0x1D, 0x9E, 0xA0,
-0x67, 0xF0, 0x8E, 0xA0, 0x68, 0xFD, 0x80, 0xA0, 0x69, 0xC8, 0x87, 0xA0, 0x6A, 0xDD, 0x62, 0xA0,
-0x6B, 0xA8, 0x69, 0xA0, 0x6C, 0xC6, 0x7F, 0x20, 0x6D, 0x88, 0x4B, 0xA0, 0x6E, 0xA6, 0x61, 0x20,
-0x6F, 0x68, 0x2D, 0xA0, 0x70, 0x86, 0x43, 0x20, 0x71, 0x51, 0x4A, 0x20, 0x72, 0x66, 0x25, 0x20,
-0x73, 0x31, 0x2C, 0x20, 0x74, 0x46, 0x07, 0x20, 0x75, 0x11, 0x0E, 0x20, 0x76, 0x2F, 0x23, 0xA0,
-0x76, 0xF0, 0xF0, 0x20, 0x78, 0x0F, 0x05, 0xA0, 0x78, 0xD0, 0xD2, 0x20, 0x79, 0xEE, 0xE7, 0xA0,
-0x7A, 0xB0, 0xB4, 0x20, 0x7B, 0xCD, 0x78, 0x20, 0x7C, 0x99, 0xD0, 0xA0, 0x7D, 0xA4, 0x1F, 0xA0,
-0x7E, 0x79, 0xB2, 0xA0, 0x7F, 0x7A, 0xC7, 0x20, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0xFF, 0xFF, 0xF3, 0xA0, 0x00, 0x00, 0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x04, 0x00,
-0x00, 0x0E, 0x10, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x57,
-0x41, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11,
-0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0x48, 0xF0, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x0B, 0xD1, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE8, 0x0C, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0C, 0x61, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC9, 0x3F, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0x8E, 0xF2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xD3, 0x51, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x10, 0x27, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0xE6, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x48, 0xBB, 0x22, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4A, 0x23, 0x1A, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0x8D, 0xD5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xDC, 0xC0, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0x5D, 0xE5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0xB8, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0x34, 0x8C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x9C, 0xA0, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x08, 0xBB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x31, 0x9A, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x67, 0xA7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x7C, 0x82, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x51, 0xD8, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x05, 0x9E, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x7A, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x53, 0xAE, 0x21, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xDC, 0x46, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x55, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x5C, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x55, 0x7B, 0x8E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x55, 0xA9, 0xB3, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x37, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x3E, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x57, 0x52, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x57, 0x80, 0x5A, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x20, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x59, 0x1F, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0x57, 0x02, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB7, 0x02, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x5A, 0xF6, 0x4A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0x24, 0x6F, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x1F, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x5C, 0xCC, 0xF2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xFB, 0x16, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xFA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x80, 0x01, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x5E, 0x9A, 0x5F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xD1, 0xBE, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xDC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xE3, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x60, 0x71, 0x06, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x9F, 0x2B, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xC5, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x62, 0x47, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x62, 0x75, 0xD2, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xDA, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x43, 0x3F, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xBC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x66, 0x19, 0xE7, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF0, 0x8E, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x80, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x87, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x62, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x69, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x4B, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x61, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x2D, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x43, 0x20, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x4A, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x25, 0x20, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x2C, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x74, 0x46, 0x07, 0x20, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x0E, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x23, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xF0, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x78, 0x0F, 0x05, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xD2, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xE7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xB4, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x7B, 0xCD, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xD0, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x7D, 0xA4, 0x1F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xB2, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x7F, 0x7A, 0xC7, 0x20, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0xFF, 0xFF, 0xF3, 0xA0, 0x00, 0x00, 0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x04, 0x00,
-0x00, 0x0E, 0x10, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x57,
-0x41, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x45, 0x54, 0x30, 0x57, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33,
-0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00,
-0xB2, 0xC1, 0xB8, 0x00, 0xFE, 0x84, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x5C, 0xA0, 0x55, 0x7C, 0xE0, 0x20, 0x55, 0xAB, 0x04, 0xA0, 0x56, 0x2C, 0x37, 0xA0,
+0x56, 0xF7, 0x3E, 0xA0, 0x57, 0x53, 0x87, 0xA0, 0x57, 0x81, 0xAC, 0x20, 0x58, 0x15, 0x54, 0x20,
+0x58, 0xD7, 0x20, 0xA0, 0x59, 0x20, 0xF4, 0xA0, 0x59, 0x58, 0x53, 0xA0, 0x59, 0xF5, 0x36, 0x20,
+0x5A, 0xB7, 0x02, 0xA0, 0x5A, 0xF7, 0x9C, 0x20, 0x5B, 0x25, 0xC0, 0xA0, 0x5B, 0xD5, 0x18, 0x20,
+0x5C, 0xA0, 0x1F, 0x20, 0x5C, 0xCE, 0x43, 0xA0, 0x5C, 0xFC, 0x68, 0x20, 0x5D, 0xB4, 0xFA, 0x20,
+0x5E, 0x80, 0x01, 0x20, 0x5E, 0x9B, 0xB0, 0xA0, 0x5E, 0xC9, 0xD5, 0x20, 0x5F, 0x94, 0xDC, 0x20,
+0x60, 0x5F, 0xE3, 0x20, 0x60, 0x72, 0x58, 0x20, 0x60, 0xA0, 0x7C, 0xA0, 0x61, 0x7D, 0xF8, 0xA0,
+0x62, 0x77, 0x24, 0x20, 0x63, 0x5D, 0xDA, 0xA0, 0x64, 0x44, 0x91, 0x20, 0x65, 0x3D, 0xBC, 0xA0,
+0x66, 0x1B, 0x38, 0xA0, 0x67, 0x1D, 0x9E, 0xA0, 0x67, 0xF1, 0xE0, 0x20, 0x68, 0xFD, 0x80, 0xA0,
+0x69, 0xC8, 0x87, 0xA0, 0x6A, 0xDD, 0x62, 0xA0, 0x6B, 0xA8, 0x69, 0xA0, 0x6C, 0xC6, 0x7F, 0x20,
+0x6D, 0x88, 0x4B, 0xA0, 0x6E, 0xA6, 0x61, 0x20, 0x6F, 0x68, 0x2D, 0xA0, 0x70, 0x86, 0x43, 0x20,
+0x71, 0x51, 0x4A, 0x20, 0x72, 0x66, 0x25, 0x20, 0x73, 0x31, 0x2C, 0x20, 0x74, 0x46, 0x07, 0x20,
+0x75, 0x11, 0x0E, 0x20, 0x76, 0x2F, 0x23, 0xA0, 0x76, 0xF0, 0xF0, 0x20, 0x78, 0x0F, 0x05, 0xA0,
+0x78, 0xD0, 0xD2, 0x20, 0x79, 0xEE, 0xE7, 0xA0, 0x7A, 0xB0, 0xB4, 0x20, 0x7B, 0xCE, 0xC9, 0xA0,
+0x7C, 0x99, 0xD0, 0xA0, 0x7D, 0xA5, 0x71, 0x20, 0x7E, 0x79, 0xB2, 0xA0, 0x7F, 0x72, 0xDE, 0x20,
+0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0xFF, 0xFF, 0xF3, 0xA0, 0x00, 0x00, 0xFF,
+0xFF, 0xF1, 0xF0, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00,
+0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
+0xFF, 0xFF, 0xBC, 0x48, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xD1, 0xB0, 0x90, 0x00, 0x00,
+0x00, 0x00, 0x0B, 0xE8, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x61, 0x47, 0xF0, 0x00, 0x00,
+0x00, 0x00, 0x0D, 0xC9, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8E, 0xF2, 0x70, 0x00, 0x00,
+0x00, 0x00, 0x0F, 0xD3, 0x51, 0x80, 0x00, 0x00, 0x00, 0x00, 0x10, 0x27, 0xA3, 0x70, 0x00, 0x00,
+0x00, 0x00, 0x48, 0x41, 0xE6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x48, 0xBB, 0x22, 0x70, 0x00, 0x00,
+0x00, 0x00, 0x4A, 0x23, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0x8D, 0xD5, 0x70, 0x00, 0x00,
+0x00, 0x00, 0x4B, 0xDC, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x5D, 0xE5, 0x70, 0x00, 0x00,
+0x00, 0x00, 0x4D, 0x97, 0xB8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x34, 0x8C, 0xF0, 0x00, 0x00,
+0x00, 0x00, 0x4F, 0x9C, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x08, 0xBB, 0xA0, 0x00, 0x00,
+0x00, 0x00, 0x50, 0x31, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x50, 0x67, 0xA7, 0xA0, 0x00, 0x00,
+0x00, 0x00, 0x51, 0x7C, 0x82, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x51, 0xD8, 0xCB, 0xA0, 0x00, 0x00,
+0x00, 0x00, 0x52, 0x05, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x73, 0xA0, 0x00, 0x00,
+0x00, 0x00, 0x53, 0x37, 0x7A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xAE, 0x21, 0xA0, 0x00, 0x00,
+0x00, 0x00, 0x53, 0xDC, 0x46, 0x20, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x55, 0xA0, 0x00, 0x00,
+0x00, 0x00, 0x55, 0x17, 0x5C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x55, 0x7C, 0xE0, 0x20, 0x00, 0x00,
+0x00, 0x00, 0x55, 0xAB, 0x04, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x37, 0xA0, 0x00, 0x00,
+0x00, 0x00, 0x56, 0xF7, 0x3E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x57, 0x53, 0x87, 0xA0, 0x00, 0x00,
+0x00, 0x00, 0x57, 0x81, 0xAC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x54, 0x20, 0x00, 0x00,
+0x00, 0x00, 0x58, 0xD7, 0x20, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x59, 0x20, 0xF4, 0xA0, 0x00, 0x00,
+0x00, 0x00, 0x59, 0x58, 0x53, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x36, 0x20, 0x00, 0x00,
+0x00, 0x00, 0x5A, 0xB7, 0x02, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xF7, 0x9C, 0x20, 0x00, 0x00,
+0x00, 0x00, 0x5B, 0x25, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x18, 0x20, 0x00, 0x00,
+0x00, 0x00, 0x5C, 0xA0, 0x1F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xCE, 0x43, 0xA0, 0x00, 0x00,
+0x00, 0x00, 0x5C, 0xFC, 0x68, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xFA, 0x20, 0x00, 0x00,
+0x00, 0x00, 0x5E, 0x80, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x9B, 0xB0, 0xA0, 0x00, 0x00,
+0x00, 0x00, 0x5E, 0xC9, 0xD5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xDC, 0x20, 0x00, 0x00,
+0x00, 0x00, 0x60, 0x5F, 0xE3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00,
+0x00, 0x00, 0x60, 0xA0, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xF8, 0xA0, 0x00, 0x00,
+0x00, 0x00, 0x62, 0x77, 0x24, 0x20, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xDA, 0xA0, 0x00, 0x00,
+0x00, 0x00, 0x64, 0x44, 0x91, 0x20, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xBC, 0xA0, 0x00, 0x00,
+0x00, 0x00, 0x66, 0x1B, 0x38, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x9E, 0xA0, 0x00, 0x00,
+0x00, 0x00, 0x67, 0xF1, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x80, 0xA0, 0x00, 0x00,
+0x00, 0x00, 0x69, 0xC8, 0x87, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x62, 0xA0, 0x00, 0x00,
+0x00, 0x00, 0x6B, 0xA8, 0x69, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x7F, 0x20, 0x00, 0x00,
+0x00, 0x00, 0x6D, 0x88, 0x4B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x61, 0x20, 0x00, 0x00,
+0x00, 0x00, 0x6F, 0x68, 0x2D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x43, 0x20, 0x00, 0x00,
+0x00, 0x00, 0x71, 0x51, 0x4A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x25, 0x20, 0x00, 0x00,
+0x00, 0x00, 0x73, 0x31, 0x2C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x46, 0x07, 0x20, 0x00, 0x00,
+0x00, 0x00, 0x75, 0x11, 0x0E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x23, 0xA0, 0x00, 0x00,
+0x00, 0x00, 0x76, 0xF0, 0xF0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0F, 0x05, 0xA0, 0x00, 0x00,
+0x00, 0x00, 0x78, 0xD0, 0xD2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xE7, 0xA0, 0x00, 0x00,
+0x00, 0x00, 0x7A, 0xB0, 0xB4, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xC9, 0xA0, 0x00, 0x00,
+0x00, 0x00, 0x7C, 0x99, 0xD0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00,
+0x00, 0x00, 0x7E, 0x79, 0xB2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0xDE, 0x20, 0x00, 0x01,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0xFF, 0xFF, 0xF3, 0xA0, 0x00, 0x00, 0xFF, 0xFF, 0xF1,
+0xF0, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x4C,
+0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x45, 0x54, 0x30, 0x57, 0x45, 0x53,
+0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30,
+0x2F, 0x33, 0x0A, 0x00, 0xB2, 0xC1, 0xB8, 0x00, 0xFE, 0x84, 0x40, 0x00, 0x00, 0x00, 0x00,
/* Africa/Freetown */
0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -4886,19 +4882,60 @@ const unsigned char timelib_timezone_db_data_builtin[696215] = {
/* America/Cayman */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4B, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00,
-0x8B, 0xF4, 0x61, 0xE8, 0x01, 0x02, 0xFF, 0xFF, 0xB5, 0x70, 0x00, 0x00, 0xFF, 0xFF, 0xB5, 0x18,
-0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00,
-0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0x69, 0x87, 0x26, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x8B, 0xF4, 0x61, 0xE8, 0x00, 0x01,
-0x02, 0xFF, 0xFF, 0xB5, 0x70, 0x00, 0x00, 0xFF, 0xFF, 0xB5, 0x18, 0x00, 0x04, 0xFF, 0xFF, 0xB9,
-0xB0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x0A, 0x00, 0xA6, 0xC7, 0x50, 0x00,
-0x96, 0x7A, 0x22, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x2E, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x80, 0x00, 0x00, 0x00,
+0x93, 0x0F, 0xB4, 0xFF, 0x56, 0xE5, 0x0F, 0xF0, 0x58, 0x1E, 0xC6, 0xE0, 0x58, 0xC4, 0xF1, 0xF0,
+0x59, 0xFE, 0xA8, 0xE0, 0x5A, 0xA4, 0xD3, 0xF0, 0x5B, 0xDE, 0x8A, 0xE0, 0x5C, 0x84, 0xB5, 0xF0,
+0x5D, 0xBE, 0x6C, 0xE0, 0x5E, 0x64, 0x97, 0xF0, 0x5F, 0x9E, 0x4E, 0xE0, 0x60, 0x4D, 0xB4, 0x70,
+0x61, 0x87, 0x6B, 0x60, 0x62, 0x2D, 0x96, 0x70, 0x63, 0x67, 0x4D, 0x60, 0x64, 0x0D, 0x78, 0x70,
+0x65, 0x47, 0x2F, 0x60, 0x65, 0xED, 0x5A, 0x70, 0x67, 0x27, 0x11, 0x60, 0x67, 0xCD, 0x3C, 0x70,
+0x69, 0x06, 0xF3, 0x60, 0x69, 0xAD, 0x1E, 0x70, 0x6A, 0xE6, 0xD5, 0x60, 0x6B, 0x96, 0x3A, 0xF0,
+0x6C, 0xCF, 0xF1, 0xE0, 0x6D, 0x76, 0x1C, 0xF0, 0x6E, 0xAF, 0xD3, 0xE0, 0x6F, 0x55, 0xFE, 0xF0,
+0x70, 0x8F, 0xB5, 0xE0, 0x71, 0x35, 0xE0, 0xF0, 0x72, 0x6F, 0x97, 0xE0, 0x73, 0x15, 0xC2, 0xF0,
+0x74, 0x4F, 0x79, 0xE0, 0x74, 0xFE, 0xDF, 0x70, 0x76, 0x38, 0x96, 0x60, 0x76, 0xDE, 0xC1, 0x70,
+0x78, 0x18, 0x78, 0x60, 0x78, 0xBE, 0xA3, 0x70, 0x79, 0xF8, 0x5A, 0x60, 0x7A, 0x9E, 0x85, 0x70,
+0x7B, 0xD8, 0x3C, 0x60, 0x7C, 0x7E, 0x67, 0x70, 0x7D, 0xB8, 0x1E, 0x60, 0x7E, 0x5E, 0x49, 0x70,
+0x7F, 0x98, 0x00, 0x60, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0xFF, 0xFF, 0xB3, 0xB4, 0x00, 0x00, 0xFF, 0xFF, 0xB8, 0x01, 0x00, 0x04, 0xFF, 0xFF,
+0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x4D,
+0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x27, 0xCC, 0xFF, 0xFF,
+0xFF, 0xFF, 0x93, 0x0F, 0xB4, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00,
+0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00,
+0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00,
+0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00,
+0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00,
+0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00,
+0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x96, 0x70, 0x00, 0x00,
+0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x78, 0x70, 0x00, 0x00,
+0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x5A, 0x70, 0x00, 0x00,
+0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00,
+0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00,
+0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00,
+0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00,
+0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00,
+0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00,
+0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00,
+0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00,
+0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00,
+0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00,
+0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00,
+0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00,
+0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00,
+0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xB3, 0xB4, 0x00, 0x00, 0xFF, 0xFF, 0xB8, 0x01, 0x00,
+0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0x4C, 0x4D, 0x54,
+0x00, 0x4B, 0x4D, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33,
+0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xA6, 0xC7,
+0x50, 0x00, 0x96, 0x7A, 0x22, 0x00, 0x00, 0x00, 0x00,
/* America/Chicago */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -45591,4 +45628,4 @@ const unsigned char timelib_timezone_db_data_builtin[696215] = {
0x00, 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, 0x0A, 0x55, 0x54, 0x43, 0x30, 0x0A, 0x00,
0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,};
-const timelib_tzdb timezonedb_builtin = { "2015.4", 583, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
+const timelib_tzdb timezonedb_builtin = { "2015.5", 583, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index d8d6d32862..be48b13a8c 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -163,7 +163,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_date_create_from_format, 0, 0, 2)
ZEND_ARG_INFO(0, format)
ZEND_ARG_INFO(0, time)
- ZEND_ARG_OBJ_INFO(0, object, DateTimeZone, 1)
+ ZEND_ARG_INFO(0, object)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_date_parse, 0, 0, 1)
@@ -2573,18 +2573,16 @@ PHP_FUNCTION(date_create)
zval *timezone_object = NULL;
char *time_str = NULL;
size_t time_str_len = 0;
- zval datetime_object;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|sO!", &time_str, &time_str_len, &timezone_object, date_ce_timezone) == FAILURE) {
RETURN_FALSE;
}
- php_date_instantiate(date_ce_date, &datetime_object);
- if (!php_date_initialize(Z_PHPDATE_P(&datetime_object), time_str, time_str_len, NULL, timezone_object, 0)) {
- zval_dtor(&datetime_object);
+ php_date_instantiate(date_ce_date, return_value);
+ if (!php_date_initialize(Z_PHPDATE_P(return_value), time_str, time_str_len, NULL, timezone_object, 0)) {
+ zval_ptr_dtor(return_value);
RETURN_FALSE;
}
- RETVAL_ZVAL(&datetime_object, 0, 0);
}
/* }}} */
@@ -2596,18 +2594,16 @@ PHP_FUNCTION(date_create_immutable)
zval *timezone_object = NULL;
char *time_str = NULL;
size_t time_str_len = 0;
- zval datetime_object;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|sO!", &time_str, &time_str_len, &timezone_object, date_ce_timezone) == FAILURE) {
RETURN_FALSE;
}
- php_date_instantiate(date_ce_immutable, &datetime_object);
- if (!php_date_initialize(Z_PHPDATE_P(&datetime_object), time_str, time_str_len, NULL, timezone_object, 0)) {
- zval_dtor(&datetime_object);
+ php_date_instantiate(date_ce_immutable, return_value);
+ if (!php_date_initialize(Z_PHPDATE_P(return_value), time_str, time_str_len, NULL, timezone_object, 0)) {
+ zval_ptr_dtor(return_value);
RETURN_FALSE;
}
- RETVAL_ZVAL(&datetime_object, 0, 0);
}
/* }}} */
@@ -2619,18 +2615,16 @@ PHP_FUNCTION(date_create_from_format)
zval *timezone_object = NULL;
char *time_str = NULL, *format_str = NULL;
size_t time_str_len = 0, format_str_len = 0;
- zval datetime_object;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|O!", &format_str, &format_str_len, &time_str, &time_str_len, &timezone_object, date_ce_timezone) == FAILURE) {
RETURN_FALSE;
}
- php_date_instantiate(date_ce_date, &datetime_object);
- if (!php_date_initialize(Z_PHPDATE_P(&datetime_object), time_str, time_str_len, format_str, timezone_object, 0)) {
- zval_dtor(&datetime_object);
+ php_date_instantiate(date_ce_date, return_value);
+ if (!php_date_initialize(Z_PHPDATE_P(return_value), time_str, time_str_len, format_str, timezone_object, 0)) {
+ zval_ptr_dtor(return_value);
RETURN_FALSE;
}
- RETVAL_ZVAL(&datetime_object, 0, 0);
}
/* }}} */
@@ -2642,18 +2636,16 @@ PHP_FUNCTION(date_create_immutable_from_format)
zval *timezone_object = NULL;
char *time_str = NULL, *format_str = NULL;
size_t time_str_len = 0, format_str_len = 0;
- zval datetime_object;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|O!", &format_str, &format_str_len, &time_str, &time_str_len, &timezone_object, date_ce_timezone) == FAILURE) {
RETURN_FALSE;
}
- php_date_instantiate(date_ce_immutable, &datetime_object);
- if (!php_date_initialize(Z_PHPDATE_P(&datetime_object), time_str, time_str_len, format_str, timezone_object, 0)) {
- zval_dtor(&datetime_object);
+ php_date_instantiate(date_ce_immutable, return_value);
+ if (!php_date_initialize(Z_PHPDATE_P(return_value), time_str, time_str_len, format_str, timezone_object, 0)) {
+ zval_ptr_dtor(return_value);
RETURN_FALSE;
}
- RETVAL_ZVAL(&datetime_object, 0, 0);
}
/* }}} */
@@ -3079,11 +3071,12 @@ PHP_FUNCTION(date_modify)
RETURN_FALSE;
}
- if (php_date_modify(object, modify, modify_len)) {
- RETURN_ZVAL(object, 1, 0);
+ if (!php_date_modify(object, modify, modify_len)) {
+ RETURN_FALSE;
}
- RETURN_FALSE;
+ Z_ADDREF_P(object);
+ ZVAL_COPY_VALUE(return_value, object);
}
/* }}} */
@@ -3100,11 +3093,11 @@ PHP_METHOD(DateTimeImmutable, modify)
}
date_clone_immutable(object, &new_object);
- if (php_date_modify(&new_object, modify, modify_len)) {
- RETURN_ZVAL(&new_object, 0, 1);
+ if (!php_date_modify(&new_object, modify, modify_len)) {
+ RETURN_FALSE;
}
- RETURN_FALSE;
+ ZVAL_COPY_VALUE(return_value, &new_object);
}
/* }}} */
@@ -3137,7 +3130,8 @@ PHP_FUNCTION(date_add)
php_date_add(object, interval, return_value);
- RETURN_ZVAL(object, 1, 0);
+ Z_ADDREF_P(object);
+ ZVAL_COPY_VALUE(return_value, object);
}
/* }}} */
@@ -3154,7 +3148,7 @@ PHP_METHOD(DateTimeImmutable, add)
date_clone_immutable(object, &new_object);
php_date_add(&new_object, interval, return_value);
- RETURN_ZVAL(&new_object, 0, 1);
+ ZVAL_COPY_VALUE(return_value, &new_object);
}
/* }}} */
@@ -3192,7 +3186,8 @@ PHP_FUNCTION(date_sub)
php_date_sub(object, interval, return_value);
- RETURN_ZVAL(object, 1, 0);
+ Z_ADDREF_P(object);
+ ZVAL_COPY_VALUE(return_value, object);
}
/* }}} */
@@ -3209,7 +3204,7 @@ PHP_METHOD(DateTimeImmutable, sub)
date_clone_immutable(object, &new_object);
php_date_sub(&new_object, interval, return_value);
- RETURN_ZVAL(&new_object, 0, 1);
+ ZVAL_COPY_VALUE(return_value, &new_object);
}
/* }}} */
@@ -3294,7 +3289,8 @@ PHP_FUNCTION(date_timezone_set)
php_date_timezone_set(object, timezone_object, return_value);
- RETURN_ZVAL(object, 1, 0);
+ Z_ADDREF_P(object);
+ ZVAL_COPY_VALUE(return_value, object);
}
/* }}} */
@@ -3312,7 +3308,7 @@ PHP_METHOD(DateTimeImmutable, setTimezone)
date_clone_immutable(object, &new_object);
php_date_timezone_set(&new_object, timezone_object, return_value);
- RETURN_ZVAL(&new_object, 0, 1);
+ ZVAL_COPY_VALUE(return_value, &new_object);
}
/* }}} */
@@ -3377,7 +3373,8 @@ PHP_FUNCTION(date_time_set)
php_date_time_set(object, h, i, s, return_value);
- RETURN_ZVAL(object, 1, 0);
+ Z_ADDREF_P(object);
+ ZVAL_COPY_VALUE(return_value, object);
}
/* }}} */
@@ -3395,7 +3392,7 @@ PHP_METHOD(DateTimeImmutable, setTime)
date_clone_immutable(object, &new_object);
php_date_time_set(&new_object, h, i, s, return_value);
- RETURN_ZVAL(&new_object, 0, 1);
+ ZVAL_COPY_VALUE(return_value, &new_object);
}
/* }}} */
@@ -3425,7 +3422,8 @@ PHP_FUNCTION(date_date_set)
php_date_date_set(object, y, m, d, return_value);
- RETURN_ZVAL(object, 1, 0);
+ Z_ADDREF_P(object);
+ ZVAL_COPY_VALUE(return_value, object);
}
/* }}} */
@@ -3443,7 +3441,7 @@ PHP_METHOD(DateTimeImmutable, setDate)
date_clone_immutable(object, &new_object);
php_date_date_set(&new_object, y, m, d, return_value);
- RETURN_ZVAL(&new_object, 0, 1);
+ ZVAL_COPY_VALUE(return_value, &new_object);
}
/* }}} */
@@ -3477,7 +3475,8 @@ PHP_FUNCTION(date_isodate_set)
php_date_isodate_set(object, y, w, d, return_value);
- RETURN_ZVAL(object, 1, 0);
+ Z_ADDREF_P(object);
+ ZVAL_COPY_VALUE(return_value, object);
}
/* }}} */
@@ -3495,7 +3494,7 @@ PHP_METHOD(DateTimeImmutable, setISODate)
date_clone_immutable(object, &new_object);
php_date_isodate_set(&new_object, y, w, d, return_value);
- RETURN_ZVAL(&new_object, 0, 1);
+ ZVAL_COPY_VALUE(return_value, &new_object);
}
/* }}} */
@@ -3523,7 +3522,8 @@ PHP_FUNCTION(date_timestamp_set)
php_date_timestamp_set(object, timestamp, return_value);
- RETURN_ZVAL(object, 1, 0);
+ Z_ADDREF_P(object);
+ ZVAL_COPY_VALUE(return_value, object);
}
/* }}} */
@@ -3541,7 +3541,7 @@ PHP_METHOD(DateTimeImmutable, setTimestamp)
date_clone_immutable(object, &new_object);
php_date_timestamp_set(&new_object, timestamp, return_value);
- RETURN_ZVAL(&new_object, 0, 1);
+ ZVAL_COPY_VALUE(return_value, &new_object);
}
/* }}} */
diff --git a/ext/date/tests/014.phpt b/ext/date/tests/014.phpt
index 02e9907674..5cc31aa93a 100644
--- a/ext/date/tests/014.phpt
+++ b/ext/date/tests/014.phpt
@@ -37,7 +37,7 @@ Warning: timezone_offset_get() expects exactly 2 parameters, 0 given in %s on li
bool(false)
int(0)
-Fatal error: Uncaught TypeException: Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, instance of DateTime given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, instance of DateTime given in %s:%d
Stack trace:
#0 %s(%d): timezone_offset_get(Object(DateTime), Object(DateTimeZone))
#1 {main}
diff --git a/ext/date/tests/DateTimeZone_construct_error.phpt b/ext/date/tests/DateTimeZone_construct_error.phpt
index 6ff900d82f..8c8b14f12c 100644
--- a/ext/date/tests/DateTimeZone_construct_error.phpt
+++ b/ext/date/tests/DateTimeZone_construct_error.phpt
@@ -17,7 +17,7 @@ $timezone = "GMT";
$extra_arg = 99;
try {
new DateTimeZone($timezone, $extra_arg);
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
diff --git a/ext/date/tests/DateTimeZone_construct_variation1.phpt b/ext/date/tests/DateTimeZone_construct_variation1.phpt
index 96f5372611..d9625eedc0 100644
--- a/ext/date/tests/DateTimeZone_construct_variation1.phpt
+++ b/ext/date/tests/DateTimeZone_construct_variation1.phpt
@@ -97,7 +97,7 @@ foreach($inputs as $variation =>$timezone) {
echo "\n-- $variation --\n";
try {
var_dump( new DateTimezone($timezone) );
- } catch (BaseException $e) {
+ } catch (Throwable $e) {
$msg = $e->getMessage();
echo "FAILED: " . $msg . "\n";
}
diff --git a/ext/date/tests/DateTime_construct_error.phpt b/ext/date/tests/DateTime_construct_error.phpt
index de42566961..d0a453fd9d 100644
--- a/ext/date/tests/DateTime_construct_error.phpt
+++ b/ext/date/tests/DateTime_construct_error.phpt
@@ -18,7 +18,7 @@ $timezone = timezone_open("GMT");
$extra_arg = 99;
try {
var_dump( new DateTime($time, $timezone, $extra_arg) );
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
diff --git a/ext/date/tests/DateTime_construct_variation1.phpt b/ext/date/tests/DateTime_construct_variation1.phpt
index 6f149ae207..8ff7f7e89c 100644
--- a/ext/date/tests/DateTime_construct_variation1.phpt
+++ b/ext/date/tests/DateTime_construct_variation1.phpt
@@ -102,14 +102,14 @@ foreach($inputs as $variation =>$time) {
try {
var_dump( new DateTime($time) );
- } catch (BaseException $e) {
+ } catch (Throwable $e) {
$msg = $e->getMessage();
echo "FAILED: " . $msg . "\n";
}
try {
var_dump( new DateTime($time, $timezone) );
- } catch (BaseException$e) {
+ } catch (Throwable $e) {
$msg = $e->getMessage();
echo "FAILED: " . $msg . "\n";
}
diff --git a/ext/date/tests/DateTime_construct_variation2.phpt b/ext/date/tests/DateTime_construct_variation2.phpt
index d134d8f6cf..e75e14d8e3 100644
--- a/ext/date/tests/DateTime_construct_variation2.phpt
+++ b/ext/date/tests/DateTime_construct_variation2.phpt
@@ -102,7 +102,7 @@ foreach($inputs as $variation =>$timezone) {
try {
var_dump( new DateTime($time, $timezone) );
- } catch (BaseException $e) {
+ } catch (Throwable $e) {
$msg = $e->getMessage();
echo "FAILED: " . $msg . "\n";
}
diff --git a/ext/date/tests/bug55407.phpt b/ext/date/tests/bug55407.phpt
index 00c3356461..925640554a 100644
--- a/ext/date/tests/bug55407.phpt
+++ b/ext/date/tests/bug55407.phpt
@@ -2,6 +2,8 @@
Bug #55407 (Impossible to prototype DateTime::createFromFormat)
--INI--
error_reporting=-1
+--XFAIL--
+Bug #55407
--FILE--
<?php namespace melt\core;
diff --git a/ext/date/tests/timezone_offset_get_error.phpt b/ext/date/tests/timezone_offset_get_error.phpt
index 653625dd34..7ce1ade30a 100644
--- a/ext/date/tests/timezone_offset_get_error.phpt
+++ b/ext/date/tests/timezone_offset_get_error.phpt
@@ -26,7 +26,7 @@ echo "*** Testing timezone_offset_get() : error conditions ***\n";
echo "\n-- Testing timezone_offset_get() function with zero arguments --\n";
try {
var_dump( timezone_offset_get() );
-} catch (EngineException $ex) {
+} catch (Error $ex) {
var_dump($ex->getMessage());
echo "\n";
}
@@ -34,7 +34,7 @@ try {
echo "\n-- Testing timezone_offset_get() function with less than expected no. of arguments --\n";
try {
var_dump( timezone_offset_get($tz) );
-} catch (EngineException $ex) {
+} catch (Error $ex) {
var_dump($ex->getMessage());
echo "\n";
}
@@ -43,7 +43,7 @@ echo "\n-- Testing timezone_offset_get() function with more than expected no. of
$extra_arg = 99;
try {
var_dump( timezone_offset_get($tz, $date, $extra_arg) );
-} catch (EngineException $ex) {
+} catch (Error $ex) {
var_dump($ex->getMessage());
echo "\n";
}
@@ -52,21 +52,21 @@ echo "\n-- Testing timezone_offset_get() function with an invalid values for \$o
$invalid_obj = new stdClass();
try {
var_dump( timezone_offset_get($invalid_obj, $date) );
-} catch (EngineException $ex) {
+} catch (Error $ex) {
var_dump($ex->getMessage());
echo "\n";
}
$invalid_obj = 10;
try {
var_dump( timezone_offset_get($invalid_obj, $date) );
-} catch (EngineException $ex) {
+} catch (Error $ex) {
var_dump($ex->getMessage());
echo "\n";
}
$invalid_obj = null;
try {
var_dump( timezone_offset_get($invalid_obj, $date) );
-} catch (EngineException $ex) {
+} catch (Error $ex) {
var_dump($ex->getMessage());
echo "\n";
}
@@ -75,21 +75,21 @@ echo "\n-- Testing timezone_offset_get() function with an invalid values for \$d
$invalid_obj = new stdClass();
try {
var_dump( timezone_offset_get($tz, $invalid_obj) );
-} catch (EngineException $ex) {
+} catch (Error $ex) {
var_dump($ex->getMessage());
echo "\n";
}
$invalid_obj = 10;
try {
var_dump( timezone_offset_get($tz, $invalid_obj) );
-} catch (EngineException $ex) {
+} catch (Error $ex) {
var_dump($ex->getMessage());
echo "\n";
}
$invalid_obj = null;
try {
var_dump( timezone_offset_get($tz, $invalid_obj) );
-} catch (EngineException $ex) {
+} catch (Error $ex) {
var_dump($ex->getMessage());
echo "\n";
}
diff --git a/ext/date/tests/timezone_offset_get_variation1.phpt b/ext/date/tests/timezone_offset_get_variation1.phpt
index d2cfeedaaf..edeeb7fea7 100644
--- a/ext/date/tests/timezone_offset_get_variation1.phpt
+++ b/ext/date/tests/timezone_offset_get_variation1.phpt
@@ -109,7 +109,7 @@ foreach($inputs as $variation =>$object) {
echo "\n-- $variation --\n";
try {
var_dump( timezone_offset_get($object, $datetime) );
- } catch (EngineException $ex) {
+ } catch (Error $ex) {
echo $ex->getMessage()."\n";
}
};
diff --git a/ext/date/tests/timezone_offset_get_variation2.phpt b/ext/date/tests/timezone_offset_get_variation2.phpt
index 8191e18ee7..2d007d5e70 100644
--- a/ext/date/tests/timezone_offset_get_variation2.phpt
+++ b/ext/date/tests/timezone_offset_get_variation2.phpt
@@ -109,7 +109,7 @@ foreach($inputs as $variation =>$datetime) {
echo "\n-- $variation --\n";
try {
var_dump( timezone_offset_get($object, $datetime) );
- } catch (EngineException $ex) {
+ } catch (Error $ex) {
echo $ex->getMessage()."\n";
}
};
diff --git a/ext/dom/dom_iterators.c b/ext/dom/dom_iterators.c
index e72bd090ac..a96b6bfe9a 100644
--- a/ext/dom/dom_iterators.c
+++ b/ext/dom/dom_iterators.c
@@ -182,6 +182,7 @@ static void php_dom_iterator_move_forward(zend_object_iterator *iter) /* {{{ */
int previndex=0;
HashTable *nodeht;
zval *entry;
+ zend_bool do_curobj_undef = 1;
php_dom_iterator *iterator = (php_dom_iterator *)iter;
@@ -190,8 +191,6 @@ static void php_dom_iterator_move_forward(zend_object_iterator *iter) /* {{{ */
objmap = (dom_nnodemap_object *)nnmap->ptr;
intern = Z_DOMOBJ_P(&iterator->curobj);
- zval_ptr_dtor(&iterator->curobj);
- ZVAL_UNDEF(&iterator->curobj);
if (intern != NULL && intern->ptr != NULL) {
if (objmap->nodetype != XML_ENTITY_NODE &&
@@ -200,7 +199,10 @@ static void php_dom_iterator_move_forward(zend_object_iterator *iter) /* {{{ */
nodeht = HASH_OF(&objmap->baseobj_zv);
zend_hash_move_forward(nodeht);
if ((entry = zend_hash_get_current_data(nodeht))) {
+ zval_ptr_dtor(&iterator->curobj);
+ ZVAL_UNDEF(&iterator->curobj);
ZVAL_COPY(&iterator->curobj, entry);
+ do_curobj_undef = 0;
}
} else {
curnode = (xmlNodePtr)((php_libxml_node_ptr *)intern->ptr)->node;
@@ -231,6 +233,10 @@ static void php_dom_iterator_move_forward(zend_object_iterator *iter) /* {{{ */
}
}
err:
+ if (do_curobj_undef) {
+ zval_ptr_dtor(&iterator->curobj);
+ ZVAL_UNDEF(&iterator->curobj);
+ }
if (curnode) {
php_dom_create_object(curnode, &iterator->curobj, objmap->baseobj);
}
diff --git a/ext/dom/tests/DOMAttr_construct_error_001.phpt b/ext/dom/tests/DOMAttr_construct_error_001.phpt
index 53780c3321..64e6835f96 100644
--- a/ext/dom/tests/DOMAttr_construct_error_001.phpt
+++ b/ext/dom/tests/DOMAttr_construct_error_001.phpt
@@ -9,7 +9,7 @@ Josh Sweeney <jsweeney@alt-invest.net>
<?php
try {
$attr = new DOMAttr();
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
?>
diff --git a/ext/dom/tests/DOMCDATASection_construct_error_001.phpt b/ext/dom/tests/DOMCDATASection_construct_error_001.phpt
index 2be1e5204f..fbce3c7527 100644
--- a/ext/dom/tests/DOMCDATASection_construct_error_001.phpt
+++ b/ext/dom/tests/DOMCDATASection_construct_error_001.phpt
@@ -9,7 +9,7 @@ Nic Rosental nicrosental@gmail.com
<?php
try {
$section = new DOMCDataSection();
- } catch (TypeException $e) {
+ } catch (TypeError $e) {
echo $e->getMessage();
}
?>
diff --git a/ext/dom/tests/DOMComment_construct_error_001.phpt b/ext/dom/tests/DOMComment_construct_error_001.phpt
index e2f0b19a72..27424c35e4 100644
--- a/ext/dom/tests/DOMComment_construct_error_001.phpt
+++ b/ext/dom/tests/DOMComment_construct_error_001.phpt
@@ -9,7 +9,7 @@ Eric Lee Stewart <ericleestewart@gmail.com>
<?php
try {
$comment = new DOMComment("comment1", "comment2");
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
?>
diff --git a/ext/dom/tests/DOMDocumentFragment_construct_error_001.phpt b/ext/dom/tests/DOMDocumentFragment_construct_error_001.phpt
index d9376a3251..c84689ad8e 100644
--- a/ext/dom/tests/DOMDocumentFragment_construct_error_001.phpt
+++ b/ext/dom/tests/DOMDocumentFragment_construct_error_001.phpt
@@ -9,7 +9,7 @@ Eric Lee Stewart <ericleestewart@gmail.com>
<?php
try {
$fragment = new DOMDocumentFragment("root");
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
?>
diff --git a/ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt b/ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt
index c1ec685b2c..af0965c1c9 100644
--- a/ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt
+++ b/ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt
@@ -12,7 +12,7 @@ require_once dirname(__FILE__) .'/skipif.inc';
DOMDocument::saveHTMLFile();
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Non-static method DOMDocument::saveHTMLFile() cannot be called statically in %s:%d
+Fatal error: Uncaught Error: Non-static method DOMDocument::saveHTMLFile() cannot be called statically in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/ext/dom/tests/DOMDocument_saveHTML_error2.phpt b/ext/dom/tests/DOMDocument_saveHTML_error2.phpt
index 41d190c072..e32e277803 100644
--- a/ext/dom/tests/DOMDocument_saveHTML_error2.phpt
+++ b/ext/dom/tests/DOMDocument_saveHTML_error2.phpt
@@ -12,7 +12,7 @@ require_once dirname(__FILE__) .'/skipif.inc';
DOMDocument::saveHTML(true);
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Non-static method DOMDocument::saveHTML() cannot be called statically in %s:%d
+Fatal error: Uncaught Error: Non-static method DOMDocument::saveHTML() cannot be called statically in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/ext/dom/tests/DOMDocument_validate_error2.phpt b/ext/dom/tests/DOMDocument_validate_error2.phpt
index 901d541bf3..08ec083fbb 100644
--- a/ext/dom/tests/DOMDocument_validate_error2.phpt
+++ b/ext/dom/tests/DOMDocument_validate_error2.phpt
@@ -12,7 +12,7 @@ require_once dirname(__FILE__) .'/skipif.inc';
DOMDocument::validate();
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Non-static method DOMDocument::validate() cannot be called statically in %s:%d
+Fatal error: Uncaught Error: Non-static method DOMDocument::validate() cannot be called statically in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/ext/dom/tests/bug69846.phpt b/ext/dom/tests/bug69846.phpt
new file mode 100644
index 0000000000..08e35cdcf6
--- /dev/null
+++ b/ext/dom/tests/bug69846.phpt
@@ -0,0 +1,162 @@
+--TEST--
+Bug #69846 Segmenation fault (access violation) when iterating over DOMNodeList
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+$tmpDomDocument = new DOMDocument();
+
+$xml = '<?xml version="1.0" encoding="UTF-8"?><dummy xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"><xfa:data>
+ <form1>
+ <TextField1>Value A</TextField1>
+ <TextField1>Value B</TextField1>
+ <TextField1>Value C</TextField1>
+ </form1>
+</xfa:data></dummy>';
+
+$tmpDomDocument->loadXML($xml);
+
+$dataNodes = $tmpDomDocument->firstChild->childNodes->item(0)->childNodes;
+
+var_dump($dataNodes->length);
+$datasetDom = new DOMDocument();
+
+foreach ($dataNodes AS $node) {
+ $node = $datasetDom->importNode($node, true);
+ var_dump($node);
+}
+
+?>
+===DONE===
+--EXPECTF--
+int(3)
+object(DOMText)#%d (18) {
+ ["wholeText"]=>
+ string(3) "
+ "
+ ["data"]=>
+ string(3) "
+ "
+ ["length"]=>
+ int(3)
+ ["nodeName"]=>
+ string(5) "#text"
+ ["nodeValue"]=>
+ string(3) "
+ "
+ ["nodeType"]=>
+ int(3)
+ ["parentNode"]=>
+ NULL
+ ["childNodes"]=>
+ NULL
+ ["firstChild"]=>
+ NULL
+ ["lastChild"]=>
+ NULL
+ ["previousSibling"]=>
+ NULL
+ ["attributes"]=>
+ NULL
+ ["ownerDocument"]=>
+ string(22) "(object value omitted)"
+ ["namespaceURI"]=>
+ NULL
+ ["prefix"]=>
+ string(0) ""
+ ["localName"]=>
+ NULL
+ ["baseURI"]=>
+ NULL
+ ["textContent"]=>
+ string(3) "
+ "
+}
+object(DOMElement)#%d (17) {
+ ["tagName"]=>
+ string(5) "form1"
+ ["schemaTypeInfo"]=>
+ NULL
+ ["nodeName"]=>
+ string(5) "form1"
+ ["nodeValue"]=>
+ string(39) "
+ Value A
+ Value B
+ Value C
+ "
+ ["nodeType"]=>
+ int(1)
+ ["parentNode"]=>
+ NULL
+ ["childNodes"]=>
+ string(22) "(object value omitted)"
+ ["firstChild"]=>
+ string(22) "(object value omitted)"
+ ["lastChild"]=>
+ string(22) "(object value omitted)"
+ ["previousSibling"]=>
+ NULL
+ ["attributes"]=>
+ string(22) "(object value omitted)"
+ ["ownerDocument"]=>
+ string(22) "(object value omitted)"
+ ["namespaceURI"]=>
+ NULL
+ ["prefix"]=>
+ string(0) ""
+ ["localName"]=>
+ string(5) "form1"
+ ["baseURI"]=>
+ NULL
+ ["textContent"]=>
+ string(39) "
+ Value A
+ Value B
+ Value C
+ "
+}
+object(DOMText)#%d (18) {
+ ["wholeText"]=>
+ string(1) "
+"
+ ["data"]=>
+ string(1) "
+"
+ ["length"]=>
+ int(1)
+ ["nodeName"]=>
+ string(5) "#text"
+ ["nodeValue"]=>
+ string(1) "
+"
+ ["nodeType"]=>
+ int(3)
+ ["parentNode"]=>
+ NULL
+ ["childNodes"]=>
+ NULL
+ ["firstChild"]=>
+ NULL
+ ["lastChild"]=>
+ NULL
+ ["previousSibling"]=>
+ NULL
+ ["attributes"]=>
+ NULL
+ ["ownerDocument"]=>
+ string(22) "(object value omitted)"
+ ["namespaceURI"]=>
+ NULL
+ ["prefix"]=>
+ string(0) ""
+ ["localName"]=>
+ NULL
+ ["baseURI"]=>
+ NULL
+ ["textContent"]=>
+ string(1) "
+"
+}
+===DONE===
diff --git a/ext/dom/tests/dom003.phpt b/ext/dom/tests/dom003.phpt
index 33f9a0ec81..4c9d5a979f 100644
--- a/ext/dom/tests/dom003.phpt
+++ b/ext/dom/tests/dom003.phpt
@@ -28,13 +28,13 @@ $rootNode->appendChild($rootNode);
object(DOMException)#%d (%d) {
["message":protected]=>
string(23) "Hierarchy Request Error"
- ["string":"BaseException":private]=>
+ ["string":"Exception":private]=>
string(0) ""
["file":protected]=>
string(%d) "%sdom003.php"
["line":protected]=>
int(8)
- ["trace":"BaseException":private]=>
+ ["trace":"Exception":private]=>
array(1) {
[0]=>
array(6) {
@@ -55,7 +55,7 @@ object(DOMException)#%d (%d) {
}
}
}
- ["previous":"BaseException":private]=>
+ ["previous":"Exception":private]=>
NULL
["code"]=>
int(3)
diff --git a/ext/dom/tests/dom_set_attr_node.phpt b/ext/dom/tests/dom_set_attr_node.phpt
index 1c4960615c..1916cd524a 100644
--- a/ext/dom/tests/dom_set_attr_node.phpt
+++ b/ext/dom/tests/dom_set_attr_node.phpt
@@ -40,13 +40,13 @@ ob_start();
object(DOMException)#%d (7) {
["message":protected]=>
string(20) "Wrong Document Error"
- ["string":"BaseException":private]=>
+ ["string":"Exception":private]=>
string(0) ""
["file":protected]=>
string(%d) "%sdom_set_attr_node.php"
["line":protected]=>
int(%d)
- ["trace":"BaseException":private]=>
+ ["trace":"Exception":private]=>
array(1) {
[0]=>
array(6) {
@@ -67,7 +67,7 @@ object(DOMException)#%d (7) {
}
}
}
- ["previous":"BaseException":private]=>
+ ["previous":"Exception":private]=>
NULL
["code"]=>
int(4)
diff --git a/ext/dom/tests/regsiter_node_class.phpt b/ext/dom/tests/regsiter_node_class.phpt
index c2f0622438..311433b12c 100644
--- a/ext/dom/tests/regsiter_node_class.phpt
+++ b/ext/dom/tests/regsiter_node_class.phpt
@@ -37,7 +37,7 @@ myAttribute
HELLO Attribute
DOMAttr
-Fatal error: Uncaught EngineException: Call to undefined method DOMAttr::testit() in %s:25
+Fatal error: Uncaught Error: Call to undefined method DOMAttr::testit() in %s:25
Stack trace:
#0 {main}
thrown in %s on line 25
diff --git a/ext/exif/package.xml b/ext/exif/package.xml
index 6bdb089612..68ba9c1bbf 100644
--- a/ext/exif/package.xml
+++ b/ext/exif/package.xml
@@ -35,7 +35,6 @@ package.xml added to support installation using pear installer
<file role="doc" name="example.php"/>
<file role="src" name="config.m4"/>
<file role="src" name="config.w32"/>
- <file role="src" name="exif.dsp"/>
<file role="src" name="exif.c"/>
<file role="src" name="php_exif.h"/>
<file role="test" name="tests/exif000.phpt"/>
diff --git a/ext/fileinfo/tests/bug61173.phpt b/ext/fileinfo/tests/bug61173.phpt
index 4b622c65ae..96eb3010e0 100644
--- a/ext/fileinfo/tests/bug61173.phpt
+++ b/ext/fileinfo/tests/bug61173.phpt
@@ -10,7 +10,7 @@ if (!class_exists('finfo'))
try {
$finfo = new finfo(1, '', false);
var_dump($finfo);
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
--EXPECTF--
diff --git a/ext/fileinfo/tests/finfo_open_error.phpt b/ext/fileinfo/tests/finfo_open_error.phpt
index 1f6f935247..511df600c1 100644
--- a/ext/fileinfo/tests/finfo_open_error.phpt
+++ b/ext/fileinfo/tests/finfo_open_error.phpt
@@ -22,7 +22,7 @@ var_dump( finfo_open( 'foobar' ) );
try {
var_dump( new finfo('foobar') );
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
diff --git a/ext/ftp/package.xml b/ext/ftp/package.xml
index ecb2637ee5..9b70e33229 100644
--- a/ext/ftp/package.xml
+++ b/ext/ftp/package.xml
@@ -40,7 +40,6 @@ package.xml added to support installation using pear installer
<file role="doc" name="README"/>
<file role="src" name="config.m4"/>
<file role="src" name="config.w32"/>
- <file role="src" name="ctype.dsp"/>
<file role="src" name="ftp.c"/>
<file role="src" name="ftp.h"/>
<file role="src" name="php_ftp.c"/>
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 70f98f6a50..9b47118fd5 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -3019,10 +3019,11 @@ PHP_FUNCTION(imagegammacorrect)
for (x = 0; x < gdImageSX(im); x++) {
c = gdImageGetPixel(im, x, y);
gdImageSetPixel(im, x, y,
- gdTrueColor(
+ gdTrueColorAlpha(
(int) ((pow((pow((gdTrueColorGetRed(c) / 255.0), input)), 1.0 / output) * 255) + .5),
(int) ((pow((pow((gdTrueColorGetGreen(c) / 255.0), input)), 1.0 / output) * 255) + .5),
- (int) ((pow((pow((gdTrueColorGetBlue(c) / 255.0), input)), 1.0 / output) * 255) + .5)
+ (int) ((pow((pow((gdTrueColorGetBlue(c) / 255.0), input)), 1.0 / output) * 255) + .5),
+ gdTrueColorGetAlpha(c)
)
);
}
diff --git a/ext/gd/php_gd.h b/ext/gd/php_gd.h
index f02c6aba34..618681478e 100644
--- a/ext/gd/php_gd.h
+++ b/ext/gd/php_gd.h
@@ -185,16 +185,6 @@ PHP_FUNCTION(imagesy);
PHP_FUNCTION(imagedashedline);
PHP_FUNCTION(imagettfbbox);
PHP_FUNCTION(imagettftext);
-PHP_FUNCTION(imagepsloadfont);
-/*
-PHP_FUNCTION(imagepscopyfont);
-*/
-PHP_FUNCTION(imagepsfreefont);
-PHP_FUNCTION(imagepsencodefont);
-PHP_FUNCTION(imagepsextendfont);
-PHP_FUNCTION(imagepsslantfont);
-PHP_FUNCTION(imagepstext);
-PHP_FUNCTION(imagepsbbox);
PHP_FUNCTION(jpeg2wbmp);
PHP_FUNCTION(png2wbmp);
diff --git a/ext/gd/tests/bug61221.phpt b/ext/gd/tests/bug61221.phpt
new file mode 100644
index 0000000000..42365da71f
--- /dev/null
+++ b/ext/gd/tests/bug61221.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #61221 - imagegammacorrect function loses alpha channel
+--SKIPIF--
+<?php
+if (!extension_loaded('gd')) die('skip gd extension not available');
+?>
+--FILE--
+<?php
+$imagew = 50;
+$imageh = 50;
+$img = imagecreatetruecolor($imagew, $imageh);
+$blacktransparent = imagecolorallocatealpha($img, 0, 0, 0, 127);
+$redsolid = imagecolorallocate($img, 255, 0, 0);
+imagefill($img, 0, 0, $blacktransparent);
+imageline($img, $imagew / 2, 0, $imagew / 2, $imageh - 1, $redsolid);
+imageline($img, 0, $imageh / 2, $imagew - 1, $imageh / 2, $redsolid);
+imagegammacorrect($img, 1, 1);
+$color = imagecolorat($img, 0, 0);
+var_dump($color === $blacktransparent);
+imagedestroy($img);
+?>
+--EXPECT--
+bool(true)
diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c
index 1994052686..663bbc96e4 100644
--- a/ext/gmp/gmp.c
+++ b/ext/gmp/gmp.c
@@ -1837,6 +1837,7 @@ ZEND_FUNCTION(gmp_random_range)
{
zval *min_arg, *max_arg;
mpz_ptr gmpnum_min, gmpnum_max, gmpnum_result;
+ mpz_t gmpnum_range;
gmp_temp_t temp_a, temp_b;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zz", &min_arg, &max_arg) == FAILURE) {
@@ -1855,22 +1856,23 @@ ZEND_FUNCTION(gmp_random_range)
}
INIT_GMP_RETVAL(gmpnum_result);
+ mpz_init(gmpnum_range);
- if (Z_LVAL_P(min_arg)) {
- mpz_sub_ui(gmpnum_max, gmpnum_max, Z_LVAL_P(min_arg));
+ if (Z_LVAL_P(min_arg) != 0) {
+ mpz_sub_ui(gmpnum_range, gmpnum_max, Z_LVAL_P(min_arg) - 1);
+ } else {
+ mpz_add_ui(gmpnum_range, gmpnum_max, 1);
}
- mpz_add_ui(gmpnum_max, gmpnum_max, 1);
- mpz_urandomm(gmpnum_result, GMPG(rand_state), gmpnum_max);
+ mpz_urandomm(gmpnum_result, GMPG(rand_state), gmpnum_range);
- if (Z_LVAL_P(min_arg)) {
+ if (Z_LVAL_P(min_arg) != 0) {
mpz_add_ui(gmpnum_result, gmpnum_result, Z_LVAL_P(min_arg));
}
+ mpz_clear(gmpnum_range);
FREE_GMP_TEMP(temp_a);
-
- }
- else {
+ } else {
FETCH_GMP_ZVAL_DEP(gmpnum_min, min_arg, temp_b, temp_a);
if (mpz_cmp(gmpnum_max, gmpnum_min) <= 0) {
@@ -1881,12 +1883,14 @@ ZEND_FUNCTION(gmp_random_range)
}
INIT_GMP_RETVAL(gmpnum_result);
+ mpz_init(gmpnum_range);
- mpz_sub(gmpnum_max, gmpnum_max, gmpnum_min);
- mpz_add_ui(gmpnum_max, gmpnum_max, 1);
- mpz_urandomm(gmpnum_result, GMPG(rand_state), gmpnum_max);
+ mpz_sub(gmpnum_range, gmpnum_max, gmpnum_min);
+ mpz_add_ui(gmpnum_range, gmpnum_range, 1);
+ mpz_urandomm(gmpnum_result, GMPG(rand_state), gmpnum_range);
mpz_add(gmpnum_result, gmpnum_result, gmpnum_min);
+ mpz_clear(gmpnum_range);
FREE_GMP_TEMP(temp_b);
FREE_GMP_TEMP(temp_a);
}
diff --git a/ext/gmp/tests/bug69803.phpt b/ext/gmp/tests/bug69803.phpt
new file mode 100644
index 0000000000..e158cc5c0c
--- /dev/null
+++ b/ext/gmp/tests/bug69803.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Bug #69803: gmp_random_range() modifies second parameter if GMP number
+--FILE--
+<?php
+
+$a = gmp_init(100);
+$b = gmp_init(200);
+echo $a . ", ", $b . "\n";
+gmp_random_range($a, $b);
+echo $a . ", ", $b . "\n";
+
+$b = gmp_init(200);
+echo $a . ", ", $b . "\n";
+gmp_random_range(100, $b);
+echo $a . ", ", $b . "\n";
+
+?>
+--EXPECT--
+100, 200
+100, 200
+100, 200
+100, 200
diff --git a/ext/gmp/tests/gmp_random_range.phpt b/ext/gmp/tests/gmp_random_range.phpt
index db2ece61c5..654ffbefb3 100644
--- a/ext/gmp/tests/gmp_random_range.phpt
+++ b/ext/gmp/tests/gmp_random_range.phpt
@@ -5,8 +5,8 @@ gmp_random_range() basic tests
--FILE--
<?php
-$minusTen = gmp_init(-1);
-$plusTen = gmp_init(1);
+$minusTen = gmp_init(-10);
+$plusTen = gmp_init(10);
$zero = gmp_init(0);
var_dump(gmp_random_range());
diff --git a/ext/hash/hash.c b/ext/hash/hash.c
index 0510d3749c..d72b88c879 100644
--- a/ext/hash/hash.c
+++ b/ext/hash/hash.c
@@ -794,6 +794,9 @@ static void php_hash_dtor(zend_resource *rsrc) /* {{{ */
#ifdef PHP_MHASH_BC
+#if 0
+/* See #69823, we should not insert module into module_registry while doing startup */
+
PHP_MINFO_FUNCTION(mhash)
{
php_info_print_table_start();
@@ -814,6 +817,7 @@ zend_module_entry mhash_module_entry = {
PHP_MHASH_VERSION,
STANDARD_MODULE_PROPERTIES,
};
+#endif
static void mhash_init(INIT_FUNC_ARGS)
{
@@ -830,7 +834,8 @@ static void mhash_init(INIT_FUNC_ARGS)
len = slprintf(buf, 127, "MHASH_%s", algorithm.mhash_name, strlen(algorithm.mhash_name));
zend_register_long_constant(buf, len, algorithm.value, CONST_CS | CONST_PERSISTENT, module_number);
}
- zend_register_internal_module(&mhash_module_entry);
+
+ /* TODO: this cause #69823 zend_register_internal_module(&mhash_module_entry); */
}
/* {{{ proto string mhash(int hash, string data [, string key])
@@ -1090,6 +1095,14 @@ PHP_MINFO_FUNCTION(hash)
php_info_print_table_row(2, "hash support", "enabled");
php_info_print_table_row(2, "Hashing Engines", buffer);
php_info_print_table_end();
+
+#ifdef PHP_MHASH_BC
+ php_info_print_table_start();
+ php_info_print_table_row(2, "MHASH support", "Enabled");
+ php_info_print_table_row(2, "MHASH API Version", "Emulated Support");
+ php_info_print_table_end();
+#endif
+
}
/* }}} */
diff --git a/ext/hash/tests/skip_mhash.inc b/ext/hash/tests/skip_mhash.inc
index 17e5fe7f9e..608b557b28 100644
--- a/ext/hash/tests/skip_mhash.inc
+++ b/ext/hash/tests/skip_mhash.inc
@@ -1,5 +1,5 @@
<?php
-if (!extension_loaded("mhash") || !function_exists("mhash")) {
+if (!function_exists("mhash")) {
die("skip mhash extension is not available");
}
?>
diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4
index efde95e038..6a056979e7 100644
--- a/ext/iconv/config.m4
+++ b/ext/iconv/config.m4
@@ -186,8 +186,8 @@ int main() {
AC_DEFINE([ICONV_BROKEN_IGNORE],1,[Whether iconv supports IGNORE])
],[
AC_MSG_RESULT(no, cross-compiling)
- PHP_DEFINE([ICONV_SUPPORTS_ERRNO],0,[ext/iconv])
- AC_DEFINE([ICONV_SUPPORTS_ERRNO],0,[Whether iconv supports IGNORE])
+ PHP_DEFINE([ICONV_BROKEN_IGNORE],0,[ext/iconv])
+ AC_DEFINE([ICONV_BROKEN_IGNORE],0,[Whether iconv supports IGNORE])
])
AC_MSG_CHECKING([if your cpp allows macro usage in include lines])
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index 8042916c0d..8fcc43dd92 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -2109,7 +2109,7 @@ PHP_FUNCTION(iconv_substr)
err = _php_iconv_substr(&retval, str->val, str->len, offset, length, charset);
_php_iconv_show_error(err, GENERIC_SUPERSET_NAME, charset);
- if (err == PHP_ICONV_ERR_SUCCESS && str->val[0] != '\0' && retval.s != NULL) {
+ if (err == PHP_ICONV_ERR_SUCCESS && str->len > 0 && retval.s != NULL) {
RETURN_NEW_STR(retval.s);
}
smart_str_free(&retval);
@@ -2209,8 +2209,8 @@ PHP_FUNCTION(iconv_mime_encode)
{
zend_string *field_name = NULL;
zend_string *field_value = NULL;
+ zend_string *tmp_str = NULL;
zval *pref = NULL;
- zval tmp_zv, *tmp_zv_p = NULL;
smart_str retval = {0};
php_iconv_err_t err;
@@ -2273,12 +2273,8 @@ PHP_FUNCTION(iconv_mime_encode)
if ((pzval = zend_hash_str_find(Z_ARRVAL_P(pref), "line-break-chars", sizeof("line-break-chars") - 1)) != NULL) {
if (Z_TYPE_P(pzval) != IS_STRING) {
- ZVAL_DUP(&tmp_zv, pzval);
- convert_to_string(&tmp_zv);
-
- lfchars = Z_STRVAL(tmp_zv);
-
- tmp_zv_p = &tmp_zv;
+ tmp_str = zval_get_string(pzval);
+ lfchars = tmp_str->val;
} else {
lfchars = Z_STRVAL_P(pzval);
}
@@ -2301,8 +2297,8 @@ PHP_FUNCTION(iconv_mime_encode)
RETVAL_FALSE;
}
- if (tmp_zv_p != NULL) {
- zval_dtor(tmp_zv_p);
+ if (tmp_str) {
+ zend_string_release(tmp_str);
}
}
/* }}} */
diff --git a/ext/iconv/tests/bug69840.phpt b/ext/iconv/tests/bug69840.phpt
new file mode 100644
index 0000000000..af79bbcdd6
--- /dev/null
+++ b/ext/iconv/tests/bug69840.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #69840 (iconv_substr() doesn't work with UTF-16BE)
+--FILE--
+<?php
+$str = iconv_substr("a\x00b\x00", 0, 1, 'UTF-16LE');
+var_dump(strlen($str));
+var_dump(ord($str[0]));
+var_dump(ord($str[1]));
+$str = iconv_substr("\x00a\x00b", 0, 1, 'UTF-16BE');
+var_dump(strlen($str));
+var_dump(ord($str[0]));
+var_dump(ord($str[1]));
+?>
+--EXPECT--
+int(2)
+int(97)
+int(0)
+int(2)
+int(0)
+int(97)
diff --git a/ext/intl/breakiterator/breakiterator_iterators.cpp b/ext/intl/breakiterator/breakiterator_iterators.cpp
index 93a49d1290..5bd77a5f2d 100644
--- a/ext/intl/breakiterator/breakiterator_iterators.cpp
+++ b/ext/intl/breakiterator/breakiterator_iterators.cpp
@@ -289,7 +289,8 @@ U_CFUNC PHP_METHOD(IntlPartsIterator, getBreakIterator)
INTLITERATOR_METHOD_FETCH_OBJECT;
zval *biter_zval = &ii->iterator->data;
- RETURN_ZVAL(biter_zval, 1, 0);
+ ZVAL_DEREF(biter_zval);
+ ZVAL_COPY(return_value, biter_zval);
}
ZEND_BEGIN_ARG_INFO_EX(ainfo_parts_it_void, 0, 0, 0)
diff --git a/ext/intl/common/common_enum.cpp b/ext/intl/common/common_enum.cpp
index 4160c30258..e76f3b830f 100644
--- a/ext/intl/common/common_enum.cpp
+++ b/ext/intl/common/common_enum.cpp
@@ -219,7 +219,8 @@ static PHP_METHOD(IntlIterator, current)
INTLITERATOR_METHOD_FETCH_OBJECT;
data = ii->iterator->funcs->get_current_data(ii->iterator);
if (data) {
- RETURN_ZVAL(data, 1, 0);
+ ZVAL_DEREF(data);
+ ZVAL_COPY(return_value, data);
}
}
diff --git a/ext/intl/tests/badargs.phpt b/ext/intl/tests/badargs.phpt
index 300ac2653e..d6ce48317b 100644
--- a/ext/intl/tests/badargs.phpt
+++ b/ext/intl/tests/badargs.phpt
@@ -18,7 +18,7 @@ foreach($funcs as $func) {
$res = $func($arg);
} catch (Exception $e) {
continue;
- } catch (EngineException $e) {
+ } catch (Error $e) {
continue;
}
if($res != false) {
diff --git a/ext/intl/tests/breakiter___construct.phpt b/ext/intl/tests/breakiter___construct.phpt
index 37303e583b..10089e28a6 100644
--- a/ext/intl/tests/breakiter___construct.phpt
+++ b/ext/intl/tests/breakiter___construct.phpt
@@ -11,7 +11,7 @@ ini_set("intl.error_level", E_WARNING);
new IntlBreakIterator();
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to private IntlBreakIterator::__construct() from invalid context in %s:%d
+Fatal error: Uncaught Error: Call to private IntlBreakIterator::__construct() from invalid context in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/ext/intl/tests/breakiter___construct_error.phpt b/ext/intl/tests/breakiter___construct_error.phpt
index 7e67fd7403..1e865cc9d9 100644
--- a/ext/intl/tests/breakiter___construct_error.phpt
+++ b/ext/intl/tests/breakiter___construct_error.phpt
@@ -19,17 +19,17 @@ try {
}
try {
var_dump(new IntlRuleBasedBreakIterator());
-} catch (TypeException $e) {
+} catch (TypeError $e) {
print_exception($e);
}
try {
var_dump(new IntlRuleBasedBreakIterator(1,2,3));
-} catch (TypeException $e) {
+} catch (TypeError $e) {
print_exception($e);
}
try {
var_dump(new IntlRuleBasedBreakIterator('[\p{Letter}\uFFFD]+;[:number:]+;', array()));
-} catch (TypeException $e) {
+} catch (TypeError $e) {
print_exception($e);
}
try {
diff --git a/ext/intl/tests/calendar_add_error.phpt b/ext/intl/tests/calendar_add_error.phpt
index b9e9cdce63..fc0584c61a 100644
--- a/ext/intl/tests/calendar_add_error.phpt
+++ b/ext/intl/tests/calendar_add_error.phpt
@@ -38,7 +38,7 @@ Warning: intlcal_add() expects exactly 3 parameters, 4 given in %s on line %d
Warning: intlcal_add(): intlcal_add: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_add() must be an instance of IntlCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_add() must be an instance of IntlCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlcal_add(1, 2, 3)
#1 {main}
diff --git a/ext/intl/tests/calendar_before_after_error.phpt b/ext/intl/tests/calendar_before_after_error.phpt
index b5f3c746c1..938c7a5fb7 100644
--- a/ext/intl/tests/calendar_before_after_error.phpt
+++ b/ext/intl/tests/calendar_before_after_error.phpt
@@ -19,45 +19,45 @@ set_error_handler('eh');
try {
var_dump($c->after());
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump($c->before());
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump($c->after(1));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump($c->before(1));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try{
var_dump($c->after($c, 1));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump($c->before($c, 1));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump(intlcal_after($c));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump(intlcal_before($c));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
--EXPECT--
diff --git a/ext/intl/tests/calendar_clear_error.phpt b/ext/intl/tests/calendar_clear_error.phpt
index 13c6a5b51f..7e9c52b2a5 100644
--- a/ext/intl/tests/calendar_clear_error.phpt
+++ b/ext/intl/tests/calendar_clear_error.phpt
@@ -28,7 +28,7 @@ bool(false)
Warning: intlcal_clear(): intlcal_clear: invalid field in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_clear() must be an instance of IntlCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_clear() must be an instance of IntlCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlcal_clear(1, 2)
#1 {main}
diff --git a/ext/intl/tests/calendar_equals_error.phpt b/ext/intl/tests/calendar_equals_error.phpt
index 0293bd7bcb..8465541c87 100644
--- a/ext/intl/tests/calendar_equals_error.phpt
+++ b/ext/intl/tests/calendar_equals_error.phpt
@@ -19,29 +19,29 @@ set_error_handler('eh');
try {
var_dump($c->equals());
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump($c->equals(new stdclass));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump($c->equals(1, 2));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump(intlcal_equals($c, array()));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump(intlcal_equals(1, $c));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
diff --git a/ext/intl/tests/calendar_fieldDifference_error.phpt b/ext/intl/tests/calendar_fieldDifference_error.phpt
index beb81758be..f9d88d447b 100644
--- a/ext/intl/tests/calendar_fieldDifference_error.phpt
+++ b/ext/intl/tests/calendar_fieldDifference_error.phpt
@@ -39,7 +39,7 @@ Warning: intlcal_field_difference() expects exactly 3 parameters, 4 given in %s
Warning: intlcal_field_difference(): intlcal_field_difference: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_field_difference() must be an instance of IntlCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_field_difference() must be an instance of IntlCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlcal_field_difference(1, 0, 1)
#1 {main}
diff --git a/ext/intl/tests/calendar_getDayOfWeekType_error.phpt b/ext/intl/tests/calendar_getDayOfWeekType_error.phpt
index 8ba0712e68..9d39666f06 100644
--- a/ext/intl/tests/calendar_getDayOfWeekType_error.phpt
+++ b/ext/intl/tests/calendar_getDayOfWeekType_error.phpt
@@ -41,7 +41,7 @@ Warning: intlcal_get_day_of_week_type() expects parameter 2 to be integer, strin
Warning: intlcal_get_day_of_week_type(): intlcal_get_day_of_week_type: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_day_of_week_type() must be an instance of IntlCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_day_of_week_type() must be an instance of IntlCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlcal_get_day_of_week_type(1, 1)
#1 {main}
diff --git a/ext/intl/tests/calendar_getErrorCode_error.phpt b/ext/intl/tests/calendar_getErrorCode_error.phpt
index 23fa9d67c4..97b7d9c0c1 100644
--- a/ext/intl/tests/calendar_getErrorCode_error.phpt
+++ b/ext/intl/tests/calendar_getErrorCode_error.phpt
@@ -23,7 +23,7 @@ Warning: IntlCalendar::getErrorCode() expects exactly 0 parameters, 1 given in %
Warning: IntlCalendar::getErrorCode(): intlcal_get_error_code: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_error_code() must be an instance of IntlCalendar, null given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_error_code() must be an instance of IntlCalendar, null given in %s:%d
Stack trace:
#0 %s(%d): intlcal_get_error_code(NULL)
#1 {main}
diff --git a/ext/intl/tests/calendar_getErrorMessage_error.phpt b/ext/intl/tests/calendar_getErrorMessage_error.phpt
index 69329e6db4..5250bc064e 100644
--- a/ext/intl/tests/calendar_getErrorMessage_error.phpt
+++ b/ext/intl/tests/calendar_getErrorMessage_error.phpt
@@ -23,7 +23,7 @@ Warning: IntlCalendar::getErrorMessage() expects exactly 0 parameters, 1 given i
Warning: IntlCalendar::getErrorMessage(): intlcal_get_error_message: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_error_message() must be an instance of IntlCalendar, null given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_error_message() must be an instance of IntlCalendar, null given in %s:%d
Stack trace:
#0 %s(%d): intlcal_get_error_message(NULL)
#1 {main}
diff --git a/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt b/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt
index 13beb5348e..3bae010c4a 100644
--- a/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt
+++ b/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt
@@ -29,7 +29,7 @@ Warning: intlcal_get_first_day_of_week() expects exactly 1 parameter, 2 given in
Warning: intlcal_get_first_day_of_week(): intlcal_get_first_day_of_week: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_first_day_of_week() must be an instance of IntlCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_first_day_of_week() must be an instance of IntlCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlcal_get_first_day_of_week(1)
#1 {main}
diff --git a/ext/intl/tests/calendar_getLocale_error.phpt b/ext/intl/tests/calendar_getLocale_error.phpt
index 8c7a886caa..47c62e3957 100644
--- a/ext/intl/tests/calendar_getLocale_error.phpt
+++ b/ext/intl/tests/calendar_getLocale_error.phpt
@@ -39,7 +39,7 @@ Warning: intlcal_get_locale() expects exactly 2 parameters, 1 given in %s on lin
Warning: intlcal_get_locale(): intlcal_get_locale: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_locale() must be an instance of IntlCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_locale() must be an instance of IntlCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlcal_get_locale(1)
#1 {main}
diff --git a/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt b/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt
index 6ad098773e..216363bec3 100644
--- a/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt
+++ b/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt
@@ -29,7 +29,7 @@ Warning: intlcal_get_minimal_days_in_first_week() expects exactly 1 parameter, 2
Warning: intlcal_get_minimal_days_in_first_week(): intlcal_get_minimal_days_in_first_week: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_minimal_days_in_first_week() must be an instance of IntlCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_minimal_days_in_first_week() must be an instance of IntlCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlcal_get_minimal_days_in_first_week(1)
#1 {main}
diff --git a/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt b/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt
index 403f6f7ebd..cb1ae4ea4b 100644
--- a/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt
+++ b/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt
@@ -44,7 +44,7 @@ Warning: intlcal_get_repeated_wall_time_option() expects exactly 1 parameter, 2
Warning: intlcal_get_repeated_wall_time_option(): intlcal_get_repeated_wall_time_option: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_skipped_wall_time_option() must be an instance of IntlCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_skipped_wall_time_option() must be an instance of IntlCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlcal_get_skipped_wall_time_option(1)
#1 {main}
diff --git a/ext/intl/tests/calendar_getTimeZone_error.phpt b/ext/intl/tests/calendar_getTimeZone_error.phpt
index 1eb8e00f75..15c1a50455 100644
--- a/ext/intl/tests/calendar_getTimeZone_error.phpt
+++ b/ext/intl/tests/calendar_getTimeZone_error.phpt
@@ -29,7 +29,7 @@ Warning: intlcal_get_time_zone() expects exactly 1 parameter, 2 given in %s on l
Warning: intlcal_get_time_zone(): intlcal_get_time_zone: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_time_zone() must be an instance of IntlCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_time_zone() must be an instance of IntlCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlcal_get_time_zone(1)
#1 {main}
diff --git a/ext/intl/tests/calendar_getTime_error.phpt b/ext/intl/tests/calendar_getTime_error.phpt
index ed2687377f..8c75ca5722 100644
--- a/ext/intl/tests/calendar_getTime_error.phpt
+++ b/ext/intl/tests/calendar_getTime_error.phpt
@@ -28,7 +28,7 @@ Warning: intlcal_get_time() expects exactly 1 parameter, 2 given in %s on line %
Warning: intlcal_get_time(): intlcal_get_time: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_time() must be an instance of IntlCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_time() must be an instance of IntlCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlcal_get_time(1)
#1 {main}
diff --git a/ext/intl/tests/calendar_getType_error.phpt b/ext/intl/tests/calendar_getType_error.phpt
index e5333cb016..95499a60ac 100644
--- a/ext/intl/tests/calendar_getType_error.phpt
+++ b/ext/intl/tests/calendar_getType_error.phpt
@@ -29,7 +29,7 @@ Warning: intlcal_get_type() expects exactly 1 parameter, 2 given in %s on line %
Warning: intlcal_get_type(): intlcal_get_type: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_type() must be an instance of IntlCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_type() must be an instance of IntlCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlcal_get_type(1)
#1 {main}
diff --git a/ext/intl/tests/calendar_getWeekendTransition_error.phpt b/ext/intl/tests/calendar_getWeekendTransition_error.phpt
index 210735b2a0..f77a60fc78 100644
--- a/ext/intl/tests/calendar_getWeekendTransition_error.phpt
+++ b/ext/intl/tests/calendar_getWeekendTransition_error.phpt
@@ -41,7 +41,7 @@ Warning: intlcal_get_weekend_transition() expects exactly 2 parameters, 1 given
Warning: intlcal_get_weekend_transition(): intlcal_get_weekend_transition: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_weekend_transition() must be an instance of IntlCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_weekend_transition() must be an instance of IntlCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlcal_get_weekend_transition(1, 1)
#1 {main}
diff --git a/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt b/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt
index 0764fe267d..3d881a781d 100644
--- a/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt
+++ b/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt
@@ -34,22 +34,22 @@ set_error_handler('eh');
try {
var_dump(intlcal_get_least_maximum(1, 1));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump(intlcal_get_maximum(1, 1));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump(intlcal_get_greatest_minimum(1, -1));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump(intlcal_get_minimum(1, -1));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
diff --git a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt
index e117f03a57..b29e8ed0cb 100644
--- a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt
+++ b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt
@@ -19,65 +19,65 @@ set_error_handler('eh');
try {
var_dump(intlcal_get($c));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump(intlcal_get_actual_maximum($c));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump(intlcal_get_actual_minimum($c));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump(intlcal_get($c, -1));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump(intlcal_get_actual_maximum($c, -1));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump(intlcal_get_actual_minimum($c, -1));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump(intlcal_get($c, "s"));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump(intlcal_get_actual_maximum($c, "s"));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump(intlcal_get_actual_minimum($c, "s"));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump(intlcal_get(1));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump(intlcal_get_actual_maximum(1));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump(intlcal_get_actual_minimum(1));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
--EXPECT--
diff --git a/ext/intl/tests/calendar_inDaylightTime_error.phpt b/ext/intl/tests/calendar_inDaylightTime_error.phpt
index 6d7ebcfeca..1de9e2a830 100644
--- a/ext/intl/tests/calendar_inDaylightTime_error.phpt
+++ b/ext/intl/tests/calendar_inDaylightTime_error.phpt
@@ -29,7 +29,7 @@ Warning: intlcal_in_daylight_time() expects exactly 1 parameter, 2 given in %s o
Warning: intlcal_in_daylight_time(): intlcal_in_daylight_time: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_in_daylight_time() must be an instance of IntlCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_in_daylight_time() must be an instance of IntlCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlcal_in_daylight_time(1)
#1 {main}
diff --git a/ext/intl/tests/calendar_isEquivalentTo_error.phpt b/ext/intl/tests/calendar_isEquivalentTo_error.phpt
index 740b07b1fe..ac19e1dd90 100644
--- a/ext/intl/tests/calendar_isEquivalentTo_error.phpt
+++ b/ext/intl/tests/calendar_isEquivalentTo_error.phpt
@@ -19,33 +19,33 @@ set_error_handler('eh');
try {
var_dump($c->isEquivalentTo(0));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump($c->isEquivalentTo($c, 1));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump($c->isEquivalentTo(1));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump(intlcal_is_equivalent_to($c));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump(intlcal_is_equivalent_to($c, 1));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump(intlcal_is_equivalent_to(1, $c));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
diff --git a/ext/intl/tests/calendar_isLenient_error.phpt b/ext/intl/tests/calendar_isLenient_error.phpt
index 7a9d9f109c..8cc8e969e7 100644
--- a/ext/intl/tests/calendar_isLenient_error.phpt
+++ b/ext/intl/tests/calendar_isLenient_error.phpt
@@ -29,7 +29,7 @@ Warning: intlcal_is_lenient() expects exactly 1 parameter, 2 given in %s on line
Warning: intlcal_is_lenient(): intlcal_is_lenient: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_is_lenient() must be an instance of IntlCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_is_lenient() must be an instance of IntlCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlcal_is_lenient(1)
#1 {main}
diff --git a/ext/intl/tests/calendar_isSet_error.phpt b/ext/intl/tests/calendar_isSet_error.phpt
index c9497bea09..a8efa34218 100644
--- a/ext/intl/tests/calendar_isSet_error.phpt
+++ b/ext/intl/tests/calendar_isSet_error.phpt
@@ -39,7 +39,7 @@ Warning: intlcal_is_set() expects exactly 2 parameters, 1 given in %s on line %d
Warning: intlcal_is_set(): intlcal_is_set: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_is_set() must be an instance of IntlCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_is_set() must be an instance of IntlCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlcal_is_set(1, 2)
#1 {main}
diff --git a/ext/intl/tests/calendar_isWeekend_error.phpt b/ext/intl/tests/calendar_isWeekend_error.phpt
index 0538fa95ca..8f723cc3c9 100644
--- a/ext/intl/tests/calendar_isWeekend_error.phpt
+++ b/ext/intl/tests/calendar_isWeekend_error.phpt
@@ -35,7 +35,7 @@ Warning: intlcal_is_weekend() expects parameter 2 to be float, string given in %
Warning: intlcal_is_weekend(): intlcal_is_weekend: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_is_weekend() must be an instance of IntlCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_is_weekend() must be an instance of IntlCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlcal_is_weekend(1)
#1 {main}
diff --git a/ext/intl/tests/calendar_roll_error.phpt b/ext/intl/tests/calendar_roll_error.phpt
index a496089026..2b8c303cbb 100644
--- a/ext/intl/tests/calendar_roll_error.phpt
+++ b/ext/intl/tests/calendar_roll_error.phpt
@@ -34,7 +34,7 @@ bool(false)
Warning: intlcal_roll(): intlcal_set: too many arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_roll() must be an instance of IntlCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_roll() must be an instance of IntlCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlcal_roll(1, 2, 3)
#1 {main}
diff --git a/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt b/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt
index 8d24a61d6b..466690dbee 100644
--- a/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt
+++ b/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt
@@ -37,7 +37,7 @@ bool(false)
Warning: intlcal_set_first_day_of_week(): intlcal_set_first_day_of_week: invalid day of week in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_set_first_day_of_week() must be an instance of IntlCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set_first_day_of_week() must be an instance of IntlCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlcal_set_first_day_of_week(1, 2)
#1 {main}
diff --git a/ext/intl/tests/calendar_setLenient_error.phpt b/ext/intl/tests/calendar_setLenient_error.phpt
index a1516b9c0e..9619dc564c 100644
--- a/ext/intl/tests/calendar_setLenient_error.phpt
+++ b/ext/intl/tests/calendar_setLenient_error.phpt
@@ -41,7 +41,7 @@ Warning: intlcal_set_lenient() expects parameter 2 to be boolean, array given in
Warning: intlcal_set_lenient(): intlcal_set_lenient: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_set_lenient() must be an instance of IntlCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set_lenient() must be an instance of IntlCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlcal_set_lenient(1, false)
#1 {main}
diff --git a/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt b/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt
index 406eebd356..ee88f6d630 100644
--- a/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt
+++ b/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt
@@ -36,7 +36,7 @@ bool(false)
Warning: intlcal_set_minimal_days_in_first_week(): intlcal_set_minimal_days_in_first_week: invalid number of days; must be between 1 and 7 in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_set_minimal_days_in_first_week() must be an instance of IntlCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set_minimal_days_in_first_week() must be an instance of IntlCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlcal_set_minimal_days_in_first_week(1, 2)
#1 {main}
diff --git a/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt b/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt
index fa26ef3491..27f6215d52 100644
--- a/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt
+++ b/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt
@@ -79,7 +79,7 @@ Warning: intlcal_set_repeated_wall_time_option() expects exactly 2 parameters, 1
Warning: intlcal_set_repeated_wall_time_option(): intlcal_set_repeated_wall_time_option: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_set_repeated_wall_time_option() must be an instance of IntlCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set_repeated_wall_time_option() must be an instance of IntlCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlcal_set_repeated_wall_time_option(1, 1)
#1 {main}
diff --git a/ext/intl/tests/calendar_setTimeZone_error.phpt b/ext/intl/tests/calendar_setTimeZone_error.phpt
index 6230efad8a..410dc86c60 100644
--- a/ext/intl/tests/calendar_setTimeZone_error.phpt
+++ b/ext/intl/tests/calendar_setTimeZone_error.phpt
@@ -21,23 +21,23 @@ set_error_handler('eh');
try {
var_dump($c->setTimeZone($gmt, 2));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try {
var_dump($c->setTimeZone());
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try{
var_dump(intlcal_set_time_zone($c, 1, 2));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
try{
var_dump(intlcal_set_time_zone(1, $gmt));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
diff --git a/ext/intl/tests/calendar_setTime_error.phpt b/ext/intl/tests/calendar_setTime_error.phpt
index e086d77470..00bb7eb91d 100644
--- a/ext/intl/tests/calendar_setTime_error.phpt
+++ b/ext/intl/tests/calendar_setTime_error.phpt
@@ -34,7 +34,7 @@ Warning: intlcal_set_time() expects exactly 2 parameters, 3 given in %s on line
Warning: intlcal_set_time(): intlcal_set_time: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_set_time() must be an instance of IntlCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set_time() must be an instance of IntlCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlcal_set_time(1)
#1 {main}
diff --git a/ext/intl/tests/calendar_set_error.phpt b/ext/intl/tests/calendar_set_error.phpt
index ecbc822e55..c232b5640a 100644
--- a/ext/intl/tests/calendar_set_error.phpt
+++ b/ext/intl/tests/calendar_set_error.phpt
@@ -38,7 +38,7 @@ bool(false)
Warning: intlcal_set(): intlcal_set: invalid field in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_set() must be an instance of IntlCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set() must be an instance of IntlCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlcal_set(1, 2, 3)
#1 {main}
diff --git a/ext/intl/tests/calendar_toDateTime_error.phpt b/ext/intl/tests/calendar_toDateTime_error.phpt
index a4b7bc3807..3d3ada22b9 100644
--- a/ext/intl/tests/calendar_toDateTime_error.phpt
+++ b/ext/intl/tests/calendar_toDateTime_error.phpt
@@ -38,7 +38,7 @@ bool(false)
Warning: IntlCalendar::toDateTime(): intlcal_to_date_time: DateTimeZone constructor threw exception in %s on line %d
string(77) "exception: DateTimeZone::__construct(): Unknown or bad timezone (Etc/Unknown)"
-Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_to_date_time() must be an instance of IntlCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_to_date_time() must be an instance of IntlCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlcal_to_date_time(3)
#1 {main}
diff --git a/ext/intl/tests/formatter_fail.phpt b/ext/intl/tests/formatter_fail.phpt
index f7761173dd..72335e2022 100644
--- a/ext/intl/tests/formatter_fail.phpt
+++ b/ext/intl/tests/formatter_fail.phpt
@@ -21,7 +21,7 @@ function crt($t, $l, $s) {
case $t == "O":
try {
return new NumberFormatter($l, $s);
- } catch (BaseException $e) {
+ } catch (Throwable $e) {
print_exception($e);
return null;
}
@@ -45,7 +45,7 @@ $args = array(
try {
$fmt = new NumberFormatter();
-} catch (TypeException $e) {
+} catch (TypeError $e) {
print_exception($e);
$fmt = null;
}
@@ -66,7 +66,7 @@ foreach($args as $arg) {
?>
--EXPECTF--
-TypeException: NumberFormatter::__construct() expects at least 2 parameters, 0 given in %s on line %d
+TypeError: NumberFormatter::__construct() expects at least 2 parameters, 0 given in %s on line %d
'numfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
Warning: numfmt_create() expects at least 2 parameters, 0 given in %s on line %d
@@ -80,7 +80,7 @@ IntlException: Constructor failed in %sformatter_fail.php on line %d
'numfmt_create: number formatter creation failed: U_UNSUPPORTED_ERROR'
'numfmt_create: number formatter creation failed: U_UNSUPPORTED_ERROR'
-TypeException: NumberFormatter::__construct() expects parameter 1 to be string, array given in %s on line %d
+TypeError: NumberFormatter::__construct() expects parameter 1 to be string, array given in %s on line %d
'numfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
Warning: NumberFormatter::create() expects parameter 1 to be string, array given in %s on line %d
diff --git a/ext/intl/tests/gregoriancalendar___construct_error.phpt b/ext/intl/tests/gregoriancalendar___construct_error.phpt
index 7383bdee88..ccc87d9703 100644
--- a/ext/intl/tests/gregoriancalendar___construct_error.phpt
+++ b/ext/intl/tests/gregoriancalendar___construct_error.phpt
@@ -22,7 +22,7 @@ try {
}
try {
var_dump(new IntlGregorianCalendar(1,2,3,4,NULL,array()));
-} catch (TypeException $e) {
+} catch (TypeError $e) {
print_exception($e);
}
--EXPECTF--
diff --git a/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt b/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt
index 59d74aca1e..dd37788dd1 100644
--- a/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt
+++ b/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt
@@ -27,7 +27,7 @@ Warning: intlgregcal_get_gregorian_change() expects exactly 1 parameter, 2 given
Warning: intlgregcal_get_gregorian_change(): intlgregcal_get_gregorian_change: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlgregcal_get_gregorian_change() must be an instance of IntlGregorianCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlgregcal_get_gregorian_change() must be an instance of IntlGregorianCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlgregcal_get_gregorian_change(1)
#1 {main}
diff --git a/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt b/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt
index 04b047dd20..6c4803c68c 100644
--- a/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt
+++ b/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt
@@ -45,7 +45,7 @@ Warning: intlgregcal_is_leap_year() expects exactly 2 parameters, 1 given in %s
Warning: intlgregcal_is_leap_year(): intlgregcal_is_leap_year: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlgregcal_is_leap_year() must be an instance of IntlGregorianCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlgregcal_is_leap_year() must be an instance of IntlGregorianCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlgregcal_is_leap_year(1, 2)
#1 {main}
diff --git a/ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt b/ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt
index df74807ca8..f45672c178 100644
--- a/ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt
+++ b/ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt
@@ -39,7 +39,7 @@ Warning: intlgregcal_set_gregorian_change() expects exactly 2 parameters, 1 give
Warning: intlgregcal_set_gregorian_change(): intlgregcal_set_gregorian_change: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intlgregcal_set_gregorian_change() must be an instance of IntlGregorianCalendar, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intlgregcal_set_gregorian_change() must be an instance of IntlGregorianCalendar, integer given in %s:%d
Stack trace:
#0 %s(%d): intlgregcal_set_gregorian_change(1, 4)
#1 {main}
diff --git a/ext/intl/tests/msgfmt_fail.phpt b/ext/intl/tests/msgfmt_fail.phpt
index d7ca83d442..daeaa8f677 100644
--- a/ext/intl/tests/msgfmt_fail.phpt
+++ b/ext/intl/tests/msgfmt_fail.phpt
@@ -22,7 +22,7 @@ function crt($t, $l, $s) {
case $t == "O":
try {
return new MessageFormatter($l, $s);
- } catch (BaseException $e) {
+ } catch (Throwable $e) {
print_exception($e);
return null;
}
@@ -47,7 +47,7 @@ $args = array(
try {
$fmt = new MessageFormatter();
-} catch (TypeException $e) {
+} catch (TypeError $e) {
print_exception($e);
$fmt = null;
}
@@ -58,7 +58,7 @@ $fmt = MessageFormatter::create();
err($fmt);
try {
$fmt = new MessageFormatter('en');
-} catch (TypeException $e) {
+} catch (TypeError $e) {
print_exception($e);
$fmt = null;
}
@@ -79,7 +79,7 @@ foreach($args as $arg) {
?>
--EXPECTF--
-TypeException: MessageFormatter::__construct() expects exactly 2 parameters, 0 given in %s on line %d
+TypeError: MessageFormatter::__construct() expects exactly 2 parameters, 0 given in %s on line %d
'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
Warning: msgfmt_create() expects exactly 2 parameters, 0 given in %s on line %d
@@ -88,7 +88,7 @@ Warning: msgfmt_create() expects exactly 2 parameters, 0 given in %s on line %d
Warning: MessageFormatter::create() expects exactly 2 parameters, 0 given in %s on line %d
'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
-TypeException: MessageFormatter::__construct() expects exactly 2 parameters, 1 given in %s on line %d
+TypeError: MessageFormatter::__construct() expects exactly 2 parameters, 1 given in %s on line %d
'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
Warning: msgfmt_create() expects exactly 2 parameters, 1 given in %s on line %d
@@ -107,7 +107,7 @@ IntlException: Constructor failed in %smsgfmt_fail2.php on line %d
'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
-TypeException: MessageFormatter::__construct() expects parameter 1 to be string, array given in %s on line %d
+TypeError: MessageFormatter::__construct() expects parameter 1 to be string, array given in %s on line %d
'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
Warning: MessageFormatter::create() expects parameter 1 to be string, array given in %s on line %d
diff --git a/ext/intl/tests/msgfmt_fail2.phpt b/ext/intl/tests/msgfmt_fail2.phpt
index 6e34bfde68..5dcd09ccc8 100644
--- a/ext/intl/tests/msgfmt_fail2.phpt
+++ b/ext/intl/tests/msgfmt_fail2.phpt
@@ -22,7 +22,7 @@ function crt($t, $l, $s) {
case $t == "O":
try {
return new MessageFormatter($l, $s);
- } catch (BaseException $e) {
+ } catch (Throwable $e) {
print_exception($e);
return null;
}
@@ -47,7 +47,7 @@ $args = array(
try {
$fmt = new MessageFormatter();
-} catch (TypeException $e) {
+} catch (TypeError $e) {
print_exception($e);
$fmt = null;
}
@@ -58,7 +58,7 @@ $fmt = MessageFormatter::create();
err($fmt);
try {
$fmt = new MessageFormatter('en');
-} catch (TypeException $e) {
+} catch (TypeError $e) {
print_exception($e);
$fmt = null;
}
@@ -79,7 +79,7 @@ foreach($args as $arg) {
?>
--EXPECTF--
-TypeException: MessageFormatter::__construct() expects exactly 2 parameters, 0 given in %s on line %d
+TypeError: MessageFormatter::__construct() expects exactly 2 parameters, 0 given in %s on line %d
'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
Warning: msgfmt_create() expects exactly 2 parameters, 0 given in %s on line %d
@@ -88,7 +88,7 @@ Warning: msgfmt_create() expects exactly 2 parameters, 0 given in %s on line %d
Warning: MessageFormatter::create() expects exactly 2 parameters, 0 given in %s on line %d
'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
-TypeException: MessageFormatter::__construct() expects exactly 2 parameters, 1 given in %s on line %d
+TypeError: MessageFormatter::__construct() expects exactly 2 parameters, 1 given in %s on line %d
'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
Warning: msgfmt_create() expects exactly 2 parameters, 1 given in %s on line %d
@@ -107,7 +107,7 @@ IntlException: Constructor failed in %smsgfmt_fail2.php on line %d
'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
-TypeException: MessageFormatter::__construct() expects parameter 1 to be string, array given in %s on line %d
+TypeError: MessageFormatter::__construct() expects parameter 1 to be string, array given in %s on line %d
'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
Warning: MessageFormatter::create() expects parameter 1 to be string, array given in %s on line %d
diff --git a/ext/intl/tests/timezone_getCanonicalID_error.phpt b/ext/intl/tests/timezone_getCanonicalID_error.phpt
index b0a45bceaf..e268e216a8 100644
--- a/ext/intl/tests/timezone_getCanonicalID_error.phpt
+++ b/ext/intl/tests/timezone_getCanonicalID_error.phpt
@@ -29,7 +29,7 @@ bool(false)
Warning: IntlTimeZone::getCanonicalID(): intltz_get_canonical_id: could not convert time zone id to UTF-16 in %s on line %d
bool(false)
-Fatal error: Uncaught EngineException: Cannot pass parameter 2 by reference in %s:%d
+Fatal error: Uncaught Error: Cannot pass parameter 2 by reference in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/ext/intl/tests/timezone_getDSTSavings_error.phpt b/ext/intl/tests/timezone_getDSTSavings_error.phpt
index 5d9a1a2fc3..26526dc72e 100644
--- a/ext/intl/tests/timezone_getDSTSavings_error.phpt
+++ b/ext/intl/tests/timezone_getDSTSavings_error.phpt
@@ -20,7 +20,7 @@ Warning: IntlTimeZone::getDSTSavings() expects exactly 0 parameters, 1 given in
Warning: IntlTimeZone::getDSTSavings(): intltz_get_dst_savings: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intltz_get_dst_savings() must be an instance of IntlTimeZone, null given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_dst_savings() must be an instance of IntlTimeZone, null given in %s:%d
Stack trace:
#0 %s(%d): intltz_get_dst_savings(NULL)
#1 {main}
diff --git a/ext/intl/tests/timezone_getDisplayName_error.phpt b/ext/intl/tests/timezone_getDisplayName_error.phpt
index 89e77b5614..4089c42e3c 100644
--- a/ext/intl/tests/timezone_getDisplayName_error.phpt
+++ b/ext/intl/tests/timezone_getDisplayName_error.phpt
@@ -42,7 +42,7 @@ Warning: IntlTimeZone::getDisplayName() expects at most 3 parameters, 4 given in
Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intltz_get_display_name() must be an instance of IntlTimeZone, null given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_display_name() must be an instance of IntlTimeZone, null given in %s:%d
Stack trace:
#0 %s(%d): intltz_get_display_name(NULL, 1, false, 'pt_PT')
#1 {main}
diff --git a/ext/intl/tests/timezone_getErrorCode_error.phpt b/ext/intl/tests/timezone_getErrorCode_error.phpt
index 5d5f4d74a3..a6d704c035 100644
--- a/ext/intl/tests/timezone_getErrorCode_error.phpt
+++ b/ext/intl/tests/timezone_getErrorCode_error.phpt
@@ -20,7 +20,7 @@ Warning: IntlTimeZone::getErrorCode() expects exactly 0 parameters, 1 given in %
Warning: IntlTimeZone::getErrorCode(): intltz_get_error_code: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intltz_get_error_code() must be an instance of IntlTimeZone, null given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_error_code() must be an instance of IntlTimeZone, null given in %s:%d
Stack trace:
#0 %s(%d): intltz_get_error_code(NULL)
#1 {main}
diff --git a/ext/intl/tests/timezone_getErrorMessage_error.phpt b/ext/intl/tests/timezone_getErrorMessage_error.phpt
index 9a71ea4aac..2f7cfcfe2a 100644
--- a/ext/intl/tests/timezone_getErrorMessage_error.phpt
+++ b/ext/intl/tests/timezone_getErrorMessage_error.phpt
@@ -20,7 +20,7 @@ Warning: IntlTimeZone::getErrorMessage() expects exactly 0 parameters, 1 given i
Warning: IntlTimeZone::getErrorMessage(): intltz_get_error_message: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intltz_get_error_message() must be an instance of IntlTimeZone, null given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_error_message() must be an instance of IntlTimeZone, null given in %s:%d
Stack trace:
#0 %s(%d): intltz_get_error_message(NULL)
#1 {main}
diff --git a/ext/intl/tests/timezone_getID_error.phpt b/ext/intl/tests/timezone_getID_error.phpt
index 36932e1f8d..a08c506cee 100644
--- a/ext/intl/tests/timezone_getID_error.phpt
+++ b/ext/intl/tests/timezone_getID_error.phpt
@@ -20,7 +20,7 @@ Warning: IntlTimeZone::getID() expects exactly 0 parameters, 1 given in %s on li
Warning: IntlTimeZone::getID(): intltz_get_id: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intltz_get_id() must be an instance of IntlTimeZone, null given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_id() must be an instance of IntlTimeZone, null given in %s:%d
Stack trace:
#0 %s(%d): intltz_get_id(NULL)
#1 {main}
diff --git a/ext/intl/tests/timezone_getOffset_error.phpt b/ext/intl/tests/timezone_getOffset_error.phpt
index d87c2aab32..632fa5e85a 100644
--- a/ext/intl/tests/timezone_getOffset_error.phpt
+++ b/ext/intl/tests/timezone_getOffset_error.phpt
@@ -30,7 +30,7 @@ Warning: IntlTimeZone::getOffset() expects exactly 4 parameters, 5 given in %s o
Warning: IntlTimeZone::getOffset(): intltz_get_offset: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intltz_get_offset() must be an instance of IntlTimeZone, null given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_offset() must be an instance of IntlTimeZone, null given in %s:%d
Stack trace:
#0 %s(%d): intltz_get_offset(NULL, %d, false, NULL, NULL)
#1 {main}
diff --git a/ext/intl/tests/timezone_getRawOffset_error.phpt b/ext/intl/tests/timezone_getRawOffset_error.phpt
index 80f8ce01d2..1015ef4ddc 100644
--- a/ext/intl/tests/timezone_getRawOffset_error.phpt
+++ b/ext/intl/tests/timezone_getRawOffset_error.phpt
@@ -20,7 +20,7 @@ Warning: IntlTimeZone::getRawOffset() expects exactly 0 parameters, 1 given in %
Warning: IntlTimeZone::getRawOffset(): intltz_get_raw_offset: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intltz_get_raw_offset() must be an instance of IntlTimeZone, null given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_raw_offset() must be an instance of IntlTimeZone, null given in %s:%d
Stack trace:
#0 %s(%d): intltz_get_raw_offset(NULL)
#1 {main}
diff --git a/ext/intl/tests/timezone_hasSameRules_error.phpt b/ext/intl/tests/timezone_hasSameRules_error.phpt
index d3c25661e3..5fb5bdde7a 100644
--- a/ext/intl/tests/timezone_hasSameRules_error.phpt
+++ b/ext/intl/tests/timezone_hasSameRules_error.phpt
@@ -18,14 +18,14 @@ set_error_handler("error_handler");
$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
try {
var_dump($tz->hasSameRules('foo'));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
var_dump($ex->getCode(), $ex->getMessage());
echo "\n";
}
try {
var_dump(intltz_has_same_rules(null, $tz));
-} catch (EngineException $ex) {
+} catch (Error $ex) {
var_dump($ex->getCode(), $ex->getMessage());
echo "\n";
}
diff --git a/ext/intl/tests/timezone_toDateTimeZone_error.phpt b/ext/intl/tests/timezone_toDateTimeZone_error.phpt
index d0a9e73117..ecc5e2bef8 100644
--- a/ext/intl/tests/timezone_toDateTimeZone_error.phpt
+++ b/ext/intl/tests/timezone_toDateTimeZone_error.phpt
@@ -35,7 +35,7 @@ Warning: intltz_to_date_time_zone() expects exactly 1 parameter, 0 given in %s o
Warning: intltz_to_date_time_zone(): intltz_to_date_time_zone: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intltz_to_date_time_zone() must be an instance of IntlTimeZone, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intltz_to_date_time_zone() must be an instance of IntlTimeZone, integer given in %s:%d
Stack trace:
#0 %s(%d): intltz_to_date_time_zone(1)
#1 {main}
diff --git a/ext/intl/tests/timezone_useDaylightTime_error.phpt b/ext/intl/tests/timezone_useDaylightTime_error.phpt
index ab63d7a428..d3f9471671 100644
--- a/ext/intl/tests/timezone_useDaylightTime_error.phpt
+++ b/ext/intl/tests/timezone_useDaylightTime_error.phpt
@@ -19,7 +19,7 @@ Warning: IntlTimeZone::useDaylightTime() expects exactly 0 parameters, 1 given i
Warning: IntlTimeZone::useDaylightTime(): intltz_use_daylight_time: bad arguments in %s on line %d
bool(false)
-Fatal error: Uncaught TypeException: Argument 1 passed to intltz_use_daylight_time() must be an instance of IntlTimeZone, null given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to intltz_use_daylight_time() must be an instance of IntlTimeZone, null given in %s:%d
Stack trace:
#0 %s(%d): intltz_use_daylight_time(NULL)
#1 {main}
diff --git a/ext/intl/tests/transliterator_create_inverse_error.phpt b/ext/intl/tests/transliterator_create_inverse_error.phpt
index bebb3c44c6..ca3de096da 100644
--- a/ext/intl/tests/transliterator_create_inverse_error.phpt
+++ b/ext/intl/tests/transliterator_create_inverse_error.phpt
@@ -18,7 +18,7 @@ Warning: Transliterator::createInverse() expects exactly 0 parameters, 1 given i
Warning: Transliterator::createInverse(): transliterator_create_inverse: bad arguments in %s on line %d
-Fatal error: Uncaught TypeException: Argument 1 passed to transliterator_create_inverse() must be an instance of Transliterator, string given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to transliterator_create_inverse() must be an instance of Transliterator, string given in %s:%d
Stack trace:
#0 %s(%d): transliterator_create_inverse('jj')
#1 {main}
diff --git a/ext/intl/tests/transliterator_get_error_code_error.phpt b/ext/intl/tests/transliterator_get_error_code_error.phpt
index f2a0c7dabc..d65fea9904 100644
--- a/ext/intl/tests/transliterator_get_error_code_error.phpt
+++ b/ext/intl/tests/transliterator_get_error_code_error.phpt
@@ -21,7 +21,7 @@ Warning: Transliterator::getErrorCode() expects exactly 0 parameters, 1 given in
Warning: Transliterator::getErrorCode(): transliterator_get_error_code: unable to parse input params in %s on line %d
-Fatal error: Uncaught TypeException: Argument 1 passed to transliterator_get_error_code() must be an instance of Transliterator, array given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to transliterator_get_error_code() must be an instance of Transliterator, array given in %s:%d
Stack trace:
#0 %s(%d): transliterator_get_error_code(Array)
#1 {main}
diff --git a/ext/intl/tests/transliterator_get_error_message_error.phpt b/ext/intl/tests/transliterator_get_error_message_error.phpt
index 8f8f0be9f9..a6129ea271 100644
--- a/ext/intl/tests/transliterator_get_error_message_error.phpt
+++ b/ext/intl/tests/transliterator_get_error_message_error.phpt
@@ -21,7 +21,7 @@ Warning: Transliterator::getErrorMessage() expects exactly 0 parameters, 1 given
Warning: Transliterator::getErrorMessage(): transliterator_get_error_message: unable to parse input params in %s on line %d
-Fatal error: Uncaught TypeException: Argument 1 passed to transliterator_get_error_message() must be an instance of Transliterator, array given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to transliterator_get_error_message() must be an instance of Transliterator, array given in %s:%d
Stack trace:
#0 %s(%d): transliterator_get_error_message(Array)
#1 {main}
diff --git a/ext/intl/timezone/timezone_methods.cpp b/ext/intl/timezone/timezone_methods.cpp
index 641727d7ed..728f9bde8b 100644
--- a/ext/intl/timezone/timezone_methods.cpp
+++ b/ext/intl/timezone/timezone_methods.cpp
@@ -614,7 +614,7 @@ U_CFUNC PHP_FUNCTION(intltz_to_date_time_zone)
&TIMEZONE_ERROR(to), "intltz_to_date_time_zone", &tmp);
if (ret) {
- RETURN_ZVAL(ret, 1, 1);
+ ZVAL_COPY_VALUE(return_value, ret);
} else {
RETURN_FALSE;
}
diff --git a/ext/json/json.c b/ext/json/json.c
index 1caef65013..8088a89b4e 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -121,6 +121,7 @@ static PHP_MINIT_FUNCTION(json)
REGISTER_LONG_CONSTANT("JSON_ERROR_RECURSION", PHP_JSON_ERROR_RECURSION, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("JSON_ERROR_INF_OR_NAN", PHP_JSON_ERROR_INF_OR_NAN, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("JSON_ERROR_UNSUPPORTED_TYPE", PHP_JSON_ERROR_UNSUPPORTED_TYPE, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("JSON_ERROR_INVALID_PROPERTY_NAME", PHP_JSON_ERROR_INVALID_PROPERTY_NAME, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("JSON_OBJECT_AS_ARRAY", PHP_JSON_OBJECT_AS_ARRAY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("JSON_BIGINT_AS_STRING", PHP_JSON_BIGINT_AS_STRING, CONST_CS | CONST_PERSISTENT);
@@ -300,6 +301,8 @@ static PHP_FUNCTION(json_last_error_msg)
RETURN_STRING("Inf and NaN cannot be JSON encoded");
case PHP_JSON_ERROR_UNSUPPORTED_TYPE:
RETURN_STRING("Type is not supported");
+ case PHP_JSON_ERROR_INVALID_PROPERTY_NAME:
+ RETURN_STRING("The decoded property name is invalid");
default:
RETURN_STRING("Unknown error");
}
diff --git a/ext/json/json_parser.tab.c b/ext/json/json_parser.tab.c
index 45a982bbcc..052fc17137 100644
--- a/ext/json/json_parser.tab.c
+++ b/ext/json/json_parser.tab.c
@@ -204,7 +204,7 @@ int php_json_yyparse (php_json_parser *parser);
int php_json_yylex(union YYSTYPE *value, php_json_parser *parser);
void php_json_yyerror(php_json_parser *parser, char const *msg);
void php_json_parser_object_init(php_json_parser *parser, zval *object);
-void php_json_parser_object_update(php_json_parser *parser, zval *object, zend_string *key, zval *zvalue);
+int php_json_parser_object_update(php_json_parser *parser, zval *object, zend_string *key, zval *zvalue);
void php_json_parser_array_init(zval *object);
void php_json_parser_array_append(zval *array, zval *zvalue);
@@ -515,9 +515,9 @@ static const yytype_uint8 yytranslate[] =
static const yytype_uint8 yyrline[] =
{
0, 92, 92, 98, 105, 105, 113, 114, 123, 126,
- 130, 135, 140, 147, 152, 159, 159, 167, 168, 177,
- 180, 184, 189, 194, 201, 202, 206, 207, 208, 209,
- 210, 211, 212, 213, 214, 215, 219
+ 130, 136, 142, 149, 154, 161, 161, 169, 170, 179,
+ 182, 186, 191, 196, 203, 204, 208, 209, 210, 211,
+ 212, 213, 214, 215, 216, 217, 221
};
#endif
@@ -1499,7 +1499,8 @@ yyreduce:
{
php_json_parser_object_init(parser, &(yyval.value));
- php_json_parser_object_update(parser, &(yyval.value), (yyvsp[0].pair).key, &(yyvsp[0].pair).val);
+ if (php_json_parser_object_update(parser, &(yyval.value), (yyvsp[0].pair).key, &(yyvsp[0].pair).val) == FAILURE)
+ YYERROR;
}
break;
@@ -1507,7 +1508,8 @@ yyreduce:
case 11:
{
- php_json_parser_object_update(parser, &(yyvsp[-2].value), (yyvsp[0].pair).key, &(yyvsp[0].pair).val);
+ if (php_json_parser_object_update(parser, &(yyvsp[-2].value), (yyvsp[0].pair).key, &(yyvsp[0].pair).val) == FAILURE)
+ YYERROR;
ZVAL_COPY_VALUE(&(yyval.value), &(yyvsp[-2].value));
}
@@ -1860,7 +1862,7 @@ void php_json_parser_object_init(php_json_parser *parser, zval *object)
}
}
-void php_json_parser_object_update(php_json_parser *parser, zval *object, zend_string *key, zval *zvalue)
+int php_json_parser_object_update(php_json_parser *parser, zval *object, zend_string *key, zval *zvalue)
{
/* if JSON_OBJECT_AS_ARRAY is set */
if (Z_TYPE_P(object) == IS_ARRAY) {
@@ -1870,6 +1872,12 @@ void php_json_parser_object_update(php_json_parser *parser, zval *object, zend_s
if (key->len == 0) {
zend_string_release(key);
key = zend_string_init("_empty_", sizeof("_empty_") - 1, 0);
+ } else if (key->val[0] == '\0') {
+ parser->scanner.errcode = PHP_JSON_ERROR_INVALID_PROPERTY_NAME;
+ zend_string_release(key);
+ zval_dtor(zvalue);
+ zval_dtor(object);
+ return FAILURE;
}
ZVAL_NEW_STR(&zkey, key);
zend_std_write_property(object, &zkey, zvalue, NULL);
@@ -1879,6 +1887,8 @@ void php_json_parser_object_update(php_json_parser *parser, zval *object, zend_s
}
}
zend_string_release(key);
+
+ return SUCCESS;
}
void php_json_parser_array_init(zval *array)
diff --git a/ext/json/json_parser.y b/ext/json/json_parser.y
index 500a0ff11d..1521be69b8 100644
--- a/ext/json/json_parser.y
+++ b/ext/json/json_parser.y
@@ -73,7 +73,7 @@ int json_yydebug = 1;
int php_json_yylex(union YYSTYPE *value, php_json_parser *parser);
void php_json_yyerror(php_json_parser *parser, char const *msg);
void php_json_parser_object_init(php_json_parser *parser, zval *object);
-void php_json_parser_object_update(php_json_parser *parser, zval *object, zend_string *key, zval *zvalue);
+int php_json_parser_object_update(php_json_parser *parser, zval *object, zend_string *key, zval *zvalue);
void php_json_parser_array_init(zval *object);
void php_json_parser_array_append(zval *array, zval *zvalue);
@@ -130,11 +130,13 @@ member:
pair
{
php_json_parser_object_init(parser, &$$);
- php_json_parser_object_update(parser, &$$, $1.key, &$1.val);
+ if (php_json_parser_object_update(parser, &$$, $1.key, &$1.val) == FAILURE)
+ YYERROR;
}
| member ',' pair
{
- php_json_parser_object_update(parser, &$1, $3.key, &$3.val);
+ if (php_json_parser_object_update(parser, &$1, $3.key, &$3.val) == FAILURE)
+ YYERROR;
ZVAL_COPY_VALUE(&$$, &$1);
}
| member errlex
@@ -248,7 +250,7 @@ void php_json_parser_object_init(php_json_parser *parser, zval *object)
}
}
-void php_json_parser_object_update(php_json_parser *parser, zval *object, zend_string *key, zval *zvalue)
+int php_json_parser_object_update(php_json_parser *parser, zval *object, zend_string *key, zval *zvalue)
{
/* if JSON_OBJECT_AS_ARRAY is set */
if (Z_TYPE_P(object) == IS_ARRAY) {
@@ -258,6 +260,12 @@ void php_json_parser_object_update(php_json_parser *parser, zval *object, zend_s
if (key->len == 0) {
zend_string_release(key);
key = zend_string_init("_empty_", sizeof("_empty_") - 1, 0);
+ } else if (key->val[0] == '\0') {
+ parser->scanner.errcode = PHP_JSON_ERROR_INVALID_PROPERTY_NAME;
+ zend_string_release(key);
+ zval_dtor(zvalue);
+ zval_dtor(object);
+ return FAILURE;
}
ZVAL_NEW_STR(&zkey, key);
zend_std_write_property(object, &zkey, zvalue, NULL);
@@ -267,6 +275,8 @@ void php_json_parser_object_update(php_json_parser *parser, zval *object, zend_s
}
}
zend_string_release(key);
+
+ return SUCCESS;
}
void php_json_parser_array_init(zval *array)
diff --git a/ext/json/php_json.h b/ext/json/php_json.h
index 54d94da498..c47bc0f401 100644
--- a/ext/json/php_json.h
+++ b/ext/json/php_json.h
@@ -51,6 +51,7 @@ typedef enum {
PHP_JSON_ERROR_RECURSION,
PHP_JSON_ERROR_INF_OR_NAN,
PHP_JSON_ERROR_UNSUPPORTED_TYPE,
+ PHP_JSON_ERROR_INVALID_PROPERTY_NAME,
PHP_JSON_ERROR_UTF16
} php_json_error_code;
diff --git a/ext/json/tests/bug68546.phpt b/ext/json/tests/bug68546.phpt
new file mode 100644
index 0000000000..f8c8d135f3
--- /dev/null
+++ b/ext/json/tests/bug68546.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Bug #68546 (json_decode() Fatal error: Cannot access property started with '\0')
+--SKIPIF--
+<?php
+
+if (!extension_loaded('json')) die('skip');
+?>
+--FILE--
+<?php
+
+var_dump(json_decode('{"key": {"\u0000": "aa"}}'));
+var_dump(json_last_error() === JSON_ERROR_INVALID_PROPERTY_NAME);
+var_dump(json_decode('[{"key1": 0, "\u0000": 1}]'));
+var_dump(json_last_error() === JSON_ERROR_INVALID_PROPERTY_NAME);
+var_dump(json_last_error_msg());
+
+echo "Done\n";
+?>
+--EXPECTF--
+NULL
+bool(true)
+NULL
+bool(true)
+string(36) "The decoded property name is invalid"
+Done
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index b1fc1e4566..ebc2b7ba8b 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -96,10 +96,17 @@ static void _close_ldap_link(zend_resource *rsrc) /* {{{ */
{
ldap_linkdata *ld = (ldap_linkdata *)rsrc->ptr;
- ldap_unbind_s(ld->link);
-#if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC)
+ /* ldap_unbind_s() is deprecated;
+ * the distinction between ldap_unbind() and ldap_unbind_s() is moot */
+#ifdef LDAP_API_FEATURE_X_OPENLDAP
+ ldap_unbind_ext(ld->link, NULL, NULL);
+#ifdef HAVE_3ARG_SETREBINDPROC
zval_ptr_dtor(&ld->rebindproc);
#endif
+#else /* ! LDAP_API_FEATURE_X_OPENLDAP */
+ ldap_unbind_s(ld->link);
+#endif /* ! LDAP_API_FEATURE_X_OPENLDAP */
+
efree(ld);
LDAPG(num_links)--;
}
@@ -298,8 +305,14 @@ PHP_MINFO_FUNCTION(ldap)
PHP_FUNCTION(ldap_connect)
{
char *host = NULL;
- size_t hostlen;
- zend_long port = 389; /* Default port */
+ size_t hostlen = 0;
+ zend_long port =
+#ifdef LDAP_API_FEATURE_X_OPENLDAP
+ LDAP_PORT
+#else /* ! LDAP_API_FEATURE_X_OPENLDAP */
+ 389 /* Default port */
+#endif /* ! LDAP_API_FEATURE_X_OPENLDAP */
+ ;
#ifdef HAVE_ORALDAP
char *wallet = NULL, *walletpasswd = NULL;
size_t walletlen = 0, walletpasswdlen = 0;
@@ -307,7 +320,7 @@ PHP_FUNCTION(ldap_connect)
int ssl=0;
#endif
ldap_linkdata *ld;
- LDAP *ldap;
+ LDAP *ldap = NULL;
#ifdef HAVE_ORALDAP
if (ZEND_NUM_ARGS() == 3 || ZEND_NUM_ARGS() == 4) {
@@ -335,21 +348,37 @@ PHP_FUNCTION(ldap_connect)
ld = ecalloc(1, sizeof(ldap_linkdata));
#ifdef LDAP_API_FEATURE_X_OPENLDAP
- if (host != NULL && strchr(host, '/')) {
+ /* OpenLDAP provides a specific call to detect valid LDAP URIs;
+ * ldap_init()/ldap_open() is deprecated, use ldap_initialize() instead.
+ */
+ {
int rc;
+ char *url = host;
+ if (!ldap_is_ldap_url(url)) {
+ int urllen = hostlen + sizeof( "ldap://:65535" );
+
+ if (port <= 0 || port > 65535) {
+ php_error_docref(NULL, E_WARNING, "invalid port number: %ld", port);
+ RETURN_FALSE;
+ }
+
+ url = emalloc(urllen);
+ snprintf( url, urllen, "ldap://%s:%ld", host ? host : "", port );
+ }
- rc = ldap_initialize(&ldap, host);
+ rc = ldap_initialize(&ldap, url);
+ if (url != host) {
+ efree(url);
+ }
if (rc != LDAP_SUCCESS) {
efree(ld);
php_error_docref(NULL, E_WARNING, "Could not create session handle: %s", ldap_err2string(rc));
RETURN_FALSE;
}
- } else {
- ldap = ldap_init(host, port);
}
-#else
+#else /* ! LDAP_API_FEATURE_X_OPENLDAP */
ldap = ldap_open(host, port);
-#endif
+#endif /* ! LDAP_API_FEATURE_X_OPENLDAP */
if (ldap == NULL) {
efree(ld);
@@ -439,7 +468,21 @@ PHP_FUNCTION(ldap_bind)
RETURN_FALSE;
}
- if ((rc = ldap_bind_s(ld->link, ldap_bind_dn, ldap_bind_pw, LDAP_AUTH_SIMPLE)) != LDAP_SUCCESS) {
+#ifdef LDAP_API_FEATURE_X_OPENLDAP
+ {
+ struct berval cred;
+
+ /* ldap_bind_s() is deprecated; use ldap_sasl_bind_s() instead */
+ cred.bv_val = ldap_bind_pw;
+ cred.bv_len = ldap_bind_pw ? ldap_bind_pwlen : 0;
+ rc = ldap_sasl_bind_s(ld->link, ldap_bind_dn, LDAP_SASL_SIMPLE, &cred,
+ NULL, NULL, /* no controls right now */
+ NULL); /* we don't care about the server's credentials */
+ }
+#else
+ rc = ldap_bind_s(ld->link, ldap_bind_dn, ldap_bind_pw, LDAP_AUTH_SIMPLE);
+#endif
+ if ( rc != LDAP_SUCCESS) {
php_error_docref(NULL, E_WARNING, "Unable to bind to server: %s", ldap_err2string(rc));
RETURN_FALSE;
} else {
@@ -1314,7 +1357,12 @@ PHP_FUNCTION(ldap_explode_dn)
add_index_string(return_value, i, ldap_value[i]);
}
+#ifdef LDAP_API_FEATURE_X_OPENLDAP
+ /* ldap_value_free() is deprecated */
+ ber_memvfree((void **)ldap_value);
+#else /* ! LDAP_API_FEATURE_X_OPENLDAP */
ldap_value_free(ldap_value);
+#endif /* ! LDAP_API_FEATURE_X_OPENLDAP */
}
/* }}} */
diff --git a/ext/ldap/tests/bug48441.phpt b/ext/ldap/tests/bug48441.phpt
index 87256611d1..4f212e7402 100644
--- a/ext/ldap/tests/bug48441.phpt
+++ b/ext/ldap/tests/bug48441.phpt
@@ -12,9 +12,9 @@ require_once('skipifbindfailure.inc');
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
+insert_dummy_data($link, $base);
-$dn = "dc=my-domain,dc=com";
+$dn = "$base";
$filter = "(objectclass=person)";
var_dump(
@@ -36,7 +36,7 @@ var_dump(
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECTF--
resource(%d) of type (ldap result)
@@ -57,7 +57,7 @@ array(4) {
["count"]=>
int(1)
["dn"]=>
- string(28) "cn=userA,dc=my-domain,dc=com"
+ string(%d) "cn=userA,%s"
}
[1]=>
array(4) {
@@ -73,7 +73,7 @@ array(4) {
["count"]=>
int(1)
["dn"]=>
- string(28) "cn=userB,dc=my-domain,dc=com"
+ string(%d) "cn=userB,%s"
}
[2]=>
array(4) {
@@ -89,7 +89,7 @@ array(4) {
["count"]=>
int(1)
["dn"]=>
- string(37) "cn=userC,cn=userB,dc=my-domain,dc=com"
+ string(%d) "cn=userC,cn=userB,%s"
}
}
@@ -110,7 +110,7 @@ array(2) {
["count"]=>
int(1)
["dn"]=>
- string(28) "cn=userA,dc=my-domain,dc=com"
+ string(%d) "cn=userA,%s"
}
}
resource(%d) of type (ldap result)
@@ -131,7 +131,7 @@ array(4) {
["count"]=>
int(1)
["dn"]=>
- string(28) "cn=userA,dc=my-domain,dc=com"
+ string(%d) "cn=userA,%s"
}
[1]=>
array(4) {
@@ -147,7 +147,7 @@ array(4) {
["count"]=>
int(1)
["dn"]=>
- string(28) "cn=userB,dc=my-domain,dc=com"
+ string(%d) "cn=userB,%s"
}
[2]=>
array(4) {
@@ -163,7 +163,7 @@ array(4) {
["count"]=>
int(1)
["dn"]=>
- string(37) "cn=userC,cn=userB,dc=my-domain,dc=com"
+ string(%d) "cn=userC,cn=userB,%s"
}
}
===DONE===
diff --git a/ext/ldap/tests/connect.inc b/ext/ldap/tests/connect.inc
index ddb57828e9..002274cf55 100644
--- a/ext/ldap/tests/connect.inc
+++ b/ext/ldap/tests/connect.inc
@@ -1,13 +1,14 @@
<?php
/*
-Default values are "localhost", "root", database "test" and empty password.
+Default values are "localhost", "cn=Manager,dc=my-domain,dc=com", and password "secret".
Change the LDAP_TEST_* environment values if you want to use another configuration.
*/
$host = getenv("LDAP_TEST_HOST") ? getenv("LDAP_TEST_HOST") : "localhost";
$port = getenv("LDAP_TEST_PORT") ? getenv("LDAP_TEST_PORT") : 389;
-$user = getenv("LDAP_TEST_USER") ? getenv("LDAP_TEST_USER") : "cn=Manager,dc=my-domain,dc=com";
+$base = getenv("LDAP_TEST_BASE") ? getenv("LDAP_TEST_BASE") : "dc=my-domain,dc=com";
+$user = getenv("LDAP_TEST_USER") ? getenv("LDAP_TEST_USER") : "cn=Manager,$base";
$sasl_user = getenv("LDAP_TEST_SASL_USER") ? getenv("LDAP_TEST_SASL_USER") : "Manager";
$passwd = getenv("LDAP_TEST_PASSWD") ? getenv("LDAP_TEST_PASSWD") : "secret";
$protocol_version = getenv("LDAP_TEST_OPT_PROTOCOL_VERSION") ? getenv("LDAP_TEST_OPT_PROTOCOL_VERSION") : 3;
@@ -20,16 +21,14 @@ function ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version)
return $link;
}
-function insert_dummy_data($link) {
- ldap_add($link, "dc=my-domain,dc=com", array(
+function insert_dummy_data($link, $base) {
+ ldap_add($link, "o=test,$base", array(
"objectClass" => array(
- "top",
- "dcObject",
- "organization"),
- "dc" => "my-domain",
- "o" => "my-domain",
+ "top",
+ "organization"),
+ "o" => "test",
));
- ldap_add($link, "cn=userA,dc=my-domain,dc=com", array(
+ ldap_add($link, "cn=userA,$base", array(
"objectclass" => "person",
"cn" => "userA",
"sn" => "testSN1",
@@ -37,14 +36,14 @@ function insert_dummy_data($link) {
"telephoneNumber" => "xx-xx-xx-xx-xx",
"description" => "user A",
));
- ldap_add($link, "cn=userB,dc=my-domain,dc=com", array(
+ ldap_add($link, "cn=userB,$base", array(
"objectclass" => "person",
"cn" => "userB",
"sn" => "testSN2",
"userPassword" => "oopsIDitItAgain",
"description" => "user B",
));
- ldap_add($link, "cn=userC,cn=userB,dc=my-domain,dc=com", array(
+ ldap_add($link, "cn=userC,cn=userB,$base", array(
"objectclass" => "person",
"cn" => "userC",
"sn" => "testSN3",
@@ -52,10 +51,10 @@ function insert_dummy_data($link) {
));
}
-function remove_dummy_data($link) {
- ldap_delete($link, "cn=userC,cn=userB,dc=my-domain,dc=com");
- ldap_delete($link, "cn=userA,dc=my-domain,dc=com");
- ldap_delete($link, "cn=userB,dc=my-domain,dc=com");
- ldap_delete($link, "dc=my-domain,dc=com");
+function remove_dummy_data($link, $base) {
+ ldap_delete($link, "cn=userC,cn=userB,$base");
+ ldap_delete($link, "cn=userA,$base");
+ ldap_delete($link, "cn=userB,$base");
+ ldap_delete($link, "o=test,$base");
}
?>
diff --git a/ext/ldap/tests/ldap_add_basic.phpt b/ext/ldap/tests/ldap_add_basic.phpt
index ca65e4986d..46fd6578db 100644
--- a/ext/ldap/tests/ldap_add_basic.phpt
+++ b/ext/ldap/tests/ldap_add_basic.phpt
@@ -13,7 +13,7 @@ require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
var_dump(
- ldap_add($link, "dc=my-domain,dc=com", array(
+ ldap_add($link, "dc=my-domain,$base", array(
"objectClass" => array(
"top",
"dcObject",
@@ -23,7 +23,7 @@ var_dump(
)),
ldap_get_entries(
$link,
- ldap_search($link, "dc=my-domain,dc=com", "(o=my-domain)")
+ ldap_search($link, "$base", "(o=my-domain)")
)
);
?>
@@ -34,9 +34,9 @@ require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-ldap_delete($link, "dc=my-domain,dc=com");
+ldap_delete($link, "dc=my-domain,$base");
?>
---EXPECT--
+--EXPECTF--
bool(true)
array(2) {
["count"]=>
@@ -77,7 +77,7 @@ array(2) {
["count"]=>
int(3)
["dn"]=>
- string(19) "dc=my-domain,dc=com"
+ string(%d) "dc=my-domain,%s"
}
}
===DONE===
diff --git a/ext/ldap/tests/ldap_add_error.phpt b/ext/ldap/tests/ldap_add_error.phpt
index d17db6bfa3..a53277da80 100644
--- a/ext/ldap/tests/ldap_add_error.phpt
+++ b/ext/ldap/tests/ldap_add_error.phpt
@@ -15,12 +15,12 @@ $link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
// Too few parameters
var_dump(ldap_add());
var_dump(ldap_add($link));
-var_dump(ldap_add($link, "dc=my-domain,dc=com"));
+var_dump(ldap_add($link, "$base"));
// Too many parameters
-var_dump(ldap_add($link, "dc=my-domain,dc=com", array(), "Additional data"));
+var_dump(ldap_add($link, "$base", array(), "Additional data"));
-var_dump(ldap_add($link, "dc=my-domain,dc=com", array()));
+var_dump(ldap_add($link, "$base", array()));
// Invalid DN
var_dump(
@@ -34,14 +34,14 @@ var_dump(
// Duplicate entry
for ($i = 0; $i < 2; $i++)
var_dump(
- ldap_add($link, "dc=my-domain,dc=com", array(
- "objectClass" => array(
- "top",
- "dcObject",
- "organization"),
- "dc" => "my-domain",
- "o" => "my-domain",
- ))
+ ldap_add($link, "dc=my-domain,$base", array(
+ "objectClass" => array(
+ "top",
+ "dcObject",
+ "organization"),
+ "dc" => "my-domain",
+ "o" => "my-domain",
+ ))
);
var_dump(ldap_error($link), ldap_errno($link));
@@ -64,7 +64,7 @@ var_dump(
// Invalid attribute
var_dump(
- ldap_add($link, "dc=my-domain,dc=com", array(
+ ldap_add($link, "$base", array(
"objectClass" => array(
"top",
"dcObject",
@@ -78,7 +78,7 @@ var_dump(
);
var_dump(
- ldap_add($link, "dc=my-domain,dc=com", array(array( "Oops"
+ ldap_add($link, "$base", array(array( "Oops"
)))
/* Is this correct behaviour to still have "Undefined attribute type" as error/errno?
,
@@ -94,7 +94,7 @@ require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-ldap_delete($link, "dc=my-domain,dc=com");
+ldap_delete($link, "dc=my-domain,$base");
?>
--EXPECTF--
Warning: ldap_add() expects exactly 3 parameters, 0 given in %s on line %d
diff --git a/ext/ldap/tests/ldap_compare_basic.phpt b/ext/ldap/tests/ldap_compare_basic.phpt
index b0c5e97fb6..a8bb37f004 100644
--- a/ext/ldap/tests/ldap_compare_basic.phpt
+++ b/ext/ldap/tests/ldap_compare_basic.phpt
@@ -11,10 +11,10 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
+insert_dummy_data($link, $base);
var_dump(
- ldap_compare($link, "cn=userA,dc=my-domain,dc=com", "sn", "testSN1"),
- ldap_compare($link, "cn=userA,dc=my-domain,dc=com", "telephoneNumber", "yy-yy-yy-yy-yy")
+ ldap_compare($link, "cn=userA,$base", "sn", "testSN1"),
+ ldap_compare($link, "cn=userA,$base", "telephoneNumber", "yy-yy-yy-yy-yy")
);
?>
===DONE===
@@ -23,7 +23,7 @@ var_dump(
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECT--
bool(true)
diff --git a/ext/ldap/tests/ldap_compare_error.phpt b/ext/ldap/tests/ldap_compare_error.phpt
index 28127578fd..07393f6de6 100644
--- a/ext/ldap/tests/ldap_compare_error.phpt
+++ b/ext/ldap/tests/ldap_compare_error.phpt
@@ -11,7 +11,7 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
+insert_dummy_data($link, $base);
// Too few parameters
var_dump(ldap_compare($link));
@@ -22,7 +22,7 @@ var_dump(ldap_compare($link, $link, $link));
var_dump(ldap_compare($link, $link, $link, $link, "Additional data"));
var_dump(
- ldap_compare($link, "cn=userNotAvailable,dc=my-domain,dc=com", "sn", "testSN1"),
+ ldap_compare($link, "cn=userNotAvailable,$base", "sn", "testSN1"),
ldap_error($link),
ldap_errno($link)
);
@@ -33,7 +33,7 @@ var_dump(
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECTF--
Warning: ldap_compare() expects exactly 4 parameters, 1 given in %s on line %d
diff --git a/ext/ldap/tests/ldap_connect_error.phpt b/ext/ldap/tests/ldap_connect_error.phpt
index fa28fcf077..b93375c39e 100644
--- a/ext/ldap/tests/ldap_connect_error.phpt
+++ b/ext/ldap/tests/ldap_connect_error.phpt
@@ -13,7 +13,7 @@ require "connect.inc";
// too many arguments
var_dump(ldap_connect(null, null, null));
-var_dump(ldap_connect("ldap://$host:$port/dc=my-domain,dc=com"));
+var_dump(ldap_connect("ldap://$host:$port/$base"));
$links = array();
$links[0] = ldap_connect($host, $port);
diff --git a/ext/ldap/tests/ldap_control_paged_results_variation1.phpt b/ext/ldap/tests/ldap_control_paged_results_variation1.phpt
index 0e894464f4..862895e81d 100644
--- a/ext/ldap/tests/ldap_control_paged_results_variation1.phpt
+++ b/ext/ldap/tests/ldap_control_paged_results_variation1.phpt
@@ -12,10 +12,10 @@ require_once('skipifbindfailure.inc');
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
+insert_dummy_data($link, $base);
-$dn = "dc=my-domain,dc=com";
-$filter = "(cn=*)";
+$dn = "$base";
+$filter = "(cn=user*)";
var_dump(
ldap_control_paged_result($link, 1),
$result = ldap_search($link, $dn, $filter, array('cn')),
@@ -28,7 +28,7 @@ var_dump(
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECTF--
bool(true)
@@ -50,7 +50,7 @@ array(2) {
["count"]=>
int(1)
["dn"]=>
- string(28) "cn=userA,dc=my-domain,dc=com"
+ string(%d) "cn=userA,%s"
}
}
===DONE===
diff --git a/ext/ldap/tests/ldap_control_paged_results_variation2.phpt b/ext/ldap/tests/ldap_control_paged_results_variation2.phpt
index fee43fc4d6..4544a0b85a 100644
--- a/ext/ldap/tests/ldap_control_paged_results_variation2.phpt
+++ b/ext/ldap/tests/ldap_control_paged_results_variation2.phpt
@@ -12,10 +12,10 @@ require_once('skipifbindfailure.inc');
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
+insert_dummy_data($link, $base);
-$dn = "dc=my-domain,dc=com";
-$filter = "(cn=*)";
+$dn = "$base";
+$filter = "(cn=user*)";
var_dump(
ldap_control_paged_result($link, 2),
$result = ldap_search($link, $dn, $filter, array('cn')),
@@ -28,7 +28,7 @@ var_dump(
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECTF--
bool(true)
@@ -50,7 +50,7 @@ array(3) {
["count"]=>
int(1)
["dn"]=>
- string(28) "cn=userA,dc=my-domain,dc=com"
+ string(%d) "cn=userA,%s"
}
[1]=>
array(4) {
@@ -66,7 +66,7 @@ array(3) {
["count"]=>
int(1)
["dn"]=>
- string(28) "cn=userB,dc=my-domain,dc=com"
+ string(%d) "cn=userB,%s"
}
}
===DONE===
diff --git a/ext/ldap/tests/ldap_control_paged_results_variation3.phpt b/ext/ldap/tests/ldap_control_paged_results_variation3.phpt
index 43a68aea79..24eae9615f 100644
--- a/ext/ldap/tests/ldap_control_paged_results_variation3.phpt
+++ b/ext/ldap/tests/ldap_control_paged_results_variation3.phpt
@@ -12,10 +12,10 @@ require_once('skipifbindfailure.inc');
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
+insert_dummy_data($link, $base);
-$dn = "dc=my-domain,dc=com";
-$filter = "(cn=*)";
+$dn = "$base";
+$filter = "(cn=user*)";
$cookie = '';
var_dump(
ldap_control_paged_result($link, 2, true, $cookie),
@@ -33,7 +33,7 @@ var_dump(
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECTF--
bool(true)
@@ -55,7 +55,7 @@ array(3) {
["count"]=>
int(1)
["dn"]=>
- string(28) "cn=userA,dc=my-domain,dc=com"
+ string(%d) "cn=userA,%s"
}
[1]=>
array(4) {
@@ -71,7 +71,7 @@ array(3) {
["count"]=>
int(1)
["dn"]=>
- string(28) "cn=userB,dc=my-domain,dc=com"
+ string(%d) "cn=userB,%s"
}
}
bool(true)
@@ -94,7 +94,7 @@ array(2) {
["count"]=>
int(1)
["dn"]=>
- string(37) "cn=userC,cn=userB,dc=my-domain,dc=com"
+ string(%d) "cn=userC,cn=userB,%s"
}
}
===DONE===
diff --git a/ext/ldap/tests/ldap_count_entries_basic.phpt b/ext/ldap/tests/ldap_count_entries_basic.phpt
index a03f0596e9..7eef960614 100644
--- a/ext/ldap/tests/ldap_count_entries_basic.phpt
+++ b/ext/ldap/tests/ldap_count_entries_basic.phpt
@@ -11,8 +11,8 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
-$result = ldap_search($link, "dc=my-domain,dc=com", "(objectclass=person)");
+insert_dummy_data($link, $base);
+$result = ldap_search($link, "$base", "(objectclass=person)");
var_dump(ldap_count_entries($link, $result));
?>
===DONE===
@@ -21,7 +21,7 @@ var_dump(ldap_count_entries($link, $result));
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECT--
int(3)
diff --git a/ext/ldap/tests/ldap_delete_basic.phpt b/ext/ldap/tests/ldap_delete_basic.phpt
index 1457384784..84499f2a06 100644
--- a/ext/ldap/tests/ldap_delete_basic.phpt
+++ b/ext/ldap/tests/ldap_delete_basic.phpt
@@ -11,7 +11,7 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-ldap_add($link, "dc=my-domain,dc=com", array(
+ldap_add($link, "dc=my-domain,$base", array(
"objectClass" => array(
"top",
"dcObject",
@@ -21,8 +21,8 @@ ldap_add($link, "dc=my-domain,dc=com", array(
));
var_dump(
- ldap_delete($link, "dc=my-domain,dc=com"),
- @ldap_search($link, "dc=my-domain,dc=com", "(o=my-domain)")
+ ldap_delete($link, "dc=my-domain,$base"),
+ @ldap_search($link, "dc=my-domain,$base", "(o=my-domain)")
);
?>
===DONE===
@@ -32,7 +32,7 @@ require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-ldap_delete($link, "dc=my-domain,dc=com");
+ldap_delete($link, "dc=my-domain,$base");
?>
--EXPECT--
bool(true)
diff --git a/ext/ldap/tests/ldap_delete_error.phpt b/ext/ldap/tests/ldap_delete_error.phpt
index 6ef997bb03..1d160f1074 100644
--- a/ext/ldap/tests/ldap_delete_error.phpt
+++ b/ext/ldap/tests/ldap_delete_error.phpt
@@ -17,7 +17,7 @@ var_dump(ldap_delete());
var_dump(ldap_delete($link));
// Too many parameters
-var_dump(ldap_delete($link, "dc=my-domain,dc=com", "Additional data"));
+var_dump(ldap_delete($link, "$base", "Additional data"));
// Invalid DN
var_dump(
@@ -28,7 +28,7 @@ var_dump(
// Deleting unexisting data
var_dump(
- ldap_delete($link, "dc=my-domain,dc=com"),
+ ldap_delete($link, "dc=my-domain,$base"),
ldap_error($link),
ldap_errno($link)
);
diff --git a/ext/ldap/tests/ldap_errno_basic.phpt b/ext/ldap/tests/ldap_errno_basic.phpt
index 4b02ac6d65..58fa9387c0 100644
--- a/ext/ldap/tests/ldap_errno_basic.phpt
+++ b/ext/ldap/tests/ldap_errno_basic.phpt
@@ -11,7 +11,7 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-@ldap_add($link, "badDN dc=my-domain,dc=com", array(
+@ldap_add($link, "badDN $base", array(
"objectClass" => array(
"top",
"dcObject",
diff --git a/ext/ldap/tests/ldap_error_basic.phpt b/ext/ldap/tests/ldap_error_basic.phpt
index 64e4ef6170..ba42d1d32e 100644
--- a/ext/ldap/tests/ldap_error_basic.phpt
+++ b/ext/ldap/tests/ldap_error_basic.phpt
@@ -11,7 +11,7 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-@ldap_add($link, "badDN dc=my-domain,dc=com", array(
+@ldap_add($link, "badDN $base", array(
"objectClass" => array(
"top",
"dcObject",
diff --git a/ext/ldap/tests/ldap_first_attribute_basic.phpt b/ext/ldap/tests/ldap_first_attribute_basic.phpt
index 8e506fae8f..eec67c5f90 100644
--- a/ext/ldap/tests/ldap_first_attribute_basic.phpt
+++ b/ext/ldap/tests/ldap_first_attribute_basic.phpt
@@ -11,8 +11,8 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
-$result = ldap_search($link, "dc=my-domain,dc=com", "(objectclass=organization)");
+insert_dummy_data($link, $base);
+$result = ldap_search($link, "$base", "(objectclass=organization)", array("objectClass"));
$entry = ldap_first_entry($link, $result);
var_dump(
ldap_first_attribute($link, $entry)
@@ -24,7 +24,7 @@ var_dump(
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECT--
string(11) "objectClass"
diff --git a/ext/ldap/tests/ldap_first_entry_basic.phpt b/ext/ldap/tests/ldap_first_entry_basic.phpt
index 9b658227e7..5ba6ac42a4 100644
--- a/ext/ldap/tests/ldap_first_entry_basic.phpt
+++ b/ext/ldap/tests/ldap_first_entry_basic.phpt
@@ -11,8 +11,8 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
-$result = ldap_search($link, "dc=my-domain,dc=com", "(objectclass=person)");
+insert_dummy_data($link, $base);
+$result = ldap_search($link, "$base", "(objectclass=person)");
var_dump(
$entry = ldap_first_entry($link, $result),
ldap_get_values($link, $entry, 'sn')
@@ -24,7 +24,7 @@ var_dump(
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECTF--
resource(%d) of type (ldap result entry)
diff --git a/ext/ldap/tests/ldap_first_reference_basic.phpt b/ext/ldap/tests/ldap_first_reference_basic.phpt
index d7834896a2..37155a796c 100644
--- a/ext/ldap/tests/ldap_first_reference_basic.phpt
+++ b/ext/ldap/tests/ldap_first_reference_basic.phpt
@@ -10,14 +10,14 @@ Patrick Allaert <patrickallaert@php.net>
<?php
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
-ldap_add($link, "cn=userref,dc=my-domain,dc=com", array(
+insert_dummy_data($link, $base);
+ldap_add($link, "cn=userref,$base", array(
"objectClass" => array("extensibleObject", "referral"),
"cn" => "userref",
- "ref" => "cn=userA,dc=my-domain,dc=com",
+ "ref" => "cn=userA,$base",
));
ldap_set_option($link, LDAP_OPT_DEREF, LDAP_DEREF_NEVER);
-$result = ldap_search($link, "dc=my-domain,dc=com", "(cn=*)");
+$result = ldap_search($link, "$base", "(cn=*)");
var_dump($ref = ldap_first_reference($link, $result));
$refs = null;
ldap_parse_reference($link, $ref, $refs);
@@ -31,13 +31,13 @@ include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
// Referral can only be removed with Manage DSA IT Control
ldap_set_option($link, LDAP_OPT_SERVER_CONTROLS, array(array("oid" => "2.16.840.1.113730.3.4.2")));
-ldap_delete($link, "cn=userref,dc=my-domain,dc=com");
-remove_dummy_data($link);
+ldap_delete($link, "cn=userref,$base");
+remove_dummy_data($link, $base);
?>
--EXPECTF--
resource(%d) of type (ldap result entry)
array(1) {
[0]=>
- string(28) "cn=userA,dc=my-domain,dc=com"
+ string(%d) "cn=userA,%s"
}
===DONE===
diff --git a/ext/ldap/tests/ldap_free_result_basic.phpt b/ext/ldap/tests/ldap_free_result_basic.phpt
index 33e47d6eae..ff2f5402c3 100644
--- a/ext/ldap/tests/ldap_free_result_basic.phpt
+++ b/ext/ldap/tests/ldap_free_result_basic.phpt
@@ -11,8 +11,8 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
-$result = ldap_search($link, "dc=my-domain,dc=com", "(objectclass=person)");
+insert_dummy_data($link, $base);
+$result = ldap_search($link, "$base", "(objectclass=person)");
var_dump(ldap_free_result($result));
?>
===DONE===
@@ -21,7 +21,7 @@ var_dump(ldap_free_result($result));
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECT--
bool(true)
diff --git a/ext/ldap/tests/ldap_get_attributes_basic.phpt b/ext/ldap/tests/ldap_get_attributes_basic.phpt
index 82074c592a..c380432d1b 100644
--- a/ext/ldap/tests/ldap_get_attributes_basic.phpt
+++ b/ext/ldap/tests/ldap_get_attributes_basic.phpt
@@ -11,8 +11,8 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
-$result = ldap_search($link, "dc=my-domain,dc=com", "(objectclass=organization)");
+insert_dummy_data($link, $base);
+$result = ldap_search($link, "$base", "(o=test)");
$entry = ldap_first_entry($link, $result);
var_dump(
ldap_get_attributes($link, $entry)
@@ -24,42 +24,31 @@ var_dump(
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
---EXPECT--
-array(7) {
+--EXPECTF--
+array(5) {
["objectClass"]=>
- array(4) {
+ array(3) {
["count"]=>
- int(3)
+ int(2)
[0]=>
string(3) "top"
[1]=>
- string(8) "dcObject"
- [2]=>
string(12) "organization"
}
[0]=>
string(11) "objectClass"
- ["dc"]=>
- array(2) {
- ["count"]=>
- int(1)
- [0]=>
- string(9) "my-domain"
- }
- [1]=>
- string(2) "dc"
["o"]=>
array(2) {
["count"]=>
int(1)
[0]=>
- string(9) "my-domain"
+ string(4) "test"
}
- [2]=>
+ [1]=>
string(1) "o"
["count"]=>
- int(3)
+ int(2)
}
===DONE===
diff --git a/ext/ldap/tests/ldap_get_dn_basic.phpt b/ext/ldap/tests/ldap_get_dn_basic.phpt
index e70e7bf6c5..38c252c5bb 100644
--- a/ext/ldap/tests/ldap_get_dn_basic.phpt
+++ b/ext/ldap/tests/ldap_get_dn_basic.phpt
@@ -11,8 +11,8 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
-$result = ldap_search($link, "dc=my-domain,dc=com", "(objectclass=organization)");
+insert_dummy_data($link, $base);
+$result = ldap_search($link, "$base", "(objectclass=organization)");
$entry = ldap_first_entry($link, $result);
var_dump(
ldap_get_dn($link, $entry)
@@ -24,8 +24,8 @@ var_dump(
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
---EXPECT--
-string(19) "dc=my-domain,dc=com"
+--EXPECTF--
+string(%d) "%s"
===DONE===
diff --git a/ext/ldap/tests/ldap_get_entries_basic.phpt b/ext/ldap/tests/ldap_get_entries_basic.phpt
index 90dbb26146..3efa818ee2 100644
--- a/ext/ldap/tests/ldap_get_entries_basic.phpt
+++ b/ext/ldap/tests/ldap_get_entries_basic.phpt
@@ -11,12 +11,12 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
+insert_dummy_data($link, $base);
var_dump(
ldap_get_entries(
$link,
- ldap_search($link, "dc=my-domain,dc=com", "(o=my-domain)")
+ ldap_search($link, "$base", "(o=test)")
)
);
?>
@@ -26,49 +26,38 @@ var_dump(
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
---EXPECT--
+--EXPECTF--
array(2) {
["count"]=>
int(1)
[0]=>
- array(8) {
+ array(6) {
["objectclass"]=>
- array(4) {
+ array(3) {
["count"]=>
- int(3)
+ int(2)
[0]=>
string(3) "top"
[1]=>
- string(8) "dcObject"
- [2]=>
string(12) "organization"
}
[0]=>
string(11) "objectclass"
- ["dc"]=>
- array(2) {
- ["count"]=>
- int(1)
- [0]=>
- string(9) "my-domain"
- }
- [1]=>
- string(2) "dc"
["o"]=>
array(2) {
["count"]=>
int(1)
[0]=>
- string(9) "my-domain"
+ string(4) "test"
}
- [2]=>
+ [1]=>
string(1) "o"
["count"]=>
- int(3)
+ int(2)
["dn"]=>
- string(19) "dc=my-domain,dc=com"
+ string(%d) "o=test,%s"
}
}
===DONE===
diff --git a/ext/ldap/tests/ldap_get_entries_variation.phpt b/ext/ldap/tests/ldap_get_entries_variation.phpt
index cb0f306d5c..87d155a94c 100644
--- a/ext/ldap/tests/ldap_get_entries_variation.phpt
+++ b/ext/ldap/tests/ldap_get_entries_variation.phpt
@@ -11,12 +11,12 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
+insert_dummy_data($link, $base);
var_dump(
ldap_get_entries(
$link,
- ldap_search($link, "dc=my-domain,dc=com", "(o=my-unexisting-domain)")
+ ldap_search($link, "$base", "(o=my-unexisting-domain)")
)
);
?>
@@ -26,7 +26,7 @@ var_dump(
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECT--
array(1) {
diff --git a/ext/ldap/tests/ldap_get_values_len_basic.phpt b/ext/ldap/tests/ldap_get_values_len_basic.phpt
index ed8461427b..33084f48ab 100644
--- a/ext/ldap/tests/ldap_get_values_len_basic.phpt
+++ b/ext/ldap/tests/ldap_get_values_len_basic.phpt
@@ -11,8 +11,8 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
-$result = ldap_search($link, "dc=my-domain,dc=com", "(objectclass=organization)");
+insert_dummy_data($link, $base);
+$result = ldap_search($link, "$base", "(o=test)");
$entry = ldap_first_entry($link, $result);
var_dump(
ldap_get_values_len($link, $entry, "o")
@@ -24,12 +24,12 @@ var_dump(
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECT--
array(2) {
[0]=>
- string(9) "my-domain"
+ string(4) "test"
["count"]=>
int(1)
}
diff --git a/ext/ldap/tests/ldap_get_values_len_error.phpt b/ext/ldap/tests/ldap_get_values_len_error.phpt
index 45f9031df4..8bcaee070f 100644
--- a/ext/ldap/tests/ldap_get_values_len_error.phpt
+++ b/ext/ldap/tests/ldap_get_values_len_error.phpt
@@ -11,8 +11,8 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
-$result = ldap_search($link, "dc=my-domain,dc=com", "(objectclass=organization)");
+insert_dummy_data($link, $base);
+$result = ldap_search($link, "$base", "(objectclass=organization)");
$entry = ldap_first_entry($link, $result);
// Too few parameters
@@ -28,7 +28,7 @@ var_dump(ldap_get_values_len($link, $entry, "inexistentAttribute"));
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECTF--
Warning: ldap_get_values_len() expects exactly 3 parameters, 1 given in %s on line %d
diff --git a/ext/ldap/tests/ldap_list_basic.phpt b/ext/ldap/tests/ldap_list_basic.phpt
index 1993f30f1f..3f98bc8e2d 100644
--- a/ext/ldap/tests/ldap_list_basic.phpt
+++ b/ext/ldap/tests/ldap_list_basic.phpt
@@ -14,9 +14,9 @@ require_once('skipifbindfailure.inc');
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
+insert_dummy_data($link, $base);
var_dump(
- $result = ldap_list($link, "dc=my-domain,dc=com", "(objectClass=person)"),
+ $result = ldap_list($link, "$base", "(objectClass=person)"),
ldap_get_entries($link, $result)
);
?>
@@ -26,7 +26,7 @@ var_dump(
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECTF--
resource(%d) of type (ldap result)
@@ -92,7 +92,7 @@ array(3) {
["count"]=>
int(6)
["dn"]=>
- string(28) "cn=userA,dc=my-domain,dc=com"
+ string(%d) "cn=userA,%s"
}
[1]=>
array(12) {
@@ -144,7 +144,7 @@ array(3) {
["count"]=>
int(5)
["dn"]=>
- string(28) "cn=userB,dc=my-domain,dc=com"
+ string(%d) "cn=userB,%s"
}
}
===DONE===
diff --git a/ext/ldap/tests/ldap_list_error.phpt b/ext/ldap/tests/ldap_list_error.phpt
index d234d0aa3b..51bcaa583f 100644
--- a/ext/ldap/tests/ldap_list_error.phpt
+++ b/ext/ldap/tests/ldap_list_error.phpt
@@ -17,7 +17,7 @@ var_dump(ldap_list($link));
var_dump(ldap_list($link, $link));
// Too many parameters
-var_dump(ldap_list($link, "dc=my-domain,dc=com", "(objectClass=*)", array(), 0, 0, 0, 0 , "Additional data"));
+var_dump(ldap_list($link, "$base", "(objectClass=*)", array(), 0, 0, 0, 0 , "Additional data"));
?>
===DONE===
--EXPECTF--
diff --git a/ext/ldap/tests/ldap_mod_add_basic.phpt b/ext/ldap/tests/ldap_mod_add_basic.phpt
index 8c8164cfa1..a05a6a0418 100644
--- a/ext/ldap/tests/ldap_mod_add_basic.phpt
+++ b/ext/ldap/tests/ldap_mod_add_basic.phpt
@@ -11,17 +11,17 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
+insert_dummy_data($link, $base);
$entry = array(
"description" => "Domain description",
);
var_dump(
- ldap_mod_add($link, "dc=my-domain,dc=com", $entry),
+ ldap_mod_add($link, "o=test,$base", $entry),
ldap_get_entries(
$link,
- ldap_search($link, "dc=my-domain,dc=com", "(Description=Domain description)")
+ ldap_search($link, "o=test,$base", "(Description=Domain description)")
)
);
?>
@@ -32,45 +32,34 @@ require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
---EXPECT--
+--EXPECTF--
bool(true)
array(2) {
["count"]=>
int(1)
[0]=>
- array(10) {
+ array(8) {
["objectclass"]=>
- array(4) {
+ array(3) {
["count"]=>
- int(3)
+ int(2)
[0]=>
string(3) "top"
[1]=>
- string(8) "dcObject"
- [2]=>
string(12) "organization"
}
[0]=>
string(11) "objectclass"
- ["dc"]=>
- array(2) {
- ["count"]=>
- int(1)
- [0]=>
- string(9) "my-domain"
- }
- [1]=>
- string(2) "dc"
["o"]=>
array(2) {
["count"]=>
int(1)
[0]=>
- string(9) "my-domain"
+ string(4) "test"
}
- [2]=>
+ [1]=>
string(1) "o"
["description"]=>
array(2) {
@@ -79,12 +68,12 @@ array(2) {
[0]=>
string(18) "Domain description"
}
- [3]=>
+ [2]=>
string(11) "description"
["count"]=>
- int(4)
+ int(3)
["dn"]=>
- string(19) "dc=my-domain,dc=com"
+ string(%d) "o=test,%s"
}
}
===DONE===
diff --git a/ext/ldap/tests/ldap_mod_add_error.phpt b/ext/ldap/tests/ldap_mod_add_error.phpt
index 4ba1ef9bb3..c04e2cbd3d 100644
--- a/ext/ldap/tests/ldap_mod_add_error.phpt
+++ b/ext/ldap/tests/ldap_mod_add_error.phpt
@@ -15,13 +15,13 @@ $link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
// Too few parameters
var_dump(ldap_mod_add());
var_dump(ldap_mod_add($link));
-var_dump(ldap_mod_add($link, "dc=my-domain,dc=com"));
+var_dump(ldap_mod_add($link, "$base"));
// Too many parameters
-var_dump(ldap_mod_add($link, "dc=my-domain,dc=com", array(), "Additional data"));
+var_dump(ldap_mod_add($link, "$base", array(), "Additional data"));
// DN not found
-var_dump(ldap_mod_add($link, "dc=my-domain,dc=com", array()));
+var_dump(ldap_mod_add($link, "dc=my-domain,$base", array()));
// Invalid DN
var_dump(ldap_mod_add($link, "weirdAttribute=val", array()));
@@ -35,17 +35,17 @@ $entry = array(
"o" => "my-domain",
);
-ldap_add($link, "dc=my-domain,dc=com", $entry);
+ldap_add($link, "dc=my-domain,$base", $entry);
$entry2 = $entry;
$entry2["dc"] = "Wrong Domain";
-var_dump(ldap_mod_add($link, "dc=my-domain,dc=com", $entry2));
+var_dump(ldap_mod_add($link, "dc=my-domain,$base", $entry2));
$entry2 = $entry;
$entry2["weirdAttribute"] = "weirdVal";
-var_dump(ldap_mod_add($link, "dc=my-domain,dc=com", $entry2));
+var_dump(ldap_mod_add($link, "dc=my-domain,$base", $entry2));
?>
===DONE===
--CLEAN--
@@ -54,7 +54,7 @@ require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-ldap_delete($link, "dc=my-domain,dc=com");
+ldap_delete($link, "dc=my-domain,$base");
?>
--EXPECTF--
Warning: ldap_mod_add() expects exactly 3 parameters, 0 given in %s on line %d
diff --git a/ext/ldap/tests/ldap_mod_del_basic.phpt b/ext/ldap/tests/ldap_mod_del_basic.phpt
index c7daba44de..788ac0adb3 100644
--- a/ext/ldap/tests/ldap_mod_del_basic.phpt
+++ b/ext/ldap/tests/ldap_mod_del_basic.phpt
@@ -11,17 +11,17 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
+insert_dummy_data($link, $base);
$entry = array(
"description" => "user A"
);
var_dump(
- ldap_mod_del($link, "cn=userA,dc=my-domain,dc=com", $entry),
+ ldap_mod_del($link, "cn=userA,$base", $entry),
ldap_get_entries(
$link,
- ldap_search($link, "dc=my-domain,dc=com", "(description=user A)")
+ ldap_search($link, "$base", "(description=user A)")
)
);
?>
@@ -32,7 +32,7 @@ require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECT--
bool(true)
diff --git a/ext/ldap/tests/ldap_mod_del_error.phpt b/ext/ldap/tests/ldap_mod_del_error.phpt
index 71bac9f28c..679adb6e6e 100644
--- a/ext/ldap/tests/ldap_mod_del_error.phpt
+++ b/ext/ldap/tests/ldap_mod_del_error.phpt
@@ -15,19 +15,19 @@ $link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
// Too few parameters
var_dump(ldap_mod_del());
var_dump(ldap_mod_del($link));
-var_dump(ldap_mod_del($link, "dc=my-domain,dc=com"));
+var_dump(ldap_mod_del($link, "$base"));
// Too many parameters
-var_dump(ldap_mod_del($link, "dc=my-domain,dc=com", array(), "Additional data"));
+var_dump(ldap_mod_del($link, "$base", array(), "Additional data"));
// DN not found
-var_dump(ldap_mod_del($link, "dc=my-domain,dc=com", array()));
+var_dump(ldap_mod_del($link, "dc=my-domain,$base", array()));
// Invalid DN
var_dump(ldap_mod_del($link, "weirdAttribute=val", array()));
// Invalid attributes
-var_dump(ldap_mod_del($link, "dc=my-domain,dc=com", array('dc')));
+var_dump(ldap_mod_del($link, "$base", array('dc')));
?>
===DONE===
--CLEAN--
@@ -36,7 +36,7 @@ require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-ldap_delete($link, "dc=my-domain,dc=com");
+ldap_delete($link, "dc=my-domain,$base");
?>
--EXPECTF--
Warning: ldap_mod_del() expects exactly 3 parameters, 0 given in %s on line %d
diff --git a/ext/ldap/tests/ldap_mod_replace_basic.phpt b/ext/ldap/tests/ldap_mod_replace_basic.phpt
index d1670ec02b..8e9fd4dcad 100644
--- a/ext/ldap/tests/ldap_mod_replace_basic.phpt
+++ b/ext/ldap/tests/ldap_mod_replace_basic.phpt
@@ -11,17 +11,17 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
+insert_dummy_data($link, $base);
$entry = array(
"description" => "user X"
);
var_dump(
- ldap_mod_replace($link, "cn=userA,dc=my-domain,dc=com", $entry),
+ ldap_mod_replace($link, "cn=userA,$base", $entry),
ldap_get_entries(
$link,
- ldap_search($link, "dc=my-domain,dc=com", "(description=user X)", array("description"))
+ ldap_search($link, "$base", "(description=user X)", array("description"))
)
);
?>
@@ -32,9 +32,9 @@ require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
---EXPECT--
+--EXPECTF--
bool(true)
array(2) {
["count"]=>
@@ -53,7 +53,7 @@ array(2) {
["count"]=>
int(1)
["dn"]=>
- string(28) "cn=userA,dc=my-domain,dc=com"
+ string(%d) "cn=userA,%s"
}
}
===DONE===
diff --git a/ext/ldap/tests/ldap_mod_replace_error.phpt b/ext/ldap/tests/ldap_mod_replace_error.phpt
index 0409e3e386..f796568d07 100644
--- a/ext/ldap/tests/ldap_mod_replace_error.phpt
+++ b/ext/ldap/tests/ldap_mod_replace_error.phpt
@@ -15,19 +15,19 @@ $link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
// Too few parameters
var_dump(ldap_mod_replace());
var_dump(ldap_mod_replace($link));
-var_dump(ldap_mod_replace($link, "dc=my-domain,dc=com"));
+var_dump(ldap_mod_replace($link, "$base"));
// Too many parameters
-var_dump(ldap_mod_replace($link, "dc=my-domain,dc=com", array(), "Additional data"));
+var_dump(ldap_mod_replace($link, "$base", array(), "Additional data"));
// DN not found
-var_dump(ldap_mod_replace($link, "dc=my-domain,dc=com", array()));
+var_dump(ldap_mod_replace($link, "dc=my-domain,$base", array()));
// Invalid DN
var_dump(ldap_mod_replace($link, "weirdAttribute=val", array()));
// Invalid attributes
-var_dump(ldap_mod_replace($link, "dc=my-domain,dc=com", array('dc')));
+var_dump(ldap_mod_replace($link, "$base", array('dc')));
?>
===DONE===
--CLEAN--
@@ -35,8 +35,6 @@ var_dump(ldap_mod_replace($link, "dc=my-domain,dc=com", array('dc')));
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-
-ldap_delete($link, "dc=my-domain,dc=com");
?>
--EXPECTF--
Warning: ldap_mod_replace() expects exactly 3 parameters, 0 given in %s on line %d
diff --git a/ext/ldap/tests/ldap_modify_basic.phpt b/ext/ldap/tests/ldap_modify_basic.phpt
index 74bd831291..2f6a51af4d 100644
--- a/ext/ldap/tests/ldap_modify_basic.phpt
+++ b/ext/ldap/tests/ldap_modify_basic.phpt
@@ -11,23 +11,21 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
+insert_dummy_data($link, $base);
$entry = array(
"objectClass" => array(
"top",
- "dcObject",
"organization"),
- "dc" => "my-domain",
- "o" => "my-domain",
+ "o" => "test",
"description" => "Domain description",
);
var_dump(
- ldap_modify($link, "dc=my-domain,dc=com", $entry),
+ ldap_modify($link, "o=test,$base", $entry),
ldap_get_entries(
$link,
- ldap_search($link, "dc=my-domain,dc=com", "(Description=Domain description)")
+ ldap_search($link, "$base", "(Description=Domain description)")
)
);
?>
@@ -38,45 +36,34 @@ require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
---EXPECT--
+--EXPECTF--
bool(true)
array(2) {
["count"]=>
int(1)
[0]=>
- array(10) {
+ array(8) {
["objectclass"]=>
- array(4) {
+ array(3) {
["count"]=>
- int(3)
+ int(2)
[0]=>
string(3) "top"
[1]=>
- string(8) "dcObject"
- [2]=>
string(12) "organization"
}
[0]=>
string(11) "objectclass"
- ["dc"]=>
- array(2) {
- ["count"]=>
- int(1)
- [0]=>
- string(9) "my-domain"
- }
- [1]=>
- string(2) "dc"
["o"]=>
array(2) {
["count"]=>
int(1)
[0]=>
- string(9) "my-domain"
+ string(4) "test"
}
- [2]=>
+ [1]=>
string(1) "o"
["description"]=>
array(2) {
@@ -85,12 +72,12 @@ array(2) {
[0]=>
string(18) "Domain description"
}
- [3]=>
+ [2]=>
string(11) "description"
["count"]=>
- int(4)
+ int(3)
["dn"]=>
- string(19) "dc=my-domain,dc=com"
+ string(%d) "o=test,%s"
}
}
===DONE===
diff --git a/ext/ldap/tests/ldap_modify_batch_basic.phpt b/ext/ldap/tests/ldap_modify_batch_basic.phpt
index 4f6705c7e8..23700b49b2 100644
--- a/ext/ldap/tests/ldap_modify_batch_basic.phpt
+++ b/ext/ldap/tests/ldap_modify_batch_basic.phpt
@@ -11,7 +11,7 @@ Ondřej Hošek <ondra.hosek@gmail.com>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
+insert_dummy_data($link, $base);
$mods = array(
array(
@@ -33,8 +33,8 @@ $mods = array(
);
var_dump(
- ldap_modify_batch($link, "cn=userA,dc=my-domain,dc=com", $mods),
- ldap_get_entries($link, ldap_search($link, "dc=my-domain,dc=com", "(sn=Brown-Smith)"))
+ ldap_modify_batch($link, "cn=userA,$base", $mods),
+ ldap_get_entries($link, ldap_search($link, "$base", "(sn=Brown-Smith)"))
);
?>
===DONE===
@@ -44,9 +44,9 @@ require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
---EXPECT--
+--EXPECTF--
bool(true)
array(2) {
["count"]=>
@@ -103,7 +103,7 @@ array(2) {
["count"]=>
int(5)
["dn"]=>
- string(28) "cn=userA,dc=my-domain,dc=com"
+ string(%d) "cn=userA,%s"
}
}
===DONE===
diff --git a/ext/ldap/tests/ldap_modify_batch_error.phpt b/ext/ldap/tests/ldap_modify_batch_error.phpt
index 687c371c4d..2d72d491f8 100644
--- a/ext/ldap/tests/ldap_modify_batch_error.phpt
+++ b/ext/ldap/tests/ldap_modify_batch_error.phpt
@@ -23,13 +23,13 @@ $addGivenName = array(
// Too few parameters
var_dump(ldap_modify_batch());
var_dump(ldap_modify_batch($link));
-var_dump(ldap_modify_batch($link, "dc=my-domain,dc=com"));
+var_dump(ldap_modify_batch($link, "$base"));
// Too many parameters
-var_dump(ldap_modify_batch($link, "dc=my-domain,dc=com", $addGivenName, "Invalid additional parameter"));
+var_dump(ldap_modify_batch($link, "$base", $addGivenName, "Invalid additional parameter"));
// DN not found
-var_dump(ldap_modify_batch($link, "dc=my-domain,dc=com", $addGivenName));
+var_dump(ldap_modify_batch($link, "cn=not-found,$base", $addGivenName));
// Invalid DN
var_dump(ldap_modify_batch($link, "weirdAttribute=val", $addGivenName));
@@ -44,7 +44,7 @@ $entry = array(
"o" => "my-domain",
);
-ldap_add($link, "dc=my-domain,dc=com", $entry);
+ldap_add($link, "dc=my-domain,$base", $entry);
// invalid domain
$mods = array(
@@ -55,7 +55,7 @@ $mods = array(
)
);
-var_dump(ldap_modify_batch($link, "dc=my-domain,dc=com", $mods));
+var_dump(ldap_modify_batch($link, "dc=my-domain,$base", $mods));
// invalid attribute
$mods = array(
@@ -66,7 +66,7 @@ $mods = array(
)
);
-var_dump(ldap_modify_batch($link, "dc=my-domain,dc=com", $mods));
+var_dump(ldap_modify_batch($link, "dc=my-domain,$base", $mods));
?>
===DONE===
--CLEAN--
@@ -75,7 +75,7 @@ require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-ldap_delete($link, "dc=my-domain,dc=com");
+ldap_delete($link, "dc=my-domain,$base");
?>
--EXPECTF--
Warning: ldap_modify_batch() expects exactly 3 parameters, 0 given in %s on line %d
diff --git a/ext/ldap/tests/ldap_modify_error.phpt b/ext/ldap/tests/ldap_modify_error.phpt
index 78a7212182..0ca2ea49dc 100644
--- a/ext/ldap/tests/ldap_modify_error.phpt
+++ b/ext/ldap/tests/ldap_modify_error.phpt
@@ -15,13 +15,13 @@ $link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
// Too few parameters
var_dump(ldap_modify());
var_dump(ldap_modify($link));
-var_dump(ldap_modify($link, "dc=my-domain,dc=com"));
+var_dump(ldap_modify($link, "$base"));
// Too many parameters
-var_dump(ldap_modify($link, "dc=my-domain,dc=com", array(), "Additional data"));
+var_dump(ldap_modify($link, "$base", array(), "Additional data"));
// DN not found
-var_dump(ldap_modify($link, "dc=my-domain,dc=com", array()));
+var_dump(ldap_modify($link, "cn=not-found,$base", array()));
// Invalid DN
var_dump(ldap_modify($link, "weirdAttribute=val", array()));
@@ -35,17 +35,17 @@ $entry = array(
"o" => "my-domain",
);
-ldap_add($link, "dc=my-domain,dc=com", $entry);
+ldap_add($link, "dc=my-domain,$base", $entry);
$entry2 = $entry;
$entry2["dc"] = "Wrong Domain";
-var_dump(ldap_modify($link, "dc=my-domain,dc=com", $entry2));
+var_dump(ldap_modify($link, "dc=my-domain,$base", $entry2));
$entry2 = $entry;
$entry2["weirdAttribute"] = "weirdVal";
-var_dump(ldap_modify($link, "dc=my-domain,dc=com", $entry2));
+var_dump(ldap_modify($link, "dc=my-domain,$base", $entry2));
?>
===DONE===
--CLEAN--
@@ -54,7 +54,7 @@ require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-ldap_delete($link, "dc=my-domain,dc=com");
+ldap_delete($link, "dc=my-domain,$base");
?>
--EXPECTF--
Warning: ldap_modify() expects exactly 3 parameters, 0 given in %s on line %d
diff --git a/ext/ldap/tests/ldap_next_attribute_basic.phpt b/ext/ldap/tests/ldap_next_attribute_basic.phpt
index 0fab78a70c..1acc0e1ad1 100644
--- a/ext/ldap/tests/ldap_next_attribute_basic.phpt
+++ b/ext/ldap/tests/ldap_next_attribute_basic.phpt
@@ -11,13 +11,14 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
-$result = ldap_search($link, "dc=my-domain,dc=com", "(objectclass=organization)");
+insert_dummy_data($link, $base);
+$result = ldap_search($link, "$base", "(cn=userC)");
$entry = ldap_first_entry($link, $result);
$attribute = ldap_first_attribute($link, $entry);
var_dump(
ldap_next_attribute($link, $entry),
ldap_next_attribute($link, $entry),
+ ldap_next_attribute($link, $entry),
ldap_next_attribute($link, $entry)
);
?>
@@ -27,10 +28,11 @@ var_dump(
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECTF--
string(%d) "%s"
string(%d) "%s"
+string(%d) "%s"
bool(false)
===DONE===
diff --git a/ext/ldap/tests/ldap_next_attribute_error.phpt b/ext/ldap/tests/ldap_next_attribute_error.phpt
index c58a5602a6..0bedf8c33f 100644
--- a/ext/ldap/tests/ldap_next_attribute_error.phpt
+++ b/ext/ldap/tests/ldap_next_attribute_error.phpt
@@ -11,8 +11,8 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
-$result = ldap_search($link, "dc=my-domain,dc=com", "(objectclass=organization)");
+insert_dummy_data($link, $base);
+$result = ldap_search($link, "$base", "(objectclass=organization)");
$entry = ldap_first_entry($link, $result);
var_dump(
ldap_next_attribute($link),
@@ -26,7 +26,7 @@ var_dump(
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECTF--
Warning: ldap_next_attribute() expects %s 2 parameters, 1 given in %s on line %d
diff --git a/ext/ldap/tests/ldap_next_entry_basic.phpt b/ext/ldap/tests/ldap_next_entry_basic.phpt
index 3209df6a01..dd43715239 100644
--- a/ext/ldap/tests/ldap_next_entry_basic.phpt
+++ b/ext/ldap/tests/ldap_next_entry_basic.phpt
@@ -11,8 +11,8 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
-$result = ldap_list($link, "dc=my-domain,dc=com", "(objectClass=person)");
+insert_dummy_data($link, $base);
+$result = ldap_list($link, "$base", "(objectClass=person)");
$entry = ldap_first_entry($link, $result);
var_dump(
$entry = ldap_next_entry($link, $entry),
@@ -26,7 +26,7 @@ var_dump(
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECTF--
resource(%d) of type (ldap result entry)
diff --git a/ext/ldap/tests/ldap_next_reference_basic.phpt b/ext/ldap/tests/ldap_next_reference_basic.phpt
index d0fa31d9cb..18b135da01 100644
--- a/ext/ldap/tests/ldap_next_reference_basic.phpt
+++ b/ext/ldap/tests/ldap_next_reference_basic.phpt
@@ -10,19 +10,19 @@ Patrick Allaert <patrickallaert@php.net>
<?php
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
-ldap_add($link, "cn=userref,dc=my-domain,dc=com", array(
+insert_dummy_data($link, $base);
+ldap_add($link, "cn=userref,$base", array(
"objectClass" => array("extensibleObject", "referral"),
"cn" => "userref",
- "ref" => "cn=userA,dc=my-domain,dc=com",
+ "ref" => "cn=userA,$base",
));
-ldap_add($link, "cn=userref2,dc=my-domain,dc=com", array(
+ldap_add($link, "cn=userref2,$base", array(
"objectClass" => array("extensibleObject", "referral"),
"cn" => "userref2",
- "ref" => "cn=userB,dc=my-domain,dc=com",
+ "ref" => "cn=userB,$base",
));
ldap_set_option($link, LDAP_OPT_DEREF, LDAP_DEREF_NEVER);
-$result = ldap_search($link, "dc=my-domain,dc=com", "(cn=*)");
+$result = ldap_search($link, "$base", "(cn=*)");
$ref = ldap_first_reference($link, $result);
var_dump($ref2 = ldap_next_reference($link, $ref));
ldap_parse_reference($link, $ref2, $refs);
@@ -36,14 +36,14 @@ include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
// Referral can only be removed with Manage DSA IT Control
ldap_set_option($link, LDAP_OPT_SERVER_CONTROLS, array(array("oid" => "2.16.840.1.113730.3.4.2")));
-ldap_delete($link, "cn=userref,dc=my-domain,dc=com");
-ldap_delete($link, "cn=userref2,dc=my-domain,dc=com");
-remove_dummy_data($link);
+ldap_delete($link, "cn=userref,$base");
+ldap_delete($link, "cn=userref2,$base");
+remove_dummy_data($link, $base);
?>
--EXPECTF--
resource(%d) of type (ldap result entry)
array(1) {
[0]=>
- string(28) "cn=userB,dc=my-domain,dc=com"
+ string(%d) "cn=userB,%s"
}
===DONE===
diff --git a/ext/ldap/tests/ldap_parse_reference_basic.phpt b/ext/ldap/tests/ldap_parse_reference_basic.phpt
index 2bacd428a2..249f2959f3 100644
--- a/ext/ldap/tests/ldap_parse_reference_basic.phpt
+++ b/ext/ldap/tests/ldap_parse_reference_basic.phpt
@@ -10,14 +10,14 @@ Patrick Allaert <patrickallaert@php.net>
<?php
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
-ldap_add($link, "cn=userref,dc=my-domain,dc=com", array(
+insert_dummy_data($link, $base);
+ldap_add($link, "cn=userref,$base", array(
"objectClass" => array("extensibleObject", "referral"),
"cn" => "userref",
- "ref" => "cn=userA,dc=my-domain,dc=com",
+ "ref" => "cn=userA,$base",
));
ldap_set_option($link, LDAP_OPT_DEREF, LDAP_DEREF_NEVER);
-$result = ldap_search($link, "dc=my-domain,dc=com", "(cn=*)");
+$result = ldap_search($link, "$base", "(cn=*)");
$ref = ldap_first_reference($link, $result);
$refs = null;
var_dump(
@@ -33,13 +33,13 @@ include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
// Referral can only be removed with Manage DSA IT Control
ldap_set_option($link, LDAP_OPT_SERVER_CONTROLS, array(array("oid" => "2.16.840.1.113730.3.4.2")));
-ldap_delete($link, "cn=userref,dc=my-domain,dc=com");
-remove_dummy_data($link);
+ldap_delete($link, "cn=userref,$base");
+remove_dummy_data($link, $base);
?>
--EXPECTF--
bool(true)
array(1) {
[0]=>
- string(28) "cn=userA,dc=my-domain,dc=com"
+ string(%d) "cn=userA,%s"
}
===DONE===
diff --git a/ext/ldap/tests/ldap_parse_result_basic.phpt b/ext/ldap/tests/ldap_parse_result_basic.phpt
index 1646d59c91..ec88dff377 100644
--- a/ext/ldap/tests/ldap_parse_result_basic.phpt
+++ b/ext/ldap/tests/ldap_parse_result_basic.phpt
@@ -11,13 +11,13 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
-ldap_add($link, "cn=userref,dc=my-domain,dc=com", array(
+insert_dummy_data($link, $base);
+ldap_add($link, "cn=userref,$base", array(
"objectClass" => array("extensibleObject", "referral"),
"cn" => "userref",
- "ref" => "cn=userA,dc=my-domain,dc=com",
+ "ref" => "cn=userA,$base",
));
-$result = ldap_search($link, "cn=userref,dc=my-domain,dc=com", "(cn=user*)");
+$result = ldap_search($link, "cn=userref,$base", "(cn=user*)");
$errcode = $dn = $errmsg = $refs = null;
var_dump(
ldap_parse_result($link, $result, $errcode, $dn, $errmsg, $refs),
@@ -32,16 +32,16 @@ include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
// Referral can only be removed with Manage DSA IT Control
ldap_set_option($link, LDAP_OPT_SERVER_CONTROLS, array(array("oid" => "2.16.840.1.113730.3.4.2")));
-ldap_delete($link, "cn=userref,dc=my-domain,dc=com");
-remove_dummy_data($link);
+ldap_delete($link, "cn=userref,$base");
+remove_dummy_data($link, $base);
?>
---EXPECT--
+--EXPECTF--
bool(true)
int(10)
-string(30) "cn=userref,dc=my-domain,dc=com"
+string(%d) "cn=userref,%s"
string(0) ""
array(1) {
[0]=>
- string(28) "cn=userA,dc=my-domain,dc=com"
+ string(%d) "cn=userA,%s"
}
===DONE===
diff --git a/ext/ldap/tests/ldap_read_basic.phpt b/ext/ldap/tests/ldap_read_basic.phpt
index 04d03d9860..5a6e7ed057 100644
--- a/ext/ldap/tests/ldap_read_basic.phpt
+++ b/ext/ldap/tests/ldap_read_basic.phpt
@@ -5,8 +5,8 @@ Davide Mendolia <idaf1er@gmail.com>
Patrick Allaert <patrickallaert@php.net>
Belgian PHP Testfest 2009
--SKIPIF--
-<?php
-require_once('skipif.inc');
+<?php
+require_once('skipif.inc');
require_once('skipifbindfailure.inc');
?>
--FILE--
@@ -14,9 +14,9 @@ require_once('skipifbindfailure.inc');
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
+insert_dummy_data($link, $base);
var_dump(
- $result = ldap_read($link, "dc=my-domain,dc=com", "(dc=*)"),
+ $result = ldap_read($link, "o=test,$base", "(o=*)"),
ldap_get_entries($link, $result)
);
?>
@@ -26,7 +26,7 @@ var_dump(
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECTF--
resource(%d) of type (ldap result)
@@ -34,42 +34,31 @@ array(2) {
["count"]=>
int(1)
[0]=>
- array(8) {
+ array(6) {
["objectclass"]=>
- array(4) {
+ array(3) {
["count"]=>
- int(3)
+ int(2)
[0]=>
string(3) "top"
[1]=>
- string(8) "dcObject"
- [2]=>
string(12) "organization"
}
[0]=>
string(11) "objectclass"
- ["dc"]=>
- array(2) {
- ["count"]=>
- int(1)
- [0]=>
- string(9) "my-domain"
- }
- [1]=>
- string(2) "dc"
["o"]=>
array(2) {
["count"]=>
int(1)
[0]=>
- string(9) "my-domain"
+ string(4) "test"
}
- [2]=>
+ [1]=>
string(1) "o"
["count"]=>
- int(3)
+ int(2)
["dn"]=>
- string(19) "dc=my-domain,dc=com"
+ string(%d) "o=test,%s"
}
}
===DONE===
diff --git a/ext/ldap/tests/ldap_read_error.phpt b/ext/ldap/tests/ldap_read_error.phpt
index 649658aa71..7d57172e0d 100644
--- a/ext/ldap/tests/ldap_read_error.phpt
+++ b/ext/ldap/tests/ldap_read_error.phpt
@@ -17,7 +17,7 @@ var_dump(ldap_read($link));
var_dump(ldap_read($link, $link));
// Too many parameters
-var_dump(ldap_read($link, "dc=my-domain,dc=com", "(objectClass=*)", array(), 0, 0, 0, 0 , "Additional data"));
+var_dump(ldap_read($link, "$base", "(objectClass=*)", array(), 0, 0, 0, 0 , "Additional data"));
?>
===DONE===
--EXPECTF--
diff --git a/ext/ldap/tests/ldap_rename_basic.phpt b/ext/ldap/tests/ldap_rename_basic.phpt
index 135769d1d4..c01c4318a6 100644
--- a/ext/ldap/tests/ldap_rename_basic.phpt
+++ b/ext/ldap/tests/ldap_rename_basic.phpt
@@ -11,12 +11,12 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
+insert_dummy_data($link, $base);
var_dump(
- ldap_rename($link, "cn=userA,dc=my-domain,dc=com", "cn=userZ", "dc=my-domain,dc=com", true)
+ ldap_rename($link, "cn=userA,$base", "cn=userZ", "$base", true)
);
-$result = ldap_search($link, "dc=my-domain,dc=com", "(cn=userA)", array("cn", "sn"));
-$result = ldap_search($link, "dc=my-domain,dc=com", "(cn=userZ)", array("cn", "sn"));
+$result = ldap_search($link, "$base", "(cn=userA)", array("cn", "sn"));
+$result = ldap_search($link, "$base", "(cn=userZ)", array("cn", "sn"));
var_dump(ldap_get_entries($link, $result));
?>
===DONE===
@@ -25,10 +25,10 @@ var_dump(ldap_get_entries($link, $result));
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-ldap_rename($link, "cn=userZ,dc=my-domain,dc=com", "cn=userA", "dc=my-domain,dc=com", true);
-remove_dummy_data($link);
+ldap_rename($link, "cn=userZ,$base", "cn=userA", "$base", true);
+remove_dummy_data($link, $base);
?>
---EXPECT--
+--EXPECTF--
bool(true)
array(2) {
["count"]=>
@@ -56,7 +56,7 @@ array(2) {
["count"]=>
int(2)
["dn"]=>
- string(28) "cn=userZ,dc=my-domain,dc=com"
+ string(%d) "cn=userZ,%s"
}
}
===DONE===
diff --git a/ext/ldap/tests/ldap_rename_error.phpt b/ext/ldap/tests/ldap_rename_error.phpt
index 57ca3571b7..111717f0b0 100644
--- a/ext/ldap/tests/ldap_rename_error.phpt
+++ b/ext/ldap/tests/ldap_rename_error.phpt
@@ -11,7 +11,7 @@ require "connect.inc";
$link = ldap_connect($host, $port);
var_dump(ldap_rename($link));
-var_dump(ldap_rename($link, "cn=userNotFound,dc=my-domain,dc=com", "cn=userZ", "dc=my-domain,dc=com", true));
+var_dump(ldap_rename($link, "cn=userNotFound,$base", "cn=userZ", "$base", true));
?>
===DONE===
--EXPECTF--
diff --git a/ext/ldap/tests/ldap_search_basic.phpt b/ext/ldap/tests/ldap_search_basic.phpt
index e6cebf2c57..54523de38a 100644
--- a/ext/ldap/tests/ldap_search_basic.phpt
+++ b/ext/ldap/tests/ldap_search_basic.phpt
@@ -15,9 +15,9 @@ include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
+insert_dummy_data($link, $base);
var_dump(
- $result = ldap_search($link, "dc=my-domain,dc=com", "(objectClass=person)"),
+ $result = ldap_search($link, "$base", "(objectClass=person)"),
ldap_get_entries($link, $result)
);
?>
@@ -27,7 +27,7 @@ var_dump(
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECTF--
resource(%d) of type (ldap result)
@@ -93,7 +93,7 @@ array(4) {
["count"]=>
int(6)
["dn"]=>
- string(28) "cn=userA,dc=my-domain,dc=com"
+ string(%d) "cn=userA,%s"
}
[1]=>
array(12) {
@@ -145,7 +145,7 @@ array(4) {
["count"]=>
int(5)
["dn"]=>
- string(28) "cn=userB,dc=my-domain,dc=com"
+ string(%d) "cn=userB,%s"
}
[2]=>
array(10) {
@@ -188,7 +188,7 @@ array(4) {
["count"]=>
int(4)
["dn"]=>
- string(37) "cn=userC,cn=userB,dc=my-domain,dc=com"
+ string(%d) "cn=userC,cn=userB,%s"
}
}
===DONE===
diff --git a/ext/ldap/tests/ldap_search_error.phpt b/ext/ldap/tests/ldap_search_error.phpt
index 7e94613439..c5239e1ab1 100644
--- a/ext/ldap/tests/ldap_search_error.phpt
+++ b/ext/ldap/tests/ldap_search_error.phpt
@@ -12,7 +12,7 @@ include "connect.inc";
$link = ldap_connect($host, $port);
-$dn = "dc=my-domain,dc=com";
+$dn = "dc=not-found,$base";
$filter = "(dc=*)";
$result = ldap_search();
diff --git a/ext/ldap/tests/ldap_search_variation1.phpt b/ext/ldap/tests/ldap_search_variation1.phpt
index d56f5bdc93..766efa7598 100644
--- a/ext/ldap/tests/ldap_search_variation1.phpt
+++ b/ext/ldap/tests/ldap_search_variation1.phpt
@@ -14,12 +14,12 @@ require_once('skipifbindfailure.inc');
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
+insert_dummy_data($link, $base);
-$dn = "dc=my-domain,dc=com";
+$dn = "$base";
$filter = "(dc=*)";
var_dump(
- $result = ldap_search($link, "dc=my-domain,dc=com", "(dc=*)", array('dc')),
+ $result = ldap_search($link, "o=test,$base", "(o=*)", array('o')),
ldap_get_entries($link, $result)
);
?>
@@ -29,7 +29,7 @@ var_dump(
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECTF--
resource(%d) of type (ldap result)
@@ -38,19 +38,19 @@ array(2) {
int(1)
[0]=>
array(4) {
- ["dc"]=>
+ ["o"]=>
array(2) {
["count"]=>
int(1)
[0]=>
- string(9) "my-domain"
+ string(4) "test"
}
[0]=>
- string(2) "dc"
+ string(1) "o"
["count"]=>
int(1)
["dn"]=>
- string(19) "dc=my-domain,dc=com"
+ string(%d) "o=test,%s"
}
}
===DONE===
diff --git a/ext/ldap/tests/ldap_search_variation2.phpt b/ext/ldap/tests/ldap_search_variation2.phpt
index 791c5e9bcf..f2ad3a6929 100644
--- a/ext/ldap/tests/ldap_search_variation2.phpt
+++ b/ext/ldap/tests/ldap_search_variation2.phpt
@@ -14,10 +14,10 @@ require_once('skipifbindfailure.inc');
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
+insert_dummy_data($link, $base);
var_dump(
- $result = ldap_search($link, "dc=my-domain,dc=com", "(objectclass=person)", array('sn'), 1),
+ $result = ldap_search($link, "$base", "(objectclass=person)", array('sn'), 1),
ldap_get_entries($link, $result)
);
?>
@@ -27,7 +27,7 @@ var_dump(
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECTF--
resource(%d) of type (ldap result)
@@ -46,7 +46,7 @@ array(4) {
["count"]=>
int(1)
["dn"]=>
- string(28) "cn=userA,dc=my-domain,dc=com"
+ string(%d) "cn=userA,%s"
}
[1]=>
array(4) {
@@ -60,7 +60,7 @@ array(4) {
["count"]=>
int(1)
["dn"]=>
- string(28) "cn=userB,dc=my-domain,dc=com"
+ string(%d) "cn=userB,%s"
}
[2]=>
array(4) {
@@ -74,7 +74,7 @@ array(4) {
["count"]=>
int(1)
["dn"]=>
- string(37) "cn=userC,cn=userB,dc=my-domain,dc=com"
+ string(%d) "cn=userC,cn=userB,%s"
}
}
===DONE===
diff --git a/ext/ldap/tests/ldap_search_variation3.phpt b/ext/ldap/tests/ldap_search_variation3.phpt
index ab7b222825..12224de24d 100644
--- a/ext/ldap/tests/ldap_search_variation3.phpt
+++ b/ext/ldap/tests/ldap_search_variation3.phpt
@@ -14,9 +14,9 @@ require_once('skipifbindfailure.inc');
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
+insert_dummy_data($link, $base);
-$dn = "dc=my-domain,dc=com";
+$dn = "$base";
$filter = "(objectclass=person)";
var_dump(
$result = ldap_search($link, $dn, $filter, array('sn'), 1, 3),
@@ -34,7 +34,7 @@ var_dump(
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECTF--
resource(%d) of type (ldap result)
@@ -53,7 +53,7 @@ array(4) {
["count"]=>
int(1)
["dn"]=>
- string(28) "cn=userA,dc=my-domain,dc=com"
+ string(%d) "cn=userA,%s"
}
[1]=>
array(4) {
@@ -67,7 +67,7 @@ array(4) {
["count"]=>
int(1)
["dn"]=>
- string(28) "cn=userB,dc=my-domain,dc=com"
+ string(%d) "cn=userB,%s"
}
[2]=>
array(4) {
@@ -81,7 +81,7 @@ array(4) {
["count"]=>
int(1)
["dn"]=>
- string(37) "cn=userC,cn=userB,dc=my-domain,dc=com"
+ string(%d) "cn=userC,cn=userB,%s"
}
}
@@ -102,7 +102,7 @@ array(2) {
["count"]=>
int(1)
["dn"]=>
- string(28) "cn=userA,dc=my-domain,dc=com"
+ string(%d) "cn=userA,%s"
}
}
===DONE===
diff --git a/ext/ldap/tests/ldap_search_variation4.phpt b/ext/ldap/tests/ldap_search_variation4.phpt
index 787468e0f5..ce164763b9 100644
--- a/ext/ldap/tests/ldap_search_variation4.phpt
+++ b/ext/ldap/tests/ldap_search_variation4.phpt
@@ -14,9 +14,9 @@ require_once('skipifbindfailure.inc');
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
+insert_dummy_data($link, $base);
-$dn = "dc=my-domain,dc=com";
+$dn = "$base";
$filter = "(objectclass=person)";
var_dump(
$result = ldap_search($link, $dn, $filter, array('sn'), 1, 1, 3),
@@ -29,7 +29,7 @@ var_dump(
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECTF--
Warning: ldap_search(): Partial search results returned: Sizelimit exceeded in %s on line %d
@@ -49,7 +49,7 @@ array(2) {
["count"]=>
int(1)
["dn"]=>
- string(28) "cn=userA,dc=my-domain,dc=com"
+ string(%d) "cn=userA,%s"
}
}
===DONE===
diff --git a/ext/ldap/tests/ldap_search_variation5.phpt b/ext/ldap/tests/ldap_search_variation5.phpt
index d50854c658..de4d405090 100644
--- a/ext/ldap/tests/ldap_search_variation5.phpt
+++ b/ext/ldap/tests/ldap_search_variation5.phpt
@@ -14,9 +14,9 @@ require_once('skipifbindfailure.inc');
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
+insert_dummy_data($link, $base);
-$dn = "dc=my-domain,dc=com";
+$dn = "$base";
$filter = "(objectclass=person)";
var_dump(
$result = ldap_search($link, $dn, $filter, array('sn'), 1, 1, 3, LDAP_DEREF_SEARCHING),
@@ -37,7 +37,7 @@ var_dump(
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECTF--
Warning: ldap_search(): Partial search results returned: Sizelimit exceeded in %s on line %d
@@ -57,7 +57,7 @@ array(2) {
["count"]=>
int(1)
["dn"]=>
- string(28) "cn=userA,dc=my-domain,dc=com"
+ string(%d) "cn=userA,%s"
}
}
@@ -78,7 +78,7 @@ array(2) {
["count"]=>
int(1)
["dn"]=>
- string(28) "cn=userA,dc=my-domain,dc=com"
+ string(%d) "cn=userA,%s"
}
}
@@ -99,7 +99,7 @@ array(2) {
["count"]=>
int(1)
["dn"]=>
- string(28) "cn=userA,dc=my-domain,dc=com"
+ string(%d) "cn=userA,%s"
}
}
===DONE===
diff --git a/ext/ldap/tests/ldap_search_variation6.phpt b/ext/ldap/tests/ldap_search_variation6.phpt
index 5139ebb77d..f4f98db873 100644
--- a/ext/ldap/tests/ldap_search_variation6.phpt
+++ b/ext/ldap/tests/ldap_search_variation6.phpt
@@ -14,9 +14,9 @@ require_once('skipifbindfailure.inc');
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
+insert_dummy_data($link, $base);
-$dn = "dc=my-domain,dc=com";
+$dn = "$base";
$filter = "(objectclass=person)";
var_dump(
@@ -41,7 +41,7 @@ var_dump(
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-remove_dummy_data($link);
+remove_dummy_data($link, $base);
?>
--EXPECTF--
array(2) {
@@ -112,7 +112,7 @@ array(4) {
["count"]=>
int(6)
["dn"]=>
- string(28) "cn=userA,dc=my-domain,dc=com"
+ string(%d) "cn=userA,%s"
}
[1]=>
array(12) {
@@ -164,7 +164,7 @@ array(4) {
["count"]=>
int(5)
["dn"]=>
- string(28) "cn=userB,dc=my-domain,dc=com"
+ string(%d) "cn=userB,%s"
}
[2]=>
array(10) {
@@ -207,7 +207,7 @@ array(4) {
["count"]=>
int(4)
["dn"]=>
- string(37) "cn=userC,cn=userB,dc=my-domain,dc=com"
+ string(%d) "cn=userC,cn=userB,%s"
}
}
bool(true)
diff --git a/ext/ldap/tests/ldap_sort_basic.phpt b/ext/ldap/tests/ldap_sort_basic.phpt
index f6ee5d198f..9744468438 100644
--- a/ext/ldap/tests/ldap_sort_basic.phpt
+++ b/ext/ldap/tests/ldap_sort_basic.phpt
@@ -11,29 +11,29 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
-ldap_add($link, "cn=userC,dc=my-domain,dc=com", array(
+insert_dummy_data($link, $base);
+ldap_add($link, "cn=userC,$base", array(
"objectclass" => "person",
"cn" => "userC",
"sn" => "zzz",
"userPassword" => "oops",
"description" => "a user",
));
-ldap_add($link, "cn=userD,dc=my-domain,dc=com", array(
+ldap_add($link, "cn=userD,$base", array(
"objectclass" => "person",
"cn" => "userD",
"sn" => "aaa",
"userPassword" => "oops",
"description" => "another user",
));
-ldap_add($link, "cn=userE,dc=my-domain,dc=com", array(
+ldap_add($link, "cn=userE,$base", array(
"objectclass" => "person",
"cn" => "userE",
"sn" => "a",
"userPassword" => "oops",
"description" => "yet another user",
));
-$result = ldap_search($link, "dc=my-domain,dc=com", "(objectclass=person)", array("sn", "description"));
+$result = ldap_search($link, "$base", "(objectclass=person)", array("sn", "description"));
var_dump(
ldap_sort($link, $result, "sn"),
ldap_get_entries($link, $result)
@@ -45,12 +45,12 @@ var_dump(
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-ldap_delete($link, "cn=userC,dc=my-domain,dc=com");
-ldap_delete($link, "cn=userD,dc=my-domain,dc=com");
-ldap_delete($link, "cn=userE,dc=my-domain,dc=com");
-remove_dummy_data($link);
+ldap_delete($link, "cn=userC,$base");
+ldap_delete($link, "cn=userD,$base");
+ldap_delete($link, "cn=userE,$base");
+remove_dummy_data($link, $base);
?>
---EXPECT--
+--EXPECTF--
bool(true)
array(7) {
["count"]=>
@@ -78,7 +78,7 @@ array(7) {
["count"]=>
int(2)
["dn"]=>
- string(28) "cn=userE,dc=my-domain,dc=com"
+ string(%d) "cn=userE,%s"
}
[1]=>
array(6) {
@@ -103,7 +103,7 @@ array(7) {
["count"]=>
int(2)
["dn"]=>
- string(28) "cn=userD,dc=my-domain,dc=com"
+ string(%d) "cn=userD,%s"
}
[2]=>
array(6) {
@@ -128,7 +128,7 @@ array(7) {
["count"]=>
int(2)
["dn"]=>
- string(28) "cn=userA,dc=my-domain,dc=com"
+ string(%d) "cn=userA,%s"
}
[3]=>
array(6) {
@@ -153,7 +153,7 @@ array(7) {
["count"]=>
int(2)
["dn"]=>
- string(28) "cn=userB,dc=my-domain,dc=com"
+ string(%d) "cn=userB,%s"
}
[4]=>
array(4) {
@@ -169,7 +169,7 @@ array(7) {
["count"]=>
int(1)
["dn"]=>
- string(37) "cn=userC,cn=userB,dc=my-domain,dc=com"
+ string(%d) "cn=userC,cn=userB,%s"
}
[5]=>
array(6) {
@@ -194,7 +194,7 @@ array(7) {
["count"]=>
int(2)
["dn"]=>
- string(28) "cn=userC,dc=my-domain,dc=com"
+ string(%d) "cn=userC,%s"
}
}
===DONE===
diff --git a/ext/ldap/tests/ldap_sort_variation.phpt b/ext/ldap/tests/ldap_sort_variation.phpt
index e1affe82fe..e8f00341c3 100644
--- a/ext/ldap/tests/ldap_sort_variation.phpt
+++ b/ext/ldap/tests/ldap_sort_variation.phpt
@@ -11,29 +11,29 @@ Patrick Allaert <patrickallaert@php.net>
require "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-insert_dummy_data($link);
-ldap_add($link, "cn=userC,dc=my-domain,dc=com", array(
+insert_dummy_data($link, $base);
+ldap_add($link, "cn=userC,$base", array(
"objectclass" => "person",
"cn" => "userC",
"sn" => "zzz",
"userPassword" => "oops",
"description" => "a user",
));
-ldap_add($link, "cn=userD,dc=my-domain,dc=com", array(
+ldap_add($link, "cn=userD,$base", array(
"objectclass" => "person",
"cn" => "userD",
"sn" => "aaa",
"userPassword" => "oops",
"description" => "another user",
));
-ldap_add($link, "cn=userE,dc=my-domain,dc=com", array(
+ldap_add($link, "cn=userE,$base", array(
"objectclass" => "person",
"cn" => "userE",
"sn" => "a",
"userPassword" => "oops",
"description" => "yet another user",
));
-$result = ldap_search($link, "dc=my-domain,dc=com", "(objectclass=person)", array("sn", "description"));
+$result = ldap_search($link, "$base", "(objectclass=person)", array("sn", "description"));
var_dump(
ldap_sort($link, $result, "description"),
ldap_get_entries($link, $result)
@@ -45,12 +45,12 @@ var_dump(
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
-ldap_delete($link, "cn=userC,dc=my-domain,dc=com");
-ldap_delete($link, "cn=userD,dc=my-domain,dc=com");
-ldap_delete($link, "cn=userE,dc=my-domain,dc=com");
-remove_dummy_data($link);
+ldap_delete($link, "cn=userC,$base");
+ldap_delete($link, "cn=userD,$base");
+ldap_delete($link, "cn=userE,$base");
+remove_dummy_data($link, $base);
?>
---EXPECT--
+--EXPECTF--
bool(true)
array(7) {
["count"]=>
@@ -69,7 +69,7 @@ array(7) {
["count"]=>
int(1)
["dn"]=>
- string(37) "cn=userC,cn=userB,dc=my-domain,dc=com"
+ string(%d) "cn=userC,cn=userB,%s"
}
[1]=>
array(6) {
@@ -94,7 +94,7 @@ array(7) {
["count"]=>
int(2)
["dn"]=>
- string(28) "cn=userC,dc=my-domain,dc=com"
+ string(%d) "cn=userC,%s"
}
[2]=>
array(6) {
@@ -119,7 +119,7 @@ array(7) {
["count"]=>
int(2)
["dn"]=>
- string(28) "cn=userD,dc=my-domain,dc=com"
+ string(%d) "cn=userD,%s"
}
[3]=>
array(6) {
@@ -144,7 +144,7 @@ array(7) {
["count"]=>
int(2)
["dn"]=>
- string(28) "cn=userA,dc=my-domain,dc=com"
+ string(%d) "cn=userA,%s"
}
[4]=>
array(6) {
@@ -169,7 +169,7 @@ array(7) {
["count"]=>
int(2)
["dn"]=>
- string(28) "cn=userB,dc=my-domain,dc=com"
+ string(%d) "cn=userB,%s"
}
[5]=>
array(6) {
@@ -194,7 +194,7 @@ array(7) {
["count"]=>
int(2)
["dn"]=>
- string(28) "cn=userE,dc=my-domain,dc=com"
+ string(%d) "cn=userE,%s"
}
}
===DONE===
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c
index 9bc81769d5..d076614418 100644
--- a/ext/mysqli/mysqli.c
+++ b/ext/mysqli/mysqli.c
@@ -306,7 +306,7 @@ zval *mysqli_read_property(zval *object, zval *member, int type, void **cache_sl
obj = Z_MYSQLI_P(object);
if (Z_TYPE_P(member) != IS_STRING) {
- ZVAL_DUP(&tmp_member, member);
+ ZVAL_COPY(&tmp_member, member);
convert_to_string(&tmp_member);
member = &tmp_member;
}
@@ -341,7 +341,7 @@ void mysqli_write_property(zval *object, zval *member, zval *value, void **cache
mysqli_prop_handler *hnd = NULL;
if (Z_TYPE_P(member) != IS_STRING) {
- ZVAL_DUP(&tmp_member, member);
+ ZVAL_COPY(&tmp_member, member);
convert_to_string(&tmp_member);
member = &tmp_member;
}
diff --git a/ext/mysqli/package.xml b/ext/mysqli/package.xml
index c27316a055..bfeeb71850 100644
--- a/ext/mysqli/package.xml
+++ b/ext/mysqli/package.xml
@@ -35,7 +35,6 @@ package.xml added to support installation using pear installer
<filelist>
<file role="src" name="config.m4"/>
<file role="src" name="config.w32"/>
- <file role="src" name="mysqli.dsp"/>
<file role="src" name="mysqli.c"/>
<file role="src" name="mysqli_api.c"/>
<file role="src" name="mysqli_fe.c"/>
diff --git a/ext/mysqli/tests/bug33491.phpt b/ext/mysqli/tests/bug33491.phpt
index ff9518f220..6500241760 100644
--- a/ext/mysqli/tests/bug33491.phpt
+++ b/ext/mysqli/tests/bug33491.phpt
@@ -26,7 +26,7 @@ $DB->query_single('SELECT DATE()');
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to a member function fetch_row() on boolean in %sbug33491.php:%d
+Fatal error: Uncaught Error: Call to a member function fetch_row() on boolean in %sbug33491.php:%d
Stack trace:
#0 %s(%d): DB->query_single('SELECT DATE()')
#1 {main}
diff --git a/ext/mysqli/tests/bug38003.phpt b/ext/mysqli/tests/bug38003.phpt
index 7158cec30a..a5f1a23bb5 100644
--- a/ext/mysqli/tests/bug38003.phpt
+++ b/ext/mysqli/tests/bug38003.phpt
@@ -17,7 +17,7 @@ $DB = new DB();
echo "Done\n";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to private DB::__construct() from invalid context in %s:%d
+Fatal error: Uncaught Error: Call to private DB::__construct() from invalid context in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/ext/mysqli/tests/mysqli_driver_unclonable.phpt b/ext/mysqli/tests/mysqli_driver_unclonable.phpt
index 316e351dc4..e761d06532 100644
--- a/ext/mysqli/tests/mysqli_driver_unclonable.phpt
+++ b/ext/mysqli/tests/mysqli_driver_unclonable.phpt
@@ -10,7 +10,7 @@ Trying to clone mysqli_driver object
print "done!";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Trying to clone an uncloneable object of class mysqli_driver in %s:%d
+Fatal error: Uncaught Error: Trying to clone an uncloneable object of class mysqli_driver in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_fetch_object.phpt b/ext/mysqli/tests/mysqli_fetch_object.phpt
index 25457346d7..11dd0a5a4f 100644
--- a/ext/mysqli/tests/mysqli_fetch_object.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_object.phpt
@@ -101,7 +101,7 @@ require_once('skipifconnectfailure.inc');
try {
if (false !== ($obj = @mysqli_fetch_object($res, 'mysqli_fetch_object_construct', 'a')))
printf("[011] Should have failed\n");
- } catch (EngineException $e) {
+ } catch (Error $e) {
handle_catchable_fatal($e->getCode(), $e->getMessage(), $e->getFile(), $e->getLine());
}
diff --git a/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt b/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt
index 52941ad6b1..3a047a50fc 100644
--- a/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt
@@ -62,7 +62,7 @@ Exception: Class mysqli_fetch_object_test does not have a constructor hence you
Fatal error with PHP (but no exception!):
-Fatal error: Uncaught EngineException: Call to undefined method mysqli_fetch_object_test::mysqli_fetch_object_test() in %s:%d
+Fatal error: Uncaught Error: Call to undefined method mysqli_fetch_object_test::mysqli_fetch_object_test() in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt
index b5ebd110a4..2b3f76c993 100644
--- a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt
@@ -34,7 +34,7 @@ require_once('skipifconnectfailure.inc');
try {
if (!is_null($tmp = @$res->fetch_object($link, $link)))
printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
- } catch (EngineException $e) {
+ } catch (Error $e) {
handle_catchable_fatal($e->getCode(), $e->getMessage(), $e->getFile(), $e->getLine());
}
@@ -42,7 +42,7 @@ require_once('skipifconnectfailure.inc');
try {
if (!is_null($tmp = @$res->fetch_object($link, $link, $link)))
printf("[006] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
- } catch (EngineException $e) {
+ } catch (Error $e) {
handle_catchable_fatal($e->getCode(), $e->getMessage(), $e->getFile(), $e->getLine());
}
@@ -84,7 +84,7 @@ require_once('skipifconnectfailure.inc');
printf("[009] Object seems wrong. [%d] %s\n", $mysqli->errno, $mysqli->error);
var_dump($obj);
}
- } catch (EngineException $e) {
+ } catch (Error $e) {
handle_catchable_fatal($e->getCode(), $e->getMessage(), $e->getFile(), $e->getLine());
mysqli_fetch_object($res);
}
diff --git a/ext/mysqli/tests/mysqli_result_unclonable.phpt b/ext/mysqli/tests/mysqli_result_unclonable.phpt
index d409ba3bbf..6164197a6c 100644
--- a/ext/mysqli/tests/mysqli_result_unclonable.phpt
+++ b/ext/mysqli/tests/mysqli_result_unclonable.phpt
@@ -21,7 +21,7 @@ require_once('skipifconnectfailure.inc');
print "done!";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Trying to clone an uncloneable object of class mysqli_result in %s:%d
+Fatal error: Uncaught Error: Trying to clone an uncloneable object of class mysqli_result in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_stmt_unclonable.phpt b/ext/mysqli/tests/mysqli_stmt_unclonable.phpt
index b2d7dead7a..6576c15d90 100644
--- a/ext/mysqli/tests/mysqli_stmt_unclonable.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_unclonable.phpt
@@ -22,7 +22,7 @@ require_once('skipifconnectfailure.inc');
print "done!";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Trying to clone an uncloneable object of class mysqli_stmt in %s:%d
+Fatal error: Uncaught Error: Trying to clone an uncloneable object of class mysqli_stmt in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_unclonable.phpt b/ext/mysqli/tests/mysqli_unclonable.phpt
index 2ce91584aa..f4471bf831 100644
--- a/ext/mysqli/tests/mysqli_unclonable.phpt
+++ b/ext/mysqli/tests/mysqli_unclonable.phpt
@@ -20,7 +20,7 @@ require_once('skipifconnectfailure.inc');
print "done!";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Trying to clone an uncloneable object of class mysqli in %s:%d
+Fatal error: Uncaught Error: Trying to clone an uncloneable object of class mysqli in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d \ No newline at end of file
diff --git a/ext/mysqlnd/mysqlnd_ps.c b/ext/mysqlnd/mysqlnd_ps.c
index 70ea4e4874..767ba34ab0 100644
--- a/ext/mysqlnd/mysqlnd_ps.c
+++ b/ext/mysqlnd/mysqlnd_ps.c
@@ -925,6 +925,8 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES * result, void * param, unsigned i
ZVAL_COPY_VALUE(result, data);
/* copied data, thus also the ownership. Thus null data */
ZVAL_NULL(data);
+ } else {
+ ZVAL_NULL(result);
}
}
}
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index 80b847f5a5..01c9b6d189 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -2561,7 +2561,7 @@ int php_oci_column_to_zval(php_oci_out_column *column, zval *value, int mode)
}
if (column->is_cursor) { /* REFCURSOR -> simply return the statement id */
- zend_register_resource(value, column->stmtid, 0); /* XXX type correct? */
+ ZVAL_RES(value, zend_register_resource(column->stmtid, 0)); /* XXX type correct? */
++GC_REFCOUNT(column->stmtid);
} else if (column->is_descr) {
@@ -2844,7 +2844,7 @@ static php_oci_spool *php_oci_create_spool(char *username, int username_len, cha
}
/* Populate key if passed */
- if (hash_key->val) {
+ if (hash_key && hash_key->val) {
session_pool->spool_hash_key = zend_string_dup(hash_key, 1);
if (session_pool->spool_hash_key == NULL) {
iserror = 1;
diff --git a/ext/oci8/oci8_interface.c b/ext/oci8/oci8_interface.c
index a76f15a54d..c4a27739f1 100644
--- a/ext/oci8/oci8_interface.c
+++ b/ext/oci8/oci8_interface.c
@@ -1466,7 +1466,7 @@ PHP_FUNCTION(oci_fetch_all)
while (!php_oci_statement_fetch(statement, nrows)) {
for (i = 0; i < statement->ncolumns; i++) {
php_oci_column_to_zval(columns[ i ], &element, PHP_OCI_RETURN_LOBS);
- zend_hash_index_update(&(outarrs[ i ])->value.arr->ht, rows, &element);
+ zend_hash_index_update(Z_ARRVAL_P(outarrs[ i ]), rows, &element);
}
rows++;
@@ -1613,7 +1613,7 @@ PHP_FUNCTION(oci_error)
}
if (ZEND_NUM_ARGS() > 0) {
- statement = (php_oci_statement *) zend_fetch_resource(arg, -1, NULL, NULL, 1, le_statement);
+ statement = (php_oci_statement *) zend_fetch_resource_ex(arg, NULL, le_statement);
if (statement) {
errh = statement->err;
errcode = statement->errcode;
@@ -1624,14 +1624,14 @@ PHP_FUNCTION(oci_error)
goto go_out;
}
- connection = (php_oci_connection *) zend_fetch_resource(arg, -1, NULL, NULL, 1, le_connection);
+ connection = (php_oci_connection *) zend_fetch_resource_ex(arg, NULL, le_connection);
if (connection) {
errh = connection->err;
errcode = connection->errcode;
goto go_out;
}
- connection = (php_oci_connection *) zend_fetch_resource(arg, -1, NULL, NULL, 1, le_pconnection);
+ connection = (php_oci_connection *) zend_fetch_resource_ex(arg, NULL, le_pconnection);
if (connection) {
errh = connection->err;
errcode = connection->errcode;
diff --git a/ext/oci8/oci8_statement.c b/ext/oci8/oci8_statement.c
index d55de3275e..2583e1a386 100644
--- a/ext/oci8/oci8_statement.c
+++ b/ext/oci8/oci8_statement.c
@@ -1439,7 +1439,7 @@ php_oci_out_column *php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAME
return NULL;
}
- statement = (php_oci_statement *) zend_fetch_resource(z_statement, -1, "oci8 statement", NULL, 1, le_statement);
+ statement = (php_oci_statement *) zend_fetch_resource_ex(z_statement, "oci8 statement", le_statement);
if (!statement) {
return NULL;
diff --git a/ext/oci8/package.xml b/ext/oci8/package.xml
index e5839f1399..bb2b660b14 100644
--- a/ext/oci8/package.xml
+++ b/ext/oci8/package.xml
@@ -441,7 +441,6 @@ Fixed oci_field_* reflection: $field can be a column name or index
<file name="oci8_statement.c" role="src" />
<file name="php_oci8.h" role="src" />
<file name="php_oci8_int.h" role="src" />
- <file name="oci8.dsp" role="src" />
<file name="README" role="doc" />
</dir> <!-- / -->
</contents>
diff --git a/ext/opcache/Optimizer/compact_literals.c b/ext/opcache/Optimizer/compact_literals.c
index c72e8f6772..deae12cdbb 100644
--- a/ext/opcache/Optimizer/compact_literals.c
+++ b/ext/opcache/Optimizer/compact_literals.c
@@ -128,6 +128,7 @@ void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx
void *checkpoint = zend_arena_checkpoint(ctx->arena);
if (op_array->last_literal) {
+ cache_size = 0;
info = (literal_info*)zend_arena_calloc(&ctx->arena, op_array->last_literal, sizeof(literal_info));
/* Mark literals of specific types */
@@ -286,6 +287,19 @@ void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx
case ZEND_BIND_GLOBAL:
LITERAL_INFO(opline->op2.constant, LITERAL_GLOBAL, 0, 1, 1);
break;
+ case ZEND_RECV_INIT:
+ LITERAL_INFO(opline->op2.constant, LITERAL_VALUE, 0, 0, 1);
+ if (Z_CACHE_SLOT(op_array->literals[opline->op2.constant]) != -1) {
+ Z_CACHE_SLOT(op_array->literals[opline->op2.constant]) = cache_size;
+ cache_size += sizeof(void *);
+ }
+ break;
+ case ZEND_RECV:
+ case ZEND_VERIFY_RETURN_TYPE:
+ if (opline->op2.num != -1) {
+ opline->op2.num = cache_size;
+ cache_size += sizeof(void *);
+ }
default:
if (ZEND_OP1_TYPE(opline) == IS_CONST) {
LITERAL_INFO(opline->op1.constant, LITERAL_VALUE, 1, 0, 1);
@@ -319,7 +333,7 @@ void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx
#endif
/* Merge equal constants */
- j = 0; cache_size = 0;
+ j = 0;
zend_hash_init(&hash, op_array->last_literal, NULL, NULL, 0);
map = (int*)zend_arena_alloc(&ctx->arena, op_array->last_literal * sizeof(int));
memset(map, 0, op_array->last_literal * sizeof(int));
@@ -331,15 +345,26 @@ void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx
}
switch (Z_TYPE(op_array->literals[i])) {
case IS_NULL:
- if (l_null < 0) {
- l_null = j;
+ /* Only checking MAY_MERGE for IS_NULL here
+ * is because only IS_NULL can be default value for class type hinting(RECV_INIT). */
+ if ((info[i].flags & LITERAL_MAY_MERGE)) {
+ if (l_null < 0) {
+ l_null = j;
+ if (i != j) {
+ op_array->literals[j] = op_array->literals[i];
+ info[j] = info[i];
+ }
+ j++;
+ }
+ map[i] = l_null;
+ } else {
+ map[i] = j;
if (i != j) {
op_array->literals[j] = op_array->literals[i];
info[j] = info[i];
}
j++;
}
- map[i] = l_null;
break;
case IS_FALSE:
if (l_false < 0) {
diff --git a/ext/opcache/README b/ext/opcache/README
index ef656ae579..c074440130 100644
--- a/ext/opcache/README
+++ b/ext/opcache/README
@@ -127,11 +127,6 @@ opcache.save_comments (default "1")
size of the optimized code. Disabling "Doc Comments" may break some
existing applications and frameworks (e.g. Doctrine, ZF2, PHPUnit)
-opcache.load_comments (default "1")
- If disabled, PHPDoc comments are not loaded from SHM, so "Doc Comments"
- may be always stored (save_comments=1), but not loaded by applications
- that don't need them anyway.
-
opcache.fast_shutdown (default "0")
If enabled, a fast shutdown sequence is used for the accelerated code
The fast shutdown sequence doesn't free each allocated block, but lets
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index 36684218d8..18e94287a2 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -2355,8 +2355,9 @@ static inline int accel_find_sapi(void)
return SUCCESS;
}
}
- if (ZCG(accel_directives).enable_cli &&
- strcmp(sapi_module.name, "cli") == 0) {
+ if (ZCG(accel_directives).enable_cli && (
+ strcmp(sapi_module.name, "cli") == 0
+ || strcmp(sapi_module.name, "phpdbg") == 0)) {
return SUCCESS;
}
}
diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h
index 2c6584a1e2..6ce4613d2f 100644
--- a/ext/opcache/ZendAccelerator.h
+++ b/ext/opcache/ZendAccelerator.h
@@ -196,7 +196,6 @@ typedef struct _zend_accel_directives {
zend_bool validate_timestamps;
zend_bool revalidate_path;
zend_bool save_comments;
- zend_bool load_comments;
zend_bool fast_shutdown;
zend_bool protect_memory;
zend_bool file_override_enabled;
diff --git a/ext/opcache/tests/bu69838.phpt b/ext/opcache/tests/bu69838.phpt
new file mode 100644
index 0000000000..f60cad79bd
--- /dev/null
+++ b/ext/opcache/tests/bu69838.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #69838 OPCACHE Warning Internal error: wrong size calculation
+--INI--
+opcache.enable=1
+opcache.enable_cli=1
+opcache.log_verbosity_level=2
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+$x = gethostbyname("localhost");
+
+?>
+===DONE===
+--EXPECT--
+===DONE===
diff --git a/ext/opcache/tests/optimize_func_calls.phpt b/ext/opcache/tests/optimize_func_calls.phpt
index 3f795f5fc6..eee21b557c 100644
--- a/ext/opcache/tests/optimize_func_calls.phpt
+++ b/ext/opcache/tests/optimize_func_calls.phpt
@@ -127,7 +127,7 @@ Array
string(7) "changed"
string(7) "changed"
-Fatal error: Uncaught EngineException: Cannot pass parameter 1 by reference in %soptimize_func_calls.php:%d
+Fatal error: Uncaught Error: Cannot pass parameter 1 by reference in %soptimize_func_calls.php:%d
Stack trace:
#0 {main}
thrown in %soptimize_func_calls.php on line %d
diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c
index 7a8ef8d3e8..531ea6e9ed 100644
--- a/ext/opcache/zend_accelerator_module.c
+++ b/ext/opcache/zend_accelerator_module.c
@@ -292,7 +292,6 @@ ZEND_INI_BEGIN()
STD_PHP_INI_ENTRY("opcache.protect_memory" , "0" , PHP_INI_SYSTEM, OnUpdateBool, accel_directives.protect_memory, zend_accel_globals, accel_globals)
STD_PHP_INI_ENTRY("opcache.save_comments" , "1" , PHP_INI_SYSTEM, OnUpdateBool, accel_directives.save_comments, zend_accel_globals, accel_globals)
- STD_PHP_INI_ENTRY("opcache.load_comments" , "1" , PHP_INI_ALL, OnUpdateBool, accel_directives.load_comments, zend_accel_globals, accel_globals)
STD_PHP_INI_ENTRY("opcache.fast_shutdown" , "0" , PHP_INI_SYSTEM, OnUpdateBool, accel_directives.fast_shutdown, zend_accel_globals, accel_globals)
STD_PHP_INI_ENTRY("opcache.optimization_level" , DEFAULT_OPTIMIZATION_LEVEL , PHP_INI_SYSTEM, OnUpdateLong, accel_directives.optimization_level, zend_accel_globals, accel_globals)
@@ -695,7 +694,6 @@ static ZEND_FUNCTION(opcache_get_configuration)
add_assoc_bool(&directives, "opcache.protect_memory", ZCG(accel_directives).protect_memory);
add_assoc_bool(&directives, "opcache.save_comments", ZCG(accel_directives).save_comments);
- add_assoc_bool(&directives, "opcache.load_comments", ZCG(accel_directives).load_comments);
add_assoc_bool(&directives, "opcache.fast_shutdown", ZCG(accel_directives).fast_shutdown);
add_assoc_bool(&directives, "opcache.enable_file_override", ZCG(accel_directives).file_override_enabled);
add_assoc_long(&directives, "opcache.optimization_level", ZCG(accel_directives).optimization_level);
diff --git a/ext/opcache/zend_accelerator_util_funcs.c b/ext/opcache/zend_accelerator_util_funcs.c
index 9582b723a2..996deecbb2 100644
--- a/ext/opcache/zend_accelerator_util_funcs.c
+++ b/ext/opcache/zend_accelerator_util_funcs.c
@@ -373,18 +373,8 @@ static void zend_hash_clone_prop_info(HashTable *ht, HashTable *source, zend_cla
prop_info = ARENA_REALLOC(Z_PTR(p->val));
ZVAL_PTR(&q->val, prop_info);
- if (prop_info->ce == old_ce || (prop_info->flags & ZEND_ACC_SHADOW)) {
- /* Copy constructor */
- if (prop_info->doc_comment) {
- if (ZCG(accel_directives).load_comments) {
- prop_info->doc_comment = zend_string_dup(prop_info->doc_comment, 0);
- } else {
- prop_info->doc_comment = NULL;
- }
- }
- prop_info->ce = ARENA_REALLOC(prop_info->ce);
- } else if ((void*)prop_info->ce >= ZCG(current_persistent_script)->arena_mem &&
- (void*)prop_info->ce < (void*)((char*)ZCG(current_persistent_script)->arena_mem + ZCG(current_persistent_script)->arena_size)) {
+ if ((void*)prop_info->ce >= ZCG(current_persistent_script)->arena_mem &&
+ (void*)prop_info->ce < (void*)((char*)ZCG(current_persistent_script)->arena_mem + ZCG(current_persistent_script)->arena_size)) {
prop_info->ce = ARENA_REALLOC(prop_info->ce);
}
}
@@ -447,13 +437,6 @@ static void zend_class_copy_ctor(zend_class_entry **pce)
} else {
ce->interfaces = NULL;
}
- if (ZEND_CE_DOC_COMMENT(ce)) {
- if (ZCG(accel_directives).load_comments) {
- ZEND_CE_DOC_COMMENT(ce) = zend_string_dup(ZEND_CE_DOC_COMMENT(ce), 0);
- } else {
- ZEND_CE_DOC_COMMENT(ce) = NULL;
- }
- }
if (ce->parent) {
ce->parent = ARENA_REALLOC(ce->parent);
diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c
index 09eebe0d02..af8936f104 100644
--- a/ext/opcache/zend_persist.c
+++ b/ext/opcache/zend_persist.c
@@ -94,7 +94,7 @@ static void zend_hash_persist(HashTable *ht, zend_persist_func_t pPersistElement
}
ht->nTableMask = -hash_size;
HT_SET_DATA_ADDR(ht, ZCG(mem));
- ZCG(mem) = (void*)((char*)ZCG(mem) + (hash_size * sizeof(uint32_t)) + (ht->nNumUsed * sizeof(Bucket)));
+ ZCG(mem) = (void*)((char*)ZCG(mem) + ZEND_ALIGNED_SIZE((hash_size * sizeof(uint32_t)) + (ht->nNumUsed * sizeof(Bucket))));
HT_HASH_RESET(ht);
memcpy(ht->arData, old_buckets, ht->nNumUsed * sizeof(Bucket));
efree(old_data);
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index d6094e7f11..c79447097d 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -3217,7 +3217,7 @@ static EVP_PKEY * php_openssl_evp_from_zval(zval * val, int public_key, char * p
if (Z_TYPE_P(zphrase) == IS_STRING) {
passphrase = Z_STRVAL_P(zphrase);
} else {
- ZVAL_DUP(&tmp, zphrase);
+ ZVAL_COPY(&tmp, zphrase);
convert_to_string(&tmp);
passphrase = Z_STRVAL(tmp);
}
diff --git a/ext/openssl/tests/003.phpt b/ext/openssl/tests/003.phpt
index 92c8c85b13..39363c4548 100644
--- a/ext/openssl/tests/003.phpt
+++ b/ext/openssl/tests/003.phpt
@@ -27,7 +27,6 @@ echo "Done\n";
?>
--EXPECTF--
string(57) "Object of class stdClass could not be converted to string"
-string(45) "Object of class stdClass to string conversion"
string(66) "openssl_pkcs7_decrypt(): unable to coerce parameter 3 to x509 cert"
bool(false)
object(stdClass)#1 (0) {
diff --git a/ext/pcre/pcrelib/pcre.h b/ext/pcre/pcrelib/pcre.h
index 9216d55b0a..58ed46a2a3 100644
--- a/ext/pcre/pcrelib/pcre.h
+++ b/ext/pcre/pcrelib/pcre.h
@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
/* The current PCRE version information. */
#define PCRE_MAJOR 8
-#define PCRE_MINOR 36
+#define PCRE_MINOR 37
#define PCRE_PRERELEASE
-#define PCRE_DATE 2014-09-26
+#define PCRE_DATE 2015-04-28
/* When an application links to a PCRE DLL in Windows, the symbols that are
imported have to be identified as such. When building PCRE, the appropriate
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 3420a09988..418859f5d2 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -187,13 +187,14 @@ static PHP_MSHUTDOWN_FUNCTION(pcre)
/* {{{ static pcre_clean_cache */
static int pcre_clean_cache(zval *data, void *arg)
{
+ pcre_cache_entry *pce = (pcre_cache_entry *) Z_PTR_P(data);
int *num_clean = (int *)arg;
- if (*num_clean > 0) {
+ if (*num_clean > 0 && !pce->refcount) {
(*num_clean)--;
- return 1;
+ return ZEND_HASH_APPLY_REMOVE;
} else {
- return 0;
+ return ZEND_HASH_APPLY_KEEP;
}
}
/* }}} */
@@ -461,6 +462,7 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(zend_string *regex)
NULL;
new_entry.tables = tables;
#endif
+ new_entry.refcount = 0;
rc = pcre_fullinfo(re, extra, PCRE_INFO_CAPTURECOUNT, &new_entry.capture_count);
if (rc < 0) {
@@ -584,8 +586,10 @@ static void php_do_pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global) /* {{{ *
RETURN_FALSE;
}
+ pce->refcount++;
php_pcre_match_impl(pce, subject->val, (int)subject->len, return_value, subpats,
global, ZEND_NUM_ARGS() >= 4, flags, start_offset);
+ pce->refcount--;
}
/* }}} */
@@ -1017,20 +1021,23 @@ PHPAPI zend_string *php_pcre_replace(zend_string *regex,
int limit, int *replace_count)
{
pcre_cache_entry *pce; /* Compiled regular expression */
+ zend_string *result; /* Function result */
/* Compile regex or get it from cache. */
if ((pce = pcre_get_compiled_regex_cache(regex)) == NULL) {
return NULL;
}
-
- return php_pcre_replace_impl(pce, subject_str, subject, subject_len, replace_val,
+ pce->refcount++;
+ result = php_pcre_replace_impl(pce, subject_str, subject, subject_len, replace_val,
is_callable_replace, limit, replace_count);
+ pce->refcount--;
+
+ return result;
}
/* }}} */
/* {{{ php_pcre_replace_impl() */
-PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *subject_str, char *subject, int subject_len, zval *replace_val,
- int is_callable_replace, int limit, int *replace_count)
+PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *subject_str, char *subject, int subject_len, zval *replace_val, int is_callable_replace, int limit, int *replace_count)
{
pcre_extra *extra = pce->extra;/* Holds results of studying */
pcre_extra extra_data; /* Used locally for exec options */
@@ -1058,19 +1065,22 @@ PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *su
unsigned char *mark = NULL; /* Target for MARK name */
zend_string *result; /* Result of replacement */
zend_string *eval_result=NULL; /* Result of custom function */
+
ALLOCA_FLAG(use_heap);
if (extra == NULL) {
extra_data.flags = PCRE_EXTRA_MATCH_LIMIT | PCRE_EXTRA_MATCH_LIMIT_RECURSION;
extra = &extra_data;
}
+
extra->match_limit = (unsigned long)PCRE_G(backtrack_limit);
extra->match_limit_recursion = (unsigned long)PCRE_G(recursion_limit);
- if (pce->preg_options & PREG_REPLACE_EVAL) {
+ if (UNEXPECTED(pce->preg_options & PREG_REPLACE_EVAL)) {
php_error_docref(NULL, E_WARNING, "The /e modifier is no longer supported, use preg_replace_callback instead");
return NULL;
}
+
if (!is_callable_replace) {
replace = Z_STRVAL_P(replace_val);
replace_len = (int)Z_STRLEN_P(replace_val);
@@ -1091,7 +1101,7 @@ PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *su
* allocate the table only if there are any named subpatterns.
*/
subpat_names = NULL;
- if (pce->name_count > 0) {
+ if (UNEXPECTED(pce->name_count > 0)) {
subpat_names = make_subpats_table(num_subpats, pce);
if (!subpat_names) {
return NULL;
@@ -1120,29 +1130,30 @@ PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *su
exoptions |= PCRE_NO_UTF8_CHECK;
/* Check for too many substrings condition. */
- if (count == 0) {
+ if (UNEXPECTED(count == 0)) {
php_error_docref(NULL,E_NOTICE, "Matched, but too many substrings");
- count = size_offsets/3;
+ count = size_offsets / 3;
}
piece = subject + start_offset;
- if (count > 0 && (limit == -1 || limit > 0)) {
- if (replace_count) {
+ /* if (EXPECTED(count > 0 && (limit == -1 || limit > 0))) */
+ if (EXPECTED(count > 0 && limit)) {
+ if (UNEXPECTED(replace_count)) {
++*replace_count;
}
+
/* Set the match location in subject */
match = subject + offsets[0];
new_len = result_len + offsets[0] - start_offset; /* part before the match */
- if (is_callable_replace) {
- /* Use custom function to get replacement string and its length. */
- eval_result = preg_do_repl_func(replace_val, subject, offsets, subpat_names, count, mark);
- new_len += (int)eval_result->len;
- } else { /* do regular substitution */
+ /* if (!is_callable_replace) */
+ if (EXPECTED(replace)) {
+ /* do regular substitution */
walk = replace;
walk_last = 0;
+
while (walk < replace_end) {
if ('\\' == *walk || '$' == *walk) {
if (walk_last == '\\') {
@@ -1160,33 +1171,23 @@ PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *su
walk++;
walk_last = walk[-1];
}
- }
- if (new_len >= alloc_len) {
- if (alloc_len == 0) {
- alloc_len = 2 * subject_len;
- if (new_len >= alloc_len) {
- alloc_len = alloc_len + 2 * new_len;
- }
- result = zend_string_alloc(alloc_len, 0);
- } else {
+ if (new_len >= alloc_len) {
alloc_len = alloc_len + 2 * new_len;
- result = zend_string_extend(result, alloc_len, 0);
+ if (result == NULL) {
+ result = zend_string_alloc(alloc_len, 0);
+ } else {
+ result = zend_string_extend(result, alloc_len, 0);
+ }
}
- }
- /* copy the part of the string before the match */
- memcpy(&result->val[result_len], piece, match-piece);
- result_len += (int)(match-piece);
- /* copy replacement and backrefs */
- walkbuf = result->val + result_len;
-
- /* If using custom function, copy result to the buffer and clean up. */
- if (is_callable_replace) {
- memcpy(walkbuf, eval_result->val, eval_result->len);
- result_len += (int)eval_result->len;
- if (eval_result) zend_string_release(eval_result);
- } else { /* do regular backreference copying */
+ /* copy the part of the string before the match */
+ memcpy(&result->val[result_len], piece, match-piece);
+ result_len += (int)(match-piece);
+
+ /* copy replacement and backrefs */
+ walkbuf = result->val + result_len;
+
walk = replace;
walk_last = 0;
while (walk < replace_end) {
@@ -1211,12 +1212,36 @@ PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *su
*walkbuf = '\0';
/* increment the result length by how much we've added to the string */
result_len += (int)(walkbuf - (result->val + result_len));
+ } else {
+ /* Use custom function to get replacement string and its length. */
+ eval_result = preg_do_repl_func(replace_val, subject, offsets, subpat_names, count, mark);
+ ZEND_ASSERT(eval_result);
+ new_len += (int)eval_result->len;
+ if (new_len >= alloc_len) {
+ alloc_len = alloc_len + 2 * new_len;
+ if (result == NULL) {
+ result = zend_string_alloc(alloc_len, 0);
+ } else {
+ result = zend_string_extend(result, alloc_len, 0);
+ }
+ }
+ /* copy the part of the string before the match */
+ memcpy(&result->val[result_len], piece, match-piece);
+ result_len += (int)(match-piece);
+
+ /* copy replacement and backrefs */
+ walkbuf = result->val + result_len;
+
+ /* If using custom function, copy result to the buffer and clean up. */
+ memcpy(walkbuf, eval_result->val, eval_result->len);
+ result_len += (int)eval_result->len;
+ zend_string_release(eval_result);
}
- if (limit != -1)
+ if (EXPECTED(limit)) {
limit--;
-
- } else if (count == PCRE_ERROR_NOMATCH || limit == 0) {
+ }
+ } else if (count == PCRE_ERROR_NOMATCH || UNEXPECTED(limit == 0)) {
/* If we previously set PCRE_NOTEMPTY after a null match,
this is not necessarily the end. We need to advance
the start offset, and continue. Fudge the offset values
@@ -1271,7 +1296,7 @@ PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *su
} else {
efree(offsets);
}
- if (subpat_names) {
+ if (UNEXPECTED(subpat_names)) {
efree(subpat_names);
}
@@ -1395,10 +1420,13 @@ static int preg_replace_impl(zval *return_value, zval *regex, zval *replace, zva
if ((result = php_replace_in_subject(regex, replace, subject_entry, limit_val, is_callable_replace, &replace_count)) != NULL) {
if (!is_filter || replace_count > old_replace_count) {
/* Add to return array */
+ zval zv;
+
+ ZVAL_STR(&zv, result);
if (string_key) {
- add_assoc_str_ex(return_value, string_key->val, string_key->len, result);
+ zend_hash_add_new(Z_ARRVAL_P(return_value), string_key, &zv);
} else {
- add_index_str(return_value, num_key, result);
+ zend_hash_index_add_new(Z_ARRVAL_P(return_value), num_key, &zv);
}
} else {
zend_string_release(result);
@@ -1640,7 +1668,9 @@ static PHP_FUNCTION(preg_split)
RETURN_FALSE;
}
+ pce->refcount++;
php_pcre_split_impl(pce, subject->val, (int)subject->len, return_value, (int)limit_val, flags);
+ pce->refcount--;
}
/* }}} */
@@ -1947,7 +1977,9 @@ static PHP_FUNCTION(preg_grep)
RETURN_FALSE;
}
+ pce->refcount++;
php_pcre_grep_impl(pce, input, return_value, flags);
+ pce->refcount--;
}
/* }}} */
diff --git a/ext/pcre/tests/bug69864.phpt b/ext/pcre/tests/bug69864.phpt
new file mode 100644
index 0000000000..d84862aeda
--- /dev/null
+++ b/ext/pcre/tests/bug69864.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Bug #69864 (Segfault in preg_replace_callback)
+--FILE--
+<?php
+const PREG_CACHE_SIZE = 4096; // this has to be >= the resp. constant in php_pcre.c
+
+var_dump(preg_replace_callback('/a/', function($m) {
+ for ($i = 0; $i < PREG_CACHE_SIZE; $i++) {
+ preg_match('/foo' . $i . 'bar/', '???foo' . $i . 'bar???');
+ }
+ return 'b';
+}, 'aa'));
+var_dump(preg_replace_callback('/a/', function($m) {
+ for ($i = 0; $i < PREG_CACHE_SIZE; $i++) {
+ preg_replace('/foo' . $i . 'bar/', 'baz', '???foo' . $i . 'bar???');
+ }
+ return 'b';
+}, 'aa'));
+var_dump(preg_replace_callback('/a/', function($m) {
+ for ($i = 0; $i < PREG_CACHE_SIZE; $i++) {
+ preg_split('/foo' . $i . 'bar/', '???foo' . $i . 'bar???');
+ }
+ return 'b';
+}, 'aa'));
+var_dump(preg_replace_callback('/a/', function($m) {
+ for ($i = 0; $i < PREG_CACHE_SIZE; $i++) {
+ preg_grep('/foo' . $i . 'bar/', ['???foo' . $i . 'bar???']);
+ }
+ return 'b';
+}, 'aa'));
+?>
+--EXPECT--
+string(2) "bb"
+string(2) "bb"
+string(2) "bb"
+string(2) "bb"
diff --git a/ext/pdo/tests/bug47769.phpt b/ext/pdo/tests/bug47769.phpt
index 12a5e00d11..b0b38325d1 100644
--- a/ext/pdo/tests/bug47769.phpt
+++ b/ext/pdo/tests/bug47769.phpt
@@ -34,7 +34,7 @@ this is a protected method.
this is a private method.
foo
-Fatal error: Uncaught EngineException: Call to protected method test::isProtected() from context '' in %s:%d
+Fatal error: Uncaught Error: Call to protected method test::isProtected() from context '' in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/ext/pdo/tests/pdo_025.phpt b/ext/pdo/tests/pdo_025.phpt
index 5083b84708..de6f0ad841 100644
--- a/ext/pdo/tests/pdo_025.phpt
+++ b/ext/pdo/tests/pdo_025.phpt
@@ -110,7 +110,7 @@ object(Test)#%d (3) {
}
===FAIL===
-Fatal error: Uncaught EngineException: Cannot access protected property Fail::$id in %spdo_025.php:%d
+Fatal error: Uncaught Error: Cannot access protected property Fail::$id in %spdo_025.php:%d
Stack trace:
#0 {main}
thrown in %spdo_025.php on line %d
diff --git a/ext/pdo/tests/pdo_037.phpt b/ext/pdo/tests/pdo_037.phpt
index 3d9bc59dd0..fb4c5e1e83 100644
--- a/ext/pdo/tests/pdo_037.phpt
+++ b/ext/pdo/tests/pdo_037.phpt
@@ -16,7 +16,7 @@ var_dump($obj->foo());
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to undefined method MyStatement::foo() in %s:%d
+Fatal error: Uncaught Error: Call to undefined method MyStatement::foo() in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/ext/pdo_mysql/tests/bug_37445.phpt b/ext/pdo_mysql/tests/bug_37445.phpt
index 241c3f84e8..c9400717b4 100644
--- a/ext/pdo_mysql/tests/bug_37445.phpt
+++ b/ext/pdo_mysql/tests/bug_37445.phpt
@@ -17,7 +17,7 @@ $stmt = $db->prepare("SELECT 1");
$stmt->bindParam(':a', 'b');
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot pass parameter 2 by reference in %sbug_37445.php:%d
+Fatal error: Uncaught Error: Cannot pass parameter 2 by reference in %sbug_37445.php:%d
Stack trace:
#0 {main}
thrown in %sbug_37445.php on line %d
diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct.phpt
index f0048ff305..219678c671 100644
--- a/ext/pdo_mysql/tests/pdo_mysql___construct.phpt
+++ b/ext/pdo_mysql/tests/pdo_mysql___construct.phpt
@@ -31,7 +31,7 @@ MySQLPDOTest::skip();
try {
if (NULL !== ($db = @new PDO()))
printf("[001] Too few parameters\n");
- } catch (TypeException $ex) {
+ } catch (TypeError $ex) {
}
print tryandcatch(2, '$db = new PDO(chr(0));');
diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt
index 9a64f59fe2..62051d7ae2 100644
--- a/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt
+++ b/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt
@@ -70,7 +70,7 @@ MySQLPDOTest::skip();
try {
if (NULL !== ($db = @new PDO($dsn, $user, $pass, 'wrong type')))
printf("[001] Expecting NULL got %s/%s\n", gettype($db), $db);
- } catch (TypeException $e) {
+ } catch (TypeError $e) {
}
if (!is_object($db = new PDO($dsn, $user, $pass, array())))
diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt
index b31ad352b4..fb336ba627 100644
--- a/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt
+++ b/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt
@@ -152,7 +152,7 @@ array(1) {
}
}
-Fatal error: Uncaught EngineException: Cannot instantiate abstract class mystatement6 in %s:%d
+Fatal error: Uncaught Error: Cannot instantiate abstract class mystatement6 in %s:%d
Stack trace:
#0 %s(%d): PDO->query('SELECT id, labe...')
#1 {main}
diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt
index 2076723344..140359afc1 100644
--- a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt
+++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt
@@ -93,7 +93,7 @@ array(1) {
Warning: PDO::prepare(): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'unknown_column' in 'field list' in %s on line %d
-Fatal error: Uncaught EngineException: Call to a member function execute() on boolean in %s:%d
+Fatal error: Uncaught Error: Call to a member function execute() on boolean in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt
index 66ee0eedc9..ad710dcc15 100644
--- a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt
+++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt
@@ -36,7 +36,7 @@ Warning: PDO::prepare(): SQLSTATE[HY093]: Invalid parameter number: mixed named
Warning: PDO::prepare(): SQLSTATE[HY093]: Invalid parameter number in %s on line %d
-Fatal error: Uncaught EngineException: Call to a member function execute() on boolean in %s:%d
+Fatal error: Uncaught Error: Call to a member function execute() on boolean in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt
index 06a6a418f9..0e27b0119c 100644
--- a/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt
+++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt
@@ -56,7 +56,7 @@ Testing native PS...
Warning: PDO::prepare(): SQLSTATE[42S02]: Base table or view not found: 1146 Table '%s.ihopeitdoesnotexist' doesn't exist in %s on line %d
-Fatal error: Uncaught EngineException: Call to a member function execute() on boolean in %s:%d
+Fatal error: Uncaught Error: Call to a member function execute() on boolean in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt
index 1caa875a32..db92e40a93 100644
--- a/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt
+++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt
@@ -99,7 +99,7 @@ Native Prepared Statements...
Warning: PDO::query(): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near '%SSELECT label FROM test ORDER BY id ASC LIMIT 1' at line %d in %s on line %d
-Fatal error: Uncaught EngineException: Call to a member function errorInfo() on boolean in %s:%d
+Fatal error: Uncaught Error: Call to a member function errorInfo() on boolean in %s:%d
Stack trace:
#0 %s(%d): mysql_stmt_multiquery_wrong_usage(Object(PDO))
#1 {main}
diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c
index 0a7ce6368d..f913eb7c31 100644
--- a/ext/pdo_pgsql/pgsql_driver.c
+++ b/ext/pdo_pgsql/pgsql_driver.c
@@ -27,6 +27,7 @@
#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
+#include "ext/standard/php_string.h"
#include "main/php_network.h"
#include "pdo/php_pdo.h"
#include "pdo/php_pdo_driver.h"
@@ -62,6 +63,17 @@ static char * _pdo_pgsql_trim_message(const char *message, int persistent)
return tmp;
}
+static zend_string* _pdo_pgsql_escape_credentials(char *str)
+{
+ if (str) {
+ zend_string *tmp = zend_string_init(str, strlen(str), 0);
+
+ return php_addcslashes(tmp, 1, "\\'", sizeof("\\'"));
+ }
+
+ return NULL;
+}
+
int _pdo_pgsql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, int errcode, const char *sqlstate, const char *msg, const char *file, int line) /* {{{ */
{
pdo_pgsql_db_handle *H = (pdo_pgsql_db_handle *)dbh->driver_data;
@@ -1179,7 +1191,7 @@ static int pdo_pgsql_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /* {{{
pdo_pgsql_db_handle *H;
int ret = 0;
char *conn_str, *p, *e;
- char *tmp_pass;
+ zend_string *tmp_user, *tmp_pass;
zend_long connect_timeout = 30;
H = pecalloc(1, sizeof(pdo_pgsql_db_handle), dbh->is_persistent);
@@ -1201,43 +1213,28 @@ static int pdo_pgsql_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /* {{{
connect_timeout = pdo_attr_lval(driver_options, PDO_ATTR_TIMEOUT, 30);
}
- if (dbh->password) {
- if (dbh->password[0] != '\'' && dbh->password[strlen(dbh->password) - 1] != '\'') {
- char *pwd = dbh->password;
- int pos = 1;
-
- tmp_pass = safe_emalloc(2, strlen(dbh->password), 3);
- tmp_pass[0] = '\'';
-
- while (*pwd != '\0') {
- if (*pwd == '\\' || *pwd == '\'') {
- tmp_pass[pos++] = '\\';
- }
-
- tmp_pass[pos++] = *pwd++;
- }
-
- tmp_pass[pos++] = '\'';
- tmp_pass[pos] = '\0';
- } else {
- tmp_pass = dbh->password;
- }
- }
+ /* escape username and password, if provided */
+ tmp_user = _pdo_pgsql_escape_credentials(dbh->username);
+ tmp_pass = _pdo_pgsql_escape_credentials(dbh->password);
/* support both full connection string & connection string + login and/or password */
- if (dbh->username && dbh->password) {
- spprintf(&conn_str, 0, "%s user=%s password=%s connect_timeout=%pd", dbh->data_source, dbh->username, tmp_pass, connect_timeout);
- } else if (dbh->username) {
- spprintf(&conn_str, 0, "%s user=%s connect_timeout=%pd", dbh->data_source, dbh->username, connect_timeout);
- } else if (dbh->password) {
- spprintf(&conn_str, 0, "%s password=%s connect_timeout=%pd", dbh->data_source, tmp_pass, connect_timeout);
+ if (tmp_user && tmp_pass) {
+ spprintf(&conn_str, 0, "%s user='%s' password='%s' connect_timeout=%pd", (char *) dbh->data_source, tmp_user->val, tmp_pass->val, connect_timeout);
+ } else if (tmp_user) {
+ spprintf(&conn_str, 0, "%s user='%s' connect_timeout=%pd", (char *) dbh->data_source, tmp_user->val, connect_timeout);
+ } else if (tmp_pass) {
+ spprintf(&conn_str, 0, "%s password='%s' connect_timeout=%pd", (char *) dbh->data_source, tmp_pass->val, connect_timeout);
} else {
spprintf(&conn_str, 0, "%s connect_timeout=%pd", (char *) dbh->data_source, connect_timeout);
}
H->server = PQconnectdb(conn_str);
- if (dbh->password && tmp_pass != dbh->password) {
- efree(tmp_pass);
+
+ if (tmp_user) {
+ zend_string_release(tmp_user);
+ }
+ if (tmp_pass) {
+ zend_string_release(tmp_pass);
}
efree(conn_str);
diff --git a/ext/pdo_pgsql/pgsql_statement.c b/ext/pdo_pgsql/pgsql_statement.c
index 60553b36ce..9c2a0e2efd 100644
--- a/ext/pdo_pgsql/pgsql_statement.c
+++ b/ext/pdo_pgsql/pgsql_statement.c
@@ -224,7 +224,7 @@ stmt_retry:
return 0;
}
- if (!stmt->executed && !stmt->column_count) {
+ if (!stmt->executed && (!stmt->column_count || S->cols == NULL)) {
stmt->column_count = (int) PQnfields(S->result);
S->cols = ecalloc(stmt->column_count, sizeof(pdo_pgsql_column));
}
@@ -301,8 +301,8 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *
if (param->paramno >= 0) {
zval *parameter;
- if (param->paramno >= zend_hash_num_elements(stmt->bound_param_map)) {
- pdo_pgsql_error_stmt(stmt, PGRES_FATAL_ERROR, "HY105");
+ if (param->paramno >= zend_hash_num_elements(stmt->bound_params)) {
+ pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "parameter was not defined");
return 0;
}
@@ -618,6 +618,12 @@ done:
static int pdo_pgsql_stmt_cursor_closer(pdo_stmt_t *stmt)
{
+ pdo_pgsql_stmt *S = (pdo_pgsql_stmt*)stmt->driver_data;
+
+ if (S->cols != NULL){
+ efree(S->cols);
+ S->cols = NULL;
+ }
return 1;
}
diff --git a/ext/pdo_pgsql/tests/bug69344.phpt b/ext/pdo_pgsql/tests/bug69344.phpt
new file mode 100644
index 0000000000..d274e0608c
--- /dev/null
+++ b/ext/pdo_pgsql/tests/bug69344.phpt
@@ -0,0 +1,44 @@
+--TEST--
+PDO PgSQL Bug #69344 (PDO PgSQL Incorrect binding numeric array with gaps)
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded');
+require dirname(__FILE__) . '/config.inc';
+require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
+PDOTest::skip();
+?>
+--FILE--
+<?php
+
+require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
+$pdo = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
+$pdo->setAttribute (\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
+$pdo->setAttribute (\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC);
+
+$test = function () use ($pdo) {
+ $arr = [
+ 0 => "a",
+ 2 => "b",
+ ];
+
+ $stmt = $pdo->prepare("SELECT (?)::text AS a, (?)::text AS b");
+
+ try {
+ $stmt->execute($arr);
+ var_dump($stmt->fetch());
+ } catch (\Exception $e) {
+ echo $e->getMessage()."\n";
+ }
+};
+
+$test();
+
+$pdo->setAttribute(\PDO::ATTR_EMULATE_PREPARES, true);
+
+$test();
+
+?>
+--EXPECT--
+SQLSTATE[HY093]: Invalid parameter number: parameter was not defined
+SQLSTATE[HY093]: Invalid parameter number: parameter was not defined
+
diff --git a/ext/pdo_pgsql/tests/bug69362.phpt b/ext/pdo_pgsql/tests/bug69362.phpt
new file mode 100644
index 0000000000..33212a8863
--- /dev/null
+++ b/ext/pdo_pgsql/tests/bug69362.phpt
@@ -0,0 +1,63 @@
+--TEST--
+PDO PgSQL Bug #69362 (PDO-pgsql fails to connect if password contains a leading single quote)
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded');
+require dirname(__FILE__) . '/config.inc';
+require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
+PDOTest::skip();
+
+$dsn = getenv('PDOTEST_DSN');
+if (empty($dsn)) die('skip no dsn found in env');
+
+$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
+$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+
+
+$user = 'pdo_test_'.rand(5, 400);
+$pass = 'testpass';
+
+// Assume that if we can't create or drop a user, this test needs to be skipped
+try {
+ $db->exec("DROP USER IF EXISTS $user");
+ $db->exec("CREATE USER $user WITH PASSWORD '$pass'");
+} catch (PDOException $e) {
+ die("skip You need CREATEUSER permissions to run the test");
+}
+
+// Peer authentication might prevent the test from properly running
+try {
+ $testConn = new PDO($dsn, $user, $pass);
+} catch (PDOException $e) {
+ echo "skip ".$e->getMessage();
+}
+
+$db->exec("DROP USER $user");
+
+?>
+--FILE--
+<?php
+require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
+$pdo = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
+$pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);
+$rand = rand(5, 400);
+$user = "pdo_test_$rand";
+$template = "CREATE USER $user WITH PASSWORD '%s'";
+$dropUser = "DROP USER $user";
+$testQuery = 'SELECT 1 as verification';
+
+// Create temp user with leading single quote
+$sql = sprintf($template, "''mypassword");
+$pdo->query($sql);
+$testConn = new PDO($conf['ENV']['PDOTEST_DSN'], $user, "'mypassword");
+$result = $testConn->query($testQuery)->fetch();
+$check = $result[0];
+var_dump($check);
+
+// Remove the user
+$pdo->query($dropUser);
+
+?>
+--EXPECT--
+int(1)
+
diff --git a/ext/pdo_pgsql/tests/bug69752.phpt b/ext/pdo_pgsql/tests/bug69752.phpt
new file mode 100644
index 0000000000..bb7e5e87e7
--- /dev/null
+++ b/ext/pdo_pgsql/tests/bug69752.phpt
@@ -0,0 +1,55 @@
+--TEST--
+PDO PgSQL Bug #69752 (memory leak with closeCursor)
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded');
+require dirname(__FILE__) . '/config.inc';
+require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
+PDOTest::skip();
+?>
+--FILE--
+<?php
+require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
+$pdo = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
+
+$pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
+
+$pdo->beginTransaction();
+
+$pdo->exec("
+ create table foo (
+ id bigserial not null primary key,
+ field1 text not null,
+ field2 text not null,
+ field3 text not null,
+ field4 int4 not null
+ )
+");
+$stmt = $pdo->prepare("insert into foo (field1, field2, field3, field4) values (:field1, :field2, :field3, :field4)");
+$max = 1000;
+$first_time_usage = null;
+
+for($i = 0; $i < $max; $i++) {
+ $data = array(
+ 'field1' => "field1: $i",
+ 'field2' => "field2: $i",
+ 'field3' => "field3: $i",
+ 'field4' => $i
+ );
+ $stmt->execute($data);
+ $stmt->closeCursor();
+ $usage = intval(floor(memory_get_usage() / 1024));
+
+ if ($first_time_usage === null) $first_time_usage = $usage;
+
+ /* Use delta instead of direct comparison here */
+ if (abs($first_time_usage - $usage) > 3){
+ printf("Memory Leak Detected: %d != %d\n", $usage, $first_time_usage);
+ break;
+ }
+}
+$pdo->rollBack();
+echo "done\n"
+?>
+--EXPECTF--
+done
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index a65b7a0aa9..6965589154 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -4246,7 +4246,7 @@ PHP_FUNCTION(pg_copy_from)
#if HAVE_PQPUTCOPYDATA
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(pg_rows), value) {
zval tmp;
- ZVAL_DUP(&tmp, value);
+ ZVAL_COPY(&tmp, value);
convert_to_string_ex(&tmp);
query = (char *)emalloc(Z_STRLEN(tmp) + 2);
strlcpy(query, Z_STRVAL(tmp), Z_STRLEN(tmp) + 2);
@@ -4270,7 +4270,7 @@ PHP_FUNCTION(pg_copy_from)
#else
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(pg_rows), value) {
zval tmp;
- ZVAL_DUP(&tmp, value);
+ ZVAL_COPY(&tmp, value);
convert_to_string_ex(&tmp);
query = (char *)emalloc(Z_STRLEN(tmp) + 2);
strlcpy(query, Z_STRVAL(tmp), Z_STRLEN(tmp) + 2);
diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c
index 8ef5b0f7ed..11e5d5a7f1 100644
--- a/ext/phar/phar_object.c
+++ b/ext/phar/phar_object.c
@@ -3965,14 +3965,13 @@ PHP_METHOD(Phar, getMetadata)
if (Z_TYPE(phar_obj->archive->metadata) != IS_UNDEF) {
if (phar_obj->archive->is_persistent) {
- zval ret;
char *buf = estrndup((char *) Z_PTR(phar_obj->archive->metadata), phar_obj->archive->metadata_len);
/* assume success, we would have failed before */
- phar_parse_metadata(&buf, &ret, phar_obj->archive->metadata_len);
+ phar_parse_metadata(&buf, return_value, phar_obj->archive->metadata_len);
efree(buf);
- RETURN_ZVAL(&ret, 0, 1);
+ } else {
+ ZVAL_COPY(return_value, &phar_obj->archive->metadata);
}
- RETURN_ZVAL(&phar_obj->archive->metadata, 1, 0);
}
}
/* }}} */
@@ -4005,7 +4004,7 @@ PHP_METHOD(Phar, setMetadata)
ZVAL_UNDEF(&phar_obj->archive->metadata);
}
- ZVAL_ZVAL(&phar_obj->archive->metadata, metadata, 1, 0);
+ ZVAL_COPY(&phar_obj->archive->metadata, metadata);
phar_obj->archive->is_modified = 1;
phar_flush(phar_obj->archive, 0, 0, 0, &error);
@@ -4622,14 +4621,13 @@ PHP_METHOD(PharFileInfo, getMetadata)
if (Z_TYPE(entry_obj->entry->metadata) != IS_UNDEF) {
if (entry_obj->entry->is_persistent) {
- zval ret;
char *buf = estrndup((char *) Z_PTR(entry_obj->entry->metadata), entry_obj->entry->metadata_len);
/* assume success, we would have failed before */
- phar_parse_metadata(&buf, &ret, entry_obj->entry->metadata_len);
+ phar_parse_metadata(&buf, return_value, entry_obj->entry->metadata_len);
efree(buf);
- RETURN_ZVAL(&ret, 0, 1);
+ } else {
+ ZVAL_COPY(return_value, &entry_obj->entry->metadata);
}
- RETURN_ZVAL(&entry_obj->entry->metadata, 1, 0);
}
}
/* }}} */
@@ -4674,7 +4672,7 @@ PHP_METHOD(PharFileInfo, setMetadata)
ZVAL_UNDEF(&entry_obj->entry->metadata);
}
- ZVAL_ZVAL(&entry_obj->entry->metadata, metadata, 1, 0);
+ ZVAL_COPY(&entry_obj->entry->metadata, metadata);
entry_obj->entry->is_modified = 1;
entry_obj->entry->phar->is_modified = 1;
diff --git a/ext/phar/tests/badparameters.phpt b/ext/phar/tests/badparameters.phpt
index 97faab427c..a1a9fb78a0 100644
--- a/ext/phar/tests/badparameters.phpt
+++ b/ext/phar/tests/badparameters.phpt
@@ -18,7 +18,7 @@ Phar::loadPhar(array());
Phar::canCompress('hi');
try {
$a = new Phar(array());
-} catch (TypeException $e) {
+} catch (TypeError $e) {
print_exception($e);
}
try {
diff --git a/ext/phar/tests/bug60261.phpt b/ext/phar/tests/bug60261.phpt
index 2dd03b9517..84d4203e10 100644
--- a/ext/phar/tests/bug60261.phpt
+++ b/ext/phar/tests/bug60261.phpt
@@ -8,7 +8,7 @@ Bug #60261 (phar dos null pointer)
try {
$nx = new Phar();
$nx->getLinkTarget();
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
diff --git a/ext/phar/tests/cache_list/frontcontroller29.phpt b/ext/phar/tests/cache_list/frontcontroller29.phpt
index 39c27fcdd7..c86cdfe4ac 100644
--- a/ext/phar/tests/cache_list/frontcontroller29.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller29.phpt
@@ -14,7 +14,7 @@ files/frontcontroller8.phar
--EXPECTHEADERS--
Content-type: text/html; charset=UTF-8
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to undefined function oopsie_daisy() in phar://%sfatalerror.phps:1
+Fatal error: Uncaught Error: Call to undefined function oopsie_daisy() in phar://%sfatalerror.phps:1
Stack trace:
#0 [internal function]: unknown()
#1 %s(%d): Phar::webPhar('whatever', 'index.php', '404.php', Array)
diff --git a/ext/phar/tests/frontcontroller29.phpt b/ext/phar/tests/frontcontroller29.phpt
index 5369a60845..710a58f91b 100644
--- a/ext/phar/tests/frontcontroller29.phpt
+++ b/ext/phar/tests/frontcontroller29.phpt
@@ -13,7 +13,7 @@ files/frontcontroller8.phar
--EXPECTHEADERS--
Content-type: text/html; charset=UTF-8
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to undefined function oopsie_daisy() in phar://%sfatalerror.phps:1
+Fatal error: Uncaught Error: Call to undefined function oopsie_daisy() in phar://%sfatalerror.phps:1
Stack trace:
#0 [internal function]: unknown()
#1 %s(%d): Phar::webPhar('whatever', 'index.php', '404.php', Array)
diff --git a/ext/phar/tests/pharfileinfo_construct.phpt b/ext/phar/tests/pharfileinfo_construct.phpt
index abd0fac2e6..1f4f6177b0 100644
--- a/ext/phar/tests/pharfileinfo_construct.phpt
+++ b/ext/phar/tests/pharfileinfo_construct.phpt
@@ -19,7 +19,7 @@ unlink($fname);
try {
$a = new PharFileInfo(array());
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo $e->getMessage() . "\n";
}
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index d2ccfe4442..2252233c47 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -667,7 +667,8 @@ static void _parameter_string(string *str, zend_function *fptr, struct _zend_arg
}
if (arg_info->class_name) {
string_printf(str, "%s ",
- (fptr->type == ZEND_INTERNAL_FUNCTION) ?
+ (fptr->type == ZEND_INTERNAL_FUNCTION &&
+ !(fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO)) ?
((zend_internal_arg_info*)arg_info)->class_name :
arg_info->class_name->val);
if (arg_info->allow_null) {
@@ -687,7 +688,8 @@ static void _parameter_string(string *str, zend_function *fptr, struct _zend_arg
}
if (arg_info->name) {
string_printf(str, "$%s",
- (fptr->type == ZEND_INTERNAL_FUNCTION) ?
+ (fptr->type == ZEND_INTERNAL_FUNCTION &&
+ !(fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO)) ?
((zend_internal_arg_info*)arg_info)->name :
arg_info->name->val);
} else {
@@ -891,7 +893,8 @@ static void _function_string(string *str, zend_function *fptr, zend_class_entry
string_printf(str, " %s- Return [ ", indent);
if (fptr->common.arg_info[-1].class_name) {
string_printf(str, "%s ",
- (fptr->type == ZEND_INTERNAL_FUNCTION) ?
+ (fptr->type == ZEND_INTERNAL_FUNCTION &&
+ !(fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO)) ?
((zend_internal_arg_info*)(fptr->common.arg_info - 1))->class_name :
fptr->common.arg_info[-1].class_name->val);
if (fptr->common.arg_info[-1].allow_null) {
@@ -1224,7 +1227,8 @@ static void reflection_parameter_factory(zend_function *fptr, zval *closure_obje
zval name;
if (arg_info->name) {
- if (fptr->type == ZEND_INTERNAL_FUNCTION) {
+ if (fptr->type == ZEND_INTERNAL_FUNCTION &&
+ !(fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO)) {
ZVAL_STRING(&name, ((zend_internal_arg_info*)arg_info)->name);
} else {
ZVAL_STR_COPY(&name, arg_info->name);
@@ -1720,7 +1724,7 @@ ZEND_METHOD(reflection_function, getClosureThis)
if (!Z_ISUNDEF(intern->obj)) {
closure_this = zend_get_closure_this_ptr(&intern->obj);
if (!Z_ISUNDEF_P(closure_this)) {
- RETURN_ZVAL(closure_this, 1, 0);
+ ZVAL_COPY(return_value, closure_this);
}
}
}
@@ -2340,7 +2344,6 @@ ZEND_METHOD(reflection_parameter, __construct)
uint32_t num_args;
zend_class_entry *ce = NULL;
zend_bool is_closure = 0;
- zend_bool is_invoke = 0;
if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "zz", &reference, &parameter) == FAILURE) {
return;
@@ -2405,7 +2408,6 @@ ZEND_METHOD(reflection_parameter, __construct)
{
/* nothing to do. don't set is_closure since is the invoke handler,
not the closure itself */
- is_invoke = 1;
} else if ((fptr = zend_hash_str_find_ptr(&ce->function_table, lcname, lcname_len)) == NULL) {
efree(lcname);
zend_throw_exception_ex(reflection_exception_ptr, 0,
@@ -2462,7 +2464,8 @@ ZEND_METHOD(reflection_parameter, __construct)
position= -1;
convert_to_string_ex(parameter);
- if (!is_invoke && fptr->type == ZEND_INTERNAL_FUNCTION) {
+ if (fptr->type == ZEND_INTERNAL_FUNCTION &&
+ !(fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO)) {
for (i = 0; i < num_args; i++) {
if (arg_info[i].name) {
if (strcmp(((zend_internal_arg_info*)arg_info)[i].name, Z_STRVAL_P(parameter)) == 0) {
@@ -2498,7 +2501,8 @@ ZEND_METHOD(reflection_parameter, __construct)
}
if (arg_info[position].name) {
- if (fptr->type == ZEND_INTERNAL_FUNCTION) {
+ if (fptr->type == ZEND_INTERNAL_FUNCTION &&
+ !(fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO)) {
ZVAL_STRING(&name, ((zend_internal_arg_info*)arg_info)[position].name);
} else {
ZVAL_STR_COPY(&name, arg_info[position].name);
@@ -2620,7 +2624,8 @@ ZEND_METHOD(reflection_parameter, getClass)
const char *class_name;
size_t class_name_len;
- if (param->fptr->type == ZEND_INTERNAL_FUNCTION) {
+ if (param->fptr->type == ZEND_INTERNAL_FUNCTION &&
+ !(param->fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO)) {
class_name = ((zend_internal_arg_info*)param->arg_info)->class_name;
class_name_len = strlen(class_name);
} else {
@@ -2648,7 +2653,8 @@ ZEND_METHOD(reflection_parameter, getClass)
}
ce = ce->parent;
} else {
- if (param->fptr->type == ZEND_INTERNAL_FUNCTION) {
+ if (param->fptr->type == ZEND_INTERNAL_FUNCTION &&
+ !(param->fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO)) {
zend_string *name = zend_string_init(class_name, class_name_len, 0);
ce = zend_lookup_class(name);
zend_string_release(name);
@@ -2694,7 +2700,8 @@ ZEND_METHOD(reflection_parameter, getType)
}
GET_REFLECTION_OBJECT_PTR(param);
- if ((param->fptr->type == ZEND_INTERNAL_FUNCTION ?
+ if (((param->fptr->type == ZEND_INTERNAL_FUNCTION &&
+ !(param->fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO)) ?
((zend_internal_arg_info*)param->arg_info)->type_hint :
param->arg_info->type_hint) == 0)
{
@@ -2989,10 +2996,9 @@ ZEND_METHOD(reflection_type, __toString)
case IS_ARRAY: RETURN_STRINGL("array", sizeof("array") - 1);
case IS_CALLABLE: RETURN_STRINGL("callable", sizeof("callable") - 1);
case IS_OBJECT:
- if (param->fptr->type == ZEND_INTERNAL_FUNCTION) {
- if (!(param->fptr->internal_function.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)) {
- RETURN_STRING(((zend_internal_arg_info*)param->arg_info)->class_name);
- }
+ if (param->fptr->type == ZEND_INTERNAL_FUNCTION &&
+ !(param->fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO)) {
+ RETURN_STRING(((zend_internal_arg_info*)param->arg_info)->class_name);
}
RETURN_STR_COPY(param->arg_info->class_name);
case IS_STRING: RETURN_STRINGL("string", sizeof("string") - 1);
@@ -3153,7 +3159,7 @@ ZEND_METHOD(reflection_method, getClosure)
if (Z_OBJCE_P(obj) == zend_ce_closure &&
(mptr->internal_function.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE))
{
- RETURN_ZVAL(obj, 1, 0);
+ ZVAL_COPY(return_value, obj);
} else {
zend_create_closure(return_value, mptr, mptr->common.scope, Z_OBJCE_P(obj), obj);
}
@@ -3512,7 +3518,8 @@ ZEND_METHOD(reflection_function, getShortName)
{
RETURN_STRINGL(backslash + 1, Z_STRLEN_P(name) - (backslash - Z_STRVAL_P(name) + 1));
}
- RETURN_ZVAL(name, 1, 0);
+ ZVAL_DEREF(name);
+ ZVAL_COPY(return_value, name);
}
/* }}} */
@@ -3819,14 +3826,15 @@ ZEND_METHOD(reflection_class, getStaticPropertyValue)
prop = zend_std_get_static_property(ce, name, 1);
if (!prop) {
if (def_value) {
- RETURN_ZVAL(def_value, 1, 0);
+ ZVAL_COPY(return_value, def_value);
} else {
zend_throw_exception_ex(reflection_exception_ptr, 0,
"Class %s does not have a property named %s", ce->name->val, name->val);
}
return;
} else {
- RETURN_ZVAL(prop, 1, 0);
+ ZVAL_DEREF(prop);
+ ZVAL_COPY(return_value, prop);
}
}
/* }}} */
@@ -5138,7 +5146,8 @@ ZEND_METHOD(reflection_class, getShortName)
{
RETURN_STRINGL(backslash + 1, Z_STRLEN_P(name) - (backslash - Z_STRVAL_P(name) + 1));
}
- RETURN_ZVAL(name, 1, 0);
+ ZVAL_DEREF(name);
+ ZVAL_COPY(return_value, name);
}
/* }}} */
diff --git a/ext/reflection/tests/005.phpt b/ext/reflection/tests/005.phpt
index e257699b6f..e40fcc3099 100644
--- a/ext/reflection/tests/005.phpt
+++ b/ext/reflection/tests/005.phpt
@@ -2,7 +2,6 @@
ReflectionMethod::getDocComment() uses wrong comment block
--INI--
opcache.save_comments=1
-opcache.load_comments=1
--FILE--
<?php
diff --git a/ext/reflection/tests/009.phpt b/ext/reflection/tests/009.phpt
index 81fe93a255..c6a252cfca 100644
--- a/ext/reflection/tests/009.phpt
+++ b/ext/reflection/tests/009.phpt
@@ -2,7 +2,6 @@
ReflectionFunction basic tests
--INI--
opcache.save_comments=1
-opcache.load_comments=1
--FILE--
<?php
diff --git a/ext/reflection/tests/025.phpt b/ext/reflection/tests/025.phpt
index cd375454b5..0259d66bd3 100644
--- a/ext/reflection/tests/025.phpt
+++ b/ext/reflection/tests/025.phpt
@@ -4,7 +4,6 @@ ReflectionFunction basic tests
<?php extension_loaded('reflection') or die('skip'); ?>
--INI--
opcache.save_comments=1
-opcache.load_comments=1
--FILE--
<?php
diff --git a/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt b/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt
index 0d1ef20ad7..900ce21d45 100644
--- a/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt
+++ b/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt
@@ -12,7 +12,7 @@ if (!extension_loaded('reflection)) print 'skip';
$rc = new ReflectionClass("stdClass");
$rc2 = clone($rc);
--EXPECTF--
-Fatal error: Uncaught EngineException: Trying to clone an uncloneable object of class ReflectionClass in %s:%d
+Fatal error: Uncaught Error: Trying to clone an uncloneable object of class ReflectionClass in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/ext/reflection/tests/ReflectionClass_getDocComment_001.phpt b/ext/reflection/tests/ReflectionClass_getDocComment_001.phpt
index efa7e9a10a..624829f014 100644
--- a/ext/reflection/tests/ReflectionClass_getDocComment_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_getDocComment_001.phpt
@@ -5,7 +5,6 @@ Robin Fernandes <robinf@php.net>
Steve Seear <stevseea@php.net>
--INI--
opcache.save_comments=1
-opcache.load_comments=1
--FILE--
<?php
/**
diff --git a/ext/reflection/tests/ReflectionClass_getName_error1.phpt b/ext/reflection/tests/ReflectionClass_getName_error1.phpt
index e475688b6d..dcdfcdf98f 100644
--- a/ext/reflection/tests/ReflectionClass_getName_error1.phpt
+++ b/ext/reflection/tests/ReflectionClass_getName_error1.phpt
@@ -5,7 +5,7 @@ ReflectionClass::getName - forbid static invocation
ReflectionClass::getName();
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Non-static method ReflectionClass::getName() cannot be called statically in %s:2
+Fatal error: Uncaught Error: Non-static method ReflectionClass::getName() cannot be called statically in %s:2
Stack trace:
#0 {main}
thrown in %s on line 2
diff --git a/ext/reflection/tests/ReflectionClass_isCloneable_001.phpt b/ext/reflection/tests/ReflectionClass_isCloneable_001.phpt
index e261855088..361708a315 100644
--- a/ext/reflection/tests/ReflectionClass_isCloneable_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_isCloneable_001.phpt
@@ -68,7 +68,7 @@ Internal class - XMLWriter
bool(false)
bool(false)
-Fatal error: Uncaught EngineException: Trying to clone an uncloneable object of class XMLWriter in %s:%d
+Fatal error: Uncaught Error: Trying to clone an uncloneable object of class XMLWriter in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/ext/reflection/tests/ReflectionClass_isIterateable_001.phpt b/ext/reflection/tests/ReflectionClass_isIterateable_001.phpt
index 47dba9b6ec..42dc647a02 100644
--- a/ext/reflection/tests/ReflectionClass_isIterateable_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_isIterateable_001.phpt
@@ -86,7 +86,7 @@ NULL
Test static invocation:
-Fatal error: Uncaught EngineException: Non-static method ReflectionClass::isIterateable() cannot be called statically in %s:43
+Fatal error: Uncaught Error: Non-static method ReflectionClass::isIterateable() cannot be called statically in %s:43
Stack trace:
#0 {main}
thrown in %s on line 43 \ No newline at end of file
diff --git a/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt b/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt
index ada3c6db48..2754b4c8e3 100644
--- a/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt
@@ -17,7 +17,7 @@ var_dump($a);
?>
--EXPECTF--
-Fatal error: Uncaught TypeException: Argument 1 passed to ReflectionClass::newInstanceArgs() must be of the type array, string given in %s:8
+Fatal error: Uncaught TypeError: Argument 1 passed to ReflectionClass::newInstanceArgs() must be of the type array, string given in %s:8
Stack trace:
#0 %s(%d): ReflectionClass->newInstanceArgs('x')
#1 {main}
diff --git a/ext/reflection/tests/ReflectionExtension_constructor_error.phpt b/ext/reflection/tests/ReflectionExtension_constructor_error.phpt
index 235c2ad768..94071de5ab 100644
--- a/ext/reflection/tests/ReflectionExtension_constructor_error.phpt
+++ b/ext/reflection/tests/ReflectionExtension_constructor_error.phpt
@@ -7,19 +7,19 @@ Leon Luijkx <leon@phpgg.nl>
<?php
try {
$obj = new ReflectionExtension();
-} catch (TypeException $re) {
+} catch (TypeError $re) {
echo "Ok - ".$re->getMessage().PHP_EOL;
}
try {
$obj = new ReflectionExtension('foo', 'bar');
-} catch (TypeException $re) {
+} catch (TypeError $re) {
echo "Ok - ".$re->getMessage().PHP_EOL;
}
try {
$obj = new ReflectionExtension([]);
-} catch (TypeException $re) {
+} catch (TypeError $re) {
echo "Ok - ".$re->getMessage().PHP_EOL;
}
diff --git a/ext/reflection/tests/ReflectionExtension_getClassNames_basic.phpt b/ext/reflection/tests/ReflectionExtension_getClassNames_basic.phpt
index 0728d505c3..3fea08c43f 100644
--- a/ext/reflection/tests/ReflectionExtension_getClassNames_basic.phpt
+++ b/ext/reflection/tests/ReflectionExtension_getClassNames_basic.phpt
@@ -17,6 +17,6 @@ array(4) {
[2]=>
%s(9) "Directory"
[3]=>
- %s(18) "AssertionException"
+ %s(14) "AssertionError"
}
==DONE==
diff --git a/ext/reflection/tests/ReflectionFunction_construct.001.phpt b/ext/reflection/tests/ReflectionFunction_construct.001.phpt
index 52db7c654d..0e2e8a3681 100644
--- a/ext/reflection/tests/ReflectionFunction_construct.001.phpt
+++ b/ext/reflection/tests/ReflectionFunction_construct.001.phpt
@@ -9,7 +9,7 @@ Steve Seear <stevseea@php.net>
try {
$a = new ReflectionFunction(array(1, 2, 3));
echo "exception not thrown.".PHP_EOL;
-} catch (TypeException $re) {
+} catch (TypeError $re) {
echo "Ok - ".$re->getMessage().PHP_EOL;
}
try {
@@ -19,17 +19,17 @@ try {
}
try {
$a = new ReflectionFunction();
-} catch (TypeException $re) {
+} catch (TypeError $re) {
echo "Ok - ".$re->getMessage().PHP_EOL;
}
try {
$a = new ReflectionFunction(1, 2);
-} catch (TypeException $re) {
+} catch (TypeError $re) {
echo "Ok - ".$re->getMessage().PHP_EOL;
}
try {
$a = new ReflectionFunction([]);
-} catch (TypeException $re) {
+} catch (TypeError $re) {
echo "Ok - ".$re->getMessage().PHP_EOL;
}
diff --git a/ext/reflection/tests/ReflectionFunction_getDocComment.001.phpt b/ext/reflection/tests/ReflectionFunction_getDocComment.001.phpt
index 68d1d9d3a1..2d5bb928b2 100644
--- a/ext/reflection/tests/ReflectionFunction_getDocComment.001.phpt
+++ b/ext/reflection/tests/ReflectionFunction_getDocComment.001.phpt
@@ -5,7 +5,6 @@ Robin Fernandes <robinf@php.net>
Steve Seear <stevseea@php.net>
--INI--
opcache.save_comments=1
-opcache.load_comments=1
--FILE--
<?php
diff --git a/ext/reflection/tests/ReflectionMethod_006.phpt b/ext/reflection/tests/ReflectionMethod_006.phpt
index b22a2acc6d..627dc96f32 100644
--- a/ext/reflection/tests/ReflectionMethod_006.phpt
+++ b/ext/reflection/tests/ReflectionMethod_006.phpt
@@ -8,12 +8,12 @@ Steve Seear <stevseea@php.net>
try {
new ReflectionMethod();
-} catch (TypeException $re) {
+} catch (TypeError $re) {
echo "Ok - ".$re->getMessage().PHP_EOL;
}
try {
new ReflectionMethod('a', 'b', 'c');
-} catch (TypeException $re) {
+} catch (TypeError $re) {
echo "Ok - ".$re->getMessage().PHP_EOL;
}
diff --git a/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt b/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt
index 3c521efc64..98125cba65 100644
--- a/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt
+++ b/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt
@@ -16,13 +16,13 @@ class TestClass
try {
echo "Too few arguments:\n";
$methodInfo = new ReflectionMethod();
-} catch (TypeException $re) {
+} catch (TypeError $re) {
echo "Ok - ".$re->getMessage().PHP_EOL;
}
try {
echo "\nToo many arguments:\n";
$methodInfo = new ReflectionMethod("TestClass", "foo", true);
-} catch (TypeException $re) {
+} catch (TypeError $re) {
echo "Ok - ".$re->getMessage().PHP_EOL;
}
@@ -45,7 +45,7 @@ try {
try{
//invalid 2nd param
$methodInfo = new ReflectionMethod("TestClass", []);
-} catch (TypeException $re) {
+} catch (TypeError $re) {
echo "Ok - ".$re->getMessage().PHP_EOL;
}
diff --git a/ext/reflection/tests/ReflectionMethod_getDocComment_basic.phpt b/ext/reflection/tests/ReflectionMethod_getDocComment_basic.phpt
index b04fb6c9fc..e79092421d 100644
--- a/ext/reflection/tests/ReflectionMethod_getDocComment_basic.phpt
+++ b/ext/reflection/tests/ReflectionMethod_getDocComment_basic.phpt
@@ -2,7 +2,6 @@
ReflectionMethod::getDocComment()
--INI--
opcache.save_comments=1
-opcache.load_comments=1
--FILE--
<?php
/**
diff --git a/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt b/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt
index 0405df67e1..8bedbea0cb 100644
--- a/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt
+++ b/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt
@@ -18,7 +18,7 @@ $testClassInstance = new TestClass();
try {
var_dump($foo->invokeArgs($testClassInstance, true));
-} catch (EngineException $e) {
+} catch (Error $e) {
var_dump($e->getMessage());
}
diff --git a/ext/reflection/tests/ReflectionObject_getName_error1.phpt b/ext/reflection/tests/ReflectionObject_getName_error1.phpt
index 32132f52e8..0d88c84398 100644
--- a/ext/reflection/tests/ReflectionObject_getName_error1.phpt
+++ b/ext/reflection/tests/ReflectionObject_getName_error1.phpt
@@ -5,7 +5,7 @@ ReflectionObject::getName - forbid static invocation
ReflectionObject::getName();
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Non-static method ReflectionClass::getName() cannot be called statically in %s:2
+Fatal error: Uncaught Error: Non-static method ReflectionClass::getName() cannot be called statically in %s:2
Stack trace:
#0 {main}
thrown in %s on line 2
diff --git a/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt b/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt
index a884162fd2..6c154558e9 100644
--- a/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt
+++ b/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt
@@ -25,7 +25,7 @@ class C {
try {
new ReflectionParameter(array ('A', 'b'));
}
-catch(TypeException $e) {
+catch(TypeError $e) {
printf( "Ok - %s\n", $e->getMessage());
}
diff --git a/ext/reflection/tests/ReflectionProperty_basic2.phpt b/ext/reflection/tests/ReflectionProperty_basic2.phpt
index bc42d3f828..62938df100 100644
--- a/ext/reflection/tests/ReflectionProperty_basic2.phpt
+++ b/ext/reflection/tests/ReflectionProperty_basic2.phpt
@@ -2,7 +2,6 @@
Test usage of ReflectionProperty methods isDefault(), getModifiers(), getDeclaringClass() and getDocComment().
--INI--
opcache.save_comments=1
-opcache.load_comments=1
--FILE--
<?php
diff --git a/ext/reflection/tests/ReflectionProperty_error.phpt b/ext/reflection/tests/ReflectionProperty_error.phpt
index ef051b5380..c8a2f11ee1 100644
--- a/ext/reflection/tests/ReflectionProperty_error.phpt
+++ b/ext/reflection/tests/ReflectionProperty_error.phpt
@@ -9,18 +9,18 @@ class C {
try {
new ReflectionProperty();
-} catch (TypeException $re) {
+} catch (TypeError $re) {
echo "Ok - ".$re->getMessage().PHP_EOL;
}
try {
new ReflectionProperty('C::p');
-} catch (TypeException $re) {
+} catch (TypeError $re) {
echo "Ok - ".$re->getMessage().PHP_EOL;
}
try {
new ReflectionProperty('C', 'p', 'x');
-} catch (TypeException $re) {
+} catch (TypeError $re) {
echo "Ok - ".$re->getMessage().PHP_EOL;
}
diff --git a/ext/reflection/tests/ReflectionProperty_getDocComment_basic.phpt b/ext/reflection/tests/ReflectionProperty_getDocComment_basic.phpt
index f94ee8ca4c..8491f32597 100644
--- a/ext/reflection/tests/ReflectionProperty_getDocComment_basic.phpt
+++ b/ext/reflection/tests/ReflectionProperty_getDocComment_basic.phpt
@@ -2,7 +2,6 @@
Test ReflectionProperty::getDocComment() usage.
--INI--
opcache.save_comments=1
-opcache.load_comments=1
--FILE--
<?php
diff --git a/ext/reflection/tests/bug36308.phpt b/ext/reflection/tests/bug36308.phpt
index f923ee31ab..17d3cf1026 100644
--- a/ext/reflection/tests/bug36308.phpt
+++ b/ext/reflection/tests/bug36308.phpt
@@ -2,7 +2,6 @@
Reflection Bug #36308 (ReflectionProperty::getDocComment() does not reflect extended class commentary)
--INI--
opcache.save_comments=1
-opcache.load_comments=1
--FILE--
<?php
class Base {
diff --git a/ext/reflection/tests/bug64007.phpt b/ext/reflection/tests/bug64007.phpt
index 91b7fa6885..a25beb6360 100644
--- a/ext/reflection/tests/bug64007.phpt
+++ b/ext/reflection/tests/bug64007.phpt
@@ -16,7 +16,7 @@ var_dump($generator);
--EXPECTF--
string(%d) "Class Generator is an internal class marked as final that cannot be instantiated without invoking its constructor"
-Fatal error: Uncaught EngineException: The "Generator" class is reserved for internal use and cannot be manually instantiated in %sbug64007.php:%d
+Fatal error: Uncaught Error: The "Generator" class is reserved for internal use and cannot be manually instantiated in %sbug64007.php:%d
Stack trace:
#0 %s(%d): ReflectionClass->newInstance()
#1 {main}
diff --git a/ext/reflection/tests/bug64936.phpt b/ext/reflection/tests/bug64936.phpt
index 363a17f509..a4a66d4f48 100644
--- a/ext/reflection/tests/bug64936.phpt
+++ b/ext/reflection/tests/bug64936.phpt
@@ -2,7 +2,6 @@
ReflectionMethod::getDocComment() uses left over doc comment from previous scanner run
--INI--
opcache.save_comments=1
-opcache.load_comments=1
--SKIPIF--
<?php
if (!extension_loaded('reflection') || !extension_loaded('tokenizer')) print 'skip missing reflection of tokernizer extension';
diff --git a/ext/session/session.c b/ext/session/session.c
index 70adf8e1ac..66b1a8628b 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -2743,7 +2743,8 @@ static zend_bool early_find_sid_in(zval *dest, int where, php_session_rfc1867_pr
if ((ppid = zend_hash_str_find(Z_ARRVAL(PG(http_globals)[where]), PS(session_name), progress->sname_len))
&& Z_TYPE_P(ppid) == IS_STRING) {
zval_dtor(dest);
- ZVAL_ZVAL(dest, ppid, 1, 0);
+ ZVAL_DEREF(ppid);
+ ZVAL_COPY(dest, ppid);
return 1;
}
diff --git a/ext/session/tests/bug60634_error_1.phpt b/ext/session/tests/bug60634_error_1.phpt
index 90983c6f85..d0733f5a5a 100644
--- a/ext/session/tests/bug60634_error_1.phpt
+++ b/ext/session/tests/bug60634_error_1.phpt
@@ -45,7 +45,7 @@ echo "um, hi\n";
--EXPECTF--
write: goodbye cruel world
-Fatal error: Uncaught EngineException: Call to undefined function undefined_function() in %s:%d
+Fatal error: Uncaught Error: Call to undefined function undefined_function() in %s:%d
Stack trace:
#0 [internal function]: write(%s, '')
#1 %s(%d): session_write_close()
diff --git a/ext/session/tests/bug60634_error_3.phpt b/ext/session/tests/bug60634_error_3.phpt
index d756644f76..b7840b04f9 100644
--- a/ext/session/tests/bug60634_error_3.phpt
+++ b/ext/session/tests/bug60634_error_3.phpt
@@ -43,7 +43,7 @@ session_start();
--EXPECTF--
write: goodbye cruel world
-Fatal error: Uncaught EngineException: Call to undefined function undefined_function() in %s:%d
+Fatal error: Uncaught Error: Call to undefined function undefined_function() in %s:%d
Stack trace:
#0 [internal function]: write(%s, '')
#1 {main}
diff --git a/ext/session/tests/bug60634_error_5.phpt b/ext/session/tests/bug60634_error_5.phpt
index 018cf17538..18f1266a00 100644
--- a/ext/session/tests/bug60634_error_5.phpt
+++ b/ext/session/tests/bug60634_error_5.phpt
@@ -44,7 +44,7 @@ echo "um, hi\n";
--EXPECTF--
close: goodbye cruel world
-Fatal error: Uncaught EngineException: Call to undefined function undefined_function() in %s:%d
+Fatal error: Uncaught Error: Call to undefined function undefined_function() in %s:%d
Stack trace:
#0 [internal function]: close()
#1 %s(%d): session_write_close()
diff --git a/ext/shmop/package.xml b/ext/shmop/package.xml
index 2bba143781..669da64bcf 100644
--- a/ext/shmop/package.xml
+++ b/ext/shmop/package.xml
@@ -32,7 +32,6 @@ package.xml added to support installation using pear installer
<file role="doc" name="README"/>
<file role="src" name="config.m4"/>
<file role="src" name="config.w32"/>
- <file role="src" name="shmop.dsp"/>
<file role="src" name="shmop.c"/>
<file role="src" name="php_shmop.h"/>
<file role="test" name="tests/001.phpt"/>
diff --git a/ext/shmop/package2.xml b/ext/shmop/package2.xml
index e592615801..a8b00f371c 100644
--- a/ext/shmop/package2.xml
+++ b/ext/shmop/package2.xml
@@ -39,7 +39,6 @@ http://pear.php.net/dtd/package-2.0.xsd">
<file name="php_shmop.h" role="src" />
<file name="README" role="doc" />
<file name="shmop.c" role="src" />
- <file name="shmop.dsp" role="src" />
</dir> <!-- / -->
</contents>
<dependencies>
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index 6bcf12ea86..9beb946aea 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -517,7 +517,7 @@ static int sxe_prop_dim_write(zval *object, zval *member, zval *value, zend_bool
case IS_DOUBLE:
case IS_NULL:
if (Z_TYPE_P(value) != IS_STRING) {
- ZVAL_DUP(&zval_copy, value);
+ ZVAL_COPY(&zval_copy, value);
value = &zval_copy;
convert_to_string(value);
new_value = 1;
@@ -1930,12 +1930,8 @@ static int sxe_object_cast(zval *readobj, zval *writeobj, int type)
Returns the string content */
SXE_METHOD(__toString)
{
- zval result;
-
- if (sxe_object_cast_ex(getThis(), &result, IS_STRING) == SUCCESS) {
- RETURN_ZVAL(&result, 0, 0);
- } else {
- zval_ptr_dtor(&result);
+ if (sxe_object_cast_ex(getThis(), return_value, IS_STRING) != SUCCESS) {
+ zval_ptr_dtor(return_value);
RETURN_EMPTY_STRING();
}
}
@@ -1979,9 +1975,9 @@ static int sxe_count_elements(zval *object, zend_long *count) /* {{{ */
if (!Z_ISUNDEF(intern->tmp)) {
zval_ptr_dtor(&intern->tmp);
}
- ZVAL_ZVAL(&intern->tmp, &rv, 0, 0);
- convert_to_long(&intern->tmp);
- *count = (zend_long)Z_LVAL(intern->tmp);
+ ZVAL_LONG(&intern->tmp, zval_get_long(&rv));
+ zval_ptr_dtor(&rv);
+ *count = Z_LVAL(intern->tmp);
return SUCCESS;
}
return FAILURE;
diff --git a/ext/simplexml/sxe.c b/ext/simplexml/sxe.c
index c5241a804a..fc3f28d6d3 100644
--- a/ext/simplexml/sxe.c
+++ b/ext/simplexml/sxe.c
@@ -71,6 +71,7 @@ PHP_METHOD(ce_SimpleXMLIterator, valid)
PHP_METHOD(ce_SimpleXMLIterator, current)
{
php_sxe_object *sxe = Z_SXEOBJ_P(getThis());
+ zval *data;
if (zend_parse_parameters_none() == FAILURE) {
return;
@@ -80,7 +81,9 @@ PHP_METHOD(ce_SimpleXMLIterator, current)
return; /* return NULL */
}
- RETURN_ZVAL(&sxe->iter.data, 1, 0);
+ data = &sxe->iter.data;
+ ZVAL_DEREF(data);
+ ZVAL_COPY(return_value, data);
}
/* }}} */
@@ -158,6 +161,7 @@ PHP_METHOD(ce_SimpleXMLIterator, hasChildren)
PHP_METHOD(ce_SimpleXMLIterator, getChildren)
{
php_sxe_object *sxe = Z_SXEOBJ_P(getThis());
+ zval *data;
if (zend_parse_parameters_none() == FAILURE) {
return;
@@ -166,7 +170,10 @@ PHP_METHOD(ce_SimpleXMLIterator, getChildren)
if (Z_ISUNDEF(sxe->iter.data) || sxe->iter.type == SXE_ITER_ATTRLIST) {
return; /* return NULL */
}
- RETURN_ZVAL(&sxe->iter.data, 1, 0);
+
+ data = &sxe->iter.data;
+ ZVAL_DEREF(data);
+ ZVAL_COPY(return_value, data);
}
/* {{{ arginfo */
diff --git a/ext/simplexml/tests/SimpleXMLElement_xpath_3.phpt b/ext/simplexml/tests/SimpleXMLElement_xpath_3.phpt
index e2997f19d1..8ed2143285 100644
--- a/ext/simplexml/tests/SimpleXMLElement_xpath_3.phpt
+++ b/ext/simplexml/tests/SimpleXMLElement_xpath_3.phpt
@@ -15,7 +15,7 @@ Notice: Undefined variable: x in %s on line %d
Warning: simplexml_load_string() expects parameter 3 to be integer, float given in %s on line %d
-Fatal error: Uncaught EngineException: Call to a member function xpath() on null in %s:%d
+Fatal error: Uncaught Error: Call to a member function xpath() on null in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/ext/simplexml/tests/bug37565.phpt b/ext/simplexml/tests/bug37565.phpt
index cf5a3d8849..7d9675e3fd 100644
--- a/ext/simplexml/tests/bug37565.phpt
+++ b/ext/simplexml/tests/bug37565.phpt
@@ -17,13 +17,13 @@ class Setting extends ReflectionObject
try {
Reflection::export(simplexml_load_string('<test/>', 'Setting'));
-} catch (EngineException $e) {
+} catch (Error $e) {
my_error_handler($e->getCode(), $e->getMessage(), $e->getFile(), $e->getLine());
}
try {
Reflection::export(simplexml_load_file('data:,<test/>', 'Setting'));
-} catch (EngineException $e) {
+} catch (Error $e) {
my_error_handler($e->getCode(), $e->getMessage(), $e->getFile(), $e->getLine());
}
diff --git a/ext/snmp/tests/snmp-object-error.phpt b/ext/snmp/tests/snmp-object-error.phpt
index e2574872f4..2b81629d7e 100644
--- a/ext/snmp/tests/snmp-object-error.phpt
+++ b/ext/snmp/tests/snmp-object-error.phpt
@@ -16,17 +16,17 @@ snmp_set_valueretrieval(SNMP_VALUE_PLAIN);
try {
var_dump(new SNMP(SNMP::VERSION_1, $hostname));
-} catch (TypeException $e) {
+} catch (TypeError $e) {
print $e->getMessage() . "\n";
}
try {
var_dump(new SNMP(SNMP::VERSION_1, $hostname, $community, ''));
-} catch (TypeException $e) {
+} catch (TypeError $e) {
print $e->getMessage() . "\n";
}
try {
var_dump(new SNMP(SNMP::VERSION_1, $hostname, $community, $timeout, ''));
-} catch (TypeException $e) {
+} catch (TypeError $e) {
print $e->getMessage() . "\n";
}
try {
diff --git a/ext/soap/package.xml b/ext/soap/package.xml
index 6c68f8dd4c..32c5b77ff3 100644
--- a/ext/soap/package.xml
+++ b/ext/soap/package.xml
@@ -58,7 +58,6 @@
<file role="src">php_xml.c</file>
<file role="src">php_xml.h</file>
<file role="src">soap.c</file>
- <file role="src">php_soap.dsp</file>
</dir>
</filelist>
</package>
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c
index 96207f7975..7bff2aeab6 100644
--- a/ext/soap/php_encoding.c
+++ b/ext/soap/php_encoding.c
@@ -923,21 +923,16 @@ static xmlNodePtr to_xml_base64(encodeTypePtr type, zval *data, int style, xmlNo
if (Z_TYPE_P(data) == IS_STRING) {
str = php_base64_encode((unsigned char*)Z_STRVAL_P(data), Z_STRLEN_P(data));
- text = xmlNewTextLen(BAD_CAST(str->val), str->len);
- xmlAddChild(ret, text);
- zend_string_release(str);
} else {
- zval tmp;
-
- ZVAL_DUP(&tmp, data);
- convert_to_string(&tmp);
- str = php_base64_encode((unsigned char*)Z_STRVAL(tmp), Z_STRLEN(tmp));
- text = xmlNewTextLen(BAD_CAST(str->val), str->len);
- xmlAddChild(ret, text);
- zend_string_release(str);
- zval_dtor(&tmp);
+ zend_string *tmp = zval_get_string(data);
+ str = php_base64_encode((unsigned char*) tmp->val, tmp->len);
+ zend_string_release(tmp);
}
+ text = xmlNewTextLen(BAD_CAST(str->val), str->len);
+ xmlAddChild(ret, text);
+ zend_string_release(str);
+
if (style == SOAP_ENCODED) {
set_ns_and_type(ret, type);
}
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index 120274b272..05c7b857f3 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -1496,10 +1496,10 @@ static void _soap_server_exception(soapServicePtr service, sdlFunctionPtr functi
ZVAL_OBJ(&exception_object, EG(exception));
if (instanceof_function(Z_OBJCE(exception_object), soap_fault_class_entry)) {
soap_server_fault_ex(function, &exception_object, NULL);
- } else if (instanceof_function(Z_OBJCE(exception_object), zend_get_engine_exception())) {
+ } else if (instanceof_function(Z_OBJCE(exception_object), zend_get_error())) {
if (service->send_errors) {
zval rv;
- zend_string *msg = zval_get_string(zend_read_property(zend_exception_get_base(), &exception_object, "message", sizeof("message")-1, 0, &rv));
+ zend_string *msg = zval_get_string(zend_read_property(zend_get_error(), &exception_object, "message", sizeof("message")-1, 0, &rv));
add_soap_fault_ex(&exception_object, this_ptr, "Server", msg->val, NULL, NULL);
zend_string_release(msg);
} else {
@@ -2596,13 +2596,13 @@ static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *act
add_soap_fault(this_ptr, "Client", "SoapClient::__doRequest() failed", NULL, NULL);
ret = FALSE;
} else if (Z_TYPE_P(response) != IS_STRING) {
- if (EG(exception) && instanceof_function(EG(exception)->ce, zend_get_engine_exception())) {
+ if (EG(exception) && instanceof_function(EG(exception)->ce, zend_get_error())) {
zval rv;
zend_string *msg;
zval exception_object;
ZVAL_OBJ(&exception_object, EG(exception));
- msg = zval_get_string(zend_read_property(zend_exception_get_base(), &exception_object, "message", sizeof("message")-1, 0, &rv));
+ msg = zval_get_string(zend_read_property(zend_get_error(), &exception_object, "message", sizeof("message")-1, 0, &rv));
/* change class */
EG(exception)->ce = soap_fault_class_entry;
set_soap_fault(&exception_object, NULL, "Client", msg->val, NULL, NULL, NULL);
diff --git a/ext/sockets/conversions.c b/ext/sockets/conversions.c
index f6a86315b1..1f7d3e8766 100644
--- a/ext/sockets/conversions.c
+++ b/ext/sockets/conversions.c
@@ -889,8 +889,8 @@ static void from_zval_write_control(const zval *arr,
if (space_left < req_space) {
*control_buf = safe_erealloc(*control_buf, 2, req_space, *control_len);
*control_len += 2 * req_space;
- memset(*control_buf, '\0', *control_len - *offset);
- memcpy(&alloc->data, *control_buf, sizeof *control_buf);
+ memset((char *)*control_buf + *offset, '\0', *control_len - *offset);
+ memcpy(&alloc->data, control_buf, sizeof *control_buf);
}
cmsghdr = (struct cmsghdr*)(((char*)*control_buf) + *offset);
diff --git a/ext/sockets/package.xml b/ext/sockets/package.xml
index 2799fff13d..5fa67d9939 100644
--- a/ext/sockets/package.xml
+++ b/ext/sockets/package.xml
@@ -50,7 +50,6 @@ package.xml added to support installation using pear installer
<file role="src" name="php_sockets_win.c"/>
<file role="src" name="php_sockets_win.h"/>
<file role="src" name="sockets.c"/>
- <file role="src" name="sockets.dsp"/>
<file role="src" name="unix_socket_constants.h"/>
<file role="src" name="win32_socket_constants.h"/>
<file role="test" name="tests/ipv4loop.phpt"/>
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
index 4ade06a5d8..70ae050594 100644
--- a/ext/spl/spl_array.c
+++ b/ext/spl/spl_array.c
@@ -845,7 +845,7 @@ static zval *spl_array_read_property(zval *object, zval *member, int type, void
spl_array_object *intern = Z_SPLARRAY_P(object);
if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0
- && !std_object_handlers.has_property(object, member, 2, cache_slot)) {
+ && !std_object_handlers.has_property(object, member, 2, NULL)) {
return spl_array_read_dimension(object, member, type, rv);
}
return std_object_handlers.read_property(object, member, type, cache_slot, rv);
@@ -856,7 +856,7 @@ static void spl_array_write_property(zval *object, zval *member, zval *value, vo
spl_array_object *intern = Z_SPLARRAY_P(object);
if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0
- && !std_object_handlers.has_property(object, member, 2, cache_slot)) {
+ && !std_object_handlers.has_property(object, member, 2, NULL)) {
spl_array_write_dimension(object, member, value);
return;
}
@@ -868,7 +868,7 @@ static zval *spl_array_get_property_ptr_ptr(zval *object, zval *member, int type
spl_array_object *intern = Z_SPLARRAY_P(object);
if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0
- && !std_object_handlers.has_property(object, member, 2, cache_slot)) {
+ && !std_object_handlers.has_property(object, member, 2, NULL)) {
return spl_array_get_dimension_ptr(1, object, member, type);
}
//!!! FIXME
@@ -881,7 +881,7 @@ static int spl_array_has_property(zval *object, zval *member, int has_set_exists
spl_array_object *intern = Z_SPLARRAY_P(object);
if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0
- && !std_object_handlers.has_property(object, member, 2, cache_slot)) {
+ && !std_object_handlers.has_property(object, member, 2, NULL)) {
return spl_array_has_dimension(object, member, has_set_exists);
}
return std_object_handlers.has_property(object, member, has_set_exists, cache_slot);
@@ -892,7 +892,7 @@ static void spl_array_unset_property(zval *object, zval *member, void **cache_sl
spl_array_object *intern = Z_SPLARRAY_P(object);
if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0
- && !std_object_handlers.has_property(object, member, 2, cache_slot)) {
+ && !std_object_handlers.has_property(object, member, 2, NULL)) {
spl_array_unset_dimension(object, member);
return;
}
diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c
index dbf34f1939..3fed81949a 100644
--- a/ext/spl/spl_directory.c
+++ b/ext/spl/spl_directory.c
@@ -1854,8 +1854,8 @@ static int spl_filesystem_object_cast(zval *readobj, zval *writeobj, int type)
zval *retval_ptr = &retval;
ZVAL_STRINGL(retval_ptr, intern->file_name, intern->file_name_len);
- zval_dtor(readobj);
- ZVAL_ZVAL(writeobj, retval_ptr, 0, 0);
+ zval_ptr_dtor(readobj);
+ ZVAL_COPY_VALUE(writeobj, retval_ptr);
} else {
ZVAL_STRINGL(writeobj, intern->file_name, intern->file_name_len);
}
@@ -1866,8 +1866,8 @@ static int spl_filesystem_object_cast(zval *readobj, zval *writeobj, int type)
zval *retval_ptr = &retval;
ZVAL_STRING(retval_ptr, intern->u.dir.entry.d_name);
- zval_dtor(readobj);
- ZVAL_ZVAL(writeobj, retval_ptr, 0, 0);
+ zval_ptr_dtor(readobj);
+ ZVAL_COPY_VALUE(writeobj, retval_ptr);
} else {
ZVAL_STRING(writeobj, intern->u.dir.entry.d_name);
}
@@ -1878,7 +1878,7 @@ static int spl_filesystem_object_cast(zval *readobj, zval *writeobj, int type)
return SUCCESS;
}
if (readobj == writeobj) {
- zval_dtor(readobj);
+ zval_ptr_dtor(readobj);
}
ZVAL_NULL(writeobj);
return FAILURE;
@@ -2140,7 +2140,7 @@ static int spl_filesystem_file_read_csv(spl_filesystem_object *intern, char deli
php_fgetcsv(intern->u.file.stream, delimiter, enclosure, escape, buf_len, buf, &intern->u.file.current_zval);
if (return_value) {
if (Z_TYPE_P(return_value) != IS_NULL) {
- zval_dtor(return_value);
+ zval_ptr_dtor(return_value);
ZVAL_NULL(return_value);
}
ZVAL_ZVAL(return_value, &intern->u.file.current_zval, 1, 0);
diff --git a/ext/spl/spl_heap.c b/ext/spl/spl_heap.c
index c4857663e7..5d045f7457 100644
--- a/ext/spl/spl_heap.c
+++ b/ext/spl/spl_heap.c
@@ -112,9 +112,7 @@ static int spl_ptr_heap_cmp_cb_helper(zval *object, spl_heap_object *heap_object
return FAILURE;
}
- convert_to_long(&zresult);
- *result = Z_LVAL(zresult);
-
+ *result = zval_get_long(&zresult);
zval_ptr_dtor(&zresult);
return SUCCESS;
@@ -696,10 +694,6 @@ SPL_METHOD(SplPriorityQueue, extract)
return;
}
- if (Z_REFCOUNTED_P(value_out)) {
- Z_ADDREF_P(value_out);
- }
-
RETVAL_ZVAL(value_out, 1, 0);
zval_ptr_dtor(&value);
}
diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c
index 37f97866c7..ed325a1880 100644
--- a/ext/spl/spl_iterators.c
+++ b/ext/spl/spl_iterators.c
@@ -494,7 +494,7 @@ static void spl_recursive_it_it_construct(INTERNAL_FUNCTION_PARAMETERS, zend_cla
}
if (user_caching_it_flags) {
- ZVAL_ZVAL(&caching_it_flags, user_caching_it_flags, 1, 0);
+ ZVAL_COPY(&caching_it_flags, user_caching_it_flags);
} else {
ZVAL_LONG(&caching_it_flags, CIT_CATCH_GET_CHILD);
}
@@ -1065,11 +1065,11 @@ static void spl_recursive_tree_iterator_get_entry(spl_recursive_it_object *objec
* without __toString is converted to string is converted into an exception. */
zend_replace_error_handling(EH_THROW, spl_ce_UnexpectedValueException, &error_handling);
if (data) {
- RETVAL_ZVAL(data, 1, 0);
- if (Z_TYPE_P(return_value) == IS_ARRAY) {
- zval_dtor(return_value);
+ ZVAL_DEREF(data);
+ if (Z_TYPE_P(data) == IS_ARRAY) {
ZVAL_STRINGL(return_value, "Array", sizeof("Array")-1);
} else {
+ ZVAL_COPY(return_value, data);
convert_to_string(return_value);
}
}
@@ -1268,9 +1268,7 @@ SPL_METHOD(RecursiveTreeIterator, key)
}
if (object->flags & RTIT_BYPASS_KEY) {
- zval *key_ptr = &key;
- RETVAL_ZVAL(key_ptr, 1, 0);
- zval_dtor(&key);
+ RETVAL_ZVAL(&key, 1, 1);
return;
}
@@ -2074,8 +2072,7 @@ SPL_METHOD(RegexIterator, accept)
case REGIT_MODE_REPLACE:
replacement = zend_read_property(intern->std.ce, getThis(), "replacement", sizeof("replacement")-1, 1, &rv);
if (Z_TYPE_P(replacement) != IS_STRING) {
- tmp_replacement = *replacement;
- zval_copy_ctor(&tmp_replacement);
+ ZVAL_COPY(&tmp_replacement, replacement);
convert_to_string(&tmp_replacement);
replacement = &tmp_replacement;
}
@@ -2090,7 +2087,7 @@ SPL_METHOD(RegexIterator, accept)
}
if (replacement == &tmp_replacement) {
- zval_dtor(replacement);
+ zval_ptr_dtor(replacement);
}
RETVAL_BOOL(count > 0);
}
@@ -2787,11 +2784,11 @@ SPL_METHOD(CachingIterator, __toString)
return;
}
if (intern->u.caching.flags & CIT_TOSTRING_USE_KEY) {
- ZVAL_DUP(return_value, &intern->current.key);
+ ZVAL_COPY(return_value, &intern->current.key);
convert_to_string(return_value);
return;
} else if (intern->u.caching.flags & CIT_TOSTRING_USE_CURRENT) {
- ZVAL_DUP(return_value, &intern->current.data);
+ ZVAL_COPY(return_value, &intern->current.data);
convert_to_string(return_value);
return;
}
@@ -3529,7 +3526,7 @@ static int spl_iterator_to_array_apply(zend_object_iterator *iter, void *puser)
return ZEND_HASH_APPLY_STOP;
}
array_set_zval_key(Z_ARRVAL_P(return_value), &key, data);
- zval_dtor(&key);
+ zval_ptr_dtor(&key);
} else {
Z_TRY_ADDREF_P(data);
add_next_index_zval(return_value, data);
@@ -3571,7 +3568,7 @@ PHP_FUNCTION(iterator_to_array)
array_init(return_value);
if (spl_iterator_apply(obj, use_keys ? spl_iterator_to_array_apply : spl_iterator_to_values_apply, (void*)return_value) != SUCCESS) {
- zval_dtor(return_value);
+ zval_ptr_dtor(return_value);
RETURN_NULL();
}
} /* }}} */
diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c
index ddff20ea4f..e2a55735a3 100644
--- a/ext/spl/spl_observer.c
+++ b/ext/spl/spl_observer.c
@@ -657,7 +657,7 @@ SPL_METHOD(SplObjectStorage, current)
if ((element = zend_hash_get_current_data_ptr_ex(&intern->storage, &intern->pos)) == NULL) {
return;
}
- RETVAL_ZVAL(&element->obj, 1, 0);
+ ZVAL_COPY(return_value, &element->obj);
} /* }}} */
/* {{{ proto mixed SplObjectStorage::getInfo()
@@ -674,7 +674,7 @@ SPL_METHOD(SplObjectStorage, getInfo)
if ((element = zend_hash_get_current_data_ptr_ex(&intern->storage, &intern->pos)) == NULL) {
return;
}
- RETVAL_ZVAL(&element->inf, 1, 0);
+ ZVAL_COPY(return_value, &element->inf);
} /* }}} */
/* {{{ proto mixed SplObjectStorage::setInfo(mixed $inf)
@@ -693,7 +693,7 @@ SPL_METHOD(SplObjectStorage, setInfo)
return;
}
zval_ptr_dtor(&element->inf);
- ZVAL_ZVAL(&element->inf, inf, 1, 0);
+ ZVAL_COPY(&element->inf, inf);
} /* }}} */
/* {{{ proto void SplObjectStorage::next()
diff --git a/ext/spl/tests/CallbackFilterIteratorTest-002.phpt b/ext/spl/tests/CallbackFilterIteratorTest-002.phpt
index 1f71d3032a..216a40bd6a 100644
--- a/ext/spl/tests/CallbackFilterIteratorTest-002.phpt
+++ b/ext/spl/tests/CallbackFilterIteratorTest-002.phpt
@@ -10,25 +10,25 @@ set_error_handler(function($errno, $errstr){
try {
new CallbackFilterIterator();
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo $e->getMessage() . "\n";
}
try {
new CallbackFilterIterator(null);
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo $e->getMessage() . "\n";
}
try {
new CallbackFilterIterator(new ArrayIterator(array()), null);
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo $e->getMessage() . "\n";
}
try {
new CallbackFilterIterator(new ArrayIterator(array()), array());
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo $e->getMessage() . "\n";
}
diff --git a/ext/spl/tests/RegexIterator_with_reference_replacement.phpt b/ext/spl/tests/RegexIterator_with_reference_replacement.phpt
new file mode 100644
index 0000000000..18b3ef9089
--- /dev/null
+++ b/ext/spl/tests/RegexIterator_with_reference_replacement.phpt
@@ -0,0 +1,19 @@
+--TEST--
+RegexIterator with $replacement being a reference
+--FILE--
+<?php
+$a = new ArrayIterator(array('test1', 'test2', 'test3'));
+$i = new RegexIterator($a, '/^(test)(\d+)/', RegexIterator::REPLACE);
+$r = '$2:$1';
+$i->replacement =& $r;
+var_dump(iterator_to_array($i));
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ string(6) "1:test"
+ [1]=>
+ string(6) "2:test"
+ [2]=>
+ string(6) "3:test"
+}
diff --git a/ext/spl/tests/SplFixedArray__construct_param_array.phpt b/ext/spl/tests/SplFixedArray__construct_param_array.phpt
index e1515c4039..b15579edca 100644
--- a/ext/spl/tests/SplFixedArray__construct_param_array.phpt
+++ b/ext/spl/tests/SplFixedArray__construct_param_array.phpt
@@ -7,7 +7,7 @@ PHPNW Test Fest 2009 - Jordan Hatch
try {
$array = new SplFixedArray( array("string", 1) );
-} catch (TypeException $iae) {
+} catch (TypeError $iae) {
echo "Ok - ".$iae->getMessage().PHP_EOL;
}
diff --git a/ext/spl/tests/SplFixedArray__construct_param_string.phpt b/ext/spl/tests/SplFixedArray__construct_param_string.phpt
index 66c7fe6a59..d30fc691c6 100644
--- a/ext/spl/tests/SplFixedArray__construct_param_string.phpt
+++ b/ext/spl/tests/SplFixedArray__construct_param_string.phpt
@@ -6,7 +6,7 @@ PHPNW Test Fest 2009 - Jordan Hatch
<?php
try {
$array = new SplFixedArray( "string" );
-} catch (TypeException $iae) {
+} catch (TypeError $iae) {
echo "Ok - ".$iae->getMessage().PHP_EOL;
}
diff --git a/ext/spl/tests/SplFixedArray_construct_param_SplFixedArray.phpt b/ext/spl/tests/SplFixedArray_construct_param_SplFixedArray.phpt
index 20f4e7970c..4739d8c55d 100644
--- a/ext/spl/tests/SplFixedArray_construct_param_SplFixedArray.phpt
+++ b/ext/spl/tests/SplFixedArray_construct_param_SplFixedArray.phpt
@@ -6,7 +6,7 @@ Philip Norton philipnorton42@gmail.com
<?php
try {
$array = new SplFixedArray(new SplFixedArray(3));
-} catch (TypeException $iae) {
+} catch (TypeError $iae) {
echo "Ok - ".$iae->getMessage().PHP_EOL;
}
diff --git a/ext/spl/tests/SplHeap_with_by_reference_compare.phpt b/ext/spl/tests/SplHeap_with_by_reference_compare.phpt
new file mode 100644
index 0000000000..b7b7b6d747
--- /dev/null
+++ b/ext/spl/tests/SplHeap_with_by_reference_compare.phpt
@@ -0,0 +1,16 @@
+--TEST--
+SplHeap using a compare function returning by-reference
+--FILE--
+<?php
+class Heap extends SplMinHeap {
+ public function &compare($a, $b) {
+ return $a;
+ }
+}
+$h = new Heap;
+$h->insert(0);
+$h->insert(0);
+?>
+===DONE===
+--EXPECT--
+===DONE===
diff --git a/ext/spl/tests/SplTempFileObject_constructor_error.phpt b/ext/spl/tests/SplTempFileObject_constructor_error.phpt
index 8eb306689d..fe47366987 100644
--- a/ext/spl/tests/SplTempFileObject_constructor_error.phpt
+++ b/ext/spl/tests/SplTempFileObject_constructor_error.phpt
@@ -4,7 +4,7 @@ SPL SplTempFileObject constructor sets correct defaults when pass 0 arguments
<?php
try {
new SplTempFileObject('invalid');
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
?>
diff --git a/ext/spl/tests/arrayObject___construct_error1.phpt b/ext/spl/tests/arrayObject___construct_error1.phpt
index cff0dd048d..f0e1107d51 100644
--- a/ext/spl/tests/arrayObject___construct_error1.phpt
+++ b/ext/spl/tests/arrayObject___construct_error1.phpt
@@ -7,14 +7,14 @@ $a = new stdClass;
$a->p = 1;
try {
var_dump(new ArrayObject($a, 0, "Exception"));
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo $e->getMessage() . "(" . $e->getLine() . ")\n";
}
echo "Non-existent class:\n";
try {
var_dump(new ArrayObject(new stdClass, 0, "nonExistentClassName"));
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo $e->getMessage() . "(" . $e->getLine() . ")\n";
}
?>
diff --git a/ext/spl/tests/arrayObject___construct_error2.phpt b/ext/spl/tests/arrayObject___construct_error2.phpt
index d075516725..35ba83d09f 100644
--- a/ext/spl/tests/arrayObject___construct_error2.phpt
+++ b/ext/spl/tests/arrayObject___construct_error2.phpt
@@ -13,7 +13,7 @@ Class C implements Iterator {
try {
var_dump(new ArrayObject(new stdClass, 0, "C", "extra"));
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo $e->getMessage() . "(" . $e->getLine() . ")\n";
}
?>
diff --git a/ext/spl/tests/arrayObject_setFlags_basic2.phpt b/ext/spl/tests/arrayObject_setFlags_basic2.phpt
index e1d816e158..6eece74cbb 100644
--- a/ext/spl/tests/arrayObject_setFlags_basic2.phpt
+++ b/ext/spl/tests/arrayObject_setFlags_basic2.phpt
@@ -26,7 +26,7 @@ string(6) "secret"
string(6) "public"
string(6) "secret"
-Fatal error: Uncaught EngineException: Cannot access private property C::$x in %s:19
+Fatal error: Uncaught Error: Cannot access private property C::$x in %s:19
Stack trace:
#0 {main}
thrown in %s on line 19
diff --git a/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt b/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt
index b4c3756cb5..89efdb6a9f 100644
--- a/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt
+++ b/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt
@@ -28,7 +28,7 @@ try {
foreach($ao as $key=>$value) {
echo " $key=>$value\n";
}
-} catch (TypeException $e) {
+} catch (TypeError $e) {
var_dump($e->getMessage());
}
@@ -37,7 +37,7 @@ try {
foreach($ao as $key=>$value) {
echo " $key=>$value\n";
}
-} catch (TypeException $e) {
+} catch (TypeError $e) {
var_dump($e->getMessage());
}
diff --git a/ext/spl/tests/bug48023.phpt b/ext/spl/tests/bug48023.phpt
index 1af4190d0a..9cb8dd2c1f 100644
--- a/ext/spl/tests/bug48023.phpt
+++ b/ext/spl/tests/bug48023.phpt
@@ -9,7 +9,7 @@ new Foo;
?>
===DONE===
--EXPECTF--
-Fatal error: Uncaught EngineException: Class 'Foo' not found in %s:%d
+Fatal error: Uncaught Error: Class 'Foo' not found in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/ext/spl/tests/bug49972.phpt b/ext/spl/tests/bug49972.phpt
index cc0aff3bed..836d399ed9 100644
--- a/ext/spl/tests/bug49972.phpt
+++ b/ext/spl/tests/bug49972.phpt
@@ -8,7 +8,7 @@ $iterator->undefined();
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to undefined method AppendIterator::undefined() in %s:%d
+Fatal error: Uncaught Error: Call to undefined method AppendIterator::undefined() in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/ext/spl/tests/bug54292.phpt b/ext/spl/tests/bug54292.phpt
index 44d12ee242..288f49a4ec 100644
--- a/ext/spl/tests/bug54292.phpt
+++ b/ext/spl/tests/bug54292.phpt
@@ -5,7 +5,7 @@ Bug #54292 (Wrong parameter causes crash in SplFileObject::__construct())
try {
new SplFileObject('foo', array());
-} catch (TypeException $e) {
+} catch (TypeError $e) {
var_dump($e->getMessage());
}
diff --git a/ext/spl/tests/bug69737.phpt b/ext/spl/tests/bug69737.phpt
index fd8bba6508..02815c296a 100644
--- a/ext/spl/tests/bug69737.phpt
+++ b/ext/spl/tests/bug69737.phpt
@@ -13,7 +13,7 @@ $h->insert(6);
?>
===DONE===
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to undefined method SplMinHeap::notexist() in %s%ebug69737.php:%d
+Fatal error: Uncaught Error: Call to undefined method SplMinHeap::notexist() in %s%ebug69737.php:%d
Stack trace:
#0 [internal function]: SplMinHeap1->compare(1, 6)
#1 %s%ebug69737.php(%d): SplHeap->insert(6)
diff --git a/ext/spl/tests/bug69845.phpt b/ext/spl/tests/bug69845.phpt
new file mode 100644
index 0000000000..db88a8e10d
--- /dev/null
+++ b/ext/spl/tests/bug69845.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Fixed bug #69845 (ArrayObject with ARRAY_AS_PROPS broken)
+--FILE--
+<?php
+for ($i = 0; $i<2; $i++) {
+ $data = new \ArrayObject(new stdClass(), ArrayObject::ARRAY_AS_PROPS);
+ $data->itemType = 'bulletin';
+ var_dump(!is_null($data['itemType']));
+}
+?>
+--EXPECT--
+bool(true)
+bool(true)
diff --git a/ext/spl/tests/fixedarray_005.phpt b/ext/spl/tests/fixedarray_005.phpt
index 83727a23b9..cc64fd01b0 100644
--- a/ext/spl/tests/fixedarray_005.phpt
+++ b/ext/spl/tests/fixedarray_005.phpt
@@ -5,19 +5,19 @@ SPL: FixedArray: Invalid arguments
try {
$a = new SplFixedArray(new stdClass);
-} catch (TypeException $iae) {
+} catch (TypeError $iae) {
echo "Ok - ".$iae->getMessage().PHP_EOL;
}
try {
$a = new SplFixedArray('FOO');
-} catch (TypeException $iae) {
+} catch (TypeError $iae) {
echo "Ok - ".$iae->getMessage().PHP_EOL;
}
try {
$a = new SplFixedArray('');
-} catch (TypeException $iae) {
+} catch (TypeError $iae) {
echo "Ok - ".$iae->getMessage().PHP_EOL;
}
diff --git a/ext/spl/tests/fixedarray_009.phpt b/ext/spl/tests/fixedarray_009.phpt
index f255ed299a..fe38883621 100644
--- a/ext/spl/tests/fixedarray_009.phpt
+++ b/ext/spl/tests/fixedarray_009.phpt
@@ -5,7 +5,7 @@ SPL: FixedArray: Trying to instantiate passing string to construtor parameter
try {
$a = new SplFixedArray('FOO');
-} catch (TypeException $iae) {
+} catch (TypeError $iae) {
echo "Ok - ".$iae->getMessage().PHP_EOL;
}
?>
diff --git a/ext/spl/tests/fixedarray_015.phpt b/ext/spl/tests/fixedarray_015.phpt
index d189d41da3..b6f119ab1f 100644
--- a/ext/spl/tests/fixedarray_015.phpt
+++ b/ext/spl/tests/fixedarray_015.phpt
@@ -5,7 +5,7 @@ SPL: FixedArray: accessing uninitialized array
try {
$a = new SplFixedArray('');
-} catch (TypeException $iae) {
+} catch (TypeError $iae) {
echo "Ok - ".$iae->getMessage().PHP_EOL;
}
diff --git a/ext/spl/tests/iterator_035.phpt b/ext/spl/tests/iterator_035.phpt
index bedb7684d5..307337431a 100644
--- a/ext/spl/tests/iterator_035.phpt
+++ b/ext/spl/tests/iterator_035.phpt
@@ -14,7 +14,7 @@ echo "Done\n";
--EXPECTF--
Notice: Indirect modification of overloaded element of ArrayIterator has no effect in %s on line %d
-Fatal error: Uncaught EngineException: Cannot assign by reference to overloaded object in %s:%d
+Fatal error: Uncaught Error: Cannot assign by reference to overloaded object in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/ext/spl/tests/iterator_042.phpt b/ext/spl/tests/iterator_042.phpt
index d654ede97a..a344d60e33 100644
--- a/ext/spl/tests/iterator_042.phpt
+++ b/ext/spl/tests/iterator_042.phpt
@@ -15,7 +15,7 @@ $it = new AppendIterator;
try {
$it->append(array());
-} catch (EngineException $e) {
+} catch (Error $e) {
test_error_handler($e->getCode(), $e->getMessage(), $e->getFile(), $e->getLine());
}
$it->append(new ArrayIterator(array(1)));
diff --git a/ext/spl/tests/iterator_056.phpt b/ext/spl/tests/iterator_056.phpt
index ee98263638..b5213732c3 100644
--- a/ext/spl/tests/iterator_056.phpt
+++ b/ext/spl/tests/iterator_056.phpt
@@ -21,36 +21,36 @@ class myNoRewindIterator extends NoRewindIterator {}
try {
$it = new myFilterIterator();
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
try {
$it = new myCachingIterator();
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
try {
$it = new myRecursiveCachingIterator();
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
try {
$it = new myParentIterator();
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
try {
$it = new myLimitIterator();
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
try {
$it = new myNoRewindIterator();
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
diff --git a/ext/spl/tests/iterator_count.phpt b/ext/spl/tests/iterator_count.phpt
index b70afc18c3..c0dad0f422 100644
--- a/ext/spl/tests/iterator_count.phpt
+++ b/ext/spl/tests/iterator_count.phpt
@@ -23,7 +23,7 @@ Warning: iterator_count() expects exactly 1 parameter, 0 given in %s
Warning: iterator_count() expects exactly 1 parameter, 2 given in %s
-Fatal error: Uncaught TypeException: Argument 1 passed to iterator_count() must implement interface Traversable, string given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to iterator_count() must implement interface Traversable, string given in %s:%d
Stack trace:
#0 %s(%d): iterator_count('1')
#1 {main}
diff --git a/ext/spl/tests/iterator_to_array.phpt b/ext/spl/tests/iterator_to_array.phpt
index 925ee372d4..f36b99db23 100644
--- a/ext/spl/tests/iterator_to_array.phpt
+++ b/ext/spl/tests/iterator_to_array.phpt
@@ -22,7 +22,7 @@ Warning: iterator_to_array() expects at least 1 parameter, 0 given in %s
Warning: iterator_to_array() expects at most 2 parameters, 3 given in %s
-Fatal error: Uncaught TypeException: Argument 1 passed to iterator_to_array() must implement interface Traversable, string given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to iterator_to_array() must implement interface Traversable, string given in %s:%d
Stack trace:
#0 %s(%d): iterator_to_array('test', 'test')
#1 {main}
diff --git a/ext/spl/tests/recursive_tree_iterator_003.phpt b/ext/spl/tests/recursive_tree_iterator_003.phpt
index 4cc7000a19..721b67ac02 100644
--- a/ext/spl/tests/recursive_tree_iterator_003.phpt
+++ b/ext/spl/tests/recursive_tree_iterator_003.phpt
@@ -4,7 +4,7 @@ SPL: RecursiveTreeIterator(non-traversable)
<?php
try {
new RecursiveTreeIterator(new ArrayIterator(array()));
-} catch (TypeException $e) {
+} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
?>
diff --git a/ext/spl/tests/spl_004.phpt b/ext/spl/tests/spl_004.phpt
index c321bab296..ac44b9d684 100644
--- a/ext/spl/tests/spl_004.phpt
+++ b/ext/spl/tests/spl_004.phpt
@@ -44,7 +44,7 @@ var_dump(iterator_apply($it, 'test'));
echo "===ERRORS===\n";
try {
var_dump(iterator_apply($it, 'test', 1));
-} catch (EngineException $e) {
+} catch (Error $e) {
my_error_handler($e->getCode(), $e->getMessage(), $e->getFile(), $e->getLine());
}
var_dump(iterator_apply($it, 'non_existing_function'));
diff --git a/ext/spl/tests/spl_iterator_iterator_constructor.phpt b/ext/spl/tests/spl_iterator_iterator_constructor.phpt
index ec103f5c9c..4c3fae25a2 100644
--- a/ext/spl/tests/spl_iterator_iterator_constructor.phpt
+++ b/ext/spl/tests/spl_iterator_iterator_constructor.phpt
@@ -15,7 +15,7 @@ try {
$test = new IteratorIterator($arrayIterator, 1, 1);
$test = new IteratorIterator($arrayIterator, 1, 1, 1);
$test = new IteratorIterator($arrayIterator, 1, 1, 1, 1);
-} catch (TypeException $e){
+} catch (TypeError $e){
echo $e->getMessage() . "\n";
}
diff --git a/ext/spl/tests/spl_iterator_recursive_getiterator_error.phpt b/ext/spl/tests/spl_iterator_recursive_getiterator_error.phpt
index 6fbcec9dff..debc85e622 100644
--- a/ext/spl/tests/spl_iterator_recursive_getiterator_error.phpt
+++ b/ext/spl/tests/spl_iterator_recursive_getiterator_error.phpt
@@ -13,7 +13,7 @@ function p ($i) {
}
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: An iterator cannot be used with foreach by reference in %s:%d
+Fatal error: Uncaught Error: An iterator cannot be used with foreach by reference in %s:%d
Stack trace:
#0 %s(%d): p(Object(IteratorIterator))
#1 {main}
diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c
index f9bcb311f5..00560450fe 100644
--- a/ext/sqlite3/sqlite3.c
+++ b/ext/sqlite3/sqlite3.c
@@ -2103,7 +2103,7 @@ static void php_sqlite3_result_object_free_storage(zend_object *object) /* {{{ *
}
if (!Z_ISNULL(intern->stmt_obj_zval)) {
- if (intern->stmt_obj->initialised) {
+ if (intern->stmt_obj && intern->stmt_obj->initialised) {
sqlite3_reset(intern->stmt_obj->stmt);
}
diff --git a/ext/sqlite3/tests/sqlite3_02_open.phpt b/ext/sqlite3/tests/sqlite3_02_open.phpt
index 985033b33e..b9b49530b3 100644
--- a/ext/sqlite3/tests/sqlite3_02_open.phpt
+++ b/ext/sqlite3/tests/sqlite3_02_open.phpt
@@ -10,7 +10,7 @@ Felix De Vliegher
try {
$db = new SQLite3();
-} catch (TypeException $e) {
+} catch (TypeError $e) {
var_dump($e->getMessage());
}
diff --git a/ext/standard/array.c b/ext/standard/array.c
index 519b665df0..a998079d64 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -164,7 +164,7 @@ static void php_set_compare_func(zend_long sort_type) /* {{{ */
case PHP_SORT_REGULAR:
default:
- ARRAYG(compare_func) = compare_function;
+ ARRAYG(compare_func) = zval_compare_function;
break;
}
}
@@ -821,7 +821,8 @@ PHP_FUNCTION(end)
entry = Z_INDIRECT_P(entry);
}
- RETURN_ZVAL_FAST(entry);
+ ZVAL_DEREF(entry);
+ ZVAL_COPY(return_value, entry);
}
}
/* }}} */
@@ -854,7 +855,8 @@ PHP_FUNCTION(prev)
entry = Z_INDIRECT_P(entry);
}
- RETURN_ZVAL_FAST(entry);
+ ZVAL_DEREF(entry);
+ ZVAL_COPY(return_value, entry);
}
}
/* }}} */
@@ -887,7 +889,8 @@ PHP_FUNCTION(next)
entry = Z_INDIRECT_P(entry);
}
- RETURN_ZVAL_FAST(entry);
+ ZVAL_DEREF(entry);
+ ZVAL_COPY(return_value, entry);
}
}
/* }}} */
@@ -920,7 +923,8 @@ PHP_FUNCTION(reset)
entry = Z_INDIRECT_P(entry);
}
- RETURN_ZVAL_FAST(entry);
+ ZVAL_DEREF(entry);
+ ZVAL_COPY(return_value, entry);
}
}
/* }}} */
@@ -950,7 +954,8 @@ PHP_FUNCTION(current)
entry = Z_INDIRECT_P(entry);
}
- RETURN_ZVAL_FAST(entry);
+ ZVAL_DEREF(entry);
+ ZVAL_COPY(return_value, entry);
}
/* }}} */
@@ -996,7 +1001,8 @@ PHP_FUNCTION(min)
RETVAL_NULL();
} else {
if ((result = zend_hash_minmax(Z_ARRVAL(args[0]), php_array_data_compare, 0)) != NULL) {
- RETVAL_ZVAL_FAST(result);
+ ZVAL_DEREF(result);
+ ZVAL_COPY(return_value, result);
} else {
php_error_docref(NULL, E_WARNING, "Array must contain at least one element");
RETVAL_FALSE;
@@ -1016,7 +1022,8 @@ PHP_FUNCTION(min)
}
}
- RETVAL_ZVAL_FAST(min);
+ ZVAL_DEREF(min);
+ ZVAL_COPY(return_value, min);
}
}
/* }}} */
@@ -1043,7 +1050,8 @@ PHP_FUNCTION(max)
RETVAL_NULL();
} else {
if ((result = zend_hash_minmax(Z_ARRVAL(args[0]), php_array_data_compare, 1)) != NULL) {
- RETVAL_ZVAL_FAST(result);
+ ZVAL_DEREF(result);
+ ZVAL_COPY(return_value, result);
} else {
php_error_docref(NULL, E_WARNING, "Array must contain at least one element");
RETVAL_FALSE;
@@ -1063,7 +1071,8 @@ PHP_FUNCTION(max)
}
}
- RETVAL_ZVAL_FAST(max);
+ ZVAL_DEREF(max);
+ ZVAL_COPY(return_value, max);
}
}
/* }}} */
@@ -1348,22 +1357,37 @@ PHP_FUNCTION(array_search)
}
/* }}} */
-static int php_valid_var_name(char *var_name, size_t var_name_len) /* {{{ */
+static zend_always_inline int php_valid_var_name(char *var_name, size_t var_name_len) /* {{{ */
{
+#if 1
+ /* first 256 bits for first character, and second 256 bits for the next */
+ static const uint32_t charset[16] = {
+ /* 31 0 63 32 95 64 127 96 */
+ 0x00000000, 0x00000000, 0x87fffffe, 0x07fffffe,
+ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+ /* 31 0 63 32 95 64 127 96 */
+ 0x00000000, 0x03ff0000, 0x87fffffe, 0x07fffffe,
+ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+ };
+#endif
size_t i;
- int ch;
+ uint32_t ch;
- if (!var_name_len) {
+ if (UNEXPECTED(!var_name_len)) {
return 0;
}
/* These are allowed as first char: [a-zA-Z_\x7f-\xff] */
- ch = (int)((unsigned char *)var_name)[0];
+ ch = (uint32_t)((unsigned char *)var_name)[0];
+#if 1
+ if (UNEXPECTED(!(charset[ch >> 5] & (1 << (ch & 0x1f))))) {
+#else
if (var_name[0] != '_' &&
(ch < 65 /* A */ || /* Z */ ch > 90) &&
(ch < 97 /* a */ || /* z */ ch > 122) &&
(ch < 127 /* 0x7f */ || /* 0xff */ ch > 255)
) {
+#endif
return 0;
}
@@ -1371,13 +1395,17 @@ static int php_valid_var_name(char *var_name, size_t var_name_len) /* {{{ */
if (var_name_len > 1) {
i = 1;
do {
- ch = (int)((unsigned char *)var_name)[i];
+ ch = (uint32_t)((unsigned char *)var_name)[i];
+#if 1
+ if (UNEXPECTED(!(charset[8 + (ch >> 5)] & (1 << (ch & 0x1f))))) {
+#else
if (var_name[i] != '_' &&
(ch < 48 /* 0 */ || /* 9 */ ch > 57) &&
(ch < 65 /* A */ || /* Z */ ch > 90) &&
(ch < 97 /* a */ || /* z */ ch > 122) &&
(ch < 127 /* 0x7f */ || /* 0xff */ ch > 255)
) {
+#endif
return 0;
}
} while (++i < var_name_len);
@@ -2588,7 +2616,7 @@ PHPAPI int php_array_merge_recursive(HashTable *dest, HashTable *src) /* {{{ */
}
ZVAL_UNDEF(&tmp);
if (Z_TYPE_P(src_zval) == IS_OBJECT) {
- ZVAL_DUP(&tmp, src_zval);
+ ZVAL_COPY(&tmp, src_zval);
convert_to_array(&tmp);
src_zval = &tmp;
}
@@ -2722,7 +2750,7 @@ PHPAPI int php_array_replace_recursive(HashTable *dest, HashTable *src) /* {{{ *
}
/* }}} */
-static void php_array_merge_or_replace_wrapper(INTERNAL_FUNCTION_PARAMETERS, int recursive, int replace) /* {{{ */
+static inline void php_array_merge_or_replace_wrapper(INTERNAL_FUNCTION_PARAMETERS, int recursive, int replace) /* {{{ */
{
zval *args = NULL;
zval *arg;
@@ -2961,7 +2989,7 @@ PHP_FUNCTION(array_values)
/* Go through input array and add values to the return array */
ZEND_HASH_FILL_PACKED(Z_ARRVAL_P(return_value)) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(input), entry) {
- if (Z_ISREF_P(entry) && Z_REFCOUNT_P(entry) == 1) {
+ if (UNEXPECTED(Z_ISREF_P(entry) && Z_REFCOUNT_P(entry) == 1)) {
entry = Z_REFVAL_P(entry);
}
Z_TRY_ADDREF_P(entry);
@@ -3090,17 +3118,15 @@ PHP_FUNCTION(array_column)
zkeyval = zend_hash_index_find(ht, Z_LVAL_P(zkey));
}
- if (Z_REFCOUNTED_P(zcolval)) {
- Z_ADDREF_P(zcolval);
- }
+ Z_TRY_ADDREF_P(zcolval);
if (zkeyval && Z_TYPE_P(zkeyval) == IS_STRING) {
zend_symtable_update(Z_ARRVAL_P(return_value), Z_STR_P(zkeyval), zcolval);
} else if (zkeyval && Z_TYPE_P(zkeyval) == IS_LONG) {
add_index_zval(return_value, Z_LVAL_P(zkeyval), zcolval);
} else if (zkeyval && Z_TYPE_P(zkeyval) == IS_OBJECT) {
- SEPARATE_ZVAL(zkeyval);
- convert_to_string(zkeyval);
- zend_symtable_update(Z_ARRVAL_P(return_value), Z_STR_P(zkeyval), zcolval);
+ zend_string *key = zval_get_string(zkeyval);
+ zend_symtable_update(Z_ARRVAL_P(return_value), key, zcolval);
+ zend_string_release(key);
} else {
add_next_index_zval(return_value, zcolval);
}
@@ -4624,7 +4650,7 @@ PHP_FUNCTION(array_sum)
if (Z_TYPE_P(entry) == IS_ARRAY || Z_TYPE_P(entry) == IS_OBJECT) {
continue;
}
- ZVAL_DUP(&entry_n, entry);
+ ZVAL_COPY(&entry_n, entry);
convert_scalar_to_number(&entry_n);
fast_add_function(return_value, return_value, &entry_n);
} ZEND_HASH_FOREACH_END();
@@ -4653,7 +4679,7 @@ PHP_FUNCTION(array_product)
if (Z_TYPE_P(entry) == IS_ARRAY || Z_TYPE_P(entry) == IS_OBJECT) {
continue;
}
- ZVAL_DUP(&entry_n, entry);
+ ZVAL_COPY(&entry_n, entry);
convert_scalar_to_number(&entry_n);
if (Z_TYPE(entry_n) == IS_LONG && Z_TYPE_P(return_value) == IS_LONG) {
@@ -4701,7 +4727,8 @@ PHP_FUNCTION(array_reduce)
htbl = Z_ARRVAL_P(input);
if (zend_hash_num_elements(htbl) == 0) {
- RETURN_ZVAL(&result, 1, 1);
+ ZVAL_COPY_VALUE(return_value, &result);
+ return;
}
fci.retval = &retval;
@@ -4856,7 +4883,7 @@ PHP_FUNCTION(array_map)
/* Short-circuit: if no callback and only one array, just return it. */
if (!ZEND_FCI_INITIALIZED(fci)) {
- RETVAL_ZVAL(&arrays[0], 1, 0);
+ ZVAL_COPY(return_value, &arrays[0]);
return;
}
diff --git a/ext/standard/assert.c b/ext/standard/assert.c
index 59db4068bd..7054278d70 100644
--- a/ext/standard/assert.c
+++ b/ext/standard/assert.c
@@ -37,7 +37,7 @@ ZEND_END_MODULE_GLOBALS(assert)
ZEND_DECLARE_MODULE_GLOBALS(assert)
-static zend_class_entry *assertion_exception_ce;
+static zend_class_entry *assertion_error_ce;
#ifdef ZTS
#define ASSERTG(v) ZEND_TSRMG(assert_globals_id, zend_assert_globals *, v)
@@ -113,8 +113,8 @@ PHP_MINIT_FUNCTION(assert) /* {{{ */
REGISTER_LONG_CONSTANT("ASSERT_QUIET_EVAL", ASSERT_QUIET_EVAL, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("ASSERT_EXCEPTION", ASSERT_EXCEPTION, CONST_CS|CONST_PERSISTENT);
- INIT_CLASS_ENTRY(ce, "AssertionException", NULL);
- assertion_exception_ce = zend_register_internal_class_ex(&ce, zend_exception_get_default());
+ INIT_CLASS_ENTRY(ce, "AssertionError", NULL);
+ assertion_error_ce = zend_register_internal_class_ex(&ce, zend_get_error());
return SUCCESS;
}
@@ -244,14 +244,14 @@ PHP_FUNCTION(assert)
if (ASSERTG(exception)) {
if (!description) {
- zend_throw_exception(assertion_exception_ce, NULL, E_ERROR);
+ zend_throw_exception(assertion_error_ce, NULL, E_ERROR);
} else if (Z_TYPE_P(description) == IS_OBJECT &&
- instanceof_function(Z_OBJCE_P(description), assertion_exception_ce)) {
+ instanceof_function(Z_OBJCE_P(description), assertion_error_ce)) {
Z_ADDREF_P(description);
zend_throw_exception_object(description);
} else {
zend_string *str = zval_get_string(description);
- zend_throw_exception(assertion_exception_ce, str->val, E_ERROR);
+ zend_throw_exception(assertion_error_ce, str->val, E_ERROR);
zend_string_release(str);
}
} else if (ASSERTG(warning)) {
@@ -343,7 +343,7 @@ PHP_FUNCTION(assert_options)
case ASSERT_CALLBACK:
if (Z_TYPE(ASSERTG(callback)) != IS_UNDEF) {
- RETVAL_ZVAL(&ASSERTG(callback), 1, 0);
+ ZVAL_COPY(return_value, &ASSERTG(callback));
} else if (ASSERTG(cb)) {
RETVAL_STRING(ASSERTG(cb));
} else {
diff --git a/ext/standard/http.c b/ext/standard/http.c
index 25b77280de..7fe094009e 100644
--- a/ext/standard/http.c
+++ b/ext/standard/http.c
@@ -36,7 +36,7 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr,
const char *prop_name;
size_t arg_sep_len, newprefix_len, prop_len;
zend_ulong idx;
- zval *zdata = NULL, copyzval;
+ zval *zdata = NULL;
if (!ht) {
return FAILURE;
@@ -204,16 +204,14 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr,
default:
{
zend_string *ekey;
- /* fall back on convert to string */
- ZVAL_DUP(&copyzval, zdata);
- convert_to_string_ex(&copyzval);
+ zend_string *tmp = zval_get_string(zdata);
if (enc_type == PHP_QUERY_RFC3986) {
- ekey = php_raw_url_encode(Z_STRVAL(copyzval), Z_STRLEN(copyzval));
+ ekey = php_raw_url_encode(tmp->val, tmp->len);
} else {
- ekey = php_url_encode(Z_STRVAL(copyzval), Z_STRLEN(copyzval));
+ ekey = php_url_encode(tmp->val, tmp->len);
}
smart_str_append(formstr, ekey);
- zval_ptr_dtor(&copyzval);
+ zend_string_release(tmp);
zend_string_free(ekey);
}
}
diff --git a/ext/standard/info.c b/ext/standard/info.c
index c5651b43eb..7d1d9ff3b1 100644
--- a/ext/standard/info.c
+++ b/ext/standard/info.c
@@ -385,53 +385,242 @@ char* php_get_windows_name()
case PRODUCT_ULTIMATE:
sub = "Ultimate Edition";
break;
- case PRODUCT_HOME_PREMIUM:
- sub = "Home Premium Edition";
- break;
case PRODUCT_HOME_BASIC:
sub = "Home Basic Edition";
break;
+ case PRODUCT_HOME_PREMIUM:
+ sub = "Home Premium Edition";
+ break;
case PRODUCT_ENTERPRISE:
sub = "Enterprise Edition";
break;
- case PRODUCT_BUSINESS:
- sub = "Business Edition";
+ case PRODUCT_HOME_BASIC_N:
+ sub = "Home Basic N Edition";
break;
- case PRODUCT_STARTER:
- sub = "Starter Edition";
+ case PRODUCT_BUSINESS:
+ if ((osvi.dwMajorVersion > 6) || (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion > 0)) {
+ sub = "Professional Edition";
+ } else {
+ sub = "Business Edition";
+ }
break;
- case PRODUCT_CLUSTER_SERVER:
- sub = "Cluster Server Edition";
+ case PRODUCT_STANDARD_SERVER:
+ sub = "Standard Edition";
break;
case PRODUCT_DATACENTER_SERVER:
sub = "Datacenter Edition";
break;
- case PRODUCT_DATACENTER_SERVER_CORE:
- sub = "Datacenter Edition (core installation)";
+ case PRODUCT_SMALLBUSINESS_SERVER:
+ sub = "Small Business Server";
break;
case PRODUCT_ENTERPRISE_SERVER:
sub = "Enterprise Edition";
break;
+ case PRODUCT_STARTER:
+ if ((osvi.dwMajorVersion > 6) || (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion > 0)) {
+ sub = "Starter N Edition";
+ } else {
+ sub = "Starter Edition";
+ }
+ break;
+ case PRODUCT_DATACENTER_SERVER_CORE:
+ sub = "Datacenter Edition (core installation)";
+ break;
+ case PRODUCT_STANDARD_SERVER_CORE:
+ sub = "Standard Edition (core installation)";
+ break;
case PRODUCT_ENTERPRISE_SERVER_CORE:
sub = "Enterprise Edition (core installation)";
break;
case PRODUCT_ENTERPRISE_SERVER_IA64:
sub = "Enterprise Edition for Itanium-based Systems";
break;
- case PRODUCT_SMALLBUSINESS_SERVER:
- sub = "Small Business Server";
+ case PRODUCT_BUSINESS_N:
+ if ((osvi.dwMajorVersion > 6) || (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion > 0)) {
+ sub = "Professional N Edition";
+ } else {
+ sub = "Business N Edition";
+ }
+ break;
+ case PRODUCT_WEB_SERVER:
+ sub = "Web Server Edition";
+ break;
+ case PRODUCT_CLUSTER_SERVER:
+ sub = "HPC Edition";
+ break;
+ case PRODUCT_HOME_SERVER:
+ sub = "Storage Server Essentials Edition";
+ break;
+ case PRODUCT_STORAGE_EXPRESS_SERVER:
+ sub = "Storage Server Express Edition";
+ break;
+ case PRODUCT_STORAGE_STANDARD_SERVER:
+ sub = "Storage Server Standard Edition";
+ break;
+ case PRODUCT_STORAGE_WORKGROUP_SERVER:
+ sub = "Storage Server Workgroup Edition";
+ break;
+ case PRODUCT_STORAGE_ENTERPRISE_SERVER:
+ sub = "Storage Server Enterprise Edition";
+ break;
+ case PRODUCT_SERVER_FOR_SMALLBUSINESS:
+ sub = "Essential Server Solutions Edition";
break;
case PRODUCT_SMALLBUSINESS_SERVER_PREMIUM:
sub = "Small Business Server Premium Edition";
break;
- case PRODUCT_STANDARD_SERVER:
- sub = "Standard Edition";
+ case PRODUCT_HOME_PREMIUM_N:
+ sub = "Home Premium N Edition";
break;
- case PRODUCT_STANDARD_SERVER_CORE:
- sub = "Standard Edition (core installation)";
+ case PRODUCT_ENTERPRISE_N:
+ sub = "Enterprise N Edition";
break;
- case PRODUCT_WEB_SERVER:
- sub = "Web Server Edition";
+ case PRODUCT_ULTIMATE_N:
+ sub = "Ultimate N Edition";
+ break;
+ case PRODUCT_WEB_SERVER_CORE:
+ sub = "Web Server Edition (core installation)";
+ break;
+ case PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT:
+ sub = "Essential Business Server Management Server Edition";
+ break;
+ case PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY:
+ sub = "Essential Business Server Management Security Edition";
+ break;
+ case PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING:
+ sub = "Essential Business Server Management Messaging Edition";
+ break;
+ case PRODUCT_SERVER_FOUNDATION:
+ sub = "Foundation Edition";
+ break;
+ case PRODUCT_HOME_PREMIUM_SERVER:
+ sub = "Home Server 2011 Edition";
+ break;
+ case PRODUCT_SERVER_FOR_SMALLBUSINESS_V:
+ sub = "Essential Server Solutions Edition (without Hyper-V)";
+ break;
+ case PRODUCT_STANDARD_SERVER_V:
+ sub = "Standard Edition (without Hyper-V)";
+ break;
+ case PRODUCT_DATACENTER_SERVER_V:
+ sub = "Datacenter Edition (without Hyper-V)";
+ break;
+ case PRODUCT_ENTERPRISE_SERVER_V:
+ sub = "Enterprise Edition (without Hyper-V)";
+ break;
+ case PRODUCT_DATACENTER_SERVER_CORE_V:
+ sub = "Datacenter Edition (core installation, without Hyper-V)";
+ break;
+ case PRODUCT_STANDARD_SERVER_CORE_V:
+ sub = "Standard Edition (core installation, without Hyper-V)";
+ break;
+ case PRODUCT_ENTERPRISE_SERVER_CORE_V:
+ sub = "Enterprise Edition (core installation, without Hyper-V)";
+ break;
+ case PRODUCT_HYPERV:
+ sub = "Hyper-V Server";
+ break;
+ case PRODUCT_STORAGE_EXPRESS_SERVER_CORE:
+ sub = "Storage Server Express Edition (core installation)";
+ break;
+ case PRODUCT_STORAGE_STANDARD_SERVER_CORE:
+ sub = "Storage Server Standard Edition (core installation)";
+ break;
+ case PRODUCT_STORAGE_WORKGROUP_SERVER_CORE:
+ sub = "Storage Server Workgroup Edition (core installation)";
+ break;
+ case PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE:
+ sub = "Storage Server Enterprise Edition (core installation)";
+ break;
+ case PRODUCT_STARTER_N:
+ sub = "Starter N Edition";
+ break;
+ case PRODUCT_PROFESSIONAL:
+ sub = "Professional Edition";
+ break;
+ case PRODUCT_PROFESSIONAL_N:
+ sub = "Professional N Edition";
+ break;
+ case PRODUCT_SB_SOLUTION_SERVER:
+ sub = "Small Business Server 2011 Essentials Edition";
+ break;
+ case PRODUCT_SERVER_FOR_SB_SOLUTIONS:
+ sub = "Server For SB Solutions Edition";
+ break;
+ case PRODUCT_STANDARD_SERVER_SOLUTIONS:
+ sub = "Solutions Premium Edition";
+ break;
+ case PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE:
+ sub = "Solutions Premium Edition (core installation)";
+ break;
+ case PRODUCT_SB_SOLUTION_SERVER_EM:
+ sub = "Server For SB Solutions EM Edition";
+ break;
+ case PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM:
+ sub = "Server For SB Solutions EM Edition";
+ break;
+ case PRODUCT_SOLUTION_EMBEDDEDSERVER:
+ sub = "MultiPoint Server Edition";
+ break;
+ case PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT:
+ sub = "Essential Server Solution Management Edition";
+ break;
+ case PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL:
+ sub = "Essential Server Solution Additional Edition";
+ break;
+ case PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC:
+ sub = "Essential Server Solution Management SVC Edition";
+ break;
+ case PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC:
+ sub = "Essential Server Solution Additional SVC Edition";
+ break;
+ case PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE:
+ sub = "Small Business Server Premium Edition (core installation)";
+ break;
+ case PRODUCT_CLUSTER_SERVER_V:
+ sub = "Hyper Core V Edition";
+ break;
+ case PRODUCT_STARTER_E:
+ sub = "Hyper Core V Edition";
+ break;
+ case PRODUCT_ENTERPRISE_EVALUATION:
+ sub = "Enterprise Edition (evaluation installation)";
+ break;
+ case PRODUCT_MULTIPOINT_STANDARD_SERVER:
+ sub = "MultiPoint Server Standard Edition (full installation)";
+ break;
+ case PRODUCT_MULTIPOINT_PREMIUM_SERVER:
+ sub = "MultiPoint Server Premium Edition (full installation)";
+ break;
+ case PRODUCT_STANDARD_EVALUATION_SERVER:
+ sub = "Standard Edition (evaluation installation)";
+ break;
+ case PRODUCT_DATACENTER_EVALUATION_SERVER:
+ sub = "Datacenter Edition (evaluation installation)";
+ break;
+ case PRODUCT_ENTERPRISE_N_EVALUATION:
+ sub = "Enterprise N Edition (evaluation installation)";
+ break;
+ case PRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER:
+ sub = "Storage Server Workgroup Edition (evaluation installation)";
+ break;
+ case PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER:
+ sub = "Storage Server Standard Edition (evaluation installation)";
+ break;
+ case PRODUCT_CORE_N:
+ sub = "Windows 8 N Edition";
+ break;
+ case PRODUCT_CORE_COUNTRYSPECIFIC:
+ sub = "Windows 8 China Edition";
+ break;
+ case PRODUCT_CORE_SINGLELANGUAGE:
+ sub = "Windows 8 Single Language Edition";
+ break;
+ case PRODUCT_CORE:
+ sub = "Windows 8 Edition";
+ break;
+ case PRODUCT_PROFESSIONAL_WMC:
+ sub = "Professional with Media Center Edition";
break;
}
}
diff --git a/ext/standard/mail.c b/ext/standard/mail.c
index a9046cea69..77ad1fe0e8 100644
--- a/ext/standard/mail.c
+++ b/ext/standard/mail.c
@@ -226,7 +226,6 @@ void php_mail_log_to_file(char *filename, char *message, size_t message_size) {
static int php_mail_detect_multiple_crlf(char *hdr) {
/* This function detects multiple/malformed multiple newlines. */
- size_t len;
if (!hdr) {
return 0;
diff --git a/ext/standard/password.c b/ext/standard/password.c
index 4ad955e018..592f41838d 100644
--- a/ext/standard/password.c
+++ b/ext/standard/password.c
@@ -340,18 +340,13 @@ PHP_FUNCTION(password_hash)
break;
case IS_LONG:
case IS_DOUBLE:
- case IS_OBJECT: {
- zval cast_option_buffer;
-
- ZVAL_DUP(&cast_option_buffer, option_buffer);
- convert_to_string(&cast_option_buffer);
- if (Z_TYPE(cast_option_buffer) == IS_STRING) {
- buffer = estrndup(Z_STRVAL(cast_option_buffer), Z_STRLEN(cast_option_buffer));
- buffer_len = Z_STRLEN(cast_option_buffer);
- zval_dtor(&cast_option_buffer);
- break;
- }
- zval_dtor(&cast_option_buffer);
+ case IS_OBJECT:
+ {
+ zend_string *tmp = zval_get_string(option_buffer);
+ buffer = estrndup(tmp->val, tmp->len);
+ buffer_len = tmp->len;
+ zend_string_release(tmp);
+ break;
}
case IS_FALSE:
case IS_TRUE:
diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c
index 965bd67071..be0cbefac1 100644
--- a/ext/standard/streamsfuncs.c
+++ b/ext/standard/streamsfuncs.c
@@ -955,7 +955,7 @@ PHP_FUNCTION(stream_context_get_options)
RETURN_FALSE;
}
- RETURN_ZVAL(&context->options, 1, 0);
+ ZVAL_COPY(return_value, &context->options);
}
/* }}} */
@@ -1038,8 +1038,8 @@ PHP_FUNCTION(stream_context_get_params)
add_assoc_zval_ex(return_value, "notification", sizeof("notification")-1, &context->notifier->ptr);
if (Z_REFCOUNTED(context->notifier->ptr)) Z_ADDREF(context->notifier->ptr);
}
- ZVAL_ZVAL(&options, &context->options, 1, 0);
- add_assoc_zval_ex(return_value, "options", sizeof("options")-1, &options);
+ if (Z_REFCOUNTED(context->options)) Z_ADDREF(context->options);
+ add_assoc_zval_ex(return_value, "options", sizeof("options")-1, &context->options);
}
/* }}} */
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 8d95290ca2..186f68767b 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -1735,17 +1735,17 @@ PHP_FUNCTION(pathinfo)
}
if (opt == PHP_PATHINFO_ALL) {
- RETURN_ZVAL(&tmp, 0, 1);
+ ZVAL_COPY_VALUE(return_value, &tmp);
} else {
zval *element;
if ((element = zend_hash_get_current_data(Z_ARRVAL(tmp))) != NULL) {
- RETVAL_ZVAL(element, 1, 0);
+ ZVAL_DEREF(element);
+ ZVAL_COPY(return_value, element);
} else {
ZVAL_EMPTY_STRING(return_value);
}
+ zval_ptr_dtor(&tmp);
}
-
- zval_ptr_dtor(&tmp);
}
/* }}} */
@@ -2406,7 +2406,7 @@ PHP_FUNCTION(substr)
}
}
- if (f >= (zend_long)str->len) {
+ if (f > (zend_long)str->len) {
RETURN_FALSE;
}
@@ -2988,14 +2988,13 @@ static void php_strtr_array(zval *return_value, zend_string *input, HashTable *p
size_t minlen = 128*1024;
size_t maxlen = 0;
HashTable str_hash;
- zval *entry, tmp, dummy;
+ zval *entry;
char *key;
smart_str result = {0};
zend_ulong bitset[256/sizeof(zend_ulong)];
zend_ulong *num_bitset;
/* we will collect all possible key lengths */
- ZVAL_NULL(&dummy);
num_bitset = ecalloc((slen + (sizeof(zend_ulong)-1)) / sizeof(zend_ulong), sizeof(zend_ulong));
memset(bitset, 0, sizeof(bitset));
@@ -3024,17 +3023,15 @@ static void php_strtr_array(zval *return_value, zend_string *input, HashTable *p
} ZEND_HASH_FOREACH_END();
if (UNEXPECTED(num_keys)) {
+ zend_string *key_used;
/* we have to rebuild HashTable with numeric keys */
zend_hash_init(&str_hash, zend_hash_num_elements(pats), NULL, NULL, 0);
ZEND_HASH_FOREACH_KEY_VAL(pats, num_key, str_key, entry) {
if (UNEXPECTED(!str_key)) {
- ZVAL_LONG(&tmp, num_key);
- convert_to_string(&tmp);
- str_key = Z_STR(tmp);
- len = str_key->len;
+ key_used = zend_long_to_str(num_key);
+ len = key_used->len;
if (UNEXPECTED(len > slen)) {
/* skip long patterns */
- zval_dtor(&tmp);
continue;
}
if (len > maxlen) {
@@ -3045,17 +3042,18 @@ static void php_strtr_array(zval *return_value, zend_string *input, HashTable *p
}
/* remember possible key length */
num_bitset[len / sizeof(zend_ulong)] |= Z_UL(1) << (len % sizeof(zend_ulong));
- bitset[((unsigned char)str_key->val[0]) / sizeof(zend_ulong)] |= Z_UL(1) << (((unsigned char)str_key->val[0]) % sizeof(zend_ulong));
+ bitset[((unsigned char)key_used->val[0]) / sizeof(zend_ulong)] |= Z_UL(1) << (((unsigned char)key_used->val[0]) % sizeof(zend_ulong));
} else {
- len = str_key->len;
+ key_used = str_key;
+ len = key_used->len;
if (UNEXPECTED(len > slen)) {
/* skip long patterns */
continue;
}
}
- zend_hash_add(&str_hash, str_key, entry);
- if (str_key == Z_STR(tmp)) {
- zval_dtor(&tmp);
+ zend_hash_add(&str_hash, key_used, entry);
+ if (UNEXPECTED(!str_key)) {
+ zend_string_release(key_used);
}
} ZEND_HASH_FOREACH_END();
pats = &str_hash;
@@ -3073,22 +3071,23 @@ static void php_strtr_array(zval *return_value, zend_string *input, HashTable *p
old_pos = pos = 0;
while (pos <= slen - minlen) {
key = str + pos;
- if (bitset[((unsigned char)key[0]) / sizeof(zend_ulong)] & Z_UL(1) << (((unsigned char)key[0]) % sizeof(zend_ulong))) {
+ if (bitset[((unsigned char)key[0]) / sizeof(zend_ulong)] & (Z_UL(1) << (((unsigned char)key[0]) % sizeof(zend_ulong)))) {
len = maxlen;
if (len > slen - pos) {
len = slen - pos;
}
while (len >= minlen) {
- if (num_bitset[len / sizeof(zend_ulong)] & Z_UL(1) << (len % sizeof(zend_ulong)) == 0) continue;
- entry = zend_hash_str_find(pats, key, len);
- if (entry != NULL) {
- zend_string *s = zval_get_string(entry);
- smart_str_appendl(&result, str + old_pos, pos - old_pos);
- smart_str_append(&result, s);
- old_pos = pos + len;
- pos = old_pos - 1;
- zend_string_release(s);
- break;
+ if ((num_bitset[len / sizeof(zend_ulong)] & (Z_UL(1) << (len % sizeof(zend_ulong))))) {
+ entry = zend_hash_str_find(pats, key, len);
+ if (entry != NULL) {
+ zend_string *s = zval_get_string(entry);
+ smart_str_appendl(&result, str + old_pos, pos - old_pos);
+ smart_str_append(&result, s);
+ old_pos = pos + len;
+ pos = old_pos - 1;
+ zend_string_release(s);
+ break;
+ }
}
len--;
}
diff --git a/ext/standard/tests/array/array_sum_on_reference.phpt b/ext/standard/tests/array/array_sum_on_reference.phpt
new file mode 100644
index 0000000000..a11da5fdab
--- /dev/null
+++ b/ext/standard/tests/array/array_sum_on_reference.phpt
@@ -0,0 +1,15 @@
+--TEST--
+array_sum() on array with references
+--FILE--
+<?php
+
+$n = "10";
+$n .= "0";
+$nums = [&$n, 100];
+var_dump(array_sum($nums));
+var_dump($n);
+
+?>
+--EXPECT--
+int(200)
+string(3) "100"
diff --git a/ext/standard/tests/array/arsort_object1.phpt b/ext/standard/tests/array/arsort_object1.phpt
index 75be19b52e..f73696392e 100644
--- a/ext/standard/tests/array/arsort_object1.phpt
+++ b/ext/standard/tests/array/arsort_object1.phpt
@@ -87,7 +87,7 @@ echo "Done\n";
--EXPECTF--
*** Testing arsort() : object functionality ***
-Fatal error: Uncaught EngineException: Class 'for_integer_asort' not found in %sarsort_object1.php:%d
+Fatal error: Uncaught Error: Class 'for_integer_asort' not found in %sarsort_object1.php:%d
Stack trace:
#0 {main}
thrown in %sarsort_object1.php on line %d \ No newline at end of file
diff --git a/ext/standard/tests/array/arsort_object2.phpt b/ext/standard/tests/array/arsort_object2.phpt
index 077e2ced16..f5ed333623 100644
--- a/ext/standard/tests/array/arsort_object2.phpt
+++ b/ext/standard/tests/array/arsort_object2.phpt
@@ -91,7 +91,7 @@ echo "Done\n";
--EXPECTF--
*** Testing arsort() : object functionality ***
-Fatal error: Uncaught EngineException: Class 'for_integer_asort' not found in %sarsort_object2.php:%d
+Fatal error: Uncaught Error: Class 'for_integer_asort' not found in %sarsort_object2.php:%d
Stack trace:
#0 {main}
thrown in %sarsort_object2.php on line %d \ No newline at end of file
diff --git a/ext/standard/tests/file/bug38450_3.phpt b/ext/standard/tests/file/bug38450_3.phpt
index 0193d44d9f..f2c4643ef3 100644
--- a/ext/standard/tests/file/bug38450_3.phpt
+++ b/ext/standard/tests/file/bug38450_3.phpt
@@ -104,7 +104,7 @@ echo "Done\n";
--EXPECTF--
Warning: fopen(var://myvar): failed to open stream: "VariableStream::stream_open" call failed in %sbug38450_3.php on line %d
-Fatal error: Uncaught TypeException: Argument 1 passed to VariableStream::__construct() must be of the type array, none given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to VariableStream::__construct() must be of the type array, none given in %s:%d
Stack trace:
#0 [internal function]: VariableStream->__construct()
#1 %s(%d): fopen('var://myvar', 'r+')
diff --git a/ext/standard/tests/general_functions/010.phpt b/ext/standard/tests/general_functions/010.phpt
index a4802b0808..51132c6a15 100644
--- a/ext/standard/tests/general_functions/010.phpt
+++ b/ext/standard/tests/general_functions/010.phpt
@@ -13,7 +13,7 @@ class test {
try {
var_dump(register_shutdown_function(array("test","__call")));
-} catch (EngineException $e) {
+} catch (Error $e) {
echo "\nException: " . $e->getMessage() . "\n";
}
diff --git a/ext/standard/tests/general_functions/bug47857.phpt b/ext/standard/tests/general_functions/bug47857.phpt
index a2b0dac5e4..8bf04a39aa 100644
--- a/ext/standard/tests/general_functions/bug47857.phpt
+++ b/ext/standard/tests/general_functions/bug47857.phpt
@@ -19,7 +19,7 @@ Deprecated: Non-static method foo::bar() should not be called statically in %sbu
ok
bool(false)
-Fatal error: Uncaught EngineException: Non-static method BaseException::getMessage() cannot be called statically in %sbug47857.php:%d
+Fatal error: Uncaught Error: Non-static method Exception::getMessage() cannot be called statically in %sbug47857.php:%d
Stack trace:
#0 {main}
thrown in %sbug47857.php on line %d
diff --git a/ext/standard/tests/general_functions/bug69646.phpt b/ext/standard/tests/general_functions/bug69646.phpt
new file mode 100644
index 0000000000..b077c67319
--- /dev/null
+++ b/ext/standard/tests/general_functions/bug69646.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Bug #69646 OS command injection vulnerability in escapeshellarg()
+--SKIPIF--
+<?php
+if( substr(PHP_OS, 0, 3) != "WIN" )
+ die("skip.. Windows only");
+?>
+--FILE--
+<?php
+
+$a = 'a\\';
+$b = 'b -c d\\';
+var_dump( $a, escapeshellarg($a) );
+var_dump( $b, escapeshellarg($b) );
+
+$helper_script = <<<SCRIPT
+<?php
+
+print( "--- ARG INFO ---\n" );
+var_dump( \$argv );
+
+SCRIPT;
+
+$script = dirname(__FILE__) . DIRECTORY_SEPARATOR . "arginfo.php";
+file_put_contents($script, $helper_script);
+
+$cmd = PHP_BINARY . " " . $script . " " . escapeshellarg($a) . " " . escapeshellarg($b);
+
+system($cmd);
+
+unlink($script);
+?>
+--EXPECTF--
+string(2) "a\"
+string(5) ""a\\""
+string(7) "b -c d\"
+string(10) ""b -c d\\""
+--- ARG INFO ---
+array(3) {
+ [0]=>
+ string(%d) "%sarginfo.php"
+ [1]=>
+ string(2) "a\"
+ [2]=>
+ string(7) "b -c d\"
+}
+
diff --git a/ext/standard/tests/general_functions/type.phpt b/ext/standard/tests/general_functions/type.phpt
index 74ba9e6103..eb6f0672fe 100644
--- a/ext/standard/tests/general_functions/type.phpt
+++ b/ext/standard/tests/general_functions/type.phpt
@@ -345,7 +345,6 @@ string(14) "Resource id #%d"
bool(true)
string(14) "Resource id #%d"
string(57) "Object of class stdClass could not be converted to string"
-string(45) "Object of class stdClass to string conversion"
bool(true)
string(6) "Object"
Done
diff --git a/ext/standard/tests/serialize/bug69152.phpt b/ext/standard/tests/serialize/bug69152.phpt
index 83d7ebfb52..b766c0afbd 100644
--- a/ext/standard/tests/serialize/bug69152.phpt
+++ b/ext/standard/tests/serialize/bug69152.phpt
@@ -2,7 +2,7 @@
Bug #69152: Type Confusion Infoleak Vulnerability in unserialize()
--FILE--
<?php
-$x = unserialize('O:9:"exception":1:{s:20:"'."\0".'BaseException'."\0".'trace";s:4:"ryat";}');
+$x = unserialize('O:9:"exception":1:{s:16:"'."\0".'Exception'."\0".'trace";s:4:"ryat";}');
echo $x;
$x = unserialize('O:4:"test":1:{s:27:"__PHP_Incomplete_Class_Name";R:1;}');
$x->test();
diff --git a/ext/standard/tests/streams/bug62922.phpt b/ext/standard/tests/streams/bug62922.phpt
new file mode 100644
index 0000000000..d67343eb58
--- /dev/null
+++ b/ext/standard/tests/streams/bug62922.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Bug #62922: Truncating entire string should result in string
+--FILE--
+<?php
+var_dump(substr("", 0));
+var_dump(substr("a", 1));
+var_dump(substr("ab", 2));
+?>
+--EXPECT--
+string(0) ""
+string(0) ""
+string(0) ""
diff --git a/ext/standard/tests/strings/substr.phpt b/ext/standard/tests/strings/substr.phpt
index 5a8db16a54..f0fc06424b 100644
--- a/ext/standard/tests/strings/substr.phpt
+++ b/ext/standard/tests/strings/substr.phpt
Binary files differ
diff --git a/ext/standard/type.c b/ext/standard/type.c
index f884017f6f..8251a3f155 100644
--- a/ext/standard/type.c
+++ b/ext/standard/type.c
@@ -101,7 +101,6 @@ PHP_FUNCTION(settype)
}
ZVAL_DEREF(var);
- SEPARATE_ZVAL_NOREF(var);
if (!strcasecmp(type, "integer")) {
convert_to_long(var);
} else if (!strcasecmp(type, "int")) {
@@ -155,7 +154,7 @@ PHP_FUNCTION(intval)
ZEND_PARSE_PARAMETERS_END();
#endif
- RETVAL_ZVAL(num, 1, 0);
+ ZVAL_DUP(return_value, num);
convert_to_long_base(return_value, (int)base);
}
/* }}} */
@@ -170,8 +169,7 @@ PHP_FUNCTION(floatval)
return;
}
- RETVAL_ZVAL(num, 1, 0);
- convert_to_double(return_value);
+ RETURN_DOUBLE(zval_get_double(num));
}
/* }}} */
diff --git a/ext/standard/winver.h b/ext/standard/winver.h
index 069a14772d..d98518160c 100644
--- a/ext/standard/winver.h
+++ b/ext/standard/winver.h
@@ -18,32 +18,82 @@
#endif
#ifndef PRODUCT_ULTIMATE
-#define PRODUCT_UNDEFINED 0x00000000
-#define PRODUCT_ULTIMATE 0x00000001
-#define PRODUCT_HOME_BASIC 0x00000002
-#define PRODUCT_HOME_PREMIUM 0x00000003
-#define PRODUCT_ENTERPRISE 0x00000004
-#define PRODUCT_HOME_BASIC_N 0x00000005
-#define PRODUCT_BUSINESS 0x00000006
-#define PRODUCT_STANDARD_SERVER 0x00000007
-#define PRODUCT_DATACENTER_SERVER 0x00000008
-#define PRODUCT_SMALLBUSINESS_SERVER 0x00000009
-#define PRODUCT_ENTERPRISE_SERVER 0x0000000A
-#define PRODUCT_STARTER 0x0000000B
-#define PRODUCT_DATACENTER_SERVER_CORE 0x0000000C
-#define PRODUCT_STANDARD_SERVER_CORE 0x0000000D
-#define PRODUCT_ENTERPRISE_SERVER_CORE 0x0000000E
-#define PRODUCT_ENTERPRISE_SERVER_IA64 0x0000000F
-#define PRODUCT_BUSINESS_N 0x00000010
-#define PRODUCT_WEB_SERVER 0x00000011
-#define PRODUCT_CLUSTER_SERVER 0x00000012
-#define PRODUCT_HOME_SERVER 0x00000013
-#define PRODUCT_STORAGE_EXPRESS_SERVER 0x00000014
-#define PRODUCT_STORAGE_STANDARD_SERVER 0x00000015
-#define PRODUCT_STORAGE_WORKGROUP_SERVER 0x00000016
-#define PRODUCT_STORAGE_ENTERPRISE_SERVER 0x00000017
-#define PRODUCT_SERVER_FOR_SMALLBUSINESS 0x00000018
-#define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM 0x00000019
+#define PRODUCT_UNDEFINED 0x00000000
+#define PRODUCT_ULTIMATE 0x00000001
+#define PRODUCT_HOME_BASIC 0x00000002
+#define PRODUCT_HOME_PREMIUM 0x00000003
+#define PRODUCT_ENTERPRISE 0x00000004
+#define PRODUCT_HOME_BASIC_N 0x00000005
+#define PRODUCT_BUSINESS 0x00000006
+#define PRODUCT_STANDARD_SERVER 0x00000007
+#define PRODUCT_DATACENTER_SERVER 0x00000008
+#define PRODUCT_SMALLBUSINESS_SERVER 0x00000009
+#define PRODUCT_ENTERPRISE_SERVER 0x0000000A
+#define PRODUCT_STARTER 0x0000000B
+#define PRODUCT_DATACENTER_SERVER_CORE 0x0000000C
+#define PRODUCT_STANDARD_SERVER_CORE 0x0000000D
+#define PRODUCT_ENTERPRISE_SERVER_CORE 0x0000000E
+#define PRODUCT_ENTERPRISE_SERVER_IA64 0x0000000F
+#define PRODUCT_BUSINESS_N 0x00000010
+#define PRODUCT_WEB_SERVER 0x00000011
+#define PRODUCT_CLUSTER_SERVER 0x00000012
+#define PRODUCT_HOME_SERVER 0x00000013
+#define PRODUCT_STORAGE_EXPRESS_SERVER 0x00000014
+#define PRODUCT_STORAGE_STANDARD_SERVER 0x00000015
+#define PRODUCT_STORAGE_WORKGROUP_SERVER 0x00000016
+#define PRODUCT_STORAGE_ENTERPRISE_SERVER 0x00000017
+#define PRODUCT_SERVER_FOR_SMALLBUSINESS 0x00000018
+#define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM 0x00000019
+#define PRODUCT_HOME_PREMIUM_N 0x0000001A
+#define PRODUCT_ENTERPRISE_N 0x0000001B
+#define PRODUCT_ULTIMATE_N 0x0000001C
+#define PRODUCT_WEB_SERVER_CORE 0x0000001D
+#define PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT 0x0000001E
+#define PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY 0x0000001F
+#define PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING 0x00000020
+#define PRODUCT_SERVER_FOUNDATION 0x00000021
+#define PRODUCT_HOME_PREMIUM_SERVER 0x00000022
+#define PRODUCT_SERVER_FOR_SMALLBUSINESS_V 0x00000023
+#define PRODUCT_STANDARD_SERVER_V 0x00000024
+#define PRODUCT_DATACENTER_SERVER_V 0x00000025
+#define PRODUCT_ENTERPRISE_SERVER_V 0x00000026
+#define PRODUCT_DATACENTER_SERVER_CORE_V 0x00000027
+#define PRODUCT_STANDARD_SERVER_CORE_V 0x00000028
+#define PRODUCT_ENTERPRISE_SERVER_CORE_V 0x00000029
+#define PRODUCT_HYPERV 0x0000002A
+#define PRODUCT_STORAGE_EXPRESS_SERVER_CORE 0x0000002B
+#define PRODUCT_STORAGE_STANDARD_SERVER_CORE 0x0000002C
+#define PRODUCT_STORAGE_WORKGROUP_SERVER_CORE 0x0000002D
+#define PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE 0x0000002E
+#define PRODUCT_STARTER_N 0x0000002F
+#define PRODUCT_PROFESSIONAL 0x00000030
+#define PRODUCT_PROFESSIONAL_N 0x00000031
+#define PRODUCT_SB_SOLUTION_SERVER 0x00000032
+#define PRODUCT_SERVER_FOR_SB_SOLUTIONS 0x00000033
+#define PRODUCT_STANDARD_SERVER_SOLUTIONS 0x00000034
+#define PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE 0x00000035
+#define PRODUCT_SB_SOLUTION_SERVER_EM 0x00000036
+#define PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM 0x00000037
+#define PRODUCT_SOLUTION_EMBEDDEDSERVER 0x00000038
+#define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT 0x0000003B
+#define PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL 0x0000003C
+#define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC 0x0000003D
+#define PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC 0x0000003E
+#define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE 0x0000003F
+#define PRODUCT_CLUSTER_SERVER_V 0x00000040
+#define PRODUCT_ENTERPRISE_EVALUATION 0x00000048
+#define PRODUCT_MULTIPOINT_STANDARD_SERVER 0x0000004C
+#define PRODUCT_MULTIPOINT_PREMIUM_SERVER 0x0000004D
+#define PRODUCT_STANDARD_EVALUATION_SERVER 0x0000004F
+#define PRODUCT_DATACENTER_EVALUATION_SERVER 0x00000050
+#define PRODUCT_ENTERPRISE_N_EVALUATION 0x00000054
+#define PRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER 0x0000005F
+#define PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER 0x00000060
+#define PRODUCT_CORE_N 0x00000062
+#define PRODUCT_CORE_COUNTRYSPECIFIC 0x00000063
+#define PRODUCT_CORE_SINGLELANGUAGE 0x00000064
+#define PRODUCT_CORE 0x00000065
+#define PRODUCT_PROFESSIONAL_WMC 0x00000067
#endif
#ifndef VER_NT_WORKSTATION
diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c
index 80fd7e940f..d0a079c280 100644
--- a/ext/sysvmsg/sysvmsg.c
+++ b/ext/sysvmsg/sysvmsg.c
@@ -273,7 +273,7 @@ PHP_FUNCTION(msg_get_queue)
RETURN_FALSE;
}
}
- RETVAL_ZVAL(zend_list_insert(mq, le_sysvmsg), 0, 0);
+ ZVAL_COPY_VALUE(return_value, zend_list_insert(mq, le_sysvmsg));
}
/* }}} */
diff --git a/ext/tidy/tests/035.phpt b/ext/tidy/tests/035.phpt
index 8292755811..1fe0d5c9f1 100644
--- a/ext/tidy/tests/035.phpt
+++ b/ext/tidy/tests/035.phpt
@@ -9,7 +9,7 @@ tidyNode::__construct()
new tidyNode;
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to private tidyNode::__construct() from invalid context in %s:%d
+Fatal error: Uncaught Error: Call to private tidyNode::__construct() from invalid context in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/ext/tokenizer/package.xml b/ext/tokenizer/package.xml
index f6f754c3d2..c6ad4ff2a7 100644
--- a/ext/tokenizer/package.xml
+++ b/ext/tokenizer/package.xml
@@ -30,7 +30,6 @@ package.xml added to support installation using pear installer
<file role="src" name="config.m4"/>
<file role="src" name="Makefile.frag"/>
<file role="src" name="config.w32"/>
- <file role="src" name="tokenizer.dsp"/>
<file role="src" name="tokenizer.c"/>
<file role="src" name="php_tokenizer.h"/>
<file role="doc" name="tokenizer.php"/>
diff --git a/ext/tokenizer/tests/parse_errors.phpt b/ext/tokenizer/tests/parse_errors.phpt
index 3ee2cb081b..bfa6e07ac4 100644
--- a/ext/tokenizer/tests/parse_errors.phpt
+++ b/ext/tokenizer/tests/parse_errors.phpt
@@ -8,7 +8,7 @@ Parse errors during token_get_all()
function test_parse_error($code) {
try {
var_dump(token_get_all($code));
- } catch (ParseException $e) {
+ } catch (ParseError $e) {
echo $e->getMessage(), "\n";
}
}
diff --git a/ext/tokenizer/tests/token_get_all_TOKEN_PARSE_000.phpt b/ext/tokenizer/tests/token_get_all_TOKEN_PARSE_000.phpt
index 03b991b1a5..b9da91502a 100644
--- a/ext/tokenizer/tests/token_get_all_TOKEN_PARSE_000.phpt
+++ b/ext/tokenizer/tests/token_get_all_TOKEN_PARSE_000.phpt
@@ -7,7 +7,7 @@ Parse errors during token_get_all() with TOKEN_PARSE flag
try {
token_get_all('<?php invalid code;', TOKEN_PARSE);
-} catch (ParseException $e) {
+} catch (ParseError $e) {
echo $e->getMessage(), PHP_EOL;
}
diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c
index 2a4fa90ca2..63405ea6cd 100644
--- a/ext/tokenizer/tokenizer.c
+++ b/ext/tokenizer/tokenizer.c
@@ -257,9 +257,10 @@ static zend_bool tokenize_parse(zval *return_value, zend_string *source)
array_init(&token_stream);
if((success = (zendparse() == SUCCESS))) {
- ZVAL_ZVAL(return_value, &token_stream, 1, 0);
+ ZVAL_COPY_VALUE(return_value, &token_stream);
+ } else {
+ zval_ptr_dtor(&token_stream);
}
- zval_dtor(&token_stream);
zend_ast_destroy(CG(ast));
zend_arena_destroy(CG(ast_arena));
diff --git a/ext/xmlreader/tests/bug51936.phpt b/ext/xmlreader/tests/bug51936.phpt
index 8748c1ff32..821cef41b8 100644
--- a/ext/xmlreader/tests/bug51936.phpt
+++ b/ext/xmlreader/tests/bug51936.phpt
@@ -19,7 +19,7 @@ Done
--EXPECTF--
Test
-Fatal error: Uncaught EngineException: Trying to clone an uncloneable object of class XMLReader in %s:%d
+Fatal error: Uncaught Error: Trying to clone an uncloneable object of class XMLReader in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c
index 1dd76fcba8..7c17fb983a 100644
--- a/ext/zip/php_zip.c
+++ b/ext/zip/php_zip.c
@@ -847,7 +847,7 @@ static zval *php_zip_get_property_ptr_ptr(zval *object, zval *member, int type,
zend_object_handlers *std_hnd;
if (Z_TYPE_P(member) != IS_STRING) {
- ZVAL_DUP(&tmp_member, member);
+ ZVAL_COPY(&tmp_member, member);
convert_to_string(&tmp_member);
member = &tmp_member;
cache_slot = NULL;
@@ -881,7 +881,7 @@ static zval *php_zip_read_property(zval *object, zval *member, int type, void **
zend_object_handlers *std_hnd;
if (Z_TYPE_P(member) != IS_STRING) {
- ZVAL_DUP(&tmp_member, member);
+ ZVAL_COPY(&tmp_member, member);
convert_to_string(&tmp_member);
member = &tmp_member;
cache_slot = NULL;
@@ -920,7 +920,7 @@ static int php_zip_has_property(zval *object, zval *member, int type, void **cac
int retval = 0;
if (Z_TYPE_P(member) != IS_STRING) {
- ZVAL_DUP(&tmp_member, member);
+ ZVAL_COPY(&tmp_member, member);
convert_to_string(&tmp_member);
member = &tmp_member;
cache_slot = NULL;
diff --git a/ext/zlib/package.xml b/ext/zlib/package.xml
index 4be42e0936..7eb9fa0936 100644
--- a/ext/zlib/package.xml
+++ b/ext/zlib/package.xml
@@ -50,7 +50,6 @@ package.xml added to support installation using pear installer
<file role="src" name="config.w32"/>
<file role="src" name="php_zlib.h"/>
<file role="src" name="zlib.c"/>
- <file role="src" name="zlib.dsp"/>
<file role="src" name="zlib_fopen_wrapper.c"/>
<file role="src" name="php_zlib.def"/>
<file role="test" name="tests/001.phpt"/>
diff --git a/genfiles b/genfiles
index 8a362c1e31..516b3316fb 100755
--- a/genfiles
+++ b/genfiles
@@ -1,6 +1,15 @@
#! /bin/sh
-STD='make -f Makefile.frag RE2C="re2c" RE2C_FLAGS="-i" YACC="bison -y -l" srcdir=Zend builddir=Zend top_srcdir=.'
+if [ -z $YACC ]; then
+ YACC="bison"
+fi
+YACC="$YACC -y -l"
+
+if [ -z $RE2C ]; then
+ RE2C="re2c"
+fi
+
+STD="make -f Makefile.frag RE2C='$RE2C' RE2C_FLAGS='-i' YACC='$YACC' srcdir=Zend builddir=Zend top_srcdir=."
(eval "$STD Zend/zend_language_parser.c Zend/zend_language_scanner.c Zend/zend_ini_parser.c Zend/zend_ini_scanner.c")
diff --git a/main/fastcgi.c b/main/fastcgi.c
index 03dcc57b3c..cd8ca4523c 100644
--- a/main/fastcgi.c
+++ b/main/fastcgi.c
@@ -132,6 +132,106 @@ static int is_impersonate = 0;
#include "fastcgi.h"
+typedef struct _fcgi_header {
+ unsigned char version;
+ unsigned char type;
+ unsigned char requestIdB1;
+ unsigned char requestIdB0;
+ unsigned char contentLengthB1;
+ unsigned char contentLengthB0;
+ unsigned char paddingLength;
+ unsigned char reserved;
+} fcgi_header;
+
+typedef struct _fcgi_begin_request {
+ unsigned char roleB1;
+ unsigned char roleB0;
+ unsigned char flags;
+ unsigned char reserved[5];
+} fcgi_begin_request;
+
+typedef struct _fcgi_begin_request_rec {
+ fcgi_header hdr;
+ fcgi_begin_request body;
+} fcgi_begin_request_rec;
+
+typedef struct _fcgi_end_request {
+ unsigned char appStatusB3;
+ unsigned char appStatusB2;
+ unsigned char appStatusB1;
+ unsigned char appStatusB0;
+ unsigned char protocolStatus;
+ unsigned char reserved[3];
+} fcgi_end_request;
+
+typedef struct _fcgi_end_request_rec {
+ fcgi_header hdr;
+ fcgi_end_request body;
+} fcgi_end_request_rec;
+
+typedef struct _fcgi_hash_bucket {
+ unsigned int hash_value;
+ unsigned int var_len;
+ char *var;
+ unsigned int val_len;
+ char *val;
+ struct _fcgi_hash_bucket *next;
+ struct _fcgi_hash_bucket *list_next;
+} fcgi_hash_bucket;
+
+typedef struct _fcgi_hash_buckets {
+ unsigned int idx;
+ struct _fcgi_hash_buckets *next;
+ struct _fcgi_hash_bucket data[FCGI_HASH_TABLE_SIZE];
+} fcgi_hash_buckets;
+
+typedef struct _fcgi_data_seg {
+ char *pos;
+ char *end;
+ struct _fcgi_data_seg *next;
+ char data[1];
+} fcgi_data_seg;
+
+typedef struct _fcgi_hash {
+ fcgi_hash_bucket *hash_table[FCGI_HASH_TABLE_SIZE];
+ fcgi_hash_bucket *list;
+ fcgi_hash_buckets *buckets;
+ fcgi_data_seg *data;
+} fcgi_hash;
+
+typedef struct _fcgi_req_hook fcgi_req_hook;
+
+struct _fcgi_req_hook {
+ void(*on_accept)();
+ void(*on_read)();
+ void(*on_close)();
+};
+
+struct _fcgi_request {
+ int listen_socket;
+ int tcp;
+ int fd;
+ int id;
+ int keep;
+#ifdef TCP_NODELAY
+ int nodelay;
+#endif
+ int closed;
+ int in_len;
+ int in_pad;
+
+ fcgi_header *out_hdr;
+
+ unsigned char *out_pos;
+ unsigned char out_buf[1024*8];
+ unsigned char reserved[sizeof(fcgi_end_request_rec)];
+
+ fcgi_req_hook hook;
+
+ int has_env;
+ fcgi_hash env;
+};
+
/* maybe it's better to use weak name instead */
#ifndef HAVE_ATTRIBUTE_WEAK
static fcgi_logger fcgi_log;
@@ -772,9 +872,9 @@ static void fcgi_hook_dummy() {
return;
}
-fcgi_request *fcgi_init_request(fcgi_request *req, int listen_socket)
+fcgi_request *fcgi_init_request(int listen_socket, void(*on_accept)(), void(*on_read)(), void(*on_close)())
{
- memset(req, 0, sizeof(fcgi_request));
+ fcgi_request *req = calloc(1, sizeof(fcgi_request));
req->listen_socket = listen_socket;
req->fd = -1;
req->id = -1;
@@ -794,9 +894,9 @@ fcgi_request *fcgi_init_request(fcgi_request *req, int listen_socket)
*/
req->out_pos = req->out_buf;
- req->hook.on_accept = fcgi_hook_dummy;
- req->hook.on_read = fcgi_hook_dummy;
- req->hook.on_close = fcgi_hook_dummy;
+ req->hook.on_accept = on_accept ? on_accept : fcgi_hook_dummy;
+ req->hook.on_read = on_read ? on_read : fcgi_hook_dummy;
+ req->hook.on_close = on_close ? on_close : fcgi_hook_dummy;
#ifdef _WIN32
req->tcp = !GetNamedPipeInfo((HANDLE)_get_osfhandle(req->listen_socket), NULL, NULL, NULL, NULL);
@@ -809,6 +909,7 @@ fcgi_request *fcgi_init_request(fcgi_request *req, int listen_socket)
void fcgi_destroy_request(fcgi_request *req) {
fcgi_hash_destroy(&req->env);
+ free(req);
}
static inline ssize_t safe_write(fcgi_request *req, const void *buf, size_t count)
@@ -1553,6 +1654,11 @@ int fcgi_finish_request(fcgi_request *req, int force_close)
return ret;
}
+int fcgi_has_env(fcgi_request *req)
+{
+ return req && req->has_env;
+}
+
char* fcgi_getenv(fcgi_request *req, const char* var, int var_len)
{
unsigned int val_len;
diff --git a/main/fastcgi.h b/main/fastcgi.h
index 7e56f0ef89..df7d9ed314 100644
--- a/main/fastcgi.h
+++ b/main/fastcgi.h
@@ -77,43 +77,6 @@ typedef enum _fcgi_protocol_status {
FCGI_UNKNOWN_ROLE = 3
} dcgi_protocol_status;
-typedef struct _fcgi_header {
- unsigned char version;
- unsigned char type;
- unsigned char requestIdB1;
- unsigned char requestIdB0;
- unsigned char contentLengthB1;
- unsigned char contentLengthB0;
- unsigned char paddingLength;
- unsigned char reserved;
-} fcgi_header;
-
-typedef struct _fcgi_begin_request {
- unsigned char roleB1;
- unsigned char roleB0;
- unsigned char flags;
- unsigned char reserved[5];
-} fcgi_begin_request;
-
-typedef struct _fcgi_begin_request_rec {
- fcgi_header hdr;
- fcgi_begin_request body;
-} fcgi_begin_request_rec;
-
-typedef struct _fcgi_end_request {
- unsigned char appStatusB3;
- unsigned char appStatusB2;
- unsigned char appStatusB1;
- unsigned char appStatusB0;
- unsigned char protocolStatus;
- unsigned char reserved[3];
-} fcgi_end_request;
-
-typedef struct _fcgi_end_request_rec {
- fcgi_header hdr;
- fcgi_end_request body;
-} fcgi_end_request_rec;
-
/* FastCGI client API */
typedef void (*fcgi_apply_func)(char *var, unsigned int var_len, char *val, unsigned int val_len, void *arg);
@@ -122,69 +85,7 @@ typedef void (*fcgi_apply_func)(char *var, unsigned int var_len, char *val, unsi
#define FCGI_HASH_TABLE_MASK (FCGI_HASH_TABLE_SIZE - 1)
#define FCGI_HASH_SEG_SIZE 4096
-typedef struct _fcgi_hash_bucket {
- unsigned int hash_value;
- unsigned int var_len;
- char *var;
- unsigned int val_len;
- char *val;
- struct _fcgi_hash_bucket *next;
- struct _fcgi_hash_bucket *list_next;
-} fcgi_hash_bucket;
-
-typedef struct _fcgi_hash_buckets {
- unsigned int idx;
- struct _fcgi_hash_buckets *next;
- struct _fcgi_hash_bucket data[FCGI_HASH_TABLE_SIZE];
-} fcgi_hash_buckets;
-
-typedef struct _fcgi_data_seg {
- char *pos;
- char *end;
- struct _fcgi_data_seg *next;
- char data[1];
-} fcgi_data_seg;
-
-typedef struct _fcgi_hash {
- fcgi_hash_bucket *hash_table[FCGI_HASH_TABLE_SIZE];
- fcgi_hash_bucket *list;
- fcgi_hash_buckets *buckets;
- fcgi_data_seg *data;
-} fcgi_hash;
-
-typedef struct _fcgi_request fcgi_request;
-typedef struct _fcgi_req_hook fcgi_req_hook;
-
-struct _fcgi_req_hook {
- void(*on_accept)();
- void(*on_read)();
- void(*on_close)();
-};
-
-struct _fcgi_request {
- int listen_socket;
- int tcp;
- int fd;
- int id;
- int keep;
-#ifdef TCP_NODELAY
- int nodelay;
-#endif
- int closed;
- int in_len;
- int in_pad;
-
- fcgi_header *out_hdr;
-
- unsigned char *out_pos;
- unsigned char out_buf[1024*8];
- unsigned char reserved[sizeof(fcgi_end_request_rec)];
-
- fcgi_req_hook hook;
-
- int has_env;
- fcgi_hash env;
-};
+typedef struct _fcgi_request fcgi_request;
int fcgi_init(void);
void fcgi_shutdown(void);
@@ -194,7 +95,7 @@ void fcgi_close(fcgi_request *req, int force, int destroy);
int fcgi_in_shutdown(void);
void fcgi_terminate(void);
int fcgi_listen(const char *path, int backlog);
-fcgi_request* fcgi_init_request(fcgi_request *request, int listen_socket);
+fcgi_request* fcgi_init_request(int listen_socket, void(*on_accept)(), void(*on_read)(), void(*on_close)());
void fcgi_destroy_request(fcgi_request *req);
void fcgi_set_allowed_clients(char *ip);
int fcgi_accept_request(fcgi_request *req);
@@ -207,6 +108,7 @@ typedef void (*fcgi_logger)(int type, const char *fmt, ...);
void fcgi_set_logger(fcgi_logger lg);
#endif
+int fcgi_has_env(fcgi_request *req);
char* fcgi_getenv(fcgi_request *req, const char* var, int var_len);
char* fcgi_putenv(fcgi_request *req, char* var, int var_len, char* val);
char* fcgi_quick_getenv(fcgi_request *req, const char* var, int var_len, unsigned int hash_value);
diff --git a/main/win95nt.h b/main/win95nt.h
index 12356eeccd..84c3647afc 100644
--- a/main/win95nt.h
+++ b/main/win95nt.h
@@ -39,7 +39,9 @@ typedef char * caddr_t;
#define _IFLNK 0120000 /* symbolic link */
#define S_IFIFO _IFIFO
#define S_IFBLK _IFBLK
-#define S_IFLNK _IFLNK
+#ifndef S_IFLNK
+# define S_IFLNK _IFLNK
+#endif
#define chdir(path) _chdir(path)
#define mkdir(a, b) _mkdir(a)
#define rmdir(a) _rmdir(a)
diff --git a/pear/install-pear-nozlib.phar b/pear/install-pear-nozlib.phar
index f018d863ed..2f77855924 100644
--- a/pear/install-pear-nozlib.phar
+++ b/pear/install-pear-nozlib.phar
@@ -23,11 +23,11 @@ if (!class_exists('PHP_Archive')) {/**
* @author Davey Shafik <davey@synapticmedia.net>
* @author Greg Beaver <cellog@php.net>
* @link http://www.synapticmedia.net Synaptic Media
- * @version Id: Archive.php,v 1.52 2007/09/01 20:28:14 cellog Exp $
+ * @version Id$
* @package PHP_Archive
* @category PHP
*/
-
+
class PHP_Archive
{
const GZ = 0x00001000;
@@ -35,6 +35,9 @@ class PHP_Archive
const SIG = 0x00010000;
const SHA1 = 0x0002;
const MD5 = 0x0001;
+ const SHA256 = 0x0003;
+ const SHA512 = 0x0004;
+ const OPENSSL = 0x0010;
/**
* Whether this archive is compressed with zlib
*
@@ -56,6 +59,11 @@ class PHP_Archive
*/
protected $internalFileLength = null;
/**
+ * true if the current file is an empty directory
+ * @var string
+ */
+ protected $isDir = false;
+ /**
* Current file statistics (size, creation date, etc.)
* @var string
*/
@@ -78,7 +86,7 @@ class PHP_Archive
* require_once 'phar://PEAR.phar/PEAR/Installer.php';
* </code>
* then the alias is "PEAR.phar"
- *
+ *
* Information stored is a boolean indicating whether this .phar is compressed
* with zlib, another for bzip2, phar-specific meta-data, and
* the precise offset of internal files
@@ -94,9 +102,9 @@ class PHP_Archive
private static $_pharFiles = array();
/**
* File listing for the .phar
- *
+ *
* The manifest is indexed per phar.
- *
+ *
* Files within the .phar are indexed by their relative path within the
* .phar. Each file has this information in its internal array
*
@@ -209,7 +217,7 @@ class PHP_Archive
header("HTTP/1.0 404 Not Found");
return false;
}
-
+
}
public static function introspect($archive, $dir)
@@ -382,7 +390,7 @@ class PHP_Archive
* Any attempt to call from outside the .phar or to re-alias the .phar will fail
* as a security measure.
* @param string $alias
- * @param int $dataoffset the value of 42421
+ * @param int $dataoffset the value of 43613
*/
public static final function mapPhar($alias = NULL, $dataoffset = NULL)
{
@@ -439,7 +447,7 @@ class PHP_Archive
$manifest .= $last;
}
if (strlen($manifest) < $manifest_length['len']) {
- throw new Exception('ERROR: manifest length read was "' .
+ throw new Exception('ERROR: manifest length read was "' .
strlen($manifest) .'" should be "' .
$manifest_length['len'] . '"');
}
@@ -563,7 +571,7 @@ class PHP_Archive
return '';
}
$std = str_replace("\\", "/", $path);
- while ($std != ($std = ereg_replace("[^\/:?]+/\.\./", "", $std))) ;
+ while ($std != ($std = preg_replace("/[^\/:?]+\/\.\.\//", "", $std))) ;
$std = str_replace("/./", "", $std);
if (strlen($std) > 1 && $std[0] == '/') {
$std = substr($std, 1);
@@ -583,7 +591,15 @@ class PHP_Archive
{
$std = self::processFile($path);
if (isset(self::$_manifest[$this->_archiveName][$path])) {
- $this->_setCurrentFile($path);
+ if ($path[strlen($path)-1] == '/') {
+ // directory
+ if (!$allowdirs) {
+ return 'Error: "' . $path . '" is a directory in phar "' . $this->_basename . '"';
+ }
+ $this->_setCurrentFile($path, true);
+ } else {
+ $this->_setCurrentFile($path);
+ }
return true;
}
if (!$allowdirs) {
@@ -600,17 +616,30 @@ class PHP_Archive
return 'Error: "' . $path . '" not found in phar "' . $this->_basename . '"';
}
- private function _setCurrentFile($path)
+ private function _setCurrentFile($path, $dir = false)
{
- $this->currentStat = array(
- 2 => 0100444, // file mode, readable by all, writeable by none
- 4 => 0, // uid
- 5 => 0, // gid
- 7 => self::$_manifest[$this->_archiveName][$path][0], // size
- 9 => self::$_manifest[$this->_archiveName][$path][1], // creation time
- );
+ if ($dir) {
+ $this->currentStat = array(
+ 2 => 040777, // directory mode, readable by all, writeable by none
+ 4 => 0, // uid
+ 5 => 0, // gid
+ 7 => 0, // size
+ 9 => self::$_manifest[$this->_archiveName][$path][1], // creation time
+ );
+ $this->internalFileLength = 0;
+ $this->isDir = true;
+ } else {
+ $this->currentStat = array(
+ 2 => 0100444, // file mode, readable by all, writeable by none
+ 4 => 0, // uid
+ 5 => 0, // gid
+ 7 => self::$_manifest[$this->_archiveName][$path][0], // size
+ 9 => self::$_manifest[$this->_archiveName][$path][1], // creation time
+ );
+ $this->internalFileLength = self::$_manifest[$this->_archiveName][$path][2];
+ $this->isDir = false;
+ }
$this->currentFilename = $path;
- $this->internalFileLength = self::$_manifest[$this->_archiveName][$path][2];
// seek to offset of file header within the .phar
if (is_resource(@$this->fp)) {
fseek($this->fp, self::$_fileStart[$this->_archiveName] + self::$_manifest[$this->_archiveName][$path][7]);
@@ -687,7 +716,7 @@ class PHP_Archive
return false;
}
$file = substr($file, 7);
-
+
$ret = array('scheme' => 'phar');
$pos_p = strpos($file, '.phar.php');
$pos_z = strpos($file, '.phar.gz');
@@ -715,7 +744,7 @@ class PHP_Archive
}
return $ret;
}
-
+
/**
* Locate the .phar archive in the include_path and detect the file to open within
* the archive.
@@ -811,7 +840,7 @@ class PHP_Archive
return false;
}
}
-
+
/**
* Read the data - PHP streams API
*
@@ -824,7 +853,7 @@ class PHP_Archive
$this->position += strlen($ret);
return $ret;
}
-
+
/**
* Whether we've hit the end of the file - PHP streams API
* @access private
@@ -833,7 +862,7 @@ class PHP_Archive
{
return $this->position >= $this->currentStat[7];
}
-
+
/**
* For seeking the stream - PHP streams API
* @param int
@@ -866,7 +895,7 @@ class PHP_Archive
}
return true;
}
-
+
/**
* The current position in the stream - PHP streams API
* @access private
@@ -992,6 +1021,9 @@ class PHP_Archive
}
} elseif (strpos($file, $path) === 0) {
$fname = substr($file, strlen($path) + 1);
+ if ($fname == '/' || $fname[strlen($fname)-1] == '/') {
+ continue; // empty directory
+ }
if (strpos($fname, '/')) {
// this is a directory
$a = explode('/', $fname);
@@ -1102,18 +1134,21 @@ class PHP_Archive
/**
* @return list of supported signature algorithmns.
*/
- public static function getsupportedsignatures()
+ public static function getSupportedSignatures()
{
$ret = array('MD5', 'SHA-1');
if (extension_loaded('hash')) {
$ret[] = 'SHA-256';
$ret[] = 'SHA-512';
}
+ if (extension_loaded('openssl')) {
+ $ret[] = 'OpenSSL';
+ }
return $ret;
}
}}
if (!class_exists('Phar')) {
- PHP_Archive::mapPhar(null, 42421 );
+ PHP_Archive::mapPhar(null, 43613 );
} else {
try {
Phar::mapPhar();
@@ -1234,9 +1269,10 @@ if (extension_loaded('phar')) {if (isset($_SERVER) && isset($_SERVER['REQUEST_UR
require_once 'phar://install-pear-nozlib.phar/index.php';
-__HALT_COMPILER();
-0¤/m
-
+__HALT_COMPILER();Û
+?
+?
+
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
@@ -1948,7 +1984,7 @@ class Archive_Tar extends PEAR
break;
default :
- $this->_error('Unknow attribute code ' . $v_att_list[$i] . '');
+ $this->_error('Unknown attribute code ' . $v_att_list[$i] . '');
return false;
}
@@ -2956,7 +2992,7 @@ class Archive_Tar extends PEAR
}
// ----- Extract the properties
- $v_header['filename'] = $v_data['filename'];
+ $v_header['filename'] = rtrim($v_data['filename'], "\0");
if ($this->_maliciousFilename($v_header['filename'])) {
$this->_error(
'Malicious .tar detected, file "' . $v_header['filename'] .
@@ -3014,6 +3050,7 @@ class Archive_Tar extends PEAR
function _readLongHeader(&$v_header)
{
$v_filename = '';
+ $v_filesize = $v_header['size'];
$n = floor($v_header['size'] / 512);
for ($i = 0; $i < $n; $i++) {
$v_content = $this->_readBlock();
@@ -3021,7 +3058,7 @@ class Archive_Tar extends PEAR
}
if (($v_header['size'] % 512) != 0) {
$v_content = $this->_readBlock();
- $v_filename .= trim($v_content);
+ $v_filename .= $v_content;
}
// ----- Read the next header
@@ -3031,7 +3068,7 @@ class Archive_Tar extends PEAR
return false;
}
- $v_filename = trim($v_filename);
+ $v_filename = rtrim(substr($v_filename, 0, $v_filesize), "\0");
$v_header['filename'] = $v_filename;
if ($this->_maliciousFilename($v_filename)) {
$this->_error(
@@ -3658,7 +3695,7 @@ class Archive_Tar extends PEAR
}
?>
-package.xml
+package.xml
<package packagerversion="1.9.4" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<name>Archive_Tar</name>
<channel>pear.php.net</channel>
@@ -3691,24 +3728,23 @@ loaded. Bz2 compression is also supported with the bz2 extension loaded.</descri
<email>stig@php.net</email>
<active>no</active>
</helper>
- <date>2014-09-02</date>
- <time>07:33:00</time>
+ <date>2015-04-14</date>
+ <time>12:24:12</time>
<version>
- <release>1.3.13</release>
+ <release>1.3.16</release>
<api>1.3.1</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD
- License</license>
+ <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
<notes>
-* Fix Bug #20382: gzopen fix [mrook]
+* Fix Bug #20514: invalid package.xml; not installable with pyrus [mrook]
</notes>
<contents>
<dir name="/">
- <file baseinstalldir="/" md5sum="5abc21a68853f801a4ba7b6ff0918d5b" name="Archive/Tar.php" role="php" />
+ <file baseinstalldir="/" md5sum="d8be5182769eaa7fa3fc2596473f4838" name="Archive/Tar.php" role="php" />
<file baseinstalldir="/" md5sum="2fb90f0be7089a45c09a0d1182792419" name="docs/Archive_Tar.txt" role="doc" />
</dir>
</contents>
@@ -3732,6 +3768,52 @@ loaded. Bz2 compression is also supported with the bz2 extension loaded.</descri
<changelog>
<release>
<version>
+ <release>1.3.15</release>
+ <api>1.3.1</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2015-03-05</date>
+ <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
+ <notes>
+* Fixes composer.json parse error
+ </notes>
+ </release>
+ <release>
+ <version>
+ <release>1.3.14</release>
+ <api>1.3.1</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2015-02-26</date>
+ <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
+ <notes>
+* Fix Bug #18505: Possible incorrect handling of file names in TAR [mrook]
+ </notes>
+ </release>
+ <release>
+ <version>
+ <release>1.3.13</release>
+ <api>1.3.1</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2014-09-02</date>
+ <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD
+ License</license>
+ <notes>
+* Fix Bug #20382: gzopen fix [mrook]
+ </notes>
+ </release>
+ <release>
+ <version>
<release>1.3.12</release>
<api>1.3.1</api>
</version>
@@ -4088,7 +4170,7 @@ Windows bugfix: used wrong directory separators
</release>
</changelog>
</package>
-
+
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
@@ -4800,7 +4882,7 @@ class Archive_Tar extends PEAR
break;
default :
- $this->_error('Unknow attribute code ' . $v_att_list[$i] . '');
+ $this->_error('Unknown attribute code ' . $v_att_list[$i] . '');
return false;
}
@@ -5808,7 +5890,7 @@ class Archive_Tar extends PEAR
}
// ----- Extract the properties
- $v_header['filename'] = $v_data['filename'];
+ $v_header['filename'] = rtrim($v_data['filename'], "\0");
if ($this->_maliciousFilename($v_header['filename'])) {
$this->_error(
'Malicious .tar detected, file "' . $v_header['filename'] .
@@ -5866,6 +5948,7 @@ class Archive_Tar extends PEAR
function _readLongHeader(&$v_header)
{
$v_filename = '';
+ $v_filesize = $v_header['size'];
$n = floor($v_header['size'] / 512);
for ($i = 0; $i < $n; $i++) {
$v_content = $this->_readBlock();
@@ -5873,7 +5956,7 @@ class Archive_Tar extends PEAR
}
if (($v_header['size'] % 512) != 0) {
$v_content = $this->_readBlock();
- $v_filename .= trim($v_content);
+ $v_filename .= $v_content;
}
// ----- Read the next header
@@ -5883,7 +5966,7 @@ class Archive_Tar extends PEAR
return false;
}
- $v_filename = trim($v_filename);
+ $v_filename = rtrim(substr($v_filename, 0, $v_filesize), "\0");
$v_header['filename'] = $v_filename;
if ($this->_maliciousFilename($v_filename)) {
$this->_error(
@@ -6510,7 +6593,7 @@ class Archive_Tar extends PEAR
}
?>
-
+
===================================
Last update : 2001-08-15
@@ -7004,7 +7087,7 @@ How it works :
* @package Console_Getopt
* @author Andrei Zmievski <andrei@php.net>
* @license http://www.php.net/license/3_0.txt PHP 3.0
- * @version CVS: $Id: Getopt.php 306067 2010-12-08 00:13:31Z dufuz $
+ * @version CVS: $Id$
* @link http://pear.php.net/package/Console_Getopt
*/
@@ -7055,9 +7138,8 @@ class Console_Getopt
*
* @return array two-element array containing the list of parsed options and
* the non-option arguments
- * @access public
*/
- function getopt2($args, $short_options, $long_options = null, $skip_unknown = false)
+ public static function getopt2($args, $short_options, $long_options = null, $skip_unknown = false)
{
return Console_Getopt::doGetopt(2, $args, $short_options, $long_options, $skip_unknown);
}
@@ -7074,7 +7156,7 @@ class Console_Getopt
* @return array two-element array containing the list of parsed options and
* the non-option arguments
*/
- function getopt($args, $short_options, $long_options = null, $skip_unknown = false)
+ public static function getopt($args, $short_options, $long_options = null, $skip_unknown = false)
{
return Console_Getopt::doGetopt(1, $args, $short_options, $long_options, $skip_unknown);
}
@@ -7090,7 +7172,7 @@ class Console_Getopt
*
* @return array
*/
- function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
+ public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
{
// in case you pass directly readPHPArgv() as the first arg
if (PEAR::isError($args)) {
@@ -7169,10 +7251,9 @@ class Console_Getopt
* @param string[] &$args
* @param boolean $skip_unknown suppresses Console_Getopt: unrecognized option
*
- * @access private
* @return void
*/
- function _parseShortOption($arg, $short_options, &$opts, &$args, $skip_unknown)
+ protected static function _parseShortOption($arg, $short_options, &$opts, &$args, $skip_unknown)
{
for ($i = 0; $i < strlen($arg); $i++) {
$opt = $arg{$i};
@@ -7207,11 +7288,11 @@ class Console_Getopt
if (Console_Getopt::_isShortOpt($opt_arg)
|| Console_Getopt::_isLongOpt($opt_arg)) {
$msg = "option requires an argument --$opt";
- return PEAR::raiseError("Console_Getopt:" . $msg);
+ return PEAR::raiseError("Console_Getopt: " . $msg);
}
} else {
$msg = "option requires an argument --$opt";
- return PEAR::raiseError("Console_Getopt:" . $msg);
+ return PEAR::raiseError("Console_Getopt: " . $msg);
}
}
}
@@ -7225,10 +7306,9 @@ class Console_Getopt
*
* @param string $arg Argument to check
*
- * @access private
* @return bool
*/
- function _isShortOpt($arg)
+ protected static function _isShortOpt($arg)
{
return strlen($arg) == 2 && $arg[0] == '-'
&& preg_match('/[a-zA-Z]/', $arg[1]);
@@ -7239,10 +7319,9 @@ class Console_Getopt
*
* @param string $arg Argument to check
*
- * @access private
* @return bool
*/
- function _isLongOpt($arg)
+ protected static function _isLongOpt($arg)
{
return strlen($arg) > 2 && $arg[0] == '-' && $arg[1] == '-' &&
preg_match('/[a-zA-Z]+$/', substr($arg, 2));
@@ -7256,10 +7335,9 @@ class Console_Getopt
* @param string[][] &$opts
* @param string[] &$args
*
- * @access private
* @return void|PEAR_Error
*/
- function _parseLongOption($arg, $long_options, &$opts, &$args, $skip_unknown)
+ protected static function _parseLongOption($arg, $long_options, &$opts, &$args, $skip_unknown)
{
@list($opt, $opt_arg) = explode('=', $arg, 2);
@@ -7331,10 +7409,9 @@ class Console_Getopt
* Safely read the $argv PHP array across different PHP configurations.
* Will take care on register_globals and register_argc_argv ini directives
*
- * @access public
* @return mixed the $argv PHP array or PEAR error if not registered
*/
- function readPHPArgv()
+ public static function readPHPArgv()
{
global $argv;
if (!is_array($argv)) {
@@ -7350,8 +7427,8 @@ class Console_Getopt
return $argv;
}
-}package.xml
-<package packagerversion="1.9.2" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
+}package.xml
+<package packagerversion="1.9.4" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<name>Console_Getopt</name>
<channel>pear.php.net</channel>
<summary>Command-line option parser</summary>
@@ -7361,7 +7438,7 @@ short and long options.</description>
<name>Andrei Zmievski</name>
<user>andrei</user>
<email>andrei@php.net</email>
- <active>yes</active>
+ <active>no</active>
</lead>
<developer>
<name>Stig Bakken</name>
@@ -7375,35 +7452,37 @@ short and long options.</description>
<email>cellog@php.net</email>
<active>yes</active>
</helper>
- <date>2011-03-07</date>
- <time>22:58:21</time>
+ <date>2015-02-22</date>
+ <time>13:25:49</time>
<version>
- <release>1.3.1</release>
- <api>1.3.0</api>
+ <release>1.4.0</release>
+ <api>1.4.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
- <license uri="http://www.php.net/license">PHP License</license>
+ <license uri="http://opensource.org/licenses/bsd-license.php">BSD-2-Clause</license>
<notes>
-* Change the minimum PEAR installer dep to be lower
+* Change license to BSD-2-Clause
+* Set minimum PHP version to 5.4.0
+* Mark static methods with &quot;static&quot; keyword
</notes>
<contents>
<dir name="/">
- <file md5sum="ed666da6b1c5d01c3ecbf1f588a70a60" name="Console/Getopt.php" role="php" />
+ <file md5sum="013530beb065fb8885f70af40b6c91fa" name="Console/Getopt.php" role="php" />
</dir>
</contents>
<compatible>
<name>PEAR</name>
<channel>pear.php.net</channel>
<min>1.4.0</min>
- <max>1.10.0</max>
+ <max>1.999.999</max>
</compatible>
<dependencies>
<required>
<php>
- <min>4.3.0</min>
+ <min>5.4.0</min>
</php>
<pearinstaller>
<min>1.8.0</min>
@@ -7413,6 +7492,38 @@ short and long options.</description>
<phprelease />
<changelog>
<release>
+ <date>2015-02-22</date>
+ <version>
+ <release>1.3.1</release>
+ <api>1.3.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://opensource.org/licenses/bsd-license.php">BSD-2-Clause</license>
+ <notes>
+* Change license to BSD-2-Clause
+* Set minimum PHP version to 5.4.0
+* Mark static methods with &quot;static&quot; keyword
+ </notes>
+ </release>
+ <release>
+ <date>2011-03-07</date>
+ <version>
+ <release>1.3.1</release>
+ <api>1.3.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.php.net/license">PHP License</license>
+ <notes>
+* Change the minimum PEAR installer dep to be lower
+ </notes>
+ </release>
+ <release>
<date>2010-12-11</date>
<time>20:20:13</time>
<version>
@@ -7552,7 +7663,7 @@ Initial release
</release>
</changelog>
</package>
-
+
/* vim: set expandtab tabstop=4 shiftwidth=4: */
/**
* PHP Version 5
@@ -7571,7 +7682,7 @@ Initial release
* @package Console_Getopt
* @author Andrei Zmievski <andrei@php.net>
* @license http://www.php.net/license/3_0.txt PHP 3.0
- * @version CVS: $Id: Getopt.php 306067 2010-12-08 00:13:31Z dufuz $
+ * @version CVS: $Id$
* @link http://pear.php.net/package/Console_Getopt
*/
@@ -7622,9 +7733,8 @@ class Console_Getopt
*
* @return array two-element array containing the list of parsed options and
* the non-option arguments
- * @access public
*/
- function getopt2($args, $short_options, $long_options = null, $skip_unknown = false)
+ public static function getopt2($args, $short_options, $long_options = null, $skip_unknown = false)
{
return Console_Getopt::doGetopt(2, $args, $short_options, $long_options, $skip_unknown);
}
@@ -7641,7 +7751,7 @@ class Console_Getopt
* @return array two-element array containing the list of parsed options and
* the non-option arguments
*/
- function getopt($args, $short_options, $long_options = null, $skip_unknown = false)
+ public static function getopt($args, $short_options, $long_options = null, $skip_unknown = false)
{
return Console_Getopt::doGetopt(1, $args, $short_options, $long_options, $skip_unknown);
}
@@ -7657,7 +7767,7 @@ class Console_Getopt
*
* @return array
*/
- function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
+ public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
{
// in case you pass directly readPHPArgv() as the first arg
if (PEAR::isError($args)) {
@@ -7736,10 +7846,9 @@ class Console_Getopt
* @param string[] &$args
* @param boolean $skip_unknown suppresses Console_Getopt: unrecognized option
*
- * @access private
* @return void
*/
- function _parseShortOption($arg, $short_options, &$opts, &$args, $skip_unknown)
+ protected static function _parseShortOption($arg, $short_options, &$opts, &$args, $skip_unknown)
{
for ($i = 0; $i < strlen($arg); $i++) {
$opt = $arg{$i};
@@ -7774,11 +7883,11 @@ class Console_Getopt
if (Console_Getopt::_isShortOpt($opt_arg)
|| Console_Getopt::_isLongOpt($opt_arg)) {
$msg = "option requires an argument --$opt";
- return PEAR::raiseError("Console_Getopt:" . $msg);
+ return PEAR::raiseError("Console_Getopt: " . $msg);
}
} else {
$msg = "option requires an argument --$opt";
- return PEAR::raiseError("Console_Getopt:" . $msg);
+ return PEAR::raiseError("Console_Getopt: " . $msg);
}
}
}
@@ -7792,10 +7901,9 @@ class Console_Getopt
*
* @param string $arg Argument to check
*
- * @access private
* @return bool
*/
- function _isShortOpt($arg)
+ protected static function _isShortOpt($arg)
{
return strlen($arg) == 2 && $arg[0] == '-'
&& preg_match('/[a-zA-Z]/', $arg[1]);
@@ -7806,10 +7914,9 @@ class Console_Getopt
*
* @param string $arg Argument to check
*
- * @access private
* @return bool
*/
- function _isLongOpt($arg)
+ protected static function _isLongOpt($arg)
{
return strlen($arg) > 2 && $arg[0] == '-' && $arg[1] == '-' &&
preg_match('/[a-zA-Z]+$/', substr($arg, 2));
@@ -7823,10 +7930,9 @@ class Console_Getopt
* @param string[][] &$opts
* @param string[] &$args
*
- * @access private
* @return void|PEAR_Error
*/
- function _parseLongOption($arg, $long_options, &$opts, &$args, $skip_unknown)
+ protected static function _parseLongOption($arg, $long_options, &$opts, &$args, $skip_unknown)
{
@list($opt, $opt_arg) = explode('=', $arg, 2);
@@ -7898,10 +8004,9 @@ class Console_Getopt
* Safely read the $argv PHP array across different PHP configurations.
* Will take care on register_globals and register_argc_argv ini directives
*
- * @access public
* @return mixed the $argv PHP array or PEAR error if not registered
*/
- function readPHPArgv()
+ public static function readPHPArgv()
{
global $argv;
if (!is_array($argv)) {
@@ -7917,13 +8022,11 @@ class Console_Getopt
return $argv;
}
-}
-
-/* $Id$ */
+}
error_reporting(1803);
-if (ini_get('date.timezone') === '' && function_exists('date_default_timezone_set')) {
+if (ini_get('date.timezone') === '') {
date_default_timezone_set('UTC');
}
@@ -7953,10 +8056,10 @@ if (!$a) {
}
$force = false;
-$install_files = array('Archive_Tar' => 'phar://install-pear-nozlib.phar/Archive_Tar-1.3.13.tar',
-'Console_Getopt' => 'phar://install-pear-nozlib.phar/Console_Getopt-1.3.1.tar',
-'Structures_Graph' => 'phar://install-pear-nozlib.phar/Structures_Graph-1.0.4.tar',
-'XML_Util' => 'phar://install-pear-nozlib.phar/XML_Util-1.2.3.tar',
+$install_files = array('Archive_Tar' => 'phar://install-pear-nozlib.phar/Archive_Tar-1.3.16.tar',
+'Console_Getopt' => 'phar://install-pear-nozlib.phar/Console_Getopt-1.4.0.tar',
+'Structures_Graph' => 'phar://install-pear-nozlib.phar/Structures_Graph-1.1.0.tar',
+'XML_Util' => 'phar://install-pear-nozlib.phar/XML_Util-1.3.0.tar',
'PEAR' => 'phar://install-pear-nozlib.phar/PEAR-1.9.5.tar',
);
array_shift($argv);
@@ -8230,7 +8333,6 @@ foreach ($install_files as $package => $instfile) {
* @author Gregory Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since PEAR 0.1
*/
@@ -8319,7 +8421,7 @@ class OS_Guess
var $release;
var $extra;
- function OS_Guess($uname = null)
+ function __construct($uname = null)
{
list($this->sysname,
$this->release,
@@ -8555,7 +8657,8 @@ class OS_Guess
* indent-tabs-mode: nil
* c-basic-offset: 4
* End:
- */package.xml
+ */
+package.xml
<package packagerversion="1.9.5" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<name>PEAR</name>
<channel>pear.php.net</channel>
@@ -8644,8 +8747,8 @@ class OS_Guess
<email>mj@php.net</email>
<active>no</active>
</helper>
- <date>2015-02-10</date>
- <time>09:27:31</time>
+ <date>2015-06-16</date>
+ <time>15:53:26</time>
<version>
<release>1.9.5</release>
<api>1.9.5</api>
@@ -8677,230 +8780,229 @@ Bug fixes in 1.9.5.dev1:
</notes>
<contents>
<dir name="/">
- <file md5sum="a2aa07e80374c8cbc72229b5e7c28975" name="OS/Guess.php" role="php">
+ <file md5sum="871ed3c14b667b22765eb3ba6618246e" name="OS/Guess.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="e891645bd254d8ae9953fc2b571c076a" name="PEAR/ChannelFile/Parser.php" role="php">
+ <file md5sum="a27ac7bbcd59575bd7eb47c26f393fb7" name="PEAR/ChannelFile/Parser.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="8fd87e64002e11fd86eb2f3fbfee6599" name="PEAR/Command/Auth.xml" role="php" />
- <file md5sum="160fab095b97a42e16e62741a7eb0ad1" name="PEAR/Command/Auth.php" role="php">
+ <file md5sum="7cc172f1aab717868cfb9182bffc1bd6" name="PEAR/Command/Auth.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="73602fd7f051eaf8d37452d0e3063bdb" name="PEAR/Command/Build.xml" role="php" />
- <file md5sum="c7919396329a85e869523a9427fa5fa7" name="PEAR/Command/Build.php" role="php">
+ <file md5sum="87f08181b04413e4f85eda31e3470813" name="PEAR/Command/Build.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="6d5aab4d4308c3005b5f584c7783a031" name="PEAR/Command/Channels.xml" role="php" />
- <file md5sum="9a67344b6adfcb21d0110e6c9aff4ee8" name="PEAR/Command/Channels.php" role="php">
+ <file md5sum="3be1244fe9d3f98a2ecbd09e6a7f4de5" name="PEAR/Command/Channels.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="27146b078d36e65ee09ee26e152fa186" name="PEAR/Command/Common.php" role="php">
+ <file md5sum="eaa3bd88483a7c1ca2c5773f2e228d5a" name="PEAR/Command/Common.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="91f189cb9423b5e87ee0abc5ea1a2be3" name="PEAR/Command/Config.xml" role="php" />
- <file md5sum="7f5308dddc223db88c08247853b5405c" name="PEAR/Command/Config.php" role="php">
+ <file md5sum="45f29ee1f0fb1292c19d4611faa4f77c" name="PEAR/Command/Config.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="2db0386b865d3f9a29f9126728722ece" name="PEAR/Command/Install.xml" role="php" />
- <file md5sum="86dbc400d1ce627129fb9e3006b456bd" name="PEAR/Command/Install.php" role="php">
+ <file md5sum="8c2e07d70a1efae5f87a629899192019" name="PEAR/Command/Install.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="5cb62a04c0a268f4edd64a49a3895c92" name="PEAR/Command/Mirror.xml" role="php" />
- <file md5sum="2f9f9c377012970ebb7a9adf2624115c" name="PEAR/Command/Mirror.php" role="php">
+ <file md5sum="90d4d159c03bd83e62ac899e1b4e05c6" name="PEAR/Command/Mirror.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="9367dcd7e4dbdde423f9c4c7d3f3a919" name="PEAR/Command/Package.xml" role="php" />
- <file md5sum="1a48bf3b518b7294dcce9c63282c281d" name="PEAR/Command/Package.php" role="php">
+ <file md5sum="9434e3ae9d2cd10e83978d8d6213ace4" name="PEAR/Command/Package.php" role="php">
<tasks:replace from="@DATA-DIR@" to="data_dir" type="pear-config" />
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="28dc842ea725d8787b9f9c3dbca5aa22" name="PEAR/Command/Pickle.xml" role="php" />
- <file md5sum="a9efe0702637c6473147811064171553" name="PEAR/Command/Pickle.php" role="php">
+ <file md5sum="a856882b752fe97c0fc38783640a6134" name="PEAR/Command/Pickle.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="49b046cfc14747f0365e02e9c3f0e6dc" name="PEAR/Command/Registry.xml" role="php" />
- <file md5sum="17d2a14999e1b27f41bd18e186b17c1d" name="PEAR/Command/Registry.php" role="php">
+ <file md5sum="034741c88bef7b1c92d54ce455794a4f" name="PEAR/Command/Registry.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="29c02e823879b4e3e291f6b36fb339f1" name="PEAR/Command/Remote.xml" role="php" />
- <file md5sum="5554fadcaff58b8e5ae47212f886ffd5" name="PEAR/Command/Remote.php" role="php">
+ <file md5sum="a55391003d9ad29467600db1fcc43113" name="PEAR/Command/Remote.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="a50c32015005e0761cc3b04679b29ed0" name="PEAR/Command/Test.xml" role="php" />
- <file md5sum="c16c4e903074889c452a688e70155906" name="PEAR/Command/Test.php" role="php">
+ <file md5sum="42db7eda8715aa7194178624cb26b53a" name="PEAR/Command/Test.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="83140fa3349b06d973f6fd1e16029a3c" name="PEAR/Downloader/Package.php" role="php">
+ <file md5sum="0b3ff65f17d62f534f6693bed15fae4d" name="PEAR/Downloader/Package.php" role="php">
<tasks:replace from="@PEAR-VER@" to="version" type="package-info" />
</file>
- <file md5sum="7ea1b98ead05f4ab87f5c29a98dd2668" name="PEAR/Frontend/CLI.php" role="php">
+ <file md5sum="f4b9edf9424fedbf45f7ac735c8ebd26" name="PEAR/Frontend/CLI.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="e7cc23f09da3a5824edf2af36d776c1a" name="PEAR/Installer/Role/Common.php" role="php">
+ <file md5sum="0e081c9e1ffccde9904e61aeaaf60d71" name="PEAR/Installer/Role/Common.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="d8c62e6275e3aaa7784290912406092c" name="PEAR/Installer/Role/Cfg.xml" role="php" />
- <file md5sum="7db2651b25fc75f1f98c661de113151a" name="PEAR/Installer/Role/Cfg.php" role="php">
+ <file md5sum="be739bdd6d7163dc10fb5d76729c017b" name="PEAR/Installer/Role/Cfg.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="89a4a2a286e842d45a98974f40a0565c" name="PEAR/Installer/Role/Data.xml" role="php" />
- <file md5sum="2e33d055744fea9a7ca5a92bcc26f548" name="PEAR/Installer/Role/Data.php" role="php">
+ <file md5sum="e213b6b24ef779fbf5075e9380f86bd2" name="PEAR/Installer/Role/Data.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="b1ce0fe105251c3b75209d6518ee69ac" name="PEAR/Installer/Role/Doc.xml" role="php" />
- <file md5sum="74ca9bea65232478649bea1ea34506b5" name="PEAR/Installer/Role/Doc.php" role="php">
+ <file md5sum="cbb1e4f1fc51e8af2a48eae136225aa4" name="PEAR/Installer/Role/Doc.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="af71c0ad42d16a323afe24a4f884ef15" name="PEAR/Installer/Role/Ext.xml" role="php" />
- <file md5sum="ae27b5854e7ead2cd779bdeb240ad1d2" name="PEAR/Installer/Role/Ext.php" role="php">
+ <file md5sum="2e4679ad94c986076a540e8b45b347ef" name="PEAR/Installer/Role/Ext.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="ef88f0321d3e481c2130c95122cf76d8" name="PEAR/Installer/Role/Php.xml" role="php" />
- <file md5sum="f0f86659fad9779e1e30045bcda61ed1" name="PEAR/Installer/Role/Php.php" role="php">
+ <file md5sum="9054354283bd5ecba5dac88915b3f434" name="PEAR/Installer/Role/Php.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="746461dc3b48af6d24094cb0211608f2" name="PEAR/Installer/Role/Script.xml" role="php" />
- <file md5sum="466117b0ea5f5bf6e908b73c990ebbc8" name="PEAR/Installer/Role/Script.php" role="php">
+ <file md5sum="f1b4ce343083971fd0c1b61a907e5a9c" name="PEAR/Installer/Role/Script.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="e147d63f168ea156fc2be38caaa63804" name="PEAR/Installer/Role/Src.xml" role="php" />
- <file md5sum="206ed934576b6c5c21b50b1ff306d12c" name="PEAR/Installer/Role/Src.php" role="php">
+ <file md5sum="582701788601cfde7e292af975eb3848" name="PEAR/Installer/Role/Src.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="a24b596ec987aa5688fc19e8ed4e97ea" name="PEAR/Installer/Role/Test.xml" role="php" />
- <file md5sum="433a4a5596adcab73403147cc6e54d25" name="PEAR/Installer/Role/Test.php" role="php">
+ <file md5sum="959d481cbf9e1d9aa3680fbc584f112e" name="PEAR/Installer/Role/Test.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="7641e71c5785bb33a4261ebe25ed0fd7" name="PEAR/Installer/Role/Www.xml" role="php" />
- <file md5sum="ae677650efc29afd38910ea9bd59d639" name="PEAR/Installer/Role/Www.php" role="php">
+ <file md5sum="5b19f05b56a686d063989c4f5a0a0e07" name="PEAR/Installer/Role/Www.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="94b8312236702f8eca3be8707dc1251f" name="PEAR/Installer/Role.php" role="php">
+ <file md5sum="aba6b8460a41418136f8e8372b556c71" name="PEAR/Installer/Role.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="f175c4ee49cb7e045afe24ba6d5eba92" name="PEAR/PackageFile/Generator/v1.php" role="php">
+ <file md5sum="d8a5976e8d4f626bc7156b4b91d21ad9" name="PEAR/PackageFile/Generator/v1.php" role="php">
<tasks:replace from="@PEAR-VER@" to="version" type="package-info" />
</file>
- <file md5sum="dd51a6e63a553c81dc845d7a573a7d11" name="PEAR/PackageFile/Generator/v2.php" role="php">
+ <file md5sum="62bc7985f8aa6009613d431d4e178938" name="PEAR/PackageFile/Generator/v2.php" role="php">
<tasks:replace from="@PEAR-VER@" to="version" type="package-info" />
</file>
- <file md5sum="77bbb9ca7272c5c383cc89ec36325a5c" name="PEAR/PackageFile/Parser/v1.php" role="php">
+ <file md5sum="ff06699490c6f5f464bff5844b94a4fd" name="PEAR/PackageFile/Parser/v1.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="23c8f0128d415b9ac4fe4611c1abbc98" name="PEAR/PackageFile/Parser/v2.php" role="php">
+ <file md5sum="2d14ca94e52e6fe1780976cba1d5d9b0" name="PEAR/PackageFile/Parser/v2.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="638362dfb65a8a9fc4c6f0741dfed23c" name="PEAR/PackageFile/v2/rw.php" role="php">
+ <file md5sum="77f746d2b159bd3891341660cbade99f" name="PEAR/PackageFile/v2/rw.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="7cf09f7848ca951bd329ed997f80023b" name="PEAR/PackageFile/v2/Validator.php" role="php">
+ <file md5sum="bbe251e5dd51c0bd06d155b28416ceec" name="PEAR/PackageFile/v2/Validator.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="f299787f3253226e3dcd9617890e6b08" name="PEAR/PackageFile/v1.php" role="php">
+ <file md5sum="53633cdedaa4cc7e071c8787e06f3e94" name="PEAR/PackageFile/v1.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="c885860fba3f63e64208c83e800591eb" name="PEAR/PackageFile/v2.php" role="php">
+ <file md5sum="7946c18d947ea3906e3c4123114dc809" name="PEAR/PackageFile/v2.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="dd3d0499ec716012df5d0ee23b1ca15c" name="PEAR/REST/10.php" role="php">
+ <file md5sum="f826093d96de84737f72ba9490c1b83f" name="PEAR/REST/10.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="7ea6e541c857cc7f4adefd8a22c966e9" name="PEAR/REST/11.php" role="php">
+ <file md5sum="a6a631f981dd11fc7cc2f6d0d013ac7c" name="PEAR/REST/11.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="8a888a2c87a19f29a2119c0d85f70dfe" name="PEAR/REST/13.php" role="php">
+ <file md5sum="ed8469d24eb5db9d1bdb21b659069330" name="PEAR/REST/13.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="70a0def9d2702fafc7264ddebe61371e" name="PEAR/Task/Postinstallscript/rw.php" role="php">
+ <file md5sum="f20637521dbabcfd002226ec16b8f930" name="PEAR/Task/Postinstallscript/rw.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="ab06ffd12966490c3fa611004fbb39c7" name="PEAR/Task/Replace/rw.php" role="php">
+ <file md5sum="87cdd5863eb6524e83d5d04acb4109ad" name="PEAR/Task/Replace/rw.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="808fe2e996f8769a13bea7c3d8c3f44e" name="PEAR/Task/Unixeol/rw.php" role="php">
+ <file md5sum="d3f4a9c730bc95cae4ae7a672551799e" name="PEAR/Task/Unixeol/rw.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="69a14c62ea963a0133fb22dbeec0e180" name="PEAR/Task/Windowseol/rw.php" role="php">
+ <file md5sum="e1285569c9e8cada94eb1ab7cec8a1f0" name="PEAR/Task/Windowseol/rw.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="a52528bae4b917b48e5ad357b849b86e" name="PEAR/Task/Common.php" role="php">
+ <file md5sum="0638ca7f081fd44198d4d204fb7279a1" name="PEAR/Task/Common.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="39cbcd69ee6e2dd74522db72d58cfff5" name="PEAR/Task/Postinstallscript.php" role="php">
+ <file md5sum="e83344102fb91bb9fb45044b75be01f7" name="PEAR/Task/Postinstallscript.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="2e2b4a18c4075d049eb8928520318f67" name="PEAR/Task/Replace.php" role="php">
+ <file md5sum="2f14c6bcb3b76c3a4e6c5d4a88f859e9" name="PEAR/Task/Replace.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="7aa51b2bcaa180c28dba3fbeb74570ac" name="PEAR/Task/Unixeol.php" role="php">
+ <file md5sum="68ce6647b9206194e983b1347034da09" name="PEAR/Task/Unixeol.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="63211f45fca15875d3ea7fd8e8d9eae8" name="PEAR/Task/Windowseol.php" role="php">
+ <file md5sum="6d22302124aacf7467d1f93fed82e804" name="PEAR/Task/Windowseol.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="423fc3e5caf0a4f93632218404fffedb" name="PEAR/Validator/PECL.php" role="php">
+ <file md5sum="b1510b072b2049d2088f5ebb41fe76a9" name="PEAR/Validator/PECL.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="bf7f19661227aa8ad89e014ee2862038" name="PEAR/Autoloader.php" role="php">
+ <file md5sum="b746dd0ceb528f265446b8eea7f27b01" name="PEAR/Autoloader.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="97e77a9cf47dacd9704bb2dbe43ffe33" name="PEAR/Builder.php" role="php">
+ <file md5sum="8efb582ce47139a3f94378a3130f8925" name="PEAR/Builder.php" role="php">
<tasks:replace from="@PEAR-VER@" to="version" type="package-info" />
</file>
- <file md5sum="abbafd91dc1ed660c2ca2705ca30acd0" name="PEAR/ChannelFile.php" role="php">
+ <file md5sum="e90dc9ca7d61b5a9c1ae2a8873d322b0" name="PEAR/ChannelFile.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="60636aa79628bd58099e130405818b4a" name="PEAR/Command.php" role="php">
+ <file md5sum="ec9ba204a1568833097d3f33336b441e" name="PEAR/Command.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="f2b71f456915b24bdc1c78fd254f2b68" name="PEAR/Common.php" role="php">
+ <file md5sum="fbbdcb7fecc5176e1c54ef8c899aab04" name="PEAR/Common.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="faebce48d29c6ad0f4c2c776d6c98e15" name="PEAR/Config.php" role="php">
+ <file md5sum="6f75e34dc8012651727dfdf612c4c719" name="PEAR/Config.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="644660b5315b448fffeab1202bb5a9eb" name="PEAR/DependencyDB.php" role="php">
+ <file md5sum="6038245772250d490cd7f1e57350fc94" name="PEAR/DependencyDB.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="cf3bfe2f4ccafc3d43f7255cc8e9d548" name="PEAR/Dependency2.php" role="php">
+ <file md5sum="4868fc6df1b0a044c8c2003bd9ac38f1" name="PEAR/Dependency2.php" role="php">
<tasks:replace from="@PEAR-VER@" to="version" type="package-info" />
</file>
- <file md5sum="71b88ecc50194a86eebe10e39f06d0da" name="PEAR/Downloader.php" role="php">
+ <file md5sum="98f1ff8ffd4a44455dfb967dd40ad011" name="PEAR/Downloader.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="5e7a672375619abfeb9d847f247189b7" name="PEAR/ErrorStack.php" role="php">
+ <file md5sum="eeb46279dc45a99da7c8219416e368c6" name="PEAR/ErrorStack.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="d3518fed48c3f04e66fdc4e5694d03c1" name="PEAR/Exception.php" role="php">
+ <file md5sum="1c2d338c329c0b30d71a9814bd9da4af" name="PEAR/Exception.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="bc2c2db4ebcf8ae402eb11a312ad4df2" name="PEAR/FixPHP5PEARWarnings.php" role="php" />
- <file md5sum="1a1f503b27488f70f2acf3dee1ef5f74" name="PEAR/Frontend.php" role="php">
+ <file md5sum="13f09b311368d95941240cd4da4ce11d" name="PEAR/Frontend.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="2c5a03a832216edd5089e22798497d1c" name="PEAR/Installer.php" role="php">
+ <file md5sum="e16d609cadd08d4f53f01d16d7039d84" name="PEAR/Installer.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="9bb788f49f17576f7d31e4929d2538c5" name="PEAR/PackageFile.php" role="php">
+ <file md5sum="2e31ebb5efd17623d19df56bbdcecb53" name="PEAR/PackageFile.php" role="php">
<tasks:replace from="@PEAR-VER@" to="version" type="package-info" />
</file>
- <file md5sum="0b0301ec44dc23728bb9487a084d6dcc" name="PEAR/Packager.php" role="php">
+ <file md5sum="2062fa1ab2bb327b7b083b7e7749cb6f" name="PEAR/Packager.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="9ee69625641852e4074dd46873443305" name="PEAR/Registry.php" role="php">
+ <file md5sum="b424ce71c7e9729bba8647c8f033dbc6" name="PEAR/Registry.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="9798b333d64c37f7fea737565a175c71" name="PEAR/REST.php" role="php">
+ <file md5sum="91edc2153284012f47aff10991ec936b" name="PEAR/REST.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="2671d677a3777079a136f8df384fd466" name="PEAR/RunTest.php" role="php">
+ <file md5sum="abc2f4bc11bbc0b6b3d757204086097a" name="PEAR/RunTest.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="c94597a58ce447e3c9b3005820c2aa3f" name="PEAR/Validate.php" role="php">
+ <file md5sum="050cc7ac75d9dc2ab9f81706887f87d7" name="PEAR/Validate.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="6081c461dfc133a431d6a76cceeb1f7d" name="PEAR/XMLParser.php" role="php">
+ <file md5sum="8f0972c7d4da9b7af28872b2ae739f0b" name="PEAR/XMLParser.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file baseinstalldir="/" md5sum="d888d06143e3cac0dae78bbb2e761366" name="scripts/pear.bat" role="script">
@@ -8942,27 +9044,26 @@ Bug fixes in 1.9.5.dev1:
<tasks:replace from="@include_path@" to="php_dir" type="pear-config" />
<tasks:unixeol />
</file>
- <file baseinstalldir="/" md5sum="179d763fe0203ba4033b1e14416fe940" name="scripts/pearcmd.php" role="php">
+ <file baseinstalldir="/" md5sum="8288caefe63c6f71d631e014fc72007b" name="scripts/pearcmd.php" role="php">
<tasks:replace from="@php_bin@" to="php_bin" type="pear-config" />
<tasks:replace from="@php_dir@" to="php_dir" type="pear-config" />
<tasks:replace from="@pear_version@" to="version" type="package-info" />
<tasks:replace from="@include_path@" to="php_dir" type="pear-config" />
</file>
- <file baseinstalldir="/" md5sum="cbc2a6d0be8f4e5ec725bf8e5222b603" name="scripts/peclcmd.php" role="php">
+ <file baseinstalldir="/" md5sum="dba5ee0eaf5466a2c46682333b1494a2" name="scripts/peclcmd.php" role="php">
<tasks:replace from="@php_bin@" to="php_bin" type="pear-config" />
<tasks:replace from="@php_dir@" to="php_dir" type="pear-config" />
<tasks:replace from="@pear_version@" to="version" type="package-info" />
<tasks:replace from="@include_path@" to="php_dir" type="pear-config" />
</file>
<file md5sum="45b44486d8090de17b2a8b4211fab247" name="LICENSE" role="doc" />
- <file md5sum="8abe476f25fca35378019c9d12bbe757" name="INSTALL" role="doc" />
+ <file md5sum="eaac3d33068c6e67573ed44155b149ae" name="INSTALL" role="doc" />
<file md5sum="4a49bc83a392934e57af45c70a589fda" name="package.dtd" role="data" />
- <file md5sum="1a8f67d58009372a6cbcddd638b128cf" name="PEAR5.php" role="php" />
- <file md5sum="a188d10ae25015b4eba97cecdb9155db" name="PEAR.php" role="php">
+ <file md5sum="23106d502eaf3f2f545b7b8e6baf537d" name="PEAR.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="3f9216552239643c77f06412fae12bd0" name="README" role="doc" />
- <file md5sum="b3750a146f22e8c9fcad0d5373076884" name="System.php" role="php">
+ <file md5sum="26a5d4a6d2cac6e51cd3463dd37cd7e0" name="README.rst" role="doc" />
+ <file md5sum="8c88b101bfb72540109949d0c07c5f0c" name="System.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="acd010e3bc43c0f72df584acde7b9158" name="template.spec" role="data" />
@@ -9546,7 +9647,7 @@ Bug fixes in 1.9.5.dev1:
</release>
</changelog>
</package>
-
+
/**
* The OS_Guess class
*
@@ -9558,7 +9659,6 @@ Bug fixes in 1.9.5.dev1:
* @author Gregory Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since PEAR 0.1
*/
@@ -9647,7 +9747,7 @@ class OS_Guess
var $release;
var $extra;
- function OS_Guess($uname = null)
+ function __construct($uname = null)
{
list($this->sysname,
$this->release,
@@ -9883,7 +9983,8 @@ class OS_Guess
* indent-tabs-mode: nil
* c-basic-offset: 4
* End:
- */
+ */
+
/**
* PEAR_ChannelFile_Parser for parsing channel.xml
*
@@ -9894,7 +9995,6 @@ class OS_Guess
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -9950,7 +10050,7 @@ class PEAR_ChannelFile_Parser extends PEAR_XMLParser
$ret->setPackagefile($file, $archive);
return $ret;
}
-}
+}
<login>
<summary>Connects and authenticates to remote server [Deprecated in favor of channel-login]</summary>
<function>doLogin</function>
@@ -9979,7 +10079,7 @@ Logs out from the remote server. This command does not actually
connect to the remote server, it only deletes the stored username and
password from your user configuration.</doc>
</logout>
-</commands>
+</commands>
/**
* PEAR_Command_Auth (login, logout commands)
*
@@ -9991,7 +10091,6 @@ password from your user configuration.</doc>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
* @deprecated since 1.8.0alpha1
@@ -10055,11 +10154,12 @@ password from your user configuration.',
*
* @access public
*/
- function PEAR_Command_Auth(&$ui, &$config)
+ function __construct(&$ui, &$config)
{
- parent::PEAR_Command_Channels($ui, $config);
+ parent::__construct($ui, $config);
}
-}
+}
+
<build>
<summary>Build an Extension From C Source</summary>
<function>doBuild</function>
@@ -10068,7 +10168,7 @@ password from your user configuration.',
<doc>[package.xml]
Builds one or more extensions contained in a package.</doc>
</build>
-</commands>
+</commands>
/**
* PEAR_Command_Auth (build command)
*
@@ -10081,7 +10181,6 @@ Builds one or more extensions contained in a package.</doc>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -10123,9 +10222,9 @@ Builds one or more extensions contained in a package.'
*
* @access public
*/
- function PEAR_Command_Build(&$ui, &$config)
+ function __construct(&$ui, &$config)
{
- parent::PEAR_Command_Common($ui, $config);
+ parent::__construct($ui, $config);
}
function doBuild($command, $options, $params)
@@ -10152,7 +10251,8 @@ Builds one or more extensions contained in a package.'
$this->ui->outputData(rtrim($data), 'build');
}
}
-}
+}
+
<list-channels>
<summary>List Available Channels</summary>
<function>doList</function>
@@ -10274,7 +10374,7 @@ the default channel is used. This command does not actually connect to the
remote server, it only deletes the stored username and password from your user
configuration.</doc>
</channel-logout>
-</commands>
+</commands>
// /* vim: set expandtab tabstop=4 shiftwidth=4: */
/**
* PEAR_Command_Channels (list-channels, update-channels, channel-delete, channel-add,
@@ -10288,7 +10388,6 @@ configuration.</doc>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -10443,9 +10542,9 @@ configuration.',
*
* @access public
*/
- function PEAR_Command_Channels(&$ui, &$config)
+ function __construct(&$ui, &$config)
{
- parent::PEAR_Command_Common($ui, $config);
+ parent::__construct($ui, $config);
}
function _sortChannels($a, $b)
@@ -11156,7 +11255,8 @@ configuration.',
$this->config->store();
return true;
}
-}
+}
+
/**
* PEAR_Command_Common base class
*
@@ -11168,7 +11268,6 @@ configuration.',
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -11239,9 +11338,9 @@ class PEAR_Command_Common extends PEAR
*
* @access public
*/
- function PEAR_Command_Common(&$ui, &$config)
+ function __construct(&$ui, &$config)
{
- parent::PEAR();
+ parent::__construct();
$this->config = &$config;
$this->ui = &$ui;
}
@@ -11428,7 +11527,8 @@ class PEAR_Command_Common extends PEAR
return $this->$func($command, $options, $params);
}
-}
+}
+
<config-show>
<summary>Show All Settings</summary>
<function>doConfigShow</function>
@@ -11519,7 +11619,7 @@ PEAR installation (using the --remoteconfig option of install, upgrade,
and uninstall).
</doc>
</config-create>
-</commands>
+</commands>
/**
* PEAR_Command_Config (config-show, config-get, config-set, config-help, config-create commands)
*
@@ -11531,7 +11631,6 @@ and uninstall).
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -11654,9 +11753,9 @@ and uninstall).
*
* @access public
*/
- function PEAR_Command_Config(&$ui, &$config)
+ function __construct(&$ui, &$config)
{
- parent::PEAR_Command_Common($ui, $config);
+ parent::__construct($ui, $config);
}
function doConfigShow($command, $options, $params)
@@ -11932,7 +12031,8 @@ and uninstall).
return false;
}
-}
+}
+
<install>
<summary>Install Package</summary>
<function>doInstall</function>
@@ -12207,7 +12307,7 @@ package if needed.
Run post-installation scripts in package &lt;package&gt;, if any exist.
</doc>
</run-scripts>
-</commands>
+</commands>
/**
* PEAR_Command_Install (install, upgrade, upgrade-all, uninstall, bundle, run-scripts commands)
*
@@ -12219,7 +12319,6 @@ Run post-installation scripts in package &lt;package&gt;, if any exist.
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -12522,9 +12621,9 @@ Run post-installation scripts in package <package>, if any exist.
*
* @access public
*/
- function PEAR_Command_Install(&$ui, &$config)
+ function __construct(&$ui, &$config)
{
- parent::PEAR_Command_Common($ui, $config);
+ parent::__construct($ui, $config);
}
// }}}
@@ -12979,18 +13078,7 @@ Run post-installation scripts in package <package>, if any exist.
$exttype = 'extension';
$extpath = $pinfo[1]['basename'];
} else {
- if (version_compare(PHP_VERSION, '5.3.0', '<')) {
- ob_start();
- phpinfo(INFO_GENERAL);
- $info = ob_get_contents();
- ob_end_clean();
- $debug = function_exists('leak') ? '_debug' : '';
- $ts = preg_match('/Thread Safety.+enabled/', $info) ? '_ts' : '';
- } else {
- $debug = '';
- $ts = '';
- }
- $exttype = 'zend_extension' . $debug . $ts;
+ $exttype = 'zend_extension';
$extpath = $atts['installed_as'];
}
$extrainfo[] = 'You should add "' . $exttype . '=' .
@@ -13482,7 +13570,7 @@ Run post-installation scripts in package <package>, if any exist.
return $ret;
}
}
-PEAR-1.9.5/PEAR/Command/Mirror.xml
+
<download-all>
<summary>Downloads each available package from the default channel</summary>
<function>doDownloadAll</function>
@@ -13499,7 +13587,7 @@ Requests a list of available packages from the default channel ({config default_
and downloads them to current working directory. Note: only
packages within preferred_state ({config preferred_state}) will be downloaded</doc>
</download-all>
-</commands>
+</commands>
/**
* PEAR_Command_Mirror (download-all command)
*
@@ -13510,7 +13598,6 @@ packages within preferred_state ({config preferred_state}) will be downloaded</d
* @author Alexander Merz <alexmerz@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.2.0
*/
@@ -13561,9 +13648,9 @@ packages within preferred_state ({config preferred_state}) will be downloaded'
* @param object PEAR_Frontend a reference to an frontend
* @param object PEAR_Config a reference to the configuration data
*/
- function PEAR_Command_Mirror(&$ui, &$config)
+ function __construct(&$ui, &$config)
{
- parent::PEAR_Command_Common($ui, $config);
+ parent::__construct($ui, $config);
}
/**
@@ -13637,7 +13724,8 @@ packages within preferred_state ({config preferred_state}) will be downloaded'
return true;
}
-}
+}
+
<package>
<summary>Build Package</summary>
<function>doPackage</function>
@@ -13873,7 +13961,7 @@ This is not the most intelligent conversion, and should only be
used for automated conversion or learning the format.
</doc>
</convert>
-</commands>
+</commands>
/**
* PEAR_Command_Package (package, package-validate, cvsdiff, cvstag, package-dependencies,
* sign, makerpm, convert commands)
@@ -13887,7 +13975,6 @@ used for automated conversion or learning the format.
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -14158,9 +14245,9 @@ used for automated conversion or learning the format.
*
* @access public
*/
- function PEAR_Command_Package(&$ui, &$config)
+ function __construct(&$ui, &$config)
{
- parent::PEAR_Command_Common($ui, $config);
+ parent::__construct($ui, $config);
}
function _displayValidationResults($err, $warn, $strict = false)
@@ -14997,7 +15084,7 @@ used for automated conversion or learning the format.
return true;
}
}
-
+
<pickle>
<summary>Build PECL Package</summary>
<function>doPackage</function>
@@ -15032,7 +15119,7 @@ uses any of these features, you are best off using PEAR_PackageFileManager to
generate both package.xml.
</doc>
</pickle>
-</commands>
+</commands>
/**
* PEAR_Command_Pickle (pickle command)
*
@@ -15043,7 +15130,6 @@ generate both package.xml.
* @author Greg Beaver <cellog@php.net>
* @copyright 2005-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.1
*/
@@ -15110,9 +15196,9 @@ generate both package.xml.
*
* @access public
*/
- function PEAR_Command_Pickle(&$ui, &$config)
+ function __construct(&$ui, &$config)
{
- parent::PEAR_Command_Common($ui, $config);
+ parent::__construct($ui, $config);
}
/**
@@ -15452,7 +15538,8 @@ generate both package.xml.
$gen = &$pf->getDefaultGenerator();
$gen->toPackageFile('.');
}
-}
+}
+
<list>
<summary>List Installed Packages In The Default Channel</summary>
<function>doList</function>
@@ -15509,7 +15596,7 @@ Displays information about a package. The package argument may be a
local package file, an URL to a package file, or the name of an
installed package.</doc>
</info>
-</commands>
+</commands>
/**
* PEAR_Command_Registry (list, list-files, shell-test, info commands)
*
@@ -15521,7 +15608,6 @@ installed package.</doc>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -15609,9 +15695,9 @@ installed package.'
*
* @access public
*/
- function PEAR_Command_Registry(&$ui, &$config)
+ function __construct(&$ui, &$config)
{
- parent::PEAR_Command_Common($ui, $config);
+ parent::__construct($ui, $config);
}
function _sortinfo($a, $b)
@@ -16653,7 +16739,8 @@ installed package.'
$data['raw'] = $obj->getArray(); // no validation needed
$this->ui->outputData($data, 'package-info');
}
-}
+}
+
<remote-info>
<summary>Information About Remote Packages</summary>
<function>doRemoteInfo</function>
@@ -16761,7 +16848,7 @@ Clear the XML-RPC/REST cache. See also the cache_ttl configuration
parameter.
</doc>
</clear-cache>
-</commands>
+</commands>
/**
* PEAR_Command_Remote (remote-info, list-upgrades, remote-list, search, list-all, download,
* clear-cache commands)
@@ -16774,7 +16861,6 @@ parameter.
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -16918,9 +17004,9 @@ parameter.
*
* @access public
*/
- function PEAR_Command_Remote(&$ui, &$config)
+ function __construct(&$ui, &$config)
{
- parent::PEAR_Command_Common($ui, $config);
+ parent::__construct($ui, $config);
}
function _checkChannelForStatus($channel, $chan)
@@ -17570,7 +17656,8 @@ parameter.
$this->ui->outputData(rtrim($output), $command);
return $num;
}
-}
+}
+
<run-tests>
<summary>Run Regression Tests</summary>
<function>doRunTests</function>
@@ -17623,7 +17710,7 @@ If none is found, all .phpt tests will be tried instead.</doc>
<doc>[testfile|dir ...]
Run regression tests with PHP&#039;s regression testing script (run-tests.php).</doc>
</run-tests>
-</commands>
+</commands>
/**
* PEAR_Command_Test (run-tests)
*
@@ -17636,7 +17723,6 @@ Run regression tests with PHP&#039;s regression testing script (run-tests.php).<
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -17712,6 +17798,10 @@ If none is found, all .phpt tests will be tried instead.',
'shortopt' => 'x',
'doc' => 'Generate a code coverage report (requires Xdebug 2.0.0+)',
),
+ 'showdiff' => array(
+ 'shortopt' => 'd',
+ 'doc' => 'Output diff on test failure',
+ ),
),
'doc' => '[testfile|dir ...]
Run regression tests with PHP\'s regression testing script (run-tests.php).',
@@ -17725,9 +17815,9 @@ Run regression tests with PHP\'s regression testing script (run-tests.php).',
*
* @access public
*/
- function PEAR_Command_Test(&$ui, &$config)
+ function __construct(&$ui, &$config)
{
- parent::PEAR_Command_Common($ui, $config);
+ parent::__construct($ui, $config);
}
function doRunTests($command, $options, $params)
@@ -17962,7 +18052,8 @@ Run regression tests with PHP\'s regression testing script (run-tests.php).',
}
return $this->raiseError('Some tests failed');
}
-}
+}
+
/**
* PEAR_Downloader_Package
*
@@ -17973,7 +18064,6 @@ Run regression tests with PHP\'s regression testing script (run-tests.php).',
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -18094,7 +18184,7 @@ class PEAR_Downloader_Package
/**
* @param PEAR_Downloader
*/
- function PEAR_Downloader_Package(&$downloader)
+ function __construct(&$downloader)
{
$this->_downloader = &$downloader;
$this->_config = &$this->_downloader->config;
@@ -19947,7 +20037,8 @@ class PEAR_Downloader_Package
return $info;
}
-}
+}
+
/**
* PEAR_Frontend_CLI
*
@@ -19959,7 +20050,6 @@ class PEAR_Downloader_Package
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -19996,9 +20086,9 @@ class PEAR_Frontend_CLI extends PEAR_Frontend
'normal' => '',
);
- function PEAR_Frontend_CLI()
+ function __construct()
{
- parent::PEAR();
+ parent::__construct();
$term = getenv('TERM'); //(cox) $_ENV is empty for me in 4.1.1
if (function_exists('posix_isatty') && !posix_isatty(1)) {
// output is being redirected to a file or through a pipe
@@ -20697,7 +20787,8 @@ class PEAR_Frontend_CLI extends PEAR_Frontend
{
print $text;
}
-}
+}
+
/**
* Base class for all installation roles.
*
@@ -20708,7 +20799,6 @@ class PEAR_Frontend_CLI extends PEAR_Frontend
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -20738,7 +20828,7 @@ class PEAR_Installer_Role_Common
/**
* @param PEAR_Config
*/
- function PEAR_Installer_Role_Common(&$config)
+ function __construct(&$config)
{
$this->config = $config;
}
@@ -20870,7 +20960,8 @@ class PEAR_Installer_Role_Common
return $roleInfo['phpextension'];
}
}
-?>
+?>
+
<releasetypes>php</releasetypes>
<releasetypes>extsrc</releasetypes>
<releasetypes>extbin</releasetypes>
@@ -20884,7 +20975,7 @@ class PEAR_Installer_Role_Common
<executable />
<phpextension />
<config_vars />
-</role>
+</role>
/**
* PEAR_Installer_Role_Cfg
*
@@ -20895,7 +20986,6 @@ class PEAR_Installer_Role_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 2007-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.7.0
*/
@@ -20989,7 +21079,7 @@ class PEAR_Installer_Role_Cfg extends PEAR_Installer_Role_Common
return $test;
}
-}
+}
<releasetypes>php</releasetypes>
<releasetypes>extsrc</releasetypes>
<releasetypes>extbin</releasetypes>
@@ -21003,7 +21093,7 @@ class PEAR_Installer_Role_Cfg extends PEAR_Installer_Role_Common
<executable />
<phpextension />
<config_vars />
-</role>
+</role>
/**
* PEAR_Installer_Role_Data
*
@@ -21014,7 +21104,6 @@ class PEAR_Installer_Role_Cfg extends PEAR_Installer_Role_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -21030,7 +21119,7 @@ class PEAR_Installer_Role_Cfg extends PEAR_Installer_Role_Common
* @since Class available since Release 1.4.0a1
*/
class PEAR_Installer_Role_Data extends PEAR_Installer_Role_Common {}
-?>
+?>
<releasetypes>php</releasetypes>
<releasetypes>extsrc</releasetypes>
<releasetypes>extbin</releasetypes>
@@ -21044,7 +21133,7 @@ class PEAR_Installer_Role_Data extends PEAR_Installer_Role_Common {}
<executable />
<phpextension />
<config_vars />
-</role>
+</role>
/**
* PEAR_Installer_Role_Doc
*
@@ -21055,7 +21144,6 @@ class PEAR_Installer_Role_Data extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -21071,7 +21159,7 @@ class PEAR_Installer_Role_Data extends PEAR_Installer_Role_Common {}
* @since Class available since Release 1.4.0a1
*/
class PEAR_Installer_Role_Doc extends PEAR_Installer_Role_Common {}
-?>
+?>
<releasetypes>extbin</releasetypes>
<releasetypes>zendextbin</releasetypes>
<installable>1</installable>
@@ -21082,7 +21170,7 @@ class PEAR_Installer_Role_Doc extends PEAR_Installer_Role_Common {}
<executable />
<phpextension>1</phpextension>
<config_vars />
-</role>
+</role>
/**
* PEAR_Installer_Role_Ext
*
@@ -21093,7 +21181,6 @@ class PEAR_Installer_Role_Doc extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -21109,7 +21196,7 @@ class PEAR_Installer_Role_Doc extends PEAR_Installer_Role_Common {}
* @since Class available since Release 1.4.0a1
*/
class PEAR_Installer_Role_Ext extends PEAR_Installer_Role_Common {}
-?>
+?>
<releasetypes>php</releasetypes>
<releasetypes>extsrc</releasetypes>
<releasetypes>extbin</releasetypes>
@@ -21123,7 +21210,7 @@ class PEAR_Installer_Role_Ext extends PEAR_Installer_Role_Common {}
<executable />
<phpextension />
<config_vars />
-</role>
+</role>
/**
* PEAR_Installer_Role_Php
*
@@ -21134,7 +21221,6 @@ class PEAR_Installer_Role_Ext extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -21150,7 +21236,7 @@ class PEAR_Installer_Role_Ext extends PEAR_Installer_Role_Common {}
* @since Class available since Release 1.4.0a1
*/
class PEAR_Installer_Role_Php extends PEAR_Installer_Role_Common {}
-?>
+?>
<releasetypes>php</releasetypes>
<releasetypes>extsrc</releasetypes>
<releasetypes>extbin</releasetypes>
@@ -21164,7 +21250,7 @@ class PEAR_Installer_Role_Php extends PEAR_Installer_Role_Common {}
<executable>1</executable>
<phpextension />
<config_vars />
-</role>
+</role>
/**
* PEAR_Installer_Role_Script
*
@@ -21175,7 +21261,6 @@ class PEAR_Installer_Role_Php extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -21191,7 +21276,7 @@ class PEAR_Installer_Role_Php extends PEAR_Installer_Role_Common {}
* @since Class available since Release 1.4.0a1
*/
class PEAR_Installer_Role_Script extends PEAR_Installer_Role_Common {}
-?>
+?>
<releasetypes>extsrc</releasetypes>
<releasetypes>zendextsrc</releasetypes>
<installable>1</installable>
@@ -21202,7 +21287,7 @@ class PEAR_Installer_Role_Script extends PEAR_Installer_Role_Common {}
<executable />
<phpextension />
<config_vars />
-</role>
+</role>
/**
* PEAR_Installer_Role_Src
*
@@ -21213,7 +21298,6 @@ class PEAR_Installer_Role_Script extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -21235,7 +21319,7 @@ class PEAR_Installer_Role_Src extends PEAR_Installer_Role_Common
$installer->source_files++;
}
}
-?>
+?>
<releasetypes>php</releasetypes>
<releasetypes>extsrc</releasetypes>
<releasetypes>extbin</releasetypes>
@@ -21249,7 +21333,7 @@ class PEAR_Installer_Role_Src extends PEAR_Installer_Role_Common
<executable />
<phpextension />
<config_vars />
-</role>
+</role>
/**
* PEAR_Installer_Role_Test
*
@@ -21260,7 +21344,6 @@ class PEAR_Installer_Role_Src extends PEAR_Installer_Role_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -21276,7 +21359,7 @@ class PEAR_Installer_Role_Src extends PEAR_Installer_Role_Common
* @since Class available since Release 1.4.0a1
*/
class PEAR_Installer_Role_Test extends PEAR_Installer_Role_Common {}
-?>
+?>
<releasetypes>php</releasetypes>
<releasetypes>extsrc</releasetypes>
<releasetypes>extbin</releasetypes>
@@ -21290,7 +21373,7 @@ class PEAR_Installer_Role_Test extends PEAR_Installer_Role_Common {}
<executable />
<phpextension />
<config_vars />
-</role>
+</role>
/**
* PEAR_Installer_Role_Www
*
@@ -21301,7 +21384,6 @@ class PEAR_Installer_Role_Test extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 2007-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.7.0
*/
@@ -21317,7 +21399,7 @@ class PEAR_Installer_Role_Test extends PEAR_Installer_Role_Common {}
* @since Class available since Release 1.7.0
*/
class PEAR_Installer_Role_Www extends PEAR_Installer_Role_Common {}
-?>
+?>
/**
* PEAR_Installer_Role
*
@@ -21328,7 +21410,6 @@ class PEAR_Installer_Role_Www extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -21592,7 +21673,7 @@ class PEAR_Installer_Role
PEAR_Installer_Role::getValidRoles('****', true);
return true;
}
-}
+}
/**
* package.xml generation class, package.xml version 1.0
*
@@ -21603,7 +21684,6 @@ class PEAR_Installer_Role
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -21633,7 +21713,7 @@ class PEAR_PackageFile_Generator_v1
* @var PEAR_PackageFile_v1
*/
var $_packagefile;
- function PEAR_PackageFile_Generator_v1(&$packagefile)
+ function __construct(&$packagefile)
{
$this->_packagefile = &$packagefile;
}
@@ -21762,9 +21842,6 @@ class PEAR_PackageFile_Generator_v1
*/
function _fixXmlEncoding($string)
{
- if (version_compare(phpversion(), '5.0.0', 'lt')) {
- $string = utf8_encode($string);
- }
return strtr($string, array(
'&' => '&amp;',
'>' => '&gt;',
@@ -22875,7 +22952,8 @@ class PEAR_PackageFile_Generator_v1
return $ret;
}
}
-?>
+?>
+
/**
* package.xml generation class, package.xml version 2.0
*
@@ -22887,7 +22965,6 @@ class PEAR_PackageFile_Generator_v1
* @author Stephan Schmidt (original XML_Serializer code)
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -22977,7 +23054,7 @@ http://pear.php.net/dtd/package-2.0.xsd',
/**
* @param PEAR_PackageFile_v2
*/
- function PEAR_PackageFile_Generator_v2(&$packagefile)
+ function __construct(&$packagefile)
{
$this->_packagefile = &$packagefile;
if (isset($this->_packagefile->encoding)) {
@@ -23746,12 +23823,6 @@ http://pear.php.net/dtd/package-2.0.xsd',
}
if (is_scalar($tag['content']) || is_null($tag['content'])) {
- if ($this->options['encoding'] == 'UTF-8' &&
- version_compare(phpversion(), '5.0.0', 'lt')
- ) {
- $tag['content'] = utf8_encode($tag['content']);
- }
-
if ($replaceEntities === true) {
$replaceEntities = XML_UTIL_ENTITIES_XML;
}
@@ -23768,7 +23839,7 @@ http://pear.php.net/dtd/package-2.0.xsd',
return $tag;
}
}
-
+
/**
* package.xml parsing class, package.xml version 1.0
*
@@ -23779,7 +23850,6 @@ http://pear.php.net/dtd/package-2.0.xsd',
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -24226,7 +24296,7 @@ class PEAR_PackageFile_Parser_v1
// }}}
}
-?>
+?>
/**
* package.xml parsing class, package.xml version 2.0
*
@@ -24237,7 +24307,6 @@ class PEAR_PackageFile_Parser_v1
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -24338,7 +24407,7 @@ class PEAR_PackageFile_Parser_v2 extends PEAR_XMLParser
$ret->setPackagefile($file, $archive);
return $ret;
}
-}
+}
/**
* PEAR_PackageFile_v2, package.xml version 2.0, read/write version
*
@@ -24349,7 +24418,6 @@ class PEAR_PackageFile_Parser_v2 extends PEAR_XMLParser
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a8
*/
@@ -25941,7 +26009,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
{
unset($this->_packageInfo['changelog']);
}
-}
+}
/**
* PEAR_PackageFile_v2, package.xml version 2.0, read/write version
*
@@ -25952,7 +26020,6 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a8
*/
@@ -27924,25 +27991,6 @@ class PEAR_PackageFile_v2_Validator
$look_for = $token;
continue 2;
case T_STRING:
- if (version_compare(zend_version(), '2.0', '<')) {
- if (in_array(strtolower($data),
- array('public', 'private', 'protected', 'abstract',
- 'interface', 'implements', 'throw')
- )
- ) {
- if (isset($this->_stack)) {
- $this->_stack->push(__FUNCTION__, 'warning', array(
- 'file' => $file),
- 'Error, PHP5 token encountered in %file%,' .
- ' analysis should be in PHP5');
- } else {
- PEAR::raiseError('Error: PHP5 token encountered in ' . $file .
- 'packaging should be done in PHP 5');
- return false;
- }
- }
- }
-
if ($look_for == T_CLASS) {
$current_class = $data;
$current_class_level = $brace_level;
@@ -28096,7 +28144,7 @@ class PEAR_PackageFile_v2_Validator
return $providesret;
}
}
-
+
/**
* PEAR_PackageFile_v1, package.xml version 1.0
*
@@ -28107,7 +28155,6 @@ class PEAR_PackageFile_v2_Validator
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -28444,7 +28491,7 @@ class PEAR_PackageFile_v1
* @param bool determines whether to return a PEAR_Error object, or use the PEAR_ErrorStack
* @param string Name of Error Stack class to use.
*/
- function PEAR_PackageFile_v1()
+ function __construct()
{
$this->_stack = new PEAR_ErrorStack('PEAR_PackageFile_v1');
$this->_stack->setErrorMessageTemplate($this->_getErrorMessage());
@@ -29564,15 +29611,6 @@ class PEAR_PackageFile_v1
$look_for = $token;
continue 2;
case T_STRING:
- if (version_compare(zend_version(), '2.0', '<')) {
- if (in_array(strtolower($data),
- array('public', 'private', 'protected', 'abstract',
- 'interface', 'implements', 'throw')
- )) {
- $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_PHP5,
- array($file));
- }
- }
if ($look_for == T_CLASS) {
$current_class = $data;
$current_class_level = $brace_level;
@@ -29708,7 +29746,7 @@ class PEAR_PackageFile_v1
// }}}
}
?>
-
+
/**
* PEAR_PackageFile_v2, package.xml version 2.0
*
@@ -29719,7 +29757,6 @@ class PEAR_PackageFile_v1
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -29839,7 +29876,7 @@ class PEAR_PackageFile_v2
/**
* The constructor merely sets up the private error stack
*/
- function PEAR_PackageFile_v2()
+ function __construct()
{
$this->_stack = new PEAR_ErrorStack('PEAR_PackageFile_v2', false, null);
$this->_isValid = false;
@@ -30887,6 +30924,9 @@ class PEAR_PackageFile_v2
$contents['dir']['file'] = array($contents['dir']['file']);
}
foreach ($contents['dir']['file'] as $file) {
+ if (!isset($file['attribs']['name'])) {
+ continue;
+ }
$name = $file['attribs']['name'];
if (!$preserve) {
$file = $file['attribs'];
@@ -31757,7 +31797,7 @@ class PEAR_PackageFile_v2
}
}
?>
-
+
/**
* PEAR_REST_10
*
@@ -31768,7 +31808,6 @@ class PEAR_PackageFile_v2
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a12
*/
@@ -31796,7 +31835,7 @@ class PEAR_REST_10
* @var PEAR_REST
*/
var $_rest;
- function PEAR_REST_10($config, $options = array())
+ function __construct($config, $options = array())
{
$this->_rest = new PEAR_REST($config, $options);
}
@@ -32627,7 +32666,8 @@ class PEAR_REST_10
return 1;
}
}
-}
+}
+
/**
* PEAR_REST_11 - implement faster list-all/remote-list command
*
@@ -32638,7 +32678,6 @@ class PEAR_REST_10
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.3
*/
@@ -32667,7 +32706,7 @@ class PEAR_REST_11
*/
var $_rest;
- function PEAR_REST_11($config, $options = array())
+ function __construct($config, $options = array())
{
$this->_rest = new PEAR_REST($config, $options);
}
@@ -32967,7 +33006,8 @@ class PEAR_REST_11
return array_slice($states, $i + 1);
}
}
-?>PEAR-1.9.5/PEAR/REST/13.php
+?>
+
/**
* PEAR_REST_13
*
@@ -32978,7 +33018,6 @@ class PEAR_REST_11
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a12
*/
@@ -33265,20 +33304,19 @@ class PEAR_REST_13 extends PEAR_REST_10
return $this->_returnDownloadURL($base, $package, $release, $info, $found, $skippedphp, $channel);
}
-}
+}
/**
* <tasks:postinstallscript> - read/write version
*
* PHP versions 4 and 5
*
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a10
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @link http://pear.php.net/package/PEAR
+ * @since File available since Release 1.4.0a10
*/
/**
* Base class
@@ -33302,30 +33340,31 @@ class PEAR_Task_Postinstallscript_rw extends PEAR_Task_Postinstallscript
*
* @var PEAR_PackageFile_v2_rw
*/
- var $_pkg;
+ public $_pkg;
/**
* Enter description here...
*
- * @param PEAR_PackageFile_v2_rw $pkg
- * @param PEAR_Config $config
- * @param PEAR_Frontend $logger
- * @param array $fileXml
+ * @param PEAR_PackageFile_v2_rw $pkg Package
+ * @param PEAR_Config $config Config
+ * @param PEAR_Frontend $logger Logger
+ * @param array $fileXml XML
+ *
* @return PEAR_Task_Postinstallscript_rw
*/
- function PEAR_Task_Postinstallscript_rw(&$pkg, &$config, &$logger, $fileXml)
+ function __construct(&$pkg, &$config, &$logger, $fileXml)
{
- parent::PEAR_Task_Common($config, $logger, PEAR_TASK_PACKAGE);
+ parent::__construct($config, $logger, PEAR_TASK_PACKAGE);
$this->_contents = $fileXml;
$this->_pkg = &$pkg;
$this->_params = array();
}
- function validate()
+ public function validate()
{
return $this->validateXml($this->_pkg, $this->_params, $this->config, $this->_contents);
}
- function getName()
+ public function getName()
{
return 'postinstallscript';
}
@@ -33340,30 +33379,31 @@ class PEAR_Task_Postinstallscript_rw extends PEAR_Task_Postinstallscript
*
* Use {@link addConditionTypeGroup()} to add a <paramgroup> containing
* a <conditiontype> tag
- * @param string $id <paramgroup> id as seen by the script
- * @param array|false $params array of getParam() calls, or false for no params
+ *
+ * @param string $id <paramgroup> id as seen by the script
+ * @param array|false $params array of getParam() calls, or false for no params
* @param string|false $instructions
*/
- function addParamGroup($id, $params = false, $instructions = false)
+ public function addParamGroup($id, $params = false, $instructions = false)
{
if ($params && isset($params[0]) && !isset($params[1])) {
$params = $params[0];
}
$stuff =
array(
- $this->_pkg->getTasksNs() . ':id' => $id,
+ $this->_pkg->getTasksNs().':id' => $id,
);
if ($instructions) {
- $stuff[$this->_pkg->getTasksNs() . ':instructions'] = $instructions;
+ $stuff[$this->_pkg->getTasksNs().':instructions'] = $instructions;
}
if ($params) {
- $stuff[$this->_pkg->getTasksNs() . ':param'] = $params;
+ $stuff[$this->_pkg->getTasksNs().':param'] = $params;
}
- $this->_params[$this->_pkg->getTasksNs() . ':paramgroup'][] = $stuff;
+ $this->_params[$this->_pkg->getTasksNs().':paramgroup'][] = $stuff;
}
/**
- * add a complex <paramgroup> to the post-install script with conditions
+ * Add a complex <paramgroup> to the post-install script with conditions
*
* This inserts a <paramgroup> with
*
@@ -33374,79 +33414,91 @@ class PEAR_Task_Postinstallscript_rw extends PEAR_Task_Postinstallscript
*
* Use {@link addParamGroup()} to add a simple <paramgroup>
*
- * @param string $id <paramgroup> id as seen by the script
- * @param string $oldgroup <paramgroup> id of the section referenced by
- * <conditiontype>
- * @param string $param name of the <param> from the older section referenced
- * by <contitiontype>
- * @param string $value value to match of the parameter
- * @param string $conditiontype one of '=', '!=', 'preg_match'
- * @param array|false $params array of getParam() calls, or false for no params
+ * @param string $id <paramgroup> id as seen by the script
+ * @param string $oldgroup <paramgroup> id of the section referenced by
+ * <conditiontype>
+ * @param string $param name of the <param> from the older section referenced
+ * by <contitiontype>
+ * @param string $value value to match of the parameter
+ * @param string $conditiontype one of '=', '!=', 'preg_match'
+ * @param array|false $params array of getParam() calls, or false for no params
* @param string|false $instructions
*/
- function addConditionTypeGroup($id, $oldgroup, $param, $value, $conditiontype = '=',
- $params = false, $instructions = false)
- {
+ public function addConditionTypeGroup($id,
+ $oldgroup,
+ $param,
+ $value,
+ $conditiontype = '=',
+ $params = false,
+ $instructions = false
+ ) {
if ($params && isset($params[0]) && !isset($params[1])) {
$params = $params[0];
}
$stuff = array(
- $this->_pkg->getTasksNs() . ':id' => $id,
+ $this->_pkg->getTasksNs().':id' => $id,
);
if ($instructions) {
- $stuff[$this->_pkg->getTasksNs() . ':instructions'] = $instructions;
+ $stuff[$this->_pkg->getTasksNs().':instructions'] = $instructions;
}
- $stuff[$this->_pkg->getTasksNs() . ':name'] = $oldgroup . '::' . $param;
- $stuff[$this->_pkg->getTasksNs() . ':conditiontype'] = $conditiontype;
- $stuff[$this->_pkg->getTasksNs() . ':value'] = $value;
+ $stuff[$this->_pkg->getTasksNs().':name'] = $oldgroup.'::'.$param;
+ $stuff[$this->_pkg->getTasksNs().':conditiontype'] = $conditiontype;
+ $stuff[$this->_pkg->getTasksNs().':value'] = $value;
if ($params) {
- $stuff[$this->_pkg->getTasksNs() . ':param'] = $params;
+ $stuff[$this->_pkg->getTasksNs().':param'] = $params;
}
- $this->_params[$this->_pkg->getTasksNs() . ':paramgroup'][] = $stuff;
+ $this->_params[$this->_pkg->getTasksNs().':paramgroup'][] = $stuff;
}
- function getXml()
+ public function getXml()
{
return $this->_params;
}
/**
* Use to set up a param tag for use in creating a paramgroup
+ *
+ * @param mixed $name Name of parameter
+ * @param mixed $prompt Prompt
+ * @param string $type Type, defaults to 'string'
+ * @param mixed $default Default value
+ *
* @static
+ * @return array
*/
- function getParam($name, $prompt, $type = 'string', $default = null)
+ public function getParam($name, $prompt, $type = 'string', $default = null)
{
if ($default !== null) {
return
array(
- $this->_pkg->getTasksNs() . ':name' => $name,
- $this->_pkg->getTasksNs() . ':prompt' => $prompt,
- $this->_pkg->getTasksNs() . ':type' => $type,
- $this->_pkg->getTasksNs() . ':default' => $default
+ $this->_pkg->getTasksNs().':name' => $name,
+ $this->_pkg->getTasksNs().':prompt' => $prompt,
+ $this->_pkg->getTasksNs().':type' => $type,
+ $this->_pkg->getTasksNs().':default' => $default,
);
}
+
return
array(
- $this->_pkg->getTasksNs() . ':name' => $name,
- $this->_pkg->getTasksNs() . ':prompt' => $prompt,
- $this->_pkg->getTasksNs() . ':type' => $type,
+ $this->_pkg->getTasksNs().':name' => $name,
+ $this->_pkg->getTasksNs().':prompt' => $prompt,
+ $this->_pkg->getTasksNs().':type' => $type,
);
}
}
-?>
+
/**
* <tasks:replace> - read/write version
*
* PHP versions 4 and 5
*
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a10
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @link http://pear.php.net/package/PEAR
+ * @since File available since Release 1.4.0a10
*/
/**
* Base class
@@ -33465,48 +33517,47 @@ require_once 'PEAR/Task/Replace.php';
*/
class PEAR_Task_Replace_rw extends PEAR_Task_Replace
{
- function PEAR_Task_Replace_rw(&$pkg, &$config, &$logger, $fileXml)
+ public function __construct(&$pkg, &$config, &$logger, $fileXml)
{
- parent::PEAR_Task_Common($config, $logger, PEAR_TASK_PACKAGE);
+ parent::__construct($config, $logger, PEAR_TASK_PACKAGE);
$this->_contents = $fileXml;
$this->_pkg = &$pkg;
$this->_params = array();
}
- function validate()
+ public function validate()
{
return $this->validateXml($this->_pkg, $this->_params, $this->config, $this->_contents);
}
- function setInfo($from, $to, $type)
+ public function setInfo($from, $to, $type)
{
$this->_params = array('attribs' => array('from' => $from, 'to' => $to, 'type' => $type));
}
- function getName()
+ public function getName()
{
return 'replace';
}
- function getXml()
+ public function getXml()
{
return $this->_params;
}
}
-?>
+
/**
* <tasks:unixeol> - read/write version
*
* PHP versions 4 and 5
*
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a10
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @link http://pear.php.net/package/PEAR
+ * @since File available since Release 1.4.0a10
*/
/**
* Base class
@@ -33525,43 +33576,43 @@ require_once 'PEAR/Task/Unixeol.php';
*/
class PEAR_Task_Unixeol_rw extends PEAR_Task_Unixeol
{
- function PEAR_Task_Unixeol_rw(&$pkg, &$config, &$logger, $fileXml)
+ function __construct(&$pkg, &$config, &$logger, $fileXml)
{
- parent::PEAR_Task_Common($config, $logger, PEAR_TASK_PACKAGE);
+ parent::__construct($config, $logger, PEAR_TASK_PACKAGE);
$this->_contents = $fileXml;
$this->_pkg = &$pkg;
$this->_params = array();
}
- function validate()
+ public function validate()
{
return true;
}
- function getName()
+ public function getName()
{
return 'unixeol';
}
- function getXml()
+ public function getXml()
{
return '';
}
}
-?>
+?>
+
/**
* <tasks:windowseol> - read/write version
*
* PHP versions 4 and 5
*
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a10
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @link http://pear.php.net/package/PEAR
+ * @since File available since Release 1.4.0a10
*/
/**
* Base class
@@ -33569,54 +33620,55 @@ class PEAR_Task_Unixeol_rw extends PEAR_Task_Unixeol
require_once 'PEAR/Task/Windowseol.php';
/**
* Abstracts the windowseol task xml.
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a10
+ *
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @version Release: 1.9.5
+ * @link http://pear.php.net/package/PEAR
+ * @since Class available since Release 1.4.0a10
*/
class PEAR_Task_Windowseol_rw extends PEAR_Task_Windowseol
{
- function PEAR_Task_Windowseol_rw(&$pkg, &$config, &$logger, $fileXml)
+ function __construct(&$pkg, &$config, &$logger, $fileXml)
{
- parent::PEAR_Task_Common($config, $logger, PEAR_TASK_PACKAGE);
+ parent::__construct($config, $logger, PEAR_TASK_PACKAGE);
$this->_contents = $fileXml;
$this->_pkg = &$pkg;
$this->_params = array();
}
- function validate()
+ public function validate()
{
return true;
}
- function getName()
+ public function getName()
{
return 'windowseol';
}
- function getXml()
+ public function getXml()
{
return '';
}
}
-?>
+?>
+
/**
* PEAR_Task_Common, base class for installer tasks
*
* PHP versions 4 and 5
*
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @link http://pear.php.net/package/PEAR
+ * @since File available since Release 1.4.0a1
*/
/**#@+
* Error codes for task validation routines
@@ -33647,14 +33699,15 @@ define('PEAR_TASK_PACKAGEANDINSTALL', 3);
* This will first replace any instance of @data-dir@ in the test.php file
* with the path to the current data directory. Then, it will include the
* test.php file and run the script it contains to configure the package post-installation.
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
+ *
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @version Release: 1.9.5
+ * @link http://pear.php.net/package/PEAR
+ * @since Class available since Release 1.4.0a1
* @abstract
*/
class PEAR_Task_Common
@@ -33667,34 +33720,35 @@ class PEAR_Task_Common
* changes directly to disk
*
* Child task classes must override this property.
+ *
* @access protected
*/
- var $type = 'simple';
+ protected $type = 'simple';
/**
* Determines which install phase this task is executed under
*/
- var $phase = PEAR_TASK_INSTALL;
+ public $phase = PEAR_TASK_INSTALL;
/**
* @access protected
*/
- var $config;
+ protected $config;
/**
* @access protected
*/
- var $registry;
+ protected $registry;
/**
* @access protected
*/
- var $logger;
+ public $logger;
/**
* @access protected
*/
- var $installphase;
+ protected $installphase;
/**
* @param PEAR_Config
* @param PEAR_Common
*/
- function PEAR_Task_Common(&$config, &$logger, $phase)
+ function __construct(&$config, &$logger, $phase)
{
$this->config = &$config;
$this->registry = &$config->getRegistry();
@@ -33707,60 +33761,67 @@ class PEAR_Task_Common
/**
* Validate the basic contents of a task tag.
+ *
* @param PEAR_PackageFile_v2
* @param array
* @param PEAR_Config
* @param array the entire parsed <file> tag
+ *
* @return true|array On error, return an array in format:
- * array(PEAR_TASK_ERROR_???[, param1][, param2][, ...])
+ * array(PEAR_TASK_ERROR_???[, param1][, param2][, ...])
+ *
+ * For PEAR_TASK_ERROR_MISSING_ATTRIB, pass the attribute name in
+ * For PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, pass the attribute name and
+ * an array of legal values in
*
- * For PEAR_TASK_ERROR_MISSING_ATTRIB, pass the attribute name in
- * For PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, pass the attribute name and an array
- * of legal values in
* @static
* @abstract
*/
- function validateXml($pkg, $xml, $config, $fileXml)
+ public function validateXml($pkg, $xml, $config, $fileXml)
{
}
/**
* Initialize a task instance with the parameters
- * @param array raw, parsed xml
- * @param array attributes from the <file> tag containing this task
- * @param string|null last installed version of this package
+ *
+ * @param array raw, parsed xml
+ * @param array attributes from the <file> tag containing this task
+ * @param string|null last installed version of this package
* @abstract
*/
- function init($xml, $fileAttributes, $lastVersion)
+ public function init($xml, $fileAttributes, $lastVersion)
{
}
/**
- * Begin a task processing session. All multiple tasks will be processed after each file
- * has been successfully installed, all simple tasks should perform their task here and
- * return any errors using the custom throwError() method to allow forward compatibility
+ * Begin a task processing session. All multiple tasks will be processed
+ * after each file has been successfully installed, all simple tasks should
+ * perform their task here and return any errors using the custom
+ * throwError() method to allow forward compatibility
*
* This method MUST NOT write out any changes to disk
- * @param PEAR_PackageFile_v2
- * @param string file contents
- * @param string the eventual final file location (informational only)
- * @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail
- * (use $this->throwError), otherwise return the new contents
+ *
+ * @param PEAR_PackageFile_v2
+ * @param string file contents
+ * @param string the eventual final file location (informational only)
+ * @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail
+ * (use $this->throwError), otherwise return the new contents
* @abstract
*/
- function startSession($pkg, $contents, $dest)
+ public function startSession($pkg, $contents, $dest)
{
}
/**
- * This method is used to process each of the tasks for a particular multiple class
- * type. Simple tasks need not implement this method.
- * @param array an array of tasks
- * @access protected
+ * This method is used to process each of the tasks for a particular
+ * multiple class type. Simple tasks need not implement this method.
+ *
+ * @param array an array of tasks
+ * @access protected
* @static
* @abstract
*/
- function run($tasks)
+ public function run($tasks)
{
}
@@ -33768,56 +33829,58 @@ class PEAR_Task_Common
* @static
* @final
*/
- function hasPostinstallTasks()
+ public function hasPostinstallTasks()
{
return isset($GLOBALS['_PEAR_TASK_POSTINSTANCES']);
}
- /**
- * @static
- * @final
- */
- function runPostinstallTasks()
- {
- foreach ($GLOBALS['_PEAR_TASK_POSTINSTANCES'] as $class => $tasks) {
- $err = call_user_func(array($class, 'run'),
- $GLOBALS['_PEAR_TASK_POSTINSTANCES'][$class]);
- if ($err) {
- return PEAR_Task_Common::throwError($err);
- }
- }
- unset($GLOBALS['_PEAR_TASK_POSTINSTANCES']);
+ /**
+ * @static
+ * @final
+ */
+ public function runPostinstallTasks()
+ {
+ foreach ($GLOBALS['_PEAR_TASK_POSTINSTANCES'] as $class => $tasks) {
+ $err = call_user_func(
+ array($class, 'run'),
+ $GLOBALS['_PEAR_TASK_POSTINSTANCES'][$class]
+ );
+ if ($err) {
+ return PEAR_Task_Common::throwError($err);
+ }
+ }
+ unset($GLOBALS['_PEAR_TASK_POSTINSTANCES']);
}
/**
* Determines whether a role is a script
* @return bool
*/
- function isScript()
+ public function isScript()
{
- return $this->type == 'script';
+ return $this->type == 'script';
}
- function throwError($msg, $code = -1)
+ public function throwError($msg, $code = -1)
{
include_once 'PEAR.php';
+
return PEAR::raiseError($msg, $code);
}
}
-?>
+
/**
* <tasks:postinstallscript>
*
* PHP versions 4 and 5
*
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @link http://pear.php.net/package/PEAR
+ * @since File available since Release 1.4.0a1
*/
/**
* Base class
@@ -33828,85 +33891,96 @@ require_once 'PEAR/Task/Common.php';
*
* Note that post-install scripts are handled separately from installation, by the
* "pear run-scripts" command
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
+ *
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @version Release: 1.9.5
+ * @link http://pear.php.net/package/PEAR
+ * @since Class available since Release 1.4.0a1
*/
class PEAR_Task_Postinstallscript extends PEAR_Task_Common
{
- var $type = 'script';
- var $_class;
- var $_params;
- var $_obj;
+ public $type = 'script';
+ public $_class;
+ public $_params;
+ public $_obj;
/**
*
* @var PEAR_PackageFile_v2
*/
- var $_pkg;
- var $_contents;
- var $phase = PEAR_TASK_INSTALL;
+ public $_pkg;
+ public $_contents;
+ public $phase = PEAR_TASK_INSTALL;
/**
* Validate the raw xml at parsing-time.
*
* This also attempts to validate the script to make sure it meets the criteria
* for a post-install script
- * @param PEAR_PackageFile_v2
- * @param array The XML contents of the <postinstallscript> tag
- * @param PEAR_Config
- * @param array the entire parsed <file> tag
+ *
+ * @param PEAR_PackageFile_v2
+ * @param array The XML contents of the <postinstallscript> tag
+ * @param PEAR_Config
+ * @param array the entire parsed <file> tag
* @static
*/
- function validateXml($pkg, $xml, $config, $fileXml)
+ public function validateXml($pkg, $xml, $config, $fileXml)
{
if ($fileXml['role'] != 'php') {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" must be role="php"');
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" must be role="php"', );
}
PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
$file = $pkg->getFileContents($fileXml['name']);
if (PEAR::isError($file)) {
PEAR::popErrorHandling();
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" is not valid: ' .
- $file->getMessage());
+
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" is not valid: '.
+ $file->getMessage(), );
} elseif ($file === null) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" could not be retrieved for processing!');
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" could not be retrieved for processing!', );
} else {
$analysis = $pkg->analyzeSourceCode($file, true);
if (!$analysis) {
PEAR::popErrorHandling();
$warnings = '';
foreach ($pkg->getValidationWarnings() as $warn) {
- $warnings .= $warn['message'] . "\n";
+ $warnings .= $warn['message']."\n";
}
- return array(PEAR_TASK_ERROR_INVALID, 'Analysis of post-install script "' .
- $fileXml['name'] . '" failed: ' . $warnings);
+
+ return array(PEAR_TASK_ERROR_INVALID, 'Analysis of post-install script "'.
+ $fileXml['name'].'" failed: '.$warnings, );
}
if (count($analysis['declared_classes']) != 1) {
PEAR::popErrorHandling();
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" must declare exactly 1 class');
+
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" must declare exactly 1 class', );
}
$class = $analysis['declared_classes'][0];
- if ($class != str_replace(array('/', '.php'), array('_', ''),
- $fileXml['name']) . '_postinstall') {
+ if ($class != str_replace(
+ array('/', '.php'), array('_', ''),
+ $fileXml['name']
+ ).'_postinstall') {
PEAR::popErrorHandling();
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" class "' . $class . '" must be named "' .
- str_replace(array('/', '.php'), array('_', ''),
- $fileXml['name']) . '_postinstall"');
+
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" class "'.$class.'" must be named "'.
+ str_replace(
+ array('/', '.php'), array('_', ''),
+ $fileXml['name']
+ ).'_postinstall"', );
}
if (!isset($analysis['declared_methods'][$class])) {
PEAR::popErrorHandling();
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" must declare methods init() and run()');
+
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" must declare methods init() and run()', );
}
$methods = array('init' => 0, 'run' => 1);
foreach ($analysis['declared_methods'][$class] as $method) {
@@ -33916,129 +33990,137 @@ class PEAR_Task_Postinstallscript extends PEAR_Task_Common
}
if (count($methods)) {
PEAR::popErrorHandling();
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" must declare methods init() and run()');
+
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" must declare methods init() and run()', );
}
}
PEAR::popErrorHandling();
$definedparams = array();
- $tasksNamespace = $pkg->getTasksNs() . ':';
- if (!isset($xml[$tasksNamespace . 'paramgroup']) && isset($xml['paramgroup'])) {
+ $tasksNamespace = $pkg->getTasksNs().':';
+ if (!isset($xml[$tasksNamespace.'paramgroup']) && isset($xml['paramgroup'])) {
// in order to support the older betas, which did not expect internal tags
// to also use the namespace
$tasksNamespace = '';
}
- if (isset($xml[$tasksNamespace . 'paramgroup'])) {
- $params = $xml[$tasksNamespace . 'paramgroup'];
+ if (isset($xml[$tasksNamespace.'paramgroup'])) {
+ $params = $xml[$tasksNamespace.'paramgroup'];
if (!is_array($params) || !isset($params[0])) {
$params = array($params);
}
foreach ($params as $param) {
- if (!isset($param[$tasksNamespace . 'id'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" <paramgroup> must have ' .
- 'an ' . $tasksNamespace . 'id> tag');
- }
- if (isset($param[$tasksNamespace . 'name'])) {
- if (!in_array($param[$tasksNamespace . 'name'], $definedparams)) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" ' . $tasksNamespace .
- 'paramgroup> id "' . $param[$tasksNamespace . 'id'] .
- '" parameter "' . $param[$tasksNamespace . 'name'] .
- '" has not been previously defined');
- }
- if (!isset($param[$tasksNamespace . 'conditiontype'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" ' . $tasksNamespace .
- 'paramgroup> id "' . $param[$tasksNamespace . 'id'] .
- '" must have a ' . $tasksNamespace .
- 'conditiontype> tag containing either "=", ' .
- '"!=", or "preg_match"');
- }
- if (!in_array($param[$tasksNamespace . 'conditiontype'],
- array('=', '!=', 'preg_match'))) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" ' . $tasksNamespace .
- 'paramgroup> id "' . $param[$tasksNamespace . 'id'] .
- '" must have a ' . $tasksNamespace .
- 'conditiontype> tag containing either "=", ' .
- '"!=", or "preg_match"');
- }
- if (!isset($param[$tasksNamespace . 'value'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" ' . $tasksNamespace .
- 'paramgroup> id "' . $param[$tasksNamespace . 'id'] .
- '" must have a ' . $tasksNamespace .
- 'value> tag containing expected parameter value');
- }
- }
- if (isset($param[$tasksNamespace . 'instructions'])) {
- if (!is_string($param[$tasksNamespace . 'instructions'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" ' . $tasksNamespace .
- 'paramgroup> id "' . $param[$tasksNamespace . 'id'] .
- '" ' . $tasksNamespace . 'instructions> must be simple text');
- }
- }
- if (!isset($param[$tasksNamespace . 'param'])) {
+ if (!isset($param[$tasksNamespace.'id'])) {
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" <paramgroup> must have '.
+ 'an '.$tasksNamespace.'id> tag', );
+ }
+ if (isset($param[$tasksNamespace.'name'])) {
+ if (!in_array($param[$tasksNamespace.'name'], $definedparams)) {
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" '.$tasksNamespace.
+ 'paramgroup> id "'.$param[$tasksNamespace.'id'].
+ '" parameter "'.$param[$tasksNamespace.'name'].
+ '" has not been previously defined', );
+ }
+ if (!isset($param[$tasksNamespace.'conditiontype'])) {
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" '.$tasksNamespace.
+ 'paramgroup> id "'.$param[$tasksNamespace.'id'].
+ '" must have a '.$tasksNamespace.
+ 'conditiontype> tag containing either "=", '.
+ '"!=", or "preg_match"', );
+ }
+ if (!in_array(
+ $param[$tasksNamespace.'conditiontype'],
+ array('=', '!=', 'preg_match')
+ )) {
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" '.$tasksNamespace.
+ 'paramgroup> id "'.$param[$tasksNamespace.'id'].
+ '" must have a '.$tasksNamespace.
+ 'conditiontype> tag containing either "=", '.
+ '"!=", or "preg_match"', );
+ }
+ if (!isset($param[$tasksNamespace.'value'])) {
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" '.$tasksNamespace.
+ 'paramgroup> id "'.$param[$tasksNamespace.'id'].
+ '" must have a '.$tasksNamespace.
+ 'value> tag containing expected parameter value', );
+ }
+ }
+ if (isset($param[$tasksNamespace.'instructions'])) {
+ if (!is_string($param[$tasksNamespace.'instructions'])) {
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" '.$tasksNamespace.
+ 'paramgroup> id "'.$param[$tasksNamespace.'id'].
+ '" '.$tasksNamespace.'instructions> must be simple text', );
+ }
+ }
+ if (!isset($param[$tasksNamespace.'param'])) {
continue; // <param> is no longer required
}
- $subparams = $param[$tasksNamespace . 'param'];
+ $subparams = $param[$tasksNamespace.'param'];
if (!is_array($subparams) || !isset($subparams[0])) {
$subparams = array($subparams);
}
foreach ($subparams as $subparam) {
- if (!isset($subparam[$tasksNamespace . 'name'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" parameter for ' .
- $tasksNamespace . 'paramgroup> id "' .
- $param[$tasksNamespace . 'id'] . '" must have ' .
- 'a ' . $tasksNamespace . 'name> tag');
- }
- if (!preg_match('/[a-zA-Z0-9]+/',
- $subparam[$tasksNamespace . 'name'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" parameter "' .
- $subparam[$tasksNamespace . 'name'] .
- '" for ' . $tasksNamespace . 'paramgroup> id "' .
- $param[$tasksNamespace . 'id'] .
- '" is not a valid name. Must contain only alphanumeric characters');
- }
- if (!isset($subparam[$tasksNamespace . 'prompt'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" parameter "' .
- $subparam[$tasksNamespace . 'name'] .
- '" for ' . $tasksNamespace . 'paramgroup> id "' .
- $param[$tasksNamespace . 'id'] .
- '" must have a ' . $tasksNamespace . 'prompt> tag');
- }
- if (!isset($subparam[$tasksNamespace . 'type'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" parameter "' .
- $subparam[$tasksNamespace . 'name'] .
- '" for ' . $tasksNamespace . 'paramgroup> id "' .
- $param[$tasksNamespace . 'id'] .
- '" must have a ' . $tasksNamespace . 'type> tag');
- }
- $definedparams[] = $param[$tasksNamespace . 'id'] . '::' .
- $subparam[$tasksNamespace . 'name'];
+ if (!isset($subparam[$tasksNamespace.'name'])) {
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" parameter for '.
+ $tasksNamespace.'paramgroup> id "'.
+ $param[$tasksNamespace.'id'].'" must have '.
+ 'a '.$tasksNamespace.'name> tag', );
+ }
+ if (!preg_match(
+ '/[a-zA-Z0-9]+/',
+ $subparam[$tasksNamespace.'name']
+ )) {
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" parameter "'.
+ $subparam[$tasksNamespace.'name'].
+ '" for '.$tasksNamespace.'paramgroup> id "'.
+ $param[$tasksNamespace.'id'].
+ '" is not a valid name. Must contain only alphanumeric characters', );
+ }
+ if (!isset($subparam[$tasksNamespace.'prompt'])) {
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" parameter "'.
+ $subparam[$tasksNamespace.'name'].
+ '" for '.$tasksNamespace.'paramgroup> id "'.
+ $param[$tasksNamespace.'id'].
+ '" must have a '.$tasksNamespace.'prompt> tag', );
+ }
+ if (!isset($subparam[$tasksNamespace.'type'])) {
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" parameter "'.
+ $subparam[$tasksNamespace.'name'].
+ '" for '.$tasksNamespace.'paramgroup> id "'.
+ $param[$tasksNamespace.'id'].
+ '" must have a '.$tasksNamespace.'type> tag', );
+ }
+ $definedparams[] = $param[$tasksNamespace.'id'].'::'.
+ $subparam[$tasksNamespace.'name'];
}
}
}
+
return true;
}
/**
* Initialize a task instance with the parameters
- * @param array raw, parsed xml
- * @param array attributes from the <file> tag containing this task
- * @param string|null last installed version of this package, if any (useful for upgrades)
+ * @param array $xml raw, parsed xml
+ * @param array $fileattribs attributes from the <file> tag containing
+ * this task
+ * @param string|null $lastversion last installed version of this package,
+ * if any (useful for upgrades)
*/
- function init($xml, $fileattribs, $lastversion)
+ public function init($xml, $fileattribs, $lastversion)
{
$this->_class = str_replace('/', '_', $fileattribs['name']);
$this->_filename = $fileattribs['name'];
- $this->_class = str_replace ('.php', '', $this->_class) . '_postinstall';
+ $this->_class = str_replace('.php', '', $this->_class).'_postinstall';
$this->_params = $xml;
$this->_lastversion = $lastversion;
}
@@ -34048,7 +34130,7 @@ class PEAR_Task_Postinstallscript extends PEAR_Task_Common
*
* @access private
*/
- function _stripNamespace($params = null)
+ public function _stripNamespace($params = null)
{
if ($params === null) {
$params = array();
@@ -34059,7 +34141,7 @@ class PEAR_Task_Postinstallscript extends PEAR_Task_Common
if (is_array($param)) {
$param = $this->_stripNamespace($param);
}
- $params[str_replace($this->_pkg->getTasksNs() . ':', '', $i)] = $param;
+ $params[str_replace($this->_pkg->getTasksNs().':', '', $i)] = $param;
}
$this->_params = $params;
} else {
@@ -34068,21 +34150,24 @@ class PEAR_Task_Postinstallscript extends PEAR_Task_Common
if (is_array($param)) {
$param = $this->_stripNamespace($param);
}
- $newparams[str_replace($this->_pkg->getTasksNs() . ':', '', $i)] = $param;
+ $newparams[str_replace($this->_pkg->getTasksNs().':', '', $i)] = $param;
}
+
return $newparams;
}
}
/**
- * Unlike other tasks, the installed file name is passed in instead of the file contents,
- * because this task is handled post-installation
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @param string file name
+ * Unlike other tasks, the installed file name is passed in instead of the
+ * file contents, because this task is handled post-installation
+ *
+ * @param mixed $pkg PEAR_PackageFile_v1|PEAR_PackageFile_v2
+ * @param string $contents file name
+ *
* @return bool|PEAR_Error false to skip this file, PEAR_Error to fail
- * (use $this->throwError)
+ * (use $this->throwError)
*/
- function startSession($pkg, $contents)
+ public function startSession($pkg, $contents)
{
if ($this->installphase != PEAR_TASK_INSTALL) {
return false;
@@ -34090,56 +34175,63 @@ class PEAR_Task_Postinstallscript extends PEAR_Task_Common
// remove the tasks: namespace if present
$this->_pkg = $pkg;
$this->_stripNamespace();
- $this->logger->log(0, 'Including external post-installation script "' .
- $contents . '" - any errors are in this script');
+ $this->logger->log(
+ 0, 'Including external post-installation script "'.
+ $contents.'" - any errors are in this script'
+ );
include_once $contents;
if (class_exists($this->_class)) {
$this->logger->log(0, 'Inclusion succeeded');
} else {
- return $this->throwError('init of post-install script class "' . $this->_class
- . '" failed');
+ return $this->throwError(
+ 'init of post-install script class "'.$this->_class
+ .'" failed'
+ );
}
- $this->_obj = new $this->_class;
- $this->logger->log(1, 'running post-install script "' . $this->_class . '->init()"');
+ $this->_obj = new $this->_class();
+ $this->logger->log(1, 'running post-install script "'.$this->_class.'->init()"');
PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
$res = $this->_obj->init($this->config, $pkg, $this->_lastversion);
PEAR::popErrorHandling();
if ($res) {
$this->logger->log(0, 'init succeeded');
} else {
- return $this->throwError('init of post-install script "' . $this->_class .
- '->init()" failed');
+ return $this->throwError(
+ 'init of post-install script "'.$this->_class.
+ '->init()" failed'
+ );
}
$this->_contents = $contents;
+
return true;
}
/**
* No longer used
- * @see PEAR_PackageFile_v2::runPostinstallScripts()
- * @param array an array of tasks
- * @param string install or upgrade
+ *
+ * @see PEAR_PackageFile_v2::runPostinstallScripts()
+ * @param array an array of tasks
+ * @param string install or upgrade
* @access protected
* @static
*/
- function run()
+ public function run()
{
}
}
-?>
+
/**
* <tasks:replace>
*
* PHP versions 4 and 5
*
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @link http://pear.php.net/package/PEAR
+ * @since File available since Release 1.4.0a1
*/
/**
* Base class
@@ -34158,18 +34250,19 @@ require_once 'PEAR/Task/Common.php';
*/
class PEAR_Task_Replace extends PEAR_Task_Common
{
- var $type = 'simple';
- var $phase = PEAR_TASK_PACKAGEANDINSTALL;
- var $_replacements;
+ public $type = 'simple';
+ public $phase = PEAR_TASK_PACKAGEANDINSTALL;
+ public $_replacements;
/**
* Validate the raw xml at parsing-time.
- * @param PEAR_PackageFile_v2
- * @param array raw, parsed xml
- * @param PEAR_Config
+ *
+ * @param PEAR_PackageFile_v2
+ * @param array raw, parsed xml
+ * @param PEAR_Config
* @static
*/
- function validateXml($pkg, $xml, $config, $fileXml)
+ public function validateXml($pkg, $xml, $config, $fileXml)
{
if (!isset($xml['attribs'])) {
return array(PEAR_TASK_ERROR_NOATTRIBS);
@@ -34186,33 +34279,36 @@ class PEAR_Task_Replace extends PEAR_Task_Common
if ($xml['attribs']['type'] == 'pear-config') {
if (!in_array($xml['attribs']['to'], $config->getKeys())) {
return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'to', $xml['attribs']['to'],
- $config->getKeys());
+ $config->getKeys(), );
}
} elseif ($xml['attribs']['type'] == 'php-const') {
if (defined($xml['attribs']['to'])) {
return true;
} else {
return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'to', $xml['attribs']['to'],
- array('valid PHP constant'));
+ array('valid PHP constant'), );
}
} elseif ($xml['attribs']['type'] == 'package-info') {
- if (in_array($xml['attribs']['to'],
+ if (in_array(
+ $xml['attribs']['to'],
array('name', 'summary', 'channel', 'notes', 'extends', 'description',
'release_notes', 'license', 'release-license', 'license-uri',
'version', 'api-version', 'state', 'api-state', 'release_date',
- 'date', 'time'))) {
+ 'date', 'time', )
+ )) {
return true;
} else {
return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'to', $xml['attribs']['to'],
array('name', 'summary', 'channel', 'notes', 'extends', 'description',
'release_notes', 'license', 'release-license', 'license-uri',
'version', 'api-version', 'state', 'api-state', 'release_date',
- 'date', 'time'));
+ 'date', 'time', ), );
}
} else {
return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'type', $xml['attribs']['type'],
- array('pear-config', 'package-info', 'php-const'));
+ array('pear-config', 'package-info', 'php-const'), );
}
+
return true;
}
@@ -34221,7 +34317,7 @@ class PEAR_Task_Replace extends PEAR_Task_Common
* @param array raw, parsed xml
* @param unused
*/
- function init($xml, $attribs)
+ public function init($xml, $attribs)
{
$this->_replacements = isset($xml['attribs']) ? array($xml) : $xml;
}
@@ -34230,13 +34326,14 @@ class PEAR_Task_Replace extends PEAR_Task_Common
* Do a package.xml 1.0 replacement, with additional package-info fields available
*
* See validateXml() source for the complete list of allowed fields
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @param string file contents
- * @param string the eventual final file location (informational only)
+ *
+ * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
+ * @param string file contents
+ * @param string the eventual final file location (informational only)
* @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail
- * (use $this->throwError), otherwise return the new contents
+ * (use $this->throwError), otherwise return the new contents
*/
- function startSession($pkg, $contents, $dest)
+ public function startSession($pkg, $contents, $dest)
{
$subst_from = $subst_to = array();
foreach ($this->_replacements as $a) {
@@ -34252,6 +34349,7 @@ class PEAR_Task_Replace extends PEAR_Task_Common
$to = $chan->getServer();
} else {
$this->logger->log(0, "$dest: invalid pear-config replacement: $a[to]");
+
return false;
}
} else {
@@ -34268,6 +34366,7 @@ class PEAR_Task_Replace extends PEAR_Task_Common
}
if (is_null($to)) {
$this->logger->log(0, "$dest: invalid pear-config replacement: $a[to]");
+
return false;
}
} elseif ($a['type'] == 'php-const') {
@@ -34278,6 +34377,7 @@ class PEAR_Task_Replace extends PEAR_Task_Common
$to = constant($a['to']);
} else {
$this->logger->log(0, "$dest: invalid php-const replacement: $a[to]");
+
return false;
}
} else {
@@ -34285,6 +34385,7 @@ class PEAR_Task_Replace extends PEAR_Task_Common
$to = $t;
} else {
$this->logger->log(0, "$dest: invalid package-info replacement: $a[to]");
+
return false;
}
}
@@ -34293,28 +34394,30 @@ class PEAR_Task_Replace extends PEAR_Task_Common
$subst_to[] = $to;
}
}
- $this->logger->log(3, "doing " . sizeof($subst_from) .
- " substitution(s) for $dest");
+ $this->logger->log(
+ 3, "doing ".sizeof($subst_from).
+ " substitution(s) for $dest"
+ );
if (sizeof($subst_from)) {
$contents = str_replace($subst_from, $subst_to, $contents);
}
+
return $contents;
}
}
-?>
+
/**
* <tasks:unixeol>
*
* PHP versions 4 and 5
*
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @link http://pear.php.net/package/PEAR
+ * @since File available since Release 1.4.0a1
*/
/**
* Base class
@@ -34333,22 +34436,24 @@ require_once 'PEAR/Task/Common.php';
*/
class PEAR_Task_Unixeol extends PEAR_Task_Common
{
- var $type = 'simple';
- var $phase = PEAR_TASK_PACKAGE;
- var $_replacements;
+ public $type = 'simple';
+ public $phase = PEAR_TASK_PACKAGE;
+ public $_replacements;
/**
* Validate the raw xml at parsing-time.
- * @param PEAR_PackageFile_v2
- * @param array raw, parsed xml
- * @param PEAR_Config
+ *
+ * @param PEAR_PackageFile_v2
+ * @param array raw, parsed xml
+ * @param PEAR_Config
* @static
*/
- function validateXml($pkg, $xml, $config, $fileXml)
+ public function validateXml($pkg, $xml, $config, $fileXml)
{
if ($xml != '') {
return array(PEAR_TASK_ERROR_INVALID, 'no attributes allowed');
}
+
return true;
}
@@ -34357,7 +34462,7 @@ class PEAR_Task_Unixeol extends PEAR_Task_Common
* @param array raw, parsed xml
* @param unused
*/
- function init($xml, $attribs)
+ public function init($xml, $attribs)
{
}
@@ -34365,32 +34470,33 @@ class PEAR_Task_Unixeol extends PEAR_Task_Common
* Replace all line endings with line endings customized for the current OS
*
* See validateXml() source for the complete list of allowed fields
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @param string file contents
- * @param string the eventual final file location (informational only)
+ *
+ * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
+ * @param string file contents
+ * @param string the eventual final file location (informational only)
* @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail
- * (use $this->throwError), otherwise return the new contents
+ * (use $this->throwError), otherwise return the new contents
*/
- function startSession($pkg, $contents, $dest)
+ public function startSession($pkg, $contents, $dest)
{
$this->logger->log(3, "replacing all line endings with \\n in $dest");
+
return preg_replace("/\r\n|\n\r|\r|\n/", "\n", $contents);
}
}
-?>
+
/**
* <tasks:windowseol>
*
* PHP versions 4 and 5
*
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @link http://pear.php.net/package/PEAR
+ * @since File available since Release 1.4.0a1
*/
/**
* Base class
@@ -34398,33 +34504,36 @@ class PEAR_Task_Unixeol extends PEAR_Task_Common
require_once 'PEAR/Task/Common.php';
/**
* Implements the windows line endsings file task.
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
+ *
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @version Release: 1.9.5
+ * @link http://pear.php.net/package/PEAR
+ * @since Class available since Release 1.4.0a1
*/
class PEAR_Task_Windowseol extends PEAR_Task_Common
{
- var $type = 'simple';
- var $phase = PEAR_TASK_PACKAGE;
- var $_replacements;
+ public $type = 'simple';
+ public $phase = PEAR_TASK_PACKAGE;
+ public $_replacements;
/**
* Validate the raw xml at parsing-time.
- * @param PEAR_PackageFile_v2
- * @param array raw, parsed xml
- * @param PEAR_Config
+ *
+ * @param PEAR_PackageFile_v2
+ * @param array raw, parsed xml
+ * @param PEAR_Config
* @static
*/
- function validateXml($pkg, $xml, $config, $fileXml)
+ public function validateXml($pkg, $xml, $config, $fileXml)
{
if ($xml != '') {
return array(PEAR_TASK_ERROR_INVALID, 'no attributes allowed');
}
+
return true;
}
@@ -34433,7 +34542,7 @@ class PEAR_Task_Windowseol extends PEAR_Task_Common
* @param array raw, parsed xml
* @param unused
*/
- function init($xml, $attribs)
+ public function init($xml, $attribs)
{
}
@@ -34441,19 +34550,21 @@ class PEAR_Task_Windowseol extends PEAR_Task_Common
* Replace all line endings with windows line endings
*
* See validateXml() source for the complete list of allowed fields
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @param string file contents
- * @param string the eventual final file location (informational only)
+ *
+ * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
+ * @param string file contents
+ * @param string the eventual final file location (informational only)
* @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail
- * (use $this->throwError), otherwise return the new contents
+ * (use $this->throwError), otherwise return the new contents
*/
- function startSession($pkg, $contents, $dest)
+ public function startSession($pkg, $contents, $dest)
{
$this->logger->log(3, "replacing all line endings with \\r\\n in $dest");
+
return preg_replace("/\r\n|\n\r|\r|\n/", "\r\n", $contents);
}
}
-?>
+
/**
* Channel Validator for the pecl.php.net channel
*
@@ -34464,7 +34575,6 @@ class PEAR_Task_Windowseol extends PEAR_Task_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a5
*/
@@ -34515,7 +34625,7 @@ class PEAR_Validator_PECL extends PEAR_Validate
return $ret;
}
}
-?>
+?>
/**
* Class auto-loader
*
@@ -34527,7 +34637,6 @@ class PEAR_Validator_PECL extends PEAR_Validate
* @author Stig Bakken <ssb@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/manual/en/core.ppm.php#core.ppm.pear-autoloader
* @since File available since Release 0.1
* @deprecated File deprecated in Release 1.4.0a1
@@ -34733,7 +34842,7 @@ class PEAR_Autoloader extends PEAR
overload("PEAR_Autoloader");
?>
-
+
/**
* PEAR_Builder for building PHP extensions (PECL packages)
*
@@ -34745,7 +34854,6 @@ overload("PEAR_Autoloader");
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*
@@ -34798,9 +34906,9 @@ class PEAR_Builder extends PEAR_Common
*
* @access public
*/
- function PEAR_Builder(&$ui)
+ function __construct(&$ui)
{
- parent::PEAR_Common();
+ parent::__construct();
$this->setFrontendObject($ui);
}
@@ -35222,7 +35330,7 @@ class PEAR_Builder extends PEAR_Common
return PEAR_Common::log($level, $msg);
}
}
-
+
/**
* PEAR_ChannelFile, the channel handling class
*
@@ -35233,7 +35341,6 @@ class PEAR_Builder extends PEAR_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -35418,7 +35525,7 @@ class PEAR_ChannelFile
*/
var $_isValid = false;
- function PEAR_ChannelFile()
+ function __construct()
{
$this->_stack = new PEAR_ErrorStack('PEAR_ChannelFile');
$this->_stack->setErrorMessageTemplate($this->_getErrorMessage());
@@ -36780,7 +36887,8 @@ class PEAR_ChannelFile
return time();
}
-}
+}
+
/**
* PEAR_Command, command pattern class
*
@@ -36792,7 +36900,6 @@ class PEAR_ChannelFile
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -37193,7 +37300,7 @@ class PEAR_Command
return false;
}
// }}}
-}
+}
/**
* PEAR_Common, the base class for the PEAR Installer
*
@@ -37206,7 +37313,6 @@ class PEAR_Command
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1.0
* @deprecated File deprecated since Release 1.4.0a1
@@ -37360,9 +37466,9 @@ class PEAR_Common extends PEAR
*
* @access public
*/
- function PEAR_Common()
+ function __construct()
{
- parent::PEAR();
+ parent::__construct();
$this->config = &PEAR_Config::singleton();
$this->debug = $this->config->get('verbose');
}
@@ -38029,7 +38135,8 @@ class PEAR_Common extends PEAR
}
require_once 'PEAR/Config.php';
-require_once 'PEAR/PackageFile.php';
+require_once 'PEAR/PackageFile.php';
+
/**
* PEAR_Config, customized configuration handling for the PEAR Installer
*
@@ -38041,7 +38148,6 @@ require_once 'PEAR/PackageFile.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -38623,10 +38729,10 @@ class PEAR_Config extends PEAR
*
* @see PEAR_Config::singleton
*/
- function PEAR_Config($user_file = '', $system_file = '', $ftp_file = false,
+ function __construct($user_file = '', $system_file = '', $ftp_file = false,
$strict = true)
{
- $this->PEAR();
+ parent::__construct();
PEAR_Installer_Role::initializeConfig($this);
$sl = DIRECTORY_SEPARATOR;
if (empty($user_file)) {
@@ -40122,7 +40228,7 @@ class PEAR_Config extends PEAR
}
}
}
-
+
/**
* PEAR_DependencyDB, advanced installed packages dependency database
*
@@ -40134,7 +40240,6 @@ class PEAR_Config extends PEAR
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -40884,7 +40989,7 @@ class PEAR_DependencyDB
);
}
}
-}
+}
/**
* PEAR_Dependency2, advanced dependency validation
*
@@ -40895,7 +41000,6 @@ class PEAR_DependencyDB
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -40968,7 +41072,7 @@ class PEAR_Dependency2
* @param array format of PEAR_Registry::parsedPackageName()
* @param int installation state (one of PEAR_VALIDATE_*)
*/
- function PEAR_Dependency2(&$config, $installoptions, $package,
+ function __construct(&$config, $installoptions, $package,
$state = PEAR_VALIDATE_INSTALLING)
{
$this->_config = &$config;
@@ -42242,7 +42346,7 @@ class PEAR_Dependency2
$this->_currentPackage, true)));
}
}
-
+
/**
* PEAR_Downloader, the PEAR Installer's download utility class
*
@@ -42256,7 +42360,6 @@ class PEAR_Dependency2
* @author Martin Jansen <mj@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.3.0
*/
@@ -42389,22 +42492,26 @@ class PEAR_Downloader extends PEAR_Common
* @param array
* @param PEAR_Config
*/
- function PEAR_Downloader(&$ui, $options, &$config)
+ function __construct($ui = null, $options = array(), $config = null)
{
- parent::PEAR_Common();
+ parent::__construct();
$this->_options = $options;
- $this->config = &$config;
- $this->_preferredState = $this->config->get('preferred_state');
+ if ($config !== null) {
+ $this->config = &$config;
+ $this->_preferredState = $this->config->get('preferred_state');
+ }
$this->ui = &$ui;
if (!$this->_preferredState) {
// don't inadvertantly use a non-set preferred_state
$this->_preferredState = null;
}
- if (isset($this->_options['installroot'])) {
- $this->config->setInstallRoot($this->_options['installroot']);
+ if ($config !== null) {
+ if (isset($this->_options['installroot'])) {
+ $this->config->setInstallRoot($this->_options['installroot']);
+ }
+ $this->_registry = &$config->getRegistry();
}
- $this->_registry = &$config->getRegistry();
if (isset($this->_options['alldeps']) || isset($this->_options['onlyreqdeps'])) {
$this->_installed = $this->_registry->listAllPackages();
@@ -44007,7 +44114,8 @@ class PEAR_Downloader extends PEAR_Common
}
return $dest_file;
}
-}
+}
+
/**
* Error Stack Implementation
*
@@ -44032,7 +44140,6 @@ class PEAR_Downloader extends PEAR_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 2004-2008 Greg Beaver
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR_ErrorStack
*/
@@ -44146,7 +44253,6 @@ define('PEAR_ERRORSTACK_ERR_OBJTOSTRING', 2);
* @category Debugging
* @copyright 2004-2008 Greg Beaver
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR_ErrorStack
*/
class PEAR_ErrorStack {
@@ -44203,43 +44309,43 @@ class PEAR_ErrorStack {
* @access protected
*/
var $_contextCallback = false;
-
+
/**
* If set to a valid callback, this will be called every time an error
* is pushed onto the stack. The return value will be used to determine
* whether to allow an error to be pushed or logged.
- *
+ *
* The return value must be one an PEAR_ERRORSTACK_* constant
* @see PEAR_ERRORSTACK_PUSHANDLOG, PEAR_ERRORSTACK_PUSH, PEAR_ERRORSTACK_LOG
* @var false|string|array
* @access protected
*/
var $_errorCallback = array();
-
+
/**
* PEAR::Log object for logging errors
* @var false|Log
* @access protected
*/
var $_logger = false;
-
+
/**
* Error messages - designed to be overridden
* @var array
* @abstract
*/
var $_errorMsgs = array();
-
+
/**
* Set up a new error stack
- *
+ *
* @param string $package name of the package this error stack represents
* @param callback $msgCallback callback used for error message generation
* @param callback $contextCallback callback used for context generation,
* defaults to {@link getFileLine()}
* @param boolean $throwPEAR_Error
*/
- function PEAR_ErrorStack($package, $msgCallback = false, $contextCallback = false,
+ function __construct($package, $msgCallback = false, $contextCallback = false,
$throwPEAR_Error = false)
{
$this->_package = $package;
@@ -44992,7 +45098,7 @@ class PEAR_ErrorStack {
$stack = &PEAR_ErrorStack::singleton('PEAR_ErrorStack');
$stack->pushCallback(array('PEAR_ErrorStack', '_handleError'));
?>
-
+
/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
/**
* PEAR_Exception
@@ -45007,7 +45113,6 @@ $stack->pushCallback(array('PEAR_ErrorStack', '_handleError'));
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.3.3
*/
@@ -45380,13 +45485,7 @@ class PEAR_Exception extends Exception
}
return $causeMsg . $this->getTraceAsString();
}
-}
-if ($skipmsg) {
- $a = new $ec($code, $mode, $options, $userinfo);
-} else {
- $a = new $ec($message, $code, $mode, $options, $userinfo);
-}
-?>
+}
/**
* PEAR_Frontend, the singleton-based frontend for user input/output
*
@@ -45397,7 +45496,6 @@ if ($skipmsg) {
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -45613,7 +45711,7 @@ class PEAR_Frontend extends PEAR
function userDialog($command, $prompts, $types = array(), $defaults = array())
{
}
-}
+}
/**
* PEAR_Installer
*
@@ -45627,7 +45725,6 @@ class PEAR_Frontend extends PEAR
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -45731,9 +45828,9 @@ class PEAR_Installer extends PEAR_Downloader
*
* @access public
*/
- function PEAR_Installer(&$ui)
+ function __construct(&$ui)
{
- parent::PEAR_Common();
+ parent::__construct($ui, array(), null);
$this->setFrontendObject($ui);
$this->debug = $this->config->get('verbose');
}
@@ -47438,7 +47535,8 @@ class PEAR_Installer extends PEAR_Downloader
}
// }}}
-}
+}
+
/**
* PEAR_PackageFile, package.xml parsing utility class
*
@@ -47449,7 +47547,6 @@ class PEAR_Installer extends PEAR_Downloader
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -47507,7 +47604,7 @@ class PEAR_PackageFile
* @param string @tmpdir Optional temporary directory for uncompressing
* files
*/
- function PEAR_PackageFile(&$config, $debug = false)
+ function __construct(&$config, $debug = false)
{
$this->_config = $config;
$this->_debug = $debug;
@@ -47929,7 +48026,8 @@ class PEAR_PackageFile
$info = PEAR::raiseError("Cannot open '$info' for parsing");
return $info;
}
-}
+}
+
/**
* PEAR_Packager for generating releases
*
@@ -47942,7 +48040,6 @@ class PEAR_PackageFile
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -48129,7 +48226,7 @@ class PEAR_Packager extends PEAR_Common
return $dest_package;
}
-}
+}
/**
* PEAR_Registry
*
@@ -48142,7 +48239,6 @@ class PEAR_Packager extends PEAR_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -48262,10 +48358,10 @@ class PEAR_Registry extends PEAR
*
* @access public
*/
- function PEAR_Registry($pear_install_dir = PEAR_INSTALL_DIR, $pear_channel = false,
+ function __construct($pear_install_dir = PEAR_INSTALL_DIR, $pear_channel = false,
$pecl_channel = false)
{
- parent::PEAR();
+ parent::__construct();
$this->setInstallDir($pear_install_dir);
$this->_pearChannel = $pear_channel;
$this->_peclChannel = $pecl_channel;
@@ -50514,7 +50610,8 @@ class PEAR_Registry extends PEAR
}
return $ret;
}
-}
+}
+
/**
* PEAR_REST
*
@@ -50525,7 +50622,6 @@ class PEAR_Registry extends PEAR
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -50553,7 +50649,7 @@ class PEAR_REST
var $config;
var $_options;
- function PEAR_REST(&$config, $options = array())
+ function __construct(&$config, $options = array())
{
$this->config = &$config;
$this->_options = $options;
@@ -51004,7 +51100,7 @@ class PEAR_REST
return $data;
}
}
-
+
/**
* PEAR_RunTest
*
@@ -51016,7 +51112,6 @@ class PEAR_REST
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.3.3
*/
@@ -51066,7 +51161,6 @@ class PEAR_RunTest
var $ini_overwrites = array(
'output_handler=',
'open_basedir=',
- 'safe_mode=0',
'disable_functions=',
'output_buffering=Off',
'display_errors=1',
@@ -51089,7 +51183,7 @@ class PEAR_RunTest
* An object that supports the PEAR_Common->log() signature, or null
* @param PEAR_Common|null
*/
- function PEAR_RunTest($logger = null, $options = array())
+ function __construct($logger = null, $options = array())
{
if (!defined('E_DEPRECATED')) {
define('E_DEPRECATED', 0);
@@ -51120,19 +51214,11 @@ class PEAR_RunTest
function system_with_timeout($commandline, $env = null, $stdin = null)
{
$data = '';
- if (version_compare(phpversion(), '5.0.0', '<')) {
- $proc = proc_open($commandline, array(
- 0 => array('pipe', 'r'),
- 1 => array('pipe', 'w'),
- 2 => array('pipe', 'w')
- ), $pipes);
- } else {
- $proc = proc_open($commandline, array(
- 0 => array('pipe', 'r'),
- 1 => array('pipe', 'w'),
- 2 => array('pipe', 'w')
- ), $pipes, null, $env, array('suppress_errors' => true));
- }
+ $proc = proc_open($commandline, array(
+ 0 => array('pipe', 'r'),
+ 1 => array('pipe', 'w'),
+ 2 => array('pipe', 'w')
+ ), $pipes, null, $env, array('suppress_errors' => true));
if (!$proc) {
return false;
@@ -51236,12 +51322,7 @@ class PEAR_RunTest
function _preparePhpBin($php, $file, $ini_settings)
{
$file = escapeshellarg($file);
- // This was fixed in php 5.3 and is not needed after that
- if (OS_WINDOWS && version_compare(PHP_VERSION, '5.3', '<')) {
- $cmd = '"'.escapeshellarg($php).' '.$ini_settings.' -f ' . $file .'"';
- } else {
- $cmd = $php . $ini_settings . ' -f ' . $file;
- }
+ $cmd = $php . $ini_settings . ' -f ' . $file;
return $cmd;
}
@@ -51643,6 +51724,11 @@ class PEAR_RunTest
$expectf = isset($section_text['EXPECTF']) ? $wanted_re : null;
$data = $this->generate_diff($wanted, $output, $returns, $expectf);
$res = $this->_writeLog($diff_filename, $data);
+ if (isset($this->_options['showdiff'])) {
+ $this->_logger->log(0, "========DIFF========");
+ $this->_logger->log(0, $data);
+ $this->_logger->log(0, "========DONE========");
+ }
if (PEAR::isError($res)) {
return $res;
}
@@ -51986,7 +52072,7 @@ $text
}
}
}
-
+
/**
* PEAR_Validate
*
@@ -51997,7 +52083,6 @@ $text
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -52614,7 +52699,7 @@ class PEAR_Validate
{
return true;
}
-}
+}
/**
* PEAR_XMLParser
*
@@ -52626,7 +52711,6 @@ class PEAR_Validate
* @author Stephan Schmidt (original XML_Unserializer code)
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -52711,11 +52795,6 @@ class PEAR_XMLParser
$this->encoding = 'UTF-8';
}
- if (version_compare(phpversion(), '5.0.0', 'lt') && $this->encoding == 'UTF-8') {
- $data = utf8_decode($data);
- $this->encoding = 'ISO-8859-1';
- }
-
$xp = xml_parser_create($this->encoding);
xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, 0);
xml_set_object($xp, $this);
@@ -52866,7 +52945,7 @@ class PEAR_XMLParser
{
$this->_dataStack[$this->_depth] .= $cdata;
}
-}
+}
REM ----------------------------------------------------------------------
REM PHP version 5
@@ -52976,7 +53055,7 @@ GOTO END
:RUN
"%PHP_PEAR_PHP_BIN%" -C -d date.timezone=UTC -d output_buffering=1 -d safe_mode=0 -d open_basedir="" -d auto_prepend_file="" -d auto_append_file="" -d variables_order=EGPCS -d register_argc_argv="On" -d "include_path='%PHP_PEAR_INSTALL_DIR%'" -f "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9
:END
-@ECHO ON
+@ECHO ON
REM ----------------------------------------------------------------------
REM PHP version 5
@@ -53090,7 +53169,7 @@ GOTO END
:RUN
"%PHP_PEAR_PHP_BIN%" -C -d date.timezone=UTC -d memory_limit="-1" -d safe_mode=0 -d register_argc_argv="On" -d auto_prepend_file="" -d auto_append_file="" -d variables_order=EGPCS -d open_basedir="" -d output_buffering=1 -d "include_path='%PHP_PEAR_INSTALL_DIR%'" -f "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9
:END
-@ECHO ON
+@ECHO ON
REM ----------------------------------------------------------------------
REM PHP version 5
@@ -53204,7 +53283,7 @@ GOTO END
:RUN
"%PHP_PEAR_PHP_BIN%" -C -n -d date.timezone=UTC -d output_buffering=1 -d safe_mode=0 -d "include_path='%PHP_PEAR_INSTALL_DIR%'" -d register_argc_argv="On" -d variables_order=EGPCS -f "%PHP_PEAR_INSTALL_DIR%\peclcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9
:END
-@ECHO ON
+@ECHO ON
# first find which PHP binary to use
if test "x$PHP_PEAR_PHP_BIN" != "x"; then
@@ -53232,7 +53311,7 @@ else
fi
exec $PHP -C -q $INCARG -d date.timezone=UTC -d output_buffering=1 -d variables_order=EGPCS -d open_basedir="" -d safe_mode=0 -d register_argc_argv="On" -d auto_prepend_file="" -d auto_append_file="" $INCDIR/pearcmd.php "$@"
-
+
# first find which PHP binary to use
if test "x$PHP_PEAR_PHP_BIN" != "x"; then
@@ -53260,7 +53339,7 @@ else
fi
exec $PHP -d date.timezone=UTC -d memory_limit="-1" -C -q $INCARG -d output_buffering=1 -d open_basedir="" -d safe_mode=0 -d register_argc_argv="On" -d auto_prepend_file="" -d variables_order=EGPCS -d auto_append_file="" $INCDIR/pearcmd.php "$@"
-
+
# first find which PHP binary to use
if test "x$PHP_PEAR_PHP_BIN" != "x"; then
@@ -53288,7 +53367,7 @@ else
fi
exec $PHP -C -n -q $INCARG -d date.timezone=UTC -d output_buffering=1 -d variables_order=EGPCS -d safe_mode=0 -d register_argc_argv="On" $INCDIR/peclcmd.php "$@"
-
+
/**
* PEAR, the PHP Extension and Application Repository
*
@@ -53302,7 +53381,6 @@ exec $PHP -C -n -q $INCARG -d date.timezone=UTC -d output_buffering=1 -d variabl
* @author Tomas V.V.Cox <cox@idecnet.com>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
*/
@@ -53325,9 +53403,7 @@ if ('@include_path@ ' != '@'.'include_path'.'@ ') {
$raw = true;
}
@ini_set('allow_url_fopen', true);
-if (!ini_get('safe_mode')) {
- @set_time_limit(0);
-}
+@set_time_limit(0);
ob_implicit_flush(true);
@ini_set('track_errors', true);
@ini_set('html_errors', false);
@@ -53370,18 +53446,14 @@ $opts = $options[0];
$fetype = 'CLI';
if ($progname == 'gpear' || $progname == 'pear-gtk') {
- $fetype = 'Gtk';
+ $fetype = 'Gtk2';
} else {
foreach ($opts as $opt) {
if ($opt[0] == 'G') {
- $fetype = 'Gtk';
+ $fetype = 'Gtk2';
}
}
}
-//Check if Gtk and PHP >= 5.1.0
-if ($fetype == 'Gtk' && version_compare(phpversion(), '5.1.0', '>=')) {
- $fetype = 'Gtk2';
-}
$pear_user_config = '';
$pear_system_config = '';
@@ -53425,14 +53497,6 @@ if (PEAR::isError($config)) {
$_PEAR_PHPDIR = $config->get('php_dir');
$ui->setConfig($config);
PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array($ui, "displayFatalError"));
-if (ini_get('safe_mode')) {
- $ui->outputData(
- 'WARNING: running in safe mode requires that all files ' .
- 'created be the same uid as the current script. ' .
- 'PHP reports this script is uid: ' . @getmyuid() .
- ', and current user is: ' . @get_current_user()
- );
-}
$verbose = $config->get("verbose");
$cmdopts = array();
@@ -53555,7 +53619,7 @@ if (empty($command) && ($store_user_config || $store_system_config)) {
exit;
}
-if ($fetype == 'Gtk' || $fetype == 'Gtk2') {
+if ($fetype == 'Gtk2') {
if (!$config->validConfiguration()) {
PEAR::raiseError(
"CRITICAL ERROR: no existing valid configuration files found in " .
@@ -53750,26 +53814,26 @@ function cmdHelp($command)
*/
function error_handler($errno, $errmsg, $file, $line, $vars)
{
- if ((defined('E_STRICT')
- && $errno & E_STRICT)
- || (defined('E_DEPRECATED')
- && $errno & E_DEPRECATED)
+ if ($errno & E_STRICT
+ || $errno & E_DEPRECATED
|| !error_reporting()
) {
- if (defined('E_STRICT') && $errno & E_STRICT) {
+ if ($errno & E_STRICT) {
return; // E_STRICT
}
- if (defined('E_DEPRECATED') && $errno & E_DEPRECATED) {
+ if ($errno & E_DEPRECATED) {
return; // E_DEPRECATED
}
- if ($GLOBALS['config']->get('verbose') < 4) {
+ if (isset($GLOBALS['config']) && $GLOBALS['config']->get('verbose') < 4) {
return false; // @silenced error, show all if debug is high enough
}
}
$errortype = array (
+ E_DEPRECATED => 'Deprecated Warning',
E_ERROR => "Error",
E_WARNING => "Warning",
E_PARSE => "Parsing Error",
+ E_STRICT => 'Strict Warning',
E_NOTICE => "Notice",
E_CORE_ERROR => "Core Error",
E_CORE_WARNING => "Core Warning",
@@ -53800,7 +53864,7 @@ function error_handler($errno, $errmsg, $file, $line, $vars)
* End:
*/
// vim600:syn=php
-
+
/**
* PEAR, the PHP Extension and Application Repository
*
@@ -53814,7 +53878,6 @@ function error_handler($errno, $errmsg, $file, $line, $vars)
* @author Tomas V.V.Cox <cox@idecnet.com>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
*/
@@ -53843,7 +53906,7 @@ require_once 'pearcmd.php';
// vim600:syn=php
?>
-
+
Stig Bakken <ssb@php.net>,
Gregory Beaver <cellog@php.net>,
Helgi Þormar Þorbjörnsson <helgi@php.net>,
@@ -53870,7 +53933,7 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
+
=========================
Installing the PEAR Installer.
@@ -53922,8 +53985,7 @@ a public mailing list devoted to support for PEAR packages and installation-
related issues.
Happy PHPing, we hope PEAR will be a great tool for your development work!
-
-$Id$
+
$Id: package.dtd,v 1.38 2005-11-12 02:23:07 cellog Exp $
This is the PEAR package description, version 1.0.
@@ -54026,39 +54088,7 @@ $Id$
to CDATA #REQUIRED>
-
-/**
- * This is only meant for PHP 5 to get rid of certain strict warning
- * that doesn't get hidden since it's in the shutdown function
- */
-class PEAR5
-{
- /**
- * If you have a class that's mostly/entirely static, and you need static
- * properties, you can use this method to simulate them. Eg. in your method(s)
- * do this: $myVar = &PEAR5::getStaticProperty('myclass', 'myVar');
- * You MUST use a reference, or they will not persist!
- *
- * @access public
- * @param string $class The calling classname, to prevent clashes
- * @param string $var The variable to retrieve.
- * @return mixed A reference to the variable. If not set it will be
- * auto initialised to NULL.
- */
- static function &getStaticProperty($class, $var)
- {
- static $properties;
- if (!isset($properties[$class])) {
- $properties[$class] = array();
- }
-
- if (!array_key_exists($var, $properties[$class])) {
- $properties[$class][$var] = null;
- }
-
- return $properties[$class][$var];
- }
-}
+
/**
* PEAR, the PHP Extension and Application Repository
*
@@ -54074,7 +54104,6 @@ class PEAR5
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2010 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -54093,8 +54122,6 @@ define('PEAR_ERROR_CALLBACK', 16);
*/
define('PEAR_ERROR_EXCEPTION', 32);
/**#@-*/
-define('PEAR_ZE2', (function_exists('version_compare') &&
- version_compare(zend_version(), "2-dev", "ge")));
if (substr(PHP_OS, 0, 3) == 'WIN') {
define('OS_WINDOWS', true);
@@ -54206,7 +54233,7 @@ class PEAR
* @access public
* @return void
*/
- function PEAR($error_class = null)
+ function __construct($error_class = null)
{
$classname = strtolower(get_class($this));
if ($this->_debug) {
@@ -54234,6 +54261,18 @@ class PEAR
}
/**
+ * Only here for backwards compatibility.
+ * E.g. Archive_Tar calls $this->PEAR() in its constructor.
+ *
+ * @param string $error_class Which class to use for error objects,
+ * defaults to PEAR_Error.
+ */
+ public function PEAR($error_class = null)
+ {
+ $this->__construct($error_class);
+ }
+
+ /**
* Destructor (the emulated type of...). Does nothing right now,
* but is included for forward compatibility, so subclass
* destructors should always call it.
@@ -54262,7 +54301,7 @@ class PEAR
* @return mixed A reference to the variable. If not set it will be
* auto initialised to NULL.
*/
- function &getStaticProperty($class, $var)
+ static function &getStaticProperty($class, $var)
{
static $properties;
if (!isset($properties[$class])) {
@@ -54581,12 +54620,6 @@ class PEAR
$ec = 'PEAR_Error';
}
- if (intval(PHP_VERSION) < 5) {
- // little non-eval hack to fix bug #12147
- include 'PEAR/FixPHP5PEARWarnings.php';
- return $a;
- }
-
if ($skipmsg) {
$a = new $ec($code, $mode, $options, $userinfo);
} else {
@@ -54764,8 +54797,7 @@ class PEAR
// if either returns true dl() will produce a FATAL error, stop that
if (
function_exists('dl') === false ||
- ini_get('enable_dl') != 1 ||
- ini_get('safe_mode') == 1
+ ini_get('enable_dl') != 1
) {
return false;
}
@@ -54786,10 +54818,6 @@ class PEAR
}
}
-if (PEAR_ZE2) {
- include_once 'PEAR5.php';
-}
-
function _PEAR_call_destructors()
{
global $_PEAR_destructor_object_list;
@@ -54797,11 +54825,8 @@ function _PEAR_call_destructors()
sizeof($_PEAR_destructor_object_list))
{
reset($_PEAR_destructor_object_list);
- if (PEAR_ZE2) {
- $destructLifoExists = PEAR5::getStaticProperty('PEAR', 'destructlifo');
- } else {
- $destructLifoExists = PEAR::getStaticProperty('PEAR', 'destructlifo');
- }
+
+ $destructLifoExists = PEAR::getStaticProperty('PEAR', 'destructlifo');
if ($destructLifoExists) {
$_PEAR_destructor_object_list = array_reverse($_PEAR_destructor_object_list);
@@ -54883,7 +54908,7 @@ class PEAR_Error
* @access public
*
*/
- function PEAR_Error($message = 'unknown error', $code = null,
+ function __construct($message = 'unknown error', $code = null,
$mode = null, $options = null, $userinfo = null)
{
if ($mode === null) {
@@ -54894,11 +54919,7 @@ class PEAR_Error
$this->mode = $mode;
$this->userinfo = $userinfo;
- if (PEAR_ZE2) {
- $skiptrace = PEAR5::getStaticProperty('PEAR_Error', 'skiptrace');
- } else {
- $skiptrace = PEAR::getStaticProperty('PEAR_Error', 'skiptrace');
- }
+ $skiptrace = PEAR::getStaticProperty('PEAR_Error', 'skiptrace');
if (!$skiptrace) {
$this->backtrace = debug_backtrace();
@@ -55121,47 +55142,48 @@ class PEAR_Error
* c-basic-offset: 4
* End:
*/
-
+
=========================
-What is the PEAR Installer? What is PEAR?
-
+What is the PEAR Installer? What is PEAR?
+------------------------------------------
PEAR is the PHP Extension and Application Repository, found at
-http://pear.php.net. The PEAR Installer is this software, which
-contains executable files and PHP code that is used to download
-and install PEAR code from pear.php.net.
+http://pear.php.net.
-PEAR contains useful software libraries and applications such as
+The **PEAR Installer** is this software, which contains executable
+files and PHP code that is used to **download and install** PEAR code
+from pear.php.net.
+
+PEAR contains useful **software libraries and applications** such as
MDB2 (database abstraction), HTML_QuickForm (HTML forms management),
PhpDocumentor (auto-documentation generator), DB_DataObject
-(Data Access Abstraction), and many hundreds more. Browse all
-available packages at http://pear.php.net, the list is constantly
-growing and updating to reflect improvements in the PHP language.
+(Data Access Abstraction), and many hundreds more.
+Browse all available packages at http://pear.php.net, the list is
+constantly growing and updating to reflect improvements in the PHP language.
+
+.. warning::
+ Do not run PEAR without installing it - if you downloaded this
+ tarball manually, you MUST install it. Read the instructions in INSTALL
+ prior to use.
-DOCUMENTATION
-=============
+Documentation
+-------------
Documentation for PEAR can be found at http://pear.php.net/manual/.
Installation documentation can be found in the INSTALL file included
in this tarball.
-WARNING: DO NOT RUN PEAR WITHOUT INSTALLING IT - if you downloaded this
-tarball manually, you MUST install it. Read the instructions in INSTALL
-prior to use.
-
-
-Happy PHPing, we hope PEAR will be a great tool for your development work!
-
Tests
-=====
-
-Run the tests without installation as follows:
+-----
+Run the tests without installation as follows::
$ ./scripts/pear.sh run-tests -r tests
-You should have the Text_Diff package installed to get nicer error output.
-
+You should have the ``Text_Diff`` package installed to get nicer error output.
+
+Happy PHPing, we hope PEAR will be a great tool for your development work!
+
/**
* File/Directory manipulation
*
@@ -55172,7 +55194,6 @@ You should have the Text_Diff package installed to get nicer error output.
* @author Tomas V.V.Cox <cox@idecnet.com>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -55685,13 +55706,11 @@ class System
$path_elements[] = dirname($program);
$program = basename($program);
} else {
- // Honor safe mode
- if (!ini_get('safe_mode') || !$path = ini_get('safe_mode_exec_dir')) {
- $path = getenv('PATH');
- if (!$path) {
- $path = getenv('Path'); // some OSes are just stupid enough to do this
- }
+ $path = getenv('PATH');
+ if (!$path) {
+ $path = getenv('Path'); // some OSes are just stupid enough to do this
}
+
$path_elements = explode(PATH_SEPARATOR, $path);
}
@@ -55703,17 +55722,14 @@ class System
if (strpos($program, '.') !== false) {
array_unshift($exe_suffixes, '');
}
- // is_executable() is not available on windows for PHP4
- $pear_is_executable = (function_exists('is_executable')) ? 'is_executable' : 'is_file';
} else {
$exe_suffixes = array('');
- $pear_is_executable = 'is_executable';
}
foreach ($exe_suffixes as $suff) {
foreach ($path_elements as $dir) {
$file = $dir . DIRECTORY_SEPARATOR . $program . $suff;
- if (@$pear_is_executable($file)) {
+ if (is_executable($file)) {
return $file;
}
}
@@ -55807,7 +55823,7 @@ class System
}
return $files;
}
-}
+}
Name: @rpm_package@
Version: @version@
Release: 1
@@ -55895,7 +55911,6 @@ cp -p package@package2xml@.xml %{buildroot}@rpm_xml_dir@/@package@.xml
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2010 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -55914,8 +55929,6 @@ define('PEAR_ERROR_CALLBACK', 16);
*/
define('PEAR_ERROR_EXCEPTION', 32);
/**#@-*/
-define('PEAR_ZE2', (function_exists('version_compare') &&
- version_compare(zend_version(), "2-dev", "ge")));
if (substr(PHP_OS, 0, 3) == 'WIN') {
define('OS_WINDOWS', true);
@@ -56027,7 +56040,7 @@ class PEAR
* @access public
* @return void
*/
- function PEAR($error_class = null)
+ function __construct($error_class = null)
{
$classname = strtolower(get_class($this));
if ($this->_debug) {
@@ -56055,6 +56068,18 @@ class PEAR
}
/**
+ * Only here for backwards compatibility.
+ * E.g. Archive_Tar calls $this->PEAR() in its constructor.
+ *
+ * @param string $error_class Which class to use for error objects,
+ * defaults to PEAR_Error.
+ */
+ public function PEAR($error_class = null)
+ {
+ $this->__construct($error_class);
+ }
+
+ /**
* Destructor (the emulated type of...). Does nothing right now,
* but is included for forward compatibility, so subclass
* destructors should always call it.
@@ -56083,7 +56108,7 @@ class PEAR
* @return mixed A reference to the variable. If not set it will be
* auto initialised to NULL.
*/
- function &getStaticProperty($class, $var)
+ static function &getStaticProperty($class, $var)
{
static $properties;
if (!isset($properties[$class])) {
@@ -56402,12 +56427,6 @@ class PEAR
$ec = 'PEAR_Error';
}
- if (intval(PHP_VERSION) < 5) {
- // little non-eval hack to fix bug #12147
- include 'phar://install-pear-nozlib.phar/' . 'PEAR/FixPHP5PEARWarnings.php';
- return $a;
- }
-
if ($skipmsg) {
$a = new $ec($code, $mode, $options, $userinfo);
} else {
@@ -56585,8 +56604,7 @@ class PEAR
// if either returns true dl() will produce a FATAL error, stop that
if (
function_exists('dl') === false ||
- ini_get('enable_dl') != 1 ||
- ini_get('safe_mode') == 1
+ ini_get('enable_dl') != 1
) {
return false;
}
@@ -56607,10 +56625,6 @@ class PEAR
}
}
-if (PEAR_ZE2) {
- include_once 'phar://install-pear-nozlib.phar/' . 'PEAR5.php';
-}
-
function _PEAR_call_destructors()
{
global $_PEAR_destructor_object_list;
@@ -56618,11 +56632,8 @@ function _PEAR_call_destructors()
sizeof($_PEAR_destructor_object_list))
{
reset($_PEAR_destructor_object_list);
- if (PEAR_ZE2) {
- $destructLifoExists = PEAR5::getStaticProperty('PEAR', 'destructlifo');
- } else {
- $destructLifoExists = PEAR::getStaticProperty('PEAR', 'destructlifo');
- }
+
+ $destructLifoExists = PEAR::getStaticProperty('PEAR', 'destructlifo');
if ($destructLifoExists) {
$_PEAR_destructor_object_list = array_reverse($_PEAR_destructor_object_list);
@@ -56704,7 +56715,7 @@ class PEAR_Error
* @access public
*
*/
- function PEAR_Error($message = 'unknown error', $code = null,
+ function __construct($message = 'unknown error', $code = null,
$mode = null, $options = null, $userinfo = null)
{
if ($mode === null) {
@@ -56715,11 +56726,7 @@ class PEAR_Error
$this->mode = $mode;
$this->userinfo = $userinfo;
- if (PEAR_ZE2) {
- $skiptrace = PEAR5::getStaticProperty('PEAR_Error', 'skiptrace');
- } else {
- $skiptrace = PEAR::getStaticProperty('PEAR_Error', 'skiptrace');
- }
+ $skiptrace = PEAR::getStaticProperty('PEAR_Error', 'skiptrace');
if (!$skiptrace) {
$this->backtrace = debug_backtrace();
@@ -56953,7 +56960,6 @@ class PEAR_Error
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -57138,7 +57144,7 @@ class PEAR_ChannelFile
*/
var $_isValid = false;
- function PEAR_ChannelFile()
+ function __construct()
{
$this->_stack = new PEAR_ErrorStack('PEAR_ChannelFile');
$this->_stack->setErrorMessageTemplate($this->_getErrorMessage());
@@ -58500,7 +58506,8 @@ class PEAR_ChannelFile
return time();
}
-}<?php
+}
+<?php
/**
* PEAR_ChannelFile_Parser for parsing channel.xml
*
@@ -58511,7 +58518,6 @@ class PEAR_ChannelFile
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -58579,7 +58585,6 @@ class PEAR_ChannelFile_Parser extends PEAR_XMLParser
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -58992,7 +58997,6 @@ class PEAR_Command
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -59063,9 +59067,9 @@ class PEAR_Command_Common extends PEAR
*
* @access public
*/
- function PEAR_Command_Common(&$ui, &$config)
+ function __construct(&$ui, &$config)
{
- parent::PEAR();
+ parent::__construct();
$this->config = &$config;
$this->ui = &$ui;
}
@@ -59252,7 +59256,8 @@ class PEAR_Command_Common extends PEAR
return $this->$func($command, $options, $params);
}
-}<?php
+}
+<?php
/**
* PEAR_Command_Install (install, upgrade, upgrade-all, uninstall, bundle, run-scripts commands)
*
@@ -59264,7 +59269,6 @@ class PEAR_Command_Common extends PEAR
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -59567,9 +59571,9 @@ Run post-installation scripts in package <package>, if any exist.
*
* @access public
*/
- function PEAR_Command_Install(&$ui, &$config)
+ function __construct(&$ui, &$config)
{
- parent::PEAR_Command_Common($ui, $config);
+ parent::__construct($ui, $config);
}
// }}}
@@ -60024,18 +60028,7 @@ Run post-installation scripts in package <package>, if any exist.
$exttype = 'extension';
$extpath = $pinfo[1]['basename'];
} else {
- if (version_compare(PHP_VERSION, '5.3.0', '<')) {
- ob_start();
- phpinfo(INFO_GENERAL);
- $info = ob_get_contents();
- ob_end_clean();
- $debug = function_exists('leak') ? '_debug' : '';
- $ts = preg_match('/Thread Safety.+enabled/', $info) ? '_ts' : '';
- } else {
- $debug = '';
- $ts = '';
- }
- $exttype = 'zend_extension' . $debug . $ts;
+ $exttype = 'zend_extension';
$extpath = $atts['installed_as'];
}
$extrainfo[] = 'You should add "' . $exttype . '=' .
@@ -60815,7 +60808,6 @@ Run post-installation scripts in package &lt;package&gt;, if any exist.
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1.0
* @deprecated File deprecated since Release 1.4.0a1
@@ -60969,9 +60961,9 @@ class PEAR_Common extends PEAR
*
* @access public
*/
- function PEAR_Common()
+ function __construct()
{
- parent::PEAR();
+ parent::__construct();
$this->config = &PEAR_Config::singleton();
$this->debug = $this->config->get('verbose');
}
@@ -61638,7 +61630,8 @@ class PEAR_Common extends PEAR
}
require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Config.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile.php';<?php
+require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile.php';
+<?php
/**
* PEAR_Config, customized configuration handling for the PEAR Installer
*
@@ -61650,7 +61643,6 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile.php';<?php
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -62232,10 +62224,10 @@ class PEAR_Config extends PEAR
*
* @see PEAR_Config::singleton
*/
- function PEAR_Config($user_file = '', $system_file = '', $ftp_file = false,
+ function __construct($user_file = '', $system_file = '', $ftp_file = false,
$strict = true)
{
- $this->PEAR();
+ parent::__construct();
PEAR_Installer_Role::initializeConfig($this);
$sl = DIRECTORY_SEPARATOR;
if (empty($user_file)) {
@@ -63742,7 +63734,6 @@ class PEAR_Config extends PEAR
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -63815,7 +63806,7 @@ class PEAR_Dependency2
* @param array format of PEAR_Registry::parsedPackageName()
* @param int installation state (one of PEAR_VALIDATE_*)
*/
- function PEAR_Dependency2(&$config, $installoptions, $package,
+ function __construct(&$config, $installoptions, $package,
$state = PEAR_VALIDATE_INSTALLING)
{
$this->_config = &$config;
@@ -65101,7 +65092,6 @@ class PEAR_Dependency2
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -65865,7 +65855,6 @@ class PEAR_DependencyDB
* @author Martin Jansen <mj@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.3.0
*/
@@ -65998,22 +65987,26 @@ class PEAR_Downloader extends PEAR_Common
* @param array
* @param PEAR_Config
*/
- function PEAR_Downloader(&$ui, $options, &$config)
+ function __construct($ui = null, $options = array(), $config = null)
{
- parent::PEAR_Common();
+ parent::__construct();
$this->_options = $options;
- $this->config = &$config;
- $this->_preferredState = $this->config->get('preferred_state');
+ if ($config !== null) {
+ $this->config = &$config;
+ $this->_preferredState = $this->config->get('preferred_state');
+ }
$this->ui = &$ui;
if (!$this->_preferredState) {
// don't inadvertantly use a non-set preferred_state
$this->_preferredState = null;
}
- if (isset($this->_options['installroot'])) {
- $this->config->setInstallRoot($this->_options['installroot']);
+ if ($config !== null) {
+ if (isset($this->_options['installroot'])) {
+ $this->config->setInstallRoot($this->_options['installroot']);
+ }
+ $this->_registry = &$config->getRegistry();
}
- $this->_registry = &$config->getRegistry();
if (isset($this->_options['alldeps']) || isset($this->_options['onlyreqdeps'])) {
$this->_installed = $this->_registry->listAllPackages();
@@ -67616,7 +67609,8 @@ class PEAR_Downloader extends PEAR_Common
}
return $dest_file;
}
-}<?php
+}
+<?php
/**
* PEAR_Downloader_Package
*
@@ -67627,7 +67621,6 @@ class PEAR_Downloader extends PEAR_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -67748,7 +67741,7 @@ class PEAR_Downloader_Package
/**
* @param PEAR_Downloader
*/
- function PEAR_Downloader_Package(&$downloader)
+ function __construct(&$downloader)
{
$this->_downloader = &$downloader;
$this->_config = &$this->_downloader->config;
@@ -69601,7 +69594,8 @@ class PEAR_Downloader_Package
return $info;
}
-}<?php
+}
+<?php
/**
* Error Stack Implementation
*
@@ -69626,7 +69620,6 @@ class PEAR_Downloader_Package
* @author Greg Beaver <cellog@php.net>
* @copyright 2004-2008 Greg Beaver
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR_ErrorStack
*/
@@ -69740,7 +69733,6 @@ define('PEAR_ERRORSTACK_ERR_OBJTOSTRING', 2);
* @category Debugging
* @copyright 2004-2008 Greg Beaver
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR_ErrorStack
*/
class PEAR_ErrorStack {
@@ -69797,43 +69789,43 @@ class PEAR_ErrorStack {
* @access protected
*/
var $_contextCallback = false;
-
+
/**
* If set to a valid callback, this will be called every time an error
* is pushed onto the stack. The return value will be used to determine
* whether to allow an error to be pushed or logged.
- *
+ *
* The return value must be one an PEAR_ERRORSTACK_* constant
* @see PEAR_ERRORSTACK_PUSHANDLOG, PEAR_ERRORSTACK_PUSH, PEAR_ERRORSTACK_LOG
* @var false|string|array
* @access protected
*/
var $_errorCallback = array();
-
+
/**
* PEAR::Log object for logging errors
* @var false|Log
* @access protected
*/
var $_logger = false;
-
+
/**
* Error messages - designed to be overridden
* @var array
* @abstract
*/
var $_errorMsgs = array();
-
+
/**
* Set up a new error stack
- *
+ *
* @param string $package name of the package this error stack represents
* @param callback $msgCallback callback used for error message generation
* @param callback $contextCallback callback used for context generation,
* defaults to {@link getFileLine()}
* @param boolean $throwPEAR_Error
*/
- function PEAR_ErrorStack($package, $msgCallback = false, $contextCallback = false,
+ function __construct($package, $msgCallback = false, $contextCallback = false,
$throwPEAR_Error = false)
{
$this->_package = $package;
@@ -70597,7 +70589,6 @@ $stack->pushCallback(array('PEAR_ErrorStack', '_handleError'));
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -70825,7 +70816,6 @@ class PEAR_Frontend extends PEAR
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -70862,9 +70852,9 @@ class PEAR_Frontend_CLI extends PEAR_Frontend
'normal' => '',
);
- function PEAR_Frontend_CLI()
+ function __construct()
{
- parent::PEAR();
+ parent::__construct();
$term = getenv('TERM'); //(cox) $_ENV is empty for me in 4.1.1
if (function_exists('posix_isatty') && !posix_isatty(1)) {
// output is being redirected to a file or through a pipe
@@ -71563,7 +71553,8 @@ class PEAR_Frontend_CLI extends PEAR_Frontend
{
print $text;
}
-}<?php
+}
+<?php
/**
* PEAR_Installer
*
@@ -71577,7 +71568,6 @@ class PEAR_Frontend_CLI extends PEAR_Frontend
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -71681,9 +71671,9 @@ class PEAR_Installer extends PEAR_Downloader
*
* @access public
*/
- function PEAR_Installer(&$ui)
+ function __construct(&$ui)
{
- parent::PEAR_Common();
+ parent::__construct($ui, array(), null);
$this->setFrontendObject($ui);
$this->debug = $this->config->get('verbose');
}
@@ -73388,7 +73378,8 @@ class PEAR_Installer extends PEAR_Downloader
}
// }}}
-}<?php
+}
+<?php
/**
* PEAR_Installer_Role
*
@@ -73399,7 +73390,6 @@ class PEAR_Installer extends PEAR_Downloader
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -73674,7 +73664,6 @@ class PEAR_Installer_Role
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -73704,7 +73693,7 @@ class PEAR_Installer_Role_Common
/**
* @param PEAR_Config
*/
- function PEAR_Installer_Role_Common(&$config)
+ function __construct(&$config)
{
$this->config = $config;
}
@@ -73836,7 +73825,8 @@ class PEAR_Installer_Role_Common
return $roleInfo['phpextension'];
}
}
-?><?php
+?>
+<?php
/**
* PEAR_Installer_Role_Data
*
@@ -73847,7 +73837,6 @@ class PEAR_Installer_Role_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -73888,7 +73877,6 @@ class PEAR_Installer_Role_Data extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -73929,7 +73917,6 @@ class PEAR_Installer_Role_Doc extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -73970,7 +73957,6 @@ class PEAR_Installer_Role_Php extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -74011,7 +73997,6 @@ class PEAR_Installer_Role_Script extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -74052,7 +74037,6 @@ class PEAR_Installer_Role_Test extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -74110,7 +74094,7 @@ class PEAR_PackageFile
* @param string @tmpdir Optional temporary directory for uncompressing
* files
*/
- function PEAR_PackageFile(&$config, $debug = false)
+ function __construct(&$config, $debug = false)
{
$this->_config = $config;
$this->_debug = $debug;
@@ -74532,7 +74516,8 @@ class PEAR_PackageFile
$info = PEAR::raiseError("Cannot open '$info' for parsing");
return $info;
}
-}<?php
+}
+<?php
/**
* package.xml generation class, package.xml version 1.0
*
@@ -74543,7 +74528,6 @@ class PEAR_PackageFile
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -74573,7 +74557,7 @@ class PEAR_PackageFile_Generator_v1
* @var PEAR_PackageFile_v1
*/
var $_packagefile;
- function PEAR_PackageFile_Generator_v1(&$packagefile)
+ function __construct(&$packagefile)
{
$this->_packagefile = &$packagefile;
}
@@ -74702,9 +74686,6 @@ class PEAR_PackageFile_Generator_v1
*/
function _fixXmlEncoding($string)
{
- if (version_compare(phpversion(), '5.0.0', 'lt')) {
- $string = utf8_encode($string);
- }
return strtr($string, array(
'&' => '&amp;',
'>' => '&gt;',
@@ -75815,7 +75796,8 @@ class PEAR_PackageFile_Generator_v1
return $ret;
}
}
-?><?php
+?>
+<?php
/**
* package.xml generation class, package.xml version 2.0
*
@@ -75827,7 +75809,6 @@ class PEAR_PackageFile_Generator_v1
* @author Stephan Schmidt (original XML_Serializer code)
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -75917,7 +75898,7 @@ http://pear.php.net/dtd/package-2.0.xsd',
/**
* @param PEAR_PackageFile_v2
*/
- function PEAR_PackageFile_Generator_v2(&$packagefile)
+ function __construct(&$packagefile)
{
$this->_packagefile = &$packagefile;
if (isset($this->_packagefile->encoding)) {
@@ -76686,12 +76667,6 @@ http://pear.php.net/dtd/package-2.0.xsd',
}
if (is_scalar($tag['content']) || is_null($tag['content'])) {
- if ($this->options['encoding'] == 'UTF-8' &&
- version_compare(phpversion(), '5.0.0', 'lt')
- ) {
- $tag['content'] = utf8_encode($tag['content']);
- }
-
if ($replaceEntities === true) {
$replaceEntities = XML_UTIL_ENTITIES_XML;
}
@@ -76719,7 +76694,6 @@ http://pear.php.net/dtd/package-2.0.xsd',
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -77177,7 +77151,6 @@ class PEAR_PackageFile_Parser_v1
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -77289,7 +77262,6 @@ class PEAR_PackageFile_Parser_v2 extends PEAR_XMLParser
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -77626,7 +77598,7 @@ class PEAR_PackageFile_v1
* @param bool determines whether to return a PEAR_Error object, or use the PEAR_ErrorStack
* @param string Name of Error Stack class to use.
*/
- function PEAR_PackageFile_v1()
+ function __construct()
{
$this->_stack = new PEAR_ErrorStack('PEAR_PackageFile_v1');
$this->_stack->setErrorMessageTemplate($this->_getErrorMessage());
@@ -78746,15 +78718,6 @@ class PEAR_PackageFile_v1
$look_for = $token;
continue 2;
case T_STRING:
- if (version_compare(zend_version(), '2.0', '<')) {
- if (in_array(strtolower($data),
- array('public', 'private', 'protected', 'abstract',
- 'interface', 'implements', 'throw')
- )) {
- $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_PHP5,
- array($file));
- }
- }
if ($look_for == T_CLASS) {
$current_class = $data;
$current_class_level = $brace_level;
@@ -78901,7 +78864,6 @@ class PEAR_PackageFile_v1
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -79021,7 +78983,7 @@ class PEAR_PackageFile_v2
/**
* The constructor merely sets up the private error stack
*/
- function PEAR_PackageFile_v2()
+ function __construct()
{
$this->_stack = new PEAR_ErrorStack('PEAR_PackageFile_v2', false, null);
$this->_isValid = false;
@@ -80069,6 +80031,9 @@ class PEAR_PackageFile_v2
$contents['dir']['file'] = array($contents['dir']['file']);
}
foreach ($contents['dir']['file'] as $file) {
+ if (!isset($file['attribs']['name'])) {
+ continue;
+ }
$name = $file['attribs']['name'];
if (!$preserve) {
$file = $file['attribs'];
@@ -80950,7 +80915,6 @@ class PEAR_PackageFile_v2
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a8
*/
@@ -82922,25 +82886,6 @@ class PEAR_PackageFile_v2_Validator
$look_for = $token;
continue 2;
case T_STRING:
- if (version_compare(zend_version(), '2.0', '<')) {
- if (in_array(strtolower($data),
- array('public', 'private', 'protected', 'abstract',
- 'interface', 'implements', 'throw')
- )
- ) {
- if (isset($this->_stack)) {
- $this->_stack->push(__FUNCTION__, 'warning', array(
- 'file' => $file),
- 'Error, PHP5 token encountered in %file%,' .
- ' analysis should be in PHP5');
- } else {
- PEAR::raiseError('Error: PHP5 token encountered in ' . $file .
- 'packaging should be done in PHP 5');
- return false;
- }
- }
- }
-
if ($look_for == T_CLASS) {
$current_class = $data;
$current_class_level = $brace_level;
@@ -83107,7 +83052,6 @@ class PEAR_PackageFile_v2_Validator
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -83227,10 +83171,10 @@ class PEAR_Registry extends PEAR
*
* @access public
*/
- function PEAR_Registry($pear_install_dir = PEAR_INSTALL_DIR, $pear_channel = false,
+ function __construct($pear_install_dir = PEAR_INSTALL_DIR, $pear_channel = false,
$pecl_channel = false)
{
- parent::PEAR();
+ parent::__construct();
$this->setInstallDir($pear_install_dir);
$this->_pearChannel = $pear_channel;
$this->_peclChannel = $pecl_channel;
@@ -85479,7 +85423,8 @@ class PEAR_Registry extends PEAR
}
return $ret;
}
-}<?php
+}
+<?php
/**
* PEAR_REST
*
@@ -85490,7 +85435,6 @@ class PEAR_Registry extends PEAR
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -85518,7 +85462,7 @@ class PEAR_REST
var $config;
var $_options;
- function PEAR_REST(&$config, $options = array())
+ function __construct(&$config, $options = array())
{
$this->config = &$config;
$this->_options = $options;
@@ -85980,7 +85924,6 @@ class PEAR_REST
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a12
*/
@@ -86008,7 +85951,7 @@ class PEAR_REST_10
* @var PEAR_REST
*/
var $_rest;
- function PEAR_REST_10($config, $options = array())
+ function __construct($config, $options = array())
{
$this->_rest = new PEAR_REST($config, $options);
}
@@ -86839,7 +86782,8 @@ class PEAR_REST_10
return 1;
}
}
-}<?php
+}
+<?php
require_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
require_once 'phar://install-pear-nozlib.phar/' . 'System.php';
require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Config.php';
@@ -86914,9 +86858,9 @@ class PEAR_Start extends PEAR
var $tarball = array();
var $ptmp;
- function PEAR_Start()
+ function __construct()
{
- parent::PEAR();
+ parent::__construct();
if (OS_WINDOWS) {
$this->configPrompt['php_bin'] = 'Path to CLI php.exe';
$this->config[] = 'php_bin';
@@ -87306,9 +87250,9 @@ class PEAR_Start_CLI extends PEAR_Start
*/
var $php_bin_sapi;
- function PEAR_Start_CLI()
+ function __construct()
{
- parent::PEAR_Start();
+ parent::construct();
ini_set('html_errors', 0);
define('WIN32GUI', OS_WINDOWS && php_sapi_name() == 'cli' && System::which('cscript'));
$this->tty = OS_WINDOWS ? @fopen('\con', 'r') : @fopen('/dev/tty', 'r');
@@ -87909,20 +87853,20 @@ Double-click this file to add it to the current user registry.
{
}
}
-?><?php
+?>
+<?php
/**
* PEAR_Task_Common, base class for installer tasks
*
* PHP versions 4 and 5
*
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @link http://pear.php.net/package/PEAR
+ * @since File available since Release 1.4.0a1
*/
/**#@+
* Error codes for task validation routines
@@ -87953,14 +87897,15 @@ define('PEAR_TASK_PACKAGEANDINSTALL', 3);
* This will first replace any instance of @data-dir@ in the test.php file
* with the path to the current data directory. Then, it will include the
* test.php file and run the script it contains to configure the package post-installation.
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
+ *
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @version Release: 1.9.5
+ * @link http://pear.php.net/package/PEAR
+ * @since Class available since Release 1.4.0a1
* @abstract
*/
class PEAR_Task_Common
@@ -87973,34 +87918,35 @@ class PEAR_Task_Common
* changes directly to disk
*
* Child task classes must override this property.
+ *
* @access protected
*/
- var $type = 'simple';
+ protected $type = 'simple';
/**
* Determines which install phase this task is executed under
*/
- var $phase = PEAR_TASK_INSTALL;
+ public $phase = PEAR_TASK_INSTALL;
/**
* @access protected
*/
- var $config;
+ protected $config;
/**
* @access protected
*/
- var $registry;
+ protected $registry;
/**
* @access protected
*/
- var $logger;
+ public $logger;
/**
* @access protected
*/
- var $installphase;
+ protected $installphase;
/**
* @param PEAR_Config
* @param PEAR_Common
*/
- function PEAR_Task_Common(&$config, &$logger, $phase)
+ function __construct(&$config, &$logger, $phase)
{
$this->config = &$config;
$this->registry = &$config->getRegistry();
@@ -88013,60 +87959,67 @@ class PEAR_Task_Common
/**
* Validate the basic contents of a task tag.
+ *
* @param PEAR_PackageFile_v2
* @param array
* @param PEAR_Config
* @param array the entire parsed <file> tag
+ *
* @return true|array On error, return an array in format:
- * array(PEAR_TASK_ERROR_???[, param1][, param2][, ...])
+ * array(PEAR_TASK_ERROR_???[, param1][, param2][, ...])
+ *
+ * For PEAR_TASK_ERROR_MISSING_ATTRIB, pass the attribute name in
+ * For PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, pass the attribute name and
+ * an array of legal values in
*
- * For PEAR_TASK_ERROR_MISSING_ATTRIB, pass the attribute name in
- * For PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, pass the attribute name and an array
- * of legal values in
* @static
* @abstract
*/
- function validateXml($pkg, $xml, $config, $fileXml)
+ public function validateXml($pkg, $xml, $config, $fileXml)
{
}
/**
* Initialize a task instance with the parameters
- * @param array raw, parsed xml
- * @param array attributes from the <file> tag containing this task
- * @param string|null last installed version of this package
+ *
+ * @param array raw, parsed xml
+ * @param array attributes from the <file> tag containing this task
+ * @param string|null last installed version of this package
* @abstract
*/
- function init($xml, $fileAttributes, $lastVersion)
+ public function init($xml, $fileAttributes, $lastVersion)
{
}
/**
- * Begin a task processing session. All multiple tasks will be processed after each file
- * has been successfully installed, all simple tasks should perform their task here and
- * return any errors using the custom throwError() method to allow forward compatibility
+ * Begin a task processing session. All multiple tasks will be processed
+ * after each file has been successfully installed, all simple tasks should
+ * perform their task here and return any errors using the custom
+ * throwError() method to allow forward compatibility
*
* This method MUST NOT write out any changes to disk
- * @param PEAR_PackageFile_v2
- * @param string file contents
- * @param string the eventual final file location (informational only)
- * @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail
- * (use $this->throwError), otherwise return the new contents
+ *
+ * @param PEAR_PackageFile_v2
+ * @param string file contents
+ * @param string the eventual final file location (informational only)
+ * @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail
+ * (use $this->throwError), otherwise return the new contents
* @abstract
*/
- function startSession($pkg, $contents, $dest)
+ public function startSession($pkg, $contents, $dest)
{
}
/**
- * This method is used to process each of the tasks for a particular multiple class
- * type. Simple tasks need not implement this method.
- * @param array an array of tasks
- * @access protected
+ * This method is used to process each of the tasks for a particular
+ * multiple class type. Simple tasks need not implement this method.
+ *
+ * @param array an array of tasks
+ * @access protected
* @static
* @abstract
*/
- function run($tasks)
+ public function run($tasks)
{
}
@@ -88074,56 +88027,58 @@ class PEAR_Task_Common
* @static
* @final
*/
- function hasPostinstallTasks()
+ public function hasPostinstallTasks()
{
return isset($GLOBALS['_PEAR_TASK_POSTINSTANCES']);
}
- /**
- * @static
- * @final
- */
- function runPostinstallTasks()
- {
- foreach ($GLOBALS['_PEAR_TASK_POSTINSTANCES'] as $class => $tasks) {
- $err = call_user_func(array($class, 'run'),
- $GLOBALS['_PEAR_TASK_POSTINSTANCES'][$class]);
- if ($err) {
- return PEAR_Task_Common::throwError($err);
- }
- }
- unset($GLOBALS['_PEAR_TASK_POSTINSTANCES']);
+ /**
+ * @static
+ * @final
+ */
+ public function runPostinstallTasks()
+ {
+ foreach ($GLOBALS['_PEAR_TASK_POSTINSTANCES'] as $class => $tasks) {
+ $err = call_user_func(
+ array($class, 'run'),
+ $GLOBALS['_PEAR_TASK_POSTINSTANCES'][$class]
+ );
+ if ($err) {
+ return PEAR_Task_Common::throwError($err);
+ }
+ }
+ unset($GLOBALS['_PEAR_TASK_POSTINSTANCES']);
}
/**
* Determines whether a role is a script
* @return bool
*/
- function isScript()
+ public function isScript()
{
- return $this->type == 'script';
+ return $this->type == 'script';
}
- function throwError($msg, $code = -1)
+ public function throwError($msg, $code = -1)
{
include_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
+
return PEAR::raiseError($msg, $code);
}
}
-?><?php
+<?php
/**
* <tasks:postinstallscript>
*
* PHP versions 4 and 5
*
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @link http://pear.php.net/package/PEAR
+ * @since File available since Release 1.4.0a1
*/
/**
* Base class
@@ -88134,85 +88089,96 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Common.php';
*
* Note that post-install scripts are handled separately from installation, by the
* "pear run-scripts" command
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
+ *
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @version Release: 1.9.5
+ * @link http://pear.php.net/package/PEAR
+ * @since Class available since Release 1.4.0a1
*/
class PEAR_Task_Postinstallscript extends PEAR_Task_Common
{
- var $type = 'script';
- var $_class;
- var $_params;
- var $_obj;
+ public $type = 'script';
+ public $_class;
+ public $_params;
+ public $_obj;
/**
*
* @var PEAR_PackageFile_v2
*/
- var $_pkg;
- var $_contents;
- var $phase = PEAR_TASK_INSTALL;
+ public $_pkg;
+ public $_contents;
+ public $phase = PEAR_TASK_INSTALL;
/**
* Validate the raw xml at parsing-time.
*
* This also attempts to validate the script to make sure it meets the criteria
* for a post-install script
- * @param PEAR_PackageFile_v2
- * @param array The XML contents of the <postinstallscript> tag
- * @param PEAR_Config
- * @param array the entire parsed <file> tag
+ *
+ * @param PEAR_PackageFile_v2
+ * @param array The XML contents of the <postinstallscript> tag
+ * @param PEAR_Config
+ * @param array the entire parsed <file> tag
* @static
*/
- function validateXml($pkg, $xml, $config, $fileXml)
+ public function validateXml($pkg, $xml, $config, $fileXml)
{
if ($fileXml['role'] != 'php') {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" must be role="php"');
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" must be role="php"', );
}
PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
$file = $pkg->getFileContents($fileXml['name']);
if (PEAR::isError($file)) {
PEAR::popErrorHandling();
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" is not valid: ' .
- $file->getMessage());
+
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" is not valid: '.
+ $file->getMessage(), );
} elseif ($file === null) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" could not be retrieved for processing!');
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" could not be retrieved for processing!', );
} else {
$analysis = $pkg->analyzeSourceCode($file, true);
if (!$analysis) {
PEAR::popErrorHandling();
$warnings = '';
foreach ($pkg->getValidationWarnings() as $warn) {
- $warnings .= $warn['message'] . "\n";
+ $warnings .= $warn['message']."\n";
}
- return array(PEAR_TASK_ERROR_INVALID, 'Analysis of post-install script "' .
- $fileXml['name'] . '" failed: ' . $warnings);
+
+ return array(PEAR_TASK_ERROR_INVALID, 'Analysis of post-install script "'.
+ $fileXml['name'].'" failed: '.$warnings, );
}
if (count($analysis['declared_classes']) != 1) {
PEAR::popErrorHandling();
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" must declare exactly 1 class');
+
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" must declare exactly 1 class', );
}
$class = $analysis['declared_classes'][0];
- if ($class != str_replace(array('/', '.php'), array('_', ''),
- $fileXml['name']) . '_postinstall') {
+ if ($class != str_replace(
+ array('/', '.php'), array('_', ''),
+ $fileXml['name']
+ ).'_postinstall') {
PEAR::popErrorHandling();
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" class "' . $class . '" must be named "' .
- str_replace(array('/', '.php'), array('_', ''),
- $fileXml['name']) . '_postinstall"');
+
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" class "'.$class.'" must be named "'.
+ str_replace(
+ array('/', '.php'), array('_', ''),
+ $fileXml['name']
+ ).'_postinstall"', );
}
if (!isset($analysis['declared_methods'][$class])) {
PEAR::popErrorHandling();
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" must declare methods init() and run()');
+
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" must declare methods init() and run()', );
}
$methods = array('init' => 0, 'run' => 1);
foreach ($analysis['declared_methods'][$class] as $method) {
@@ -88222,129 +88188,137 @@ class PEAR_Task_Postinstallscript extends PEAR_Task_Common
}
if (count($methods)) {
PEAR::popErrorHandling();
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" must declare methods init() and run()');
+
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" must declare methods init() and run()', );
}
}
PEAR::popErrorHandling();
$definedparams = array();
- $tasksNamespace = $pkg->getTasksNs() . ':';
- if (!isset($xml[$tasksNamespace . 'paramgroup']) && isset($xml['paramgroup'])) {
+ $tasksNamespace = $pkg->getTasksNs().':';
+ if (!isset($xml[$tasksNamespace.'paramgroup']) && isset($xml['paramgroup'])) {
// in order to support the older betas, which did not expect internal tags
// to also use the namespace
$tasksNamespace = '';
}
- if (isset($xml[$tasksNamespace . 'paramgroup'])) {
- $params = $xml[$tasksNamespace . 'paramgroup'];
+ if (isset($xml[$tasksNamespace.'paramgroup'])) {
+ $params = $xml[$tasksNamespace.'paramgroup'];
if (!is_array($params) || !isset($params[0])) {
$params = array($params);
}
foreach ($params as $param) {
- if (!isset($param[$tasksNamespace . 'id'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" <paramgroup> must have ' .
- 'an ' . $tasksNamespace . 'id> tag');
- }
- if (isset($param[$tasksNamespace . 'name'])) {
- if (!in_array($param[$tasksNamespace . 'name'], $definedparams)) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" ' . $tasksNamespace .
- 'paramgroup> id "' . $param[$tasksNamespace . 'id'] .
- '" parameter "' . $param[$tasksNamespace . 'name'] .
- '" has not been previously defined');
- }
- if (!isset($param[$tasksNamespace . 'conditiontype'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" ' . $tasksNamespace .
- 'paramgroup> id "' . $param[$tasksNamespace . 'id'] .
- '" must have a ' . $tasksNamespace .
- 'conditiontype> tag containing either "=", ' .
- '"!=", or "preg_match"');
- }
- if (!in_array($param[$tasksNamespace . 'conditiontype'],
- array('=', '!=', 'preg_match'))) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" ' . $tasksNamespace .
- 'paramgroup> id "' . $param[$tasksNamespace . 'id'] .
- '" must have a ' . $tasksNamespace .
- 'conditiontype> tag containing either "=", ' .
- '"!=", or "preg_match"');
- }
- if (!isset($param[$tasksNamespace . 'value'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" ' . $tasksNamespace .
- 'paramgroup> id "' . $param[$tasksNamespace . 'id'] .
- '" must have a ' . $tasksNamespace .
- 'value> tag containing expected parameter value');
- }
- }
- if (isset($param[$tasksNamespace . 'instructions'])) {
- if (!is_string($param[$tasksNamespace . 'instructions'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" ' . $tasksNamespace .
- 'paramgroup> id "' . $param[$tasksNamespace . 'id'] .
- '" ' . $tasksNamespace . 'instructions> must be simple text');
- }
- }
- if (!isset($param[$tasksNamespace . 'param'])) {
+ if (!isset($param[$tasksNamespace.'id'])) {
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" <paramgroup> must have '.
+ 'an '.$tasksNamespace.'id> tag', );
+ }
+ if (isset($param[$tasksNamespace.'name'])) {
+ if (!in_array($param[$tasksNamespace.'name'], $definedparams)) {
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" '.$tasksNamespace.
+ 'paramgroup> id "'.$param[$tasksNamespace.'id'].
+ '" parameter "'.$param[$tasksNamespace.'name'].
+ '" has not been previously defined', );
+ }
+ if (!isset($param[$tasksNamespace.'conditiontype'])) {
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" '.$tasksNamespace.
+ 'paramgroup> id "'.$param[$tasksNamespace.'id'].
+ '" must have a '.$tasksNamespace.
+ 'conditiontype> tag containing either "=", '.
+ '"!=", or "preg_match"', );
+ }
+ if (!in_array(
+ $param[$tasksNamespace.'conditiontype'],
+ array('=', '!=', 'preg_match')
+ )) {
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" '.$tasksNamespace.
+ 'paramgroup> id "'.$param[$tasksNamespace.'id'].
+ '" must have a '.$tasksNamespace.
+ 'conditiontype> tag containing either "=", '.
+ '"!=", or "preg_match"', );
+ }
+ if (!isset($param[$tasksNamespace.'value'])) {
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" '.$tasksNamespace.
+ 'paramgroup> id "'.$param[$tasksNamespace.'id'].
+ '" must have a '.$tasksNamespace.
+ 'value> tag containing expected parameter value', );
+ }
+ }
+ if (isset($param[$tasksNamespace.'instructions'])) {
+ if (!is_string($param[$tasksNamespace.'instructions'])) {
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" '.$tasksNamespace.
+ 'paramgroup> id "'.$param[$tasksNamespace.'id'].
+ '" '.$tasksNamespace.'instructions> must be simple text', );
+ }
+ }
+ if (!isset($param[$tasksNamespace.'param'])) {
continue; // <param> is no longer required
}
- $subparams = $param[$tasksNamespace . 'param'];
+ $subparams = $param[$tasksNamespace.'param'];
if (!is_array($subparams) || !isset($subparams[0])) {
$subparams = array($subparams);
}
foreach ($subparams as $subparam) {
- if (!isset($subparam[$tasksNamespace . 'name'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" parameter for ' .
- $tasksNamespace . 'paramgroup> id "' .
- $param[$tasksNamespace . 'id'] . '" must have ' .
- 'a ' . $tasksNamespace . 'name> tag');
- }
- if (!preg_match('/[a-zA-Z0-9]+/',
- $subparam[$tasksNamespace . 'name'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" parameter "' .
- $subparam[$tasksNamespace . 'name'] .
- '" for ' . $tasksNamespace . 'paramgroup> id "' .
- $param[$tasksNamespace . 'id'] .
- '" is not a valid name. Must contain only alphanumeric characters');
- }
- if (!isset($subparam[$tasksNamespace . 'prompt'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" parameter "' .
- $subparam[$tasksNamespace . 'name'] .
- '" for ' . $tasksNamespace . 'paramgroup> id "' .
- $param[$tasksNamespace . 'id'] .
- '" must have a ' . $tasksNamespace . 'prompt> tag');
- }
- if (!isset($subparam[$tasksNamespace . 'type'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' .
- $fileXml['name'] . '" parameter "' .
- $subparam[$tasksNamespace . 'name'] .
- '" for ' . $tasksNamespace . 'paramgroup> id "' .
- $param[$tasksNamespace . 'id'] .
- '" must have a ' . $tasksNamespace . 'type> tag');
- }
- $definedparams[] = $param[$tasksNamespace . 'id'] . '::' .
- $subparam[$tasksNamespace . 'name'];
+ if (!isset($subparam[$tasksNamespace.'name'])) {
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" parameter for '.
+ $tasksNamespace.'paramgroup> id "'.
+ $param[$tasksNamespace.'id'].'" must have '.
+ 'a '.$tasksNamespace.'name> tag', );
+ }
+ if (!preg_match(
+ '/[a-zA-Z0-9]+/',
+ $subparam[$tasksNamespace.'name']
+ )) {
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" parameter "'.
+ $subparam[$tasksNamespace.'name'].
+ '" for '.$tasksNamespace.'paramgroup> id "'.
+ $param[$tasksNamespace.'id'].
+ '" is not a valid name. Must contain only alphanumeric characters', );
+ }
+ if (!isset($subparam[$tasksNamespace.'prompt'])) {
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" parameter "'.
+ $subparam[$tasksNamespace.'name'].
+ '" for '.$tasksNamespace.'paramgroup> id "'.
+ $param[$tasksNamespace.'id'].
+ '" must have a '.$tasksNamespace.'prompt> tag', );
+ }
+ if (!isset($subparam[$tasksNamespace.'type'])) {
+ return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
+ $fileXml['name'].'" parameter "'.
+ $subparam[$tasksNamespace.'name'].
+ '" for '.$tasksNamespace.'paramgroup> id "'.
+ $param[$tasksNamespace.'id'].
+ '" must have a '.$tasksNamespace.'type> tag', );
+ }
+ $definedparams[] = $param[$tasksNamespace.'id'].'::'.
+ $subparam[$tasksNamespace.'name'];
}
}
}
+
return true;
}
/**
* Initialize a task instance with the parameters
- * @param array raw, parsed xml
- * @param array attributes from the <file> tag containing this task
- * @param string|null last installed version of this package, if any (useful for upgrades)
+ * @param array $xml raw, parsed xml
+ * @param array $fileattribs attributes from the <file> tag containing
+ * this task
+ * @param string|null $lastversion last installed version of this package,
+ * if any (useful for upgrades)
*/
- function init($xml, $fileattribs, $lastversion)
+ public function init($xml, $fileattribs, $lastversion)
{
$this->_class = str_replace('/', '_', $fileattribs['name']);
$this->_filename = $fileattribs['name'];
- $this->_class = str_replace ('.php', '', $this->_class) . '_postinstall';
+ $this->_class = str_replace('.php', '', $this->_class).'_postinstall';
$this->_params = $xml;
$this->_lastversion = $lastversion;
}
@@ -88354,7 +88328,7 @@ class PEAR_Task_Postinstallscript extends PEAR_Task_Common
*
* @access private
*/
- function _stripNamespace($params = null)
+ public function _stripNamespace($params = null)
{
if ($params === null) {
$params = array();
@@ -88365,7 +88339,7 @@ class PEAR_Task_Postinstallscript extends PEAR_Task_Common
if (is_array($param)) {
$param = $this->_stripNamespace($param);
}
- $params[str_replace($this->_pkg->getTasksNs() . ':', '', $i)] = $param;
+ $params[str_replace($this->_pkg->getTasksNs().':', '', $i)] = $param;
}
$this->_params = $params;
} else {
@@ -88374,21 +88348,24 @@ class PEAR_Task_Postinstallscript extends PEAR_Task_Common
if (is_array($param)) {
$param = $this->_stripNamespace($param);
}
- $newparams[str_replace($this->_pkg->getTasksNs() . ':', '', $i)] = $param;
+ $newparams[str_replace($this->_pkg->getTasksNs().':', '', $i)] = $param;
}
+
return $newparams;
}
}
/**
- * Unlike other tasks, the installed file name is passed in instead of the file contents,
- * because this task is handled post-installation
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @param string file name
+ * Unlike other tasks, the installed file name is passed in instead of the
+ * file contents, because this task is handled post-installation
+ *
+ * @param mixed $pkg PEAR_PackageFile_v1|PEAR_PackageFile_v2
+ * @param string $contents file name
+ *
* @return bool|PEAR_Error false to skip this file, PEAR_Error to fail
- * (use $this->throwError)
+ * (use $this->throwError)
*/
- function startSession($pkg, $contents)
+ public function startSession($pkg, $contents)
{
if ($this->installphase != PEAR_TASK_INSTALL) {
return false;
@@ -88396,56 +88373,63 @@ class PEAR_Task_Postinstallscript extends PEAR_Task_Common
// remove the tasks: namespace if present
$this->_pkg = $pkg;
$this->_stripNamespace();
- $this->logger->log(0, 'Including external post-installation script "' .
- $contents . '" - any errors are in this script');
+ $this->logger->log(
+ 0, 'Including external post-installation script "'.
+ $contents.'" - any errors are in this script'
+ );
include_once 'phar://install-pear-nozlib.phar/' . $contents;
if (class_exists($this->_class)) {
$this->logger->log(0, 'Inclusion succeeded');
} else {
- return $this->throwError('init of post-install script class "' . $this->_class
- . '" failed');
+ return $this->throwError(
+ 'init of post-install script class "'.$this->_class
+ .'" failed'
+ );
}
- $this->_obj = new $this->_class;
- $this->logger->log(1, 'running post-install script "' . $this->_class . '->init()"');
+ $this->_obj = new $this->_class();
+ $this->logger->log(1, 'running post-install script "'.$this->_class.'->init()"');
PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
$res = $this->_obj->init($this->config, $pkg, $this->_lastversion);
PEAR::popErrorHandling();
if ($res) {
$this->logger->log(0, 'init succeeded');
} else {
- return $this->throwError('init of post-install script "' . $this->_class .
- '->init()" failed');
+ return $this->throwError(
+ 'init of post-install script "'.$this->_class.
+ '->init()" failed'
+ );
}
$this->_contents = $contents;
+
return true;
}
/**
* No longer used
- * @see PEAR_PackageFile_v2::runPostinstallScripts()
- * @param array an array of tasks
- * @param string install or upgrade
+ *
+ * @see PEAR_PackageFile_v2::runPostinstallScripts()
+ * @param array an array of tasks
+ * @param string install or upgrade
* @access protected
* @static
*/
- function run()
+ public function run()
{
}
}
-?><?php
+<?php
/**
* <tasks:postinstallscript> - read/write version
*
* PHP versions 4 and 5
*
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a10
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @link http://pear.php.net/package/PEAR
+ * @since File available since Release 1.4.0a10
*/
/**
* Base class
@@ -88469,30 +88453,31 @@ class PEAR_Task_Postinstallscript_rw extends PEAR_Task_Postinstallscript
*
* @var PEAR_PackageFile_v2_rw
*/
- var $_pkg;
+ public $_pkg;
/**
* Enter description here...
*
- * @param PEAR_PackageFile_v2_rw $pkg
- * @param PEAR_Config $config
- * @param PEAR_Frontend $logger
- * @param array $fileXml
+ * @param PEAR_PackageFile_v2_rw $pkg Package
+ * @param PEAR_Config $config Config
+ * @param PEAR_Frontend $logger Logger
+ * @param array $fileXml XML
+ *
* @return PEAR_Task_Postinstallscript_rw
*/
- function PEAR_Task_Postinstallscript_rw(&$pkg, &$config, &$logger, $fileXml)
+ function __construct(&$pkg, &$config, &$logger, $fileXml)
{
- parent::PEAR_Task_Common($config, $logger, PEAR_TASK_PACKAGE);
+ parent::__construct($config, $logger, PEAR_TASK_PACKAGE);
$this->_contents = $fileXml;
$this->_pkg = &$pkg;
$this->_params = array();
}
- function validate()
+ public function validate()
{
return $this->validateXml($this->_pkg, $this->_params, $this->config, $this->_contents);
}
- function getName()
+ public function getName()
{
return 'postinstallscript';
}
@@ -88507,30 +88492,31 @@ class PEAR_Task_Postinstallscript_rw extends PEAR_Task_Postinstallscript
*
* Use {@link addConditionTypeGroup()} to add a <paramgroup> containing
* a <conditiontype> tag
- * @param string $id <paramgroup> id as seen by the script
- * @param array|false $params array of getParam() calls, or false for no params
+ *
+ * @param string $id <paramgroup> id as seen by the script
+ * @param array|false $params array of getParam() calls, or false for no params
* @param string|false $instructions
*/
- function addParamGroup($id, $params = false, $instructions = false)
+ public function addParamGroup($id, $params = false, $instructions = false)
{
if ($params && isset($params[0]) && !isset($params[1])) {
$params = $params[0];
}
$stuff =
array(
- $this->_pkg->getTasksNs() . ':id' => $id,
+ $this->_pkg->getTasksNs().':id' => $id,
);
if ($instructions) {
- $stuff[$this->_pkg->getTasksNs() . ':instructions'] = $instructions;
+ $stuff[$this->_pkg->getTasksNs().':instructions'] = $instructions;
}
if ($params) {
- $stuff[$this->_pkg->getTasksNs() . ':param'] = $params;
+ $stuff[$this->_pkg->getTasksNs().':param'] = $params;
}
- $this->_params[$this->_pkg->getTasksNs() . ':paramgroup'][] = $stuff;
+ $this->_params[$this->_pkg->getTasksNs().':paramgroup'][] = $stuff;
}
/**
- * add a complex <paramgroup> to the post-install script with conditions
+ * Add a complex <paramgroup> to the post-install script with conditions
*
* This inserts a <paramgroup> with
*
@@ -88541,79 +88527,91 @@ class PEAR_Task_Postinstallscript_rw extends PEAR_Task_Postinstallscript
*
* Use {@link addParamGroup()} to add a simple <paramgroup>
*
- * @param string $id <paramgroup> id as seen by the script
- * @param string $oldgroup <paramgroup> id of the section referenced by
- * <conditiontype>
- * @param string $param name of the <param> from the older section referenced
- * by <contitiontype>
- * @param string $value value to match of the parameter
- * @param string $conditiontype one of '=', '!=', 'preg_match'
- * @param array|false $params array of getParam() calls, or false for no params
+ * @param string $id <paramgroup> id as seen by the script
+ * @param string $oldgroup <paramgroup> id of the section referenced by
+ * <conditiontype>
+ * @param string $param name of the <param> from the older section referenced
+ * by <contitiontype>
+ * @param string $value value to match of the parameter
+ * @param string $conditiontype one of '=', '!=', 'preg_match'
+ * @param array|false $params array of getParam() calls, or false for no params
* @param string|false $instructions
*/
- function addConditionTypeGroup($id, $oldgroup, $param, $value, $conditiontype = '=',
- $params = false, $instructions = false)
- {
+ public function addConditionTypeGroup($id,
+ $oldgroup,
+ $param,
+ $value,
+ $conditiontype = '=',
+ $params = false,
+ $instructions = false
+ ) {
if ($params && isset($params[0]) && !isset($params[1])) {
$params = $params[0];
}
$stuff = array(
- $this->_pkg->getTasksNs() . ':id' => $id,
+ $this->_pkg->getTasksNs().':id' => $id,
);
if ($instructions) {
- $stuff[$this->_pkg->getTasksNs() . ':instructions'] = $instructions;
+ $stuff[$this->_pkg->getTasksNs().':instructions'] = $instructions;
}
- $stuff[$this->_pkg->getTasksNs() . ':name'] = $oldgroup . '::' . $param;
- $stuff[$this->_pkg->getTasksNs() . ':conditiontype'] = $conditiontype;
- $stuff[$this->_pkg->getTasksNs() . ':value'] = $value;
+ $stuff[$this->_pkg->getTasksNs().':name'] = $oldgroup.'::'.$param;
+ $stuff[$this->_pkg->getTasksNs().':conditiontype'] = $conditiontype;
+ $stuff[$this->_pkg->getTasksNs().':value'] = $value;
if ($params) {
- $stuff[$this->_pkg->getTasksNs() . ':param'] = $params;
+ $stuff[$this->_pkg->getTasksNs().':param'] = $params;
}
- $this->_params[$this->_pkg->getTasksNs() . ':paramgroup'][] = $stuff;
+ $this->_params[$this->_pkg->getTasksNs().':paramgroup'][] = $stuff;
}
- function getXml()
+ public function getXml()
{
return $this->_params;
}
/**
* Use to set up a param tag for use in creating a paramgroup
+ *
+ * @param mixed $name Name of parameter
+ * @param mixed $prompt Prompt
+ * @param string $type Type, defaults to 'string'
+ * @param mixed $default Default value
+ *
* @static
+ * @return array
*/
- function getParam($name, $prompt, $type = 'string', $default = null)
+ public function getParam($name, $prompt, $type = 'string', $default = null)
{
if ($default !== null) {
return
array(
- $this->_pkg->getTasksNs() . ':name' => $name,
- $this->_pkg->getTasksNs() . ':prompt' => $prompt,
- $this->_pkg->getTasksNs() . ':type' => $type,
- $this->_pkg->getTasksNs() . ':default' => $default
+ $this->_pkg->getTasksNs().':name' => $name,
+ $this->_pkg->getTasksNs().':prompt' => $prompt,
+ $this->_pkg->getTasksNs().':type' => $type,
+ $this->_pkg->getTasksNs().':default' => $default,
);
}
+
return
array(
- $this->_pkg->getTasksNs() . ':name' => $name,
- $this->_pkg->getTasksNs() . ':prompt' => $prompt,
- $this->_pkg->getTasksNs() . ':type' => $type,
+ $this->_pkg->getTasksNs().':name' => $name,
+ $this->_pkg->getTasksNs().':prompt' => $prompt,
+ $this->_pkg->getTasksNs().':type' => $type,
);
}
}
-?><?php
+<?php
/**
* <tasks:replace>
*
* PHP versions 4 and 5
*
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @link http://pear.php.net/package/PEAR
+ * @since File available since Release 1.4.0a1
*/
/**
* Base class
@@ -88632,18 +88630,19 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Common.php';
*/
class PEAR_Task_Replace extends PEAR_Task_Common
{
- var $type = 'simple';
- var $phase = PEAR_TASK_PACKAGEANDINSTALL;
- var $_replacements;
+ public $type = 'simple';
+ public $phase = PEAR_TASK_PACKAGEANDINSTALL;
+ public $_replacements;
/**
* Validate the raw xml at parsing-time.
- * @param PEAR_PackageFile_v2
- * @param array raw, parsed xml
- * @param PEAR_Config
+ *
+ * @param PEAR_PackageFile_v2
+ * @param array raw, parsed xml
+ * @param PEAR_Config
* @static
*/
- function validateXml($pkg, $xml, $config, $fileXml)
+ public function validateXml($pkg, $xml, $config, $fileXml)
{
if (!isset($xml['attribs'])) {
return array(PEAR_TASK_ERROR_NOATTRIBS);
@@ -88660,33 +88659,36 @@ class PEAR_Task_Replace extends PEAR_Task_Common
if ($xml['attribs']['type'] == 'pear-config') {
if (!in_array($xml['attribs']['to'], $config->getKeys())) {
return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'to', $xml['attribs']['to'],
- $config->getKeys());
+ $config->getKeys(), );
}
} elseif ($xml['attribs']['type'] == 'php-const') {
if (defined($xml['attribs']['to'])) {
return true;
} else {
return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'to', $xml['attribs']['to'],
- array('valid PHP constant'));
+ array('valid PHP constant'), );
}
} elseif ($xml['attribs']['type'] == 'package-info') {
- if (in_array($xml['attribs']['to'],
+ if (in_array(
+ $xml['attribs']['to'],
array('name', 'summary', 'channel', 'notes', 'extends', 'description',
'release_notes', 'license', 'release-license', 'license-uri',
'version', 'api-version', 'state', 'api-state', 'release_date',
- 'date', 'time'))) {
+ 'date', 'time', )
+ )) {
return true;
} else {
return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'to', $xml['attribs']['to'],
array('name', 'summary', 'channel', 'notes', 'extends', 'description',
'release_notes', 'license', 'release-license', 'license-uri',
'version', 'api-version', 'state', 'api-state', 'release_date',
- 'date', 'time'));
+ 'date', 'time', ), );
}
} else {
return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'type', $xml['attribs']['type'],
- array('pear-config', 'package-info', 'php-const'));
+ array('pear-config', 'package-info', 'php-const'), );
}
+
return true;
}
@@ -88695,7 +88697,7 @@ class PEAR_Task_Replace extends PEAR_Task_Common
* @param array raw, parsed xml
* @param unused
*/
- function init($xml, $attribs)
+ public function init($xml, $attribs)
{
$this->_replacements = isset($xml['attribs']) ? array($xml) : $xml;
}
@@ -88704,13 +88706,14 @@ class PEAR_Task_Replace extends PEAR_Task_Common
* Do a package.xml 1.0 replacement, with additional package-info fields available
*
* See validateXml() source for the complete list of allowed fields
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @param string file contents
- * @param string the eventual final file location (informational only)
+ *
+ * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
+ * @param string file contents
+ * @param string the eventual final file location (informational only)
* @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail
- * (use $this->throwError), otherwise return the new contents
+ * (use $this->throwError), otherwise return the new contents
*/
- function startSession($pkg, $contents, $dest)
+ public function startSession($pkg, $contents, $dest)
{
$subst_from = $subst_to = array();
foreach ($this->_replacements as $a) {
@@ -88726,6 +88729,7 @@ class PEAR_Task_Replace extends PEAR_Task_Common
$to = $chan->getServer();
} else {
$this->logger->log(0, "$dest: invalid pear-config replacement: $a[to]");
+
return false;
}
} else {
@@ -88742,6 +88746,7 @@ class PEAR_Task_Replace extends PEAR_Task_Common
}
if (is_null($to)) {
$this->logger->log(0, "$dest: invalid pear-config replacement: $a[to]");
+
return false;
}
} elseif ($a['type'] == 'php-const') {
@@ -88752,6 +88757,7 @@ class PEAR_Task_Replace extends PEAR_Task_Common
$to = constant($a['to']);
} else {
$this->logger->log(0, "$dest: invalid php-const replacement: $a[to]");
+
return false;
}
} else {
@@ -88759,6 +88765,7 @@ class PEAR_Task_Replace extends PEAR_Task_Common
$to = $t;
} else {
$this->logger->log(0, "$dest: invalid package-info replacement: $a[to]");
+
return false;
}
}
@@ -88767,28 +88774,30 @@ class PEAR_Task_Replace extends PEAR_Task_Common
$subst_to[] = $to;
}
}
- $this->logger->log(3, "doing " . sizeof($subst_from) .
- " substitution(s) for $dest");
+ $this->logger->log(
+ 3, "doing ".sizeof($subst_from).
+ " substitution(s) for $dest"
+ );
if (sizeof($subst_from)) {
$contents = str_replace($subst_from, $subst_to, $contents);
}
+
return $contents;
}
}
-?><?php
+<?php
/**
* <tasks:replace> - read/write version
*
* PHP versions 4 and 5
*
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a10
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @link http://pear.php.net/package/PEAR
+ * @since File available since Release 1.4.0a10
*/
/**
* Base class
@@ -88807,48 +88816,47 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Replace.php';
*/
class PEAR_Task_Replace_rw extends PEAR_Task_Replace
{
- function PEAR_Task_Replace_rw(&$pkg, &$config, &$logger, $fileXml)
+ public function __construct(&$pkg, &$config, &$logger, $fileXml)
{
- parent::PEAR_Task_Common($config, $logger, PEAR_TASK_PACKAGE);
+ parent::__construct($config, $logger, PEAR_TASK_PACKAGE);
$this->_contents = $fileXml;
$this->_pkg = &$pkg;
$this->_params = array();
}
- function validate()
+ public function validate()
{
return $this->validateXml($this->_pkg, $this->_params, $this->config, $this->_contents);
}
- function setInfo($from, $to, $type)
+ public function setInfo($from, $to, $type)
{
$this->_params = array('attribs' => array('from' => $from, 'to' => $to, 'type' => $type));
}
- function getName()
+ public function getName()
{
return 'replace';
}
- function getXml()
+ public function getXml()
{
return $this->_params;
}
}
-?><?php
+<?php
/**
* <tasks:unixeol>
*
* PHP versions 4 and 5
*
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @link http://pear.php.net/package/PEAR
+ * @since File available since Release 1.4.0a1
*/
/**
* Base class
@@ -88867,22 +88875,24 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Common.php';
*/
class PEAR_Task_Unixeol extends PEAR_Task_Common
{
- var $type = 'simple';
- var $phase = PEAR_TASK_PACKAGE;
- var $_replacements;
+ public $type = 'simple';
+ public $phase = PEAR_TASK_PACKAGE;
+ public $_replacements;
/**
* Validate the raw xml at parsing-time.
- * @param PEAR_PackageFile_v2
- * @param array raw, parsed xml
- * @param PEAR_Config
+ *
+ * @param PEAR_PackageFile_v2
+ * @param array raw, parsed xml
+ * @param PEAR_Config
* @static
*/
- function validateXml($pkg, $xml, $config, $fileXml)
+ public function validateXml($pkg, $xml, $config, $fileXml)
{
if ($xml != '') {
return array(PEAR_TASK_ERROR_INVALID, 'no attributes allowed');
}
+
return true;
}
@@ -88891,7 +88901,7 @@ class PEAR_Task_Unixeol extends PEAR_Task_Common
* @param array raw, parsed xml
* @param unused
*/
- function init($xml, $attribs)
+ public function init($xml, $attribs)
{
}
@@ -88899,32 +88909,33 @@ class PEAR_Task_Unixeol extends PEAR_Task_Common
* Replace all line endings with line endings customized for the current OS
*
* See validateXml() source for the complete list of allowed fields
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @param string file contents
- * @param string the eventual final file location (informational only)
+ *
+ * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
+ * @param string file contents
+ * @param string the eventual final file location (informational only)
* @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail
- * (use $this->throwError), otherwise return the new contents
+ * (use $this->throwError), otherwise return the new contents
*/
- function startSession($pkg, $contents, $dest)
+ public function startSession($pkg, $contents, $dest)
{
$this->logger->log(3, "replacing all line endings with \\n in $dest");
+
return preg_replace("/\r\n|\n\r|\r|\n/", "\n", $contents);
}
}
-?><?php
+<?php
/**
* <tasks:unixeol> - read/write version
*
* PHP versions 4 and 5
*
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a10
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @link http://pear.php.net/package/PEAR
+ * @since File available since Release 1.4.0a10
*/
/**
* Base class
@@ -88943,43 +88954,43 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Unixeol.php';
*/
class PEAR_Task_Unixeol_rw extends PEAR_Task_Unixeol
{
- function PEAR_Task_Unixeol_rw(&$pkg, &$config, &$logger, $fileXml)
+ function __construct(&$pkg, &$config, &$logger, $fileXml)
{
- parent::PEAR_Task_Common($config, $logger, PEAR_TASK_PACKAGE);
+ parent::__construct($config, $logger, PEAR_TASK_PACKAGE);
$this->_contents = $fileXml;
$this->_pkg = &$pkg;
$this->_params = array();
}
- function validate()
+ public function validate()
{
return true;
}
- function getName()
+ public function getName()
{
return 'unixeol';
}
- function getXml()
+ public function getXml()
{
return '';
}
}
-?><?php
+?>
+<?php
/**
* <tasks:windowseol>
*
* PHP versions 4 and 5
*
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @link http://pear.php.net/package/PEAR
+ * @since File available since Release 1.4.0a1
*/
/**
* Base class
@@ -88987,33 +88998,36 @@ class PEAR_Task_Unixeol_rw extends PEAR_Task_Unixeol
require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Common.php';
/**
* Implements the windows line endsings file task.
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
+ *
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @version Release: 1.9.5
+ * @link http://pear.php.net/package/PEAR
+ * @since Class available since Release 1.4.0a1
*/
class PEAR_Task_Windowseol extends PEAR_Task_Common
{
- var $type = 'simple';
- var $phase = PEAR_TASK_PACKAGE;
- var $_replacements;
+ public $type = 'simple';
+ public $phase = PEAR_TASK_PACKAGE;
+ public $_replacements;
/**
* Validate the raw xml at parsing-time.
- * @param PEAR_PackageFile_v2
- * @param array raw, parsed xml
- * @param PEAR_Config
+ *
+ * @param PEAR_PackageFile_v2
+ * @param array raw, parsed xml
+ * @param PEAR_Config
* @static
*/
- function validateXml($pkg, $xml, $config, $fileXml)
+ public function validateXml($pkg, $xml, $config, $fileXml)
{
if ($xml != '') {
return array(PEAR_TASK_ERROR_INVALID, 'no attributes allowed');
}
+
return true;
}
@@ -89022,7 +89036,7 @@ class PEAR_Task_Windowseol extends PEAR_Task_Common
* @param array raw, parsed xml
* @param unused
*/
- function init($xml, $attribs)
+ public function init($xml, $attribs)
{
}
@@ -89030,32 +89044,33 @@ class PEAR_Task_Windowseol extends PEAR_Task_Common
* Replace all line endings with windows line endings
*
* See validateXml() source for the complete list of allowed fields
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @param string file contents
- * @param string the eventual final file location (informational only)
+ *
+ * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
+ * @param string file contents
+ * @param string the eventual final file location (informational only)
* @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail
- * (use $this->throwError), otherwise return the new contents
+ * (use $this->throwError), otherwise return the new contents
*/
- function startSession($pkg, $contents, $dest)
+ public function startSession($pkg, $contents, $dest)
{
$this->logger->log(3, "replacing all line endings with \\r\\n in $dest");
+
return preg_replace("/\r\n|\n\r|\r|\n/", "\r\n", $contents);
}
}
-?><?php
+<?php
/**
* <tasks:windowseol> - read/write version
*
* PHP versions 4 and 5
*
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a10
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @link http://pear.php.net/package/PEAR
+ * @since File available since Release 1.4.0a10
*/
/**
* Base class
@@ -89063,41 +89078,43 @@ class PEAR_Task_Windowseol extends PEAR_Task_Common
require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Windowseol.php';
/**
* Abstracts the windowseol task xml.
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a10
+ *
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @version Release: 1.9.5
+ * @link http://pear.php.net/package/PEAR
+ * @since Class available since Release 1.4.0a10
*/
class PEAR_Task_Windowseol_rw extends PEAR_Task_Windowseol
{
- function PEAR_Task_Windowseol_rw(&$pkg, &$config, &$logger, $fileXml)
+ function __construct(&$pkg, &$config, &$logger, $fileXml)
{
- parent::PEAR_Task_Common($config, $logger, PEAR_TASK_PACKAGE);
+ parent::__construct($config, $logger, PEAR_TASK_PACKAGE);
$this->_contents = $fileXml;
$this->_pkg = &$pkg;
$this->_params = array();
}
- function validate()
+ public function validate()
{
return true;
}
- function getName()
+ public function getName()
{
return 'windowseol';
}
- function getXml()
+ public function getXml()
{
return '';
}
}
-?><?php
+?>
+<?php
/**
* PEAR_Validate
*
@@ -89108,7 +89125,6 @@ class PEAR_Task_Windowseol_rw extends PEAR_Task_Windowseol
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -89736,7 +89752,6 @@ class PEAR_Validate
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a5
*/
@@ -89799,7 +89814,6 @@ class PEAR_Validator_PECL extends PEAR_Validate
* @author Stephan Schmidt (original XML_Unserializer code)
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -89884,11 +89898,6 @@ class PEAR_XMLParser
$this->encoding = 'UTF-8';
}
- if (version_compare(phpversion(), '5.0.0', 'lt') && $this->encoding == 'UTF-8') {
- $data = utf8_decode($data);
- $this->encoding = 'ISO-8859-1';
- }
-
$xp = xml_parser_create($this->encoding);
xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, 0);
xml_set_object($xp, $this);
@@ -90040,38 +90049,6 @@ class PEAR_XMLParser
$this->_dataStack[$this->_depth] .= $cdata;
}
}<?php
-/**
- * This is only meant for PHP 5 to get rid of certain strict warning
- * that doesn't get hidden since it's in the shutdown function
- */
-class PEAR5
-{
- /**
- * If you have a class that's mostly/entirely static, and you need static
- * properties, you can use this method to simulate them. Eg. in your method(s)
- * do this: $myVar = &PEAR5::getStaticProperty('myclass', 'myVar');
- * You MUST use a reference, or they will not persist!
- *
- * @access public
- * @param string $class The calling classname, to prevent clashes
- * @param string $var The variable to retrieve.
- * @return mixed A reference to the variable. If not set it will be
- * auto initialised to NULL.
- */
- static function &getStaticProperty($class, $var)
- {
- static $properties;
- if (!isset($properties[$class])) {
- $properties[$class] = array();
- }
-
- if (!array_key_exists($var, $properties[$class])) {
- $properties[$class][$var] = null;
- }
-
- return $properties[$class][$var];
- }
-}<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
// +-----------------------------------------------------------------------------+
// | Copyright (c) 2003 Sérgio Gonçalves Carvalho |
@@ -90099,14 +90076,11 @@ class PEAR5
/**
* The Graph.php file contains the definition of the Structures_Graph class
*
- * @see Structures_Graph
* @package Structures_Graph
*/
/* dependencies {{{ */
-/** PEAR base classes */
require_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
-/** Graph Node */
require_once 'phar://install-pear-nozlib.phar/' . 'Structures/Graph/Node.php';
/* }}} */
@@ -90121,65 +90095,86 @@ define('STRUCTURES_GRAPH_ERROR_GENERIC', 100);
* directional, and can be traveled only one way. In an undirected graph, arcs
* are bidirectional, and can be traveled both ways.
*
- * @author Sérgio Carvalho <sergio.carvalho@portugalmail.com>
- * @copyright (c) 2004 by Sérgio Carvalho
- * @package Structures_Graph
+ * @author Sérgio Carvalho <sergio.carvalho@portugalmail.com>
+ * @copyright (c) 2004 by Sérgio Carvalho
+ * @package Structures_Graph
*/
/* }}} */
-class Structures_Graph {
- /* fields {{{ */
+class Structures_Graph
+{
/**
+ * List of node objects in this graph
* @access private
*/
var $_nodes = array();
+
/**
+ * If the graph is directed or not
* @access private
*/
var $_directed = false;
- /* }}} */
- /* Constructor {{{ */
+
/**
- *
- * Constructor
- *
- * @param boolean Set to true if the graph is directed. Set to false if it is not directed. (Optional, defaults to true)
- * @access public
- */
- function Structures_Graph($directed = true) {
+ * Constructor
+ *
+ * @param boolean $directed Set to true if the graph is directed.
+ * Set to false if it is not directed.
+ */
+ public function __construct($directed = true)
+ {
$this->_directed = $directed;
}
- /* }}} */
- /* isDirected {{{ */
/**
- *
- * Return true if a graph is directed
- *
- * @return boolean true if the graph is directed
- * @access public
- */
- function isDirected() {
+ * Old constructor (PHP4-style; kept for BC with extending classes)
+ *
+ * @param boolean $directed Set to true if the graph is directed.
+ * Set to false if it is not directed.
+ *
+ * @return void
+ */
+ public function Structures_Graph($directed = true)
+ {
+ $this->__construct($directed);
+ }
+
+ /**
+ * Return true if a graph is directed
+ *
+ * @return boolean true if the graph is directed
+ */
+ public function isDirected()
+ {
return (boolean) $this->_directed;
}
- /* }}} */
- /* addNode {{{ */
/**
- *
- * Add a Node to the Graph
- *
- * @param Structures_Graph_Node The node to be added.
- * @access public
- */
- function addNode(&$newNode) {
+ * Add a Node to the Graph
+ *
+ * @param Structures_Graph_Node $newNode The node to be added.
+ *
+ * @return void
+ */
+ public function addNode(&$newNode)
+ {
// We only add nodes
- if (!is_a($newNode, 'Structures_Graph_Node')) return Pear::raiseError('Structures_Graph::addNode received an object that is not a Structures_Graph_Node', STRUCTURES_GRAPH_ERROR_GENERIC);
- // Graphs are node *sets*, so duplicates are forbidden. We allow nodes that are exactly equal, but disallow equal references.
- foreach($this->_nodes as $key => $node) {
+ if (!is_a($newNode, 'Structures_Graph_Node')) {
+ return Pear::raiseError(
+ 'Structures_Graph::addNode received an object that is not'
+ . ' a Structures_Graph_Node',
+ STRUCTURES_GRAPH_ERROR_GENERIC
+ );
+ }
+
+ //Graphs are node *sets*, so duplicates are forbidden.
+ // We allow nodes that are exactly equal, but disallow equal references.
+ foreach ($this->_nodes as $key => $node) {
/*
- ZE1 equality operators choke on the recursive cycle introduced by the _graph field in the Node object.
- So, we'll check references the hard way (change $this->_nodes[$key] and check if the change reflects in
+ ZE1 equality operators choke on the recursive cycle introduced
+ by the _graph field in the Node object.
+ So, we'll check references the hard way
+ (change $this->_nodes[$key] and check if the change reflects in
$node)
*/
$savedData = $this->_nodes[$key];
@@ -90187,42 +90182,46 @@ class Structures_Graph {
$this->_nodes[$key] = true;
if ($node === true) {
$this->_nodes[$key] = false;
- if ($node === false) $referenceIsEqualFlag = true;
+ if ($node === false) {
+ $referenceIsEqualFlag = true;
+ }
}
$this->_nodes[$key] = $savedData;
- if ($referenceIsEqualFlag) return Pear::raiseError('Structures_Graph::addNode received an object that is a duplicate for this dataset', STRUCTURES_GRAPH_ERROR_GENERIC);
+ if ($referenceIsEqualFlag) {
+ return Pear::raiseError(
+ 'Structures_Graph::addNode received an object that is'
+ . ' a duplicate for this dataset',
+ STRUCTURES_GRAPH_ERROR_GENERIC
+ );
+ }
}
$this->_nodes[] =& $newNode;
$newNode->setGraph($this);
}
- /* }}} */
- /* removeNode (unimplemented) {{{ */
/**
- *
- * Remove a Node from the Graph
- *
- * @todo This is unimplemented
- * @param Structures_Graph_Node The node to be removed from the graph
- * @access public
- */
- function removeNode(&$node) {
+ * Remove a Node from the Graph
+ *
+ * @param Structures_Graph_Node $node The node to be removed from the graph
+ *
+ * @return void
+ * @todo This is unimplemented
+ */
+ public function removeNode(&$node)
+ {
}
- /* }}} */
- /* getNodes {{{ */
/**
- *
- * Return the node set, in no particular order. For ordered node sets, use a Graph Manipulator insted.
- *
- * @access public
- * @see Structures_Graph_Manipulator_TopologicalSorter
- * @return array The set of nodes in this graph
- */
- function &getNodes() {
+ * Return the node set, in no particular order.
+ * For ordered node sets, use a Graph Manipulator insted.
+ *
+ * @return array The set of nodes in this graph
+ * @see Structures_Graph_Manipulator_TopologicalSorter
+ */
+ public function &getNodes()
+ {
return $this->_nodes;
}
- /* }}} */
}
?>
<?php
@@ -90286,10 +90285,9 @@ class Structures_Graph_Manipulator_AcyclicTest {
* This is a variant of Structures_Graph::inDegree which does
* not count nodes marked as visited.
*
- * @access private
* @return integer Number of non-visited nodes that link to this one
*/
- function _nonVisitedInDegree(&$node) {
+ protected static function _nonVisitedInDegree(&$node) {
$result = 0;
$graphNodes =& $node->_graph->getNodes();
foreach (array_keys($graphNodes) as $key) {
@@ -90302,9 +90300,9 @@ class Structures_Graph_Manipulator_AcyclicTest {
/* _isAcyclic {{{ */
/**
- * @access private
- */
- function _isAcyclic(&$graph) {
+ * Check if the graph is acyclic
+ */
+ protected static function _isAcyclic(&$graph) {
// Mark every node as not visited
$nodes =& $graph->getNodes();
$nodeKeys = array_keys($nodes);
@@ -90348,9 +90346,8 @@ class Structures_Graph_Manipulator_AcyclicTest {
* isAcyclic returns true if a graph contains no cycles, false otherwise.
*
* @return boolean true iff graph is acyclic
- * @access public
*/
- function isAcyclic(&$graph) {
+ public static function isAcyclic(&$graph) {
// We only test graphs
if (!is_a($graph, 'Structures_Graph')) return Pear::raiseError('Structures_Graph_Manipulator_AcyclicTest::isAcyclic received an object that is not a Structures_Graph', STRUCTURES_GRAPH_ERROR_GENERIC);
if (!$graph->isDirected()) return false; // Only directed graphs may be acyclic
@@ -90389,22 +90386,14 @@ class Structures_Graph_Manipulator_AcyclicTest {
/**
* This file contains the definition of the Structures_Graph_Manipulator_TopologicalSorter class.
*
- * @see Structures_Graph_Manipulator_TopologicalSorter
* @package Structures_Graph
*/
-/* dependencies {{{ */
-/** */
require_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
-/** */
require_once 'phar://install-pear-nozlib.phar/' . 'Structures/Graph.php';
-/** */
require_once 'phar://install-pear-nozlib.phar/' . 'Structures/Graph/Node.php';
-/** */
require_once 'phar://install-pear-nozlib.phar/' . 'Structures/Graph/Manipulator/AcyclicTest.php';
-/* }}} */
-/* class Structures_Graph_Manipulator_TopologicalSorter {{{ */
/**
* The Structures_Graph_Manipulator_TopologicalSorter is a manipulator
* which is able to return the set of nodes in a graph, sorted by topological
@@ -90413,44 +90402,55 @@ require_once 'phar://install-pear-nozlib.phar/' . 'Structures/Graph/Manipulator/
* A graph may only be sorted topologically iff it's a DAG. You can test it
* with the Structures_Graph_Manipulator_AcyclicTest.
*
- * @author Sérgio Carvalho <sergio.carvalho@portugalmail.com>
- * @copyright (c) 2004 by Sérgio Carvalho
- * @see Structures_Graph_Manipulator_AcyclicTest
- * @package Structures_Graph
+ * @author Sérgio Carvalho <sergio.carvalho@portugalmail.com>
+ * @copyright (c) 2004 by Sérgio Carvalho
+ * @see Structures_Graph_Manipulator_AcyclicTest
+ * @package Structures_Graph
*/
-class Structures_Graph_Manipulator_TopologicalSorter {
- /* _nonVisitedInDegree {{{ */
+class Structures_Graph_Manipulator_TopologicalSorter
+{
/**
- *
- * This is a variant of Structures_Graph::inDegree which does
- * not count nodes marked as visited.
- *
- * @access private
- * @return integer Number of non-visited nodes that link to this one
- */
- function _nonVisitedInDegree(&$node) {
+ * This is a variant of Structures_Graph::inDegree which does
+ * not count nodes marked as visited.
+ *
+ * @param object $node Node to check
+ *
+ * @return integer Number of non-visited nodes that link to this one
+ */
+ protected static function _nonVisitedInDegree(&$node)
+ {
$result = 0;
$graphNodes =& $node->_graph->getNodes();
foreach (array_keys($graphNodes) as $key) {
- if ((!$graphNodes[$key]->getMetadata('topological-sort-visited')) && $graphNodes[$key]->connectsTo($node)) $result++;
+ if ((!$graphNodes[$key]->getMetadata('topological-sort-visited'))
+ && $graphNodes[$key]->connectsTo($node)
+ ) {
+ $result++;
+ }
}
return $result;
}
- /* }}} */
- /* _sort {{{ */
/**
- * @access private
- */
- function _sort(&$graph) {
+ * Sort implementation
+ *
+ * @param object $graph Graph to sort
+ *
+ * @return void
+ */
+ protected static function _sort(&$graph)
+ {
// Mark every node as not visited
$nodes =& $graph->getNodes();
$nodeKeys = array_keys($nodes);
$refGenerator = array();
- foreach($nodeKeys as $key) {
+ foreach ($nodeKeys as $key) {
$refGenerator[] = false;
- $nodes[$key]->setMetadata('topological-sort-visited', $refGenerator[sizeof($refGenerator) - 1]);
+ $nodes[$key]->setMetadata(
+ 'topological-sort-visited',
+ $refGenerator[sizeof($refGenerator) - 1]
+ );
}
// Iteratively peel off leaf nodes
@@ -90458,43 +90458,61 @@ class Structures_Graph_Manipulator_TopologicalSorter {
do {
// Find out which nodes are leafs (excluding visited nodes)
$leafNodes = array();
- foreach($nodeKeys as $key) {
- if ((!$nodes[$key]->getMetadata('topological-sort-visited')) && Structures_Graph_Manipulator_TopologicalSorter::_nonVisitedInDegree($nodes[$key]) == 0) {
+ foreach ($nodeKeys as $key) {
+ if ((!$nodes[$key]->getMetadata('topological-sort-visited'))
+ && static::_nonVisitedInDegree($nodes[$key]) == 0
+ ) {
$leafNodes[] =& $nodes[$key];
}
}
// Mark leafs as visited
$refGenerator[] = $topologicalLevel;
- for ($i=sizeof($leafNodes) - 1; $i>=0; $i--) {
+ for ($i = sizeof($leafNodes) - 1; $i>=0; $i--) {
$visited =& $leafNodes[$i]->getMetadata('topological-sort-visited');
$visited = true;
$leafNodes[$i]->setMetadata('topological-sort-visited', $visited);
- $leafNodes[$i]->setMetadata('topological-sort-level', $refGenerator[sizeof($refGenerator) - 1]);
+ $leafNodes[$i]->setMetadata(
+ 'topological-sort-level',
+ $refGenerator[sizeof($refGenerator) - 1]
+ );
}
$topologicalLevel++;
} while (sizeof($leafNodes) > 0);
// Cleanup visited marks
- foreach($nodeKeys as $key) $nodes[$key]->unsetMetadata('topological-sort-visited');
+ foreach ($nodeKeys as $key) {
+ $nodes[$key]->unsetMetadata('topological-sort-visited');
+ }
}
- /* }}} */
- /* sort {{{ */
/**
- *
- * sort returns the graph's nodes, sorted by topological order.
- *
- * The result is an array with
- * as many entries as topological levels. Each entry in this array is an array of nodes within
- * the given topological level.
- *
- * @return array The graph's nodes, sorted by topological order.
- * @access public
- */
- function sort(&$graph) {
+ * Sort returns the graph's nodes, sorted by topological order.
+ *
+ * The result is an array with as many entries as topological levels.
+ * Each entry in this array is an array of nodes within
+ * the given topological level.
+ *
+ * @param object $graph Graph to sort
+ *
+ * @return array The graph's nodes, sorted by topological order.
+ */
+ public static function sort(&$graph)
+ {
// We only sort graphs
- if (!is_a($graph, 'Structures_Graph')) return Pear::raiseError('Structures_Graph_Manipulator_TopologicalSorter::sort received an object that is not a Structures_Graph', STRUCTURES_GRAPH_ERROR_GENERIC);
- if (!Structures_Graph_Manipulator_AcyclicTest::isAcyclic($graph)) return Pear::raiseError('Structures_Graph_Manipulator_TopologicalSorter::sort received an graph that has cycles', STRUCTURES_GRAPH_ERROR_GENERIC);
+ if (!is_a($graph, 'Structures_Graph')) {
+ return Pear::raiseError(
+ 'Structures_Graph_Manipulator_TopologicalSorter::sort received'
+ . ' an object that is not a Structures_Graph',
+ STRUCTURES_GRAPH_ERROR_GENERIC
+ );
+ }
+ if (!Structures_Graph_Manipulator_AcyclicTest::isAcyclic($graph)) {
+ return Pear::raiseError(
+ 'Structures_Graph_Manipulator_TopologicalSorter::sort'
+ . ' received an graph that has cycles',
+ STRUCTURES_GRAPH_ERROR_GENERIC
+ );
+ }
Structures_Graph_Manipulator_TopologicalSorter::_sort($graph);
$result = array();
@@ -90502,17 +90520,19 @@ class Structures_Graph_Manipulator_TopologicalSorter {
// Fill out result array
$nodes =& $graph->getNodes();
$nodeKeys = array_keys($nodes);
- foreach($nodeKeys as $key) {
- if (!array_key_exists($nodes[$key]->getMetadata('topological-sort-level'), $result)) $result[$nodes[$key]->getMetadata('topological-sort-level')] = array();
- $result[$nodes[$key]->getMetadata('topological-sort-level')][] =& $nodes[$key];
+ foreach ($nodeKeys as $key) {
+ if (!array_key_exists($nodes[$key]->getMetadata('topological-sort-level'), $result)) {
+ $result[$nodes[$key]->getMetadata('topological-sort-level')]
+ = array();
+ }
+ $result[$nodes[$key]->getMetadata('topological-sort-level')][]
+ =& $nodes[$key];
$nodes[$key]->unsetMetadata('topological-sort-level');
}
return $result;
}
- /* }}} */
}
-/* }}} */
?>
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
@@ -90647,7 +90667,7 @@ class Structures_Graph_Node {
* @return mixed Data to store in node
* @access public
*/
- function setData($data) {
+ function setData(&$data) {
$this->_data =& $data;
}
/* }}} */
@@ -90729,7 +90749,7 @@ class Structures_Graph_Node {
* @param mixed Data
* @access public
*/
- function setMetadata($key, $data) {
+ function setMetadata($key, &$data) {
$this->_metadata[$key] =& $data;
}
/* }}} */
@@ -90856,8 +90876,8 @@ class Structures_Graph_Node {
/* }}} */
}
?>
-package.xml
-<package packagerversion="1.9.1" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
+package.xml
+<package packagerversion="1.9.5" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<name>Structures_Graph</name>
<channel>pear.php.net</channel>
<summary>Graph datastructure manipulation library</summary>
@@ -90876,51 +90896,38 @@ as well as for characteristic extraction from the graph topology.</description>
<email>brett.bieber@gmail.com</email>
<active>yes</active>
</helper>
- <date>2010-10-25</date>
- <time>21:45:17</time>
+ <date>2015-02-26</date>
+ <time>23:13:49</time>
<version>
- <release>1.0.4</release>
- <api>1.0.3</api>
+ <release>1.1.0</release>
+ <api>1.1.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
- <license>LGPL License</license>
+ <license>LGPL-3.0+</license>
<notes>
-Bugfix Release:
-* Bug #17108 BasicGraph::test_directed_degree fails on PHP 5 [clockwerx]
+* Set minimum PHP version to 5.3
+* Fix bug #19367: Incorrect FSF address in LICENSE
+* Change license from LGPL-2.1+ to LGPL-3.0+
</notes>
<contents>
<dir baseinstalldir="/" name="/">
- <file baseinstalldir="/" md5sum="e43ca110d02f287cdaac6357ba539fff" name="docs/html/media/banner.css" role="doc" />
- <file baseinstalldir="/" md5sum="296dd865297508569a6e72fcfd20fa81" name="docs/html/media/stylesheet.css" role="doc" />
- <file baseinstalldir="/" md5sum="678ccf89e31bc7337803afd6b7c58827" name="docs/html/Structures_Graph/Structures_Graph.html" role="doc" />
- <file baseinstalldir="/" md5sum="686b7bd7108cf5ce9b1ae5f17cea79f4" name="docs/html/Structures_Graph/Structures_Graph_Manipulator_AcyclicTest.html" role="doc" />
- <file baseinstalldir="/" md5sum="08b05a395eca4b0ca49a956fadf83da6" name="docs/html/Structures_Graph/Structures_Graph_Manipulator_TopologicalSorter.html" role="doc" />
- <file baseinstalldir="/" md5sum="3fa8a9fae581fc31fd1dfbb14f475f92" name="docs/html/Structures_Graph/Structures_Graph_Node.html" role="doc" />
- <file baseinstalldir="/" md5sum="fd9b59eb75a39d3a25a175660dfb12be" name="docs/html/Structures_Graph/tutorial_Structures_Graph.pkg.html" role="doc" />
- <file baseinstalldir="/" md5sum="9cfeca2ff35a44b4bb921a9a818d8fa6" name="docs/html/Structures_Graph/_Structures_Graph_Manipulator_AcyclicTest_php.html" role="doc" />
- <file baseinstalldir="/" md5sum="4faffdcc81cbc92520104e90a651a971" name="docs/html/Structures_Graph/_Structures_Graph_Manipulator_TopologicalSorter_php.html" role="doc" />
- <file baseinstalldir="/" md5sum="0337573b69355c8b7ad36cd8f40ce859" name="docs/html/Structures_Graph/_Structures_Graph_Node_php.html" role="doc" />
- <file baseinstalldir="/" md5sum="7c1f852d7aa1a2fcada473723c8a46c2" name="docs/html/Structures_Graph/_Structures_Graph_php.html" role="doc" />
- <file baseinstalldir="/" md5sum="238f8a9d335e49ef87a0a276bcfc7231" name="docs/html/classtrees_Structures_Graph.html" role="doc" />
- <file baseinstalldir="/" md5sum="e302b63d3b18fa1c6e13f76816564d39" name="docs/html/elementindex.html" role="doc" />
- <file baseinstalldir="/" md5sum="c97ebad7c5635abbbbf35a23e868649e" name="docs/html/elementindex_Structures_Graph.html" role="doc" />
- <file baseinstalldir="/" md5sum="6f58a7616dd96fb8cc0cbf928f66dd33" name="docs/html/errors.html" role="doc" />
- <file baseinstalldir="/" md5sum="cf5397f529a0d9a701fac13ac6aaaa69" name="docs/html/index.html" role="doc" />
- <file baseinstalldir="/" md5sum="b206403136db1de58901f825ad9f9cb0" name="docs/html/li_Structures_Graph.html" role="doc" />
- <file baseinstalldir="/" md5sum="a88b0fcc2f97dd2069f671ef1dc92b40" name="docs/html/packages.html" role="doc" />
- <file baseinstalldir="/" md5sum="6fdd16675f2181b53a4d2dc2c419752b" name="docs/html/todolist.html" role="doc" />
<file baseinstalldir="/" md5sum="628eb6532a8047bf5962fe24c1c245df" name="docs/tutorials/Structures_Graph/Structures_Graph.pkg" role="doc" />
- <file baseinstalldir="/" md5sum="ce2da39dbb75e21074eb5e96231a3379" name="docs/generate.sh" role="doc" />
- <file baseinstalldir="/" md5sum="f0aff5a1efd188d63b4b8b9e9e840b97" name="Structures/Graph/Manipulator/AcyclicTest.php" role="php" />
- <file baseinstalldir="/" md5sum="0492e677436d29228df93dca23629e06" name="Structures/Graph/Manipulator/TopologicalSorter.php" role="php" />
- <file baseinstalldir="/" md5sum="254ebaba7537ad0f36e63eb8b975cc51" name="Structures/Graph/Node.php" role="php" />
- <file baseinstalldir="/" md5sum="4f25a6275af156f6f8e7b4309cb9f40d" name="Structures/Graph.php" role="php" />
- <file baseinstalldir="/" md5sum="5791baa61d5d36442be58ea5cd9d4bd0" name="tests/testCase/BasicGraph.php" role="test" />
- <file baseinstalldir="/" md5sum="4fed49ef60db01eed800105aae4f2c8b" name="tests/AllTests.php" role="test" />
- <file baseinstalldir="/" md5sum="7fbc338309ac38fefcd64b04bb903e34" name="LICENSE" role="data" />
+ <file baseinstalldir="/" md5sum="4b26eecd30f8695fc3739b1a5b59518e" name="Structures/Graph/Manipulator/AcyclicTest.php" role="php" />
+ <file baseinstalldir="/" md5sum="1f857de1fbbaace54b857ed9712f399f" name="Structures/Graph/Manipulator/TopologicalSorter.php" role="php" />
+ <file baseinstalldir="/" md5sum="928df500102eced877e1bda2d67df668" name="Structures/Graph/Node.php" role="php" />
+ <file baseinstalldir="/" md5sum="88ae1ad8bcd74d4b74ad845f55611cdd" name="Structures/Graph.php" role="php" />
+ <file baseinstalldir="/" md5sum="65e4e85e573833516f5cc1d7a81db9c5" name="tests/AllTests.php" role="test" />
+ <file baseinstalldir="/" md5sum="68ba309e2ac6713527f0fd31456457a1" name="tests/BasicGraphTest.php" role="test" />
+ <file baseinstalldir="/" md5sum="190fc4634be55cd98608b72bc9d0a27f" name="tests/TopologicalSorterTest.php" role="test" />
+ <file baseinstalldir="/" md5sum="4dc0c43f054732ec0f2fc78458ebadde" name="tests/AcyclicTestTest.php" role="test" />
+ <file baseinstalldir="/" md5sum="68ba309e2ac6713527f0fd31456457a1" name="tests/BasicGraphTest.php" role="test" />
+ <file baseinstalldir="/" md5sum="c891580ee21a7aa863ac32566c979fc5" name="tests/helper.inc" role="test">
+ <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" />
+ </file>
+ <file baseinstalldir="/" md5sum="b52f2d57d10c4f7ee67a7eb9615d5d24" name="LICENSE" role="doc" />
</dir>
</contents>
<compatible>
@@ -90932,7 +90939,7 @@ Bugfix Release:
<dependencies>
<required>
<php>
- <min>4.2.0</min>
+ <min>5.3.0</min>
</php>
<pearinstaller>
<min>1.4.3</min>
@@ -90992,2582 +90999,26 @@ Bugfix Release:
* Bug #17108 BasicGraph::test_directed_degree fails on PHP 5 [clockwerx]
</notes>
</release>
+ <release>
+ <version>
+ <release>1.1.0</release>
+ <api>1.1.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2015-02-26</date>
+ <license>LGPL-3.0+</license>
+ <notes>
+* Set minimum PHP version to 5.3
+* Fix bug #19367: Incorrect FSF address in LICENSE
+* Change license from LGPL-2.1+ to LGPL-3.0+
+ </notes>
+ </release>
</changelog>
</package>
-
-{
- background-color: #CCCCFF;
- margin: 0px;
- padding: 0px;
-}
-
-/* Banner (top bar) classes */
-
-.banner { }
-
-.banner-menu
-{
- clear: both;
- padding: .5em;
- border-top: 2px solid #6666AA;
-}
-
-.banner-title
-{
- text-align: right;
- font-size: 20pt;
- font-weight: bold;
- margin: .2em;
-}
-
-.package-selector
-{
- background-color: #AAAADD;
- border: 1px solid black;
- color: yellow;
-}
-
-a:hover { color: #6699CC; text-decoration: underline; }
-a:active { color: #6699CC; text-decoration: underline; }
-
-body { background : #FFFFFF; }
-body, table { font-family: Georgia, Times New Roman, Times, serif; font-size: 10pt }
-p, li { line-height: 140% }
-a img { border: 0px; }
-dd { margin-left: 0px; padding-left: 1em; }
-
-/* Page layout/boxes */
-
-.info-box {}
-.info-box-title { margin: 1em 0em 0em 0em; padding: .25em; font-weight: normal; font-size: 14pt; border: 2px solid #999999; background-color: #CCCCFF }
-.info-box-body { border: 1px solid #999999; padding: .5em; }
-.nav-bar { font-size: 8pt; white-space: nowrap; text-align: right; padding: .2em; margin: 0em 0em 1em 0em; }
-
-.oddrow { background-color: #F8F8F8; border: 1px solid #AAAAAA; padding: .5em; margin-bottom: 1em}
-.evenrow { border: 1px solid #AAAAAA; padding: .5em; margin-bottom: 1em}
-
-.page-body { max-width: 800px; margin: auto; }
-.tree dl { margin: 0px }
-
-/* Index formatting classes */
-
-.index-item-body { margin-top: .5em; margin-bottom: .5em}
-.index-item-description { margin-top: .25em }
-.index-item-details { font-weight: normal; font-style: italic; font-size: 8pt }
-.index-letter-section { background-color: #EEEEEE; border: 1px dotted #999999; padding: .5em; margin-bottom: 1em}
-.index-letter-title { font-size: 12pt; font-weight: bold }
-.index-letter-menu { text-align: center; margin: 1em }
-.index-letter { font-size: 12pt }
-
-/* Docbook classes */
-
-.description {}
-.short-description { font-weight: bold; color: #666666; }
-.tags { padding-left: 0em; margin-left: 3em; color: #666666; list-style-type: square; }
-.parameters { padding-left: 0em; margin-left: 3em; font-style: italic; list-style-type: square; }
-.redefinitions { font-size: 8pt; padding-left: 0em; margin-left: 2em; }
-.package { }
-.package-title { font-weight: bold; font-size: 14pt; border-bottom: 1px solid black }
-.package-details { font-size: 85%; }
-.sub-package { font-weight: bold; font-size: 120% }
-.tutorial { border-width: thin; border-color: #0066ff }
-.tutorial-nav-box { width: 100%; border: 1px solid #999999; background-color: #F8F8F8; }
-.nav-button-disabled { color: #999999; }
-.nav-button:active,
-.nav-button:focus,
-.nav-button:hover { background-color: #DDDDDD; outline: 1px solid #999999; text-decoration: none }
-.folder-title { font-style: italic }
-
-/* Generic formatting */
-
-.field { font-weight: bold; }
-.detail { font-size: 8pt; }
-.notes { font-style: italic; font-size: 8pt; }
-.separator { background-color: #999999; height: 2px; }
-.warning { color: #FF6600; }
-.disabled { font-style: italic; color: #999999; }
-
-/* Code elements */
-
-.line-number { }
-
-.class-table { width: 100%; }
-.class-table-header { border-bottom: 1px dotted #666666; text-align: left}
-.class-name { color: #000000; font-weight: bold; }
-
-.method-summary { padding-left: 1em; font-size: 8pt }
-.method-header { }
-.method-definition { margin-bottom: .3em }
-.method-title { font-weight: bold; }
-.method-name { font-weight: bold; }
-.method-signature { font-size: 85%; color: #666666; margin: .5em 0em }
-.method-result { font-style: italic; }
-
-.var-summary { padding-left: 1em; font-size: 8pt; }
-.var-header { }
-.var-title { margin-bottom: .3em }
-.var-type { font-style: italic; }
-.var-name { font-weight: bold; }
-.var-default {}
-.var-description { font-weight: normal; color: #000000; }
-
-.include-title { }
-.include-type { font-style: italic; }
-.include-name { font-weight: bold; }
-
-.const-title { }
-.const-name { font-weight: bold; }
-
-/* Syntax highlighting */
-
-.src-code { border: 1px solid #336699; padding: 1em; background-color: #EEEEEE; }
-
-.src-comm { color: green; }
-.src-id { }
-.src-inc { color: #0000FF; }
-.src-key { color: #0000FF; }
-.src-num { color: #CC0000; }
-.src-str { color: #66cccc; }
-.src-sym { font-weight: bold; }
-.src-var { }
-
-.src-php { font-weight: bold; }
-
-.src-doc { color: #009999 }
-.src-doc-close-template { color: #0000FF }
-.src-doc-coretag { color: #0099FF; font-weight: bold }
-.src-doc-inlinetag { color: #0099FF }
-.src-doc-internal { color: #6699cc }
-.src-doc-tag { color: #0080CC }
-.src-doc-template { color: #0000FF }
-.src-doc-type { font-style: italic }
-.src-doc-var { font-style: italic }
-
-/* tutorial */
-
-.authors { }
-.author { font-style: italic; font-weight: bold }
-.author-blurb { margin: .5em 0em .5em 2em; font-size: 85%; font-weight: normal; font-style: normal }
-.example { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em }
-.listing { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em; white-space: nowrap }
-.release-info { font-size: 85%; font-style: italic; margin: 1em 0em }
-.ref-title-box { }
-.ref-title { }
-.ref-purpose { font-style: italic; color: #666666 }
-.ref-synopsis { }
-.title { font-weight: bold; margin: 1em 0em 0em 0em; padding: .25em; border: 2px solid #999999; background-color: #CCCCFF }
-.cmd-synopsis { margin: 1em 0em }
-.cmd-title { font-weight: bold }
-.toc { margin-left: 2em; padding-left: 0em }
-
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <!-- template designed by Marco Von Ballmoos -->
- <title>Docs For Class Structures_Graph</title>
- <link rel="stylesheet" href="../media/stylesheet.css" />
- <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
- </head>
- <body>
- <div class="page-body">
-<h2 class="class-name">Class Structures_Graph</h2>
-
-<a name="sec-description"></a>
-<div class="info-box">
- <div class="info-box-title">Description</div>
- <div class="nav-bar">
- <span class="disabled">Description</span> |
- <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
-
- </div>
- <div class="info-box-body">
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">The Structures_Graph class represents a graph data structure.</p>
-<p class="description"><p>A Graph is a data structure composed by a set of nodes, connected by arcs. Graphs may either be directed or undirected. In a directed graph, arcs are directional, and can be traveled only one way. In an undirected graph, arcs are bidirectional, and can be traveled both ways.</p></p>
- <ul class="tags">
- <li><span class="field">copyright:</span> (c) 2004 by Sérgio Carvalho</li>
- <li><span class="field">author:</span> Sérgio Carvalho &lt;<a href="mailto:sergio.carvalho@portugalmail.com">mailto:sergio.carvalho@portugalmail.com</a>&gt;</li>
- </ul>
- <p class="notes">
- Located in <a class="field" href="_Structures_Graph_php.html">/Structures/Graph.php</a> (line <span class="field">56</span>)
- </p>
-
-
- <pre></pre>
-
- </div>
-</div>
-
-
-
- <a name="sec-method-summary"></a>
- <div class="info-box">
- <div class="info-box-title">Method Summary</span></div>
- <div class="nav-bar">
- <a href="#sec-description">Description</a> |
- <span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
- </div>
- <div class="info-box-body">
- <div class="method-summary">
-
- <div class="method-definition">
- <span class="method-result">Structures_Graph</span>
- <a href="#Structures_Graph" title="details" class="method-name">Structures_Graph</a>
- ([<span class="var-type">boolean</span>&nbsp;<span class="var-name">$directed</span> = <span class="var-default">true</span>])
- </div>
-
- <div class="method-definition">
- <span class="method-result">void</span>
- <a href="#addNode" title="details" class="method-name">addNode</a>
- (<span class="var-type"><a href="../Structures_Graph/Structures_Graph_Node.html">Structures_Graph_Node</a></span>&nbsp;<span class="var-name">&$newNode</span>)
- </div>
-
- <div class="method-definition">
- <span class="method-result">array</span>
- <a href="#getNodes" title="details" class="method-name">&amp;getNodes</a>
- ()
- </div>
-
- <div class="method-definition">
- <span class="method-result">boolean</span>
- <a href="#isDirected" title="details" class="method-name">isDirected</a>
- ()
- </div>
-
- <div class="method-definition">
- <span class="method-result">void</span>
- <a href="#removeNode" title="details" class="method-name">removeNode</a>
- (<span class="var-type"><a href="../Structures_Graph/Structures_Graph_Node.html">Structures_Graph_Node</a></span>&nbsp;<span class="var-name">&$node</span>)
- </div>
- </div>
- </div>
- </div>
-
-
- <a name="sec-methods"></a>
- <div class="info-box">
- <div class="info-box-title">Methods</div>
- <div class="nav-bar">
- <a href="#sec-description">Description</a> |
- <a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
-
- </div>
- <div class="info-box-body">
- <A NAME='method_detail'></A>
-<a name="methodStructures_Graph" id="Structures_Graph"><!-- --></a>
-<div class="evenrow">
-
- <div class="method-header">
- <span class="method-title">Constructor Structures_Graph</span> (line <span class="line-number">76</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">Constructor</p>
- <ul class="tags">
- <li><span class="field">access:</span> public</li>
- </ul>
-
- <div class="method-signature">
- <span class="method-result">Structures_Graph</span>
- <span class="method-name">
- Structures_Graph
- </span>
- ([<span class="var-type">boolean</span>&nbsp;<span class="var-name">$directed</span> = <span class="var-default">true</span>])
- </div>
-
- <ul class="parameters">
- <li>
- <span class="var-type">boolean</span>
- <span class="var-name">$directed</span><span class="var-description">: Set to true if the graph is directed. Set to false if it is not directed. (Optional, defaults to true)</span> </li>
- </ul>
-
-
- </div>
-<a name="methodaddNode" id="addNode"><!-- --></a>
-<div class="oddrow">
-
- <div class="method-header">
- <span class="method-title">addNode</span> (line <span class="line-number">102</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">Add a Node to the Graph</p>
- <ul class="tags">
- <li><span class="field">access:</span> public</li>
- </ul>
-
- <div class="method-signature">
- <span class="method-result">void</span>
- <span class="method-name">
- addNode
- </span>
- (<span class="var-type"><a href="../Structures_Graph/Structures_Graph_Node.html">Structures_Graph_Node</a></span>&nbsp;<span class="var-name">&$newNode</span>)
- </div>
-
- <ul class="parameters">
- <li>
- <span class="var-type"><a href="../Structures_Graph/Structures_Graph_Node.html">Structures_Graph_Node</a></span>
- <span class="var-name">&$newNode</span><span class="var-description">: The node to be added.</span> </li>
- </ul>
-
-
- </div>
-<a name="methodgetNodes" id="getNodes"><!-- --></a>
-<div class="evenrow">
-
- <div class="method-header">
- <span class="method-title">getNodes</span> (line <span class="line-number">151</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">Return the node set, in no particular order. For ordered node sets, use a Graph Manipulator insted.</p>
- <ul class="tags">
- <li><span class="field">return:</span> The set of nodes in this graph</li>
- <li><span class="field">see:</span> <a href="../Structures_Graph/Structures_Graph_Manipulator_TopologicalSorter.html">Structures_Graph_Manipulator_TopologicalSorter</a></li>
- <li><span class="field">access:</span> public</li>
- </ul>
-
- <div class="method-signature">
- <span class="method-result">array</span>
- <span class="method-name">
- &amp;getNodes
- </span>
- ()
- </div>
-
-
-
- </div>
-<a name="methodisDirected" id="isDirected"><!-- --></a>
-<div class="oddrow">
-
- <div class="method-header">
- <span class="method-title">isDirected</span> (line <span class="line-number">89</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">Return true if a graph is directed</p>
- <ul class="tags">
- <li><span class="field">return:</span> true if the graph is directed</li>
- <li><span class="field">access:</span> public</li>
- </ul>
-
- <div class="method-signature">
- <span class="method-result">boolean</span>
- <span class="method-name">
- isDirected
- </span>
- ()
- </div>
-
-
-
- </div>
-<a name="methodremoveNode" id="removeNode"><!-- --></a>
-<div class="evenrow">
-
- <div class="method-header">
- <span class="method-title">removeNode</span> (line <span class="line-number">138</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">Remove a Node from the Graph</p>
- <ul class="tags">
- <li><span class="field">access:</span> public</li>
- <li><span class="field">todo:</span> This is unimplemented</li>
- </ul>
-
- <div class="method-signature">
- <span class="method-result">void</span>
- <span class="method-name">
- removeNode
- </span>
- (<span class="var-type"><a href="../Structures_Graph/Structures_Graph_Node.html">Structures_Graph_Node</a></span>&nbsp;<span class="var-name">&$node</span>)
- </div>
-
- <ul class="parameters">
- <li>
- <span class="var-type"><a href="../Structures_Graph/Structures_Graph_Node.html">Structures_Graph_Node</a></span>
- <span class="var-name">&$node</span><span class="var-description">: The node to be removed from the graph</span> </li>
- </ul>
-
-
- </div>
-
- </div>
- </div>
-
- <p class="notes" id="credit">
- Documentation generated on Fri, 30 Jan 2004 16:37:28 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
- </p>
- </div></body>
-</html>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <!-- template designed by Marco Von Ballmoos -->
- <title>Docs For Class Structures_Graph_Manipulator_AcyclicTest</title>
- <link rel="stylesheet" href="../media/stylesheet.css" />
- <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
- </head>
- <body>
- <div class="page-body">
-<h2 class="class-name">Class Structures_Graph_Manipulator_AcyclicTest</h2>
-
-<a name="sec-description"></a>
-<div class="info-box">
- <div class="info-box-title">Description</div>
- <div class="nav-bar">
- <span class="disabled">Description</span> |
- <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
-
- </div>
- <div class="info-box-body">
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">The Structures_Graph_Manipulator_AcyclicTest is a graph manipulator which tests whether a graph contains a cycle.</p>
-<p class="description"><p>The definition of an acyclic graph used in this manipulator is that of a DAG. The graph must be directed, or else it is considered cyclic, even when there are no arcs.</p></p>
- <ul class="tags">
- <li><span class="field">copyright:</span> (c) 2004 by Sérgio Carvalho</li>
- <li><span class="field">author:</span> Sérgio Carvalho &lt;<a href="mailto:sergio.carvalho@portugalmail.com">mailto:sergio.carvalho@portugalmail.com</a>&gt;</li>
- </ul>
- <p class="notes">
- Located in <a class="field" href="_Structures_Graph_Manipulator_AcyclicTest_php.html">/Structures/Graph/Manipulator/AcyclicTest.php</a> (line <span class="field">55</span>)
- </p>
-
-
- <pre></pre>
-
- </div>
-</div>
-
-
-
- <a name="sec-method-summary"></a>
- <div class="info-box">
- <div class="info-box-title">Method Summary</span></div>
- <div class="nav-bar">
- <a href="#sec-description">Description</a> |
- <span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
- </div>
- <div class="info-box-body">
- <div class="method-summary">
-
- <div class="method-definition">
- <span class="method-result">boolean</span>
- <a href="#isAcyclic" title="details" class="method-name">isAcyclic</a>
- (<span class="var-type">mixed</span>&nbsp;<span class="var-name">&$graph</span>)
- </div>
- </div>
- </div>
- </div>
-
-
- <a name="sec-methods"></a>
- <div class="info-box">
- <div class="info-box-title">Methods</div>
- <div class="nav-bar">
- <a href="#sec-description">Description</a> |
- <a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
-
- </div>
- <div class="info-box-body">
- <A NAME='method_detail'></A>
-<a name="methodisAcyclic" id="isAcyclic"><!-- --></a>
-<div class="evenrow">
-
- <div class="method-header">
- <span class="method-title">isAcyclic</span> (line <span class="line-number">126</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">isAcyclic returns true if a graph contains no cycles, false otherwise.</p>
- <ul class="tags">
- <li><span class="field">return:</span> true iff graph is acyclic</li>
- <li><span class="field">access:</span> public</li>
- </ul>
-
- <div class="method-signature">
- <span class="method-result">boolean</span>
- <span class="method-name">
- isAcyclic
- </span>
- (<span class="var-type">mixed</span>&nbsp;<span class="var-name">&$graph</span>)
- </div>
-
-
-
- </div>
-
- </div>
- </div>
-
- <p class="notes" id="credit">
- Documentation generated on Fri, 30 Jan 2004 16:37:28 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
- </p>
- </div></body>
-</html>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <!-- template designed by Marco Von Ballmoos -->
- <title>Docs For Class Structures_Graph_Manipulator_TopologicalSorter</title>
- <link rel="stylesheet" href="../media/stylesheet.css" />
- <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
- </head>
- <body>
- <div class="page-body">
-<h2 class="class-name">Class Structures_Graph_Manipulator_TopologicalSorter</h2>
-
-<a name="sec-description"></a>
-<div class="info-box">
- <div class="info-box-title">Description</div>
- <div class="nav-bar">
- <span class="disabled">Description</span> |
- <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
-
- </div>
- <div class="info-box-body">
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">The Structures_Graph_Manipulator_TopologicalSorter is a manipulator which is able to return the set of nodes in a graph, sorted by topological order.</p>
-<p class="description"><p>A graph may only be sorted topologically iff it's a DAG. You can test it with the Structures_Graph_Manipulator_AcyclicTest.</p></p>
- <ul class="tags">
- <li><span class="field">see:</span> <a href="../Structures_Graph/Structures_Graph_Manipulator_AcyclicTest.html">Structures_Graph_Manipulator_AcyclicTest</a></li>
- <li><span class="field">copyright:</span> (c) 2004 by Sérgio Carvalho</li>
- <li><span class="field">author:</span> Sérgio Carvalho &lt;<a href="mailto:sergio.carvalho@portugalmail.com">mailto:sergio.carvalho@portugalmail.com</a>&gt;</li>
- </ul>
- <p class="notes">
- Located in <a class="field" href="_Structures_Graph_Manipulator_TopologicalSorter_php.html">/Structures/Graph/Manipulator/TopologicalSorter.php</a> (line <span class="field">58</span>)
- </p>
-
-
- <pre></pre>
-
- </div>
-</div>
-
-
-
- <a name="sec-method-summary"></a>
- <div class="info-box">
- <div class="info-box-title">Method Summary</span></div>
- <div class="nav-bar">
- <a href="#sec-description">Description</a> |
- <span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
- </div>
- <div class="info-box-body">
- <div class="method-summary">
-
- <div class="method-definition">
- <span class="method-result">array</span>
- <a href="#sort" title="details" class="method-name">sort</a>
- (<span class="var-type">mixed</span>&nbsp;<span class="var-name">&$graph</span>)
- </div>
- </div>
- </div>
- </div>
-
-
- <a name="sec-methods"></a>
- <div class="info-box">
- <div class="info-box-title">Methods</div>
- <div class="nav-bar">
- <a href="#sec-description">Description</a> |
- <a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
-
- </div>
- <div class="info-box-body">
- <A NAME='method_detail'></A>
-<a name="methodsort" id="sort"><!-- --></a>
-<div class="evenrow">
-
- <div class="method-header">
- <span class="method-title">sort</span> (line <span class="line-number">133</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">sort returns the graph's nodes, sorted by topological order.</p>
-<p class="description"><p>The result is an array with as many entries as topological levels. Each entry in this array is an array of nodes within the given topological level.</p></p>
- <ul class="tags">
- <li><span class="field">return:</span> The graph's nodes, sorted by topological order.</li>
- <li><span class="field">access:</span> public</li>
- </ul>
-
- <div class="method-signature">
- <span class="method-result">array</span>
- <span class="method-name">
- sort
- </span>
- (<span class="var-type">mixed</span>&nbsp;<span class="var-name">&$graph</span>)
- </div>
-
-
-
- </div>
-
- </div>
- </div>
-
- <p class="notes" id="credit">
- Documentation generated on Fri, 30 Jan 2004 16:37:29 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
- </p>
- </div></body>
-</html>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <!-- template designed by Marco Von Ballmoos -->
- <title>Docs For Class Structures_Graph_Node</title>
- <link rel="stylesheet" href="../media/stylesheet.css" />
- <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
- </head>
- <body>
- <div class="page-body">
-<h2 class="class-name">Class Structures_Graph_Node</h2>
-
-<a name="sec-description"></a>
-<div class="info-box">
- <div class="info-box-title">Description</div>
- <div class="nav-bar">
- <span class="disabled">Description</span> |
- <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
-
- </div>
- <div class="info-box-body">
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">The Structures_Graph_Node class represents a Node that can be member of a graph node set.</p>
-<p class="description"><p>A graph node can contain data. Under this API, the node contains default data, and key index data. It behaves, thus, both as a regular data node, and as a dictionary (or associative array) node.</p><p>Regular data is accessed via getData and setData. Key indexed data is accessed via getMetadata and setMetadata.</p></p>
- <ul class="tags">
- <li><span class="field">copyright:</span> (c) 2004 by Sérgio Carvalho</li>
- <li><span class="field">author:</span> Sérgio Carvalho &lt;<a href="mailto:sergio.carvalho@portugalmail.com">mailto:sergio.carvalho@portugalmail.com</a>&gt;</li>
- </ul>
- <p class="notes">
- Located in <a class="field" href="_Structures_Graph_Node_php.html">/Structures/Graph/Node.php</a> (line <span class="field">57</span>)
- </p>
-
-
- <pre></pre>
-
- </div>
-</div>
-
-
-
- <a name="sec-method-summary"></a>
- <div class="info-box">
- <div class="info-box-title">Method Summary</span></div>
- <div class="nav-bar">
- <a href="#sec-description">Description</a> |
- <span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
- </div>
- <div class="info-box-body">
- <div class="method-summary">
-
- <div class="method-definition">
- <span class="method-result">Structures_Graph_Node</span>
- <a href="#Structures_Graph_Node" title="details" class="method-name">Structures_Graph_Node</a>
- ()
- </div>
-
- <div class="method-definition">
- <span class="method-result">boolean</span>
- <a href="#connectsTo" title="details" class="method-name">connectsTo</a>
- (<span class="var-type">mixed</span>&nbsp;<span class="var-name">&$target</span>)
- </div>
-
- <div class="method-definition">
- <span class="method-result">void</span>
- <a href="#connectTo" title="details" class="method-name">connectTo</a>
- (<span class="var-type"><a href="../Structures_Graph/Structures_Graph.html">Structures_Graph</a></span>&nbsp;<span class="var-name">&$destinationNode</span>)
- </div>
-
- <div class="method-definition">
- <span class="method-result">mixed</span>
- <a href="#getData" title="details" class="method-name">&amp;getData</a>
- ()
- </div>
-
- <div class="method-definition">
- <span class="method-result"><a href="../Structures_Graph/Structures_Graph.html">Structures_Graph</a></span>
- <a href="#getGraph" title="details" class="method-name">&amp;getGraph</a>
- ()
- </div>
-
- <div class="method-definition">
- <span class="method-result">mixed</span>
- <a href="#getMetadata" title="details" class="method-name">&amp;getMetadata</a>
- (<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>, [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$nullIfNonexistent</span> = <span class="var-default">false</span>])
- </div>
-
- <div class="method-definition">
- <span class="method-result">array</span>
- <a href="#getNeighbours" title="details" class="method-name">getNeighbours</a>
- ()
- </div>
-
- <div class="method-definition">
- <span class="method-result">integer</span>
- <a href="#inDegree" title="details" class="method-name">inDegree</a>
- ()
- </div>
-
- <div class="method-definition">
- <span class="method-result">boolean</span>
- <a href="#metadataKeyExists" title="details" class="method-name">metadataKeyExists</a>
- (<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>)
- </div>
-
- <div class="method-definition">
- <span class="method-result">integer</span>
- <a href="#outDegree" title="details" class="method-name">outDegree</a>
- ()
- </div>
-
- <div class="method-definition">
- <span class="method-result">mixed</span>
- <a href="#setData" title="details" class="method-name">setData</a>
- (<span class="var-type">mixed</span>&nbsp;<span class="var-name">$data</span>)
- </div>
-
- <div class="method-definition">
- <span class="method-result">void</span>
- <a href="#setGraph" title="details" class="method-name">setGraph</a>
- (<span class="var-type"><a href="../Structures_Graph/Structures_Graph.html">Structures_Graph</a></span>&nbsp;<span class="var-name">&$graph</span>)
- </div>
-
- <div class="method-definition">
- <span class="method-result">void</span>
- <a href="#setMetadata" title="details" class="method-name">setMetadata</a>
- (<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$data</span>)
- </div>
-
- <div class="method-definition">
- <span class="method-result">void</span>
- <a href="#unsetMetadata" title="details" class="method-name">unsetMetadata</a>
- (<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>)
- </div>
- </div>
- </div>
- </div>
-
-
- <a name="sec-methods"></a>
- <div class="info-box">
- <div class="info-box-title">Methods</div>
- <div class="nav-bar">
- <a href="#sec-description">Description</a> |
- <a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
-
- </div>
- <div class="info-box-body">
- <A NAME='method_detail'></A>
-<a name="methodStructures_Graph_Node" id="Structures_Graph_Node"><!-- --></a>
-<div class="evenrow">
-
- <div class="method-header">
- <span class="method-title">Constructor Structures_Graph_Node</span> (line <span class="line-number">78</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">Constructor</p>
- <ul class="tags">
- <li><span class="field">access:</span> public</li>
- </ul>
-
- <div class="method-signature">
- <span class="method-result">Structures_Graph_Node</span>
- <span class="method-name">
- Structures_Graph_Node
- </span>
- ()
- </div>
-
-
-
- </div>
-<a name="methodconnectsTo" id="connectsTo"><!-- --></a>
-<div class="oddrow">
-
- <div class="method-header">
- <span class="method-title">connectsTo</span> (line <span class="line-number">275</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">Test wether this node has an arc to the target node</p>
- <ul class="tags">
- <li><span class="field">return:</span> True if the two nodes are connected</li>
- <li><span class="field">access:</span> public</li>
- </ul>
-
- <div class="method-signature">
- <span class="method-result">boolean</span>
- <span class="method-name">
- connectsTo
- </span>
- (<span class="var-type">mixed</span>&nbsp;<span class="var-name">&$target</span>)
- </div>
-
-
-
- </div>
-<a name="methodconnectTo" id="connectTo"><!-- --></a>
-<div class="evenrow">
-
- <div class="method-header">
- <span class="method-title">connectTo</span> (line <span class="line-number">236</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">Connect this node to another one.</p>
-<p class="description"><p>If the graph is not directed, the reverse arc, connecting $destinationNode to $this is also created.</p></p>
- <ul class="tags">
- <li><span class="field">access:</span> public</li>
- </ul>
-
- <div class="method-signature">
- <span class="method-result">void</span>
- <span class="method-name">
- connectTo
- </span>
- (<span class="var-type"><a href="../Structures_Graph/Structures_Graph.html">Structures_Graph</a></span>&nbsp;<span class="var-name">&$destinationNode</span>)
- </div>
-
- <ul class="parameters">
- <li>
- <span class="var-type"><a href="../Structures_Graph/Structures_Graph.html">Structures_Graph</a></span>
- <span class="var-name">&$destinationNode</span><span class="var-description">: Node to connect to</span> </li>
- </ul>
-
-
- </div>
-<a name="methodgetData" id="getData"><!-- --></a>
-<div class="oddrow">
-
- <div class="method-header">
- <span class="method-title">getData</span> (line <span class="line-number">119</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">Node data getter.</p>
-<p class="description"><p>Each graph node can contain a reference to one variable. This is the getter for that reference.</p></p>
- <ul class="tags">
- <li><span class="field">return:</span> Data stored in node</li>
- <li><span class="field">access:</span> public</li>
- </ul>
-
- <div class="method-signature">
- <span class="method-result">mixed</span>
- <span class="method-name">
- &amp;getData
- </span>
- ()
- </div>
-
-
-
- </div>
-<a name="methodgetGraph" id="getGraph"><!-- --></a>
-<div class="evenrow">
-
- <div class="method-header">
- <span class="method-title">getGraph</span> (line <span class="line-number">90</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">Node graph getter</p>
- <ul class="tags">
- <li><span class="field">return:</span> Graph where node is stored</li>
- <li><span class="field">access:</span> public</li>
- </ul>
-
- <div class="method-signature">
- <span class="method-result"><a href="../Structures_Graph/Structures_Graph.html">Structures_Graph</a></span>
- <span class="method-name">
- &amp;getGraph
- </span>
- ()
- </div>
-
-
-
- </div>
-<a name="methodgetMetadata" id="getMetadata"><!-- --></a>
-<div class="oddrow">
-
- <div class="method-header">
- <span class="method-title">getMetadata</span> (line <span class="line-number">171</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">Node metadata getter</p>
-<p class="description"><p>Each graph node can contain multiple 'metadata' entries, each stored under a different key, as in an associative array or in a dictionary. This method gets the data under the given key. If the key does not exist, an error will be thrown, so testing using metadataKeyExists might be needed.</p></p>
- <ul class="tags">
- <li><span class="field">return:</span> Metadata Data stored in node under given key</li>
- <li><span class="field">access:</span> public</li>
- <li><span class="field">see:</span> <a href="../Structures_Graph/Structures_Graph_Node.html#methodmetadataKeyExists">Structures_Graph_Node::metadataKeyExists()</a></li>
- </ul>
-
- <div class="method-signature">
- <span class="method-result">mixed</span>
- <span class="method-name">
- &amp;getMetadata
- </span>
- (<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>, [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$nullIfNonexistent</span> = <span class="var-default">false</span>])
- </div>
-
- <ul class="parameters">
- <li>
- <span class="var-type">string</span>
- <span class="var-name">$key</span><span class="var-description">: Key</span> </li>
- <li>
- <span class="var-type">boolean</span>
- <span class="var-name">$nullIfNonexistent</span><span class="var-description">: nullIfNonexistent (defaults to false).</span> </li>
- </ul>
-
-
- </div>
-<a name="methodgetNeighbours" id="getNeighbours"><!-- --></a>
-<div class="evenrow">
-
- <div class="method-header">
- <span class="method-title">getNeighbours</span> (line <span class="line-number">262</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">Return nodes connected to this one.</p>
- <ul class="tags">
- <li><span class="field">return:</span> Array of nodes</li>
- <li><span class="field">access:</span> public</li>
- </ul>
-
- <div class="method-signature">
- <span class="method-result">array</span>
- <span class="method-name">
- getNeighbours
- </span>
- ()
- </div>
-
-
-
- </div>
-<a name="methodinDegree" id="inDegree"><!-- --></a>
-<div class="oddrow">
-
- <div class="method-header">
- <span class="method-title">inDegree</span> (line <span class="line-number">309</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">Calculate the in degree of the node.</p>
-<p class="description"><p>The indegree for a node is the number of arcs entering the node. For non directed graphs, the indegree is equal to the outdegree.</p></p>
- <ul class="tags">
- <li><span class="field">return:</span> In degree of the node</li>
- <li><span class="field">access:</span> public</li>
- </ul>
-
- <div class="method-signature">
- <span class="method-result">integer</span>
- <span class="method-name">
- inDegree
- </span>
- ()
- </div>
-
-
-
- </div>
-<a name="methodmetadataKeyExists" id="metadataKeyExists"><!-- --></a>
-<div class="evenrow">
-
- <div class="method-header">
- <span class="method-title">metadataKeyExists</span> (line <span class="line-number">151</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">Test for existence of metadata under a given key.</p>
-<p class="description"><p>Each graph node can contain multiple 'metadata' entries, each stored under a different key, as in an associative array or in a dictionary. This method tests whether a given metadata key exists for this node.</p></p>
- <ul class="tags">
- <li><span class="field">access:</span> public</li>
- </ul>
-
- <div class="method-signature">
- <span class="method-result">boolean</span>
- <span class="method-name">
- metadataKeyExists
- </span>
- (<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>)
- </div>
-
- <ul class="parameters">
- <li>
- <span class="var-type">string</span>
- <span class="var-name">$key</span><span class="var-description">: Key to test</span> </li>
- </ul>
-
-
- </div>
-<a name="methodoutDegree" id="outDegree"><!-- --></a>
-<div class="oddrow">
-
- <div class="method-header">
- <span class="method-title">outDegree</span> (line <span class="line-number">333</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">Calculate the out degree of the node.</p>
-<p class="description"><p>The outdegree for a node is the number of arcs exiting the node. For non directed graphs, the outdegree is always equal to the indegree.</p></p>
- <ul class="tags">
- <li><span class="field">return:</span> Out degree of the node</li>
- <li><span class="field">access:</span> public</li>
- </ul>
-
- <div class="method-signature">
- <span class="method-result">integer</span>
- <span class="method-name">
- outDegree
- </span>
- ()
- </div>
-
-
-
- </div>
-<a name="methodsetData" id="setData"><!-- --></a>
-<div class="evenrow">
-
- <div class="method-header">
- <span class="method-title">setData</span> (line <span class="line-number">134</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">Node data setter</p>
-<p class="description"><p>Each graph node can contain a reference to one variable. This is the setter for that reference.</p></p>
- <ul class="tags">
- <li><span class="field">return:</span> Data to store in node</li>
- <li><span class="field">access:</span> public</li>
- </ul>
-
- <div class="method-signature">
- <span class="method-result">mixed</span>
- <span class="method-name">
- setData
- </span>
- (<span class="var-type">mixed</span>&nbsp;<span class="var-name">$data</span>)
- </div>
-
-
-
- </div>
-<a name="methodsetGraph" id="setGraph"><!-- --></a>
-<div class="oddrow">
-
- <div class="method-header">
- <span class="method-title">setGraph</span> (line <span class="line-number">104</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">Node graph setter. This method should not be called directly. Use Graph::addNode instead.</p>
- <ul class="tags">
- <li><span class="field">access:</span> public</li>
- <li><span class="field">see:</span> <a href="../Structures_Graph/Structures_Graph.html#methodaddNode">Structures_Graph::addNode()</a></li>
- </ul>
-
- <div class="method-signature">
- <span class="method-result">void</span>
- <span class="method-name">
- setGraph
- </span>
- (<span class="var-type"><a href="../Structures_Graph/Structures_Graph.html">Structures_Graph</a></span>&nbsp;<span class="var-name">&$graph</span>)
- </div>
-
- <ul class="parameters">
- <li>
- <span class="var-type"><a href="../Structures_Graph/Structures_Graph.html">Structures_Graph</a></span>
- <span class="var-name">&$graph</span><span class="var-description">: Set the graph for this node.</span> </li>
- </ul>
-
-
- </div>
-<a name="methodsetMetadata" id="setMetadata"><!-- --></a>
-<div class="evenrow">
-
- <div class="method-header">
- <span class="method-title">setMetadata</span> (line <span class="line-number">214</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">Node metadata setter</p>
-<p class="description"><p>Each graph node can contain multiple 'metadata' entries, each stored under a different key, as in an associative array or in a dictionary. This method stores data under the given key. If the key already exists, previously stored data is discarded.</p></p>
- <ul class="tags">
- <li><span class="field">access:</span> public</li>
- </ul>
-
- <div class="method-signature">
- <span class="method-result">void</span>
- <span class="method-name">
- setMetadata
- </span>
- (<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$data</span>)
- </div>
-
- <ul class="parameters">
- <li>
- <span class="var-type">string</span>
- <span class="var-name">$key</span><span class="var-description">: Key</span> </li>
- <li>
- <span class="var-type">mixed</span>
- <span class="var-name">$data</span><span class="var-description">: Data</span> </li>
- </ul>
-
-
- </div>
-<a name="methodunsetMetadata" id="unsetMetadata"><!-- --></a>
-<div class="oddrow">
-
- <div class="method-header">
- <span class="method-title">unsetMetadata</span> (line <span class="line-number">196</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">Delete metadata by key</p>
-<p class="description"><p>Each graph node can contain multiple 'metadata' entries, each stored under a different key, as in an associative array or in a dictionary. This method removes any data that might be stored under the provided key. If the key does not exist, no error is thrown, so it is safe using this method without testing for key existence.</p></p>
- <ul class="tags">
- <li><span class="field">access:</span> public</li>
- </ul>
-
- <div class="method-signature">
- <span class="method-result">void</span>
- <span class="method-name">
- unsetMetadata
- </span>
- (<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>)
- </div>
-
- <ul class="parameters">
- <li>
- <span class="var-type">string</span>
- <span class="var-name">$key</span><span class="var-description">: Key</span> </li>
- </ul>
-
-
- </div>
-
- </div>
- </div>
-
- <p class="notes" id="credit">
- Documentation generated on Fri, 30 Jan 2004 16:37:29 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
- </p>
- </div></body>
-</html>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <!-- template designed by Marco Von Ballmoos -->
- <title>Structures_Graph Tutorial</title>
- <link rel="stylesheet" href="../media/stylesheet.css" />
- <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
- </head>
- <body>
- <div class="page-body">
-
-<div><a name="package.database.structures_graph.tutorial"></a><div class="ref-title-box"><h1 class="ref-title">Structures_Graph Tutorial</h1>
- <h2 class="ref-purpose">A first tour of graph datastructure manipulation</h2></div>
- <span><a name="package.database.structures_graph.tutorial.intro"></a><h2 class="title">Introduction</h2><p>Structures_Graph is a package for creating and manipulating graph datastructures. A graph is a set of objects, called nodes, connected by arcs. When used as a datastructure, usually nodes contain data, and arcs represent relationships between nodes. When arcs have a direction, and can be travelled only one way, graphs are said to be directed. When arcs have no direction, and can always be travelled both ways, graphs are said to be non directed.</p>
- <p>Structures_Graph provides an object oriented API to create and directly query a graph, as well as a set of Manipulator classes to extract information from the graph.</p></span>
- <span><a name="package.database.structures_graph.tutorial.creation"></a><h2 class="title">Creating a Graph</h2><p>Creating a graph is done using the simple constructor:
- <pre class="listing"><pre>
-require_once 'Structures/Graph.php';
-
-$directedGraph =&amp; new Structures_Graph(true);
-$nonDirectedGraph =&amp; new Structures_Graph(false);
- </pre></pre>
- and passing the constructor a flag telling it whether the graph should be directed. A directed graph will always be directed during its lifetime. It's a permanent characteristic.</p>
- <p>To fill out the graph, we'll need to create some nodes, and then call Graph::addNode.
- <pre class="listing"><pre>
-require_once 'Structures/Graph/Node.php';
-
-$nodeOne =&amp; new Structures_Graph_Node();
-$nodeTwo =&amp; new Structures_Graph_Node();
-$nodeThree =&amp; new Structures_Graph_Node();
-
-$directedGraph-&gt;addNode(&amp;$nodeOne);
-$directedGraph-&gt;addNode(&amp;$nodeTwo);
-$directedGraph-&gt;addNode(&amp;$nodeThree);
- </pre></pre>
- and then setup the arcs:
- <pre class="listing"><pre>
-$nodeOne-&gt;connectTo($nodeTwo);
-$nodeOne-&gt;connectTo($nodeThree);
- </pre></pre>
- Note that arcs can only be created after the nodes have been inserted into the graph.</p></span>
- <span><a name="package.database.structures_graph.tutorial.nodesanddata"></a><h2 class="title">Associating Data</h2><p>Graphs are only useful as datastructures if they can hold data. Structure_Graph stores data in nodes. Each node contains a setter and a getter for its data.
- <pre class="listing"><pre>
-$nodeOne-&gt;setData(&quot;Node One's Data is a String&quot;);
-$nodeTwo-&gt;setData(1976);
-$nodeThree-&gt;setData('Some other string');
-
-print(&quot;NodeTwo's Data is an integer: &quot; . $nodeTwo-&gt;getData());
- </pre></pre></p>
- <p>Structure_Graph nodes can also store metadata, alongside with the main data. Metadata differs from regular data just because it is stored under a key, making it possible to store more than one data reference per node. The metadata getter and setter need the key to perform the operation:
- <pre class="listing"><pre>
-$nodeOne-&gt;setMetadata('example key', &quot;Node One's Sample Metadata&quot;);
-print(&quot;Metadata stored under key 'example key' in node one: &quot; . $nodeOne-&gt;getMetadata('example key'));
-$nodeOne-&gt;unsetMetadata('example key');
- </pre></pre></p></span>
- <span><a name="package.database.structures_graph.tutorial.querying"></a><h2 class="title">Querying a Graph</h2><p>Structures_Graph provides for basic querying of the graph:
- <pre class="listing"><pre>
-// Nodes are able to calculate their indegree and outdegree
-print(&quot;NodeOne's inDegree: &quot; . $nodeOne-&gt;inDegree());
-print(&quot;NodeOne's outDegree: &quot; . $nodeOne-&gt;outDegree());
-
-// and naturally, nodes can report on their arcs
-$arcs = $nodeOne-&gt;getNeighbours();
-for ($i=0;$i&lt;sizeof($arcs);$i++) {
- print(&quot;NodeOne has an arc to &quot; . $arcs[$i]-&gt;getData());
-}
- </pre></pre></p></span></div>
-
-
- <p class="notes" id="credit">
- Documentation generated on Fri, 30 Jan 2004 16:37:28 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
- </p>
- </div></body>
-</html>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <!-- template designed by Marco Von Ballmoos -->
- <title>Docs for page AcyclicTest.php</title>
- <link rel="stylesheet" href="../media/stylesheet.css" />
- <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
- </head>
- <body>
- <div class="page-body">
-<h2 class="file-name">/Structures/Graph/Manipulator/AcyclicTest.php</h2>
-
-<a name="sec-description"></a>
-<div class="info-box">
- <div class="info-box-title">Description</div>
- <div class="nav-bar">
- <span class="disabled">Description</span> |
- <a href="#sec-classes">Classes</a>
- | <a href="#sec-includes">Includes</a>
- </div>
- <div class="info-box-body">
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">This file contains the definition of the Structures_Graph_Manipulator_AcyclicTest graph manipulator.</p>
- <ul class="tags">
- <li><span class="field">see:</span> <a href="../Structures_Graph/Structures_Graph_Manipulator_AcyclicTest.html">Structures_Graph_Manipulator_AcyclicTest</a></li>
- </ul>
-
- </div>
-</div>
-
- <a name="sec-classes"></a>
- <div class="info-box">
- <div class="info-box-title">Classes</div>
- <div class="nav-bar">
- <a href="#sec-description">Description</a> |
- <span class="disabled">Classes</span>
- | <a href="#sec-includes">Includes</a>
- </div>
- <div class="info-box-body">
- <table cellpadding="2" cellspacing="0" class="class-table">
- <tr>
- <th class="class-table-header">Class</th>
- <th class="class-table-header">Description</th>
- </tr>
- <tr>
- <td style="padding-right: 2em; vertical-align: top">
- <a href="../Structures_Graph/Structures_Graph_Manipulator_AcyclicTest.html">Structures_Graph_Manipulator_AcyclicTest</a>
- </td>
- <td>
- The Structures_Graph_Manipulator_AcyclicTest is a graph manipulator which tests whether a graph contains a cycle.
- </td>
- </tr>
- </table>
- </div>
- </div>
-
- <a name="sec-includes"></a>
- <div class="info-box">
- <div class="info-box-title">Includes</div>
- <div class="nav-bar">
- <a href="#sec-description">Description</a> |
- <a href="#sec-classes">Classes</a>
- | <span class="disabled">Includes</span>
- </div>
- <div class="info-box-body">
- <a name="_PEAR_php"><!-- --></a>
-<div class="oddrow">
-
- <div>
- <span class="include-title">
- <span class="include-type">require_once</span>
- (<span class="include-name">'PEAR.php'</span>)
- (line <span class="line-number">35</span>)
- </span>
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-
-</div>
-<a name="_Structures/Graph_php"><!-- --></a>
-<div class="evenrow">
-
- <div>
- <span class="include-title">
- <span class="include-type">require_once</span>
- (<span class="include-name"><a href="../Structures_Graph/_Structures_Graph_php.html">'Structures/Graph.php'</a></span>)
- (line <span class="line-number">37</span>)
- </span>
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-
-</div>
-<a name="_Structures/Graph/Node_php"><!-- --></a>
-<div class="oddrow">
-
- <div>
- <span class="include-title">
- <span class="include-type">require_once</span>
- (<span class="include-name"><a href="../Structures_Graph/_Structures_Graph_Node_php.html">'Structures/Graph/Node.php'</a></span>)
- (line <span class="line-number">39</span>)
- </span>
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-
-</div>
- </div>
- </div>
-
-
-
-
- <p class="notes" id="credit">
- Documentation generated on Fri, 30 Jan 2004 16:37:28 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
- </p>
- </div></body>
-</html>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <!-- template designed by Marco Von Ballmoos -->
- <title>Docs for page TopologicalSorter.php</title>
- <link rel="stylesheet" href="../media/stylesheet.css" />
- <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
- </head>
- <body>
- <div class="page-body">
-<h2 class="file-name">/Structures/Graph/Manipulator/TopologicalSorter.php</h2>
-
-<a name="sec-description"></a>
-<div class="info-box">
- <div class="info-box-title">Description</div>
- <div class="nav-bar">
- <span class="disabled">Description</span> |
- <a href="#sec-classes">Classes</a>
- | <a href="#sec-includes">Includes</a>
- </div>
- <div class="info-box-body">
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">This file contains the definition of the Structures_Graph_Manipulator_TopologicalSorter class.</p>
- <ul class="tags">
- <li><span class="field">see:</span> <a href="../Structures_Graph/Structures_Graph_Manipulator_TopologicalSorter.html">Structures_Graph_Manipulator_TopologicalSorter</a></li>
- </ul>
-
- </div>
-</div>
-
- <a name="sec-classes"></a>
- <div class="info-box">
- <div class="info-box-title">Classes</div>
- <div class="nav-bar">
- <a href="#sec-description">Description</a> |
- <span class="disabled">Classes</span>
- | <a href="#sec-includes">Includes</a>
- </div>
- <div class="info-box-body">
- <table cellpadding="2" cellspacing="0" class="class-table">
- <tr>
- <th class="class-table-header">Class</th>
- <th class="class-table-header">Description</th>
- </tr>
- <tr>
- <td style="padding-right: 2em; vertical-align: top">
- <a href="../Structures_Graph/Structures_Graph_Manipulator_TopologicalSorter.html">Structures_Graph_Manipulator_TopologicalSorter</a>
- </td>
- <td>
- The Structures_Graph_Manipulator_TopologicalSorter is a manipulator which is able to return the set of nodes in a graph, sorted by topological order.
- </td>
- </tr>
- </table>
- </div>
- </div>
-
- <a name="sec-includes"></a>
- <div class="info-box">
- <div class="info-box-title">Includes</div>
- <div class="nav-bar">
- <a href="#sec-description">Description</a> |
- <a href="#sec-classes">Classes</a>
- | <span class="disabled">Includes</span>
- </div>
- <div class="info-box-body">
- <a name="_PEAR_php"><!-- --></a>
-<div class="oddrow">
-
- <div>
- <span class="include-title">
- <span class="include-type">require_once</span>
- (<span class="include-name">'PEAR.php'</span>)
- (line <span class="line-number">35</span>)
- </span>
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-
-</div>
-<a name="_Structures/Graph_php"><!-- --></a>
-<div class="evenrow">
-
- <div>
- <span class="include-title">
- <span class="include-type">require_once</span>
- (<span class="include-name"><a href="../Structures_Graph/_Structures_Graph_php.html">'Structures/Graph.php'</a></span>)
- (line <span class="line-number">37</span>)
- </span>
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-
-</div>
-<a name="_Structures/Graph/Node_php"><!-- --></a>
-<div class="oddrow">
-
- <div>
- <span class="include-title">
- <span class="include-type">require_once</span>
- (<span class="include-name"><a href="../Structures_Graph/_Structures_Graph_Node_php.html">'Structures/Graph/Node.php'</a></span>)
- (line <span class="line-number">39</span>)
- </span>
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-
-</div>
-<a name="_Structures/Graph/Manipulator/AcyclicTest_php"><!-- --></a>
-<div class="evenrow">
-
- <div>
- <span class="include-title">
- <span class="include-type">require_once</span>
- (<span class="include-name"><a href="../Structures_Graph/_Structures_Graph_Manipulator_AcyclicTest_php.html">'Structures/Graph/Manipulator/AcyclicTest.php'</a></span>)
- (line <span class="line-number">41</span>)
- </span>
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-
-</div>
- </div>
- </div>
-
-
-
-
- <p class="notes" id="credit">
- Documentation generated on Fri, 30 Jan 2004 16:37:29 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
- </p>
- </div></body>
-</html>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <!-- template designed by Marco Von Ballmoos -->
- <title>Docs for page Node.php</title>
- <link rel="stylesheet" href="../media/stylesheet.css" />
- <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
- </head>
- <body>
- <div class="page-body">
-<h2 class="file-name">/Structures/Graph/Node.php</h2>
-
-<a name="sec-description"></a>
-<div class="info-box">
- <div class="info-box-title">Description</div>
- <div class="nav-bar">
- <span class="disabled">Description</span> |
- <a href="#sec-classes">Classes</a>
- | <a href="#sec-includes">Includes</a>
- </div>
- <div class="info-box-body">
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">This file contains the definition of the Structures_Graph_Node class</p>
- <ul class="tags">
- <li><span class="field">see:</span> <a href="../Structures_Graph/Structures_Graph_Node.html">Structures_Graph_Node</a></li>
- </ul>
-
- </div>
-</div>
-
- <a name="sec-classes"></a>
- <div class="info-box">
- <div class="info-box-title">Classes</div>
- <div class="nav-bar">
- <a href="#sec-description">Description</a> |
- <span class="disabled">Classes</span>
- | <a href="#sec-includes">Includes</a>
- </div>
- <div class="info-box-body">
- <table cellpadding="2" cellspacing="0" class="class-table">
- <tr>
- <th class="class-table-header">Class</th>
- <th class="class-table-header">Description</th>
- </tr>
- <tr>
- <td style="padding-right: 2em; vertical-align: top">
- <a href="../Structures_Graph/Structures_Graph_Node.html">Structures_Graph_Node</a>
- </td>
- <td>
- The Structures_Graph_Node class represents a Node that can be member of a graph node set.
- </td>
- </tr>
- </table>
- </div>
- </div>
-
- <a name="sec-includes"></a>
- <div class="info-box">
- <div class="info-box-title">Includes</div>
- <div class="nav-bar">
- <a href="#sec-description">Description</a> |
- <a href="#sec-classes">Classes</a>
- | <span class="disabled">Includes</span>
- </div>
- <div class="info-box-body">
- <a name="_PEAR_php"><!-- --></a>
-<div class="evenrow">
-
- <div>
- <span class="include-title">
- <span class="include-type">require_once</span>
- (<span class="include-name">'PEAR.php'</span>)
- (line <span class="line-number">35</span>)
- </span>
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-
-</div>
-<a name="_Structures/Graph_php"><!-- --></a>
-<div class="oddrow">
-
- <div>
- <span class="include-title">
- <span class="include-type">require_once</span>
- (<span class="include-name"><a href="../Structures_Graph/_Structures_Graph_php.html">'Structures/Graph.php'</a></span>)
- (line <span class="line-number">37</span>)
- </span>
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-
-</div>
- </div>
- </div>
-
-
-
-
- <p class="notes" id="credit">
- Documentation generated on Fri, 30 Jan 2004 16:37:29 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
- </p>
- </div></body>
-</html>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <!-- template designed by Marco Von Ballmoos -->
- <title>Docs for page Graph.php</title>
- <link rel="stylesheet" href="../media/stylesheet.css" />
- <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
- </head>
- <body>
- <div class="page-body">
-<h2 class="file-name">/Structures/Graph.php</h2>
-
-<a name="sec-description"></a>
-<div class="info-box">
- <div class="info-box-title">Description</div>
- <div class="nav-bar">
- <span class="disabled">Description</span> |
- <a href="#sec-classes">Classes</a>
- | <a href="#sec-includes">Includes</a>
- | <a href="#sec-constants">Constants</a>
- </div>
- <div class="info-box-body">
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">The Graph.php file contains the definition of the Structures_Graph class</p>
- <ul class="tags">
- <li><span class="field">see:</span> <a href="../Structures_Graph/Structures_Graph.html">Structures_Graph</a></li>
- </ul>
-
- </div>
-</div>
-
- <a name="sec-classes"></a>
- <div class="info-box">
- <div class="info-box-title">Classes</div>
- <div class="nav-bar">
- <a href="#sec-description">Description</a> |
- <span class="disabled">Classes</span>
- | <a href="#sec-includes">Includes</a>
- | <a href="#sec-constants">Constants</a>
- </div>
- <div class="info-box-body">
- <table cellpadding="2" cellspacing="0" class="class-table">
- <tr>
- <th class="class-table-header">Class</th>
- <th class="class-table-header">Description</th>
- </tr>
- <tr>
- <td style="padding-right: 2em; vertical-align: top">
- <a href="../Structures_Graph/Structures_Graph.html">Structures_Graph</a>
- </td>
- <td>
- The Structures_Graph class represents a graph data structure.
- </td>
- </tr>
- </table>
- </div>
- </div>
-
- <a name="sec-includes"></a>
- <div class="info-box">
- <div class="info-box-title">Includes</div>
- <div class="nav-bar">
- <a href="#sec-description">Description</a> |
- <a href="#sec-classes">Classes</a>
- | <span class="disabled">Includes</span>
- | <a href="#sec-constants">Constants</a>
- </div>
- <div class="info-box-body">
- <a name="_Structures/Graph/Node_php"><!-- --></a>
-<div class="oddrow">
-
- <div>
- <span class="include-title">
- <span class="include-type">require_once</span>
- (<span class="include-name"><a href="../Structures_Graph/_Structures_Graph_Node_php.html">'Structures/Graph/Node.php'</a></span>)
- (line <span class="line-number">37</span>)
- </span>
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">Graph Node</p>
-
-</div>
-<a name="_PEAR_php"><!-- --></a>
-<div class="evenrow">
-
- <div>
- <span class="include-title">
- <span class="include-type">require_once</span>
- (<span class="include-name">'PEAR.php'</span>)
- (line <span class="line-number">35</span>)
- </span>
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-<p class="short-description">PEAR base classes</p>
-
-</div>
- </div>
- </div>
-
- <a name="sec-constants"></a>
- <div class="info-box">
- <div class="info-box-title">Constants</div>
- <div class="nav-bar">
- <a href="#sec-description">Description</a> |
- <a href="#sec-classes">Classes</a>
- | <a href="#sec-includes">Includes</a>
- | <span class="disabled">Constants</span>
- </div>
- <div class="info-box-body">
- <a name="defineSTRUCTURES_GRAPH_ERROR_GENERIC"><!-- --></a>
-<div class="oddrow">
-
- <div>
- <span class="const-title">
- <span class="const-name">STRUCTURES_GRAPH_ERROR_GENERIC</span> = 100
- (line <span class="line-number">40</span>)
- </span>
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-
-
-</div>
- </div>
- </div>
-
-
-
- <p class="notes" id="credit">
- Documentation generated on Fri, 30 Jan 2004 16:37:28 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
- </p>
- </div></body>
-</html>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <!-- template designed by Marco Von Ballmoos -->
- <title></title>
- <link rel="stylesheet" href="media/stylesheet.css" />
- <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
- </head>
- <body>
-
-<!-- Start of Class Data -->
-<H2>
-
-</H2>
-<h2>Root class Structures_Graph</h2>
-<ul>
-<li><a href="Structures_Graph/Structures_Graph.html">Structures_Graph</a></li></ul>
-
-<h2>Root class Structures_Graph_Manipulator_AcyclicTest</h2>
-<ul>
-<li><a href="Structures_Graph/Structures_Graph_Manipulator_AcyclicTest.html">Structures_Graph_Manipulator_AcyclicTest</a></li></ul>
-
-<h2>Root class Structures_Graph_Manipulator_TopologicalSorter</h2>
-<ul>
-<li><a href="Structures_Graph/Structures_Graph_Manipulator_TopologicalSorter.html">Structures_Graph_Manipulator_TopologicalSorter</a></li></ul>
-
-<h2>Root class Structures_Graph_Node</h2>
-<ul>
-<li><a href="Structures_Graph/Structures_Graph_Node.html">Structures_Graph_Node</a></li></ul>
-
- <p class="notes" id="credit">
- Documentation generated on Fri, 30 Jan 2004 16:37:28 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
- </p>
- </body>
-</html>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <!-- template designed by Marco Von Ballmoos -->
- <title></title>
- <link rel="stylesheet" href="media/stylesheet.css" />
- <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
- </head>
- <body>
- <a name="top"></a>
-<h2>Full index</h2>
-<h3>Package indexes</h3>
-<ul>
- <li><a href="elementindex_Structures_Graph.html">Structures_Graph</a></li>
-</ul>
-<br />
-<div class="index-letter-menu">
- <a class="index-letter" href="elementindex.html#a">a</a>
- <a class="index-letter" href="elementindex.html#c">c</a>
- <a class="index-letter" href="elementindex.html#g">g</a>
- <a class="index-letter" href="elementindex.html#i">i</a>
- <a class="index-letter" href="elementindex.html#m">m</a>
- <a class="index-letter" href="elementindex.html#n">n</a>
- <a class="index-letter" href="elementindex.html#o">o</a>
- <a class="index-letter" href="elementindex.html#r">r</a>
- <a class="index-letter" href="elementindex.html#s">s</a>
- <a class="index-letter" href="elementindex.html#t">t</a>
- <a class="index-letter" href="elementindex.html#u">u</a>
-</div>
-
- <a name="a"></a>
- <div class="index-letter-section">
- <div style="float: left" class="index-letter-title">a</div>
- <div style="float: right"><a href="#top">top</a></div>
- <div style="clear: both"></div>
- </div>
- <dl>
- <dt class="field">
- <span class="method-title">addNode</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph.html#methodaddNode">Structures_Graph::addNode()</a> in Graph.php</div>
- <div class="index-item-description">Add a Node to the Graph</div>
- </dd>
- <dt class="field">
- <span class="include-title">AcyclicTest.php</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/_Structures_Graph_Manipulator_AcyclicTest_php.html">AcyclicTest.php</a> in AcyclicTest.php</div>
- </dd>
- </dl>
- <a name="c"></a>
- <div class="index-letter-section">
- <div style="float: left" class="index-letter-title">c</div>
- <div style="float: right"><a href="#top">top</a></div>
- <div style="clear: both"></div>
- </div>
- <dl>
- <dt class="field">
- <span class="method-title">connectsTo</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodconnectsTo">Structures_Graph_Node::connectsTo()</a> in Node.php</div>
- <div class="index-item-description">Test wether this node has an arc to the target node</div>
- </dd>
- <dt class="field">
- <span class="method-title">connectTo</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodconnectTo">Structures_Graph_Node::connectTo()</a> in Node.php</div>
- <div class="index-item-description">Connect this node to another one.</div>
- </dd>
- </dl>
- <a name="g"></a>
- <div class="index-letter-section">
- <div style="float: left" class="index-letter-title">g</div>
- <div style="float: right"><a href="#top">top</a></div>
- <div style="clear: both"></div>
- </div>
- <dl>
- <dt class="field">
- <span class="method-title">getData</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodgetData">Structures_Graph_Node::getData()</a> in Node.php</div>
- <div class="index-item-description">Node data getter.</div>
- </dd>
- <dt class="field">
- <span class="method-title">getGraph</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodgetGraph">Structures_Graph_Node::getGraph()</a> in Node.php</div>
- <div class="index-item-description">Node graph getter</div>
- </dd>
- <dt class="field">
- <span class="method-title">getMetadata</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodgetMetadata">Structures_Graph_Node::getMetadata()</a> in Node.php</div>
- <div class="index-item-description">Node metadata getter</div>
- </dd>
- <dt class="field">
- <span class="method-title">getNeighbours</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodgetNeighbours">Structures_Graph_Node::getNeighbours()</a> in Node.php</div>
- <div class="index-item-description">Return nodes connected to this one.</div>
- </dd>
- <dt class="field">
- <span class="method-title">getNodes</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph.html#methodgetNodes">Structures_Graph::getNodes()</a> in Graph.php</div>
- <div class="index-item-description">Return the node set, in no particular order. For ordered node sets, use a Graph Manipulator insted.</div>
- </dd>
- <dt class="field">
- <span class="include-title">Graph.php</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/_Structures_Graph_php.html">Graph.php</a> in Graph.php</div>
- </dd>
- </dl>
- <a name="i"></a>
- <div class="index-letter-section">
- <div style="float: left" class="index-letter-title">i</div>
- <div style="float: right"><a href="#top">top</a></div>
- <div style="clear: both"></div>
- </div>
- <dl>
- <dt class="field">
- <span class="method-title">inDegree</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodinDegree">Structures_Graph_Node::inDegree()</a> in Node.php</div>
- <div class="index-item-description">Calculate the in degree of the node.</div>
- </dd>
- <dt class="field">
- <span class="method-title">isAcyclic</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Manipulator_AcyclicTest.html#methodisAcyclic">Structures_Graph_Manipulator_AcyclicTest::isAcyclic()</a> in AcyclicTest.php</div>
- <div class="index-item-description">isAcyclic returns true if a graph contains no cycles, false otherwise.</div>
- </dd>
- <dt class="field">
- <span class="method-title">isDirected</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph.html#methodisDirected">Structures_Graph::isDirected()</a> in Graph.php</div>
- <div class="index-item-description">Return true if a graph is directed</div>
- </dd>
- </dl>
- <a name="m"></a>
- <div class="index-letter-section">
- <div style="float: left" class="index-letter-title">m</div>
- <div style="float: right"><a href="#top">top</a></div>
- <div style="clear: both"></div>
- </div>
- <dl>
- <dt class="field">
- <span class="method-title">metadataKeyExists</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodmetadataKeyExists">Structures_Graph_Node::metadataKeyExists()</a> in Node.php</div>
- <div class="index-item-description">Test for existence of metadata under a given key.</div>
- </dd>
- </dl>
- <a name="n"></a>
- <div class="index-letter-section">
- <div style="float: left" class="index-letter-title">n</div>
- <div style="float: right"><a href="#top">top</a></div>
- <div style="clear: both"></div>
- </div>
- <dl>
- <dt class="field">
- <span class="include-title">Node.php</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/_Structures_Graph_Node_php.html">Node.php</a> in Node.php</div>
- </dd>
- </dl>
- <a name="o"></a>
- <div class="index-letter-section">
- <div style="float: left" class="index-letter-title">o</div>
- <div style="float: right"><a href="#top">top</a></div>
- <div style="clear: both"></div>
- </div>
- <dl>
- <dt class="field">
- <span class="method-title">outDegree</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodoutDegree">Structures_Graph_Node::outDegree()</a> in Node.php</div>
- <div class="index-item-description">Calculate the out degree of the node.</div>
- </dd>
- </dl>
- <a name="r"></a>
- <div class="index-letter-section">
- <div style="float: left" class="index-letter-title">r</div>
- <div style="float: right"><a href="#top">top</a></div>
- <div style="clear: both"></div>
- </div>
- <dl>
- <dt class="field">
- <span class="method-title">removeNode</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph.html#methodremoveNode">Structures_Graph::removeNode()</a> in Graph.php</div>
- <div class="index-item-description">Remove a Node from the Graph</div>
- </dd>
- </dl>
- <a name="s"></a>
- <div class="index-letter-section">
- <div style="float: left" class="index-letter-title">s</div>
- <div style="float: right"><a href="#top">top</a></div>
- <div style="clear: both"></div>
- </div>
- <dl>
- <dt class="field">
- <span class="method-title">setData</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodsetData">Structures_Graph_Node::setData()</a> in Node.php</div>
- <div class="index-item-description">Node data setter</div>
- </dd>
- <dt class="field">
- <span class="method-title">setGraph</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodsetGraph">Structures_Graph_Node::setGraph()</a> in Node.php</div>
- <div class="index-item-description">Node graph setter. This method should not be called directly. Use Graph::addNode instead.</div>
- </dd>
- <dt class="field">
- <span class="method-title">setMetadata</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodsetMetadata">Structures_Graph_Node::setMetadata()</a> in Node.php</div>
- <div class="index-item-description">Node metadata setter</div>
- </dd>
- <dt class="field">
- <span class="method-title">sort</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Manipulator_TopologicalSorter.html#methodsort">Structures_Graph_Manipulator_TopologicalSorter::sort()</a> in TopologicalSorter.php</div>
- <div class="index-item-description">sort returns the graph's nodes, sorted by topological order.</div>
- </dd>
- <dt class="field">
- Structures_Graph
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph.html">Structures_Graph</a> in Graph.php</div>
- <div class="index-item-description">The Structures_Graph class represents a graph data structure.</div>
- </dd>
- <dt class="field">
- <span class="method-title">Structures_Graph</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph.html#methodStructures_Graph">Structures_Graph::Structures_Graph()</a> in Graph.php</div>
- <div class="index-item-description">Constructor</div>
- </dd>
- <dt class="field">
- <span class="const-title">STRUCTURES_GRAPH_ERROR_GENERIC</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/_Structures_Graph_php.html#defineSTRUCTURES_GRAPH_ERROR_GENERIC">STRUCTURES_GRAPH_ERROR_GENERIC</a> in Graph.php</div>
- </dd>
- <dt class="field">
- Structures_Graph_Manipulator_AcyclicTest
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Manipulator_AcyclicTest.html">Structures_Graph_Manipulator_AcyclicTest</a> in AcyclicTest.php</div>
- <div class="index-item-description">The Structures_Graph_Manipulator_AcyclicTest is a graph manipulator which tests whether a graph contains a cycle.</div>
- </dd>
- <dt class="field">
- Structures_Graph_Manipulator_TopologicalSorter
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Manipulator_TopologicalSorter.html">Structures_Graph_Manipulator_TopologicalSorter</a> in TopologicalSorter.php</div>
- <div class="index-item-description">The Structures_Graph_Manipulator_TopologicalSorter is a manipulator which is able to return the set of nodes in a graph, sorted by topological order.</div>
- </dd>
- <dt class="field">
- <span class="method-title">Structures_Graph_Node</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodStructures_Graph_Node">Structures_Graph_Node::Structures_Graph_Node()</a> in Node.php</div>
- <div class="index-item-description">Constructor</div>
- </dd>
- <dt class="field">
- Structures_Graph_Node
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html">Structures_Graph_Node</a> in Node.php</div>
- <div class="index-item-description">The Structures_Graph_Node class represents a Node that can be member of a graph node set.</div>
- </dd>
- </dl>
- <a name="t"></a>
- <div class="index-letter-section">
- <div style="float: left" class="index-letter-title">t</div>
- <div style="float: right"><a href="#top">top</a></div>
- <div style="clear: both"></div>
- </div>
- <dl>
- <dt class="field">
- <span class="include-title">TopologicalSorter.php</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/_Structures_Graph_Manipulator_TopologicalSorter_php.html">TopologicalSorter.php</a> in TopologicalSorter.php</div>
- </dd>
- </dl>
- <a name="u"></a>
- <div class="index-letter-section">
- <div style="float: left" class="index-letter-title">u</div>
- <div style="float: right"><a href="#top">top</a></div>
- <div style="clear: both"></div>
- </div>
- <dl>
- <dt class="field">
- <span class="method-title">unsetMetadata</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodunsetMetadata">Structures_Graph_Node::unsetMetadata()</a> in Node.php</div>
- <div class="index-item-description">Delete metadata by key</div>
- </dd>
- </dl>
-
-<div class="index-letter-menu">
- <a class="index-letter" href="elementindex.html#a">a</a>
- <a class="index-letter" href="elementindex.html#c">c</a>
- <a class="index-letter" href="elementindex.html#g">g</a>
- <a class="index-letter" href="elementindex.html#i">i</a>
- <a class="index-letter" href="elementindex.html#m">m</a>
- <a class="index-letter" href="elementindex.html#n">n</a>
- <a class="index-letter" href="elementindex.html#o">o</a>
- <a class="index-letter" href="elementindex.html#r">r</a>
- <a class="index-letter" href="elementindex.html#s">s</a>
- <a class="index-letter" href="elementindex.html#t">t</a>
- <a class="index-letter" href="elementindex.html#u">u</a>
-</div> </body>
-</html>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <!-- template designed by Marco Von Ballmoos -->
- <title></title>
- <link rel="stylesheet" href="media/stylesheet.css" />
- <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
- </head>
- <body>
- <a name="top"></a>
-<h2>[Structures_Graph] element index</h2>
-<a href="elementindex.html">All elements</a>
-<br />
-<div class="index-letter-menu">
- <a class="index-letter" href="elementindex_Structures_Graph.html#a">a</a>
- <a class="index-letter" href="elementindex_Structures_Graph.html#c">c</a>
- <a class="index-letter" href="elementindex_Structures_Graph.html#g">g</a>
- <a class="index-letter" href="elementindex_Structures_Graph.html#i">i</a>
- <a class="index-letter" href="elementindex_Structures_Graph.html#m">m</a>
- <a class="index-letter" href="elementindex_Structures_Graph.html#n">n</a>
- <a class="index-letter" href="elementindex_Structures_Graph.html#o">o</a>
- <a class="index-letter" href="elementindex_Structures_Graph.html#r">r</a>
- <a class="index-letter" href="elementindex_Structures_Graph.html#s">s</a>
- <a class="index-letter" href="elementindex_Structures_Graph.html#t">t</a>
- <a class="index-letter" href="elementindex_Structures_Graph.html#u">u</a>
-</div>
-
- <a name="a"></a>
- <div class="index-letter-section">
- <div style="float: left" class="index-letter-title">a</div>
- <div style="float: right"><a href="#top">top</a></div>
- <div style="clear: both"></div>
- </div>
- <dl>
- <dt class="field">
- <span class="method-title">addNode</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph.html#methodaddNode">Structures_Graph::addNode()</a> in Graph.php</div>
- <div class="index-item-description">Add a Node to the Graph</div>
- </dd>
- <dt class="field">
- <span class="include-title">AcyclicTest.php</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/_Structures_Graph_Manipulator_AcyclicTest_php.html">AcyclicTest.php</a> in AcyclicTest.php</div>
- </dd>
- </dl>
- <a name="c"></a>
- <div class="index-letter-section">
- <div style="float: left" class="index-letter-title">c</div>
- <div style="float: right"><a href="#top">top</a></div>
- <div style="clear: both"></div>
- </div>
- <dl>
- <dt class="field">
- <span class="method-title">connectsTo</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodconnectsTo">Structures_Graph_Node::connectsTo()</a> in Node.php</div>
- <div class="index-item-description">Test wether this node has an arc to the target node</div>
- </dd>
- <dt class="field">
- <span class="method-title">connectTo</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodconnectTo">Structures_Graph_Node::connectTo()</a> in Node.php</div>
- <div class="index-item-description">Connect this node to another one.</div>
- </dd>
- </dl>
- <a name="g"></a>
- <div class="index-letter-section">
- <div style="float: left" class="index-letter-title">g</div>
- <div style="float: right"><a href="#top">top</a></div>
- <div style="clear: both"></div>
- </div>
- <dl>
- <dt class="field">
- <span class="method-title">getData</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodgetData">Structures_Graph_Node::getData()</a> in Node.php</div>
- <div class="index-item-description">Node data getter.</div>
- </dd>
- <dt class="field">
- <span class="method-title">getGraph</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodgetGraph">Structures_Graph_Node::getGraph()</a> in Node.php</div>
- <div class="index-item-description">Node graph getter</div>
- </dd>
- <dt class="field">
- <span class="method-title">getMetadata</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodgetMetadata">Structures_Graph_Node::getMetadata()</a> in Node.php</div>
- <div class="index-item-description">Node metadata getter</div>
- </dd>
- <dt class="field">
- <span class="method-title">getNeighbours</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodgetNeighbours">Structures_Graph_Node::getNeighbours()</a> in Node.php</div>
- <div class="index-item-description">Return nodes connected to this one.</div>
- </dd>
- <dt class="field">
- <span class="method-title">getNodes</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph.html#methodgetNodes">Structures_Graph::getNodes()</a> in Graph.php</div>
- <div class="index-item-description">Return the node set, in no particular order. For ordered node sets, use a Graph Manipulator insted.</div>
- </dd>
- <dt class="field">
- <span class="include-title">Graph.php</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/_Structures_Graph_php.html">Graph.php</a> in Graph.php</div>
- </dd>
- </dl>
- <a name="i"></a>
- <div class="index-letter-section">
- <div style="float: left" class="index-letter-title">i</div>
- <div style="float: right"><a href="#top">top</a></div>
- <div style="clear: both"></div>
- </div>
- <dl>
- <dt class="field">
- <span class="method-title">inDegree</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodinDegree">Structures_Graph_Node::inDegree()</a> in Node.php</div>
- <div class="index-item-description">Calculate the in degree of the node.</div>
- </dd>
- <dt class="field">
- <span class="method-title">isAcyclic</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Manipulator_AcyclicTest.html#methodisAcyclic">Structures_Graph_Manipulator_AcyclicTest::isAcyclic()</a> in AcyclicTest.php</div>
- <div class="index-item-description">isAcyclic returns true if a graph contains no cycles, false otherwise.</div>
- </dd>
- <dt class="field">
- <span class="method-title">isDirected</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph.html#methodisDirected">Structures_Graph::isDirected()</a> in Graph.php</div>
- <div class="index-item-description">Return true if a graph is directed</div>
- </dd>
- </dl>
- <a name="m"></a>
- <div class="index-letter-section">
- <div style="float: left" class="index-letter-title">m</div>
- <div style="float: right"><a href="#top">top</a></div>
- <div style="clear: both"></div>
- </div>
- <dl>
- <dt class="field">
- <span class="method-title">metadataKeyExists</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodmetadataKeyExists">Structures_Graph_Node::metadataKeyExists()</a> in Node.php</div>
- <div class="index-item-description">Test for existence of metadata under a given key.</div>
- </dd>
- </dl>
- <a name="n"></a>
- <div class="index-letter-section">
- <div style="float: left" class="index-letter-title">n</div>
- <div style="float: right"><a href="#top">top</a></div>
- <div style="clear: both"></div>
- </div>
- <dl>
- <dt class="field">
- <span class="include-title">Node.php</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/_Structures_Graph_Node_php.html">Node.php</a> in Node.php</div>
- </dd>
- </dl>
- <a name="o"></a>
- <div class="index-letter-section">
- <div style="float: left" class="index-letter-title">o</div>
- <div style="float: right"><a href="#top">top</a></div>
- <div style="clear: both"></div>
- </div>
- <dl>
- <dt class="field">
- <span class="method-title">outDegree</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodoutDegree">Structures_Graph_Node::outDegree()</a> in Node.php</div>
- <div class="index-item-description">Calculate the out degree of the node.</div>
- </dd>
- </dl>
- <a name="r"></a>
- <div class="index-letter-section">
- <div style="float: left" class="index-letter-title">r</div>
- <div style="float: right"><a href="#top">top</a></div>
- <div style="clear: both"></div>
- </div>
- <dl>
- <dt class="field">
- <span class="method-title">removeNode</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph.html#methodremoveNode">Structures_Graph::removeNode()</a> in Graph.php</div>
- <div class="index-item-description">Remove a Node from the Graph</div>
- </dd>
- </dl>
- <a name="s"></a>
- <div class="index-letter-section">
- <div style="float: left" class="index-letter-title">s</div>
- <div style="float: right"><a href="#top">top</a></div>
- <div style="clear: both"></div>
- </div>
- <dl>
- <dt class="field">
- <span class="method-title">setData</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodsetData">Structures_Graph_Node::setData()</a> in Node.php</div>
- <div class="index-item-description">Node data setter</div>
- </dd>
- <dt class="field">
- <span class="method-title">setGraph</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodsetGraph">Structures_Graph_Node::setGraph()</a> in Node.php</div>
- <div class="index-item-description">Node graph setter. This method should not be called directly. Use Graph::addNode instead.</div>
- </dd>
- <dt class="field">
- <span class="method-title">setMetadata</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodsetMetadata">Structures_Graph_Node::setMetadata()</a> in Node.php</div>
- <div class="index-item-description">Node metadata setter</div>
- </dd>
- <dt class="field">
- <span class="method-title">sort</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Manipulator_TopologicalSorter.html#methodsort">Structures_Graph_Manipulator_TopologicalSorter::sort()</a> in TopologicalSorter.php</div>
- <div class="index-item-description">sort returns the graph's nodes, sorted by topological order.</div>
- </dd>
- <dt class="field">
- Structures_Graph
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph.html">Structures_Graph</a> in Graph.php</div>
- <div class="index-item-description">The Structures_Graph class represents a graph data structure.</div>
- </dd>
- <dt class="field">
- <span class="method-title">Structures_Graph</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph.html#methodStructures_Graph">Structures_Graph::Structures_Graph()</a> in Graph.php</div>
- <div class="index-item-description">Constructor</div>
- </dd>
- <dt class="field">
- <span class="const-title">STRUCTURES_GRAPH_ERROR_GENERIC</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/_Structures_Graph_php.html#defineSTRUCTURES_GRAPH_ERROR_GENERIC">STRUCTURES_GRAPH_ERROR_GENERIC</a> in Graph.php</div>
- </dd>
- <dt class="field">
- Structures_Graph_Manipulator_AcyclicTest
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Manipulator_AcyclicTest.html">Structures_Graph_Manipulator_AcyclicTest</a> in AcyclicTest.php</div>
- <div class="index-item-description">The Structures_Graph_Manipulator_AcyclicTest is a graph manipulator which tests whether a graph contains a cycle.</div>
- </dd>
- <dt class="field">
- Structures_Graph_Manipulator_TopologicalSorter
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Manipulator_TopologicalSorter.html">Structures_Graph_Manipulator_TopologicalSorter</a> in TopologicalSorter.php</div>
- <div class="index-item-description">The Structures_Graph_Manipulator_TopologicalSorter is a manipulator which is able to return the set of nodes in a graph, sorted by topological order.</div>
- </dd>
- <dt class="field">
- <span class="method-title">Structures_Graph_Node</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodStructures_Graph_Node">Structures_Graph_Node::Structures_Graph_Node()</a> in Node.php</div>
- <div class="index-item-description">Constructor</div>
- </dd>
- <dt class="field">
- Structures_Graph_Node
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html">Structures_Graph_Node</a> in Node.php</div>
- <div class="index-item-description">The Structures_Graph_Node class represents a Node that can be member of a graph node set.</div>
- </dd>
- </dl>
- <a name="t"></a>
- <div class="index-letter-section">
- <div style="float: left" class="index-letter-title">t</div>
- <div style="float: right"><a href="#top">top</a></div>
- <div style="clear: both"></div>
- </div>
- <dl>
- <dt class="field">
- <span class="include-title">TopologicalSorter.php</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/_Structures_Graph_Manipulator_TopologicalSorter_php.html">TopologicalSorter.php</a> in TopologicalSorter.php</div>
- </dd>
- </dl>
- <a name="u"></a>
- <div class="index-letter-section">
- <div style="float: left" class="index-letter-title">u</div>
- <div style="float: right"><a href="#top">top</a></div>
- <div style="clear: both"></div>
- </div>
- <dl>
- <dt class="field">
- <span class="method-title">unsetMetadata</span>
- </dt>
- <dd class="index-item-body">
- <div class="index-item-details"><a href="Structures_Graph/Structures_Graph_Node.html#methodunsetMetadata">Structures_Graph_Node::unsetMetadata()</a> in Node.php</div>
- <div class="index-item-description">Delete metadata by key</div>
- </dd>
- </dl>
-
-<div class="index-letter-menu">
- <a class="index-letter" href="elementindex_Structures_Graph.html#a">a</a>
- <a class="index-letter" href="elementindex_Structures_Graph.html#c">c</a>
- <a class="index-letter" href="elementindex_Structures_Graph.html#g">g</a>
- <a class="index-letter" href="elementindex_Structures_Graph.html#i">i</a>
- <a class="index-letter" href="elementindex_Structures_Graph.html#m">m</a>
- <a class="index-letter" href="elementindex_Structures_Graph.html#n">n</a>
- <a class="index-letter" href="elementindex_Structures_Graph.html#o">o</a>
- <a class="index-letter" href="elementindex_Structures_Graph.html#r">r</a>
- <a class="index-letter" href="elementindex_Structures_Graph.html#s">s</a>
- <a class="index-letter" href="elementindex_Structures_Graph.html#t">t</a>
- <a class="index-letter" href="elementindex_Structures_Graph.html#u">u</a>
-</div> </body>
-</html>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <!-- template designed by Marco Von Ballmoos -->
- <title>phpDocumentor Parser Errors and Warnings</title>
- <link rel="stylesheet" href="media/stylesheet.css" />
- <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
- </head>
- <body>
- <a href="#Post-parsing">Post-parsing</a><br>
- <p class="notes" id="credit">
- Documentation generated on Fri, 30 Jan 2004 16:37:29 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
- </p>
- </body>
-</html>
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//FR"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <!-- Generated by phpDocumentor on Fri, 30 Jan 2004 16:37:28 +0000 -->
- <title>Structures_Graph Documentation</title>
- <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
-</head>
-
-<FRAMESET rows='100,*'>
- <FRAME src='packages.html' name='left_top' frameborder="1" bordercolor="#999999">
- <FRAMESET cols='25%,*'>
- <FRAME src='li_Structures_Graph.html' name='left_bottom' frameborder="1" bordercolor="#999999">
- <FRAME src='Structures_Graph/tutorial_Structures_Graph.pkg.html' name='right' frameborder="1" bordercolor="#999999">
- </FRAMESET>
- <NOFRAMES>
- <H2>Frame Alert</H2>
- <P>This document is designed to be viewed using the frames feature.
- If you see this message, you are using a non-frame-capable web client.</P>
- </NOFRAMES>
-</FRAMESET>
-</HTML>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <!-- template designed by Marco Von Ballmoos -->
- <title></title>
- <link rel="stylesheet" href="media/stylesheet.css" />
- <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
- </head>
- <body>
- <div class="package-title">Structures_Graph</div>
-<div class="package-details">
-
- <dl class="tree">
-
- <dt class="folder-title">Description</dt>
- <dd>
- <a href='classtrees_Structures_Graph.html' target='right'>Class trees</a><br />
- <a href='elementindex_Structures_Graph.html' target='right'>Index of elements</a><br />
- <a href="todolist.html" target="right">Todo List</a><br />
- </dd>
-
-
-
- <dt class="folder-title">Tutorials/Manuals</dt>
- <dd>
- <dl class="tree">
- <dt class="folder-title">Package-level</dt>
- <dd>
- <div><a href="Structures_Graph/tutorial_Structures_Graph.pkg.html" target="right">Structures_Graph Tutorial</a></div>
-
- </dd>
- </dl>
-
-
- </dd>
- <dt class="folder-title">Classes</dt>
- <dd><a href='Structures_Graph/Structures_Graph.html' target='right'>Structures_Graph</a></dd>
- <dd><a href='Structures_Graph/Structures_Graph_Manipulator_AcyclicTest.html' target='right'>Structures_Graph_Manipulator_AcyclicTest</a></dd>
- <dd><a href='Structures_Graph/Structures_Graph_Manipulator_TopologicalSorter.html' target='right'>Structures_Graph_Manipulator_TopologicalSorter</a></dd>
- <dd><a href='Structures_Graph/Structures_Graph_Node.html' target='right'>Structures_Graph_Node</a></dd>
- <dt class="folder-title">Files</dt>
- <dd><a href='Structures_Graph/_Structures_Graph_Manipulator_AcyclicTest_php.html' target='right'>AcyclicTest.php</a></dd>
- <dd><a href='Structures_Graph/_Structures_Graph_php.html' target='right'>Graph.php</a></dd>
- <dd><a href='Structures_Graph/_Structures_Graph_Node_php.html' target='right'>Node.php</a></dd>
- <dd><a href='Structures_Graph/_Structures_Graph_Manipulator_TopologicalSorter_php.html' target='right'>TopologicalSorter.php</a></dd>
-
-
- </dl>
-</div>
-<p class="notes"><a href="http://www.phpdoc.org" target="_blank">phpDocumentor v <span class="field">1.2.3</span></a></p>
-</BODY>
-</HTML>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <!-- template designed by Marco Von Ballmoos -->
- <title></title>
- <link rel="stylesheet" href="media/stylesheet.css" />
- <link rel="stylesheet" href="media/banner.css" />
- <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
- </head>
- <body>
- <div class="banner">
- <div class="banner-title">Structures_Graph</div>
- <div class="banner-menu">
- <table cellpadding="0" cellspacing="0" style="width: 100%">
- <tr>
- <td>
- </td>
- <td style="width: 2em">&nbsp;</td>
- <td style="text-align: right">
- </td>
- </tr>
- </table>
- </div>
- </div>
- </body>
- </html>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <!-- template designed by Marco Von Ballmoos -->
- <title>Todo List</title>
- <link rel="stylesheet" href="media/stylesheet.css" />
- <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
- </head>
- <body>
- <div align="center"><h1>Todo List</h1></div>
-<h2>Structures_Graph</h2>
-<h3><a href="Structures_Graph/Structures_Graph.html#methodremoveNode">Structures_Graph::removeNode()</a></h3>
-<ul>
- <li>This is unimplemented</li>
-</ul>
- <p class="notes" id="credit">
- Documentation generated on Fri, 30 Jan 2004 16:37:29 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
- </p>
- </body>
-</html>
+
<refnamediv>
<refname><classname>Structures_Graph</classname> Tutorial</refname>
<refpurpose>A first tour of graph datastructure manipulation</refpurpose>
@@ -93665,15 +91116,7 @@ for ($i=0;$i<sizeof($arcs);$i++) {
</para>
</refsect1>
</refentry>
-
-(cd ..; tar czf docs/arch.tgz "{arch}")
-rm -Rf "../{arch}"
-rm -Rf ./html
-mkdir -p ./html
-phpdoc --directory ../Structures,./tutorials --target ./html --title "Structures_Graph Documentation" --output "HTML:frames" --defaultpackagename structures_graph --defaultcategoryname structures --pear
-(cd ..; tar --absolute-names -xzf docs/arch.tgz)
-#rm arch.tgz
-
+
/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
// +-----------------------------------------------------------------------------+
// | Copyright (c) 2003 Sérgio Gonçalves Carvalho |
@@ -93734,10 +91177,9 @@ class Structures_Graph_Manipulator_AcyclicTest {
* This is a variant of Structures_Graph::inDegree which does
* not count nodes marked as visited.
*
- * @access private
* @return integer Number of non-visited nodes that link to this one
*/
- function _nonVisitedInDegree(&$node) {
+ protected static function _nonVisitedInDegree(&$node) {
$result = 0;
$graphNodes =& $node->_graph->getNodes();
foreach (array_keys($graphNodes) as $key) {
@@ -93750,9 +91192,9 @@ class Structures_Graph_Manipulator_AcyclicTest {
/* _isAcyclic {{{ */
/**
- * @access private
- */
- function _isAcyclic(&$graph) {
+ * Check if the graph is acyclic
+ */
+ protected static function _isAcyclic(&$graph) {
// Mark every node as not visited
$nodes =& $graph->getNodes();
$nodeKeys = array_keys($nodes);
@@ -93796,9 +91238,8 @@ class Structures_Graph_Manipulator_AcyclicTest {
* isAcyclic returns true if a graph contains no cycles, false otherwise.
*
* @return boolean true iff graph is acyclic
- * @access public
*/
- function isAcyclic(&$graph) {
+ public static function isAcyclic(&$graph) {
// We only test graphs
if (!is_a($graph, 'Structures_Graph')) return Pear::raiseError('Structures_Graph_Manipulator_AcyclicTest::isAcyclic received an object that is not a Structures_Graph', STRUCTURES_GRAPH_ERROR_GENERIC);
if (!$graph->isDirected()) return false; // Only directed graphs may be acyclic
@@ -93809,7 +91250,7 @@ class Structures_Graph_Manipulator_AcyclicTest {
}
/* }}} */
?>
-
+
/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
// +-----------------------------------------------------------------------------+
// | Copyright (c) 2003 Sérgio Gonçalves Carvalho |
@@ -93837,22 +91278,14 @@ class Structures_Graph_Manipulator_AcyclicTest {
/**
* This file contains the definition of the Structures_Graph_Manipulator_TopologicalSorter class.
*
- * @see Structures_Graph_Manipulator_TopologicalSorter
* @package Structures_Graph
*/
-/* dependencies {{{ */
-/** */
require_once 'PEAR.php';
-/** */
require_once 'Structures/Graph.php';
-/** */
require_once 'Structures/Graph/Node.php';
-/** */
require_once 'Structures/Graph/Manipulator/AcyclicTest.php';
-/* }}} */
-/* class Structures_Graph_Manipulator_TopologicalSorter {{{ */
/**
* The Structures_Graph_Manipulator_TopologicalSorter is a manipulator
* which is able to return the set of nodes in a graph, sorted by topological
@@ -93861,44 +91294,55 @@ require_once 'Structures/Graph/Manipulator/AcyclicTest.php';
* A graph may only be sorted topologically iff it's a DAG. You can test it
* with the Structures_Graph_Manipulator_AcyclicTest.
*
- * @author Sérgio Carvalho <sergio.carvalho@portugalmail.com>
- * @copyright (c) 2004 by Sérgio Carvalho
- * @see Structures_Graph_Manipulator_AcyclicTest
- * @package Structures_Graph
+ * @author Sérgio Carvalho <sergio.carvalho@portugalmail.com>
+ * @copyright (c) 2004 by Sérgio Carvalho
+ * @see Structures_Graph_Manipulator_AcyclicTest
+ * @package Structures_Graph
*/
-class Structures_Graph_Manipulator_TopologicalSorter {
- /* _nonVisitedInDegree {{{ */
+class Structures_Graph_Manipulator_TopologicalSorter
+{
/**
- *
- * This is a variant of Structures_Graph::inDegree which does
- * not count nodes marked as visited.
- *
- * @access private
- * @return integer Number of non-visited nodes that link to this one
- */
- function _nonVisitedInDegree(&$node) {
+ * This is a variant of Structures_Graph::inDegree which does
+ * not count nodes marked as visited.
+ *
+ * @param object $node Node to check
+ *
+ * @return integer Number of non-visited nodes that link to this one
+ */
+ protected static function _nonVisitedInDegree(&$node)
+ {
$result = 0;
$graphNodes =& $node->_graph->getNodes();
foreach (array_keys($graphNodes) as $key) {
- if ((!$graphNodes[$key]->getMetadata('topological-sort-visited')) && $graphNodes[$key]->connectsTo($node)) $result++;
+ if ((!$graphNodes[$key]->getMetadata('topological-sort-visited'))
+ && $graphNodes[$key]->connectsTo($node)
+ ) {
+ $result++;
+ }
}
return $result;
}
- /* }}} */
- /* _sort {{{ */
/**
- * @access private
- */
- function _sort(&$graph) {
+ * Sort implementation
+ *
+ * @param object $graph Graph to sort
+ *
+ * @return void
+ */
+ protected static function _sort(&$graph)
+ {
// Mark every node as not visited
$nodes =& $graph->getNodes();
$nodeKeys = array_keys($nodes);
$refGenerator = array();
- foreach($nodeKeys as $key) {
+ foreach ($nodeKeys as $key) {
$refGenerator[] = false;
- $nodes[$key]->setMetadata('topological-sort-visited', $refGenerator[sizeof($refGenerator) - 1]);
+ $nodes[$key]->setMetadata(
+ 'topological-sort-visited',
+ $refGenerator[sizeof($refGenerator) - 1]
+ );
}
// Iteratively peel off leaf nodes
@@ -93906,43 +91350,61 @@ class Structures_Graph_Manipulator_TopologicalSorter {
do {
// Find out which nodes are leafs (excluding visited nodes)
$leafNodes = array();
- foreach($nodeKeys as $key) {
- if ((!$nodes[$key]->getMetadata('topological-sort-visited')) && Structures_Graph_Manipulator_TopologicalSorter::_nonVisitedInDegree($nodes[$key]) == 0) {
+ foreach ($nodeKeys as $key) {
+ if ((!$nodes[$key]->getMetadata('topological-sort-visited'))
+ && static::_nonVisitedInDegree($nodes[$key]) == 0
+ ) {
$leafNodes[] =& $nodes[$key];
}
}
// Mark leafs as visited
$refGenerator[] = $topologicalLevel;
- for ($i=sizeof($leafNodes) - 1; $i>=0; $i--) {
+ for ($i = sizeof($leafNodes) - 1; $i>=0; $i--) {
$visited =& $leafNodes[$i]->getMetadata('topological-sort-visited');
$visited = true;
$leafNodes[$i]->setMetadata('topological-sort-visited', $visited);
- $leafNodes[$i]->setMetadata('topological-sort-level', $refGenerator[sizeof($refGenerator) - 1]);
+ $leafNodes[$i]->setMetadata(
+ 'topological-sort-level',
+ $refGenerator[sizeof($refGenerator) - 1]
+ );
}
$topologicalLevel++;
} while (sizeof($leafNodes) > 0);
// Cleanup visited marks
- foreach($nodeKeys as $key) $nodes[$key]->unsetMetadata('topological-sort-visited');
+ foreach ($nodeKeys as $key) {
+ $nodes[$key]->unsetMetadata('topological-sort-visited');
+ }
}
- /* }}} */
- /* sort {{{ */
/**
- *
- * sort returns the graph's nodes, sorted by topological order.
- *
- * The result is an array with
- * as many entries as topological levels. Each entry in this array is an array of nodes within
- * the given topological level.
- *
- * @return array The graph's nodes, sorted by topological order.
- * @access public
- */
- function sort(&$graph) {
+ * Sort returns the graph's nodes, sorted by topological order.
+ *
+ * The result is an array with as many entries as topological levels.
+ * Each entry in this array is an array of nodes within
+ * the given topological level.
+ *
+ * @param object $graph Graph to sort
+ *
+ * @return array The graph's nodes, sorted by topological order.
+ */
+ public static function sort(&$graph)
+ {
// We only sort graphs
- if (!is_a($graph, 'Structures_Graph')) return Pear::raiseError('Structures_Graph_Manipulator_TopologicalSorter::sort received an object that is not a Structures_Graph', STRUCTURES_GRAPH_ERROR_GENERIC);
- if (!Structures_Graph_Manipulator_AcyclicTest::isAcyclic($graph)) return Pear::raiseError('Structures_Graph_Manipulator_TopologicalSorter::sort received an graph that has cycles', STRUCTURES_GRAPH_ERROR_GENERIC);
+ if (!is_a($graph, 'Structures_Graph')) {
+ return Pear::raiseError(
+ 'Structures_Graph_Manipulator_TopologicalSorter::sort received'
+ . ' an object that is not a Structures_Graph',
+ STRUCTURES_GRAPH_ERROR_GENERIC
+ );
+ }
+ if (!Structures_Graph_Manipulator_AcyclicTest::isAcyclic($graph)) {
+ return Pear::raiseError(
+ 'Structures_Graph_Manipulator_TopologicalSorter::sort'
+ . ' received an graph that has cycles',
+ STRUCTURES_GRAPH_ERROR_GENERIC
+ );
+ }
Structures_Graph_Manipulator_TopologicalSorter::_sort($graph);
$result = array();
@@ -93950,19 +91412,21 @@ class Structures_Graph_Manipulator_TopologicalSorter {
// Fill out result array
$nodes =& $graph->getNodes();
$nodeKeys = array_keys($nodes);
- foreach($nodeKeys as $key) {
- if (!array_key_exists($nodes[$key]->getMetadata('topological-sort-level'), $result)) $result[$nodes[$key]->getMetadata('topological-sort-level')] = array();
- $result[$nodes[$key]->getMetadata('topological-sort-level')][] =& $nodes[$key];
+ foreach ($nodeKeys as $key) {
+ if (!array_key_exists($nodes[$key]->getMetadata('topological-sort-level'), $result)) {
+ $result[$nodes[$key]->getMetadata('topological-sort-level')]
+ = array();
+ }
+ $result[$nodes[$key]->getMetadata('topological-sort-level')][]
+ =& $nodes[$key];
$nodes[$key]->unsetMetadata('topological-sort-level');
}
return $result;
}
- /* }}} */
}
-/* }}} */
?>
-
+
/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
// +-----------------------------------------------------------------------------+
// | Copyright (c) 2003 Sérgio Gonçalves Carvalho |
@@ -94095,7 +91559,7 @@ class Structures_Graph_Node {
* @return mixed Data to store in node
* @access public
*/
- function setData($data) {
+ function setData(&$data) {
$this->_data =& $data;
}
/* }}} */
@@ -94177,7 +91641,7 @@ class Structures_Graph_Node {
* @param mixed Data
* @access public
*/
- function setMetadata($key, $data) {
+ function setMetadata($key, &$data) {
$this->_metadata[$key] =& $data;
}
/* }}} */
@@ -94304,7 +91768,7 @@ class Structures_Graph_Node {
/* }}} */
}
?>
-
+
/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
// +-----------------------------------------------------------------------------+
// | Copyright (c) 2003 Sérgio Gonçalves Carvalho |
@@ -94332,14 +91796,11 @@ class Structures_Graph_Node {
/**
* The Graph.php file contains the definition of the Structures_Graph class
*
- * @see Structures_Graph
* @package Structures_Graph
*/
/* dependencies {{{ */
-/** PEAR base classes */
require_once 'PEAR.php';
-/** Graph Node */
require_once 'Structures/Graph/Node.php';
/* }}} */
@@ -94354,65 +91815,86 @@ define('STRUCTURES_GRAPH_ERROR_GENERIC', 100);
* directional, and can be traveled only one way. In an undirected graph, arcs
* are bidirectional, and can be traveled both ways.
*
- * @author Sérgio Carvalho <sergio.carvalho@portugalmail.com>
- * @copyright (c) 2004 by Sérgio Carvalho
- * @package Structures_Graph
+ * @author Sérgio Carvalho <sergio.carvalho@portugalmail.com>
+ * @copyright (c) 2004 by Sérgio Carvalho
+ * @package Structures_Graph
*/
/* }}} */
-class Structures_Graph {
- /* fields {{{ */
+class Structures_Graph
+{
/**
+ * List of node objects in this graph
* @access private
*/
var $_nodes = array();
+
/**
+ * If the graph is directed or not
* @access private
*/
var $_directed = false;
- /* }}} */
- /* Constructor {{{ */
+
/**
- *
- * Constructor
- *
- * @param boolean Set to true if the graph is directed. Set to false if it is not directed. (Optional, defaults to true)
- * @access public
- */
- function Structures_Graph($directed = true) {
+ * Constructor
+ *
+ * @param boolean $directed Set to true if the graph is directed.
+ * Set to false if it is not directed.
+ */
+ public function __construct($directed = true)
+ {
$this->_directed = $directed;
}
- /* }}} */
- /* isDirected {{{ */
/**
- *
- * Return true if a graph is directed
- *
- * @return boolean true if the graph is directed
- * @access public
- */
- function isDirected() {
+ * Old constructor (PHP4-style; kept for BC with extending classes)
+ *
+ * @param boolean $directed Set to true if the graph is directed.
+ * Set to false if it is not directed.
+ *
+ * @return void
+ */
+ public function Structures_Graph($directed = true)
+ {
+ $this->__construct($directed);
+ }
+
+ /**
+ * Return true if a graph is directed
+ *
+ * @return boolean true if the graph is directed
+ */
+ public function isDirected()
+ {
return (boolean) $this->_directed;
}
- /* }}} */
- /* addNode {{{ */
/**
- *
- * Add a Node to the Graph
- *
- * @param Structures_Graph_Node The node to be added.
- * @access public
- */
- function addNode(&$newNode) {
+ * Add a Node to the Graph
+ *
+ * @param Structures_Graph_Node $newNode The node to be added.
+ *
+ * @return void
+ */
+ public function addNode(&$newNode)
+ {
// We only add nodes
- if (!is_a($newNode, 'Structures_Graph_Node')) return Pear::raiseError('Structures_Graph::addNode received an object that is not a Structures_Graph_Node', STRUCTURES_GRAPH_ERROR_GENERIC);
- // Graphs are node *sets*, so duplicates are forbidden. We allow nodes that are exactly equal, but disallow equal references.
- foreach($this->_nodes as $key => $node) {
+ if (!is_a($newNode, 'Structures_Graph_Node')) {
+ return Pear::raiseError(
+ 'Structures_Graph::addNode received an object that is not'
+ . ' a Structures_Graph_Node',
+ STRUCTURES_GRAPH_ERROR_GENERIC
+ );
+ }
+
+ //Graphs are node *sets*, so duplicates are forbidden.
+ // We allow nodes that are exactly equal, but disallow equal references.
+ foreach ($this->_nodes as $key => $node) {
/*
- ZE1 equality operators choke on the recursive cycle introduced by the _graph field in the Node object.
- So, we'll check references the hard way (change $this->_nodes[$key] and check if the change reflects in
+ ZE1 equality operators choke on the recursive cycle introduced
+ by the _graph field in the Node object.
+ So, we'll check references the hard way
+ (change $this->_nodes[$key] and check if the change reflects in
$node)
*/
$savedData = $this->_nodes[$key];
@@ -94420,45 +91902,69 @@ class Structures_Graph {
$this->_nodes[$key] = true;
if ($node === true) {
$this->_nodes[$key] = false;
- if ($node === false) $referenceIsEqualFlag = true;
+ if ($node === false) {
+ $referenceIsEqualFlag = true;
+ }
}
$this->_nodes[$key] = $savedData;
- if ($referenceIsEqualFlag) return Pear::raiseError('Structures_Graph::addNode received an object that is a duplicate for this dataset', STRUCTURES_GRAPH_ERROR_GENERIC);
+ if ($referenceIsEqualFlag) {
+ return Pear::raiseError(
+ 'Structures_Graph::addNode received an object that is'
+ . ' a duplicate for this dataset',
+ STRUCTURES_GRAPH_ERROR_GENERIC
+ );
+ }
}
$this->_nodes[] =& $newNode;
$newNode->setGraph($this);
}
- /* }}} */
- /* removeNode (unimplemented) {{{ */
/**
- *
- * Remove a Node from the Graph
- *
- * @todo This is unimplemented
- * @param Structures_Graph_Node The node to be removed from the graph
- * @access public
- */
- function removeNode(&$node) {
+ * Remove a Node from the Graph
+ *
+ * @param Structures_Graph_Node $node The node to be removed from the graph
+ *
+ * @return void
+ * @todo This is unimplemented
+ */
+ public function removeNode(&$node)
+ {
}
- /* }}} */
- /* getNodes {{{ */
/**
- *
- * Return the node set, in no particular order. For ordered node sets, use a Graph Manipulator insted.
- *
- * @access public
- * @see Structures_Graph_Manipulator_TopologicalSorter
- * @return array The set of nodes in this graph
- */
- function &getNodes() {
+ * Return the node set, in no particular order.
+ * For ordered node sets, use a Graph Manipulator insted.
+ *
+ * @return array The set of nodes in this graph
+ * @see Structures_Graph_Manipulator_TopologicalSorter
+ */
+ public function &getNodes()
+ {
return $this->_nodes;
}
- /* }}} */
}
?>
-
+
+require_once dirname(__FILE__) . '/helper.inc';
+
+class Structures_Graph_AllTests
+{
+ public static function main()
+ {
+ PHPUnit_TextUI_TestRunner::run(self::suite());
+ }
+
+ public static function suite()
+ {
+ $suite = new PHPUnit_Framework_TestSuite('Structures_Graph Tests');
+
+ $dir = new GlobIterator(dirname(__FILE__) . '/*Test.php');
+ $suite->addTestFiles($dir);
+
+ return $suite;
+ }
+}
+
/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
// +-----------------------------------------------------------------------------+
// | Copyright (c) 2003 Sérgio Gonçalves Carvalho |
@@ -94484,8 +91990,7 @@ class Structures_Graph {
// +-----------------------------------------------------------------------------+
//
-require_once 'Structures/Graph.php';
-require_once 'PHPUnit/Framework.php';
+require_once dirname(__FILE__) . '/helper.inc';
/**
* @access private
@@ -94538,23 +92043,23 @@ class BasicGraph extends PHPUnit_Framework_TestCase
$this->_graph = new Structures_Graph();
$data = 1;
$node = new Structures_Graph_Node();
- $node->setData(&$data);
+ $node->setData($data);
$this->_graph->addNode($node);
$data = 2;
$dataInNode =& $this->_graph->getNodes();
$dataInNode =& $dataInNode[0];
$dataInNode =& $dataInNode->getData();
- $this->assertTrue($data === $dataInNode);
+ $this->assertEquals($data, $dataInNode);
}
function test_metadata_references() {
$this->_graph = new Structures_Graph();
$data = 1;
$node = new Structures_Graph_Node();
- $node->setMetadata('5', &$data);
+ $node->setMetadata('5', $data);
$data = 2;
$dataInNode =& $node->getMetadata('5');
- $this->assertTrue($data === $dataInNode);
+ $this->assertEquals($data, $dataInNode);
}
function test_metadata_key_exists() {
@@ -94629,632 +92134,460 @@ class BasicGraph extends PHPUnit_Framework_TestCase
}
}
?>
-
+
+require_once dirname(__FILE__) . '/helper.inc';
+require_once 'Structures/Graph/Manipulator/TopologicalSorter.php';
-/**
- * Master Unit Test Suite file for Structures_Graph
- *
- * This top-level test suite file organizes
- * all class test suite files,
- * so that the full suite can be run
- * by PhpUnit or via "pear run-tests -u".
- *
- * PHP version 5
- *
- * @category XML
- * @package XML_Util
- * @subpackage UnitTesting
- * @author Chuck Burgess <ashnazg@php.net>
- * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/XML_Util
- * @since 1.2.0a1
- */
+class TopologicalSorterTest extends PHPUnit_Framework_TestCase
+{
+ public function testSort()
+ {
+ $graph = new Structures_Graph();
+
+ $name1 = 'node1';
+ $node1 = new Structures_Graph_Node();
+ $node1->setData($name1);
+ $graph->addNode($node1);
+
+ $name11 = 'node11';
+ $node11 = new Structures_Graph_Node();
+ $node11->setData($name11);
+ $graph->addNode($node11);
+ $node1->connectTo($node11);
+
+ $name12 = 'node12';
+ $node12 = new Structures_Graph_Node();
+ $node12->setData($name12);
+ $graph->addNode($node12);
+ $node1->connectTo($node12);
+
+ $name121 = 'node121';
+ $node121 = new Structures_Graph_Node();
+ $node121->setData($name121);
+ $graph->addNode($node121);
+ $node12->connectTo($node121);
+
+ $name2 = 'node2';
+ $node2 = new Structures_Graph_Node();
+ $node2->setData($name2);
+ $graph->addNode($node2);
+
+ $name21 = 'node21';
+ $node21 = new Structures_Graph_Node();
+ $node21->setData($name21);
+ $graph->addNode($node21);
+ $node2->connectTo($node21);
+
+ $nodes = Structures_Graph_Manipulator_TopologicalSorter::sort($graph);
+ $this->assertCount(2, $nodes[0]);
+ $this->assertEquals('node1', $nodes[0][0]->getData());
+ $this->assertEquals('node2', $nodes[0][1]->getData());
+
+ $this->assertCount(3, $nodes[1]);
+ $this->assertEquals('node11', $nodes[1][0]->getData());
+ $this->assertEquals('node12', $nodes[1][1]->getData());
+ $this->assertEquals('node21', $nodes[1][2]->getData());
+
+ $this->assertCount(1, $nodes[2]);
+ $this->assertEquals('node121', $nodes[2][0]->getData());
+ }
+}
+?>
+
+require_once dirname(__FILE__) . '/helper.inc';
+require_once 'Structures/Graph/Manipulator/AcyclicTest.php';
+class AcyclicTestTest extends PHPUnit_Framework_TestCase
+{
+ public function testIsAcyclicFalse()
+ {
+ $graph = new Structures_Graph();
+ $node1 = new Structures_Graph_Node();
+ $graph->addNode($node1);
-/**
- * Check PHP version... PhpUnit v3+ requires at least PHP v5.1.4
- */
-if (version_compare(PHP_VERSION, "5.1.4") < 0) {
- // Cannnot run test suites
- echo 'Cannot run test suite via PhpUnit... requires at least PHP v5.1.4.' . PHP_EOL;
- echo 'Use "pear run-tests -p xml_util" to run the PHPT tests directly.' . PHP_EOL;
- exit(1);
-}
+ $node2 = new Structures_Graph_Node();
+ $graph->addNode($node2);
+ $node1->connectTo($node2);
+ $node3 = new Structures_Graph_Node();
+ $graph->addNode($node3);
+ $node2->connectTo($node3);
-/**
- * Derive the "main" method name
- * @internal PhpUnit would have to rename PHPUnit_MAIN_METHOD to PHPUNIT_MAIN_METHOD
- * to make this usage meet the PEAR CS... we cannot rename it here.
- */
-if (!defined('PHPUnit_MAIN_METHOD')) {
- define('PHPUnit_MAIN_METHOD', 'Structures_Graph_AllTests::main');
-}
+ $node3->connectTo($node1);
+ $this->assertFalse(
+ Structures_Graph_Manipulator_AcyclicTest::isAcyclic($graph),
+ 'Graph is cyclic'
+ );
+ }
-/*
- * Files needed by PhpUnit
- */
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
-require_once 'PHPUnit/Extensions/PhptTestSuite.php';
+ public function testIsAcyclicTrue()
+ {
+ $graph = new Structures_Graph();
+ $node1 = new Structures_Graph_Node();
+ $graph->addNode($node1);
-/*
- * You must add each additional class-level test suite file here
- */
-require_once dirname(__FILE__).'/testCase/BasicGraph.php';
+ $node2 = new Structures_Graph_Node();
+ $graph->addNode($node2);
+ $node1->connectTo($node2);
+
+ $node3 = new Structures_Graph_Node();
+ $graph->addNode($node3);
+ $node2->connectTo($node3);
+
+ $this->assertTrue(
+ Structures_Graph_Manipulator_AcyclicTest::isAcyclic($graph),
+ 'Graph is acyclic'
+ );
+ }
+}
+?>
+
+/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
+// +-----------------------------------------------------------------------------+
+// | Copyright (c) 2003 Sérgio Gonçalves Carvalho |
+// +-----------------------------------------------------------------------------+
+// | This file is part of Structures_Graph. |
+// | |
+// | Structures_Graph is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU Lesser General Public License as published by |
+// | the Free Software Foundation; either version 2.1 of the License, or |
+// | (at your option) any later version. |
+// | |
+// | Structures_Graph is distributed in the hope that it will be useful, |
+// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
+// | GNU Lesser General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU Lesser General Public License |
+// | along with Structures_Graph; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
+// | 02111-1307 USA |
+// +-----------------------------------------------------------------------------+
+// | Author: Sérgio Carvalho <sergio.carvalho@portugalmail.com> |
+// +-----------------------------------------------------------------------------+
+//
+require_once dirname(__FILE__) . '/helper.inc';
/**
- * Master Unit Test Suite class for Structures_Graph
- *
- * This top-level test suite class organizes
- * all class test suite files,
- * so that the full suite can be run
- * by PhpUnit or via "pear run-tests -up Structures_Graph".
- *
- * @category Structures
- * @package Structures_Graph
- * @subpackage UnitTesting
- * @author Chuck Burgess <ashnazg@php.net>
- * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: @package_version@
- * @link http://pear.php.net/package/XML_Util
- * @since 1.2.0a1
+ * @access private
*/
-class Structures_Graph_AllTests
+class BasicGraph extends PHPUnit_Framework_TestCase
{
+ var $_graph = null;
- /**
- * Launches the TextUI test runner
- *
- * @return void
- * @uses PHPUnit_TextUI_TestRunner
- */
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
+ function test_create_graph() {
+ $this->_graph = new Structures_Graph();
+ $this->assertTrue(is_a($this->_graph, 'Structures_Graph'));
}
+ function test_add_node() {
+ $this->_graph = new Structures_Graph();
+ $data = 1;
+ $node = new Structures_Graph_Node($data);
+ $this->_graph->addNode($node);
+ $node = new Structures_Graph_Node($data);
+ $this->_graph->addNode($node);
+ $node = new Structures_Graph_Node($data);
+ $this->_graph->addNode($node);
+ }
- /**
- * Adds all class test suites into the master suite
- *
- * @return PHPUnit_Framework_TestSuite a master test suite
- * containing all class test suites
- * @uses PHPUnit_Framework_TestSuite
- */
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite(
- 'Structures_Graph Full Suite of Unit Tests');
+ function test_connect_node() {
+ $this->_graph = new Structures_Graph();
+ $data = 1;
+ $node1 = new Structures_Graph_Node($data);
+ $node2 = new Structures_Graph_Node($data);
+ $this->_graph->addNode($node1);
+ $this->_graph->addNode($node2);
+ $node1->connectTo($node2);
- /*
- * You must add each additional class-level test suite name here
- */
- $suite->addTestSuite('BasicGraph');
+ $node =& $this->_graph->getNodes();
+ $node =& $node[0];
+ $node = $node->getNeighbours();
+ $node =& $node[0];
+ /*
+ ZE1 == and === operators fail on $node,$node2 because of the recursion introduced
+ by the _graph field in the Node object. So, we'll use the stupid method for reference
+ testing
+ */
+ $node = true;
+ $this->assertTrue($node2);
+ $node = false;
+ $this->assertFalse($node2);
+ }
- return $suite;
+ function test_data_references() {
+ $this->_graph = new Structures_Graph();
+ $data = 1;
+ $node = new Structures_Graph_Node();
+ $node->setData($data);
+ $this->_graph->addNode($node);
+ $data = 2;
+ $dataInNode =& $this->_graph->getNodes();
+ $dataInNode =& $dataInNode[0];
+ $dataInNode =& $dataInNode->getData();
+ $this->assertEquals($data, $dataInNode);
}
-}
-/**
- * Call the main method if this file is executed directly
- * @internal PhpUnit would have to rename PHPUnit_MAIN_METHOD to PHPUNIT_MAIN_METHOD
- * to make this usage meet the PEAR CS... we cannot rename it here.
- */
-if (PHPUnit_MAIN_METHOD == 'Structures_Graph_AllTests::main') {
- Structures_Graph_AllTests::main();
-}
+ function test_metadata_references() {
+ $this->_graph = new Structures_Graph();
+ $data = 1;
+ $node = new Structures_Graph_Node();
+ $node->setMetadata('5', $data);
+ $data = 2;
+ $dataInNode =& $node->getMetadata('5');
+ $this->assertEquals($data, $dataInNode);
+ }
+
+ function test_metadata_key_exists() {
+ $this->_graph = new Structures_Graph();
+ $data = 1;
+ $node = new Structures_Graph_Node();
+ $node->setMetadata('5', $data);
+ $this->assertTrue($node->metadataKeyExists('5'));
+ $this->assertFalse($node->metadataKeyExists('1'));
+ }
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
+ function test_directed_degree() {
+ $this->_graph = new Structures_Graph(true);
+ $node = array();
+ $node[] = new Structures_Graph_Node();
+ $node[] = new Structures_Graph_Node();
+ $node[] = new Structures_Graph_Node();
+ $this->_graph->addNode($node[0]);
+ $this->_graph->addNode($node[1]);
+ $this->_graph->addNode($node[2]);
+ $this->assertEquals(0, $node[0]->inDegree(), 'inDegree test failed for node 0 with 0 arcs');
+ $this->assertEquals(0, $node[1]->inDegree(), 'inDegree test failed for node 1 with 0 arcs');
+ $this->assertEquals(0, $node[2]->inDegree(), 'inDegree test failed for node 2 with 0 arcs');
+ $this->assertEquals(0, $node[0]->outDegree(), 'outDegree test failed for node 0 with 0 arcs');
+ $this->assertEquals(0, $node[1]->outDegree(), 'outDegree test failed for node 1 with 0 arcs');
+ $this->assertEquals(0, $node[2]->outDegree(), 'outDegree test failed for node 2 with 0 arcs');
+ $node[0]->connectTo($node[1]);
+ $this->assertEquals(0, $node[0]->inDegree(), 'inDegree test failed for node 0 with 1 arc');
+ $this->assertEquals(1, $node[1]->inDegree(), 'inDegree test failed for node 1 with 1 arc');
+ $this->assertEquals(0, $node[2]->inDegree(), 'inDegree test failed for node 2 with 1 arc');
+ $this->assertEquals(1, $node[0]->outDegree(), 'outDegree test failed for node 0 with 1 arc');
+ $this->assertEquals(0, $node[1]->outDegree(), 'outDegree test failed for node 1 with 1 arc');
+ $this->assertEquals(0, $node[2]->outDegree(), 'outDegree test failed for node 2 with 1 arc');
+ $node[0]->connectTo($node[2]);
+ $this->assertEquals(0, $node[0]->inDegree(), 'inDegree test failed for node 0 with 2 arcs');
+ $this->assertEquals(1, $node[1]->inDegree(), 'inDegree test failed for node 1 with 2 arcs');
+ $this->assertEquals(1, $node[2]->inDegree(), 'inDegree test failed for node 2 with 2 arcs');
+ $this->assertEquals(2, $node[0]->outDegree(), 'outDegree test failed for node 0 with 2 arcs');
+ $this->assertEquals(0, $node[1]->outDegree(), 'outDegree test failed for node 1 with 2 arcs');
+ $this->assertEquals(0, $node[2]->outDegree(), 'outDegree test failed for node 2 with 2 arcs');
+ }
+
+ function test_undirected_degree() {
+ $this->_graph = new Structures_Graph(false);
+ $node = array();
+ $node[] = new Structures_Graph_Node();
+ $node[] = new Structures_Graph_Node();
+ $node[] = new Structures_Graph_Node();
+ $this->_graph->addNode($node[0]);
+ $this->_graph->addNode($node[1]);
+ $this->_graph->addNode($node[2]);
+ $this->assertEquals(0, $node[0]->inDegree(), 'inDegree test failed for node 0 with 0 arcs');
+ $this->assertEquals(0, $node[1]->inDegree(), 'inDegree test failed for node 1 with 0 arcs');
+ $this->assertEquals(0, $node[2]->inDegree(), 'inDegree test failed for node 2 with 0 arcs');
+ $this->assertEquals(0, $node[0]->outDegree(), 'outDegree test failed for node 0 with 0 arcs');
+ $this->assertEquals(0, $node[1]->outDegree(), 'outDegree test failed for node 1 with 0 arcs');
+ $this->assertEquals(0, $node[2]->outDegree(), 'outDegree test failed for node 2 with 0 arcs');
+ $node[0]->connectTo($node[1]);
+ $this->assertEquals(1, $node[0]->inDegree(), 'inDegree test failed for node 0 with 1 arc');
+ $this->assertEquals(1, $node[1]->inDegree(), 'inDegree test failed for node 1 with 1 arc');
+ $this->assertEquals(0, $node[2]->inDegree(), 'inDegree test failed for node 2 with 1 arc');
+ $this->assertEquals(1, $node[0]->outDegree(), 'outDegree test failed for node 0 with 1 arc');
+ $this->assertEquals(1, $node[1]->outDegree(), 'outDegree test failed for node 1 with 1 arc');
+ $this->assertEquals(0, $node[2]->outDegree(), 'outDegree test failed for node 2 with 1 arc');
+ $node[0]->connectTo($node[2]);
+ $this->assertEquals(2, $node[0]->inDegree(), 'inDegree test failed for node 0 with 2 arcs');
+ $this->assertEquals(1, $node[1]->inDegree(), 'inDegree test failed for node 1 with 2 arcs');
+ $this->assertEquals(1, $node[2]->inDegree(), 'inDegree test failed for node 2 with 2 arcs');
+ $this->assertEquals(2, $node[0]->outDegree(), 'outDegree test failed for node 0 with 2 arcs');
+ $this->assertEquals(1, $node[1]->outDegree(), 'outDegree test failed for node 1 with 2 arcs');
+ $this->assertEquals(1, $node[2]->outDegree(), 'outDegree test failed for node 2 with 2 arcs');
+ }
+}
?>
-
- Version 2.1, February 1999
+
+if ('@php_dir@' == '@'.'php_dir'.'@') {
+ // This package hasn't been installed.
+ // Adjust path to ensure includes find files in working directory.
+ set_include_path(dirname(dirname(__FILE__))
+ . PATH_SEPARATOR . dirname(__FILE__)
+ . PATH_SEPARATOR . get_include_path());
+}
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+require_once 'Structures/Graph.php';
+
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
-
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
/**
* File/Directory manipulation
*
@@ -95265,7 +92598,6 @@ That's all there is to it!
* @author Tomas V.V.Cox <cox@idecnet.com>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -95778,13 +93110,11 @@ class System
$path_elements[] = dirname($program);
$program = basename($program);
} else {
- // Honor safe mode
- if (!ini_get('safe_mode') || !$path = ini_get('safe_mode_exec_dir')) {
- $path = getenv('PATH');
- if (!$path) {
- $path = getenv('Path'); // some OSes are just stupid enough to do this
- }
+ $path = getenv('PATH');
+ if (!$path) {
+ $path = getenv('Path'); // some OSes are just stupid enough to do this
}
+
$path_elements = explode(PATH_SEPARATOR, $path);
}
@@ -95796,17 +93126,14 @@ class System
if (strpos($program, '.') !== false) {
array_unshift($exe_suffixes, '');
}
- // is_executable() is not available on windows for PHP4
- $pear_is_executable = (function_exists('is_executable')) ? 'is_executable' : 'is_file';
} else {
$exe_suffixes = array('');
- $pear_is_executable = 'is_executable';
}
foreach ($exe_suffixes as $suff) {
foreach ($path_elements as $dir) {
$file = $dir . DIRECTORY_SEPARATOR . $program . $suff;
- if (@$pear_is_executable($file)) {
+ if (is_executable($file)) {
return $file;
}
}
@@ -95901,9 +93228,6 @@ class System
return $files;
}
}<?php
-
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
/**
* XML_Util
*
@@ -95950,54 +93274,54 @@ class System
*/
/**
- * error code for invalid chars in XML name
+ * Error code for invalid chars in XML name
*/
define('XML_UTIL_ERROR_INVALID_CHARS', 51);
/**
- * error code for invalid chars in XML name
+ * Error code for invalid chars in XML name
*/
define('XML_UTIL_ERROR_INVALID_START', 52);
/**
- * error code for non-scalar tag content
+ * Error code for non-scalar tag content
*/
define('XML_UTIL_ERROR_NON_SCALAR_CONTENT', 60);
/**
- * error code for missing tag name
+ * Error code for missing tag name
*/
define('XML_UTIL_ERROR_NO_TAG_NAME', 61);
/**
- * replace XML entities
+ * Replace XML entities
*/
define('XML_UTIL_REPLACE_ENTITIES', 1);
/**
- * embedd content in a CData Section
+ * Embedd content in a CData Section
*/
define('XML_UTIL_CDATA_SECTION', 5);
/**
- * do not replace entitites
+ * Do not replace entitites
*/
define('XML_UTIL_ENTITIES_NONE', 0);
/**
- * replace all XML entitites
+ * Replace all XML entitites
* This setting will replace <, >, ", ' and &
*/
define('XML_UTIL_ENTITIES_XML', 1);
/**
- * replace only required XML entitites
+ * Replace only required XML entitites
* This setting will replace <, " and &
*/
define('XML_UTIL_ENTITIES_XML_REQUIRED', 2);
/**
- * replace HTML entitites
+ * Replace HTML entitites
* @link http://www.php.net/htmlentities
*/
define('XML_UTIL_ENTITIES_HTML', 3);
@@ -96013,33 +93337,30 @@ define('XML_UTIL_COLLAPSE_ALL', 1);
define('XML_UTIL_COLLAPSE_XHTML_ONLY', 2);
/**
- * utility class for working with XML documents
+ * Utility class for working with XML documents
*
-
* @category XML
* @package XML_Util
* @author Stephan Schmidt <schst@php.net>
* @copyright 2003-2008 Stephan Schmidt <schst@php.net>
* @license http://opensource.org/licenses/bsd-license New BSD License
- * @version Release: 1.2.3
+ * @version Release: 1.3.0
* @link http://pear.php.net/package/XML_Util
*/
class XML_Util
{
/**
- * return API version
+ * Return API version
*
* @return string $version API version
- * @access public
- * @static
*/
- function apiVersion()
+ public static function apiVersion()
{
return '1.1';
}
/**
- * replace XML entities
+ * Replace XML entities
*
* With the optional second parameter, you may select, which
* entities should be replaced.
@@ -96074,27 +93395,33 @@ class XML_Util
* by the htmlentities() function
*
* @return string string with replaced chars
- * @access public
- * @static
- * @see reverseEntities()
+ * @see reverseEntities()
*/
- function replaceEntities($string, $replaceEntities = XML_UTIL_ENTITIES_XML,
- $encoding = 'ISO-8859-1')
- {
+ public static function replaceEntities(
+ $string, $replaceEntities = XML_UTIL_ENTITIES_XML, $encoding = 'ISO-8859-1'
+ ) {
switch ($replaceEntities) {
case XML_UTIL_ENTITIES_XML:
- return strtr($string, array(
- '&' => '&amp;',
- '>' => '&gt;',
- '<' => '&lt;',
- '"' => '&quot;',
- '\'' => '&apos;' ));
+ return strtr(
+ $string,
+ array(
+ '&' => '&amp;',
+ '>' => '&gt;',
+ '<' => '&lt;',
+ '"' => '&quot;',
+ '\'' => '&apos;'
+ )
+ );
break;
case XML_UTIL_ENTITIES_XML_REQUIRED:
- return strtr($string, array(
- '&' => '&amp;',
- '<' => '&lt;',
- '"' => '&quot;' ));
+ return strtr(
+ $string,
+ array(
+ '&' => '&amp;',
+ '<' => '&lt;',
+ '"' => '&quot;'
+ )
+ );
break;
case XML_UTIL_ENTITIES_HTML:
return htmlentities($string, ENT_COMPAT, $encoding);
@@ -96104,7 +93431,7 @@ class XML_Util
}
/**
- * reverse XML entities
+ * Reverse XML entities
*
* With the optional second parameter, you may select, which
* entities should be reversed.
@@ -96140,27 +93467,33 @@ class XML_Util
* by the html_entity_decode() function
*
* @return string string with replaced chars
- * @access public
- * @static
- * @see replaceEntities()
+ * @see replaceEntities()
*/
- function reverseEntities($string, $replaceEntities = XML_UTIL_ENTITIES_XML,
- $encoding = 'ISO-8859-1')
- {
+ public static function reverseEntities(
+ $string, $replaceEntities = XML_UTIL_ENTITIES_XML, $encoding = 'ISO-8859-1'
+ ) {
switch ($replaceEntities) {
case XML_UTIL_ENTITIES_XML:
- return strtr($string, array(
- '&amp;' => '&',
- '&gt;' => '>',
- '&lt;' => '<',
- '&quot;' => '"',
- '&apos;' => '\'' ));
+ return strtr(
+ $string,
+ array(
+ '&amp;' => '&',
+ '&gt;' => '>',
+ '&lt;' => '<',
+ '&quot;' => '"',
+ '&apos;' => '\''
+ )
+ );
break;
case XML_UTIL_ENTITIES_XML_REQUIRED:
- return strtr($string, array(
- '&amp;' => '&',
- '&lt;' => '<',
- '&quot;' => '"' ));
+ return strtr(
+ $string,
+ array(
+ '&amp;' => '&',
+ '&lt;' => '<',
+ '&quot;' => '"'
+ )
+ );
break;
case XML_UTIL_ENTITIES_HTML:
return html_entity_decode($string, ENT_COMPAT, $encoding);
@@ -96170,7 +93503,7 @@ class XML_Util
}
/**
- * build an xml declaration
+ * Build an xml declaration
*
* <code>
* require_once 'XML/Util.php';
@@ -96184,13 +93517,12 @@ class XML_Util
* @param bool $standalone document is standalone (or not)
*
* @return string xml declaration
- * @access public
- * @static
- * @uses attributesToString() to serialize the attributes of the XML declaration
+ * @uses attributesToString() to serialize the attributes of the
+ * XML declaration
*/
- function getXMLDeclaration($version = '1.0', $encoding = null,
- $standalone = null)
- {
+ public static function getXMLDeclaration(
+ $version = '1.0', $encoding = null, $standalone = null
+ ) {
$attributes = array(
'version' => $version,
);
@@ -96203,12 +93535,14 @@ class XML_Util
$attributes['standalone'] = $standalone ? 'yes' : 'no';
}
- return sprintf('<?xml%s?>',
- XML_Util::attributesToString($attributes, false));
+ return sprintf(
+ '<?xml%s?>',
+ XML_Util::attributesToString($attributes, false)
+ );
}
/**
- * build a document type declaration
+ * Build a document type declaration
*
* <code>
* require_once 'XML/Util.php';
@@ -96223,12 +93557,11 @@ class XML_Util
* @param string $internalDtd internal dtd entries
*
* @return string doctype declaration
- * @access public
- * @static
- * @since 0.2
+ * @since 0.2
*/
- function getDocTypeDeclaration($root, $uri = null, $internalDtd = null)
- {
+ public static function getDocTypeDeclaration(
+ $root, $uri = null, $internalDtd = null
+ ) {
if (is_array($uri)) {
$ref = sprintf(' PUBLIC "%s" "%s"', $uri['id'], $uri['uri']);
} elseif (!empty($uri)) {
@@ -96245,7 +93578,7 @@ class XML_Util
}
/**
- * create string representation of an attribute list
+ * Create string representation of an attribute list
*
* <code>
* require_once 'XML/Util.php';
@@ -96277,14 +93610,13 @@ class XML_Util
* XML_UTIL_ENTITIES_HTML)
*
* @return string string representation of the attributes
- * @access public
- * @static
- * @uses replaceEntities() to replace XML entities in attribute values
- * @todo allow sort also to be an options array
+ * @uses replaceEntities() to replace XML entities in attribute values
+ * @todo allow sort also to be an options array
*/
- function attributesToString($attributes, $sort = true, $multiline = false,
- $indent = ' ', $linebreak = "\n", $entities = XML_UTIL_ENTITIES_XML)
- {
+ public static function attributesToString(
+ $attributes, $sort = true, $multiline = false,
+ $indent = ' ', $linebreak = "\n", $entities = XML_UTIL_ENTITIES_XML
+ ) {
/*
* second parameter may be an array
*/
@@ -96312,7 +93644,7 @@ class XML_Util
if ($sort) {
ksort($attributes);
}
- if ( !$multiline || count($attributes) == 1) {
+ if (!$multiline || count($attributes) == 1) {
foreach ($attributes as $key => $value) {
if ($entities != XML_UTIL_ENTITIES_NONE) {
if ($entities === XML_UTIL_CDATA_SECTION) {
@@ -96348,26 +93680,23 @@ class XML_Util
* or only XHTML (XML_UTIL_COLLAPSE_XHTML_ONLY) ones.
*
* @return string XML
- * @access public
- * @static
- * @todo PEAR CS - unable to avoid "space after open parens" error
- * in the IF branch
*/
- function collapseEmptyTags($xml, $mode = XML_UTIL_COLLAPSE_ALL)
+ public static function collapseEmptyTags($xml, $mode = XML_UTIL_COLLAPSE_ALL)
{
if ($mode == XML_UTIL_COLLAPSE_XHTML_ONLY) {
return preg_replace(
'/<(area|base(?:font)?|br|col|frame|hr|img|input|isindex|link|meta|'
. 'param)([^>]*)><\/\\1>/s',
'<\\1\\2 />',
- $xml);
+ $xml
+ );
} else {
return preg_replace('/<(\w+)([^>]*)><\/\\1>/s', '<\\1\\2 />', $xml);
}
}
/**
- * create a tag
+ * Create a tag
*
* This method will call XML_Util::createTagFromArray(), which
* is more flexible.
@@ -96398,16 +93727,15 @@ class XML_Util
* @param bool $sortAttributes Whether to sort the attributes or not
*
* @return string XML tag
- * @access public
- * @static
- * @see createTagFromArray()
- * @uses createTagFromArray() to create the tag
+ * @see createTagFromArray()
+ * @uses createTagFromArray() to create the tag
*/
- function createTag($qname, $attributes = array(), $content = null,
+ public static function createTag(
+ $qname, $attributes = array(), $content = null,
$namespaceUri = null, $replaceEntities = XML_UTIL_REPLACE_ENTITIES,
$multiline = false, $indent = '_auto', $linebreak = "\n",
- $sortAttributes = true)
- {
+ $sortAttributes = true
+ ) {
$tag = array(
'qname' => $qname,
'attributes' => $attributes
@@ -96423,13 +93751,15 @@ class XML_Util
$tag['namespaceUri'] = $namespaceUri;
}
- return XML_Util::createTagFromArray($tag, $replaceEntities, $multiline,
- $indent, $linebreak, $sortAttributes);
+ return XML_Util::createTagFromArray(
+ $tag, $replaceEntities, $multiline,
+ $indent, $linebreak, $sortAttributes
+ );
}
/**
- * create a tag from an array
- * this method awaits an array in the following format
+ * Create a tag from an array.
+ * This method awaits an array in the following format
* <pre>
* array(
* // qualified name of the tag
@@ -96478,27 +93808,31 @@ class XML_Util
* @param bool $sortAttributes Whether to sort the attributes or not
*
* @return string XML tag
- * @access public
- * @static
- * @see createTag()
+ *
+ * @see createTag()
* @uses attributesToString() to serialize the attributes of the tag
* @uses splitQualifiedName() to get local part and namespace of a qualified name
* @uses createCDataSection()
* @uses raiseError()
*/
- function createTagFromArray($tag, $replaceEntities = XML_UTIL_REPLACE_ENTITIES,
+ public static function createTagFromArray(
+ $tag, $replaceEntities = XML_UTIL_REPLACE_ENTITIES,
$multiline = false, $indent = '_auto', $linebreak = "\n",
- $sortAttributes = true)
- {
+ $sortAttributes = true
+ ) {
if (isset($tag['content']) && !is_scalar($tag['content'])) {
- return XML_Util::raiseError('Supplied non-scalar value as tag content',
- XML_UTIL_ERROR_NON_SCALAR_CONTENT);
+ return XML_Util::raiseError(
+ 'Supplied non-scalar value as tag content',
+ XML_UTIL_ERROR_NON_SCALAR_CONTENT
+ );
}
if (!isset($tag['qname']) && !isset($tag['localPart'])) {
- return XML_Util::raiseError('You must either supply a qualified name '
+ return XML_Util::raiseError(
+ 'You must either supply a qualified name '
. '(qname) or local tag name (localPart).',
- XML_UTIL_ERROR_NO_TAG_NAME);
+ XML_UTIL_ERROR_NO_TAG_NAME
+ );
}
// if no attributes hav been set, use empty attributes
@@ -96535,8 +93869,8 @@ class XML_Util
if (isset($tag['namespaceUri']) && !empty($tag['namespaceUri'])) {
// is a namespace given
if (isset($tag['namespace']) && !empty($tag['namespace'])) {
- $tag['attributes']['xmlns:' . $tag['namespace']] =
- $tag['namespaceUri'];
+ $tag['attributes']['xmlns:' . $tag['namespace']]
+ = $tag['namespaceUri'];
} else {
// define this Uri as the default namespace
$tag['attributes']['xmlns'] = $tag['namespaceUri'];
@@ -96551,8 +93885,10 @@ class XML_Util
}
// create attribute list
- $attList = XML_Util::attributesToString($tag['attributes'],
- $sortAttributes, $multiline, $indent, $linebreak);
+ $attList = XML_Util::attributesToString(
+ $tag['attributes'],
+ $sortAttributes, $multiline, $indent, $linebreak
+ );
if (!isset($tag['content']) || (string)$tag['content'] == '') {
$tag = sprintf('<%s%s />', $tag['qname'], $attList);
} else {
@@ -96563,18 +93899,21 @@ class XML_Util
$tag['content'] = XML_Util::createCDataSection($tag['content']);
break;
default:
- $tag['content'] = XML_Util::replaceEntities($tag['content'],
- $replaceEntities);
+ $tag['content'] = XML_Util::replaceEntities(
+ $tag['content'], $replaceEntities
+ );
break;
}
- $tag = sprintf('<%s%s>%s</%s>', $tag['qname'], $attList, $tag['content'],
- $tag['qname']);
+ $tag = sprintf(
+ '<%s%s>%s</%s>', $tag['qname'], $attList, $tag['content'],
+ $tag['qname']
+ );
}
return $tag;
}
/**
- * create a start element
+ * Create a start element
*
* <code>
* require_once 'XML/Util.php';
@@ -96595,14 +93934,13 @@ class XML_Util
* @param bool $sortAttributes Whether to sort the attributes or not
*
* @return string XML start element
- * @access public
- * @static
- * @see createEndElement(), createTag()
+ * @see createEndElement(), createTag()
*/
- function createStartElement($qname, $attributes = array(), $namespaceUri = null,
+ public static function createStartElement(
+ $qname, $attributes = array(), $namespaceUri = null,
$multiline = false, $indent = '_auto', $linebreak = "\n",
- $sortAttributes = true)
- {
+ $sortAttributes = true
+ ) {
// if no attributes hav been set, use empty attributes
if (!isset($attributes) || !is_array($attributes)) {
$attributes = array();
@@ -96630,14 +93968,16 @@ class XML_Util
}
// create attribute list
- $attList = XML_Util::attributesToString($attributes, $sortAttributes,
- $multiline, $indent, $linebreak);
+ $attList = XML_Util::attributesToString(
+ $attributes, $sortAttributes,
+ $multiline, $indent, $linebreak
+ );
$element = sprintf('<%s%s>', $qname, $attList);
return $element;
}
/**
- * create an end element
+ * Create an end element
*
* <code>
* require_once 'XML/Util.php';
@@ -96649,18 +93989,16 @@ class XML_Util
* @param string $qname qualified tagname (including namespace)
*
* @return string XML end element
- * @access public
- * @static
- * @see createStartElement(), createTag()
+ * @see createStartElement(), createTag()
*/
- function createEndElement($qname)
+ public static function createEndElement($qname)
{
$element = sprintf('</%s>', $qname);
return $element;
}
/**
- * create an XML comment
+ * Create an XML comment
*
* <code>
* require_once 'XML/Util.php';
@@ -96672,17 +94010,15 @@ class XML_Util
* @param string $content content of the comment
*
* @return string XML comment
- * @access public
- * @static
*/
- function createComment($content)
+ public static function createComment($content)
{
$comment = sprintf('<!-- %s -->', $content);
return $comment;
}
/**
- * create a CData section
+ * Create a CData section
*
* <code>
* require_once 'XML/Util.php';
@@ -96694,18 +94030,17 @@ class XML_Util
* @param string $data data of the CData section
*
* @return string CData section with content
- * @access public
- * @static
*/
- function createCDataSection($data)
+ public static function createCDataSection($data)
{
- return sprintf('<![CDATA[%s]]>',
- preg_replace('/\]\]>/', ']]]]><![CDATA[>', strval($data)));
-
+ return sprintf(
+ '<![CDATA[%s]]>',
+ preg_replace('/\]\]>/', ']]]]><![CDATA[>', strval($data))
+ );
}
/**
- * split qualified name and return namespace and local part
+ * Split qualified name and return namespace and local part
*
* <code>
* require_once 'XML/Util.php';
@@ -96725,10 +94060,8 @@ class XML_Util
* @param string $defaultNs default namespace (optional)
*
* @return array array containing namespace and local part
- * @access public
- * @static
*/
- function splitQualifiedName($qname, $defaultNs = null)
+ public static function splitQualifiedName($qname, $defaultNs = null)
{
if (strstr($qname, ':')) {
$tmp = explode(':', $qname);
@@ -96744,7 +94077,7 @@ class XML_Util
}
/**
- * check, whether string is valid XML name
+ * Check, whether string is valid XML name
*
* <p>XML names are used for tagname, attribute names and various
* other, lesser known entities.</p>
@@ -96765,33 +94098,39 @@ class XML_Util
* @param string $string string that should be checked
*
* @return mixed true, if string is a valid XML name, PEAR error otherwise
- * @access public
- * @static
+ *
* @todo support for other charsets
* @todo PEAR CS - unable to avoid 85-char limit on second preg_match
*/
- function isValidName($string)
+ public static function isValidName($string)
{
// check for invalid chars
if (!preg_match('/^[[:alpha:]_]\\z/', $string{0})) {
- return XML_Util::raiseError('XML names may only start with letter '
- . 'or underscore', XML_UTIL_ERROR_INVALID_START);
+ return XML_Util::raiseError(
+ 'XML names may only start with letter or underscore',
+ XML_UTIL_ERROR_INVALID_START
+ );
}
// check for invalid chars
- if (!preg_match('/^([[:alpha:]_]([[:alnum:]\-\.]*)?:)?[[:alpha:]_]([[:alnum:]\_\-\.]+)?\\z/',
- $string)
- ) {
- return XML_Util::raiseError('XML names may only contain alphanumeric '
+ $match = preg_match(
+ '/^([[:alpha:]_]([[:alnum:]\-\.]*)?:)?'
+ . '[[:alpha:]_]([[:alnum:]\_\-\.]+)?\\z/',
+ $string
+ );
+ if (!$match) {
+ return XML_Util::raiseError(
+ 'XML names may only contain alphanumeric '
. 'chars, period, hyphen, colon and underscores',
- XML_UTIL_ERROR_INVALID_CHARS);
+ XML_UTIL_ERROR_INVALID_CHARS
+ );
}
// XML name is valid
return true;
}
/**
- * replacement for XML_Util::raiseError
+ * Replacement for XML_Util::raiseError
*
* Avoids the necessity to always require
* PEAR.php
@@ -96800,18 +94139,16 @@ class XML_Util
* @param int $code error code
*
* @return PEAR_Error
- * @access public
- * @static
- * @todo PEAR CS - should this use include_once instead?
+ * @todo PEAR CS - should this use include_once instead?
*/
- function raiseError($msg, $code)
+ public static function raiseError($msg, $code)
{
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
+ include_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
return PEAR::raiseError($msg, $code);
}
}
?>
-package.xml
+package.xml
<package packagerversion="1.9.4" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<name>XML_Util</name>
<channel>pear.php.net</channel>
@@ -96835,11 +94172,11 @@ package.xml
<email>davey@php.net</email>
<active>no</active>
</helper>
- <date>2014-06-07</date>
- <time>10:18:11</time>
+ <date>2015-02-27</date>
+ <time>12:11:41</time>
<version>
- <release>1.2.3</release>
- <api>1.2.0</api>
+ <release>1.3.0</release>
+ <api>1.3.0</api>
</version>
<stability>
<release>stable</release>
@@ -96847,7 +94184,8 @@ package.xml
</stability>
<license uri="http://opensource.org/licenses/bsd-license">BSD License</license>
<notes>
-Bug #20293 Broken installation for 1.2.2
+* Set minimum PHP version to 5.3.0
+* Mark static methods with static keyword
</notes>
<contents>
<dir baseinstalldir="/" name="/">
@@ -96872,7 +94210,7 @@ Bug #20293 Broken installation for 1.2.2
<file baseinstalldir="/" md5sum="1850856692ff6c6df5e8acb16e1080ce" name="tests/testBug_4950.phpt" role="test" />
<file baseinstalldir="/" md5sum="b4127883df40a4b0d1736ad42215ee25" name="tests/testBug_5392.phpt" role="test" />
<file baseinstalldir="/" md5sum="b133427f8ea9b60c5bec7400cd5e4c7f" name="tests/testBug_18343.phpt" role="test" />
- <file baseinstalldir="/" md5sum="2697c0187cca3fae63ce8f925059746b" name="XML/Util.php" role="php">
+ <file baseinstalldir="/" md5sum="b702b9cd014402420453c66ae7a96803" name="XML/Util.php" role="php">
<tasks:replace from="@version@" to="version" type="package-info" />
</file>
</dir>
@@ -96880,7 +94218,7 @@ Bug #20293 Broken installation for 1.2.2
<dependencies>
<required>
<php>
- <min>4.3.0</min>
+ <min>5.3.0</min>
</php>
<pearinstaller>
<min>1.4.3</min>
@@ -97292,9 +94630,25 @@ Request #19750 examples/example.php encoding
Bug #20293 Broken installation for 1.2.2
</notes>
</release>
+ <release>
+ <version>
+ <release>1.3.0</release>
+ <api>1.3.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2015-02-27</date>
+ <license uri="http://opensource.org/licenses/bsd-license">BSD License</license>
+ <notes>
+* Set minimum PHP version to 5.3.0
+* Mark static methods with static keyword
+ </notes>
+ </release>
</changelog>
</package>
-
+
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
@@ -97593,7 +94947,7 @@ Bug #20293 Broken installation for 1.2.2
print '</pre>';
print "\n<br><br>\n";
?>
-
+
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
@@ -97738,7 +95092,7 @@ Bug #20293 Broken installation for 1.2.2
?>
-
+
XML_Util::apiVersion() basic tests
--CREDITS--
Chuck Burgess <ashnazg@php.net>
@@ -97756,7 +95110,7 @@ echo XML_Util::apiVersion() . PHP_EOL;
TEST: basic apiVersion() call
1.1
-
+
XML_Util::attributesToString() basic tests
--CREDITS--
Chuck Burgess <ashnazg@php.net>
@@ -97874,7 +95228,7 @@ TEST: replace only required XML entities
TEST: replace HTML entities
boo="b&gt;&lt;z" foo="b@&amp;r"
-
+
XML_Util::collapseEmptyTags() basic tests
--CREDITS--
Chuck Burgess <ashnazg@php.net>
@@ -97926,7 +95280,7 @@ TEST: one empty tag, with COLLAPSE_XHTML_ONLY set
TEST: one empty tag alongside non-empty tag, with COLLAPSE_XHTML_ONLY set
<foo></foo><b></b><bar>baz</bar>
-
+
XML_Util::createCDataSection() basic tests
--CREDITS--
Chuck Burgess <ashnazg@php.net>
@@ -97944,7 +95298,7 @@ echo XML_Util::createCDataSection("I am content.") . PHP_EOL;
TEST: basic usage
<![CDATA[I am content.]]>
-
+
XML_Util::createComment() basic tests
--CREDITS--
Chuck Burgess <ashnazg@php.net>
@@ -97962,7 +95316,7 @@ echo XML_Util::createComment("I am comment.") . PHP_EOL;
TEST: basic usage
<!-- I am comment. -->
-
+
XML_Util::createEndElement() basic tests
--CREDITS--
Chuck Burgess <ashnazg@php.net>
@@ -97986,7 +95340,7 @@ TEST: basic usage (myTag)
TEST: basic usage with a namespaced tag (myNs:myTag)
</myNs:myTag>
-
+
XML_Util::createStartElement() basic tests
--CREDITS--
Chuck Burgess <ashnazg@php.net>
@@ -98110,7 +95464,7 @@ TEST: tag with attributes, namespace, multiline = true, indent = (2 spaces only
TEST: tag with attributes, namespace, multiline = true, indent = (2 spaces only), linebreak = '^', and sortAttributes = false
<myNs:myTag foo="bar"^ boo="baz"^ xmlns:myNs="http://www.w3c.org/myNs#">
-
+
XML_Util::createTag() basic tests
--CREDITS--
Chuck Burgess <ashnazg@php.net>
@@ -98265,7 +95619,7 @@ TEST: tag with attribute, content, namespace, REPLACE_ENTITIES, multiline = tru
TEST: tag with attribute, content, namespace, REPLACE_ENTITIES, multiline = true, indent = (2 spaces), linebreak = '^', and sortAttributes = false
<myNs:myTag foo="bar"^ boo="baz"^ xmlns:myNs="http://www.w3c.org/myNs#">This is inside the tag and has &lt; &amp; @ &gt; in it</myNs:myTag>
-
+
XML_Util::createTagFromArray() basic tests
--CREDITS--
Chuck Burgess <ashnazg@php.net>
@@ -98468,7 +95822,7 @@ TEST: qname is derived from localPart only
TEST: namespaceUri is given, but namespace is not
<foo xmlns="http://bar.org" />
-
+
XML_Util::getDocTypeDeclaration() basic tests
--CREDITS--
Chuck Burgess <ashnazg@php.net>
@@ -98512,7 +95866,7 @@ TEST: using root and an array URI and an internal DTD entry
<!DOCTYPE rootTag PUBLIC "-//PHP//PEAR/DTD PACKAGE 0.1" "http://pear.php.net/dtd/package-1.0" [
<!ELEMENT additionalInfo (#PCDATA)>
]>
-
+
XML_Util::getXmlDeclaration() basic tests
--CREDITS--
Chuck Burgess <ashnazg@php.net>
@@ -98548,7 +95902,7 @@ TEST: using version, encoding, and standalone flag
TEST: using version and standalone flag
<?xml version="1.0" standalone="yes"?>
-
+
XML_Util::isValidName() basic tests
--CREDITS--
Chuck Burgess <ashnazg@php.net>
@@ -98594,7 +95948,7 @@ Invalid XML name: XML names may only contain alphanumeric chars, period, hyphen,
TEST: invalid tag that doesn't start with a letter
Invalid XML name: XML names may only start with letter or underscore
-
+
XML_Util::raiseError() basic tests
--CREDITS--
Chuck Burgess <ashnazg@php.net>
@@ -98613,7 +95967,7 @@ if (is_a($error, 'PEAR_Error')) {
=====XML_Util::raiseError() basic tests=====
PEAR Error: I am an error
-
+
XML_Util::replaceEntities() basic tests
--CREDITS--
Chuck Burgess <ashnazg@php.net>
@@ -98695,7 +96049,7 @@ This string contains &lt; &amp; &gt;.
TEST: utf8 usage with ENTITIES_HTML and UTF-8
This data contains special chars like &lt;, &gt;, &amp; and &quot; as well as &auml;, &ouml;, &szlig;, &agrave; and &ecirc;
-
+
XML_Util::reverseEntities() basic tests
--CREDITS--
Chuck Burgess <ashnazg@php.net>
@@ -98776,7 +96130,7 @@ This string contains < & >.
TEST: utf8 usage with ENTITIES_HTML and UTF-8
This data contains special chars like <, >, & and " as well as ä, ö, ß, à and ê
-
+
XML_Util::splitQualifiedName() basic tests
--CREDITS--
Chuck Burgess <ashnazg@php.net>
@@ -98808,7 +96162,7 @@ localPart => stylesheet
TEST: basic usage with namespace
namespace => myNs
localPart => stylesheet
-
+
XML_Util tests for Bug #4950 "Incorrect CDATA serializing"
--CREDITS--
Chuck Burgess <ashnazg@php.net>
@@ -98829,7 +96183,7 @@ echo XML_Util::createTag("test", array(), "Content ]]></test> here!",
TEST: test case provided in bug report
<test><![CDATA[Content ]]]]><![CDATA[></test> here!]]></test>
-
+
XML_Util tests for Bug #5392 "encoding of ISO-8859-1 is the only supported encoding"
--CREDITS--
Chuck Burgess <ashnazg@php.net>
@@ -98856,7 +96210,7 @@ echo $reversed . PHP_EOL;
TEST: test case provided in bug report
This data contains special chars like &lt;, &gt;, &amp; and &quot; as well as &auml;, &ouml;, &szlig;, &agrave; and &ecirc;
This data contains special chars like <, >, & and " as well as ä, ö, ß, à and ê
-
+
XML_Util tests for Bug #18343 Entities in file names decoded during packaging
--CREDITS--
Chuck Burgess <ashnazg@php.net>
@@ -98918,10 +96272,7 @@ Testing with ENTITIES_HTML:
Testing with REPLACE_ENTITIES:
<install as="Horde/Feed/fixtures/lexicon/http-p.moreover.com-cgi-local-page%2Fo=rss&amp;s=Newsweek" name="test/Horde/Feed/fixtures/lexicon/http-p.moreover.com-cgi-local-page%2Fo=rss&amp;s=Newsweek" />
-
-
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
+
/**
* XML_Util
*
@@ -98968,54 +96319,54 @@ Testing with REPLACE_ENTITIES:
*/
/**
- * error code for invalid chars in XML name
+ * Error code for invalid chars in XML name
*/
define('XML_UTIL_ERROR_INVALID_CHARS', 51);
/**
- * error code for invalid chars in XML name
+ * Error code for invalid chars in XML name
*/
define('XML_UTIL_ERROR_INVALID_START', 52);
/**
- * error code for non-scalar tag content
+ * Error code for non-scalar tag content
*/
define('XML_UTIL_ERROR_NON_SCALAR_CONTENT', 60);
/**
- * error code for missing tag name
+ * Error code for missing tag name
*/
define('XML_UTIL_ERROR_NO_TAG_NAME', 61);
/**
- * replace XML entities
+ * Replace XML entities
*/
define('XML_UTIL_REPLACE_ENTITIES', 1);
/**
- * embedd content in a CData Section
+ * Embedd content in a CData Section
*/
define('XML_UTIL_CDATA_SECTION', 5);
/**
- * do not replace entitites
+ * Do not replace entitites
*/
define('XML_UTIL_ENTITIES_NONE', 0);
/**
- * replace all XML entitites
+ * Replace all XML entitites
* This setting will replace <, >, ", ' and &
*/
define('XML_UTIL_ENTITIES_XML', 1);
/**
- * replace only required XML entitites
+ * Replace only required XML entitites
* This setting will replace <, " and &
*/
define('XML_UTIL_ENTITIES_XML_REQUIRED', 2);
/**
- * replace HTML entitites
+ * Replace HTML entitites
* @link http://www.php.net/htmlentities
*/
define('XML_UTIL_ENTITIES_HTML', 3);
@@ -99031,33 +96382,30 @@ define('XML_UTIL_COLLAPSE_ALL', 1);
define('XML_UTIL_COLLAPSE_XHTML_ONLY', 2);
/**
- * utility class for working with XML documents
+ * Utility class for working with XML documents
*
-
* @category XML
* @package XML_Util
* @author Stephan Schmidt <schst@php.net>
* @copyright 2003-2008 Stephan Schmidt <schst@php.net>
* @license http://opensource.org/licenses/bsd-license New BSD License
- * @version Release: 1.2.3
+ * @version Release: 1.3.0
* @link http://pear.php.net/package/XML_Util
*/
class XML_Util
{
/**
- * return API version
+ * Return API version
*
* @return string $version API version
- * @access public
- * @static
*/
- function apiVersion()
+ public static function apiVersion()
{
return '1.1';
}
/**
- * replace XML entities
+ * Replace XML entities
*
* With the optional second parameter, you may select, which
* entities should be replaced.
@@ -99092,27 +96440,33 @@ class XML_Util
* by the htmlentities() function
*
* @return string string with replaced chars
- * @access public
- * @static
- * @see reverseEntities()
+ * @see reverseEntities()
*/
- function replaceEntities($string, $replaceEntities = XML_UTIL_ENTITIES_XML,
- $encoding = 'ISO-8859-1')
- {
+ public static function replaceEntities(
+ $string, $replaceEntities = XML_UTIL_ENTITIES_XML, $encoding = 'ISO-8859-1'
+ ) {
switch ($replaceEntities) {
case XML_UTIL_ENTITIES_XML:
- return strtr($string, array(
- '&' => '&amp;',
- '>' => '&gt;',
- '<' => '&lt;',
- '"' => '&quot;',
- '\'' => '&apos;' ));
+ return strtr(
+ $string,
+ array(
+ '&' => '&amp;',
+ '>' => '&gt;',
+ '<' => '&lt;',
+ '"' => '&quot;',
+ '\'' => '&apos;'
+ )
+ );
break;
case XML_UTIL_ENTITIES_XML_REQUIRED:
- return strtr($string, array(
- '&' => '&amp;',
- '<' => '&lt;',
- '"' => '&quot;' ));
+ return strtr(
+ $string,
+ array(
+ '&' => '&amp;',
+ '<' => '&lt;',
+ '"' => '&quot;'
+ )
+ );
break;
case XML_UTIL_ENTITIES_HTML:
return htmlentities($string, ENT_COMPAT, $encoding);
@@ -99122,7 +96476,7 @@ class XML_Util
}
/**
- * reverse XML entities
+ * Reverse XML entities
*
* With the optional second parameter, you may select, which
* entities should be reversed.
@@ -99158,27 +96512,33 @@ class XML_Util
* by the html_entity_decode() function
*
* @return string string with replaced chars
- * @access public
- * @static
- * @see replaceEntities()
+ * @see replaceEntities()
*/
- function reverseEntities($string, $replaceEntities = XML_UTIL_ENTITIES_XML,
- $encoding = 'ISO-8859-1')
- {
+ public static function reverseEntities(
+ $string, $replaceEntities = XML_UTIL_ENTITIES_XML, $encoding = 'ISO-8859-1'
+ ) {
switch ($replaceEntities) {
case XML_UTIL_ENTITIES_XML:
- return strtr($string, array(
- '&amp;' => '&',
- '&gt;' => '>',
- '&lt;' => '<',
- '&quot;' => '"',
- '&apos;' => '\'' ));
+ return strtr(
+ $string,
+ array(
+ '&amp;' => '&',
+ '&gt;' => '>',
+ '&lt;' => '<',
+ '&quot;' => '"',
+ '&apos;' => '\''
+ )
+ );
break;
case XML_UTIL_ENTITIES_XML_REQUIRED:
- return strtr($string, array(
- '&amp;' => '&',
- '&lt;' => '<',
- '&quot;' => '"' ));
+ return strtr(
+ $string,
+ array(
+ '&amp;' => '&',
+ '&lt;' => '<',
+ '&quot;' => '"'
+ )
+ );
break;
case XML_UTIL_ENTITIES_HTML:
return html_entity_decode($string, ENT_COMPAT, $encoding);
@@ -99188,7 +96548,7 @@ class XML_Util
}
/**
- * build an xml declaration
+ * Build an xml declaration
*
* <code>
* require_once 'XML/Util.php';
@@ -99202,13 +96562,12 @@ class XML_Util
* @param bool $standalone document is standalone (or not)
*
* @return string xml declaration
- * @access public
- * @static
- * @uses attributesToString() to serialize the attributes of the XML declaration
+ * @uses attributesToString() to serialize the attributes of the
+ * XML declaration
*/
- function getXMLDeclaration($version = '1.0', $encoding = null,
- $standalone = null)
- {
+ public static function getXMLDeclaration(
+ $version = '1.0', $encoding = null, $standalone = null
+ ) {
$attributes = array(
'version' => $version,
);
@@ -99221,12 +96580,14 @@ class XML_Util
$attributes['standalone'] = $standalone ? 'yes' : 'no';
}
- return sprintf('<?xml%s?>',
- XML_Util::attributesToString($attributes, false));
+ return sprintf(
+ '<?xml%s?>',
+ XML_Util::attributesToString($attributes, false)
+ );
}
/**
- * build a document type declaration
+ * Build a document type declaration
*
* <code>
* require_once 'XML/Util.php';
@@ -99241,12 +96602,11 @@ class XML_Util
* @param string $internalDtd internal dtd entries
*
* @return string doctype declaration
- * @access public
- * @static
- * @since 0.2
+ * @since 0.2
*/
- function getDocTypeDeclaration($root, $uri = null, $internalDtd = null)
- {
+ public static function getDocTypeDeclaration(
+ $root, $uri = null, $internalDtd = null
+ ) {
if (is_array($uri)) {
$ref = sprintf(' PUBLIC "%s" "%s"', $uri['id'], $uri['uri']);
} elseif (!empty($uri)) {
@@ -99263,7 +96623,7 @@ class XML_Util
}
/**
- * create string representation of an attribute list
+ * Create string representation of an attribute list
*
* <code>
* require_once 'XML/Util.php';
@@ -99295,14 +96655,13 @@ class XML_Util
* XML_UTIL_ENTITIES_HTML)
*
* @return string string representation of the attributes
- * @access public
- * @static
- * @uses replaceEntities() to replace XML entities in attribute values
- * @todo allow sort also to be an options array
+ * @uses replaceEntities() to replace XML entities in attribute values
+ * @todo allow sort also to be an options array
*/
- function attributesToString($attributes, $sort = true, $multiline = false,
- $indent = ' ', $linebreak = "\n", $entities = XML_UTIL_ENTITIES_XML)
- {
+ public static function attributesToString(
+ $attributes, $sort = true, $multiline = false,
+ $indent = ' ', $linebreak = "\n", $entities = XML_UTIL_ENTITIES_XML
+ ) {
/*
* second parameter may be an array
*/
@@ -99330,7 +96689,7 @@ class XML_Util
if ($sort) {
ksort($attributes);
}
- if ( !$multiline || count($attributes) == 1) {
+ if (!$multiline || count($attributes) == 1) {
foreach ($attributes as $key => $value) {
if ($entities != XML_UTIL_ENTITIES_NONE) {
if ($entities === XML_UTIL_CDATA_SECTION) {
@@ -99366,26 +96725,23 @@ class XML_Util
* or only XHTML (XML_UTIL_COLLAPSE_XHTML_ONLY) ones.
*
* @return string XML
- * @access public
- * @static
- * @todo PEAR CS - unable to avoid "space after open parens" error
- * in the IF branch
*/
- function collapseEmptyTags($xml, $mode = XML_UTIL_COLLAPSE_ALL)
+ public static function collapseEmptyTags($xml, $mode = XML_UTIL_COLLAPSE_ALL)
{
if ($mode == XML_UTIL_COLLAPSE_XHTML_ONLY) {
return preg_replace(
'/<(area|base(?:font)?|br|col|frame|hr|img|input|isindex|link|meta|'
. 'param)([^>]*)><\/\\1>/s',
'<\\1\\2 />',
- $xml);
+ $xml
+ );
} else {
return preg_replace('/<(\w+)([^>]*)><\/\\1>/s', '<\\1\\2 />', $xml);
}
}
/**
- * create a tag
+ * Create a tag
*
* This method will call XML_Util::createTagFromArray(), which
* is more flexible.
@@ -99416,16 +96772,15 @@ class XML_Util
* @param bool $sortAttributes Whether to sort the attributes or not
*
* @return string XML tag
- * @access public
- * @static
- * @see createTagFromArray()
- * @uses createTagFromArray() to create the tag
+ * @see createTagFromArray()
+ * @uses createTagFromArray() to create the tag
*/
- function createTag($qname, $attributes = array(), $content = null,
+ public static function createTag(
+ $qname, $attributes = array(), $content = null,
$namespaceUri = null, $replaceEntities = XML_UTIL_REPLACE_ENTITIES,
$multiline = false, $indent = '_auto', $linebreak = "\n",
- $sortAttributes = true)
- {
+ $sortAttributes = true
+ ) {
$tag = array(
'qname' => $qname,
'attributes' => $attributes
@@ -99441,13 +96796,15 @@ class XML_Util
$tag['namespaceUri'] = $namespaceUri;
}
- return XML_Util::createTagFromArray($tag, $replaceEntities, $multiline,
- $indent, $linebreak, $sortAttributes);
+ return XML_Util::createTagFromArray(
+ $tag, $replaceEntities, $multiline,
+ $indent, $linebreak, $sortAttributes
+ );
}
/**
- * create a tag from an array
- * this method awaits an array in the following format
+ * Create a tag from an array.
+ * This method awaits an array in the following format
* <pre>
* array(
* // qualified name of the tag
@@ -99496,27 +96853,31 @@ class XML_Util
* @param bool $sortAttributes Whether to sort the attributes or not
*
* @return string XML tag
- * @access public
- * @static
- * @see createTag()
+ *
+ * @see createTag()
* @uses attributesToString() to serialize the attributes of the tag
* @uses splitQualifiedName() to get local part and namespace of a qualified name
* @uses createCDataSection()
* @uses raiseError()
*/
- function createTagFromArray($tag, $replaceEntities = XML_UTIL_REPLACE_ENTITIES,
+ public static function createTagFromArray(
+ $tag, $replaceEntities = XML_UTIL_REPLACE_ENTITIES,
$multiline = false, $indent = '_auto', $linebreak = "\n",
- $sortAttributes = true)
- {
+ $sortAttributes = true
+ ) {
if (isset($tag['content']) && !is_scalar($tag['content'])) {
- return XML_Util::raiseError('Supplied non-scalar value as tag content',
- XML_UTIL_ERROR_NON_SCALAR_CONTENT);
+ return XML_Util::raiseError(
+ 'Supplied non-scalar value as tag content',
+ XML_UTIL_ERROR_NON_SCALAR_CONTENT
+ );
}
if (!isset($tag['qname']) && !isset($tag['localPart'])) {
- return XML_Util::raiseError('You must either supply a qualified name '
+ return XML_Util::raiseError(
+ 'You must either supply a qualified name '
. '(qname) or local tag name (localPart).',
- XML_UTIL_ERROR_NO_TAG_NAME);
+ XML_UTIL_ERROR_NO_TAG_NAME
+ );
}
// if no attributes hav been set, use empty attributes
@@ -99553,8 +96914,8 @@ class XML_Util
if (isset($tag['namespaceUri']) && !empty($tag['namespaceUri'])) {
// is a namespace given
if (isset($tag['namespace']) && !empty($tag['namespace'])) {
- $tag['attributes']['xmlns:' . $tag['namespace']] =
- $tag['namespaceUri'];
+ $tag['attributes']['xmlns:' . $tag['namespace']]
+ = $tag['namespaceUri'];
} else {
// define this Uri as the default namespace
$tag['attributes']['xmlns'] = $tag['namespaceUri'];
@@ -99569,8 +96930,10 @@ class XML_Util
}
// create attribute list
- $attList = XML_Util::attributesToString($tag['attributes'],
- $sortAttributes, $multiline, $indent, $linebreak);
+ $attList = XML_Util::attributesToString(
+ $tag['attributes'],
+ $sortAttributes, $multiline, $indent, $linebreak
+ );
if (!isset($tag['content']) || (string)$tag['content'] == '') {
$tag = sprintf('<%s%s />', $tag['qname'], $attList);
} else {
@@ -99581,18 +96944,21 @@ class XML_Util
$tag['content'] = XML_Util::createCDataSection($tag['content']);
break;
default:
- $tag['content'] = XML_Util::replaceEntities($tag['content'],
- $replaceEntities);
+ $tag['content'] = XML_Util::replaceEntities(
+ $tag['content'], $replaceEntities
+ );
break;
}
- $tag = sprintf('<%s%s>%s</%s>', $tag['qname'], $attList, $tag['content'],
- $tag['qname']);
+ $tag = sprintf(
+ '<%s%s>%s</%s>', $tag['qname'], $attList, $tag['content'],
+ $tag['qname']
+ );
}
return $tag;
}
/**
- * create a start element
+ * Create a start element
*
* <code>
* require_once 'XML/Util.php';
@@ -99613,14 +96979,13 @@ class XML_Util
* @param bool $sortAttributes Whether to sort the attributes or not
*
* @return string XML start element
- * @access public
- * @static
- * @see createEndElement(), createTag()
+ * @see createEndElement(), createTag()
*/
- function createStartElement($qname, $attributes = array(), $namespaceUri = null,
+ public static function createStartElement(
+ $qname, $attributes = array(), $namespaceUri = null,
$multiline = false, $indent = '_auto', $linebreak = "\n",
- $sortAttributes = true)
- {
+ $sortAttributes = true
+ ) {
// if no attributes hav been set, use empty attributes
if (!isset($attributes) || !is_array($attributes)) {
$attributes = array();
@@ -99648,14 +97013,16 @@ class XML_Util
}
// create attribute list
- $attList = XML_Util::attributesToString($attributes, $sortAttributes,
- $multiline, $indent, $linebreak);
+ $attList = XML_Util::attributesToString(
+ $attributes, $sortAttributes,
+ $multiline, $indent, $linebreak
+ );
$element = sprintf('<%s%s>', $qname, $attList);
return $element;
}
/**
- * create an end element
+ * Create an end element
*
* <code>
* require_once 'XML/Util.php';
@@ -99667,18 +97034,16 @@ class XML_Util
* @param string $qname qualified tagname (including namespace)
*
* @return string XML end element
- * @access public
- * @static
- * @see createStartElement(), createTag()
+ * @see createStartElement(), createTag()
*/
- function createEndElement($qname)
+ public static function createEndElement($qname)
{
$element = sprintf('</%s>', $qname);
return $element;
}
/**
- * create an XML comment
+ * Create an XML comment
*
* <code>
* require_once 'XML/Util.php';
@@ -99690,17 +97055,15 @@ class XML_Util
* @param string $content content of the comment
*
* @return string XML comment
- * @access public
- * @static
*/
- function createComment($content)
+ public static function createComment($content)
{
$comment = sprintf('<!-- %s -->', $content);
return $comment;
}
/**
- * create a CData section
+ * Create a CData section
*
* <code>
* require_once 'XML/Util.php';
@@ -99712,18 +97075,17 @@ class XML_Util
* @param string $data data of the CData section
*
* @return string CData section with content
- * @access public
- * @static
*/
- function createCDataSection($data)
+ public static function createCDataSection($data)
{
- return sprintf('<![CDATA[%s]]>',
- preg_replace('/\]\]>/', ']]]]><![CDATA[>', strval($data)));
-
+ return sprintf(
+ '<![CDATA[%s]]>',
+ preg_replace('/\]\]>/', ']]]]><![CDATA[>', strval($data))
+ );
}
/**
- * split qualified name and return namespace and local part
+ * Split qualified name and return namespace and local part
*
* <code>
* require_once 'XML/Util.php';
@@ -99743,10 +97105,8 @@ class XML_Util
* @param string $defaultNs default namespace (optional)
*
* @return array array containing namespace and local part
- * @access public
- * @static
*/
- function splitQualifiedName($qname, $defaultNs = null)
+ public static function splitQualifiedName($qname, $defaultNs = null)
{
if (strstr($qname, ':')) {
$tmp = explode(':', $qname);
@@ -99762,7 +97122,7 @@ class XML_Util
}
/**
- * check, whether string is valid XML name
+ * Check, whether string is valid XML name
*
* <p>XML names are used for tagname, attribute names and various
* other, lesser known entities.</p>
@@ -99783,33 +97143,39 @@ class XML_Util
* @param string $string string that should be checked
*
* @return mixed true, if string is a valid XML name, PEAR error otherwise
- * @access public
- * @static
+ *
* @todo support for other charsets
* @todo PEAR CS - unable to avoid 85-char limit on second preg_match
*/
- function isValidName($string)
+ public static function isValidName($string)
{
// check for invalid chars
if (!preg_match('/^[[:alpha:]_]\\z/', $string{0})) {
- return XML_Util::raiseError('XML names may only start with letter '
- . 'or underscore', XML_UTIL_ERROR_INVALID_START);
+ return XML_Util::raiseError(
+ 'XML names may only start with letter or underscore',
+ XML_UTIL_ERROR_INVALID_START
+ );
}
// check for invalid chars
- if (!preg_match('/^([[:alpha:]_]([[:alnum:]\-\.]*)?:)?[[:alpha:]_]([[:alnum:]\_\-\.]+)?\\z/',
- $string)
- ) {
- return XML_Util::raiseError('XML names may only contain alphanumeric '
+ $match = preg_match(
+ '/^([[:alpha:]_]([[:alnum:]\-\.]*)?:)?'
+ . '[[:alpha:]_]([[:alnum:]\_\-\.]+)?\\z/',
+ $string
+ );
+ if (!$match) {
+ return XML_Util::raiseError(
+ 'XML names may only contain alphanumeric '
. 'chars, period, hyphen, colon and underscores',
- XML_UTIL_ERROR_INVALID_CHARS);
+ XML_UTIL_ERROR_INVALID_CHARS
+ );
}
// XML name is valid
return true;
}
/**
- * replacement for XML_Util::raiseError
+ * Replacement for XML_Util::raiseError
*
* Avoids the necessity to always require
* PEAR.php
@@ -99818,15 +97184,13 @@ class XML_Util
* @param int $code error code
*
* @return PEAR_Error
- * @access public
- * @static
- * @todo PEAR CS - should this use include_once instead?
+ * @todo PEAR CS - should this use include_once instead?
*/
- function raiseError($msg, $code)
+ public static function raiseError($msg, $code)
{
- require_once 'PEAR.php';
+ include_once 'PEAR.php';
return PEAR::raiseError($msg, $code);
}
}
?>
-
+
diff --git a/php.ini-development b/php.ini-development
index 4aaf2f8164..e81f288a46 100644
--- a/php.ini-development
+++ b/php.ini-development
@@ -876,7 +876,6 @@ default_socket_timeout = 60
;extension=php_ldap.dll
;extension=php_mbstring.dll
;extension=php_exif.dll ; Must be after mbstring as it depends on it
-;extension=php_mysql.dll
;extension=php_mysqli.dll
;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client
;extension=php_openssl.dll
@@ -1110,64 +1109,6 @@ ibase.dateformat = "%Y-%m-%d"
; Default time format.
ibase.timeformat = "%H:%M:%S"
-[MySQL]
-; Allow accessing, from PHP's perspective, local files with LOAD DATA statements
-; http://php.net/mysql.allow_local_infile
-mysql.allow_local_infile = On
-
-; Allow or prevent persistent links.
-; http://php.net/mysql.allow-persistent
-mysql.allow_persistent = On
-
-; If mysqlnd is used: Number of cache slots for the internal result set cache
-; http://php.net/mysql.cache_size
-mysql.cache_size = 2000
-
-; Maximum number of persistent links. -1 means no limit.
-; http://php.net/mysql.max-persistent
-mysql.max_persistent = -1
-
-; Maximum number of links (persistent + non-persistent). -1 means no limit.
-; http://php.net/mysql.max-links
-mysql.max_links = -1
-
-; Default port number for mysql_connect(). If unset, mysql_connect() will use
-; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
-; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
-; at MYSQL_PORT.
-; http://php.net/mysql.default-port
-mysql.default_port =
-
-; Default socket name for local MySQL connects. If empty, uses the built-in
-; MySQL defaults.
-; http://php.net/mysql.default-socket
-mysql.default_socket =
-
-; Default host for mysql_connect() (doesn't apply in safe mode).
-; http://php.net/mysql.default-host
-mysql.default_host =
-
-; Default user for mysql_connect() (doesn't apply in safe mode).
-; http://php.net/mysql.default-user
-mysql.default_user =
-
-; Default password for mysql_connect() (doesn't apply in safe mode).
-; Note that this is generally a *bad* idea to store passwords in this file.
-; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password")
-; and reveal this password! And of course, any users with read access to this
-; file will be able to reveal the password as well.
-; http://php.net/mysql.default-password
-mysql.default_password =
-
-; Maximum time (in seconds) for connect timeout. -1 means no limit
-; http://php.net/mysql.connect-timeout
-mysql.connect_timeout = 60
-
-; Trace mode. When trace_mode is active (=On), warnings for table/index scans and
-; SQL-Errors will be displayed.
-; http://php.net/mysql.trace-mode
-mysql.trace_mode = Off
-
[MySQLi]
; Maximum number of persistent links. -1 means no limit.
@@ -1826,11 +1767,6 @@ ldap.max_links = -1
; size of the optimized code.
;opcache.save_comments=1
-; If disabled, PHPDoc comments are not loaded from SHM, so "Doc Comments"
-; may be always stored (save_comments=1), but not loaded by applications
-; that don't need them anyway.
-;opcache.load_comments=1
-
; If enabled, a fast shutdown sequence is used for the accelerated code
;opcache.fast_shutdown=0
diff --git a/php.ini-production b/php.ini-production
index 9042d08a9d..f4bdf7bf7f 100644
--- a/php.ini-production
+++ b/php.ini-production
@@ -876,7 +876,6 @@ default_socket_timeout = 60
;extension=php_ldap.dll
;extension=php_mbstring.dll
;extension=php_exif.dll ; Must be after mbstring as it depends on it
-;extension=php_mysql.dll
;extension=php_mysqli.dll
;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client
;extension=php_openssl.dll
@@ -1110,64 +1109,6 @@ ibase.dateformat = "%Y-%m-%d"
; Default time format.
ibase.timeformat = "%H:%M:%S"
-[MySQL]
-; Allow accessing, from PHP's perspective, local files with LOAD DATA statements
-; http://php.net/mysql.allow_local_infile
-mysql.allow_local_infile = On
-
-; Allow or prevent persistent links.
-; http://php.net/mysql.allow-persistent
-mysql.allow_persistent = On
-
-; If mysqlnd is used: Number of cache slots for the internal result set cache
-; http://php.net/mysql.cache_size
-mysql.cache_size = 2000
-
-; Maximum number of persistent links. -1 means no limit.
-; http://php.net/mysql.max-persistent
-mysql.max_persistent = -1
-
-; Maximum number of links (persistent + non-persistent). -1 means no limit.
-; http://php.net/mysql.max-links
-mysql.max_links = -1
-
-; Default port number for mysql_connect(). If unset, mysql_connect() will use
-; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
-; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
-; at MYSQL_PORT.
-; http://php.net/mysql.default-port
-mysql.default_port =
-
-; Default socket name for local MySQL connects. If empty, uses the built-in
-; MySQL defaults.
-; http://php.net/mysql.default-socket
-mysql.default_socket =
-
-; Default host for mysql_connect() (doesn't apply in safe mode).
-; http://php.net/mysql.default-host
-mysql.default_host =
-
-; Default user for mysql_connect() (doesn't apply in safe mode).
-; http://php.net/mysql.default-user
-mysql.default_user =
-
-; Default password for mysql_connect() (doesn't apply in safe mode).
-; Note that this is generally a *bad* idea to store passwords in this file.
-; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password")
-; and reveal this password! And of course, any users with read access to this
-; file will be able to reveal the password as well.
-; http://php.net/mysql.default-password
-mysql.default_password =
-
-; Maximum time (in seconds) for connect timeout. -1 means no limit
-; http://php.net/mysql.connect-timeout
-mysql.connect_timeout = 60
-
-; Trace mode. When trace_mode is active (=On), warnings for table/index scans and
-; SQL-Errors will be displayed.
-; http://php.net/mysql.trace-mode
-mysql.trace_mode = Off
-
[MySQLi]
; Maximum number of persistent links. -1 means no limit.
@@ -1826,11 +1767,6 @@ ldap.max_links = -1
; size of the optimized code.
;opcache.save_comments=1
-; If disabled, PHPDoc comments are not loaded from SHM, so "Doc Comments"
-; may be always stored (save_comments=1), but not loaded by applications
-; that don't need them anyway.
-;opcache.load_comments=1
-
; If enabled, a fast shutdown sequence is used for the accelerated code
;opcache.fast_shutdown=0
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index c14aeb405a..73b9d774a7 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -1036,12 +1036,12 @@ static int is_valid_path(const char *path)
/* }}} */
#define CGI_GETENV(name) \
- ((request->has_env) ? \
+ ((has_env) ? \
FCGI_GETENV(request, name) : \
getenv(name))
#define CGI_PUTENV(name, value) \
- ((request->has_env) ? \
+ ((has_env) ? \
FCGI_PUTENV(request, name, value) : \
_sapi_cgi_putenv(name, sizeof(name)-1, value))
@@ -1113,6 +1113,7 @@ static int is_valid_path(const char *path)
*/
static void init_request_info(fcgi_request *request)
{
+ int has_env = fcgi_has_env(request);
char *env_script_filename = CGI_GETENV("SCRIPT_FILENAME");
char *env_path_translated = CGI_GETENV("PATH_TRANSLATED");
char *script_path_translated = env_script_filename;
@@ -1500,8 +1501,8 @@ static PHP_MINFO_FUNCTION(cgi)
PHP_FUNCTION(apache_child_terminate) /* {{{ */
{
- if (ZEND_NUM_ARGS() > 0) {
- WRONG_PARAM_COUNT;
+ if (zend_parse_parameters_none()) {
+ return;
}
if (fcgi_is_fastcgi()) {
fcgi_terminate();
@@ -1550,7 +1551,7 @@ static void add_request_header(char *var, unsigned int var_len, char *val, unsig
} else {
return;
}
- add_assoc_stringl_ex(return_value, var, var_len+1, val, val_len);
+ add_assoc_stringl_ex(return_value, var, var_len, val, val_len);
if (str) {
free_alloca(var, use_heap);
}
@@ -1559,8 +1560,8 @@ static void add_request_header(char *var, unsigned int var_len, char *val, unsig
PHP_FUNCTION(apache_request_headers) /* {{{ */
{
- if (ZEND_NUM_ARGS() > 0) {
- WRONG_PARAM_COUNT;
+ if (zend_parse_parameters_none()) {
+ return;
}
array_init(return_value);
if (fcgi_is_fastcgi()) {
@@ -1734,7 +1735,7 @@ int main(int argc, char *argv[])
int fastcgi;
char *bindpath = NULL;
int fcgi_fd = 0;
- fcgi_request request = {0};
+ fcgi_request *request = NULL;
int warmup_repeats = 0;
int repeats = 1;
int benchmark = 0;
@@ -1972,7 +1973,7 @@ consult the installation file that came with this distribution, or visit \n\
php_import_environment_variables = cgi_php_import_environment_variables;
/* library is already initialized, now init our request */
- fcgi_init_request(&request, fcgi_fd);
+ request = fcgi_init_request(fcgi_fd, NULL, NULL, NULL);
#ifndef PHP_WIN32
/* Pre-fork, if required */
@@ -2101,8 +2102,8 @@ consult the installation file that came with this distribution, or visit \n\
break;
case 'h':
case '?':
- if (request.listen_socket) {
- fcgi_destroy_request(&request);
+ if (request) {
+ fcgi_destroy_request(request);
}
fcgi_shutdown();
no_headers = 1;
@@ -2125,9 +2126,9 @@ consult the installation file that came with this distribution, or visit \n\
fcgi_impersonate();
}
#endif
- while (!fastcgi || fcgi_accept_request(&request) >= 0) {
- SG(server_context) = fastcgi ? (void *)&request : (void *) 1;
- init_request_info(&request);
+ while (!fastcgi || fcgi_accept_request(request) >= 0) {
+ SG(server_context) = fastcgi ? (void *)request : (void *) 1;
+ init_request_info(request);
if (!cgi && !fastcgi) {
while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 0, 2)) != -1) {
@@ -2312,7 +2313,7 @@ consult the installation file that came with this distribution, or visit \n\
* get path_translated */
if (php_request_startup() == FAILURE) {
if (fastcgi) {
- fcgi_finish_request(&request, 1);
+ fcgi_finish_request(request, 1);
}
SG(server_context) = NULL;
php_module_shutdown();
@@ -2523,7 +2524,7 @@ fastcgi_request_done:
/* only fastcgi will get here */
requests++;
if (max_requests && (requests == max_requests)) {
- fcgi_finish_request(&request, 1);
+ fcgi_finish_request(request, 1);
if (bindpath) {
free(bindpath);
}
@@ -2536,8 +2537,8 @@ fastcgi_request_done:
/* end of fastcgi loop */
}
- if (request.listen_socket) {
- fcgi_destroy_request(&request);
+ if (request) {
+ fcgi_destroy_request(request);
}
fcgi_shutdown();
diff --git a/sapi/cgi/tests/004.phpt b/sapi/cgi/tests/004.phpt
index 1d4e719529..8769126561 100644
--- a/sapi/cgi/tests/004.phpt
+++ b/sapi/cgi/tests/004.phpt
@@ -36,7 +36,7 @@ echo "Done\n";
--EXPECTF--
string(%d) "
<br />
-<b>Fatal error</b>: Uncaught EngineException: Cannot access private property test::$pri in %s004.test.php:8
+<b>Fatal error</b>: Uncaught Error: Cannot access private property test::$pri in %s004.test.php:8
Stack trace:
#0 {main}
thrown in <b>%s004.test.php</b> on line <b>8</b><br />
diff --git a/sapi/cli/tests/005.phpt b/sapi/cli/tests/005.phpt
index 2ec0a40df3..60af3fc992 100644
--- a/sapi/cli/tests/005.phpt
+++ b/sapi/cli/tests/005.phpt
@@ -14,7 +14,7 @@ $php = getenv('TEST_PHP_EXECUTABLE');
var_dump(`"$php" -n --rc unknown`);
var_dump(`"$php" -n --rc stdclass`);
-var_dump(`"$php" -n --rc baseexception`);
+var_dump(`"$php" -n --rc exception`);
echo "Done\n";
?>
@@ -40,7 +40,7 @@ string(183) "Class [ <internal:Core> class stdClass ] {
}
"
-string(1368) "Class [ <internal:Core> abstract class BaseException ] {
+string(1544) "Class [ <internal:Core> class Exception implements Throwable ] {
- Constants [0] {
}
@@ -74,28 +74,28 @@ string(1368) "Class [ <internal:Core> abstract class BaseException ] {
}
}
- Method [ <internal:Core> final public method getMessage ] {
+ Method [ <internal:Core, prototype Throwable> final public method getMessage ] {
}
- Method [ <internal:Core> final public method getCode ] {
+ Method [ <internal:Core, prototype Throwable> final public method getCode ] {
}
- Method [ <internal:Core> final public method getFile ] {
+ Method [ <internal:Core, prototype Throwable> final public method getFile ] {
}
- Method [ <internal:Core> final public method getLine ] {
+ Method [ <internal:Core, prototype Throwable> final public method getLine ] {
}
- Method [ <internal:Core> final public method getTrace ] {
+ Method [ <internal:Core, prototype Throwable> final public method getTrace ] {
}
- Method [ <internal:Core> final public method getPrevious ] {
+ Method [ <internal:Core, prototype Throwable> final public method getPrevious ] {
}
- Method [ <internal:Core> final public method getTraceAsString ] {
+ Method [ <internal:Core, prototype Throwable> final public method getTraceAsString ] {
}
- Method [ <internal:Core> public method __toString ] {
+ Method [ <internal:Core, prototype Throwable> public method __toString ] {
}
}
}
diff --git a/sapi/cli/tests/008.phpt b/sapi/cli/tests/008.phpt
index 5037e1cfd4..0121d94a27 100644
--- a/sapi/cli/tests/008.phpt
+++ b/sapi/cli/tests/008.phpt
@@ -36,7 +36,7 @@ echo "Done\n";
--EXPECTF--
string(%d) "
-Fatal error: Uncaught EngineException: Cannot access private property test::$pri in %s:%d
+Fatal error: Uncaught Error: Cannot access private property test::$pri in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/sapi/cli/tests/bug43177.phpt b/sapi/cli/tests/bug43177.phpt
index c0a8da4d4d..23af545908 100644
--- a/sapi/cli/tests/bug43177.phpt
+++ b/sapi/cli/tests/bug43177.phpt
@@ -13,7 +13,7 @@ php_cli_server_start(<<<'SCRIPT'
case "/parse":
try {
eval("this is a parse error");
- } catch (ParseException $e) {
+ } catch (ParseError $e) {
}
echo "OK\n";
break;
diff --git a/sapi/cli/tests/php_cli_server_015.phpt b/sapi/cli/tests/php_cli_server_015.phpt
index 0b13a195d5..af0a3f65a8 100644
--- a/sapi/cli/tests/php_cli_server_015.phpt
+++ b/sapi/cli/tests/php_cli_server_015.phpt
@@ -46,7 +46,7 @@ X-Powered-By: PHP/%s
Content-type: text/html; charset=UTF-8
<br />
-<b>Fatal error</b>: Uncaught EngineException: Call to undefined function non_exists_function() in %ssyntax_error.php:%d
+<b>Fatal error</b>: Uncaught Error: Call to undefined function non_exists_function() in %ssyntax_error.php:%d
Stack trace:
#0 %sindex.php(%d): require()
#1 {main}
diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index 001355ec1e..e836c7a284 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -561,7 +561,7 @@ static void cgi_php_load_env_var(char *var, unsigned int var_len, char *val, uns
void cgi_php_import_environment_variables(zval *array_ptr) /* {{{ */
{
- fcgi_request *request;
+ fcgi_request *request = NULL;
if (Z_TYPE(PG(http_globals)[TRACK_VARS_ENV]) == IS_ARRAY &&
Z_ARR_P(array_ptr) != Z_ARR(PG(http_globals)[TRACK_VARS_ENV]) &&
@@ -1391,11 +1391,12 @@ static void init_request_info(void)
}
/* }}} */
-static void fpm_init_request(fcgi_request *req, int listen_fd) /* {{{ */ {
- fcgi_init_request(req, listen_fd);
- req->hook.on_accept = fpm_request_accepting;
- req->hook.on_read = fpm_request_reading_headers;
- req->hook.on_close = fpm_request_finished;
+static fcgi_request *fpm_init_request(int listen_fd) /* {{{ */ {
+ fcgi_request *req = fcgi_init_request(listen_fd,
+ fpm_request_accepting,
+ fpm_request_reading_headers,
+ fpm_request_finished);
+ return req;
}
/* }}} */
@@ -1562,7 +1563,7 @@ int main(int argc, char *argv[])
int max_requests = 500;
int requests = 0;
int fcgi_fd = 0;
- fcgi_request request;
+ fcgi_request *request;
char *fpm_config = NULL;
char *fpm_prefix = NULL;
char *fpm_pid = NULL;
@@ -1862,13 +1863,13 @@ consult the installation file that came with this distribution, or visit \n\
php_import_environment_variables = cgi_php_import_environment_variables;
/* library is already initialized, now init our request */
- fpm_init_request(&request, fcgi_fd);
+ request = fpm_init_request(fcgi_fd);
zend_first_try {
- while (EXPECTED(fcgi_accept_request(&request) >= 0)) {
+ while (EXPECTED(fcgi_accept_request(request) >= 0)) {
char *primary_script = NULL;
request_body_fd = -1;
- SG(server_context) = (void *) &request;
+ SG(server_context) = (void *) request;
init_request_info();
fpm_request_info();
@@ -1876,7 +1877,7 @@ consult the installation file that came with this distribution, or visit \n\
/* request startup only after we've done all we can to
* get path_translated */
if (UNEXPECTED(php_request_startup() == FAILURE)) {
- fcgi_finish_request(&request, 1);
+ fcgi_finish_request(request, 1);
SG(server_context) = NULL;
php_module_shutdown();
return FPM_EXIT_SOFTWARE;
@@ -1969,12 +1970,12 @@ fastcgi_request_done:
requests++;
if (UNEXPECTED(max_requests && (requests == max_requests))) {
- fcgi_finish_request(&request, 1);
+ fcgi_finish_request(request, 1);
break;
}
/* end of fastcgi loop */
}
- fcgi_destroy_request(&request);
+ fcgi_destroy_request(request);
fcgi_shutdown();
if (cgi_sapi_module.php_ini_path_override) {
diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c
index 2b2385ccdf..f5f7d39b44 100644
--- a/sapi/litespeed/lsapi_main.c
+++ b/sapi/litespeed/lsapi_main.c
@@ -417,7 +417,7 @@ static void sapi_lsapi_log_message(char *message)
static sapi_module_struct lsapi_sapi_module =
{
"litespeed",
- "LiteSpeed V6.7",
+ "LiteSpeed V6.8",
php_lsapi_startup, /* startup */
php_module_shutdown_wrapper, /* shutdown */
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
index eb8369b86f..38bd8f897a 100644
--- a/sapi/phpdbg/phpdbg.c
+++ b/sapi/phpdbg/phpdbg.c
@@ -245,8 +245,7 @@ static PHP_RSHUTDOWN_FUNCTION(phpdbg) /* {{{ */
PHPDBG_G(prompt)[1] = NULL;
if (PHPDBG_G(oplog)) {
- fclose(
- PHPDBG_G(oplog));
+ fclose(PHPDBG_G(oplog));
PHPDBG_G(oplog) = NULL;
}
@@ -256,6 +255,18 @@ static PHP_RSHUTDOWN_FUNCTION(phpdbg) /* {{{ */
PHPDBG_G(ops) = NULL;
}
+ if (PHPDBG_G(oplog_list)) {
+ phpdbg_oplog_list *cur = PHPDBG_G(oplog_list);
+ do {
+ phpdbg_oplog_list *prev = cur->prev;
+ efree(cur);
+ cur = prev;
+ } while (cur != NULL);
+
+ zend_arena_destroy(PHPDBG_G(oplog_arena));
+ PHPDBG_G(oplog_list) = NULL;
+ }
+
return SUCCESS;
} /* }}} */
@@ -403,6 +414,132 @@ static PHP_FUNCTION(phpdbg_prompt)
phpdbg_set_prompt(prompt);
} /* }}} */
+/* {{{ proto void phpdbg_start_oplog() */
+static PHP_FUNCTION(phpdbg_start_oplog)
+{
+ phpdbg_oplog_list *prev;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+
+ prev = PHPDBG_G(oplog_list);
+
+ if (!prev) {
+ PHPDBG_G(oplog_arena) = zend_arena_create(64 * 1024);
+
+ PHPDBG_G(oplog_cur) = ((phpdbg_oplog_entry *) zend_arena_alloc(&PHPDBG_G(oplog_arena), sizeof(phpdbg_oplog_entry))) + 1;
+ PHPDBG_G(oplog_cur)->next = NULL;
+ }
+
+ PHPDBG_G(oplog_list) = emalloc(sizeof(phpdbg_oplog_list));
+ PHPDBG_G(oplog_list)->prev = prev;
+ PHPDBG_G(oplog_list)->start = PHPDBG_G(oplog_cur);
+}
+
+/* {{{ proto void phpdbg_end_oplog() */
+static PHP_FUNCTION(phpdbg_end_oplog)
+{
+ phpdbg_oplog_entry *cur = PHPDBG_G(oplog_list)->start;
+ phpdbg_oplog_list *prev = PHPDBG_G(oplog_list)->prev;
+
+ HashTable *options;
+ zval *option_buffer;
+ zend_bool by_function = 0;
+ zend_bool by_opcode = 0;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|H", &options) == FAILURE) {
+ return;
+ }
+
+ if (!PHPDBG_G(oplog_list)) {
+ zend_error(E_WARNING, "Can not end an oplog without starting it");
+ return;
+ }
+
+ efree(PHPDBG_G(oplog_list));
+ PHPDBG_G(oplog_list) = prev;
+
+ if (options && (option_buffer = zend_hash_str_find(options, ZEND_STRL("functions")))) {
+ by_function = zend_is_true(option_buffer);
+ }
+
+ if (options && (option_buffer = zend_hash_str_find(options, ZEND_STRL("opcodes")))) {
+ if (by_function) {
+ by_opcode = zend_is_true(option_buffer);
+ }
+ }
+
+ array_init(return_value);
+
+ {
+ zend_string *last_file = NULL;
+ zval *file_buf;
+ zend_string *last_function = (void *)~(uintptr_t)0;
+ zend_class_entry *last_scope = NULL;
+ zval *fn_buf;
+
+ HashTable *insert_ht;
+ zend_long insert_idx;
+
+ do {
+ zend_op_array *op_array = cur->op_array;
+ if (op_array->filename != last_file) {
+ last_file = op_array->filename;
+ file_buf = zend_hash_find(Z_ARR_P(return_value), last_file);
+ if (!file_buf) {
+ zval ht;
+ array_init(&ht);
+ file_buf = zend_hash_add_new(Z_ARR_P(return_value), last_file, &ht);
+ }
+ }
+ insert_ht = Z_ARR_P(file_buf);
+
+ if (by_function) {
+ if (op_array->function_name != last_function || op_array->scope != last_scope) {
+ zend_string *fn_name;
+ last_function = op_array->function_name;
+ last_scope = op_array->scope;
+ if (last_scope == NULL) {
+ fn_name = zend_string_copy(last_function);
+ } else {
+ fn_name = strpprintf(last_function->len + last_scope->name->len + 2, "%.*s::%.*s", last_function->len, last_function->val, last_scope->name->len, last_scope->name->val);
+ }
+ fn_buf = zend_hash_find(Z_ARR_P(return_value), fn_name);
+ if (!fn_buf) {
+ zval ht;
+ array_init(&ht);
+ fn_buf = zend_hash_add_new(Z_ARR_P(return_value), fn_name, &ht);
+ }
+ }
+ insert_ht = Z_ARR_P(fn_buf);
+ }
+
+ if (by_opcode) {
+ insert_idx = cur->op - op_array->opcodes;
+ } else {
+ insert_idx = cur->op->lineno;
+ }
+
+ {
+ zval *num = zend_hash_index_find(insert_ht, insert_idx);
+ if (!num) {
+ zval zv;
+ ZVAL_LONG(&zv, 0);
+ num = zend_hash_index_add_new(insert_ht, insert_idx, &zv);
+ }
+ Z_LVAL_P(num)++;
+ }
+
+ cur = cur->next;
+ } while (cur != NULL);
+ }
+
+ if (!prev) {
+ zend_arena_destroy(PHPDBG_G(oplog_arena));
+ }
+}
+
ZEND_BEGIN_ARG_INFO_EX(phpdbg_break_next_arginfo, 0, 0, 0)
ZEND_END_ARG_INFO()
@@ -436,6 +573,12 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(phpdbg_clear_arginfo, 0, 0, 0)
ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO_EX(phpdbg_start_oplog_arginfo, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(phpdbg_end_oplog_arginfo, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
zend_function_entry phpdbg_user_functions[] = {
PHP_FE(phpdbg_clear, phpdbg_clear_arginfo)
PHP_FE(phpdbg_break_next, phpdbg_break_next_arginfo)
@@ -445,6 +588,8 @@ zend_function_entry phpdbg_user_functions[] = {
PHP_FE(phpdbg_exec, phpdbg_exec_arginfo)
PHP_FE(phpdbg_color, phpdbg_color_arginfo)
PHP_FE(phpdbg_prompt, phpdbg_prompt_arginfo)
+ PHP_FE(phpdbg_start_oplog, phpdbg_start_oplog_arginfo)
+ PHP_FE(phpdbg_end_oplog, phpdbg_end_oplog_arginfo)
#ifdef PHP_FE_END
PHP_FE_END
#else
@@ -1021,6 +1166,7 @@ int main(int argc, char **argv) /* {{{ */
char *php_optarg;
int php_optind, opt, show_banner = 1;
long cleaning = -1;
+ zend_bool quit_immediately = 0;
zend_bool remote = 0;
int step = 0;
zend_phpdbg_globals *settings = NULL;
@@ -1086,7 +1232,9 @@ phpdbg_main:
while ((opt = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 0, 2)) != -1) {
switch (opt) {
case 'r':
- phpdbg_startup_run++;
+ if (settings == NULL) {
+ phpdbg_startup_run++;
+ }
break;
case 'n':
ini_ignore = 1;
@@ -1545,7 +1693,7 @@ phpdbg_interact:
do {
zend_try {
if (phpdbg_startup_run) {
- zend_bool quit_immediately = phpdbg_startup_run > 1;
+ quit_immediately = phpdbg_startup_run > 1;
phpdbg_startup_run = 0;
PHPDBG_COMMAND_HANDLER(run)(NULL);
if (quit_immediately) {
@@ -1691,7 +1839,7 @@ phpdbg_out:
}
- if (cleaning > 0 || remote) {
+ if ((cleaning > 0 || remote) && !quit_immediately) {
goto phpdbg_main;
}
diff --git a/sapi/phpdbg/phpdbg.h b/sapi/phpdbg/phpdbg.h
index 2cb588d086..7fb8083793 100644
--- a/sapi/phpdbg/phpdbg.h
+++ b/sapi/phpdbg/phpdbg.h
@@ -130,6 +130,7 @@
#include "phpdbg_btree.h"
#include "phpdbg_watch.h"
#include "phpdbg_bp.h"
+#include "phpdbg_opcode.h"
#ifdef PHP_WIN32
# include "phpdbg_sigio_win32.h"
#endif
@@ -264,6 +265,10 @@ ZEND_BEGIN_MODULE_GLOBALS(phpdbg)
HashTable file_sources;
FILE *oplog; /* opline log */
+ zend_arena *oplog_arena; /* arena for storing oplog */
+ phpdbg_oplog_list *oplog_list; /* list of oplog starts */
+ phpdbg_oplog_entry *oplog_cur; /* current oplog entry */
+
struct {
FILE *ptr;
int fd;
diff --git a/sapi/phpdbg/phpdbg_opcode.c b/sapi/phpdbg/phpdbg_opcode.c
index 0935e748e5..ffc5db04d4 100644
--- a/sapi/phpdbg/phpdbg_opcode.c
+++ b/sapi/phpdbg/phpdbg_opcode.c
@@ -147,6 +147,7 @@ char *phpdbg_decode_opline(zend_op_array *ops, zend_op *op, HashTable *vars) /*{
case ZEND_JMPZ_EX:
case ZEND_JMPNZ_EX:
case ZEND_JMP_SET:
+ case ZEND_ASSERT_CHECK:
asprintf(&decode[2], "J%ld", OP_JMP_ADDR(op, op->op2) - ops->opcodes);
break;
@@ -225,6 +226,15 @@ void phpdbg_print_opline_ex(zend_execute_data *execute_data, HashTable *vars, ze
free(decode);
}
}
+
+ if (PHPDBG_G(oplog_list)) {
+ phpdbg_oplog_entry *cur = zend_arena_alloc(&PHPDBG_G(oplog_arena), sizeof(phpdbg_oplog_entry));
+ cur->op = (zend_op *) execute_data->opline;
+ cur->op_array = &execute_data->func->op_array;
+ cur->next = NULL;
+ PHPDBG_G(oplog_cur)->next = cur;
+ PHPDBG_G(oplog_cur) = cur;
+ }
} /* }}} */
void phpdbg_print_opline(zend_execute_data *execute_data, zend_bool ignore_flags) /* {{{ */
diff --git a/sapi/phpdbg/phpdbg_opcode.h b/sapi/phpdbg/phpdbg_opcode.h
index 6848f4014d..dc9d2d9dd0 100644
--- a/sapi/phpdbg/phpdbg_opcode.h
+++ b/sapi/phpdbg/phpdbg_opcode.h
@@ -28,4 +28,17 @@ char *phpdbg_decode_opline(zend_op_array *ops, zend_op *op, HashTable *vars);
void phpdbg_print_opline(zend_execute_data *execute_data, zend_bool ignore_flags);
void phpdbg_print_opline_ex(zend_execute_data *execute_data, HashTable *vars, zend_bool ignore_flags);
+typedef struct _phpdbg_oplog_entry phpdbg_oplog_entry;
+struct _phpdbg_oplog_entry {
+ phpdbg_oplog_entry *next;
+ zend_op_array *op_array;
+ zend_op *op;
+};
+
+typedef struct _phpdbg_oplog_list phpdbg_oplog_list;
+struct _phpdbg_oplog_list {
+ phpdbg_oplog_list *prev;
+ phpdbg_oplog_entry *start;
+};
+
#endif /* PHPDBG_OPCODE_H */
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c
index 173c3f60d8..146532f81e 100644
--- a/sapi/phpdbg/phpdbg_prompt.c
+++ b/sapi/phpdbg/phpdbg_prompt.c
@@ -1559,7 +1559,7 @@ next:
if ((execute_data->opline->opcode == ZEND_DO_FCALL ||
execute_data->opline->opcode == ZEND_DO_UCALL ||
execute_data->opline->opcode == ZEND_DO_FCALL_BY_NAME) &&
- execute_data->func->type == ZEND_USER_FUNCTION) {
+ execute_data->call->func->type == ZEND_USER_FUNCTION) {
zend_execute_ex = execute_ex;
}
PHPDBG_G(vmret) = zend_vm_call_opcode_handler(execute_data);
diff --git a/tests/classes/abstract.phpt b/tests/classes/abstract.phpt
index 811aa45a13..5852005f43 100644
--- a/tests/classes/abstract.phpt
+++ b/tests/classes/abstract.phpt
@@ -27,7 +27,7 @@ echo "Done\n"; // shouldn't be displayed
--EXPECTF--
Call to function show()
-Fatal error: Uncaught EngineException: Cannot call abstract method fail::show() in %s:%d
+Fatal error: Uncaught Error: Cannot call abstract method fail::show() in %s:%d
Stack trace:
#0 %s(%d): pass->error()
#1 {main}
diff --git a/tests/classes/abstract_class.phpt b/tests/classes/abstract_class.phpt
index 1725d45762..2085bff009 100644
--- a/tests/classes/abstract_class.phpt
+++ b/tests/classes/abstract_class.phpt
@@ -26,7 +26,7 @@ echo "Done\n"; // shouldn't be displayed
--EXPECTF--
Call to function show()
-Fatal error: Uncaught EngineException: Cannot instantiate abstract class fail in %s:%d
+Fatal error: Uncaught Error: Cannot instantiate abstract class fail in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/tests/classes/abstract_inherit.phpt b/tests/classes/abstract_inherit.phpt
index 1657599787..583043d22b 100644
--- a/tests/classes/abstract_inherit.phpt
+++ b/tests/classes/abstract_inherit.phpt
@@ -19,7 +19,7 @@ echo "Done\n"; // Shouldn't be displayed
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot instantiate abstract class fail in %s:%d
+Fatal error: Uncaught Error: Cannot instantiate abstract class fail in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/tests/classes/abstract_user_call.phpt b/tests/classes/abstract_user_call.phpt
index 5118efda99..3e88517715 100644
--- a/tests/classes/abstract_user_call.phpt
+++ b/tests/classes/abstract_user_call.phpt
@@ -27,7 +27,7 @@ call_user_func(array($o, 'test_base::func'));
--EXPECTF--
test::func()
-Fatal error: Uncaught EngineException: Cannot call abstract method test_base::func() in %s:%d
+Fatal error: Uncaught Error: Cannot call abstract method test_base::func() in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/tests/classes/array_access_012.phpt b/tests/classes/array_access_012.phpt
index ef8553493f..1fe0b24865 100644
--- a/tests/classes/array_access_012.phpt
+++ b/tests/classes/array_access_012.phpt
@@ -33,7 +33,7 @@ $data['element'] = &$test;
Notice: Indirect modification of overloaded element of ArrayAccessImpl has no effect in %sarray_access_012.php on line 24
-Fatal error: Uncaught EngineException: Cannot assign by reference to overloaded object in %sarray_access_012.php:24
+Fatal error: Uncaught Error: Cannot assign by reference to overloaded object in %sarray_access_012.php:24
Stack trace:
#0 {main}
thrown in %sarray_access_012.php on line 24
diff --git a/tests/classes/autoload_009.phpt b/tests/classes/autoload_009.phpt
index b25d7eb69d..150f3ec201 100644
--- a/tests/classes/autoload_009.phpt
+++ b/tests/classes/autoload_009.phpt
@@ -14,7 +14,7 @@ Ensure type hints for unknown types do not trigger autoload.
f(new stdClass);
?>
--EXPECTF--
-Fatal error: Uncaught TypeException: Argument 1 passed to f() must be an instance of UndefClass, instance of stdClass given, called in %s on line %d and defined in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to f() must be an instance of UndefClass, instance of stdClass given, called in %s on line %d and defined in %s:%d
Stack trace:
#0 %s(%d): f(Object(stdClass))
#1 {main}
diff --git a/tests/classes/autoload_021.phpt b/tests/classes/autoload_021.phpt
index c3945ed4b3..3237627380 100644
--- a/tests/classes/autoload_021.phpt
+++ b/tests/classes/autoload_021.phpt
@@ -10,7 +10,7 @@ $x = new $a;
echo "BUG\n";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Class '../BUG' not found in %sautoload_021.php:6
+Fatal error: Uncaught Error: Class '../BUG' not found in %sautoload_021.php:6
Stack trace:
#0 {main}
thrown in %sautoload_021.php on line 6
diff --git a/tests/classes/bug27504.phpt b/tests/classes/bug27504.phpt
index 1555f5343c..ba44806bfe 100644
--- a/tests/classes/bug27504.phpt
+++ b/tests/classes/bug27504.phpt
@@ -22,7 +22,7 @@ Called function foo:bar(1)
Warning: call_user_func_array() expects parameter 1 to be a valid callback, cannot access private method foo::bar() in %s on line %d
-Fatal error: Uncaught EngineException: Call to private method foo::bar() from context '' in %s:%d
+Fatal error: Uncaught Error: Call to private method foo::bar() from context '' in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/tests/classes/class_abstract.phpt b/tests/classes/class_abstract.phpt
index 04b21b5259..10fcdba461 100644
--- a/tests/classes/class_abstract.phpt
+++ b/tests/classes/class_abstract.phpt
@@ -25,7 +25,7 @@ echo "Done\n"; // shouldn't be displayed
--EXPECTF--
base
-Fatal error: Uncaught EngineException: Cannot instantiate abstract class base in %s:%d
+Fatal error: Uncaught Error: Cannot instantiate abstract class base in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/tests/classes/constants_basic_001.phpt b/tests/classes/constants_basic_001.phpt
index 457584df32..9536b2a38f 100644
--- a/tests/classes/constants_basic_001.phpt
+++ b/tests/classes/constants_basic_001.phpt
@@ -86,7 +86,7 @@ string(6) "hello2"
Expecting fatal error:
-Fatal error: Uncaught EngineException: Undefined class constant 'c19' in %s:53
+Fatal error: Uncaught Error: Undefined class constant 'c19' in %s:53
Stack trace:
#0 {main}
thrown in %s on line 53
diff --git a/tests/classes/ctor_visibility.phpt b/tests/classes/ctor_visibility.phpt
index 69383675a1..e7288bb968 100644
--- a/tests/classes/ctor_visibility.phpt
+++ b/tests/classes/ctor_visibility.phpt
@@ -66,7 +66,7 @@ Test::__construct()
TestPriv::__construct()
DerivedPriv::__construct()
-Fatal error: Uncaught EngineException: Cannot call private TestPriv::__construct() in %sctor_visibility.php:%d
+Fatal error: Uncaught Error: Cannot call private TestPriv::__construct() in %sctor_visibility.php:%d
Stack trace:
#0 %s(%d): DerivedPriv->__construct()
#1 %s(%d): DerivedPriv::f()
diff --git a/tests/classes/destructor_visibility_001.phpt b/tests/classes/destructor_visibility_001.phpt
index 40a62f2ec4..b99c0b20ca 100644
--- a/tests/classes/destructor_visibility_001.phpt
+++ b/tests/classes/destructor_visibility_001.phpt
@@ -21,7 +21,7 @@ unset($obj);
?>
===DONE===
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to private Derived::__destruct() from context '' in %sdestructor_visibility_001.php:%d
+Fatal error: Uncaught Error: Call to private Derived::__destruct() from context '' in %sdestructor_visibility_001.php:%d
Stack trace:
#0 {main}
thrown in %sdestructor_visibility_001.php on line %d
diff --git a/tests/classes/factory_and_singleton_003.phpt b/tests/classes/factory_and_singleton_003.phpt
index 272773c439..e312f55442 100644
--- a/tests/classes/factory_and_singleton_003.phpt
+++ b/tests/classes/factory_and_singleton_003.phpt
@@ -15,7 +15,7 @@ $obj = new test;
echo "Done\n";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to protected test::__construct() from invalid context in %s:%d
+Fatal error: Uncaught Error: Call to protected test::__construct() from invalid context in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/tests/classes/factory_and_singleton_004.phpt b/tests/classes/factory_and_singleton_004.phpt
index 89c4f161ea..a8a2f1d7c5 100644
--- a/tests/classes/factory_and_singleton_004.phpt
+++ b/tests/classes/factory_and_singleton_004.phpt
@@ -15,7 +15,7 @@ $obj = new test;
echo "Done\n";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to private test::__construct() from invalid context in %s:%d
+Fatal error: Uncaught Error: Call to private test::__construct() from invalid context in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/tests/classes/factory_and_singleton_005.phpt b/tests/classes/factory_and_singleton_005.phpt
index e4911f086f..2bb328da7e 100644
--- a/tests/classes/factory_and_singleton_005.phpt
+++ b/tests/classes/factory_and_singleton_005.phpt
@@ -16,7 +16,7 @@ $obj = NULL;
echo "Done\n";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to protected test::__destruct() from context '' in %sfactory_and_singleton_005.php:%d
+Fatal error: Uncaught Error: Call to protected test::__destruct() from context '' in %sfactory_and_singleton_005.php:%d
Stack trace:
#0 {main}
thrown in %sfactory_and_singleton_005.php on line %d
diff --git a/tests/classes/factory_and_singleton_006.phpt b/tests/classes/factory_and_singleton_006.phpt
index 38b8ceb155..5e1c7092d1 100644
--- a/tests/classes/factory_and_singleton_006.phpt
+++ b/tests/classes/factory_and_singleton_006.phpt
@@ -16,7 +16,7 @@ $obj = NULL;
echo "Done\n";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to private test::__destruct() from context '' in %sfactory_and_singleton_006.php:%d
+Fatal error: Uncaught Error: Call to private test::__destruct() from context '' in %sfactory_and_singleton_006.php:%d
Stack trace:
#0 {main}
thrown in %sfactory_and_singleton_006.php on line %d
diff --git a/tests/classes/factory_and_singleton_007.phpt b/tests/classes/factory_and_singleton_007.phpt
index c86243bcfd..b55168efe5 100644
--- a/tests/classes/factory_and_singleton_007.phpt
+++ b/tests/classes/factory_and_singleton_007.phpt
@@ -17,7 +17,7 @@ $obj = NULL;
echo "Done\n";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to protected test::__clone() from context '' in %s:%d
+Fatal error: Uncaught Error: Call to protected test::__clone() from context '' in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/tests/classes/factory_and_singleton_008.phpt b/tests/classes/factory_and_singleton_008.phpt
index d6041b0105..49d4f0a1ff 100644
--- a/tests/classes/factory_and_singleton_008.phpt
+++ b/tests/classes/factory_and_singleton_008.phpt
@@ -17,7 +17,7 @@ $obj = NULL;
echo "Done\n";
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Call to private test::__clone() from context '' in %s:%d
+Fatal error: Uncaught Error: Call to private test::__clone() from context '' in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/tests/classes/interface_instantiate.phpt b/tests/classes/interface_instantiate.phpt
index 310dc8800d..70e2e3e8b6 100644
--- a/tests/classes/interface_instantiate.phpt
+++ b/tests/classes/interface_instantiate.phpt
@@ -13,7 +13,7 @@ $t = new if_a();
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Cannot instantiate interface if_a in %s:%d
+Fatal error: Uncaught Error: Cannot instantiate interface if_a in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/tests/classes/interfaces_001.phpt b/tests/classes/interfaces_001.phpt
index 41e1f6776d..68f85512e7 100644
--- a/tests/classes/interfaces_001.phpt
+++ b/tests/classes/interfaces_001.phpt
@@ -5,11 +5,11 @@ ZE2 interfaces
--FILE--
<?php
-interface Throwable {
+interface ThrowableInterface {
public function getMessage();
}
-class Exception_foo implements Throwable {
+class Exception_foo implements ThrowableInterface {
public $foo = "foo";
public function getMessage() {
diff --git a/tests/classes/interfaces_002.phpt b/tests/classes/interfaces_002.phpt
index d26b5349bf..803598be6d 100644
--- a/tests/classes/interfaces_002.phpt
+++ b/tests/classes/interfaces_002.phpt
@@ -5,12 +5,12 @@ ZE2 interface with an unimplemented method
--FILE--
<?php
-interface Throwable {
+interface ThrowableInterface {
public function getMessage();
public function getErrno();
}
-class Exception_foo implements Throwable {
+class Exception_foo implements ThrowableInterface {
public $foo = "foo";
public function getMessage() {
@@ -26,4 +26,4 @@ echo "Message: " . $foo->getMessage() . "\n";
===DONE===
--EXPECTF--
-Fatal error: Class Exception_foo contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Throwable::getErrno) in %s on line %d
+Fatal error: Class Exception_foo contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (ThrowableInterface::getErrno) in %s on line %d
diff --git a/tests/classes/interfaces_003.phpt b/tests/classes/interfaces_003.phpt
index 0ce8f9e320..e1cbfdaf54 100644
--- a/tests/classes/interfaces_003.phpt
+++ b/tests/classes/interfaces_003.phpt
@@ -23,7 +23,7 @@ $obj = new MyTestClass;
===DONE===
--EXPECTF--
-Fatal error: Uncaught TypeException: Argument 1 passed to MyTestClass::__construct() must be an instance of MyObject, none given, called in %sinterfaces_003.php:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to MyTestClass::__construct() must be an instance of MyObject, none given, called in %sinterfaces_003.php:%d
Stack trace:
#0 %s(%d): MyTestClass->__construct()
#1 {main}
diff --git a/tests/classes/private_001.phpt b/tests/classes/private_001.phpt
index 11574ccde3..9dba49e743 100644
--- a/tests/classes/private_001.phpt
+++ b/tests/classes/private_001.phpt
@@ -23,7 +23,7 @@ echo "Done\n"; // shouldn't be displayed
--EXPECTF--
Call show()
-Fatal error: Uncaught EngineException: Call to private method pass::show() from context '' in %s:%d
+Fatal error: Uncaught Error: Call to private method pass::show() from context '' in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/tests/classes/private_002.phpt b/tests/classes/private_002.phpt
index 664c95837f..2e8d26b058 100644
--- a/tests/classes/private_002.phpt
+++ b/tests/classes/private_002.phpt
@@ -32,7 +32,7 @@ echo "Done\n"; // shouldn't be displayed
Call pass::show()
Call fail::show()
-Fatal error: Uncaught EngineException: Call to private method pass::show() from context 'fail' in %s:%d
+Fatal error: Uncaught Error: Call to private method pass::show() from context 'fail' in %s:%d
Stack trace:
#0 %s(%d): fail::show()
#1 {main}
diff --git a/tests/classes/private_003.phpt b/tests/classes/private_003.phpt
index ce18af196e..397da5d7e2 100644
--- a/tests/classes/private_003.phpt
+++ b/tests/classes/private_003.phpt
@@ -33,7 +33,7 @@ echo "Done\n"; // shouldn't be displayed
--EXPECTF--
Call show()
-Fatal error: Uncaught EngineException: Call to private method pass::show() from context 'fail' in %s:%d
+Fatal error: Uncaught Error: Call to private method pass::show() from context 'fail' in %s:%d
Stack trace:
#0 %s(%d): fail::not_ok()
#1 {main}
diff --git a/tests/classes/private_003b.phpt b/tests/classes/private_003b.phpt
index 27f398d839..f14de8e9cd 100644
--- a/tests/classes/private_003b.phpt
+++ b/tests/classes/private_003b.phpt
@@ -34,7 +34,7 @@ echo "Done\n"; // shouldn't be displayed
--EXPECTF--
Call show()
-Fatal error: Uncaught EngineException: Call to private method pass::show() from context 'fail' in %s:%d
+Fatal error: Uncaught Error: Call to private method pass::show() from context 'fail' in %s:%d
Stack trace:
#0 %s(%d): fail->not_ok()
#1 {main}
diff --git a/tests/classes/private_004.phpt b/tests/classes/private_004.phpt
index 7ebd72da3b..749d6eecc9 100644
--- a/tests/classes/private_004.phpt
+++ b/tests/classes/private_004.phpt
@@ -29,7 +29,7 @@ echo "Done\n"; // shouldn't be displayed
--EXPECTF--
Call show()
-Fatal error: Uncaught EngineException: Call to private method pass::show() from context 'fail' in %s:%d
+Fatal error: Uncaught Error: Call to private method pass::show() from context 'fail' in %s:%d
Stack trace:
#0 %s(%d): fail::do_show()
#1 {main}
diff --git a/tests/classes/private_004b.phpt b/tests/classes/private_004b.phpt
index 5bb9f05b15..8d5cd7c194 100644
--- a/tests/classes/private_004b.phpt
+++ b/tests/classes/private_004b.phpt
@@ -32,7 +32,7 @@ echo "Done\n"; // shouldn't be displayed
--EXPECTF--
Call show()
-Fatal error: Uncaught EngineException: Call to private method pass::show() from context 'fail' in %s:%d
+Fatal error: Uncaught Error: Call to private method pass::show() from context 'fail' in %s:%d
Stack trace:
#0 %s(%d): fail->do_show()
#1 {main}
diff --git a/tests/classes/private_005.phpt b/tests/classes/private_005.phpt
index acd9f825b5..c09c4285e1 100644
--- a/tests/classes/private_005.phpt
+++ b/tests/classes/private_005.phpt
@@ -29,7 +29,7 @@ echo "Done\n"; // shouldn't be displayed
--EXPECTF--
Call show()
-Fatal error: Uncaught EngineException: Call to private method pass::show() from context 'fail' in %s:%d
+Fatal error: Uncaught Error: Call to private method pass::show() from context 'fail' in %s:%d
Stack trace:
#0 %s(%d): fail::do_show()
#1 {main}
diff --git a/tests/classes/private_005b.phpt b/tests/classes/private_005b.phpt
index 5bb9f05b15..8d5cd7c194 100644
--- a/tests/classes/private_005b.phpt
+++ b/tests/classes/private_005b.phpt
@@ -32,7 +32,7 @@ echo "Done\n"; // shouldn't be displayed
--EXPECTF--
Call show()
-Fatal error: Uncaught EngineException: Call to private method pass::show() from context 'fail' in %s:%d
+Fatal error: Uncaught Error: Call to private method pass::show() from context 'fail' in %s:%d
Stack trace:
#0 %s(%d): fail->do_show()
#1 {main}
diff --git a/tests/classes/private_redeclare.phpt b/tests/classes/private_redeclare.phpt
index a1b3e459d7..b42cc7d7fe 100644
--- a/tests/classes/private_redeclare.phpt
+++ b/tests/classes/private_redeclare.phpt
@@ -35,7 +35,7 @@ test
derived
base
-Fatal error: Uncaught EngineException: Call to private method base::show() from context 'derived' in %s:%d
+Fatal error: Uncaught Error: Call to private method base::show() from context 'derived' in %s:%d
Stack trace:
#0 %s(%d): derived->test()
#1 {main}
diff --git a/tests/classes/property_recreate_private.phpt b/tests/classes/property_recreate_private.phpt
index c392d077b5..7bee1072f9 100644
--- a/tests/classes/property_recreate_private.phpt
+++ b/tests/classes/property_recreate_private.phpt
@@ -78,7 +78,7 @@ object(C)#%d (1) {
Unset a private property, and attempt to recreate at global scope (expecting failure):
-Fatal error: Uncaught EngineException: Cannot access private property C::$p in %s:46
+Fatal error: Uncaught Error: Cannot access private property C::$p in %s:46
Stack trace:
#0 {main}
thrown in %s on line 46
diff --git a/tests/classes/property_recreate_protected.phpt b/tests/classes/property_recreate_protected.phpt
index d5f4b45791..357f27c796 100644
--- a/tests/classes/property_recreate_protected.phpt
+++ b/tests/classes/property_recreate_protected.phpt
@@ -50,7 +50,7 @@ object(D)#%d (1) {
Unset a protected property, and attempt to recreate it outside of scope (expected failure):
-Fatal error: Uncaught EngineException: Cannot access protected property %s::$p in %s:32
+Fatal error: Uncaught Error: Cannot access protected property %s::$p in %s:32
Stack trace:
#0 {main}
thrown in %s on line 32
diff --git a/tests/classes/protected_001.phpt b/tests/classes/protected_001.phpt
index fe48ebe67b..aabcd1b2b7 100644
--- a/tests/classes/protected_001.phpt
+++ b/tests/classes/protected_001.phpt
@@ -23,7 +23,7 @@ echo "Done\n"; // shouldn't be displayed
--EXPECTF--
Call fail()
-Fatal error: Uncaught EngineException: Call to protected method pass::fail() from context '' in %s:%d
+Fatal error: Uncaught Error: Call to protected method pass::fail() from context '' in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/tests/classes/protected_001b.phpt b/tests/classes/protected_001b.phpt
index a1c69b9729..d79c1734bb 100644
--- a/tests/classes/protected_001b.phpt
+++ b/tests/classes/protected_001b.phpt
@@ -24,7 +24,7 @@ echo "Done\n"; // shouldn't be displayed
--EXPECTF--
Call fail()
-Fatal error: Uncaught EngineException: Call to protected method pass::fail() from context '' in %s:%d
+Fatal error: Uncaught Error: Call to protected method pass::fail() from context '' in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/tests/classes/protected_002.phpt b/tests/classes/protected_002.phpt
index e67c6b2f3d..89872fa513 100644
--- a/tests/classes/protected_002.phpt
+++ b/tests/classes/protected_002.phpt
@@ -32,7 +32,7 @@ echo "Done\n"; // shouldn't be displayed
Call pass::show()
Call fail::show()
-Fatal error: Uncaught EngineException: Call to protected method pass::show() from context 'fail' in %s:%d
+Fatal error: Uncaught Error: Call to protected method pass::show() from context 'fail' in %s:%d
Stack trace:
#0 %s(%d): fail::show()
#1 {main}
diff --git a/tests/classes/static_properties_003_error1.phpt b/tests/classes/static_properties_003_error1.phpt
index 4b8efe2bf4..df297a71b2 100644
--- a/tests/classes/static_properties_003_error1.phpt
+++ b/tests/classes/static_properties_003_error1.phpt
@@ -15,7 +15,7 @@ unset($c->y);
--> Access non-visible static prop like instance prop:
-Fatal error: Uncaught EngineException: Cannot access protected property C::$y in %s:8
+Fatal error: Uncaught Error: Cannot access protected property C::$y in %s:8
Stack trace:
#0 {main}
thrown in %s on line 8
diff --git a/tests/classes/static_properties_003_error2.phpt b/tests/classes/static_properties_003_error2.phpt
index c43666fbb1..4509568160 100644
--- a/tests/classes/static_properties_003_error2.phpt
+++ b/tests/classes/static_properties_003_error2.phpt
@@ -15,7 +15,7 @@ echo $c->y;
--> Access non-visible static prop like instance prop:
-Fatal error: Uncaught EngineException: Cannot access protected property C::$y in %s:8
+Fatal error: Uncaught Error: Cannot access protected property C::$y in %s:8
Stack trace:
#0 {main}
thrown in %s on line 8
diff --git a/tests/classes/static_properties_003_error3.phpt b/tests/classes/static_properties_003_error3.phpt
index 8cee25a5e6..4f4288a63c 100644
--- a/tests/classes/static_properties_003_error3.phpt
+++ b/tests/classes/static_properties_003_error3.phpt
@@ -15,7 +15,7 @@ $c->y = 1;
--> Access non-visible static prop like instance prop:
-Fatal error: Uncaught EngineException: Cannot access protected property C::$y in %s:8
+Fatal error: Uncaught Error: Cannot access protected property C::$y in %s:8
Stack trace:
#0 {main}
thrown in %s on line 8
diff --git a/tests/classes/static_properties_003_error4.phpt b/tests/classes/static_properties_003_error4.phpt
index 3b01351c7a..b43753f1c5 100644
--- a/tests/classes/static_properties_003_error4.phpt
+++ b/tests/classes/static_properties_003_error4.phpt
@@ -15,11 +15,11 @@ $c->y =& $ref;
--> Access non-visible static prop like instance prop:
-Fatal error: Uncaught EngineException: Cannot access protected property C::$y in %s:8
+Fatal error: Uncaught Error: Cannot access protected property C::$y in %s:8
Stack trace:
#0 {main}
-Next EngineException: Cannot access protected property C::$y in %s:8
+Next Error: Cannot access protected property C::$y in %s:8
Stack trace:
#0 {main}
thrown in %s on line 8
diff --git a/tests/classes/static_properties_undeclared_assign.phpt b/tests/classes/static_properties_undeclared_assign.phpt
index 71859abce3..e2e4835165 100644
--- a/tests/classes/static_properties_undeclared_assign.phpt
+++ b/tests/classes/static_properties_undeclared_assign.phpt
@@ -6,7 +6,7 @@ Class C {}
C::$p = 1;
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Access to undeclared static property: C::$p in %s:3
+Fatal error: Uncaught Error: Access to undeclared static property: C::$p in %s:3
Stack trace:
#0 {main}
thrown in %s on line 3
diff --git a/tests/classes/static_properties_undeclared_assignInc.phpt b/tests/classes/static_properties_undeclared_assignInc.phpt
index 3f73220de4..17577863b1 100644
--- a/tests/classes/static_properties_undeclared_assignInc.phpt
+++ b/tests/classes/static_properties_undeclared_assignInc.phpt
@@ -6,7 +6,7 @@ Class C {}
C::$p += 1;
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Access to undeclared static property: C::$p in %s:3
+Fatal error: Uncaught Error: Access to undeclared static property: C::$p in %s:3
Stack trace:
#0 {main}
thrown in %s on line 3
diff --git a/tests/classes/static_properties_undeclared_assignRef.phpt b/tests/classes/static_properties_undeclared_assignRef.phpt
index 8d6b74e9f8..680aeaf2e8 100644
--- a/tests/classes/static_properties_undeclared_assignRef.phpt
+++ b/tests/classes/static_properties_undeclared_assignRef.phpt
@@ -7,7 +7,7 @@ $a = 'foo';
C::$p =& $a;
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Access to undeclared static property: C::$p in %s:4
+Fatal error: Uncaught Error: Access to undeclared static property: C::$p in %s:4
Stack trace:
#0 {main}
thrown in %s on line 4
diff --git a/tests/classes/static_properties_undeclared_inc.phpt b/tests/classes/static_properties_undeclared_inc.phpt
index 56f8606f36..86b0949627 100644
--- a/tests/classes/static_properties_undeclared_inc.phpt
+++ b/tests/classes/static_properties_undeclared_inc.phpt
@@ -6,7 +6,7 @@ Class C {}
C::$p++;
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Access to undeclared static property: C::$p in %s:3
+Fatal error: Uncaught Error: Access to undeclared static property: C::$p in %s:3
Stack trace:
#0 {main}
thrown in %s on line 3
diff --git a/tests/classes/static_properties_undeclared_read.phpt b/tests/classes/static_properties_undeclared_read.phpt
index 658bc049ab..7028386c69 100644
--- a/tests/classes/static_properties_undeclared_read.phpt
+++ b/tests/classes/static_properties_undeclared_read.phpt
@@ -6,7 +6,7 @@ Class C {}
echo C::$p;
?>
--EXPECTF--
-Fatal error: Uncaught EngineException: Access to undeclared static property: C::$p in %s:3
+Fatal error: Uncaught Error: Access to undeclared static property: C::$p in %s:3
Stack trace:
#0 {main}
thrown in %s on line 3
diff --git a/tests/classes/tostring_004.phpt b/tests/classes/tostring_004.phpt
index de0283e8e6..48e8668235 100644
--- a/tests/classes/tostring_004.phpt
+++ b/tests/classes/tostring_004.phpt
@@ -38,7 +38,6 @@ printf($obj . "\n");
Object with no __toString():
Try 1:
Error: 4096 - Object of class stdClass could not be converted to string
-Error: 8 - Object of class stdClass to string conversion
Object
Try 2:
diff --git a/tests/classes/type_hinting_001.phpt b/tests/classes/type_hinting_001.phpt
index da3de4611f..28d1280b79 100644
--- a/tests/classes/type_hinting_001.phpt
+++ b/tests/classes/type_hinting_001.phpt
@@ -35,7 +35,7 @@ $a->b($b);
?>
--EXPECTF--
-Fatal error: Uncaught TypeException: Argument 1 passed to FooBar::a() must implement interface Foo, instance of Blort given, called in %s on line 27 and defined in %s:12
+Fatal error: Uncaught TypeError: Argument 1 passed to FooBar::a() must implement interface Foo, instance of Blort given, called in %s on line 27 and defined in %s:12
Stack trace:
#0 %s(%d): FooBar->a(Object(Blort))
#1 {main}
diff --git a/tests/classes/type_hinting_002.phpt b/tests/classes/type_hinting_002.phpt
index 1988e24d97..6fefcc8dd4 100644
--- a/tests/classes/type_hinting_002.phpt
+++ b/tests/classes/type_hinting_002.phpt
@@ -13,7 +13,7 @@ $o = new Foo;
$o->a($o);
?>
--EXPECTF--
-Fatal error: Uncaught TypeException: Argument 1 passed to Foo::a() must be an instance of NonExisting, instance of Foo given, called in %s on line %d and defined in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to Foo::a() must be an instance of NonExisting, instance of Foo given, called in %s on line %d and defined in %s:%d
Stack trace:
#0 %s(%d): Foo->a(Object(Foo))
#1 {main}
diff --git a/tests/classes/type_hinting_003.phpt b/tests/classes/type_hinting_003.phpt
index a58c579dc5..50de31e44b 100644
--- a/tests/classes/type_hinting_003.phpt
+++ b/tests/classes/type_hinting_003.phpt
@@ -57,7 +57,7 @@ array(1) {
int(25)
}
-Fatal error: Uncaught TypeException: Argument 1 passed to Test::f1() must be of the type array, integer given, called in %s on line %d and defined in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to Test::f1() must be of the type array, integer given, called in %s on line %d and defined in %s:%d
Stack trace:
#0 %s(%d): Test::f1(1)
#1 {main}
diff --git a/tests/classes/type_hinting_004.phpt b/tests/classes/type_hinting_004.phpt
index d533699b8b..c5f8d3984b 100644
--- a/tests/classes/type_hinting_004.phpt
+++ b/tests/classes/type_hinting_004.phpt
@@ -18,32 +18,32 @@ Ensure type hints are enforced for functions invoked as callbacks.
}
try {
call_user_func('f1', 1);
- } catch (EngineException $ex) {
+ } catch (Error $ex) {
echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
}
try {
call_user_func('f1', new A);
- } catch (EngineException $ex) {
+ } catch (Error $ex) {
echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
}
try {
call_user_func('f2', 1);
- } catch (EngineException $ex) {
+ } catch (Error $ex) {
echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
}
try {
call_user_func('f2');
- } catch (EngineException $ex) {
+ } catch (Error $ex) {
echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
}
try {
call_user_func('f2', new A);
- } catch (EngineException $ex) {
+ } catch (Error $ex) {
echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
}
try {
call_user_func('f2', null);
- } catch (EngineException $ex) {
+ } catch (Error $ex) {
echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
}
@@ -67,32 +67,32 @@ Ensure type hints are enforced for functions invoked as callbacks.
try {
call_user_func(array('C', 'f1'), 1);
- } catch (EngineException $ex) {
+ } catch (Error $ex) {
echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
}
try {
call_user_func(array('C', 'f1'), new A);
- } catch (EngineException $ex) {
+ } catch (Error $ex) {
echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
}
try {
call_user_func(array('C', 'f2'), 1);
- } catch (EngineException $ex) {
+ } catch (Error $ex) {
echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
}
try {
call_user_func(array('C', 'f2'));
- } catch (EngineException $ex) {
+ } catch (Error $ex) {
echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
}
try {
call_user_func(array('C', 'f2'), new A);
- } catch (EngineException $ex) {
+ } catch (Error $ex) {
echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
}
try {
call_user_func(array('C', 'f2'), null);
- } catch (EngineException $ex) {
+ } catch (Error $ex) {
echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
}
@@ -117,32 +117,32 @@ Ensure type hints are enforced for functions invoked as callbacks.
try {
call_user_func(array($d, 'f1'), 1);
- } catch (EngineException $ex) {
+ } catch (Error $ex) {
echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
}
try {
call_user_func(array($d, 'f1'), new A);
- } catch (EngineException $ex) {
+ } catch (Error $ex) {
echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
}
try {
call_user_func(array($d, 'f2'), 1);
- } catch (EngineException $ex) {
+ } catch (Error $ex) {
echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
}
try {
call_user_func(array($d, 'f2'));
- } catch (EngineException $ex) {
+ } catch (Error $ex) {
echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
}
try {
call_user_func(array($d, 'f2'), new A);
- } catch (EngineException $ex) {
+ } catch (Error $ex) {
echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
}
try {
call_user_func(array($d, 'f2'), null);
- } catch (EngineException $ex) {
+ } catch (Error $ex) {
echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
}
diff --git a/tests/lang/041.phpt b/tests/lang/041.phpt
index 5e88569a32..1540243cbe 100644
--- a/tests/lang/041.phpt
+++ b/tests/lang/041.phpt
@@ -17,7 +17,7 @@ echo $wrongClassname::$b."\n";
--EXPECTF--
foo
-Fatal error: Uncaught EngineException: Class 'B' not found in %s041.php:%d
+Fatal error: Uncaught Error: Class 'B' not found in %s041.php:%d
Stack trace:
#0 {main}
thrown in %s041.php on line %d
diff --git a/tests/lang/042.phpt b/tests/lang/042.phpt
index bdf7c018fd..e9e95c8cc1 100644
--- a/tests/lang/042.phpt
+++ b/tests/lang/042.phpt
@@ -16,7 +16,7 @@ echo $wrongClassname::B."\n";
--EXPECTF--
foo
-Fatal error: Uncaught EngineException: Class 'B' not found in %s042.php:%d
+Fatal error: Uncaught Error: Class 'B' not found in %s042.php:%d
Stack trace:
#0 {main}
thrown in %s042.php on line %d
diff --git a/tests/lang/043.phpt b/tests/lang/043.phpt
index 58457bbce3..80c427c8a9 100644
--- a/tests/lang/043.phpt
+++ b/tests/lang/043.phpt
@@ -16,7 +16,7 @@ echo $wrongClassname::foo()."\n";
--EXPECTF--
foo
-Fatal error: Uncaught EngineException: Class 'B' not found in %s043.php:%d
+Fatal error: Uncaught Error: Class 'B' not found in %s043.php:%d
Stack trace:
#0 {main}
thrown in %s043.php on line %d
diff --git a/tests/lang/044.phpt b/tests/lang/044.phpt
index 2e0479baee..eef85c206f 100644
--- a/tests/lang/044.phpt
+++ b/tests/lang/044.phpt
@@ -18,7 +18,7 @@ echo $wrongClassname::$methodname()."\n";
--EXPECTF--
foo
-Fatal error: Uncaught EngineException: Class 'B' not found in %s044.php:%d
+Fatal error: Uncaught Error: Class 'B' not found in %s044.php:%d
Stack trace:
#0 {main}
thrown in %s044.php on line %d
diff --git a/tests/lang/bug24658.phpt b/tests/lang/bug24658.phpt
index 6e57d9b66b..b089569d91 100644
--- a/tests/lang/bug24658.phpt
+++ b/tests/lang/bug24658.phpt
@@ -53,7 +53,7 @@ int(2)
object(foo)#%d (0) {
}
-Fatal error: Uncaught TypeException: Argument 1 passed to typehint() must be an instance of foo, integer given in %s:%d
+Fatal error: Uncaught TypeError: Argument 1 passed to typehint() must be an instance of foo, integer given in %s:%d
Stack trace:
#0 [internal function]: typehint(1, 1)
#1 %s(%d): array_walk(Array, 'typehint')
diff --git a/tests/lang/catchable_error_001.phpt b/tests/lang/catchable_error_001.phpt
index 4343ac0e8f..b11a7c8d96 100644
--- a/tests/lang/catchable_error_001.phpt
+++ b/tests/lang/catchable_error_001.phpt
@@ -19,7 +19,7 @@ Catchable fatal error [1]
echo "ALIVE!\n";
?>
--EXPECTF--
-Fatal error: Uncaught TypeException: Argument 1 passed to blah() must be an instance of Foo, instance of stdClass given, called in %scatchable_error_001.php on line 15 and defined in %scatchable_error_001.php:5
+Fatal error: Uncaught TypeError: Argument 1 passed to blah() must be an instance of Foo, instance of stdClass given, called in %scatchable_error_001.php on line 15 and defined in %scatchable_error_001.php:5
Stack trace:
#0 %s(%d): blah(Object(stdClass))
#1 {main}
diff --git a/tests/lang/catchable_error_002.phpt b/tests/lang/catchable_error_002.phpt
index bc585f7b10..10312533c1 100644
--- a/tests/lang/catchable_error_002.phpt
+++ b/tests/lang/catchable_error_002.phpt
@@ -19,7 +19,7 @@ Catchable fatal error [2]
try {
blah (new StdClass);
- } catch (engineException $ex) {
+ } catch (Error $ex) {
echo $ex->getMessage(), "\n";
}
echo "ALIVE!\n";
diff --git a/tests/lang/foreachLoopIterator.002.phpt b/tests/lang/foreachLoopIterator.002.phpt
index 38b8fd66d7..a016dba2b6 100644
--- a/tests/lang/foreachLoopIterator.002.phpt
+++ b/tests/lang/foreachLoopIterator.002.phpt
@@ -21,7 +21,7 @@ foreach ($f as $k=>&$v) {
--EXPECTF--
-----( Try to iterate with &$value: )-----
-Fatal error: Uncaught EngineException: An iterator cannot be used with foreach by reference in %s:13
+Fatal error: Uncaught Error: An iterator cannot be used with foreach by reference in %s:13
Stack trace:
#0 {main}
thrown in %s on line 13
diff --git a/tests/lang/type_hints_001.phpt b/tests/lang/type_hints_001.phpt
index 0a061b7d9e..e8a2ffa9e3 100644
--- a/tests/lang/type_hints_001.phpt
+++ b/tests/lang/type_hints_001.phpt
@@ -23,7 +23,7 @@ type_hint_foo($bar);
?>
--EXPECTF--
-Fatal error: Uncaught TypeException: Argument 1 passed to type_hint_foo() must be an instance of Foo, instance of Bar given, called in %s on line 16 and defined in %s:9
+Fatal error: Uncaught TypeError: Argument 1 passed to type_hint_foo() must be an instance of Foo, instance of Bar given, called in %s on line 16 and defined in %s:9
Stack trace:
#0 %s(%d): type_hint_foo(Object(Bar))
#1 {main}
diff --git a/win32/build/Makefile b/win32/build/Makefile
index 74fd97b3b2..09fea55137 100644
--- a/win32/build/Makefile
+++ b/win32/build/Makefile
@@ -89,7 +89,7 @@ $(PHPDLL_RES): win32\build\template.rc
win32\build\template.rc
$(BUILD_DIR)\$(PHPDLL): generated_files $(PHPDEF) $(PHP_GLOBAL_OBJS) $(STATIC_EXT_OBJS) $(PHPDLL_RES) $(MCFILE)
- @copy win32\build\default.manifest $(BUILD_DIR)\$(PHPDLL).manifest
+ @copy win32\build\default.manifest $(BUILD_DIR)\$(PHPDLL).manifest >nul
# @$(CC) $(PHP_GLOBAL_OBJS) $(STATIC_EXT_OBJS) $(STATIC_EXT_LIBS) $(LIBS) $(PHPDLL_RES) /link /out:$(BUILD_DIR)\$(PHPDLL) $(PHP7_PGD_OPTION) $(PHP_LDFLAGS) $(LDFLAGS) $(STATIC_EXT_LDFLAGS)
@"$(LINK)" $(PHP_GLOBAL_OBJS_RESP) $(STATIC_EXT_OBJS_RESP) $(STATIC_EXT_LIBS) $(LIBS) $(PHPDLL_RES) /out:$(BUILD_DIR)\$(PHPDLL) $(PHP7_PGD_OPTION) $(PHP_LDFLAGS) $(LDFLAGS) $(STATIC_EXT_LDFLAGS)
-@$(_VC_MANIFEST_EMBED_DLL)
diff --git a/win32/install.txt b/win32/install.txt
index 3c91aeafd7..d6940b9354 100644
--- a/win32/install.txt
+++ b/win32/install.txt
@@ -6,7 +6,6 @@ Installing PHP
1. General Installation Considerations
2. Installation on Windows systems
- Windows Installer
Manual Installation Steps
ActiveScript
Microsoft IIS
@@ -107,9 +106,6 @@ Chapter 2. Installation on Windows systems
refer to the supported Windows platforms as Win32. Windows 95 is no
longer supported as of PHP 4.3.0.
- There are two main ways to install PHP for Windows: either manually or
- by using the installer.
-
If you have Microsoft Visual Studio, you can also build PHP from the
original source code.
@@ -124,129 +120,6 @@ Chapter 2. Installation on Windows systems
optimised.
__________________________________________________________________
-Windows Installer (PHP 5.2 and later)
-
- The Windows PHP installer for later versions of PHP is built using MSI
- technology using the Wix Toolkit (http://wix.sourceforge.net/). It will
- install and configure PHP and all the built-in and PECL extensions, as
- well as configure many of the popular web servers such as IIS, Apache,
- and Xitami.
-
- First, install your selected HTTP (web) server on your system, and make
- sure that it works. Then proceed with one of the following install
- types.
- __________________________________________________________________
-
-Normal Install
-
- Run the MSI installer and follow the instructions provided by the
- installation wizard. You will be prompted to select the Web Server you
- wish to configure first, along with any configuration details needed.
-
- You will then be prompted to select which features and extensions you
- wish to install and enable. By selecting "Will be installed on local
- hard drive" in the drop-down menu for each item you can trigger whether
- to install the feature or not. By selecting "Entire feature will be
- installed on local hard drive", you will be able to install all
- sub-features of the included feature ( for example by selecting this
- options for the feature "PDO" you will install all PDO Drivers ).
-
- Warning
-
- It is not recommended to install all extensions by default, since many
- other them require dependencies from outside PHP in order to function
- properly. Instead, use the Installation Repair Mode that can be
- triggered thru the 'Add/Remove Programs' control panel to enable or
- disable extensions and features after installation.
-
- The installer then sets up PHP to be used in Windows and the php.ini
- file, and configures certain web servers to use PHP. The installer will
- currently configure IIS (CGI mode only), Apache, Xitami, and Sambar
- Server; if you are using a different web server you'll need to
- configure it manually.
- __________________________________________________________________
-
-Silent Install
-
- The installer also supports a silent mode, which is helpful for Systems
- Administrators to deploy PHP easily. To use silent mode:
- msiexec.exe /i php-VERSION-win32-install.msi /q
-
- You can control the install directory by passing it as a parameter to
- the install. For example, to install to e:\php:
- msiexec.exe /i php-VERSION-win32-install.msi /q INSTALLDIR=e:\php
-
- You can also use the same syntax to specify the Apache Configuration
- Directory (APACHEDIR), the Sambar Server directory (SAMBARDIR), and the
- Xitami Server directory (XITAMIDIR).
-
- You can also specify what features to install. For example, to install
- the mysqli extension and the CGI executable:
- msiexec.exe /i php-VERSION-win32-install.msi /q ADDLOCAL=cgi,ext_php_mysqli
-
- The current list of Features to install is as follows:
-MainExecutable - php.exe executable
-ScriptExecutable - php-win.exe executable
-ext_php_* - the various extensions ( for example: ext_php_mysql for MySQL )
-apache13 - Apache 1.3 module
-apache20 - Apache 2.0 module
-apache22 - Apache 2,2 module
-apacheCGI - Apache CGI executable
-iis4ISAPI - IIS ISAPI module
-iis4CGI - IIS CGI executable
-NSAPI - Sun/iPlanet/Netscape server module
-Xitami - Xitami CGI executable
-Sambar - Sambar Server ISAPI module
-CGI - php-cgi.exe executable
-PEAR - PEAR installer
-Manual - PHP Manual in CHM Format
-
- For more information on installing MSI installers from the command
- line, visit
- http://msdn.microsoft.com/library/en-us/msi/setup/command_line_options.
- asp
- __________________________________________________________________
-
-Windows Installer (PHP 5.1.0 and earlier)
-
- The Windows PHP installer is available from the downloads page at
- http://www.php.net/downloads.php. This installs the CGI version of PHP
- and for IIS and Xitami, it configures the web server as well. The
- installer does not include any extra external PHP extensions
- (php_*.dll) as you'll only find those in the Windows Zip Package and
- PECL downloads.
-
- Note: While the Windows installer is an easy way to make PHP work,
- it is restricted in many aspects as, for example, the automatic
- setup of extensions is not supported. Use of the installer isn't the
- preferred method for installing PHP.
-
- First, install your selected HTTP (web) server on your system, and make
- sure that it works.
-
- Run the executable installer and follow the instructions provided by
- the installation wizard. Two types of installation are supported -
- standard, which provides sensible defaults for all the settings it can,
- and advanced, which asks questions as it goes along.
-
- The installation wizard gathers enough information to set up the
- php.ini file, and configure certain web servers to use PHP. One of the
- web servers the PHP installer does not configure for is Apache, so
- you'll need to configure it manually.
-
- Once the installation has completed, the installer will inform you if
- you need to restart your system, restart the server, or just start
- using PHP.
-
- Warning
-
- Be aware, that this setup of PHP is not secure. If you would like to
- have a secure PHP setup, you'd better go on the manual way, and set
- every option carefully. This automatically working setup gives you an
- instantly working PHP installation, but it is not meant to be used on
- online servers.
- __________________________________________________________________
-
Manual Installation Steps
This install guide will help you manually install and configure PHP
@@ -254,11 +127,10 @@ Manual Installation Steps
download the zip binary distribution from the downloads page at
http://www.php.net/downloads.php.
- Although there are many all-in-one installation kits, and we also
- distribute a PHP installer for Microsoft Windows, we recommend you take
- the time to setup PHP yourself as this will provide you with a better
- understanding of the system, and enables you to install PHP extensions
- easily when needed.
+ Although there are many all-in-one installation kits, we recommend you
+ take the time to setup PHP yourself as this will provide you with a
+ better understanding of the system, and enables you to install PHP
+ extensions easily when needed.
Upgrading from a previous PHP version: Previous editions of the
manual suggest moving various ini and DLL files into your SYSTEM
@@ -533,10 +405,10 @@ General considerations for all installations of PHP with IIS
extensions_dir value is "c:\php\ext" and an example IIS doc_root
value is "c:\Inetpub\wwwroot".
* PHP extension DLL files, such as php_mysql.dll and php_curl.dll,
- are found in the zip package of the PHP download (not the PHP
- installer). In PHP 7, many extensions are part of PECL and can be
- downloaded in the "Collection of PECL modules" package. Files such
- as php_zip.dll and php_ssh2.dll. Download PHP files here.
+ are found in the zip package of the PHP download. In PHP 7, many
+ extensions are part of PECL and can be downloaded in the
+ "Collection of PECL modules" package. Files such as php_zip.dll and
+ php_ssh2.dll. Download PHP files here.
* When defining the executable, the 'check that file exists' box may
also be checked. For a small performance penalty, the IIS
will check that the script file exists and sort out authentication