From 71e1d37938159193cbfafc6139870ea54b2e8535 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 1 Apr 2020 19:20:35 +0200 Subject: [PATCH 001/338] Enable error diagnostic for check_default_conf_path.phpt Otherwise we have no clue why the test failed, if the regex didn't match. --- ext/openssl/tests/check_default_conf_path.phpt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/openssl/tests/check_default_conf_path.phpt b/ext/openssl/tests/check_default_conf_path.phpt index 9ce0d41cc34db..f86a06d7968ec 100644 --- a/ext/openssl/tests/check_default_conf_path.phpt +++ b/ext/openssl/tests/check_default_conf_path.phpt @@ -18,6 +18,8 @@ preg_match(",Openssl default config [^ ]* (.*),", $info, $m); if (isset($m[1])) { var_dump(str_replace('/', '\\', strtolower($m[1]))); +} else { + echo $info; } ?> --EXPECTF-- From 5430a466ff31422b436df076581d8345531db975 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 2 Apr 2020 10:54:32 +0200 Subject: [PATCH 002/338] Avoid control flow warning --- Zend/zend_operators.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index b4be563bac7bc..7f9b804f1e067 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -1017,6 +1017,7 @@ static zend_never_inline int ZEND_FASTCALL add_function_slow(zval *result, zval } ZEND_ASSERT(0 && "Operation must succeed"); + return FAILURE; } /* }}} */ ZEND_API int ZEND_FASTCALL add_function(zval *result, zval *op1, zval *op2) /* {{{ */ @@ -1080,6 +1081,7 @@ static zend_never_inline int ZEND_FASTCALL sub_function_slow(zval *result, zval } ZEND_ASSERT(0 && "Operation must succeed"); + return FAILURE; } /* }}} */ @@ -1147,6 +1149,7 @@ static zend_never_inline int ZEND_FASTCALL mul_function_slow(zval *result, zval } ZEND_ASSERT(0 && "Operation must succeed"); + return FAILURE; } /* }}} */ @@ -1246,6 +1249,7 @@ ZEND_API int ZEND_FASTCALL pow_function(zval *result, zval *op1, zval *op2) /* { } ZEND_ASSERT(0 && "Operation must succeed"); + return FAILURE; } /* }}} */ @@ -1324,6 +1328,7 @@ ZEND_API int ZEND_FASTCALL div_function(zval *result, zval *op1, zval *op2) /* { } ZEND_ASSERT(0 && "Operation must succeed"); + return FAILURE; } /* }}} */ From b5991d3382a63079524cf777c0bc43f1cc9c837c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 2 Apr 2020 11:05:04 +0200 Subject: [PATCH 003/338] Show property type in reflection export --- ext/reflection/php_reflection.c | 9 ++++++++- .../tests/ReflectionClass_export_basic2.phpt | 11 +++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index e3d16fd3e077e..018f97e46201b 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -595,7 +595,8 @@ static void _parameter_string(smart_str *str, zend_function *fptr, struct _zend_ } if (ZEND_TYPE_IS_SET(arg_info->type)) { zend_string *type_str = zend_type_to_string(arg_info->type); - smart_str_append_printf(str, "%s ", ZSTR_VAL(type_str)); + smart_str_append(str, type_str); + smart_str_appendc(str, ' '); zend_string_release(type_str); } if (ZEND_ARG_SEND_MODE(arg_info)) { @@ -843,6 +844,12 @@ static void _property_string(smart_str *str, zend_property_info *prop, const cha if (prop->flags & ZEND_ACC_STATIC) { smart_str_appends(str, "static "); } + if (ZEND_TYPE_IS_SET(prop->type)) { + zend_string *type_str = zend_type_to_string(prop->type); + smart_str_append(str, type_str); + smart_str_appendc(str, ' '); + zend_string_release(type_str); + } if (!prop_name) { const char *class_name; zend_unmangle_property_name(prop->name, &class_name, &prop_name); diff --git a/ext/reflection/tests/ReflectionClass_export_basic2.phpt b/ext/reflection/tests/ReflectionClass_export_basic2.phpt index c91c5d1d732d3..6f3c54c88a288 100644 --- a/ext/reflection/tests/ReflectionClass_export_basic2.phpt +++ b/ext/reflection/tests/ReflectionClass_export_basic2.phpt @@ -5,6 +5,7 @@ ReflectionClass::__toString() - ensure inherited private props are hidden. Class c { private $a; static private $b; + public ?int $c = 42; } class d extends c {} @@ -14,7 +15,7 @@ echo new ReflectionClass("d"), "\n"; ?> --EXPECTF-- Class [ class c ] { - @@ %s 2-5 + @@ %s 2-6 - Constants [0] { } @@ -26,8 +27,9 @@ Class [ class c ] { - Static methods [0] { } - - Properties [1] { + - Properties [2] { Property [ private $a ] + Property [ public ?int $c ] } - Methods [0] { @@ -35,7 +37,7 @@ Class [ class c ] { } Class [ class d extends c ] { - @@ %s 7-7 + @@ %s 8-8 - Constants [0] { } @@ -46,7 +48,8 @@ Class [ class d extends c ] { - Static methods [0] { } - - Properties [0] { + - Properties [1] { + Property [ public ?int $c ] } - Methods [0] { From 083b0c38a0aad768403d9fc973e70e02712bd031 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 2 Apr 2020 11:21:48 +0200 Subject: [PATCH 004/338] Display property default value in reflection dumps --- ext/reflection/php_reflection.c | 120 ++++++++++-------- ext/reflection/tests/024.phpt | 6 +- .../tests/ReflectionClass_export_basic2.phpt | 19 +-- .../tests/ReflectionClass_toString_001.phpt | 2 +- .../ReflectionObject___toString_basic1.phpt | 2 +- .../ReflectionObject___toString_basic2.phpt | 2 +- .../tests/ReflectionObject_export_basic1.phpt | 2 +- .../tests/ReflectionObject_export_basic2.phpt | 2 +- .../tests/ReflectionProperty_basic1.phpt | 10 +- ext/reflection/tests/bug45571.phpt | 4 +- 10 files changed, 90 insertions(+), 79 deletions(-) diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 018f97e46201b..77037f9571533 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -584,6 +584,39 @@ static zend_op* _get_recv_op(zend_op_array *op_array, uint32_t offset) } /* }}} */ +static int format_default_value(smart_str *str, zval *value, zend_class_entry *scope) { + zval zv; + ZVAL_COPY(&zv, value); + if (UNEXPECTED(zval_update_constant_ex(&zv, scope) == FAILURE)) { + zval_ptr_dtor(&zv); + return FAILURE; + } + + if (Z_TYPE(zv) == IS_TRUE) { + smart_str_appends(str, "true"); + } else if (Z_TYPE(zv) == IS_FALSE) { + smart_str_appends(str, "false"); + } else if (Z_TYPE(zv) == IS_NULL) { + smart_str_appends(str, "NULL"); + } else if (Z_TYPE(zv) == IS_STRING) { + smart_str_appendc(str, '\''); + smart_str_appendl(str, Z_STRVAL(zv), MIN(Z_STRLEN(zv), 15)); + if (Z_STRLEN(zv) > 15) { + smart_str_appends(str, "..."); + } + smart_str_appendc(str, '\''); + } else if (Z_TYPE(zv) == IS_ARRAY) { + smart_str_appends(str, "Array"); + } else { + zend_string *tmp_zv_str; + zend_string *zv_str = zval_get_tmp_string(&zv, &tmp_zv_str); + smart_str_append(str, zv_str); + zend_tmp_string_release(tmp_zv_str); + } + zval_ptr_dtor(&zv); + return SUCCESS; +} + /* {{{ _parameter_string */ static void _parameter_string(smart_str *str, zend_function *fptr, struct _zend_arg_info *arg_info, uint32_t offset, zend_bool required, char* indent) { @@ -617,36 +650,10 @@ static void _parameter_string(smart_str *str, zend_function *fptr, struct _zend_ if (fptr->type == ZEND_USER_FUNCTION && !required) { zend_op *precv = _get_recv_op((zend_op_array*)fptr, offset); if (precv && precv->opcode == ZEND_RECV_INIT && precv->op2_type != IS_UNUSED) { - zval zv; - smart_str_appends(str, " = "); - ZVAL_COPY(&zv, RT_CONSTANT(precv, precv->op2)); - if (UNEXPECTED(zval_update_constant_ex(&zv, fptr->common.scope) == FAILURE)) { - zval_ptr_dtor(&zv); + if (format_default_value(str, RT_CONSTANT(precv, precv->op2), fptr->common.scope) == FAILURE) { return; } - if (Z_TYPE(zv) == IS_TRUE) { - smart_str_appends(str, "true"); - } else if (Z_TYPE(zv) == IS_FALSE) { - smart_str_appends(str, "false"); - } else if (Z_TYPE(zv) == IS_NULL) { - smart_str_appends(str, "NULL"); - } else if (Z_TYPE(zv) == IS_STRING) { - smart_str_appendc(str, '\''); - smart_str_appendl(str, Z_STRVAL(zv), MIN(Z_STRLEN(zv), 15)); - if (Z_STRLEN(zv) > 15) { - smart_str_appends(str, "..."); - } - smart_str_appendc(str, '\''); - } else if (Z_TYPE(zv) == IS_ARRAY) { - smart_str_appends(str, "Array"); - } else { - zend_string *tmp_zv_str; - zend_string *zv_str = zval_get_tmp_string(&zv, &tmp_zv_str); - smart_str_append(str, zv_str); - zend_tmp_string_release(tmp_zv_str); - } - zval_ptr_dtor(&zv); } } smart_str_appends(str, " ]"); @@ -818,6 +825,17 @@ static void _function_string(smart_str *str, zend_function *fptr, zend_class_ent } /* }}} */ +static zval *property_get_default(zend_property_info *prop_info) { + zend_class_entry *ce = prop_info->ce; + if (prop_info->flags & ZEND_ACC_STATIC) { + zval *prop = &ce->default_static_members_table[prop_info->offset]; + ZVAL_DEINDIRECT(prop); + return prop; + } else { + return &ce->default_properties_table[OBJ_PROP_TO_NUM(prop_info->offset)]; + } +} + /* {{{ _property_string */ static void _property_string(smart_str *str, zend_property_info *prop, const char *prop_name, char* indent) { @@ -855,6 +873,14 @@ static void _property_string(smart_str *str, zend_property_info *prop, const cha zend_unmangle_property_name(prop->name, &class_name, &prop_name); } smart_str_append_printf(str, "$%s", prop_name); + + zval *default_value = property_get_default(prop); + if (!Z_ISUNDEF_P(default_value)) { + smart_str_appends(str, " = "); + if (format_default_value(str, default_value, prop->ce) == FAILURE) { + return; + } + } } smart_str_appends(str, " ]\n"); @@ -3673,7 +3699,7 @@ ZEND_METHOD(reflection_class, __construct) /* }}} */ /* {{{ add_class_vars */ -static void add_class_vars(zend_class_entry *ce, int statics, zval *return_value) +static void add_class_vars(zend_class_entry *ce, zend_bool statics, zval *return_value) { zend_property_info *prop_info; zval *prop, prop_copy; @@ -3686,14 +3712,14 @@ static void add_class_vars(zend_class_entry *ce, int statics, zval *return_value prop_info->ce != ce)) { continue; } - prop = NULL; - if (statics && (prop_info->flags & ZEND_ACC_STATIC) != 0) { - prop = &ce->default_static_members_table[prop_info->offset]; - ZVAL_DEINDIRECT(prop); - } else if (!statics && (prop_info->flags & ZEND_ACC_STATIC) == 0) { - prop = &ce->default_properties_table[OBJ_PROP_TO_NUM(prop_info->offset)]; + + zend_bool is_static = (prop_info->flags & ZEND_ACC_STATIC) != 0; + if (statics != is_static) { + continue; } - if (!prop || (ZEND_TYPE_IS_SET(prop_info->type) && Z_ISUNDEF_P(prop))) { + + prop = property_get_default(prop_info); + if (Z_ISUNDEF_P(prop)) { continue; } @@ -5544,7 +5570,6 @@ ZEND_METHOD(reflection_property, hasDefaultValue) property_reference *ref; zend_property_info *prop_info; zval *prop; - zend_class_entry *ce; if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); @@ -5558,15 +5583,7 @@ ZEND_METHOD(reflection_property, hasDefaultValue) RETURN_FALSE; } - ce = prop_info->ce; - - if ((prop_info->flags & ZEND_ACC_STATIC) != 0) { - prop = &ce->default_static_members_table[prop_info->offset]; - ZVAL_DEINDIRECT(prop); - } else { - prop = &ce->default_properties_table[OBJ_PROP_TO_NUM(prop_info->offset)]; - } - + prop = property_get_default(prop_info); RETURN_BOOL(!Z_ISUNDEF_P(prop)); } /* }}} */ @@ -5579,7 +5596,6 @@ ZEND_METHOD(reflection_property, getDefaultValue) property_reference *ref; zend_property_info *prop_info; zval *prop; - zend_class_entry *ce; if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); @@ -5593,15 +5609,7 @@ ZEND_METHOD(reflection_property, getDefaultValue) return; // throw exception? } - ce = prop_info->ce; - - if ((prop_info->flags & ZEND_ACC_STATIC) != 0) { - prop = &ce->default_static_members_table[prop_info->offset]; - ZVAL_DEINDIRECT(prop); - } else { - prop = &ce->default_properties_table[OBJ_PROP_TO_NUM(prop_info->offset)]; - } - + prop = property_get_default(prop_info); if (Z_ISUNDEF_P(prop)) { return; } @@ -5613,7 +5621,7 @@ ZEND_METHOD(reflection_property, getDefaultValue) /* this is necessary to make it able to work with default array * properties, returned to user */ if (Z_TYPE_P(return_value) == IS_CONSTANT_AST) { - if (UNEXPECTED(zval_update_constant_ex(return_value, ce) != SUCCESS)) { + if (UNEXPECTED(zval_update_constant_ex(return_value, prop_info->ce) != SUCCESS)) { RETURN_THROWS(); } } diff --git a/ext/reflection/tests/024.phpt b/ext/reflection/tests/024.phpt index 0fb1cd6fe2311..3582619aa5c6e 100644 --- a/ext/reflection/tests/024.phpt +++ b/ext/reflection/tests/024.phpt @@ -29,9 +29,9 @@ Object of class [ class C1 ] { } - Properties [3] { - Property [ private $p1 ] - Property [ protected $p2 ] - Property [ public $p3 ] + Property [ private $p1 = 1 ] + Property [ protected $p2 = 2 ] + Property [ public $p3 = 3 ] } - Dynamic properties [1] { diff --git a/ext/reflection/tests/ReflectionClass_export_basic2.phpt b/ext/reflection/tests/ReflectionClass_export_basic2.phpt index 6f3c54c88a288..f222eb073fd61 100644 --- a/ext/reflection/tests/ReflectionClass_export_basic2.phpt +++ b/ext/reflection/tests/ReflectionClass_export_basic2.phpt @@ -6,6 +6,7 @@ Class c { private $a; static private $b; public ?int $c = 42; + public Foo $d; } class d extends c {} @@ -15,21 +16,22 @@ echo new ReflectionClass("d"), "\n"; ?> --EXPECTF-- Class [ class c ] { - @@ %s 2-6 + @@ %s 2-7 - Constants [0] { } - Static properties [1] { - Property [ private static $b ] + Property [ private static $b = NULL ] } - Static methods [0] { } - - Properties [2] { - Property [ private $a ] - Property [ public ?int $c ] + - Properties [3] { + Property [ private $a = NULL ] + Property [ public ?int $c = 42 ] + Property [ public Foo $d ] } - Methods [0] { @@ -37,7 +39,7 @@ Class [ class c ] { } Class [ class d extends c ] { - @@ %s 8-8 + @@ %s 9-9 - Constants [0] { } @@ -48,8 +50,9 @@ Class [ class d extends c ] { - Static methods [0] { } - - Properties [1] { - Property [ public ?int $c ] + - Properties [2] { + Property [ public ?int $c = 42 ] + Property [ public Foo $d ] } - Methods [0] { diff --git a/ext/reflection/tests/ReflectionClass_toString_001.phpt b/ext/reflection/tests/ReflectionClass_toString_001.phpt index 4eb82b96f3723..a00478e7d855e 100644 --- a/ext/reflection/tests/ReflectionClass_toString_001.phpt +++ b/ext/reflection/tests/ReflectionClass_toString_001.phpt @@ -24,7 +24,7 @@ Class [ class ReflectionClass implements Reflector, String } - Properties [1] { - Property [ public $name ] + Property [ public $name = '' ] } - Methods [53] { diff --git a/ext/reflection/tests/ReflectionObject___toString_basic1.phpt b/ext/reflection/tests/ReflectionObject___toString_basic1.phpt index fdd25739bb119..1f647178635bb 100644 --- a/ext/reflection/tests/ReflectionObject___toString_basic1.phpt +++ b/ext/reflection/tests/ReflectionObject___toString_basic1.phpt @@ -25,7 +25,7 @@ Object of class [ class Foo ] { } - Properties [1] { - Property [ public $bar ] + Property [ public $bar = 1 ] } - Dynamic properties [0] { diff --git a/ext/reflection/tests/ReflectionObject___toString_basic2.phpt b/ext/reflection/tests/ReflectionObject___toString_basic2.phpt index db119c92b6451..8de730e9e3598 100644 --- a/ext/reflection/tests/ReflectionObject___toString_basic2.phpt +++ b/ext/reflection/tests/ReflectionObject___toString_basic2.phpt @@ -26,7 +26,7 @@ Object of class [ class Foo ] { } - Properties [1] { - Property [ public $bar ] + Property [ public $bar = 1 ] } - Dynamic properties [2] { diff --git a/ext/reflection/tests/ReflectionObject_export_basic1.phpt b/ext/reflection/tests/ReflectionObject_export_basic1.phpt index fdd25739bb119..1f647178635bb 100644 --- a/ext/reflection/tests/ReflectionObject_export_basic1.phpt +++ b/ext/reflection/tests/ReflectionObject_export_basic1.phpt @@ -25,7 +25,7 @@ Object of class [ class Foo ] { } - Properties [1] { - Property [ public $bar ] + Property [ public $bar = 1 ] } - Dynamic properties [0] { diff --git a/ext/reflection/tests/ReflectionObject_export_basic2.phpt b/ext/reflection/tests/ReflectionObject_export_basic2.phpt index db119c92b6451..8de730e9e3598 100644 --- a/ext/reflection/tests/ReflectionObject_export_basic2.phpt +++ b/ext/reflection/tests/ReflectionObject_export_basic2.phpt @@ -26,7 +26,7 @@ Object of class [ class Foo ] { } - Properties [1] { - Property [ public $bar ] + Property [ public $bar = 1 ] } - Dynamic properties [2] { diff --git a/ext/reflection/tests/ReflectionProperty_basic1.phpt b/ext/reflection/tests/ReflectionProperty_basic1.phpt index 9bdf98b6e05ca..ed14830bdebd7 100644 --- a/ext/reflection/tests/ReflectionProperty_basic1.phpt +++ b/ext/reflection/tests/ReflectionProperty_basic1.phpt @@ -43,12 +43,12 @@ reflectProperty("TestClass", "prot"); reflectProperty("TestClass", "priv"); ?> ---EXPECTF-- +--EXPECT-- ********************************** Reflecting on property TestClass::pub __toString(): -string(35) "Property [ public $pub ] +string(42) "Property [ public $pub = NULL ] " getName(): string(3) "pub" @@ -70,7 +70,7 @@ string(8) "NewValue" Reflecting on property TestClass::stat __toString(): -string(33) "Property [ public static $stat ] +string(53) "Property [ public static $stat = 'static property' ] " getName(): string(4) "stat" @@ -92,7 +92,7 @@ string(8) "NewValue" Reflecting on property TestClass::prot __toString(): -string(39) "Property [ protected $prot ] +string(43) "Property [ protected $prot = 4 ] " getName(): string(4) "prot" @@ -110,7 +110,7 @@ bool(false) Reflecting on property TestClass::priv __toString(): -string(37) "Property [ private $priv ] +string(49) "Property [ private $priv = 'keepOut' ] " getName(): string(4) "priv" diff --git a/ext/reflection/tests/bug45571.phpt b/ext/reflection/tests/bug45571.phpt index aa482193a7f8a..7b48859564a89 100644 --- a/ext/reflection/tests/bug45571.phpt +++ b/ext/reflection/tests/bug45571.phpt @@ -25,8 +25,8 @@ Class [ class C extends A ] { } - Static properties [2] { - Property [ protected static $b ] - Property [ public static $c ] + Property [ protected static $b = 1 ] + Property [ public static $c = 2 ] } - Static methods [0] { From 184fdac7c2dd4bf97a6c70de6d9385c203e4a88a Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 2 Apr 2020 11:25:41 +0200 Subject: [PATCH 005/338] Remove prefix from reflection dump This really doesn't add anything, and only makes for confusing terminology. Only marking properties as dynamic is sufficient. --- ext/reflection/php_reflection.c | 4 ---- ext/reflection/tests/024.phpt | 6 +++--- .../tests/ReflectionClass_export_basic2.phpt | 10 +++++----- .../tests/ReflectionClass_toString_001.phpt | 2 +- .../ReflectionObject___toString_basic1.phpt | 2 +- .../ReflectionObject___toString_basic2.phpt | 2 +- .../tests/ReflectionObject_export_basic1.phpt | 2 +- .../tests/ReflectionObject_export_basic2.phpt | 2 +- .../tests/ReflectionProperty_basic1.phpt | 6 +++--- sapi/cli/tests/005.phpt | 16 ++++++++-------- 10 files changed, 24 insertions(+), 28 deletions(-) diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 77037f9571533..278e565874dda 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -843,10 +843,6 @@ static void _property_string(smart_str *str, zend_property_info *prop, const cha if (!prop) { smart_str_append_printf(str, " public $%s", prop_name); } else { - if (!(prop->flags & ZEND_ACC_STATIC)) { - smart_str_appends(str, " "); - } - /* These are mutually exclusive */ switch (prop->flags & ZEND_ACC_PPP_MASK) { case ZEND_ACC_PUBLIC: diff --git a/ext/reflection/tests/024.phpt b/ext/reflection/tests/024.phpt index 3582619aa5c6e..46db75c911e02 100644 --- a/ext/reflection/tests/024.phpt +++ b/ext/reflection/tests/024.phpt @@ -29,9 +29,9 @@ Object of class [ class C1 ] { } - Properties [3] { - Property [ private $p1 = 1 ] - Property [ protected $p2 = 2 ] - Property [ public $p3 = 3 ] + Property [ private $p1 = 1 ] + Property [ protected $p2 = 2 ] + Property [ public $p3 = 3 ] } - Dynamic properties [1] { diff --git a/ext/reflection/tests/ReflectionClass_export_basic2.phpt b/ext/reflection/tests/ReflectionClass_export_basic2.phpt index f222eb073fd61..5ed4ad5d7b36b 100644 --- a/ext/reflection/tests/ReflectionClass_export_basic2.phpt +++ b/ext/reflection/tests/ReflectionClass_export_basic2.phpt @@ -29,9 +29,9 @@ Class [ class c ] { } - Properties [3] { - Property [ private $a = NULL ] - Property [ public ?int $c = 42 ] - Property [ public Foo $d ] + Property [ private $a = NULL ] + Property [ public ?int $c = 42 ] + Property [ public Foo $d ] } - Methods [0] { @@ -51,8 +51,8 @@ Class [ class d extends c ] { } - Properties [2] { - Property [ public ?int $c = 42 ] - Property [ public Foo $d ] + Property [ public ?int $c = 42 ] + Property [ public Foo $d ] } - Methods [0] { diff --git a/ext/reflection/tests/ReflectionClass_toString_001.phpt b/ext/reflection/tests/ReflectionClass_toString_001.phpt index a00478e7d855e..2dc742e3ec7b1 100644 --- a/ext/reflection/tests/ReflectionClass_toString_001.phpt +++ b/ext/reflection/tests/ReflectionClass_toString_001.phpt @@ -24,7 +24,7 @@ Class [ class ReflectionClass implements Reflector, String } - Properties [1] { - Property [ public $name = '' ] + Property [ public $name = '' ] } - Methods [53] { diff --git a/ext/reflection/tests/ReflectionObject___toString_basic1.phpt b/ext/reflection/tests/ReflectionObject___toString_basic1.phpt index 1f647178635bb..9da648f3a2b3a 100644 --- a/ext/reflection/tests/ReflectionObject___toString_basic1.phpt +++ b/ext/reflection/tests/ReflectionObject___toString_basic1.phpt @@ -25,7 +25,7 @@ Object of class [ class Foo ] { } - Properties [1] { - Property [ public $bar = 1 ] + Property [ public $bar = 1 ] } - Dynamic properties [0] { diff --git a/ext/reflection/tests/ReflectionObject___toString_basic2.phpt b/ext/reflection/tests/ReflectionObject___toString_basic2.phpt index 8de730e9e3598..e93dd9b331a29 100644 --- a/ext/reflection/tests/ReflectionObject___toString_basic2.phpt +++ b/ext/reflection/tests/ReflectionObject___toString_basic2.phpt @@ -26,7 +26,7 @@ Object of class [ class Foo ] { } - Properties [1] { - Property [ public $bar = 1 ] + Property [ public $bar = 1 ] } - Dynamic properties [2] { diff --git a/ext/reflection/tests/ReflectionObject_export_basic1.phpt b/ext/reflection/tests/ReflectionObject_export_basic1.phpt index 1f647178635bb..9da648f3a2b3a 100644 --- a/ext/reflection/tests/ReflectionObject_export_basic1.phpt +++ b/ext/reflection/tests/ReflectionObject_export_basic1.phpt @@ -25,7 +25,7 @@ Object of class [ class Foo ] { } - Properties [1] { - Property [ public $bar = 1 ] + Property [ public $bar = 1 ] } - Dynamic properties [0] { diff --git a/ext/reflection/tests/ReflectionObject_export_basic2.phpt b/ext/reflection/tests/ReflectionObject_export_basic2.phpt index 8de730e9e3598..e93dd9b331a29 100644 --- a/ext/reflection/tests/ReflectionObject_export_basic2.phpt +++ b/ext/reflection/tests/ReflectionObject_export_basic2.phpt @@ -26,7 +26,7 @@ Object of class [ class Foo ] { } - Properties [1] { - Property [ public $bar = 1 ] + Property [ public $bar = 1 ] } - Dynamic properties [2] { diff --git a/ext/reflection/tests/ReflectionProperty_basic1.phpt b/ext/reflection/tests/ReflectionProperty_basic1.phpt index ed14830bdebd7..cef672ecde5eb 100644 --- a/ext/reflection/tests/ReflectionProperty_basic1.phpt +++ b/ext/reflection/tests/ReflectionProperty_basic1.phpt @@ -48,7 +48,7 @@ reflectProperty("TestClass", "priv"); Reflecting on property TestClass::pub __toString(): -string(42) "Property [ public $pub = NULL ] +string(32) "Property [ public $pub = NULL ] " getName(): string(3) "pub" @@ -92,7 +92,7 @@ string(8) "NewValue" Reflecting on property TestClass::prot __toString(): -string(43) "Property [ protected $prot = 4 ] +string(33) "Property [ protected $prot = 4 ] " getName(): string(4) "prot" @@ -110,7 +110,7 @@ bool(false) Reflecting on property TestClass::priv __toString(): -string(49) "Property [ private $priv = 'keepOut' ] +string(39) "Property [ private $priv = 'keepOut' ] " getName(): string(4) "priv" diff --git a/sapi/cli/tests/005.phpt b/sapi/cli/tests/005.phpt index ad0ea37c295d4..e8faa79f0d84b 100644 --- a/sapi/cli/tests/005.phpt +++ b/sapi/cli/tests/005.phpt @@ -37,7 +37,7 @@ string(183) "Class [ class stdClass ] { } " -string(2008) "Class [ class Exception implements Throwable, Stringable ] { +string(1980) "Class [ class Exception implements Throwable, Stringable ] { - Constants [0] { } @@ -49,13 +49,13 @@ string(2008) "Class [ class Exception implements Throwable, Stri } - Properties [7] { - Property [ protected $message ] - Property [ private $string ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] - Property [ private $trace ] - Property [ private $previous ] + Property [ protected $message = '' ] + Property [ private $string = '' ] + Property [ protected $code = 0 ] + Property [ protected $file = NULL ] + Property [ protected $line = NULL ] + Property [ private $trace = NULL ] + Property [ private $previous = NULL ] } - Methods [11] { From 59e06741851c990720fe9feac1adbd8c490ca948 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 2 Apr 2020 12:26:34 +0200 Subject: [PATCH 006/338] use a better setter for zip_error_t --- ext/zip/php_zip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 040e9d4f1b108..02e64f64ae245 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -1652,8 +1652,8 @@ static ZIPARCHIVE_METHOD(getStatusString) } else { zip_error_t err; - zip_error_init_with_code(&err, ze_obj->err_zip); - err.sys_err = ze_obj->err_sys; /* missing setter */ + zip_error_init(&err); + zip_error_set(&err, ze_obj->err_zip, ze_obj->err_sys); RETVAL_STRING(zip_error_strerror(&err)); zip_error_fini(&err); } From 737f7dd8f64d8306eccc2f7f4a611a8bdfe88086 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 2 Apr 2020 12:50:38 +0200 Subject: [PATCH 007/338] Prevent imap mail tests from borking instead of skipping As of commit e49593a[1], run-tests.php is rather picky regarding the output of SKIPIF sections, so we have to suppress warnings for failing imap_open(). [1] --- ext/standard/tests/mail/mail_skipif.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/standard/tests/mail/mail_skipif.inc b/ext/standard/tests/mail/mail_skipif.inc index 8f2468581d061..ba75def80e33c 100644 --- a/ext/standard/tests/mail/mail_skipif.inc +++ b/ext/standard/tests/mail/mail_skipif.inc @@ -18,7 +18,7 @@ $password = 'p4ssw0rd'; $options = OP_HALFOPEN; // this should be enough to verify server present $retries = 0; // don't retry connect on failure -$mbox = imap_open($mailbox, $username, $password, $options, $retries); +$mbox = @imap_open($mailbox, $username, $password, $options, $retries); if (!$mbox) { die("skip could not connect to mailbox $mailbox"); } From 6983ae751cd301886c966b84367fc7aaa1273b2d Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 2 Apr 2020 13:06:19 +0200 Subject: [PATCH 008/338] Fix #47983: mixed LF and CRLF line endings in mail() Email headers are supposed to be separated with CRLF. Period. --- NEWS | 1 + ext/standard/mail.c | 10 +++++----- ext/standard/tests/mail/bug47983.phpt | 17 +++++++++++++++++ 3 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 ext/standard/tests/mail/bug47983.phpt diff --git a/NEWS b/NEWS index 83ef93e59dec6..24608bdd5debb 100644 --- a/NEWS +++ b/NEWS @@ -125,6 +125,7 @@ PHP NEWS is the last char). (Islam Israfilov) . Fixed bug #75902 (str_replace should warn when misused with nested arrays). (Nikita) + . Fixed bug #47983 (mixed LF and CRLF line endings in mail()). (cmb) . Made quoting of cmd execution functions consistent. (cmb) - tidy: diff --git a/ext/standard/mail.c b/ext/standard/mail.c index d08325c3fa200..096f432c9a207 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -486,7 +486,7 @@ PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char f = php_basename(tmp, strlen(tmp), NULL, 0); if (headers != NULL && *headers) { - spprintf(&hdr, 0, "X-PHP-Originating-Script: " ZEND_LONG_FMT ":%s\n%s", php_getuid(), ZSTR_VAL(f), headers); + spprintf(&hdr, 0, "X-PHP-Originating-Script: " ZEND_LONG_FMT ":%s\r\n%s", php_getuid(), ZSTR_VAL(f), headers); } else { spprintf(&hdr, 0, "X-PHP-Originating-Script: " ZEND_LONG_FMT ":%s", php_getuid(), ZSTR_VAL(f)); } @@ -559,12 +559,12 @@ PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char MAIL_RET(0); } #endif - fprintf(sendmail, "To: %s\n", to); - fprintf(sendmail, "Subject: %s\n", subject); + fprintf(sendmail, "To: %s\r\n", to); + fprintf(sendmail, "Subject: %s\r\n", subject); if (hdr != NULL) { - fprintf(sendmail, "%s\n", hdr); + fprintf(sendmail, "%s\r\n", hdr); } - fprintf(sendmail, "\n%s\n", message); + fprintf(sendmail, "\r\n%s\r\n", message); ret = pclose(sendmail); #if PHP_SIGCHILD diff --git a/ext/standard/tests/mail/bug47983.phpt b/ext/standard/tests/mail/bug47983.phpt new file mode 100644 index 0000000000000..f908ca694736f --- /dev/null +++ b/ext/standard/tests/mail/bug47983.phpt @@ -0,0 +1,17 @@ +--TEST-- +Bug #47983 (mixed LF and CRLF line endings in mail()) +--INI-- +sendmail_path={MAIL:bug47983.out} +--FILE-- + +--CLEAN-- + +--EXPECT-- +bool(true) +int(0) From 2dc8d39bae47fc2cb44125514a8a4e81e9a8dd24 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 2 Apr 2020 14:40:05 +0200 Subject: [PATCH 009/338] - add ZipArchive::EM_UNKNOWN constant - add ZipArchive::EM_TRAD_PKWARE constant - cleanup hack for libzip 1.3.1 (have only exist for a few days) - add ZipArchive::isCompressionMethodSupported() method (libzip 1.7.0) - add ZipArchive::isEncryptionMethodSupported() method (libzip 1.7.0) - bump version to 1.19.0-dev --- ext/zip/config.m4 | 8 ++++ ext/zip/php_zip.c | 58 ++++++++++++++++++++++++----- ext/zip/php_zip.stub.php | 8 ++++ ext/zip/php_zip_arginfo.h | 11 ++++++ ext/zip/tests/oo_supported.phpt | 65 +++++++++++++++++++++++++++++++++ 5 files changed, 141 insertions(+), 9 deletions(-) create mode 100644 ext/zip/tests/oo_supported.phpt diff --git a/ext/zip/config.m4 b/ext/zip/config.m4 index abd84ff51d6ac..308020af631c8 100644 --- a/ext/zip/config.m4 +++ b/ext/zip/config.m4 @@ -51,6 +51,14 @@ if test "$PHP_ZIP" != "no"; then $LIBZIP_LIBS ]) + PHP_CHECK_LIBRARY(zip, zip_compression_method_supported, + [ + AC_DEFINE(HAVE_METHOD_SUPPORTED, 1, [Libzip >= 1.7.0 with zip_*_method_supported functions]) + ], [ + ], [ + $LIBZIP_LIBS + ]) + AC_DEFINE(HAVE_ZIP,1,[ ]) PHP_ZIP_SOURCES="php_zip.c zip_stream.c" diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 02e64f64ae245..3b9b07097e50b 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -1039,12 +1039,8 @@ static void php_zip_object_free_storage(zend_object *object) /* {{{ */ } if (intern->za) { if (zip_close(intern->za) != 0) { -#if LIBZIP_VERSION_MAJOR == 1 && LIBZIP_VERSION_MINOR == 3 && LIBZIP_VERSION_MICRO == 1 - php_error_docref(NULL, E_WARNING, "Cannot destroy the zip context: zip_close have failed"); -#else php_error_docref(NULL, E_WARNING, "Cannot destroy the zip context: %s", zip_strerror(intern->za)); zip_discard(intern->za); -#endif } } @@ -1561,9 +1557,6 @@ static ZIPARCHIVE_METHOD(close) err = zip_close(intern); if (err) { -#if LIBZIP_VERSION_MAJOR == 1 && LIBZIP_VERSION_MINOR == 3 && LIBZIP_VERSION_MICRO == 1 - php_error_docref(NULL, E_WARNING, "zip_close have failed"); -#else php_error_docref(NULL, E_WARNING, "%s", zip_strerror(intern)); /* Save error for property reader */ #if LIBZIP_VERSION_MAJOR < 1 @@ -1579,7 +1572,6 @@ static ZIPARCHIVE_METHOD(close) } #endif zip_discard(intern); -#endif } else { ze_obj->err_zip = 0; ze_obj->err_sys = 0; @@ -3064,6 +3056,36 @@ static ZIPARCHIVE_METHOD(registerCancelCallback) /* }}} */ #endif +#ifdef HAVE_METHOD_SUPPORTED +/* {{{ proto bool ZipArchive::isCompressionMethodSupported(int method, bool enc) +check if a compression method is available in used libzip */ +static ZIPARCHIVE_METHOD(isCompressionMethodSupported) +{ + zend_long method; + zend_bool enc = 1; + + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|b", &method, &enc) == FAILURE) { + return; + } + RETVAL_BOOL(zip_compression_method_supported((zip_int32_t)method, enc)); +} +/* }}} */ + +/* {{{ proto bool ZipArchive::isEncryptionMethodSupported(int method, bool enc) +check if a encryption method is available in used libzip */ +static ZIPARCHIVE_METHOD(isEncryptionMethodSupported) +{ + zend_long method; + zend_bool enc = 1; + + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|b", &method, &enc) == FAILURE) { + return; + } + RETVAL_BOOL(zip_encryption_method_supported((zip_uint16_t)method, enc)); +} +/* }}} */ +#endif + /* {{{ ze_zip_object_class_functions */ static const zend_function_entry zip_class_functions[] = { ZIPARCHIVE_ME(open, arginfo_class_ZipArchive_open, ZEND_ACC_PUBLIC) @@ -3121,6 +3143,10 @@ static const zend_function_entry zip_class_functions[] = { #ifdef HAVE_CANCEL_CALLBACK ZIPARCHIVE_ME(registerCancelCallback, arginfo_class_ZipArchive_registerCancelCallback, ZEND_ACC_PUBLIC) #endif +#ifdef HAVE_METHOD_SUPPORTED + ZIPARCHIVE_ME(isCompressionMethodSupported, arginfo_class_ZipArchive_isCompressionMethodSupported, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) + ZIPARCHIVE_ME(isEncryptionMethodSupported, arginfo_class_ZipArchive_isEncryptionMethodSupported, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) +#endif PHP_FE_END }; @@ -3280,12 +3306,14 @@ static PHP_MINIT_FUNCTION(zip) REGISTER_ZIP_CLASS_CONST_LONG("OPSYS_DEFAULT", ZIP_OPSYS_DEFAULT); #endif /* ifdef ZIP_OPSYS_DEFAULT */ -#ifdef HAVE_ENCRYPTION REGISTER_ZIP_CLASS_CONST_LONG("EM_NONE", ZIP_EM_NONE); + REGISTER_ZIP_CLASS_CONST_LONG("EM_TRAD_PKWARE", ZIP_EM_TRAD_PKWARE); +#ifdef HAVE_ENCRYPTION REGISTER_ZIP_CLASS_CONST_LONG("EM_AES_128", ZIP_EM_AES_128); REGISTER_ZIP_CLASS_CONST_LONG("EM_AES_192", ZIP_EM_AES_192); REGISTER_ZIP_CLASS_CONST_LONG("EM_AES_256", ZIP_EM_AES_256); #endif + REGISTER_ZIP_CLASS_CONST_LONG("EM_UNKNOWN", ZIP_EM_UNKNOWN); #if HAVE_LIBZIP_VERSION zend_declare_class_constant_string(zip_class_entry, "LIBZIP_VERSION", sizeof("LIBZIP_VERSION")-1, zip_libzip_version()); @@ -3326,6 +3354,18 @@ static PHP_MINFO_FUNCTION(zip) #else php_info_print_table_row(2, "Libzip version", LIBZIP_VERSION); #endif +#ifdef HAVE_METHOD_SUPPORTED + php_info_print_table_row(2, "BZIP2 compression", + zip_compression_method_supported(ZIP_CM_BZIP2, 1) ? "Yes" : "No"); + php_info_print_table_row(2, "XZ compression", + zip_compression_method_supported(ZIP_CM_XZ, 1) ? "Yes" : "No"); + php_info_print_table_row(2, "AES-128 encryption", + zip_encryption_method_supported(ZIP_EM_AES_128, 1) ? "Yes" : "No"); + php_info_print_table_row(2, "AES-192 encryption", + zip_encryption_method_supported(ZIP_EM_AES_128, 1) ? "Yes" : "No"); + php_info_print_table_row(2, "AES-256 encryption", + zip_encryption_method_supported(ZIP_EM_AES_128, 1) ? "Yes" : "No"); +#endif php_info_print_table_end(); } diff --git a/ext/zip/php_zip.stub.php b/ext/zip/php_zip.stub.php index 1e3ceb6d073b0..101afcbe8ee49 100644 --- a/ext/zip/php_zip.stub.php +++ b/ext/zip/php_zip.stub.php @@ -186,4 +186,12 @@ public function registerProgressCallback(float $rate, callable $callback) {} /** @return bool */ public function registerCancelCallback(callable $callback) {} #endif + +#ifdef HAVE_METHOD_SUPPORTED + /** @return bool */ + public static function isCompressionMethodSupported(int $method, bool $enc): bool {} + + /** @return bool */ + public static function isEncryptionMethodSupported(int $method, bool $enc): bool {} +#endif } diff --git a/ext/zip/php_zip_arginfo.h b/ext/zip/php_zip_arginfo.h index a90b7681719ea..ffb3983527cb3 100644 --- a/ext/zip/php_zip_arginfo.h +++ b/ext/zip/php_zip_arginfo.h @@ -269,3 +269,14 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_registerCancelCallback, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0) ZEND_END_ARG_INFO() #endif + +#if defined(HAVE_METHOD_SUPPORTED) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_isCompressionMethodSupported, 0, 2, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO(0, method, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, enc, _IS_BOOL, 0) +ZEND_END_ARG_INFO() +#endif + +#if defined(HAVE_METHOD_SUPPORTED) +#define arginfo_class_ZipArchive_isEncryptionMethodSupported arginfo_class_ZipArchive_isCompressionMethodSupported +#endif diff --git a/ext/zip/tests/oo_supported.phpt b/ext/zip/tests/oo_supported.phpt new file mode 100644 index 0000000000000..02b169bff7657 --- /dev/null +++ b/ext/zip/tests/oo_supported.phpt @@ -0,0 +1,65 @@ +--TEST-- +ziparchive::properties isset()/empty() checks +--SKIPIF-- += 1.7'); +?> +--FILE-- + "STORE", + ZipArchive::CM_DEFLATE => "DEFLATE", + ZipArchive::CM_BZIP2 => "BZIP2", + ZipArchive::CM_XZ => "XZ", +]; +foreach($methods as $method => $name) { + echo "Compression $name\n"; + var_dump(ZipArchive::isCompressionMethodSupported($method)); + var_dump(ZipArchive::isCompressionMethodSupported($method, false)); +} + +$methods = [ + ZipArchive::EM_NONE => "NONE", + ZipArchive::EM_TRAD_PKWARE => "TRAD_PKWARE", + ZipArchive::EM_AES_128 => "AES-128", + ZipArchive::EM_AES_192 => "AES-192", + ZipArchive::EM_AES_256 => "AES-256", +]; +foreach($methods as $method => $name) { + echo "Encryption $name\n"; + var_dump(ZipArchive::isEncryptionMethodSupported($method)); + var_dump(ZipArchive::isEncryptionMethodSupported($method, false)); +} +?> +Done +--EXPECTF-- +Compression STORE +bool(true) +bool(true) +Compression DEFLATE +bool(true) +bool(true) +Compression BZIP2 +bool(%s) +bool(%s) +Compression XZ +bool(%s) +bool(%s) +Encryption NONE +bool(true) +bool(true) +Encryption TRAD_PKWARE +bool(true) +bool(true) +Encryption AES-128 +bool(%s) +bool(%s) +Encryption AES-192 +bool(%s) +bool(%s) +Encryption AES-256 +bool(%s) +bool(%s) +Done From 319c21b1f60cd05ff7751abc8d0c2267a2314299 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 2 Apr 2020 14:58:13 +0200 Subject: [PATCH 010/338] news / UPGRADING for zip 1.19.0 --- NEWS | 3 +++ UPGRADING | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 24608bdd5debb..1c25db5f0889a 100644 --- a/NEWS +++ b/NEWS @@ -157,5 +157,8 @@ PHP NEWS original modified time). (Remi) . Implemented FR #77960 (add compression / encryption options for ZipArchive::addGlob and ZipArchive::addPattern). (Remi) + . Add ZipArchive::EM_UNKNOWN and ZipArchive::EM_TRAD_PKWARE constants. (Remi) + . Add ZipArchive::isCompressionMethodSupported() and + ZipArchive::isEncryptionMethodSupported() method (libzip 1.7.0). (Remi) <<< NOTE: Insert NEWS from last stable release here prior to actual release! >>> diff --git a/UPGRADING b/UPGRADING index ab0999282d476..8b0324d090760 100644 --- a/UPGRADING +++ b/UPGRADING @@ -457,13 +457,14 @@ PHP 8.0 UPGRADE NOTES RFC: https://wiki.php.net/rfc/dom_living_standard_api - Zip: - . Extension updated to version 1.18.2 + . Extension updated to version 1.19.0 . New ZipArchive::lastId property to get index value of last added entry. . Error can be checked after an archive is closed using ZipArchive::status, ZipArchive::statusSys properties or ZipArchive::getStatusString() method. . The remove_path option of ZipArchive::addGlob() and ::addPattern() is now treated as arbitrary string prefix (for consistency with the add_path option), whereas formerly it was treated as directory name. + . Optional compression / encryption features are listed in phpinfo. ======================================== 3. Changes in SAPI modules @@ -528,6 +529,10 @@ PHP 8.0 UPGRADE NOTES . ZipArchive::setProgressCallback to provide updates during archive close. . ZipArchive::setCancelCallback to allow cancellation during archive close. . ZipArchive::replaceFile to replace an entry content. + . ZipArchive::isCompressionMethodSupported to check optional compression + features. + . ZipArchive::isEncryptionMethodSupported to check optional encryption + features. ======================================== 7. New Classes and Interfaces From af337ae47e7b66d8c8edcd0abb1d05f530998f42 Mon Sep 17 00:00:00 2001 From: Matteo Beccati Date: Wed, 1 Apr 2020 18:14:25 +0200 Subject: [PATCH 011/338] Allow fpm tests to be run with long socket path Socket path is restricted to ~100 bytes, so we can use the system temp dir if the path ends up too long. --- sapi/fpm/tests/tester.inc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sapi/fpm/tests/tester.inc b/sapi/fpm/tests/tester.inc index e553e94f15467..d63e8a7250585 100644 --- a/sapi/fpm/tests/tester.inc +++ b/sapi/fpm/tests/tester.inc @@ -856,7 +856,17 @@ class Tester { $port = $this->getPort($type, $pool, true); if ($type === 'uds') { - return $this->getFile($port . '.sock'); + $address = $this->getFile($port . '.sock'); + + // Socket max path length is 108 on Linux and 104 on BSD, + // so we use the latter + if (strlen($address) <= 104) { + return $address; + } + + return sys_get_temp_dir().'/'. + hash('crc32', dirname($address)).'-'. + basename($address); } return $this->getHost($type) . ':' . $port; From 87375fa2bea3e9f0aafaa31055059891d6852cab Mon Sep 17 00:00:00 2001 From: Matteo Beccati Date: Wed, 1 Apr 2020 18:28:34 +0200 Subject: [PATCH 012/338] Skip fpm tests not designed to be run as root When running as root with TEST_FPM_RUN_AS_ROOT=1 --- sapi/fpm/tests/bug68391-conf-include-order.phpt | 1 + sapi/fpm/tests/proc-user-ignored.phpt | 1 + sapi/fpm/tests/socket-uds-numeric-ugid-nonroot.phpt | 1 + sapi/fpm/tests/tester.inc | 10 ++++++++++ 4 files changed, 13 insertions(+) diff --git a/sapi/fpm/tests/bug68391-conf-include-order.phpt b/sapi/fpm/tests/bug68391-conf-include-order.phpt index 012a978f298e4..a357cf8bd33b5 100644 --- a/sapi/fpm/tests/bug68391-conf-include-order.phpt +++ b/sapi/fpm/tests/bug68391-conf-include-order.phpt @@ -3,6 +3,7 @@ FPM: bug68391 - Configuration inclusion in alphabetical order --SKIPIF-- --FILE-- --FILE-- --FILE-- diff --git a/sapi/fpm/tests/tester.inc b/sapi/fpm/tests/tester.inc index d63e8a7250585..da5719b0648b2 100644 --- a/sapi/fpm/tests/tester.inc +++ b/sapi/fpm/tests/tester.inc @@ -278,6 +278,16 @@ class Tester } } + /** + * Skip if running as root. + */ + static public function skipIfRoot() + { + if (getmyuid() == 0) { + die('skip running as root'); + } + } + /** * Skip if posix extension not loaded. */ From cf68bc413bd7548643058a63dbf4d907346d184c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 2 Apr 2020 16:32:57 +0200 Subject: [PATCH 013/338] Fixed bug #79434 --- NEWS | 4 ++++ ...case_insensitive_constant_deprecation.phpt | 24 +++++++++++-------- Zend/zend_execute.c | 12 ++++++---- 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/NEWS b/NEWS index 3bcafb8cd89fb..87e279e02db58 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,10 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 7.3.18 +- Core: + . Fixed bug #79434 (PHP 7.3 and PHP-7.4 crash with NULL-pointer dereference + on !CS constant). (Nikita) + - MBString: . Fixed bug #79441 (Segfault in mb_chr() if internal encoding is unsupported). (Girgias) diff --git a/Zend/tests/case_insensitive_constant_deprecation.phpt b/Zend/tests/case_insensitive_constant_deprecation.phpt index e7a92c8c4c5a3..6ab18b376388c 100644 --- a/Zend/tests/case_insensitive_constant_deprecation.phpt +++ b/Zend/tests/case_insensitive_constant_deprecation.phpt @@ -9,6 +9,7 @@ namespace { var_dump(FOO); // Ok var_dump(foo); // Deprecated + var_dump(\foo); // Deprecated var_dump(NS\FOO); // Ok var_dump(ns\FOO); // Ok @@ -72,10 +73,13 @@ int(42) Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "FOO" in %s on line 8 int(42) + +Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "FOO" in %s on line 9 +int(42) int(24) int(24) -Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "NS\FOO" in %s on line 12 +Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "NS\FOO" in %s on line 13 int(24) bool(true) bool(true) @@ -84,24 +88,24 @@ bool(true) bool(true) int(42) -Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "FOO" in %s on line 21 +Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "FOO" in %s on line 22 int(42) int(24) int(24) -Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "NS\FOO" in %s on line 24 +Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "NS\FOO" in %s on line 25 int(24) int(24) -Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "NS\FOO" in %s on line 29 +Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "NS\FOO" in %s on line 30 int(24) int(24) -Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "NS\FOO" in %s on line 34 +Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "NS\FOO" in %s on line 35 int(24) int(42) -Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "FOO" in %s on line 39 +Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "FOO" in %s on line 40 int(42) bool(true) bool(true) @@ -110,18 +114,18 @@ bool(true) bool(true) int(42) -Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "FOO" in %s on line 48 +Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "FOO" in %s on line 49 int(42) int(24) int(24) -Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "NS\FOO" in %s on line 51 +Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "NS\FOO" in %s on line 52 int(24) int(42) -Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "FOO" in %s on line 55 +Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "FOO" in %s on line 56 int(42) int(43) -Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "FOO" in %s on line 59 +Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "FOO" in %s on line 60 int(43) diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 0a505f55e8375..0eb6639b2e428 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -3364,11 +3364,15 @@ static zend_always_inline int _zend_quick_get_constant( is_deprecated = !zend_string_equals(c->name, Z_STR_P(access_key)); } else { check_short_name: - ns_sep = zend_memrchr(ZSTR_VAL(c->name), '\\', ZSTR_LEN(c->name)); - ZEND_ASSERT(ns_sep); /* Namespaces are always case-insensitive. Only compare shortname. */ - shortname_offset = ns_sep - ZSTR_VAL(c->name) + 1; - shortname_len = ZSTR_LEN(c->name) - shortname_offset; + ns_sep = zend_memrchr(ZSTR_VAL(c->name), '\\', ZSTR_LEN(c->name)); + if (ns_sep) { + shortname_offset = ns_sep - ZSTR_VAL(c->name) + 1; + shortname_len = ZSTR_LEN(c->name) - shortname_offset; + } else { + shortname_offset = 0; + shortname_len = ZSTR_LEN(c->name); + } is_deprecated = memcmp(ZSTR_VAL(c->name) + shortname_offset, Z_STRVAL_P(orig_key - 1) + shortname_offset, shortname_len) != 0; } From 4cd3d7b166d9075d82e4dd761bea6b840af1618c Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Thu, 2 Apr 2020 18:35:20 +0200 Subject: [PATCH 014/338] Promote empty string warning to ValueError in mb_ord() --- ext/mbstring/mbstring.c | 12 +++++++----- ext/mbstring/tests/mb_ord.phpt | 8 +++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 4215d7b7a4934..1a5f512765ea0 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -4335,6 +4335,8 @@ static inline zend_long php_mb_ord(const char *str, size_t str_len, zend_string const mbfl_encoding *enc; enum mbfl_no_encoding no_enc; + ZEND_ASSERT(str_len > 0); + enc = php_mb_get_encoding(enc_name, enc_name_arg_num); if (!enc) { return -2; @@ -4346,11 +4348,6 @@ static inline zend_long php_mb_ord(const char *str, size_t str_len, zend_string return -2; } - if (str_len == 0) { - php_error_docref(NULL, E_WARNING, "Empty string"); - return -1; - } - { mbfl_wchar_device dev; mbfl_convert_filter *filter; @@ -4396,6 +4393,11 @@ PHP_FUNCTION(mb_ord) Z_PARAM_STR(enc) ZEND_PARSE_PARAMETERS_END(); + if (str_len == 0) { + zend_argument_value_error(1, "must not be empty"); + RETURN_THROWS(); + } + cp = php_mb_ord(str, str_len, enc, 2); if (0 > cp) { diff --git a/ext/mbstring/tests/mb_ord.phpt b/ext/mbstring/tests/mb_ord.phpt index 5c7fdf3168c1b..56e8d4a8140cd 100644 --- a/ext/mbstring/tests/mb_ord.phpt +++ b/ext/mbstring/tests/mb_ord.phpt @@ -50,15 +50,13 @@ try { } catch (\ValueError $e) { echo $e->getMessage() . \PHP_EOL; } -; + ?> ---EXPECTF-- +--EXPECT-- bool(true) bool(true) bool(true) - -Warning: mb_ord(): Empty string in %s on line %d -bool(false) +mb_ord(): Argument #1 ($str) must not be empty mb_ord(): Argument #2 ($encoding) must be a valid encoding, "typo" given mb_ord() does not support the "pass" encoding mb_ord() does not support the "JIS" encoding From 577de174dedd41c5825a140a263fd7078d383184 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Thu, 2 Apr 2020 18:43:57 +0200 Subject: [PATCH 015/338] Use ZEND_NUM_ARGS() macro instead of custom variable Also why on earth would someone do this? --- ext/mbstring/php_mbregex.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index c4e066fccc31a..a701021c13ba2 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -1533,18 +1533,17 @@ PHP_FUNCTION(mb_ereg_search_regs) Initialize string and regular expression for search. */ PHP_FUNCTION(mb_ereg_search_init) { - int argc = ZEND_NUM_ARGS(); zend_string *arg_str; char *arg_pattern = NULL, *arg_options = NULL; size_t arg_pattern_len = 0, arg_options_len = 0; OnigSyntaxType *syntax = NULL; OnigOptionType option; - if (zend_parse_parameters(argc, "S|ss", &arg_str, &arg_pattern, &arg_pattern_len, &arg_options, &arg_options_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|ss", &arg_str, &arg_pattern, &arg_pattern_len, &arg_options, &arg_options_len) == FAILURE) { RETURN_THROWS(); } - if (argc > 1 && arg_pattern_len == 0) { + if (ZEND_NUM_ARGS() > 1 && arg_pattern_len == 0) { php_error_docref(NULL, E_WARNING, "Empty pattern"); RETURN_FALSE; } @@ -1552,12 +1551,12 @@ PHP_FUNCTION(mb_ereg_search_init) option = MBREX(regex_default_options); syntax = MBREX(regex_default_syntax); - if (argc == 3) { + if (ZEND_NUM_ARGS() == 3) { option = 0; _php_mb_regex_init_options(arg_options, arg_options_len, &option, &syntax, NULL); } - if (argc > 1) { + if (ZEND_NUM_ARGS() > 1) { /* create regex pattern buffer */ if ((MBREX(search_re) = php_mbregex_compile_pattern(arg_pattern, arg_pattern_len, option, syntax)) == NULL) { RETURN_FALSE; From 737871341f31c2e7374a009251acf664d0f3aae9 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Thu, 2 Apr 2020 19:41:30 +0200 Subject: [PATCH 016/338] Improve code flow These nested if-else blocks are unnecessary since we return early. --- ext/mbstring/mbstring.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 1a5f512765ea0..35c725f6d3be3 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1663,20 +1663,20 @@ PHP_FUNCTION(mb_preferred_mime_name) if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name, &name_len) == FAILURE) { RETURN_THROWS(); + } + + no_encoding = mbfl_name2no_encoding(name); + if (no_encoding == mbfl_no_encoding_invalid) { + zend_argument_value_error(1, "must be a valid encoding, \"%s\" given", name); + RETURN_THROWS(); + } + + const char *preferred_name = mbfl_no2preferred_mime_name(no_encoding); + if (preferred_name == NULL || *preferred_name == '\0') { + php_error_docref(NULL, E_WARNING, "No MIME preferred name corresponding to \"%s\"", name); + RETVAL_FALSE; } else { - no_encoding = mbfl_name2no_encoding(name); - if (no_encoding == mbfl_no_encoding_invalid) { - zend_argument_value_error(1, "must be a valid encoding, \"%s\" given", name); - RETURN_THROWS(); - } else { - const char *preferred_name = mbfl_no2preferred_mime_name(no_encoding); - if (preferred_name == NULL || *preferred_name == '\0') { - php_error_docref(NULL, E_WARNING, "No MIME preferred name corresponding to \"%s\"", name); - RETVAL_FALSE; - } else { - RETVAL_STRING((char *)preferred_name); - } - } + RETVAL_STRING((char *)preferred_name); } } /* }}} */ From f488b5d0f93447e74e1312e20e84f1c9a8c73016 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Thu, 2 Apr 2020 20:48:09 +0200 Subject: [PATCH 017/338] Merge mb_strstr() variants under a common implementation This reduces heavy ducplicate code --- ext/mbstring/mbstring.c | 161 +++++++++------------------------------- 1 file changed, 37 insertions(+), 124 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 35c725f6d3be3..b9a07b2f55221 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -2165,26 +2165,41 @@ PHP_FUNCTION(mb_strripos) } /* }}} */ -/* {{{ proto string mb_strstr(string haystack, string needle[, bool part[, string encoding]]) - Finds first occurrence of a string within another */ -PHP_FUNCTION(mb_strstr) +#define MB_STRSTR 1 +#define MB_STRRCHR 2 +#define MB_STRISTR 3 +#define MB_STRRICHR 4 +/* {{{ php_mb_strstr_variants */ +static void php_mb_strstr_variants(INTERNAL_FUNCTION_PARAMETERS, unsigned int variant) { + int reverse_mode = 0; size_t n; mbfl_string haystack, needle, result, *ret = NULL; - zend_string *enc_name = NULL; + zend_string *encoding_name = NULL; zend_bool part = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|bS", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &part, &enc_name) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|bS", + (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, + &part, &encoding_name) == FAILURE + ) { RETURN_THROWS(); } haystack.no_language = needle.no_language = MBSTRG(language); - haystack.encoding = needle.encoding = php_mb_get_encoding(enc_name, 4); + haystack.encoding = needle.encoding = php_mb_get_encoding(encoding_name, 4); if (!haystack.encoding) { RETURN_THROWS(); } - n = mbfl_strpos(&haystack, &needle, 0, 0); + if (variant == MB_STRRCHR || variant == MB_STRRICHR) { reverse_mode = 1; } + + if (variant == MB_STRISTR || variant == MB_STRRICHR) { + n = php_mb_stripos(reverse_mode, (char *)haystack.val, haystack.len, (char *)needle.val, + needle.len, 0, needle.encoding); + } else { + n = mbfl_strpos(&haystack, &needle, 0, reverse_mode); + } + if (!mbfl_is_error(n)) { if (part) { ret = mbfl_substr(&haystack, &result, 0, n); @@ -2209,51 +2224,20 @@ PHP_FUNCTION(mb_strstr) RETVAL_FALSE; } } + +/* {{{ proto string mb_strstr(string haystack, string needle[, bool part[, string encoding]]) + Finds first occurrence of a string within another */ +PHP_FUNCTION(mb_strstr) +{ + php_mb_strstr_variants(INTERNAL_FUNCTION_PARAM_PASSTHRU, MB_STRSTR); +} /* }}} */ /* {{{ proto string mb_strrchr(string haystack, string needle[, bool part[, string encoding]]) Finds the last occurrence of a character in a string within another */ PHP_FUNCTION(mb_strrchr) { - size_t n; - mbfl_string haystack, needle, result, *ret = NULL; - zend_string *enc_name = NULL; - zend_bool part = 0; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|bS", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &part, &enc_name) == FAILURE) { - RETURN_THROWS(); - } - - haystack.no_language = needle.no_language = MBSTRG(language); - haystack.encoding = needle.encoding = php_mb_get_encoding(enc_name, 4); - if (!haystack.encoding) { - RETURN_THROWS(); - } - - n = mbfl_strpos(&haystack, &needle, 0, 1); - if (!mbfl_is_error(n)) { - if (part) { - ret = mbfl_substr(&haystack, &result, 0, n); - if (ret != NULL) { - // TODO: avoid reallocation ??? - RETVAL_STRINGL((char *)ret->val, ret->len); - efree(ret->val); - } else { - RETVAL_FALSE; - } - } else { - ret = mbfl_substr(&haystack, &result, n, MBFL_SUBSTR_UNTIL_END); - if (ret != NULL) { - // TODO: avoid reallocation ??? - RETVAL_STRINGL((char *)ret->val, ret->len); - efree(ret->val); - } else { - RETVAL_FALSE; - } - } - } else { - RETVAL_FALSE; - } + php_mb_strstr_variants(INTERNAL_FUNCTION_PARAM_PASSTHRU, MB_STRRCHR); } /* }}} */ @@ -2261,45 +2245,7 @@ PHP_FUNCTION(mb_strrchr) Finds first occurrence of a string within another, case insensitive */ PHP_FUNCTION(mb_stristr) { - zend_bool part = 0; - size_t n; - mbfl_string haystack, needle, result, *ret = NULL; - zend_string *from_encoding = NULL; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|bS", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &part, &from_encoding) == FAILURE) { - RETURN_THROWS(); - } - - haystack.no_language = needle.no_language = MBSTRG(language); - haystack.encoding = needle.encoding = php_mb_get_encoding(from_encoding, 4); - if (!haystack.encoding) { - RETURN_THROWS(); - } - - n = php_mb_stripos(0, (char *)haystack.val, haystack.len, (char *)needle.val, needle.len, 0, needle.encoding); - if (mbfl_is_error(n)) { - RETURN_FALSE; - } - - if (part) { - ret = mbfl_substr(&haystack, &result, 0, n); - if (ret != NULL) { - // TODO: avoid reallocation ??? - RETVAL_STRINGL((char *)ret->val, ret->len); - efree(ret->val); - } else { - RETVAL_FALSE; - } - } else { - ret = mbfl_substr(&haystack, &result, n, MBFL_SUBSTR_UNTIL_END); - if (ret != NULL) { - // TODO: avoid reallocaton ??? - RETVAL_STRINGL((char *)ret->val, ret->len); - efree(ret->val); - } else { - RETVAL_FALSE; - } - } + php_mb_strstr_variants(INTERNAL_FUNCTION_PARAM_PASSTHRU, MB_STRISTR); } /* }}} */ @@ -2307,48 +2253,15 @@ PHP_FUNCTION(mb_stristr) Finds the last occurrence of a character in a string within another, case insensitive */ PHP_FUNCTION(mb_strrichr) { - zend_bool part = 0; - size_t n; - mbfl_string haystack, needle, result, *ret = NULL; - zend_string *from_encoding = NULL; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|bS", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &part, &from_encoding) == FAILURE) { - RETURN_THROWS(); - } - - haystack.no_language = needle.no_language = MBSTRG(language); - haystack.encoding = needle.encoding = php_mb_get_encoding(from_encoding, 4); - if (!haystack.encoding) { - RETURN_THROWS(); - } - - n = php_mb_stripos(1, (char *)haystack.val, haystack.len, (char *)needle.val, needle.len, 0, needle.encoding); - if (mbfl_is_error(n)) { - RETURN_FALSE; - } - - if (part) { - ret = mbfl_substr(&haystack, &result, 0, n); - if (ret != NULL) { - // TODO: avoid reallocation ??? - RETVAL_STRINGL((char *)ret->val, ret->len); - efree(ret->val); - } else { - RETVAL_FALSE; - } - } else { - ret = mbfl_substr(&haystack, &result, n, MBFL_SUBSTR_UNTIL_END); - if (ret != NULL) { - // TODO: avoid reallocation ??? - RETVAL_STRINGL((char *)ret->val, ret->len); - efree(ret->val); - } else { - RETVAL_FALSE; - } - } + php_mb_strstr_variants(INTERNAL_FUNCTION_PARAM_PASSTHRU, MB_STRRICHR); } /* }}} */ +#undef MB_STRSTR +#undef MB_STRRCHR +#undef MB_STRISTR +#undef MB_STRRICHR + /* {{{ proto int mb_substr_count(string haystack, string needle [, string encoding]) Count the number of substring occurrences */ PHP_FUNCTION(mb_substr_count) From d44ee9112fa299cbc1600fe808ebcdf66be89c7c Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Thu, 2 Apr 2020 21:57:38 +0200 Subject: [PATCH 018/338] Promote mb_str_split warning to ValueError Also add a TODO about documenting this funcion on PHP.net Convert some checks to assertions as if they don't hold something went wrong during memory allocation Due to these changes this function cannot return false anymore, fix stubs accordingly --- ext/mbstring/mbstring.c | 18 ++++------ ext/mbstring/mbstring.stub.php | 2 +- ext/mbstring/mbstring_arginfo.h | 2 +- .../tests/mb_str_split_error_conditions.phpt | 33 +++++++++++++++++++ 4 files changed, 42 insertions(+), 13 deletions(-) create mode 100644 ext/mbstring/tests/mb_str_split_error_conditions.phpt diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index b9a07b2f55221..46c09d3e8cfb6 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1862,6 +1862,7 @@ static int mbfl_split_output(int c, void *data) return 0; } +/* TODO Document this function on php.net */ PHP_FUNCTION(mb_str_split) { zend_string *str, *encoding = NULL; @@ -1879,8 +1880,8 @@ PHP_FUNCTION(mb_str_split) ZEND_PARSE_PARAMETERS_END(); if (split_length <= 0) { - php_error_docref(NULL, E_WARNING, "The length of each segment must be greater than zero"); - RETURN_FALSE; + zend_argument_value_error(2, "must be greater than 0"); + RETURN_THROWS(); } /* fill mbfl_string structure */ @@ -1945,10 +1946,8 @@ PHP_FUNCTION(mb_str_split) mbfl_memory_device_output, NULL, &device); - /* if something wrong with the decoded */ - if (decoder == NULL) { - RETURN_FALSE; - } + /* assert that nothing is wrong with the decoder */ + ZEND_ASSERT(decoder != NULL); /* wchar filter */ mbfl_string_init(&result_string); /* mbfl_string to store chunk in the callback */ @@ -1966,11 +1965,8 @@ PHP_FUNCTION(mb_str_split) mbfl_split_output, NULL, ¶ms); - /* if something wrong with the filter */ - if (filter == NULL){ - mbfl_convert_filter_delete(decoder); /* this will free allocated memory for the decoded */ - RETURN_FALSE; - } + /* assert that nothing is wrong with the filter */ + ZEND_ASSERT(filter != NULL); while (p < last - 1) { /* cycle each byte except last with callback function */ (*filter->filter_function)(*p++, filter); diff --git a/ext/mbstring/mbstring.stub.php b/ext/mbstring/mbstring.stub.php index 5598aa8c129c7..6fccd72449922 100644 --- a/ext/mbstring/mbstring.stub.php +++ b/ext/mbstring/mbstring.stub.php @@ -19,7 +19,7 @@ function mb_parse_str(string $encoded_string, &$result): bool {} function mb_output_handler(string $contents, int $status): string {} -function mb_str_split(string $str, int $split_length = 1, string $encoding = UNKNOWN): array|false {} +function mb_str_split(string $str, int $split_length = 1, string $encoding = UNKNOWN): array {} function mb_strlen(string $str, string $encoding = UNKNOWN): int|false {} diff --git a/ext/mbstring/mbstring_arginfo.h b/ext/mbstring/mbstring_arginfo.h index 8d37ae1cbe4a0..69d50f581a74d 100644 --- a/ext/mbstring/mbstring_arginfo.h +++ b/ext/mbstring/mbstring_arginfo.h @@ -36,7 +36,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_output_handler, 0, 2, IS_STRI ZEND_ARG_TYPE_INFO(0, status, IS_LONG, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_str_split, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_str_split, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, split_length, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) diff --git a/ext/mbstring/tests/mb_str_split_error_conditions.phpt b/ext/mbstring/tests/mb_str_split_error_conditions.phpt new file mode 100644 index 0000000000000..77f04aad09cd7 --- /dev/null +++ b/ext/mbstring/tests/mb_str_split_error_conditions.phpt @@ -0,0 +1,33 @@ +--TEST-- +mb_str_split() error conditions +--SKIPIF-- + +--FILE-- +getMessage() . \PHP_EOL; +} +try { + mb_str_split($string, -5); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} + +//Invalid Encoding +try { + mb_str_split($string, 1, "BAD_ENCODING"); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} + +?> +--EXPECT-- +mb_str_split(): Argument #2 ($split_length) must be greater than 0 +mb_str_split(): Argument #2 ($split_length) must be greater than 0 +mb_str_split(): Argument #3 ($encoding) must be a valid encoding, "BAD_ENCODING" given From 165fde9a37a89ebedfb4da32855747e6e70edc18 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Thu, 2 Apr 2020 22:10:02 +0200 Subject: [PATCH 019/338] Convert if branch to assertion in mb_strlen This operation should never fail, therefore it's converted to an assertion. Thus this mb_strlen() can now only return int, fix stubs accordingly --- ext/mbstring/mbstring.c | 9 ++++----- ext/mbstring/mbstring.stub.php | 2 +- ext/mbstring/mbstring_arginfo.h | 9 ++++++--- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 46c09d3e8cfb6..e8fb63e6754cf 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -2019,11 +2019,10 @@ PHP_FUNCTION(mb_strlen) } n = mbfl_strlen(&string); - if (!mbfl_is_error(n)) { - RETVAL_LONG(n); - } else { - RETVAL_FALSE; - } + /* Only way this can fail is if the conversion creation fails + * this would imply some sort of memory allocation failure which is a bug */ + ZEND_ASSERT(!mbfl_is_error(n)); + RETVAL_LONG(n); } /* }}} */ diff --git a/ext/mbstring/mbstring.stub.php b/ext/mbstring/mbstring.stub.php index 6fccd72449922..aa2c7dc0e4b6c 100644 --- a/ext/mbstring/mbstring.stub.php +++ b/ext/mbstring/mbstring.stub.php @@ -21,7 +21,7 @@ function mb_output_handler(string $contents, int $status): string {} function mb_str_split(string $str, int $split_length = 1, string $encoding = UNKNOWN): array {} -function mb_strlen(string $str, string $encoding = UNKNOWN): int|false {} +function mb_strlen(string $str, string $encoding = UNKNOWN): int {} function mb_strpos(string $haystack, string $needle, int $offset = 0, string $encoding = UNKNOWN): int|false {} diff --git a/ext/mbstring/mbstring_arginfo.h b/ext/mbstring/mbstring_arginfo.h index 69d50f581a74d..09e277d37b3a6 100644 --- a/ext/mbstring/mbstring_arginfo.h +++ b/ext/mbstring/mbstring_arginfo.h @@ -42,7 +42,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_str_split, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_strlen, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_strlen, 0, 1, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -93,7 +93,10 @@ ZEND_END_ARG_INFO() #define arginfo_mb_strcut arginfo_mb_substr -#define arginfo_mb_strwidth arginfo_mb_strlen +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_strwidth, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) +ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_strimwidth, 0, 3, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) @@ -195,7 +198,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_scrub, 0, 1, MAY_BE_STRING|MA ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) ZEND_END_ARG_INFO() -#define arginfo_mb_ord arginfo_mb_strlen +#define arginfo_mb_ord arginfo_mb_strwidth ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_chr, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, cp, IS_LONG, 0) From 656046873c9316aae2970fb2997edaafa60478e7 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Thu, 2 Apr 2020 22:38:28 +0200 Subject: [PATCH 020/338] Refactor mb_substr_count() Promote empty needle warning to ValueError Convert if branch into an assertion as if mbfl_substr_count fails this now implies a bug Thus mb_substr_count() can only return int now, fix stubs accordingly --- ext/mbstring/mbstring.c | 21 +++++++++++---------- ext/mbstring/mbstring.stub.php | 2 +- ext/mbstring/mbstring_arginfo.h | 2 +- ext/mbstring/tests/mb_substr_count.phpt | 23 ++++++++++++++++------- 4 files changed, 29 insertions(+), 19 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index e8fb63e6754cf..16452b0a5b6b2 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -2269,23 +2269,24 @@ PHP_FUNCTION(mb_substr_count) RETURN_THROWS(); } + if (needle.len == 0) { + zend_argument_value_error(2, "must not be empty"); + RETURN_THROWS(); + } + haystack.no_language = needle.no_language = MBSTRG(language); haystack.encoding = needle.encoding = php_mb_get_encoding(enc_name, 3); if (!haystack.encoding) { RETURN_THROWS(); } - if (needle.len == 0) { - php_error_docref(NULL, E_WARNING, "Empty substring"); - RETURN_FALSE; - } - n = mbfl_substr_count(&haystack, &needle); - if (!mbfl_is_error(n)) { - RETVAL_LONG(n); - } else { - RETVAL_FALSE; - } + /* An error can only occur if needle is empty, + * an encoding error happens (which should not happen at this stage and is a bug) + * or the haystack is more than sizeof(size_t) bytes + * If one of these things occur this is a bug and should be flagged as such */ + ZEND_ASSERT(!mbfl_is_error(n)); + RETVAL_LONG(n); } /* }}} */ diff --git a/ext/mbstring/mbstring.stub.php b/ext/mbstring/mbstring.stub.php index aa2c7dc0e4b6c..dfc920eb96435 100644 --- a/ext/mbstring/mbstring.stub.php +++ b/ext/mbstring/mbstring.stub.php @@ -39,7 +39,7 @@ function mb_stristr(string $haystack, string $needle, bool $part = false, string function mb_strrichr(string $haystack, string $needle, bool $part = false, string $encoding = UNKNOWN): string|false {} -function mb_substr_count(string $haystack, string $needle, string $encoding = UNKNOWN): int|false {} +function mb_substr_count(string $haystack, string $needle, string $encoding = UNKNOWN): int {} function mb_substr(string $str, int $start, ?int $length = null, string $encoding = UNKNOWN): string|false {} diff --git a/ext/mbstring/mbstring_arginfo.h b/ext/mbstring/mbstring_arginfo.h index 09e277d37b3a6..ea6af386e3426 100644 --- a/ext/mbstring/mbstring_arginfo.h +++ b/ext/mbstring/mbstring_arginfo.h @@ -78,7 +78,7 @@ ZEND_END_ARG_INFO() #define arginfo_mb_strrichr arginfo_mb_strstr -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_substr_count, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_substr_count, 0, 2, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) diff --git a/ext/mbstring/tests/mb_substr_count.phpt b/ext/mbstring/tests/mb_substr_count.phpt index 84571515de9b3..0d2962866fe2b 100644 --- a/ext/mbstring/tests/mb_substr_count.phpt +++ b/ext/mbstring/tests/mb_substr_count.phpt @@ -7,11 +7,20 @@ output_handler= --FILE-- getMessage() . \PHP_EOL; + } + try { + var_dump(mb_substr_count("��", "")); + } catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; + } + + var_dump(mb_substr_count("", "¤¢")); + var_dump(mb_substr_count("", "¤¢")); + var_dump(mb_substr_count("", chr(0))); $a = str_repeat("abcacba", 100); var_dump(@mb_substr_count($a, "bca")); @@ -32,8 +41,8 @@ output_handler= var_dump(@mb_substr_count($a, "bca")); ?> --EXPECT-- -bool(false) -bool(false) +mb_substr_count(): Argument #2 ($needle) must not be empty +mb_substr_count(): Argument #2 ($needle) must not be empty int(0) int(0) int(0) From ee21657a6a2d64e12ba03eae70dd7b7cb2569d82 Mon Sep 17 00:00:00 2001 From: Qianqian Bu Date: Fri, 3 Apr 2020 15:44:41 +0800 Subject: [PATCH 021/338] Fix incorrect free for last_message In commit a7305eb539596e175bd6c3ae9a20953358c5d677 the last_message field of the connection object was changed to be always non-persistent. But there is a place on change_user path that still treats it depending on conn->persistent flag. This will cause PHP crash after com_change_user success when there is last_message set --- ext/mysqlnd/mysqlnd_auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/mysqlnd/mysqlnd_auth.c b/ext/mysqlnd/mysqlnd_auth.c index 30ef6639cac47..2c50c1fdc57ff 100644 --- a/ext/mysqlnd/mysqlnd_auth.c +++ b/ext/mysqlnd/mysqlnd_auth.c @@ -481,7 +481,7 @@ mysqlnd_auth_change_user(MYSQLND_CONN_DATA * const conn, conn->password.s = tmp; if (conn->last_message.s) { - mnd_pefree(conn->last_message.s, conn->persistent); + mnd_efree(conn->last_message.s); conn->last_message.s = NULL; } UPSERT_STATUS_RESET(conn->upsert_status); From e11d3b169000e44a82006b29a611afcf0c5e40b4 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 2 Apr 2020 16:34:05 +0200 Subject: [PATCH 022/338] Move gen_stub.php to build directory and install it so phpize can take care of it, and thus extension can use it as it is already in Makefile --- .gitignore | 4 ++-- build/Makefile.global | 6 +++--- {scripts/dev => build}/gen_stub.php | 0 scripts/Makefile.frag | 1 + scripts/phpize.in | 3 ++- 5 files changed, 8 insertions(+), 6 deletions(-) rename {scripts/dev => build}/gen_stub.php (100%) diff --git a/.gitignore b/.gitignore index af807328f6627..4fd4da9b37b8f 100644 --- a/.gitignore +++ b/.gitignore @@ -80,8 +80,8 @@ include/ libs/ modules/ -# Used by scripts/dev/gen_stub.php -scripts/dev/PHP-Parser-* +# Used by build/gen_stub.php +build/PHP-Parser-* # ------------------------------------------------------------------------------ # Configuration headers generated by the PHP build system diff --git a/build/Makefile.global b/build/Makefile.global index 86cd287610ce1..7774cefb7f201 100644 --- a/build/Makefile.global +++ b/build/Makefile.global @@ -144,12 +144,12 @@ prof-use: # olny php above 7.1.0 supports nullable return type %_arginfo.h: %.stub.php - @if test -e "$(top_srcdir)/scripts/dev/gen_stub.php"; then \ + @if test -e "$(top_srcdir)/build/gen_stub.php"; then \ if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \ - $(PHP_EXECUTABLE) $(top_srcdir)/scripts/dev/gen_stub.php $<; \ + $(PHP_EXECUTABLE) $(top_srcdir)/build/gen_stub.php $<; \ elif type php >/dev/null 2>/dev/null; then \ if test `php -v | head -n1 | cut -d" " -f 2 | sed "s/$$/\n7.0.99/" | sort -rV | head -n1` != "7.0.99"; then \ - php $(top_srcdir)/scripts/dev/gen_stub.php $<; \ + php $(top_srcdir)/build/gen_stub.php $<; \ fi; \ fi; \ fi; diff --git a/scripts/dev/gen_stub.php b/build/gen_stub.php similarity index 100% rename from scripts/dev/gen_stub.php rename to build/gen_stub.php diff --git a/scripts/Makefile.frag b/scripts/Makefile.frag index bfbac62ab3dd3..104983214546f 100644 --- a/scripts/Makefile.frag +++ b/scripts/Makefile.frag @@ -15,6 +15,7 @@ BUILD_FILES = \ build/pkg.m4 \ build/Makefile.global \ build/php.m4 \ + build/gen_stub.php \ run-tests.php BUILD_FILES_EXEC = \ diff --git a/scripts/phpize.in b/scripts/phpize.in index 04864733aef40..7d9c1df14c8ec 100644 --- a/scripts/phpize.in +++ b/scripts/phpize.in @@ -9,7 +9,8 @@ includedir="`eval echo @includedir@`/php" builddir="`pwd`" SED="@SED@" -FILES_BUILD="php.m4 shtool libtool.m4 ax_check_compile_flag.m4 ax_gcc_func_attribute.m4 php_cxx_compile_stdcxx.m4 pkg.m4 config.guess config.sub ltmain.sh Makefile.global" +FILES_BUILD="php.m4 shtool libtool.m4 ax_check_compile_flag.m4 ax_gcc_func_attribute.m4 php_cxx_compile_stdcxx.m4 pkg.m4 \ + config.guess config.sub ltmain.sh Makefile.global gen_stub.php" FILES="run-tests*.php" CLEAN_FILES="$FILES *.o *.lo *.la .libs/ build/ modules/ \ config.nice configure configure.ac \ From 75b01c797eb71398fecb6e75e36b1f33767d3675 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 2 Apr 2020 16:48:43 +0200 Subject: [PATCH 023/338] add some output when generating arginfo --- build/Makefile.global | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/Makefile.global b/build/Makefile.global index 7774cefb7f201..7b5d2a4919146 100644 --- a/build/Makefile.global +++ b/build/Makefile.global @@ -146,9 +146,11 @@ prof-use: %_arginfo.h: %.stub.php @if test -e "$(top_srcdir)/build/gen_stub.php"; then \ if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \ + echo Parse $< to generate $@;\ $(PHP_EXECUTABLE) $(top_srcdir)/build/gen_stub.php $<; \ elif type php >/dev/null 2>/dev/null; then \ if test `php -v | head -n1 | cut -d" " -f 2 | sed "s/$$/\n7.0.99/" | sort -rV | head -n1` != "7.0.99"; then \ + echo Parse $< to generate $@;\ php $(top_srcdir)/build/gen_stub.php $<; \ fi; \ fi; \ From fa3b8c75fb648ad25d09a478fc1f47ae6c31793f Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 1 Apr 2020 14:40:15 +0200 Subject: [PATCH 024/338] Promote unknown encoding throws in encoding array/string list For the string list we emit still emit a warning by comparing arg_num to 0 Closes GH-5337 --- ext/mbstring/mbstring.c | 67 ++++++++++--------- ext/mbstring/tests/bug76704.phpt | 21 +++--- ext/mbstring/tests/bug79149.phpt | 11 +-- ext/mbstring/tests/ini_mbstring_invalid.phpt | 35 ++++++++++ ext/mbstring/tests/mb_detect_encoding.phpt | 13 ++-- ext/mbstring/tests/mb_detect_order.phpt | 50 +++++++++----- .../tests/mb_str_unknown_encoding.phpt | 5 +- 7 files changed, 132 insertions(+), 70 deletions(-) create mode 100644 ext/mbstring/tests/ini_mbstring_invalid.phpt diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 16452b0a5b6b2..74a815c0365a4 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -351,9 +351,10 @@ static const mbfl_encoding *php_mb_get_encoding(zend_string *encoding_name, uint /* {{{ static int php_mb_parse_encoding_list() * Return FAILURE if input contains any illegal encoding, otherwise SUCCESS. + * Emits a ValueError in function context and a warning in INI context, in INI context arg_num must be 0. */ -static int -php_mb_parse_encoding_list(const char *value, size_t value_length, const mbfl_encoding ***return_list, size_t *return_size, int persistent) +static int php_mb_parse_encoding_list(const char *value, size_t value_length, + const mbfl_encoding ***return_list, size_t *return_size, int persistent, uint32_t arg_num) { if (value == NULL || value_length == 0) { *return_list = NULL; @@ -416,15 +417,20 @@ php_mb_parse_encoding_list(const char *value, size_t value_length, const mbfl_en } } else { const mbfl_encoding *encoding = mbfl_name2encoding(p1); - if (encoding) { - *entry++ = encoding; - n++; - } else { - php_error_docref(NULL, E_WARNING, "Unknown encoding \"%s\"", p1); + if (!encoding) { + /* Called from an INI setting modification */ + if (arg_num == 0) { + php_error_docref("ref.mbstring", E_WARNING, "INI setting contains invalid encoding \"%s\"", p1); + } else { + zend_argument_value_error(arg_num, "contains invalid encoding \"%s\"", p1); + } efree(tmpstr); pefree(list, persistent); return FAILURE; } + + *entry++ = encoding; + n++; } p1 = p2 + 1; } while (n < size && p2 != NULL); @@ -439,9 +445,10 @@ php_mb_parse_encoding_list(const char *value, size_t value_length, const mbfl_en /* {{{ static int php_mb_parse_encoding_array() * Return FAILURE if input contains any illegal encoding, otherwise SUCCESS. + * Emits a ValueError in function context and a warning in INI context, in INI context arg_num must be 0. */ -static int -php_mb_parse_encoding_array(HashTable *target_hash, const mbfl_encoding ***return_list, size_t *return_size) +static int php_mb_parse_encoding_array(HashTable *target_hash, const mbfl_encoding ***return_list, + size_t *return_size, uint32_t arg_num) { /* Allocate enough space to include the default detect order if "auto" is used. */ size_t size = zend_hash_num_elements(target_hash) + MBSTRG(default_detect_order_list_size); @@ -475,8 +482,7 @@ php_mb_parse_encoding_array(HashTable *target_hash, const mbfl_encoding ***retur *entry++ = encoding; n++; } else { - php_error_docref(NULL, E_WARNING, - "Unknown encoding \"%s\"", ZSTR_VAL(encoding_str)); + zend_argument_value_error(arg_num, "contains invalid encoding \"%s\"", ZSTR_VAL(encoding_str)); zend_string_release(encoding_str); efree(list); return FAILURE; @@ -576,7 +582,7 @@ static size_t php_mb_zend_encoding_converter(unsigned char **to, size_t *to_leng static int php_mb_zend_encoding_list_parser(const char *encoding_list, size_t encoding_list_len, const zend_encoding ***return_list, size_t *return_size, int persistent) { - return php_mb_parse_encoding_list(encoding_list, encoding_list_len, (const mbfl_encoding ***)return_list, return_size, persistent); + return php_mb_parse_encoding_list(encoding_list, encoding_list_len, (const mbfl_encoding ***)return_list, return_size, persistent, 0); } static const zend_encoding *php_mb_zend_internal_encoding_getter(void) @@ -869,7 +875,7 @@ static PHP_INI_MH(OnUpdate_mbstring_detect_order) return SUCCESS; } - if (FAILURE == php_mb_parse_encoding_list(ZSTR_VAL(new_value), ZSTR_LEN(new_value), &list, &size, 1) || size == 0) { + if (FAILURE == php_mb_parse_encoding_list(ZSTR_VAL(new_value), ZSTR_LEN(new_value), &list, &size, 1, 0) || size == 0) { return FAILURE; } @@ -885,7 +891,7 @@ static PHP_INI_MH(OnUpdate_mbstring_detect_order) static int _php_mb_ini_mbstring_http_input_set(const char *new_value, size_t new_value_length) { const mbfl_encoding **list; size_t size; - if (FAILURE == php_mb_parse_encoding_list(new_value, new_value_length, &list, &size, 1) || size == 0) { + if (FAILURE == php_mb_parse_encoding_list(new_value, new_value_length, &list, &size, 1, 0) || size == 0) { return FAILURE; } if (MBSTRG(http_input_list)) { @@ -1551,12 +1557,12 @@ PHP_FUNCTION(mb_detect_order) const mbfl_encoding **list; size_t size; if (order_ht) { - if (FAILURE == php_mb_parse_encoding_array(order_ht, &list, &size)) { - RETURN_FALSE; + if (FAILURE == php_mb_parse_encoding_array(order_ht, &list, &size, 1)) { + RETURN_THROWS(); } } else { - if (FAILURE == php_mb_parse_encoding_list(ZSTR_VAL(order_str), ZSTR_LEN(order_str), &list, &size, 0)) { - RETURN_FALSE; + if (FAILURE == php_mb_parse_encoding_list(ZSTR_VAL(order_str), ZSTR_LEN(order_str), &list, &size, 0, 1)) { + RETURN_THROWS(); } } @@ -2699,13 +2705,14 @@ PHP_FUNCTION(mb_convert_encoding) } if (from_encodings_ht) { - if (php_mb_parse_encoding_array(from_encodings_ht, &from_encodings, &num_from_encodings) == FAILURE) { - RETURN_FALSE; + if (php_mb_parse_encoding_array(from_encodings_ht, &from_encodings, &num_from_encodings, 3) == FAILURE) { + RETURN_THROWS(); } free_from_encodings = 1; } else if (from_encodings_str) { - if (php_mb_parse_encoding_list(ZSTR_VAL(from_encodings_str), ZSTR_LEN(from_encodings_str), &from_encodings, &num_from_encodings, 0) == FAILURE) { - RETURN_FALSE; + if (php_mb_parse_encoding_list(ZSTR_VAL(from_encodings_str), ZSTR_LEN(from_encodings_str), + &from_encodings, &num_from_encodings, 0, 3) == FAILURE) { + RETURN_THROWS(); } free_from_encodings = 1; } else { @@ -2885,13 +2892,13 @@ PHP_FUNCTION(mb_detect_encoding) /* make encoding list */ if (encoding_ht) { - if (FAILURE == php_mb_parse_encoding_array(encoding_ht, &elist, &size)) { - RETURN_FALSE; + if (FAILURE == php_mb_parse_encoding_array(encoding_ht, &elist, &size, 2)) { + RETURN_THROWS(); } free_elist = 1; } else if (encoding_str) { - if (FAILURE == php_mb_parse_encoding_list(ZSTR_VAL(encoding_str), ZSTR_LEN(encoding_str), &elist, &size, 0)) { - RETURN_FALSE; + if (FAILURE == php_mb_parse_encoding_list(ZSTR_VAL(encoding_str), ZSTR_LEN(encoding_str), &elist, &size, 0, 2)) { + RETURN_THROWS(); } free_elist = 1; } else { @@ -3285,12 +3292,12 @@ PHP_FUNCTION(mb_convert_variables) /* pre-conversion encoding */ if (from_enc_ht) { - if (php_mb_parse_encoding_array(from_enc_ht, &elist, &elistsz) == FAILURE) { - RETURN_FALSE; + if (php_mb_parse_encoding_array(from_enc_ht, &elist, &elistsz, 2) == FAILURE) { + RETURN_THROWS(); } } else { - if (php_mb_parse_encoding_list(ZSTR_VAL(from_enc_str), ZSTR_LEN(from_enc_str), &elist, &elistsz, 0) == FAILURE) { - RETURN_FALSE; + if (php_mb_parse_encoding_list(ZSTR_VAL(from_enc_str), ZSTR_LEN(from_enc_str), &elist, &elistsz, 0, 2) == FAILURE) { + RETURN_THROWS(); } } diff --git a/ext/mbstring/tests/bug76704.phpt b/ext/mbstring/tests/bug76704.phpt index b34d56d061064..5a58f9ff20276 100644 --- a/ext/mbstring/tests/bug76704.phpt +++ b/ext/mbstring/tests/bug76704.phpt @@ -6,12 +6,17 @@ if (!extension_loaded('mbstring')) die('skip mbstring extension not available'); ?> --FILE-- getMessage() . \PHP_EOL; +} +try { + var_dump(mb_detect_order(['Foo', 'UTF-8'])); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} ?> ---EXPECTF-- -Warning: mb_detect_order(): Unknown encoding "Foo" in %s on line %d -bool(false) - -Warning: mb_detect_order(): Unknown encoding "Foo" in %s on line %d -bool(false) +--EXPECT-- +mb_detect_order(): Argument #1 ($encoding) contains invalid encoding "Foo" +mb_detect_order(): Argument #1 ($encoding) contains invalid encoding "Foo" diff --git a/ext/mbstring/tests/bug79149.phpt b/ext/mbstring/tests/bug79149.phpt index 9d991718e1324..c057ed0ad7d0f 100644 --- a/ext/mbstring/tests/bug79149.phpt +++ b/ext/mbstring/tests/bug79149.phpt @@ -24,13 +24,8 @@ try { ?> --EXPECTF-- -Warning: mb_convert_encoding(): Unknown encoding "0" in %s on line %d -bool(false) +mb_convert_encoding(): Argument #3 ($from) contains invalid encoding "0" Warning: Array to string conversion in %s on line %d - -Warning: mb_convert_encoding(): Unknown encoding "Array" in %s on line %d -bool(false) - -Warning: mb_convert_encoding(): Unknown encoding "foo" in %s on line %d -bool(false) +mb_convert_encoding(): Argument #3 ($from) contains invalid encoding "Array" +mb_convert_encoding(): Argument #3 ($from) contains invalid encoding "foo" diff --git a/ext/mbstring/tests/ini_mbstring_invalid.phpt b/ext/mbstring/tests/ini_mbstring_invalid.phpt new file mode 100644 index 0000000000000..57f2404fc7efa --- /dev/null +++ b/ext/mbstring/tests/ini_mbstring_invalid.phpt @@ -0,0 +1,35 @@ +--TEST-- +Invalid values for MBString INI settings +--SKIPIF-- + +--INI-- +mbstring.language=UNKNOWN_LANGUAGE +mbstring.internal_encoding=UNKNOWN_ENCODING +mbstring.detect_order=UTF-8,DETECT_ORDER,ASCII +mbstring.http_input=UTF-8,HTTP_INPUT,ASCII +mbstring.http_output=HTTP_OUTPUT +mbstring.http_output_conv_mimetypes=UNKNOWN_MIME_TYPE_OUTPUT +mbstring.substitute_character=U+3000,NON_EXISTING_CHARACTER,JIS+7E7E +mbstring.func_overload=BOOL_OVERLOAD +mbstring.encoding_translation=BOOL_TRANSLATION +mbstring.strict_detection=BOOL_STRICT_DETECTION +--FILE-- + +--EXPECT-- +PHP Warning: PHP Startup: INI setting contains invalid encoding "DETECT_ORDER" in Unknown on line 0 +PHP Deprecated: PHP Startup: Use of mbstring.http_input is deprecated in Unknown on line 0 +PHP Warning: PHP Startup: INI setting contains invalid encoding "HTTP_INPUT" in Unknown on line 0 +PHP Deprecated: PHP Startup: Use of mbstring.http_output is deprecated in Unknown on line 0 +PHP Deprecated: PHP Startup: Use of mbstring.internal_encoding is deprecated in Unknown on line 0 + +Warning: PHP Startup: INI setting contains invalid encoding "DETECT_ORDER" in Unknown on line 0 + +Deprecated: PHP Startup: Use of mbstring.http_input is deprecated in Unknown on line 0 + +Warning: PHP Startup: INI setting contains invalid encoding "HTTP_INPUT" in Unknown on line 0 + +Deprecated: PHP Startup: Use of mbstring.http_output is deprecated in Unknown on line 0 + +Deprecated: PHP Startup: Use of mbstring.internal_encoding is deprecated in Unknown on line 0 diff --git a/ext/mbstring/tests/mb_detect_encoding.phpt b/ext/mbstring/tests/mb_detect_encoding.phpt index b1780a3011902..22f64fcfa56e0 100644 --- a/ext/mbstring/tests/mb_detect_encoding.phpt +++ b/ext/mbstring/tests/mb_detect_encoding.phpt @@ -84,11 +84,14 @@ $s = mb_detect_encoding('', 'EUC-JP'); print("EUC-JP: $s\n"); // SJIS $s = $euc_jp; -$s = mb_detect_encoding($s, 'BAD'); -print("BAD: $s\n"); // BAD +try { + var_dump(mb_detect_encoding($s, 'BAD')); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} ?> ---EXPECTF-- +--EXPECT-- == BASIC TEST == SJIS: SJIS JIS: JIS @@ -105,6 +108,4 @@ SJIS: SJIS == INVALID PARAMETER == INT: EUC-JP EUC-JP: EUC-JP - -Warning: mb_detect_encoding(): Unknown encoding "BAD" in %s on line %d -BAD: +mb_detect_encoding(): Argument #2 ($encoding_list) contains invalid encoding "BAD" diff --git a/ext/mbstring/tests/mb_detect_order.phpt b/ext/mbstring/tests/mb_detect_order.phpt index 8356b8376f8f3..94f7fadfda8a9 100644 --- a/ext/mbstring/tests/mb_detect_order.phpt +++ b/ext/mbstring/tests/mb_detect_order.phpt @@ -35,17 +35,23 @@ print implode(', ', mb_detect_order()) . "\n"; // Set invalid encoding. Should fail. print "== INVALID PARAMETER ==\n"; -$r = mb_detect_order('BAD_NAME'); -($r === FALSE) ? print "OK_BAD_STR\n" : print "NG_BAD_STR\n"; -print implode(', ', mb_detect_order()) . "\n"; +try { + var_dump(mb_detect_order('BAD_NAME')); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} +var_dump(mb_detect_order()); $a[] = 'BAD_NAME'; -$r = mb_detect_order($a); -($r === FALSE) ? print "OK_BAD_ARRAY\n" : print "NG_BAD_ARRAY\n"; -print implode(', ', mb_detect_order()) . "\n"; +try { + var_dump(mb_detect_order($a)); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} +var_dump(mb_detect_order()); ?> ---EXPECTF-- +--EXPECT-- OK_AUTO ASCII, JIS, UTF-8, EUC-JP, SJIS OK_STR @@ -53,11 +59,25 @@ SJIS, EUC-JP, JIS, UTF-8 OK_ARRAY ASCII, JIS, EUC-JP, UTF-8 == INVALID PARAMETER == - -Warning: mb_detect_order(): Unknown encoding "BAD_NAME" in %s on line %d -OK_BAD_STR -ASCII, JIS, EUC-JP, UTF-8 - -Warning: mb_detect_order(): Unknown encoding "BAD_NAME" in %s on line %d -OK_BAD_ARRAY -ASCII, JIS, EUC-JP, UTF-8 +mb_detect_order(): Argument #1 ($encoding) contains invalid encoding "BAD_NAME" +array(4) { + [0]=> + string(5) "ASCII" + [1]=> + string(3) "JIS" + [2]=> + string(6) "EUC-JP" + [3]=> + string(5) "UTF-8" +} +mb_detect_order(): Argument #1 ($encoding) contains invalid encoding "BAD_NAME" +array(4) { + [0]=> + string(5) "ASCII" + [1]=> + string(3) "JIS" + [2]=> + string(6) "EUC-JP" + [3]=> + string(5) "UTF-8" +} diff --git a/ext/mbstring/tests/mb_str_unknown_encoding.phpt b/ext/mbstring/tests/mb_str_unknown_encoding.phpt index e1c4069826761..5c07c3521cfe1 100644 --- a/ext/mbstring/tests/mb_str_unknown_encoding.phpt +++ b/ext/mbstring/tests/mb_str_unknown_encoding.phpt @@ -141,11 +141,10 @@ try { } ?> ---EXPECTF-- +--EXPECT-- mb_chr(): Argument #2 ($encoding) must be a valid encoding, "UTF-0" given mb_convert_case(): Argument #3 ($encoding) must be a valid encoding, "UTF-0" given - -Warning: mb_convert_encoding(): Unknown encoding "UTF-0" in %s on line %d +mb_convert_encoding(): Argument #3 ($from) contains invalid encoding "UTF-0" mb_convert_kana(): Argument #3 ($encoding) must be a valid encoding, "UTF-0" given mb_decode_numericentity(): Argument #3 ($encoding) must be a valid encoding, "UTF-0" given mb_ord(): Argument #2 ($encoding) must be a valid encoding, "UTF-0" given From 17d4e66204466cb5e3c0eb32aa18b8dbd9774ce3 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 3 Apr 2020 14:11:04 +0200 Subject: [PATCH 025/338] Fix #68690: Hypothetical off-by-one condition We fix this, even though `filter->cache == jisx0213_u2_tbl_len` can never be true here. --- ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c index 481ae557cc004..8079c926e36fd 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c @@ -508,7 +508,7 @@ mbfl_filt_conv_wchar_jis2004(int c, mbfl_convert_filter *filter) { /* check for 2nd char of combining characters */ if ((filter->status & 0xf) == 1 && - filter->cache >= 0 && filter->cache <= jisx0213_u2_tbl_len) { + filter->cache >= 0 && filter->cache < jisx0213_u2_tbl_len) { k = filter->cache; filter->status &= ~0xf; filter->cache = 0; From 305b17e85f3bb4836fd08f22c3a19c386478cdf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sun, 29 Mar 2020 20:24:16 +0200 Subject: [PATCH 026/338] Do not include the same stub multiple times Closes GH-5322 --- Zend/zend_builtin_functions_arginfo.h | 2 +- ext/curl/curl_file.c | 1 - ext/curl/curl_file.stub.php | 3 +- ext/dom/attr.c | 2 +- ext/dom/attr.stub.php | 9 + ext/dom/attr_arginfo.h | 9 + ext/dom/cdatasection.c | 2 +- ext/dom/cdatasection.stub.php | 6 + ext/dom/cdatasection_arginfo.h | 5 + ext/dom/characterdata.c | 10 +- ext/dom/characterdata.stub.php | 30 + ext/dom/characterdata_arginfo.h | 34 + ext/dom/comment.c | 2 +- ext/dom/comment.stub.php | 6 + ext/dom/comment_arginfo.h | 5 + ext/dom/document.c | 6 +- ext/dom/document.stub.php | 109 +++ ext/dom/document_arginfo.h | 154 ++++ ext/dom/documentfragment.c | 6 +- ext/dom/documentfragment.stub.php | 15 + ext/dom/documentfragment_arginfo.h | 14 + ext/dom/dom.stub.php | 348 -------- ext/dom/dom_arginfo.h | 407 --------- ext/dom/domimplementation.c | 2 +- ext/dom/domimplementation.stub.php | 16 + ext/dom/domimplementation_arginfo.h | 20 + ext/dom/element.c | 14 +- ext/dom/element.stub.php | 77 ++ ext/dom/element_arginfo.h | 85 ++ ext/dom/entityreference.c | 2 +- ext/dom/entityreference.stub.php | 6 + ext/dom/entityreference_arginfo.h | 5 + ext/dom/namednodemap.c | 2 +- ext/dom/namednodemap.stub.php | 16 + ext/dom/namednodemap_arginfo.h | 17 + ext/dom/node.c | 2 +- ext/dom/node.stub.php | 69 ++ ext/dom/node_arginfo.h | 79 ++ ext/dom/nodelist.c | 3 +- ext/dom/nodelist.stub.php | 10 + ext/dom/nodelist_arginfo.h | 8 + ext/dom/parentnode.c | 3 +- ext/dom/parentnode.stub.php | 10 + ext/dom/parentnode_arginfo.h | 7 + ext/dom/processinginstruction.c | 2 +- ext/dom/processinginstruction.stub.php | 6 + ext/dom/processinginstruction_arginfo.h | 6 + ext/dom/text.c | 2 +- ext/dom/text.stub.php | 14 + ext/dom/text_arginfo.h | 14 + ext/dom/xpath.c | 2 +- ext/dom/xpath.stub.php | 20 + ext/dom/xpath_arginfo.h | 33 + ext/intl/calendar/calendar.stub.php | 105 --- ext/intl/calendar/calendar_arginfo.h | 198 ----- ext/intl/collator/collator.stub.php | 26 - ext/intl/collator/collator_arginfo.h | 61 -- .../collator/collator_functions_arginfo.h | 62 ++ ext/intl/common/common.stub.php | 8 - ext/intl/common/common_arginfo.h | 14 - ext/intl/dateformat/dateformat.stub.php | 51 -- ext/intl/dateformat/dateformat_arginfo.h | 91 -- ext/intl/formatter/formatter.stub.php | 33 - ext/intl/formatter/formatter_arginfo.h | 80 -- .../formatter/formatter_functions_arginfo.h | 81 ++ ext/intl/grapheme/grapheme.stub.php | 19 - ext/intl/grapheme/grapheme_arginfo.h | 39 - ext/intl/idn/idn.stub.php | 5 - ext/intl/idn/idn_arginfo.h | 10 - ext/intl/locale/locale.stub.php | 36 - ext/intl/locale/locale_arginfo.h | 61 -- ext/intl/msgformat/msgformat.stub.php | 20 - ext/intl/msgformat/msgformat_arginfo.h | 46 -- ext/intl/normalizer/normalizer.stub.php | 8 - ext/intl/normalizer/normalizer_arginfo.h | 17 - ext/intl/php_intl.c | 14 +- ext/intl/php_intl.stub.php | 422 ++++++++++ ext/intl/php_intl_arginfo.h | 775 ++++++++++++++++++ .../resourcebundle/resourcebundle.stub.php | 16 - .../resourcebundle/resourcebundle_arginfo.h | 25 - ext/intl/timezone/timezone.stub.php | 54 -- ext/intl/timezone/timezone_arginfo.h | 101 --- .../transliterator/transliterator.stub.php | 15 - .../transliterator/transliterator_arginfo.h | 32 - ext/mysqli/mysqli.stub.php | 8 - ext/mysqli/mysqli_arginfo.h | 6 - ext/mysqli/mysqli_warning.c | 2 +- ext/mysqli/mysqli_warning.stub.php | 9 + ext/mysqli/mysqli_warning_arginfo.h | 8 + ext/pdo/pdo.stub.php | 130 --- ext/pdo/pdo_arginfo.h | 126 --- ext/pdo/pdo_dbh.c | 2 +- ext/pdo/pdo_dbh.stub.php | 51 ++ ext/pdo/pdo_dbh_arginfo.h | 52 ++ ext/pdo/pdo_stmt.c | 2 +- ext/pdo/pdo_stmt.stub.php | 77 ++ ext/pdo/pdo_stmt_arginfo.h | 82 ++ ext/standard/basic_functions.stub.php | 35 - ext/standard/basic_functions_arginfo.h | 19 - ext/standard/dir.c | 2 +- ext/standard/dir.stub.php | 22 + ext/standard/dir_arginfo.h | 9 + ext/standard/user_filters.c | 2 +- ext/standard/user_filters.stub.php | 12 + ext/standard/user_filters_arginfo.h | 13 + 105 files changed, 2628 insertions(+), 2303 deletions(-) create mode 100644 ext/dom/attr.stub.php create mode 100644 ext/dom/attr_arginfo.h create mode 100644 ext/dom/cdatasection.stub.php create mode 100644 ext/dom/cdatasection_arginfo.h create mode 100644 ext/dom/characterdata.stub.php create mode 100644 ext/dom/characterdata_arginfo.h create mode 100644 ext/dom/comment.stub.php create mode 100644 ext/dom/comment_arginfo.h create mode 100644 ext/dom/document.stub.php create mode 100644 ext/dom/document_arginfo.h create mode 100644 ext/dom/documentfragment.stub.php create mode 100644 ext/dom/documentfragment_arginfo.h create mode 100644 ext/dom/domimplementation.stub.php create mode 100644 ext/dom/domimplementation_arginfo.h create mode 100644 ext/dom/element.stub.php create mode 100644 ext/dom/element_arginfo.h create mode 100644 ext/dom/entityreference.stub.php create mode 100644 ext/dom/entityreference_arginfo.h create mode 100644 ext/dom/namednodemap.stub.php create mode 100644 ext/dom/namednodemap_arginfo.h create mode 100644 ext/dom/node.stub.php create mode 100644 ext/dom/node_arginfo.h create mode 100644 ext/dom/nodelist.stub.php create mode 100644 ext/dom/nodelist_arginfo.h create mode 100644 ext/dom/parentnode.stub.php create mode 100644 ext/dom/parentnode_arginfo.h create mode 100644 ext/dom/processinginstruction.stub.php create mode 100644 ext/dom/processinginstruction_arginfo.h create mode 100644 ext/dom/text.stub.php create mode 100644 ext/dom/text_arginfo.h create mode 100644 ext/dom/xpath.stub.php create mode 100644 ext/dom/xpath_arginfo.h create mode 100644 ext/intl/collator/collator_functions_arginfo.h create mode 100644 ext/intl/formatter/formatter_functions_arginfo.h delete mode 100644 ext/intl/grapheme/grapheme.stub.php delete mode 100644 ext/intl/grapheme/grapheme_arginfo.h delete mode 100644 ext/intl/idn/idn.stub.php delete mode 100644 ext/intl/idn/idn_arginfo.h create mode 100644 ext/intl/php_intl.stub.php create mode 100644 ext/intl/php_intl_arginfo.h create mode 100644 ext/mysqli/mysqli_warning.stub.php create mode 100644 ext/mysqli/mysqli_warning_arginfo.h create mode 100644 ext/pdo/pdo_dbh.stub.php create mode 100644 ext/pdo/pdo_dbh_arginfo.h create mode 100644 ext/pdo/pdo_stmt.stub.php create mode 100644 ext/pdo/pdo_stmt_arginfo.h create mode 100755 ext/standard/dir.stub.php create mode 100644 ext/standard/dir_arginfo.h create mode 100755 ext/standard/user_filters.stub.php create mode 100644 ext/standard/user_filters_arginfo.h diff --git a/Zend/zend_builtin_functions_arginfo.h b/Zend/zend_builtin_functions_arginfo.h index 1dd9b6f712c53..78393d28ecff7 100644 --- a/Zend/zend_builtin_functions_arginfo.h +++ b/Zend/zend_builtin_functions_arginfo.h @@ -32,7 +32,7 @@ ZEND_END_ARG_INFO() #define arginfo_strncasecmp arginfo_strncmp -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_error_reporting, 0, 0, IS_LONG, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_error_reporting, 0, 0, IS_LONG, 0) ZEND_ARG_INFO(0, new_error_level) ZEND_END_ARG_INFO() diff --git a/ext/curl/curl_file.c b/ext/curl/curl_file.c index d08d77fb516b7..e034babd0fead 100644 --- a/ext/curl/curl_file.c +++ b/ext/curl/curl_file.c @@ -22,7 +22,6 @@ #include "Zend/zend_exceptions.h" #include "Zend/zend_interfaces.h" #include "php_curl.h" -#include "curl_arginfo.h" #include "curl_file_arginfo.h" #if HAVE_CURL diff --git a/ext/curl/curl_file.stub.php b/ext/curl/curl_file.stub.php index e6e21f9a02f1d..e1b289bd975aa 100644 --- a/ext/curl/curl_file.stub.php +++ b/ext/curl/curl_file.stub.php @@ -1,6 +1,7 @@ #ifdef LIBXML_SCHEMAS_ENABLED #include @@ -82,8 +82,8 @@ const zend_function_entry php_dom_document_class_functions[] = { /* {{{ */ PHP_ME(domdocument, relaxNGValidateSource, arginfo_class_DOMDocument_relaxNGValidateSource, ZEND_ACC_PUBLIC) #endif PHP_ME(domdocument, registerNodeClass, arginfo_class_DOMDocument_registerNodeClass, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, append, arginfo_class_DOMParentNode_append, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, prepend, arginfo_class_DOMParentNode_prepend, ZEND_ACC_PUBLIC) + PHP_ME(domdocument, append, arginfo_class_DOMDocument_append, ZEND_ACC_PUBLIC) + PHP_ME(domdocument, prepend, arginfo_class_DOMDocument_prepend, ZEND_ACC_PUBLIC) PHP_FE_END }; /* }}} */ diff --git a/ext/dom/document.stub.php b/ext/dom/document.stub.php new file mode 100644 index 0000000000000..02c10c5f7ab85 --- /dev/null +++ b/ext/dom/document.stub.php @@ -0,0 +1,109 @@ += 56 -function normalizer_get_raw_decomposition(string $input, int $form = Normalizer::FORM_C): ?string {} -#endif diff --git a/ext/intl/normalizer/normalizer_arginfo.h b/ext/intl/normalizer/normalizer_arginfo.h index 858b2fe12d667..9f2a12f97b7d3 100644 --- a/ext/intl/normalizer/normalizer_arginfo.h +++ b/ext/intl/normalizer/normalizer_arginfo.h @@ -13,20 +13,3 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Normalizer_getRawDecomposition, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, form, IS_LONG, 0) ZEND_END_ARG_INFO() #endif - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_normalizer_normalize, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, form, IS_LONG, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_normalizer_is_normalized, 0, 1, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, form, IS_LONG, 0) -ZEND_END_ARG_INFO() - -#if U_ICU_VERSION_MAJOR_NUM >= 56 -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_normalizer_get_raw_decomposition, 0, 1, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, form, IS_LONG, 0) -ZEND_END_ARG_INFO() -#endif diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.c index dd655e0e03d54..2997f453e7d1b 100644 --- a/ext/intl/php_intl.c +++ b/ext/intl/php_intl.c @@ -21,6 +21,7 @@ #include "php_intl.h" +#include "php_intl_arginfo.h" #include "intl_error.h" #include "collator/collator_class.h" #include "collator/collator.h" @@ -31,7 +32,6 @@ #include "collator/collator_locale.h" #include "collator/collator_create.h" #include "collator/collator_error.h" -#include "collator/collator_arginfo.h" #include "converter/converter.h" @@ -41,10 +41,8 @@ #include "formatter/formatter_format.h" #include "formatter/formatter_main.h" #include "formatter/formatter_parse.h" -#include "formatter/formatter_arginfo.h" #include "grapheme/grapheme.h" -#include "grapheme/grapheme_arginfo.h" #include "msgformat/msgformat.h" #include "msgformat/msgformat_class.h" @@ -55,12 +53,10 @@ #include "normalizer/normalizer.h" #include "normalizer/normalizer_class.h" #include "normalizer/normalizer_normalize.h" -#include "normalizer/normalizer_arginfo.h" #include "locale/locale.h" #include "locale/locale_class.h" #include "locale/locale_methods.h" -#include "locale/locale_arginfo.h" #include "dateformat/dateformat.h" #include "dateformat/dateformat_class.h" @@ -70,30 +66,24 @@ #include "dateformat/dateformat_format_object.h" #include "dateformat/dateformat_parse.h" #include "dateformat/dateformat_data.h" -#include "dateformat/dateformat_arginfo.h" #include "resourcebundle/resourcebundle_class.h" -#include "resourcebundle/resourcebundle_arginfo.h" #include "transliterator/transliterator.h" #include "transliterator/transliterator_class.h" #include "transliterator/transliterator_methods.h" -#include "transliterator/transliterator_arginfo.h" #include "timezone/timezone_class.h" #include "timezone/timezone_methods.h" -#include "timezone/timezone_arginfo.h" #include "calendar/calendar_class.h" #include "calendar/calendar_methods.h" #include "calendar/gregoriancalendar_methods.h" -#include "calendar/calendar_arginfo.h" #include "breakiterator/breakiterator_class.h" #include "breakiterator/breakiterator_iterators.h" #include "idn/idn.h" -#include "idn/idn_arginfo.h" #include "uchar/uchar.h" # include "spoofchecker/spoofchecker_class.h" @@ -102,10 +92,8 @@ # include "spoofchecker/spoofchecker_main.h" #include "msgformat/msgformat.h" -#include "msgformat/msgformat_arginfo.h" #include "common/common_error.h" #include "common/common_enum.h" -#include "common/common_arginfo.h" #include #include diff --git a/ext/intl/php_intl.stub.php b/ext/intl/php_intl.stub.php new file mode 100644 index 0000000000000..dbe905dbeff88 --- /dev/null +++ b/ext/intl/php_intl.stub.php @@ -0,0 +1,422 @@ += 56 +function normalizer_get_raw_decomposition(string $input, int $form = Normalizer::FORM_C): ?string {} +#endif + +/* resourceboundle */ + +function resourcebundle_create(?string $locale, ?string $bundlename, bool $fallback = true): ?ResourceBundle {} + +/** + * @param string|int $index + * @return mixed + */ +function resourcebundle_get(ResourceBundle $bundle, $index) {} + +function resourcebundle_count(ResourceBundle $bundle): int {} + +function resourcebundle_locales(string $bundlename): array|false {} + +function resourcebundle_get_error_code(ResourceBundle $bundle): int {} + +function resourcebundle_get_error_message(ResourceBundle $bundle): string {} + +/* timezone */ + +function intltz_count_equivalent_ids(string $zoneId): int|false {} + +function intltz_create_default(): IntlTimeZone {} + +/** + * @param IntlTimeZone|string|int|double|null $countryOrRawOffset + * @return IntlIterator|false + */ +function intltz_create_enumeration($countryOrRawOffset = null) {} + +function intltz_create_time_zone(string $zoneId): ?IntlTimeZone {} + +function intltz_create_time_zone_id_enumeration(int $zoneType, ?string $region = null, ?int $rawOffset = null): IntlIterator|false {} + +function intltz_from_date_time_zone(DateTimeZone $zone): ?IntlTimeZone {} + +function intltz_get_canonical_id(string $zoneId, &$isSystemID = null): string|false {} + +function intltz_get_display_name(IntlTimeZone $tz, bool $isDaylight = false, int $style = IntlTimeZone::DISPLAY_LONG, ?string $locale = null): string|false {} + +function intltz_get_dst_savings(IntlTimeZone $tz): int {} + +function intltz_get_equivalent_id(string $zoneId, int $index): string|false {} + +function intltz_get_error_code(IntlTimeZone $tz): int|false {} + +function intltz_get_error_message(IntlTimeZone $tz): string|false {} + +function intltz_get_gmt(): IntlTimeZone {} + +function intltz_get_id(IntlTimeZone $tz): string|false {} + +function intltz_get_offset(IntlTimeZone $tz, float $date, bool $local, &$rawOffset, &$dstOffset): bool {} + +function intltz_get_raw_offset(IntlTimeZone $tz): int {} + +function intltz_get_region(string $zoneId): string|false {} + +function intltz_get_tz_data_version(): string|false {} + +function intltz_get_unknown(): IntlTimeZone {} + +#if U_ICU_VERSION_MAJOR_NUM >= 52 +function intltz_get_windows_id(string $timezone): string|false {} + +function intltz_get_id_for_windows_id(string $timezone, string $region = UNKNOWN): string|false {} +#endif + +function intltz_has_same_rules(IntlTimeZone $tz, IntlTimeZone $otherTimeZone): bool {} + +function intltz_to_date_time_zone(IntlTimeZone $tz): DateTimeZone|false {} + +function intltz_use_daylight_time(IntlTimeZone $tz): bool {} + +/* transliterator */ + +function transliterator_create(string $id, int $direction = Transliterator::FORWARD): ?Transliterator {} + +function transliterator_create_from_rules(string $rules, int $direction = Transliterator::FORWARD): ?Transliterator {} + +function transliterator_list_ids(): array|false {} + +function transliterator_create_inverse(Transliterator $orig_trans): ?Transliterator {} + +/** @param Transliterator|string */ +function transliterator_transliterate($transliterator, string $subject, int $start = 0, int $end = -1): string|false {} + +function transliterator_get_error_code(Transliterator $trans): int|false {} + +function transliterator_get_error_message(Transliterator $trans): string|false {} diff --git a/ext/intl/php_intl_arginfo.h b/ext/intl/php_intl_arginfo.h new file mode 100644 index 0000000000000..c391ef2232da7 --- /dev/null +++ b/ext/intl/php_intl_arginfo.h @@ -0,0 +1,775 @@ +/* This is a generated file, edit the .stub.php file instead. */ + +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intlcal_create_instance, 0, 0, IntlCalendar, 1) + ZEND_ARG_INFO(0, timeZone) + ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_intlcal_get_keyword_values_for_locale, 0, 3, IntlIterator, MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, commonlyUsed, _IS_BOOL, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_get_now, 0, 0, IS_DOUBLE, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_get_available_locales, 0, 0, IS_ARRAY, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intlcal_get, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) + ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intlcal_get_time, 0, 1, MAY_BE_DOUBLE|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_set_time, 0, 2, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) + ZEND_ARG_TYPE_INFO(0, date, IS_DOUBLE, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_add, 0, 3, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) + ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, amount, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_set_time_zone, 0, 2, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) + ZEND_ARG_INFO(0, timeZone) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_after, 0, 2, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, calendarObject, IntlCalendar, 0) + ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) +ZEND_END_ARG_INFO() + +#define arginfo_intlcal_before arginfo_intlcal_after + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_set, 0, 3, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) + ZEND_ARG_TYPE_INFO(0, year, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, month, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, dayOfMonth, IS_LONG, 0) + ZEND_ARG_INFO(0, hour) + ZEND_ARG_TYPE_INFO(0, minute, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, second, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_roll, 0, 3, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) + ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 0) + ZEND_ARG_INFO(0, amountOrUpOrDown) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_clear, 0, 1, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) + ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 1) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intlcal_field_difference, 0, 3, MAY_BE_LONG|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) + ZEND_ARG_TYPE_INFO(0, when, IS_DOUBLE, 0) + ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 0) +ZEND_END_ARG_INFO() + +#define arginfo_intlcal_get_actual_maximum arginfo_intlcal_get + +#define arginfo_intlcal_get_actual_minimum arginfo_intlcal_get + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intlcal_get_day_of_week_type, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) + ZEND_ARG_TYPE_INFO(0, dayOfWeek, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intlcal_get_first_day_of_week, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) +ZEND_END_ARG_INFO() + +#define arginfo_intlcal_greatest_minimum arginfo_intlcal_get + +#define arginfo_intlcal_get_least_maximum arginfo_intlcal_get + +#define arginfo_intlcal_get_greatest_minimum arginfo_intlcal_get + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intlcal_get_locale, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) + ZEND_ARG_TYPE_INFO(0, localeType, IS_LONG, 0) +ZEND_END_ARG_INFO() + +#define arginfo_intlcal_get_maximum arginfo_intlcal_get + +#define arginfo_intlcal_get_minimal_days_in_first_week arginfo_intlcal_get_first_day_of_week + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_set_minimal_days_in_first_week, 0, 2, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) + ZEND_ARG_TYPE_INFO(0, numberOfDays, IS_LONG, 0) +ZEND_END_ARG_INFO() + +#define arginfo_intlcal_get_minimum arginfo_intlcal_get + +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_intlcal_get_time_zone, 0, 1, IntlTimeZone, MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_get_type, 0, 1, IS_STRING, 0) + ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) +ZEND_END_ARG_INFO() + +#define arginfo_intlcal_get_weekend_transition arginfo_intlcal_get_day_of_week_type + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_in_daylight_time, 0, 1, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) +ZEND_END_ARG_INFO() + +#define arginfo_intlcal_is_lenient arginfo_intlcal_in_daylight_time + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_is_set, 0, 2, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) + ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 0) +ZEND_END_ARG_INFO() + +#define arginfo_intlcal_is_equivalent_to arginfo_intlcal_after + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_is_weekend, 0, 1, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) + ZEND_ARG_TYPE_INFO(0, date, IS_DOUBLE, 1) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_set_first_day_of_week, 0, 2, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) + ZEND_ARG_TYPE_INFO(0, dayOfWeek, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_set_lenient, 0, 2, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) + ZEND_ARG_TYPE_INFO(0, isLenient, _IS_BOOL, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_get_repeated_wall_time_option, 0, 1, IS_LONG, 0) + ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) +ZEND_END_ARG_INFO() + +#define arginfo_intlcal_equals arginfo_intlcal_after + +#define arginfo_intlcal_get_skipped_wall_time_option arginfo_intlcal_get_repeated_wall_time_option + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_set_repeated_wall_time_option, 0, 2, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) + ZEND_ARG_TYPE_INFO(0, wallTimeOption, IS_LONG, 0) +ZEND_END_ARG_INFO() + +#define arginfo_intlcal_set_skipped_wall_time_option arginfo_intlcal_set_repeated_wall_time_option + +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intlcal_from_date_time, 0, 1, IntlCalendar, 1) + ZEND_ARG_INFO(0, dateTime) + ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_intlcal_to_date_time, 0, 1, DateTime, MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) +ZEND_END_ARG_INFO() + +#define arginfo_intlcal_get_error_code arginfo_intlcal_get_first_day_of_week + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intlcal_get_error_message, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intlgregcal_create_instance, 0, 0, IntlGregorianCalendar, 1) + ZEND_ARG_INFO(0, timeZone) + ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlgregcal_set_gregorian_change, 0, 2, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, calendar, IntlGregorianCalendar, 0) + ZEND_ARG_TYPE_INFO(0, change, IS_DOUBLE, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intlgregcal_get_gregorian_change, 0, 1, MAY_BE_DOUBLE|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, calendar, IntlGregorianCalendar, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlgregcal_is_leap_year, 0, 2, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, calendar, IntlGregorianCalendar, 0) + ZEND_ARG_TYPE_INFO(0, year, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_collator_create, 0, 1, Collator, 1) + ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_collator_compare, 0, 3, MAY_BE_LONG|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, object, Collator, 0) + ZEND_ARG_TYPE_INFO(0, str1, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, str2, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_collator_get_attribute, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, object, Collator, 0) + ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_collator_set_attribute, 0, 3, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, object, Collator, 0) + ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, val, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_collator_get_strength, 0, 1, IS_LONG, 0) + ZEND_ARG_OBJ_INFO(0, object, Collator, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_collator_set_strength, 0, 2, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, object, Collator, 0) + ZEND_ARG_TYPE_INFO(0, strength, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_collator_sort, 0, 2, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, object, Collator, 0) + ZEND_ARG_TYPE_INFO(1, arr, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO(0, sort_flag, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_collator_sort_with_sort_keys, 0, 2, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, object, Collator, 0) + ZEND_ARG_TYPE_INFO(1, arr, IS_ARRAY, 0) +ZEND_END_ARG_INFO() + +#define arginfo_collator_asort arginfo_collator_sort + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_collator_get_locale, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, object, Collator, 0) + ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_collator_get_error_code, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, object, Collator, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_collator_get_error_message, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, object, Collator, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_collator_get_sort_key, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, object, Collator, 0) + ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intl_get_error_code, 0, 0, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intl_get_error_message, 0, 0, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intl_is_failure, 0, 1, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO(0, error_code, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intl_error_name, 0, 1, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, error_code, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_datefmt_create, 0, 3, IntlDateFormatter, 1) + ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) + ZEND_ARG_TYPE_INFO(0, datetype, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, timetype, IS_LONG, 0) + ZEND_ARG_INFO(0, timezone) + ZEND_ARG_INFO(0, calendar) + ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_datefmt_get_datetype, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0) +ZEND_END_ARG_INFO() + +#define arginfo_datefmt_get_timetype arginfo_datefmt_get_datetype + +#define arginfo_datefmt_get_calendar arginfo_datefmt_get_datetype + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_datefmt_set_calendar, 0, 2, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0) + ZEND_ARG_INFO(0, which) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_datefmt_get_timezone_id, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_datefmt_get_calendar_object, 0, 1, IntlCalendar, MAY_BE_FALSE|MAY_BE_NULL) + ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_datefmt_get_timezone, 0, 1, IntlTimeZone, MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_datefmt_set_timezone, 0, 2, _IS_BOOL, 1) + ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0) + ZEND_ARG_INFO(0, zone) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_datefmt_set_pattern, 0, 2, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0) + ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) +ZEND_END_ARG_INFO() + +#define arginfo_datefmt_get_pattern arginfo_datefmt_get_timezone_id + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_datefmt_get_locale, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0) + ZEND_ARG_TYPE_INFO(0, which, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_datefmt_set_lenient, 0, 2, IS_VOID, 0) + ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0) + ZEND_ARG_TYPE_INFO(0, lenient, _IS_BOOL, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_datefmt_is_lenient, 0, 1, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_datefmt_format, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_datefmt_format_object, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_INFO(0, object) + ZEND_ARG_INFO(0, format) + ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_datefmt_parse, 0, 2, MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0) + ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) + ZEND_ARG_INFO(1, position) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_datefmt_localtime, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0) + ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) + ZEND_ARG_INFO(1, position) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_datefmt_get_error_code, 0, 1, IS_LONG, 0) + ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_datefmt_get_error_message, 0, 1, IS_STRING, 0) + ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_numfmt_create, 0, 2, NumberFormatter, 1) + ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, style, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_numfmt_format, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0) + ZEND_ARG_TYPE_MASK(0, value, MAY_BE_LONG|MAY_BE_DOUBLE) + ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_numfmt_parse, 0, 2, MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0) + ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) + ZEND_ARG_INFO(1, position) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_numfmt_format_currency, 0, 3, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0) + ZEND_ARG_TYPE_INFO(0, value, IS_DOUBLE, 0) + ZEND_ARG_TYPE_INFO(0, currency, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_numfmt_parse_currency, 0, 3, MAY_BE_DOUBLE|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0) + ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) + ZEND_ARG_INFO(1, currency) + ZEND_ARG_INFO(1, position) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_numfmt_set_attribute, 0, 3, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0) + ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_numfmt_get_attribute, 0, 2, double, MAY_BE_LONG|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0) + ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_numfmt_set_text_attribute, 0, 3, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0) + ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_numfmt_get_text_attribute, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0) + ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0) +ZEND_END_ARG_INFO() + +#define arginfo_numfmt_set_symbol arginfo_numfmt_set_text_attribute + +#define arginfo_numfmt_get_symbol arginfo_numfmt_get_text_attribute + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_numfmt_set_pattern, 0, 2, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0) + ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_numfmt_get_pattern, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_numfmt_get_locale, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0) + ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_numfmt_get_error_code, 0, 1, IS_LONG, 0) + ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_numfmt_get_error_message, 0, 1, IS_STRING, 0) + ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_grapheme_strlen, 0, 1, MAY_BE_LONG|MAY_BE_FALSE|MAY_BE_NULL) + ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_grapheme_strpos, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) +ZEND_END_ARG_INFO() + +#define arginfo_grapheme_stripos arginfo_grapheme_strpos + +#define arginfo_grapheme_strrpos arginfo_grapheme_strpos + +#define arginfo_grapheme_strripos arginfo_grapheme_strpos + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_grapheme_substr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 1) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_grapheme_strstr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, before_needle, _IS_BOOL, 0) +ZEND_END_ARG_INFO() + +#define arginfo_grapheme_stristr arginfo_grapheme_strstr + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_grapheme_extract, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, extract_type, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) + ZEND_ARG_INFO(1, next) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_idn_to_ascii, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, variant, IS_LONG, 0) + ZEND_ARG_INFO(1, idna_info) +ZEND_END_ARG_INFO() + +#define arginfo_idn_to_utf8 arginfo_idn_to_ascii + +#define arginfo_locale_get_default arginfo_intl_get_error_message + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_locale_set_default, 0, 1, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_locale_get_primary_language, 0, 1, IS_STRING, 1) + ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0) +ZEND_END_ARG_INFO() + +#define arginfo_locale_get_script arginfo_locale_get_primary_language + +#define arginfo_locale_get_region arginfo_locale_get_primary_language + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_locale_get_keywords, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE|MAY_BE_NULL) + ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_locale_get_display_script, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, in_locale, IS_STRING, 1) +ZEND_END_ARG_INFO() + +#define arginfo_locale_get_display_region arginfo_locale_get_display_script + +#define arginfo_locale_get_display_name arginfo_locale_get_display_script + +#define arginfo_locale_get_display_language arginfo_locale_get_display_script + +#define arginfo_locale_get_display_variant arginfo_locale_get_display_script + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_locale_compose, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, subtags, IS_ARRAY, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_locale_parse, 0, 1, IS_ARRAY, 1) + ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0) +ZEND_END_ARG_INFO() + +#define arginfo_locale_get_all_variants arginfo_locale_parse + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_locale_filter_matches, 0, 2, _IS_BOOL, 1) + ZEND_ARG_TYPE_INFO(0, langtag, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, canonicalize, _IS_BOOL, 0) +ZEND_END_ARG_INFO() + +#define arginfo_locale_canonicalize arginfo_locale_get_primary_language + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_locale_lookup, 0, 2, IS_STRING, 1) + ZEND_ARG_TYPE_INFO(0, langtag, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, canonicalize, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO(0, def, IS_STRING, 1) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_locale_accept_from_http, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, header, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_msgfmt_create, 0, 2, MessageFormatter, 1) + ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_msgfmt_format, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, fmt, MessageFormatter, 0) + ZEND_ARG_TYPE_INFO(0, args, IS_ARRAY, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_msgfmt_format_message, 0, 3, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, args, IS_ARRAY, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_msgfmt_parse, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, fmt, MessageFormatter, 0) + ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_msgfmt_parse_message, 0, 3, MAY_BE_ARRAY|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_msgfmt_set_pattern, 0, 2, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, fmt, MessageFormatter, 0) + ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_msgfmt_get_pattern, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, fmt, MessageFormatter, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_msgfmt_get_locale, 0, 1, IS_STRING, 0) + ZEND_ARG_OBJ_INFO(0, fmt, MessageFormatter, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_msgfmt_get_error_code, 0, 1, IS_LONG, 0) + ZEND_ARG_OBJ_INFO(0, fmt, MessageFormatter, 0) +ZEND_END_ARG_INFO() + +#define arginfo_msgfmt_get_error_message arginfo_msgfmt_get_locale + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_normalizer_normalize, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, form, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_normalizer_is_normalized, 0, 1, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, form, IS_LONG, 0) +ZEND_END_ARG_INFO() + +#if U_ICU_VERSION_MAJOR_NUM >= 56 +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_normalizer_get_raw_decomposition, 0, 1, IS_STRING, 1) + ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, form, IS_LONG, 0) +ZEND_END_ARG_INFO() +#endif + +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_resourcebundle_create, 0, 2, ResourceBundle, 1) + ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) + ZEND_ARG_TYPE_INFO(0, bundlename, IS_STRING, 1) + ZEND_ARG_TYPE_INFO(0, fallback, _IS_BOOL, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_resourcebundle_get, 0, 0, 2) + ZEND_ARG_OBJ_INFO(0, bundle, ResourceBundle, 0) + ZEND_ARG_INFO(0, index) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_resourcebundle_count, 0, 1, IS_LONG, 0) + ZEND_ARG_OBJ_INFO(0, bundle, ResourceBundle, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_resourcebundle_locales, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, bundlename, IS_STRING, 0) +ZEND_END_ARG_INFO() + +#define arginfo_resourcebundle_get_error_code arginfo_resourcebundle_count + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_resourcebundle_get_error_message, 0, 1, IS_STRING, 0) + ZEND_ARG_OBJ_INFO(0, bundle, ResourceBundle, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_count_equivalent_ids, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, zoneId, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intltz_create_default, 0, 0, IntlTimeZone, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_intltz_create_enumeration, 0, 0, 0) + ZEND_ARG_INFO(0, countryOrRawOffset) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intltz_create_time_zone, 0, 1, IntlTimeZone, 1) + ZEND_ARG_TYPE_INFO(0, zoneId, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_intltz_create_time_zone_id_enumeration, 0, 1, IntlIterator, MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, zoneType, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, region, IS_STRING, 1) + ZEND_ARG_TYPE_INFO(0, rawOffset, IS_LONG, 1) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intltz_from_date_time_zone, 0, 1, IntlTimeZone, 1) + ZEND_ARG_OBJ_INFO(0, zone, DateTimeZone, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_canonical_id, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, zoneId, IS_STRING, 0) + ZEND_ARG_INFO(1, isSystemID) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_display_name, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, tz, IntlTimeZone, 0) + ZEND_ARG_TYPE_INFO(0, isDaylight, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO(0, style, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intltz_get_dst_savings, 0, 1, IS_LONG, 0) + ZEND_ARG_OBJ_INFO(0, tz, IntlTimeZone, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_equivalent_id, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, zoneId, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_error_code, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, tz, IntlTimeZone, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_error_message, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, tz, IntlTimeZone, 0) +ZEND_END_ARG_INFO() + +#define arginfo_intltz_get_gmt arginfo_intltz_create_default + +#define arginfo_intltz_get_id arginfo_intltz_get_error_message + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intltz_get_offset, 0, 5, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, tz, IntlTimeZone, 0) + ZEND_ARG_TYPE_INFO(0, date, IS_DOUBLE, 0) + ZEND_ARG_TYPE_INFO(0, local, _IS_BOOL, 0) + ZEND_ARG_INFO(1, rawOffset) + ZEND_ARG_INFO(1, dstOffset) +ZEND_END_ARG_INFO() + +#define arginfo_intltz_get_raw_offset arginfo_intltz_get_dst_savings + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_region, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, zoneId, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_tz_data_version, 0, 0, MAY_BE_STRING|MAY_BE_FALSE) +ZEND_END_ARG_INFO() + +#define arginfo_intltz_get_unknown arginfo_intltz_create_default + +#if U_ICU_VERSION_MAJOR_NUM >= 52 +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_windows_id, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, timezone, IS_STRING, 0) +ZEND_END_ARG_INFO() +#endif + +#if U_ICU_VERSION_MAJOR_NUM >= 52 +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_id_for_windows_id, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, timezone, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, region, IS_STRING, 0) +ZEND_END_ARG_INFO() +#endif + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intltz_has_same_rules, 0, 2, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, tz, IntlTimeZone, 0) + ZEND_ARG_OBJ_INFO(0, otherTimeZone, IntlTimeZone, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_intltz_to_date_time_zone, 0, 1, DateTimeZone, MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, tz, IntlTimeZone, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intltz_use_daylight_time, 0, 1, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, tz, IntlTimeZone, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_transliterator_create, 0, 1, Transliterator, 1) + ZEND_ARG_TYPE_INFO(0, id, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, direction, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_transliterator_create_from_rules, 0, 1, Transliterator, 1) + ZEND_ARG_TYPE_INFO(0, rules, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, direction, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_transliterator_list_ids, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_transliterator_create_inverse, 0, 1, Transliterator, 1) + ZEND_ARG_OBJ_INFO(0, orig_trans, Transliterator, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_transliterator_transliterate, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_INFO(0, transliterator) + ZEND_ARG_TYPE_INFO(0, subject, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, end, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_transliterator_get_error_code, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, trans, Transliterator, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_transliterator_get_error_message, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_OBJ_INFO(0, trans, Transliterator, 0) +ZEND_END_ARG_INFO() diff --git a/ext/intl/resourcebundle/resourcebundle.stub.php b/ext/intl/resourcebundle/resourcebundle.stub.php index 14f10fea4bf9d..34430edf636fe 100644 --- a/ext/intl/resourcebundle/resourcebundle.stub.php +++ b/ext/intl/resourcebundle/resourcebundle.stub.php @@ -25,19 +25,3 @@ public function getErrorCode() {} /** @return string */ public function getErrorMessage() {} } - -function resourcebundle_create(?string $locale, ?string $bundlename, bool $fallback = true): ?ResourceBundle {} - -/** - * @param string|int $index - * @return mixed - */ -function resourcebundle_get(ResourceBundle $bundle, $index) {} - -function resourcebundle_count(ResourceBundle $bundle): int {} - -function resourcebundle_locales(string $bundlename): array|false {} - -function resourcebundle_get_error_code(ResourceBundle $bundle): int {} - -function resourcebundle_get_error_message(ResourceBundle $bundle): string {} diff --git a/ext/intl/resourcebundle/resourcebundle_arginfo.h b/ext/intl/resourcebundle/resourcebundle_arginfo.h index 855b8b548c195..f12ece0972a16 100644 --- a/ext/intl/resourcebundle/resourcebundle_arginfo.h +++ b/ext/intl/resourcebundle/resourcebundle_arginfo.h @@ -23,28 +23,3 @@ ZEND_END_ARG_INFO() #define arginfo_class_ResourceBundle_getErrorCode arginfo_class_ResourceBundle_count #define arginfo_class_ResourceBundle_getErrorMessage arginfo_class_ResourceBundle_count - -ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_resourcebundle_create, 0, 2, ResourceBundle, 1) - ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, bundlename, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, fallback, _IS_BOOL, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_resourcebundle_get, 0, 0, 2) - ZEND_ARG_OBJ_INFO(0, bundle, ResourceBundle, 0) - ZEND_ARG_INFO(0, index) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_resourcebundle_count, 0, 1, IS_LONG, 0) - ZEND_ARG_OBJ_INFO(0, bundle, ResourceBundle, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_resourcebundle_locales, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, bundlename, IS_STRING, 0) -ZEND_END_ARG_INFO() - -#define arginfo_resourcebundle_get_error_code arginfo_resourcebundle_count - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_resourcebundle_get_error_message, 0, 1, IS_STRING, 0) - ZEND_ARG_OBJ_INFO(0, bundle, ResourceBundle, 0) -ZEND_END_ARG_INFO() diff --git a/ext/intl/timezone/timezone.stub.php b/ext/intl/timezone/timezone.stub.php index 332fb9c1d2b33..cf473a91f6956 100644 --- a/ext/intl/timezone/timezone.stub.php +++ b/ext/intl/timezone/timezone.stub.php @@ -80,57 +80,3 @@ public function toDateTimeZone() {} /** @return bool */ public function useDaylightTime() {} } - -function intltz_count_equivalent_ids(string $zoneId): int|false {} - -function intltz_create_default(): IntlTimeZone {} - -/** - * @param IntlTimeZone|string|int|double|null $countryOrRawOffset - * @return IntlIterator|false - */ -function intltz_create_enumeration($countryOrRawOffset = null) {} - -function intltz_create_time_zone(string $zoneId): ?IntlTimeZone {} - -function intltz_create_time_zone_id_enumeration(int $zoneType, ?string $region = null, ?int $rawOffset = null): IntlIterator|false {} - -function intltz_from_date_time_zone(DateTimeZone $zone): ?IntlTimeZone {} - -function intltz_get_canonical_id(string $zoneId, &$isSystemID = null): string|false {} - -function intltz_get_display_name(IntlTimeZone $tz, bool $isDaylight = false, int $style = IntlTimeZone::DISPLAY_LONG, ?string $locale = null): string|false {} - -function intltz_get_dst_savings(IntlTimeZone $tz): int {} - -function intltz_get_equivalent_id(string $zoneId, int $index): string|false {} - -function intltz_get_error_code(IntlTimeZone $tz): int|false {} - -function intltz_get_error_message(IntlTimeZone $tz): string|false {} - -function intltz_get_gmt(): IntlTimeZone {} - -function intltz_get_id(IntlTimeZone $tz): string|false {} - -function intltz_get_offset(IntlTimeZone $tz, float $date, bool $local, &$rawOffset, &$dstOffset): bool {} - -function intltz_get_raw_offset(IntlTimeZone $tz): int {} - -function intltz_get_region(string $zoneId): string|false {} - -function intltz_get_tz_data_version(): string|false {} - -function intltz_get_unknown(): IntlTimeZone {} - -#if U_ICU_VERSION_MAJOR_NUM >= 52 -function intltz_get_windows_id(string $timezone): string|false {} - -function intltz_get_id_for_windows_id(string $timezone, string $region = UNKNOWN): string|false {} -#endif - -function intltz_has_same_rules(IntlTimeZone $tz, IntlTimeZone $otherTimeZone): bool {} - -function intltz_to_date_time_zone(IntlTimeZone $tz): DateTimeZone|false {} - -function intltz_use_daylight_time(IntlTimeZone $tz): bool {} diff --git a/ext/intl/timezone/timezone_arginfo.h b/ext/intl/timezone/timezone_arginfo.h index 94c79627813fd..b1023d9a9900f 100644 --- a/ext/intl/timezone/timezone_arginfo.h +++ b/ext/intl/timezone/timezone_arginfo.h @@ -86,104 +86,3 @@ ZEND_END_ARG_INFO() #define arginfo_class_IntlTimeZone_toDateTimeZone arginfo_class_IntlTimeZone___construct #define arginfo_class_IntlTimeZone_useDaylightTime arginfo_class_IntlTimeZone___construct - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_count_equivalent_ids, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, zoneId, IS_STRING, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intltz_create_default, 0, 0, IntlTimeZone, 0) -ZEND_END_ARG_INFO() - -#define arginfo_intltz_create_enumeration arginfo_class_IntlTimeZone_createEnumeration - -ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intltz_create_time_zone, 0, 1, IntlTimeZone, 1) - ZEND_ARG_TYPE_INFO(0, zoneId, IS_STRING, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_intltz_create_time_zone_id_enumeration, 0, 1, IntlIterator, MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, zoneType, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, region, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, rawOffset, IS_LONG, 1) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intltz_from_date_time_zone, 0, 1, IntlTimeZone, 1) - ZEND_ARG_OBJ_INFO(0, zone, DateTimeZone, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_canonical_id, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, zoneId, IS_STRING, 0) - ZEND_ARG_INFO(1, isSystemID) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_display_name, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_OBJ_INFO(0, tz, IntlTimeZone, 0) - ZEND_ARG_TYPE_INFO(0, isDaylight, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, style, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intltz_get_dst_savings, 0, 1, IS_LONG, 0) - ZEND_ARG_OBJ_INFO(0, tz, IntlTimeZone, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_equivalent_id, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, zoneId, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_error_code, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_OBJ_INFO(0, tz, IntlTimeZone, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_error_message, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_OBJ_INFO(0, tz, IntlTimeZone, 0) -ZEND_END_ARG_INFO() - -#define arginfo_intltz_get_gmt arginfo_intltz_create_default - -#define arginfo_intltz_get_id arginfo_intltz_get_error_message - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intltz_get_offset, 0, 5, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, tz, IntlTimeZone, 0) - ZEND_ARG_TYPE_INFO(0, date, IS_DOUBLE, 0) - ZEND_ARG_TYPE_INFO(0, local, _IS_BOOL, 0) - ZEND_ARG_INFO(1, rawOffset) - ZEND_ARG_INFO(1, dstOffset) -ZEND_END_ARG_INFO() - -#define arginfo_intltz_get_raw_offset arginfo_intltz_get_dst_savings - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_region, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, zoneId, IS_STRING, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_tz_data_version, 0, 0, MAY_BE_STRING|MAY_BE_FALSE) -ZEND_END_ARG_INFO() - -#define arginfo_intltz_get_unknown arginfo_intltz_create_default - -#if U_ICU_VERSION_MAJOR_NUM >= 52 -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_windows_id, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, timezone, IS_STRING, 0) -ZEND_END_ARG_INFO() -#endif - -#if U_ICU_VERSION_MAJOR_NUM >= 52 -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_id_for_windows_id, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, timezone, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, region, IS_STRING, 0) -ZEND_END_ARG_INFO() -#endif - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intltz_has_same_rules, 0, 2, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, tz, IntlTimeZone, 0) - ZEND_ARG_OBJ_INFO(0, otherTimeZone, IntlTimeZone, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_intltz_to_date_time_zone, 0, 1, DateTimeZone, MAY_BE_FALSE) - ZEND_ARG_OBJ_INFO(0, tz, IntlTimeZone, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intltz_use_daylight_time, 0, 1, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, tz, IntlTimeZone, 0) -ZEND_END_ARG_INFO() diff --git a/ext/intl/transliterator/transliterator.stub.php b/ext/intl/transliterator/transliterator.stub.php index 1e96ba66cd295..12cab5d99a967 100644 --- a/ext/intl/transliterator/transliterator.stub.php +++ b/ext/intl/transliterator/transliterator.stub.php @@ -25,18 +25,3 @@ public function getErrorCode() {} /** @return string|false */ public function getErrorMessage() {} } - -function transliterator_create(string $id, int $direction = Transliterator::FORWARD): ?Transliterator {} - -function transliterator_create_from_rules(string $rules, int $direction = Transliterator::FORWARD): ?Transliterator {} - -function transliterator_list_ids(): array|false {} - -function transliterator_create_inverse(Transliterator $orig_trans): ?Transliterator {} - -/** @param Transliterator|string */ -function transliterator_transliterate($transliterator, string $subject, int $start = 0, int $end = -1): string|false {} - -function transliterator_get_error_code(Transliterator $trans): int|false {} - -function transliterator_get_error_message(Transliterator $trans): string|false {} diff --git a/ext/intl/transliterator/transliterator_arginfo.h b/ext/intl/transliterator/transliterator_arginfo.h index 7061b4b5df110..3a9d68c2b4b68 100644 --- a/ext/intl/transliterator/transliterator_arginfo.h +++ b/ext/intl/transliterator/transliterator_arginfo.h @@ -26,35 +26,3 @@ ZEND_END_ARG_INFO() #define arginfo_class_Transliterator_getErrorCode arginfo_class_Transliterator___construct #define arginfo_class_Transliterator_getErrorMessage arginfo_class_Transliterator___construct - -ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_transliterator_create, 0, 1, Transliterator, 1) - ZEND_ARG_TYPE_INFO(0, id, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, direction, IS_LONG, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_transliterator_create_from_rules, 0, 1, Transliterator, 1) - ZEND_ARG_TYPE_INFO(0, rules, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, direction, IS_LONG, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_transliterator_list_ids, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_transliterator_create_inverse, 0, 1, Transliterator, 1) - ZEND_ARG_OBJ_INFO(0, orig_trans, Transliterator, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_transliterator_transliterate, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_INFO(0, transliterator) - ZEND_ARG_TYPE_INFO(0, subject, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, end, IS_LONG, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_transliterator_get_error_code, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_OBJ_INFO(0, trans, Transliterator, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_transliterator_get_error_message, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_OBJ_INFO(0, trans, Transliterator, 0) -ZEND_END_ARG_INFO() diff --git a/ext/mysqli/mysqli.stub.php b/ext/mysqli/mysqli.stub.php index 31cc7e648918b..434346e2de407 100644 --- a/ext/mysqli/mysqli.stub.php +++ b/ext/mysqli/mysqli.stub.php @@ -171,14 +171,6 @@ public function use_result(); public function refresh(int $options); } -class mysqli_warning -{ - public function __construct(object $mysqli_link); - - /** @return bool */ - public function next(); -} - class mysqli_result { public function __construct(object $mysqli_link, int $resmode = MYSQLI_STORE_RESULT); diff --git a/ext/mysqli/mysqli_arginfo.h b/ext/mysqli/mysqli_arginfo.h index e20a7ed982911..b5307d917f7ba 100644 --- a/ext/mysqli/mysqli_arginfo.h +++ b/ext/mysqli/mysqli_arginfo.h @@ -147,12 +147,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_refresh, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_warning___construct, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, mysqli_link, IS_OBJECT, 0) -ZEND_END_ARG_INFO() - -#define arginfo_class_mysqli_warning_next arginfo_class_mysqli_character_set_name - ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, mysqli_link, IS_OBJECT, 0) ZEND_ARG_TYPE_INFO(0, resmode, IS_LONG, 0) diff --git a/ext/mysqli/mysqli_warning.c b/ext/mysqli/mysqli_warning.c index c15afa0c4cd96..673ca48aae410 100644 --- a/ext/mysqli/mysqli_warning.c +++ b/ext/mysqli/mysqli_warning.c @@ -26,7 +26,7 @@ #include "php_mysqli_structs.h" #include "mysqli_priv.h" -#include "mysqli_arginfo.h" +#include "mysqli_warning_arginfo.h" /* Define these in the PHP7 tree to make merging easy process */ #define ZSTR_DUPLICATE (1<<0) diff --git a/ext/mysqli/mysqli_warning.stub.php b/ext/mysqli/mysqli_warning.stub.php new file mode 100644 index 0000000000000..aa92204e507d9 --- /dev/null +++ b/ext/mysqli/mysqli_warning.stub.php @@ -0,0 +1,9 @@ + diff --git a/ext/standard/dir.stub.php b/ext/standard/dir.stub.php new file mode 100755 index 0000000000000..0ffef772856ad --- /dev/null +++ b/ext/standard/dir.stub.php @@ -0,0 +1,22 @@ + Date: Fri, 21 Feb 2020 15:08:56 +0100 Subject: [PATCH 027/338] Generate function entries from stubs If @generate-function-entries is specified in the stub file, also generate function entries for the extension. Currently limited to free functions only. --- build/gen_stub.php | 187 +++- ext/standard/basic_functions.c | 709 +------------ ext/standard/basic_functions.stub.php | 86 +- ext/standard/basic_functions_arginfo.h | 1282 +++++++++++++++++++++++- 4 files changed, 1502 insertions(+), 762 deletions(-) mode change 100755 => 100644 build/gen_stub.php diff --git a/build/gen_stub.php b/build/gen_stub.php old mode 100755 new mode 100644 index f3a9a492b0c67..d25ef2dc22d58 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -1,6 +1,7 @@ #!/usr/bin/env php getMessage()}\n"; @@ -299,6 +300,10 @@ public function equals(ReturnInfo $other): bool { class FuncInfo { /** @var string */ public $name; + /** @var ?string */ + public $className; + /** @var ?string */ + public $alias; /** @var ArgInfo[] */ public $args; /** @var ReturnInfo */ @@ -309,9 +314,12 @@ class FuncInfo { public $cond; public function __construct( - string $name, array $args, ReturnInfo $return, int $numRequiredArgs, ?string $cond + string $name, ?string $className, ?string $alias, array $args, ReturnInfo $return, + int $numRequiredArgs, ?string $cond ) { $this->name = $name; + $this->className = $className; + $this->alias = $alias; $this->args = $args; $this->return = $return; $this->numRequiredArgs = $numRequiredArgs; @@ -333,11 +341,33 @@ public function equalsApartFromName(FuncInfo $other): bool { && $this->numRequiredArgs === $other->numRequiredArgs && $this->cond === $other->cond; } + + public function getArgInfoName(): string { + if ($this->className) { + return 'arginfo_class_' . $this->className . '_' . $this->name; + } + return 'arginfo_' . $this->name; + } +} + +class FileInfo { + /** @var FuncInfo[] */ + public $funcInfos; + /** @var bool */ + public $generateFunctionEntries; + + public function __construct(array $funcInfos, bool $generateFunctionEntries) { + $this->funcInfos = $funcInfos; + $this->generateFunctionEntries = $generateFunctionEntries; + } } -function parseFunctionLike(string $name, Node\FunctionLike $func, ?string $cond): FuncInfo { +function parseFunctionLike( + string $name, ?string $className, Node\FunctionLike $func, ?string $cond +): FuncInfo { $comment = $func->getDocComment(); $paramMeta = []; + $alias = null; if ($comment) { $commentText = substr($comment->getText(), 2, -2); @@ -349,6 +379,8 @@ function parseFunctionLike(string $name, Node\FunctionLike $func, ?string $cond) $paramMeta[$varName] = []; } $paramMeta[$varName]['preferRef'] = true; + } else if (preg_match('/^\*\s*@alias\s+(.+)$/', trim($commentLine), $matches)) { + $alias = $matches[1]; } } } @@ -403,7 +435,7 @@ function parseFunctionLike(string $name, Node\FunctionLike $func, ?string $cond) $return = new ReturnInfo( $func->returnsByRef(), $returnType ? Type::fromNode($returnType) : null); - return new FuncInfo($name, $args, $return, $numRequiredArgs, $cond); + return new FuncInfo($name, $className, $alias, $args, $return, $numRequiredArgs, $cond); } function handlePreprocessorConditions(array &$conds, Stmt $stmt): ?string { @@ -434,8 +466,24 @@ function handlePreprocessorConditions(array &$conds, Stmt $stmt): ?string { return empty($conds) ? null : implode(' && ', $conds); } -/** @return FuncInfo[] */ -function parseStubFile(string $fileName) { +function getFileDocComment(array $stmts): ?DocComment { + if (empty($stmts)) { + return null; + } + + $comments = $stmts[0]->getComments(); + if (empty($comments)) { + return null; + } + + if ($comments[0] instanceof DocComment) { + return $comments[0]; + } + + return null; +} + +function parseStubFile(string $fileName): FileInfo { if (!file_exists($fileName)) { throw new Exception("File $fileName does not exist"); } @@ -450,6 +498,14 @@ function parseStubFile(string $fileName) { $stmts = $parser->parse($code); $nodeTraverser->traverse($stmts); + $generateFunctionEntries = false; + $fileDocComment = getFileDocComment($stmts); + if ($fileDocComment) { + if (strpos($fileDocComment->getText(), '@generate-function-entries') !== false) { + $generateFunctionEntries = true; + } + } + $funcInfos = []; $conds = []; foreach ($stmts as $stmt) { @@ -459,7 +515,7 @@ function parseStubFile(string $fileName) { } if ($stmt instanceof Stmt\Function_) { - $funcInfos[] = parseFunctionLike($stmt->name->toString(), $stmt, $cond); + $funcInfos[] = parseFunctionLike($stmt->name->toString(), null, $stmt, $cond); continue; } @@ -476,7 +532,7 @@ function parseStubFile(string $fileName) { } $funcInfos[] = parseFunctionLike( - 'class_' . $className . '_' . $classStmt->name->toString(), $classStmt, $cond); + $classStmt->name->toString(), $className, $classStmt, $cond); } continue; } @@ -484,7 +540,7 @@ function parseStubFile(string $fileName) { throw new Exception("Unexpected node {$stmt->getType()}"); } - return $funcInfos; + return new FileInfo($funcInfos, $generateFunctionEntries); } function funcInfoToCode(FuncInfo $funcInfo): string { @@ -494,28 +550,32 @@ function funcInfoToCode(FuncInfo $funcInfo): string { if (null !== $simpleReturnType = $returnType->tryToSimpleType()) { if ($simpleReturnType->isBuiltin) { $code .= sprintf( - "ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_%s, %d, %d, %s, %d)\n", - $funcInfo->name, $funcInfo->return->byRef, $funcInfo->numRequiredArgs, + "ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(%s, %d, %d, %s, %d)\n", + $funcInfo->getArgInfoName(), $funcInfo->return->byRef, + $funcInfo->numRequiredArgs, $simpleReturnType->toTypeCode(), $returnType->isNullable() ); } else { $code .= sprintf( - "ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_%s, %d, %d, %s, %d)\n", - $funcInfo->name, $funcInfo->return->byRef, $funcInfo->numRequiredArgs, + "ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(%s, %d, %d, %s, %d)\n", + $funcInfo->getArgInfoName(), $funcInfo->return->byRef, + $funcInfo->numRequiredArgs, $simpleReturnType->toEscapedName(), $returnType->isNullable() ); } } else if (null !== $representableType = $returnType->tryToRepresentableType()) { if ($representableType->classType !== null) { $code .= sprintf( - "ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_%s, %d, %d, %s, %s)\n", - $funcInfo->name, $funcInfo->return->byRef, $funcInfo->numRequiredArgs, + "ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(%s, %d, %d, %s, %s)\n", + $funcInfo->getArgInfoName(), $funcInfo->return->byRef, + $funcInfo->numRequiredArgs, $representableType->classType->toEscapedName(), $representableType->toTypeMask() ); } else { $code .= sprintf( - "ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_%s, %d, %d, %s)\n", - $funcInfo->name, $funcInfo->return->byRef, $funcInfo->numRequiredArgs, + "ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(%s, %d, %d, %s)\n", + $funcInfo->getArgInfoName(), $funcInfo->return->byRef, + $funcInfo->numRequiredArgs, $representableType->toTypeMask() ); } @@ -524,8 +584,8 @@ function funcInfoToCode(FuncInfo $funcInfo): string { } } else { $code .= sprintf( - "ZEND_BEGIN_ARG_INFO_EX(arginfo_%s, 0, %d, %d)\n", - $funcInfo->name, $funcInfo->return->byRef, $funcInfo->numRequiredArgs + "ZEND_BEGIN_ARG_INFO_EX(%s, 0, %d, %d)\n", + $funcInfo->getArgInfoName(), $funcInfo->return->byRef, $funcInfo->numRequiredArgs ); } @@ -566,7 +626,7 @@ function funcInfoToCode(FuncInfo $funcInfo): string { } $code .= "ZEND_END_ARG_INFO()"; - return $code; + return $code . "\n"; } function findEquivalentFuncInfo(array $generatedFuncInfos, $funcInfo): ?FuncInfo { @@ -578,33 +638,80 @@ function findEquivalentFuncInfo(array $generatedFuncInfos, $funcInfo): ?FuncInfo return null; } -/** @param FuncInfo[] $funcInfos */ -function generateArginfoCode(array $funcInfos): string { - $code = "/* This is a generated file, edit the .stub.php file instead. */"; - $generatedFuncInfos = []; - foreach ($funcInfos as $funcInfo) { - $code .= "\n\n"; - if ($funcInfo->cond) { - $code .= "#if {$funcInfo->cond}\n"; +function generateCodeWithConditions( + FileInfo $fileInfo, string $separator, Closure $codeGenerator): string { + $code = ""; + foreach ($fileInfo->funcInfos as $funcInfo) { + $funcCode = $codeGenerator($funcInfo); + if ($funcCode === null) { + continue; } - /* If there already is an equivalent arginfo structure, only emit a #define */ - if ($generatedFuncInfo = findEquivalentFuncInfo($generatedFuncInfos, $funcInfo)) { - $code .= sprintf( - "#define arginfo_%s arginfo_%s", - $funcInfo->name, $generatedFuncInfo->name - ); + $code .= $separator; + if ($funcInfo->cond) { + $code .= "#if {$funcInfo->cond}\n"; + $code .= $funcCode; + $code .= "#endif\n"; } else { - $code .= funcInfoToCode($funcInfo); + $code .= $funcCode; } + } + return $code; +} - if ($funcInfo->cond) { - $code .= "\n#endif"; +function generateArgInfoCode(FileInfo $fileInfo): string { + $funcInfos = $fileInfo->funcInfos; + + $code = "/* This is a generated file, edit the .stub.php file instead. */\n"; + $generatedFuncInfos = []; + $code .= generateCodeWithConditions( + $fileInfo, "\n", + function(FuncInfo $funcInfo) use(&$generatedFuncInfos) { + /* If there already is an equivalent arginfo structure, only emit a #define */ + if ($generatedFuncInfo = findEquivalentFuncInfo($generatedFuncInfos, $funcInfo)) { + $code = sprintf( + "#define %s %s\n", + $funcInfo->getArgInfoName(), $generatedFuncInfo->getArgInfoName() + ); + } else { + $code = funcInfoToCode($funcInfo); + } + + $generatedFuncInfos[] = $funcInfo; + return $code; } + ); + + if ($fileInfo->generateFunctionEntries) { + $code .= "\n\n"; + $code .= generateCodeWithConditions($fileInfo, "", function(FuncInfo $funcInfo) { + if ($funcInfo->className || $funcInfo->alias) { + return null; + } + + return "ZEND_FUNCTION($funcInfo->name);\n"; + }); + + $code .= "\n\nstatic const zend_function_entry ext_functions[] = {\n"; + $code .= generateCodeWithConditions($fileInfo, "", function(FuncInfo $funcInfo) { + if ($funcInfo->className) { + return null; + } - $generatedFuncInfos[] = $funcInfo; + if ($funcInfo->alias) { + return sprintf( + "\tZEND_FALIAS(%s, %s, %s)\n", + $funcInfo->name, $funcInfo->alias, $funcInfo->getArgInfoName() + ); + } else { + return sprintf("\tZEND_FE(%s, %s)\n", $funcInfo->name, $funcInfo->getArgInfoName()); + } + }); + $code .= "\tZEND_FE_END\n"; + $code .= "};\n"; } - return $code . "\n"; + + return $code; } function initPhpParser() { diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 219656021ea24..d99b7fb498603 100755 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -33,7 +33,6 @@ #include "ext/standard/php_dns.h" #include "ext/standard/php_uuencode.h" #include "ext/standard/php_mt_rand.h" -#include "basic_functions_arginfo.h" #ifdef PHP_WIN32 #include "win32/php_win32_globals.h" @@ -107,6 +106,7 @@ PHPAPI php_basic_globals basic_globals; #include "php_fopen_wrappers.h" #include "streamsfuncs.h" +#include "basic_functions_arginfo.h" static zend_class_entry *incomplete_class_entry = NULL; @@ -120,711 +120,6 @@ typedef struct _user_tick_function_entry { static void user_shutdown_function_dtor(zval *zv); static void user_tick_function_dtor(user_tick_function_entry *tick_function_entry); -/* {{{ arginfo */ - -static const zend_function_entry basic_functions[] = { /* {{{ */ - PHP_FE(constant, arginfo_constant) - PHP_FE(bin2hex, arginfo_bin2hex) - PHP_FE(hex2bin, arginfo_hex2bin) - PHP_FE(sleep, arginfo_sleep) - PHP_FE(usleep, arginfo_usleep) -#if HAVE_NANOSLEEP - PHP_FE(time_nanosleep, arginfo_time_nanosleep) - PHP_FE(time_sleep_until, arginfo_time_sleep_until) -#endif - -#if HAVE_STRPTIME - PHP_FE(strptime, arginfo_strptime) -#endif - - PHP_FE(flush, arginfo_flush) - PHP_FE(wordwrap, arginfo_wordwrap) - PHP_FE(htmlspecialchars, arginfo_htmlspecialchars) - PHP_FE(htmlentities, arginfo_htmlentities) - PHP_FE(html_entity_decode, arginfo_html_entity_decode) - PHP_FE(htmlspecialchars_decode, arginfo_htmlspecialchars_decode) - PHP_FE(get_html_translation_table, arginfo_get_html_translation_table) - PHP_FE(sha1, arginfo_sha1) - PHP_FE(sha1_file, arginfo_sha1_file) - PHP_FE(md5, arginfo_md5) - PHP_FE(md5_file, arginfo_md5_file) - PHP_FE(crc32, arginfo_crc32) - - PHP_FE(iptcparse, arginfo_iptcparse) - PHP_FE(iptcembed, arginfo_iptcembed) - PHP_FE(getimagesize, arginfo_getimagesize) - PHP_FE(getimagesizefromstring, arginfo_getimagesizefromstring) - PHP_FE(image_type_to_mime_type, arginfo_image_type_to_mime_type) - PHP_FE(image_type_to_extension, arginfo_image_type_to_extension) - - PHP_FE(phpinfo, arginfo_phpinfo) - PHP_FE(phpversion, arginfo_phpversion) - PHP_FE(phpcredits, arginfo_phpcredits) - PHP_FE(php_sapi_name, arginfo_php_sapi_name) - PHP_FE(php_uname, arginfo_php_uname) - PHP_FE(php_ini_scanned_files, arginfo_php_ini_scanned_files) - PHP_FE(php_ini_loaded_file, arginfo_php_ini_loaded_file) - - PHP_FE(strnatcmp, arginfo_strnatcmp) - PHP_FE(strnatcasecmp, arginfo_strnatcasecmp) - PHP_FE(substr_count, arginfo_substr_count) - PHP_FE(strspn, arginfo_strspn) - PHP_FE(strcspn, arginfo_strcspn) - PHP_FE(strtok, arginfo_strtok) - PHP_FE(strtoupper, arginfo_strtoupper) - PHP_FE(strtolower, arginfo_strtolower) - PHP_FE(str_contains, arginfo_str_contains) - PHP_FE(strpos, arginfo_strpos) - PHP_FE(stripos, arginfo_stripos) - PHP_FE(strrpos, arginfo_strrpos) - PHP_FE(strripos, arginfo_strripos) - PHP_FE(strrev, arginfo_strrev) - PHP_FE(hebrev, arginfo_hebrev) - PHP_FE(nl2br, arginfo_nl2br) - PHP_FE(basename, arginfo_basename) - PHP_FE(dirname, arginfo_dirname) - PHP_FE(pathinfo, arginfo_pathinfo) - PHP_FE(stripslashes, arginfo_stripslashes) - PHP_FE(stripcslashes, arginfo_stripcslashes) - PHP_FE(strstr, arginfo_strstr) - PHP_FE(stristr, arginfo_stristr) - PHP_FE(strrchr, arginfo_strrchr) - PHP_FE(str_shuffle, arginfo_str_shuffle) - PHP_FE(str_word_count, arginfo_str_word_count) - PHP_FE(str_split, arginfo_str_split) - PHP_FE(strpbrk, arginfo_strpbrk) - PHP_FE(substr_compare, arginfo_substr_compare) - PHP_FE(utf8_encode, arginfo_utf8_encode) - PHP_FE(utf8_decode, arginfo_utf8_decode) - PHP_FE(strcoll, arginfo_strcoll) - - PHP_FE(substr, arginfo_substr) - PHP_FE(substr_replace, arginfo_substr_replace) - PHP_FE(quotemeta, arginfo_quotemeta) - PHP_FE(ucfirst, arginfo_ucfirst) - PHP_FE(lcfirst, arginfo_lcfirst) - PHP_FE(ucwords, arginfo_ucwords) - PHP_FE(strtr, arginfo_strtr) - PHP_FE(addslashes, arginfo_addslashes) - PHP_FE(addcslashes, arginfo_addcslashes) - PHP_FE(rtrim, arginfo_rtrim) - PHP_FE(str_replace, arginfo_str_replace) - PHP_FE(str_ireplace, arginfo_str_ireplace) - PHP_FE(str_repeat, arginfo_str_repeat) - PHP_FE(count_chars, arginfo_count_chars) - PHP_FE(chunk_split, arginfo_chunk_split) - PHP_FE(trim, arginfo_trim) - PHP_FE(ltrim, arginfo_ltrim) - PHP_FE(strip_tags, arginfo_strip_tags) - PHP_FE(similar_text, arginfo_similar_text) - PHP_FE(explode, arginfo_explode) - PHP_FE(implode, arginfo_implode) - PHP_FALIAS(join, implode, arginfo_join) - PHP_FE(setlocale, arginfo_setlocale) - PHP_FE(localeconv, arginfo_localeconv) - -#if HAVE_NL_LANGINFO - PHP_FE(nl_langinfo, arginfo_nl_langinfo) -#endif - - PHP_FE(soundex, arginfo_soundex) - PHP_FE(levenshtein, arginfo_levenshtein) - PHP_FE(chr, arginfo_chr) - PHP_FE(ord, arginfo_ord) - PHP_FE(parse_str, arginfo_parse_str) - PHP_FE(str_getcsv, arginfo_str_getcsv) - PHP_FE(str_pad, arginfo_str_pad) - PHP_FALIAS(chop, rtrim, arginfo_chop) - PHP_FALIAS(strchr, strstr, arginfo_strchr) - PHP_FE(sprintf, arginfo_sprintf) - PHP_FE(printf, arginfo_printf) - PHP_FE(vprintf, arginfo_vprintf) - PHP_FE(vsprintf, arginfo_vsprintf) - PHP_FE(fprintf, arginfo_fprintf) - PHP_FE(vfprintf, arginfo_vfprintf) - PHP_FE(sscanf, arginfo_sscanf) - PHP_FE(fscanf, arginfo_fscanf) - PHP_FE(parse_url, arginfo_parse_url) - PHP_FE(urlencode, arginfo_urlencode) - PHP_FE(urldecode, arginfo_urldecode) - PHP_FE(rawurlencode, arginfo_rawurlencode) - PHP_FE(rawurldecode, arginfo_rawurldecode) - PHP_FE(http_build_query, arginfo_http_build_query) - -#if defined(HAVE_SYMLINK) || defined(PHP_WIN32) - PHP_FE(readlink, arginfo_readlink) - PHP_FE(linkinfo, arginfo_linkinfo) - PHP_FE(symlink, arginfo_symlink) - PHP_FE(link, arginfo_link) -#endif - - PHP_FE(unlink, arginfo_unlink) - PHP_FE(exec, arginfo_exec) - PHP_FE(system, arginfo_system) - PHP_FE(escapeshellcmd, arginfo_escapeshellcmd) - PHP_FE(escapeshellarg, arginfo_escapeshellarg) - PHP_FE(passthru, arginfo_passthru) - PHP_FE(shell_exec, arginfo_shell_exec) -#ifdef PHP_CAN_SUPPORT_PROC_OPEN - PHP_FE(proc_open, arginfo_proc_open) - PHP_FE(proc_close, arginfo_proc_close) - PHP_FE(proc_terminate, arginfo_proc_terminate) - PHP_FE(proc_get_status, arginfo_proc_get_status) -#endif - -#ifdef HAVE_NICE - PHP_FE(proc_nice, arginfo_proc_nice) -#endif - - PHP_FE(rand, arginfo_rand) - PHP_FALIAS(srand, mt_srand, arginfo_srand) - PHP_FALIAS(getrandmax, mt_getrandmax, arginfo_getrandmax) - PHP_FE(mt_rand, arginfo_mt_rand) - PHP_FE(mt_srand, arginfo_mt_srand) - PHP_FE(mt_getrandmax, arginfo_mt_getrandmax) - - PHP_FE(random_bytes, arginfo_random_bytes) - PHP_FE(random_int, arginfo_random_int) - -#if HAVE_GETSERVBYNAME - PHP_FE(getservbyname, arginfo_getservbyname) -#endif - -#if HAVE_GETSERVBYPORT - PHP_FE(getservbyport, arginfo_getservbyport) -#endif - -#if HAVE_GETPROTOBYNAME - PHP_FE(getprotobyname, arginfo_getprotobyname) -#endif - -#if HAVE_GETPROTOBYNUMBER - PHP_FE(getprotobynumber, arginfo_getprotobynumber) -#endif - - PHP_FE(getmyuid, arginfo_getmyuid) - PHP_FE(getmygid, arginfo_getmygid) - PHP_FE(getmypid, arginfo_getmypid) - PHP_FE(getmyinode, arginfo_getmyinode) - PHP_FE(getlastmod, arginfo_getlastmod) - - PHP_FE(base64_decode, arginfo_base64_decode) - PHP_FE(base64_encode, arginfo_base64_encode) - - PHP_FE(password_hash, arginfo_password_hash) - PHP_FE(password_get_info, arginfo_password_get_info) - PHP_FE(password_needs_rehash, arginfo_password_needs_rehash) - PHP_FE(password_verify, arginfo_password_verify) - PHP_FE(password_algos, arginfo_password_algos) - PHP_FE(convert_uuencode, arginfo_convert_uuencode) - PHP_FE(convert_uudecode, arginfo_convert_uudecode) - - PHP_FE(abs, arginfo_abs) - PHP_FE(ceil, arginfo_ceil) - PHP_FE(floor, arginfo_floor) - PHP_FE(round, arginfo_round) - PHP_FE(sin, arginfo_sin) - PHP_FE(cos, arginfo_cos) - PHP_FE(tan, arginfo_tan) - PHP_FE(asin, arginfo_asin) - PHP_FE(acos, arginfo_acos) - PHP_FE(atan, arginfo_atan) - PHP_FE(atanh, arginfo_atanh) - PHP_FE(atan2, arginfo_atan2) - PHP_FE(sinh, arginfo_sinh) - PHP_FE(cosh, arginfo_cosh) - PHP_FE(tanh, arginfo_tanh) - PHP_FE(asinh, arginfo_asinh) - PHP_FE(acosh, arginfo_acosh) - PHP_FE(expm1, arginfo_expm1) - PHP_FE(log1p, arginfo_log1p) - PHP_FE(pi, arginfo_pi) - PHP_FE(is_finite, arginfo_is_finite) - PHP_FE(is_nan, arginfo_is_nan) - PHP_FE(is_infinite, arginfo_is_infinite) - PHP_FE(pow, arginfo_pow) - PHP_FE(exp, arginfo_exp) - PHP_FE(log, arginfo_log) - PHP_FE(log10, arginfo_log10) - PHP_FE(sqrt, arginfo_sqrt) - PHP_FE(hypot, arginfo_hypot) - PHP_FE(deg2rad, arginfo_deg2rad) - PHP_FE(rad2deg, arginfo_rad2deg) - PHP_FE(bindec, arginfo_bindec) - PHP_FE(hexdec, arginfo_hexdec) - PHP_FE(octdec, arginfo_octdec) - PHP_FE(decbin, arginfo_decbin) - PHP_FE(decoct, arginfo_decoct) - PHP_FE(dechex, arginfo_dechex) - PHP_FE(base_convert, arginfo_base_convert) - PHP_FE(number_format, arginfo_number_format) - PHP_FE(fmod, arginfo_fmod) - PHP_FE(fdiv, arginfo_fdiv) - PHP_FE(intdiv, arginfo_intdiv) -#ifdef HAVE_INET_NTOP - PHP_FE(inet_ntop, arginfo_inet_ntop) -#endif -#ifdef HAVE_INET_PTON - PHP_FE(inet_pton, arginfo_inet_pton) -#endif - PHP_FE(ip2long, arginfo_ip2long) - PHP_FE(long2ip, arginfo_long2ip) - - PHP_FE(getenv, arginfo_getenv) -#ifdef HAVE_PUTENV - PHP_FE(putenv, arginfo_putenv) -#endif - - PHP_FE(getopt, arginfo_getopt) - -#ifdef HAVE_GETLOADAVG - PHP_FE(sys_getloadavg, arginfo_sys_getloadavg) -#endif -#ifdef HAVE_GETTIMEOFDAY - PHP_FE(microtime, arginfo_microtime) - PHP_FE(gettimeofday, arginfo_gettimeofday) -#endif - -#ifdef HAVE_GETRUSAGE - PHP_FE(getrusage, arginfo_getrusage) -#endif - - PHP_FE(hrtime, arginfo_hrtime) - -#ifdef HAVE_GETTIMEOFDAY - PHP_FE(uniqid, arginfo_uniqid) -#endif - - PHP_FE(quoted_printable_decode, arginfo_quoted_printable_decode) - PHP_FE(quoted_printable_encode, arginfo_quoted_printable_encode) - PHP_FE(get_current_user, arginfo_get_current_user) - PHP_FE(set_time_limit, arginfo_set_time_limit) - PHP_FE(header_register_callback, arginfo_header_register_callback) - PHP_FE(get_cfg_var, arginfo_get_cfg_var) - - PHP_FE(error_log, arginfo_error_log) - PHP_FE(error_get_last, arginfo_error_get_last) - PHP_FE(error_clear_last, arginfo_error_clear_last) - PHP_FE(call_user_func, arginfo_call_user_func) - PHP_FE(call_user_func_array, arginfo_call_user_func_array) - PHP_FE(forward_static_call, arginfo_forward_static_call) - PHP_FE(forward_static_call_array, arginfo_forward_static_call_array) - PHP_FE(serialize, arginfo_serialize) - PHP_FE(unserialize, arginfo_unserialize) - - PHP_FE(var_dump, arginfo_var_dump) - PHP_FE(var_export, arginfo_var_export) - PHP_FE(debug_zval_dump, arginfo_debug_zval_dump) - PHP_FE(print_r, arginfo_print_r) - PHP_FE(memory_get_usage, arginfo_memory_get_usage) - PHP_FE(memory_get_peak_usage, arginfo_memory_get_peak_usage) - - PHP_FE(register_shutdown_function, arginfo_register_shutdown_function) - PHP_FE(register_tick_function, arginfo_register_tick_function) - PHP_FE(unregister_tick_function, arginfo_unregister_tick_function) - - PHP_FE(highlight_file, arginfo_highlight_file) - PHP_FALIAS(show_source, highlight_file, arginfo_show_source) - PHP_FE(highlight_string, arginfo_highlight_string) - PHP_FE(php_strip_whitespace, arginfo_php_strip_whitespace) - - PHP_FE(ini_get, arginfo_ini_get) - PHP_FE(ini_get_all, arginfo_ini_get_all) - PHP_FE(ini_set, arginfo_ini_set) - PHP_FALIAS(ini_alter, ini_set, arginfo_ini_alter) - PHP_FE(ini_restore, arginfo_ini_restore) - PHP_FE(get_include_path, arginfo_get_include_path) - PHP_FE(set_include_path, arginfo_set_include_path) - - PHP_FE(setcookie, arginfo_setcookie) - PHP_FE(setrawcookie, arginfo_setrawcookie) - PHP_FE(header, arginfo_header) - PHP_FE(header_remove, arginfo_header_remove) - PHP_FE(headers_sent, arginfo_headers_sent) - PHP_FE(headers_list, arginfo_headers_list) - PHP_FE(http_response_code, arginfo_http_response_code) - - PHP_FE(connection_aborted, arginfo_connection_aborted) - PHP_FE(connection_status, arginfo_connection_status) - PHP_FE(ignore_user_abort, arginfo_ignore_user_abort) - PHP_FE(parse_ini_file, arginfo_parse_ini_file) - PHP_FE(parse_ini_string, arginfo_parse_ini_string) -#if ZEND_DEBUG - PHP_FE(config_get_hash, arginfo_config_get_hash) -#endif - PHP_FE(is_uploaded_file, arginfo_is_uploaded_file) - PHP_FE(move_uploaded_file, arginfo_move_uploaded_file) - - /* functions from dns.c */ - PHP_FE(gethostbyaddr, arginfo_gethostbyaddr) - PHP_FE(gethostbyname, arginfo_gethostbyname) - PHP_FE(gethostbynamel, arginfo_gethostbynamel) - -#ifdef HAVE_GETHOSTNAME - PHP_FE(gethostname, arginfo_gethostname) -#endif - -#if defined(PHP_WIN32) || HAVE_GETIFADDRS - PHP_FE(net_get_interfaces, arginfo_net_get_interfaces) -#endif - -#if defined(PHP_WIN32) || HAVE_DNS_SEARCH_FUNC - - PHP_FE(dns_check_record, arginfo_dns_check_record) - PHP_FALIAS(checkdnsrr, dns_check_record, arginfo_checkdnsrr) - -# if defined(PHP_WIN32) || HAVE_FULL_DNS_FUNCS - PHP_FE(dns_get_mx, arginfo_dns_get_mx) - PHP_FALIAS(getmxrr, dns_get_mx, arginfo_getmxrr) - PHP_FE(dns_get_record, arginfo_dns_get_record) -# endif -#endif - - /* functions from type.c */ - PHP_FE(intval, arginfo_intval) - PHP_FE(floatval, arginfo_floatval) - PHP_FALIAS(doubleval, floatval, arginfo_doubleval) - PHP_FE(strval, arginfo_strval) - PHP_FE(boolval, arginfo_boolval) - PHP_FE(gettype, arginfo_gettype) - PHP_FE(settype, arginfo_settype) - PHP_FE(is_null, arginfo_is_null) - PHP_FE(is_resource, arginfo_is_resource) - PHP_FE(is_bool, arginfo_is_bool) - PHP_FE(is_int, arginfo_is_int) - PHP_FE(is_float, arginfo_is_float) - PHP_FALIAS(is_integer, is_int, arginfo_is_integer) - PHP_FALIAS(is_long, is_int, arginfo_is_long) - PHP_FALIAS(is_double, is_float, arginfo_is_double) - PHP_DEP_FALIAS(is_real, is_float, arginfo_is_real) - PHP_FE(is_numeric, arginfo_is_numeric) - PHP_FE(is_string, arginfo_is_string) - PHP_FE(is_array, arginfo_is_array) - PHP_FE(is_object, arginfo_is_object) - PHP_FE(is_scalar, arginfo_is_scalar) - PHP_FE(is_callable, arginfo_is_callable) - PHP_FE(is_iterable, arginfo_is_iterable) - PHP_FE(is_countable, arginfo_is_countable) - - /* functions from file.c */ - PHP_FE(pclose, arginfo_pclose) - PHP_FE(popen, arginfo_popen) - PHP_FE(readfile, arginfo_readfile) - PHP_FE(rewind, arginfo_rewind) - PHP_FE(rmdir, arginfo_rmdir) - PHP_FE(umask, arginfo_umask) - PHP_FE(fclose, arginfo_fclose) - PHP_FE(feof, arginfo_feof) - PHP_FE(fgetc, arginfo_fgetc) - PHP_FE(fgets, arginfo_fgets) - PHP_FE(fread, arginfo_fread) - PHP_FE(fopen, arginfo_fopen) - PHP_FE(fpassthru, arginfo_fpassthru) - PHP_FE(ftruncate, arginfo_ftruncate) - PHP_FE(fstat, arginfo_fstat) - PHP_FE(fseek, arginfo_fseek) - PHP_FE(ftell, arginfo_ftell) - PHP_FE(fflush, arginfo_fflush) - PHP_FE(fwrite, arginfo_fwrite) - PHP_FALIAS(fputs, fwrite, arginfo_fputs) - PHP_FE(mkdir, arginfo_mkdir) - PHP_FE(rename, arginfo_rename) - PHP_FE(copy, arginfo_copy) - PHP_FE(tempnam, arginfo_tempnam) - PHP_FE(tmpfile, arginfo_tmpfile) - PHP_FE(file, arginfo_file) - PHP_FE(file_get_contents, arginfo_file_get_contents) - PHP_FE(file_put_contents, arginfo_file_put_contents) - PHP_FE(stream_select, arginfo_stream_select) - PHP_FE(stream_context_create, arginfo_stream_context_create) - PHP_FE(stream_context_set_params, arginfo_stream_context_set_params) - PHP_FE(stream_context_get_params, arginfo_stream_context_get_params) - PHP_FE(stream_context_set_option, arginfo_stream_context_set_option) - PHP_FE(stream_context_get_options, arginfo_stream_context_get_options) - PHP_FE(stream_context_get_default, arginfo_stream_context_get_default) - PHP_FE(stream_context_set_default, arginfo_stream_context_set_default) - PHP_FE(stream_filter_prepend, arginfo_stream_filter_prepend) - PHP_FE(stream_filter_append, arginfo_stream_filter_append) - PHP_FE(stream_filter_remove, arginfo_stream_filter_remove) - PHP_FE(stream_socket_client, arginfo_stream_socket_client) - PHP_FE(stream_socket_server, arginfo_stream_socket_server) - PHP_FE(stream_socket_accept, arginfo_stream_socket_accept) - PHP_FE(stream_socket_get_name, arginfo_stream_socket_get_name) - PHP_FE(stream_socket_recvfrom, arginfo_stream_socket_recvfrom) - PHP_FE(stream_socket_sendto, arginfo_stream_socket_sendto) - PHP_FE(stream_socket_enable_crypto, arginfo_stream_socket_enable_crypto) -#ifdef HAVE_SHUTDOWN - PHP_FE(stream_socket_shutdown, arginfo_stream_socket_shutdown) -#endif -#if HAVE_SOCKETPAIR - PHP_FE(stream_socket_pair, arginfo_stream_socket_pair) -#endif - PHP_FE(stream_copy_to_stream, arginfo_stream_copy_to_stream) - PHP_FE(stream_get_contents, arginfo_stream_get_contents) - PHP_FE(stream_supports_lock, arginfo_stream_supports_lock) - PHP_FE(stream_isatty, arginfo_stream_isatty) -#ifdef PHP_WIN32 - PHP_FE(sapi_windows_vt100_support, arginfo_sapi_windows_vt100_support) -#endif - PHP_FE(fgetcsv, arginfo_fgetcsv) - PHP_FE(fputcsv, arginfo_fputcsv) - PHP_FE(flock, arginfo_flock) - PHP_FE(get_meta_tags, arginfo_get_meta_tags) - PHP_FE(stream_set_read_buffer, arginfo_stream_set_read_buffer) - PHP_FE(stream_set_write_buffer, arginfo_stream_set_write_buffer) - PHP_FALIAS(set_file_buffer, stream_set_write_buffer, arginfo_set_file_buffer) - PHP_FE(stream_set_chunk_size, arginfo_stream_set_chunk_size) - - PHP_FE(stream_set_blocking, arginfo_stream_set_blocking) - PHP_FALIAS(socket_set_blocking, stream_set_blocking, arginfo_socket_set_blocking) - - PHP_FE(stream_get_meta_data, arginfo_stream_get_meta_data) - PHP_FE(stream_get_line, arginfo_stream_get_line) - PHP_FE(stream_wrapper_register, arginfo_stream_wrapper_register) - PHP_FALIAS(stream_register_wrapper, stream_wrapper_register, arginfo_stream_register_wrapper) - PHP_FE(stream_wrapper_unregister, arginfo_stream_wrapper_unregister) - PHP_FE(stream_wrapper_restore, arginfo_stream_wrapper_restore) - PHP_FE(stream_get_wrappers, arginfo_stream_get_wrappers) - PHP_FE(stream_get_transports, arginfo_stream_get_transports) - PHP_FE(stream_resolve_include_path, arginfo_stream_resolve_include_path) - PHP_FE(stream_is_local, arginfo_stream_is_local) - PHP_FE(get_headers, arginfo_get_headers) - -#if HAVE_SYS_TIME_H || defined(PHP_WIN32) - PHP_FE(stream_set_timeout, arginfo_stream_set_timeout) - PHP_FALIAS(socket_set_timeout, stream_set_timeout, arginfo_socket_set_timeout) -#endif - - PHP_FALIAS(socket_get_status, stream_get_meta_data, arginfo_socket_get_status) - - PHP_FE(realpath, arginfo_realpath) - -#ifdef HAVE_FNMATCH - PHP_FE(fnmatch, arginfo_fnmatch) -#endif - - /* functions from fsock.c */ - PHP_FE(fsockopen, arginfo_fsockopen) - PHP_FE(pfsockopen, arginfo_pfsockopen) - - /* functions from pack.c */ - PHP_FE(pack, arginfo_pack) - PHP_FE(unpack, arginfo_unpack) - - /* functions from browscap.c */ - PHP_FE(get_browser, arginfo_get_browser) - - /* functions from crypt.c */ - PHP_FE(crypt, arginfo_crypt) - - /* functions from dir.c */ - PHP_FE(opendir, arginfo_opendir) - PHP_FE(closedir, arginfo_closedir) - PHP_FE(chdir, arginfo_chdir) - -#if defined(HAVE_CHROOT) && !defined(ZTS) && ENABLE_CHROOT_FUNC - PHP_FE(chroot, arginfo_chroot) -#endif - - PHP_FE(getcwd, arginfo_getcwd) - PHP_FE(rewinddir, arginfo_rewinddir) - PHP_FE(readdir, arginfo_readdir) - PHP_FALIAS(dir, getdir, arginfo_dir) - PHP_FE(scandir, arginfo_scandir) -#ifdef HAVE_GLOB - PHP_FE(glob, arginfo_glob) -#endif - /* functions from filestat.c */ - PHP_FE(fileatime, arginfo_fileatime) - PHP_FE(filectime, arginfo_filectime) - PHP_FE(filegroup, arginfo_filegroup) - PHP_FE(fileinode, arginfo_fileinode) - PHP_FE(filemtime, arginfo_filemtime) - PHP_FE(fileowner, arginfo_fileowner) - PHP_FE(fileperms, arginfo_fileperms) - PHP_FE(filesize, arginfo_filesize) - PHP_FE(filetype, arginfo_filetype) - PHP_FE(file_exists, arginfo_file_exists) - PHP_FE(is_writable, arginfo_is_writable) - PHP_FALIAS(is_writeable, is_writable, arginfo_is_writeable) - PHP_FE(is_readable, arginfo_is_readable) - PHP_FE(is_executable, arginfo_is_executable) - PHP_FE(is_file, arginfo_is_file) - PHP_FE(is_dir, arginfo_is_dir) - PHP_FE(is_link, arginfo_is_link) - PHP_FE(stat, arginfo_stat) - PHP_FE(lstat, arginfo_lstat) - PHP_FE(chown, arginfo_chown) - PHP_FE(chgrp, arginfo_chgrp) -#if HAVE_LCHOWN - PHP_FE(lchown, arginfo_lchown) -#endif -#if HAVE_LCHOWN - PHP_FE(lchgrp, arginfo_lchgrp) -#endif - PHP_FE(chmod, arginfo_chmod) -#if HAVE_UTIME - PHP_FE(touch, arginfo_touch) -#endif - PHP_FE(clearstatcache, arginfo_clearstatcache) - PHP_FE(disk_total_space, arginfo_disk_total_space) - PHP_FE(disk_free_space, arginfo_disk_free_space) - PHP_FALIAS(diskfreespace, disk_free_space, arginfo_diskfreespace) - PHP_FE(realpath_cache_size, arginfo_realpath_cache_size) - PHP_FE(realpath_cache_get, arginfo_realpath_cache_get) - - /* functions from mail.c */ - PHP_FE(mail, arginfo_mail) - - /* functions from syslog.c */ -#ifdef HAVE_SYSLOG_H - PHP_FE(openlog, arginfo_openlog) - PHP_FE(syslog, arginfo_syslog) - PHP_FE(closelog, arginfo_closelog) -#endif - - /* functions from lcg.c */ - PHP_FE(lcg_value, arginfo_lcg_value) - - /* functions from metaphone.c */ - PHP_FE(metaphone, arginfo_metaphone) - - /* functions from output.c */ - PHP_FE(ob_start, arginfo_ob_start) - PHP_FE(ob_flush, arginfo_ob_flush) - PHP_FE(ob_clean, arginfo_ob_clean) - PHP_FE(ob_end_flush, arginfo_ob_end_flush) - PHP_FE(ob_end_clean, arginfo_ob_end_clean) - PHP_FE(ob_get_flush, arginfo_ob_get_flush) - PHP_FE(ob_get_clean, arginfo_ob_get_clean) - PHP_FE(ob_get_length, arginfo_ob_get_length) - PHP_FE(ob_get_level, arginfo_ob_get_level) - PHP_FE(ob_get_status, arginfo_ob_get_status) - PHP_FE(ob_get_contents, arginfo_ob_get_contents) - PHP_FE(ob_implicit_flush, arginfo_ob_implicit_flush) - PHP_FE(ob_list_handlers, arginfo_ob_list_handlers) - - /* functions from array.c */ - PHP_FE(ksort, arginfo_ksort) - PHP_FE(krsort, arginfo_krsort) - PHP_FE(natsort, arginfo_natsort) - PHP_FE(natcasesort, arginfo_natcasesort) - PHP_FE(asort, arginfo_asort) - PHP_FE(arsort, arginfo_arsort) - PHP_FE(sort, arginfo_sort) - PHP_FE(rsort, arginfo_rsort) - PHP_FE(usort, arginfo_usort) - PHP_FE(uasort, arginfo_uasort) - PHP_FE(uksort, arginfo_uksort) - PHP_FE(shuffle, arginfo_shuffle) - PHP_FE(array_walk, arginfo_array_walk) - PHP_FE(array_walk_recursive, arginfo_array_walk_recursive) - PHP_FE(count, arginfo_count) - PHP_FE(end, arginfo_end) - PHP_FE(prev, arginfo_prev) - PHP_FE(next, arginfo_next) - PHP_FE(reset, arginfo_reset) - PHP_FE(current, arginfo_current) - PHP_FE(key, arginfo_key) - PHP_FE(min, arginfo_min) - PHP_FE(max, arginfo_max) - PHP_FE(in_array, arginfo_in_array) - PHP_FE(array_search, arginfo_array_search) - PHP_FE(extract, arginfo_extract) - PHP_FE(compact, arginfo_compact) - PHP_FE(array_fill, arginfo_array_fill) - PHP_FE(array_fill_keys, arginfo_array_fill_keys) - PHP_FE(range, arginfo_range) - PHP_FE(array_multisort, arginfo_array_multisort) - PHP_FE(array_push, arginfo_array_push) - PHP_FE(array_pop, arginfo_array_pop) - PHP_FE(array_shift, arginfo_array_shift) - PHP_FE(array_unshift, arginfo_array_unshift) - PHP_FE(array_splice, arginfo_array_splice) - PHP_FE(array_slice, arginfo_array_slice) - PHP_FE(array_merge, arginfo_array_merge) - PHP_FE(array_merge_recursive, arginfo_array_merge_recursive) - PHP_FE(array_replace, arginfo_array_replace) - PHP_FE(array_replace_recursive, arginfo_array_replace_recursive) - PHP_FE(array_keys, arginfo_array_keys) - PHP_FE(array_key_first, arginfo_array_key_first) - PHP_FE(array_key_last, arginfo_array_key_last) - PHP_FE(array_values, arginfo_array_values) - PHP_FE(array_count_values, arginfo_array_count_values) - PHP_FE(array_column, arginfo_array_column) - PHP_FE(array_reverse, arginfo_array_reverse) - PHP_FE(array_reduce, arginfo_array_reduce) - PHP_FE(array_pad, arginfo_array_pad) - PHP_FE(array_flip, arginfo_array_flip) - PHP_FE(array_change_key_case, arginfo_array_change_key_case) - PHP_FE(array_rand, arginfo_array_rand) - PHP_FE(array_unique, arginfo_array_unique) - PHP_FE(array_intersect, arginfo_array_intersect) - PHP_FE(array_intersect_key, arginfo_array_intersect_key) - PHP_FE(array_intersect_ukey, arginfo_array_intersect_ukey) - PHP_FE(array_uintersect, arginfo_array_uintersect) - PHP_FE(array_intersect_assoc, arginfo_array_intersect_assoc) - PHP_FE(array_uintersect_assoc, arginfo_array_uintersect_assoc) - PHP_FE(array_intersect_uassoc, arginfo_array_intersect_uassoc) - PHP_FE(array_uintersect_uassoc, arginfo_array_uintersect_uassoc) - PHP_FE(array_diff, arginfo_array_diff) - PHP_FE(array_diff_key, arginfo_array_diff_key) - PHP_FE(array_diff_ukey, arginfo_array_diff_ukey) - PHP_FE(array_udiff, arginfo_array_udiff) - PHP_FE(array_diff_assoc, arginfo_array_diff_assoc) - PHP_FE(array_udiff_assoc, arginfo_array_udiff_assoc) - PHP_FE(array_diff_uassoc, arginfo_array_diff_uassoc) - PHP_FE(array_udiff_uassoc, arginfo_array_udiff_uassoc) - PHP_FE(array_sum, arginfo_array_sum) - PHP_FE(array_product, arginfo_array_product) - PHP_FE(array_filter, arginfo_array_filter) - PHP_FE(array_map, arginfo_array_map) - PHP_FE(array_chunk, arginfo_array_chunk) - PHP_FE(array_combine, arginfo_array_combine) - PHP_FE(array_key_exists, arginfo_array_key_exists) - - /* aliases from array.c */ - PHP_FALIAS(pos, current, arginfo_pos) - PHP_FALIAS(sizeof, count, arginfo_sizeof) - PHP_FALIAS(key_exists, array_key_exists, arginfo_key_exists) - - /* functions from assert.c */ - PHP_FE(assert, arginfo_assert) - PHP_FE(assert_options, arginfo_assert_options) - - /* functions from versioning.c */ - PHP_FE(version_compare, arginfo_version_compare) - - /* functions from ftok.c*/ -#if HAVE_FTOK - PHP_FE(ftok, arginfo_ftok) -#endif - - PHP_FE(str_rot13, arginfo_str_rot13) - PHP_FE(stream_get_filters, arginfo_stream_get_filters) - PHP_FE(stream_filter_register, arginfo_stream_filter_register) - PHP_FE(stream_bucket_make_writeable, arginfo_stream_bucket_make_writeable) - PHP_FE(stream_bucket_prepend, arginfo_stream_bucket_prepend) - PHP_FE(stream_bucket_append, arginfo_stream_bucket_append) - PHP_FE(stream_bucket_new, arginfo_stream_bucket_new) - - PHP_FE(output_add_rewrite_var, arginfo_output_add_rewrite_var) - PHP_FE(output_reset_rewrite_vars, arginfo_output_reset_rewrite_vars) - - PHP_FE(sys_get_temp_dir, arginfo_sys_get_temp_dir) - -#ifdef PHP_WIN32 - PHP_FE(sapi_windows_cp_set, arginfo_sapi_windows_cp_set) - PHP_FE(sapi_windows_cp_get, arginfo_sapi_windows_cp_get) - PHP_FE(sapi_windows_cp_is_utf8, arginfo_sapi_windows_cp_is_utf8) - PHP_FE(sapi_windows_cp_conv, arginfo_sapi_windows_cp_conv) - PHP_FE(sapi_windows_set_ctrl_handler, arginfo_sapi_windows_set_ctrl_handler) - PHP_FE(sapi_windows_generate_ctrl_event, arginfo_sapi_windows_generate_ctrl_event) -#endif - PHP_FE_END -}; -/* }}} */ - static const zend_module_dep standard_deps[] = { /* {{{ */ ZEND_MOD_OPTIONAL("session") ZEND_MOD_END @@ -836,7 +131,7 @@ zend_module_entry basic_functions_module = { /* {{{ */ NULL, standard_deps, "standard", /* extension name */ - basic_functions, /* function list */ + ext_functions, /* function list */ PHP_MINIT(basic), /* process startup */ PHP_MSHUTDOWN(basic), /* process shutdown */ PHP_RINIT(basic), /* request startup */ diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 4a2df3e578f29..4b39aa32f9d33 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -1,5 +1,7 @@ Date: Fri, 3 Apr 2020 15:10:30 +0200 Subject: [PATCH 028/338] Remove now unnecessary PHP_FUNCTION() declarations --- ext/standard/base64.h | 3 -- ext/standard/basic_functions.h | 99 ---------------------------------- ext/standard/datetime.h | 4 -- ext/standard/exec.h | 11 ---- ext/standard/file.h | 29 ---------- ext/standard/fsock.h | 2 - ext/standard/head.h | 7 --- ext/standard/hrtime.h | 2 - ext/standard/html.h | 6 --- ext/standard/info.h | 7 --- ext/standard/iptc.c | 1 - ext/standard/link.c | 1 - ext/standard/md5.h | 3 -- ext/standard/metaphone.c | 1 - ext/standard/microtime.c | 1 - ext/standard/microtime.h | 28 ---------- ext/standard/pack.h | 2 - ext/standard/pageinfo.h | 6 --- ext/standard/php_array.h | 78 --------------------------- ext/standard/php_assert.h | 2 - ext/standard/php_browscap.h | 2 - ext/standard/php_crypt.h | 1 - ext/standard/php_dir.h | 9 ---- ext/standard/php_dns.h | 13 ----- ext/standard/php_ext_syslog.h | 4 -- ext/standard/php_filestat.h | 36 ------------- ext/standard/php_ftok.h | 24 --------- ext/standard/php_http.h | 2 - ext/standard/php_image.h | 6 --- ext/standard/php_iptc.h | 23 -------- ext/standard/php_lcg.h | 1 - ext/standard/php_link.h | 29 ---------- ext/standard/php_mail.h | 2 - ext/standard/php_math.h | 54 ------------------- ext/standard/php_metaphone.h | 22 -------- ext/standard/php_net.h | 2 - ext/standard/php_password.h | 6 --- ext/standard/php_random.h | 3 -- ext/standard/php_standard.h | 7 --- ext/standard/php_string.h | 73 ------------------------- ext/standard/php_type.h | 40 -------------- ext/standard/php_uuencode.h | 3 -- ext/standard/php_var.h | 7 --- ext/standard/php_versioning.h | 1 - ext/standard/quot_print.h | 3 -- ext/standard/sha1.h | 3 -- ext/standard/streamsfuncs.h | 47 ---------------- ext/standard/uniqid.c | 1 - ext/standard/uniqid.h | 24 --------- ext/standard/url.h | 7 --- 50 files changed, 748 deletions(-) delete mode 100644 ext/standard/microtime.h delete mode 100644 ext/standard/php_ftok.h delete mode 100644 ext/standard/php_iptc.h delete mode 100644 ext/standard/php_link.h delete mode 100644 ext/standard/php_metaphone.h delete mode 100644 ext/standard/php_type.h delete mode 100644 ext/standard/uniqid.h diff --git a/ext/standard/base64.h b/ext/standard/base64.h index 17bc45cd8bc0f..170c0b0c61421 100644 --- a/ext/standard/base64.h +++ b/ext/standard/base64.h @@ -57,9 +57,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -PHP_FUNCTION(base64_decode); -PHP_FUNCTION(base64_encode); - #if (ZEND_INTRIN_AVX2_FUNC_PTR || ZEND_INTRIN_SSSE3_FUNC_PTR) && !ZEND_INTRIN_AVX2_NATIVE PHP_MINIT_FUNCTION(base64_intrin); #endif diff --git a/ext/standard/basic_functions.h b/ext/standard/basic_functions.h index 003c0a2069be1..2805addceafdf 100644 --- a/ext/standard/basic_functions.h +++ b/ext/standard/basic_functions.h @@ -40,107 +40,8 @@ PHP_RINIT_FUNCTION(basic); PHP_RSHUTDOWN_FUNCTION(basic); PHP_MINFO_FUNCTION(basic); -PHP_FUNCTION(constant); -PHP_FUNCTION(sleep); -PHP_FUNCTION(usleep); -#if HAVE_NANOSLEEP -PHP_FUNCTION(time_nanosleep); -PHP_FUNCTION(time_sleep_until); -#endif -PHP_FUNCTION(flush); -#ifdef HAVE_INET_NTOP -PHP_FUNCTION(inet_ntop); -#endif -#ifdef HAVE_INET_PTON -PHP_FUNCTION(inet_pton); -#endif -PHP_FUNCTION(ip2long); -PHP_FUNCTION(long2ip); - -/* system functions */ -PHP_FUNCTION(getenv); -PHP_FUNCTION(putenv); - -PHP_FUNCTION(getopt); - -PHP_FUNCTION(get_current_user); -PHP_FUNCTION(set_time_limit); - -PHP_FUNCTION(header_register_callback); - -PHP_FUNCTION(get_cfg_var); - -PHP_FUNCTION(error_log); -PHP_FUNCTION(error_get_last); -PHP_FUNCTION(error_clear_last); - -PHP_FUNCTION(call_user_func); -PHP_FUNCTION(call_user_func_array); -PHP_FUNCTION(forward_static_call); -PHP_FUNCTION(forward_static_call_array); - -PHP_FUNCTION(register_shutdown_function); -PHP_FUNCTION(highlight_file); -PHP_FUNCTION(highlight_string); -PHP_FUNCTION(php_strip_whitespace); ZEND_API void php_get_highlight_struct(zend_syntax_highlighter_ini *syntax_highlighter_ini); -PHP_FUNCTION(ini_get); -PHP_FUNCTION(ini_get_all); -PHP_FUNCTION(ini_set); -PHP_FUNCTION(ini_restore); -PHP_FUNCTION(get_include_path); -PHP_FUNCTION(set_include_path); - -PHP_FUNCTION(print_r); -PHP_FUNCTION(fprintf); -PHP_FUNCTION(vfprintf); - -PHP_FUNCTION(connection_aborted); -PHP_FUNCTION(connection_status); -PHP_FUNCTION(ignore_user_abort); - -PHP_FUNCTION(getservbyname); -PHP_FUNCTION(getservbyport); -PHP_FUNCTION(getprotobyname); -PHP_FUNCTION(getprotobynumber); - -PHP_FUNCTION(crc32); - -PHP_FUNCTION(register_tick_function); -PHP_FUNCTION(unregister_tick_function); -#ifdef HAVE_GETLOADAVG -PHP_FUNCTION(sys_getloadavg); -#endif - -PHP_FUNCTION(is_uploaded_file); -PHP_FUNCTION(move_uploaded_file); - -PHP_FUNCTION(net_get_interfaces); - -/* From the INI parser */ -PHP_FUNCTION(parse_ini_file); -PHP_FUNCTION(parse_ini_string); -#if ZEND_DEBUG -PHP_FUNCTION(config_get_hash); -#endif - -#if defined(PHP_WIN32) -PHP_FUNCTION(sapi_windows_cp_set); -PHP_FUNCTION(sapi_windows_cp_get); -PHP_FUNCTION(sapi_windows_cp_is_utf8); -PHP_FUNCTION(sapi_windows_cp_conv); -PHP_FUNCTION(sapi_windows_set_ctrl_handler); -PHP_FUNCTION(sapi_windows_generate_ctrl_event); -#endif - -PHP_FUNCTION(str_rot13); -PHP_FUNCTION(stream_get_filters); -PHP_FUNCTION(stream_filter_register); -PHP_FUNCTION(stream_bucket_make_writeable); -PHP_FUNCTION(stream_bucket_prepend); -PHP_FUNCTION(stream_bucket_append); -PHP_FUNCTION(stream_bucket_new); PHP_MINIT_FUNCTION(user_filters); PHP_RSHUTDOWN_FUNCTION(user_filters); PHP_RSHUTDOWN_FUNCTION(browscap); diff --git a/ext/standard/datetime.h b/ext/standard/datetime.h index afdabd41522f8..95ed0eab2653d 100644 --- a/ext/standard/datetime.h +++ b/ext/standard/datetime.h @@ -18,10 +18,6 @@ #ifndef DATETIME_H #define DATETIME_H -#if HAVE_STRPTIME -PHP_FUNCTION(strptime); -#endif - PHPAPI char *php_std_date(time_t t); #endif /* DATETIME_H */ diff --git a/ext/standard/exec.h b/ext/standard/exec.h index b92c6dce8e7db..97edbd099a2b7 100644 --- a/ext/standard/exec.h +++ b/ext/standard/exec.h @@ -17,17 +17,6 @@ #ifndef EXEC_H #define EXEC_H -PHP_FUNCTION(system); -PHP_FUNCTION(exec); -PHP_FUNCTION(escapeshellcmd); -PHP_FUNCTION(escapeshellarg); -PHP_FUNCTION(passthru); -PHP_FUNCTION(shell_exec); -PHP_FUNCTION(proc_open); -PHP_FUNCTION(proc_get_status); -PHP_FUNCTION(proc_close); -PHP_FUNCTION(proc_terminate); -PHP_FUNCTION(proc_nice); PHP_MINIT_FUNCTION(proc_open); PHP_MINIT_FUNCTION(exec); diff --git a/ext/standard/file.h b/ext/standard/file.h index dbbaae0f39eba..28f906e0ba1ad 100644 --- a/ext/standard/file.h +++ b/ext/standard/file.h @@ -22,46 +22,17 @@ PHP_MINIT_FUNCTION(file); PHP_MSHUTDOWN_FUNCTION(file); -PHP_FUNCTION(tempnam); -PHP_FUNCTION(tmpfile); -PHP_FUNCTION(fopen); PHPAPI PHP_FUNCTION(fclose); -PHP_FUNCTION(popen); -PHP_FUNCTION(pclose); PHPAPI PHP_FUNCTION(feof); PHPAPI PHP_FUNCTION(fread); PHPAPI PHP_FUNCTION(fgetc); PHPAPI PHP_FUNCTION(fgets); -PHP_FUNCTION(fscanf); -PHP_FUNCTION(fgetcsv); -PHP_FUNCTION(fputcsv); PHPAPI PHP_FUNCTION(fwrite); PHPAPI PHP_FUNCTION(fflush); PHPAPI PHP_FUNCTION(rewind); PHPAPI PHP_FUNCTION(ftell); PHPAPI PHP_FUNCTION(fseek); -PHP_FUNCTION(mkdir); -PHP_FUNCTION(rmdir); PHPAPI PHP_FUNCTION(fpassthru); -PHP_FUNCTION(readfile); -PHP_FUNCTION(umask); -PHP_FUNCTION(rename); -PHP_FUNCTION(unlink); -PHP_FUNCTION(copy); -PHP_FUNCTION(file); -PHP_FUNCTION(file_get_contents); -PHP_FUNCTION(file_put_contents); -PHP_FUNCTION(get_meta_tags); -PHP_FUNCTION(flock); -PHP_FUNCTION(fd_set); -PHP_FUNCTION(fd_isset); -PHP_FUNCTION(realpath); -#ifdef HAVE_FNMATCH -PHP_FUNCTION(fnmatch); -#endif -PHP_FUNCTION(ftruncate); -PHP_FUNCTION(fstat); -PHP_FUNCTION(sys_get_temp_dir); PHP_MINIT_FUNCTION(user_streams); diff --git a/ext/standard/fsock.h b/ext/standard/fsock.h index 0547ee6073a53..40943aa0c408f 100644 --- a/ext/standard/fsock.h +++ b/ext/standard/fsock.h @@ -23,7 +23,5 @@ #include "php_network.h" -PHP_FUNCTION(fsockopen); -PHP_FUNCTION(pfsockopen); #endif /* FSOCK_H */ diff --git a/ext/standard/head.h b/ext/standard/head.h index 4e1ae0b4c32b2..a972ebcf3d5df 100644 --- a/ext/standard/head.h +++ b/ext/standard/head.h @@ -26,13 +26,6 @@ #define COOKIE_SAMESITE "; SameSite=" extern PHP_RINIT_FUNCTION(head); -PHP_FUNCTION(header); -PHP_FUNCTION(header_remove); -PHP_FUNCTION(setcookie); -PHP_FUNCTION(setrawcookie); -PHP_FUNCTION(headers_sent); -PHP_FUNCTION(headers_list); -PHP_FUNCTION(http_response_code); PHPAPI int php_header(void); PHPAPI int php_setcookie(zend_string *name, zend_string *value, time_t expires, zend_string *path, zend_string *domain, int secure, int httponly, zend_string *samesite, int url_encode); diff --git a/ext/standard/hrtime.h b/ext/standard/hrtime.h index fa47e1c49f464..29cc9767092d1 100644 --- a/ext/standard/hrtime.h +++ b/ext/standard/hrtime.h @@ -51,8 +51,6 @@ PHPAPI php_hrtime_t php_hrtime_current(void); PHP_MINIT_FUNCTION(hrtime); -PHP_FUNCTION(hrtime); - END_EXTERN_C() #endif /* HRTIME_H */ diff --git a/ext/standard/html.h b/ext/standard/html.h index a43c0c823d44c..2a8d24ccdeb6a 100644 --- a/ext/standard/html.h +++ b/ext/standard/html.h @@ -44,12 +44,6 @@ void register_html_constants(INIT_FUNC_ARGS); -PHP_FUNCTION(htmlspecialchars); -PHP_FUNCTION(htmlentities); -PHP_FUNCTION(htmlspecialchars_decode); -PHP_FUNCTION(html_entity_decode); -PHP_FUNCTION(get_html_translation_table); - PHPAPI zend_string *php_escape_html_entities(unsigned char *old, size_t oldlen, int all, int flags, char *hint_charset); PHPAPI zend_string *php_escape_html_entities_ex(unsigned char *old, size_t oldlen, int all, int flags, char *hint_charset, zend_bool double_encode); PHPAPI zend_string *php_unescape_html_entities(zend_string *str, int all, int flags, char *hint_charset); diff --git a/ext/standard/info.h b/ext/standard/info.h index b965448a44ded..95eec2d2ad855 100644 --- a/ext/standard/info.h +++ b/ext/standard/info.h @@ -52,13 +52,6 @@ #define ZEND_LOGO_DATA_URI "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAAAvCAYAAADKH9ehAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAEWJJREFUeNrsXQl0VNUZvjNJSAgEAxHCGsNitSBFxB1l0boUW1pp3VAUrKLWKgUPUlEB13K0Yq1alaXWuh5EadWK1F0s1gJaoaCgQDRKBBJDVhKSzPR+zPfg5vLevCUzmZnwvnP+k8ybN3fevfff73/vBAJTHxc+khL5kr6T1ODk5nAgTRTWloghFVtEg/zfh2PkSvq9pJGSKiX9SdKittbJoD/PSYkrJD0vKeB4IsNNotfuUtHk/CM+IvijpF9KGiDpGEkLJZ3lC7qPeKKTpD9IWiDpUOfWPCi61ZeLvD2VIhTwp9QlTjK5NsIXdB/xxHmSpvD/OucWPSAyQw2+LfeG1SbXVra1Tqb785xUaNdMel0g7Iu5V1zPv6dJqpD0kKR/+ILuI55o8oeg1bFT0kWSOkraQxK+oPvw0TZR3ZY758foyQXf//ZxUFh0Q/GEfNf9gHkaJ6m7pHJJSyTt9tnXhxtBR2EGlnHCMbZMaHuHzX19JZ0u6VRJh0k6hM+BpMjnklZIelPSNhff3V5StkNlEWBMFm+3LcC+BW3GuZP2GvfmiEiCCMUzxZIKRGSt9zeML/fdGAW9JB3O8c6SlMZ+b5f0qaQiF7EpnieXY1auvZfG7zhSUk8RSS428F7M5xfsh1eAV/vxOzoq16sklZBqbdpo5H2qDPRQXoP3Ki0+20FSFyrZUgt+Rt/7KH2vZb8/t/iMG2Sy/0dI6sbvgHGoV8a3xErQb5Q0iTfHCplkzlkW7w+VNF3ST7QJUzFK0pVkDFiw+yV95uC7r5Z0k3CW2ApwIkrJ9B9IelfSh2SIlqC/pDFUZAVk0rQoMhk2GYswx+AtWvMKPtcyEckW37pPwsIHNAuBniDpYhEpBMmJwvibJL0gIlVh39r0C8UlczkXQ/mM6OtEzuf3RfPVAxUY47f5PStcGKPxpOMldbbxiBptPMavJX1PuQ/P/olyz12S7rD4PLyqBTQ8gyXVSOot6VK+dxR53wyl7POjkv7pkpcwpleJSCHP4eQjM0BB/ZuG4Hl9EO8mQx4ZQ0FfL+k+k+t4wNlULpkO24IGnSzpQklzKPDRAMvZ1eXz9uXfH/Pvx5Ie44C5zYQXUgDPj6LEnMCQ3AFkjjupjGF9/kJmxPw1oiquz+6dalXcCRSmYxwK0kDSRI71azb3Y+6GiMi6P/5ey3F3YpExjxdQoG61uX8gBetkh2OWFkUIVGUT1pS9yosZNu1nkl8uZH+mikhxkx1wz7mkB0WkXsKJFw1ZuSWKotY9wjNJS6mUy41JK5P0c2qCnBgIeQWZvEK7Dnf6WUljTT5TS7d0KwezkJShdWIeGeuKKJo7FktUQylcl0i6RtL/HH4OjP+wB0UTLTGHfubRDWyi1g7SaoZQ495z9w7RpaHKqHEfLeklEyWzk+7dl3TTu1KQCpV7+pBB4IWstFFAgvOpJnTL6DoW0xPbw3k/nIYkW+kbmHeXhUEABklazrBDBdzTDfyuBo5DPq1eoUk7ZbSk70l6n3MZjUdCDpQvMF/rezn7/hX7Xs8wsj/7rsrWdQxnZtrwwENUosJkDDZxTjOUkEH1ds6lzJyDZzGScRsonGNcMCIG+WgRKTRQ8Su2p7uRi/mlKjZKekREChS2KIOcTvfqp3RZDlM+cxnfv8Thc75Pt8kqo92VzNTbxBqcQlceivAdByHDIxbvFTMOLovyHAGGK3qc/jJDoDc4hpjABzBm4UAglBFqEAOqt8mB29ss4uJnNCHfSK/tVZMYEfMykt7Bcco1eDLDHCT8gmzzRdLHZL6wRSgzg6GIgVl8Xj2uhPA+oQn53yTdK2mVMC8NzuJ8zaSyM/ApxyzWCFJRvUQ3eQ29BTNFcRgt+FTl2g30zDZZtD/ZRMifE5ES6Y9MxqAHQ7XZikI9nd97j5p1f83GZTPr6Crt2sOcOB1zTYT8HrqjVRZx4wbSAt47SXn/YsZV9zp4zuvJgNGQRaszmoN1rBY6IH4dHiVHcA5dZd2zeIbPv8ZBkghYTQFTx/h1WvSz6c3kM5ewGG8Prvxc5DZWS2u+dypnM5Y3sIJMXmbxfXW0misZN56oxITnWsyl2fg+6+C+zWTefMWr68RwaYF271htHBZqCsKqL28wB/ACjYShrE9nUjfWmEU33A7woqbR4k5UlNk4yoYOzOHvtGs30KO1QgnlZC2VohGOIGn7WEvW0ZdoMeCHfBgdo8X++m3V+s2wEHKzJMblJom92+ne2SHDwT1gknUispPpJLrrVZqwLxTmy5F5jOdVS72F/b6UwlbrcEytrD00+a8l/ZUM82jEZd8peu8uNYS8JxNWqis5IYqQCy1rPUULh8Y7fOYal3zzmPb6aJN7zlf+32bBV9ESclNE85WUX4j4oNbl/fM1b2eoxX3jyXNqiDTP4Xe8Rm9ItfSjvAr6DM0d+o5MXW/CuHO0a7eZTLYT3KF9LktYZ/WdCI+IkoV+lFZ6l3J9OF14HdM0F3MrhXxFjJmqhh5FBera24XqxaCqL0UosK97Z2ku+yJaEqf4D62ByoROcjZuN78Xaa9zTBSzKvxvC+vlrmgWVPU2h4j4FCO5lZ+vNBnpYHHfOOX/PfR83eApTaGM8CLop5l88WSLWAOu4AiNme5owcBO1xhlLGO/eGAFkyYqrtFe5zKzqU7KBE5o/BAIiv7VJSK7qV4GhEF1XtSk0YseWl6lWYI+cXj6pigJLkH3Vk0qfebxe4q0JGOGSDxCWn/Nchk9qJgMfGKS87LDes1IHeVW0LszgaC6sPMYE5lBt4CzRcuy4lVMLKlWfWwcJ+YpxtcGjtOYfzRjTgNIlv0rnpyCveeHNFSJ/jUlonH/3nNYqyOU28qYhHOLbzVPqFc81JQDKxnQ5twLdmjfmQzlxU6eoZ/mma3y8D3VonlhUr6bElhMwJ81RseSxW+jfOYULdYGAw5s4WBtpeU0ijKwxnp/HCfn70piCNlMFEUU8/WpmnZe1Bq80r96m5yMkIwx9nnNHTWFs114q0ArM1HsiUY7j5/rKFIThdrrzR7agHyoy9vd3Ag64uEfKa+xjIKlLqtTUBB7FWgJrQ9joFl1d2cQ2wzHaeDXa6/ztO9Wx+OT+FrzSAKuV12ptOZp+ljnaVawk8uxDpnMZXYCGB3PXqe5sl7QQ5ubhhQR9B4mQpvjIR+gJgrbOxV0rK/rVUyXmyRWdI2a2YLEhVP3BwmN9sJ9BtQpKkxiSDOrUeUhaeQaPevKzKQ3oIVTSGatcynoRl29sIkh440a8pURNoz00Ab4Ts1obxCps1FKl8k5IpKbcmsgu6nz6ETQC+iSqoKKOPmVJBmYnDjHX4EozB9s7TgwykkyYS13URAHpmstYIloOP/HEi6Wx5a4+DwSpH2V18tTyHUPm3iQeS1s09ai4/0ntVgNRQmzHTRulGwaQNnei3FgHqPcMBEJlXrNioAaE8AcupKBd7ElBu1uTxCzg+dmKB4TahiQNX/OxssAb00Uzdeci4S3FYhEQdfkWCrc1cI2K+2EDhsP1OUxZGUnOWTmcgphV0UgZ4jUR1hLlBiuJfqJpb61CXimOrq8RqiEeu6TU3iMwdzYgWhUnWHDDKr0ptLar6USqmOfYYiGMMTUN/KgziGVTo+pNJHBBfF0zVAQc6N2DUL+tcO2Yc1Rk2ss+yBmOko43yCSCljJXAWA7PD4eAt6MBy2yiNACRvVVN05t40pPLYPsT+zlRDpOLG/Jt8OSGKhmnBpivV7q/Y6JkucVgkyWKb52rVZwl0tvNDi+AzRvKjfK1Dnjvpd1FhPEc1LBVsbqENXN35cFaPY2BIVGdlWYZKqgPPj/RythNtpcNycpoOxwAae0bGwhAkAQg01cfiDWDRqZtHhCqFQ5FAtOXKXh/Yh6Ci2N5YMUDW2SHg/N3scn02N++cnMIZCBdwS9gtApRxqDc6OlzWtSrdc8cJGlzP5fzZDri1tQNixISWL/5fSQvcVzfe/wzXfSG8Kuw03pHB/t5KMik+EYJ1EC1d0zCw6fofqRI2ZJwpvyxN4uPs0q/6UR2szyESobxatf3aa7jvfrT0DGPNpYV3H3CI0BYLGllQdy7TX14rUP/zzDHpuRp0EPLnJvH68Qij/RXnyIyku5Ea+5S3NO7s01q77eMY1qqY8T7Qs+4qtq+o2UWhjZO6HuWhjJBlZXWbAHvbFSTAxqMW+RbuG3VfviAP36tshujINh6Tr3kE0BNMl5x8Qq6+mVTdwrMlzpRrGaGPzVpw9NDNFngjoFZZzRCS/FRPXHRZT31X2MgfYTQYX1WE1moaaQJfKEFTs/camkXnUwt9YtNWPiuc67VmRlb0yiRgS/cAe7is0QXuTAm9kikM2DNc5OkeGRaMU8tq0TJHbUCOtezMeRfITiSv1PLLbGE5gb/NOB/1AuR1KlLETDltidyR4XIPasyEnc6eIbRa9kfNifFeXJOAnVJBiKfFCvobcLKccLHWojHJpIPH3iXQlpoNLrdcH44sucvmQOHHjZ9rDrGdbixVmbk/XGy4mtiKuoQDjmQpFJLs6wuSZvqKmL0ky6zOZLry+420UKUaue5ooyeqy9+iopgM989cp1Dcp16bSU1tOJbyFyjedTID5wOk6OAUFFXUDKFRLkmBM3xH7fzIJwPLsxexDMWP2b8g38DqN45ywCuH0VNuv+XmjwOYCjtUakbg6AkGlNoQGBMB5A9g8hh2g7zFE2U4F35FxfHfmwwbxcz3Yl32C/oAwPwDAS6UXdpOhXPZ27Trc9R/SLTla0zzGoXl2QAexnLVZJB/CZMpV7HthfL4lJIrb54u+tdv3/rCiSbw+k88yM9ZxXgKwlHmZycq13iSr0KeMHmUZw6r1VICrLT4D5fy4wq/5DAvfjaWC9oAd9KxwTNUJynUjL+EqpwSTME1zOWMBuIxmZ7p9RCsNq+NmdxW09I1MdNkJeYZNHsIt0qKEO2Z4kvmHadS+Xqv2cqzc93rpuhdl54tg2DISuJljBW3uZjMHrAPqHOYK6zPIM23G2+14Rts4cyLbdxo3Y667UskOo/W/m/PwRhQBwZFkT2vXzDbTtLMZCyfP1155bbfDrpjKZoYH41bO+d97jmEgMPVxFMF0iHESIkiNtDhKuwV058cw0dBZNP+lFsSU/6VWf0E4P/x+IF2eJnokr4uW/2jAKPYjjRb7Cxef70c3qsCl0im1Gj/Uu2eF6sWo0rUiTQq7zS+pYjywnXYwcyOZfI4mKgHj9N2ttHqbRfSlQXhjw5XXy4S7ZbzOovkxVRsphHp8ia3HlyleZS1zHcvoVrdjuNFdEe7edGHzSbpSria/WZ3+cxYV5DCx/4w7FUfyfTW0WO+i7x2YrzKUXZFw/sut+OxJDGkHUxEZPwgCquQcIgxZR9oXekDQk8FF60bqwocupaIoEz6EmaC3C+0Ro6Wgp4eb2tpPJqN+4xXFXQ3TfUfCc5PDNnLZDpLIV1NADKyjZa87mHgmWX57bYdIfIY3pdCGf43xQUXI62kBn3fZxi4SPC8crIjDQ4yzFAaz/XcPJn7xf03VRzIB5Z7qCbBzPQi5jga2E9bCD+ELug8ficEZCk/Cmj8Ro3aLtLxDR1/QffhIHNRTUZCf+S5G7SJBp2b7G31B9+EjcVAFEInZQ2LU7jiN1zf4gu7DR+KwTvkfO9bGx6BNnEQ8XXmN5cT3fEH34SNxwN4A9dgknIEwyWNbeRTwV7WYHBVwFQfbwKb7vOUjiYAiKVT1PczXqCLD/n5UbuLcNxTKoCgExSFNmsFCHI6iJBQFnUbqqbWPHyFceDAOrC/oPpIN+FVaVLrNUa6dLPbvoEQdO4pd1OUylBVkCutsOkqosbNvwcE6qL6g+0hG3MY4ejots1pT3kE4P9QDdfuLKeDfHswD6gu6j2TF2yQcLoqEGurre9EdP1QTfmxJRdn0NlrvD+jmY69Egz+UQvxfgAEALJ4EcRDa/toAAAAASUVORK5CYII=" BEGIN_EXTERN_C() -PHP_FUNCTION(phpversion); -PHP_FUNCTION(phpinfo); -PHP_FUNCTION(phpcredits); -PHP_FUNCTION(php_sapi_name); -PHP_FUNCTION(php_uname); -PHP_FUNCTION(php_ini_scanned_files); -PHP_FUNCTION(php_ini_loaded_file); PHPAPI zend_string *php_info_html_esc(char *string); PHPAPI void php_info_html_esc_write(char *string, int str_len); PHPAPI void php_print_info_htmlhead(void); diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c index 2d4577b462255..8b327c1929183 100644 --- a/ext/standard/iptc.c +++ b/ext/standard/iptc.c @@ -29,7 +29,6 @@ */ #include "php.h" -#include "php_iptc.h" #include "ext/standard/head.h" #include diff --git a/ext/standard/link.c b/ext/standard/link.c index 3172b34d66029..c6ef97247a5fd 100644 --- a/ext/standard/link.c +++ b/ext/standard/link.c @@ -49,7 +49,6 @@ #include #include -#include "php_link.h" #include "php_string.h" #ifndef VOLUME_NAME_NT diff --git a/ext/standard/md5.h b/ext/standard/md5.h index 9463c13892a92..15417990d7bf7 100644 --- a/ext/standard/md5.h +++ b/ext/standard/md5.h @@ -21,9 +21,6 @@ PHPAPI void make_digest(char *md5str, const unsigned char *digest); PHPAPI void make_digest_ex(char *md5str, const unsigned char *digest, int len); -PHP_FUNCTION(md5); -PHP_FUNCTION(md5_file); - #include "ext/standard/basic_functions.h" /* diff --git a/ext/standard/metaphone.c b/ext/standard/metaphone.c index aa6fa0e798a51..970ec1391d1a5 100644 --- a/ext/standard/metaphone.c +++ b/ext/standard/metaphone.c @@ -19,7 +19,6 @@ */ #include "php.h" -#include "php_metaphone.h" static int metaphone(unsigned char *word, size_t word_len, zend_long max_phonemes, zend_string **phoned_word, int traditional); diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c index 8f7ac8b1ec5a3..b33face760ff7 100644 --- a/ext/standard/microtime.c +++ b/ext/standard/microtime.c @@ -36,7 +36,6 @@ #include #include -#include "microtime.h" #include "ext/date/php_date.h" #define NUL '\0' diff --git a/ext/standard/microtime.h b/ext/standard/microtime.h deleted file mode 100644 index 949d10e50c33e..0000000000000 --- a/ext/standard/microtime.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | Copyright (c) The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Author: Paul Panotzki - Bunyip Information Systems | - +----------------------------------------------------------------------+ -*/ - -#ifndef MICROTIME_H -#define MICROTIME_H - -#ifdef HAVE_GETTIMEOFDAY -PHP_FUNCTION(microtime); -PHP_FUNCTION(gettimeofday); -#endif -#ifdef HAVE_GETRUSAGE -PHP_FUNCTION(getrusage); -#endif - -#endif /* MICROTIME_H */ diff --git a/ext/standard/pack.h b/ext/standard/pack.h index ed58b9fcecc89..e3a882e70e854 100644 --- a/ext/standard/pack.h +++ b/ext/standard/pack.h @@ -18,7 +18,5 @@ #define PACK_H PHP_MINIT_FUNCTION(pack); -PHP_FUNCTION(pack); -PHP_FUNCTION(unpack); #endif /* PACK_H */ diff --git a/ext/standard/pageinfo.h b/ext/standard/pageinfo.h index 76543194dc760..0a3fa7b28bb9b 100644 --- a/ext/standard/pageinfo.h +++ b/ext/standard/pageinfo.h @@ -17,12 +17,6 @@ #ifndef PAGEINFO_H #define PAGEINFO_H -PHP_FUNCTION(getmyuid); -PHP_FUNCTION(getmygid); -PHP_FUNCTION(getmypid); -PHP_FUNCTION(getmyinode); -PHP_FUNCTION(getlastmod); - PHPAPI void php_statpage(void); PHPAPI time_t php_getlastmod(void); extern zend_long php_getuid(void); diff --git a/ext/standard/php_array.h b/ext/standard/php_array.h index ce440c454ecbf..c513539dd2a2e 100644 --- a/ext/standard/php_array.h +++ b/ext/standard/php_array.h @@ -23,84 +23,6 @@ PHP_MINIT_FUNCTION(array); PHP_MSHUTDOWN_FUNCTION(array); -PHP_FUNCTION(ksort); -PHP_FUNCTION(krsort); -PHP_FUNCTION(natsort); -PHP_FUNCTION(natcasesort); -PHP_FUNCTION(asort); -PHP_FUNCTION(arsort); -PHP_FUNCTION(sort); -PHP_FUNCTION(rsort); -PHP_FUNCTION(usort); -PHP_FUNCTION(uasort); -PHP_FUNCTION(uksort); -PHP_FUNCTION(array_walk); -PHP_FUNCTION(array_walk_recursive); -PHP_FUNCTION(count); -PHP_FUNCTION(end); -PHP_FUNCTION(prev); -PHP_FUNCTION(next); -PHP_FUNCTION(reset); -PHP_FUNCTION(current); -PHP_FUNCTION(key); -PHP_FUNCTION(min); -PHP_FUNCTION(max); -PHP_FUNCTION(in_array); -PHP_FUNCTION(array_search); -PHP_FUNCTION(extract); -PHP_FUNCTION(compact); -PHP_FUNCTION(array_fill); -PHP_FUNCTION(array_fill_keys); -PHP_FUNCTION(range); -PHP_FUNCTION(shuffle); -PHP_FUNCTION(array_multisort); -PHP_FUNCTION(array_push); -PHP_FUNCTION(array_pop); -PHP_FUNCTION(array_shift); -PHP_FUNCTION(array_unshift); -PHP_FUNCTION(array_splice); -PHP_FUNCTION(array_slice); -PHP_FUNCTION(array_merge); -PHP_FUNCTION(array_merge_recursive); -PHP_FUNCTION(array_replace); -PHP_FUNCTION(array_replace_recursive); -PHP_FUNCTION(array_keys); -PHP_FUNCTION(array_key_first); -PHP_FUNCTION(array_key_last); -PHP_FUNCTION(array_values); -PHP_FUNCTION(array_count_values); -PHP_FUNCTION(array_column); -PHP_FUNCTION(array_reverse); -PHP_FUNCTION(array_reduce); -PHP_FUNCTION(array_pad); -PHP_FUNCTION(array_flip); -PHP_FUNCTION(array_change_key_case); -PHP_FUNCTION(array_rand); -PHP_FUNCTION(array_unique); -PHP_FUNCTION(array_intersect); -PHP_FUNCTION(array_intersect_key); -PHP_FUNCTION(array_intersect_ukey); -PHP_FUNCTION(array_uintersect); -PHP_FUNCTION(array_intersect_assoc); -PHP_FUNCTION(array_uintersect_assoc); -PHP_FUNCTION(array_intersect_uassoc); -PHP_FUNCTION(array_uintersect_uassoc); -PHP_FUNCTION(array_diff); -PHP_FUNCTION(array_diff_key); -PHP_FUNCTION(array_diff_ukey); -PHP_FUNCTION(array_udiff); -PHP_FUNCTION(array_diff_assoc); -PHP_FUNCTION(array_udiff_assoc); -PHP_FUNCTION(array_diff_uassoc); -PHP_FUNCTION(array_udiff_uassoc); -PHP_FUNCTION(array_sum); -PHP_FUNCTION(array_product); -PHP_FUNCTION(array_filter); -PHP_FUNCTION(array_map); -PHP_FUNCTION(array_key_exists); -PHP_FUNCTION(array_chunk); -PHP_FUNCTION(array_combine); - PHPAPI int php_array_merge(HashTable *dest, HashTable *src); PHPAPI int php_array_merge_recursive(HashTable *dest, HashTable *src); PHPAPI int php_array_replace_recursive(HashTable *dest, HashTable *src); diff --git a/ext/standard/php_assert.h b/ext/standard/php_assert.h index 1289cc9b30cb1..a0d81ed84eee7 100644 --- a/ext/standard/php_assert.h +++ b/ext/standard/php_assert.h @@ -22,7 +22,5 @@ PHP_MSHUTDOWN_FUNCTION(assert); PHP_RINIT_FUNCTION(assert); PHP_RSHUTDOWN_FUNCTION(assert); PHP_MINFO_FUNCTION(assert); -PHP_FUNCTION(assert); -PHP_FUNCTION(assert_options); #endif /* PHP_ASSERT_H */ diff --git a/ext/standard/php_browscap.h b/ext/standard/php_browscap.h index aa8eafb0a0479..d19092afa8143 100644 --- a/ext/standard/php_browscap.h +++ b/ext/standard/php_browscap.h @@ -20,6 +20,4 @@ PHP_MINIT_FUNCTION(browscap); PHP_MSHUTDOWN_FUNCTION(browscap); -PHP_FUNCTION(get_browser); - #endif /* PHP_BROWSCAP_H */ diff --git a/ext/standard/php_crypt.h b/ext/standard/php_crypt.h index d3ee90ee84ae4..a7eabbdd66605 100644 --- a/ext/standard/php_crypt.h +++ b/ext/standard/php_crypt.h @@ -20,7 +20,6 @@ #define PHP_CRYPT_H PHPAPI zend_string *php_crypt(const char *password, const int pass_len, const char *salt, int salt_len, zend_bool quiet); -PHP_FUNCTION(crypt); PHP_MINIT_FUNCTION(crypt); PHP_MSHUTDOWN_FUNCTION(crypt); PHP_RINIT_FUNCTION(crypt); diff --git a/ext/standard/php_dir.h b/ext/standard/php_dir.h index 599ac738c0cb6..9343885d8e3ef 100644 --- a/ext/standard/php_dir.h +++ b/ext/standard/php_dir.h @@ -20,18 +20,9 @@ /* directory functions */ PHP_MINIT_FUNCTION(dir); PHP_RINIT_FUNCTION(dir); -PHP_FUNCTION(opendir); PHP_FUNCTION(closedir); -PHP_FUNCTION(chdir); -#if defined(HAVE_CHROOT) && !defined(ZTS) && ENABLE_CHROOT_FUNC -PHP_FUNCTION(chroot); -#endif -PHP_FUNCTION(getcwd); PHP_FUNCTION(rewinddir); PHP_FUNCTION(readdir); -PHP_FUNCTION(getdir); -PHP_FUNCTION(glob); -PHP_FUNCTION(scandir); #define PHP_SCANDIR_SORT_ASCENDING 0 #define PHP_SCANDIR_SORT_DESCENDING 1 diff --git a/ext/standard/php_dns.h b/ext/standard/php_dns.h index 3f4a61f6d511f..b4f99f2a1c61b 100644 --- a/ext/standard/php_dns.h +++ b/ext/standard/php_dns.h @@ -53,23 +53,10 @@ #define HAVE_FULL_DNS_FUNCS 1 #endif -PHP_FUNCTION(gethostbyaddr); -PHP_FUNCTION(gethostbyname); -PHP_FUNCTION(gethostbynamel); - -#ifdef HAVE_GETHOSTNAME -PHP_FUNCTION(gethostname); -#endif - #if defined(PHP_WIN32) || HAVE_DNS_SEARCH_FUNC -PHP_FUNCTION(dns_check_record); - # if defined(PHP_WIN32) || HAVE_FULL_DNS_FUNCS -PHP_FUNCTION(dns_get_mx); -PHP_FUNCTION(dns_get_record); PHP_MINIT_FUNCTION(dns); # endif - #endif /* defined(PHP_WIN32) || HAVE_DNS_SEARCH_FUNC */ #ifndef INT16SZ diff --git a/ext/standard/php_ext_syslog.h b/ext/standard/php_ext_syslog.h index 100f4b3ab5bf8..d9daf43410eb7 100644 --- a/ext/standard/php_ext_syslog.h +++ b/ext/standard/php_ext_syslog.h @@ -28,10 +28,6 @@ PHP_RSHUTDOWN_FUNCTION(syslog); #endif PHP_MSHUTDOWN_FUNCTION(syslog); -PHP_FUNCTION(openlog); -PHP_FUNCTION(syslog); -PHP_FUNCTION(closelog); - #endif #endif /* PHP_EXT_SYSLOG_H */ diff --git a/ext/standard/php_filestat.h b/ext/standard/php_filestat.h index 0e454ac208392..13b79a4e0715a 100644 --- a/ext/standard/php_filestat.h +++ b/ext/standard/php_filestat.h @@ -20,42 +20,6 @@ PHP_RINIT_FUNCTION(filestat); PHP_RSHUTDOWN_FUNCTION(filestat); -PHP_FUNCTION(realpath_cache_size); -PHP_FUNCTION(realpath_cache_get); -PHP_FUNCTION(clearstatcache); -PHP_FUNCTION(fileatime); -PHP_FUNCTION(filectime); -PHP_FUNCTION(filegroup); -PHP_FUNCTION(fileinode); -PHP_FUNCTION(filemtime); -PHP_FUNCTION(fileowner); -PHP_FUNCTION(fileperms); -PHP_FUNCTION(filesize); -PHP_FUNCTION(filetype); -PHP_FUNCTION(is_writable); -PHP_FUNCTION(is_readable); -PHP_FUNCTION(is_executable); -PHP_FUNCTION(is_file); -PHP_FUNCTION(is_dir); -PHP_FUNCTION(is_link); -PHP_FUNCTION(file_exists); -PHP_FUNCTION(stat); -PHP_FUNCTION(lstat); -PHP_FUNCTION(disk_total_space); -PHP_FUNCTION(disk_free_space); -PHP_FUNCTION(chown); -PHP_FUNCTION(chgrp); -#if HAVE_LCHOWN -PHP_FUNCTION(lchown); -#endif -#if HAVE_LCHOWN -PHP_FUNCTION(lchgrp); -#endif -PHP_FUNCTION(chmod); -#if HAVE_UTIME -PHP_FUNCTION(touch); -#endif - #ifdef PHP_WIN32 #define S_IRUSR S_IREAD #define S_IWUSR S_IWRITE diff --git a/ext/standard/php_ftok.h b/ext/standard/php_ftok.h deleted file mode 100644 index 3726c36bd1245..0000000000000 --- a/ext/standard/php_ftok.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | Copyright (c) The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Author: Andrew Sitnikov | - +----------------------------------------------------------------------+ -*/ - -#ifndef PHP_FTOK_H -#define PHP_FTOK_H - -#if HAVE_FTOK -PHP_FUNCTION(ftok); -#endif - -#endif /* PHP_FTOK_H */ diff --git a/ext/standard/php_http.h b/ext/standard/php_http.h index 5a0dba0818a29..728ea33fd1194 100644 --- a/ext/standard/php_http.h +++ b/ext/standard/php_http.h @@ -27,6 +27,4 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, zval *type, char *arg_sep, int enc_type); #define php_url_encode_hash(ht, formstr) php_url_encode_hash_ex((ht), (formstr), NULL, 0, NULL, 0, NULL, 0, NULL) -PHP_FUNCTION(http_build_query); - #endif diff --git a/ext/standard/php_image.h b/ext/standard/php_image.h index 4bd972beac2c6..d532496ea61cd 100644 --- a/ext/standard/php_image.h +++ b/ext/standard/php_image.h @@ -18,12 +18,6 @@ #ifndef PHP_IMAGE_H #define PHP_IMAGE_H -PHP_FUNCTION(getimagesize); -PHP_FUNCTION(getimagesizefromstring); - -PHP_FUNCTION(image_type_to_mime_type); -PHP_FUNCTION(image_type_to_extension); - /* {{{ enum image_filetype This enum is used to have ext/standard/image.c and ext/exif/exif.c use the same constants for file types. diff --git a/ext/standard/php_iptc.h b/ext/standard/php_iptc.h deleted file mode 100644 index 999912599a135..0000000000000 --- a/ext/standard/php_iptc.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | Copyright (c) The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Author: Thies C. Arntzen | - +----------------------------------------------------------------------+ -*/ - -#ifndef PHP_IPTC_H -#define PHP_IPTC_H - -PHP_FUNCTION(iptcparse); -PHP_FUNCTION(iptcembed); - -#endif /* PHP_IPTC_H */ diff --git a/ext/standard/php_lcg.h b/ext/standard/php_lcg.h index 4feddb5c9b6c3..c2aa7e8317bf1 100644 --- a/ext/standard/php_lcg.h +++ b/ext/standard/php_lcg.h @@ -26,7 +26,6 @@ typedef struct { } php_lcg_globals; PHPAPI double php_combined_lcg(void); -PHP_FUNCTION(lcg_value); PHP_MINIT_FUNCTION(lcg); diff --git a/ext/standard/php_link.h b/ext/standard/php_link.h deleted file mode 100644 index fb7d76ba85c38..0000000000000 --- a/ext/standard/php_link.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | Copyright (c) The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Author: | - +----------------------------------------------------------------------+ -*/ - -#ifndef PHP_LINK_H -#define PHP_LINK_H - -#if defined(HAVE_SYMLINK) || defined(PHP_WIN32) - -PHP_FUNCTION(link); -PHP_FUNCTION(readlink); -PHP_FUNCTION(linkinfo); -PHP_FUNCTION(symlink); - -#endif - -#endif /* PHP_LINK_H */ diff --git a/ext/standard/php_mail.h b/ext/standard/php_mail.h index 29fb5b77f498e..3a2ccdc4b12a0 100644 --- a/ext/standard/php_mail.h +++ b/ext/standard/php_mail.h @@ -17,8 +17,6 @@ #ifndef PHP_MAIL_H #define PHP_MAIL_H -PHP_FUNCTION(mail); - PHP_MINFO_FUNCTION(mail); PHPAPI zend_string *php_mail_build_headers(HashTable *headers); diff --git a/ext/standard/php_math.h b/ext/standard/php_math.h index cdc524f4a2a94..a8d1f2dbf368f 100644 --- a/ext/standard/php_math.h +++ b/ext/standard/php_math.h @@ -26,60 +26,6 @@ PHPAPI zend_long _php_math_basetolong(zval *arg, int base); PHPAPI void _php_math_basetozval(zend_string *str, int base, zval *ret); PHPAPI zend_string * _php_math_zvaltobase(zval *arg, int base); -PHP_FUNCTION(sin); -PHP_FUNCTION(cos); -PHP_FUNCTION(tan); -PHP_FUNCTION(asin); -PHP_FUNCTION(acos); -PHP_FUNCTION(atan); -PHP_FUNCTION(atan2); -PHP_FUNCTION(pi); -PHP_FUNCTION(exp); -PHP_FUNCTION(log); -PHP_FUNCTION(log10); -PHP_FUNCTION(is_finite); -PHP_FUNCTION(is_infinite); -PHP_FUNCTION(is_nan); -PHP_FUNCTION(pow); -PHP_FUNCTION(sqrt); -PHP_FUNCTION(rand); -PHP_FUNCTION(mt_srand); -PHP_FUNCTION(mt_rand); -PHP_FUNCTION(mt_getrandmax); -PHP_FUNCTION(abs); -PHP_FUNCTION(ceil); -PHP_FUNCTION(floor); -PHP_FUNCTION(round); -PHP_FUNCTION(decbin); -PHP_FUNCTION(dechex); -PHP_FUNCTION(decoct); -PHP_FUNCTION(bindec); -PHP_FUNCTION(hexdec); -PHP_FUNCTION(octdec); -PHP_FUNCTION(base_convert); -PHP_FUNCTION(number_format); -PHP_FUNCTION(fmod); -PHP_FUNCTION(fdiv); -PHP_FUNCTION(deg2rad); -PHP_FUNCTION(rad2deg); -PHP_FUNCTION(intdiv); - - /* - WARNING: these functions are experimental: they could change their names or - disappear in the next version of PHP! - */ -PHP_FUNCTION(hypot); -PHP_FUNCTION(expm1); -PHP_FUNCTION(log1p); - -PHP_FUNCTION(sinh); -PHP_FUNCTION(cosh); -PHP_FUNCTION(tanh); - -PHP_FUNCTION(asinh); -PHP_FUNCTION(acosh); -PHP_FUNCTION(atanh); - #include #ifndef M_E diff --git a/ext/standard/php_metaphone.h b/ext/standard/php_metaphone.h deleted file mode 100644 index c52bfe66a2c3c..0000000000000 --- a/ext/standard/php_metaphone.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | Copyright (c) The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Author: Thies C. Arntzen | - +----------------------------------------------------------------------+ - */ - -#ifndef PHP_METAPHONE_H -#define PHP_METAPHONE_H - -PHP_FUNCTION(metaphone); - -#endif diff --git a/ext/standard/php_net.h b/ext/standard/php_net.h index 5eb65491aacb2..6f813d3e0aef4 100644 --- a/ext/standard/php_net.h +++ b/ext/standard/php_net.h @@ -22,6 +22,4 @@ PHPAPI zend_string* php_inet_ntop(const struct sockaddr *addr); -PHP_FUNCTION(net_get_interfaces); - #endif /* PHP_NET_H */ diff --git a/ext/standard/php_password.h b/ext/standard/php_password.h index d89f563f8f453..5f9ae671bab73 100644 --- a/ext/standard/php_password.h +++ b/ext/standard/php_password.h @@ -18,12 +18,6 @@ #ifndef PHP_PASSWORD_H #define PHP_PASSWORD_H -PHP_FUNCTION(password_hash); -PHP_FUNCTION(password_verify); -PHP_FUNCTION(password_needs_rehash); -PHP_FUNCTION(password_get_info); -PHP_FUNCTION(password_algos); - PHP_MINIT_FUNCTION(password); PHP_MSHUTDOWN_FUNCTION(password); diff --git a/ext/standard/php_random.h b/ext/standard/php_random.h index c45a3249b9b0a..290b37873d55d 100644 --- a/ext/standard/php_random.h +++ b/ext/standard/php_random.h @@ -19,9 +19,6 @@ BEGIN_EXTERN_C() -PHP_FUNCTION(random_bytes); -PHP_FUNCTION(random_int); - PHP_MINIT_FUNCTION(random); PHP_MSHUTDOWN_FUNCTION(random); diff --git a/ext/standard/php_standard.h b/ext/standard/php_standard.h index 21926d316f06f..bf89880dffe89 100644 --- a/ext/standard/php_standard.h +++ b/ext/standard/php_standard.h @@ -32,28 +32,21 @@ #include "php_browscap.h" #include "pack.h" #include "datetime.h" -#include "microtime.h" #include "url.h" #include "pageinfo.h" -#include "php_link.h" #include "fsock.h" #include "php_image.h" -#include "php_iptc.h" #include "info.h" -#include "uniqid.h" #include "php_var.h" #include "quot_print.h" #include "dl.h" #include "php_crypt.h" #include "head.h" #include "php_lcg.h" -#include "php_metaphone.h" #include "php_output.h" #include "php_array.h" #include "php_assert.h" #include "php_versioning.h" -#include "php_ftok.h" -#include "php_type.h" #include "php_password.h" #include "php_random.h" diff --git a/ext/standard/php_string.h b/ext/standard/php_string.h index 7492902c99169..7a813c26103e4 100644 --- a/ext/standard/php_string.h +++ b/ext/standard/php_string.h @@ -18,79 +18,6 @@ #ifndef PHP_STRING_H #define PHP_STRING_H -PHP_FUNCTION(strspn); -PHP_FUNCTION(strcspn); -PHP_FUNCTION(str_replace); -PHP_FUNCTION(str_ireplace); -PHP_FUNCTION(rtrim); -PHP_FUNCTION(trim); -PHP_FUNCTION(ltrim); -PHP_FUNCTION(soundex); -PHP_FUNCTION(levenshtein); - -PHP_FUNCTION(count_chars); -PHP_FUNCTION(wordwrap); -PHP_FUNCTION(explode); -PHP_FUNCTION(implode); -PHP_FUNCTION(strtok); -PHP_FUNCTION(strtoupper); -PHP_FUNCTION(strtolower); -PHP_FUNCTION(basename); -PHP_FUNCTION(dirname); -PHP_FUNCTION(pathinfo); -PHP_FUNCTION(strstr); -PHP_FUNCTION(str_contains); -PHP_FUNCTION(strpos); -PHP_FUNCTION(stripos); -PHP_FUNCTION(strrpos); -PHP_FUNCTION(strripos); -PHP_FUNCTION(strrchr); -PHP_FUNCTION(substr); -PHP_FUNCTION(quotemeta); -PHP_FUNCTION(ucfirst); -PHP_FUNCTION(lcfirst); -PHP_FUNCTION(ucwords); -PHP_FUNCTION(strtr); -PHP_FUNCTION(strrev); -PHP_FUNCTION(hebrev); -PHP_FUNCTION(sprintf); -PHP_FUNCTION(printf); -PHP_FUNCTION(vprintf); -PHP_FUNCTION(vsprintf); -PHP_FUNCTION(addcslashes); -PHP_FUNCTION(addslashes); -PHP_FUNCTION(stripcslashes); -PHP_FUNCTION(stripslashes); -PHP_FUNCTION(chr); -PHP_FUNCTION(ord); -PHP_FUNCTION(nl2br); -PHP_FUNCTION(setlocale); -PHP_FUNCTION(localeconv); -PHP_FUNCTION(nl_langinfo); -PHP_FUNCTION(stristr); -PHP_FUNCTION(chunk_split); -PHP_FUNCTION(parse_str); -PHP_FUNCTION(str_getcsv); -PHP_FUNCTION(bin2hex); -PHP_FUNCTION(hex2bin); -PHP_FUNCTION(similar_text); -PHP_FUNCTION(strip_tags); -PHP_FUNCTION(str_repeat); -PHP_FUNCTION(substr_replace); -PHP_FUNCTION(strnatcmp); -PHP_FUNCTION(strnatcasecmp); -PHP_FUNCTION(substr_count); -PHP_FUNCTION(str_pad); -PHP_FUNCTION(sscanf); -PHP_FUNCTION(str_shuffle); -PHP_FUNCTION(str_word_count); -PHP_FUNCTION(str_split); -PHP_FUNCTION(strpbrk); -PHP_FUNCTION(substr_compare); -PHP_FUNCTION(utf8_encode); -PHP_FUNCTION(utf8_decode); -PHP_FUNCTION(strcoll); - #if defined(ZTS) PHP_MINIT_FUNCTION(localeconv); PHP_MSHUTDOWN_FUNCTION(localeconv); diff --git a/ext/standard/php_type.h b/ext/standard/php_type.h deleted file mode 100644 index be056201dbfb9..0000000000000 --- a/ext/standard/php_type.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | Copyright (c) The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Author: Rasmus Lerdorf | - +----------------------------------------------------------------------+ -*/ - -#ifndef PHP_TYPE_H -#define PHP_TYPE_H - -PHP_FUNCTION(intval); -PHP_FUNCTION(floatval); -PHP_FUNCTION(strval); -PHP_FUNCTION(boolval); -PHP_FUNCTION(gettype); -PHP_FUNCTION(settype); -PHP_FUNCTION(is_null); -PHP_FUNCTION(is_resource); -PHP_FUNCTION(is_bool); -PHP_FUNCTION(is_int); -PHP_FUNCTION(is_float); -PHP_FUNCTION(is_numeric); -PHP_FUNCTION(is_string); -PHP_FUNCTION(is_array); -PHP_FUNCTION(is_object); -PHP_FUNCTION(is_scalar); -PHP_FUNCTION(is_callable); -PHP_FUNCTION(is_iterable); -PHP_FUNCTION(is_countable); - -#endif diff --git a/ext/standard/php_uuencode.h b/ext/standard/php_uuencode.h index 40a1a20b2105f..82549f56d1316 100644 --- a/ext/standard/php_uuencode.h +++ b/ext/standard/php_uuencode.h @@ -17,9 +17,6 @@ #ifndef PHP_UUENCODE_H #define PHP_UUENCODE_H -PHP_FUNCTION(convert_uudecode); -PHP_FUNCTION(convert_uuencode); - PHPAPI zend_string *php_uudecode(char *src, size_t src_len); PHPAPI zend_string *php_uuencode(char *src, size_t src_len); diff --git a/ext/standard/php_var.h b/ext/standard/php_var.h index d9abae86d2518..cab0f6d4ddb43 100644 --- a/ext/standard/php_var.h +++ b/ext/standard/php_var.h @@ -21,13 +21,6 @@ #include "zend_smart_str_public.h" PHP_MINIT_FUNCTION(var); -PHP_FUNCTION(var_dump); -PHP_FUNCTION(var_export); -PHP_FUNCTION(debug_zval_dump); -PHP_FUNCTION(serialize); -PHP_FUNCTION(unserialize); -PHP_FUNCTION(memory_get_usage); -PHP_FUNCTION(memory_get_peak_usage); PHPAPI void php_var_dump(zval *struc, int level); PHPAPI void php_var_export(zval *struc, int level); diff --git a/ext/standard/php_versioning.h b/ext/standard/php_versioning.h index 1c5041e0dca86..c930d7ef25900 100644 --- a/ext/standard/php_versioning.h +++ b/ext/standard/php_versioning.h @@ -21,6 +21,5 @@ PHPAPI char *php_canonicalize_version(const char *); PHPAPI int php_version_compare(const char *, const char *); -PHP_FUNCTION(version_compare); #endif diff --git a/ext/standard/quot_print.h b/ext/standard/quot_print.h index d27f6f1d2d975..e30ca990e1eb8 100644 --- a/ext/standard/quot_print.h +++ b/ext/standard/quot_print.h @@ -20,7 +20,4 @@ PHPAPI zend_string *php_quot_print_decode(const unsigned char *str, size_t length, int replace_us_by_ws); PHPAPI zend_string *php_quot_print_encode(const unsigned char *str, size_t length); -PHP_FUNCTION(quoted_printable_decode); -PHP_FUNCTION(quoted_printable_encode); - #endif /* QUOT_PRINT_H */ diff --git a/ext/standard/sha1.h b/ext/standard/sha1.h index b1788a673908f..81a9cae460a4c 100644 --- a/ext/standard/sha1.h +++ b/ext/standard/sha1.h @@ -31,7 +31,4 @@ PHPAPI void PHP_SHA1Update(PHP_SHA1_CTX *, const unsigned char *, size_t); PHPAPI void PHP_SHA1Final(unsigned char[20], PHP_SHA1_CTX *); PHPAPI void make_sha1_digest(char *sha1str, unsigned char *digest); -PHP_FUNCTION(sha1); -PHP_FUNCTION(sha1_file); - #endif diff --git a/ext/standard/streamsfuncs.h b/ext/standard/streamsfuncs.h index 6a94169dc6785..7210ee06a31b9 100644 --- a/ext/standard/streamsfuncs.h +++ b/ext/standard/streamsfuncs.h @@ -18,50 +18,3 @@ #define PHP_STREAM_CLIENT_PERSISTENT 1 #define PHP_STREAM_CLIENT_ASYNC_CONNECT 2 #define PHP_STREAM_CLIENT_CONNECT 4 - -PHP_FUNCTION(stream_socket_client); -PHP_FUNCTION(stream_socket_server); -PHP_FUNCTION(stream_socket_accept); -PHP_FUNCTION(stream_socket_get_name); -PHP_FUNCTION(stream_socket_recvfrom); -PHP_FUNCTION(stream_socket_sendto); - -PHP_FUNCTION(stream_copy_to_stream); -PHP_FUNCTION(stream_get_contents); - -PHP_FUNCTION(stream_set_blocking); -PHP_FUNCTION(stream_select); -PHP_FUNCTION(stream_set_timeout); -PHP_FUNCTION(stream_set_read_buffer); -PHP_FUNCTION(stream_set_write_buffer); -PHP_FUNCTION(stream_set_chunk_size); -PHP_FUNCTION(stream_get_transports); -PHP_FUNCTION(stream_get_wrappers); -PHP_FUNCTION(stream_get_line); -PHP_FUNCTION(stream_get_meta_data); -PHP_FUNCTION(stream_wrapper_register); -PHP_FUNCTION(stream_wrapper_unregister); -PHP_FUNCTION(stream_wrapper_restore); -PHP_FUNCTION(stream_context_create); -PHP_FUNCTION(stream_context_set_params); -PHP_FUNCTION(stream_context_get_params); -PHP_FUNCTION(stream_context_set_option); -PHP_FUNCTION(stream_context_get_options); -PHP_FUNCTION(stream_context_get_default); -PHP_FUNCTION(stream_context_set_default); -PHP_FUNCTION(stream_filter_prepend); -PHP_FUNCTION(stream_filter_append); -PHP_FUNCTION(stream_filter_remove); -PHP_FUNCTION(stream_socket_enable_crypto); -PHP_FUNCTION(stream_socket_shutdown); -PHP_FUNCTION(stream_resolve_include_path); -PHP_FUNCTION(stream_is_local); -PHP_FUNCTION(stream_supports_lock); -PHP_FUNCTION(stream_isatty); -#ifdef PHP_WIN32 -PHP_FUNCTION(sapi_windows_vt100_support); -#endif - -#if HAVE_SOCKETPAIR -PHP_FUNCTION(stream_socket_pair); -#endif diff --git a/ext/standard/uniqid.c b/ext/standard/uniqid.c index 08a315edbe137..94684427bba77 100644 --- a/ext/standard/uniqid.c +++ b/ext/standard/uniqid.c @@ -32,7 +32,6 @@ #endif #include "php_lcg.h" -#include "uniqid.h" #ifdef HAVE_GETTIMEOFDAY ZEND_TLS struct timeval prev_tv = { 0, 0 }; diff --git a/ext/standard/uniqid.h b/ext/standard/uniqid.h deleted file mode 100644 index ed1472ff06a2b..0000000000000 --- a/ext/standard/uniqid.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | Copyright (c) The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Author: Stig Sæther Bakken | - +----------------------------------------------------------------------+ - */ - -#ifndef UNIQID_H -#define UNIQID_H - -#ifdef HAVE_GETTIMEOFDAY -PHP_FUNCTION(uniqid); -#endif - -#endif /* UNIQID_H */ diff --git a/ext/standard/url.h b/ext/standard/url.h index d242518a085d5..02ebeed2bb9dc 100644 --- a/ext/standard/url.h +++ b/ext/standard/url.h @@ -37,13 +37,6 @@ PHPAPI zend_string *php_url_encode(char const *s, size_t len); PHPAPI zend_string *php_raw_url_encode(char const *s, size_t len); PHPAPI char *php_replace_controlchars_ex(char *str, size_t len); -PHP_FUNCTION(parse_url); -PHP_FUNCTION(urlencode); -PHP_FUNCTION(urldecode); -PHP_FUNCTION(rawurlencode); -PHP_FUNCTION(rawurldecode); -PHP_FUNCTION(get_headers); - #define PHP_URL_SCHEME 0 #define PHP_URL_HOST 1 #define PHP_URL_PORT 2 From d2c92d7fd326b011b509b6daedee5f4e035fcae1 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 3 Apr 2020 16:18:47 +0200 Subject: [PATCH 029/338] Stubs: Store information per-class We'll need this if we want to generate method entries. --- build/gen_stub.php | 50 +++- ext/fileinfo/fileinfo_arginfo.h | 38 +-- ext/mysqli/mysqli_arginfo.h | 486 ++++++++++++++++---------------- ext/zend_test/test_arginfo.h | 18 +- 4 files changed, 308 insertions(+), 284 deletions(-) diff --git a/build/gen_stub.php b/build/gen_stub.php index d25ef2dc22d58..e94399fbe3118 100644 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -350,16 +350,39 @@ public function getArgInfoName(): string { } } +class ClassInfo { + /** @var string */ + public $name; + /** @var FuncInfo[] */ + public $funcInfos; + + public function __construct(string $name, array $funcInfos) { + $this->name = $name; + $this->funcInfos = $funcInfos; + } +} + class FileInfo { /** @var FuncInfo[] */ public $funcInfos; + /** @var ClassInfo[] */ + public $classInfos; /** @var bool */ public $generateFunctionEntries; - public function __construct(array $funcInfos, bool $generateFunctionEntries) { + public function __construct( + array $funcInfos, array $classInfos, bool $generateFunctionEntries) { $this->funcInfos = $funcInfos; + $this->classInfos = $classInfos; $this->generateFunctionEntries = $generateFunctionEntries; } + + public function getAllFuncInfos(): iterable { + yield from $this->funcInfos; + foreach ($this->classInfos as $classInfo) { + yield from $classInfo->funcInfos; + } + } } function parseFunctionLike( @@ -507,6 +530,7 @@ function parseStubFile(string $fileName): FileInfo { } $funcInfos = []; + $classInfos = []; $conds = []; foreach ($stmts as $stmt) { $cond = handlePreprocessorConditions($conds, $stmt); @@ -521,6 +545,7 @@ function parseStubFile(string $fileName): FileInfo { if ($stmt instanceof Stmt\ClassLike) { $className = $stmt->name->toString(); + $methodInfos = []; foreach ($stmt->stmts as $classStmt) { $cond = handlePreprocessorConditions($conds, $classStmt); if ($classStmt instanceof Stmt\Nop) { @@ -531,16 +556,18 @@ function parseStubFile(string $fileName): FileInfo { throw new Exception("Not implemented {$classStmt->getType()}"); } - $funcInfos[] = parseFunctionLike( + $methodInfos[] = parseFunctionLike( $classStmt->name->toString(), $className, $classStmt, $cond); } + + $classInfos[] = new ClassInfo($className, $methodInfos); continue; } throw new Exception("Unexpected node {$stmt->getType()}"); } - return new FileInfo($funcInfos, $generateFunctionEntries); + return new FileInfo($funcInfos, $classInfos, $generateFunctionEntries); } function funcInfoToCode(FuncInfo $funcInfo): string { @@ -638,10 +665,11 @@ function findEquivalentFuncInfo(array $generatedFuncInfos, $funcInfo): ?FuncInfo return null; } +/** @param FuncInfo[] $funcInfos */ function generateCodeWithConditions( - FileInfo $fileInfo, string $separator, Closure $codeGenerator): string { + iterable $funcInfos, string $separator, Closure $codeGenerator): string { $code = ""; - foreach ($fileInfo->funcInfos as $funcInfo) { + foreach ($funcInfos as $funcInfo) { $funcCode = $codeGenerator($funcInfo); if ($funcCode === null) { continue; @@ -665,7 +693,7 @@ function generateArgInfoCode(FileInfo $fileInfo): string { $code = "/* This is a generated file, edit the .stub.php file instead. */\n"; $generatedFuncInfos = []; $code .= generateCodeWithConditions( - $fileInfo, "\n", + $fileInfo->getAllFuncInfos(), "\n", function(FuncInfo $funcInfo) use(&$generatedFuncInfos) { /* If there already is an equivalent arginfo structure, only emit a #define */ if ($generatedFuncInfo = findEquivalentFuncInfo($generatedFuncInfos, $funcInfo)) { @@ -684,8 +712,8 @@ function(FuncInfo $funcInfo) use(&$generatedFuncInfos) { if ($fileInfo->generateFunctionEntries) { $code .= "\n\n"; - $code .= generateCodeWithConditions($fileInfo, "", function(FuncInfo $funcInfo) { - if ($funcInfo->className || $funcInfo->alias) { + $code .= generateCodeWithConditions($fileInfo->funcInfos, "", function(FuncInfo $funcInfo) { + if ($funcInfo->alias) { return null; } @@ -693,11 +721,7 @@ function(FuncInfo $funcInfo) use(&$generatedFuncInfos) { }); $code .= "\n\nstatic const zend_function_entry ext_functions[] = {\n"; - $code .= generateCodeWithConditions($fileInfo, "", function(FuncInfo $funcInfo) { - if ($funcInfo->className) { - return null; - } - + $code .= generateCodeWithConditions($fileInfo->funcInfos, "", function(FuncInfo $funcInfo) { if ($funcInfo->alias) { return sprintf( "\tZEND_FALIAS(%s, %s, %s)\n", diff --git a/ext/fileinfo/fileinfo_arginfo.h b/ext/fileinfo/fileinfo_arginfo.h index 8f0f356bb08e6..266fc31a33767 100644 --- a/ext/fileinfo/fileinfo_arginfo.h +++ b/ext/fileinfo/fileinfo_arginfo.h @@ -1,28 +1,10 @@ /* This is a generated file, edit the .stub.php file instead. */ -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_finfo___construct, 0, 0, 0) +ZEND_BEGIN_ARG_INFO_EX(arginfo_finfo_open, 0, 0, 0) ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, arg, IS_STRING, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_finfo_file, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, file_name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) - ZEND_ARG_INFO(0, context) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_finfo_buffer, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) - ZEND_ARG_INFO(0, context) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_finfo_set_flags, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) -ZEND_END_ARG_INFO() - -#define arginfo_finfo_open arginfo_class_finfo___construct - ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_finfo_close, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, finfo) ZEND_END_ARG_INFO() @@ -49,3 +31,21 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mime_content_type, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, filename) ZEND_END_ARG_INFO() + +#define arginfo_class_finfo___construct arginfo_finfo_open + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_finfo_file, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, file_name, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_INFO(0, context) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_finfo_buffer, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_INFO(0, context) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_finfo_set_flags, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) +ZEND_END_ARG_INFO() diff --git a/ext/mysqli/mysqli_arginfo.h b/ext/mysqli/mysqli_arginfo.h index b5307d917f7ba..74c80bd13a56f 100644 --- a/ext/mysqli/mysqli_arginfo.h +++ b/ext/mysqli/mysqli_arginfo.h @@ -1,248 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. */ -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli___construct, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, user, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, database, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, port, IS_LONG, 1) - ZEND_ARG_TYPE_INFO(0, socket, IS_STRING, 1) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_autocommit, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, mode, _IS_BOOL, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_begin_transaction, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_change_user, 0, 0, 3) - ZEND_ARG_TYPE_INFO(0, user, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, database, IS_STRING, 1) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_character_set_name, 0, 0, 0) -ZEND_END_ARG_INFO() - -#define arginfo_class_mysqli_close arginfo_class_mysqli_character_set_name - -#define arginfo_class_mysqli_commit arginfo_class_mysqli_begin_transaction - -#define arginfo_class_mysqli_connect arginfo_class_mysqli___construct - -#define arginfo_class_mysqli_dump_debug_info arginfo_class_mysqli_character_set_name - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_debug, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, debug_options, IS_STRING, 0) -ZEND_END_ARG_INFO() - -#define arginfo_class_mysqli_get_charset arginfo_class_mysqli_character_set_name - -#define arginfo_class_mysqli_get_client_info arginfo_class_mysqli_character_set_name - -#define arginfo_class_mysqli_get_connection_stats arginfo_class_mysqli_character_set_name - -#define arginfo_class_mysqli_get_server_info arginfo_class_mysqli_character_set_name - -#define arginfo_class_mysqli_get_warnings arginfo_class_mysqli_character_set_name - -#define arginfo_class_mysqli_init arginfo_class_mysqli_character_set_name - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_kill, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, connection_id, IS_LONG, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_multi_query, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0) -ZEND_END_ARG_INFO() - -#define arginfo_class_mysqli_more_results arginfo_class_mysqli_character_set_name - -#define arginfo_class_mysqli_next_result arginfo_class_mysqli_character_set_name - -#define arginfo_class_mysqli_ping arginfo_class_mysqli_character_set_name - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_poll, 0, 0, 4) - ZEND_ARG_TYPE_INFO(1, read, IS_ARRAY, 1) - ZEND_ARG_TYPE_INFO(1, write, IS_ARRAY, 1) - ZEND_ARG_TYPE_INFO(1, error, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, sec, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, usec, IS_LONG, 0) -ZEND_END_ARG_INFO() - -#define arginfo_class_mysqli_prepare arginfo_class_mysqli_multi_query - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_query, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, resultmode, IS_LONG, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_real_connect, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, user, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, database, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, port, IS_LONG, 1) - ZEND_ARG_TYPE_INFO(0, socket, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_real_escape_string, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, string_to_escape, IS_STRING, 0) -ZEND_END_ARG_INFO() - -#define arginfo_class_mysqli_reap_async_query arginfo_class_mysqli_character_set_name - -#define arginfo_class_mysqli_escape_string arginfo_class_mysqli_real_escape_string - -#define arginfo_class_mysqli_real_query arginfo_class_mysqli_multi_query - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_release_savepoint, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) -ZEND_END_ARG_INFO() - -#define arginfo_class_mysqli_rollback arginfo_class_mysqli_begin_transaction - -#define arginfo_class_mysqli_savepoint arginfo_class_mysqli_release_savepoint - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_select_db, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, database, IS_STRING, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_set_charset, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, charset, IS_STRING, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_options, 0, 0, 2) - ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0) - ZEND_ARG_INFO(0, value) -ZEND_END_ARG_INFO() - -#define arginfo_class_mysqli_set_opt arginfo_class_mysqli_options - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_ssl_set, 0, 0, 5) - ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, cert, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, certificate_authority, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, certificate_authority_path, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, cipher, IS_STRING, 0) -ZEND_END_ARG_INFO() - -#define arginfo_class_mysqli_stat arginfo_class_mysqli_character_set_name - -#define arginfo_class_mysqli_stmt_init arginfo_class_mysqli_character_set_name - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_store_result, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) -ZEND_END_ARG_INFO() - -#define arginfo_class_mysqli_thread_safe arginfo_class_mysqli_character_set_name - -#define arginfo_class_mysqli_use_result arginfo_class_mysqli_character_set_name - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_refresh, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result___construct, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, mysqli_link, IS_OBJECT, 0) - ZEND_ARG_TYPE_INFO(0, resmode, IS_LONG, 0) -ZEND_END_ARG_INFO() - -#define arginfo_class_mysqli_result_close arginfo_class_mysqli_character_set_name - -#define arginfo_class_mysqli_result_free arginfo_class_mysqli_character_set_name - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result_data_seek, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) -ZEND_END_ARG_INFO() - -#define arginfo_class_mysqli_result_fetch_field arginfo_class_mysqli_character_set_name - -#define arginfo_class_mysqli_result_fetch_fields arginfo_class_mysqli_character_set_name - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result_fetch_field_direct, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, field_nr, IS_LONG, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result_fetch_all, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, result_type, IS_LONG, 0) -ZEND_END_ARG_INFO() - -#define arginfo_class_mysqli_result_fetch_array arginfo_class_mysqli_result_fetch_all - -#define arginfo_class_mysqli_result_fetch_assoc arginfo_class_mysqli_character_set_name - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result_fetch_object, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, class_name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, params, IS_ARRAY, 0) -ZEND_END_ARG_INFO() - -#define arginfo_class_mysqli_result_fetch_row arginfo_class_mysqli_character_set_name - -#define arginfo_class_mysqli_result_field_seek arginfo_class_mysqli_result_fetch_field_direct - -#define arginfo_class_mysqli_result_free_result arginfo_class_mysqli_character_set_name - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt___construct, 0, 0, 1) - ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) - ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_attr_get, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_attr_set, 0, 0, 2) - ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, mode_in, IS_LONG, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_bind_param, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, types, IS_STRING, 0) - ZEND_ARG_VARIADIC_INFO(1, vars) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_bind_result, 0, 0, 0) - ZEND_ARG_VARIADIC_INFO(1, vars) -ZEND_END_ARG_INFO() - -#define arginfo_class_mysqli_stmt_close arginfo_class_mysqli_character_set_name - -#define arginfo_class_mysqli_stmt_data_seek arginfo_class_mysqli_result_data_seek - -#define arginfo_class_mysqli_stmt_execute arginfo_class_mysqli_character_set_name - -#define arginfo_class_mysqli_stmt_fetch arginfo_class_mysqli_character_set_name - -#define arginfo_class_mysqli_stmt_get_warnings arginfo_class_mysqli_character_set_name - -#define arginfo_class_mysqli_stmt_result_metadata arginfo_class_mysqli_character_set_name - -#define arginfo_class_mysqli_stmt_more_results arginfo_class_mysqli_character_set_name - -#define arginfo_class_mysqli_stmt_next_result arginfo_class_mysqli_character_set_name - -#define arginfo_class_mysqli_stmt_num_rows arginfo_class_mysqli_character_set_name - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_send_long_data, 0, 0, 2) - ZEND_ARG_TYPE_INFO(0, param_nr, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) -ZEND_END_ARG_INFO() - -#define arginfo_class_mysqli_stmt_free_result arginfo_class_mysqli_character_set_name - -#define arginfo_class_mysqli_stmt_reset arginfo_class_mysqli_character_set_name - -#define arginfo_class_mysqli_stmt_prepare arginfo_class_mysqli_multi_query - -#define arginfo_class_mysqli_stmt_store_result arginfo_class_mysqli_character_set_name - -#define arginfo_class_mysqli_stmt_get_result arginfo_class_mysqli_character_set_name - ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_affected_rows, 0, 1, MAY_BE_LONG|MAY_BE_STRING) ZEND_ARG_OBJ_INFO(0, mysql_link, mysqli, 0) ZEND_END_ARG_INFO() @@ -653,3 +410,246 @@ ZEND_END_ARG_INFO() #define arginfo_mysqli_escape_string arginfo_mysqli_real_escape_string #define arginfo_mysqli_set_opt arginfo_mysqli_options + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli___construct, 0, 0, 0) + ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 1) + ZEND_ARG_TYPE_INFO(0, user, IS_STRING, 1) + ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 1) + ZEND_ARG_TYPE_INFO(0, database, IS_STRING, 1) + ZEND_ARG_TYPE_INFO(0, port, IS_LONG, 1) + ZEND_ARG_TYPE_INFO(0, socket, IS_STRING, 1) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_autocommit, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, mode, _IS_BOOL, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_begin_transaction, 0, 0, 0) + ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_change_user, 0, 0, 3) + ZEND_ARG_TYPE_INFO(0, user, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, database, IS_STRING, 1) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_character_set_name, 0, 0, 0) +ZEND_END_ARG_INFO() + +#define arginfo_class_mysqli_close arginfo_class_mysqli_character_set_name + +#define arginfo_class_mysqli_commit arginfo_class_mysqli_begin_transaction + +#define arginfo_class_mysqli_connect arginfo_class_mysqli___construct + +#define arginfo_class_mysqli_dump_debug_info arginfo_class_mysqli_character_set_name + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_debug, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, debug_options, IS_STRING, 0) +ZEND_END_ARG_INFO() + +#define arginfo_class_mysqli_get_charset arginfo_class_mysqli_character_set_name + +#define arginfo_class_mysqli_get_client_info arginfo_class_mysqli_character_set_name + +#define arginfo_class_mysqli_get_connection_stats arginfo_class_mysqli_character_set_name + +#define arginfo_class_mysqli_get_server_info arginfo_class_mysqli_character_set_name + +#define arginfo_class_mysqli_get_warnings arginfo_class_mysqli_character_set_name + +#define arginfo_class_mysqli_init arginfo_class_mysqli_character_set_name + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_kill, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, connection_id, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_multi_query, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0) +ZEND_END_ARG_INFO() + +#define arginfo_class_mysqli_more_results arginfo_class_mysqli_character_set_name + +#define arginfo_class_mysqli_next_result arginfo_class_mysqli_character_set_name + +#define arginfo_class_mysqli_ping arginfo_class_mysqli_character_set_name + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_poll, 0, 0, 4) + ZEND_ARG_TYPE_INFO(1, read, IS_ARRAY, 1) + ZEND_ARG_TYPE_INFO(1, write, IS_ARRAY, 1) + ZEND_ARG_TYPE_INFO(1, error, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO(0, sec, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, usec, IS_LONG, 0) +ZEND_END_ARG_INFO() + +#define arginfo_class_mysqli_prepare arginfo_class_mysqli_multi_query + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_query, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, resultmode, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_real_connect, 0, 0, 0) + ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 1) + ZEND_ARG_TYPE_INFO(0, user, IS_STRING, 1) + ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 1) + ZEND_ARG_TYPE_INFO(0, database, IS_STRING, 1) + ZEND_ARG_TYPE_INFO(0, port, IS_LONG, 1) + ZEND_ARG_TYPE_INFO(0, socket, IS_STRING, 1) + ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_real_escape_string, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, string_to_escape, IS_STRING, 0) +ZEND_END_ARG_INFO() + +#define arginfo_class_mysqli_reap_async_query arginfo_class_mysqli_character_set_name + +#define arginfo_class_mysqli_escape_string arginfo_class_mysqli_real_escape_string + +#define arginfo_class_mysqli_real_query arginfo_class_mysqli_multi_query + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_release_savepoint, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) +ZEND_END_ARG_INFO() + +#define arginfo_class_mysqli_rollback arginfo_class_mysqli_begin_transaction + +#define arginfo_class_mysqli_savepoint arginfo_class_mysqli_release_savepoint + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_select_db, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, database, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_set_charset, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, charset, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_options, 0, 0, 2) + ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() + +#define arginfo_class_mysqli_set_opt arginfo_class_mysqli_options + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_ssl_set, 0, 0, 5) + ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, cert, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, certificate_authority, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, certificate_authority_path, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, cipher, IS_STRING, 0) +ZEND_END_ARG_INFO() + +#define arginfo_class_mysqli_stat arginfo_class_mysqli_character_set_name + +#define arginfo_class_mysqli_stmt_init arginfo_class_mysqli_character_set_name + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_store_result, 0, 0, 0) + ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) +ZEND_END_ARG_INFO() + +#define arginfo_class_mysqli_thread_safe arginfo_class_mysqli_character_set_name + +#define arginfo_class_mysqli_use_result arginfo_class_mysqli_character_set_name + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_refresh, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result___construct, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, mysqli_link, IS_OBJECT, 0) + ZEND_ARG_TYPE_INFO(0, resmode, IS_LONG, 0) +ZEND_END_ARG_INFO() + +#define arginfo_class_mysqli_result_close arginfo_class_mysqli_character_set_name + +#define arginfo_class_mysqli_result_free arginfo_class_mysqli_character_set_name + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result_data_seek, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) +ZEND_END_ARG_INFO() + +#define arginfo_class_mysqli_result_fetch_field arginfo_class_mysqli_character_set_name + +#define arginfo_class_mysqli_result_fetch_fields arginfo_class_mysqli_character_set_name + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result_fetch_field_direct, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, field_nr, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result_fetch_all, 0, 0, 0) + ZEND_ARG_TYPE_INFO(0, result_type, IS_LONG, 0) +ZEND_END_ARG_INFO() + +#define arginfo_class_mysqli_result_fetch_array arginfo_class_mysqli_result_fetch_all + +#define arginfo_class_mysqli_result_fetch_assoc arginfo_class_mysqli_character_set_name + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result_fetch_object, 0, 0, 0) + ZEND_ARG_TYPE_INFO(0, class_name, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, params, IS_ARRAY, 0) +ZEND_END_ARG_INFO() + +#define arginfo_class_mysqli_result_fetch_row arginfo_class_mysqli_character_set_name + +#define arginfo_class_mysqli_result_field_seek arginfo_class_mysqli_result_fetch_field_direct + +#define arginfo_class_mysqli_result_free_result arginfo_class_mysqli_character_set_name + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt___construct, 0, 0, 1) + ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) + ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_attr_get, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_attr_set, 0, 0, 2) + ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, mode_in, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_bind_param, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, types, IS_STRING, 0) + ZEND_ARG_VARIADIC_INFO(1, vars) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_bind_result, 0, 0, 0) + ZEND_ARG_VARIADIC_INFO(1, vars) +ZEND_END_ARG_INFO() + +#define arginfo_class_mysqli_stmt_close arginfo_class_mysqli_character_set_name + +#define arginfo_class_mysqli_stmt_data_seek arginfo_class_mysqli_result_data_seek + +#define arginfo_class_mysqli_stmt_execute arginfo_class_mysqli_character_set_name + +#define arginfo_class_mysqli_stmt_fetch arginfo_class_mysqli_character_set_name + +#define arginfo_class_mysqli_stmt_get_warnings arginfo_class_mysqli_character_set_name + +#define arginfo_class_mysqli_stmt_result_metadata arginfo_class_mysqli_character_set_name + +#define arginfo_class_mysqli_stmt_more_results arginfo_class_mysqli_character_set_name + +#define arginfo_class_mysqli_stmt_next_result arginfo_class_mysqli_character_set_name + +#define arginfo_class_mysqli_stmt_num_rows arginfo_class_mysqli_character_set_name + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_send_long_data, 0, 0, 2) + ZEND_ARG_TYPE_INFO(0, param_nr, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) +ZEND_END_ARG_INFO() + +#define arginfo_class_mysqli_stmt_free_result arginfo_class_mysqli_character_set_name + +#define arginfo_class_mysqli_stmt_reset arginfo_class_mysqli_character_set_name + +#define arginfo_class_mysqli_stmt_prepare arginfo_class_mysqli_multi_query + +#define arginfo_class_mysqli_stmt_store_result arginfo_class_mysqli_character_set_name + +#define arginfo_class_mysqli_stmt_get_result arginfo_class_mysqli_character_set_name diff --git a/ext/zend_test/test_arginfo.h b/ext/zend_test/test_arginfo.h index 3a4c52977f3c3..89a72f63ae688 100644 --- a/ext/zend_test/test_arginfo.h +++ b/ext/zend_test/test_arginfo.h @@ -1,14 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. */ -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class__ZendTestClass_is_object, 0, 0, IS_LONG, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class__ZendTestClass___toString, 0, 0, IS_STRING, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class__ZendTestTrait_testMethod, 0, 0, _IS_BOOL, 0) -ZEND_END_ARG_INFO() - ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_array_return, 0, 0, IS_ARRAY, 0) ZEND_END_ARG_INFO() @@ -35,3 +26,12 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_leak_bytes, 0, 0, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, bytes, IS_LONG, 0) ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class__ZendTestClass_is_object, 0, 0, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class__ZendTestClass___toString, 0, 0, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class__ZendTestTrait_testMethod, 0, 0, _IS_BOOL, 0) +ZEND_END_ARG_INFO() From 2bcc4ab8f4422f319b509b8fd5bd251d9326c604 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 3 Apr 2020 16:49:11 +0200 Subject: [PATCH 030/338] Verify that all stubs have a return type --- Zend/zend_closures.stub.php | 1 + Zend/zend_exceptions.stub.php | 1 + Zend/zend_generators.stub.php | 5 ++ Zend/zend_interfaces.stub.php | 7 +++ build/gen_stub.php | 63 +++++++++++++++++++++++--- ext/com_dotnet/com_extension.stub.php | 4 +- ext/com_dotnet/com_extension_arginfo.h | 4 +- ext/dom/domimplementation.stub.php | 1 + ext/dom/xpath.stub.php | 5 +- ext/gd/gd.stub.php | 2 +- ext/gd/gd_arginfo.h | 2 +- ext/intl/common/common.stub.php | 5 ++ ext/json/json.stub.php | 1 + ext/phar/phar_object.stub.php | 1 + ext/reflection/php_reflection.stub.php | 9 ++++ ext/sockets/sockets.stub.php | 5 +- ext/spl/spl_directory.stub.php | 1 + ext/standard/basic_functions.stub.php | 5 +- ext/standard/basic_functions_arginfo.h | 4 +- ext/standard/user_filters.stub.php | 1 + ext/xml/xml.stub.php | 2 +- ext/xml/xml_arginfo.h | 2 +- ext/xmlrpc/xmlrpc.stub.php | 8 +++- ext/xmlwriter/xmlwriter.stub.php | 2 +- ext/xmlwriter/xmlwriter_arginfo.h | 2 +- ext/zend_test/test.stub.php | 2 +- ext/zend_test/test_arginfo.h | 2 +- 27 files changed, 121 insertions(+), 26 deletions(-) diff --git a/Zend/zend_closures.stub.php b/Zend/zend_closures.stub.php index ad15daa526a6c..0dc92789a0024 100644 --- a/Zend/zend_closures.stub.php +++ b/Zend/zend_closures.stub.php @@ -10,6 +10,7 @@ static function bind(Closure $closure, ?object $newthis, $newscope = UNKNOWN) {} /** @return ?Closure */ function bindTo(?object $newthis, $newscope = UNKNOWN) {} + /** @return mixed */ function call(object $newthis, ...$parameters) {} /** diff --git a/Zend/zend_exceptions.stub.php b/Zend/zend_exceptions.stub.php index 12255df3f6eeb..cf631f3c2b00a 100644 --- a/Zend/zend_exceptions.stub.php +++ b/Zend/zend_exceptions.stub.php @@ -60,5 +60,6 @@ class ErrorException extends Exception { function __construct(string $message = UNKNOWN, int $code = 0, int $severity = E_ERROR, string $filename = UNKNOWN, int $lineno = 0, ?Throwable $previous = null) {} + /** @return int */ final function getSeverity() {} } diff --git a/Zend/zend_generators.stub.php b/Zend/zend_generators.stub.php index 759bd4cd4868c..3599cc0e69c2b 100644 --- a/Zend/zend_generators.stub.php +++ b/Zend/zend_generators.stub.php @@ -6,15 +6,20 @@ function rewind(): void {} function valid(): bool {} + /** @return mixed */ function current() {} + /** @return mixed */ function key() {} function next(): void {} + /** @return mixed */ function send($value) {} + /** @return mixed */ function throw(Throwable $exception) {} + /** @return mixed */ function getReturn() {} } diff --git a/Zend/zend_interfaces.stub.php b/Zend/zend_interfaces.stub.php index 3a908212a4631..b78257f53f0c6 100644 --- a/Zend/zend_interfaces.stub.php +++ b/Zend/zend_interfaces.stub.php @@ -10,11 +10,13 @@ function getIterator(); interface Iterator extends Traversable { + /** @return mixed */ function current(); /** @return void */ function next(); + /** @return mixed */ function key(); /** @return bool */ @@ -26,13 +28,17 @@ function rewind(); interface ArrayAccess { + /** @return bool */ function offsetExists($offset); /* actually this should be return by ref but atm cannot be */ + /** @return mixed */ function offsetGet($offset); + /** @return void */ function offsetSet($offset, $value); + /** @return void */ function offsetUnset($offset); } @@ -41,6 +47,7 @@ interface Serializable /** @return string */ function serialize(); + /** @return void */ function unserialize(string $serialized); } diff --git a/build/gen_stub.php b/build/gen_stub.php index e94399fbe3118..2207a1348b90c 100644 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -385,25 +385,70 @@ public function getAllFuncInfos(): iterable { } } +class DocCommentTag { + /** @var string */ + public $name; + /** @var ?string */ + public $value; + + public function __construct(string $name, ?string $value) { + $this->name = $name; + $this->value = $value; + } + + public function getValue(): string { + if ($this->value === null) { + throw new Exception("@$this->name does not have a value"); + } + + return $this->value; + } + + public function getVariableName(): string { + $value = $this->getValue(); + if ($value === null || strlen($value) === 0 || $value[0] !== '$') { + throw new Exception("@$this->name not followed by variable name"); + } + + return substr($value, 1); + } +} + +/** @return DocCommentTag[] */ +function parseDocComment(DocComment $comment): array { + $commentText = substr($comment->getText(), 2, -2); + $tags = []; + foreach (explode("\n", $commentText) as $commentLine) { + $regex = '/^\*\s*@([a-z-]+)(?:\s+(.+))$/'; + if (preg_match($regex, trim($commentLine), $matches, PREG_UNMATCHED_AS_NULL)) { + $tags[] = new DocCommentTag($matches[1], $matches[2]); + } + } + + return $tags; +} + function parseFunctionLike( string $name, ?string $className, Node\FunctionLike $func, ?string $cond ): FuncInfo { $comment = $func->getDocComment(); $paramMeta = []; $alias = null; + $haveDocReturnType = false; if ($comment) { - $commentText = substr($comment->getText(), 2, -2); - - foreach (explode("\n", $commentText) as $commentLine) { - if (preg_match('/^\*\s*@prefer-ref\s+\$(.+)$/', trim($commentLine), $matches)) { - $varName = $matches[1]; + $tags = parseDocComment($comment); + foreach ($tags as $tag) { + if ($tag->name === 'prefer-ref') { + $varName = $tag->getVariableName(); if (!isset($paramMeta[$varName])) { $paramMeta[$varName] = []; } $paramMeta[$varName]['preferRef'] = true; - } else if (preg_match('/^\*\s*@alias\s+(.+)$/', trim($commentLine), $matches)) { - $alias = $matches[1]; + } else if ($tag->name === 'alias') { + $alias = $tag->getValue(); + } else if ($tag->name === 'return') { + $haveDocReturnType = true; } } } @@ -455,6 +500,10 @@ function parseFunctionLike( } $returnType = $func->getReturnType(); + if ($returnType === null && !$haveDocReturnType && substr($name, 0, 2) !== '__') { + throw new Exception("Missing return type for function $name()"); + } + $return = new ReturnInfo( $func->returnsByRef(), $returnType ? Type::fromNode($returnType) : null); diff --git a/ext/com_dotnet/com_extension.stub.php b/ext/com_dotnet/com_extension.stub.php index 83cfc50350c35..8e065fb2bafd2 100644 --- a/ext/com_dotnet/com_extension.stub.php +++ b/ext/com_dotnet/com_extension.stub.php @@ -40,7 +40,7 @@ function variant_not($left): variant {} function variant_round($left, int $decimals): ?variant {} -function variant_cmp($left, $right, int $lcid = UNKNOWN, int $flags = 0) {} +function variant_cmp($left, $right, int $lcid = UNKNOWN, int $flags = 0): int {} function variant_date_to_timestamp(variant $variant): ?int {} @@ -63,4 +63,4 @@ function com_print_typeinfo($comobject, ?string $dispinterface = null, bool $wan function com_message_pump(int $timeoutms = 0): bool {} -function com_load_typelib(string $typelib_name, bool $case_insensitive = true) {} +function com_load_typelib(string $typelib_name, bool $case_insensitive = true): bool {} diff --git a/ext/com_dotnet/com_extension_arginfo.h b/ext/com_dotnet/com_extension_arginfo.h index b8ffef8077430..b5eac32332392 100644 --- a/ext/com_dotnet/com_extension_arginfo.h +++ b/ext/com_dotnet/com_extension_arginfo.h @@ -51,7 +51,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_variant_round, 0, 2, variant, 1) ZEND_ARG_TYPE_INFO(0, decimals, IS_LONG, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_cmp, 0, 0, 2) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_variant_cmp, 0, 2, IS_LONG, 0) ZEND_ARG_INFO(0, left) ZEND_ARG_INFO(0, right) ZEND_ARG_TYPE_INFO(0, lcid, IS_LONG, 0) @@ -104,7 +104,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_com_message_pump, 0, 0, _IS_BOOL ZEND_ARG_TYPE_INFO(0, timeoutms, IS_LONG, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_com_load_typelib, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_com_load_typelib, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, typelib_name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, case_insensitive, _IS_BOOL, 0) ZEND_END_ARG_INFO() diff --git a/ext/dom/domimplementation.stub.php b/ext/dom/domimplementation.stub.php index c103d489b469c..86b28d196ed6b 100644 --- a/ext/dom/domimplementation.stub.php +++ b/ext/dom/domimplementation.stub.php @@ -2,6 +2,7 @@ class DOMImplementation { + /** @return void */ public function getFeature(string $feature, string $version) {} /** @return bool */ diff --git a/ext/dom/xpath.stub.php b/ext/dom/xpath.stub.php index 167c5a94efb10..a7ea2bb7b02a5 100644 --- a/ext/dom/xpath.stub.php +++ b/ext/dom/xpath.stub.php @@ -14,7 +14,10 @@ public function query(string $expr, ?DOMNode $context = null, bool $registerNode /** @return bool */ public function registerNamespace(string $prefix, string $namespaceURI) {} - /** @param string|array $restrict */ + /** + * @param string|array $restrict + * @return bool|null + */ public function registerPhpFunctions($restrict = null) {} } #endif diff --git a/ext/gd/gd.stub.php b/ext/gd/gd.stub.php index 5138e2596a340..18497cddfe517 100644 --- a/ext/gd/gd.stub.php +++ b/ext/gd/gd.stub.php @@ -209,7 +209,7 @@ function imagefttext(GdImage $im, float $size, float $angle, int $x, int $y, int function imagettfbbox(float $size, float $angle, string $font_file, string $text): array|false {} -function imagettftext(GdImage $im, float $size, float $angle, int $x, int $y, int $col, string $font_file, string $text) {} +function imagettftext(GdImage $im, float $size, float $angle, int $x, int $y, int $col, string $font_file, string $text): array|false {} #endif function imagefilter(GdImage $im, int $filtertype, $arg1 = UNKNOWN, $arg2 = UNKNOWN, $arg3 = UNKNOWN, $arg4 = UNKNOWN): bool {} diff --git a/ext/gd/gd_arginfo.h b/ext/gd/gd_arginfo.h index 0d8554864d2cf..e829e3a4bc706 100644 --- a/ext/gd/gd_arginfo.h +++ b/ext/gd/gd_arginfo.h @@ -483,7 +483,7 @@ ZEND_END_ARG_INFO() #endif #if defined(HAVE_GD_FREETYPE) -ZEND_BEGIN_ARG_INFO_EX(arginfo_imagettftext, 0, 0, 8) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imagettftext, 0, 8, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_OBJ_INFO(0, im, GdImage, 0) ZEND_ARG_TYPE_INFO(0, size, IS_DOUBLE, 0) ZEND_ARG_TYPE_INFO(0, angle, IS_DOUBLE, 0) diff --git a/ext/intl/common/common.stub.php b/ext/intl/common/common.stub.php index 5d7ef874d1a11..8bb6e38ce8e1d 100644 --- a/ext/intl/common/common.stub.php +++ b/ext/intl/common/common.stub.php @@ -2,13 +2,18 @@ class IntlIterator implements Iterator { + /** @return mixed */ public function current() {} + /** @return mixed */ public function key() {} + /** @return void */ public function next() {} + /** @return void */ public function rewind() {} + /** @return bool */ public function valid() {} } diff --git a/ext/json/json.stub.php b/ext/json/json.stub.php index 90bedef91e431..c5713a7980d40 100644 --- a/ext/json/json.stub.php +++ b/ext/json/json.stub.php @@ -11,5 +11,6 @@ function json_last_error_msg(): string {} interface JsonSerializable { + /** @return mixed */ public function jsonSerialize(); } diff --git a/ext/phar/phar_object.stub.php b/ext/phar/phar_object.stub.php index 44ec4732da784..af7d57cabc263 100644 --- a/ext/phar/phar_object.stub.php +++ b/ext/phar/phar_object.stub.php @@ -381,6 +381,7 @@ public function getCRC32() {} /** @return string */ public function getContent() {} + /** @return mixed */ public function getMetadata() {} /** @return int */ diff --git a/ext/reflection/php_reflection.stub.php b/ext/reflection/php_reflection.stub.php index 05e1b0490de5e..b96a4f65e9d05 100644 --- a/ext/reflection/php_reflection.stub.php +++ b/ext/reflection/php_reflection.stub.php @@ -104,8 +104,10 @@ public function __toString(): string {} /** @return bool */ public function isDisabled() {} + /** @return mixed */ public function invoke(...$args) {} + /** @return mixed */ public function invokeArgs(array $args) {} /** @return Closure */ @@ -172,8 +174,10 @@ public function getClosure($object = UNKNOWN) {} /** @return int */ public function getModifiers() {} + /** @return mixed */ public function invoke(?object $object = null, ...$args) {} + /** @return mixed */ public function invokeArgs(?object $object, array $args) {} /** @return ReflectionClass */ @@ -255,6 +259,7 @@ public function getConstants() {} /** @return ReflectionClassConstant[] */ public function getReflectionConstants() {} + /** @return mixed */ public function getConstant(string $name) {} /** @return ReflectionClassConstant|false */ @@ -314,6 +319,7 @@ public function isSubclassOf($class) {} /** @return ?array */ public function getStaticProperties() {} + /** @return mixed */ public function getStaticPropertyValue(string $name, $default = UNKNOWN) {} /** @return void */ @@ -367,6 +373,7 @@ public function __toString(): string {} /** @return string|false */ public function getName() {} + /** @return mixed */ public function getValue(?object $object = null) {} /** @return void */ @@ -426,6 +433,7 @@ public function __toString(): string {} /** @return string|false */ public function getName() {} + /** @return mixed */ public function getValue() {} /** @return bool */ @@ -501,6 +509,7 @@ public function isOptional() {} /** @return bool */ public function isDefaultValueAvailable() {} + /** @return mixed */ public function getDefaultValue() {} /** @return bool */ diff --git a/ext/sockets/sockets.stub.php b/ext/sockets/sockets.stub.php index 86c4cd856e6f4..bdff816f46229 100644 --- a/ext/sockets/sockets.stub.php +++ b/ext/sockets/sockets.stub.php @@ -91,7 +91,10 @@ function socket_clear_error($socket = UNKNOWN): void {} */ function socket_import_stream($stream) {} -/** @param resource $socket */ +/** + * @param resource $socket + * @return resource|false + */ function socket_export_stream($socket) {} /** @param resource $socket */ diff --git a/ext/spl/spl_directory.stub.php b/ext/spl/spl_directory.stub.php index de6cda349e161..c5a63ef1cd0d1 100755 --- a/ext/spl/spl_directory.stub.php +++ b/ext/spl/spl_directory.stub.php @@ -90,6 +90,7 @@ public function setInfoClass(string $class_name = SplFileInfo::class) {} public function __toString(): string {} + /** @return void */ final public function _bad_state_ex() {} } diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 4b39aa32f9d33..0c1c1ee380de5 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -238,6 +238,7 @@ function array_sum(array $arg): int|float {} function array_product(array $arg): int|float {} +/** @return mixed */ function array_reduce(array $arg, callable $callback, $initial = null) {} function array_filter(array $arg, callable $callback = UNKNOWN, int $use_keys = 0): array {} @@ -1457,7 +1458,7 @@ function is_object($value): bool {} function is_scalar($value): bool {} /** @param mixed $value */ -function is_callable($value, bool $syntax_only = false, &$callable_name = null) {} +function is_callable($value, bool $syntax_only = false, &$callable_name = null): bool {} /** @param mixed $value */ function is_iterable($value): bool {} @@ -1545,7 +1546,7 @@ function sapi_windows_cp_get(string $kind = UNKNOWN): int {} * @param int|string $in_codepage * @param int|string $out_codepage */ -function sapi_windows_cp_conv($in_codepage, $out_codepage, string $subject) {} +function sapi_windows_cp_conv($in_codepage, $out_codepage, string $subject): ?string {} function sapi_windows_cp_is_utf8(): bool {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 9c1b0162b0da5..7e0fbe84dcebe 100755 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -2103,7 +2103,7 @@ ZEND_END_ARG_INFO() #define arginfo_is_scalar arginfo_boolval -ZEND_BEGIN_ARG_INFO_EX(arginfo_is_callable, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_is_callable, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, value) ZEND_ARG_TYPE_INFO(0, syntax_only, _IS_BOOL, 0) ZEND_ARG_INFO(1, callable_name) @@ -2212,7 +2212,7 @@ ZEND_END_ARG_INFO() #endif #if defined(PHP_WIN32) -ZEND_BEGIN_ARG_INFO_EX(arginfo_sapi_windows_cp_conv, 0, 0, 3) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sapi_windows_cp_conv, 0, 3, IS_STRING, 1) ZEND_ARG_INFO(0, in_codepage) ZEND_ARG_INFO(0, out_codepage) ZEND_ARG_TYPE_INFO(0, subject, IS_STRING, 0) diff --git a/ext/standard/user_filters.stub.php b/ext/standard/user_filters.stub.php index f789dc1f32cdb..9481b0b663800 100755 --- a/ext/standard/user_filters.stub.php +++ b/ext/standard/user_filters.stub.php @@ -2,6 +2,7 @@ class php_user_filter { + /** @return int */ public function filter($in, $out, &$consumed, $closing) {} /** @return void */ diff --git a/ext/xml/xml.stub.php b/ext/xml/xml.stub.php index 0f6ed6b24c43d..60eeaaae333b5 100644 --- a/ext/xml/xml.stub.php +++ b/ext/xml/xml.stub.php @@ -54,4 +54,4 @@ function xml_parser_free(XmlParser $parser): bool {} function xml_parser_set_option(XmlParser $parser, int $option, $value): bool {} -function xml_parser_get_option(XmlParser $parser, int $option) {} +function xml_parser_get_option(XmlParser $parser, int $option): string|int|false {} diff --git a/ext/xml/xml_arginfo.h b/ext/xml/xml_arginfo.h index 06f6fde985e32..463ad8b9eb406 100644 --- a/ext/xml/xml_arginfo.h +++ b/ext/xml/xml_arginfo.h @@ -76,7 +76,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xml_parser_set_option, 0, 3, _IS ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_xml_parser_get_option, 0, 0, 2) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_xml_parser_get_option, 0, 2, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_OBJ_INFO(0, parser, XmlParser, 0) ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0) ZEND_END_ARG_INFO() diff --git a/ext/xmlrpc/xmlrpc.stub.php b/ext/xmlrpc/xmlrpc.stub.php index 751aa7c32535c..e2805bd43f186 100644 --- a/ext/xmlrpc/xmlrpc.stub.php +++ b/ext/xmlrpc/xmlrpc.stub.php @@ -2,8 +2,10 @@ function xmlrpc_encode($value): ?string {} +/** @return mixed */ function xmlrpc_decode(string $xml, string $encoding = "iso-8859-1") {} +/** @return mixed */ function xmlrpc_decode_request(string $xml, &$method, string $encoding = "iso-8859-1") {} function xmlrpc_encode_request(?string $method, $params, array $output_options = UNKNOWN): ?string {} @@ -21,9 +23,13 @@ function xmlrpc_server_destroy($server): bool {} /** @param resource $server */ function xmlrpc_server_register_method($server, string $method_name, $function): bool {} -/** @param resource $server */ +/** + * @param resource $server + * @return mixed + */ function xmlrpc_server_call_method($server, string $xml, $user_data, array $output_options = UNKNOWN) {} +/** @return mixed */ function xmlrpc_parse_method_descriptions(string $xml) {} /** @param resource $server */ diff --git a/ext/xmlwriter/xmlwriter.stub.php b/ext/xmlwriter/xmlwriter.stub.php index ce476c0705bd5..35a0dec65885c 100644 --- a/ext/xmlwriter/xmlwriter.stub.php +++ b/ext/xmlwriter/xmlwriter.stub.php @@ -50,7 +50,7 @@ function xmlwriter_text(XMLWriter $xmlwriter, string $content): bool {} function xmlwriter_write_raw(XMLWriter $xmlwriter, string $content): bool {} -function xmlwriter_start_document(XMLWriter $xmlwriter, ?string $version = '1.0', ?string $encoding = null, ?string $standalone = null) {} +function xmlwriter_start_document(XMLWriter $xmlwriter, ?string $version = '1.0', ?string $encoding = null, ?string $standalone = null): bool {} function xmlwriter_end_document(XMLWriter $xmlwriter): bool {} diff --git a/ext/xmlwriter/xmlwriter_arginfo.h b/ext/xmlwriter/xmlwriter_arginfo.h index 54f571cb341b0..e759a32e1044a 100644 --- a/ext/xmlwriter/xmlwriter_arginfo.h +++ b/ext/xmlwriter/xmlwriter_arginfo.h @@ -104,7 +104,7 @@ ZEND_END_ARG_INFO() #define arginfo_xmlwriter_write_raw arginfo_xmlwriter_write_cdata -ZEND_BEGIN_ARG_INFO_EX(arginfo_xmlwriter_start_document, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xmlwriter_start_document, 0, 1, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, xmlwriter, XMLWriter, 0) ZEND_ARG_TYPE_INFO(0, version, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 1) diff --git a/ext/zend_test/test.stub.php b/ext/zend_test/test.stub.php index b823116742ae2..85c733ad3cc10 100644 --- a/ext/zend_test/test.stub.php +++ b/ext/zend_test/test.stub.php @@ -20,7 +20,7 @@ function zend_test_deprecated(): void {} function zend_create_unterminated_string(string $str): string {} -function zend_terminate_string(string &$str) {} +function zend_terminate_string(string &$str): string {} /** @param mixed $variable */ function zend_leak_variable($variable): void {} diff --git a/ext/zend_test/test_arginfo.h b/ext/zend_test/test_arginfo.h index 89a72f63ae688..e0cb219e37dd5 100644 --- a/ext/zend_test/test_arginfo.h +++ b/ext/zend_test/test_arginfo.h @@ -15,7 +15,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_create_unterminated_string, ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_zend_terminate_string, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_terminate_string, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(1, str, IS_STRING, 0) ZEND_END_ARG_INFO() From 02a685ead327ce72e6e1cca76072e6ec5983c5bb Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 3 Apr 2020 18:21:40 +0200 Subject: [PATCH 031/338] Fix stub for zend_terminate_string() --- ext/zend_test/test.stub.php | 2 +- ext/zend_test/test_arginfo.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/zend_test/test.stub.php b/ext/zend_test/test.stub.php index 85c733ad3cc10..b75dfea9c0234 100644 --- a/ext/zend_test/test.stub.php +++ b/ext/zend_test/test.stub.php @@ -20,7 +20,7 @@ function zend_test_deprecated(): void {} function zend_create_unterminated_string(string $str): string {} -function zend_terminate_string(string &$str): string {} +function zend_terminate_string(string &$str): void {} /** @param mixed $variable */ function zend_leak_variable($variable): void {} diff --git a/ext/zend_test/test_arginfo.h b/ext/zend_test/test_arginfo.h index e0cb219e37dd5..71f94d6d14fb3 100644 --- a/ext/zend_test/test_arginfo.h +++ b/ext/zend_test/test_arginfo.h @@ -15,7 +15,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_create_unterminated_string, ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_terminate_string, 0, 1, IS_STRING, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_terminate_string, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(1, str, IS_STRING, 0) ZEND_END_ARG_INFO() From 1333b46d6dc0c293c1fd626803f91bc69743eb79 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 3 Apr 2020 21:16:04 +0200 Subject: [PATCH 032/338] Fix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails --- ext/mbstring/mbstring.c | 2 +- ext/mbstring/tests/bug79448.phpt | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 ext/mbstring/tests/bug79448.phpt diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 0f466a02ee491..ba30e05c27d4d 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -2038,7 +2038,7 @@ PHP_FUNCTION(mb_detect_order) static inline int php_mb_check_code_point(zend_long cp) { - if (cp <= 0 || cp >= 0x110000) { + if (cp < 0 || cp >= 0x110000) { /* Out of Unicode range */ return 0; } diff --git a/ext/mbstring/tests/bug79448.phpt b/ext/mbstring/tests/bug79448.phpt new file mode 100644 index 0000000000000..09052943cc042 --- /dev/null +++ b/ext/mbstring/tests/bug79448.phpt @@ -0,0 +1,11 @@ +--TEST-- +Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(true) From 656eac74fa6074aebc087bb73d2e4651f7dc8c9e Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 3 Apr 2020 22:03:00 +0200 Subject: [PATCH 033/338] Went to fast and forgot to update tests However due to the really lax conversion to integer all strings pass as 0 --- .../tests/mb_substitute_character.phpt | 3 +- .../tests/mb_substitute_character_basic.phpt | 6 +-- .../mb_substitute_character_variation1.phpt | 39 +++++++------------ 3 files changed, 16 insertions(+), 32 deletions(-) diff --git a/ext/mbstring/tests/mb_substitute_character.phpt b/ext/mbstring/tests/mb_substitute_character.phpt index 502a4136dd209..fc665ba1993b2 100644 --- a/ext/mbstring/tests/mb_substitute_character.phpt +++ b/ext/mbstring/tests/mb_substitute_character.phpt @@ -41,5 +41,4 @@ string(4) "82a0" bool(true) string(6) "entity" string(20) "262378323636303b82a0" -ERR: Warning -bool(false) +bool(true) diff --git a/ext/mbstring/tests/mb_substitute_character_basic.phpt b/ext/mbstring/tests/mb_substitute_character_basic.phpt index 9fa3a5b1acad1..0fc062ec21ba7 100644 --- a/ext/mbstring/tests/mb_substitute_character_basic.phpt +++ b/ext/mbstring/tests/mb_substitute_character_basic.phpt @@ -28,7 +28,7 @@ var_dump( mb_substitute_character("b") ); ?> ===DONE=== ---EXPECTF-- +--EXPECT-- *** Testing mb_substitute_character() : basic functionality *** int(63) bool(true) @@ -37,7 +37,5 @@ bool(true) int(1234) bool(true) string(4) "none" - -Warning: mb_substitute_character(): Unknown character in %s on line %d -bool(false) +bool(true) ===DONE=== diff --git a/ext/mbstring/tests/mb_substitute_character_variation1.phpt b/ext/mbstring/tests/mb_substitute_character_variation1.phpt index f738876469fcd..be3b81018a725 100644 --- a/ext/mbstring/tests/mb_substitute_character_variation1.phpt +++ b/ext/mbstring/tests/mb_substitute_character_variation1.phpt @@ -123,8 +123,7 @@ fclose($fp); *** Testing mb_substitute_character() : usage variation *** --int 0-- -Error: 2 - mb_substitute_character(): Unknown character, %s(%d) -bool(false) +bool(true) --int 1-- bool(true) @@ -152,12 +151,10 @@ Error: 2 - mb_substitute_character(): Unknown character, %s(%d) bool(false) --float .5-- -Error: 2 - mb_substitute_character(): Unknown character, %s(%d) -bool(false) +bool(true) --empty array-- -Error: 2 - mb_substitute_character(): Unknown character, %s(%d) -bool(false) +bool(true) --int indexed array-- bool(true) @@ -169,26 +166,22 @@ bool(true) bool(true) --uppercase NULL-- -Error: 2 - mb_substitute_character(): Unknown character, %s(%d) -bool(false) +bool(true) --lowercase null-- -Error: 2 - mb_substitute_character(): Unknown character, %s(%d) -bool(false) +bool(true) --lowercase true-- bool(true) --lowercase false-- -Error: 2 - mb_substitute_character(): Unknown character, %s(%d) -bool(false) +bool(true) --uppercase TRUE-- bool(true) --uppercase FALSE-- -Error: 2 - mb_substitute_character(): Unknown character, %s(%d) -bool(false) +bool(true) --empty string DQ-- bool(true) @@ -197,20 +190,16 @@ bool(true) bool(true) --string DQ-- -Error: 2 - mb_substitute_character(): Unknown character, %s(%d) -bool(false) +bool(true) --string SQ-- -Error: 2 - mb_substitute_character(): Unknown character, %s(%d) -bool(false) +bool(true) --mixed case string-- -Error: 2 - mb_substitute_character(): Unknown character, %s(%d) -bool(false) +bool(true) --heredoc-- -Error: 2 - mb_substitute_character(): Unknown character, %s(%d) -bool(false) +bool(true) --instance of classWithToString-- Error: 8 - Object of class classWithToString could not be converted to int, %s(%d) @@ -221,10 +210,8 @@ Error: 8 - Object of class classWithoutToString could not be converted to int, % bool(true) --undefined var-- -Error: 2 - mb_substitute_character(): Unknown character, %s(%d) -bool(false) +bool(true) --unset var-- -Error: 2 - mb_substitute_character(): Unknown character, %s(%d) -bool(false) +bool(true) ===DONE=== From a43bc33fb2575cda582167c0d6571e501a2e6496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sat, 4 Apr 2020 13:03:16 +0200 Subject: [PATCH 034/338] Annotate function aliases in stubs --- build/gen_stub.php | 0 ext/bz2/bz2.stub.php | 15 ++++++++-- ext/ftp/ftp.stub.php | 5 +++- ext/gmp/gmp.stub.php | 1 + ext/imap/php_imap.stub.php | 36 ++++++++++++++++++----- ext/ldap/ldap.stub.php | 11 +++++-- ext/mysqli/mysqli.stub.php | 7 ++++- ext/odbc/odbc.stub.php | 6 +++- ext/openssl/openssl.stub.php | 7 ++++- ext/pcntl/pcntl.stub.php | 1 + ext/posix/posix.stub.php | 1 + ext/session/session.stub.php | 1 + ext/snmp/snmp.stub.php | 6 +++- ext/sockets/sockets.stub.php | 10 +++++-- ext/sodium/libsodium.stub.php | 1 + ext/zlib/zlib.stub.php | 55 ++++++++++++++++++++++++++++------- 16 files changed, 133 insertions(+), 30 deletions(-) mode change 100644 => 100755 build/gen_stub.php diff --git a/build/gen_stub.php b/build/gen_stub.php old mode 100644 new mode 100755 diff --git a/ext/bz2/bz2.stub.php b/ext/bz2/bz2.stub.php index 4dcaf07a11ae4..6c871e3990746 100644 --- a/ext/bz2/bz2.stub.php +++ b/ext/bz2/bz2.stub.php @@ -9,13 +9,22 @@ function bzopen($file, string $mode) {} /** @param resource $bz */ function bzread($bz, int $length = 1024): string|false {} -/** @param resource $bz */ +/** + * @param resource $bz + * @alias fwrite + */ function bzwrite($bz, string $str, int $length = UNKNOWN): int|false {} -/** @param resource $bz */ +/** + * @param resource $bz + * @alias fflush + */ function bzflush($bz): bool {} -/** @param resource $bz */ +/** + * @param resource $bz + * @alias fclose + */ function bzclose($bz): bool {} /** @param resource $bz */ diff --git a/ext/ftp/ftp.stub.php b/ext/ftp/ftp.stub.php index bae3a5128c964..d3033e3b31049 100644 --- a/ext/ftp/ftp.stub.php +++ b/ext/ftp/ftp.stub.php @@ -113,7 +113,10 @@ function ftp_site($ftp, string $cmd): bool {} /** @param resource $ftp */ function ftp_close($ftp): bool {} -/** @param resource $ftp */ +/** + * @param resource $ftp + * @alias ftp_close + */ function ftp_quit($ftp): bool {} /** @param resource $ftp */ diff --git a/ext/gmp/gmp.stub.php b/ext/gmp/gmp.stub.php index 7f576ca0c1043..ab86ce944b14e 100644 --- a/ext/gmp/gmp.stub.php +++ b/ext/gmp/gmp.stub.php @@ -53,6 +53,7 @@ function gmp_div_r($a, $b, int $round = GMP_ROUND_ZERO): GMP|false {} /** * @param GMP|int|bool|string $a * @param GMP|int|bool|string $b + * @alias gmp_div_q */ function gmp_div($a, $b, int $round = GMP_ROUND_ZERO): GMP|false {} diff --git a/ext/imap/php_imap.stub.php b/ext/imap/php_imap.stub.php index c80799225cd2e..1366a0fc06a73 100644 --- a/ext/imap/php_imap.stub.php +++ b/ext/imap/php_imap.stub.php @@ -27,6 +27,7 @@ function imap_headers($stream_id): array|false {} /** @param resource $stream_id */ function imap_headerinfo($stream_id, int $msg_no, int $from_length = 0, int $subject_length = 0, string $default_host = UNKNOWN): stdClass|false {} +/** @alias imap_headerinfo */ function imap_header($stream_id, int $msg_no, int $from_length = 0, int $subject_length = 0, string $default_host = UNKNOWN): stdClass|false {} function imap_rfc822_parse_headers(string $headers, string $default_host = 'UNKNOWN'): \stdClass {} @@ -38,7 +39,10 @@ function imap_rfc822_parse_adrlist(string $address_string, string $default_host) /** @param resource $stream_id */ function imap_body($stream_id, int $msg_no, int $options = 0): string|false {} -/** @param resource $stream_id */ +/** + * @param resource $stream_id + * @alias imap_body + */ function imap_fetchtext($stream_id, int $msg_no, int $options = 0): string|false {} /** @@ -91,10 +95,16 @@ function imap_check($stream_id): stdClass|false {} /** @param resource $stream_id */ function imap_listscan($stream_id, string $ref, string $pattern, string $content): array|false {} -/** @param resource $stream_id */ +/** + * @param resource $stream_id + * @alias imap_listscan + */ function imap_scan($stream_id, string $ref, string $pattern, string $content): array|false {} -/** @param resource $stream_id */ +/** + * @param resource $stream_id + * @alias imap_listscan + */ function imap_scanmailbox($stream_id, string $ref, string $pattern, string $content): array|false {} /** @param resource $stream_id */ @@ -108,13 +118,19 @@ function imap_mail_compose(array $envelope, array $body): string|false {} /** @param resource $stream_id */ function imap_createmailbox($stream_id, string $mailbox): bool {} -/** @param resource $stream_id */ +/** + * @param resource $stream_id + * @alias imap_createmailbox + */ function imap_create($stream_id, string $mailbox): bool {} /** @param resource $stream_id */ function imap_renamemailbox($stream_id, string $old_name, string $new_name): bool {} -/** @param resource $stream_id */ +/** + * @param resource $stream_id + * @alias imap_renamemailbox + */ function imap_rename($stream_id, string $old_name, string $new_name): bool {} /** @param resource $stream_id */ @@ -170,13 +186,19 @@ function imap_msgno($stream_id, int $unique_msg_id): int|false {} /** @param resource $stream_id */ function imap_list($stream_id, string $ref, string $pattern): array|false {} -/** @param resource $stream_id */ +/** + * @param resource $stream_id + * @alias imap_list + */ function imap_listmailbox($stream_id, string $ref, string $pattern): array|false {} /** @param resource $stream_id */ function imap_lsub($stream_id, string $ref, string $pattern): array|false {} -/** @param resource $stream_id */ +/** + * @param resource $stream_id + * @alias imap_lsub + */ function imap_listsubscribed($stream_id, string $ref, string $pattern): array|false {} /** @param resource $stream_id */ diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php index 7db01d57b769d..8224bc15837f5 100644 --- a/ext/ldap/ldap.stub.php +++ b/ext/ldap/ldap.stub.php @@ -13,7 +13,10 @@ function ldap_connect(string $hostname = UNKNOWN, int $port = 389) {} /** @param resource $link_identifier */ function ldap_unbind($link_identifier): bool {} -/** @param resource $link_identifier */ +/** + * @param resource $link_identifier + * @alias ldap_unbind + */ function ldap_close($link_identifier): bool {} /** @param resource $link_identifier */ @@ -111,6 +114,7 @@ function ldap_get_values_len($link_identifier, $result_entry_identifier, string /** * @param resource $link_identifier * @param resource $result_entry_identifier + * @alias ldap_get_values_len */ function ldap_get_values($link_identifier, $result_entry_identifier, string $attribute): array|false {} @@ -157,7 +161,10 @@ function ldap_mod_add_ext($link_identifier, string $dn, array $entry, array $ser /** @param resource $link_identifier */ function ldap_mod_replace($link_identifier, string $dn, array $entry, array $servercontrols = []): bool {} -/** @param resource $link_identifier */ +/** + * @param resource $link_identifier + * @alias ldap_mod_replace + */ function ldap_modify($link_identifier, string $dn, array $entry, array $servercontrols = []): bool {} /** diff --git a/ext/mysqli/mysqli.stub.php b/ext/mysqli/mysqli.stub.php index 434346e2de407..58132a198d8e0 100644 --- a/ext/mysqli/mysqli.stub.php +++ b/ext/mysqli/mysqli.stub.php @@ -321,6 +321,7 @@ function mysqli_error_list(mysqli $mysql_link): array {} function mysqli_stmt_execute(mysqli_stmt $mysql_stmt): bool {} +/** @alias mysqli_stmt_execute */ function mysqli_execute(mysqli_stmt $mysql_stmt): bool {} function mysqli_fetch_field(mysqli_result $mysql_result): object|false {} @@ -513,7 +514,11 @@ function mysqli_warning_count(mysqli $mysql_link): int {} function mysqli_refresh(mysqli $mysqli_link, int $options): bool {} +/** @alias mysqli_real_escape_string */ function mysqli_escape_string(mysqli $mysqli_link, string $string_to_escape): string {} -/** @param mixed $value */ +/** + * @param mixed $value + * @alias mysqli_options + */ function mysqli_set_opt(mysqli $mysqli_link, int $option, $value): bool {} diff --git a/ext/odbc/odbc.stub.php b/ext/odbc/odbc.stub.php index 9eafe46ae5036..153f1a81615c2 100644 --- a/ext/odbc/odbc.stub.php +++ b/ext/odbc/odbc.stub.php @@ -34,6 +34,7 @@ function odbc_exec($connection_id, string $query, int $flags = UNKNOWN) {} /** * @param resource $connection_id * @return resource|false + * @alias odbc_exec */ function odbc_do($connection_id, string $query, int $flags = UNKNOWN) {} @@ -92,7 +93,10 @@ function odbc_field_type($result_id, int $field_number): string|false {} /** @param resource $result_id */ function odbc_field_len($result_id, int $field_number): int|false {} -/** @param resource $result_id */ +/** + * @param resource $result_id + * @alias odbc_field_len + */ function odbc_field_precision($result_id, int $field_number): int|false {} /** @param resource $result_id */ diff --git a/ext/openssl/openssl.stub.php b/ext/openssl/openssl.stub.php index 413414117f250..7588635d07d0f 100644 --- a/ext/openssl/openssl.stub.php +++ b/ext/openssl/openssl.stub.php @@ -77,13 +77,17 @@ function openssl_pkey_get_public($cert) {} /** * @param resource|string|array $cert * @return resource|false + * @alias openssl_pkey_get_public */ function openssl_get_publickey($cert) {} /** @param resource $key */ function openssl_pkey_free($key): void {} -/** @param resource $key */ +/** + * @param resource $key + * @alias openssl_pkey_free + */ function openssl_free_key($key): void {} /** @@ -95,6 +99,7 @@ function openssl_pkey_get_private($key, string $passphrase = UNKNOWN) {} /** * @param resource|string|array $key * @return resource|false + * @alias openssl_pkey_get_private */ function openssl_get_privatekey($key, string $passphrase = UNKNOWN) {} diff --git a/ext/pcntl/pcntl.stub.php b/ext/pcntl/pcntl.stub.php index c8da88c481f1c..82bac573169c3 100644 --- a/ext/pcntl/pcntl.stub.php +++ b/ext/pcntl/pcntl.stub.php @@ -50,6 +50,7 @@ function pcntl_alarm(int $seconds): int {} function pcntl_get_last_error(): int {} +/** @alias pcntl_get_last_error */ function pcntl_errno(): int {} #ifdef HAVE_GETPRIORITY diff --git a/ext/posix/posix.stub.php b/ext/posix/posix.stub.php index 008d35f689db0..dcef25cfecfc6 100644 --- a/ext/posix/posix.stub.php +++ b/ext/posix/posix.stub.php @@ -93,6 +93,7 @@ function posix_setrlimit(int $resource, int $softlimit, int $hardlimit): bool {} function posix_get_last_error(): int {} +/** @alias posix_get_last_error */ function posix_errno(): int {} function posix_strerror(int $errno): string {} diff --git a/ext/session/session.stub.php b/ext/session/session.stub.php index e343fc8901685..09c35aae28d4f 100644 --- a/ext/session/session.stub.php +++ b/ext/session/session.stub.php @@ -34,6 +34,7 @@ function session_status(): int {} function session_register_shutdown(): void {} +/** @alias session_write_close */ function session_commit(): bool {} function session_set_save_handler($open, $close = null, $read = null, $write = null, $destroy = null, $gc = null, $create_sid = null, $validate_sid = null, $update_timestamp = null): bool {} diff --git a/ext/snmp/snmp.stub.php b/ext/snmp/snmp.stub.php index ce085637be1be..54740debf8fc0 100644 --- a/ext/snmp/snmp.stub.php +++ b/ext/snmp/snmp.stub.php @@ -12,7 +12,10 @@ function snmpwalk(string $host, string $community, $object_id, int $timeout = UN /** @param array|string $object_id */ function snmprealwalk(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {} -/** @param array|string $object_id */ +/** + * @param array|string $object_id + * @alias snmprealwalk + */ function snmpwalkoid(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {} /** @@ -30,6 +33,7 @@ function snmp_set_enum_print(int $enum_print): bool {} function snmp_set_oid_output_format(int $oid_format): bool {} +/** @alias snmp_set_oid_output_format */ function snmp_set_oid_numeric_print(int $oid_format): bool {} /** @param array|string $object_id */ diff --git a/ext/sockets/sockets.stub.php b/ext/sockets/sockets.stub.php index bdff816f46229..c7d582c8d135e 100644 --- a/ext/sockets/sockets.stub.php +++ b/ext/sockets/sockets.stub.php @@ -61,13 +61,19 @@ function socket_sendto($socket, string $buf, int $len, int $flags, string $addr, /** @param resource $socket */ function socket_get_option($socket, int $level, int $optname): array|int|false {} -/** @param resource $socket */ +/** + * @param resource $socket + * @alias socket_get_option + */ function socket_getopt($socket, int $level, int $optname): array|int|false {} /** @param resource $socket */ function socket_set_option($socket, int $level, int $optname, $optval): bool {} -/** @param resource $socket */ +/** + * @param resource $socket + * @alias socket_set_option + */ function socket_setopt($socket, int $level, int $optname, $optval): bool {} #ifdef HAVE_SOCKETPAIR diff --git a/ext/sodium/libsodium.stub.php b/ext/sodium/libsodium.stub.php index 228248d604430..37e6a5734d4b6 100644 --- a/ext/sodium/libsodium.stub.php +++ b/ext/sodium/libsodium.stub.php @@ -182,4 +182,5 @@ function sodium_bin2base64(string $string, int $id): string {} function sodium_base642bin(string $string, int $id, string $ignore = ""): string {} #endif +/** @alias sodium_crypto_box_publickey_from_secretkey */ function sodium_crypto_scalarmult_base(string $key): string {} diff --git a/ext/zlib/zlib.stub.php b/ext/zlib/zlib.stub.php index a4c02bd0ccc3c..fc1f32731d1c8 100644 --- a/ext/zlib/zlib.stub.php +++ b/ext/zlib/zlib.stub.php @@ -27,37 +27,70 @@ function gzdecode(string $data, int $max_decoded_len = 0): string|false {} function gzuncompress(string $data, int $max_decoded_len = 0): string|false {} -/** @param resource $fp */ +/** + * @param resource $fp + * @alias fwrite + */ function gzwrite($fp, string $str, int $length = UNKNOWN): int|false {} -/** @param resource $fp */ +/** + * @param resource $fp + * @alias fwrite + */ function gzputs($fp, string $str, int $length = UNKNOWN): int|false {} -/** @param resource $fp */ +/** + * @param resource $fp + * @alias rewind + */ function gzrewind($fp): bool {} -/** @param resource $fp */ +/** + * @param resource $fp + * @alias fclose + */ function gzclose($fp): bool {} -/** @param resource $fp */ +/** + * @param resource $fp + * @alias feof + */ function gzeof($fp): bool {} -/** @param resource $fp */ +/** + * @param resource $fp + * @alias fgetc + */ function gzgetc($fp): string|false {} -/** @param resource $fp */ +/** + * @param resource $fp + * @alias fpassthru + */ function gzpassthru($fp): int {} -/** @param resource $fp */ +/** + * @param resource $fp + * @alias fseek + */ function gzseek($fp, int $offset, int $whence = SEEK_SET): int {} -/** @param resource $fp */ +/** + * @param resource $fp + * @alias ftell + */ function gztell($fp): int|false {} -/** @param resource $fp */ +/** + * @param resource $fp + * @alias fread + */ function gzread($fp, int $length): string|false {} -/** @param resource $fp */ +/** + * @param resource $fp + * @alias fgets + */ function gzgets($fp, int $length = 1024): string|false {} /** @return resource|false */ From 7c3078737fcdd7c4da0607b2856502089e60194b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sat, 4 Apr 2020 20:41:42 +0200 Subject: [PATCH 035/338] Generate function entries from stubs for a couple of extensions Closes GH-5347 --- ext/bcmath/bcmath.c | 16 +---- ext/bcmath/bcmath.stub.php | 2 + ext/bcmath/bcmath_arginfo.h | 27 ++++++++ ext/bcmath/php_bcmath.h | 11 ---- ext/calendar/calendar.c | 25 +------- ext/calendar/calendar.stub.php | 2 + ext/calendar/calendar_arginfo.h | 43 +++++++++++++ ext/calendar/php_calendar.h | 19 ------ ext/ctype/ctype.c | 54 ++++------------ ext/ctype/ctype.stub.php | 2 + ext/ctype/ctype_arginfo.h | 29 +++++++++ ext/curl/curl.stub.php | 23 ++++--- ext/curl/curl_arginfo.h | 109 +++++++++++++++++++++++++++++--- ext/curl/interface.c | 41 +----------- ext/curl/php_curl.h | 46 -------------- ext/date/php_date.c | 64 +------------------ ext/date/php_date.h | 54 ---------------- ext/date/php_date.stub.php | 3 +- ext/date/php_date_arginfo.h | 103 ++++++++++++++++++++++++++++++ ext/dba/dba.c | 24 +------ ext/dba/dba.stub.php | 2 + ext/dba/dba_arginfo.h | 37 +++++++++++ ext/dba/php_dba.h | 16 ----- ext/dom/dom.stub.php | 2 + ext/dom/dom_arginfo.h | 9 +++ ext/dom/php_dom.c | 7 +- ext/enchant/enchant.c | 32 +--------- ext/enchant/enchant.stub.php | 2 + ext/enchant/enchant_arginfo.h | 49 ++++++++++++++ ext/enchant/php_enchant.h | 23 ------- ext/exif/exif.c | 13 +--- ext/exif/exif.stub.php | 2 + ext/exif/exif_arginfo.h | 15 +++++ ext/exif/php_exif.h | 4 -- ext/fileinfo/fileinfo.c | 16 +---- ext/fileinfo/fileinfo.stub.php | 2 + ext/fileinfo/fileinfo_arginfo.h | 19 ++++++ ext/fileinfo/php_fileinfo.h | 7 -- 38 files changed, 484 insertions(+), 470 deletions(-) diff --git a/ext/bcmath/bcmath.c b/ext/bcmath/bcmath.c index 5d0d47f7c0026..8c46ee0f9344e 100644 --- a/ext/bcmath/bcmath.c +++ b/ext/bcmath/bcmath.c @@ -33,24 +33,10 @@ ZEND_DECLARE_MODULE_GLOBALS(bcmath) static PHP_GINIT_FUNCTION(bcmath); static PHP_GSHUTDOWN_FUNCTION(bcmath); -static const zend_function_entry bcmath_functions[] = { - PHP_FE(bcadd, arginfo_bcadd) - PHP_FE(bcsub, arginfo_bcsub) - PHP_FE(bcmul, arginfo_bcmul) - PHP_FE(bcdiv, arginfo_bcdiv) - PHP_FE(bcmod, arginfo_bcmod) - PHP_FE(bcpow, arginfo_bcpow) - PHP_FE(bcsqrt, arginfo_bcsqrt) - PHP_FE(bcscale, arginfo_bcscale) - PHP_FE(bccomp, arginfo_bccomp) - PHP_FE(bcpowmod, arginfo_bcpowmod) - PHP_FE_END -}; - zend_module_entry bcmath_module_entry = { STANDARD_MODULE_HEADER, "bcmath", - bcmath_functions, + ext_functions, PHP_MINIT(bcmath), PHP_MSHUTDOWN(bcmath), NULL, diff --git a/ext/bcmath/bcmath.stub.php b/ext/bcmath/bcmath.stub.php index 0a975352bb857..6ef6cc0926f4a 100644 --- a/ext/bcmath/bcmath.stub.php +++ b/ext/bcmath/bcmath.stub.php @@ -1,5 +1,7 @@ = 0x070f04 /* 7.15.4 */ /** @param resource $handle */ function curl_escape($handle, string $string): string|false {} +/** @param resource $handle */ +function curl_unescape($handle, string $string): string|false {} + +/** + * @param resource $multi_handle + * @param mixed $value + */ +function curl_multi_setopt($multi_handle, int $option, $value): bool {} + +#endif + /** @param resource $handle */ function curl_exec($handle): string|bool {} @@ -72,12 +86,6 @@ function curl_multi_remove_handle($multi_handle, $handle): int {} /** @param resource $multi_handle */ function curl_multi_select($multi_handle, float $timeout = 1.0): int {} -/** - * @param resource $multi_handle - * @param mixed $value - */ -function curl_multi_setopt($multi_handle, int $option, $value): bool {} - function curl_multi_strerror(int $error_number): ?string {} #if LIBCURL_VERSION_NUM >= 0x071200 /* 7.18.0 */ @@ -113,7 +121,4 @@ function curl_share_strerror(int $error_number): ?string {} function curl_strerror(int $error_number): ?string {} -/** @param resource $handle */ -function curl_unescape($handle, string $string): string|false {} - function curl_version(int $age = UNKNOWN): array|false {} diff --git a/ext/curl/curl_arginfo.h b/ext/curl/curl_arginfo.h index a7ae7a071b08f..9f20f3a4f2c25 100644 --- a/ext/curl/curl_arginfo.h +++ b/ext/curl/curl_arginfo.h @@ -16,10 +16,24 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_error, 0, 1, IS_STRING, 0) ZEND_ARG_INFO(0, handle) ZEND_END_ARG_INFO() +#if LIBCURL_VERSION_NUM >= 0x070f04 /* 7.15.4 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_curl_escape, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, handle) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_END_ARG_INFO() +#endif + +#if LIBCURL_VERSION_NUM >= 0x070f04 /* 7.15.4 */ +#define arginfo_curl_unescape arginfo_curl_escape +#endif + +#if LIBCURL_VERSION_NUM >= 0x070f04 /* 7.15.4 */ +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_multi_setopt, 0, 3, _IS_BOOL, 0) + ZEND_ARG_INFO(0, multi_handle) + ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() +#endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_curl_exec, 0, 1, MAY_BE_STRING|MAY_BE_BOOL) ZEND_ARG_INFO(0, handle) @@ -77,12 +91,6 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_multi_select, 0, 1, IS_LONG ZEND_ARG_TYPE_INFO(0, timeout, IS_DOUBLE, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_multi_setopt, 0, 3, _IS_BOOL, 0) - ZEND_ARG_INFO(0, multi_handle) - ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0) - ZEND_ARG_INFO(0, value) -ZEND_END_ARG_INFO() - ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_multi_strerror, 0, 1, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, error_number, IS_LONG, 0) ZEND_END_ARG_INFO() @@ -127,8 +135,93 @@ ZEND_END_ARG_INFO() #define arginfo_curl_strerror arginfo_curl_multi_strerror -#define arginfo_curl_unescape arginfo_curl_escape - ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_curl_version, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, age, IS_LONG, 0) ZEND_END_ARG_INFO() + + +ZEND_FUNCTION(curl_close); +ZEND_FUNCTION(curl_copy_handle); +ZEND_FUNCTION(curl_errno); +ZEND_FUNCTION(curl_error); +#if LIBCURL_VERSION_NUM >= 0x070f04 /* 7.15.4 */ +ZEND_FUNCTION(curl_escape); +#endif +#if LIBCURL_VERSION_NUM >= 0x070f04 /* 7.15.4 */ +ZEND_FUNCTION(curl_unescape); +#endif +#if LIBCURL_VERSION_NUM >= 0x070f04 /* 7.15.4 */ +ZEND_FUNCTION(curl_multi_setopt); +#endif +ZEND_FUNCTION(curl_exec); +ZEND_FUNCTION(curl_file_create); +ZEND_FUNCTION(curl_getinfo); +ZEND_FUNCTION(curl_init); +ZEND_FUNCTION(curl_multi_add_handle); +ZEND_FUNCTION(curl_multi_close); +ZEND_FUNCTION(curl_multi_errno); +ZEND_FUNCTION(curl_multi_exec); +ZEND_FUNCTION(curl_multi_getcontent); +ZEND_FUNCTION(curl_multi_info_read); +ZEND_FUNCTION(curl_multi_init); +ZEND_FUNCTION(curl_multi_remove_handle); +ZEND_FUNCTION(curl_multi_select); +ZEND_FUNCTION(curl_multi_strerror); +#if LIBCURL_VERSION_NUM >= 0x071200 /* 7.18.0 */ +ZEND_FUNCTION(curl_pause); +#endif +ZEND_FUNCTION(curl_reset); +ZEND_FUNCTION(curl_setopt_array); +ZEND_FUNCTION(curl_setopt); +ZEND_FUNCTION(curl_share_close); +ZEND_FUNCTION(curl_share_errno); +ZEND_FUNCTION(curl_share_init); +ZEND_FUNCTION(curl_share_setopt); +ZEND_FUNCTION(curl_share_strerror); +ZEND_FUNCTION(curl_strerror); +ZEND_FUNCTION(curl_version); + + +static const zend_function_entry ext_functions[] = { + ZEND_FE(curl_close, arginfo_curl_close) + ZEND_FE(curl_copy_handle, arginfo_curl_copy_handle) + ZEND_FE(curl_errno, arginfo_curl_errno) + ZEND_FE(curl_error, arginfo_curl_error) +#if LIBCURL_VERSION_NUM >= 0x070f04 /* 7.15.4 */ + ZEND_FE(curl_escape, arginfo_curl_escape) +#endif +#if LIBCURL_VERSION_NUM >= 0x070f04 /* 7.15.4 */ + ZEND_FE(curl_unescape, arginfo_curl_unescape) +#endif +#if LIBCURL_VERSION_NUM >= 0x070f04 /* 7.15.4 */ + ZEND_FE(curl_multi_setopt, arginfo_curl_multi_setopt) +#endif + ZEND_FE(curl_exec, arginfo_curl_exec) + ZEND_FE(curl_file_create, arginfo_curl_file_create) + ZEND_FE(curl_getinfo, arginfo_curl_getinfo) + ZEND_FE(curl_init, arginfo_curl_init) + ZEND_FE(curl_multi_add_handle, arginfo_curl_multi_add_handle) + ZEND_FE(curl_multi_close, arginfo_curl_multi_close) + ZEND_FE(curl_multi_errno, arginfo_curl_multi_errno) + ZEND_FE(curl_multi_exec, arginfo_curl_multi_exec) + ZEND_FE(curl_multi_getcontent, arginfo_curl_multi_getcontent) + ZEND_FE(curl_multi_info_read, arginfo_curl_multi_info_read) + ZEND_FE(curl_multi_init, arginfo_curl_multi_init) + ZEND_FE(curl_multi_remove_handle, arginfo_curl_multi_remove_handle) + ZEND_FE(curl_multi_select, arginfo_curl_multi_select) + ZEND_FE(curl_multi_strerror, arginfo_curl_multi_strerror) +#if LIBCURL_VERSION_NUM >= 0x071200 /* 7.18.0 */ + ZEND_FE(curl_pause, arginfo_curl_pause) +#endif + ZEND_FE(curl_reset, arginfo_curl_reset) + ZEND_FE(curl_setopt_array, arginfo_curl_setopt_array) + ZEND_FE(curl_setopt, arginfo_curl_setopt) + ZEND_FE(curl_share_close, arginfo_curl_share_close) + ZEND_FE(curl_share_errno, arginfo_curl_share_errno) + ZEND_FE(curl_share_init, arginfo_curl_share_init) + ZEND_FE(curl_share_setopt, arginfo_curl_share_setopt) + ZEND_FE(curl_share_strerror, arginfo_curl_share_strerror) + ZEND_FE(curl_strerror, arginfo_curl_strerror) + ZEND_FE(curl_version, arginfo_curl_version) + ZEND_FE_END +}; diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 38eb40a3020c5..12762cd7f44d4 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -215,51 +215,12 @@ void _php_curl_verify_handlers(php_curl *ch, int reporterror) /* {{{ */ } /* }}} */ -/* {{{ curl_functions[] - */ -static const zend_function_entry curl_functions[] = { - PHP_FE(curl_init, arginfo_curl_init) - PHP_FE(curl_copy_handle, arginfo_curl_copy_handle) - PHP_FE(curl_version, arginfo_curl_version) - PHP_FE(curl_setopt, arginfo_curl_setopt) - PHP_FE(curl_setopt_array, arginfo_curl_setopt_array) - PHP_FE(curl_exec, arginfo_curl_exec) - PHP_FE(curl_getinfo, arginfo_curl_getinfo) - PHP_FE(curl_error, arginfo_curl_error) - PHP_FE(curl_errno, arginfo_curl_errno) - PHP_FE(curl_close, arginfo_curl_close) - PHP_FE(curl_strerror, arginfo_curl_strerror) - PHP_FE(curl_multi_strerror, arginfo_curl_multi_strerror) - PHP_FE(curl_share_strerror, arginfo_curl_share_strerror) - PHP_FE(curl_reset, arginfo_curl_reset) - PHP_FE(curl_escape, arginfo_curl_escape) - PHP_FE(curl_unescape, arginfo_curl_unescape) - PHP_FE(curl_pause, arginfo_curl_pause) - PHP_FE(curl_file_create, arginfo_curl_file_create) - PHP_FE(curl_multi_init, arginfo_curl_multi_init) - PHP_FE(curl_multi_add_handle, arginfo_curl_multi_add_handle) - PHP_FE(curl_multi_remove_handle, arginfo_curl_multi_remove_handle) - PHP_FE(curl_multi_select, arginfo_curl_multi_select) - PHP_FE(curl_multi_exec, arginfo_curl_multi_exec) - PHP_FE(curl_multi_getcontent, arginfo_curl_multi_getcontent) - PHP_FE(curl_multi_info_read, arginfo_curl_multi_info_read) - PHP_FE(curl_multi_close, arginfo_curl_multi_close) - PHP_FE(curl_multi_errno, arginfo_curl_multi_errno) - PHP_FE(curl_multi_setopt, arginfo_curl_multi_setopt) - PHP_FE(curl_share_init, arginfo_curl_share_init) - PHP_FE(curl_share_close, arginfo_curl_share_close) - PHP_FE(curl_share_setopt, arginfo_curl_share_setopt) - PHP_FE(curl_share_errno, arginfo_curl_share_errno) - PHP_FE_END -}; -/* }}} */ - /* {{{ curl_module_entry */ zend_module_entry curl_module_entry = { STANDARD_MODULE_HEADER, "curl", - curl_functions, + ext_functions, PHP_MINIT(curl), PHP_MSHUTDOWN(curl), NULL, diff --git a/ext/curl/php_curl.h b/ext/curl/php_curl.h index ec74e96956fc2..e7e9361e0e022 100644 --- a/ext/curl/php_curl.h +++ b/ext/curl/php_curl.h @@ -72,52 +72,6 @@ PHP_MINIT_FUNCTION(curl); PHP_MSHUTDOWN_FUNCTION(curl); PHP_MINFO_FUNCTION(curl); -PHP_FUNCTION(curl_close); -PHP_FUNCTION(curl_copy_handle); -PHP_FUNCTION(curl_errno); -PHP_FUNCTION(curl_error); -PHP_FUNCTION(curl_exec); -PHP_FUNCTION(curl_getinfo); -PHP_FUNCTION(curl_init); -PHP_FUNCTION(curl_setopt); -PHP_FUNCTION(curl_setopt_array); -PHP_FUNCTION(curl_version); - -PHP_FUNCTION(curl_multi_add_handle); -PHP_FUNCTION(curl_multi_close); -PHP_FUNCTION(curl_multi_exec); -PHP_FUNCTION(curl_multi_getcontent); -PHP_FUNCTION(curl_multi_info_read); -PHP_FUNCTION(curl_multi_init); -PHP_FUNCTION(curl_multi_remove_handle); -PHP_FUNCTION(curl_multi_select); -PHP_FUNCTION(curl_multi_errno); - -PHP_FUNCTION(curl_share_close); -PHP_FUNCTION(curl_share_init); -PHP_FUNCTION(curl_share_setopt); -PHP_FUNCTION(curl_share_errno); - -PHP_FUNCTION(curl_strerror); -PHP_FUNCTION(curl_multi_strerror); -PHP_FUNCTION(curl_share_strerror); - -PHP_FUNCTION(curl_reset); - -#if LIBCURL_VERSION_NUM >= 0x070f04 /* 7.15.4 */ -PHP_FUNCTION(curl_escape); -PHP_FUNCTION(curl_unescape); - -PHP_FUNCTION(curl_multi_setopt); -#endif - -#if LIBCURL_VERSION_NUM >= 0x071200 /* 7.18.0 */ -PHP_FUNCTION(curl_pause); -#endif - -PHP_FUNCTION(curl_file_create); - - void _php_curl_multi_close(zend_resource *); void _php_curl_share_close(zend_resource *); diff --git a/ext/date/php_date.c b/ext/date/php_date.c index ed24895965688..5c6825e50f3c5 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -76,68 +76,6 @@ PHPAPI time_t php_time() #include "php_date_arginfo.h" -/* {{{ Function table */ -static const zend_function_entry date_functions[] = { - PHP_FE(strtotime, arginfo_strtotime) - PHP_FE(date, arginfo_date) - PHP_FE(idate, arginfo_idate) - PHP_FE(gmdate, arginfo_gmdate) - PHP_FE(mktime, arginfo_mktime) - PHP_FE(gmmktime, arginfo_gmmktime) - PHP_FE(checkdate, arginfo_checkdate) - PHP_FE(strftime, arginfo_strftime) - PHP_FE(gmstrftime, arginfo_gmstrftime) - PHP_FE(time, arginfo_time) - PHP_FE(localtime, arginfo_localtime) - PHP_FE(getdate, arginfo_getdate) - - /* Advanced Interface */ - PHP_FE(date_create, arginfo_date_create) - PHP_FE(date_create_immutable, arginfo_date_create_immutable) - PHP_FE(date_create_from_format, arginfo_date_create_from_format) - PHP_FE(date_create_immutable_from_format, arginfo_date_create_immutable_from_format) - PHP_FE(date_parse, arginfo_date_parse) - PHP_FE(date_parse_from_format, arginfo_date_parse_from_format) - PHP_FE(date_get_last_errors, arginfo_date_get_last_errors) - PHP_FE(date_format, arginfo_date_format) - PHP_FE(date_modify, arginfo_date_modify) - PHP_FE(date_add, arginfo_date_add) - PHP_FE(date_sub, arginfo_date_sub) - PHP_FE(date_timezone_get, arginfo_date_timezone_get) - PHP_FE(date_timezone_set, arginfo_date_timezone_set) - PHP_FE(date_offset_get, arginfo_date_offset_get) - PHP_FE(date_diff, arginfo_date_diff) - - PHP_FE(date_time_set, arginfo_date_time_set) - PHP_FE(date_date_set, arginfo_date_date_set) - PHP_FE(date_isodate_set, arginfo_date_isodate_set) - PHP_FE(date_timestamp_set, arginfo_date_timestamp_set) - PHP_FE(date_timestamp_get, arginfo_date_timestamp_get) - - PHP_FE(timezone_open, arginfo_timezone_open) - PHP_FE(timezone_name_get, arginfo_timezone_name_get) - PHP_FE(timezone_name_from_abbr, arginfo_timezone_name_from_abbr) - PHP_FE(timezone_offset_get, arginfo_timezone_offset_get) - PHP_FE(timezone_transitions_get, arginfo_timezone_transitions_get) - PHP_FE(timezone_location_get, arginfo_timezone_location_get) - PHP_FE(timezone_identifiers_list, arginfo_timezone_identifiers_list) - PHP_FE(timezone_abbreviations_list, arginfo_timezone_abbreviations_list) - PHP_FE(timezone_version_get, arginfo_timezone_version_get) - - PHP_FE(date_interval_create_from_date_string, arginfo_date_interval_create_from_date_string) - PHP_FE(date_interval_format, arginfo_date_interval_format) - - /* Options and Configuration */ - PHP_FE(date_default_timezone_set, arginfo_date_default_timezone_set) - PHP_FE(date_default_timezone_get, arginfo_date_default_timezone_get) - - /* Astronomical functions */ - PHP_FE(date_sunrise, arginfo_date_sunrise) - PHP_FE(date_sunset, arginfo_date_sunset) - PHP_FE(date_sun_info, arginfo_date_sun_info) - PHP_FE_END -}; - static const zend_function_entry date_funcs_interface[] = { PHP_ABSTRACT_ME(DateTimeInterface, format, arginfo_class_DateTimeInterface_format) PHP_ABSTRACT_ME(DateTimeInterface, getTimezone, arginfo_class_DateTimeInterface_getTimezone) @@ -350,7 +288,7 @@ zend_module_entry date_module_entry = { NULL, NULL, "date", /* extension name */ - date_functions, /* function list */ + ext_functions, /* function list */ PHP_MINIT(date), /* process startup */ PHP_MSHUTDOWN(date), /* process shutdown */ PHP_RINIT(date), /* request startup */ diff --git a/ext/date/php_date.h b/ext/date/php_date.h index 8458b0187e235..e3008e47e01b0 100644 --- a/ext/date/php_date.h +++ b/ext/date/php_date.h @@ -26,48 +26,12 @@ extern zend_module_entry date_module_entry; #define phpext_date_ptr &date_module_entry -PHP_FUNCTION(date); -PHP_FUNCTION(idate); -PHP_FUNCTION(gmdate); -PHP_FUNCTION(strtotime); - -PHP_FUNCTION(mktime); -PHP_FUNCTION(gmmktime); - -PHP_FUNCTION(checkdate); -PHP_FUNCTION(strftime); -PHP_FUNCTION(gmstrftime); -PHP_FUNCTION(time); -PHP_FUNCTION(localtime); -PHP_FUNCTION(getdate); - /* Advanced Interface */ PHP_METHOD(DateTime, __construct); PHP_METHOD(DateTime, __wakeup); PHP_METHOD(DateTime, __set_state); PHP_METHOD(DateTime, createFromImmutable); PHP_METHOD(DateTime, createFromInterface); -PHP_FUNCTION(date_create); -PHP_FUNCTION(date_create_immutable); -PHP_FUNCTION(date_create_from_format); -PHP_FUNCTION(date_create_immutable_from_format); -PHP_FUNCTION(date_parse); -PHP_FUNCTION(date_parse_from_format); -PHP_FUNCTION(date_get_last_errors); -PHP_FUNCTION(date_format); -PHP_FUNCTION(date_modify); -PHP_FUNCTION(date_add); -PHP_FUNCTION(date_sub); -PHP_FUNCTION(date_timezone_get); -PHP_FUNCTION(date_timezone_set); -PHP_FUNCTION(date_offset_get); -PHP_FUNCTION(date_diff); - -PHP_FUNCTION(date_time_set); -PHP_FUNCTION(date_date_set); -PHP_FUNCTION(date_isodate_set); -PHP_FUNCTION(date_timestamp_set); -PHP_FUNCTION(date_timestamp_get); PHP_METHOD(DateTimeImmutable, __construct); PHP_METHOD(DateTimeImmutable, __set_state); @@ -85,15 +49,6 @@ PHP_METHOD(DateTimeImmutable, createFromInterface); PHP_METHOD(DateTimeZone, __construct); PHP_METHOD(DateTimeZone, __wakeup); PHP_METHOD(DateTimeZone, __set_state); -PHP_FUNCTION(timezone_open); -PHP_FUNCTION(timezone_name_get); -PHP_FUNCTION(timezone_name_from_abbr); -PHP_FUNCTION(timezone_offset_get); -PHP_FUNCTION(timezone_transitions_get); -PHP_FUNCTION(timezone_location_get); -PHP_FUNCTION(timezone_identifiers_list); -PHP_FUNCTION(timezone_abbreviations_list); -PHP_FUNCTION(timezone_version_get); PHP_METHOD(DateInterval, __construct); PHP_METHOD(DateInterval, __wakeup); @@ -109,15 +64,6 @@ PHP_METHOD(DatePeriod, getEndDate); PHP_METHOD(DatePeriod, getDateInterval); PHP_METHOD(DatePeriod, getRecurrences); -/* Options and Configuration */ -PHP_FUNCTION(date_default_timezone_set); -PHP_FUNCTION(date_default_timezone_get); - -/* Astro functions */ -PHP_FUNCTION(date_sunrise); -PHP_FUNCTION(date_sunset); -PHP_FUNCTION(date_sun_info); - PHP_RINIT_FUNCTION(date); PHP_RSHUTDOWN_FUNCTION(date); PHP_MINIT_FUNCTION(date); diff --git a/ext/date/php_date.stub.php b/ext/date/php_date.stub.php index e9985dd6b2216..23936a9d487a1 100644 --- a/ext/date/php_date.stub.php +++ b/ext/date/php_date.stub.php @@ -1,7 +1,6 @@ Date: Sat, 4 Apr 2020 21:26:46 +0200 Subject: [PATCH 036/338] Improve gen_stub.php Closes GH-5350 Add support for generating deprecated function entries, as well as forward declaration of function aliases. --- build/gen_stub.php | 30 +++-- ext/bz2/bz2.c | 38 ++----- ext/bz2/bz2.stub.php | 2 + ext/bz2/bz2_arginfo.h | 27 +++++ ext/ldap/ldap.c | 108 +----------------- ext/ldap/ldap.stub.php | 8 +- ext/ldap/ldap_arginfo.h | 210 +++++++++++++++++++++++++++++++++++ ext/zend_test/test.c | 14 +-- ext/zend_test/test.stub.php | 3 + ext/zend_test/test_arginfo.h | 23 ++++ 10 files changed, 303 insertions(+), 160 deletions(-) diff --git a/build/gen_stub.php b/build/gen_stub.php index 2207a1348b90c..ecad6fd81db7a 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -304,6 +304,8 @@ class FuncInfo { public $className; /** @var ?string */ public $alias; + /** @var bool */ + public $isDeprecated; /** @var ArgInfo[] */ public $args; /** @var ReturnInfo */ @@ -314,12 +316,13 @@ class FuncInfo { public $cond; public function __construct( - string $name, ?string $className, ?string $alias, array $args, ReturnInfo $return, + string $name, ?string $className, ?string $alias, bool $isDeprecated, array $args, ReturnInfo $return, int $numRequiredArgs, ?string $cond ) { $this->name = $name; $this->className = $className; $this->alias = $alias; + $this->isDeprecated = $isDeprecated; $this->args = $args; $this->return = $return; $this->numRequiredArgs = $numRequiredArgs; @@ -419,7 +422,7 @@ function parseDocComment(DocComment $comment): array { $commentText = substr($comment->getText(), 2, -2); $tags = []; foreach (explode("\n", $commentText) as $commentLine) { - $regex = '/^\*\s*@([a-z-]+)(?:\s+(.+))$/'; + $regex = '/^\*\s*@([a-z-]+)(?:\s+(.+))?$/'; if (preg_match($regex, trim($commentLine), $matches, PREG_UNMATCHED_AS_NULL)) { $tags[] = new DocCommentTag($matches[1], $matches[2]); } @@ -434,6 +437,7 @@ function parseFunctionLike( $comment = $func->getDocComment(); $paramMeta = []; $alias = null; + $isDeprecated = false; $haveDocReturnType = false; if ($comment) { @@ -447,6 +451,8 @@ function parseFunctionLike( $paramMeta[$varName]['preferRef'] = true; } else if ($tag->name === 'alias') { $alias = $tag->getValue(); + } else if ($tag->name === 'deprecated') { + $isDeprecated = true; } else if ($tag->name === 'return') { $haveDocReturnType = true; } @@ -507,7 +513,7 @@ function parseFunctionLike( $return = new ReturnInfo( $func->returnsByRef(), $returnType ? Type::fromNode($returnType) : null); - return new FuncInfo($name, $className, $alias, $args, $return, $numRequiredArgs, $cond); + return new FuncInfo($name, $className, $alias, $isDeprecated, $args, $return, $numRequiredArgs, $cond); } function handlePreprocessorConditions(array &$conds, Stmt $stmt): ?string { @@ -737,6 +743,7 @@ function generateCodeWithConditions( } function generateArgInfoCode(FileInfo $fileInfo): string { + $generatedDeclarations = []; $funcInfos = $fileInfo->funcInfos; $code = "/* This is a generated file, edit the .stub.php file instead. */\n"; @@ -761,12 +768,15 @@ function(FuncInfo $funcInfo) use(&$generatedFuncInfos) { if ($fileInfo->generateFunctionEntries) { $code .= "\n\n"; - $code .= generateCodeWithConditions($fileInfo->funcInfos, "", function(FuncInfo $funcInfo) { - if ($funcInfo->alias) { + $code .= generateCodeWithConditions($funcInfos, "", function(FuncInfo $funcInfo) use (&$generatedDeclarations) { + $name = $funcInfo->alias ?? $funcInfo->name; + $key = "$name|$funcInfo->cond"; + if (isset($generatedDeclarations[$key])) { return null; } - return "ZEND_FUNCTION($funcInfo->name);\n"; + $generatedDeclarations[$key] = true; + return "ZEND_FUNCTION($name);\n"; }); $code .= "\n\nstatic const zend_function_entry ext_functions[] = {\n"; @@ -776,9 +786,13 @@ function(FuncInfo $funcInfo) use(&$generatedFuncInfos) { "\tZEND_FALIAS(%s, %s, %s)\n", $funcInfo->name, $funcInfo->alias, $funcInfo->getArgInfoName() ); - } else { - return sprintf("\tZEND_FE(%s, %s)\n", $funcInfo->name, $funcInfo->getArgInfoName()); } + + if ($funcInfo->isDeprecated) { + return sprintf("\tZEND_DEP_FE(%s, %s)\n", $funcInfo->name, $funcInfo->getArgInfoName()); + } + + return sprintf("\tZEND_FE(%s, %s)\n", $funcInfo->name, $funcInfo->getArgInfoName()); }); $code .= "\tZEND_FE_END\n"; $code .= "};\n"; diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c index 005520c2ad018..29046e7122093 100644 --- a/ext/bz2/bz2.c +++ b/ext/bz2/bz2.c @@ -25,7 +25,6 @@ #if HAVE_BZ2 /* PHP Includes */ -#include "ext/standard/file.h" #include "ext/standard/info.h" #include "ext/standard/php_string.h" #include "main/php_network.h" @@ -41,32 +40,11 @@ static PHP_MINIT_FUNCTION(bz2); static PHP_MSHUTDOWN_FUNCTION(bz2); static PHP_MINFO_FUNCTION(bz2); -static PHP_FUNCTION(bzopen); -static PHP_FUNCTION(bzread); -static PHP_FUNCTION(bzerrno); -static PHP_FUNCTION(bzerrstr); -static PHP_FUNCTION(bzerror); -static PHP_FUNCTION(bzcompress); -static PHP_FUNCTION(bzdecompress); - -static const zend_function_entry bz2_functions[] = { - PHP_FE(bzopen, arginfo_bzopen) - PHP_FE(bzread, arginfo_bzread) - PHP_FALIAS(bzwrite, fwrite, arginfo_bzwrite) - PHP_FALIAS(bzflush, fflush, arginfo_bzflush) - PHP_FALIAS(bzclose, fclose, arginfo_bzclose) - PHP_FE(bzerrno, arginfo_bzerrno) - PHP_FE(bzerrstr, arginfo_bzerrstr) - PHP_FE(bzerror, arginfo_bzerror) - PHP_FE(bzcompress, arginfo_bzcompress) - PHP_FE(bzdecompress, arginfo_bzdecompress) - PHP_FE_END -}; zend_module_entry bz2_module_entry = { STANDARD_MODULE_HEADER, "bz2", - bz2_functions, + ext_functions, PHP_MINIT(bz2), PHP_MSHUTDOWN(bz2), NULL, @@ -325,7 +303,7 @@ static PHP_MINFO_FUNCTION(bz2) /* {{{ proto string bzread(resource bz[, int length]) Reads up to length bytes from a BZip2 stream, or 1024 bytes if length is not specified */ -static PHP_FUNCTION(bzread) +PHP_FUNCTION(bzread) { zval *bz; zend_long len = 1024; @@ -353,7 +331,7 @@ static PHP_FUNCTION(bzread) /* {{{ proto resource bzopen(string|int file|fp, string mode) Opens a new BZip2 stream */ -static PHP_FUNCTION(bzopen) +PHP_FUNCTION(bzopen) { zval *file; /* The file to open */ char *mode; /* The mode to open the stream with */ @@ -444,7 +422,7 @@ static PHP_FUNCTION(bzopen) /* {{{ proto int bzerrno(resource bz) Returns the error number */ -static PHP_FUNCTION(bzerrno) +PHP_FUNCTION(bzerrno) { php_bz2_error(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_BZ_ERRNO); } @@ -452,7 +430,7 @@ static PHP_FUNCTION(bzerrno) /* {{{ proto string bzerrstr(resource bz) Returns the error string */ -static PHP_FUNCTION(bzerrstr) +PHP_FUNCTION(bzerrstr) { php_bz2_error(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_BZ_ERRSTR); } @@ -460,7 +438,7 @@ static PHP_FUNCTION(bzerrstr) /* {{{ proto array bzerror(resource bz) Returns the error number and error string in an associative array */ -static PHP_FUNCTION(bzerror) +PHP_FUNCTION(bzerror) { php_bz2_error(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_BZ_ERRBOTH); } @@ -468,7 +446,7 @@ static PHP_FUNCTION(bzerror) /* {{{ proto string bzcompress(string source [, int blocksize100k [, int workfactor]]) Compresses a string into BZip2 encoded data */ -static PHP_FUNCTION(bzcompress) +PHP_FUNCTION(bzcompress) { char *source; /* Source data to compress */ zend_long zblock_size = 0; /* Optional block size to use */ @@ -519,7 +497,7 @@ static PHP_FUNCTION(bzcompress) /* {{{ proto string bzdecompress(string source [, int small]) Decompresses BZip2 compressed data */ -static PHP_FUNCTION(bzdecompress) +PHP_FUNCTION(bzdecompress) { char *source; zend_string *dest; diff --git a/ext/bz2/bz2.stub.php b/ext/bz2/bz2.stub.php index 6c871e3990746..2d47c045013bb 100644 --- a/ext/bz2/bz2.stub.php +++ b/ext/bz2/bz2.stub.php @@ -1,5 +1,7 @@ 2000) || HAVE_ORALDAP - PHP_FE(ldap_rename, arginfo_ldap_rename) - PHP_FE(ldap_rename_ext, arginfo_ldap_rename_ext) - PHP_FE(ldap_get_option, arginfo_ldap_get_option) - PHP_FE(ldap_set_option, arginfo_ldap_set_option) - PHP_FE(ldap_first_reference, arginfo_ldap_first_reference) - PHP_FE(ldap_next_reference, arginfo_ldap_next_reference) -#ifdef HAVE_LDAP_PARSE_REFERENCE - PHP_FE(ldap_parse_reference, arginfo_ldap_parse_reference) -#endif -#ifdef HAVE_LDAP_PARSE_RESULT - PHP_FE(ldap_parse_result, arginfo_ldap_parse_result) -#endif -#ifdef HAVE_LDAP_START_TLS_S - PHP_FE(ldap_start_tls, arginfo_ldap_start_tls) -#endif -#ifdef HAVE_LDAP_EXTENDED_OPERATION_S - PHP_FE(ldap_exop, arginfo_ldap_exop) -#endif -#ifdef HAVE_LDAP_PASSWD - PHP_FE(ldap_exop_passwd, arginfo_ldap_exop_passwd) -#endif -#ifdef HAVE_LDAP_WHOAMI_S - PHP_FE(ldap_exop_whoami, arginfo_ldap_exop_whoami) -#endif -#ifdef HAVE_LDAP_REFRESH_S - PHP_FE(ldap_exop_refresh, arginfo_ldap_exop_refresh) -#endif -#ifdef HAVE_LDAP_PARSE_EXTENDED_RESULT - PHP_FE(ldap_parse_exop, arginfo_ldap_parse_exop) -#endif -#endif - -#if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC) - PHP_FE(ldap_set_rebind_proc, arginfo_ldap_set_rebind_proc) -#endif - - PHP_FE(ldap_escape, arginfo_ldap_escape) - -#ifdef STR_TRANSLATION - PHP_FE(ldap_t61_to_8859, arginfo_ldap_t61_to_8859) - PHP_FE(ldap_8859_to_t61, arginfo_ldap_8859_to_t61) -#endif - -#ifdef LDAP_CONTROL_PAGEDRESULTS - PHP_DEP_FE(ldap_control_paged_result, arginfo_ldap_control_paged_result) - PHP_DEP_FE(ldap_control_paged_result_response, arginfo_ldap_control_paged_result_response) -#endif - PHP_FE_END -}; -/* }}} */ - zend_module_entry ldap_module_entry = { /* {{{ */ STANDARD_MODULE_HEADER, "ldap", - ldap_functions, + ext_functions, PHP_MINIT(ldap), PHP_MSHUTDOWN(ldap), NULL, diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php index 8224bc15837f5..afe6b7e91894f 100644 --- a/ext/ldap/ldap.stub.php +++ b/ext/ldap/ldap.stub.php @@ -1,6 +1,6 @@ 2000) || HAVE_NSLDAP || HAVE_ORALDAP +ZEND_FUNCTION(ldap_rename); +#endif +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP +ZEND_FUNCTION(ldap_rename_ext); +#endif +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP +ZEND_FUNCTION(ldap_get_option); +#endif +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP +ZEND_FUNCTION(ldap_set_option); +#endif +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP +ZEND_FUNCTION(ldap_first_reference); +#endif +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP +ZEND_FUNCTION(ldap_next_reference); +#endif +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP && defined(HAVE_LDAP_PARSE_REFERENCE) +ZEND_FUNCTION(ldap_parse_reference); +#endif +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP && defined(HAVE_LDAP_PARSE_RESULT) +ZEND_FUNCTION(ldap_parse_result); +#endif +#if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC) +ZEND_FUNCTION(ldap_set_rebind_proc); +#endif +#if defined(HAVE_LDAP_START_TLS_S) +ZEND_FUNCTION(ldap_start_tls); +#endif +ZEND_FUNCTION(ldap_escape); +#if defined(STR_TRANSLATION) +ZEND_FUNCTION(ldap_t61_to_8859); +#endif +#if defined(STR_TRANSLATION) +ZEND_FUNCTION(ldap_8859_to_t61); +#endif +#if defined(HAVE_LDAP_EXTENDED_OPERATION_S) +ZEND_FUNCTION(ldap_exop); +#endif +#if defined(HAVE_LDAP_PASSWD) +ZEND_FUNCTION(ldap_exop_passwd); +#endif +#if defined(HAVE_LDAP_WHOAMI_S) +ZEND_FUNCTION(ldap_exop_whoami); +#endif +#if defined(HAVE_LDAP_REFRESH_S) +ZEND_FUNCTION(ldap_exop_refresh); +#endif +#if defined(HAVE_LDAP_PARSE_EXTENDED_RESULT) +ZEND_FUNCTION(ldap_parse_exop); +#endif + + +static const zend_function_entry ext_functions[] = { +#if defined(HAVE_ORALDAP) + ZEND_FE(ldap_connect, arginfo_ldap_connect) +#endif +#if !(defined(HAVE_ORALDAP)) + ZEND_FE(ldap_connect, arginfo_ldap_connect) +#endif + ZEND_FE(ldap_unbind, arginfo_ldap_unbind) + ZEND_FALIAS(ldap_close, ldap_unbind, arginfo_ldap_close) + ZEND_FE(ldap_bind, arginfo_ldap_bind) + ZEND_FE(ldap_bind_ext, arginfo_ldap_bind_ext) +#if defined(HAVE_LDAP_SASL) + ZEND_FE(ldap_sasl_bind, arginfo_ldap_sasl_bind) +#endif + ZEND_FE(ldap_read, arginfo_ldap_read) + ZEND_FE(ldap_list, arginfo_ldap_list) + ZEND_FE(ldap_search, arginfo_ldap_search) + ZEND_FE(ldap_free_result, arginfo_ldap_free_result) + ZEND_FE(ldap_count_entries, arginfo_ldap_count_entries) + ZEND_FE(ldap_first_entry, arginfo_ldap_first_entry) + ZEND_FE(ldap_next_entry, arginfo_ldap_next_entry) + ZEND_FE(ldap_get_entries, arginfo_ldap_get_entries) + ZEND_FE(ldap_first_attribute, arginfo_ldap_first_attribute) + ZEND_FE(ldap_next_attribute, arginfo_ldap_next_attribute) + ZEND_FE(ldap_get_attributes, arginfo_ldap_get_attributes) + ZEND_FE(ldap_get_values_len, arginfo_ldap_get_values_len) + ZEND_FALIAS(ldap_get_values, ldap_get_values_len, arginfo_ldap_get_values) + ZEND_FE(ldap_get_dn, arginfo_ldap_get_dn) + ZEND_FE(ldap_explode_dn, arginfo_ldap_explode_dn) + ZEND_FE(ldap_dn2ufn, arginfo_ldap_dn2ufn) + ZEND_FE(ldap_add, arginfo_ldap_add) + ZEND_FE(ldap_add_ext, arginfo_ldap_add_ext) + ZEND_FE(ldap_delete, arginfo_ldap_delete) + ZEND_FE(ldap_delete_ext, arginfo_ldap_delete_ext) + ZEND_FE(ldap_modify_batch, arginfo_ldap_modify_batch) + ZEND_FE(ldap_mod_add, arginfo_ldap_mod_add) + ZEND_FE(ldap_mod_add_ext, arginfo_ldap_mod_add_ext) + ZEND_FE(ldap_mod_replace, arginfo_ldap_mod_replace) + ZEND_FALIAS(ldap_modify, ldap_mod_replace, arginfo_ldap_modify) + ZEND_FE(ldap_mod_replace_ext, arginfo_ldap_mod_replace_ext) + ZEND_FE(ldap_mod_del, arginfo_ldap_mod_del) + ZEND_FE(ldap_mod_del_ext, arginfo_ldap_mod_del_ext) + ZEND_FE(ldap_errno, arginfo_ldap_errno) + ZEND_FE(ldap_error, arginfo_ldap_error) + ZEND_FE(ldap_err2str, arginfo_ldap_err2str) + ZEND_FE(ldap_compare, arginfo_ldap_compare) +#if defined(LDAP_CONTROL_PAGEDRESULTS) + ZEND_DEP_FE(ldap_control_paged_result, arginfo_ldap_control_paged_result) +#endif +#if defined(LDAP_CONTROL_PAGEDRESULTS) + ZEND_DEP_FE(ldap_control_paged_result_response, arginfo_ldap_control_paged_result_response) +#endif +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP + ZEND_FE(ldap_rename, arginfo_ldap_rename) +#endif +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP + ZEND_FE(ldap_rename_ext, arginfo_ldap_rename_ext) +#endif +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP + ZEND_FE(ldap_get_option, arginfo_ldap_get_option) +#endif +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP + ZEND_FE(ldap_set_option, arginfo_ldap_set_option) +#endif +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP + ZEND_FE(ldap_first_reference, arginfo_ldap_first_reference) +#endif +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP + ZEND_FE(ldap_next_reference, arginfo_ldap_next_reference) +#endif +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP && defined(HAVE_LDAP_PARSE_REFERENCE) + ZEND_FE(ldap_parse_reference, arginfo_ldap_parse_reference) +#endif +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP && defined(HAVE_LDAP_PARSE_RESULT) + ZEND_FE(ldap_parse_result, arginfo_ldap_parse_result) +#endif +#if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC) + ZEND_FE(ldap_set_rebind_proc, arginfo_ldap_set_rebind_proc) +#endif +#if defined(HAVE_LDAP_START_TLS_S) + ZEND_FE(ldap_start_tls, arginfo_ldap_start_tls) +#endif + ZEND_FE(ldap_escape, arginfo_ldap_escape) +#if defined(STR_TRANSLATION) + ZEND_FE(ldap_t61_to_8859, arginfo_ldap_t61_to_8859) +#endif +#if defined(STR_TRANSLATION) + ZEND_FE(ldap_8859_to_t61, arginfo_ldap_8859_to_t61) +#endif +#if defined(HAVE_LDAP_EXTENDED_OPERATION_S) + ZEND_FE(ldap_exop, arginfo_ldap_exop) +#endif +#if defined(HAVE_LDAP_PASSWD) + ZEND_FE(ldap_exop_passwd, arginfo_ldap_exop_passwd) +#endif +#if defined(HAVE_LDAP_WHOAMI_S) + ZEND_FE(ldap_exop_whoami, arginfo_ldap_exop_whoami) +#endif +#if defined(HAVE_LDAP_REFRESH_S) + ZEND_FE(ldap_exop_refresh, arginfo_ldap_exop_refresh) +#endif +#if defined(HAVE_LDAP_PARSE_EXTENDED_RESULT) + ZEND_FE(ldap_parse_exop, arginfo_ldap_parse_exop) +#endif + ZEND_FE_END +}; diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c index 185120234899c..f7c2913fac288 100644 --- a/ext/zend_test/test.c +++ b/ext/zend_test/test.c @@ -311,22 +311,10 @@ PHP_MINFO_FUNCTION(zend_test) php_info_print_table_end(); } -static const zend_function_entry zend_test_functions[] = { - ZEND_FE(zend_test_array_return, arginfo_zend_test_array_return) - ZEND_FE(zend_test_nullable_array_return, arginfo_zend_test_nullable_array_return) - ZEND_FE(zend_test_void_return, arginfo_zend_test_void_return) - ZEND_DEP_FE(zend_test_deprecated, arginfo_zend_test_deprecated) - ZEND_FE(zend_create_unterminated_string, arginfo_zend_create_unterminated_string) - ZEND_FE(zend_terminate_string, arginfo_zend_terminate_string) - ZEND_FE(zend_leak_bytes, arginfo_zend_leak_bytes) - ZEND_FE(zend_leak_variable, arginfo_zend_leak_variable) - ZEND_FE_END -}; - zend_module_entry zend_test_module_entry = { STANDARD_MODULE_HEADER, "zend-test", - zend_test_functions, + ext_functions, PHP_MINIT(zend_test), PHP_MSHUTDOWN(zend_test), PHP_RINIT(zend_test), diff --git a/ext/zend_test/test.stub.php b/ext/zend_test/test.stub.php index b75dfea9c0234..84724fd2557b1 100644 --- a/ext/zend_test/test.stub.php +++ b/ext/zend_test/test.stub.php @@ -1,5 +1,7 @@ Date: Sun, 5 Apr 2020 00:03:08 +0200 Subject: [PATCH 037/338] Move variable declaration closer to its usage --- build/gen_stub.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gen_stub.php b/build/gen_stub.php index ecad6fd81db7a..fd8caffaf670d 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -743,7 +743,6 @@ function generateCodeWithConditions( } function generateArgInfoCode(FileInfo $fileInfo): string { - $generatedDeclarations = []; $funcInfos = $fileInfo->funcInfos; $code = "/* This is a generated file, edit the .stub.php file instead. */\n"; @@ -768,6 +767,7 @@ function(FuncInfo $funcInfo) use(&$generatedFuncInfos) { if ($fileInfo->generateFunctionEntries) { $code .= "\n\n"; + $generatedDeclarations = []; $code .= generateCodeWithConditions($funcInfos, "", function(FuncInfo $funcInfo) use (&$generatedDeclarations) { $name = $funcInfo->alias ?? $funcInfo->name; $key = "$name|$funcInfo->cond"; From 5322de1ba8428c0231c972586217f9b1b705c45d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sat, 4 Apr 2020 23:51:10 +0200 Subject: [PATCH 038/338] Generate functions entries from stubs for another set of extensions Closes GH-5351 --- ext/filter/filter.c | 16 +- ext/filter/filter.stub.php | 2 + ext/filter/filter_arginfo.h | 21 +++ ext/filter/php_filter.h | 8 - ext/ftp/ftp.stub.php | 2 + ext/ftp/ftp_arginfo.h | 82 ++++++++++ ext/ftp/php_ftp.c | 44 +----- ext/ftp/php_ftp.h | 38 ----- ext/gd/gd.c | 152 +----------------- ext/gd/gd.stub.php | 2 + ext/gd/gd_arginfo.h | 283 ++++++++++++++++++++++++++++++++++ ext/gd/php_gd.h | 133 ---------------- ext/gettext/gettext.c | 46 ++---- ext/gettext/gettext.stub.php | 5 + ext/gettext/gettext_arginfo.h | 44 ++++++ ext/gettext/php_gettext.h | 18 --- ext/gmp/gmp.c | 60 +------ ext/gmp/gmp.stub.php | 2 + ext/gmp/gmp_arginfo.h | 108 +++++++++++++ ext/gmp/php_gmp.h | 52 ------- ext/hash/hash.c | 36 +---- ext/hash/hash.stub.php | 2 + ext/hash/hash_arginfo.h | 67 ++++++++ ext/hash/php_hash.h | 14 -- ext/iconv/iconv.c | 21 +-- ext/iconv/iconv.stub.php | 2 + ext/iconv/iconv_arginfo.h | 27 ++++ ext/imap/php_imap.c | 92 +---------- ext/imap/php_imap.h | 80 ---------- ext/imap/php_imap.stub.php | 2 + ext/imap/php_imap_arginfo.h | 177 +++++++++++++++++++++ ext/json/json.c | 24 +-- ext/json/json.stub.php | 2 + ext/json/json_arginfo.h | 15 ++ 34 files changed, 868 insertions(+), 811 deletions(-) diff --git a/ext/filter/filter.c b/ext/filter/filter.c index 996308a4181de..8feae0a3dfa11 100644 --- a/ext/filter/filter.c +++ b/ext/filter/filter.c @@ -78,26 +78,12 @@ static const filter_list_entry filter_list[] = { static unsigned int php_sapi_filter(int arg, char *var, char **val, size_t val_len, size_t *new_val_len); static unsigned int php_sapi_filter_init(void); -/* {{{ filter_functions[] - */ -static const zend_function_entry filter_functions[] = { - PHP_FE(filter_input, arginfo_filter_input) - PHP_FE(filter_var, arginfo_filter_var) - PHP_FE(filter_input_array, arginfo_filter_input_array) - PHP_FE(filter_var_array, arginfo_filter_var_array) - PHP_FE(filter_list, arginfo_filter_list) - PHP_FE(filter_has_var, arginfo_filter_has_var) - PHP_FE(filter_id, arginfo_filter_id) - PHP_FE_END -}; -/* }}} */ - /* {{{ filter_module_entry */ zend_module_entry filter_module_entry = { STANDARD_MODULE_HEADER, "filter", - filter_functions, + ext_functions, PHP_MINIT(filter), PHP_MSHUTDOWN(filter), NULL, diff --git a/ext/filter/filter.stub.php b/ext/filter/filter.stub.php index 31a7f2c3e6166..5014e60dd95e0 100644 --- a/ext/filter/filter.stub.php +++ b/ext/filter/filter.stub.php @@ -1,5 +1,7 @@ zend_module_entry php_gettext_module_entry = { STANDARD_MODULE_HEADER, "gettext", - php_gettext_functions, + ext_functions, NULL, NULL, NULL, @@ -96,7 +70,7 @@ PHP_MINFO_FUNCTION(php_gettext) /* {{{ proto string textdomain(string domain) Set the textdomain to "domain". Returns the current domain */ -PHP_NAMED_FUNCTION(zif_textdomain) +PHP_FUNCTION(textdomain) { char *domain = NULL, *domain_name, *retval; size_t domain_len = 0; @@ -121,7 +95,7 @@ PHP_NAMED_FUNCTION(zif_textdomain) /* {{{ proto string gettext(string msgid) Return the translation of msgid for the current domain, or msgid unaltered if a translation does not exist */ -PHP_NAMED_FUNCTION(zif_gettext) +PHP_FUNCTION(gettext) { char *msgstr; zend_string *msgid; @@ -143,7 +117,7 @@ PHP_NAMED_FUNCTION(zif_gettext) /* {{{ proto string dgettext(string domain_name, string msgid) Return the translation of msgid for domain_name, or msgid unaltered if a translation does not exist */ -PHP_NAMED_FUNCTION(zif_dgettext) +PHP_FUNCTION(dgettext) { char *msgstr; zend_string *domain, *msgid; @@ -167,7 +141,7 @@ PHP_NAMED_FUNCTION(zif_dgettext) /* {{{ proto string dcgettext(string domain_name, string msgid, int category) Return the translation of msgid for domain_name and category, or msgid unaltered if a translation does not exist */ -PHP_NAMED_FUNCTION(zif_dcgettext) +PHP_FUNCTION(dcgettext) { char *msgstr; zend_string *domain, *msgid; @@ -192,7 +166,7 @@ PHP_NAMED_FUNCTION(zif_dcgettext) /* {{{ proto string bindtextdomain(string domain_name, string dir) Bind to the text domain domain_name, looking for translations in dir. Returns the current domain */ -PHP_NAMED_FUNCTION(zif_bindtextdomain) +PHP_FUNCTION(bindtextdomain) { char *domain, *dir; size_t domain_len, dir_len; @@ -226,7 +200,7 @@ PHP_NAMED_FUNCTION(zif_bindtextdomain) #if HAVE_NGETTEXT /* {{{ proto string ngettext(string MSGID1, string MSGID2, int N) Plural version of gettext() */ -PHP_NAMED_FUNCTION(zif_ngettext) +PHP_FUNCTION(ngettext) { char *msgid1, *msgid2, *msgstr; size_t msgid1_len, msgid2_len; @@ -250,7 +224,7 @@ PHP_NAMED_FUNCTION(zif_ngettext) #if HAVE_DNGETTEXT /* {{{ proto string dngettext(string domain, string msgid1, string msgid2, int count) Plural version of dgettext() */ -PHP_NAMED_FUNCTION(zif_dngettext) +PHP_FUNCTION(dngettext) { char *domain, *msgid1, *msgid2, *msgstr = NULL; size_t domain_len, msgid1_len, msgid2_len; @@ -276,7 +250,7 @@ PHP_NAMED_FUNCTION(zif_dngettext) #if HAVE_DCNGETTEXT /* {{{ proto string dcngettext(string domain, string msgid1, string msgid2, int n, int category) Plural version of dcgettext() */ -PHP_NAMED_FUNCTION(zif_dcngettext) +PHP_FUNCTION(dcngettext) { char *domain, *msgid1, *msgid2, *msgstr = NULL; size_t domain_len, msgid1_len, msgid2_len; @@ -305,7 +279,7 @@ PHP_NAMED_FUNCTION(zif_dcngettext) /* {{{ proto string bind_textdomain_codeset(string domain, string codeset) Specify the character encoding in which the messages from the DOMAIN message catalog will be returned. */ -PHP_NAMED_FUNCTION(zif_bind_textdomain_codeset) +PHP_FUNCTION(bind_textdomain_codeset) { char *domain, *codeset, *retval = NULL; size_t domain_len, codeset_len; diff --git a/ext/gettext/gettext.stub.php b/ext/gettext/gettext.stub.php index 16315f0033051..71c7712001cfb 100644 --- a/ext/gettext/gettext.stub.php +++ b/ext/gettext/gettext.stub.php @@ -1,9 +1,14 @@ static PHP_MINFO_FUNCTION(json); -static PHP_FUNCTION(json_encode); -static PHP_FUNCTION(json_decode); -static PHP_FUNCTION(json_last_error); -static PHP_FUNCTION(json_last_error_msg); PHP_JSON_API zend_class_entry *php_json_serializable_ce; PHP_JSON_API zend_class_entry *php_json_exception_ce; PHP_JSON_API ZEND_DECLARE_MODULE_GLOBALS(json) -/* {{{ json_functions[] */ -static const zend_function_entry json_functions[] = { - PHP_FE(json_encode, arginfo_json_encode) - PHP_FE(json_decode, arginfo_json_decode) - PHP_FE(json_last_error, arginfo_json_last_error) - PHP_FE(json_last_error_msg, arginfo_json_last_error_msg) - PHP_FE_END -}; -/* }}} */ - /* {{{ JsonSerializable methods */ static const zend_function_entry json_serializable_interface[] = { PHP_ABSTRACT_ME(JsonSerializable, jsonSerialize, arginfo_class_JsonSerializable_jsonSerialize) @@ -132,7 +118,7 @@ static PHP_GINIT_FUNCTION(json) zend_module_entry json_module_entry = { STANDARD_MODULE_HEADER, "json", - json_functions, + ext_functions, PHP_MINIT(json), NULL, NULL, @@ -239,7 +225,7 @@ PHP_JSON_API int php_json_decode_ex(zval *return_value, char *str, size_t str_le /* {{{ proto string json_encode(mixed data [, int options[, int depth]]) Returns the JSON representation of a value */ -static PHP_FUNCTION(json_encode) +PHP_FUNCTION(json_encode) { zval *parameter; php_json_encoder encoder; @@ -282,7 +268,7 @@ static PHP_FUNCTION(json_encode) /* {{{ proto mixed json_decode(string json [, bool assoc [, int depth]]) Decodes the JSON representation into a PHP value */ -static PHP_FUNCTION(json_decode) +PHP_FUNCTION(json_decode) { char *str; size_t str_len; @@ -337,7 +323,7 @@ static PHP_FUNCTION(json_decode) /* {{{ proto int json_last_error() Returns the error code of the last json_encode() or json_decode() call. */ -static PHP_FUNCTION(json_last_error) +PHP_FUNCTION(json_last_error) { ZEND_PARSE_PARAMETERS_NONE(); @@ -347,7 +333,7 @@ static PHP_FUNCTION(json_last_error) /* {{{ proto string json_last_error_msg() Returns the error string of the last json_encode() or json_decode() call. */ -static PHP_FUNCTION(json_last_error_msg) +PHP_FUNCTION(json_last_error_msg) { ZEND_PARSE_PARAMETERS_NONE(); diff --git a/ext/json/json.stub.php b/ext/json/json.stub.php index c5713a7980d40..406bd8a87c869 100644 --- a/ext/json/json.stub.php +++ b/ext/json/json.stub.php @@ -1,5 +1,7 @@ Date: Fri, 3 Apr 2020 18:20:43 +0200 Subject: [PATCH 039/338] Convert some if blocks to assertions --- ext/mbstring/mbstring.c | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index a327d6310444a..c2c7954af9d58 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -2545,10 +2545,8 @@ MBSTRING_API char *php_mb_convert_encoding_ex(const char *input, size_t length, /* initialize converter */ convd = mbfl_buffer_converter_new(from_encoding, to_encoding, string.len); - if (convd == NULL) { - php_error_docref(NULL, E_WARNING, "Unable to create character encoding converter"); - return NULL; - } + /* If this assertion fails this means some memory allocation failure which is a bug */ + ZEND_ASSERT(convd != NULL); mbfl_buffer_converter_illegal_mode(convd, MBSTRG(current_filter_illegal_mode)); mbfl_buffer_converter_illegal_substchar(convd, MBSTRG(current_filter_illegal_substchar)); @@ -3342,10 +3340,9 @@ PHP_FUNCTION(mb_convert_variables) convd = NULL; if (from_encoding != &mbfl_encoding_pass) { convd = mbfl_buffer_converter_new(from_encoding, to_encoding, 0); - if (convd == NULL) { - php_error_docref(NULL, E_WARNING, "Unable to create converter"); - RETURN_FALSE; - } + /* If this assertion fails this means some memory allocation failure which is a bug */ + ZEND_ASSERT(convd != NULL); + mbfl_buffer_converter_illegal_mode(convd, MBSTRG(current_filter_illegal_mode)); mbfl_buffer_converter_illegal_substchar(convd, MBSTRG(current_filter_illegal_substchar)); } @@ -4127,10 +4124,8 @@ MBSTRING_API int php_mb_check_encoding( mbfl_buffer_converter *convd; convd = php_mb_init_convd(encoding); - if (convd == NULL) { - php_error_docref(NULL, E_WARNING, "Unable to create converter"); - return 0; - } + /* If this assertion fails this means some memory allocation failure which is a bug */ + ZEND_ASSERT(convd != NULL); if (php_mb_check_encoding_impl(convd, input, length, encoding)) { mbfl_buffer_converter_delete(convd); @@ -4151,10 +4146,8 @@ static int php_mb_check_encoding_recursive(HashTable *vars, const mbfl_encoding (void)(idx); convd = php_mb_init_convd(encoding); - if (convd == NULL) { - php_error_docref(NULL, E_WARNING, "Unable to create converter"); - return 0; - } + /* If this assertion fails this means some memory allocation failure which is a bug */ + ZEND_ASSERT(convd != NULL); if (GC_IS_RECURSIVE(vars)) { mbfl_buffer_converter_delete(convd); @@ -4270,13 +4263,9 @@ static inline zend_long php_mb_ord(const char *str, size_t str_len, zend_string zend_long cp; mbfl_wchar_device_init(&dev); - filter = mbfl_convert_filter_new( - enc, &mbfl_encoding_wchar, - mbfl_wchar_device_output, 0, &dev); - if (!filter) { - php_error_docref(NULL, E_WARNING, "Creation of filter failed"); - return -1; - } + filter = mbfl_convert_filter_new(enc, &mbfl_encoding_wchar, mbfl_wchar_device_output, 0, &dev); + /* If this assertion fails this means some memory allocation failure which is a bug */ + ZEND_ASSERT(filter != NULL); mbfl_convert_filter_feed_string(filter, (const unsigned char *) str, str_len); mbfl_convert_filter_flush(filter); From 07062e1fc58b09e459eff2265b89985124e3ada8 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 3 Apr 2020 19:14:42 +0200 Subject: [PATCH 040/338] Promote some warnings to ValueError in mbstring Promoted warnings are: * Empty encoding lists * Unknown language * Start and Width out of bound --- ext/mbstring/mbstring.c | 33 +++++++------ ..._convert_encoding_empty_encoding_list.phpt | 27 ++++++++++ ...convert_variables_empty_encoding_list.phpt | 26 ++++++++++ ...b_detect_encoding_empty_encoding_list.phpt | 26 ++++++++++ .../mb_detect_order_empty_encoding_list.phpt | 24 +++++++++ ext/mbstring/tests/mb_language.phpt | 12 +++-- ext/mbstring/tests/mb_strimwidth.phpt | 49 ++++++++++--------- 7 files changed, 152 insertions(+), 45 deletions(-) create mode 100644 ext/mbstring/tests/mb_convert_encoding_empty_encoding_list.phpt create mode 100644 ext/mbstring/tests/mb_convert_variables_empty_encoding_list.phpt create mode 100644 ext/mbstring/tests/mb_detect_encoding_empty_encoding_list.phpt create mode 100644 ext/mbstring/tests/mb_detect_order_empty_encoding_list.phpt diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index c2c7954af9d58..454440ef6ec77 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1365,11 +1365,12 @@ PHP_FUNCTION(mb_language) } else { zend_string *ini_name = zend_string_init("mbstring.language", sizeof("mbstring.language") - 1, 0); if (FAILURE == zend_alter_ini_entry(ini_name, name, PHP_INI_USER, PHP_INI_STAGE_RUNTIME)) { - php_error_docref(NULL, E_WARNING, "Unknown language \"%s\"", ZSTR_VAL(name)); - RETVAL_FALSE; - } else { - RETVAL_TRUE; + zend_argument_value_error(1, "must be a valid language, \"%s\" given", ZSTR_VAL(name)); + zend_string_release_ex(ini_name, 0); + RETURN_THROWS(); } + // TODO Make return void + RETVAL_TRUE; zend_string_release_ex(ini_name, 0); } } @@ -1568,8 +1569,8 @@ PHP_FUNCTION(mb_detect_order) if (size == 0) { efree(list); - php_error_docref(NULL, E_WARNING, "Must specify at least one encoding"); - RETURN_FALSE; + zend_argument_value_error(1, "must specify at least one encoding"); + RETURN_THROWS(); } if (MBSTRG(current_detect_order_list)) { @@ -2481,8 +2482,8 @@ PHP_FUNCTION(mb_strimwidth) } if (from < 0 || (size_t)from > str_len) { - php_error_docref(NULL, E_WARNING, "Start position is out of range"); - RETURN_FALSE; + zend_argument_value_error(2, "is out of range"); + RETURN_THROWS(); } if (width < 0) { @@ -2490,8 +2491,8 @@ PHP_FUNCTION(mb_strimwidth) } if (width < 0) { - php_error_docref(NULL, E_WARNING, "Width is out of range"); - RETURN_FALSE; + zend_argument_value_error(3, "is out of range"); + RETURN_THROWS(); } if (trimmarker) { @@ -2721,8 +2722,8 @@ PHP_FUNCTION(mb_convert_encoding) if (!num_from_encodings) { efree(from_encodings); - php_error_docref(NULL, E_WARNING, "Must specify at least one encoding"); - RETURN_FALSE; + zend_argument_value_error(3, "must specify at least one encoding"); + RETURN_THROWS(); } if (input_str) { @@ -2907,8 +2908,8 @@ PHP_FUNCTION(mb_detect_encoding) if (size == 0) { efree(elist); - php_error_docref(NULL, E_WARNING, "Must specify at least one encoding"); - RETURN_FALSE; + zend_argument_value_error(2, "must specify at least one encoding"); + RETURN_THROWS(); } if (ZEND_NUM_ARGS() < 3) { @@ -3301,8 +3302,8 @@ PHP_FUNCTION(mb_convert_variables) if (elistsz == 0) { efree(elist); - php_error_docref(NULL, E_WARNING, "Must specify at least one encoding"); - RETURN_FALSE; + zend_argument_value_error(2, "must specify at least one encoding"); + RETURN_THROWS(); } if (elistsz == 1) { diff --git a/ext/mbstring/tests/mb_convert_encoding_empty_encoding_list.phpt b/ext/mbstring/tests/mb_convert_encoding_empty_encoding_list.phpt new file mode 100644 index 0000000000000..7b7d8217c3b0b --- /dev/null +++ b/ext/mbstring/tests/mb_convert_encoding_empty_encoding_list.phpt @@ -0,0 +1,27 @@ +--TEST-- +Test mb_convert_encoding() function : empty encoding list +--SKIPIF-- + +--FILE-- +getMessage() . \PHP_EOL; +} +try { + var_dump( mb_convert_encoding($string, 'UTF-8', [])); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} + +?> +--EXPECT-- +mb_convert_encoding(): Argument #3 ($from) must specify at least one encoding +mb_convert_encoding(): Argument #3 ($from) must specify at least one encoding diff --git a/ext/mbstring/tests/mb_convert_variables_empty_encoding_list.phpt b/ext/mbstring/tests/mb_convert_variables_empty_encoding_list.phpt new file mode 100644 index 0000000000000..4dbbd9f26ffed --- /dev/null +++ b/ext/mbstring/tests/mb_convert_variables_empty_encoding_list.phpt @@ -0,0 +1,26 @@ +--TEST-- +Test mb_convert_variables() function : empty encoding list +--SKIPIF-- + +--FILE-- +getMessage() . \PHP_EOL; +} +try { + var_dump( mb_convert_variables('UTF-8', [], $string)); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} + +?> +--EXPECT-- +mb_convert_variables(): Argument #2 ($from) must specify at least one encoding +mb_convert_variables(): Argument #2 ($from) must specify at least one encoding diff --git a/ext/mbstring/tests/mb_detect_encoding_empty_encoding_list.phpt b/ext/mbstring/tests/mb_detect_encoding_empty_encoding_list.phpt new file mode 100644 index 0000000000000..28dbc5baa659c --- /dev/null +++ b/ext/mbstring/tests/mb_detect_encoding_empty_encoding_list.phpt @@ -0,0 +1,26 @@ +--TEST-- +Test mb_detect_encoding() function : empty encoding list +--SKIPIF-- + +--FILE-- +getMessage() . \PHP_EOL; +} +try { + var_dump( mb_detect_encoding($string, [])); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} + +?> +--EXPECT-- +mb_detect_encoding(): Argument #2 ($encoding_list) must specify at least one encoding +mb_detect_encoding(): Argument #2 ($encoding_list) must specify at least one encoding diff --git a/ext/mbstring/tests/mb_detect_order_empty_encoding_list.phpt b/ext/mbstring/tests/mb_detect_order_empty_encoding_list.phpt new file mode 100644 index 0000000000000..7305bdf22fc9a --- /dev/null +++ b/ext/mbstring/tests/mb_detect_order_empty_encoding_list.phpt @@ -0,0 +1,24 @@ +--TEST-- +Test mb_detect_order() function : empty encoding list +--SKIPIF-- + +--FILE-- +getMessage() . \PHP_EOL; +} +try { + var_dump( mb_detect_order([])); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} + +?> +--EXPECT-- +mb_detect_order(): Argument #1 ($encoding) must specify at least one encoding +mb_detect_order(): Argument #1 ($encoding) must specify at least one encoding diff --git a/ext/mbstring/tests/mb_language.phpt b/ext/mbstring/tests/mb_language.phpt index 0b8bcff28c6d2..ef7b4c260fba9 100644 --- a/ext/mbstring/tests/mb_language.phpt +++ b/ext/mbstring/tests/mb_language.phpt @@ -20,10 +20,14 @@ echo "Confirm language was changed:\n"; var_dump(mb_language()); echo "Try changing to a non-existent language:\n"; -var_dump(mb_language('Pig Latin')); +try { + var_dump(mb_language('Pig Latin')); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} var_dump(mb_language()); ?> ---EXPECTF-- +--EXPECT-- Checking default language: string(7) "neutral" Checking default language after ini_set: @@ -33,7 +37,5 @@ bool(true) Confirm language was changed: string(7) "English" Try changing to a non-existent language: - -Warning: mb_language(): Unknown language "Pig Latin" in %s on line %d -bool(false) +mb_language(): Argument #1 ($language) must be a valid language, "Pig Latin" given string(7) "neutral" diff --git a/ext/mbstring/tests/mb_strimwidth.phpt b/ext/mbstring/tests/mb_strimwidth.phpt index f5d516c2c424c..ad346ef038259 100644 --- a/ext/mbstring/tests/mb_strimwidth.phpt +++ b/ext/mbstring/tests/mb_strimwidth.phpt @@ -21,20 +21,29 @@ print "5: ". mb_strimwidth($euc_jp, 38, 5,'...','EUC-JP') . "\n"; print "6: ". mb_strimwidth($euc_jp, 38, -25,'...','EUC-JP') . "\n"; print "7: ". mb_strimwidth($euc_jp, -30, -25,'...','EUC-JP') . "\n"; -$str = mb_strimwidth($euc_jp, 0, -100,'...','EUC-JP'); -($str === FALSE) ? print "10 OK\n" : print "NG: $str\n"; - -$str = mb_strimwidth($euc_jp, 100, 10,'...','EUC-JP'); -($str === FALSE) ? print "11 OK\n" : print "NG: $str\n"; - -$str = mb_strimwidth($euc_jp, -100, 10,'...','EUC-JP'); -($str === FALSE) ? print "12 OK\n" : print "NG: $str\n"; - -$str = mb_strimwidth($euc_jp, -10, -12,'...','EUC-JP'); -($str === FALSE) ? print "13 OK\n" : print "NG: $str\n"; +try { + var_dump(mb_strimwidth($euc_jp, 0, -100,'...','EUC-JP')); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} +try { + var_dump(mb_strimwidth($euc_jp, 100, 10,'...','EUC-JP')); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} +try { + var_dump(mb_strimwidth($euc_jp, -100, 10,'...','EUC-JP')); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} +try { + var_dump(mb_strimwidth($euc_jp, -10, -12,'...','EUC-JP')); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} ?> ---EXPECTF-- +--EXPECT-- String width: 68 1: 0123¤³¤Îʸ»ú... 2: 0123¤³¤Îʸ»úÎó¤ÏÆüËܸì¤Ç¤¹¡£EUC-JP¤ò»È¤Ã¤Æ¤¤¤Þ¤¹¡£ÆüËܸì¤ÏÌÌÅݽ­¤¤¡£ @@ -43,15 +52,7 @@ String width: 68 5: ¡£ 6: ¡£ 7: ¡£ - -Warning: mb_strimwidth(): Width is out of range in %s on line %d -10 OK - -Warning: mb_strimwidth(): Start position is out of range in %s on line %d -11 OK - -Warning: mb_strimwidth(): Start position is out of range in %s on line %d -12 OK - -Warning: mb_strimwidth(): Width is out of range in %s on line %d -13 OK +mb_strimwidth(): Argument #3 ($width) is out of range +mb_strimwidth(): Argument #2 ($start) is out of range +mb_strimwidth(): Argument #2 ($start) is out of range +mb_strimwidth(): Argument #3 ($width) is out of range From a34e73de5adf3999db66f0970da21bd0f6537595 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 3 Apr 2020 19:20:26 +0200 Subject: [PATCH 041/338] mb_scrub() can't return false anymore Also drop the intermediary function which was only used here --- ext/mbstring/mbstring.c | 15 ++------------- ext/mbstring/mbstring.stub.php | 2 +- ext/mbstring/mbstring_arginfo.h | 2 +- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 454440ef6ec77..960f67f7c5f3d 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -4424,14 +4424,7 @@ PHP_FUNCTION(mb_chr) } /* }}} */ - -static inline char* php_mb_scrub(const char* str, size_t str_len, const mbfl_encoding *enc, size_t *ret_len) -{ - return php_mb_convert_encoding_ex(str, str_len, enc, enc, ret_len); -} - - -/* {{{ proto string|false mb_scrub([string str[, string encoding]]) */ +/* {{{ proto string mb_scrub([string str[, string encoding]]) */ PHP_FUNCTION(mb_scrub) { const mbfl_encoding *enc; @@ -4452,11 +4445,7 @@ PHP_FUNCTION(mb_scrub) RETURN_THROWS(); } - ret = php_mb_scrub(str, str_len, enc, &ret_len); - - if (ret == NULL) { - RETURN_FALSE; - } + ret = php_mb_convert_encoding_ex(str, str_len, enc, enc, &ret_len); RETVAL_STRINGL(ret, ret_len); efree(ret); diff --git a/ext/mbstring/mbstring.stub.php b/ext/mbstring/mbstring.stub.php index dfc920eb96435..5210f7bf64a07 100644 --- a/ext/mbstring/mbstring.stub.php +++ b/ext/mbstring/mbstring.stub.php @@ -81,7 +81,7 @@ function mb_get_info(string $type = UNKNOWN): array|string|int|false {} function mb_check_encoding(array|string $var = UNKNOWN, string $encoding = UNKNOWN): bool {} -function mb_scrub(string $str, string $encoding = UNKNOWN): string|false {} +function mb_scrub(string $str, string $encoding = UNKNOWN): string {} function mb_ord(string $str, string $encoding = UNKNOWN): int|false {} diff --git a/ext/mbstring/mbstring_arginfo.h b/ext/mbstring/mbstring_arginfo.h index ea6af386e3426..d6c237b41068b 100644 --- a/ext/mbstring/mbstring_arginfo.h +++ b/ext/mbstring/mbstring_arginfo.h @@ -193,7 +193,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_check_encoding, 0, 0, _IS_BOO ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_scrub, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_scrub, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) ZEND_END_ARG_INFO() From 1b6f61e7c4330b0f7abcc29c80f3c94bc6d13ce5 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Sun, 5 Apr 2020 03:33:08 +0200 Subject: [PATCH 042/338] Promote invalid case mode to ValueError in mb_case_converter Add assertions to check the return value is not NULL as this indicates a bug. Add identical assertion to mb_strtoupper and mb_strtolower. This means these functions can't return false anymore, ammend stubs accordingly. --- ext/mbstring/mbstring.c | 61 ++++++++----------- ext/mbstring/mbstring.stub.php | 6 +- ext/mbstring/mbstring_arginfo.h | 8 +-- .../tests/mb_convert_case_invalid_mode.phpt | 13 ---- .../tests/mb_convert_case_various_mode.phpt | 34 +++++++++++ 5 files changed, 68 insertions(+), 54 deletions(-) delete mode 100644 ext/mbstring/tests/mb_convert_case_invalid_mode.phpt create mode 100644 ext/mbstring/tests/mb_convert_case_various_mode.phpt diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 960f67f7c5f3d..1d8678dd0968b 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -2760,8 +2760,8 @@ static char *mbstring_convert_case( MBSTRG(current_filter_illegal_mode), MBSTRG(current_filter_illegal_substchar)); } -/* {{{ proto string mb_convert_case(string sourcestring, int mode [, string encoding]) - Returns a case-folded version of sourcestring */ +/* {{{ proto string mb_convert_case(string source_string, int mode [, string encoding]) + Returns a case-folded version of source_string */ PHP_FUNCTION(mb_convert_case) { zend_string *from_encoding = NULL; @@ -2772,9 +2772,7 @@ PHP_FUNCTION(mb_convert_case) size_t ret_len; const mbfl_encoding *enc; - RETVAL_FALSE; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|S!", &str, &str_len, - &case_mode, &from_encoding) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|S!", &str, &str_len, &case_mode, &from_encoding) == FAILURE) { RETURN_THROWS(); } @@ -2784,22 +2782,23 @@ PHP_FUNCTION(mb_convert_case) } if (case_mode < 0 || case_mode > PHP_UNICODE_CASE_MODE_MAX) { - php_error_docref(NULL, E_WARNING, "Invalid case mode"); - return; + zend_argument_value_error(2, "must be one of MB_CASE_UPPER, MB_CASE_LOWER, MB_CASE_TITLE, MB_CASE_FOLD," + " MB_CASE_UPPER_SIMPLE, MB_CASE_LOWER_SIMPLE, MB_CASE_TITLE_SIMPLE, or MB_CASE_FOLD_SIMPLE"); + RETURN_THROWS(); } newstr = mbstring_convert_case(case_mode, str, str_len, &ret_len, enc); + /* If newstr is NULL something went wrong in mbfl and this is a bug */ + ZEND_ASSERT(newstr != NULL); - if (newstr) { - // TODO: avoid reallocation ??? - RETVAL_STRINGL(newstr, ret_len); - efree(newstr); - } + // TODO: avoid reallocation ??? + RETVAL_STRINGL(newstr, ret_len); + efree(newstr); } /* }}} */ -/* {{{ proto string mb_strtoupper(string sourcestring [, string encoding]) - * Returns a uppercased version of sourcestring +/* {{{ proto string mb_strtoupper(string source_string [, string encoding]) + * Returns a upper cased version of source_string */ PHP_FUNCTION(mb_strtoupper) { @@ -2810,8 +2809,7 @@ PHP_FUNCTION(mb_strtoupper) size_t ret_len; const mbfl_encoding *enc; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|S!", &str, &str_len, - &from_encoding) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|S!", &str, &str_len, &from_encoding) == FAILURE) { RETURN_THROWS(); } @@ -2821,19 +2819,17 @@ PHP_FUNCTION(mb_strtoupper) } newstr = mbstring_convert_case(PHP_UNICODE_CASE_UPPER, str, str_len, &ret_len, enc); + /* If newstr is NULL something went wrong in mbfl and this is a bug */ + ZEND_ASSERT(newstr != NULL); - if (newstr) { - // TODO: avoid reallocation ??? - RETVAL_STRINGL(newstr, ret_len); - efree(newstr); - return; - } - RETURN_FALSE; + // TODO: avoid reallocation ??? + RETVAL_STRINGL(newstr, ret_len); + efree(newstr); } /* }}} */ -/* {{{ proto string mb_strtolower(string sourcestring [, string encoding]) - * Returns a lowercased version of sourcestring +/* {{{ proto string mb_strtolower(string source_string [, string encoding]) + * Returns a lower cased version of source_string */ PHP_FUNCTION(mb_strtolower) { @@ -2844,8 +2840,7 @@ PHP_FUNCTION(mb_strtolower) size_t ret_len; const mbfl_encoding *enc; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|S!", &str, &str_len, - &from_encoding) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|S!", &str, &str_len, &from_encoding) == FAILURE) { RETURN_THROWS(); } @@ -2855,14 +2850,12 @@ PHP_FUNCTION(mb_strtolower) } newstr = mbstring_convert_case(PHP_UNICODE_CASE_LOWER, str, str_len, &ret_len, enc); + /* If newstr is NULL something went wrong in mbfl and this is a bug */ + ZEND_ASSERT(newstr != NULL); - if (newstr) { - // TODO: avoid reallocation ??? - RETVAL_STRINGL(newstr, ret_len); - efree(newstr); - return; - } - RETURN_FALSE; + // TODO: avoid reallocation ??? + RETVAL_STRINGL(newstr, ret_len); + efree(newstr); } /* }}} */ diff --git a/ext/mbstring/mbstring.stub.php b/ext/mbstring/mbstring.stub.php index 5210f7bf64a07..cc22fdb886cfc 100644 --- a/ext/mbstring/mbstring.stub.php +++ b/ext/mbstring/mbstring.stub.php @@ -51,11 +51,11 @@ function mb_strimwidth(string $str, int $start, int $width, string $trimmarker = function mb_convert_encoding(array|string $str, string $to, array|string $from = UNKNOWN): array|string|false {} -function mb_convert_case(string $sourcestring, int $mode, ?string $encoding = null): string|false {} +function mb_convert_case(string $source_string, int $mode, ?string $encoding = null): string {} -function mb_strtoupper(string $sourcestring, ?string $encoding = null): string|false {} +function mb_strtoupper(string $source_string, ?string $encoding = null): string {} -function mb_strtolower(string $sourcestring, ?string $encoding = null): string|false {} +function mb_strtolower(string $source_string, ?string $encoding = null): string {} function mb_detect_encoding(string $str, array|string|null $encoding_list = null, bool $strict = false): string|false {} diff --git a/ext/mbstring/mbstring_arginfo.h b/ext/mbstring/mbstring_arginfo.h index d6c237b41068b..0b059de8d9784 100644 --- a/ext/mbstring/mbstring_arginfo.h +++ b/ext/mbstring/mbstring_arginfo.h @@ -112,14 +112,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_convert_encoding, 0, 2, MAY_B ZEND_ARG_TYPE_MASK(0, from, MAY_BE_ARRAY|MAY_BE_STRING) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_convert_case, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, sourcestring, IS_STRING, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_convert_case, 0, 2, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, source_string, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 1) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_strtoupper, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, sourcestring, IS_STRING, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_strtoupper, 0, 1, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, source_string, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 1) ZEND_END_ARG_INFO() diff --git a/ext/mbstring/tests/mb_convert_case_invalid_mode.phpt b/ext/mbstring/tests/mb_convert_case_invalid_mode.phpt deleted file mode 100644 index 540463143a46c..0000000000000 --- a/ext/mbstring/tests/mb_convert_case_invalid_mode.phpt +++ /dev/null @@ -1,13 +0,0 @@ ---TEST-- -Calling mb_convert_case() with an invalid casing mode ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -Warning: mb_convert_case(): Invalid case mode in %s on line %d -bool(false) diff --git a/ext/mbstring/tests/mb_convert_case_various_mode.phpt b/ext/mbstring/tests/mb_convert_case_various_mode.phpt new file mode 100644 index 0000000000000..cd278ae52fff8 --- /dev/null +++ b/ext/mbstring/tests/mb_convert_case_various_mode.phpt @@ -0,0 +1,34 @@ +--TEST-- +Calling mb_convert_case() with an invalid casing mode +--SKIPIF-- + +--FILE-- +getMessage() . \PHP_EOL; +} + +?> +--EXPECT-- +string(13) "FOO BAR SPASS" +string(13) "foo bar spaß" +string(13) "Foo Bar Spaß" +string(13) "foo bar spass" +string(13) "FOO BAR SPAß" +string(13) "foo bar spaß" +string(13) "Foo Bar Spaß" +string(13) "foo bar spaß" +mb_convert_case(): Argument #2 ($mode) must be one of MB_CASE_UPPER, MB_CASE_LOWER, MB_CASE_TITLE, MB_CASE_FOLD, MB_CASE_UPPER_SIMPLE, MB_CASE_LOWER_SIMPLE, MB_CASE_TITLE_SIMPLE, or MB_CASE_FOLD_SIMPLE From c0cbab6002f8b111396c3ab2b9df92cbd0b3448a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sun, 5 Apr 2020 20:09:58 +0200 Subject: [PATCH 043/338] Add missing stub for xmlrpc_get_type() --- ext/xmlrpc/xmlrpc.stub.php | 3 +++ ext/xmlrpc/xmlrpc_arginfo.h | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/ext/xmlrpc/xmlrpc.stub.php b/ext/xmlrpc/xmlrpc.stub.php index e2805bd43f186..c8e712248ca9c 100644 --- a/ext/xmlrpc/xmlrpc.stub.php +++ b/ext/xmlrpc/xmlrpc.stub.php @@ -10,6 +10,9 @@ function xmlrpc_decode_request(string $xml, &$method, string $encoding = "iso-88 function xmlrpc_encode_request(?string $method, $params, array $output_options = UNKNOWN): ?string {} +/** @param mixed $value */ +function xmlrpc_get_type($value): string {} + function xmlrpc_set_type(&$value, string $type): bool {} function xmlrpc_is_fault(array $arg): bool {} diff --git a/ext/xmlrpc/xmlrpc_arginfo.h b/ext/xmlrpc/xmlrpc_arginfo.h index 5beecc99e62ab..dbb5980e0a99b 100644 --- a/ext/xmlrpc/xmlrpc_arginfo.h +++ b/ext/xmlrpc/xmlrpc_arginfo.h @@ -21,6 +21,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xmlrpc_encode_request, 0, 2, IS_ ZEND_ARG_TYPE_INFO(0, output_options, IS_ARRAY, 0) ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xmlrpc_get_type, 0, 1, IS_STRING, 0) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xmlrpc_set_type, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(1, value) ZEND_ARG_TYPE_INFO(0, type, IS_STRING, 0) From 21cfa03f1740042d0c48269430e0490e319e1408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sun, 5 Apr 2020 21:15:30 +0200 Subject: [PATCH 044/338] Generate function entries for another batch of extensions Closes GH-5352 --- ext/libxml/libxml.c | 36 +--- ext/libxml/libxml.stub.php | 2 + ext/libxml/libxml_arginfo.h | 21 +++ ext/mbstring/mbstring.c | 54 +----- ext/mbstring/mbstring.h | 48 ----- ext/mbstring/mbstring.stub.php | 2 + ext/mbstring/mbstring_arginfo.h | 189 +++++++++++++++++++ ext/mbstring/php_mbregex.h | 37 ---- ext/odbc/odbc.stub.php | 2 + ext/odbc/odbc_arginfo.h | 131 +++++++++++++ ext/odbc/php_odbc.c | 64 +------ ext/odbc/php_odbc.h | 55 ------ ext/opcache/opcache.stub.php | 2 + ext/opcache/opcache_arginfo.h | 19 ++ ext/opcache/zend_accelerator_module.c | 36 +--- ext/openssl/openssl.c | 103 +--------- ext/openssl/openssl.stub.php | 2 + ext/openssl/openssl_arginfo.h | 124 ++++++++++++ ext/openssl/php_openssl.h | 55 ------ ext/pcre/php_pcre.c | 39 ++-- ext/pcre/php_pcre.stub.php | 2 + ext/pcre/php_pcre_arginfo.h | 29 +++ ext/pdo/pdo.c | 9 +- ext/pdo/pdo.stub.php | 2 + ext/pdo/pdo_arginfo.h | 9 + ext/posix/php_posix.h | 87 --------- ext/posix/posix.c | 96 +--------- ext/posix/posix.stub.php | 2 + ext/posix/posix_arginfo.h | 132 +++++++++++++ ext/pspell/pspell.c | 85 ++------- ext/pspell/pspell.stub.php | 2 + ext/pspell/pspell_arginfo.h | 45 +++++ ext/readline/readline.c | 41 +--- ext/readline/readline.stub.php | 2 + ext/readline/readline_arginfo.h | 57 ++++++ ext/session/session.c | 44 ++--- ext/shmop/php_shmop.h | 7 - ext/shmop/shmop.c | 15 +- ext/shmop/shmop.stub.php | 2 + ext/shmop/shmop_arginfo.h | 19 ++ ext/skeleton/skeleton.c | 11 +- ext/skeleton/skeleton.stub.php | 2 + ext/skeleton/skeleton_arginfo.h | 11 ++ ext/sockets/sockets.c | 99 +--------- ext/sockets/sockets.stub.php | 2 + ext/sockets/sockets_arginfo.h | 103 ++++++++++ ext/sodium/libsodium.c | 115 +----------- ext/sodium/libsodium.stub.php | 2 + ext/sodium/libsodium_arginfo.h | 260 ++++++++++++++++++++++++++ ext/sysvmsg/sysvmsg.c | 26 +-- ext/sysvmsg/sysvmsg.stub.php | 2 + ext/sysvmsg/sysvmsg_arginfo.h | 21 +++ ext/sysvsem/sysvsem.c | 13 +- ext/sysvsem/sysvsem.stub.php | 2 + ext/sysvsem/sysvsem_arginfo.h | 15 ++ ext/sysvshm/php_sysvshm.h | 7 - ext/sysvshm/sysvshm.c | 16 +- ext/sysvshm/sysvshm.stub.php | 2 + ext/sysvshm/sysvshm_arginfo.h | 21 +++ ext/xml/xml.c | 52 +----- ext/xml/xml.stub.php | 2 + ext/xml/xml_arginfo.h | 51 +++++ ext/xmlrpc/php_xmlrpc.h | 15 -- ext/xmlrpc/xmlrpc-epi-php.c | 20 +- ext/xmlrpc/xmlrpc.stub.php | 2 + ext/xmlrpc/xmlrpc_arginfo.h | 35 ++++ ext/zlib/zlib.c | 53 +----- ext/zlib/zlib.stub.php | 2 + ext/zlib/zlib_arginfo.h | 66 +++++++ sapi/cli/tests/006.phpt | 22 +-- 70 files changed, 1501 insertions(+), 1257 deletions(-) diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index edc2020f46a63..ec72c79b60b04 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -61,14 +61,6 @@ static HashTable php_libxml_exports; static ZEND_DECLARE_MODULE_GLOBALS(libxml) static PHP_GINIT_FUNCTION(libxml); -static PHP_FUNCTION(libxml_set_streams_context); -static PHP_FUNCTION(libxml_use_internal_errors); -static PHP_FUNCTION(libxml_get_last_error); -static PHP_FUNCTION(libxml_clear_errors); -static PHP_FUNCTION(libxml_get_errors); -static PHP_FUNCTION(libxml_set_external_entity_loader); -static PHP_FUNCTION(libxml_disable_entity_loader); - static zend_class_entry *libxmlerror_class_entry; /* {{{ dynamically loadable module stuff */ @@ -90,22 +82,10 @@ static int php_libxml_post_deactivate(void); /* }}} */ -/* {{{ extension definition structures */ -static const zend_function_entry libxml_functions[] = { - PHP_FE(libxml_set_streams_context, arginfo_libxml_set_streams_context) - PHP_FE(libxml_use_internal_errors, arginfo_libxml_use_internal_errors) - PHP_FE(libxml_get_last_error, arginfo_libxml_get_last_error) - PHP_FE(libxml_clear_errors, arginfo_libxml_clear_errors) - PHP_FE(libxml_get_errors, arginfo_libxml_get_errors) - PHP_FE(libxml_disable_entity_loader, arginfo_libxml_disable_entity_loader) - PHP_FE(libxml_set_external_entity_loader, arginfo_libxml_set_external_entity_loader) - PHP_FE_END -}; - zend_module_entry libxml_module_entry = { STANDARD_MODULE_HEADER, "libxml", /* extension name */ - libxml_functions, /* extension function list */ + ext_functions, /* extension function list */ PHP_MINIT(libxml), /* extension-wide startup function */ PHP_MSHUTDOWN(libxml), /* extension-wide shutdown function */ PHP_RINIT(libxml), /* per-request startup function */ @@ -913,7 +893,7 @@ static PHP_MINFO_FUNCTION(libxml) /* {{{ proto void libxml_set_streams_context(resource streams_context) Set the streams context for the next libxml document load or write */ -static PHP_FUNCTION(libxml_set_streams_context) +PHP_FUNCTION(libxml_set_streams_context) { zval *arg; @@ -931,7 +911,7 @@ static PHP_FUNCTION(libxml_set_streams_context) /* {{{ proto bool libxml_use_internal_errors([boolean use_errors]) Disable libxml errors and allow user to fetch error information as needed */ -static PHP_FUNCTION(libxml_use_internal_errors) +PHP_FUNCTION(libxml_use_internal_errors) { xmlStructuredErrorFunc current_handler; zend_bool use_errors=0, retval; @@ -972,7 +952,7 @@ static PHP_FUNCTION(libxml_use_internal_errors) /* {{{ proto object libxml_get_last_error() Retrieve last error from libxml */ -static PHP_FUNCTION(libxml_get_last_error) +PHP_FUNCTION(libxml_get_last_error) { xmlErrorPtr error; @@ -1004,7 +984,7 @@ static PHP_FUNCTION(libxml_get_last_error) /* {{{ proto object libxml_get_errors() Retrieve array of errors */ -static PHP_FUNCTION(libxml_get_errors) +PHP_FUNCTION(libxml_get_errors) { xmlErrorPtr error; @@ -1046,7 +1026,7 @@ static PHP_FUNCTION(libxml_get_errors) /* {{{ proto void libxml_clear_errors() Clear last error from libxml */ -static PHP_FUNCTION(libxml_clear_errors) +PHP_FUNCTION(libxml_clear_errors) { ZEND_PARSE_PARAMETERS_NONE(); @@ -1067,7 +1047,7 @@ PHP_LIBXML_API zend_bool php_libxml_disable_entity_loader(zend_bool disable) /* /* {{{ proto bool libxml_disable_entity_loader([boolean disable]) Disable/Enable ability to load external entities */ -static PHP_FUNCTION(libxml_disable_entity_loader) +PHP_FUNCTION(libxml_disable_entity_loader) { zend_bool disable = 1; @@ -1082,7 +1062,7 @@ static PHP_FUNCTION(libxml_disable_entity_loader) /* {{{ proto void libxml_set_external_entity_loader(callback resolver_function) Changes the default external entity loader */ -static PHP_FUNCTION(libxml_set_external_entity_loader) +PHP_FUNCTION(libxml_set_external_entity_loader) { zend_fcall_info fci; zend_fcall_info_cache fcc; diff --git a/ext/libxml/libxml.stub.php b/ext/libxml/libxml.stub.php index 7022b2e1f899e..729b91a2ec41f 100644 --- a/ext/libxml/libxml.stub.php +++ b/ext/libxml/libxml.stub.php @@ -1,5 +1,7 @@ = 4 diff --git a/ext/opcache/opcache.stub.php b/ext/opcache/opcache.stub.php index a60f2376421e3..0290b6453de4c 100644 --- a/ext/opcache/opcache.stub.php +++ b/ext/opcache/opcache.stub.php @@ -1,5 +1,7 @@ #endif -PHP_FUNCTION(readline); -PHP_FUNCTION(readline_add_history); -PHP_FUNCTION(readline_info); -PHP_FUNCTION(readline_clear_history); -#ifdef HAVE_HISTORY_LIST -PHP_FUNCTION(readline_list_history); -#endif -PHP_FUNCTION(readline_read_history); -PHP_FUNCTION(readline_write_history); -PHP_FUNCTION(readline_completion_function); - #if HAVE_RL_CALLBACK_READ_CHAR -PHP_FUNCTION(readline_callback_handler_install); -PHP_FUNCTION(readline_callback_read_char); -PHP_FUNCTION(readline_callback_handler_remove); -PHP_FUNCTION(readline_redisplay); -PHP_FUNCTION(readline_on_new_line); static zval _prepped_callback; @@ -71,33 +55,10 @@ PHP_MINFO_FUNCTION(readline); /* }}} */ /* {{{ module stuff */ -static const zend_function_entry php_readline_functions[] = { - PHP_FE(readline, arginfo_readline) - PHP_FE(readline_info, arginfo_readline_info) - PHP_FE(readline_add_history, arginfo_readline_add_history) - PHP_FE(readline_clear_history, arginfo_readline_clear_history) -#ifdef HAVE_HISTORY_LIST - PHP_FE(readline_list_history, arginfo_readline_list_history) -#endif - PHP_FE(readline_read_history, arginfo_readline_read_history) - PHP_FE(readline_write_history, arginfo_readline_write_history) - PHP_FE(readline_completion_function,arginfo_readline_completion_function) -#if HAVE_RL_CALLBACK_READ_CHAR - PHP_FE(readline_callback_handler_install, arginfo_readline_callback_handler_install) - PHP_FE(readline_callback_read_char, arginfo_readline_callback_read_char) - PHP_FE(readline_callback_handler_remove, arginfo_readline_callback_handler_remove) - PHP_FE(readline_redisplay, arginfo_readline_redisplay) -#endif -#if HAVE_RL_ON_NEW_LINE - PHP_FE(readline_on_new_line, arginfo_readline_on_new_line) -#endif - PHP_FE_END -}; - zend_module_entry readline_module_entry = { STANDARD_MODULE_HEADER, "readline", - php_readline_functions, + ext_functions, PHP_MINIT(readline), PHP_MSHUTDOWN(readline), NULL, diff --git a/ext/readline/readline.stub.php b/ext/readline/readline.stub.php index ed383561d1fa4..7cf2b8b14434d 100644 --- a/ext/readline/readline.stub.php +++ b/ext/readline/readline.stub.php @@ -1,5 +1,7 @@ 9 || (SODIUM_LIBRARY_VERSION_MAJOR == 9 && SODIUM_LIBRARY_VERSION_MINOR >= 6) - PHP_FE(sodium_crypto_pwhash_str_needs_rehash, arginfo_sodium_crypto_pwhash_str_needs_rehash) -#endif -#ifdef crypto_pwhash_scryptsalsa208sha256_SALTBYTES - PHP_FE(sodium_crypto_pwhash_scryptsalsa208sha256, arginfo_sodium_crypto_pwhash_scryptsalsa208sha256) - PHP_FE(sodium_crypto_pwhash_scryptsalsa208sha256_str, arginfo_sodium_crypto_pwhash_scryptsalsa208sha256_str) - PHP_FE(sodium_crypto_pwhash_scryptsalsa208sha256_str_verify, arginfo_sodium_crypto_pwhash_scryptsalsa208sha256_str_verify) -#endif - PHP_FE(sodium_crypto_scalarmult, arginfo_sodium_crypto_scalarmult) - PHP_FE(sodium_crypto_secretbox, arginfo_sodium_crypto_secretbox) - PHP_FE(sodium_crypto_secretbox_keygen, arginfo_sodium_crypto_secretbox_keygen) - PHP_FE(sodium_crypto_secretbox_open, arginfo_sodium_crypto_secretbox_open) -#ifdef crypto_secretstream_xchacha20poly1305_ABYTES - PHP_FE(sodium_crypto_secretstream_xchacha20poly1305_keygen, arginfo_sodium_crypto_secretstream_xchacha20poly1305_keygen) - PHP_FE(sodium_crypto_secretstream_xchacha20poly1305_init_push, arginfo_sodium_crypto_secretstream_xchacha20poly1305_init_push) - PHP_FE(sodium_crypto_secretstream_xchacha20poly1305_push, arginfo_sodium_crypto_secretstream_xchacha20poly1305_push) - PHP_FE(sodium_crypto_secretstream_xchacha20poly1305_init_pull, arginfo_sodium_crypto_secretstream_xchacha20poly1305_init_pull) - PHP_FE(sodium_crypto_secretstream_xchacha20poly1305_pull, arginfo_sodium_crypto_secretstream_xchacha20poly1305_pull) - PHP_FE(sodium_crypto_secretstream_xchacha20poly1305_rekey, arginfo_sodium_crypto_secretstream_xchacha20poly1305_rekey) -#endif - PHP_FE(sodium_crypto_shorthash, arginfo_sodium_crypto_shorthash) - PHP_FE(sodium_crypto_shorthash_keygen, arginfo_sodium_crypto_shorthash_keygen) - PHP_FE(sodium_crypto_sign, arginfo_sodium_crypto_sign) - PHP_FE(sodium_crypto_sign_detached, arginfo_sodium_crypto_sign_detached) - PHP_FE(sodium_crypto_sign_ed25519_pk_to_curve25519, arginfo_sodium_crypto_sign_ed25519_pk_to_curve25519) - PHP_FE(sodium_crypto_sign_ed25519_sk_to_curve25519, arginfo_sodium_crypto_sign_ed25519_sk_to_curve25519) - PHP_FE(sodium_crypto_sign_keypair, arginfo_sodium_crypto_sign_keypair) - PHP_FE(sodium_crypto_sign_keypair_from_secretkey_and_publickey, arginfo_sodium_crypto_sign_keypair_from_secretkey_and_publickey) - PHP_FE(sodium_crypto_sign_open, arginfo_sodium_crypto_sign_open) - PHP_FE(sodium_crypto_sign_publickey, arginfo_sodium_crypto_sign_publickey) - PHP_FE(sodium_crypto_sign_secretkey, arginfo_sodium_crypto_sign_secretkey) - PHP_FE(sodium_crypto_sign_publickey_from_secretkey, arginfo_sodium_crypto_sign_publickey_from_secretkey) - PHP_FE(sodium_crypto_sign_seed_keypair, arginfo_sodium_crypto_sign_seed_keypair) - PHP_FE(sodium_crypto_sign_verify_detached, arginfo_sodium_crypto_sign_verify_detached) - PHP_FE(sodium_crypto_stream, arginfo_sodium_crypto_stream) - PHP_FE(sodium_crypto_stream_keygen, arginfo_sodium_crypto_stream_keygen) - PHP_FE(sodium_crypto_stream_xor, arginfo_sodium_crypto_stream_xor) - - /* helpers */ - - PHP_FE(sodium_add, arginfo_sodium_add) - PHP_FE(sodium_compare, arginfo_sodium_compare) - PHP_FE(sodium_increment, arginfo_sodium_increment) - PHP_FE(sodium_memcmp, arginfo_sodium_memcmp) - PHP_FE(sodium_memzero, arginfo_sodium_memzero) - PHP_FE(sodium_pad, arginfo_sodium_pad) - PHP_FE(sodium_unpad, arginfo_sodium_unpad) - - /* codecs */ - - PHP_FE(sodium_bin2hex, arginfo_sodium_bin2hex) - PHP_FE(sodium_hex2bin, arginfo_sodium_hex2bin) -#ifdef sodium_base64_VARIANT_ORIGINAL - PHP_FE(sodium_bin2base64, arginfo_sodium_bin2base64) - PHP_FE(sodium_base642bin, arginfo_sodium_base642bin) -#endif - - /* aliases */ - - PHP_FALIAS(sodium_crypto_scalarmult_base, sodium_crypto_box_publickey_from_secretkey, arginfo_sodium_crypto_scalarmult_base) - - PHP_FE_END -}; - /* Load after the "standard" module in order to give it * priority in registering argon2i/argon2id password hashers. */ @@ -192,7 +79,7 @@ zend_module_entry sodium_module_entry = { NULL, sodium_deps, "sodium", - sodium_functions, + ext_functions, PHP_MINIT(sodium), PHP_MSHUTDOWN(sodium), NULL, diff --git a/ext/sodium/libsodium.stub.php b/ext/sodium/libsodium.stub.php index 37e6a5734d4b6..73051b70cf4b7 100644 --- a/ext/sodium/libsodium.stub.php +++ b/ext/sodium/libsodium.stub.php @@ -1,5 +1,7 @@ 9 || (SODIUM_LIBRARY_VERSION_MAJOR == 9 && SODIUM_LIBRARY_VERSION_MINOR >= 6) +ZEND_FUNCTION(sodium_crypto_pwhash_str_needs_rehash); +#endif +#if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES) +ZEND_FUNCTION(sodium_crypto_pwhash_scryptsalsa208sha256); +#endif +#if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES) +ZEND_FUNCTION(sodium_crypto_pwhash_scryptsalsa208sha256_str); +#endif +#if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES) +ZEND_FUNCTION(sodium_crypto_pwhash_scryptsalsa208sha256_str_verify); +#endif +ZEND_FUNCTION(sodium_crypto_scalarmult); +ZEND_FUNCTION(sodium_crypto_secretbox); +ZEND_FUNCTION(sodium_crypto_secretbox_keygen); +ZEND_FUNCTION(sodium_crypto_secretbox_open); +#if defined(crypto_secretstream_xchacha20poly1305_ABYTES) +ZEND_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_keygen); +#endif +#if defined(crypto_secretstream_xchacha20poly1305_ABYTES) +ZEND_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_init_push); +#endif +#if defined(crypto_secretstream_xchacha20poly1305_ABYTES) +ZEND_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_push); +#endif +#if defined(crypto_secretstream_xchacha20poly1305_ABYTES) +ZEND_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_init_pull); +#endif +#if defined(crypto_secretstream_xchacha20poly1305_ABYTES) +ZEND_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_pull); +#endif +#if defined(crypto_secretstream_xchacha20poly1305_ABYTES) +ZEND_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_rekey); +#endif +ZEND_FUNCTION(sodium_crypto_shorthash); +ZEND_FUNCTION(sodium_crypto_shorthash_keygen); +ZEND_FUNCTION(sodium_crypto_sign); +ZEND_FUNCTION(sodium_crypto_sign_detached); +ZEND_FUNCTION(sodium_crypto_sign_ed25519_pk_to_curve25519); +ZEND_FUNCTION(sodium_crypto_sign_ed25519_sk_to_curve25519); +ZEND_FUNCTION(sodium_crypto_sign_keypair); +ZEND_FUNCTION(sodium_crypto_sign_keypair_from_secretkey_and_publickey); +ZEND_FUNCTION(sodium_crypto_sign_open); +ZEND_FUNCTION(sodium_crypto_sign_publickey); +ZEND_FUNCTION(sodium_crypto_sign_secretkey); +ZEND_FUNCTION(sodium_crypto_sign_publickey_from_secretkey); +ZEND_FUNCTION(sodium_crypto_sign_seed_keypair); +ZEND_FUNCTION(sodium_crypto_sign_verify_detached); +ZEND_FUNCTION(sodium_crypto_stream); +ZEND_FUNCTION(sodium_crypto_stream_keygen); +ZEND_FUNCTION(sodium_crypto_stream_xor); +ZEND_FUNCTION(sodium_add); +ZEND_FUNCTION(sodium_compare); +ZEND_FUNCTION(sodium_increment); +ZEND_FUNCTION(sodium_memcmp); +ZEND_FUNCTION(sodium_memzero); +ZEND_FUNCTION(sodium_pad); +ZEND_FUNCTION(sodium_unpad); +ZEND_FUNCTION(sodium_bin2hex); +ZEND_FUNCTION(sodium_hex2bin); +#if defined(sodium_base64_VARIANT_ORIGINAL) +ZEND_FUNCTION(sodium_bin2base64); +#endif +#if defined(sodium_base64_VARIANT_ORIGINAL) +ZEND_FUNCTION(sodium_base642bin); +#endif + + +static const zend_function_entry ext_functions[] = { + ZEND_FE(sodium_crypto_aead_aes256gcm_is_available, arginfo_sodium_crypto_aead_aes256gcm_is_available) +#if defined(HAVE_AESGCM) + ZEND_FE(sodium_crypto_aead_aes256gcm_decrypt, arginfo_sodium_crypto_aead_aes256gcm_decrypt) +#endif +#if defined(HAVE_AESGCM) + ZEND_FE(sodium_crypto_aead_aes256gcm_encrypt, arginfo_sodium_crypto_aead_aes256gcm_encrypt) +#endif +#if defined(HAVE_AESGCM) + ZEND_FE(sodium_crypto_aead_aes256gcm_keygen, arginfo_sodium_crypto_aead_aes256gcm_keygen) +#endif + ZEND_FE(sodium_crypto_aead_chacha20poly1305_decrypt, arginfo_sodium_crypto_aead_chacha20poly1305_decrypt) + ZEND_FE(sodium_crypto_aead_chacha20poly1305_encrypt, arginfo_sodium_crypto_aead_chacha20poly1305_encrypt) + ZEND_FE(sodium_crypto_aead_chacha20poly1305_keygen, arginfo_sodium_crypto_aead_chacha20poly1305_keygen) + ZEND_FE(sodium_crypto_aead_chacha20poly1305_ietf_decrypt, arginfo_sodium_crypto_aead_chacha20poly1305_ietf_decrypt) + ZEND_FE(sodium_crypto_aead_chacha20poly1305_ietf_encrypt, arginfo_sodium_crypto_aead_chacha20poly1305_ietf_encrypt) + ZEND_FE(sodium_crypto_aead_chacha20poly1305_ietf_keygen, arginfo_sodium_crypto_aead_chacha20poly1305_ietf_keygen) +#if defined(crypto_aead_xchacha20poly1305_IETF_NPUBBYTES) + ZEND_FE(sodium_crypto_aead_xchacha20poly1305_ietf_decrypt, arginfo_sodium_crypto_aead_xchacha20poly1305_ietf_decrypt) +#endif +#if defined(crypto_aead_xchacha20poly1305_IETF_NPUBBYTES) + ZEND_FE(sodium_crypto_aead_xchacha20poly1305_ietf_keygen, arginfo_sodium_crypto_aead_xchacha20poly1305_ietf_keygen) +#endif +#if defined(crypto_aead_xchacha20poly1305_IETF_NPUBBYTES) + ZEND_FE(sodium_crypto_aead_xchacha20poly1305_ietf_encrypt, arginfo_sodium_crypto_aead_xchacha20poly1305_ietf_encrypt) +#endif + ZEND_FE(sodium_crypto_auth, arginfo_sodium_crypto_auth) + ZEND_FE(sodium_crypto_auth_keygen, arginfo_sodium_crypto_auth_keygen) + ZEND_FE(sodium_crypto_auth_verify, arginfo_sodium_crypto_auth_verify) + ZEND_FE(sodium_crypto_box, arginfo_sodium_crypto_box) + ZEND_FE(sodium_crypto_box_keypair, arginfo_sodium_crypto_box_keypair) + ZEND_FE(sodium_crypto_box_seed_keypair, arginfo_sodium_crypto_box_seed_keypair) + ZEND_FE(sodium_crypto_box_keypair_from_secretkey_and_publickey, arginfo_sodium_crypto_box_keypair_from_secretkey_and_publickey) + ZEND_FE(sodium_crypto_box_open, arginfo_sodium_crypto_box_open) + ZEND_FE(sodium_crypto_box_publickey, arginfo_sodium_crypto_box_publickey) + ZEND_FE(sodium_crypto_box_publickey_from_secretkey, arginfo_sodium_crypto_box_publickey_from_secretkey) + ZEND_FE(sodium_crypto_box_seal, arginfo_sodium_crypto_box_seal) + ZEND_FE(sodium_crypto_box_seal_open, arginfo_sodium_crypto_box_seal_open) + ZEND_FE(sodium_crypto_box_secretkey, arginfo_sodium_crypto_box_secretkey) + ZEND_FE(sodium_crypto_kx_keypair, arginfo_sodium_crypto_kx_keypair) + ZEND_FE(sodium_crypto_kx_publickey, arginfo_sodium_crypto_kx_publickey) + ZEND_FE(sodium_crypto_kx_secretkey, arginfo_sodium_crypto_kx_secretkey) + ZEND_FE(sodium_crypto_kx_seed_keypair, arginfo_sodium_crypto_kx_seed_keypair) + ZEND_FE(sodium_crypto_kx_client_session_keys, arginfo_sodium_crypto_kx_client_session_keys) + ZEND_FE(sodium_crypto_kx_server_session_keys, arginfo_sodium_crypto_kx_server_session_keys) + ZEND_FE(sodium_crypto_generichash, arginfo_sodium_crypto_generichash) + ZEND_FE(sodium_crypto_generichash_keygen, arginfo_sodium_crypto_generichash_keygen) + ZEND_FE(sodium_crypto_generichash_init, arginfo_sodium_crypto_generichash_init) + ZEND_FE(sodium_crypto_generichash_update, arginfo_sodium_crypto_generichash_update) + ZEND_FE(sodium_crypto_generichash_final, arginfo_sodium_crypto_generichash_final) + ZEND_FE(sodium_crypto_kdf_derive_from_key, arginfo_sodium_crypto_kdf_derive_from_key) + ZEND_FE(sodium_crypto_kdf_keygen, arginfo_sodium_crypto_kdf_keygen) +#if defined(crypto_pwhash_SALTBYTES) + ZEND_FE(sodium_crypto_pwhash, arginfo_sodium_crypto_pwhash) +#endif +#if defined(crypto_pwhash_SALTBYTES) + ZEND_FE(sodium_crypto_pwhash_str, arginfo_sodium_crypto_pwhash_str) +#endif +#if defined(crypto_pwhash_SALTBYTES) + ZEND_FE(sodium_crypto_pwhash_str_verify, arginfo_sodium_crypto_pwhash_str_verify) +#endif +#if SODIUM_LIBRARY_VERSION_MAJOR > 9 || (SODIUM_LIBRARY_VERSION_MAJOR == 9 && SODIUM_LIBRARY_VERSION_MINOR >= 6) + ZEND_FE(sodium_crypto_pwhash_str_needs_rehash, arginfo_sodium_crypto_pwhash_str_needs_rehash) +#endif +#if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES) + ZEND_FE(sodium_crypto_pwhash_scryptsalsa208sha256, arginfo_sodium_crypto_pwhash_scryptsalsa208sha256) +#endif +#if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES) + ZEND_FE(sodium_crypto_pwhash_scryptsalsa208sha256_str, arginfo_sodium_crypto_pwhash_scryptsalsa208sha256_str) +#endif +#if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES) + ZEND_FE(sodium_crypto_pwhash_scryptsalsa208sha256_str_verify, arginfo_sodium_crypto_pwhash_scryptsalsa208sha256_str_verify) +#endif + ZEND_FE(sodium_crypto_scalarmult, arginfo_sodium_crypto_scalarmult) + ZEND_FE(sodium_crypto_secretbox, arginfo_sodium_crypto_secretbox) + ZEND_FE(sodium_crypto_secretbox_keygen, arginfo_sodium_crypto_secretbox_keygen) + ZEND_FE(sodium_crypto_secretbox_open, arginfo_sodium_crypto_secretbox_open) +#if defined(crypto_secretstream_xchacha20poly1305_ABYTES) + ZEND_FE(sodium_crypto_secretstream_xchacha20poly1305_keygen, arginfo_sodium_crypto_secretstream_xchacha20poly1305_keygen) +#endif +#if defined(crypto_secretstream_xchacha20poly1305_ABYTES) + ZEND_FE(sodium_crypto_secretstream_xchacha20poly1305_init_push, arginfo_sodium_crypto_secretstream_xchacha20poly1305_init_push) +#endif +#if defined(crypto_secretstream_xchacha20poly1305_ABYTES) + ZEND_FE(sodium_crypto_secretstream_xchacha20poly1305_push, arginfo_sodium_crypto_secretstream_xchacha20poly1305_push) +#endif +#if defined(crypto_secretstream_xchacha20poly1305_ABYTES) + ZEND_FE(sodium_crypto_secretstream_xchacha20poly1305_init_pull, arginfo_sodium_crypto_secretstream_xchacha20poly1305_init_pull) +#endif +#if defined(crypto_secretstream_xchacha20poly1305_ABYTES) + ZEND_FE(sodium_crypto_secretstream_xchacha20poly1305_pull, arginfo_sodium_crypto_secretstream_xchacha20poly1305_pull) +#endif +#if defined(crypto_secretstream_xchacha20poly1305_ABYTES) + ZEND_FE(sodium_crypto_secretstream_xchacha20poly1305_rekey, arginfo_sodium_crypto_secretstream_xchacha20poly1305_rekey) +#endif + ZEND_FE(sodium_crypto_shorthash, arginfo_sodium_crypto_shorthash) + ZEND_FE(sodium_crypto_shorthash_keygen, arginfo_sodium_crypto_shorthash_keygen) + ZEND_FE(sodium_crypto_sign, arginfo_sodium_crypto_sign) + ZEND_FE(sodium_crypto_sign_detached, arginfo_sodium_crypto_sign_detached) + ZEND_FE(sodium_crypto_sign_ed25519_pk_to_curve25519, arginfo_sodium_crypto_sign_ed25519_pk_to_curve25519) + ZEND_FE(sodium_crypto_sign_ed25519_sk_to_curve25519, arginfo_sodium_crypto_sign_ed25519_sk_to_curve25519) + ZEND_FE(sodium_crypto_sign_keypair, arginfo_sodium_crypto_sign_keypair) + ZEND_FE(sodium_crypto_sign_keypair_from_secretkey_and_publickey, arginfo_sodium_crypto_sign_keypair_from_secretkey_and_publickey) + ZEND_FE(sodium_crypto_sign_open, arginfo_sodium_crypto_sign_open) + ZEND_FE(sodium_crypto_sign_publickey, arginfo_sodium_crypto_sign_publickey) + ZEND_FE(sodium_crypto_sign_secretkey, arginfo_sodium_crypto_sign_secretkey) + ZEND_FE(sodium_crypto_sign_publickey_from_secretkey, arginfo_sodium_crypto_sign_publickey_from_secretkey) + ZEND_FE(sodium_crypto_sign_seed_keypair, arginfo_sodium_crypto_sign_seed_keypair) + ZEND_FE(sodium_crypto_sign_verify_detached, arginfo_sodium_crypto_sign_verify_detached) + ZEND_FE(sodium_crypto_stream, arginfo_sodium_crypto_stream) + ZEND_FE(sodium_crypto_stream_keygen, arginfo_sodium_crypto_stream_keygen) + ZEND_FE(sodium_crypto_stream_xor, arginfo_sodium_crypto_stream_xor) + ZEND_FE(sodium_add, arginfo_sodium_add) + ZEND_FE(sodium_compare, arginfo_sodium_compare) + ZEND_FE(sodium_increment, arginfo_sodium_increment) + ZEND_FE(sodium_memcmp, arginfo_sodium_memcmp) + ZEND_FE(sodium_memzero, arginfo_sodium_memzero) + ZEND_FE(sodium_pad, arginfo_sodium_pad) + ZEND_FE(sodium_unpad, arginfo_sodium_unpad) + ZEND_FE(sodium_bin2hex, arginfo_sodium_bin2hex) + ZEND_FE(sodium_hex2bin, arginfo_sodium_hex2bin) +#if defined(sodium_base64_VARIANT_ORIGINAL) + ZEND_FE(sodium_bin2base64, arginfo_sodium_bin2base64) +#endif +#if defined(sodium_base64_VARIANT_ORIGINAL) + ZEND_FE(sodium_base642bin, arginfo_sodium_base642bin) +#endif + ZEND_FALIAS(sodium_crypto_scalarmult_base, sodium_crypto_box_publickey_from_secretkey, arginfo_sodium_crypto_scalarmult_base) + ZEND_FE_END +}; diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c index b9bedfa9deb41..9721193945a29 100644 --- a/ext/sysvmsg/sysvmsg.c +++ b/ext/sysvmsg/sysvmsg.c @@ -33,14 +33,6 @@ PHP_MINIT_FUNCTION(sysvmsg); PHP_MINFO_FUNCTION(sysvmsg); -PHP_FUNCTION(msg_get_queue); -PHP_FUNCTION(msg_remove_queue); -PHP_FUNCTION(msg_stat_queue); -PHP_FUNCTION(msg_set_queue); -PHP_FUNCTION(msg_send); -PHP_FUNCTION(msg_receive); -PHP_FUNCTION(msg_queue_exists); - typedef struct { key_t key; zend_long id; @@ -61,28 +53,12 @@ struct php_msgbuf { /* True global resources - no need for thread safety here */ static int le_sysvmsg; -/* {{{ sysvmsg_functions[] - * - * Every user visible function must have an entry in sysvmsg_functions[]. - */ -static const zend_function_entry sysvmsg_functions[] = { - PHP_FE(msg_get_queue, arginfo_msg_get_queue) - PHP_FE(msg_send, arginfo_msg_send) - PHP_FE(msg_receive, arginfo_msg_receive) - PHP_FE(msg_remove_queue, arginfo_msg_remove_queue) - PHP_FE(msg_stat_queue, arginfo_msg_stat_queue) - PHP_FE(msg_set_queue, arginfo_msg_set_queue) - PHP_FE(msg_queue_exists, arginfo_msg_queue_exists) - PHP_FE_END -}; -/* }}} */ - /* {{{ sysvmsg_module_entry */ zend_module_entry sysvmsg_module_entry = { STANDARD_MODULE_HEADER, "sysvmsg", - sysvmsg_functions, + ext_functions, PHP_MINIT(sysvmsg), NULL, NULL, diff --git a/ext/sysvmsg/sysvmsg.stub.php b/ext/sysvmsg/sysvmsg.stub.php index 27b59d950aa13..5bbe100ca625e 100644 --- a/ext/sysvmsg/sysvmsg.stub.php +++ b/ext/sysvmsg/sysvmsg.stub.php @@ -1,5 +1,7 @@ extension #%d pcre version %s ] { } - Return [ array|string|null ] } + Function [ function preg_filter ] { + + - Parameters [5] { + Parameter #0 [ $regex ] + Parameter #1 [ $replace ] + Parameter #2 [ $subject ] + Parameter #3 [ int $limit ] + Parameter #4 [ &$count ] + } + - Return [ array|string|null ] + } Function [ function preg_replace_callback ] { - Parameters [6] { @@ -121,17 +132,6 @@ string(%d) "Extension [ extension #%d pcre version %s ] { } - Return [ array|string|null ] } - Function [ function preg_filter ] { - - - Parameters [5] { - Parameter #0 [ $regex ] - Parameter #1 [ $replace ] - Parameter #2 [ $subject ] - Parameter #3 [ int $limit ] - Parameter #4 [ &$count ] - } - - Return [ array|string|null ] - } Function [ function preg_split ] { - Parameters [4] { From 50765075db6b6d5a9597589601c59f743f6ee9c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Wed, 1 Apr 2020 23:32:39 +0200 Subject: [PATCH 045/338] Improve some ValueError messages Closes GH-5340 --- ext/bz2/bz2.c | 4 +- ext/bz2/tests/001.phpt | 6 +- ext/bz2/tests/003-mb.phpt | 2 +- ext/bz2/tests/003.phpt | 2 +- ext/calendar/cal_unix.c | 2 +- ext/calendar/calendar.c | 8 +- ext/calendar/easter.c | 2 +- .../tests/cal_days_in_month_error1.phpt | 2 +- ext/calendar/tests/cal_from_jd_error1.phpt | 2 +- ext/calendar/tests/cal_info.phpt | 2 +- ext/calendar/tests/cal_to_jd_error1.phpt | 2 +- ext/calendar/tests/easter_date.phpt | 2 +- ext/calendar/tests/unixtojd_error1.phpt | 2 +- ext/gd/gd.c | 168 ++++++++++-------- ext/gd/tests/bug38212-mb.phpt | 4 +- ext/gd/tests/bug38212.phpt | 4 +- ext/gd/tests/bug55005.phpt | 42 ++--- ext/gd/tests/bug72494.phpt | 2 +- ext/gd/tests/bug72697.phpt | 2 +- ext/gd/tests/bug72709.phpt | 2 +- ext/gd/tests/bug72730.phpt | 2 +- .../tests/imagecolorallocate_variation5.phpt | 12 +- .../tests/imagecolorallocate_variation6.phpt | 36 ++-- ext/gd/tests/imagecolordeallocate_error3.phpt | 2 +- ext/gd/tests/imagecolordeallocate_error4.phpt | 2 +- ext/gd/tests/imageconvolution_error2.phpt | 2 +- ext/gd/tests/imageconvolution_error3.phpt | 4 +- ext/gd/tests/imagecreate_error.phpt | 4 +- ext/gd/tests/imagecreatetruecolor_error2.phpt | 4 +- .../tests/imagetruecolortopalette_error3.phpt | 2 +- .../tests/imagetruecolortopalette_error4.phpt | 4 +- ext/json/json.c | 4 +- ext/json/tests/bug72787.phpt | 2 +- ext/json/tests/json_decode_error.phpt | 2 +- ext/sqlite3/sqlite3.c | 13 +- ext/standard/array.c | 6 +- ext/standard/assert.c | 2 +- ext/standard/basic_functions.c | 2 +- ext/standard/dir.c | 2 +- ext/standard/dns.c | 2 +- ext/standard/dns_win32.c | 2 +- ext/standard/file.c | 4 +- .../tests/array/count_invalid_mode.phpt | 6 +- ext/standard/tests/array/extract_error.phpt | 6 +- .../tests/assert/assert_options_error.phpt | 2 +- ext/standard/tests/dir/bug41693.phpt | 2 +- ext/standard/tests/file/bug71882.phpt | 2 +- ext/standard/tests/file/file_variation6.phpt | 18 +- .../tests/file/filesize_variation3.phpt | 2 +- ext/standard/tests/file/ftruncate.phpt | Bin 1143 -> 1179 bytes .../tests/file/ftruncate_variation4.phpt | 96 +++++----- ext/standard/tests/file/userstreams_005.phpt | 2 +- .../tests/general_functions/putenv.phpt | 6 +- ext/standard/tests/network/bug41347.phpt | 2 +- 54 files changed, 274 insertions(+), 247 deletions(-) diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c index 29046e7122093..360f9d9c20583 100644 --- a/ext/bz2/bz2.c +++ b/ext/bz2/bz2.c @@ -317,7 +317,7 @@ PHP_FUNCTION(bzread) php_stream_from_zval(stream, bz); if (len < 0) { - zend_value_error("Length cannot be negative"); + zend_argument_value_error(2, "must be greater than or equal to 0"); RETURN_THROWS(); } @@ -345,7 +345,7 @@ PHP_FUNCTION(bzopen) } if (mode_len != 1 || (mode[0] != 'r' && mode[0] != 'w')) { - zend_value_error("'%s' is not a valid mode for bzopen(). Only 'w' and 'r' are supported.", mode); + zend_argument_value_error(2, "must be a valid mode. Only 'w' and 'r' are supported"); RETURN_THROWS(); } diff --git a/ext/bz2/tests/001.phpt b/ext/bz2/tests/001.phpt index 1064e2b6a5214..081558a7d4d49 100644 --- a/ext/bz2/tests/001.phpt +++ b/ext/bz2/tests/001.phpt @@ -37,15 +37,15 @@ var_dump(bzopen($fp, "r")); ?> --EXPECTF-- -'' is not a valid mode for bzopen(). Only 'w' and 'r' are supported. +bzopen(): Argument #2 ($mode) must be a valid mode. Only 'w' and 'r' are supported Warning: bzopen(): Filename cannot be empty in %s on line %d bool(false) Warning: bzopen(): Filename cannot be empty in %s on line %d bool(false) -'x' is not a valid mode for bzopen(). Only 'w' and 'r' are supported. -'rw' is not a valid mode for bzopen(). Only 'w' and 'r' are supported. +bzopen(): Argument #2 ($mode) must be a valid mode. Only 'w' and 'r' are supported +bzopen(): Argument #2 ($mode) must be a valid mode. Only 'w' and 'r' are supported Warning: bzopen(no_such_file): Failed to open stream: No such file or directory in %s on line %d bool(false) diff --git a/ext/bz2/tests/003-mb.phpt b/ext/bz2/tests/003-mb.phpt index c01a3d18c81ca..75ec54ae4ded1 100644 --- a/ext/bz2/tests/003-mb.phpt +++ b/ext/bz2/tests/003-mb.phpt @@ -21,7 +21,7 @@ var_dump(bzread($fd, 100000)); ?> --EXPECT-- string(0) "" -Length cannot be negative +bzread(): Argument #2 ($length) must be greater than or equal to 0 string(1) "R" string(2) "is" string(251) "ing up from the heart of the desert diff --git a/ext/bz2/tests/003.phpt b/ext/bz2/tests/003.phpt index 6c1f8ea4a9873..229dd87058cbd 100644 --- a/ext/bz2/tests/003.phpt +++ b/ext/bz2/tests/003.phpt @@ -21,7 +21,7 @@ var_dump(bzread($fd, 100000)); ?> --EXPECT-- string(0) "" -Length cannot be negative +bzread(): Argument #2 ($length) must be greater than or equal to 0 string(1) "R" string(2) "is" string(251) "ing up from the heart of the desert diff --git a/ext/calendar/cal_unix.c b/ext/calendar/cal_unix.c index 1d3401283de17..47387726498f1 100644 --- a/ext/calendar/cal_unix.c +++ b/ext/calendar/cal_unix.c @@ -35,7 +35,7 @@ PHP_FUNCTION(unixtojd) if (!ts) { ts = time(NULL); } else if (ts < 0) { - zend_value_error("Timestamp must not be negative"); + zend_argument_value_error(1, "must be greater than or equal to 0"); RETURN_THROWS(); } diff --git a/ext/calendar/calendar.c b/ext/calendar/calendar.c index 32b229c41d32e..2853e727754e4 100644 --- a/ext/calendar/calendar.c +++ b/ext/calendar/calendar.c @@ -194,7 +194,7 @@ PHP_FUNCTION(cal_info) if (cal != -1 && (cal < 0 || cal >= CAL_NUM_CALS)) { - zend_value_error("Invalid calendar ID: " ZEND_LONG_FMT, cal); + zend_argument_value_error(1, "must be a valid calendar ID"); RETURN_THROWS(); } @@ -216,7 +216,7 @@ PHP_FUNCTION(cal_days_in_month) } if (cal < 0 || cal >= CAL_NUM_CALS) { - zend_value_error("Invalid calendar ID: " ZEND_LONG_FMT, cal); + zend_argument_value_error(1, "must be a valid calendar ID"); RETURN_THROWS(); } @@ -262,7 +262,7 @@ PHP_FUNCTION(cal_to_jd) } if (cal < 0 || cal >= CAL_NUM_CALS) { - zend_value_error("Invalid calendar ID: " ZEND_LONG_FMT, cal); + zend_argument_value_error(1, "must be a valid calendar ID"); RETURN_THROWS(); } @@ -283,7 +283,7 @@ PHP_FUNCTION(cal_from_jd) } if (cal < 0 || cal >= CAL_NUM_CALS) { - zend_value_error("Invalid calendar ID: " ZEND_LONG_FMT, cal); + zend_argument_value_error(2, "must be a valid calendar ID"); RETURN_THROWS(); } calendar = &cal_conversion_table[cal]; diff --git a/ext/calendar/easter.c b/ext/calendar/easter.c index 98087d318cd70..7f26de0c006ab 100644 --- a/ext/calendar/easter.c +++ b/ext/calendar/easter.c @@ -49,7 +49,7 @@ static void _cal_easter(INTERNAL_FUNCTION_PARAMETERS, zend_long gm) } if (gm && (year<1970 || year>2037)) { /* out of range for timestamps */ - zend_value_error("This function is only valid for years between 1970 and 2037 inclusive"); + zend_argument_value_error(1, "must be between 1970 and 2037 (inclusive)"); RETURN_THROWS(); } diff --git a/ext/calendar/tests/cal_days_in_month_error1.phpt b/ext/calendar/tests/cal_days_in_month_error1.phpt index b7c82f2cbef5c..2b7ee0ea88ff0 100644 --- a/ext/calendar/tests/cal_days_in_month_error1.phpt +++ b/ext/calendar/tests/cal_days_in_month_error1.phpt @@ -18,5 +18,5 @@ try{ } ?> --EXPECT-- -Invalid calendar ID: -1 +cal_days_in_month(): Argument #1 ($calendar) must be a valid calendar ID Invalid date diff --git a/ext/calendar/tests/cal_from_jd_error1.phpt b/ext/calendar/tests/cal_from_jd_error1.phpt index 8539117c0d169..feafe240b5aac 100644 --- a/ext/calendar/tests/cal_from_jd_error1.phpt +++ b/ext/calendar/tests/cal_from_jd_error1.phpt @@ -13,4 +13,4 @@ try { } ?> --EXPECT-- -Invalid calendar ID: -1 +cal_from_jd(): Argument #2 ($calendar) must be a valid calendar ID diff --git a/ext/calendar/tests/cal_info.phpt b/ext/calendar/tests/cal_info.phpt index 3e7e3b31883db..0d4b823486977 100644 --- a/ext/calendar/tests/cal_info.phpt +++ b/ext/calendar/tests/cal_info.phpt @@ -216,4 +216,4 @@ Array [calname] => Julian [calsymbol] => CAL_JULIAN ) -Invalid calendar ID: 99999 +cal_info(): Argument #1 ($calendar) must be a valid calendar ID diff --git a/ext/calendar/tests/cal_to_jd_error1.phpt b/ext/calendar/tests/cal_to_jd_error1.phpt index c1911a77b7d5c..b8585c7f05398 100644 --- a/ext/calendar/tests/cal_to_jd_error1.phpt +++ b/ext/calendar/tests/cal_to_jd_error1.phpt @@ -13,4 +13,4 @@ try { } ?> --EXPECT-- -Invalid calendar ID: -1 +cal_to_jd(): Argument #1 ($calendar) must be a valid calendar ID diff --git a/ext/calendar/tests/easter_date.phpt b/ext/calendar/tests/easter_date.phpt index a7cdbea516428..c784f02ebd1c5 100644 --- a/ext/calendar/tests/easter_date.phpt +++ b/ext/calendar/tests/easter_date.phpt @@ -22,4 +22,4 @@ try { 2000-04-23 2001-04-15 2002-03-31 -This function is only valid for years between 1970 and 2037 inclusive +easter_date(): Argument #1 ($year) must be between 1970 and 2037 (inclusive) diff --git a/ext/calendar/tests/unixtojd_error1.phpt b/ext/calendar/tests/unixtojd_error1.phpt index 856fc1bcf43a4..000f047f0adbc 100644 --- a/ext/calendar/tests/unixtojd_error1.phpt +++ b/ext/calendar/tests/unixtojd_error1.phpt @@ -20,7 +20,7 @@ var_dump(unixtojd(null)) . PHP_EOL; var_dump(unixtojd(time())) . PHP_EOL; ?> --EXPECTF-- -Timestamp must not be negative +unixtojd(): Argument #1 ($timestamp) must be greater than or equal to 0 int(%d) int(%d) int(%d) diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 5bb840aad8edf..157460b50bc5b 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -736,7 +736,7 @@ PHP_FUNCTION(imagesetstyle) num_styles = zend_hash_num_elements(Z_ARRVAL_P(styles)); if (num_styles == 0) { - zend_value_error("Styles array must not be empty"); + zend_argument_value_error(2, "cannot be empty"); RETURN_THROWS(); } @@ -767,12 +767,12 @@ PHP_FUNCTION(imagecreatetruecolor) } if (x_size <= 0 || x_size >= INT_MAX) { - zend_value_error("Invalid width (x_size)"); + zend_argument_value_error(1, "must be greater than 0"); RETURN_THROWS(); } if (y_size <= 0 || y_size >= INT_MAX) { - zend_value_error("Invalid height (y_size)"); + zend_argument_value_error(2, "must be greater than 0"); RETURN_THROWS(); } @@ -819,7 +819,7 @@ PHP_FUNCTION(imagetruecolortopalette) im = php_gd_libgdimageptr_from_zval_p(IM); if (ncolors <= 0 || ZEND_LONG_INT_OVFL(ncolors)) { - zend_value_error("Number of colors has to be greater than zero and no more than %d", INT_MAX); + zend_argument_value_error(3, "must be greater than 0 and less than %d", INT_MAX); RETURN_THROWS(); } @@ -1022,9 +1022,9 @@ PHP_FUNCTION(imagelayereffect) } /* }}} */ -#define CHECK_RGBA_RANGE(component, name) \ +#define CHECK_RGBA_RANGE(component, name, argument_number) \ if (component < 0 || component > gd##name##Max) { \ - zend_value_error(#name " component is out of range, must be between 0 and %d (inclusive)", gd##name##Max); \ + zend_argument_value_error(argument_number, "must be between 0 and %d (inclusive)", gd##name##Max); \ RETURN_THROWS(); \ } @@ -1043,10 +1043,10 @@ PHP_FUNCTION(imagecolorallocatealpha) im = php_gd_libgdimageptr_from_zval_p(IM); - CHECK_RGBA_RANGE(red, Red); - CHECK_RGBA_RANGE(green, Green); - CHECK_RGBA_RANGE(blue, Blue); - CHECK_RGBA_RANGE(alpha, Alpha); + CHECK_RGBA_RANGE(red, Red, 2); + CHECK_RGBA_RANGE(green, Green, 3); + CHECK_RGBA_RANGE(blue, Blue, 4); + CHECK_RGBA_RANGE(alpha, Alpha, 5); ct = gdImageColorAllocateAlpha(im, red, green, blue, alpha); if (ct < 0) { @@ -1070,10 +1070,10 @@ PHP_FUNCTION(imagecolorresolvealpha) im = php_gd_libgdimageptr_from_zval_p(IM); - CHECK_RGBA_RANGE(red, Red); - CHECK_RGBA_RANGE(green, Green); - CHECK_RGBA_RANGE(blue, Blue); - CHECK_RGBA_RANGE(alpha, Alpha); + CHECK_RGBA_RANGE(red, Red, 2); + CHECK_RGBA_RANGE(green, Green, 3); + CHECK_RGBA_RANGE(blue, Blue, 4); + CHECK_RGBA_RANGE(alpha, Alpha, 5); RETURN_LONG(gdImageColorResolveAlpha(im, red, green, blue, alpha)); } @@ -1093,10 +1093,10 @@ PHP_FUNCTION(imagecolorclosestalpha) im = php_gd_libgdimageptr_from_zval_p(IM); - CHECK_RGBA_RANGE(red, Red); - CHECK_RGBA_RANGE(green, Green); - CHECK_RGBA_RANGE(blue, Blue); - CHECK_RGBA_RANGE(alpha, Alpha); + CHECK_RGBA_RANGE(red, Red, 2); + CHECK_RGBA_RANGE(green, Green, 3); + CHECK_RGBA_RANGE(blue, Blue, 4); + CHECK_RGBA_RANGE(alpha, Alpha, 5); RETURN_LONG(gdImageColorClosestAlpha(im, red, green, blue, alpha)); } @@ -1110,16 +1110,16 @@ PHP_FUNCTION(imagecolorexactalpha) zend_long red, green, blue, alpha; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ollll", &IM, gd_image_ce, &red, &green, &blue, &alpha) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ollll", &IM, gd_image_ce, &red, &green, &blue, &alpha) == FAILURE) { RETURN_THROWS(); } im = php_gd_libgdimageptr_from_zval_p(IM); - CHECK_RGBA_RANGE(red, Red); - CHECK_RGBA_RANGE(green, Green); - CHECK_RGBA_RANGE(blue, Blue); - CHECK_RGBA_RANGE(alpha, Alpha); + CHECK_RGBA_RANGE(red, Red, 2); + CHECK_RGBA_RANGE(green, Green, 3); + CHECK_RGBA_RANGE(blue, Blue, 4); + CHECK_RGBA_RANGE(alpha, Alpha, 5); RETURN_LONG(gdImageColorExactAlpha(im, red, green, blue, alpha)); } @@ -1362,12 +1362,12 @@ PHP_FUNCTION(imagecreate) } if (x_size <= 0 || x_size >= INT_MAX) { - zend_value_error("Invalid width (x_size)"); + zend_argument_value_error(1, "must be greater than 0"); RETURN_THROWS(); } if (y_size <= 0 || y_size >= INT_MAX) { - zend_value_error("Invalid height (y_size)"); + zend_argument_value_error(2, "must be greater than 0"); RETURN_THROWS(); } @@ -1601,12 +1601,12 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type, } if (width < 1) { - zend_value_error("Width must be at least 1"); + zend_argument_value_error(4, "must be greater than or equal to 1"); RETURN_THROWS(); } if (height < 1) { - zend_value_error("Height must be at least 1"); + zend_argument_value_error(5, "must be greater than or equal to 1"); RETURN_THROWS(); } @@ -2023,9 +2023,9 @@ PHP_FUNCTION(imagecolorallocate) im = php_gd_libgdimageptr_from_zval_p(IM); - CHECK_RGBA_RANGE(red, Red); - CHECK_RGBA_RANGE(green, Green); - CHECK_RGBA_RANGE(blue, Blue); + CHECK_RGBA_RANGE(red, Red, 2); + CHECK_RGBA_RANGE(green, Green, 3); + CHECK_RGBA_RANGE(blue, Blue, 4); ct = gdImageColorAllocate(im, red, green, blue); if (ct < 0) { @@ -2101,9 +2101,9 @@ PHP_FUNCTION(imagecolorclosest) im = php_gd_libgdimageptr_from_zval_p(IM); - CHECK_RGBA_RANGE(red, Red); - CHECK_RGBA_RANGE(green, Green); - CHECK_RGBA_RANGE(blue, Blue); + CHECK_RGBA_RANGE(red, Red, 2); + CHECK_RGBA_RANGE(green, Green, 3); + CHECK_RGBA_RANGE(blue, Blue, 4); RETURN_LONG(gdImageColorClosest(im, red, green, blue)); } @@ -2123,9 +2123,9 @@ PHP_FUNCTION(imagecolorclosesthwb) im = php_gd_libgdimageptr_from_zval_p(IM); - CHECK_RGBA_RANGE(red, Red); - CHECK_RGBA_RANGE(green, Green); - CHECK_RGBA_RANGE(blue, Blue); + CHECK_RGBA_RANGE(red, Red, 2); + CHECK_RGBA_RANGE(green, Green, 3); + CHECK_RGBA_RANGE(blue, Blue, 4); RETURN_LONG(gdImageColorClosestHWB(im, red, green, blue)); } @@ -2157,7 +2157,7 @@ PHP_FUNCTION(imagecolordeallocate) gdImageColorDeallocate(im, col); RETURN_TRUE; } else { - zend_value_error("Color index %d out of range", col); + zend_argument_value_error(2, "must be between 0 and %d", gdImageColorsTotal(im)); RETURN_THROWS(); } } @@ -2177,9 +2177,9 @@ PHP_FUNCTION(imagecolorresolve) im = php_gd_libgdimageptr_from_zval_p(IM); - CHECK_RGBA_RANGE(red, Red); - CHECK_RGBA_RANGE(green, Green); - CHECK_RGBA_RANGE(blue, Blue); + CHECK_RGBA_RANGE(red, Red, 2); + CHECK_RGBA_RANGE(green, Green, 3); + CHECK_RGBA_RANGE(blue, Blue, 4); RETURN_LONG(gdImageColorResolve(im, red, green, blue)); } @@ -2199,9 +2199,9 @@ PHP_FUNCTION(imagecolorexact) im = php_gd_libgdimageptr_from_zval_p(IM); - CHECK_RGBA_RANGE(red, Red); - CHECK_RGBA_RANGE(green, Green); - CHECK_RGBA_RANGE(blue, Blue); + CHECK_RGBA_RANGE(red, Red, 2); + CHECK_RGBA_RANGE(green, Green, 3); + CHECK_RGBA_RANGE(blue, Blue, 4); RETURN_LONG(gdImageColorExact(im, red, green, blue)); } @@ -2222,10 +2222,9 @@ PHP_FUNCTION(imagecolorset) im = php_gd_libgdimageptr_from_zval_p(IM); - CHECK_RGBA_RANGE(red, Red); - CHECK_RGBA_RANGE(green, Green); - CHECK_RGBA_RANGE(blue, Blue); - CHECK_RGBA_RANGE(alpha, Alpha); + CHECK_RGBA_RANGE(red, Red, 2); + CHECK_RGBA_RANGE(green, Green, 3); + CHECK_RGBA_RANGE(blue, Blue, 4); col = color; @@ -2284,8 +2283,13 @@ PHP_FUNCTION(imagegammacorrect) RETURN_THROWS(); } - if ( input <= 0.0 || output <= 0.0 ) { - zend_value_error("Gamma values must be positive"); + if (input <= 0.0) { + zend_argument_value_error(2, "must be greater than 0"); + RETURN_THROWS(); + } + + if (output <= 0.0) { + zend_argument_value_error(3, "must be greater than 0"); RETURN_THROWS(); } @@ -2594,7 +2598,7 @@ static void php_imagepolygon(INTERNAL_FUNCTION_PARAMETERS, int filled) COL = NPOINTS; NPOINTS = zend_hash_num_elements(Z_ARRVAL_P(POINTS)); if (NPOINTS % 2 != 0) { - zend_value_error("Points array must have an even number of elements"); + zend_argument_value_error(2, "must have an even number of elements"); RETURN_THROWS(); } NPOINTS /= 2; @@ -2607,7 +2611,7 @@ static void php_imagepolygon(INTERNAL_FUNCTION_PARAMETERS, int filled) nelem = zend_hash_num_elements(Z_ARRVAL_P(POINTS)); if (npoints < 3) { - zend_value_error("Polygon must have at least 3 points"); + zend_argument_value_error(3, "must be greater than or equal to 3"); RETURN_THROWS(); } @@ -2983,8 +2987,23 @@ PHP_FUNCTION(imagecopyresized) dstH = DH; dstW = DW; - if (dstW <= 0 || dstH <= 0 || srcW <= 0 || srcH <= 0) { - zend_value_error("Invalid image dimensions"); + if (dstW <= 0) { + zend_argument_value_error(3, "must be greater than 0"); + RETURN_THROWS(); + } + + if (dstH <= 0) { + zend_argument_value_error(4, "must be greater than 0"); + RETURN_THROWS(); + } + + if (srcW <= 0) { + zend_argument_value_error(5, "must be greater than 0"); + RETURN_THROWS(); + } + + if (srcH <= 0) { + zend_argument_value_error(6, "must be greater than 0"); RETURN_THROWS(); } @@ -3466,14 +3485,14 @@ PHP_FUNCTION(imageconvolution) nelem = zend_hash_num_elements(Z_ARRVAL_P(hash_matrix)); if (nelem != 3) { - zend_value_error("Convolution matrix must be a 3x3 array"); + zend_argument_value_error(2, "must be a 3x3 array"); RETURN_THROWS(); } for (i=0; i<3; i++) { if ((var = zend_hash_index_find(Z_ARRVAL_P(hash_matrix), (i))) != NULL && Z_TYPE_P(var) == IS_ARRAY) { if (zend_hash_num_elements(Z_ARRVAL_P(var)) != 3 ) { - zend_value_error("Convolution matrix must be a 3x3 array, matrix[%d] only has %d elements", i, zend_hash_num_elements(Z_ARRVAL_P(var))); + zend_argument_value_error(2, "must be a 3x3 array, matrix[%d] only has %d elements", i, zend_hash_num_elements(Z_ARRVAL_P(var))); RETURN_THROWS(); } @@ -3481,7 +3500,7 @@ PHP_FUNCTION(imageconvolution) if ((var2 = zend_hash_index_find(Z_ARRVAL_P(var), j)) != NULL) { matrix[i][j] = (float) zval_get_double(var2); } else { - zend_value_error("Convolution matrix must be a 3x3 array, matrix[%d][%d] cannot be found (missing integer key)", i, j); + zend_argument_value_error(2, "must be a 3x3 array, matrix[%d][%d] cannot be found (missing integer key)", i, j); RETURN_THROWS(); } } @@ -3526,7 +3545,7 @@ PHP_FUNCTION(imageflip) break; default: - zend_value_error("Unknown flip mode"); + zend_argument_value_error(2, "must be a valid mode"); RETURN_THROWS(); } @@ -3575,28 +3594,28 @@ PHP_FUNCTION(imagecrop) if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "x", sizeof("x") -1)) != NULL) { rect.x = zval_get_long(tmp); } else { - zend_value_error("Cropping rectangle is missing x position"); + zend_argument_value_error(2, "must have an 'x' key"); RETURN_THROWS(); } if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "y", sizeof("y") - 1)) != NULL) { rect.y = zval_get_long(tmp); } else { - zend_value_error("Cropping rectangle is missing y position"); + zend_argument_value_error(2, "must have a 'y' key"); RETURN_THROWS(); } if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "width", sizeof("width") - 1)) != NULL) { rect.width = zval_get_long(tmp); } else { - zend_value_error("Cropping rectangle is missing width"); + zend_argument_value_error(2, "must have a 'width' key"); RETURN_THROWS(); } if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "height", sizeof("height") - 1)) != NULL) { rect.height = zval_get_long(tmp); } else { - zend_value_error("Cropping rectangle is missing height"); + zend_argument_value_error(2, "must have a 'height' key"); RETURN_THROWS(); } @@ -3638,14 +3657,14 @@ PHP_FUNCTION(imagecropauto) case GD_CROP_THRESHOLD: if (color < 0 || (!gdImageTrueColor(im) && color >= gdImageColorsTotal(im))) { - zend_value_error("Color argument missing with threshold mode"); + zend_argument_value_error(4, "must be greater than or equal to 0 when using the threshold mode"); RETURN_THROWS(); } im_crop = gdImageCropThreshold(im, color, (float) threshold); break; default: - zend_value_error("Unknown crop mode"); + zend_argument_value_error(2, "must be a valid mode"); RETURN_THROWS(); } @@ -3762,28 +3781,28 @@ PHP_FUNCTION(imageaffine) if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "x", sizeof("x") - 1)) != NULL) { rect.x = zval_get_long(tmp); } else { - zend_value_error("Clip array is missing x position"); + zend_argument_value_error(3, "must have an 'x' key"); RETURN_THROWS(); } if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "y", sizeof("y") - 1)) != NULL) { rect.y = zval_get_long(tmp); } else { - zend_value_error("Clip array is missing y position"); + zend_argument_value_error(3, "must have a 'y' key"); RETURN_THROWS(); } if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "width", sizeof("width") - 1)) != NULL) { rect.width = zval_get_long(tmp); } else { - zend_value_error("Clip array is missing width"); + zend_argument_value_error(3, "must have a 'width' key"); RETURN_THROWS(); } if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "height", sizeof("height") - 1)) != NULL) { rect.height = zval_get_long(tmp); } else { - zend_value_error("Clip array is missing height"); + zend_argument_value_error(3, "must have a 'height' key"); RETURN_THROWS(); } pRect = ▭ @@ -3827,14 +3846,14 @@ PHP_FUNCTION(imageaffinematrixget) if ((tmp = zend_hash_str_find(Z_ARRVAL_P(options), "x", sizeof("x") - 1)) != NULL) { x = zval_get_double(tmp); } else { - zend_value_error("Options array is missing x position"); + zend_argument_value_error(2, "must have an 'x' key"); RETURN_THROWS(); } if ((tmp = zend_hash_str_find(Z_ARRVAL_P(options), "y", sizeof("y") - 1)) != NULL) { y = zval_get_double(tmp); } else { - zend_value_error("Options array is missing y position"); + zend_argument_value_error(2, "must have a 'y' key"); RETURN_THROWS(); } @@ -3894,14 +3913,19 @@ PHP_FUNCTION(imageaffinematrixconcat) zval *tmp; zval *z_m1; zval *z_m2; - int i, nelems; + int i; if (zend_parse_parameters(ZEND_NUM_ARGS(), "aa", &z_m1, &z_m2) == FAILURE) { RETURN_THROWS(); } - if (((nelems = zend_hash_num_elements(Z_ARRVAL_P(z_m1))) != 6) || (nelems = zend_hash_num_elements(Z_ARRVAL_P(z_m2))) != 6) { - zend_value_error("Affine arrays must have six elements"); + if (zend_hash_num_elements(Z_ARRVAL_P(z_m1)) != 6) { + zend_argument_value_error(1, "must have 6 elements"); + RETURN_THROWS(); + } + + if (zend_hash_num_elements(Z_ARRVAL_P(z_m2)) != 6) { + zend_argument_value_error(1, "must have 6 elements"); RETURN_THROWS(); } diff --git a/ext/gd/tests/bug38212-mb.phpt b/ext/gd/tests/bug38212-mb.phpt index d69d604e5d786..f316aed00b343 100644 --- a/ext/gd/tests/bug38212-mb.phpt +++ b/ext/gd/tests/bug38212-mb.phpt @@ -21,5 +21,5 @@ trycatch_dump( unlink($file); ?> --EXPECT-- -!! [ValueError] Width must be at least 1 -!! [ValueError] Height must be at least 1 +!! [ValueError] imagecreatefromgd2part(): Argument #4 ($width) must be greater than or equal to 1 +!! [ValueError] imagecreatefromgd2part(): Argument #5 ($height) must be greater than or equal to 1 diff --git a/ext/gd/tests/bug38212.phpt b/ext/gd/tests/bug38212.phpt index 8645989e09ee3..311077141e5ee 100644 --- a/ext/gd/tests/bug38212.phpt +++ b/ext/gd/tests/bug38212.phpt @@ -21,5 +21,5 @@ trycatch_dump( unlink($file); ?> --EXPECT-- -!! [ValueError] Width must be at least 1 -!! [ValueError] Height must be at least 1 +!! [ValueError] imagecreatefromgd2part(): Argument #4 ($width) must be greater than or equal to 1 +!! [ValueError] imagecreatefromgd2part(): Argument #5 ($height) must be greater than or equal to 1 diff --git a/ext/gd/tests/bug55005.phpt b/ext/gd/tests/bug55005.phpt index 38fb25db07787..9b7044cee12dc 100644 --- a/ext/gd/tests/bug55005.phpt +++ b/ext/gd/tests/bug55005.phpt @@ -1,21 +1,21 @@ ---TEST-- -Bug #55005 (imagepolygon num_points requirement) ---SKIPIF-- - ---FILE-- - imagefilledpolygon($g, array(100,10, 100,100, 180,100), 2, $fgnd), - fn () => imagepolygon($g, array(200,10, 200,100, 280,100), 2, $fgnd) -); -?> ---EXPECTF-- -!! [ValueError] Polygon must have at least 3 points -!! [ValueError] Polygon must have at least 3 points +--TEST-- +Bug #55005 (imagepolygon num_points requirement) +--SKIPIF-- + +--FILE-- + imagefilledpolygon($g, array(100,10, 100,100, 180,100), 2, $fgnd), + fn () => imagepolygon($g, array(200,10, 200,100, 280,100), 2, $fgnd) +); +?> +--EXPECTF-- +!! [ValueError] imagefilledpolygon(): Argument #3 ($num_points_or_col) must be greater than or equal to 3 +!! [ValueError] imagepolygon(): Argument #3 ($num_points_or_col) must be greater than or equal to 3 diff --git a/ext/gd/tests/bug72494.phpt b/ext/gd/tests/bug72494.phpt index b01a19179a65f..97663cedf6035 100644 --- a/ext/gd/tests/bug72494.phpt +++ b/ext/gd/tests/bug72494.phpt @@ -16,4 +16,4 @@ trycatch_dump( ?> --EXPECT-- -!! [ValueError] Color argument missing with threshold mode +!! [ValueError] imagecropauto(): Argument #4 ($color) must be greater than or equal to 0 when using the threshold mode diff --git a/ext/gd/tests/bug72697.phpt b/ext/gd/tests/bug72697.phpt index 2c293d14be264..369e5c6c83881 100644 --- a/ext/gd/tests/bug72697.phpt +++ b/ext/gd/tests/bug72697.phpt @@ -19,5 +19,5 @@ trycatch_dump( ?> DONE --EXPECT-- -!! [ValueError] Number of colors has to be greater than zero and no more than 2147483647 +!! [ValueError] imagetruecolortopalette(): Argument #3 ($colorWanted) must be greater than 0 and less than 2147483647 DONE diff --git a/ext/gd/tests/bug72709.phpt b/ext/gd/tests/bug72709.phpt index a5b0463f6270f..02df1bb7c7668 100644 --- a/ext/gd/tests/bug72709.phpt +++ b/ext/gd/tests/bug72709.phpt @@ -20,5 +20,5 @@ imagedestroy($im); ?> ====DONE==== --EXPECT-- -Styles array must not be empty +imagesetstyle(): Argument #2 ($styles) cannot be empty ====DONE==== diff --git a/ext/gd/tests/bug72730.phpt b/ext/gd/tests/bug72730.phpt index 09b6657adda69..d021f70a4803b 100644 --- a/ext/gd/tests/bug72730.phpt +++ b/ext/gd/tests/bug72730.phpt @@ -17,4 +17,4 @@ trycatch_dump( ?> --EXPECT-- -!! [ValueError] Gamma values must be positive +!! [ValueError] imagegammacorrect(): Argument #2 ($inputgamma) must be greater than 0 diff --git a/ext/gd/tests/imagecolorallocate_variation5.phpt b/ext/gd/tests/imagecolorallocate_variation5.phpt index 1451af5a83bd7..bc7f82c847703 100644 --- a/ext/gd/tests/imagecolorallocate_variation5.phpt +++ b/ext/gd/tests/imagecolorallocate_variation5.phpt @@ -63,9 +63,9 @@ int(657930) int(657930) --Octal -012-- -!! [ValueError] Red component is out of range, must be between 0 and 255 (inclusive) -!! [ValueError] Green component is out of range, must be between 0 and 255 (inclusive) -!! [ValueError] Blue component is out of range, must be between 0 and 255 (inclusive) +!! [ValueError] imagecolorallocate(): Argument #2 ($red) must be between 0 and 255 (inclusive) +!! [ValueError] imagecolorallocate(): Argument #3 ($green) must be between 0 and 255 (inclusive) +!! [ValueError] imagecolorallocate(): Argument #4 ($blue) must be between 0 and 255 (inclusive) --Octal 0377-- int(16714250) @@ -83,9 +83,9 @@ int(657930) int(657930) --Hexa-decimal -0xA-- -!! [ValueError] Red component is out of range, must be between 0 and 255 (inclusive) -!! [ValueError] Green component is out of range, must be between 0 and 255 (inclusive) -!! [ValueError] Blue component is out of range, must be between 0 and 255 (inclusive) +!! [ValueError] imagecolorallocate(): Argument #2 ($red) must be between 0 and 255 (inclusive) +!! [ValueError] imagecolorallocate(): Argument #3 ($green) must be between 0 and 255 (inclusive) +!! [ValueError] imagecolorallocate(): Argument #4 ($blue) must be between 0 and 255 (inclusive) --Hexa-decimal 0xFF-- int(16714250) diff --git a/ext/gd/tests/imagecolorallocate_variation6.phpt b/ext/gd/tests/imagecolorallocate_variation6.phpt index 6af26801b82db..355010d198b80 100644 --- a/ext/gd/tests/imagecolorallocate_variation6.phpt +++ b/ext/gd/tests/imagecolorallocate_variation6.phpt @@ -51,25 +51,25 @@ foreach($values as $key => $value) { *** Testing imagecolorallocate() : usage variations *** --Decimal 256-- -!! [ValueError] Red component is out of range, must be between 0 and 255 (inclusive) -!! [ValueError] Red component is out of range, must be between 0 and 255 (inclusive) -!! [ValueError] Green component is out of range, must be between 0 and 255 (inclusive) -!! [ValueError] Green component is out of range, must be between 0 and 255 (inclusive) -!! [ValueError] Blue component is out of range, must be between 0 and 255 (inclusive) -!! [ValueError] Blue component is out of range, must be between 0 and 255 (inclusive) +!! [ValueError] imagecolorallocate(): Argument #2 ($red) must be between 0 and 255 (inclusive) +!! [ValueError] imagecolorallocate(): Argument #2 ($red) must be between 0 and 255 (inclusive) +!! [ValueError] imagecolorallocate(): Argument #3 ($green) must be between 0 and 255 (inclusive) +!! [ValueError] imagecolorallocate(): Argument #3 ($green) must be between 0 and 255 (inclusive) +!! [ValueError] imagecolorallocate(): Argument #4 ($blue) must be between 0 and 255 (inclusive) +!! [ValueError] imagecolorallocate(): Argument #4 ($blue) must be between 0 and 255 (inclusive) --Octal 0400-- -!! [ValueError] Red component is out of range, must be between 0 and 255 (inclusive) -!! [ValueError] Red component is out of range, must be between 0 and 255 (inclusive) -!! [ValueError] Green component is out of range, must be between 0 and 255 (inclusive) -!! [ValueError] Green component is out of range, must be between 0 and 255 (inclusive) -!! [ValueError] Blue component is out of range, must be between 0 and 255 (inclusive) -!! [ValueError] Blue component is out of range, must be between 0 and 255 (inclusive) +!! [ValueError] imagecolorallocate(): Argument #2 ($red) must be between 0 and 255 (inclusive) +!! [ValueError] imagecolorallocate(): Argument #2 ($red) must be between 0 and 255 (inclusive) +!! [ValueError] imagecolorallocate(): Argument #3 ($green) must be between 0 and 255 (inclusive) +!! [ValueError] imagecolorallocate(): Argument #3 ($green) must be between 0 and 255 (inclusive) +!! [ValueError] imagecolorallocate(): Argument #4 ($blue) must be between 0 and 255 (inclusive) +!! [ValueError] imagecolorallocate(): Argument #4 ($blue) must be between 0 and 255 (inclusive) --Hexa-decimal 0x100-- -!! [ValueError] Red component is out of range, must be between 0 and 255 (inclusive) -!! [ValueError] Red component is out of range, must be between 0 and 255 (inclusive) -!! [ValueError] Green component is out of range, must be between 0 and 255 (inclusive) -!! [ValueError] Green component is out of range, must be between 0 and 255 (inclusive) -!! [ValueError] Blue component is out of range, must be between 0 and 255 (inclusive) -!! [ValueError] Blue component is out of range, must be between 0 and 255 (inclusive) +!! [ValueError] imagecolorallocate(): Argument #2 ($red) must be between 0 and 255 (inclusive) +!! [ValueError] imagecolorallocate(): Argument #2 ($red) must be between 0 and 255 (inclusive) +!! [ValueError] imagecolorallocate(): Argument #3 ($green) must be between 0 and 255 (inclusive) +!! [ValueError] imagecolorallocate(): Argument #3 ($green) must be between 0 and 255 (inclusive) +!! [ValueError] imagecolorallocate(): Argument #4 ($blue) must be between 0 and 255 (inclusive) +!! [ValueError] imagecolorallocate(): Argument #4 ($blue) must be between 0 and 255 (inclusive) diff --git a/ext/gd/tests/imagecolordeallocate_error3.phpt b/ext/gd/tests/imagecolordeallocate_error3.phpt index e0748c44baa7a..51df328f8c835 100644 --- a/ext/gd/tests/imagecolordeallocate_error3.phpt +++ b/ext/gd/tests/imagecolordeallocate_error3.phpt @@ -22,4 +22,4 @@ trycatch_dump( ?> --EXPECT-- -!! [ValueError] Color index 101 out of range +!! [ValueError] imagecolordeallocate(): Argument #2 ($index) must be between 0 and 1 diff --git a/ext/gd/tests/imagecolordeallocate_error4.phpt b/ext/gd/tests/imagecolordeallocate_error4.phpt index e35c529879fb3..6d9bceb3ac91f 100644 --- a/ext/gd/tests/imagecolordeallocate_error4.phpt +++ b/ext/gd/tests/imagecolordeallocate_error4.phpt @@ -22,4 +22,4 @@ trycatch_dump( ?> --EXPECT-- -!! [ValueError] Color index -1 out of range +!! [ValueError] imagecolordeallocate(): Argument #2 ($index) must be between 0 and 1 diff --git a/ext/gd/tests/imageconvolution_error2.phpt b/ext/gd/tests/imageconvolution_error2.phpt index d26851c26cf19..b9c32af1e4408 100644 --- a/ext/gd/tests/imageconvolution_error2.phpt +++ b/ext/gd/tests/imageconvolution_error2.phpt @@ -27,4 +27,4 @@ trycatch_dump( ?> --EXPECT-- -!! [ValueError] Convolution matrix must be a 3x3 array +!! [ValueError] imageconvolution(): Argument #2 ($matrix3x3) must be a 3x3 array diff --git a/ext/gd/tests/imageconvolution_error3.phpt b/ext/gd/tests/imageconvolution_error3.phpt index 8974fdbda0f29..2ad99f961782e 100644 --- a/ext/gd/tests/imageconvolution_error3.phpt +++ b/ext/gd/tests/imageconvolution_error3.phpt @@ -35,5 +35,5 @@ trycatch_dump( ?> --EXPECT-- -!! [ValueError] Convolution matrix must be a 3x3 array, matrix[2] only has 2 elements -!! [ValueError] Convolution matrix must be a 3x3 array, matrix[2][2] cannot be found (missing integer key) +!! [ValueError] imageconvolution(): Argument #2 ($matrix3x3) must be a 3x3 array, matrix[2] only has 2 elements +!! [ValueError] imageconvolution(): Argument #2 ($matrix3x3) must be a 3x3 array, matrix[2][2] cannot be found (missing integer key) diff --git a/ext/gd/tests/imagecreate_error.phpt b/ext/gd/tests/imagecreate_error.phpt index 9fd8679c135a4..b0b6c3abf7e94 100644 --- a/ext/gd/tests/imagecreate_error.phpt +++ b/ext/gd/tests/imagecreate_error.phpt @@ -17,5 +17,5 @@ trycatch_dump( ?> --EXPECT-- -!! [ValueError] Invalid width (x_size) -!! [ValueError] Invalid height (y_size) +!! [ValueError] imagecreate(): Argument #1 ($x_size) must be greater than 0 +!! [ValueError] imagecreate(): Argument #2 ($y_size) must be greater than 0 diff --git a/ext/gd/tests/imagecreatetruecolor_error2.phpt b/ext/gd/tests/imagecreatetruecolor_error2.phpt index e2784b15307ff..995aa03d7ed02 100644 --- a/ext/gd/tests/imagecreatetruecolor_error2.phpt +++ b/ext/gd/tests/imagecreatetruecolor_error2.phpt @@ -19,5 +19,5 @@ trycatch_dump( ?> --EXPECT-- -!! [ValueError] Invalid width (x_size) -!! [ValueError] Invalid height (y_size) +!! [ValueError] imagecreatetruecolor(): Argument #1 ($x_size) must be greater than 0 +!! [ValueError] imagecreatetruecolor(): Argument #2 ($y_size) must be greater than 0 diff --git a/ext/gd/tests/imagetruecolortopalette_error3.phpt b/ext/gd/tests/imagetruecolortopalette_error3.phpt index 40dc30611662f..707f7e37bce14 100644 --- a/ext/gd/tests/imagetruecolortopalette_error3.phpt +++ b/ext/gd/tests/imagetruecolortopalette_error3.phpt @@ -19,4 +19,4 @@ trycatch_dump( ?> --EXPECT-- -!! [ValueError] Number of colors has to be greater than zero and no more than 2147483647 +!! [ValueError] imagetruecolortopalette(): Argument #3 ($colorWanted) must be greater than 0 and less than 2147483647 diff --git a/ext/gd/tests/imagetruecolortopalette_error4.phpt b/ext/gd/tests/imagetruecolortopalette_error4.phpt index 055fc657b2ba1..5726befab25a3 100644 --- a/ext/gd/tests/imagetruecolortopalette_error4.phpt +++ b/ext/gd/tests/imagetruecolortopalette_error4.phpt @@ -20,5 +20,5 @@ trycatch_dump( ?> --EXPECT-- -!! [ValueError] Number of colors has to be greater than zero and no more than 2147483647 -!! [ValueError] Number of colors has to be greater than zero and no more than 2147483647 +!! [ValueError] imagetruecolortopalette(): Argument #3 ($colorWanted) must be greater than 0 and less than 2147483647 +!! [ValueError] imagetruecolortopalette(): Argument #3 ($colorWanted) must be greater than 0 and less than 2147483647 diff --git a/ext/json/json.c b/ext/json/json.c index b78de3ea16bc3..c64378fd565de 100644 --- a/ext/json/json.c +++ b/ext/json/json.c @@ -299,12 +299,12 @@ PHP_FUNCTION(json_decode) } if (depth <= 0) { - zend_value_error("Depth must be greater than zero"); + zend_argument_value_error(3, "must be greater than 0"); RETURN_THROWS(); } if (depth > INT_MAX) { - zend_value_error("Depth must be lower than %d", INT_MAX); + zend_argument_value_error(3, "must be less than %d", INT_MAX); RETURN_THROWS(); } diff --git a/ext/json/tests/bug72787.phpt b/ext/json/tests/bug72787.phpt index d2d1f8017716d..48983b0fb7055 100644 --- a/ext/json/tests/bug72787.phpt +++ b/ext/json/tests/bug72787.phpt @@ -14,4 +14,4 @@ try { ?> --EXPECTF-- -Depth must be lower than %d +json_decode(): Argument #3 ($depth) must be less than %d diff --git a/ext/json/tests/json_decode_error.phpt b/ext/json/tests/json_decode_error.phpt index b286df8e74469..36d86168cd2da 100644 --- a/ext/json/tests/json_decode_error.phpt +++ b/ext/json/tests/json_decode_error.phpt @@ -19,4 +19,4 @@ try { *** Testing json_decode() : error conditions *** -- Testing json_decode() function with depth below 0 -- -Depth must be greater than zero +json_decode(): Argument #3 ($depth) must be greater than 0 diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c index 0d5fc6de081a5..18dddd962d17f 100644 --- a/ext/sqlite3/sqlite3.c +++ b/ext/sqlite3/sqlite3.c @@ -1299,7 +1299,7 @@ PHP_METHOD(sqlite3, openBlob) } if (ZEND_NUM_ARGS() >= 4 && CHECK_NULL_PATH(dbname, dbname_len)) { - zend_value_error("dbname must not contain null bytes"); + zend_argument_type_error(4, "must not contain null bytes"); RETURN_THROWS(); } @@ -1405,10 +1405,13 @@ PHP_METHOD(sqlite3, backup) RETURN_THROWS(); } - if ((ZEND_NUM_ARGS() >= 2 && CHECK_NULL_PATH(source_dbname, source_dbname_length)) - || (ZEND_NUM_ARGS() >= 3 && CHECK_NULL_PATH(destination_dbname, destination_dbname_length)) - ) { - zend_value_error("dbname must not contain null bytes"); + if (ZEND_NUM_ARGS() >= 2 && CHECK_NULL_PATH(source_dbname, source_dbname_length)) { + zend_argument_type_error(2, "must not contain null bytes"); + RETURN_THROWS(); + } + + if (ZEND_NUM_ARGS() >= 3 && CHECK_NULL_PATH(destination_dbname, destination_dbname_length)) { + zend_argument_type_error(3, "must not contain null bytes"); RETURN_THROWS(); } diff --git a/ext/standard/array.c b/ext/standard/array.c index 17c7f29d9a31d..daecdc7a52e32 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -704,7 +704,7 @@ PHP_FUNCTION(count) ZEND_PARSE_PARAMETERS_END(); if (mode != COUNT_NORMAL && mode != COUNT_RECURSIVE) { - zend_value_error("Mode value is invalid"); + zend_argument_value_error(2, "must be a valid mode"); RETURN_THROWS(); } @@ -2385,12 +2385,12 @@ PHP_FUNCTION(extract) extract_type &= 0xff; if (extract_type < EXTR_OVERWRITE || extract_type > EXTR_IF_EXISTS) { - zend_value_error("Invalid extract type"); + zend_argument_value_error(2, "must be a valid extract type"); RETURN_THROWS(); } if (extract_type > EXTR_SKIP && extract_type <= EXTR_PREFIX_IF_EXISTS && ZEND_NUM_ARGS() < 3) { - zend_value_error("Specified extract type requires the prefix parameter"); + zend_argument_value_error(3, "is required when using this extract type"); RETURN_THROWS(); } diff --git a/ext/standard/assert.c b/ext/standard/assert.c index 1995ec1da8b6c..b039c169afdd1 100644 --- a/ext/standard/assert.c +++ b/ext/standard/assert.c @@ -314,7 +314,7 @@ PHP_FUNCTION(assert_options) break; default: - zend_value_error("Unknown value " ZEND_LONG_FMT, what); + zend_argument_value_error(1, "must have a valid value"); break; } diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index d99b7fb498603..8596ce4a507f1 100755 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -850,7 +850,7 @@ PHP_FUNCTION(putenv) ZEND_PARSE_PARAMETERS_END(); if (setting_len == 0 || setting[0] == '=') { - zend_value_error("Invalid parameter syntax"); + zend_argument_value_error(1, "must have a valid syntax"); RETURN_THROWS(); } diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 535c536b72a85..0eaadac3e49a8 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -559,7 +559,7 @@ PHP_FUNCTION(scandir) ZEND_PARSE_PARAMETERS_END(); if (dirn_len < 1) { - zend_value_error("Directory name cannot be empty"); + zend_argument_value_error(1, "cannot be empty"); RETURN_THROWS(); } diff --git a/ext/standard/dns.c b/ext/standard/dns.c index c566f4e6ae4ab..c6160aa9e6ff5 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -381,7 +381,7 @@ PHP_FUNCTION(dns_check_record) ZEND_PARSE_PARAMETERS_END(); if (hostname_len == 0) { - zend_value_error("Host cannot be empty"); + zend_argument_value_error(1, "cannot be empty"); RETURN_THROWS(); } diff --git a/ext/standard/dns_win32.c b/ext/standard/dns_win32.c index b1cf4986fda15..4572a84b0505e 100644 --- a/ext/standard/dns_win32.c +++ b/ext/standard/dns_win32.c @@ -107,7 +107,7 @@ PHP_FUNCTION(dns_check_record) } if (hostname_len == 0) { - zend_value_error("Host cannot be empty"); + zend_argument_value_error(1, "cannot be empty"); RETURN_THROWS(); } diff --git a/ext/standard/file.c b/ext/standard/file.c index 7639b201112bf..5cde0ef978152 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -742,7 +742,7 @@ PHP_FUNCTION(file) ZEND_PARSE_PARAMETERS_END(); if (flags < 0 || flags > (PHP_FILE_USE_INCLUDE_PATH | PHP_FILE_IGNORE_NEW_LINES | PHP_FILE_SKIP_EMPTY_LINES | PHP_FILE_NO_DEFAULT_CONTEXT)) { - zend_value_error("'" ZEND_LONG_FMT "' flag is not supported", flags); + zend_argument_value_error(2, "must be a valid flag value"); RETURN_THROWS(); } @@ -1492,7 +1492,7 @@ PHP_FUNCTION(ftruncate) ZEND_PARSE_PARAMETERS_END(); if (size < 0) { - zend_value_error("Negative size is not supported"); + zend_argument_value_error(2, "must be greater than or equal to 0"); RETURN_THROWS(); } diff --git a/ext/standard/tests/array/count_invalid_mode.phpt b/ext/standard/tests/array/count_invalid_mode.phpt index 6e302fd0ce9a8..a411a2983ed5b 100644 --- a/ext/standard/tests/array/count_invalid_mode.phpt +++ b/ext/standard/tests/array/count_invalid_mode.phpt @@ -29,9 +29,9 @@ int(0) int(0) int(0) int(0) -Mode value is invalid -Mode value is invalid -Mode value is invalid +count(): Argument #2 ($mode) must be a valid mode +count(): Argument #2 ($mode) must be a valid mode +count(): Argument #2 ($mode) must be a valid mode int(0) int(0) int(0) diff --git a/ext/standard/tests/array/extract_error.phpt b/ext/standard/tests/array/extract_error.phpt index db6569e94c480..40f517fb4d7ed 100644 --- a/ext/standard/tests/array/extract_error.phpt +++ b/ext/standard/tests/array/extract_error.phpt @@ -33,6 +33,6 @@ try { *** Testing Error Conditions *** Notice: A non well formed numeric value encountered in %s on line %d -Invalid extract type -Invalid extract type -Specified extract type requires the prefix parameter +extract(): Argument #2 ($extract_type) must be a valid extract type +extract(): Argument #2 ($extract_type) must be a valid extract type +extract(): Argument #3 ($prefix) is required when using this extract type diff --git a/ext/standard/tests/assert/assert_options_error.phpt b/ext/standard/tests/assert/assert_options_error.phpt index ed94260ef832e..ba92867737307 100644 --- a/ext/standard/tests/assert/assert_options_error.phpt +++ b/ext/standard/tests/assert/assert_options_error.phpt @@ -10,4 +10,4 @@ try { } ?> --EXPECT-- -Unknown value 1000 +assert_options(): Argument #1 ($what) must have a valid value diff --git a/ext/standard/tests/dir/bug41693.phpt b/ext/standard/tests/dir/bug41693.phpt index 2f9fcabb9addc..2c779bedcd41f 100644 --- a/ext/standard/tests/dir/bug41693.phpt +++ b/ext/standard/tests/dir/bug41693.phpt @@ -11,4 +11,4 @@ try { ?> --EXPECT-- -Directory name cannot be empty +scandir(): Argument #1 ($directory) cannot be empty diff --git a/ext/standard/tests/file/bug71882.phpt b/ext/standard/tests/file/bug71882.phpt index 7d3b911109b97..68f98f19b6a84 100644 --- a/ext/standard/tests/file/bug71882.phpt +++ b/ext/standard/tests/file/bug71882.phpt @@ -10,4 +10,4 @@ try { } ?> --EXPECT-- -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 diff --git a/ext/standard/tests/file/file_variation6.phpt b/ext/standard/tests/file/file_variation6.phpt index e5d8b6d51a0d0..354f6ee509c7b 100644 --- a/ext/standard/tests/file/file_variation6.phpt +++ b/ext/standard/tests/file/file_variation6.phpt @@ -236,12 +236,12 @@ array(3) { [2]=> string(6) "Line 3" } -'24' flag is not supported -'25' flag is not supported -'26' flag is not supported -'27' flag is not supported -'28' flag is not supported -'29' flag is not supported -'30' flag is not supported -'31' flag is not supported -'32' flag is not supported \ No newline at end of file +file(): Argument #2 ($flags) must be a valid flag value +file(): Argument #2 ($flags) must be a valid flag value +file(): Argument #2 ($flags) must be a valid flag value +file(): Argument #2 ($flags) must be a valid flag value +file(): Argument #2 ($flags) must be a valid flag value +file(): Argument #2 ($flags) must be a valid flag value +file(): Argument #2 ($flags) must be a valid flag value +file(): Argument #2 ($flags) must be a valid flag value +file(): Argument #2 ($flags) must be a valid flag value diff --git a/ext/standard/tests/file/filesize_variation3.phpt b/ext/standard/tests/file/filesize_variation3.phpt index 74790e687c510..7006740e4c34b 100644 --- a/ext/standard/tests/file/filesize_variation3.phpt +++ b/ext/standard/tests/file/filesize_variation3.phpt @@ -63,5 +63,5 @@ bool(true) int(1200) bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) diff --git a/ext/standard/tests/file/ftruncate.phpt b/ext/standard/tests/file/ftruncate.phpt index d5d883b1a1b310db179a79d16a4ceb2100bb6fd4..757bbb733d03a86ac8d5c74752a8b6dd82517a49 100644 GIT binary patch delta 96 zcmey)F`IM466VQEnJ4(Al@yicB`21oYG_(1I2NUs=BDPAC@32#Xs8rtR;6kx&wh!h}l delta 48 zcmbQu`JH3K5@trX$xE0g$oZwFCzfQEr79F>R;4Or7AxfCmnamM78K+cm87OjE@x2z E0J>-q-2eap diff --git a/ext/standard/tests/file/ftruncate_variation4.phpt b/ext/standard/tests/file/ftruncate_variation4.phpt index 95ae439b4db1c..87fc7b3524fda 100644 --- a/ext/standard/tests/file/ftruncate_variation4.phpt +++ b/ext/standard/tests/file/ftruncate_variation4.phpt @@ -77,7 +77,7 @@ echo "Done\n"; -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -85,7 +85,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -93,7 +93,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -101,7 +101,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -109,7 +109,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -117,7 +117,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -125,7 +125,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -133,7 +133,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -141,7 +141,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -149,7 +149,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -157,7 +157,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -165,7 +165,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -173,7 +173,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -181,7 +181,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -189,7 +189,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -197,7 +197,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -205,7 +205,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -213,7 +213,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -221,7 +221,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -229,7 +229,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -237,7 +237,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -245,7 +245,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -253,7 +253,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -261,7 +261,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -271,7 +271,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -279,7 +279,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -287,7 +287,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -295,7 +295,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -303,7 +303,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -311,7 +311,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -319,7 +319,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -327,7 +327,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -335,7 +335,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -343,7 +343,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -351,7 +351,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -359,7 +359,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -367,7 +367,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -375,7 +375,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -383,7 +383,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -391,7 +391,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -399,7 +399,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -407,7 +407,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -415,7 +415,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -423,7 +423,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -431,7 +431,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -439,7 +439,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -447,7 +447,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) @@ -455,7 +455,7 @@ bool(true) -- Testing ftruncate(): try truncating file to a negative size -- bool(true) int(0) -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 int(0) bool(false) bool(true) diff --git a/ext/standard/tests/file/userstreams_005.phpt b/ext/standard/tests/file/userstreams_005.phpt index 5650df2aa01a9..e553e1c8eeb71 100644 --- a/ext/standard/tests/file/userstreams_005.phpt +++ b/ext/standard/tests/file/userstreams_005.phpt @@ -59,7 +59,7 @@ bool(true) truncation with new_size=10 bool(true) ------ stream_truncate negative size: ------- -Negative size is not supported +ftruncate(): Argument #2 ($size) must be greater than or equal to 0 ------ stream_truncate bad return: ------- truncation with new_size=0 diff --git a/ext/standard/tests/general_functions/putenv.phpt b/ext/standard/tests/general_functions/putenv.phpt index c1f4f98eeb565..163fa7e4a708e 100644 --- a/ext/standard/tests/general_functions/putenv.phpt +++ b/ext/standard/tests/general_functions/putenv.phpt @@ -29,7 +29,7 @@ try { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- bool(false) bool(true) string(5) "value" @@ -37,6 +37,6 @@ bool(true) string(0) "" bool(true) bool(false) -Invalid parameter syntax -Invalid parameter syntax +putenv(): Argument #1 ($setting) must have a valid syntax +putenv(): Argument #1 ($setting) must have a valid syntax Done diff --git a/ext/standard/tests/network/bug41347.phpt b/ext/standard/tests/network/bug41347.phpt index 6390327a52bef..626561976b845 100644 --- a/ext/standard/tests/network/bug41347.phpt +++ b/ext/standard/tests/network/bug41347.phpt @@ -9,4 +9,4 @@ try { } ?> --EXPECT-- -Host cannot be empty +dns_check_record(): Argument #1 ($hostname) cannot be empty From 9cb32640afb23626920f3e31439310cb83e68550 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 6 Apr 2020 10:51:10 +0200 Subject: [PATCH 046/338] Clean up constructor handling in com_dotnet We substitute the construction magic with standard constructors, move the ZPP checks to the beginning of the ctors, and also let the function entries be generated from the stubs. --- ext/com_dotnet/com_com.c | 8 +-- ext/com_dotnet/com_dotnet.c | 16 ++--- ext/com_dotnet/com_extension.c | 54 +++++--------- ext/com_dotnet/com_extension.stub.php | 20 ++++++ ext/com_dotnet/com_extension_arginfo.h | 92 ++++++++++++++++++++++++ ext/com_dotnet/com_handlers.c | 34 +-------- ext/com_dotnet/com_variant.c | 8 +-- ext/com_dotnet/php_com_dotnet_internal.h | 38 +--------- ext/com_dotnet/tests/bug73679.phpt | 2 +- 9 files changed, 149 insertions(+), 123 deletions(-) diff --git a/ext/com_dotnet/com_com.c b/ext/com_dotnet/com_com.c index 58c7f7b96347c..768e3a11692c0 100644 --- a/ext/com_dotnet/com_com.c +++ b/ext/com_dotnet/com_com.c @@ -26,7 +26,7 @@ #include "Zend/zend_exceptions.h" /* {{{ com_create_instance - ctor for COM class */ -PHP_FUNCTION(com_create_instance) +PHP_METHOD(com, __construct) { zval *object = getThis(); zval *server_params = NULL; @@ -51,9 +51,6 @@ PHP_FUNCTION(com_create_instance) zend_long cp = GetACP(); const struct php_win32_cp *cp_it; - php_com_initialize(); - obj = CDNO_FETCH(object); - if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "s|s!ls", &module_name, &module_name_len, &server_name, &server_name_len, @@ -65,6 +62,9 @@ PHP_FUNCTION(com_create_instance) RETURN_THROWS(); } + php_com_initialize(); + obj = CDNO_FETCH(object); + cp_it = php_win32_cp_get_by_id((DWORD)cp); if (!cp_it) { php_com_throw_exception(E_INVALIDARG, "Could not create COM object - invalid codepage!"); diff --git a/ext/com_dotnet/com_dotnet.c b/ext/com_dotnet/com_dotnet.c index bee7116fc3d1d..6bd492ef1d9b9 100644 --- a/ext/com_dotnet/com_dotnet.c +++ b/ext/com_dotnet/com_dotnet.c @@ -179,7 +179,7 @@ static HRESULT dotnet_init(char **p_where) } /* {{{ com_dotnet_create_instance - ctor for DOTNET class */ -PHP_FUNCTION(com_dotnet_create_instance) +PHP_METHOD(dotnet, __construct) { zval *object = getThis(); php_com_dotnet_object *obj; @@ -195,6 +195,13 @@ PHP_FUNCTION(com_dotnet_create_instance) zend_long cp = GetACP(); const struct php_win32_cp *cp_it; + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", + &assembly_name, &assembly_name_len, + &datatype_name, &datatype_name_len, + &cp)) { + RETURN_THROWS(); + } + php_com_initialize(); stuff = (struct dotnet_runtime_stuff*)COMG(dotnet_runtime_stuff); if (stuff == NULL) { @@ -237,13 +244,6 @@ PHP_FUNCTION(com_dotnet_create_instance) obj = CDNO_FETCH(object); - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", - &assembly_name, &assembly_name_len, - &datatype_name, &datatype_name_len, - &cp)) { - RETURN_THROWS(); - } - cp_it = php_win32_cp_get_by_id((DWORD)cp); if (!cp_it) { php_com_throw_exception(E_INVALIDARG, "Could not create .Net object - invalid codepage!"); diff --git a/ext/com_dotnet/com_extension.c b/ext/com_dotnet/com_extension.c index 1353f48cb4e72..b37e4b8ffe12f 100644 --- a/ext/com_dotnet/com_extension.c +++ b/ext/com_dotnet/com_extension.c @@ -37,40 +37,18 @@ zend_class_entry *php_com_exception_class_entry, *php_com_saproxy_class_entry; -static const zend_function_entry com_dotnet_functions[] = { - PHP_FE(variant_set, arginfo_variant_set) - PHP_FE(variant_add, arginfo_variant_add) - PHP_FE(variant_cat, arginfo_variant_add) - PHP_FE(variant_sub, arginfo_variant_add) - PHP_FE(variant_mul, arginfo_variant_add) - PHP_FE(variant_and, arginfo_variant_add) - PHP_FE(variant_div, arginfo_variant_add) - PHP_FE(variant_eqv, arginfo_variant_add) - PHP_FE(variant_idiv, arginfo_variant_add) - PHP_FE(variant_imp, arginfo_variant_add) - PHP_FE(variant_mod, arginfo_variant_add) - PHP_FE(variant_or, arginfo_variant_add) - PHP_FE(variant_pow, arginfo_variant_add) - PHP_FE(variant_xor, arginfo_variant_add) - PHP_FE(variant_abs, arginfo_variant_abs) - PHP_FE(variant_fix, arginfo_variant_fix) - PHP_FE(variant_int, arginfo_variant_int) - PHP_FE(variant_neg, arginfo_variant_neg) - PHP_FE(variant_not, arginfo_variant_not) - PHP_FE(variant_round, arginfo_variant_round) - PHP_FE(variant_cmp, arginfo_variant_cmp) - PHP_FE(variant_date_to_timestamp, arginfo_variant_date_to_timestamp) - PHP_FE(variant_date_from_timestamp, arginfo_variant_date_from_timestamp) - PHP_FE(variant_get_type, arginfo_variant_get_type) - PHP_FE(variant_set_type, arginfo_variant_set_type) - PHP_FE(variant_cast, arginfo_variant_cast) - /* com_com.c */ - PHP_FE(com_create_guid, arginfo_com_create_guid) - PHP_FE(com_event_sink, arginfo_com_event_sink) - PHP_FE(com_print_typeinfo, arginfo_com_print_typeinfo) - PHP_FE(com_message_pump, arginfo_com_message_pump) - PHP_FE(com_load_typelib, arginfo_com_load_typelib) - PHP_FE(com_get_active_object, arginfo_com_get_active_object) +static const zend_function_entry com_variant_funcs[] = { + PHP_ME(variant, __construct, arginfo_class_variant___construct, ZEND_ACC_PUBLIC) + PHP_FE_END +}; + +static const zend_function_entry com_com_funcs[] = { + PHP_ME(com, __construct, arginfo_class_com___construct, ZEND_ACC_PUBLIC) + PHP_FE_END +}; + +static const zend_function_entry com_dotnet_funcs[] = { + PHP_ME(dotnet, __construct, arginfo_class_dotnet___construct, ZEND_ACC_PUBLIC) PHP_FE_END }; @@ -79,7 +57,7 @@ static const zend_function_entry com_dotnet_functions[] = { zend_module_entry com_dotnet_module_entry = { STANDARD_MODULE_HEADER, "com_dotnet", - com_dotnet_functions, + ext_functions, PHP_MINIT(com_dotnet), PHP_MSHUTDOWN(com_dotnet), PHP_RINIT(com_dotnet), @@ -218,14 +196,14 @@ PHP_MINIT_FUNCTION(com_dotnet) /* php_com_saproxy_class_entry->constructor->common.fn_flags |= ZEND_ACC_PROTECTED; */ php_com_saproxy_class_entry->get_iterator = php_com_saproxy_iter_get; - INIT_CLASS_ENTRY(ce, "variant", NULL); + INIT_CLASS_ENTRY(ce, "variant", com_variant_funcs); ce.create_object = php_com_object_new; php_com_variant_class_entry = zend_register_internal_class(&ce); php_com_variant_class_entry->get_iterator = php_com_iter_get; php_com_variant_class_entry->serialize = zend_class_serialize_deny; php_com_variant_class_entry->unserialize = zend_class_unserialize_deny; - INIT_CLASS_ENTRY(ce, "com", NULL); + INIT_CLASS_ENTRY(ce, "com", com_com_funcs); ce.create_object = php_com_object_new; tmp = zend_register_internal_class_ex(&ce, php_com_variant_class_entry); tmp->get_iterator = php_com_iter_get; @@ -233,7 +211,7 @@ PHP_MINIT_FUNCTION(com_dotnet) tmp->unserialize = zend_class_unserialize_deny; #if HAVE_MSCOREE_H - INIT_CLASS_ENTRY(ce, "dotnet", NULL); + INIT_CLASS_ENTRY(ce, "dotnet", com_dotnet_funcs); ce.create_object = php_com_object_new; tmp = zend_register_internal_class_ex(&ce, php_com_variant_class_entry); tmp->get_iterator = php_com_iter_get; diff --git a/ext/com_dotnet/com_extension.stub.php b/ext/com_dotnet/com_extension.stub.php index 8e065fb2bafd2..fe35e17c42c27 100644 --- a/ext/com_dotnet/com_extension.stub.php +++ b/ext/com_dotnet/com_extension.stub.php @@ -1,5 +1,7 @@ ce->name; \ - f.scope = obj->ce; \ - f.arg_info = NULL; \ - f.num_args = 0; \ - f.fn_flags = 0; \ - f.handler = ZEND_FN(fn); \ - return (zend_function*)&f; - - switch (obj->ce->name->val[0]) { -#if HAVE_MSCOREE_H - case 'd': - POPULATE_CTOR(d, com_dotnet_create_instance); -#endif - - case 'c': - POPULATE_CTOR(c, com_create_instance); - - case 'v': - POPULATE_CTOR(v, com_variant_create_instance); - - default: - return NULL; - } -} - static zend_string* com_class_name_get(const zend_object *object) { php_com_dotnet_object *obj = (php_com_dotnet_object *)object; @@ -553,7 +521,7 @@ zend_object_handlers php_com_object_handlers = { com_dimension_delete, com_properties_get, com_method_get, - com_constructor_get, + zend_std_get_constructor, com_class_name_get, com_object_cast, com_object_count, diff --git a/ext/com_dotnet/com_variant.c b/ext/com_dotnet/com_variant.c index bc4c7950e04a0..72cf16b9e3b5d 100644 --- a/ext/com_dotnet/com_variant.c +++ b/ext/com_dotnet/com_variant.c @@ -425,14 +425,14 @@ PHP_COM_DOTNET_API int php_com_copy_variant(VARIANT *dstvar, VARIANT *srcvar) return php_com_copy_variant(V_VARIANTREF(dstvar), srcvar); default: - php_error_docref(NULL, E_WARNING, "variant->variant: failed to copy from 0x%x to 0x%x", V_VT(dstvar), V_VT(srcvar)); + php_error_docref(NULL, E_WARNING, "variant->__construct: failed to copy from 0x%x to 0x%x", V_VT(dstvar), V_VT(srcvar)); ret = FAILURE; } return ret; } /* {{{ com_variant_create_instance - ctor for new VARIANT() */ -PHP_FUNCTION(com_variant_create_instance) +PHP_METHOD(variant, __construct) { /* VARTYPE == unsigned short */ zend_long vt = VT_EMPTY; zend_long codepage = CP_ACP; @@ -446,14 +446,14 @@ PHP_FUNCTION(com_variant_create_instance) return; } - obj = CDNO_FETCH(object); - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "z!|ll", &zvalue, &vt, &codepage)) { RETURN_THROWS(); } php_com_initialize(); + obj = CDNO_FETCH(object); + if (ZEND_NUM_ARGS() == 3) { obj->code_page = (int)codepage; } diff --git a/ext/com_dotnet/php_com_dotnet_internal.h b/ext/com_dotnet/php_com_dotnet_internal.h index 3ee7ec4eba022..8521277083f94 100644 --- a/ext/com_dotnet/php_com_dotnet_internal.h +++ b/ext/com_dotnet/php_com_dotnet_internal.h @@ -87,13 +87,7 @@ PHP_COM_DOTNET_API OLECHAR *php_com_string_to_olestring(char *string, /* com_com.c */ -PHP_FUNCTION(com_create_instance); -PHP_FUNCTION(com_event_sink); -PHP_FUNCTION(com_create_guid); -PHP_FUNCTION(com_print_typeinfo); -PHP_FUNCTION(com_message_pump); -PHP_FUNCTION(com_load_typelib); -PHP_FUNCTION(com_get_active_object); +PHP_METHOD(com, __construct); HRESULT php_com_invoke_helper(php_com_dotnet_object *obj, DISPID id_member, WORD flags, DISPPARAMS *disp_params, VARIANT *v, int silent, int allow_noarg); @@ -115,33 +109,7 @@ PHP_COM_DOTNET_API IDispatch *php_com_wrapper_export(zval *val); int php_com_persist_minit(INIT_FUNC_ARGS); /* com_variant.c */ -PHP_FUNCTION(com_variant_create_instance); -PHP_FUNCTION(variant_set); -PHP_FUNCTION(variant_add); -PHP_FUNCTION(variant_cat); -PHP_FUNCTION(variant_sub); -PHP_FUNCTION(variant_mul); -PHP_FUNCTION(variant_and); -PHP_FUNCTION(variant_div); -PHP_FUNCTION(variant_eqv); -PHP_FUNCTION(variant_idiv); -PHP_FUNCTION(variant_imp); -PHP_FUNCTION(variant_mod); -PHP_FUNCTION(variant_or); -PHP_FUNCTION(variant_pow); -PHP_FUNCTION(variant_xor); -PHP_FUNCTION(variant_abs); -PHP_FUNCTION(variant_fix); -PHP_FUNCTION(variant_int); -PHP_FUNCTION(variant_neg); -PHP_FUNCTION(variant_not); -PHP_FUNCTION(variant_round); -PHP_FUNCTION(variant_cmp); -PHP_FUNCTION(variant_date_to_timestamp); -PHP_FUNCTION(variant_date_from_timestamp); -PHP_FUNCTION(variant_get_type); -PHP_FUNCTION(variant_set_type); -PHP_FUNCTION(variant_cast); +PHP_METHOD(variant, __construct); PHP_COM_DOTNET_API void php_com_variant_from_zval_with_type(VARIANT *v, zval *z, VARTYPE type, int codepage); PHP_COM_DOTNET_API void php_com_variant_from_zval(VARIANT *v, zval *z, int codepage); @@ -149,7 +117,7 @@ PHP_COM_DOTNET_API int php_com_zval_from_variant(zval *z, VARIANT *v, int codepa PHP_COM_DOTNET_API int php_com_copy_variant(VARIANT *dst, VARIANT *src); /* com_dotnet.c */ -PHP_FUNCTION(com_dotnet_create_instance); +PHP_METHOD(dotnet, __construct); void php_com_dotnet_rshutdown(void); void php_com_dotnet_mshutdown(void); diff --git a/ext/com_dotnet/tests/bug73679.phpt b/ext/com_dotnet/tests/bug73679.phpt index 47de9b10c7f36..235fd3e33e16b 100644 --- a/ext/com_dotnet/tests/bug73679.phpt +++ b/ext/com_dotnet/tests/bug73679.phpt @@ -17,6 +17,6 @@ echo $stack->Pop() . $stack->Pop(); --EXPECTF-- Fatal error: Uncaught com_exception: Could not create .Net object - invalid codepage! in %sbug73679.php:%d Stack trace: -#0 %sbug73679.php(%d): dotnet->dotnet('mscorlib', 'System.Collecti...', -2200000000) +#0 %sbug73679.php(%d): dotnet->__construct('mscorlib', 'System.Collecti...', -2200000000) #1 {main} thrown in %sbug73679.php on line %d From 3e5fdef96ec213ab16ea9df16bd083338d0d1720 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 6 Apr 2020 11:41:44 +0200 Subject: [PATCH 047/338] Inline a ZEND_NUM_ARGS() variable --- ext/hash/hash.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ext/hash/hash.c b/ext/hash/hash.c index 27912bbd101a8..a0ab20e9431cf 100644 --- a/ext/hash/hash.c +++ b/ext/hash/hash.c @@ -346,12 +346,11 @@ PHP_FUNCTION(hash_init) { zend_string *algo, *key = NULL; zend_long options = 0; - int argc = ZEND_NUM_ARGS(); void *context; const php_hash_ops *ops; php_hashcontext_object *hash; - if (zend_parse_parameters(argc, "S|lS", &algo, &options, &key) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|lS", &algo, &options, &key) == FAILURE) { RETURN_THROWS(); } From 22a077b642815a2e1c36ba03df906146c9ecbe50 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 6 Apr 2020 11:02:15 +0200 Subject: [PATCH 048/338] Fix #69264: __debugInfo() ignored while extending SPL classes We actually implement `::__debugInfo()` and drop the `get_debug_info()` handlers of all relevant SPL classes. This is cleaner and gives more flexibility regarding overriding the functionality in descendant classes. --- NEWS | 3 + ext/spl/spl_array.c | 19 ++++-- ext/spl/spl_directory.c | 16 ++++-- ext/spl/spl_dllist.c | 15 ++++- ext/spl/spl_heap.c | 40 +++++++------ ext/spl/spl_observer.c | 24 +++++--- ext/spl/tests/bug69264.phpt | 112 ++++++++++++++++++++++++++++++++++++ 7 files changed, 193 insertions(+), 36 deletions(-) create mode 100644 ext/spl/tests/bug69264.phpt diff --git a/NEWS b/NEWS index 6bb51f88a1ad3..5959a0373fcc8 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,9 @@ PHP NEWS . Fixed bug #79441 (Segfault in mb_chr() if internal encoding is unsupported). (Girgias) +- SPL: + . Fixed bug #69264 (__debugInfo() ignored while extending SPL classes). (cmb) + ?? ??? ????, PHP 7.4.5 - Core: diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index 90861b49c68f0..3803055d3023c 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -822,7 +822,7 @@ static HashTable *spl_array_get_properties_for(zval *object, zend_prop_purpose p return ht; } /* }}} */ -static HashTable* spl_array_get_debug_info(zval *obj, int *is_temp) /* {{{ */ +static inline HashTable* spl_array_get_debug_info(zval *obj) /* {{{ */ { zval *storage; zend_string *zname; @@ -834,11 +834,9 @@ static HashTable* spl_array_get_debug_info(zval *obj, int *is_temp) /* {{{ */ } if (intern->ar_flags & SPL_ARRAY_IS_SELF) { - *is_temp = 0; - return intern->std.properties; + return zend_array_dup(intern->std.properties); } else { HashTable *debug_info; - *is_temp = 1; debug_info = zend_new_array(zend_hash_num_elements(intern->std.properties) + 1); zend_hash_copy(debug_info, intern->std.properties, (copy_ctor_func_t) zval_add_ref); @@ -1883,6 +1881,16 @@ SPL_METHOD(Array, __unserialize) } /* }}} */ +/* {{{ proto void Array::__debugInfo() */ +SPL_METHOD(Array, __debugInfo) +{ + if (zend_parse_parameters_none() == FAILURE) { + return; + } + + RETURN_ARR(spl_array_get_debug_info(getThis())); +} /* }}} */ + /* {{{ arginfo and function table */ ZEND_BEGIN_ARG_INFO_EX(arginfo_array___construct, 0, 0, 0) ZEND_ARG_INFO(0, input) @@ -1957,6 +1965,7 @@ static const zend_function_entry spl_funcs_ArrayObject[] = { SPL_ME(Array, serialize, arginfo_array_void, ZEND_ACC_PUBLIC) SPL_ME(Array, __unserialize, arginfo_array_unserialize, ZEND_ACC_PUBLIC) SPL_ME(Array, __serialize, arginfo_array_void, ZEND_ACC_PUBLIC) + SPL_ME(Array, __debugInfo, arginfo_array_void, ZEND_ACC_PUBLIC) /* ArrayObject specific */ SPL_ME(Array, getIterator, arginfo_array_void, ZEND_ACC_PUBLIC) SPL_ME(Array, exchangeArray, arginfo_array_exchangeArray, ZEND_ACC_PUBLIC) @@ -1986,6 +1995,7 @@ static const zend_function_entry spl_funcs_ArrayIterator[] = { SPL_ME(Array, serialize, arginfo_array_void, ZEND_ACC_PUBLIC) SPL_ME(Array, __unserialize, arginfo_array_unserialize, ZEND_ACC_PUBLIC) SPL_ME(Array, __serialize, arginfo_array_void, ZEND_ACC_PUBLIC) + SPL_ME(Array, __debugInfo, arginfo_array_void, ZEND_ACC_PUBLIC) /* ArrayIterator specific */ SPL_ME(Array, rewind, arginfo_array_void, ZEND_ACC_PUBLIC) SPL_ME(Array, current, arginfo_array_void, ZEND_ACC_PUBLIC) @@ -2023,7 +2033,6 @@ PHP_MINIT_FUNCTION(spl_array) spl_handler_ArrayObject.count_elements = spl_array_object_count_elements; spl_handler_ArrayObject.get_properties_for = spl_array_get_properties_for; - spl_handler_ArrayObject.get_debug_info = spl_array_get_debug_info; spl_handler_ArrayObject.get_gc = spl_array_get_gc; spl_handler_ArrayObject.read_property = spl_array_read_property; spl_handler_ArrayObject.write_property = spl_array_write_property; diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index d7995bd7fac7f..d42e6367c2f3e 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -598,7 +598,7 @@ static char *spl_filesystem_object_get_pathname(spl_filesystem_object *intern, s } /* }}} */ -static HashTable *spl_filesystem_object_get_debug_info(zval *object, int *is_temp) /* {{{ */ +static inline HashTable *spl_filesystem_object_get_debug_info(zval *object) /* {{{ */ { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(object); zval tmp; @@ -608,8 +608,6 @@ static HashTable *spl_filesystem_object_get_debug_info(zval *object, int *is_tem size_t path_len; char stmp[2]; - *is_temp = 1; - if (!intern->std.properties) { rebuild_object_properties(&intern->std); } @@ -1421,6 +1419,16 @@ SPL_METHOD(SplFileInfo, getPathInfo) } /* }}} */ +/* {{{ proto void SplFileInfo::__debugInfo() */ +SPL_METHOD(SplFileInfo, __debugInfo) +{ + if (zend_parse_parameters_none() == FAILURE) { + return; + } + + RETURN_ARR(spl_filesystem_object_get_debug_info(getThis())); +} /* }}} */ + /* {{{ proto SplFileInfo::_bad_state_ex(void) */ SPL_METHOD(SplFileInfo, _bad_state_ex) { @@ -1947,6 +1955,7 @@ static const zend_function_entry spl_SplFileInfo_functions[] = { SPL_ME(SplFileInfo, openFile, arginfo_info_openFile, ZEND_ACC_PUBLIC) SPL_ME(SplFileInfo, setFileClass, arginfo_info_optinalFileClass, ZEND_ACC_PUBLIC) SPL_ME(SplFileInfo, setInfoClass, arginfo_info_optinalFileClass, ZEND_ACC_PUBLIC) + SPL_ME(SplFileInfo, __debugInfo, arginfo_splfileinfo_void, ZEND_ACC_PUBLIC) SPL_ME(SplFileInfo, _bad_state_ex, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) SPL_MA(SplFileInfo, __toString, SplFileInfo, getPathname, arginfo_splfileinfo_void, ZEND_ACC_PUBLIC) PHP_FE_END @@ -3143,7 +3152,6 @@ PHP_MINIT_FUNCTION(spl_directory) spl_filesystem_object_handlers.offset = XtOffsetOf(spl_filesystem_object, std); spl_filesystem_object_handlers.clone_obj = spl_filesystem_object_clone; spl_filesystem_object_handlers.cast_object = spl_filesystem_object_cast; - spl_filesystem_object_handlers.get_debug_info = spl_filesystem_object_get_debug_info; spl_filesystem_object_handlers.dtor_obj = spl_filesystem_object_destroy_object; spl_filesystem_object_handlers.free_obj = spl_filesystem_object_free_storage; spl_ce_SplFileInfo->serialize = zend_class_serialize_deny; diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c index a0eb06a97aa49..ce5504da7e560 100644 --- a/ext/spl/spl_dllist.c +++ b/ext/spl/spl_dllist.c @@ -492,7 +492,7 @@ static int spl_dllist_object_count_elements(zval *object, zend_long *count) /* { } /* }}} */ -static HashTable* spl_dllist_object_get_debug_info(zval *obj, int *is_temp) /* {{{{ */ +static inline HashTable* spl_dllist_object_get_debug_info(zval *obj) /* {{{{ */ { spl_dllist_object *intern = Z_SPLDLLIST_P(obj); spl_ptr_llist_element *current = intern->llist->head, *next; @@ -500,7 +500,6 @@ static HashTable* spl_dllist_object_get_debug_info(zval *obj, int *is_temp) /* { zend_string *pnstr; int i = 0; HashTable *debug_info; - *is_temp = 1; if (!intern->std.properties) { rebuild_object_properties(&intern->std); @@ -1344,6 +1343,16 @@ SPL_METHOD(SplDoublyLinkedList, add) } } /* }}} */ +/* {{{ proto void SplDoublyLinkedList::__debugInfo() */ +SPL_METHOD(SplDoublyLinkedList, __debugInfo) +{ + if (zend_parse_parameters_none() == FAILURE) { + return; + } + + RETURN_ARR(spl_dllist_object_get_debug_info(getThis())); +} /* }}} */ + /* {{{ iterator handler table */ static const zend_object_iterator_funcs spl_dllist_it_funcs = { spl_dllist_it_dtor, @@ -1425,6 +1434,7 @@ static const zend_function_entry spl_funcs_SplDoublyLinkedList[] = { SPL_ME(SplDoublyLinkedList, isEmpty, arginfo_dllist_void, ZEND_ACC_PUBLIC) SPL_ME(SplDoublyLinkedList, setIteratorMode, arginfo_dllist_setiteratormode, ZEND_ACC_PUBLIC) SPL_ME(SplDoublyLinkedList, getIteratorMode, arginfo_dllist_void, ZEND_ACC_PUBLIC) + SPL_ME(SplDoublyLinkedList, __debugInfo, arginfo_dllist_void, ZEND_ACC_PUBLIC) /* Countable */ SPL_ME(SplDoublyLinkedList, count, arginfo_dllist_void, ZEND_ACC_PUBLIC) /* ArrayAccess */ @@ -1459,7 +1469,6 @@ PHP_MINIT_FUNCTION(spl_dllist) /* {{{ */ spl_handler_SplDoublyLinkedList.offset = XtOffsetOf(spl_dllist_object, std); spl_handler_SplDoublyLinkedList.clone_obj = spl_dllist_object_clone; spl_handler_SplDoublyLinkedList.count_elements = spl_dllist_object_count_elements; - spl_handler_SplDoublyLinkedList.get_debug_info = spl_dllist_object_get_debug_info; spl_handler_SplDoublyLinkedList.get_gc = spl_dllist_object_get_gc; spl_handler_SplDoublyLinkedList.dtor_obj = zend_objects_destroy_object; spl_handler_SplDoublyLinkedList.free_obj = spl_dllist_object_free_storage; diff --git a/ext/spl/spl_heap.c b/ext/spl/spl_heap.c index 8191c2901d6d7..4aea640c71ece 100644 --- a/ext/spl/spl_heap.c +++ b/ext/spl/spl_heap.c @@ -501,15 +501,13 @@ static int spl_heap_object_count_elements(zval *object, zend_long *count) /* {{{ } /* }}} */ -static HashTable* spl_heap_object_get_debug_info_helper(zend_class_entry *ce, zval *obj, int *is_temp) { /* {{{ */ +static inline HashTable* spl_heap_object_get_debug_info(zend_class_entry *ce, zval *obj) { /* {{{ */ spl_heap_object *intern = Z_SPLHEAP_P(obj); zval tmp, heap_array; zend_string *pnstr; HashTable *debug_info; int i; - *is_temp = 1; - if (!intern->std.properties) { rebuild_object_properties(&intern->std); } @@ -571,18 +569,6 @@ static HashTable *spl_pqueue_object_get_gc(zval *obj, zval **gc_data, int *gc_da } /* }}} */ -static HashTable* spl_heap_object_get_debug_info(zval *obj, int *is_temp) /* {{{ */ -{ - return spl_heap_object_get_debug_info_helper(spl_ce_SplHeap, obj, is_temp); -} -/* }}} */ - -static HashTable* spl_pqueue_object_get_debug_info(zval *obj, int *is_temp) /* {{{ */ -{ - return spl_heap_object_get_debug_info_helper(spl_ce_SplPriorityQueue, obj, is_temp); -} -/* }}} */ - /* {{{ proto int SplHeap::count() Return the number of elements in the heap. */ SPL_METHOD(SplHeap, count) @@ -1065,6 +1051,26 @@ SPL_METHOD(SplPriorityQueue, current) } /* }}} */ +/* {{{ proto void SplHeap::__debugInfo() */ +SPL_METHOD(SplHeap, __debugInfo) +{ + if (zend_parse_parameters_none() == FAILURE) { + return; + } + + RETURN_ARR(spl_heap_object_get_debug_info(spl_ce_SplHeap, getThis())); +} /* }}} */ + +/* {{{ proto void SplPriorityQueue::__debugInfo() */ +SPL_METHOD(SplPriorityQueue, __debugInfo) +{ + if (zend_parse_parameters_none() == FAILURE) { + return; + } + + RETURN_ARR(spl_heap_object_get_debug_info(spl_ce_SplPriorityQueue, getThis())); +} /* }}} */ + /* iterator handler table */ static const zend_object_iterator_funcs spl_heap_it_funcs = { spl_heap_it_dtor, @@ -1183,6 +1189,7 @@ static const zend_function_entry spl_funcs_SplPriorityQueue[] = { SPL_ME(SplHeap, valid, arginfo_splheap_void, ZEND_ACC_PUBLIC) SPL_ME(SplHeap, recoverFromCorruption, arginfo_splheap_void, ZEND_ACC_PUBLIC) SPL_ME(SplHeap, isCorrupted, arginfo_splheap_void, ZEND_ACC_PUBLIC) + SPL_ME(SplPriorityQueue, __debugInfo, arginfo_splheap_void, ZEND_ACC_PUBLIC) PHP_FE_END }; @@ -1199,6 +1206,7 @@ static const zend_function_entry spl_funcs_SplHeap[] = { SPL_ME(SplHeap, valid, arginfo_splheap_void, ZEND_ACC_PUBLIC) SPL_ME(SplHeap, recoverFromCorruption, arginfo_splheap_void, ZEND_ACC_PUBLIC) SPL_ME(SplHeap, isCorrupted, arginfo_splheap_void, ZEND_ACC_PUBLIC) + SPL_ME(SplHeap, __debugInfo, arginfo_splheap_void, ZEND_ACC_PUBLIC) ZEND_FENTRY(compare, NULL, NULL, ZEND_ACC_PROTECTED|ZEND_ACC_ABSTRACT) PHP_FE_END }; @@ -1212,7 +1220,6 @@ PHP_MINIT_FUNCTION(spl_heap) /* {{{ */ spl_handler_SplHeap.offset = XtOffsetOf(spl_heap_object, std); spl_handler_SplHeap.clone_obj = spl_heap_object_clone; spl_handler_SplHeap.count_elements = spl_heap_object_count_elements; - spl_handler_SplHeap.get_debug_info = spl_heap_object_get_debug_info; spl_handler_SplHeap.get_gc = spl_heap_object_get_gc; spl_handler_SplHeap.dtor_obj = zend_objects_destroy_object; spl_handler_SplHeap.free_obj = spl_heap_object_free_storage; @@ -1234,7 +1241,6 @@ PHP_MINIT_FUNCTION(spl_heap) /* {{{ */ spl_handler_SplPriorityQueue.offset = XtOffsetOf(spl_heap_object, std); spl_handler_SplPriorityQueue.clone_obj = spl_heap_object_clone; spl_handler_SplPriorityQueue.count_elements = spl_heap_object_count_elements; - spl_handler_SplPriorityQueue.get_debug_info = spl_pqueue_object_get_debug_info; spl_handler_SplPriorityQueue.get_gc = spl_pqueue_object_get_gc; spl_handler_SplPriorityQueue.dtor_obj = zend_objects_destroy_object; spl_handler_SplPriorityQueue.free_obj = spl_heap_object_free_storage; diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c index ba29e0311e493..f7dd7ef2e0742 100644 --- a/ext/spl/spl_observer.c +++ b/ext/spl/spl_observer.c @@ -279,7 +279,7 @@ static zend_object *spl_object_storage_clone(zval *zobject) } /* }}} */ -static HashTable* spl_object_storage_debug_info(zval *obj, int *is_temp) /* {{{ */ +static inline HashTable* spl_object_storage_debug_info(zval *obj) /* {{{ */ { spl_SplObjectStorage *intern = Z_SPLOBJSTORAGE_P(obj); spl_SplObjectStorageElement *element; @@ -289,8 +289,6 @@ static HashTable* spl_object_storage_debug_info(zval *obj, int *is_temp) /* {{{ zend_string *zname; HashTable *debug_info; - *is_temp = 1; - props = Z_OBJPROP_P(obj); debug_info = zend_new_array(zend_hash_num_elements(props) + 1); @@ -945,6 +943,17 @@ SPL_METHOD(SplObjectStorage, __unserialize) object_properties_load(&intern->std, Z_ARRVAL_P(members_zv)); } +/* {{{ proto array SplObjectStorage::__debugInfo() */ +SPL_METHOD(SplObjectStorage, __debugInfo) +{ + if (zend_parse_parameters_none() == FAILURE) { + return; + } + + RETURN_ARR(spl_object_storage_debug_info(getThis())); +} +/* }}} */ + ZEND_BEGIN_ARG_INFO(arginfo_Object, 0) ZEND_ARG_INFO(0, object) ZEND_END_ARG_INFO(); @@ -983,6 +992,7 @@ static const zend_function_entry spl_funcs_SplObjectStorage[] = { SPL_ME(SplObjectStorage, getInfo, arginfo_splobject_void,0) SPL_ME(SplObjectStorage, setInfo, arginfo_setInfo, 0) SPL_ME(SplObjectStorage, getHash, arginfo_getHash, 0) + SPL_ME(SplObjectStorage, __debugInfo, arginfo_splobject_void,0) /* Countable */ SPL_ME(SplObjectStorage, count, arginfo_splobject_void,0) /* Iterator */ @@ -1301,9 +1311,10 @@ static const zend_function_entry spl_funcs_MultipleIterator[] = { SPL_ME(MultipleIterator, getFlags, arginfo_splobject_void, 0) SPL_ME(MultipleIterator, setFlags, arginfo_MultipleIterator_setflags, 0) SPL_ME(MultipleIterator, attachIterator, arginfo_MultipleIterator_attachIterator, 0) - SPL_MA(MultipleIterator, detachIterator, SplObjectStorage, detach, arginfo_MultipleIterator_detachIterator, 0) - SPL_MA(MultipleIterator, containsIterator, SplObjectStorage, contains, arginfo_MultipleIterator_containsIterator, 0) - SPL_MA(MultipleIterator, countIterators, SplObjectStorage, count, arginfo_splobject_void, 0) + SPL_MA(MultipleIterator, detachIterator, SplObjectStorage, detach, arginfo_MultipleIterator_detachIterator, 0) + SPL_MA(MultipleIterator, containsIterator, SplObjectStorage, contains, arginfo_MultipleIterator_containsIterator, 0) + SPL_MA(MultipleIterator, countIterators, SplObjectStorage, count, arginfo_splobject_void, 0) + SPL_MA(MultipleIterator, __debugInfo, SplObjectStorage, __debugInfo, arginfo_splobject_void, 0) /* Iterator */ SPL_ME(MultipleIterator, rewind, arginfo_splobject_void, 0) SPL_ME(MultipleIterator, valid, arginfo_splobject_void, 0) @@ -1323,7 +1334,6 @@ PHP_MINIT_FUNCTION(spl_observer) memcpy(&spl_handler_SplObjectStorage, &std_object_handlers, sizeof(zend_object_handlers)); spl_handler_SplObjectStorage.offset = XtOffsetOf(spl_SplObjectStorage, std); - spl_handler_SplObjectStorage.get_debug_info = spl_object_storage_debug_info; spl_handler_SplObjectStorage.compare_objects = spl_object_storage_compare_objects; spl_handler_SplObjectStorage.clone_obj = spl_object_storage_clone; spl_handler_SplObjectStorage.get_gc = spl_object_storage_get_gc; diff --git a/ext/spl/tests/bug69264.phpt b/ext/spl/tests/bug69264.phpt new file mode 100644 index 0000000000000..2f5251d1770ad --- /dev/null +++ b/ext/spl/tests/bug69264.phpt @@ -0,0 +1,112 @@ +--TEST-- +Bug #69264 (__debugInfo() ignored while extending SPL classes) +--FILE-- + 42, 'parent' => count(parent::__debugInfo())]; + } +} + +class MyDoublyLinkedList extends SplDoublyLinkedList { + public function __debugInfo() { + return ['child' => 42, 'parent' => count(parent::__debugInfo())]; + } +} + +class MyObjectStorage extends SplObjectStorage { + public function __debugInfo() { + return ['child' => 42, 'parent' => count(parent::__debugInfo())]; + } +} + +class MyMultipleIterator extends MultipleIterator { + public function __debugInfo() { + return ['child' => 42, 'parent' => count(parent::__debugInfo())]; + } +} + +class MyArrayObject extends ArrayObject { + public function __debugInfo() { + return ['child' => 42, 'parent' => count(parent::__debugInfo())]; + } +} + +class MyArrayIterator extends ArrayIterator { + public function __debugInfo() { + return ['child' => 42, 'parent' => count(parent::__debugInfo())]; + } +} + +class MyMaxHeap extends SplMaxHeap { + public function __debugInfo() { + return ['child' => 42, 'parent' => count(parent::__debugInfo())]; + } +} + +class MyPriorityQueue extends SplPriorityQueue { + public function __debugInfo() { + return ['child' => 42, 'parent' => count(parent::__debugInfo())]; + } +} + +var_dump( + new MyFileInfo(__FILE__), + new MyDoublyLinkedList(), + new MyObjectStorage(), + new MyMultipleIterator(), + new MyArrayObject(), + new MyArrayIterator(), + new MyMaxHeap(), + new MyPriorityQueue(), +); +?> +--EXPECTF-- +object(MyFileInfo)#%d (2) { + ["child"]=> + int(42) + ["parent"]=> + int(2) +} +object(MyDoublyLinkedList)#%d (2) { + ["child"]=> + int(42) + ["parent"]=> + int(2) +} +object(MyObjectStorage)#%d (2) { + ["child"]=> + int(42) + ["parent"]=> + int(1) +} +object(MyMultipleIterator)#%d (2) { + ["child"]=> + int(42) + ["parent"]=> + int(1) +} +object(MyArrayObject)#%d (2) { + ["child"]=> + int(42) + ["parent"]=> + int(1) +} +object(MyArrayIterator)#%d (2) { + ["child"]=> + int(42) + ["parent"]=> + int(1) +} +object(MyMaxHeap)#%d (2) { + ["child"]=> + int(42) + ["parent"]=> + int(3) +} +object(MyPriorityQueue)#%d (2) { + ["child"]=> + int(42) + ["parent"]=> + int(3) +} From c4bdf41862c07f5c7e0d4eb5dac4bbeac0b40296 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 6 Apr 2020 16:17:02 +0300 Subject: [PATCH 049/338] Minor register allocator refactoring --- ext/opcache/jit/zend_jit.c | 7 +++++-- ext/opcache/jit/zend_jit_x86.dasc | 32 +++++++++++++++---------------- ext/opcache/jit/zend_jit_x86.h | 18 ++++++++--------- 3 files changed, 30 insertions(+), 27 deletions(-) diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index 4839e93e6f919..76acfc29defed 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -1404,7 +1404,7 @@ static int zend_jit_try_allocate_free_reg(const zend_op_array *op_array, zend_ss while (it) { if (current->range.start != zend_interval_end(it)) { freeUntilPos[it->reg] = 0; - } else if (zend_jit_may_reuse_reg(op_array, ssa, current->range.start, current->ssa_var, it->ssa_var)) { + } else if (zend_jit_may_reuse_reg(op_array->opcodes + current->range.start, ssa->ops + current->range.start, ssa, current->ssa_var, it->ssa_var)) { if (!ZEND_REGSET_IN(*hints, it->reg) && /* TODO: Avoid most often scratch registers. Find a better way ??? */ (!current->used_as_hint || @@ -1460,7 +1460,10 @@ static int zend_jit_try_allocate_free_reg(const zend_op_array *op_array, zend_ss line++; } while (line <= range->end) { - regset = zend_jit_get_scratch_regset(op_array, ssa, line, current->ssa_var); + regset = zend_jit_get_scratch_regset( + op_array->opcodes + line, + ssa->ops + line, + op_array, ssa, current->ssa_var); ZEND_REGSET_FOREACH(regset, reg) { if (line < freeUntilPos[reg]) { freeUntilPos[reg] = line; diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 3029d911ba9f9..2306c7a39205f 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -10895,13 +10895,13 @@ static zend_bool zend_jit_verify_return_type(dasm_State **Dst, const zend_op *op return 1; } -static zend_bool zend_jit_may_reuse_reg(const zend_op_array *op_array, zend_ssa *ssa, uint32_t position, int def_var, int use_var) +static zend_bool zend_jit_may_reuse_reg(const zend_op *opline, const zend_ssa_op *ssa_op, zend_ssa *ssa, int def_var, int use_var) { if (ssa->var_info[def_var].type != ssa->var_info[use_var].type) { return 0; } - switch (op_array->opcodes[position].opcode) { + switch (opline->opcode) { case ZEND_QM_ASSIGN: case ZEND_SEND_VAR: case ZEND_ASSIGN: @@ -10916,8 +10916,8 @@ static zend_bool zend_jit_may_reuse_reg(const zend_op_array *op_array, zend_ssa case ZEND_BW_OR: case ZEND_BW_AND: case ZEND_BW_XOR: - if (def_var == ssa->ops[position].result_def && - use_var == ssa->ops[position].op1_use) { + if (def_var == ssa_op->result_def && + use_var == ssa_op->op1_use) { return 1; } break; @@ -11068,10 +11068,8 @@ static zend_bool zend_needs_extra_reg_for_const(const zend_op_array *op_array, c return 0; } -static zend_regset zend_jit_get_scratch_regset(const zend_op_array *op_array, zend_ssa *ssa, uint32_t line, int current_var) +static zend_regset zend_jit_get_scratch_regset(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, zend_ssa *ssa, int current_var) { - const zend_op *opline = op_array->opcodes + line; - const zend_ssa_op *ssa_op = ssa->ops + line; uint32_t op1_info, op2_info, res_info; zend_regset regset = ZEND_REGSET_SCRATCH; @@ -11178,7 +11176,7 @@ static zend_regset zend_jit_get_scratch_regset(const zend_op_array *op_array, ze regset = ZEND_REGSET_EMPTY; if ((op1_info & MAY_BE_LONG) && (op2_info & MAY_BE_LONG)) { if (ssa_op->result_def != current_var && - (ssa_op->op1_use != current_var || !zend_ssa_is_last_use(op_array, ssa, current_var, line))) { + (ssa_op->op1_use != current_var || !zend_ssa_is_last_use(op_array, ssa, current_var, ssa_op - ssa->ops))) { ZEND_REGSET_INCL(regset, ZREG_R0); } res_info = OP1_INFO(); @@ -11200,14 +11198,14 @@ static zend_regset zend_jit_get_scratch_regset(const zend_op_array *op_array, ze } else { ZEND_REGSET_INCL(regset, ZREG_XMM0); if (ssa_op->result_def != current_var && - (ssa_op->op1_use != current_var || !zend_ssa_is_last_use(op_array, ssa, current_var, line))) { + (ssa_op->op1_use != current_var || !zend_ssa_is_last_use(op_array, ssa, current_var, ssa_op - ssa->ops))) { ZEND_REGSET_INCL(regset, ZREG_XMM1); } } } if ((op1_info & MAY_BE_DOUBLE) && (op2_info & MAY_BE_DOUBLE)) { if (ssa_op->result_def != current_var && - (ssa_op->op1_use != current_var || !zend_ssa_is_last_use(op_array, ssa, current_var, line))) { + (ssa_op->op1_use != current_var || !zend_ssa_is_last_use(op_array, ssa, current_var, ssa_op - ssa->ops))) { ZEND_REGSET_INCL(regset, ZREG_XMM0); } } @@ -11226,7 +11224,7 @@ static zend_regset zend_jit_get_scratch_regset(const zend_op_array *op_array, ze !(op2_info & ((MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF)-MAY_BE_LONG))) { regset = ZEND_REGSET_EMPTY; if (ssa_op->result_def != current_var && - (ssa_op->op1_use != current_var || !zend_ssa_is_last_use(op_array, ssa, current_var, line))) { + (ssa_op->op1_use != current_var || !zend_ssa_is_last_use(op_array, ssa, current_var, ssa_op - ssa->ops))) { ZEND_REGSET_INCL(regset, ZREG_R0); } } @@ -11239,7 +11237,7 @@ static zend_regset zend_jit_get_scratch_regset(const zend_op_array *op_array, ze !(op2_info & ((MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF)-MAY_BE_LONG))) { regset = ZEND_REGSET_EMPTY; if (ssa_op->result_def != current_var && - (ssa_op->op1_use != current_var || !zend_ssa_is_last_use(op_array, ssa, current_var, line))) { + (ssa_op->op1_use != current_var || !zend_ssa_is_last_use(op_array, ssa, current_var, ssa_op - ssa->ops))) { ZEND_REGSET_INCL(regset, ZREG_R0); } if (opline->op2_type != IS_CONST && ssa_op->op2_use != current_var) { @@ -11257,7 +11255,7 @@ static zend_regset zend_jit_get_scratch_regset(const zend_op_array *op_array, ze Z_TYPE_P(RT_CONSTANT(opline, opline->op2)) == IS_LONG && zend_long_is_power_of_two(Z_LVAL_P(RT_CONSTANT(opline, opline->op2)))) { if (ssa_op->result_def != current_var && - (ssa_op->op1_use != current_var || !zend_ssa_is_last_use(op_array, ssa, current_var, line))) { + (ssa_op->op1_use != current_var || !zend_ssa_is_last_use(op_array, ssa, current_var, ssa_op - ssa->ops))) { ZEND_REGSET_INCL(regset, ZREG_R0); } } else { @@ -11339,11 +11337,13 @@ static zend_regset zend_jit_get_scratch_regset(const zend_op_array *op_array, ze #if ZTS /* %r0 is used to check EG(vm_interrupt) */ - { - uint32_t b = ssa->cfg.map[line]; + if (zend_jit_trigger == ZEND_JIT_ON_HOT_TRACE) { + // TODO: loop detection ??? + } else { + uint32_t b = ssa->cfg.map[ssa_op - ssa->ops]; if ((ssa->cfg.blocks[b].flags & ZEND_BB_LOOP_HEADER) != 0 - && ssa->cfg.blocks[b].start == line) { + && ssa->cfg.blocks[b].start == ssa_op - ssa->ops) { ZEND_REGSET_INCL(regset, ZREG_R0); } } diff --git a/ext/opcache/jit/zend_jit_x86.h b/ext/opcache/jit/zend_jit_x86.h index 6a3b4551051a6..71fcb93ae13b4 100644 --- a/ext/opcache/jit/zend_jit_x86.h +++ b/ext/opcache/jit/zend_jit_x86.h @@ -236,12 +236,12 @@ typedef uintptr_t zend_jit_addr; ((last_use) ? (1 << (_ZEND_ADDR_REG_LAST_USE_BIT-_ZEND_ADDR_REG_SHIFT)) : 0) \ ) -#define OP_REG(line, op) \ - (ra && ssa->ops[line].op >= 0 && ra[ssa->ops[line].op] ? \ - OP_REG_EX(ra[ssa->ops[line].op]->reg, \ - ra[ssa->ops[line].op]->store, \ - ra[ssa->ops[line].op]->load, \ - zend_ssa_is_last_use(op_array, ssa, ssa->ops[line].op, line) \ +#define OP_REG(ssa_op, op) \ + (ra && ssa_op->op >= 0 && ra[ssa_op->op] ? \ + OP_REG_EX(ra[ssa_op->op]->reg, \ + ra[ssa_op->op]->store, \ + ra[ssa_op->op]->load, \ + zend_ssa_is_last_use(op_array, ssa, ssa_op->op, ssa_op - ssa->ops) \ ) : ZREG_NONE) static zend_always_inline zend_jit_addr _zend_jit_decode_op(zend_uchar op_type, znode_op op, const zend_op *opline, zend_reg reg) @@ -274,9 +274,9 @@ static zend_always_inline zend_jit_addr _zend_jit_decode_op(zend_uchar op_type, #define OP1_DATA_ADDR() \ OP_ADDR(opline + 1, op1_type, op1) -#define OP_REG_ADDR(opline, type, op, ssa_op) \ - _zend_jit_decode_op((opline)->type, (opline)->op, opline, \ - OP_REG((opline) - op_array->opcodes, ssa_op)) +#define OP_REG_ADDR(opline, type, _op, _ssa_op) \ + _zend_jit_decode_op((opline)->type, (opline)->_op, opline, \ + OP_REG(ssa_op, _ssa_op)) #define OP1_REG_ADDR() \ OP_REG_ADDR(opline, op1_type, op1, op1_use) From 4006c0008e2b9646540a427b830dd46c11458786 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 6 Apr 2020 23:48:20 +0300 Subject: [PATCH 050/338] Save CPU regesters on side exit for deoptimization --- ext/opcache/jit/zend_jit.c | 2 +- ext/opcache/jit/zend_jit_internal.h | 2 +- ext/opcache/jit/zend_jit_trace.c | 3 +- ext/opcache/jit/zend_jit_vm_helpers.c | 1 + ext/opcache/jit/zend_jit_x86.dasc | 56 ++++++++++++++++++++++++--- ext/opcache/jit/zend_jit_x86.h | 10 +++++ 6 files changed, 66 insertions(+), 8 deletions(-) diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index 76acfc29defed..b5c4ca82d7d9b 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -33,6 +33,7 @@ #include "Optimizer/zend_call_graph.h" #include "Optimizer/zend_dump.h" +#include "jit/zend_jit_x86.h" #include "jit/zend_jit_internal.h" #ifdef ZTS @@ -165,7 +166,6 @@ static zend_bool zend_long_is_power_of_two(zend_long x) #define OP1_DATA_RANGE_EX() OP_RANGE_EX(ssa_op + 1, op1) #include "dynasm/dasm_x86.h" -#include "jit/zend_jit_x86.h" #include "jit/zend_jit_helpers.c" #include "jit/zend_jit_disasm_x86.c" #ifndef _WIN32 diff --git a/ext/opcache/jit/zend_jit_internal.h b/ext/opcache/jit/zend_jit_internal.h index 60f9520d0b6e0..54eaca15c6bc1 100644 --- a/ext/opcache/jit/zend_jit_internal.h +++ b/ext/opcache/jit/zend_jit_internal.h @@ -422,7 +422,7 @@ ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_jit_ret_trace_helper(ZEND_OPCODE_HAND ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_jit_loop_trace_helper(ZEND_OPCODE_HANDLER_ARGS); int ZEND_FASTCALL zend_jit_trace_hot_root(zend_execute_data *execute_data, const zend_op *opline); -int ZEND_FASTCALL zend_jit_trace_exit(uint32_t trace_num, uint32_t exit_num); +int ZEND_FASTCALL zend_jit_trace_exit(uint32_t exit_num, zend_jit_registers_buf *regs); zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *execute_data, const zend_op *opline, zend_jit_trace_rec *trace_buffer, uint8_t start); static zend_always_inline const zend_op* zend_jit_trace_get_exit_opline(zend_jit_trace_rec *trace, const zend_op *opline, zend_bool *exit_if_true) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index d2fe33b63fbf6..f24ae1c2a131f 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -3879,8 +3879,9 @@ int ZEND_FASTCALL zend_jit_trace_hot_side(zend_execute_data *execute_data, uint3 return (stop == ZEND_JIT_TRACE_STOP_HALT) ? -1 : 0; } -int ZEND_FASTCALL zend_jit_trace_exit(uint32_t trace_num, uint32_t exit_num) +int ZEND_FASTCALL zend_jit_trace_exit(uint32_t exit_num, zend_jit_registers_buf *regs) { + uint32_t trace_num = (uint32_t)(uintptr_t)EG(reserved)[zend_func_info_rid]; zend_execute_data *execute_data = EG(current_execute_data); const zend_op *opline; zend_jit_trace_info *t = &zend_jit_traces[trace_num]; diff --git a/ext/opcache/jit/zend_jit_vm_helpers.c b/ext/opcache/jit/zend_jit_vm_helpers.c index 906cba34587b9..450fa6055d568 100644 --- a/ext/opcache/jit/zend_jit_vm_helpers.c +++ b/ext/opcache/jit/zend_jit_vm_helpers.c @@ -28,6 +28,7 @@ #include "Optimizer/zend_func_info.h" #include "Optimizer/zend_call_graph.h" #include "zend_jit.h" +#include "zend_jit_x86.h" #include "zend_jit_internal.h" #ifdef HAVE_GCC_GLOBAL_REGS diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 2306c7a39205f..b5c71f2cbb373 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -2326,16 +2326,62 @@ static int zend_jit_trace_exit_stub(dasm_State **Dst) { |->trace_exit: | - | // TODO: Save CPU registers ??? + | // Save CPU registers + |.if X64 + | sub r4, 16*8+16*8-8 /* CPU regs + SSE regs */ + | mov aword [r4+11*8], r11 + | mov aword [r4+10*8], r10 + | mov aword [r4+9*8], r9 + | mov aword [r4+8*8], r8 + | mov aword [r4+7*8], rdi + | mov aword [r4+6*8], rsi + | mov aword [r4+2*8], rdx + | mov aword [r4+1*8], rcx + | mov aword [r4+0*8], rax + | mov FCARG1a, aword [r4+16*8+16*8-8] // exit_num = POP + | mov FCARG2a, r4 + | movsd qword [r4+16*8+15*8], xmm15 + | movsd qword [r4+16*8+14*8], xmm14 + | movsd qword [r4+16*8+13*8], xmm13 + | movsd qword [r4+16*8+12*8], xmm12 + | movsd qword [r4+16*8+11*8], xmm11 + | movsd qword [r4+16*8+10*8], xmm10 + | movsd qword [r4+16*8+9*8], xmm9 + | movsd qword [r4+16*8+8*8], xmm8 + | movsd qword [r4+16*8+7*8], xmm7 + | movsd qword [r4+16*8+6*8], xmm6 + | movsd qword [r4+16*8+5*8], xmm5 + | movsd qword [r4+16*8+4*8], xmm4 + | movsd qword [r4+16*8+3*8], xmm3 + | movsd qword [r4+16*8+2*8], xmm2 + | movsd qword [r4+16*8+1*8], xmm1 + | movsd qword [r4+16*8+0*8], xmm0 + |.else + | sub r4, 8*4+8*8-4 /* CPU regs + SSE regs */ + | mov aword [r4+2*4], edx + | mov aword [r4+1*4], ecx + | mov aword [r4+0*4], eax + | mov FCARG1a, aword [r4+8*4+8*8-4] // exit_num = POP + | mov FCARG2a, r4 + | movsd qword [r4+8*4+7*8], xmm7 + | movsd qword [r4+8*4+6*8], xmm6 + | movsd qword [r4+8*4+5*8], xmm5 + | movsd qword [r4+8*4+4*8], xmm4 + | movsd qword [r4+8*4+3*8], xmm3 + | movsd qword [r4+8*4+2*8], xmm2 + | movsd qword [r4+8*4+1*8], xmm1 + | movsd qword [r4+8*4+0*8], xmm0 + |.endif | - | // trace_num = EG(reserved)[zend_func_info_rid] - | MEM_OP2_2_ZTS mov, FCARG1a, aword, executor_globals, reserved[zend_func_info_rid], r0 - | // exit_num = POP - | pop FCARG2a | // EX(opline) = opline | SAVE_OPLINE | // zend_jit_trace_exit(trace_num, exit_num) | EXT_CALL zend_jit_trace_exit, r0 + |.if X64 + | add r4, 16*8+16*8 /* CPU regs + SSE regs */ + |.else + | add r4, 8*4+8*8 /* CPU regs + SSE regs */ + |.endif | // execute_data = EG(current_excute_data) | MEM_OP2_2_ZTS mov, FP, aword, executor_globals, current_execute_data, r0 | test eax, eax diff --git a/ext/opcache/jit/zend_jit_x86.h b/ext/opcache/jit/zend_jit_x86.h index 71fcb93ae13b4..8b2365efada35 100644 --- a/ext/opcache/jit/zend_jit_x86.h +++ b/ext/opcache/jit/zend_jit_x86.h @@ -65,6 +65,16 @@ typedef enum _zend_reg { ZREG_NUM } zend_reg; +typedef struct _zend_jit_registers_buf { +#if defined(__x86_64__) || defined(_WIN64) + uint64_t r[16]; + double xmm[16]; +#else + uint32_t r[8]; + double xmm[8]; +#endif +} zend_jit_registers_buf; + #define ZREG_RAX ZREG_R0 #define ZREG_RCX ZREG_R1 #define ZREG_RDX ZREG_R2 From 864b1cc3ef1343d8903551ce1d74c37f73e9dd72 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 7 Apr 2020 12:01:48 +0300 Subject: [PATCH 051/338] Free room for information about register allocation at astact stack and at trace_exit_info. Implement simple deoptimizer. --- ext/opcache/jit/zend_jit_internal.h | 30 +++++++++- ext/opcache/jit/zend_jit_trace.c | 89 +++++++++++++++++------------ 2 files changed, 81 insertions(+), 38 deletions(-) diff --git a/ext/opcache/jit/zend_jit_internal.h b/ext/opcache/jit/zend_jit_internal.h index 54eaca15c6bc1..25fedaa93db76 100644 --- a/ext/opcache/jit/zend_jit_internal.h +++ b/ext/opcache/jit/zend_jit_internal.h @@ -307,7 +307,35 @@ typedef struct _zend_jit_trace_exit_info { uint32_t stack_offset; } zend_jit_trace_exit_info; -typedef int32_t zend_jit_trace_stack; +typedef union _zend_jit_trace_stack { + int32_t __ssa_var; + uint32_t __info; + struct { + uint8_t __type; + int8_t __reg; + uint16_t __flags; + }; +} zend_jit_trace_stack; + +#define STACK_VAR(_stack, _slot) \ + (_stack)[_slot].__ssa_var +#define STACK_INFO(_stack, _slot) \ + (_stack)[_slot].__info +#define STACK_TYPE(_stack, _slot) \ + (_stack)[_slot].__type +#define STACK_REG(_stack, _slot) \ + (_stack)[_slot].__reg +#define SET_STACK_VAR(_stack, _slot, _ssa_var) do { \ + (_stack)[_slot].__ssa_var = _ssa_var; \ + } while (0) +#define SET_STACK_INFO(_stack, _slot, _info) do { \ + (_stack)[_slot].__info = _info; \ + } while (0) +#define SET_STACK_TYPE(_stack, _slot, _type) do { \ + (_stack)[_slot].__type = _type; \ + (_stack)[_slot].__reg = ZREG_NONE; \ + (_stack)[_slot].__flags = 0; \ + } while (0) typedef struct _zend_jit_trace_info { uint32_t id; /* trace id */ diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index f24ae1c2a131f..171ecd7d51b7f 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -134,7 +134,7 @@ static uint32_t zend_jit_trace_get_exit_point(const zend_op *from_opline, const if (stack_size) { stack = JIT_G(current_frame)->stack; do { - if (stack[stack_size-1] != IS_UNKNOWN) { + if (STACK_TYPE(stack, stack_size-1) != IS_UNKNOWN) { break; } stack_size--; @@ -320,10 +320,10 @@ static zend_always_inline uint32_t zend_jit_trace_type_to_info(zend_uchar type) } #define STACK_VAR_TYPE(_var) \ - ((zend_uchar)stack[EX_VAR_TO_NUM(_var)]) + STACK_TYPE(stack, EX_VAR_TO_NUM(_var)) #define SET_STACK_VAR_TYPE(_var, _type) do { \ - stack[EX_VAR_TO_NUM(_var)] = _type; \ + SET_STACK_TYPE(stack, EX_VAR_TO_NUM(_var), _type); \ } while (0) #define CHECK_OP_TRACE_TYPE(_var, _ssa_var, op_info, op_type) do { \ @@ -575,13 +575,13 @@ static int zend_jit_trace_add_phis(zend_jit_trace_rec *trace_buffer, uint32_t ss ZEND_MM_ALIGNED_SIZE(sizeof(int) * 2) + sizeof(void*) * 2); phi->sources = (int*)(((char*)phi) + ZEND_MM_ALIGNED_SIZE(sizeof(zend_ssa_phi))); - phi->sources[0] = stack[k]; + phi->sources[0] = STACK_VAR(stack, k); phi->sources[1] = -1; phi->use_chains = (zend_ssa_phi**)(((char*)phi->sources) + ZEND_MM_ALIGNED_SIZE(sizeof(int) * 2)); phi->pi = -1; phi->var = k; phi->ssa_var = ssa_vars_count; - stack[k] = ssa_vars_count; + SET_STACK_VAR(stack, k, ssa_vars_count); ssa_vars_count++; phi->block = 1; if (prev) { @@ -957,7 +957,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin } stack = frame->stack; for (i = 0; i < ssa_vars_count; i++) { - stack[i] = i; + SET_STACK_VAR(stack, i, i); } if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) { @@ -973,14 +973,14 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin if (p->op == ZEND_JIT_TRACE_VM) { opline = p->opline; ssa_opcodes[idx] = opline; - ssa_vars_count = zend_ssa_rename_op(op_array, opline, idx, build_flags, ssa_vars_count, ssa_ops, stack); + ssa_vars_count = zend_ssa_rename_op(op_array, opline, idx, build_flags, ssa_vars_count, ssa_ops, (int*)stack); idx++; len = zend_jit_trace_op_len(p->opline); while (len > 1) { opline++; ssa_opcodes[idx] = opline; if (opline->opcode != ZEND_OP_DATA) { - ssa_vars_count = zend_ssa_rename_op(op_array, opline, idx, build_flags, ssa_vars_count, ssa_ops, stack); + ssa_vars_count = zend_ssa_rename_op(op_array, opline, idx, build_flags, ssa_vars_count, ssa_ops, (int*)stack); } idx++; len--; @@ -993,7 +993,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin ZEND_ASSERT(ssa_vars_count < 0xff); p->first_ssa_var = ssa_vars_count; for (i = 0; i < op_array->last_var; i++) { - stack[i] = ssa_vars_count++; + SET_STACK_VAR(stack, i, ssa_vars_count++); } } else if (p->op == ZEND_JIT_TRACE_BACK) { op_array = p->op_array; @@ -1003,7 +1003,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin ZEND_ASSERT(ssa_vars_count <= 0xff); p->first_ssa_var = ssa_vars_count; for (i = 0; i < op_array->last_var + op_array->T; i++) { - stack[i] = ssa_vars_count++; + SET_STACK_VAR(stack, i, ssa_vars_count++); } } else { level--; @@ -1042,7 +1042,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin zend_ssa_phi *phi = tssa->blocks[1].phis; while (phi) { - phi->sources[1] = stack[phi->var]; + phi->sources[1] = STACK_VAR(stack, phi->var); ssa_vars[phi->ssa_var].var = phi->var; ssa_vars[phi->ssa_var].definition_phi = phi; ssa_vars[phi->sources[0]].phi_use_chain = phi; @@ -1143,7 +1143,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin } if (i < parent_vars_count) { /* Initialize TSSA variable from parent trace */ - zend_uchar op_type = parent_stack[i]; + zend_uchar op_type = STACK_TYPE(parent_stack, i); if (op_type != IS_UNKNOWN) { ssa_var_info[i].type &= zend_jit_trace_type_to_info(op_type); @@ -1171,7 +1171,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin TRACE_FRAME_INIT(frame, op_array, 0, 0); TRACE_FRAME_SET_RETURN_SSA_VAR(frame, -1); for (i = 0; i < op_array->last_var + op_array->T; i++) { - frame->stack[i] = -1; + SET_STACK_TYPE(frame->stack, i, IS_UNKNOWN); } memset(&return_value_info, 0, sizeof(return_value_info)); @@ -1334,7 +1334,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin if (ARG_SHOULD_BE_SENT_BY_REF(frame->call->func, opline->op2.num)) { info |= MAY_BE_REF|MAY_BE_RC1|MAY_BE_RCN|MAY_BE_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_KEY_ANY; } - frame->call->stack[opline->op2.num - 1] = info; + SET_STACK_INFO(frame->call->stack, opline->op2.num - 1, info); } break; case ZEND_RETURN: @@ -1476,7 +1476,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin TRACE_FRAME_INIT(call, op_array, 0, 0); top = zend_jit_trace_call_frame(top, op_array); for (i = 0; i < op_array->last_var + op_array->T; i++) { - call->stack[i] = -1; + SET_STACK_TYPE(call->stack, i, IS_UNKNOWN); } } else { ZEND_ASSERT(&call->func->op_array == op_array); @@ -1515,7 +1515,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin if (!(op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS) && i < op_array->num_args) { /* Propagate argument type */ - ssa_var_info[v].type &= frame->stack[i]; + ssa_var_info[v].type &= STACK_INFO(frame->stack, i); } i++; v++; @@ -1582,7 +1582,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin TRACE_FRAME_INIT(frame, op_array, 0, 0); TRACE_FRAME_SET_RETURN_SSA_VAR(frame, -1); for (i = 0; i < op_array->last_var + op_array->T; i++) { - frame->stack[i] = -1; + SET_STACK_TYPE(frame->stack, i, IS_UNKNOWN); } } @@ -1594,7 +1594,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin top = zend_jit_trace_call_frame(top, p->op_array); if (p->func->type == ZEND_USER_FUNCTION) { for (i = 0; i < p->op_array->last_var + p->op_array->T; i++) { - call->stack[i] = -1; + SET_STACK_TYPE(call->stack, i, IS_UNKNOWN); } } } else if (p->op == ZEND_JIT_TRACE_DO_ICALL) { @@ -1724,11 +1724,11 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par while (i < op_array->last_var) { if (!(ssa->var_info[i].type & MAY_BE_GUARD) && has_concrete_type(ssa->var_info[i].type)) { - stack[i] = concrete_type(ssa->var_info[i].type); + SET_STACK_TYPE(stack, i, concrete_type(ssa->var_info[i].type)); } else if (i < op_array->num_args) { - stack[i] = IS_UNKNOWN; + SET_STACK_TYPE(stack, i, IS_UNKNOWN); } else { - stack[i] = IS_UNDEF; + SET_STACK_TYPE(stack, i, IS_UNDEF); } i++; } @@ -1749,12 +1749,12 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par while (i < op_array->last_var + op_array->T) { if (!(ssa->var_info[i].type & MAY_BE_GUARD) && has_concrete_type(ssa->var_info[i].type)) { - stack[i] = concrete_type(ssa->var_info[i].type); + SET_STACK_TYPE(stack, i, concrete_type(ssa->var_info[i].type)); } else if (i < parent_vars_count - && (zend_uchar)parent_stack[i] != IS_UNKNOWN) { - stack[i] = parent_stack[i]; + && STACK_TYPE(parent_stack, i) != IS_UNKNOWN) { + SET_STACK_TYPE(stack, i, STACK_TYPE(parent_stack, i)); } else { - stack[i] = IS_UNKNOWN; + SET_STACK_TYPE(stack, i, IS_UNKNOWN); } i++; } @@ -1814,7 +1814,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par goto jit_failure; } ssa->var_info[i].type = info & ~MAY_BE_GUARD; - stack[i] = concrete_type(info); + SET_STACK_TYPE(stack, i, concrete_type(info)); } } } @@ -2449,7 +2449,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par for (j = 0 ; j < op_array->last_var; j++) { // TODO: get info from trace ??? uint32_t info = zend_ssa_cv_info(opline, op_array, op_array_ssa, j); - zend_uchar type = stack[j]; + zend_uchar type = STACK_TYPE(stack, j); info = zend_jit_trace_type_to_info_ex(type, info); if (info & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF)) { @@ -2949,18 +2949,18 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par /* Initialize abstract stack using SSA */ if (!(ssa->var_info[p->first_ssa_var + i].type & MAY_BE_GUARD) && has_concrete_type(ssa->var_info[p->first_ssa_var + i].type)) { - call->stack[i] = concrete_type(ssa->var_info[p->first_ssa_var + i].type); + SET_STACK_TYPE(call->stack, i, concrete_type(ssa->var_info[p->first_ssa_var + i].type)); } else { - call->stack[i] = IS_UNKNOWN; + SET_STACK_TYPE(call->stack, i, IS_UNKNOWN); } i++; } while (i < p->op_array->last_var) { - call->stack[i] = IS_UNDEF; + SET_STACK_TYPE(call->stack, i, IS_UNDEF); i++; } while (i < p->op_array->last_var + p->op_array->T) { - call->stack[i] = IS_UNKNOWN; + SET_STACK_TYPE(call->stack, i, IS_UNKNOWN); i++; } } else { @@ -2994,9 +2994,9 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par /* Initialize abstract stack using SSA */ if (!(ssa->var_info[p->first_ssa_var + i].type & MAY_BE_GUARD) && has_concrete_type(ssa->var_info[p->first_ssa_var + i].type)) { - stack[i] = concrete_type(ssa->var_info[p->first_ssa_var + i].type); + SET_STACK_TYPE(stack, i, concrete_type(ssa->var_info[p->first_ssa_var + i].type)); } else { - stack[i] = IS_UNKNOWN; + SET_STACK_TYPE(stack, i, IS_UNKNOWN); } } } @@ -3024,15 +3024,15 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par i = 0; while (i < p->op_array->num_args) { /* Types of arguments are going to be stored in abstract stack when proseccin SEV onstruction */ - call->stack[i] = IS_UNKNOWN; + SET_STACK_TYPE(call->stack, i, IS_UNKNOWN); i++; } while (i < p->op_array->last_var) { - call->stack[i] = IS_UNDEF; + SET_STACK_TYPE(call->stack, i, IS_UNDEF); i++; } while (i < p->op_array->last_var + p->op_array->T) { - call->stack[i] = IS_UNKNOWN; + SET_STACK_TYPE(call->stack, i, IS_UNKNOWN); i++; } } @@ -3886,7 +3886,22 @@ int ZEND_FASTCALL zend_jit_trace_exit(uint32_t exit_num, zend_jit_registers_buf const zend_op *opline; zend_jit_trace_info *t = &zend_jit_traces[trace_num]; - // TODO: Deoptimizatoion of VM stack state ??? + /* Deoptimizatoion of VM stack state */ + uint32_t i; + uint32_t stack_size = t->exit_info[exit_num].stack_size; + zend_jit_trace_stack *stack = t->stack_map + t->exit_info[exit_num].stack_offset; + + for (i = 0; i < stack_size; i++) { + if (STACK_REG(stack, i) != ZREG_NONE) { + if (STACK_TYPE(stack, i) == IS_LONG) { + ZVAL_LONG(EX_VAR_NUM(i), regs->r[STACK_REG(stack, i)]); + } else if (STACK_TYPE(stack, i) == IS_DOUBLE) { + ZVAL_DOUBLE(EX_VAR_NUM(i), regs->xmm[STACK_REG(stack, i) - ZREG_XMM0]); + } else { + ZEND_ASSERT(0); + } + } + } /* Lock-free check if the side trace was already JIT-ed or blacklist-ed in another process */ // TODO: We may remoive this, becaus of the same check in zend_jit_trace_hot_side() ??? From efec22b7bedfb1eae2df72b84cf5ad229e0bdc1e Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 11 Mar 2020 13:02:09 +0100 Subject: [PATCH 052/338] Fix #78221: DOMNode::normalize() doesn't remove empty text nodes If a text node is not followed by another text node, we remove it, if its textContent is empty. --- NEWS | 4 ++++ ext/dom/php_dom.c | 8 ++++++++ ext/dom/tests/bug78221.phpt | 17 +++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 ext/dom/tests/bug78221.phpt diff --git a/NEWS b/NEWS index 87e279e02db58..ff1aa47d3ba44 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,10 @@ PHP NEWS . Fixed bug #79434 (PHP 7.3 and PHP-7.4 crash with NULL-pointer dereference on !CS constant). (Nikita) +- DOM: + . Fixed bug #78221 (DOMNode::normalize() doesn't remove empty text nodes). + (cmb) + - MBString: . Fixed bug #79441 (Segfault in mb_chr() if internal encoding is unsupported). (Girgias) diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index 72ae3c3ffea36..ed67f047fa875 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -1383,6 +1383,14 @@ void dom_normalize (xmlNodePtr nodep) break; } } + strContent = xmlNodeGetContent(child); + if (*strContent == '\0') { + nextp = child->next; + xmlUnlinkNode(child); + php_libxml_node_free_resource(child); + child = nextp; + continue; + } break; case XML_ELEMENT_NODE: dom_normalize (child); diff --git a/ext/dom/tests/bug78221.phpt b/ext/dom/tests/bug78221.phpt new file mode 100644 index 0000000000000..a9bf50d98ea02 --- /dev/null +++ b/ext/dom/tests/bug78221.phpt @@ -0,0 +1,17 @@ +--TEST-- +Bug #78221 (DOMNode::normalize() doesn't remove empty text nodes) +--SKIPIF-- + +--FILE-- +loadHTML('

foo

'); +$p = $doc->getElementById('x'); +$p->childNodes[0]->textContent = ''; +$p->normalize(); +var_dump($p->childNodes->length); +?> +--EXPECT-- +int(0) From c81cf1c7af886161628ac4360cb5e5bfd94500fd Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 7 Apr 2020 16:05:33 +0200 Subject: [PATCH 053/338] Assert that arginfo parameter name is present --- Zend/zend_API.c | 5 +++-- Zend/zend_inheritance.c | 12 +++--------- ext/reflection/php_reflection.c | 15 ++++++--------- 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 68bee582c11b3..47730ff3ed9cb 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2167,9 +2167,10 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio if (reg_function->common.arg_info && reg_function->common.num_args) { uint32_t i; for (i = 0; i < reg_function->common.num_args; i++) { - if (ZEND_TYPE_IS_SET(reg_function->common.arg_info[i].type)) { + zend_arg_info *arg_info = ®_function->common.arg_info[i]; + ZEND_ASSERT(arg_info->name && "Parameter must have a name"); + if (ZEND_TYPE_IS_SET(arg_info->type)) { reg_function->common.fn_flags |= ZEND_ACC_HAS_TYPE_HINTS; - break; } } } diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index ad02380e35698..10e8552b69f1f 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -670,16 +670,10 @@ static ZEND_COLD zend_string *zend_get_function_declaration(const zend_function } smart_str_appendc(&str, '$'); - - if (arg_info->name) { - if (fptr->type == ZEND_INTERNAL_FUNCTION) { - smart_str_appends(&str, ((zend_internal_arg_info*)arg_info)->name); - } else { - smart_str_appendl(&str, ZSTR_VAL(arg_info->name), ZSTR_LEN(arg_info->name)); - } + if (fptr->type == ZEND_INTERNAL_FUNCTION) { + smart_str_appends(&str, ((zend_internal_arg_info*)arg_info)->name); } else { - smart_str_appends(&str, "param"); - smart_str_append_unsigned(&str, i); + smart_str_appendl(&str, ZSTR_VAL(arg_info->name), ZSTR_LEN(arg_info->name)); } if (i >= required && !ZEND_ARG_IS_VARIADIC(arg_info)) { diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 278e565874dda..e9993e9feb2ac 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -638,15 +638,12 @@ static void _parameter_string(smart_str *str, zend_function *fptr, struct _zend_ if (ZEND_ARG_IS_VARIADIC(arg_info)) { smart_str_appends(str, "..."); } - if (arg_info->name) { - smart_str_append_printf(str, "$%s", - (fptr->type == ZEND_INTERNAL_FUNCTION && - !(fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO)) ? - ((zend_internal_arg_info*)arg_info)->name : - ZSTR_VAL(arg_info->name)); - } else { - smart_str_append_printf(str, "$param%d", offset); - } + smart_str_append_printf(str, "$%s", + (fptr->type == ZEND_INTERNAL_FUNCTION && + !(fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO)) ? + ((zend_internal_arg_info*)arg_info)->name : + ZSTR_VAL(arg_info->name)); + if (fptr->type == ZEND_USER_FUNCTION && !required) { zend_op *precv = _get_recv_op((zend_op_array*)fptr, offset); if (precv && precv->opcode == ZEND_RECV_INIT && precv->op2_type != IS_UNUSED) { From 425c6f5815ea8ffbf5b73d684bd931551c200d26 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 7 Apr 2020 16:10:19 +0200 Subject: [PATCH 054/338] Optimize internal name fetching in reflection Directly fetch the name property, instead of construction the properties hash table and performing a lookup in it. This is both slow and wastes a lot of memory. --- ext/reflection/php_reflection.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index e9993e9feb2ac..82b1b3d68c06e 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -172,7 +172,11 @@ static inline zend_bool is_closure_invoke(zend_class_entry *ce, zend_string *lcn static zval *_default_load_name(zval *object) /* {{{ */ { - return zend_hash_find_ex_ind(Z_OBJPROP_P(object), ZSTR_KNOWN(ZEND_STR_NAME), 1); + zval *name = reflection_prop_name(object); + if (Z_ISUNDEF_P(name)) { + return NULL; + } + return name; } /* }}} */ From ab73d142c98d2f9813fbe9ddf2c59f415c0692fc Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 7 Apr 2020 16:25:44 +0200 Subject: [PATCH 055/338] Eliminate uses of _default_load_name() Instead fetch the name from the function/class/property, as appropriate. This makes us independent of the property, and eliminates error conditions related to it. --- ext/reflection/php_reflection.c | 153 +++++++++++-------------- ext/reflection/php_reflection.stub.php | 8 +- 2 files changed, 69 insertions(+), 92 deletions(-) diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 82b1b3d68c06e..4971ec4df0840 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -170,24 +170,13 @@ static inline zend_bool is_closure_invoke(zend_class_entry *ce, zend_string *lcn && zend_string_equals_literal(lcname, ZEND_INVOKE_FUNC_NAME); } -static zval *_default_load_name(zval *object) /* {{{ */ +static void _default_get_name(zval *object, zval *return_value) /* {{{ */ { zval *name = reflection_prop_name(object); if (Z_ISUNDEF_P(name)) { - return NULL; - } - return name; -} -/* }}} */ - -static void _default_get_name(zval *object, zval *return_value) /* {{{ */ -{ - zval *value; - - if ((value = _default_load_name(object)) == NULL) { RETURN_FALSE; } - ZVAL_COPY(return_value, value); + ZVAL_COPY(return_value, name); } /* }}} */ @@ -3243,22 +3232,18 @@ ZEND_METHOD(reflection_function, isVariadic) Returns whether this function is defined in namespace */ ZEND_METHOD(reflection_function, inNamespace) { - zval *name; - const char *backslash; + reflection_object *intern; + zend_function *fptr; if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } - if ((name = _default_load_name(ZEND_THIS)) == NULL) { - RETURN_FALSE; - } - if (Z_TYPE_P(name) == IS_STRING - && (backslash = zend_memrchr(Z_STRVAL_P(name), '\\', Z_STRLEN_P(name))) - && backslash > Z_STRVAL_P(name)) - { - RETURN_TRUE; - } - RETURN_FALSE; + + GET_REFLECTION_OBJECT_PTR(fptr); + + zend_string *name = fptr->common.function_name; + const char *backslash = zend_memrchr(ZSTR_VAL(name), '\\', ZSTR_LEN(name)); + RETURN_BOOL(backslash && backslash > ZSTR_VAL(name)); } /* }}} */ @@ -3266,20 +3251,19 @@ ZEND_METHOD(reflection_function, inNamespace) Returns the name of namespace where this function is defined */ ZEND_METHOD(reflection_function, getNamespaceName) { - zval *name; - const char *backslash; + reflection_object *intern; + zend_function *fptr; if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } - if ((name = _default_load_name(ZEND_THIS)) == NULL) { - RETURN_FALSE; - } - if (Z_TYPE_P(name) == IS_STRING - && (backslash = zend_memrchr(Z_STRVAL_P(name), '\\', Z_STRLEN_P(name))) - && backslash > Z_STRVAL_P(name)) - { - RETURN_STRINGL(Z_STRVAL_P(name), backslash - Z_STRVAL_P(name)); + + GET_REFLECTION_OBJECT_PTR(fptr); + + zend_string *name = fptr->common.function_name; + const char *backslash = zend_memrchr(ZSTR_VAL(name), '\\', ZSTR_LEN(name)); + if (backslash && backslash > ZSTR_VAL(name)) { + RETURN_STRINGL(ZSTR_VAL(name), backslash - ZSTR_VAL(name)); } RETURN_EMPTY_STRING(); } @@ -3289,22 +3273,21 @@ ZEND_METHOD(reflection_function, getNamespaceName) Returns the short name of the function (without namespace part) */ ZEND_METHOD(reflection_function, getShortName) { - zval *name; - const char *backslash; + reflection_object *intern; + zend_function *fptr; if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } - if ((name = _default_load_name(ZEND_THIS)) == NULL) { - RETURN_FALSE; - } - if (Z_TYPE_P(name) == IS_STRING - && (backslash = zend_memrchr(Z_STRVAL_P(name), '\\', Z_STRLEN_P(name))) - && backslash > Z_STRVAL_P(name)) - { - RETURN_STRINGL(backslash + 1, Z_STRLEN_P(name) - (backslash - Z_STRVAL_P(name) + 1)); + + GET_REFLECTION_OBJECT_PTR(fptr); + + zend_string *name = fptr->common.function_name; + const char *backslash = zend_memrchr(ZSTR_VAL(name), '\\', ZSTR_LEN(name)); + if (backslash && backslash > ZSTR_VAL(name)) { + RETURN_STRINGL(backslash + 1, ZSTR_LEN(name) - (backslash - ZSTR_VAL(name) + 1)); } - ZVAL_COPY_DEREF(return_value, name); + RETURN_STR_COPY(name); } /* }}} */ @@ -5074,22 +5057,18 @@ ZEND_METHOD(reflection_class, getExtensionName) Returns whether this class is defined in namespace */ ZEND_METHOD(reflection_class, inNamespace) { - zval *name; - const char *backslash; + reflection_object *intern; + zend_class_entry *ce; if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } - if ((name = _default_load_name(ZEND_THIS)) == NULL) { - RETURN_FALSE; - } - if (Z_TYPE_P(name) == IS_STRING - && (backslash = zend_memrchr(Z_STRVAL_P(name), '\\', Z_STRLEN_P(name))) - && backslash > Z_STRVAL_P(name)) - { - RETURN_TRUE; - } - RETURN_FALSE; + + GET_REFLECTION_OBJECT_PTR(ce); + + zend_string *name = ce->name; + const char *backslash = zend_memrchr(ZSTR_VAL(name), '\\', ZSTR_LEN(name)); + RETURN_BOOL(backslash && backslash > ZSTR_VAL(name)); } /* }}} */ @@ -5097,20 +5076,19 @@ ZEND_METHOD(reflection_class, inNamespace) Returns the name of namespace where this class is defined */ ZEND_METHOD(reflection_class, getNamespaceName) { - zval *name; - const char *backslash; + reflection_object *intern; + zend_class_entry *ce; if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } - if ((name = _default_load_name(ZEND_THIS)) == NULL) { - RETURN_FALSE; - } - if (Z_TYPE_P(name) == IS_STRING - && (backslash = zend_memrchr(Z_STRVAL_P(name), '\\', Z_STRLEN_P(name))) - && backslash > Z_STRVAL_P(name)) - { - RETURN_STRINGL(Z_STRVAL_P(name), backslash - Z_STRVAL_P(name)); + + GET_REFLECTION_OBJECT_PTR(ce); + + zend_string *name = ce->name; + const char *backslash = zend_memrchr(ZSTR_VAL(name), '\\', ZSTR_LEN(name)); + if (backslash && backslash > ZSTR_VAL(name)) { + RETURN_STRINGL(ZSTR_VAL(name), backslash - ZSTR_VAL(name)); } RETURN_EMPTY_STRING(); } @@ -5120,22 +5098,21 @@ ZEND_METHOD(reflection_class, getNamespaceName) Returns the short name of the class (without namespace part) */ ZEND_METHOD(reflection_class, getShortName) { - zval *name; - const char *backslash; + reflection_object *intern; + zend_class_entry *ce; if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } - if ((name = _default_load_name(ZEND_THIS)) == NULL) { - RETURN_FALSE; - } - if (Z_TYPE_P(name) == IS_STRING - && (backslash = zend_memrchr(Z_STRVAL_P(name), '\\', Z_STRLEN_P(name))) - && backslash > Z_STRVAL_P(name)) - { - RETURN_STRINGL(backslash + 1, Z_STRLEN_P(name) - (backslash - Z_STRVAL_P(name) + 1)); + + GET_REFLECTION_OBJECT_PTR(ce); + + zend_string *name = ce->name; + const char *backslash = zend_memrchr(ZSTR_VAL(name), '\\', ZSTR_LEN(name)); + if (backslash && backslash > ZSTR_VAL(name)) { + RETURN_STRINGL(backslash + 1, ZSTR_LEN(name) - (backslash - ZSTR_VAL(name) + 1)); } - ZVAL_COPY_DEREF(return_value, name); + RETURN_STR_COPY(name); } /* }}} */ @@ -5330,7 +5307,7 @@ ZEND_METHOD(reflection_property, getValue) { reflection_object *intern; property_reference *ref; - zval *object = NULL, *name; + zval *object = NULL; zval *member_p = NULL; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|o!", &object) == FAILURE) { @@ -5340,9 +5317,9 @@ ZEND_METHOD(reflection_property, getValue) GET_REFLECTION_OBJECT_PTR(ref); if (!(prop_get_flags(ref) & ZEND_ACC_PUBLIC) && intern->ignore_visibility == 0) { - name = _default_load_name(ZEND_THIS); zend_throw_exception_ex(reflection_exception_ptr, 0, - "Cannot access non-public member %s::$%s", ZSTR_VAL(intern->ce->name), Z_STRVAL_P(name)); + "Cannot access non-public member %s::$%s", + ZSTR_VAL(intern->ce->name), ZSTR_VAL(ref->unmangled_name)); RETURN_THROWS(); } @@ -5384,16 +5361,16 @@ ZEND_METHOD(reflection_property, setValue) { reflection_object *intern; property_reference *ref; - zval *object, *name; + zval *object; zval *value; zval *tmp; GET_REFLECTION_OBJECT_PTR(ref); if (!(prop_get_flags(ref) & ZEND_ACC_PUBLIC) && intern->ignore_visibility == 0) { - name = _default_load_name(ZEND_THIS); zend_throw_exception_ex(reflection_exception_ptr, 0, - "Cannot access non-public member %s::$%s", ZSTR_VAL(intern->ce->name), Z_STRVAL_P(name)); + "Cannot access non-public member %s::$%s", + ZSTR_VAL(intern->ce->name), ZSTR_VAL(ref->unmangled_name)); RETURN_THROWS(); } @@ -5421,7 +5398,7 @@ ZEND_METHOD(reflection_property, isInitialized) { reflection_object *intern; property_reference *ref; - zval *object = NULL, *name; + zval *object = NULL; zval *member_p = NULL; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|o!", &object) == FAILURE) { @@ -5431,9 +5408,9 @@ ZEND_METHOD(reflection_property, isInitialized) GET_REFLECTION_OBJECT_PTR(ref); if (!(prop_get_flags(ref) & ZEND_ACC_PUBLIC) && intern->ignore_visibility == 0) { - name = _default_load_name(getThis()); zend_throw_exception_ex(reflection_exception_ptr, 0, - "Cannot access non-public member %s::$%s", ZSTR_VAL(intern->ce->name), Z_STRVAL_P(name)); + "Cannot access non-public member %s::$%s", + ZSTR_VAL(intern->ce->name), ZSTR_VAL(ref->unmangled_name)); RETURN_THROWS(); } diff --git a/ext/reflection/php_reflection.stub.php b/ext/reflection/php_reflection.stub.php index b96a4f65e9d05..1fc1442f0f822 100644 --- a/ext/reflection/php_reflection.stub.php +++ b/ext/reflection/php_reflection.stub.php @@ -63,7 +63,7 @@ public function getFileName() {} /** @return string|false */ public function getName() {} - /** @return string|false */ + /** @return string */ public function getNamespaceName() {} /** @return int */ @@ -75,7 +75,7 @@ public function getNumberOfRequiredParameters() {} /** @return ReflectionParameter[] */ public function getParameters() {} - /** @return string|false */ + /** @return string */ public function getShortName() {} /** @return int|false */ @@ -349,10 +349,10 @@ public function getExtensionName() {} /** @return bool */ public function inNamespace() {} - /** @return string|false */ + /** @return string */ public function getNamespaceName() {} - /** @return string|false */ + /** @return string */ public function getShortName() {} } From 07e739a2d5ddbe7618e748f6d0ab5aeca8cf880c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 7 Apr 2020 16:42:40 +0200 Subject: [PATCH 056/338] Remove most uses of _default_get_name() Instead fetch the name from the respective structure. The only place where this is still used is ReflectionClassConst, as zend_class_const does not store the name. --- ext/reflection/php_reflection.c | 76 ++++++++++++++++---------- ext/reflection/php_reflection.stub.php | 10 ++-- 2 files changed, 53 insertions(+), 33 deletions(-) diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 4971ec4df0840..6b9ca5b595195 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -610,6 +610,11 @@ static int format_default_value(smart_str *str, zval *value, zend_class_entry *s return SUCCESS; } +static inline zend_bool has_internal_arg_info(const zend_function *fptr) { + return fptr->type == ZEND_INTERNAL_FUNCTION + && !(fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO); +} + /* {{{ _parameter_string */ static void _parameter_string(smart_str *str, zend_function *fptr, struct _zend_arg_info *arg_info, uint32_t offset, zend_bool required, char* indent) { @@ -631,11 +636,8 @@ static void _parameter_string(smart_str *str, zend_function *fptr, struct _zend_ if (ZEND_ARG_IS_VARIADIC(arg_info)) { smart_str_appends(str, "..."); } - smart_str_append_printf(str, "$%s", - (fptr->type == ZEND_INTERNAL_FUNCTION && - !(fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO)) ? - ((zend_internal_arg_info*)arg_info)->name : - ZSTR_VAL(arg_info->name)); + smart_str_append_printf(str, "$%s", has_internal_arg_info(fptr) + ? ((zend_internal_arg_info*)arg_info)->name : ZSTR_VAL(arg_info->name)); if (fptr->type == ZEND_USER_FUNCTION && !required) { zend_op *precv = _get_recv_op((zend_op_array*)fptr, offset); @@ -1139,15 +1141,10 @@ static void reflection_parameter_factory(zend_function *fptr, zval *closure_obje } prop_name = reflection_prop_name(object); - if (arg_info->name) { - if (fptr->type == ZEND_INTERNAL_FUNCTION && - !(fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO)) { - ZVAL_STRING(prop_name, ((zend_internal_arg_info*)arg_info)->name); - } else { - ZVAL_STR_COPY(prop_name, arg_info->name); - } + if (has_internal_arg_info(fptr)) { + ZVAL_STRING(prop_name, ((zend_internal_arg_info*)arg_info)->name); } else { - ZVAL_NULL(prop_name); + ZVAL_STR_COPY(prop_name, arg_info->name); } } /* }}} */ @@ -1443,10 +1440,15 @@ ZEND_METHOD(reflection_function, __toString) Returns this function's name */ ZEND_METHOD(reflection_function, getName) { + reflection_object *intern; + zend_function *fptr; + if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } - _default_get_name(ZEND_THIS, return_value); + + GET_REFLECTION_OBJECT_PTR(fptr); + RETURN_STR_COPY(fptr->common.function_name); } /* }}} */ @@ -2254,8 +2256,7 @@ ZEND_METHOD(reflection_parameter, __construct) goto failure; } - if (fptr->type == ZEND_INTERNAL_FUNCTION && - !(fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO)) { + if (has_internal_arg_info(fptr)) { 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) { @@ -2295,15 +2296,10 @@ ZEND_METHOD(reflection_parameter, __construct) } prop_name = reflection_prop_name(object); - if (arg_info[position].name) { - if (fptr->type == ZEND_INTERNAL_FUNCTION && - !(fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO)) { - ZVAL_STRING(prop_name, ((zend_internal_arg_info*)arg_info)[position].name); - } else { - ZVAL_STR_COPY(prop_name, arg_info[position].name); - } + if (has_internal_arg_info(fptr)) { + ZVAL_STRING(prop_name, ((zend_internal_arg_info*)arg_info)[position].name); } else { - ZVAL_NULL(prop_name); + ZVAL_STR_COPY(prop_name, arg_info[position].name); } return; @@ -2340,10 +2336,19 @@ ZEND_METHOD(reflection_parameter, __toString) Returns this parameters's name */ ZEND_METHOD(reflection_parameter, getName) { + reflection_object *intern; + parameter_reference *param; + if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } - _default_get_name(ZEND_THIS, return_value); + + GET_REFLECTION_OBJECT_PTR(param); + if (has_internal_arg_info(param->fptr)) { + RETURN_STRING(((zend_internal_arg_info *) param->arg_info)->name); + } else { + RETURN_STR_COPY(param->arg_info->name); + } } /* }}} */ @@ -3862,10 +3867,15 @@ ZEND_METHOD(reflection_class, __toString) Returns the class' name */ ZEND_METHOD(reflection_class, getName) { + reflection_object *intern; + zend_class_entry *ce; + if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } - _default_get_name(ZEND_THIS, return_value); + + GET_REFLECTION_OBJECT_PTR(ce); + RETURN_STR_COPY(ce->name); } /* }}} */ @@ -5217,10 +5227,15 @@ ZEND_METHOD(reflection_property, __toString) Returns the class' name */ ZEND_METHOD(reflection_property, getName) { + reflection_object *intern; + property_reference *ref; + if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } - _default_get_name(ZEND_THIS, return_value); + + GET_REFLECTION_OBJECT_PTR(ref); + RETURN_STR_COPY(ref->unmangled_name); } /* }}} */ @@ -5657,10 +5672,15 @@ ZEND_METHOD(reflection_extension, __toString) Returns this extension's name */ ZEND_METHOD(reflection_extension, getName) { + reflection_object *intern; + zend_module_entry *module; + if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } - _default_get_name(ZEND_THIS, return_value); + + GET_REFLECTION_OBJECT_PTR(module); + RETURN_STRING(module->name); } /* }}} */ diff --git a/ext/reflection/php_reflection.stub.php b/ext/reflection/php_reflection.stub.php index 1fc1442f0f822..84d2c30779b59 100644 --- a/ext/reflection/php_reflection.stub.php +++ b/ext/reflection/php_reflection.stub.php @@ -60,7 +60,7 @@ public function getExtensionName() {} /** @return string|false */ public function getFileName() {} - /** @return string|false */ + /** @return string */ public function getName() {} /** @return string */ @@ -199,7 +199,7 @@ public function __construct($argument) {} public function __toString(): string {} - /** @return string|false */ + /** @return string */ public function getName() {} /** @return bool */ @@ -370,7 +370,7 @@ public function __construct($class, string $name) {} public function __toString(): string {} - /** @return string|false */ + /** @return string */ public function getName() {} /** @return mixed */ @@ -467,7 +467,7 @@ public function __construct($function, $parameter) {} public function __toString(): string {} - /** @return string|false */ + /** @return string */ public function getName() {} /** @return bool */ @@ -554,7 +554,7 @@ public function __construct(string $name) {} public function __toString(): string {} - /** @return string|false */ + /** @return string */ public function getName() {} /** @return ?string */ From 5db5f71f2831df4d32484a5638f6f6aa72e364a5 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 7 Apr 2020 21:30:47 +0300 Subject: [PATCH 057/338] cleanup --- ext/opcache/jit/zend_jit_trace.c | 801 ++++++++++++++++++++++++++++++- 1 file changed, 798 insertions(+), 3 deletions(-) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 171ecd7d51b7f..9f17f681d687f 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -803,6 +803,11 @@ static int is_checked_guard(const zend_ssa *tssa, const zend_op **ssa_opcodes, u return 0; } +typedef struct _zend_tssa { + zend_ssa ssa; + const zend_op **tssa_opcodes; +} zend_tssa; + static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uint32_t parent_trace, uint32_t exit_num, zend_script *script, const zend_op_array **op_arrays, int *num_op_arrays_ptr) { zend_ssa *tssa; @@ -913,7 +918,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin *num_op_arrays_ptr = num_op_arrays; /* 2. Construct TSSA */ - tssa = zend_arena_calloc(&CG(arena), 1, sizeof(zend_ssa)); + tssa = zend_arena_calloc(&CG(arena), 1, sizeof(zend_tssa)); tssa->cfg.blocks = zend_arena_calloc(&CG(arena), 2, sizeof(zend_basic_block)); tssa->blocks = zend_arena_calloc(&CG(arena), 2, sizeof(zend_ssa_block)); tssa->cfg.predecessors = zend_arena_calloc(&CG(arena), 2, sizeof(int)); @@ -921,6 +926,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin memset(ssa_ops, -1, ssa_ops_count * sizeof(zend_ssa_op)); ssa_opcodes = zend_arena_calloc(&CG(arena), ssa_ops_count, sizeof(zend_op*)); JIT_G(current_frame) = frame = (zend_jit_trace_stack_frame*)((char*)zend_arena_alloc(&CG(arena), stack_bottom + stack_size) + stack_bottom); + ((zend_tssa*)tssa)->tssa_opcodes = ssa_opcodes; if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) { tssa->cfg.blocks_count = 2; @@ -1678,6 +1684,784 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin return tssa; } +static int zend_jit_trace_try_allocate_free_reg(zend_jit_trace_rec *trace_buffer, const zend_op **ssa_opcodes, zend_ssa *ssa, zend_lifetime_interval *current, zend_regset available, zend_regset *hints, zend_lifetime_interval *active, zend_lifetime_interval *inactive, zend_lifetime_interval **list, zend_lifetime_interval **free) +{ + zend_lifetime_interval *it; + uint32_t freeUntilPos[ZREG_NUM]; + uint32_t pos, pos2; + zend_reg i, reg, reg2; + zend_reg hint = ZREG_NONE; + zend_regset low_priority_regs; + zend_life_range *range; + + if ((ssa->var_info[current->ssa_var].type & MAY_BE_ANY) == MAY_BE_DOUBLE) { + available = ZEND_REGSET_INTERSECTION(available, ZEND_REGSET_FP); + } else { + available = ZEND_REGSET_INTERSECTION(available, ZEND_REGSET_GP); + } + + /* TODO: Allow usage of preserved registers ??? + * Their values have to be stored in prologuee and restored in epilogue + */ + available = ZEND_REGSET_DIFFERENCE(available, ZEND_REGSET_PRESERVED); + + if (ZEND_REGSET_IS_EMPTY(available)) { + return 0; + } + + /* Set freeUntilPos of all physical registers to maxInt */ + for (i = 0; i < ZREG_NUM; i++) { + freeUntilPos[i] = 0xffffffff; + } + + /* for each interval it in active do */ + /* freeUntilPos[it.reg] = 0 */ + it = active; + if (ssa->vars[current->ssa_var].definition == current->range.start) { + while (it) { + if (current->range.start != zend_interval_end(it)) { + freeUntilPos[it->reg] = 0; + } else if (zend_jit_may_reuse_reg(ssa_opcodes[current->range.start], ssa->ops + current->range.start, ssa, current->ssa_var, it->ssa_var)) { + if (!ZEND_REGSET_IN(*hints, it->reg) && + /* TODO: Avoid most often scratch registers. Find a better way ??? */ + (!current->used_as_hint || + (it->reg != ZREG_R0 && it->reg != ZREG_R1 && it->reg != ZREG_XMM0 && it->reg != ZREG_XMM1))) { + hint = it->reg; + } + } else { + freeUntilPos[it->reg] = 0; + } + it = it->list_next; + } + } else { + while (it) { + freeUntilPos[it->reg] = 0; + it = it->list_next; + } + } + if (current->hint) { + hint = current->hint->reg; + if (hint != ZREG_NONE && current->hint->used_as_hint == current) { + ZEND_REGSET_EXCL(*hints, hint); + } + } + + /* See "Linear Scan Register Allocation on SSA Form", Christian Wimmer and + Michael Franz, CGO'10 (2010), Figure 6. */ + if (current->split) { + /* for each interval it in inactive intersecting with current do */ + /* freeUntilPos[it.reg] = next intersection of it with current */ + it = inactive; + while (it) { + uint32_t next = zend_interval_intersection(current, it); + + //ZEND_ASSERT(next != 0xffffffff && !current->split); + if (next < freeUntilPos[it->reg]) { + freeUntilPos[it->reg] = next; + } + it = it->list_next; + } + } + + /* Handle Scratch Registers */ + /* TODO: Optimize ??? */ + range = ¤t->range; + do { + uint32_t line = range->start; + zend_regset regset; + zend_reg reg; + + if (ssa->ops[line].op1_def == current->ssa_var || + ssa->ops[line].op2_def == current->ssa_var || + ssa->ops[line].result_def == current->ssa_var) { + line++; + } + while (line <= range->end) { + regset = zend_jit_get_scratch_regset( + ssa_opcodes[line], + ssa->ops + line, + // TODO: Support for nested call frames ??? + trace_buffer->op_array, ssa, current->ssa_var); + ZEND_REGSET_FOREACH(regset, reg) { + if (line < freeUntilPos[reg]) { + freeUntilPos[reg] = line; + } + } ZEND_REGSET_FOREACH_END(); + line++; + } + range = range->next; + } while (range); + +#if 0 + /* Coalesing */ + if (ssa->vars[current->ssa_var].definition == current->start) { + zend_op *opline = op_array->opcodes + current->start; + int hint = -1; + + switch (opline->opcode) { + case ZEND_ASSIGN: + hint = ssa->ops[current->start].op2_use; + case ZEND_QM_ASSIGN: + hint = ssa->ops[current->start].op1_use; + break; + case ZEND_ADD: + case ZEND_SUB: + case ZEND_MUL: + hint = ssa->ops[current->start].op1_use; + break; + case ZEND_ASSIGN_OP: + if (opline->extended_value == ZEND_ADD + || opline->extended_value == ZEND_SUB + || opline->extended_value == ZEND_MUL) { + hint = ssa->ops[current->start].op1_use; + } + break; + } + if (hint >= 0) { + } + } +#endif + + if (hint != ZREG_NONE && freeUntilPos[hint] > zend_interval_end(current)) { + current->reg = hint; + if (current->used_as_hint) { + ZEND_REGSET_INCL(*hints, hint); + } + return 1; + } + + pos = 0; reg = ZREG_NONE; + pos2 = 0; reg2 = ZREG_NONE; + low_priority_regs = *hints; + if (current->used_as_hint) { + /* TODO: Avoid most often scratch registers. Find a better way ??? */ + ZEND_REGSET_INCL(low_priority_regs, ZREG_R0); + ZEND_REGSET_INCL(low_priority_regs, ZREG_R1); + ZEND_REGSET_INCL(low_priority_regs, ZREG_XMM0); + ZEND_REGSET_INCL(low_priority_regs, ZREG_XMM1); + } + + ZEND_REGSET_FOREACH(available, i) { + if (ZEND_REGSET_IN(low_priority_regs, i)) { + if (freeUntilPos[i] > pos2) { + reg2 = i; + pos2 = freeUntilPos[i]; + } + } else if (freeUntilPos[i] > pos) { + reg = i; + pos = freeUntilPos[i]; + } + } ZEND_REGSET_FOREACH_END(); + + if (reg == ZREG_NONE) { + if (reg2 != ZREG_NONE) { + reg = reg2; + pos = pos2; + reg2 = ZREG_NONE; + } + } + + if (reg == ZREG_NONE) { + /* no register available without spilling */ + return 0; + } else if (zend_interval_end(current) < pos) { + /* register available for the whole interval */ + current->reg = reg; + if (current->used_as_hint) { + ZEND_REGSET_INCL(*hints, reg); + } + return 1; +#if 0 + // TODO: allow low prioirity register usage + } else if (reg2 != ZREG_NONE && zend_interval_end(current) < pos2) { + /* register available for the whole interval */ + current->reg = reg2; + if (current->used_as_hint) { + ZEND_REGSET_INCL(*hints, reg2); + } + return 1; +#endif + } else { + /* TODO: enable interval splitting ??? */ + /* register available for the first part of the interval */ + if (1 || zend_jit_split_interval(current, pos, list, free) != SUCCESS) { + return 0; + } + current->reg = reg; + if (current->used_as_hint) { + ZEND_REGSET_INCL(*hints, reg); + } + return 1; + } +} + +static zend_lifetime_interval* zend_jit_trace_linear_scan(zend_jit_trace_rec *trace_buffer, const zend_op **ssa_opcodes, zend_ssa *ssa, zend_lifetime_interval *list) +{ + zend_lifetime_interval *unhandled, *active, *inactive, *handled, *free; + zend_lifetime_interval *current, **p, *q; + uint32_t position; + zend_regset available = ZEND_REGSET_UNION(ZEND_REGSET_GP, ZEND_REGSET_FP); + zend_regset hints = ZEND_REGSET_EMPTY; + + unhandled = list; + /* active = inactive = handled = free = {} */ + active = inactive = handled = free = NULL; + while (unhandled != NULL) { + current = unhandled; + unhandled = unhandled->list_next; + position = current->range.start; + + p = &active; + while (*p) { + uint32_t end = zend_interval_end(*p); + + q = *p; + if (end < position) { + /* move ival from active to handled */ + ZEND_REGSET_INCL(available, q->reg); + *p = q->list_next; + q->list_next = handled; + handled = q; + } else if (!zend_interval_covers(q, position)) { + /* move ival from active to inactive */ + ZEND_REGSET_INCL(available, q->reg); + *p = q->list_next; + q->list_next = inactive; + inactive = q; + } else { + p = &q->list_next; + } + } + + p = &inactive; + while (*p) { + uint32_t end = zend_interval_end(*p); + + q = *p; + if (end < position) { + /* move ival from inactive to handled */ + *p = q->list_next; + q->list_next = handled; + handled = q; + } else if (zend_interval_covers(q, position)) { + /* move ival from inactive to active */ + ZEND_REGSET_EXCL(available, q->reg); + *p = q->list_next; + q->list_next = active; + active = q; + } else { + p = &q->list_next; + } + } + + if (zend_jit_trace_try_allocate_free_reg(trace_buffer, ssa_opcodes, ssa, current, available, &hints, active, inactive, &unhandled, &free) || + zend_jit_allocate_blocked_reg()) { + ZEND_REGSET_EXCL(available, current->reg); + current->list_next = active; + active = current; + } else { + current->list_next = free; + free = current; + } + } + + /* move active to handled */ + while (active) { + current = active; + active = active->list_next; + current->list_next = handled; + handled = current; + } + + /* move inactive to handled */ + while (inactive) { + current = inactive; + inactive = inactive->list_next; + current->list_next = handled; + handled = current; + } + + return handled; +} + +static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace_rec *trace_buffer, zend_ssa *ssa) +{ + const zend_op **ssa_opcodes = ((zend_tssa*)ssa)->tssa_opcodes; + zend_jit_trace_rec *p; + const zend_op_array *op_array; + const zend_ssa_op *ssa_op; + int i, j, idx, count, level; + int *start, *end; + zend_lifetime_interval **intervals, *list; + void *checkpoint; + ALLOCA_FLAG(use_heap); + + ZEND_ASSERT(ssa->var_info != NULL); + + start =do_alloca(sizeof(int) * ssa->vars_count * 2, use_heap); + if (!start) { + return NULL; + } + end = start + ssa->vars_count; + + memset(start, -1, sizeof(int) * ssa->vars_count * 2); + + op_array = trace_buffer->op_array; + count = 0; + + i = 0; + j = op_array->last_var; + if (trace_buffer->start != ZEND_JIT_TRACE_START_ENTER) { + j += op_array->T; + } + while (i < j) { + /* We don't start intervals for variables used in Phi */ + if ((ssa->vars[i].use_chain >= 0 /*|| ssa->vars[i].phi_use_chain*/) + && zend_jit_var_supports_reg(ssa, i)) { + start[i] = 0; + count++; + } + i++; + } + + if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) { + zend_ssa_phi *phi = ssa->blocks[1].phis; + + while (phi) { + if (ssa->vars[phi->ssa_var].use_chain >= 0 + && zend_jit_var_supports_reg(ssa, phi->ssa_var)) { + start[phi->ssa_var] = 0; + count++; + } + phi = phi->next; + } + } + + p = trace_buffer + ZEND_JIT_TRACE_START_REC_SIZE; + level = 0; + ssa_op = ssa->ops; + idx = 0; + for (;;p++) { + if (p->op == ZEND_JIT_TRACE_VM) { + const zend_op *opline = p->opline; + int len; + zend_bool support_opline; + + support_opline = + zend_jit_opline_supports_reg(op_array, ssa, opline, ssa_op); + if (support_opline) { + if (ssa_op->op1_use >= 0 + && start[ssa_op->op1_use] >= 0 + && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op1_use)) { + end[ssa_op->op1_use] = idx; + } + if (ssa_op->op2_use >= 0 + && start[ssa_op->op2_use] >= 0 + && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op2_use)) { + end[ssa_op->op2_use] = idx; + } + if (ssa_op->result_use >= 0 + && start[ssa_op->result_use] >= 0 + && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->result_use)) { + end[ssa_op->result_use] = idx; + } + if (ssa_op->result_def >= 0 + && (ssa->vars[ssa_op->result_def].use_chain >= 0 + || ssa->vars[ssa_op->result_def].phi_use_chain) + && zend_jit_var_supports_reg(ssa, ssa_op->result_def)) { + start[ssa_op->result_def] = idx; + count++; + } + if (ssa_op->op1_def >= 0 + && (ssa->vars[ssa_op->op1_def].use_chain >= 0 + || ssa->vars[ssa_op->op1_def].phi_use_chain) + && zend_jit_var_supports_reg(ssa, ssa_op->op1_def)) { + start[ssa_op->op1_def] = idx; + count++; + } + if (ssa_op->op2_def >= 0 + && (ssa->vars[ssa_op->op2_def].use_chain >= 0 + || ssa->vars[ssa_op->op2_def].phi_use_chain) + && zend_jit_var_supports_reg(ssa, ssa_op->op2_def)) { + start[ssa_op->op2_def] = idx; + count++; + } + } else { + if (ssa_op->op1_use >= 0 + && start[ssa_op->op1_use] >= 0 + && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op1_use)) { + start[ssa_op->op1_use] = -1; + end[ssa_op->op1_use] = -1; + count--; + } + if (ssa_op->op2_use >= 0 + && start[ssa_op->op2_use] >= 0 + && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op2_use)) { + start[ssa_op->op2_use] = -1; + end[ssa_op->op2_use] = -1; + count--; + } + if (ssa_op->result_use >= 0 + && start[ssa_op->result_use] >= 0 + && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->result_use)) { + start[ssa_op->result_use] = -1; + end[ssa_op->result_use] = -1; + count--; + } + } + + len = zend_jit_trace_op_len(opline); + switch (opline->opcode) { + case ZEND_ASSIGN_DIM: + case ZEND_ASSIGN_OBJ: + case ZEND_ASSIGN_STATIC_PROP: + case ZEND_ASSIGN_DIM_OP: + case ZEND_ASSIGN_OBJ_OP: + case ZEND_ASSIGN_STATIC_PROP_OP: + case ZEND_ASSIGN_OBJ_REF: + case ZEND_ASSIGN_STATIC_PROP_REF: + /* OP_DATA */ + ssa_op++; + opline++; + if (support_opline) { + if (ssa_op->op1_use >= 0 + && start[ssa_op->op1_use] >= 0 + && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op1_use)) { + end[ssa_op->op1_use] = idx; + } + if (ssa_op->op1_def >= 0 + && (ssa->vars[ssa_op->op1_def].use_chain >= 0 + || ssa->vars[ssa_op->op1_def].phi_use_chain) + && zend_jit_var_supports_reg(ssa, ssa_op->op1_def)) { + start[ssa_op->op1_def] = idx; + count++; + } + } else { + if (ssa_op->op1_use >= 0 + && start[ssa_op->op1_use] >= 0 + && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op1_use)) { + start[ssa_op->op1_use] = -1; + end[ssa_op->op1_use] = -1; + count--; + } + } + ssa_op++; + opline++; + idx+=2; + break; + case ZEND_RECV_INIT: + ssa_op++; + opline++; + idx++; + while (opline->opcode == ZEND_RECV_INIT) { + /* RECV_INIT doesn't support registers */ + ssa_op++; + opline++; + idx++; + } + break; + case ZEND_BIND_GLOBAL: + ssa_op++; + opline++; + idx++; + while (opline->opcode == ZEND_BIND_GLOBAL) { + /* BIND_GLOBAL doesn't support registers */ + ssa_op++; + opline++; + idx++; + } + break; + default: + ssa_op += len; + idx += len; + break; + } + } else if (p->op == ZEND_JIT_TRACE_ENTER) { + op_array = p->op_array; + /* New call frames */ + i = op_array->last_var; + j = p->first_ssa_var; + while (i) { + if (ssa->vars[j].use_chain >= 0 + && zend_jit_var_supports_reg(ssa, j)) { + start[j] = idx; + count++; + } + j++; + i--; + } + level++; + } else if (p->op == ZEND_JIT_TRACE_BACK) { + // TODO: Close exiting call frames ??? + op_array = p->op_array; + if (level == 0) { + /* New return frames */ + i = op_array->last_var + op_array->T; + j = p->first_ssa_var; + while (i) { + if (ssa->vars[j].use_chain >= 0 + && zend_jit_var_supports_reg(ssa, j)) { + start[j] = idx; + count++; + } + j++; + i--; + } + } else { + level--; + } + } else if (p->op == ZEND_JIT_TRACE_END) { + break; + } + } + + if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) { + zend_ssa_phi *phi = ssa->blocks[1].phis; + + while (phi) { + if (start[phi->sources[1]] >= 0) { + end[phi->sources[1]] = idx - 1; + } + phi = phi->next; + } + } + + if (!count) { + free_alloca(start, use_heap); + return NULL; + } + + checkpoint = zend_arena_checkpoint(CG(arena)); + intervals = zend_arena_calloc(&CG(arena), ssa->vars_count, sizeof(zend_lifetime_interval)); + memset(intervals, 0, sizeof(zend_lifetime_interval*) * ssa->vars_count); + list = zend_arena_alloc(&CG(arena), sizeof(zend_lifetime_interval) * count); + j = 0; +//fprintf(stderr, "(%d)\n", count); + for (i = 0; i < ssa->vars_count; i++) { + if (start[i] >= 0) { + if (end[i] < 0) { + // TODO: ??? + end[i] = idx; + // continue; + } +//fprintf(stderr, "#%d: %d..%d\n", i, start[i], end[i]); + ZEND_ASSERT(j < count); + intervals[i] = &list[j]; + list[j].ssa_var = i; + list[j].reg = ZREG_NONE; + list[j].split = 0; + list[j].store = 0; + list[j].load = 0; + list[j].range.start = start[i]; + list[j].range.end = end[i]; + list[j].range.next = NULL; + list[j].hint = NULL; + list[j].used_as_hint = NULL; + list[j].list_next = NULL; + j++; + } + } + ZEND_ASSERT(j == count); + free_alloca(start, use_heap); + start = end = NULL; + + /* Add hints */ + if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) { + zend_ssa_phi *phi = ssa->blocks[1].phis; + + while (phi) { + if (intervals[phi->ssa_var]) { + if (intervals[phi->sources[1]]) { + intervals[phi->sources[1]]->hint = intervals[phi->ssa_var]; + } + } + phi = phi->next; + } + } + + for (i = 0; i < ssa->vars_count; i++) { + if (intervals[i] && !intervals[i]->hint) { + + if (ssa->vars[i].definition >= 0) { + uint32_t line = ssa->vars[i].definition; + const zend_op *opline = ssa_opcodes[line]; + + switch (opline->opcode) { + case ZEND_QM_ASSIGN: + case ZEND_POST_INC: + case ZEND_POST_DEC: + if (ssa->ops[line].op1_use >= 0 && + intervals[ssa->ops[line].op1_use] && + (i == ssa->ops[line].op1_def || + (i == ssa->ops[line].result_def && + (ssa->ops[line].op1_def < 0 || + !intervals[ssa->ops[line].op1_def])))) { + zend_jit_add_hint(intervals, i, ssa->ops[line].op1_use); + } + break; + case ZEND_SEND_VAR: + case ZEND_PRE_INC: + case ZEND_PRE_DEC: + if (i == ssa->ops[line].op1_def && + ssa->ops[line].op1_use >= 0 && + intervals[ssa->ops[line].op1_use]) { + zend_jit_add_hint(intervals, i, ssa->ops[line].op1_use); + } + break; + case ZEND_ASSIGN: + if (ssa->ops[line].op2_use >= 0 && + intervals[ssa->ops[line].op2_use] && + (i == ssa->ops[line].op2_def || + (i == ssa->ops[line].op1_def && + (ssa->ops[line].op2_def < 0 || + !intervals[ssa->ops[line].op2_def])) || + (i == ssa->ops[line].result_def && + (ssa->ops[line].op2_def < 0 || + !intervals[ssa->ops[line].op2_def]) && + (ssa->ops[line].op1_def < 0 || + !intervals[ssa->ops[line].op1_def])))) { + zend_jit_add_hint(intervals, i, ssa->ops[line].op2_use); + } + break; + } + } + } + } + + list = zend_jit_sort_intervals(intervals, ssa->vars_count); + + if (list) { + zend_lifetime_interval *ival = list; + while (ival) { + if (ival->hint) { + ival->hint->used_as_hint = ival; + } + ival = ival->list_next; + } + + if (ZCG(accel_directives).jit_debug & ZEND_JIT_DEBUG_REG_ALLOC) { + // TODO: Support for nested call frames ??? + op_array = trace_buffer->op_array; + ival = list; + while (ival) { + zend_life_range *range; + int var_num = ssa->vars[ival->ssa_var].var; + + fprintf(stderr, "#%d.", ival->ssa_var); + // TODO: Support for nested call frames ??? + zend_dump_var(op_array, (var_num < op_array->last_var ? IS_CV : 0), var_num); + fprintf(stderr, ": %u-%u", ival->range.start, ival->range.end); + range = ival->range.next; + while (range) { + fprintf(stderr, ", %u-%u", range->start, range->end); + range = range->next; + } + if (ival->load) { + fprintf(stderr, " load"); + } + if (ival->store) { + fprintf(stderr, " store"); + } + if (ival->hint) { + var_num = ssa->vars[ival->hint->ssa_var].var; + fprintf(stderr, " hint=#%d.", ival->hint->ssa_var); + // TODO: Support for nested call frames ??? + zend_dump_var(op_array, (var_num < op_array->last_var ? IS_CV : 0), var_num); + } + fprintf(stderr, "\n"); + ival = ival->list_next; + } + fprintf(stderr, "\n"); + } + } + + /* Linear Scan Register Allocation */ + list = zend_jit_trace_linear_scan(trace_buffer, ssa_opcodes, ssa, list); + + if (list) { + zend_lifetime_interval *ival, *next; + + memset(intervals, 0, ssa->vars_count * sizeof(zend_lifetime_interval*)); + ival = list; + while (ival != NULL) { + ZEND_ASSERT(ival->reg != ZREG_NONE); + next = ival->list_next; + ival->list_next = intervals[ival->ssa_var]; + intervals[ival->ssa_var] = ival; + ival = next; + } + + /* SSA resolution */ + if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) { + zend_ssa_phi *phi = ssa->blocks[1].phis; + + while (phi) { + int def = phi->ssa_var; + int use = phi->sources[1]; + + if (intervals[def]) { + if (!intervals[use]) { + intervals[def]->load = 1; + } else if (intervals[def]->reg != intervals[use]->reg) { + intervals[def]->load = 1; + intervals[use]->store = 1; + } + } else if (intervals[use]) { + intervals[use]->store = 1; + } + phi = phi->next; + } + } + + // Remove useless register allocation ??? + // Remove intervals used once ??? + + if (ZCG(accel_directives).jit_debug & ZEND_JIT_DEBUG_REG_ALLOC) { + // TODO: Support for nested call frames ??? + fprintf(stderr, "---- TRACE %d Allocated Live Ranges\n", ZEND_JIT_TRACE_NUM); + for (i = 0; i < ssa->vars_count; i++) { + ival = intervals[i]; + while (ival) { + zend_life_range *range; + int var_num = ssa->vars[ival->ssa_var].var; + + fprintf(stderr, "#%d.", ival->ssa_var); + zend_dump_var(op_array, (var_num < op_array->last_var ? IS_CV : 0), var_num); + fprintf(stderr, ": %u-%u", ival->range.start, ival->range.end); + range = ival->range.next; + while (range) { + fprintf(stderr, ", %u-%u", range->start, range->end); + range = range->next; + } + fprintf(stderr, " (%s)", zend_reg_name[ival->reg]); + if (ival->load) { + fprintf(stderr, " load"); + } + if (ival->store) { + fprintf(stderr, " store"); + } + if (ival->hint) { + var_num = ssa->vars[ival->hint->ssa_var].var; + fprintf(stderr, " hint=#%d.", ival->hint->ssa_var); + zend_dump_var(op_array, (var_num < op_array->last_var ? IS_CV : 0), var_num); + if (ival->hint->reg != ZREG_NONE) { + fprintf(stderr, " (%s)", zend_reg_name[ival->hint->reg]); + } + } + fprintf(stderr, "\n"); + ival = ival->list_next; + } + } + fprintf(stderr, "\n"); + } + + return intervals; + } + + zend_arena_release(&CG(arena), checkpoint); //??? + return NULL; +} + static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t parent_trace, uint32_t exit_num) { const void *handler = NULL; @@ -1711,6 +2495,11 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par ssa = zend_jit_trace_build_tssa(trace_buffer, parent_trace, exit_num, script, op_arrays, &num_op_arrays); + /* Register allocation */ + if (zend_jit_reg_alloc) { + ra = zend_jit_trace_allocate_registers(trace_buffer, ssa); + } + p = trace_buffer; ZEND_ASSERT(p->op == ZEND_JIT_TRACE_START); op_array = p->op_array; @@ -1772,8 +2561,6 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par (zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(op_array); op_array_ssa = &jit_extension->func_info.ssa; - // TODO: register allocation ??? - dasm_growpc(&dasm_state, 1); /* trace needs just one global label for loop */ zend_jit_align_func(&dasm_state); @@ -1817,6 +2604,14 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par SET_STACK_TYPE(stack, i, concrete_type(info)); } } + if (ra) { + zend_ssa_phi *phi = ssa->vars[i].phi_use_chain; + if (phi && ra[phi->ssa_var] && !ra[phi->ssa_var]->load) { + if (!zend_jit_load_var(&dasm_state, ssa->var_info[i].type, i, ra[phi->ssa_var]->reg)) { + goto jit_failure; + } + } + } } } From cff7703a6185803e22bd3543d5bcd114d0a6f514 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 7 Apr 2020 21:34:18 +0300 Subject: [PATCH 058/338] Revert "cleanup" (wrong commit) This reverts commit 5db5f71f2831df4d32484a5638f6f6aa72e364a5. --- ext/opcache/jit/zend_jit_trace.c | 801 +------------------------------ 1 file changed, 3 insertions(+), 798 deletions(-) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 9f17f681d687f..171ecd7d51b7f 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -803,11 +803,6 @@ static int is_checked_guard(const zend_ssa *tssa, const zend_op **ssa_opcodes, u return 0; } -typedef struct _zend_tssa { - zend_ssa ssa; - const zend_op **tssa_opcodes; -} zend_tssa; - static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uint32_t parent_trace, uint32_t exit_num, zend_script *script, const zend_op_array **op_arrays, int *num_op_arrays_ptr) { zend_ssa *tssa; @@ -918,7 +913,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin *num_op_arrays_ptr = num_op_arrays; /* 2. Construct TSSA */ - tssa = zend_arena_calloc(&CG(arena), 1, sizeof(zend_tssa)); + tssa = zend_arena_calloc(&CG(arena), 1, sizeof(zend_ssa)); tssa->cfg.blocks = zend_arena_calloc(&CG(arena), 2, sizeof(zend_basic_block)); tssa->blocks = zend_arena_calloc(&CG(arena), 2, sizeof(zend_ssa_block)); tssa->cfg.predecessors = zend_arena_calloc(&CG(arena), 2, sizeof(int)); @@ -926,7 +921,6 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin memset(ssa_ops, -1, ssa_ops_count * sizeof(zend_ssa_op)); ssa_opcodes = zend_arena_calloc(&CG(arena), ssa_ops_count, sizeof(zend_op*)); JIT_G(current_frame) = frame = (zend_jit_trace_stack_frame*)((char*)zend_arena_alloc(&CG(arena), stack_bottom + stack_size) + stack_bottom); - ((zend_tssa*)tssa)->tssa_opcodes = ssa_opcodes; if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) { tssa->cfg.blocks_count = 2; @@ -1684,784 +1678,6 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin return tssa; } -static int zend_jit_trace_try_allocate_free_reg(zend_jit_trace_rec *trace_buffer, const zend_op **ssa_opcodes, zend_ssa *ssa, zend_lifetime_interval *current, zend_regset available, zend_regset *hints, zend_lifetime_interval *active, zend_lifetime_interval *inactive, zend_lifetime_interval **list, zend_lifetime_interval **free) -{ - zend_lifetime_interval *it; - uint32_t freeUntilPos[ZREG_NUM]; - uint32_t pos, pos2; - zend_reg i, reg, reg2; - zend_reg hint = ZREG_NONE; - zend_regset low_priority_regs; - zend_life_range *range; - - if ((ssa->var_info[current->ssa_var].type & MAY_BE_ANY) == MAY_BE_DOUBLE) { - available = ZEND_REGSET_INTERSECTION(available, ZEND_REGSET_FP); - } else { - available = ZEND_REGSET_INTERSECTION(available, ZEND_REGSET_GP); - } - - /* TODO: Allow usage of preserved registers ??? - * Their values have to be stored in prologuee and restored in epilogue - */ - available = ZEND_REGSET_DIFFERENCE(available, ZEND_REGSET_PRESERVED); - - if (ZEND_REGSET_IS_EMPTY(available)) { - return 0; - } - - /* Set freeUntilPos of all physical registers to maxInt */ - for (i = 0; i < ZREG_NUM; i++) { - freeUntilPos[i] = 0xffffffff; - } - - /* for each interval it in active do */ - /* freeUntilPos[it.reg] = 0 */ - it = active; - if (ssa->vars[current->ssa_var].definition == current->range.start) { - while (it) { - if (current->range.start != zend_interval_end(it)) { - freeUntilPos[it->reg] = 0; - } else if (zend_jit_may_reuse_reg(ssa_opcodes[current->range.start], ssa->ops + current->range.start, ssa, current->ssa_var, it->ssa_var)) { - if (!ZEND_REGSET_IN(*hints, it->reg) && - /* TODO: Avoid most often scratch registers. Find a better way ??? */ - (!current->used_as_hint || - (it->reg != ZREG_R0 && it->reg != ZREG_R1 && it->reg != ZREG_XMM0 && it->reg != ZREG_XMM1))) { - hint = it->reg; - } - } else { - freeUntilPos[it->reg] = 0; - } - it = it->list_next; - } - } else { - while (it) { - freeUntilPos[it->reg] = 0; - it = it->list_next; - } - } - if (current->hint) { - hint = current->hint->reg; - if (hint != ZREG_NONE && current->hint->used_as_hint == current) { - ZEND_REGSET_EXCL(*hints, hint); - } - } - - /* See "Linear Scan Register Allocation on SSA Form", Christian Wimmer and - Michael Franz, CGO'10 (2010), Figure 6. */ - if (current->split) { - /* for each interval it in inactive intersecting with current do */ - /* freeUntilPos[it.reg] = next intersection of it with current */ - it = inactive; - while (it) { - uint32_t next = zend_interval_intersection(current, it); - - //ZEND_ASSERT(next != 0xffffffff && !current->split); - if (next < freeUntilPos[it->reg]) { - freeUntilPos[it->reg] = next; - } - it = it->list_next; - } - } - - /* Handle Scratch Registers */ - /* TODO: Optimize ??? */ - range = ¤t->range; - do { - uint32_t line = range->start; - zend_regset regset; - zend_reg reg; - - if (ssa->ops[line].op1_def == current->ssa_var || - ssa->ops[line].op2_def == current->ssa_var || - ssa->ops[line].result_def == current->ssa_var) { - line++; - } - while (line <= range->end) { - regset = zend_jit_get_scratch_regset( - ssa_opcodes[line], - ssa->ops + line, - // TODO: Support for nested call frames ??? - trace_buffer->op_array, ssa, current->ssa_var); - ZEND_REGSET_FOREACH(regset, reg) { - if (line < freeUntilPos[reg]) { - freeUntilPos[reg] = line; - } - } ZEND_REGSET_FOREACH_END(); - line++; - } - range = range->next; - } while (range); - -#if 0 - /* Coalesing */ - if (ssa->vars[current->ssa_var].definition == current->start) { - zend_op *opline = op_array->opcodes + current->start; - int hint = -1; - - switch (opline->opcode) { - case ZEND_ASSIGN: - hint = ssa->ops[current->start].op2_use; - case ZEND_QM_ASSIGN: - hint = ssa->ops[current->start].op1_use; - break; - case ZEND_ADD: - case ZEND_SUB: - case ZEND_MUL: - hint = ssa->ops[current->start].op1_use; - break; - case ZEND_ASSIGN_OP: - if (opline->extended_value == ZEND_ADD - || opline->extended_value == ZEND_SUB - || opline->extended_value == ZEND_MUL) { - hint = ssa->ops[current->start].op1_use; - } - break; - } - if (hint >= 0) { - } - } -#endif - - if (hint != ZREG_NONE && freeUntilPos[hint] > zend_interval_end(current)) { - current->reg = hint; - if (current->used_as_hint) { - ZEND_REGSET_INCL(*hints, hint); - } - return 1; - } - - pos = 0; reg = ZREG_NONE; - pos2 = 0; reg2 = ZREG_NONE; - low_priority_regs = *hints; - if (current->used_as_hint) { - /* TODO: Avoid most often scratch registers. Find a better way ??? */ - ZEND_REGSET_INCL(low_priority_regs, ZREG_R0); - ZEND_REGSET_INCL(low_priority_regs, ZREG_R1); - ZEND_REGSET_INCL(low_priority_regs, ZREG_XMM0); - ZEND_REGSET_INCL(low_priority_regs, ZREG_XMM1); - } - - ZEND_REGSET_FOREACH(available, i) { - if (ZEND_REGSET_IN(low_priority_regs, i)) { - if (freeUntilPos[i] > pos2) { - reg2 = i; - pos2 = freeUntilPos[i]; - } - } else if (freeUntilPos[i] > pos) { - reg = i; - pos = freeUntilPos[i]; - } - } ZEND_REGSET_FOREACH_END(); - - if (reg == ZREG_NONE) { - if (reg2 != ZREG_NONE) { - reg = reg2; - pos = pos2; - reg2 = ZREG_NONE; - } - } - - if (reg == ZREG_NONE) { - /* no register available without spilling */ - return 0; - } else if (zend_interval_end(current) < pos) { - /* register available for the whole interval */ - current->reg = reg; - if (current->used_as_hint) { - ZEND_REGSET_INCL(*hints, reg); - } - return 1; -#if 0 - // TODO: allow low prioirity register usage - } else if (reg2 != ZREG_NONE && zend_interval_end(current) < pos2) { - /* register available for the whole interval */ - current->reg = reg2; - if (current->used_as_hint) { - ZEND_REGSET_INCL(*hints, reg2); - } - return 1; -#endif - } else { - /* TODO: enable interval splitting ??? */ - /* register available for the first part of the interval */ - if (1 || zend_jit_split_interval(current, pos, list, free) != SUCCESS) { - return 0; - } - current->reg = reg; - if (current->used_as_hint) { - ZEND_REGSET_INCL(*hints, reg); - } - return 1; - } -} - -static zend_lifetime_interval* zend_jit_trace_linear_scan(zend_jit_trace_rec *trace_buffer, const zend_op **ssa_opcodes, zend_ssa *ssa, zend_lifetime_interval *list) -{ - zend_lifetime_interval *unhandled, *active, *inactive, *handled, *free; - zend_lifetime_interval *current, **p, *q; - uint32_t position; - zend_regset available = ZEND_REGSET_UNION(ZEND_REGSET_GP, ZEND_REGSET_FP); - zend_regset hints = ZEND_REGSET_EMPTY; - - unhandled = list; - /* active = inactive = handled = free = {} */ - active = inactive = handled = free = NULL; - while (unhandled != NULL) { - current = unhandled; - unhandled = unhandled->list_next; - position = current->range.start; - - p = &active; - while (*p) { - uint32_t end = zend_interval_end(*p); - - q = *p; - if (end < position) { - /* move ival from active to handled */ - ZEND_REGSET_INCL(available, q->reg); - *p = q->list_next; - q->list_next = handled; - handled = q; - } else if (!zend_interval_covers(q, position)) { - /* move ival from active to inactive */ - ZEND_REGSET_INCL(available, q->reg); - *p = q->list_next; - q->list_next = inactive; - inactive = q; - } else { - p = &q->list_next; - } - } - - p = &inactive; - while (*p) { - uint32_t end = zend_interval_end(*p); - - q = *p; - if (end < position) { - /* move ival from inactive to handled */ - *p = q->list_next; - q->list_next = handled; - handled = q; - } else if (zend_interval_covers(q, position)) { - /* move ival from inactive to active */ - ZEND_REGSET_EXCL(available, q->reg); - *p = q->list_next; - q->list_next = active; - active = q; - } else { - p = &q->list_next; - } - } - - if (zend_jit_trace_try_allocate_free_reg(trace_buffer, ssa_opcodes, ssa, current, available, &hints, active, inactive, &unhandled, &free) || - zend_jit_allocate_blocked_reg()) { - ZEND_REGSET_EXCL(available, current->reg); - current->list_next = active; - active = current; - } else { - current->list_next = free; - free = current; - } - } - - /* move active to handled */ - while (active) { - current = active; - active = active->list_next; - current->list_next = handled; - handled = current; - } - - /* move inactive to handled */ - while (inactive) { - current = inactive; - inactive = inactive->list_next; - current->list_next = handled; - handled = current; - } - - return handled; -} - -static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace_rec *trace_buffer, zend_ssa *ssa) -{ - const zend_op **ssa_opcodes = ((zend_tssa*)ssa)->tssa_opcodes; - zend_jit_trace_rec *p; - const zend_op_array *op_array; - const zend_ssa_op *ssa_op; - int i, j, idx, count, level; - int *start, *end; - zend_lifetime_interval **intervals, *list; - void *checkpoint; - ALLOCA_FLAG(use_heap); - - ZEND_ASSERT(ssa->var_info != NULL); - - start =do_alloca(sizeof(int) * ssa->vars_count * 2, use_heap); - if (!start) { - return NULL; - } - end = start + ssa->vars_count; - - memset(start, -1, sizeof(int) * ssa->vars_count * 2); - - op_array = trace_buffer->op_array; - count = 0; - - i = 0; - j = op_array->last_var; - if (trace_buffer->start != ZEND_JIT_TRACE_START_ENTER) { - j += op_array->T; - } - while (i < j) { - /* We don't start intervals for variables used in Phi */ - if ((ssa->vars[i].use_chain >= 0 /*|| ssa->vars[i].phi_use_chain*/) - && zend_jit_var_supports_reg(ssa, i)) { - start[i] = 0; - count++; - } - i++; - } - - if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) { - zend_ssa_phi *phi = ssa->blocks[1].phis; - - while (phi) { - if (ssa->vars[phi->ssa_var].use_chain >= 0 - && zend_jit_var_supports_reg(ssa, phi->ssa_var)) { - start[phi->ssa_var] = 0; - count++; - } - phi = phi->next; - } - } - - p = trace_buffer + ZEND_JIT_TRACE_START_REC_SIZE; - level = 0; - ssa_op = ssa->ops; - idx = 0; - for (;;p++) { - if (p->op == ZEND_JIT_TRACE_VM) { - const zend_op *opline = p->opline; - int len; - zend_bool support_opline; - - support_opline = - zend_jit_opline_supports_reg(op_array, ssa, opline, ssa_op); - if (support_opline) { - if (ssa_op->op1_use >= 0 - && start[ssa_op->op1_use] >= 0 - && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op1_use)) { - end[ssa_op->op1_use] = idx; - } - if (ssa_op->op2_use >= 0 - && start[ssa_op->op2_use] >= 0 - && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op2_use)) { - end[ssa_op->op2_use] = idx; - } - if (ssa_op->result_use >= 0 - && start[ssa_op->result_use] >= 0 - && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->result_use)) { - end[ssa_op->result_use] = idx; - } - if (ssa_op->result_def >= 0 - && (ssa->vars[ssa_op->result_def].use_chain >= 0 - || ssa->vars[ssa_op->result_def].phi_use_chain) - && zend_jit_var_supports_reg(ssa, ssa_op->result_def)) { - start[ssa_op->result_def] = idx; - count++; - } - if (ssa_op->op1_def >= 0 - && (ssa->vars[ssa_op->op1_def].use_chain >= 0 - || ssa->vars[ssa_op->op1_def].phi_use_chain) - && zend_jit_var_supports_reg(ssa, ssa_op->op1_def)) { - start[ssa_op->op1_def] = idx; - count++; - } - if (ssa_op->op2_def >= 0 - && (ssa->vars[ssa_op->op2_def].use_chain >= 0 - || ssa->vars[ssa_op->op2_def].phi_use_chain) - && zend_jit_var_supports_reg(ssa, ssa_op->op2_def)) { - start[ssa_op->op2_def] = idx; - count++; - } - } else { - if (ssa_op->op1_use >= 0 - && start[ssa_op->op1_use] >= 0 - && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op1_use)) { - start[ssa_op->op1_use] = -1; - end[ssa_op->op1_use] = -1; - count--; - } - if (ssa_op->op2_use >= 0 - && start[ssa_op->op2_use] >= 0 - && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op2_use)) { - start[ssa_op->op2_use] = -1; - end[ssa_op->op2_use] = -1; - count--; - } - if (ssa_op->result_use >= 0 - && start[ssa_op->result_use] >= 0 - && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->result_use)) { - start[ssa_op->result_use] = -1; - end[ssa_op->result_use] = -1; - count--; - } - } - - len = zend_jit_trace_op_len(opline); - switch (opline->opcode) { - case ZEND_ASSIGN_DIM: - case ZEND_ASSIGN_OBJ: - case ZEND_ASSIGN_STATIC_PROP: - case ZEND_ASSIGN_DIM_OP: - case ZEND_ASSIGN_OBJ_OP: - case ZEND_ASSIGN_STATIC_PROP_OP: - case ZEND_ASSIGN_OBJ_REF: - case ZEND_ASSIGN_STATIC_PROP_REF: - /* OP_DATA */ - ssa_op++; - opline++; - if (support_opline) { - if (ssa_op->op1_use >= 0 - && start[ssa_op->op1_use] >= 0 - && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op1_use)) { - end[ssa_op->op1_use] = idx; - } - if (ssa_op->op1_def >= 0 - && (ssa->vars[ssa_op->op1_def].use_chain >= 0 - || ssa->vars[ssa_op->op1_def].phi_use_chain) - && zend_jit_var_supports_reg(ssa, ssa_op->op1_def)) { - start[ssa_op->op1_def] = idx; - count++; - } - } else { - if (ssa_op->op1_use >= 0 - && start[ssa_op->op1_use] >= 0 - && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op1_use)) { - start[ssa_op->op1_use] = -1; - end[ssa_op->op1_use] = -1; - count--; - } - } - ssa_op++; - opline++; - idx+=2; - break; - case ZEND_RECV_INIT: - ssa_op++; - opline++; - idx++; - while (opline->opcode == ZEND_RECV_INIT) { - /* RECV_INIT doesn't support registers */ - ssa_op++; - opline++; - idx++; - } - break; - case ZEND_BIND_GLOBAL: - ssa_op++; - opline++; - idx++; - while (opline->opcode == ZEND_BIND_GLOBAL) { - /* BIND_GLOBAL doesn't support registers */ - ssa_op++; - opline++; - idx++; - } - break; - default: - ssa_op += len; - idx += len; - break; - } - } else if (p->op == ZEND_JIT_TRACE_ENTER) { - op_array = p->op_array; - /* New call frames */ - i = op_array->last_var; - j = p->first_ssa_var; - while (i) { - if (ssa->vars[j].use_chain >= 0 - && zend_jit_var_supports_reg(ssa, j)) { - start[j] = idx; - count++; - } - j++; - i--; - } - level++; - } else if (p->op == ZEND_JIT_TRACE_BACK) { - // TODO: Close exiting call frames ??? - op_array = p->op_array; - if (level == 0) { - /* New return frames */ - i = op_array->last_var + op_array->T; - j = p->first_ssa_var; - while (i) { - if (ssa->vars[j].use_chain >= 0 - && zend_jit_var_supports_reg(ssa, j)) { - start[j] = idx; - count++; - } - j++; - i--; - } - } else { - level--; - } - } else if (p->op == ZEND_JIT_TRACE_END) { - break; - } - } - - if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) { - zend_ssa_phi *phi = ssa->blocks[1].phis; - - while (phi) { - if (start[phi->sources[1]] >= 0) { - end[phi->sources[1]] = idx - 1; - } - phi = phi->next; - } - } - - if (!count) { - free_alloca(start, use_heap); - return NULL; - } - - checkpoint = zend_arena_checkpoint(CG(arena)); - intervals = zend_arena_calloc(&CG(arena), ssa->vars_count, sizeof(zend_lifetime_interval)); - memset(intervals, 0, sizeof(zend_lifetime_interval*) * ssa->vars_count); - list = zend_arena_alloc(&CG(arena), sizeof(zend_lifetime_interval) * count); - j = 0; -//fprintf(stderr, "(%d)\n", count); - for (i = 0; i < ssa->vars_count; i++) { - if (start[i] >= 0) { - if (end[i] < 0) { - // TODO: ??? - end[i] = idx; - // continue; - } -//fprintf(stderr, "#%d: %d..%d\n", i, start[i], end[i]); - ZEND_ASSERT(j < count); - intervals[i] = &list[j]; - list[j].ssa_var = i; - list[j].reg = ZREG_NONE; - list[j].split = 0; - list[j].store = 0; - list[j].load = 0; - list[j].range.start = start[i]; - list[j].range.end = end[i]; - list[j].range.next = NULL; - list[j].hint = NULL; - list[j].used_as_hint = NULL; - list[j].list_next = NULL; - j++; - } - } - ZEND_ASSERT(j == count); - free_alloca(start, use_heap); - start = end = NULL; - - /* Add hints */ - if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) { - zend_ssa_phi *phi = ssa->blocks[1].phis; - - while (phi) { - if (intervals[phi->ssa_var]) { - if (intervals[phi->sources[1]]) { - intervals[phi->sources[1]]->hint = intervals[phi->ssa_var]; - } - } - phi = phi->next; - } - } - - for (i = 0; i < ssa->vars_count; i++) { - if (intervals[i] && !intervals[i]->hint) { - - if (ssa->vars[i].definition >= 0) { - uint32_t line = ssa->vars[i].definition; - const zend_op *opline = ssa_opcodes[line]; - - switch (opline->opcode) { - case ZEND_QM_ASSIGN: - case ZEND_POST_INC: - case ZEND_POST_DEC: - if (ssa->ops[line].op1_use >= 0 && - intervals[ssa->ops[line].op1_use] && - (i == ssa->ops[line].op1_def || - (i == ssa->ops[line].result_def && - (ssa->ops[line].op1_def < 0 || - !intervals[ssa->ops[line].op1_def])))) { - zend_jit_add_hint(intervals, i, ssa->ops[line].op1_use); - } - break; - case ZEND_SEND_VAR: - case ZEND_PRE_INC: - case ZEND_PRE_DEC: - if (i == ssa->ops[line].op1_def && - ssa->ops[line].op1_use >= 0 && - intervals[ssa->ops[line].op1_use]) { - zend_jit_add_hint(intervals, i, ssa->ops[line].op1_use); - } - break; - case ZEND_ASSIGN: - if (ssa->ops[line].op2_use >= 0 && - intervals[ssa->ops[line].op2_use] && - (i == ssa->ops[line].op2_def || - (i == ssa->ops[line].op1_def && - (ssa->ops[line].op2_def < 0 || - !intervals[ssa->ops[line].op2_def])) || - (i == ssa->ops[line].result_def && - (ssa->ops[line].op2_def < 0 || - !intervals[ssa->ops[line].op2_def]) && - (ssa->ops[line].op1_def < 0 || - !intervals[ssa->ops[line].op1_def])))) { - zend_jit_add_hint(intervals, i, ssa->ops[line].op2_use); - } - break; - } - } - } - } - - list = zend_jit_sort_intervals(intervals, ssa->vars_count); - - if (list) { - zend_lifetime_interval *ival = list; - while (ival) { - if (ival->hint) { - ival->hint->used_as_hint = ival; - } - ival = ival->list_next; - } - - if (ZCG(accel_directives).jit_debug & ZEND_JIT_DEBUG_REG_ALLOC) { - // TODO: Support for nested call frames ??? - op_array = trace_buffer->op_array; - ival = list; - while (ival) { - zend_life_range *range; - int var_num = ssa->vars[ival->ssa_var].var; - - fprintf(stderr, "#%d.", ival->ssa_var); - // TODO: Support for nested call frames ??? - zend_dump_var(op_array, (var_num < op_array->last_var ? IS_CV : 0), var_num); - fprintf(stderr, ": %u-%u", ival->range.start, ival->range.end); - range = ival->range.next; - while (range) { - fprintf(stderr, ", %u-%u", range->start, range->end); - range = range->next; - } - if (ival->load) { - fprintf(stderr, " load"); - } - if (ival->store) { - fprintf(stderr, " store"); - } - if (ival->hint) { - var_num = ssa->vars[ival->hint->ssa_var].var; - fprintf(stderr, " hint=#%d.", ival->hint->ssa_var); - // TODO: Support for nested call frames ??? - zend_dump_var(op_array, (var_num < op_array->last_var ? IS_CV : 0), var_num); - } - fprintf(stderr, "\n"); - ival = ival->list_next; - } - fprintf(stderr, "\n"); - } - } - - /* Linear Scan Register Allocation */ - list = zend_jit_trace_linear_scan(trace_buffer, ssa_opcodes, ssa, list); - - if (list) { - zend_lifetime_interval *ival, *next; - - memset(intervals, 0, ssa->vars_count * sizeof(zend_lifetime_interval*)); - ival = list; - while (ival != NULL) { - ZEND_ASSERT(ival->reg != ZREG_NONE); - next = ival->list_next; - ival->list_next = intervals[ival->ssa_var]; - intervals[ival->ssa_var] = ival; - ival = next; - } - - /* SSA resolution */ - if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) { - zend_ssa_phi *phi = ssa->blocks[1].phis; - - while (phi) { - int def = phi->ssa_var; - int use = phi->sources[1]; - - if (intervals[def]) { - if (!intervals[use]) { - intervals[def]->load = 1; - } else if (intervals[def]->reg != intervals[use]->reg) { - intervals[def]->load = 1; - intervals[use]->store = 1; - } - } else if (intervals[use]) { - intervals[use]->store = 1; - } - phi = phi->next; - } - } - - // Remove useless register allocation ??? - // Remove intervals used once ??? - - if (ZCG(accel_directives).jit_debug & ZEND_JIT_DEBUG_REG_ALLOC) { - // TODO: Support for nested call frames ??? - fprintf(stderr, "---- TRACE %d Allocated Live Ranges\n", ZEND_JIT_TRACE_NUM); - for (i = 0; i < ssa->vars_count; i++) { - ival = intervals[i]; - while (ival) { - zend_life_range *range; - int var_num = ssa->vars[ival->ssa_var].var; - - fprintf(stderr, "#%d.", ival->ssa_var); - zend_dump_var(op_array, (var_num < op_array->last_var ? IS_CV : 0), var_num); - fprintf(stderr, ": %u-%u", ival->range.start, ival->range.end); - range = ival->range.next; - while (range) { - fprintf(stderr, ", %u-%u", range->start, range->end); - range = range->next; - } - fprintf(stderr, " (%s)", zend_reg_name[ival->reg]); - if (ival->load) { - fprintf(stderr, " load"); - } - if (ival->store) { - fprintf(stderr, " store"); - } - if (ival->hint) { - var_num = ssa->vars[ival->hint->ssa_var].var; - fprintf(stderr, " hint=#%d.", ival->hint->ssa_var); - zend_dump_var(op_array, (var_num < op_array->last_var ? IS_CV : 0), var_num); - if (ival->hint->reg != ZREG_NONE) { - fprintf(stderr, " (%s)", zend_reg_name[ival->hint->reg]); - } - } - fprintf(stderr, "\n"); - ival = ival->list_next; - } - } - fprintf(stderr, "\n"); - } - - return intervals; - } - - zend_arena_release(&CG(arena), checkpoint); //??? - return NULL; -} - static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t parent_trace, uint32_t exit_num) { const void *handler = NULL; @@ -2495,11 +1711,6 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par ssa = zend_jit_trace_build_tssa(trace_buffer, parent_trace, exit_num, script, op_arrays, &num_op_arrays); - /* Register allocation */ - if (zend_jit_reg_alloc) { - ra = zend_jit_trace_allocate_registers(trace_buffer, ssa); - } - p = trace_buffer; ZEND_ASSERT(p->op == ZEND_JIT_TRACE_START); op_array = p->op_array; @@ -2561,6 +1772,8 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par (zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(op_array); op_array_ssa = &jit_extension->func_info.ssa; + // TODO: register allocation ??? + dasm_growpc(&dasm_state, 1); /* trace needs just one global label for loop */ zend_jit_align_func(&dasm_state); @@ -2604,14 +1817,6 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par SET_STACK_TYPE(stack, i, concrete_type(info)); } } - if (ra) { - zend_ssa_phi *phi = ssa->vars[i].phi_use_chain; - if (phi && ra[phi->ssa_var] && !ra[phi->ssa_var]->load) { - if (!zend_jit_load_var(&dasm_state, ssa->var_info[i].type, i, ra[phi->ssa_var]->reg)) { - goto jit_failure; - } - } - } } } From 4e69970fb746970655a865cee116c91b7b09d36b Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 7 Apr 2020 21:37:10 +0300 Subject: [PATCH 059/338] cleanup --- ext/opcache/jit/zend_jit_internal.h | 31 ++++++++++++++++------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/ext/opcache/jit/zend_jit_internal.h b/ext/opcache/jit/zend_jit_internal.h index 25fedaa93db76..42054bf37f907 100644 --- a/ext/opcache/jit/zend_jit_internal.h +++ b/ext/opcache/jit/zend_jit_internal.h @@ -308,33 +308,36 @@ typedef struct _zend_jit_trace_exit_info { } zend_jit_trace_exit_info; typedef union _zend_jit_trace_stack { - int32_t __ssa_var; - uint32_t __info; + int32_t ssa_var; + uint32_t info; struct { - uint8_t __type; - int8_t __reg; - uint16_t __flags; + uint8_t type; + int8_t reg; + uint16_t flags; }; } zend_jit_trace_stack; #define STACK_VAR(_stack, _slot) \ - (_stack)[_slot].__ssa_var + (_stack)[_slot].ssa_var #define STACK_INFO(_stack, _slot) \ - (_stack)[_slot].__info + (_stack)[_slot].info #define STACK_TYPE(_stack, _slot) \ - (_stack)[_slot].__type + (_stack)[_slot].type #define STACK_REG(_stack, _slot) \ - (_stack)[_slot].__reg + (_stack)[_slot].reg #define SET_STACK_VAR(_stack, _slot, _ssa_var) do { \ - (_stack)[_slot].__ssa_var = _ssa_var; \ + (_stack)[_slot].ssa_var = _ssa_var; \ } while (0) #define SET_STACK_INFO(_stack, _slot, _info) do { \ - (_stack)[_slot].__info = _info; \ + (_stack)[_slot].info = _info; \ } while (0) #define SET_STACK_TYPE(_stack, _slot, _type) do { \ - (_stack)[_slot].__type = _type; \ - (_stack)[_slot].__reg = ZREG_NONE; \ - (_stack)[_slot].__flags = 0; \ + (_stack)[_slot].type = _type; \ + (_stack)[_slot].reg = ZREG_NONE; \ + (_stack)[_slot].flags = 0; \ + } while (0) +#define SET_STACK_REG(_stack, _slot, _reg) do { \ + (_stack)[_slot].reg = _reg; \ } while (0) typedef struct _zend_jit_trace_info { From 6031b0824012065b679ed193b6e11b324a5cc92e Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Tue, 7 Apr 2020 22:23:24 +0200 Subject: [PATCH 060/338] Revert "Fix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails" This commit brings some substantial changes in behaviour due to the weird implementation. This will be fixed in master due to BC concerns. This reverts commit 1333b46d6dc0c293c1fd626803f91bc69743eb79. --- ext/mbstring/mbstring.c | 2 +- ext/mbstring/tests/bug79448.phpt | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) delete mode 100644 ext/mbstring/tests/bug79448.phpt diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index ba30e05c27d4d..0f466a02ee491 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -2038,7 +2038,7 @@ PHP_FUNCTION(mb_detect_order) static inline int php_mb_check_code_point(zend_long cp) { - if (cp < 0 || cp >= 0x110000) { + if (cp <= 0 || cp >= 0x110000) { /* Out of Unicode range */ return 0; } diff --git a/ext/mbstring/tests/bug79448.phpt b/ext/mbstring/tests/bug79448.phpt deleted file mode 100644 index 09052943cc042..0000000000000 --- a/ext/mbstring/tests/bug79448.phpt +++ /dev/null @@ -1,11 +0,0 @@ ---TEST-- -Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails ---SKIPIF-- - ---FILE-- - ---EXPECT-- -bool(true) From a0df5f3b542abfd1078ac04e9a2081a1f71e3b11 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Tue, 7 Apr 2020 22:24:40 +0200 Subject: [PATCH 061/338] Revert "Went to fast and forgot to update tests" This reverts commit 656eac74fa6074aebc087bb73d2e4651f7dc8c9e. --- .../tests/mb_substitute_character.phpt | 3 +- .../tests/mb_substitute_character_basic.phpt | 6 ++- .../mb_substitute_character_variation1.phpt | 39 ++++++++++++------- 3 files changed, 32 insertions(+), 16 deletions(-) diff --git a/ext/mbstring/tests/mb_substitute_character.phpt b/ext/mbstring/tests/mb_substitute_character.phpt index fc665ba1993b2..502a4136dd209 100644 --- a/ext/mbstring/tests/mb_substitute_character.phpt +++ b/ext/mbstring/tests/mb_substitute_character.phpt @@ -41,4 +41,5 @@ string(4) "82a0" bool(true) string(6) "entity" string(20) "262378323636303b82a0" -bool(true) +ERR: Warning +bool(false) diff --git a/ext/mbstring/tests/mb_substitute_character_basic.phpt b/ext/mbstring/tests/mb_substitute_character_basic.phpt index 0fc062ec21ba7..9fa3a5b1acad1 100644 --- a/ext/mbstring/tests/mb_substitute_character_basic.phpt +++ b/ext/mbstring/tests/mb_substitute_character_basic.phpt @@ -28,7 +28,7 @@ var_dump( mb_substitute_character("b") ); ?> ===DONE=== ---EXPECT-- +--EXPECTF-- *** Testing mb_substitute_character() : basic functionality *** int(63) bool(true) @@ -37,5 +37,7 @@ bool(true) int(1234) bool(true) string(4) "none" -bool(true) + +Warning: mb_substitute_character(): Unknown character in %s on line %d +bool(false) ===DONE=== diff --git a/ext/mbstring/tests/mb_substitute_character_variation1.phpt b/ext/mbstring/tests/mb_substitute_character_variation1.phpt index be3b81018a725..f738876469fcd 100644 --- a/ext/mbstring/tests/mb_substitute_character_variation1.phpt +++ b/ext/mbstring/tests/mb_substitute_character_variation1.phpt @@ -123,7 +123,8 @@ fclose($fp); *** Testing mb_substitute_character() : usage variation *** --int 0-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) --int 1-- bool(true) @@ -151,10 +152,12 @@ Error: 2 - mb_substitute_character(): Unknown character, %s(%d) bool(false) --float .5-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) --empty array-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) --int indexed array-- bool(true) @@ -166,22 +169,26 @@ bool(true) bool(true) --uppercase NULL-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) --lowercase null-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) --lowercase true-- bool(true) --lowercase false-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) --uppercase TRUE-- bool(true) --uppercase FALSE-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) --empty string DQ-- bool(true) @@ -190,16 +197,20 @@ bool(true) bool(true) --string DQ-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) --string SQ-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) --mixed case string-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) --heredoc-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) --instance of classWithToString-- Error: 8 - Object of class classWithToString could not be converted to int, %s(%d) @@ -210,8 +221,10 @@ Error: 8 - Object of class classWithoutToString could not be converted to int, % bool(true) --undefined var-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) --unset var-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) ===DONE=== From a172e056a0f4398155552d95547ecce5bbfbceff Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 8 Apr 2020 00:27:19 +0300 Subject: [PATCH 062/338] Fixed TYPE/INFO mismatch --- ext/opcache/jit/zend_jit_trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 171ecd7d51b7f..213ca5d42b13d 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -1594,7 +1594,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin top = zend_jit_trace_call_frame(top, p->op_array); if (p->func->type == ZEND_USER_FUNCTION) { for (i = 0; i < p->op_array->last_var + p->op_array->T; i++) { - SET_STACK_TYPE(call->stack, i, IS_UNKNOWN); + SET_STACK_INFO(call->stack, i, -1); } } } else if (p->op == ZEND_JIT_TRACE_DO_ICALL) { From f915b5516c30e1a92fdb150f1c31308e7b639e99 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 8 Apr 2020 10:34:24 +0300 Subject: [PATCH 063/338] Update stack type, only if necessary --- ext/opcache/jit/zend_jit_trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 213ca5d42b13d..0f5f1244eb8ac 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -335,8 +335,8 @@ static zend_always_inline uint32_t zend_jit_trace_type_to_info(zend_uchar type) } \ op_info &= ~MAY_BE_GUARD; \ ssa->var_info[_ssa_var].type &= op_info; \ + SET_STACK_VAR_TYPE(_var, op_type); \ } \ - SET_STACK_VAR_TYPE(_var, op_type); \ } \ } while (0) From 8ff199150364687034f05c46bf9a44cf88de5015 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 8 Apr 2020 09:41:14 +0200 Subject: [PATCH 064/338] Fix test --- ext/mbstring/tests/mb_substitute_character.phpt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/mbstring/tests/mb_substitute_character.phpt b/ext/mbstring/tests/mb_substitute_character.phpt index 6bc533f0386e8..9e50823ef42b5 100644 --- a/ext/mbstring/tests/mb_substitute_character.phpt +++ b/ext/mbstring/tests/mb_substitute_character.phpt @@ -25,7 +25,7 @@ var_dump(bin2hex(mb_convert_encoding("\xe2\x99\xa0\xe3\x81\x82", "CP932", "UTF-8 var_dump(mb_substitute_character('BAD_NAME')); ?> ---EXPECT-- +--EXPECTF-- bool(true) int(12356) string(8) "82a282a0" @@ -38,5 +38,6 @@ string(4) "82a0" bool(true) string(6) "entity" string(20) "262378323636303b82a0" -ERR: Warning + +Warning: mb_substitute_character(): Unknown character in %s on line %d bool(false) From 7e91fcd7f95e304aef4c76d1af20da3f40f10594 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 8 Apr 2020 10:35:54 +0200 Subject: [PATCH 065/338] Fix memory leak introduced by fixing bug #78221 We have to free the retrieved text content; to keep the code readable, we extract a helper function to check for empty nodes. Unfortunately, we cannot use xmlIsBlankNode(), because that also recognizes whitespace only text content. We also make sure to properly handle NULL returns from xmlNodeGetContent(). --- ext/dom/php_dom.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index ed67f047fa875..def54c99fbec5 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -1358,6 +1358,14 @@ xmlNode *dom_get_elements_by_tag_name_ns_raw(xmlNodePtr nodep, char *ns, char *l /* }}} */ /* }}} end dom_element_get_elements_by_tag_name_ns_raw */ +static inline zend_bool is_empty_node(xmlNodePtr nodep) +{ + xmlChar *strContent = xmlNodeGetContent(nodep); + zend_bool ret = strContent == NULL || *strContent == '\0'; + xmlFree(strContent); + return ret; +} + /* {{{ void dom_normalize (xmlNodePtr nodep) */ void dom_normalize (xmlNodePtr nodep) { @@ -1383,8 +1391,7 @@ void dom_normalize (xmlNodePtr nodep) break; } } - strContent = xmlNodeGetContent(child); - if (*strContent == '\0') { + if (is_empty_node(child)) { nextp = child->next; xmlUnlinkNode(child); php_libxml_node_free_resource(child); From 73a0719f45782f843d2bd15ea22410390bc2de94 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 8 Apr 2020 11:29:49 +0200 Subject: [PATCH 066/338] Relax overly strict test expectation There is no reason to expect a `1` after the PID; neither the session ID nor the memory usage are required to contain one. Actually, we just want to verify here, that the process with the $child_pid is running, and is a php.exe process. --- sapi/cli/tests/sapi_windows_set_ctrl_handler.phpt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sapi/cli/tests/sapi_windows_set_ctrl_handler.phpt b/sapi/cli/tests/sapi_windows_set_ctrl_handler.phpt index 9028b6902bde7..2b675a7f719ca 100644 --- a/sapi/cli/tests/sapi_windows_set_ctrl_handler.phpt +++ b/sapi/cli/tests/sapi_windows_set_ctrl_handler.phpt @@ -78,8 +78,7 @@ function get_evt_name(int $evt) : ?string --EXPECTF-- Started child %d Running `tasklist /FI "PID eq %d" /NH` to check the process indeed exists: -php.exe%w%d%s1%s +php.exe%w%d%s Sending CTRL+C to child %d Successfully sent CTRL+C to child %d Child %d exit with status 3 after %dus - From 3042b2b2012fa1f701170282e4f7ac55089f79b0 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 8 Apr 2020 12:39:24 +0300 Subject: [PATCH 067/338] Dump information about trace side exits --- ext/opcache/jit/zend_jit.h | 1 + ext/opcache/jit/zend_jit_trace.c | 56 +++++++++++++++++++++++++++++++- 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/ext/opcache/jit/zend_jit.h b/ext/opcache/jit/zend_jit.h index aea15ea1b713e..e53c88e19c4f7 100644 --- a/ext/opcache/jit/zend_jit.h +++ b/ext/opcache/jit/zend_jit.h @@ -84,6 +84,7 @@ #define ZEND_JIT_DEBUG_TRACE_BLACKLIST (1<<17) #define ZEND_JIT_DEBUG_TRACE_BYTECODE (1<<18) #define ZEND_JIT_DEBUG_TRACE_TSSA (1<<19) +#define ZEND_JIT_DEBUG_TRACE_EXIT_INFO (1<<20) ZEND_EXT_API int zend_jit_op_array(zend_op_array *op_array, zend_script *script); ZEND_EXT_API int zend_jit_script(zend_script *script); diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 0f5f1244eb8ac..65b5890021f95 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -457,6 +457,7 @@ static zend_ssa *zend_jit_trace_build_ssa(const zend_op_array *op_array, zend_sc } static void zend_jit_dump_trace(zend_jit_trace_rec *trace_buffer, zend_ssa *tssa); +static void zend_jit_dump_exit_info(zend_jit_trace_info *t); static zend_always_inline int zend_jit_trace_op_len(const zend_op *opline) { @@ -3168,7 +3169,7 @@ static zend_jit_trace_stop zend_jit_compile_root_trace(zend_jit_trace_rec *trace { zend_jit_trace_stop ret; const void *handler; - zend_jit_trace_info *t; + zend_jit_trace_info *t = NULL; zend_jit_trace_exit_info exit_info[ZEND_JIT_TRACE_MAX_EXITS]; zend_shared_alloc_lock(); @@ -3260,6 +3261,12 @@ static zend_jit_trace_stop zend_jit_compile_root_trace(zend_jit_trace_rec *trace zend_shared_alloc_unlock(); + if ((ZCG(accel_directives).jit_debug & ZEND_JIT_DEBUG_TRACE_EXIT_INFO) != 0 + && ret == ZEND_JIT_TRACE_STOP_COMPILED + && t->exit_count > 0) { + zend_jit_dump_exit_info(t); + } + return ret; } @@ -3499,6 +3506,47 @@ static void zend_jit_dump_trace(zend_jit_trace_rec *trace_buffer, zend_ssa *tssa } } +static void zend_jit_dump_exit_info(zend_jit_trace_info *t) +{ + int i, j; + + fprintf(stderr, "---- TRACE %d exit info\n", t->id); + for (i = 0; i < t->exit_count; i++) { + uint32_t stack_size = t->exit_info[i].stack_size; + zend_jit_trace_stack *stack = t->stack_map + t->exit_info[i].stack_offset; + + fprintf(stderr, " exit_%d:", i); + if (t->exit_info[i].opline) { + // TODO: print exit opline number ??? + //fprintf(stderr, " %04d/", t->exit_info[i].opline - op_array->opcodes); + fprintf(stderr, " XXXX/"); + } else { + fprintf(stderr, " ----/"); + } + if (t->exit_info[i].stack_size) { + fprintf(stderr, "%04d/%d", t->exit_info[i].stack_offset, t->exit_info[i].stack_size); + } else { + fprintf(stderr, "----/0"); + } + for (j = 0; j < stack_size; j++) { + zend_uchar type = STACK_TYPE(stack, j); + if (type != IS_UNKNOWN) { + // TODO: print CV insted of X ??? + fprintf(stderr, " X%d:", j); + if (type == IS_UNDEF) { + fprintf(stderr, "undef"); + } else { + fprintf(stderr, "%s", zend_get_type_by_const(type)); + if (STACK_REG(stack, j) != ZREG_NONE) { + fprintf(stderr, "(%s)", zend_reg_name[STACK_REG(stack, j)]); + } + } + } + } + fprintf(stderr, "\n"); + } +} + int ZEND_FASTCALL zend_jit_trace_hot_root(zend_execute_data *execute_data, const zend_op *opline) { const zend_op *orig_opline; @@ -3771,6 +3819,12 @@ static zend_jit_trace_stop zend_jit_compile_side_trace(zend_jit_trace_rec *trace zend_shared_alloc_unlock(); + if ((ZCG(accel_directives).jit_debug & ZEND_JIT_DEBUG_TRACE_EXIT_INFO) != 0 + && ret == ZEND_JIT_TRACE_STOP_COMPILED + && t->exit_count > 0) { + zend_jit_dump_exit_info(t); + } + return ret; } From 38d93262a0af02bae20b717a26f62085b6721736 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 8 Apr 2020 12:00:48 +0200 Subject: [PATCH 068/338] Update mb_strrpos() stub We no longer accept the encoding as 3rd param, so we can make this a proper int argument. --- ext/mbstring/mbstring.stub.php | 2 +- ext/mbstring/mbstring_arginfo.h | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/ext/mbstring/mbstring.stub.php b/ext/mbstring/mbstring.stub.php index 2cc95c6920ffd..7a75d4099ff8b 100644 --- a/ext/mbstring/mbstring.stub.php +++ b/ext/mbstring/mbstring.stub.php @@ -27,7 +27,7 @@ function mb_strlen(string $str, string $encoding = UNKNOWN): int {} function mb_strpos(string $haystack, string $needle, int $offset = 0, string $encoding = UNKNOWN): int|false {} -function mb_strrpos(string $haystack, string $needle, $offset = UNBEK, string $encoding = UNKNOWN): int|false {} +function mb_strrpos(string $haystack, string $needle, int $offset = 0, string $encoding = UNKNOWN): int|false {} function mb_stripos(string $haystack, string $needle, int $offset = 0, string $encoding = UNKNOWN): int|false {} diff --git a/ext/mbstring/mbstring_arginfo.h b/ext/mbstring/mbstring_arginfo.h index e252cdb1f0c1f..52b92617c2860 100644 --- a/ext/mbstring/mbstring_arginfo.h +++ b/ext/mbstring/mbstring_arginfo.h @@ -54,12 +54,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_strpos, 0, 2, MAY_BE_LONG|MAY ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_strrpos, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0) - ZEND_ARG_INFO(0, offset) - ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) -ZEND_END_ARG_INFO() +#define arginfo_mb_strrpos arginfo_mb_strpos #define arginfo_mb_stripos arginfo_mb_strpos From 3ea94ed78e5dab77f2c21b678ad39befc0009f98 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 8 Apr 2020 12:02:27 +0200 Subject: [PATCH 069/338] Fix typo in GD stub --- ext/gd/gd.stub.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/gd/gd.stub.php b/ext/gd/gd.stub.php index 1a886f5965d00..79dca96fa8a80 100644 --- a/ext/gd/gd.stub.php +++ b/ext/gd/gd.stub.php @@ -236,6 +236,6 @@ function imageaffinematrixconcat(array $m1, array $m2): array|false {} function imagegetinterpolation(GdImage $im): int {} -function imagesetinterpolation(GdImage $im, int $method = IMG_BILENEAR_FIXED): bool {} +function imagesetinterpolation(GdImage $im, int $method = IMG_BILINEAR_FIXED): bool {} function imageresolution(GdImage $im, int $res_x = UNKNOWN, int $res_y = UNKNOWN): array|bool {} From 5317ea6d5753eb0d658fe81f815d17e304e9c804 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 8 Apr 2020 16:36:01 +0200 Subject: [PATCH 070/338] Make mysqli_poll test more deterministic Handle errors appearing in different order. --- .../tests/mysqli_poll_mixing_insert_select.phpt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ext/mysqli/tests/mysqli_poll_mixing_insert_select.phpt b/ext/mysqli/tests/mysqli_poll_mixing_insert_select.phpt index bfe780a9cd1a8..0bafb2cc9ba43 100644 --- a/ext/mysqli/tests/mysqli_poll_mixing_insert_select.phpt +++ b/ext/mysqli/tests/mysqli_poll_mixing_insert_select.phpt @@ -106,7 +106,6 @@ if (!$IS_MYSQLND) // either there is no result (no SELECT) or there is an error if (mysqli_errno($link) > 0) { $saved_errors[$thread_id] = mysqli_errno($link); - printf("[003] '%s' caused %d\n", $links[$thread_id]['query'], mysqli_errno($link)); } } } @@ -115,10 +114,13 @@ if (!$IS_MYSQLND) // Checking if all lines are still usable foreach ($links as $thread_id => $link) { - if (isset($saved_errors[$thread_id]) && - $saved_errors[$thread_id] != mysqli_errno($link['link'])) { - printf("[004] Error state not saved for query '%s', %d != %d\n", $link['query'], - $saved_errors[$thread_id], mysqli_errno($link['link'])); + if (isset($saved_errors[$thread_id])) { + printf("[003] '%s' caused %d\n", + $links[$thread_id]['query'], $saved_errors[$thread_id]); + if ($saved_errors[$thread_id] != mysqli_errno($link['link'])) { + printf("[004] Error state not saved for query '%s', %d != %d\n", $link['query'], + $saved_errors[$thread_id], mysqli_errno($link['link'])); + } } if (!$res = mysqli_query($link['link'], 'SELECT * FROM test WHERE id = 100')) From 132749122426ee21171b2b3caccfaf86e24b4adf Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 8 Apr 2020 17:10:20 +0200 Subject: [PATCH 071/338] Add php_cli_server_connect() helper To encapsulate the repeated fsockopen() code. This gives us a chance to control the timeout in one place: Raise it to one second. --- sapi/cli/tests/bug43177.phpt | 9 ++------- sapi/cli/tests/bug61679.phpt | 9 ++------- sapi/cli/tests/bug61977.phpt | 5 ++--- sapi/cli/tests/bug65066_100.phpt | 9 ++------- sapi/cli/tests/bug65066_422.phpt | 9 ++------- sapi/cli/tests/bug65066_511.phpt | 9 ++------- sapi/cli/tests/bug65633.phpt | 9 ++------- sapi/cli/tests/bug66606_2.phpt | 9 ++------- sapi/cli/tests/bug66830.phpt | 9 ++------- sapi/cli/tests/bug67429_1.phpt | 9 ++------- sapi/cli/tests/bug67429_2.phpt | 9 ++------- sapi/cli/tests/bug68745.phpt | 9 ++------- sapi/cli/tests/bug70470.phpt | 6 +----- sapi/cli/tests/bug71005.phpt | 9 ++------- sapi/cli/tests/emptyheader.phpt | 7 ++----- sapi/cli/tests/php_cli_server.inc | 16 +++++++++++++--- sapi/cli/tests/php_cli_server_004.phpt | 9 ++------- sapi/cli/tests/php_cli_server_005.phpt | 9 ++------- sapi/cli/tests/php_cli_server_006.phpt | 9 ++------- sapi/cli/tests/php_cli_server_007.phpt | 9 ++------- sapi/cli/tests/php_cli_server_008.phpt | 15 +++------------ sapi/cli/tests/php_cli_server_009.phpt | 21 ++++----------------- sapi/cli/tests/php_cli_server_010.phpt | 15 +++------------ sapi/cli/tests/php_cli_server_012.phpt | 9 ++------- sapi/cli/tests/php_cli_server_013.phpt | 19 ++++--------------- sapi/cli/tests/php_cli_server_014.phpt | 15 +++------------ sapi/cli/tests/php_cli_server_015.phpt | 9 ++------- sapi/cli/tests/php_cli_server_016.phpt | 9 ++------- sapi/cli/tests/php_cli_server_017.phpt | 9 ++------- sapi/cli/tests/php_cli_server_018.phpt | 9 ++------- sapi/cli/tests/php_cli_server_019.phpt | 9 ++------- sapi/cli/tests/php_cli_server_020.phpt | 9 ++------- sapi/cli/tests/upload_2G.phpt | 8 ++------ 33 files changed, 83 insertions(+), 251 deletions(-) diff --git a/sapi/cli/tests/bug43177.phpt b/sapi/cli/tests/bug43177.phpt index 87dc8927ff102..2ab08228b9189 100644 --- a/sapi/cli/tests/bug43177.phpt +++ b/sapi/cli/tests/bug43177.phpt @@ -35,15 +35,10 @@ php_cli_server_start(<<<'SCRIPT' SCRIPT ); -list($host, $port) = explode(':', PHP_CLI_SERVER_ADDRESS); -$port = intval($port)?:80; +$host = PHP_CLI_SERVER_HOSTNAME; foreach(array("parse", "fatal", "fatal2", "compile") as $url) { - $fp = fsockopen($host, $port, $errno, $errstr, 0.5); - if (!$fp) { - die("connect failed"); - } - + $fp = php_cli_server_connect(); if(fwrite($fp, <<
diff --git a/sapi/cli/tests/php_cli_server_004.phpt b/sapi/cli/tests/php_cli_server_004.phpt index 9c93de3f927f7..d9c3b171f28f7 100644 --- a/sapi/cli/tests/php_cli_server_004.phpt +++ b/sapi/cli/tests/php_cli_server_004.phpt @@ -11,13 +11,8 @@ include "skipif.inc"; include "php_cli_server.inc"; php_cli_server_start('foreach($_SERVER as $k=>$v) { if (!strncmp($k, "HTTP", 4)) var_dump( $k . ":" . $v); }'); -list($host, $port) = explode(':', PHP_CLI_SERVER_ADDRESS); -$port = intval($port)?:80; - -$fp = fsockopen($host, $port, $errno, $errstr, 0.5); -if (!$fp) { - die("connect failed"); -} +$host = PHP_CLI_SERVER_HOSTNAME; +$fp = php_cli_server_connect(); if(fwrite($fp, <<
'); -list($host, $port) = explode(':', PHP_CLI_SERVER_ADDRESS); -$port = intval($port)?:80; - -$fp = fsockopen($host, $port, $errno, $errstr, 0.5); -if (!$fp) { - die("connect failed"); -} +$host = PHP_CLI_SERVER_HOSTNAME; +$fp = php_cli_server_connect(); if(fwrite($fp, <<
(.*?)<\/style>/s", "", $output), "\ fclose($fp); $output = ''; -$fp = fsockopen($host, $port, $errno, $errstr, 0.5); -if (!$fp) { - die("connect failed"); -} +$fp = php_cli_server_connect(); if(fwrite($fp, <<
"); -list($host, $port) = explode(':', PHP_CLI_SERVER_ADDRESS); -$port = intval($port)?:80; $output = ''; - -$fp = fsockopen($host, $port, $errno, $errstr, 0.5); -if (!$fp) { - die("connect failed"); -} +$host = PHP_CLI_SERVER_HOSTNAME; +$fp = php_cli_server_connect(); if(fwrite($fp, <<
--EXPECTF-- -Fatal error: Declaration of Smooth1::insert(array $data) must be compatible with Noisy1::insert(array $data, $option1 = NULL) in %sbug64988.php on line 17 +Fatal error: Declaration of Smooth1::insert(array $data) must be compatible with Noisy1::insert(array $data, $option1 = NULL) in %s on line %d diff --git a/Zend/tests/bug70957.phpt b/Zend/tests/bug70957.phpt index ad2115e4a0b70..39970f912380a 100644 --- a/Zend/tests/bug70957.phpt +++ b/Zend/tests/bug70957.phpt @@ -19,4 +19,4 @@ class B extends Foo } ?> --EXPECTF-- -Fatal error: Declaration of T::bar() must be compatible with Foo::bar($a = 'Foo') in %sbug70957.php on line %d +Fatal error: Declaration of T::bar() must be compatible with Foo::bar($a = 'Foo') in %s on line %d diff --git a/Zend/tests/bug71428.1.phpt b/Zend/tests/bug71428.1.phpt index acecd85fc576c..7b20aa73b2244 100644 --- a/Zend/tests/bug71428.1.phpt +++ b/Zend/tests/bug71428.1.phpt @@ -9,4 +9,4 @@ class B extends A { public function m(array $a = []) {} } --EXPECTF-- -Fatal error: Declaration of B::m(array $a = Array) must be compatible with A::m(?array $a = NULL) in %sbug71428.1.php on line 6 +Fatal error: Declaration of B::m(array $a = Array) must be compatible with A::m(?array $a = NULL) in %s on line %d diff --git a/Zend/tests/bug73987.phpt b/Zend/tests/bug73987.phpt index 610b594a64424..b6e9e744aab6a 100644 --- a/Zend/tests/bug73987.phpt +++ b/Zend/tests/bug73987.phpt @@ -15,4 +15,4 @@ class B extends A { ?> --EXPECTF-- -Fatal error: Declaration of B::example($a, $b, $c = NULL) must be compatible with A::example($a, $b = NULL, $c = NULL) in %s +Fatal error: Declaration of B::example($a, $b, $c = NULL) must be compatible with A::example($a, $b = NULL, $c = NULL) in %s on line %d diff --git a/Zend/tests/bug73987_2.phpt b/Zend/tests/bug73987_2.phpt index a70f1455e893a..976280be1922e 100644 --- a/Zend/tests/bug73987_2.phpt +++ b/Zend/tests/bug73987_2.phpt @@ -17,4 +17,4 @@ class C extends B { ?> --EXPECTF-- -Fatal error: Declaration of C::example($a, $b, $c = NULL) must be compatible with B::example($a, $b = NULL, $c = NULL) in %s +Fatal error: Declaration of C::example($a, $b, $c = NULL) must be compatible with B::example($a, $b = NULL, $c = NULL) in %s on line %d diff --git a/Zend/tests/closures/closure_from_callable_basic.phpt b/Zend/tests/closures/closure_from_callable_basic.phpt index 72cb5bc68ce29..88a27c7e7032f 100644 --- a/Zend/tests/closures/closure_from_callable_basic.phpt +++ b/Zend/tests/closures/closure_from_callable_basic.phpt @@ -81,7 +81,7 @@ $foo = new SubFoo; $fn = $foo->getSelfColonParentPublicInstanceMethod(); echo $fn(" OK".PHP_EOL); -echo 'Access proteced instance method of parent object through "self::" to parent method'; +echo 'Access protected instance method of parent object through "self::" to parent method'; $foo = new SubFoo; $fn = $foo->getSelfColonParentProtectedInstanceMethod(); echo $fn(" OK".PHP_EOL); @@ -114,6 +114,6 @@ Subclass closure over parent class static protected method OK Access public instance method of parent object through "parent::" OK Access public instance method of self object through "self::" OK Access public instance method of parent object through "self::" to parent method OK -Access proteced instance method of parent object through "self::" to parent method OK +Access protected instance method of parent object through "self::" to parent method OK MagicCall __call instance method __call,nonExistentMethod, OK MagicCall __callStatic static method __callStatic,nonExistentMethod, OK diff --git a/Zend/tests/parameter_default_values/internal_declaration_error_class_const.phpt b/Zend/tests/parameter_default_values/internal_declaration_error_class_const.phpt new file mode 100644 index 0000000000000..2e0e6e2aea847 --- /dev/null +++ b/Zend/tests/parameter_default_values/internal_declaration_error_class_const.phpt @@ -0,0 +1,12 @@ +--TEST-- +The default value is a class constant in the parent class method's signature. +--FILE-- + --EXPECTF-- -Fatal error: Could not check compatibility between Test::createFromFormat($format, $time, ?Wrong $timezone = NULL) and DateTime::createFromFormat(string $format, string $time, ?DateTimeZone $timezone = NULL), because class Wrong is not available in %s on line %d +Fatal error: Could not check compatibility between Test::createFromFormat($format, $time, ?Wrong $timezone = NULL) and DateTime::createFromFormat(string $format, string $time, ?DateTimeZone $timezone = null), because class Wrong is not available in %s on line %d diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 77599ca814730..afc2ad8a7dbdc 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -105,50 +105,61 @@ typedef struct _zend_fcall_info_cache { #define _ZEND_ARG_INFO_FLAGS(pass_by_ref, is_variadic) \ (((pass_by_ref) << _ZEND_SEND_MODE_SHIFT) | ((is_variadic) ? _ZEND_IS_VARIADIC_BIT : 0)) +/* Arginfo structures without type information */ #define ZEND_ARG_INFO(pass_by_ref, name) \ - { #name, ZEND_TYPE_INIT_NONE(_ZEND_ARG_INFO_FLAGS(pass_by_ref, 0))}, -#define ZEND_ARG_OBJ_INFO(pass_by_ref, name, classname, allow_null) \ - { #name, ZEND_TYPE_INIT_CLASS_CONST(#classname, allow_null, _ZEND_ARG_INFO_FLAGS(pass_by_ref, 0)) }, -#define ZEND_ARG_ARRAY_INFO(pass_by_ref, name, allow_null) \ - { #name, ZEND_TYPE_INIT_CODE(IS_ARRAY, allow_null, _ZEND_ARG_INFO_FLAGS(pass_by_ref, 0)) }, -#define ZEND_ARG_CALLABLE_INFO(pass_by_ref, name, allow_null) \ - { #name, ZEND_TYPE_INIT_CODE(IS_CALLABLE, allow_null, _ZEND_ARG_INFO_FLAGS(pass_by_ref, 0)) }, -#define ZEND_ARG_TYPE_INFO(pass_by_ref, name, type_hint, allow_null) \ - { #name, ZEND_TYPE_INIT_CODE(type_hint, allow_null, _ZEND_ARG_INFO_FLAGS(pass_by_ref, 0)) }, -#define ZEND_ARG_TYPE_MASK(pass_by_ref, name, type_mask) \ - { #name, ZEND_TYPE_INIT_MASK(type_mask | _ZEND_ARG_INFO_FLAGS(pass_by_ref, 0)) }, + { #name, ZEND_TYPE_INIT_NONE(_ZEND_ARG_INFO_FLAGS(pass_by_ref, 0)), NULL }, +#define ZEND_ARG_INFO_WITH_DEFAULT_VALUE(pass_by_ref, name, default_value) \ + { #name, ZEND_TYPE_INIT_NONE(_ZEND_ARG_INFO_FLAGS(pass_by_ref, 0)), default_value }, #define ZEND_ARG_VARIADIC_INFO(pass_by_ref, name) \ - { #name, ZEND_TYPE_INIT_NONE(_ZEND_ARG_INFO_FLAGS(pass_by_ref, 1)) }, + { #name, ZEND_TYPE_INIT_NONE(_ZEND_ARG_INFO_FLAGS(pass_by_ref, 1)), NULL }, +/* Arginfo structures with simple type information */ +#define ZEND_ARG_TYPE_INFO(pass_by_ref, name, type_hint, allow_null) \ + { #name, ZEND_TYPE_INIT_CODE(type_hint, allow_null, _ZEND_ARG_INFO_FLAGS(pass_by_ref, 0)), NULL }, +#define ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(pass_by_ref, name, type_hint, allow_null, default_value) \ + { #name, ZEND_TYPE_INIT_CODE(type_hint, allow_null, _ZEND_ARG_INFO_FLAGS(pass_by_ref, 0)), default_value }, #define ZEND_ARG_VARIADIC_TYPE_INFO(pass_by_ref, name, type_hint, allow_null) \ - { #name, ZEND_TYPE_INIT_CODE(type_hint, allow_null, _ZEND_ARG_INFO_FLAGS(pass_by_ref, 1)) }, + { #name, ZEND_TYPE_INIT_CODE(type_hint, allow_null, _ZEND_ARG_INFO_FLAGS(pass_by_ref, 1)), NULL }, +/* Arginfo structures with complex type information */ +#define ZEND_ARG_TYPE_MASK(pass_by_ref, name, type_mask, default_value) \ + { #name, ZEND_TYPE_INIT_MASK(type_mask | _ZEND_ARG_INFO_FLAGS(pass_by_ref, 0)), default_value }, +/* Arginfo structures with object type information */ +#define ZEND_ARG_OBJ_INFO(pass_by_ref, name, classname, allow_null) \ + { #name, ZEND_TYPE_INIT_CLASS_CONST(#classname, allow_null, _ZEND_ARG_INFO_FLAGS(pass_by_ref, 0)), NULL }, +#define ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(pass_by_ref, name, classname, allow_null, default_value) \ + { #name, ZEND_TYPE_INIT_CLASS_CONST(#classname, allow_null, _ZEND_ARG_INFO_FLAGS(pass_by_ref, 0)), default_value }, #define ZEND_ARG_VARIADIC_OBJ_INFO(pass_by_ref, name, classname, allow_null) \ - { #name, ZEND_TYPE_INIT_CLASS_CONST(#classname, allow_null, _ZEND_ARG_INFO_FLAGS(pass_by_ref, 1)) }, + { #name, ZEND_TYPE_INIT_CLASS_CONST(#classname, allow_null, _ZEND_ARG_INFO_FLAGS(pass_by_ref, 1)), NULL }, +/* Legacy arginfo structures */ +#define ZEND_ARG_ARRAY_INFO(pass_by_ref, name, allow_null) \ + { #name, ZEND_TYPE_INIT_CODE(IS_ARRAY, allow_null, _ZEND_ARG_INFO_FLAGS(pass_by_ref, 0)), NULL }, +#define ZEND_ARG_CALLABLE_INFO(pass_by_ref, name, allow_null) \ + { #name, ZEND_TYPE_INIT_CODE(IS_CALLABLE, allow_null, _ZEND_ARG_INFO_FLAGS(pass_by_ref, 0)), NULL }, #define ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(name, return_reference, required_num_args, class_name, allow_null) \ static const zend_internal_arg_info name[] = { \ { (const char*)(zend_uintptr_t)(required_num_args), \ - ZEND_TYPE_INIT_CLASS_CONST(#class_name, allow_null, _ZEND_ARG_INFO_FLAGS(return_reference, 0)) }, + ZEND_TYPE_INIT_CLASS_CONST(#class_name, allow_null, _ZEND_ARG_INFO_FLAGS(return_reference, 0)), NULL }, #define ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO(name, class_name, allow_null) \ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(name, 0, -1, class_name, allow_null) #define ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(name, return_reference, required_num_args, type) \ static const zend_internal_arg_info name[] = { \ - { (const char*)(zend_uintptr_t)(required_num_args), ZEND_TYPE_INIT_MASK(type | _ZEND_ARG_INFO_FLAGS(return_reference, 0)) }, + { (const char*)(zend_uintptr_t)(required_num_args), ZEND_TYPE_INIT_MASK(type | _ZEND_ARG_INFO_FLAGS(return_reference, 0)), NULL }, #define ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(name, return_reference, required_num_args, class_name, type) \ static const zend_internal_arg_info name[] = { \ - { (const char*)(zend_uintptr_t)(required_num_args), ZEND_TYPE_INIT_CLASS_CONST_MASK(#class_name, type | _ZEND_ARG_INFO_FLAGS(return_reference, 0)) }, + { (const char*)(zend_uintptr_t)(required_num_args), ZEND_TYPE_INIT_CLASS_CONST_MASK(#class_name, type | _ZEND_ARG_INFO_FLAGS(return_reference, 0)), NULL }, #define ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, type, allow_null) \ static const zend_internal_arg_info name[] = { \ - { (const char*)(zend_uintptr_t)(required_num_args), ZEND_TYPE_INIT_CODE(type, allow_null, _ZEND_ARG_INFO_FLAGS(return_reference, 0)) }, + { (const char*)(zend_uintptr_t)(required_num_args), ZEND_TYPE_INIT_CODE(type, allow_null, _ZEND_ARG_INFO_FLAGS(return_reference, 0)), NULL }, #define ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(name, type, allow_null) \ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(name, 0, -1, type, allow_null) #define ZEND_BEGIN_ARG_INFO_EX(name, _unused, return_reference, required_num_args) \ static const zend_internal_arg_info name[] = { \ - { (const char*)(zend_uintptr_t)(required_num_args), ZEND_TYPE_INIT_NONE(_ZEND_ARG_INFO_FLAGS(return_reference, 0)) }, + { (const char*)(zend_uintptr_t)(required_num_args), ZEND_TYPE_INIT_NONE(_ZEND_ARG_INFO_FLAGS(return_reference, 0)), NULL }, #define ZEND_BEGIN_ARG_INFO(name, _unused) \ ZEND_BEGIN_ARG_INFO_EX(name, {}, ZEND_RETURN_VALUE, -1) #define ZEND_END_ARG_INFO() }; diff --git a/Zend/zend_builtin_functions_arginfo.h b/Zend/zend_builtin_functions_arginfo.h index 78393d28ecff7..03315d185bfd8 100644 --- a/Zend/zend_builtin_functions_arginfo.h +++ b/Zend/zend_builtin_functions_arginfo.h @@ -39,7 +39,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_define, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, constant_name, IS_STRING, 0) ZEND_ARG_INFO(0, value) - ZEND_ARG_TYPE_INFO(0, case_insensitive, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, case_insensitive, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_defined, 0, 1, _IS_BOOL, 0) @@ -59,10 +59,14 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_is_subclass_of, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(0, object) ZEND_ARG_TYPE_INFO(0, class_name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, allow_string, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, allow_string, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() -#define arginfo_is_a arginfo_is_subclass_of +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_is_a, 0, 2, _IS_BOOL, 0) + ZEND_ARG_INFO(0, object) + ZEND_ARG_TYPE_INFO(0, class_name, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, allow_string, _IS_BOOL, 0, "false") +ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_get_class_vars, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, class_name, IS_STRING, 0) @@ -90,14 +94,14 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_exists, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, classname, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, autoload, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, autoload, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() #define arginfo_interface_exists arginfo_class_exists ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_trait_exists, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, traitname, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, autoload, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, autoload, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_function_exists, 0, 1, _IS_BOOL, 0) @@ -107,7 +111,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_alias, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, user_class_name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, alias_name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, autoload, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, autoload, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() #define arginfo_get_included_files arginfo_func_get_args @@ -116,14 +120,14 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_trigger_error, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, error_type, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, error_type, IS_LONG, 0, "E_USER_NOTICE") ZEND_END_ARG_INFO() #define arginfo_user_error arginfo_trigger_error ZEND_BEGIN_ARG_INFO_EX(arginfo_set_error_handler, 0, 0, 1) ZEND_ARG_INFO(0, error_handler) - ZEND_ARG_TYPE_INFO(0, error_types, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, error_types, IS_LONG, 0, "E_ALL") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_restore_error_handler, 0, 0, _IS_BOOL, 0) @@ -142,7 +146,7 @@ ZEND_END_ARG_INFO() #define arginfo_get_declared_interfaces arginfo_func_get_args ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_get_defined_functions, 0, 0, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, exclude_disabled, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, exclude_disabled, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #define arginfo_get_defined_vars arginfo_func_get_args @@ -156,21 +160,21 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_get_resources, 0, 0, IS_ARRAY, 0 ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_get_loaded_extensions, 0, 0, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, zend_extensions, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, zend_extensions, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_get_defined_constants, 0, 0, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, categorize, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, categorize, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_debug_backtrace, 0, 0, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, limit, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "DEBUG_BACKTRACE_PROVIDE_OBJECT") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, limit, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_debug_print_backtrace, 0, 0, IS_VOID, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, limit, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, limit, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_extension_loaded, 0, 1, _IS_BOOL, 0) diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index d6ddb0760f2a9..5dd4c39d6aebc 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -374,12 +374,14 @@ typedef struct _zend_class_constant { typedef struct _zend_internal_arg_info { const char *name; zend_type type; + const char *default_value; } zend_internal_arg_info; /* arg_info for user functions */ typedef struct _zend_arg_info { zend_string *name; zend_type type; + zend_string *default_value; } zend_arg_info; /* the following structure repeats the layout of zend_internal_arg_info, @@ -390,6 +392,7 @@ typedef struct _zend_arg_info { typedef struct _zend_internal_function_info { zend_uintptr_t required_num_args; zend_type type; + const char *default_value; } zend_internal_function_info; struct _zend_op_array { @@ -765,9 +768,13 @@ ZEND_API void function_add_ref(zend_function *function); /* helper functions in zend_language_scanner.l */ +struct _zend_arena; + ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type); ZEND_API zend_op_array *compile_string(zval *source_string, const char *filename); ZEND_API zend_op_array *compile_filename(int type, zval *filename); +ZEND_API zend_ast *zend_compile_string_to_ast( + zend_string *code, struct _zend_arena **ast_arena, const char *filename); ZEND_API int zend_execute_scripts(int type, zval *retval, int file_count, ...); ZEND_API int open_file_for_scanning(zend_file_handle *file_handle); ZEND_API void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_size); diff --git a/Zend/zend_exceptions_arginfo.h b/Zend/zend_exceptions_arginfo.h index 93badb6652896..b264a925dda93 100644 --- a/Zend/zend_exceptions_arginfo.h +++ b/Zend/zend_exceptions_arginfo.h @@ -19,8 +19,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Exception___construct, 0, 0, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, code, IS_LONG, 0) - ZEND_ARG_OBJ_INFO(0, previous, Throwable, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, code, IS_LONG, 0, "0") + ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, previous, Throwable, 1, "null") ZEND_END_ARG_INFO() #define arginfo_class_Exception___wakeup arginfo_class_Throwable_getMessage @@ -44,11 +44,11 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ErrorException___construct, 0, 0, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, code, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, severity, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, code, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, severity, IS_LONG, 0, "E_ERROR") ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, lineno, IS_LONG, 0) - ZEND_ARG_OBJ_INFO(0, previous, Throwable, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, lineno, IS_LONG, 0, "0") + ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, previous, Throwable, 1, "null") ZEND_END_ARG_INFO() #define arginfo_class_ErrorException_getSeverity arginfo_class_Throwable_getMessage diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 10e8552b69f1f..5f7f115af4105 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -678,7 +678,14 @@ static ZEND_COLD zend_string *zend_get_function_declaration(const zend_function if (i >= required && !ZEND_ARG_IS_VARIADIC(arg_info)) { smart_str_appends(&str, " = "); - if (fptr->type == ZEND_USER_FUNCTION) { + + if (fptr->type == ZEND_INTERNAL_FUNCTION) { + if (((zend_internal_arg_info*)arg_info)->default_value) { + smart_str_appends(&str, ((zend_internal_arg_info*)arg_info)->default_value); + } else { + smart_str_appends(&str, ""); + } + } else { zend_op *precv = NULL; { uint32_t idx = i; @@ -727,8 +734,6 @@ static ZEND_COLD zend_string *zend_get_function_declaration(const zend_function zend_tmp_string_release(tmp_zv_str); } } - } else { - smart_str_appends(&str, "NULL"); } } diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index 232ccdf8be74e..984d73474b205 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -653,6 +653,42 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type) return op_array; } +ZEND_API zend_ast *zend_compile_string_to_ast( + zend_string *code, zend_arena **ast_arena, const char *filename) { + zval code_zv; + zend_bool original_in_compilation; + zend_lex_state original_lex_state; + zend_ast *ast; + + ZVAL_STR_COPY(&code_zv, code); + + original_in_compilation = CG(in_compilation); + CG(in_compilation) = 1; + + zend_save_lexical_state(&original_lex_state); + if (zend_prepare_string_for_scanning(&code_zv, filename) == SUCCESS) { + CG(ast) = NULL; + CG(ast_arena) = zend_arena_create(1024 * 32); + LANG_SCNG(yy_state) = yycINITIAL; + + if (zendparse() != 0) { + zend_ast_destroy(CG(ast)); + zend_arena_destroy(CG(ast_arena)); + CG(ast) = NULL; + } + } + + /* restore_lexical_state changes CG(ast) and CG(ast_arena) */ + ast = CG(ast); + *ast_arena = CG(ast_arena); + + zend_restore_lexical_state(&original_lex_state); + CG(in_compilation) = original_in_compilation; + + zval_dtor(&code_zv); + + return ast; +} zend_op_array *compile_filename(int type, zval *filename) { diff --git a/build/gen_stub.php b/build/gen_stub.php index fd8caffaf670d..cfd1d42e36ee2 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -4,7 +4,10 @@ use PhpParser\Comment\Doc as DocComment; use PhpParser\Node; use PhpParser\Node\Expr; +use PhpParser\Node\Name; use PhpParser\Node\Stmt; +use PhpParser\PrettyPrinter\Standard; +use PhpParser\PrettyPrinterAbstract; error_reporting(E_ALL); @@ -15,6 +18,13 @@ exit(1); } +class CustomPrettyPrinter extends Standard +{ + protected function pName_FullyQualified(Name\FullyQualified $node) { + return implode('\\', $node->parts); + } +} + if ($argc >= 2) { if (is_file($argv[1])) { // Generate single file. @@ -252,19 +262,23 @@ class ArgInfo { public $isVariadic; /** @var Type|null */ public $type; + /** @var string|null */ + public $defaultValue; - public function __construct(string $name, int $sendBy, bool $isVariadic, ?Type $type) { + public function __construct(string $name, int $sendBy, bool $isVariadic, ?Type $type, ?string $defaultValue) { $this->name = $name; $this->sendBy = $sendBy; $this->isVariadic = $isVariadic; $this->type = $type; + $this->defaultValue = $defaultValue; } public function equals(ArgInfo $other): bool { return $this->name === $other->name && $this->sendBy === $other->sendBy && $this->isVariadic === $other->isVariadic - && Type::equals($this->type, $other->type); + && Type::equals($this->type, $other->type) + && $this->defaultValue === $other->defaultValue; } public function getSendByString(): string { @@ -278,6 +292,18 @@ public function getSendByString(): string { } throw new Exception("Invalid sendBy value"); } + + public function hasDefaultValue(): bool { + return $this->defaultValue !== null && $this->defaultValue !== "UNKNOWN"; + } + + public function getDefaultValueString(): string { + if ($this->hasDefaultValue()) { + return '"' . addslashes($this->defaultValue) . '"'; + } + + return "NULL"; + } } class ReturnInfo { @@ -432,7 +458,7 @@ function parseDocComment(DocComment $comment): array { } function parseFunctionLike( - string $name, ?string $className, Node\FunctionLike $func, ?string $cond + PrettyPrinterAbstract $prettyPrinter, string $name, ?string $className, Node\FunctionLike $func, ?string $cond ): FuncInfo { $comment = $func->getDocComment(); $paramMeta = []; @@ -494,7 +520,8 @@ function parseFunctionLike( $varName, $sendBy, $param->variadic, - $type + $type, + $param->default ? $prettyPrinter->prettyPrintExpr($param->default) : null ); if (!$param->default && !$param->variadic) { $numRequiredArgs = $i + 1; @@ -572,6 +599,7 @@ function parseStubFile(string $fileName): FileInfo { $parser = new PhpParser\Parser\Php7($lexer); $nodeTraverser = new PhpParser\NodeTraverser; $nodeTraverser->addVisitor(new PhpParser\NodeVisitor\NameResolver); + $prettyPrinter = new CustomPrettyPrinter(); $stmts = $parser->parse($code); $nodeTraverser->traverse($stmts); @@ -594,7 +622,7 @@ function parseStubFile(string $fileName): FileInfo { } if ($stmt instanceof Stmt\Function_) { - $funcInfos[] = parseFunctionLike($stmt->name->toString(), null, $stmt, $cond); + $funcInfos[] = parseFunctionLike($prettyPrinter, $stmt->name->toString(), null, $stmt, $cond); continue; } @@ -612,7 +640,7 @@ function parseStubFile(string $fileName): FileInfo { } $methodInfos[] = parseFunctionLike( - $classStmt->name->toString(), $className, $classStmt, $cond); + $prettyPrinter, $classStmt->name->toString(), $className, $classStmt, $cond); } $classInfos[] = new ClassInfo($className, $methodInfos); @@ -673,20 +701,23 @@ function funcInfoToCode(FuncInfo $funcInfo): string { foreach ($funcInfo->args as $argInfo) { $argKind = $argInfo->isVariadic ? "ARG_VARIADIC" : "ARG"; + $argDefaultKind = $argInfo->hasDefaultValue() ? "_WITH_DEFAULT_VALUE" : ""; $argType = $argInfo->type; if ($argType !== null) { if (null !== $simpleArgType = $argType->tryToSimpleType()) { if ($simpleArgType->isBuiltin) { $code .= sprintf( - "\tZEND_%s_TYPE_INFO(%s, %s, %s, %d)\n", - $argKind, $argInfo->getSendByString(), $argInfo->name, - $simpleArgType->toTypeCode(), $argType->isNullable() + "\tZEND_%s_TYPE_INFO%s(%s, %s, %s, %d%s)\n", + $argKind, $argDefaultKind, $argInfo->getSendByString(), $argInfo->name, + $simpleArgType->toTypeCode(), $argType->isNullable(), + $argInfo->hasDefaultValue() ? ", " . $argInfo->getDefaultValueString() : "" ); } else { $code .= sprintf( - "\tZEND_%s_OBJ_INFO(%s, %s, %s, %d)\n", - $argKind, $argInfo->getSendByString(), $argInfo->name, - $simpleArgType->toEscapedName(), $argType->isNullable() + "\tZEND_%s_OBJ_INFO%s(%s, %s, %s, %d%s)\n", + $argKind,$argDefaultKind, $argInfo->getSendByString(), $argInfo->name, + $simpleArgType->toEscapedName(), $argType->isNullable(), + $argInfo->hasDefaultValue() ? ", " . $argInfo->getDefaultValueString() : "" ); } } else if (null !== $representableType = $argType->tryToRepresentableType()) { @@ -694,16 +725,20 @@ function funcInfoToCode(FuncInfo $funcInfo): string { throw new Exception('Unimplemented'); } $code .= sprintf( - "\tZEND_%s_TYPE_MASK(%s, %s, %s)\n", + "\tZEND_%s_TYPE_MASK(%s, %s, %s, %s)\n", $argKind, $argInfo->getSendByString(), $argInfo->name, - $representableType->toTypeMask() + $representableType->toTypeMask(), + $argInfo->getDefaultValueString() ); } else { throw new Exception('Unimplemented'); } } else { $code .= sprintf( - "\tZEND_%s_INFO(%s, %s)\n", $argKind, $argInfo->getSendByString(), $argInfo->name); + "\tZEND_%s_INFO%s(%s, %s%s)\n", + $argKind, $argDefaultKind, $argInfo->getSendByString(), $argInfo->name, + $argInfo->hasDefaultValue() ? ", " . $argInfo->getDefaultValueString() : "" + ); } } diff --git a/ext/bz2/bz2_arginfo.h b/ext/bz2/bz2_arginfo.h index 297f45e4a4e65..03fe9eb8f0bdc 100644 --- a/ext/bz2/bz2_arginfo.h +++ b/ext/bz2/bz2_arginfo.h @@ -7,7 +7,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_bzread, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, bz) - ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "1024") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_bzwrite, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) @@ -36,13 +36,13 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_bzcompress, 0, 1, MAY_BE_STRING|MAY_BE_LONG) ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, blocksize, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, workfactor, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, blocksize, IS_LONG, 0, "4") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, workfactor, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_bzdecompress, 0, 1, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, small, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, small, IS_LONG, 0, "0") ZEND_END_ARG_INFO() diff --git a/ext/calendar/calendar_arginfo.h b/ext/calendar/calendar_arginfo.h index c7f2ad2fc1dcf..45abb0b0b2229 100644 --- a/ext/calendar/calendar_arginfo.h +++ b/ext/calendar/calendar_arginfo.h @@ -24,7 +24,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_easter_date, 0, 0, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, year, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, method, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, method, IS_LONG, 0, "CAL_EASTER_DEFAULT") ZEND_END_ARG_INFO() #define arginfo_easter_days arginfo_easter_date @@ -39,7 +39,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_jddayofweek, 0, 1, MAY_BE_LONG|MAY_BE_STRING) ZEND_ARG_TYPE_INFO(0, juliandaycount, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "CAL_DOW_DAYNO") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_jdmonthname, 0, 2, IS_STRING, 0) @@ -55,8 +55,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_jdtojewish, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, juliandaycount, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, hebrew, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, fl, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, hebrew, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, fl, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #define arginfo_jdtojulian arginfo_jdtofrench diff --git a/ext/com_dotnet/com_extension_arginfo.h b/ext/com_dotnet/com_extension_arginfo.h index 4553db9283bc3..9d8592d5dde8b 100644 --- a/ext/com_dotnet/com_extension_arginfo.h +++ b/ext/com_dotnet/com_extension_arginfo.h @@ -55,7 +55,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_variant_cmp, 0, 2, IS_LONG, 0) ZEND_ARG_INFO(0, left) ZEND_ARG_INFO(0, right) ZEND_ARG_TYPE_INFO(0, lcid, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_variant_date_to_timestamp, 0, 1, IS_LONG, 1) @@ -96,37 +96,37 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_com_print_typeinfo, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, comobject) - ZEND_ARG_TYPE_INFO(0, dispinterface, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, wantsink, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dispinterface, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, wantsink, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_com_message_pump, 0, 0, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, timeoutms, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timeoutms, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_com_load_typelib, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, typelib_name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, case_insensitive, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, case_insensitive, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_variant___construct, 0, 0, 0) - ZEND_ARG_INFO(0, value) - ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, codepage, IS_LONG, 0) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, value, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_LONG, 0, "VT_EMPTY") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, codepage, IS_LONG, 0, "CP_ACP") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_com___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, module_name, IS_STRING, 0) - ZEND_ARG_INFO(0, server_name) - ZEND_ARG_TYPE_INFO(0, codepage, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, typelib, IS_STRING, 0) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, server_name, "UNKOWN") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, codepage, IS_LONG, 0, "CP_ACP") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, typelib, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() #if HAVE_MSCOREE_H ZEND_BEGIN_ARG_INFO_EX(arginfo_class_dotnet___construct, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, assembly_name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, datatype_name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, codepage, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, codepage, IS_LONG, 0, "CP_ACP") ZEND_END_ARG_INFO() #endif diff --git a/ext/com_dotnet/com_persist_arginfo.h b/ext/com_dotnet/com_persist_arginfo.h index ba79007ccc558..0abd6505de68b 100644 --- a/ext/com_dotnet/com_persist_arginfo.h +++ b/ext/com_dotnet/com_persist_arginfo.h @@ -9,12 +9,12 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_COMPersistHelper_SaveToFile, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, remember, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, remember, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_COMPersistHelper_LoadFromFile, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_COMPersistHelper_GetMaxStreamSize, 0, 0, IS_LONG, 0) diff --git a/ext/curl/curl_arginfo.h b/ext/curl/curl_arginfo.h index 9f20f3a4f2c25..efc57e9148733 100644 --- a/ext/curl/curl_arginfo.h +++ b/ext/curl/curl_arginfo.h @@ -78,7 +78,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_curl_multi_info_read, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_INFO(0, multi_handle) - ZEND_ARG_INFO(1, msgs_in_queue) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, msgs_in_queue, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_multi_init, 0, 0, 0) @@ -88,7 +88,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_multi_select, 0, 1, IS_LONG, 0) ZEND_ARG_INFO(0, multi_handle) - ZEND_ARG_TYPE_INFO(0, timeout, IS_DOUBLE, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timeout, IS_DOUBLE, 0, "1.0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_multi_strerror, 0, 1, IS_STRING, 1) diff --git a/ext/date/php_date_arginfo.h b/ext/date/php_date_arginfo.h index 37c58e84ab503..1cc39b228857f 100644 --- a/ext/date/php_date_arginfo.h +++ b/ext/date/php_date_arginfo.h @@ -46,7 +46,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_localtime, 0, 0, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, timestamp, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, associative, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, associative, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_getdate, 0, 0, IS_ARRAY, 0) @@ -54,25 +54,25 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_getdate, 0, 0, IS_ARRAY, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_date_create, 0, 0, DateTime, MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, time, IS_STRING, 0) - ZEND_ARG_OBJ_INFO(0, timezone, DateTimeZone, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, time, IS_STRING, 0, "\"now\"") + ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, timezone, DateTimeZone, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_date_create_immutable, 0, 0, DateTimeImmutable, MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, time, IS_STRING, 0) - ZEND_ARG_OBJ_INFO(0, timezone, DateTimeZone, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, time, IS_STRING, 0, "\"now\"") + ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, timezone, DateTimeZone, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_date_create_from_format, 0, 2, DateTime, MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, time, IS_STRING, 0) - ZEND_ARG_OBJ_INFO(0, timezone, DateTimeZone, 1) + ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, timezone, DateTimeZone, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_date_create_immutable_from_format, 0, 2, DateTimeImmutable, MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, time, IS_STRING, 0) - ZEND_ARG_OBJ_INFO(0, timezone, DateTimeZone, 1) + ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, timezone, DateTimeZone, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_date_parse, 0, 1, IS_ARRAY, 0) @@ -120,15 +120,15 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_date_diff, 0, 2, DateInterval, 0) ZEND_ARG_OBJ_INFO(0, object, DateTimeInterface, 0) ZEND_ARG_OBJ_INFO(0, object2, DateTimeInterface, 0) - ZEND_ARG_TYPE_INFO(0, absolute, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, absolute, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_date_time_set, 0, 3, DateTime, 0) ZEND_ARG_OBJ_INFO(0, object, DateTime, 0) ZEND_ARG_TYPE_INFO(0, hour, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, minute, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, second, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, microseconds, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, second, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, microseconds, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_date_date_set, 0, 4, DateTime, 0) @@ -142,7 +142,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_date_isodate_set, 0, 3, DateTime, ZEND_ARG_OBJ_INFO(0, object, DateTime, 0) ZEND_ARG_TYPE_INFO(0, year, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, week, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, day, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, day, IS_LONG, 0, "1") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_date_timestamp_set, 0, 2, DateTime, 0) @@ -164,8 +164,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_timezone_name_from_abbr, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, abbr, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, gmtoffset, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, isdst, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, gmtoffset, IS_LONG, 0, "-1") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, isdst, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_timezone_offset_get, 0, 2, IS_LONG, 0) @@ -175,8 +175,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_timezone_transitions_get, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_OBJ_INFO(0, object, DateTimeZone, 0) - ZEND_ARG_TYPE_INFO(0, timestamp_begin, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, timestamp_end, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timestamp_begin, IS_LONG, 0, "PHP_INT_MIN") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timestamp_end, IS_LONG, 0, "PHP_INT_MAX") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_timezone_location_get, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) @@ -184,8 +184,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_timezone_location_get, 0, 1, MAY ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_timezone_identifiers_list, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, what, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, country, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, what, IS_LONG, 0, "DateTimeZone::ALL") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, country, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_timezone_abbreviations_list, 0, 0, IS_ARRAY, 0) @@ -211,11 +211,11 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_date_sunrise, 0, 1, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, time, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, retformat, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, retformat, IS_LONG, 0, "SUNFUNCS_RET_STRING") ZEND_ARG_TYPE_INFO(0, latitude, IS_DOUBLE, 0) ZEND_ARG_TYPE_INFO(0, longitude, IS_DOUBLE, 0) ZEND_ARG_TYPE_INFO(0, zenith, IS_DOUBLE, 0) - ZEND_ARG_TYPE_INFO(0, gmt_offset, IS_DOUBLE, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, gmt_offset, IS_DOUBLE, 0, "0") ZEND_END_ARG_INFO() #define arginfo_date_sunset arginfo_date_sunrise @@ -239,14 +239,14 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTimeInterface_diff, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, object, DateTimeInterface, 0) - ZEND_ARG_TYPE_INFO(0, absolute, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, absolute, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #define arginfo_class_DateTimeInterface___wakeup arginfo_class_DateTimeInterface_getTimezone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTime___construct, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, time, IS_STRING, 0) - ZEND_ARG_OBJ_INFO(0, timezone, DateTimeZone, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, time, IS_STRING, 0, "\"now\"") + ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, timezone, DateTimeZone, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTime___set_state, 0, 0, 1) @@ -264,7 +264,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTime_createFromFormat, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, time, IS_STRING, 0) - ZEND_ARG_OBJ_INFO(0, timezone, DateTimeZone, 1) + ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, timezone, DateTimeZone, 1, "null") ZEND_END_ARG_INFO() #define arginfo_class_DateTime_getLastErrors arginfo_class_DateTimeInterface_getTimezone @@ -286,8 +286,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTime_setTime, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, hour, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, minute, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, second, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, microseconds, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, second, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, microseconds, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTime_setDate, 0, 0, 3) @@ -299,7 +299,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTime_setISODate, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, year, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, week, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, day, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, day, IS_LONG, 0, "1") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTime_setTimestamp, 0, 0, 1) @@ -349,8 +349,8 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTimeZone_getOffset, 0, 0, 1) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTimeZone_getTransitions, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, timestamp_begin, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, timestamp_end, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timestamp_begin, IS_LONG, 0, "PHP_INT_MIN") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timestamp_end, IS_LONG, 0, "PHP_INT_MAX") ZEND_END_ARG_INFO() #define arginfo_class_DateTimeZone_getLocation arginfo_class_DateTimeInterface_getTimezone @@ -358,8 +358,8 @@ ZEND_END_ARG_INFO() #define arginfo_class_DateTimeZone_listAbbreviations arginfo_class_DateTimeInterface_getTimezone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTimeZone_listIdentifiers, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, what, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, country, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, what, IS_LONG, 0, "DateTimeZone::ALL") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, country, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #define arginfo_class_DateTimeZone___wakeup arginfo_class_DateTimeInterface_getTimezone diff --git a/ext/dba/dba_arginfo.h b/ext/dba/dba_arginfo.h index 97f3a29936b34..d2907d7f31bfb 100644 --- a/ext/dba/dba_arginfo.h +++ b/ext/dba/dba_arginfo.h @@ -21,7 +21,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_dba_fetch, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, key) ZEND_ARG_INFO(0, skip) - ZEND_ARG_INFO(0, handle) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, handle, "UNKOWN") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_dba_key_split, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) @@ -51,7 +51,7 @@ ZEND_END_ARG_INFO() #define arginfo_dba_sync arginfo_dba_optimize ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dba_handlers, 0, 0, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, full_info, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, full_info, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dba_list, 0, 0, IS_ARRAY, 0) diff --git a/ext/dom/attr_arginfo.h b/ext/dom/attr_arginfo.h index 4675acac7a96f..2a184f3d559e4 100644 --- a/ext/dom/attr_arginfo.h +++ b/ext/dom/attr_arginfo.h @@ -2,7 +2,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMAttr___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMAttr_isId, 0, 0, 0) diff --git a/ext/dom/comment_arginfo.h b/ext/dom/comment_arginfo.h index 0b6e1c97c9c85..03b1a5a19fe0a 100644 --- a/ext/dom/comment_arginfo.h +++ b/ext/dom/comment_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMComment___construct, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() diff --git a/ext/dom/document_arginfo.h b/ext/dom/document_arginfo.h index eba90752b32a5..0d51410b02e57 100644 --- a/ext/dom/document_arginfo.h +++ b/ext/dom/document_arginfo.h @@ -1,7 +1,7 @@ /* This is a generated file, edit the .stub.php file instead. */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument___construct, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, version, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, version, IS_STRING, 0, "\"1.0\"") ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -25,20 +25,20 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_createElement, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, tagName, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_createElementNS, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, namespaceURI, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, qualifiedName, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() #define arginfo_class_DOMDocument_createEntityReference arginfo_class_DOMDocument_createAttribute ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_createProcessingInstruction, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, target, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, data, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() #define arginfo_class_DOMDocument_createTextNode arginfo_class_DOMDocument_createCDATASection @@ -58,17 +58,17 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_importNode, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, importedNode, DOMNode, 0) - ZEND_ARG_TYPE_INFO(0, deep, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, deep, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_load, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_loadXML, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #define arginfo_class_DOMDocument_normalizeDocument arginfo_class_DOMDocument_createDocumentFragment @@ -83,20 +83,20 @@ ZEND_END_ARG_INFO() #if defined(LIBXML_HTML_ENABLED) ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_loadHTML, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #endif #if defined(LIBXML_HTML_ENABLED) ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_loadHTMLFile, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #endif #if defined(LIBXML_HTML_ENABLED) ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_saveHTML, 0, 0, 0) - ZEND_ARG_OBJ_INFO(0, node, DOMNode, 1) + ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, node, DOMNode, 1, "null") ZEND_END_ARG_INFO() #endif @@ -107,21 +107,21 @@ ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_saveXML, 0, 0, 0) - ZEND_ARG_OBJ_INFO(0, node, DOMNode, 1) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, node, DOMNode, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #if defined(LIBXML_SCHEMAS_ENABLED) ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_schemaValidate, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #endif #if defined(LIBXML_SCHEMAS_ENABLED) ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_schemaValidateSource, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #endif @@ -140,7 +140,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_DOMDocument_validate arginfo_class_DOMDocument_createDocumentFragment ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_xinclude, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_adoptNode, 0, 0, 1) diff --git a/ext/dom/domimplementation_arginfo.h b/ext/dom/domimplementation_arginfo.h index 1747bfb769a3c..fabce425d1449 100644 --- a/ext/dom/domimplementation_arginfo.h +++ b/ext/dom/domimplementation_arginfo.h @@ -9,12 +9,12 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMImplementation_createDocumentType, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, qualifiedName, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, publicId, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, systemId, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, publicId, IS_STRING, 0, "\"\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, systemId, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMImplementation_createDocument, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, namespaceURI, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, qualifiedName, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, namespaceURI, IS_STRING, 0, "\"\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, qualifiedName, IS_STRING, 0, "\"\"") ZEND_ARG_OBJ_INFO(0, doctype, DOMDocumentType, 0) ZEND_END_ARG_INFO() diff --git a/ext/dom/element_arginfo.h b/ext/dom/element_arginfo.h index 2fe19baa8fca8..496afd45ab683 100644 --- a/ext/dom/element_arginfo.h +++ b/ext/dom/element_arginfo.h @@ -2,8 +2,8 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMElement___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, uri, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMElement_getAttribute, 0, 0, 1) diff --git a/ext/dom/node_arginfo.h b/ext/dom/node_arginfo.h index 928c289d51bb8..58c5b111c2aef 100644 --- a/ext/dom/node_arginfo.h +++ b/ext/dom/node_arginfo.h @@ -16,22 +16,22 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_appendChild, 0, 0, 1) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_C14N, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, exclusive, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, with_comments, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, xpath, IS_ARRAY, 1) - ZEND_ARG_TYPE_INFO(0, ns_prefixes, IS_ARRAY, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, exclusive, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, with_comments, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, xpath, IS_ARRAY, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ns_prefixes, IS_ARRAY, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_C14NFile, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, exclusive, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, with_comments, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, xpath, IS_ARRAY, 1) - ZEND_ARG_TYPE_INFO(0, ns_prefixes, IS_ARRAY, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, exclusive, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, with_comments, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, xpath, IS_ARRAY, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ns_prefixes, IS_ARRAY, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_cloneNode, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, recursive, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, recursive, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_getLineNo, 0, 0, 0) @@ -45,7 +45,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_insertBefore, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, newChild, DOMNode, 0) - ZEND_ARG_OBJ_INFO(0, refChild, DOMNode, 1) + ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, refChild, DOMNode, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_isDefaultNamespace, 0, 0, 1) diff --git a/ext/dom/processinginstruction_arginfo.h b/ext/dom/processinginstruction_arginfo.h index 4cddede82e668..5db080bc34120 100644 --- a/ext/dom/processinginstruction_arginfo.h +++ b/ext/dom/processinginstruction_arginfo.h @@ -2,5 +2,5 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMProcessingInstruction___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() diff --git a/ext/dom/text_arginfo.h b/ext/dom/text_arginfo.h index 2de2464843ebf..b81ef55a81748 100644 --- a/ext/dom/text_arginfo.h +++ b/ext/dom/text_arginfo.h @@ -1,7 +1,7 @@ /* This is a generated file, edit the .stub.php file instead. */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMText___construct, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMText_isWhitespaceInElementContent, 0, 0, 0) diff --git a/ext/dom/xpath_arginfo.h b/ext/dom/xpath_arginfo.h index 64a408be99ae8..a6574c789222a 100644 --- a/ext/dom/xpath_arginfo.h +++ b/ext/dom/xpath_arginfo.h @@ -3,15 +3,15 @@ #if defined(LIBXML_XPATH_ENABLED) ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMXPath___construct, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, doc, DOMDocument, 0) - ZEND_ARG_TYPE_INFO(0, registerNodeNS, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, registerNodeNS, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() #endif #if defined(LIBXML_XPATH_ENABLED) ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMXPath_evaluate, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, expr, IS_STRING, 0) - ZEND_ARG_OBJ_INFO(0, context, DOMNode, 1) - ZEND_ARG_TYPE_INFO(0, registerNodeNS, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, context, DOMNode, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, registerNodeNS, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() #endif @@ -28,6 +28,6 @@ ZEND_END_ARG_INFO() #if defined(LIBXML_XPATH_ENABLED) ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMXPath_registerPhpFunctions, 0, 0, 0) - ZEND_ARG_INFO(0, restrict) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, restrict, "null") ZEND_END_ARG_INFO() #endif diff --git a/ext/exif/exif_arginfo.h b/ext/exif/exif_arginfo.h index a5be44ed8a464..5627e3d0ed2c6 100644 --- a/ext/exif/exif_arginfo.h +++ b/ext/exif/exif_arginfo.h @@ -6,16 +6,16 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_exif_read_data, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_INFO(0, filename) - ZEND_ARG_TYPE_INFO(0, sections_needed, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, sub_arrays, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, read_thumbnail, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sections_needed, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sub_arrays, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, read_thumbnail, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_exif_thumbnail, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, filename) - ZEND_ARG_INFO(1, width) - ZEND_ARG_INFO(1, height) - ZEND_ARG_INFO(1, imagetype) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, width, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, height, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, imagetype, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_exif_imagetype, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) diff --git a/ext/ffi/ffi_arginfo.h b/ext/ffi/ffi_arginfo.h index bcfce179d5c05..6d91fc4a9b2aa 100644 --- a/ext/ffi/ffi_arginfo.h +++ b/ext/ffi/ffi_arginfo.h @@ -15,8 +15,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_new, 0, 1, FFI\\CData, 1) ZEND_ARG_INFO(0, type) - ZEND_ARG_TYPE_INFO(0, owned, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, persistent, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, owned, _IS_BOOL, 0, "true") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, persistent, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_FFI_free, 0, 1, IS_VOID, 0) diff --git a/ext/fileinfo/fileinfo_arginfo.h b/ext/fileinfo/fileinfo_arginfo.h index c3b1c93da7ee1..ca0273229efbe 100644 --- a/ext/fileinfo/fileinfo_arginfo.h +++ b/ext/fileinfo/fileinfo_arginfo.h @@ -1,8 +1,8 @@ /* This is a generated file, edit the .stub.php file instead. */ ZEND_BEGIN_ARG_INFO_EX(arginfo_finfo_open, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, arg, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "FILEINFO_NONE") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arg, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_finfo_close, 0, 1, _IS_BOOL, 0) @@ -17,15 +17,15 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_finfo_file, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, finfo) ZEND_ARG_TYPE_INFO(0, file_name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) - ZEND_ARG_INFO(0, context) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "FILEINFO_NONE") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_finfo_buffer, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, finfo) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) - ZEND_ARG_INFO(0, context) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "FILEINFO_NONE") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mime_content_type, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) @@ -36,14 +36,14 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_finfo_file, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, file_name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) - ZEND_ARG_INFO(0, context) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "FILEINFO_NONE") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_finfo_buffer, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) - ZEND_ARG_INFO(0, context) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "FILEINFO_NONE") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_finfo_set_flags, 0, 0, 1) diff --git a/ext/filter/filter_arginfo.h b/ext/filter/filter_arginfo.h index b0338ff01e0c6..10a8a5af9d07c 100644 --- a/ext/filter/filter_arginfo.h +++ b/ext/filter/filter_arginfo.h @@ -8,26 +8,26 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_filter_input, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, variable_name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, filter, IS_LONG, 0) - ZEND_ARG_INFO(0, options) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, filter, IS_LONG, 0, "FILTER_DEFAULT") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, options, "NULL") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_filter_var, 0, 0, 1) ZEND_ARG_INFO(0, variable) - ZEND_ARG_TYPE_INFO(0, filter, IS_LONG, 0) - ZEND_ARG_INFO(0, options) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, filter, IS_LONG, 0, "FILTER_DEFAULT") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, options, "NULL") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_filter_input_array, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) - ZEND_ARG_INFO(0, options) - ZEND_ARG_TYPE_INFO(0, add_empty, _IS_BOOL, 0) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, options, "NULL") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, add_empty, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_filter_var_array, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, data, IS_ARRAY, 0) - ZEND_ARG_INFO(0, options) - ZEND_ARG_TYPE_INFO(0, add_empty, _IS_BOOL, 0) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, options, "NULL") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, add_empty, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_filter_list, 0, 0, IS_ARRAY, 0) diff --git a/ext/ftp/ftp_arginfo.h b/ext/ftp/ftp_arginfo.h index 3167de7d644e9..83e7b672f4268 100644 --- a/ext/ftp/ftp_arginfo.h +++ b/ext/ftp/ftp_arginfo.h @@ -2,15 +2,15 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_ftp_connect, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, port, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, timeout, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "21") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timeout, IS_LONG, 0, "90") ZEND_END_ARG_INFO() #if defined(HAVE_FTP_SSL) ZEND_BEGIN_ARG_INFO_EX(arginfo_ftp_ssl_connect, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, port, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, timeout, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "21") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timeout, IS_LONG, 0, "90") ZEND_END_ARG_INFO() #endif @@ -70,7 +70,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ftp_rawlist, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_INFO(0, ftp) ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, recurse, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, recurse, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #define arginfo_ftp_mlsd arginfo_ftp_nlist @@ -81,16 +81,16 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ftp_fget, 0, 3, _IS_BOOL, 0) ZEND_ARG_INFO(0, ftp) ZEND_ARG_INFO(0, fp) ZEND_ARG_TYPE_INFO(0, remote_file, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, resumepos, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "FTP_BINARY") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, resumepos, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ftp_nb_fget, 0, 3, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_INFO(0, ftp) ZEND_ARG_INFO(0, fp) ZEND_ARG_TYPE_INFO(0, remote_file, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, resumpos, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "FTP_BINARY") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, resumpos, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ftp_pasv, 0, 2, _IS_BOOL, 0) @@ -102,16 +102,16 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ftp_get, 0, 3, _IS_BOOL, 0) ZEND_ARG_INFO(0, ftp) ZEND_ARG_TYPE_INFO(0, local_file, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, remote_file, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, resumepos, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "FTP_BINARY") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, resumepos, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ftp_nb_get, 0, 3, IS_LONG, 0) ZEND_ARG_INFO(0, ftp) ZEND_ARG_TYPE_INFO(0, local_file, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, remote_file, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, resume_pos, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "FTP_BINARY") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, resume_pos, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ftp_nb_continue, 0, 1, IS_LONG, 0) @@ -122,39 +122,39 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ftp_fput, 0, 3, _IS_BOOL, 0) ZEND_ARG_INFO(0, ftp) ZEND_ARG_TYPE_INFO(0, remote_file, IS_STRING, 0) ZEND_ARG_INFO(0, fp) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, startpos, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "FTP_BINARY") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, startpos, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ftp_nb_fput, 0, 3, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_INFO(0, ftp) ZEND_ARG_TYPE_INFO(0, remote_file, IS_STRING, 0) ZEND_ARG_INFO(0, fp) - ZEND_ARG_INFO(0, mode) - ZEND_ARG_INFO(0, startpos) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, mode, "FTP_BINARY") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, startpos, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ftp_put, 0, 3, _IS_BOOL, 0) ZEND_ARG_INFO(0, ftp) ZEND_ARG_TYPE_INFO(0, remote_file, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, local_file, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, startpos, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "FTP_BINARY") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, startpos, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ftp_append, 0, 3, _IS_BOOL, 0) ZEND_ARG_INFO(0, ftp) ZEND_ARG_TYPE_INFO(0, remove_file, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, local_file, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "FTP_BINARY") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ftp_nb_put, 0, 3, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_INFO(0, ftp) ZEND_ARG_TYPE_INFO(0, remote_file, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, local_file, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, startpos, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "FTP_BINARY") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, startpos, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ftp_size, 0, 2, IS_LONG, 0) diff --git a/ext/gd/gd_arginfo.h b/ext/gd/gd_arginfo.h index cc2944913e6ac..f2673c935c411 100644 --- a/ext/gd/gd_arginfo.h +++ b/ext/gd/gd_arginfo.h @@ -105,7 +105,7 @@ ZEND_END_ARG_INFO() #if defined(PHP_WIN32) ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imagegrabwindow, 0, 1, GdImage, MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, handle, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, client_area, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, client_area, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #endif @@ -118,7 +118,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imagerotate, 0, 3, GdImage, ZEND_ARG_OBJ_INFO(0, im, GdImage, 0) ZEND_ARG_TYPE_INFO(0, angle, IS_DOUBLE, 0) ZEND_ARG_TYPE_INFO(0, bgdcolor, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, ignoretransparent, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ignoretransparent, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagesettile, 0, 2, _IS_BOOL, 0) @@ -204,13 +204,13 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagegif, 0, 1, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, im, GdImage, 0) - ZEND_ARG_INFO(0, to) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, to, "NULL") ZEND_END_ARG_INFO() #if defined(HAVE_GD_PNG) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagepng, 0, 1, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, im, GdImage, 0) - ZEND_ARG_INFO(0, to) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, to, "NULL") ZEND_ARG_TYPE_INFO(0, quality, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, filters, IS_LONG, 0) ZEND_END_ARG_INFO() @@ -219,7 +219,7 @@ ZEND_END_ARG_INFO() #if defined(HAVE_GD_WEBP) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagewebp, 0, 1, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, im, GdImage, 0) - ZEND_ARG_INFO(0, to) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, to, "NULL") ZEND_ARG_TYPE_INFO(0, quality, IS_LONG, 0) ZEND_END_ARG_INFO() #endif @@ -227,18 +227,21 @@ ZEND_END_ARG_INFO() #if defined(HAVE_GD_JPG) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagejpeg, 0, 1, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, im, GdImage, 0) - ZEND_ARG_INFO(0, to) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, to, "NULL") ZEND_ARG_TYPE_INFO(0, quality, IS_LONG, 0) ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagewbmp, 0, 1, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, im, GdImage, 0) - ZEND_ARG_INFO(0, to) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, to, "NULL") ZEND_ARG_TYPE_INFO(0, foreground, IS_LONG, 0) ZEND_END_ARG_INFO() -#define arginfo_imagegd arginfo_imagegif +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagegd, 0, 1, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, im, GdImage, 0) + ZEND_ARG_INFO(0, to) +ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagegd2, 0, 1, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, im, GdImage, 0) @@ -250,8 +253,8 @@ ZEND_END_ARG_INFO() #if defined(HAVE_GD_BMP) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagebmp, 0, 1, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, im, GdImage, 0) - ZEND_ARG_INFO(0, to) - ZEND_ARG_TYPE_INFO(0, compressed, IS_LONG, 0) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, to, "NULL") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, compressed, IS_LONG, 0, "1") ZEND_END_ARG_INFO() #endif @@ -294,7 +297,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagecolorset, 0, 5, _IS_BOOL, 1 ZEND_ARG_TYPE_INFO(0, red, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, green, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, blue, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, alpha, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, alpha, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imagecolorsforindex, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE) @@ -528,16 +531,16 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imagecropauto, 0, 1, GdImage, MAY_BE_FALSE) ZEND_ARG_OBJ_INFO(0, im, GdImage, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, threshold, IS_DOUBLE, 0) - ZEND_ARG_TYPE_INFO(0, color, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "IMG_CROP_DEFAULT") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, threshold, IS_DOUBLE, 0, "0.5") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, color, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imagescale, 0, 2, GdImage, MAY_BE_FALSE) ZEND_ARG_OBJ_INFO(0, im, GdImage, 0) ZEND_ARG_TYPE_INFO(0, new_width, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, new_height, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "IMG_BILINEAR_FIXED") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imageaffine, 0, 2, GdImage, MAY_BE_FALSE) @@ -560,7 +563,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagesetinterpolation, 0, 1, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, im, GdImage, 0) - ZEND_ARG_TYPE_INFO(0, method, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, method, IS_LONG, 0, "IMG_BILINEAR_FIXED") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imageresolution, 0, 1, MAY_BE_ARRAY|MAY_BE_BOOL) diff --git a/ext/gmp/gmp_arginfo.h b/ext/gmp/gmp_arginfo.h index 91664b87102da..b0309824d4ae0 100644 --- a/ext/gmp/gmp_arginfo.h +++ b/ext/gmp/gmp_arginfo.h @@ -2,19 +2,19 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_gmp_init, 0, 1, GMP, MAY_BE_FALSE) ZEND_ARG_INFO(0, number) - ZEND_ARG_TYPE_INFO(0, base, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, base, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_gmp_import, 0, 1, GMP, MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, word_size, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, word_size, IS_LONG, 0, "1") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "GMP_MSW_FIRST | GMP_NATIVE_ENDIAN") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gmp_export, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, gmpnumber) - ZEND_ARG_TYPE_INFO(0, word_size, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, word_size, IS_LONG, 0, "1") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "GMP_MSW_FIRST | GMP_NATIVE_ENDIAN") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gmp_intval, 0, 1, IS_LONG, 0) @@ -23,7 +23,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gmp_strval, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, gmpnumber) - ZEND_ARG_TYPE_INFO(0, base, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, base, IS_LONG, 0, "10") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_gmp_add, 0, 2, GMP, MAY_BE_FALSE) @@ -38,13 +38,13 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gmp_div_qr, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_INFO(0, a) ZEND_ARG_INFO(0, b) - ZEND_ARG_TYPE_INFO(0, round, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, round, IS_LONG, 0, "GMP_ROUND_ZERO") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_gmp_div_q, 0, 2, GMP, MAY_BE_FALSE) ZEND_ARG_INFO(0, a) ZEND_ARG_INFO(0, b) - ZEND_ARG_TYPE_INFO(0, round, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, round, IS_LONG, 0, "GMP_ROUND_ZERO") ZEND_END_ARG_INFO() #define arginfo_gmp_div_r arginfo_gmp_div_q @@ -98,7 +98,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gmp_prob_prime, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_INFO(0, a) - ZEND_ARG_TYPE_INFO(0, reps, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, reps, IS_LONG, 0, "10") ZEND_END_ARG_INFO() #define arginfo_gmp_gcd arginfo_gmp_add @@ -151,7 +151,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gmp_setbit, 0, 2, _IS_BOOL, 1) ZEND_ARG_OBJ_INFO(0, a, GMP, 0) ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, set_clear, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, set_clear, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gmp_clrbit, 0, 2, _IS_BOOL, 1) diff --git a/ext/hash/hash_arginfo.h b/ext/hash/hash_arginfo.h index 40529aeff8fcc..65b2612823f35 100644 --- a/ext/hash/hash_arginfo.h +++ b/ext/hash/hash_arginfo.h @@ -3,27 +3,27 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hash, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, raw_output, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, raw_output, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hash_file, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, raw_output, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, raw_output, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hash_hmac, 0, 3, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, raw_output, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, raw_output, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #define arginfo_hash_hmac_file arginfo_hash_hmac ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_hash_init, 0, 1, HashContext, 0) ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -35,7 +35,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_update_stream, 0, 2, IS_LONG, 0) ZEND_ARG_OBJ_INFO(0, context, HashContext, 0) ZEND_ARG_INFO(0, handle) - ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_update_file, 0, 2, _IS_BOOL, 0) @@ -46,7 +46,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_final, 0, 1, IS_STRING, 0) ZEND_ARG_OBJ_INFO(0, context, HashContext, 0) - ZEND_ARG_TYPE_INFO(0, raw_output, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, raw_output, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_hash_copy, 0, 1, HashContext, 0) @@ -63,8 +63,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_pbkdf2, 0, 4, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, iterations, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, raw_output, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, raw_output, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_equals, 0, 2, _IS_BOOL, 0) @@ -75,9 +75,9 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_hkdf, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, ikm, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, info, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, info, IS_STRING, 0, "\'\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, salt, IS_STRING, 0, "\'\'") ZEND_END_ARG_INFO() #if defined(PHP_MHASH_BC) diff --git a/ext/iconv/iconv_arginfo.h b/ext/iconv/iconv_arginfo.h index 3a05ba633fcee..f182521ebedf0 100644 --- a/ext/iconv/iconv_arginfo.h +++ b/ext/iconv/iconv_arginfo.h @@ -8,14 +8,14 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_substr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null") ZEND_ARG_TYPE_INFO(0, charset, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_strpos, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO(0, charset, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -28,18 +28,18 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_mime_encode, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, field_name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, field_value, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, preference, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, preference, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_mime_decode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, encoded_string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO(0, charset, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_mime_decode_headers, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, headers, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO(0, charset, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -55,7 +55,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_iconv_set_encoding, 0, 2, _IS_BO ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_get_encoding, 0, 0, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, type, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_STRING, 0, "\'all\'") ZEND_END_ARG_INFO() diff --git a/ext/imap/php_imap_arginfo.h b/ext/imap/php_imap_arginfo.h index e963504dbf946..4631c1c2c55b7 100644 --- a/ext/imap/php_imap_arginfo.h +++ b/ext/imap/php_imap_arginfo.h @@ -4,21 +4,21 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_open, 0, 0, 3) ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, user, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, n_retries, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, n_retries, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO(0, params, IS_ARRAY, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_reopen, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(0, stream_id) ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, n_retries, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, n_retries, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_close, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, stream_id) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_num_msg, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) @@ -34,8 +34,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_headerinfo, 0, 2, stdClass, MAY_BE_FALSE) ZEND_ARG_INFO(0, stream_id) ZEND_ARG_TYPE_INFO(0, msg_no, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, from_length, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, subject_length, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, from_length, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, subject_length, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO(0, default_host, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -43,7 +43,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_imap_rfc822_parse_headers, 0, 1, stdClass, 0) ZEND_ARG_TYPE_INFO(0, headers, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, default_host, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, default_host, IS_STRING, 0, "\'UNKNOWN\'") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_rfc822_write_address, 0, 3, MAY_BE_STRING|MAY_BE_FALSE) @@ -60,7 +60,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_body, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, stream_id) ZEND_ARG_TYPE_INFO(0, msg_no, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #define arginfo_imap_fetchtext arginfo_imap_body @@ -75,7 +75,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_fetchbody, 0, 3, MAY_BE_STR ZEND_ARG_INFO(0, stream_id) ZEND_ARG_TYPE_INFO(0, msg_no, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, section, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #define arginfo_imap_fetchmime arginfo_imap_fetchbody @@ -84,8 +84,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_savebody, 0, 3, _IS_BOOL, 0 ZEND_ARG_INFO(0, stream_id) ZEND_ARG_INFO(0, file) ZEND_ARG_TYPE_INFO(0, msg_no, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, section, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, section, IS_STRING, 0, "\'\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #define arginfo_imap_fetchheader arginfo_imap_body @@ -93,7 +93,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_fetchstructure, 0, 2, stdClass, MAY_BE_FALSE) ZEND_ARG_INFO(0, stream_id) ZEND_ARG_TYPE_INFO(0, msg_no, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_gc, 0, 2, _IS_BOOL, 0) @@ -108,7 +108,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_delete, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(0, stream_id) ZEND_ARG_TYPE_INFO(0, msg_no, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #define arginfo_imap_undelete arginfo_imap_delete @@ -132,14 +132,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_mail_copy, 0, 3, _IS_BOOL, ZEND_ARG_INFO(0, stream_id) ZEND_ARG_TYPE_INFO(0, msglist, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_mail_move, 0, 3, _IS_BOOL, 0) ZEND_ARG_INFO(0, stream_id) ZEND_ARG_TYPE_INFO(0, sequence, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_mail_compose, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) @@ -206,7 +206,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_setflag_full, 0, 3, _IS_BOO ZEND_ARG_INFO(0, stream_id) ZEND_ARG_TYPE_INFO(0, sequence, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, flag, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #define arginfo_imap_clearflag_full arginfo_imap_setflag_full @@ -215,7 +215,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_sort, 0, 3, MAY_BE_ARRAY|MA ZEND_ARG_INFO(0, stream_id) ZEND_ARG_TYPE_INFO(0, criteria, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, reverse, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO(0, search_criteria, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, charset, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -249,7 +249,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_fetch_overview, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_INFO(0, stream_id) ZEND_ARG_TYPE_INFO(0, sequence, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_alerts, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE) @@ -263,8 +263,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_search, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_INFO(0, stream_id) ZEND_ARG_TYPE_INFO(0, criteria, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, charset, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "SE_FREE") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, charset, IS_STRING, 0, "\'\'") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_utf7_decode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) @@ -291,12 +291,12 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_thread, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_INFO(0, stream_id) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "SE_FREE") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_timeout, 0, 1, MAY_BE_LONG|MAY_BE_BOOL) ZEND_ARG_TYPE_INFO(0, timeout_type, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, timeout, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timeout, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() #if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001) diff --git a/ext/intl/breakiterator/breakiterator_arginfo.h b/ext/intl/breakiterator/breakiterator_arginfo.h index 27d51850501d4..ed169140ad03a 100644 --- a/ext/intl/breakiterator/breakiterator_arginfo.h +++ b/ext/intl/breakiterator/breakiterator_arginfo.h @@ -1,7 +1,7 @@ /* This is a generated file, edit the .stub.php file instead. */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlBreakIterator_createCharacterInstance, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, locale, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlBreakIterator_createCodePointInstance, 0, 0, 0) @@ -34,7 +34,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlBreakIterator_getLocale, 0, 0, 1) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlBreakIterator_getPartsIterator, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, key_type, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, key_type, IS_STRING, 0, "IntlPartsIterator::KEY_SEQUENTIAL") ZEND_END_ARG_INFO() #define arginfo_class_IntlBreakIterator_getText arginfo_class_IntlBreakIterator_createCodePointInstance @@ -44,7 +44,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_IntlBreakIterator_last arginfo_class_IntlBreakIterator_createCodePointInstance ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlBreakIterator_next, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 1, "null") ZEND_END_ARG_INFO() #define arginfo_class_IntlBreakIterator_preceding arginfo_class_IntlBreakIterator_following @@ -57,7 +57,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlRuleBasedBreakIterator___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, rules, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, areCompiled, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, areCompiled, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #define arginfo_class_IntlRuleBasedBreakIterator_getBinaryRules arginfo_class_IntlBreakIterator_createCodePointInstance diff --git a/ext/intl/calendar/calendar_arginfo.h b/ext/intl/calendar/calendar_arginfo.h index 0d3e5da5414fc..ea150f3785a48 100644 --- a/ext/intl/calendar/calendar_arginfo.h +++ b/ext/intl/calendar/calendar_arginfo.h @@ -4,8 +4,8 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar___construct, 0, 0, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_createInstance, 0, 0, 0) - ZEND_ARG_INFO(0, timeZone) - ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, timeZone, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, locale, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_equals, 0, 0, 1) @@ -27,12 +27,12 @@ ZEND_END_ARG_INFO() #define arginfo_class_IntlCalendar_before arginfo_class_IntlCalendar_equals ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_clear, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, field, IS_LONG, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_fromDateTime, 0, 0, 1) ZEND_ARG_INFO(0, dateTime) - ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, locale, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_get, 0, 0, 1) @@ -100,7 +100,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_IntlCalendar_isLenient arginfo_class_IntlCalendar___construct ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_isWeekend, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, date, IS_DOUBLE, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, date, IS_DOUBLE, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_roll, 0, 0, 2) diff --git a/ext/intl/collator/collator_arginfo.h b/ext/intl/collator/collator_arginfo.h index f96cb52f0a46a..b667d1fc92bb9 100644 --- a/ext/intl/collator/collator_arginfo.h +++ b/ext/intl/collator/collator_arginfo.h @@ -13,7 +13,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator_sort, 0, 0, 1) ZEND_ARG_TYPE_INFO(1, arr, IS_ARRAY, 0) - ZEND_ARG_INFO(0, sort_flag) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, sort_flag, "Collator::SORT_REGULAR") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator_sortWithSortKeys, 0, 0, 1) @@ -22,7 +22,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator_asort, 0, 0, 1) ZEND_ARG_TYPE_INFO(1, arr, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, sort_flag, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sort_flag, IS_LONG, 0, "Collator::SORT_REGULAR") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator_getAttribute, 0, 0, 1) diff --git a/ext/intl/converter/converter_arginfo.h b/ext/intl/converter/converter_arginfo.h index e3df6b20fdf7e..da77fd07cf060 100644 --- a/ext/intl/converter/converter_arginfo.h +++ b/ext/intl/converter/converter_arginfo.h @@ -1,13 +1,13 @@ /* This is a generated file, edit the .stub.php file instead. */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_UConverter___construct, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, destination_encoding, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, source_encoding, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, destination_encoding, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, source_encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_UConverter_convert, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, reverse, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, reverse, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_UConverter_fromUCallback, 0, 0, 4) @@ -65,5 +65,5 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_UConverter_transcode, 0, 0, 3) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, toEncoding, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, fromEncoding, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_ARRAY, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 1, "null") ZEND_END_ARG_INFO() diff --git a/ext/intl/dateformat/dateformat_arginfo.h b/ext/intl/dateformat/dateformat_arginfo.h index 54e673410d615..dee284704d210 100644 --- a/ext/intl/dateformat/dateformat_arginfo.h +++ b/ext/intl/dateformat/dateformat_arginfo.h @@ -4,9 +4,9 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlDateFormatter___construct, 0, 0, 3) ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, datetype, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, timetype, IS_LONG, 0) - ZEND_ARG_INFO(0, timezone) - ZEND_ARG_INFO(0, calendar) - ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, timezone, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, calendar, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pattern, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() #define arginfo_class_IntlDateFormatter_create arginfo_class_IntlDateFormatter___construct @@ -54,13 +54,13 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlDateFormatter_formatObject, 0, 0, 1) ZEND_ARG_INFO(0, object) - ZEND_ARG_INFO(0, format) - ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, format, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, locale, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlDateFormatter_parse, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) - ZEND_ARG_INFO(1, position) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, position, "null") ZEND_END_ARG_INFO() #define arginfo_class_IntlDateFormatter_localtime arginfo_class_IntlDateFormatter_parse diff --git a/ext/intl/formatter/formatter_arginfo.h b/ext/intl/formatter/formatter_arginfo.h index d684a4ce2abd8..539b9de978a02 100644 --- a/ext/intl/formatter/formatter_arginfo.h +++ b/ext/intl/formatter/formatter_arginfo.h @@ -3,20 +3,20 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_NumberFormatter___construct, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, style, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pattern, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() #define arginfo_class_NumberFormatter_create arginfo_class_NumberFormatter___construct ZEND_BEGIN_ARG_INFO_EX(arginfo_class_NumberFormatter_format, 0, 0, 1) - ZEND_ARG_TYPE_MASK(0, value, MAY_BE_LONG|MAY_BE_DOUBLE) - ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) + ZEND_ARG_TYPE_MASK(0, value, MAY_BE_LONG|MAY_BE_DOUBLE, NULL) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_LONG, 0, "NumberFormatter::TYPE_DEFAULT") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_NumberFormatter_parse, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) - ZEND_ARG_INFO(1, position) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_LONG, 0, "NumberFormatter::TYPE_DOUBLE") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, position, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_NumberFormatter_formatCurrency, 0, 0, 2) @@ -27,7 +27,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_NumberFormatter_parseCurrency, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) ZEND_ARG_INFO(1, currency) - ZEND_ARG_INFO(1, position) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, position, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_NumberFormatter_setAttribute, 0, 0, 2) @@ -58,7 +58,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_NumberFormatter_getPattern, 0, 0, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_NumberFormatter_getLocale, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_LONG, 0, "ULOC_ACTUAL_LOCALE") ZEND_END_ARG_INFO() #define arginfo_class_NumberFormatter_getErrorCode arginfo_class_NumberFormatter_getPattern diff --git a/ext/intl/locale/locale_arginfo.h b/ext/intl/locale/locale_arginfo.h index f509cef10dfa7..4ec09bc246641 100644 --- a/ext/intl/locale/locale_arginfo.h +++ b/ext/intl/locale/locale_arginfo.h @@ -17,7 +17,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Locale_getDisplayScript, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, in_locale, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, in_locale, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #define arginfo_class_Locale_getDisplayRegion arginfo_class_Locale_getDisplayScript @@ -39,14 +39,14 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Locale_filterMatches, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, langtag, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, canonicalize, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, canonicalize, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Locale_lookup, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, langtag, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, canonicalize, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, def, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, canonicalize, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, def, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #define arginfo_class_Locale_canonicalize arginfo_class_Locale_setDefault diff --git a/ext/intl/normalizer/normalizer_arginfo.h b/ext/intl/normalizer/normalizer_arginfo.h index 9f2a12f97b7d3..d4cb5d80fec7b 100644 --- a/ext/intl/normalizer/normalizer_arginfo.h +++ b/ext/intl/normalizer/normalizer_arginfo.h @@ -2,7 +2,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Normalizer_normalize, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, form, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, form, IS_LONG, 0, "Normalizer::FORM_C") ZEND_END_ARG_INFO() #define arginfo_class_Normalizer_isNormalized arginfo_class_Normalizer_normalize @@ -10,6 +10,6 @@ ZEND_END_ARG_INFO() #if U_ICU_VERSION_MAJOR_NUM >= 56 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Normalizer_getRawDecomposition, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, form, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, form, IS_LONG, 0, "Normalizer::FORM_C") ZEND_END_ARG_INFO() #endif diff --git a/ext/intl/php_intl_arginfo.h b/ext/intl/php_intl_arginfo.h index c391ef2232da7..ece7aa6ef5f7a 100644 --- a/ext/intl/php_intl_arginfo.h +++ b/ext/intl/php_intl_arginfo.h @@ -1,8 +1,8 @@ /* This is a generated file, edit the .stub.php file instead. */ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intlcal_create_instance, 0, 0, IntlCalendar, 1) - ZEND_ARG_INFO(0, timeZone) - ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, timeZone, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, locale, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_intlcal_get_keyword_values_for_locale, 0, 3, IntlIterator, MAY_BE_FALSE) @@ -67,7 +67,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_clear, 0, 1, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) - ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, field, IS_LONG, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intlcal_field_difference, 0, 3, MAY_BE_LONG|MAY_BE_FALSE) @@ -136,7 +136,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_is_weekend, 0, 1, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0) - ZEND_ARG_TYPE_INFO(0, date, IS_DOUBLE, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, date, IS_DOUBLE, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_set_first_day_of_week, 0, 2, _IS_BOOL, 0) @@ -166,7 +166,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intlcal_from_date_time, 0, 1, IntlCalendar, 1) ZEND_ARG_INFO(0, dateTime) - ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, locale, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_intlcal_to_date_time, 0, 1, DateTime, MAY_BE_FALSE) @@ -180,8 +180,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intlcal_get_error_message, 0, 1, ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intlgregcal_create_instance, 0, 0, IntlGregorianCalendar, 1) - ZEND_ARG_INFO(0, timeZone) - ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, timeZone, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, locale, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlgregcal_set_gregorian_change, 0, 2, _IS_BOOL, 0) @@ -231,7 +231,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_collator_sort, 0, 2, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, object, Collator, 0) ZEND_ARG_TYPE_INFO(1, arr, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, sort_flag, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sort_flag, IS_LONG, 0, "Collator::SORT_REGULAR") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_collator_sort_with_sort_keys, 0, 2, _IS_BOOL, 0) @@ -277,9 +277,9 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_datefmt_create, 0, 3, IntlDateFor ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, datetype, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, timetype, IS_LONG, 0) - ZEND_ARG_INFO(0, timezone) - ZEND_ARG_INFO(0, calendar) - ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, timezone, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, calendar, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pattern, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_datefmt_get_datetype, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) @@ -340,20 +340,20 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_datefmt_format_object, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, object) - ZEND_ARG_INFO(0, format) - ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, format, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, locale, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_datefmt_parse, 0, 2, MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_FALSE) ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0) ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) - ZEND_ARG_INFO(1, position) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, position, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_datefmt_localtime, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0) ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) - ZEND_ARG_INFO(1, position) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, position, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_datefmt_get_error_code, 0, 1, IS_LONG, 0) @@ -367,20 +367,20 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_numfmt_create, 0, 2, NumberFormatter, 1) ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, style, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pattern, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_numfmt_format, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0) - ZEND_ARG_TYPE_MASK(0, value, MAY_BE_LONG|MAY_BE_DOUBLE) - ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) + ZEND_ARG_TYPE_MASK(0, value, MAY_BE_LONG|MAY_BE_DOUBLE, NULL) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_LONG, 0, "NumberFormatter::TYPE_DEFAULT") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_numfmt_parse, 0, 2, MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_FALSE) ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0) ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) - ZEND_ARG_INFO(1, position) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_LONG, 0, "NumberFormatter::TYPE_DOUBLE") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, position, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_numfmt_format_currency, 0, 3, MAY_BE_STRING|MAY_BE_FALSE) @@ -393,7 +393,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_numfmt_parse_currency, 0, 3, MAY ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0) ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) ZEND_ARG_INFO(1, currency) - ZEND_ARG_INFO(1, position) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, position, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_numfmt_set_attribute, 0, 3, _IS_BOOL, 0) @@ -433,7 +433,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_numfmt_get_locale, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0) - ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_LONG, 0, "ULOC_ACTUAL_LOCALE") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_numfmt_get_error_code, 0, 1, IS_LONG, 0) @@ -451,7 +451,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_grapheme_strpos, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #define arginfo_grapheme_stripos arginfo_grapheme_strpos @@ -463,13 +463,13 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_grapheme_substr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_grapheme_strstr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, before_needle, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, before_needle, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #define arginfo_grapheme_stristr arginfo_grapheme_strstr @@ -477,16 +477,16 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_grapheme_extract, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, extract_type, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) - ZEND_ARG_INFO(1, next) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, extract_type, IS_LONG, 0, "GRAPHEME_EXTR_COUNT") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, start, IS_LONG, 0, "0") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, next, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_idn_to_ascii, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, variant, IS_LONG, 0) - ZEND_ARG_INFO(1, idna_info) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, variant, IS_LONG, 0, "INTL_IDNA_VARIANT_UTS46") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, idna_info, "null") ZEND_END_ARG_INFO() #define arginfo_idn_to_utf8 arginfo_idn_to_ascii @@ -511,7 +511,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_locale_get_display_script, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, in_locale, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, in_locale, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #define arginfo_locale_get_display_region arginfo_locale_get_display_script @@ -535,7 +535,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_locale_filter_matches, 0, 2, _IS_BOOL, 1) ZEND_ARG_TYPE_INFO(0, langtag, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, canonicalize, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, canonicalize, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #define arginfo_locale_canonicalize arginfo_locale_get_primary_language @@ -543,8 +543,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_locale_lookup, 0, 2, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, langtag, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, canonicalize, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, def, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, canonicalize, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, def, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_locale_accept_from_http, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) @@ -599,25 +599,25 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_normalizer_normalize, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, form, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, form, IS_LONG, 0, "Normalizer::FORM_C") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_normalizer_is_normalized, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, form, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, form, IS_LONG, 0, "Normalizer::FORM_C") ZEND_END_ARG_INFO() #if U_ICU_VERSION_MAJOR_NUM >= 56 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_normalizer_get_raw_decomposition, 0, 1, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, form, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, form, IS_LONG, 0, "Normalizer::FORM_C") ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_resourcebundle_create, 0, 2, ResourceBundle, 1) ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, bundlename, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, fallback, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, fallback, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_resourcebundle_get, 0, 0, 2) @@ -647,7 +647,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intltz_create_default, 0, 0, Intl ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_intltz_create_enumeration, 0, 0, 0) - ZEND_ARG_INFO(0, countryOrRawOffset) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, countryOrRawOffset, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intltz_create_time_zone, 0, 1, IntlTimeZone, 1) @@ -656,8 +656,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_intltz_create_time_zone_id_enumeration, 0, 1, IntlIterator, MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, zoneType, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, region, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, rawOffset, IS_LONG, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, region, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, rawOffset, IS_LONG, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intltz_from_date_time_zone, 0, 1, IntlTimeZone, 1) @@ -666,14 +666,14 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_canonical_id, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, zoneId, IS_STRING, 0) - ZEND_ARG_INFO(1, isSystemID) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, isSystemID, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_display_name, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_OBJ_INFO(0, tz, IntlTimeZone, 0) - ZEND_ARG_TYPE_INFO(0, isDaylight, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, style, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, isDaylight, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, style, IS_LONG, 0, "IntlTimeZone::DISPLAY_LONG") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, locale, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intltz_get_dst_savings, 0, 1, IS_LONG, 0) @@ -744,12 +744,12 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_transliterator_create, 0, 1, Transliterator, 1) ZEND_ARG_TYPE_INFO(0, id, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, direction, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, direction, IS_LONG, 0, "Transliterator::FORWARD") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_transliterator_create_from_rules, 0, 1, Transliterator, 1) ZEND_ARG_TYPE_INFO(0, rules, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, direction, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, direction, IS_LONG, 0, "Transliterator::FORWARD") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_transliterator_list_ids, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE) @@ -762,8 +762,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_transliterator_transliterate, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, transliterator) ZEND_ARG_TYPE_INFO(0, subject, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, end, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, start, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, end, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_transliterator_get_error_code, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) diff --git a/ext/intl/resourcebundle/resourcebundle_arginfo.h b/ext/intl/resourcebundle/resourcebundle_arginfo.h index f12ece0972a16..c3202e394feb2 100644 --- a/ext/intl/resourcebundle/resourcebundle_arginfo.h +++ b/ext/intl/resourcebundle/resourcebundle_arginfo.h @@ -3,14 +3,14 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ResourceBundle___construct, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, bundlename, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, fallback, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, fallback, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() #define arginfo_class_ResourceBundle_create arginfo_class_ResourceBundle___construct ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ResourceBundle_get, 0, 0, 1) ZEND_ARG_INFO(0, index) - ZEND_ARG_TYPE_INFO(0, fallback, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, fallback, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ResourceBundle_count, 0, 0, 0) diff --git a/ext/intl/spoofchecker/spoofchecker_arginfo.h b/ext/intl/spoofchecker/spoofchecker_arginfo.h index 8572460fd3f4f..d33fc0285d136 100644 --- a/ext/intl/spoofchecker/spoofchecker_arginfo.h +++ b/ext/intl/spoofchecker/spoofchecker_arginfo.h @@ -5,13 +5,13 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Spoofchecker_isSuspicious, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, text, IS_STRING, 0) - ZEND_ARG_INFO(1, error) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, error, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Spoofchecker_areConfusable, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, s1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, s2, IS_STRING, 0) - ZEND_ARG_INFO(1, error) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, error, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Spoofchecker_setAllowedLocales, 0, 0, 1) diff --git a/ext/intl/tests/locale/bug74993.phpt b/ext/intl/tests/locale/bug74993.phpt index d8d8b9fada2d3..49b5bd4589ab6 100644 --- a/ext/intl/tests/locale/bug74993.phpt +++ b/ext/intl/tests/locale/bug74993.phpt @@ -23,7 +23,7 @@ Function [ function locale_get_display_language ] { - Parameters [2] { Parameter #0 [ string $locale ] - Parameter #1 [ ?string $in_locale ] + Parameter #1 [ ?string $in_locale = null ] } - Return [ string|false ] } @@ -31,7 +31,7 @@ Function [ function locale_get_display_name ] { - Parameters [2] { Parameter #0 [ string $locale ] - Parameter #1 [ ?string $in_locale ] + Parameter #1 [ ?string $in_locale = null ] } - Return [ string|false ] } @@ -39,7 +39,7 @@ Function [ function locale_get_display_region ] { - Parameters [2] { Parameter #0 [ string $locale ] - Parameter #1 [ ?string $in_locale ] + Parameter #1 [ ?string $in_locale = null ] } - Return [ string|false ] } @@ -47,7 +47,7 @@ Function [ function locale_get_display_script ] { - Parameters [2] { Parameter #0 [ string $locale ] - Parameter #1 [ ?string $in_locale ] + Parameter #1 [ ?string $in_locale = null ] } - Return [ string|false ] } @@ -55,7 +55,7 @@ Function [ function locale_get_display_variant ] { - Parameters [2] { Parameter #0 [ string $locale ] - Parameter #1 [ ?string $in_locale ] + Parameter #1 [ ?string $in_locale = null ] } - Return [ string|false ] } @@ -64,7 +64,7 @@ Function [ function locale_filter_matches ] { - Parameters [3] { Parameter #0 [ string $langtag ] Parameter #1 [ string $locale ] - Parameter #2 [ bool $canonicalize ] + Parameter #2 [ bool $canonicalize = false ] } - Return [ ?bool ] } @@ -73,8 +73,8 @@ Function [ function locale_lookup ] { - Parameters [4] { Parameter #0 [ array $langtag ] Parameter #1 [ string $locale ] - Parameter #2 [ bool $canonicalize ] - Parameter #3 [ ?string $def ] + Parameter #2 [ bool $canonicalize = false ] + Parameter #3 [ ?string $def = null ] } - Return [ ?string ] } diff --git a/ext/intl/timezone/timezone_arginfo.h b/ext/intl/timezone/timezone_arginfo.h index b1023d9a9900f..a379891dae9db 100644 --- a/ext/intl/timezone/timezone_arginfo.h +++ b/ext/intl/timezone/timezone_arginfo.h @@ -10,15 +10,15 @@ ZEND_END_ARG_INFO() #define arginfo_class_IntlTimeZone_createDefault arginfo_class_IntlTimeZone___construct ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlTimeZone_createEnumeration, 0, 0, 0) - ZEND_ARG_INFO(0, countryOrRawOffset) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, countryOrRawOffset, "null") ZEND_END_ARG_INFO() #define arginfo_class_IntlTimeZone_createTimeZone arginfo_class_IntlTimeZone_countEquivalentIDs ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlTimeZone_createTimeZoneIDEnumeration, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, zoneType, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, region, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, rawOffset, IS_LONG, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, region, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, rawOffset, IS_LONG, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlTimeZone_fromDateTimeZone, 0, 0, 1) @@ -27,13 +27,13 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlTimeZone_getCanonicalID, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, zoneId, IS_STRING, 0) - ZEND_ARG_INFO(1, isSystemID) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, isSystemID, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlTimeZone_getDisplayName, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, isDaylight, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, style, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, isDaylight, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, style, IS_LONG, 0, "IntlTimeZone::DISPLAY_LONG") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, locale, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #define arginfo_class_IntlTimeZone_getDSTSavings arginfo_class_IntlTimeZone___construct diff --git a/ext/intl/transliterator/transliterator_arginfo.h b/ext/intl/transliterator/transliterator_arginfo.h index 3a9d68c2b4b68..4684a584e9cbd 100644 --- a/ext/intl/transliterator/transliterator_arginfo.h +++ b/ext/intl/transliterator/transliterator_arginfo.h @@ -5,12 +5,12 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Transliterator_create, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, id, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, direction, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, direction, IS_LONG, 0, "Transliterator::FORWARD") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Transliterator_createFromRules, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, rules, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, direction, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, direction, IS_LONG, 0, "Transliterator::FORWARD") ZEND_END_ARG_INFO() #define arginfo_class_Transliterator_createInverse arginfo_class_Transliterator___construct @@ -19,8 +19,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Transliterator_transliterate, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, subject, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, end, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, start, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, end, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() #define arginfo_class_Transliterator_getErrorCode arginfo_class_Transliterator___construct diff --git a/ext/intl/uchar/uchar_arginfo.h b/ext/intl/uchar/uchar_arginfo.h index e7f6d7a8a3666..e715b1a224b4c 100644 --- a/ext/intl/uchar/uchar_arginfo.h +++ b/ext/intl/uchar/uchar_arginfo.h @@ -15,14 +15,14 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_charFromName, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, characterName, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, nameChoice, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, nameChoice, IS_LONG, 0, "IntlChar::UNICODE_CHAR_NAME") ZEND_END_ARG_INFO() #define arginfo_class_IntlChar_charMirror arginfo_class_IntlChar_charAge ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_charName, 0, 0, 1) ZEND_ARG_INFO(0, codepoint) - ZEND_ARG_TYPE_INFO(0, nameChoice, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, nameChoice, IS_LONG, 0, "IntlChar::UNICODE_CHAR_NAME") ZEND_END_ARG_INFO() #define arginfo_class_IntlChar_charType arginfo_class_IntlChar_charAge @@ -31,14 +31,14 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_digit, 0, 0, 1) ZEND_ARG_INFO(0, codepoint) - ZEND_ARG_TYPE_INFO(0, radix, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, radix, IS_LONG, 0, "10") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_enumCharNames, 0, 0, 3) ZEND_ARG_INFO(0, start) ZEND_ARG_INFO(0, limit) ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0) - ZEND_ARG_TYPE_INFO(0, nameChoice, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, nameChoice, IS_LONG, 0, "IntlChar::UNICODE_CHAR_NAME") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_enumCharTypes, 0, 0, 1) @@ -47,12 +47,12 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_foldCase, 0, 0, 1) ZEND_ARG_INFO(0, codepoint) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "IntlChar::FOLD_CASE_DEFAULT") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_forDigit, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, digit, IS_LONG, 0) - ZEND_ARG_INFO(0, radix) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, radix, "10") ZEND_END_ARG_INFO() #if U_ICU_VERSION_MAJOR_NUM >= 52 @@ -83,7 +83,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_getPropertyName, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, property, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, nameChoice, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, nameChoice, IS_LONG, 0, "IntlChar::LONG_PROPERTY_NAME") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_getPropertyValueEnum, 0, 0, 2) @@ -94,7 +94,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_getPropertyValueName, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, property, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, value, IS_LONG, 0) - ZEND_ARG_INFO(0, nameChoice) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, nameChoice, "IntlChar::LONG_PROPERTY_NAME") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_getUnicodeVersion, 0, 0, 0) diff --git a/ext/json/json_arginfo.h b/ext/json/json_arginfo.h index cf06242135562..9107e088e2280 100644 --- a/ext/json/json_arginfo.h +++ b/ext/json/json_arginfo.h @@ -2,15 +2,15 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_json_encode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, value) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, depth, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, depth, IS_LONG, 0, "512") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_json_decode, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, json, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, assoc, _IS_BOOL, 1) - ZEND_ARG_TYPE_INFO(0, depth, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, assoc, _IS_BOOL, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, depth, IS_LONG, 0, "512") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_json_last_error, 0, 0, IS_LONG, 0) diff --git a/ext/ldap/ldap_arginfo.h b/ext/ldap/ldap_arginfo.h index 04a45fb06ed7a..06a3737146643 100644 --- a/ext/ldap/ldap_arginfo.h +++ b/ext/ldap/ldap_arginfo.h @@ -3,17 +3,17 @@ #if defined(HAVE_ORALDAP) ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_connect, 0, 0, 0) ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, port, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "389") ZEND_ARG_TYPE_INFO(0, wallet, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, wallet_passwd, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, authmode, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, authmode, IS_LONG, 0, "GSLC_SSL_NO_AUTH") ZEND_END_ARG_INFO() #endif #if !(defined(HAVE_ORALDAP)) ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_connect, 0, 0, 0) ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, port, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "389") ZEND_END_ARG_INFO() #endif @@ -33,7 +33,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_bind_ext, 0, 0, 1) ZEND_ARG_INFO(0, link_identifier) ZEND_ARG_TYPE_INFO(0, bind_rdn, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, bind_password, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, servercontrols, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, servercontrols, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() #if defined(HAVE_LDAP_SASL) @@ -53,12 +53,12 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_read, 0, 0, 3) ZEND_ARG_INFO(0, link_identifier) ZEND_ARG_INFO(0, base_dn) ZEND_ARG_INFO(0, filter) - ZEND_ARG_TYPE_INFO(0, attributes, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, attrsonly, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, sizelimit, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, timelimit, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, deref, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, servercontrols, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attrsonly, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sizelimit, IS_LONG, 0, "-1") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timelimit, IS_LONG, 0, "-1") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, deref, IS_LONG, 0, "LDAP_DEREF_NEVER") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, servercontrols, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() #define arginfo_ldap_list arginfo_ldap_read @@ -123,33 +123,33 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_add, 0, 3, _IS_BOOL, 0) ZEND_ARG_INFO(0, link_identifier) ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, entry, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, servercontrols, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, servercontrols, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_add_ext, 0, 0, 3) ZEND_ARG_INFO(0, link_identifier) ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, entry, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, servercontrols, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, servercontrols, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_delete, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(0, link_identifier) ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, servercontrols, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, servercontrols, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_delete_ext, 0, 0, 2) ZEND_ARG_INFO(0, link_identifier) ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, servercontrols, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, servercontrols, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_modify_batch, 0, 3, _IS_BOOL, 0) ZEND_ARG_INFO(0, link_identifier) ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, modifications_info, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, servercontrols, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, servercontrols, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() #define arginfo_ldap_mod_add arginfo_ldap_add @@ -183,15 +183,15 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_compare, 0, 4, MAY_BE_BOOL| ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, attribute, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, servercontrols, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, servercontrols, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() #if defined(LDAP_CONTROL_PAGEDRESULTS) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_control_paged_result, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(0, link) ZEND_ARG_TYPE_INFO(0, pagesize, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, iscritical, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, cookie, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, iscritical, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cookie, IS_STRING, 0, "\'\'") ZEND_END_ARG_INFO() #endif @@ -199,8 +199,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_control_paged_result_response, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(0, link) ZEND_ARG_INFO(0, result) - ZEND_ARG_INFO(1, cookie) - ZEND_ARG_INFO(1, estimated) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, cookie, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, estimated, "null") ZEND_END_ARG_INFO() #endif @@ -211,7 +211,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_rename, 0, 5, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, newrdn, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, newparent, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, deleteoldrdn, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, servercontrols, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, servercontrols, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() #endif @@ -222,7 +222,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_rename_ext, 0, 0, 5) ZEND_ARG_TYPE_INFO(0, newrdn, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, newparent, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, deleteoldrdn, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, servercontrols, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, servercontrols, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() #endif @@ -230,7 +230,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_get_option, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(0, link_identifier) ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0) - ZEND_ARG_INFO(1, retval) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, retval, "null") ZEND_END_ARG_INFO() #endif @@ -269,10 +269,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_parse_result, 0, 3, _IS_BOO ZEND_ARG_INFO(0, link) ZEND_ARG_INFO(0, result) ZEND_ARG_INFO(1, errcode) - ZEND_ARG_INFO(1, matcheddn) - ZEND_ARG_INFO(1, errmsg) - ZEND_ARG_INFO(1, referrals) - ZEND_ARG_INFO(1, serverctrls) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, matcheddn, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, errmsg, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, referrals, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, serverctrls, "null") ZEND_END_ARG_INFO() #endif @@ -291,8 +291,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_escape, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, ignore, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ignore, IS_STRING, 0, "\'\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #if defined(STR_TRANSLATION) @@ -309,20 +309,20 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_exop, 0, 0, 2) ZEND_ARG_INFO(0, link) ZEND_ARG_TYPE_INFO(0, reqoid, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, reqdata, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, servercontrols, IS_ARRAY, 1) - ZEND_ARG_INFO(1, retdata) - ZEND_ARG_INFO(1, retoid) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, reqdata, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, servercontrols, IS_ARRAY, 1, "[]") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, retdata, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, retoid, "null") ZEND_END_ARG_INFO() #endif #if defined(HAVE_LDAP_PASSWD) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_exop_passwd, 0, 1, MAY_BE_STRING|MAY_BE_BOOL) ZEND_ARG_INFO(0, link) - ZEND_ARG_TYPE_INFO(0, user, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, oldpw, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, newpw, IS_STRING, 0) - ZEND_ARG_INFO(1, serverctrls) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, user, IS_STRING, 0, "\'\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, oldpw, IS_STRING, 0, "\'\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, newpw, IS_STRING, 0, "\'\'") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, serverctrls, "null") ZEND_END_ARG_INFO() #endif @@ -344,8 +344,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_parse_exop, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(0, link) ZEND_ARG_INFO(0, result) - ZEND_ARG_INFO(1, retdata) - ZEND_ARG_INFO(1, retoid) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, retdata, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, retoid, "null") ZEND_END_ARG_INFO() #endif diff --git a/ext/libxml/libxml_arginfo.h b/ext/libxml/libxml_arginfo.h index 77c085e7767b1..3b11e1a554347 100644 --- a/ext/libxml/libxml_arginfo.h +++ b/ext/libxml/libxml_arginfo.h @@ -18,7 +18,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_libxml_clear_errors, 0, 0, IS_VO ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_libxml_disable_entity_loader, 0, 0, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, disable, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, disable, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_libxml_set_external_entity_loader, 0, 1, _IS_BOOL, 0) diff --git a/ext/mbstring/mbstring_arginfo.h b/ext/mbstring/mbstring_arginfo.h index 52b92617c2860..f7a12275f371a 100644 --- a/ext/mbstring/mbstring_arginfo.h +++ b/ext/mbstring/mbstring_arginfo.h @@ -15,7 +15,7 @@ ZEND_END_ARG_INFO() #define arginfo_mb_http_output arginfo_mb_internal_encoding ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_detect_order, 0, 0, MAY_BE_ARRAY|MAY_BE_BOOL) - ZEND_ARG_TYPE_MASK(0, encoding, MAY_BE_ARRAY|MAY_BE_STRING) + ZEND_ARG_TYPE_MASK(0, encoding, MAY_BE_ARRAY|MAY_BE_STRING, NULL) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_substitute_character, 0, 0, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_BOOL) @@ -38,7 +38,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_str_split, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, split_length, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, split_length, IS_LONG, 0, "1") ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -50,7 +50,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_strpos, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -63,7 +63,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_strstr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, part, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, part, _IS_BOOL, 0, "false") ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -82,7 +82,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_substr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null") ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -102,28 +102,28 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_strimwidth, 0, 3, MAY_BE_STRI ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_convert_encoding, 0, 2, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_MASK(0, str, MAY_BE_ARRAY|MAY_BE_STRING) + ZEND_ARG_TYPE_MASK(0, str, MAY_BE_ARRAY|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0) - ZEND_ARG_TYPE_MASK(0, from, MAY_BE_ARRAY|MAY_BE_STRING) + ZEND_ARG_TYPE_MASK(0, from, MAY_BE_ARRAY|MAY_BE_STRING, NULL) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_convert_case, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, source_string, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_strtoupper, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, source_string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #define arginfo_mb_strtolower arginfo_mb_strtoupper ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_detect_encoding, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_MASK(0, encoding_list, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_NULL) - ZEND_ARG_TYPE_INFO(0, strict, _IS_BOOL, 0) + ZEND_ARG_TYPE_MASK(0, encoding_list, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_NULL, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, strict, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_list_encodings, 0, 0, IS_ARRAY, 0) @@ -138,7 +138,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_encode_mimeheader, 0, 1, MAY_ ZEND_ARG_TYPE_INFO(0, charset, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, transfer, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, linefeed, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, indent, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, indent, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_decode_mimeheader, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) @@ -153,7 +153,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_convert_variables, 0, 3, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0) - ZEND_ARG_TYPE_MASK(0, from, MAY_BE_ARRAY|MAY_BE_STRING) + ZEND_ARG_TYPE_MASK(0, from, MAY_BE_ARRAY|MAY_BE_STRING, NULL) ZEND_ARG_INFO(1, var) ZEND_ARG_VARIADIC_INFO(1, vars) ZEND_END_ARG_INFO() @@ -162,7 +162,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_encode_numericentity, 0, 2, M ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, convmap, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, is_hex, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, is_hex, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_decode_numericentity, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) @@ -184,7 +184,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_get_info, 0, 0, MAY_BE_ARRAY| ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_check_encoding, 0, 0, _IS_BOOL, 0) - ZEND_ARG_TYPE_MASK(0, var, MAY_BE_ARRAY|MAY_BE_STRING) + ZEND_ARG_TYPE_MASK(0, var, MAY_BE_ARRAY|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -244,7 +244,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_split, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, limit, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, limit, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() #endif diff --git a/ext/mysqli/mysqli_arginfo.h b/ext/mysqli/mysqli_arginfo.h index 74c80bd13a56f..90ac950f016f4 100644 --- a/ext/mysqli/mysqli_arginfo.h +++ b/ext/mysqli/mysqli_arginfo.h @@ -11,7 +11,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_begin_transaction, 0, 1, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, mysql_link, mysqli, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "-1") ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -33,12 +33,12 @@ ZEND_END_ARG_INFO() #define arginfo_mysqli_commit arginfo_mysqli_begin_transaction ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_mysqli_connect, 0, 0, mysqli, MAY_BE_NULL|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, user, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, database, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, port, IS_LONG, 1) - ZEND_ARG_TYPE_INFO(0, socket, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, host, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, user, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, database, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, socket, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_connect_errno, 0, 0, IS_LONG, 0) @@ -93,12 +93,12 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_fetch_all, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_OBJ_INFO(0, mysql_result, mysqli_result, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "MYSQLI_NUM") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_fetch_array, 0, 1, MAY_BE_ARRAY|MAY_BE_NULL|MAY_BE_FALSE) ZEND_ARG_OBJ_INFO(0, mysql_result, mysqli_result, 0) - ZEND_ARG_TYPE_INFO(0, fetchtype, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, fetchtype, IS_LONG, 0, "MYSQLI_BOTH") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_fetch_assoc, 0, 1, IS_ARRAY, 1) @@ -107,8 +107,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_fetch_object, 0, 1, IS_OBJECT, 1) ZEND_ARG_OBJ_INFO(0, mysqli_result, mysqli_result, 0) - ZEND_ARG_TYPE_INFO(0, class_name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, params, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class_name, IS_STRING, 0, "\'stdClass\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_fetch_row, 0, 1, IS_ARRAY, 1) @@ -144,7 +144,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_get_charset, 0, 1, IS_OBJ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_get_client_info, 0, 0, IS_STRING, 1) - ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 1) + ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, mysqli_link, mysqli, 1, "null") ZEND_END_ARG_INFO() #define arginfo_mysqli_get_client_version arginfo_mysqli_connect_errno @@ -213,7 +213,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_poll, 0, 4, MAY_BE_LONG|M ZEND_ARG_TYPE_INFO(1, write, IS_ARRAY, 1) ZEND_ARG_TYPE_INFO(1, error, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, sec, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, usec, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, usec, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_mysqli_prepare, 0, 2, mysqli_stmt, MAY_BE_FALSE) @@ -228,17 +228,17 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_mysqli_query, 0, 2, mysqli_result, MAY_BE_BOOL) ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, resultmode, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, resultmode, IS_LONG, 0, "MYSQLI_STORE_RESULT") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_real_connect, 0, 1, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) - ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, user, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, database, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, port, IS_LONG, 1) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, host, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, user, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, database, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_real_escape_string, 0, 2, IS_STRING, 0) @@ -259,8 +259,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_rollback, 0, 1, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 0, "\'\'") ZEND_END_ARG_INFO() #define arginfo_mysqli_savepoint arginfo_mysqli_release_savepoint @@ -388,7 +388,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_mysqli_store_result, 0, 1, mysqli_result, MAY_BE_FALSE) ZEND_ARG_OBJ_INFO(0, mysql_link, mysqli, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #define arginfo_mysqli_thread_id arginfo_mysqli_errno @@ -412,12 +412,12 @@ ZEND_END_ARG_INFO() #define arginfo_mysqli_set_opt arginfo_mysqli_options ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli___construct, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, user, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, database, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, port, IS_LONG, 1) - ZEND_ARG_TYPE_INFO(0, socket, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, host, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, user, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, database, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, socket, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_autocommit, 0, 0, 1) @@ -425,7 +425,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_autocommit, 0, 0, 1) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_begin_transaction, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "-1") ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -481,24 +481,24 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_poll, 0, 0, 4) ZEND_ARG_TYPE_INFO(1, write, IS_ARRAY, 1) ZEND_ARG_TYPE_INFO(1, error, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, sec, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, usec, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, usec, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #define arginfo_class_mysqli_prepare arginfo_class_mysqli_multi_query ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_query, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, resultmode, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, resultmode, IS_LONG, 0, "MYSQLI_STORE_RESULT") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_real_connect, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, user, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, database, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, port, IS_LONG, 1) - ZEND_ARG_TYPE_INFO(0, socket, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, host, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, user, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, database, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, socket, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_real_escape_string, 0, 0, 1) @@ -515,7 +515,10 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_release_savepoint, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_END_ARG_INFO() -#define arginfo_class_mysqli_rollback arginfo_class_mysqli_begin_transaction +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_rollback, 0, 0, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 0, "\'\'") +ZEND_END_ARG_INFO() #define arginfo_class_mysqli_savepoint arginfo_class_mysqli_release_savepoint @@ -547,7 +550,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_mysqli_stmt_init arginfo_class_mysqli_character_set_name ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_store_result, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #define arginfo_class_mysqli_thread_safe arginfo_class_mysqli_character_set_name @@ -560,7 +563,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, mysqli_link, IS_OBJECT, 0) - ZEND_ARG_TYPE_INFO(0, resmode, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, resmode, IS_LONG, 0, "MYSQLI_STORE_RESULT") ZEND_END_ARG_INFO() #define arginfo_class_mysqli_result_close arginfo_class_mysqli_character_set_name @@ -580,16 +583,18 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result_fetch_field_direct, 0, 0, 1) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result_fetch_all, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, result_type, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, result_type, IS_LONG, 0, "MYSQLI_NUM") ZEND_END_ARG_INFO() -#define arginfo_class_mysqli_result_fetch_array arginfo_class_mysqli_result_fetch_all +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result_fetch_array, 0, 0, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, result_type, IS_LONG, 0, "MYSQLI_BOTH") +ZEND_END_ARG_INFO() #define arginfo_class_mysqli_result_fetch_assoc arginfo_class_mysqli_character_set_name ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result_fetch_object, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, class_name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, params, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class_name, IS_STRING, 0, "\'stdClass\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() #define arginfo_class_mysqli_result_fetch_row arginfo_class_mysqli_character_set_name diff --git a/ext/odbc/odbc_arginfo.h b/ext/odbc/odbc_arginfo.h index 9f1d9a62778af..9e41b0433ab23 100644 --- a/ext/odbc/odbc_arginfo.h +++ b/ext/odbc/odbc_arginfo.h @@ -45,21 +45,21 @@ ZEND_END_ARG_INFO() #if defined(PHP_ODBC_HAVE_FETCH_HASH) ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_odbc_fetch_object, 0, 1, stdClass, MAY_BE_FALSE) ZEND_ARG_INFO(0, result) - ZEND_ARG_TYPE_INFO(0, rownumber, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, rownumber, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() #endif #if defined(PHP_ODBC_HAVE_FETCH_HASH) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_fetch_array, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_INFO(0, result) - ZEND_ARG_TYPE_INFO(0, rownumber, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, rownumber, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_fetch_into, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_INFO(0, result_id) ZEND_ARG_INFO(1, result_array) - ZEND_ARG_TYPE_INFO(0, rownumber, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, rownumber, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_fetch_row, 0, 1, _IS_BOOL, 0) @@ -74,7 +74,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_result_all, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_INFO(0, result_id) - ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, format, IS_STRING, 0, "\'\'") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_free_result, 0, 1, _IS_BOOL, 0) @@ -85,7 +85,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_connect, 0, 0, 3) ZEND_ARG_TYPE_INFO(0, dsn, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, user, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, cursor_option, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cursor_option, IS_LONG, 0, "SQL_CUR_USE_DRIVER") ZEND_END_ARG_INFO() #define arginfo_odbc_pconnect arginfo_odbc_connect @@ -129,7 +129,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_autocommit, 0, 1, MAY_BE_LONG|MAY_BE_BOOL) ZEND_ARG_INFO(0, connection_id) - ZEND_ARG_TYPE_INFO(0, onoff, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, onoff, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_commit, 0, 1, _IS_BOOL, 0) @@ -153,7 +153,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_tables, 0, 0, 1) ZEND_ARG_INFO(0, connection_id) - ZEND_ARG_TYPE_INFO(0, qualfier, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, qualfier, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO(0, owner, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, table_types, IS_STRING, 0) @@ -161,7 +161,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_columns, 0, 0, 1) ZEND_ARG_INFO(0, connection_id) - ZEND_ARG_TYPE_INFO(0, qualifier, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, qualifier, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO(0, owner, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, table_name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, column_name, IS_STRING, 0) @@ -169,7 +169,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_gettypeinfo, 0, 0, 1) ZEND_ARG_INFO(0, connection_id) - ZEND_ARG_TYPE_INFO(0, data_type, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, data_type, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_primarykeys, 0, 0, 4) @@ -182,7 +182,7 @@ ZEND_END_ARG_INFO() #if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35) ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_procedurecolumns, 0, 0, 1) ZEND_ARG_INFO(0, connection_id) - ZEND_ARG_TYPE_INFO(0, qualifier, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, qualifier, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO(0, owner, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, proc, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, column, IS_STRING, 0) @@ -192,7 +192,7 @@ ZEND_END_ARG_INFO() #if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35) ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_procedures, 0, 0, 1) ZEND_ARG_INFO(0, connection_id) - ZEND_ARG_TYPE_INFO(0, qualifier, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, qualifier, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO(0, owner, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_END_ARG_INFO() diff --git a/ext/opcache/opcache_arginfo.h b/ext/opcache/opcache_arginfo.h index 763b5007cfdb6..f3013efa96625 100644 --- a/ext/opcache/opcache_arginfo.h +++ b/ext/opcache/opcache_arginfo.h @@ -4,7 +4,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_opcache_reset, 0, 0, _IS_BOOL, 0 ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_opcache_get_status, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, fetch_scripts, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, fetch_scripts, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_opcache_compile_file, 0, 1, _IS_BOOL, 0) @@ -13,7 +13,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_opcache_invalidate, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, script, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, force, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, force, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_opcache_get_configuration, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE) diff --git a/ext/openssl/openssl_arginfo.h b/ext/openssl/openssl_arginfo.h index 41a9eb90493d9..47bd49eef1005 100644 --- a/ext/openssl/openssl_arginfo.h +++ b/ext/openssl/openssl_arginfo.h @@ -3,19 +3,19 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_x509_export_to_file, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(0, x509) ZEND_ARG_TYPE_INFO(0, outfilename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, notext, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, notext, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_x509_export, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(0, x509) ZEND_ARG_INFO(1, out) - ZEND_ARG_TYPE_INFO(0, notext, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, notext, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_x509_fingerprint, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, x509) - ZEND_ARG_TYPE_INFO(0, method, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, raw_output, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, method, IS_STRING, 0, "\'sha1\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, raw_output, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_x509_check_private_key, 0, 2, _IS_BOOL, 0) @@ -30,13 +30,13 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_x509_parse, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_INFO(0, x509) - ZEND_ARG_TYPE_INFO(0, shortname, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, shortname, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_x509_checkpurpose, 0, 2, MAY_BE_BOOL|MAY_BE_LONG) ZEND_ARG_INFO(0, x509cert) ZEND_ARG_TYPE_INFO(0, purpose, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, cainfo, IS_ARRAY, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cainfo, IS_ARRAY, 1, "[]") ZEND_ARG_TYPE_INFO(0, untrustedfile, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -73,57 +73,57 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_csr_export_to_file, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(0, csr) ZEND_ARG_TYPE_INFO(0, outfilename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, notext, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, notext, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_csr_export, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(0, csr) ZEND_ARG_INFO(1, out) - ZEND_ARG_TYPE_INFO(0, notext, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, notext, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_csr_sign, 0, 0, 4) ZEND_ARG_INFO(0, csr) - ZEND_ARG_INFO(0, cacert) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, cacert, "null") ZEND_ARG_INFO(0, priv_key) ZEND_ARG_TYPE_INFO(0, days, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, config_args, IS_ARRAY, 1) - ZEND_ARG_TYPE_INFO(0, serial, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, config_args, IS_ARRAY, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, serial, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_csr_new, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, dn, IS_ARRAY, 0) ZEND_ARG_INFO(1, privkey) - ZEND_ARG_TYPE_INFO(0, configargs, IS_ARRAY, 1) - ZEND_ARG_TYPE_INFO(0, extraattribs, IS_ARRAY, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, configargs, IS_ARRAY, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, extraattribs, IS_ARRAY, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_csr_get_subject, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_INFO(0, csr) - ZEND_ARG_TYPE_INFO(0, use_shortnames, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_shortnames, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_csr_get_public_key, 0, 0, 1) ZEND_ARG_INFO(0, csr) - ZEND_ARG_TYPE_INFO(0, use_shortnames, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_shortnames, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkey_new, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, configargs, IS_ARRAY, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, configargs, IS_ARRAY, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_pkey_export_to_file, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(0, key) ZEND_ARG_TYPE_INFO(0, outfilename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, passphrase, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, configargs, IS_ARRAY, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, passphrase, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, configargs, IS_ARRAY, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_pkey_export, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(0, key) ZEND_ARG_INFO(1, out) - ZEND_ARG_TYPE_INFO(0, passphrase, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, configargs, IS_ARRAY, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, passphrase, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, configargs, IS_ARRAY, 1, "null") ZEND_END_ARG_INFO() #define arginfo_openssl_pkey_get_public arginfo_openssl_x509_read @@ -152,7 +152,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_pbkdf2, 0, 4, MAY_BE_STR ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, key_length, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, iterations, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, digest_algorithm, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, digest_algorithm, IS_STRING, 0, "\'sha1\'") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_pkcs7_verify, 0, 2, MAY_BE_BOOL|MAY_BE_LONG) @@ -170,8 +170,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_pkcs7_encrypt, 0, 4, _IS ZEND_ARG_TYPE_INFO(0, outfile, IS_STRING, 0) ZEND_ARG_INFO(0, recipcerts) ZEND_ARG_TYPE_INFO(0, headers, IS_ARRAY, 1) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, cipher, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cipher, IS_LONG, 0, "OPENSSL_CIPHER_RC2_40") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_pkcs7_sign, 0, 5, _IS_BOOL, 0) @@ -180,8 +180,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_pkcs7_sign, 0, 5, _IS_BO ZEND_ARG_INFO(0, signcert) ZEND_ARG_INFO(0, signkey) ZEND_ARG_TYPE_INFO(0, headers, IS_ARRAY, 1) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, extracertsfilename, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "PKCS7_DETACHED") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, extracertsfilename, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_pkcs7_decrypt, 0, 3, _IS_BOOL, 0) @@ -200,7 +200,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_private_encrypt, 0, 3, _ ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) ZEND_ARG_INFO(1, crypted) ZEND_ARG_INFO(0, key) - ZEND_ARG_TYPE_INFO(0, padding, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, padding, IS_LONG, 0, "OPENSSL_PKCS1_PADDING") ZEND_END_ARG_INFO() #define arginfo_openssl_private_decrypt arginfo_openssl_private_encrypt @@ -216,14 +216,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_sign, 0, 3, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) ZEND_ARG_INFO(1, signature) ZEND_ARG_INFO(0, key) - ZEND_ARG_INFO(0, method) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, method, "OPENSSL_ALGO_SHA1") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_verify, 0, 3, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, signature, IS_STRING, 0) ZEND_ARG_INFO(0, key) - ZEND_ARG_INFO(0, method) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, method, "OPENSSL_ALGO_SHA1") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_seal, 0, 4, MAY_BE_LONG|MAY_BE_FALSE) @@ -245,7 +245,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_open, 0, 4, _IS_BOOL, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_get_md_methods, 0, 0, IS_ARRAY, 0) - ZEND_ARG_INFO(0, aliases) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, aliases, "false") ZEND_END_ARG_INFO() #define arginfo_openssl_get_cipher_methods arginfo_openssl_get_md_methods @@ -258,28 +258,28 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_digest, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, method, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, raw_output, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, raw_output, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_encrypt, 0, 3, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, method, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, iv, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, iv, IS_STRING, 0, "\'\'") ZEND_ARG_INFO(1, tag) - ZEND_ARG_TYPE_INFO(0, aad, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, tag_length, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, aad, IS_STRING, 0, "\'\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, tag_length, IS_LONG, 0, "16") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_decrypt, 0, 3, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, method, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, iv, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, iv, IS_STRING, 0, "\'\'") ZEND_ARG_TYPE_INFO(0, tag, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, aad, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, aad, IS_STRING, 0, "\'\'") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_cipher_iv_length, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) @@ -294,7 +294,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_pkey_derive, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, peer_pub_key) ZEND_ARG_INFO(0, priv_key) - ZEND_ARG_TYPE_INFO(0, keylen, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, keylen, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_random_pseudo_bytes, 0, 1, IS_STRING, 0) @@ -305,7 +305,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_spki_new, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, privkey) ZEND_ARG_TYPE_INFO(0, challenge, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, algo, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, algo, IS_LONG, 0, "OPENSSL_ALGO_MD5") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_spki_verify, 0, 1, _IS_BOOL, 0) diff --git a/ext/pcntl/pcntl_arginfo.h b/ext/pcntl/pcntl_arginfo.h index 2b73bac3ebae6..19c46e47255ff 100644 --- a/ext/pcntl/pcntl_arginfo.h +++ b/ext/pcntl/pcntl_arginfo.h @@ -6,20 +6,20 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_waitpid, 0, 2, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, pid, IS_LONG, 0) ZEND_ARG_INFO(1, status) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) - ZEND_ARG_INFO(1, rusage) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, rusage, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_wait, 0, 1, IS_LONG, 0) ZEND_ARG_INFO(1, status) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) - ZEND_ARG_INFO(1, rusage) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, rusage, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_signal, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, signo, IS_LONG, 0) ZEND_ARG_INFO(0, handler) - ZEND_ARG_TYPE_INFO(0, restart_syscalls, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, restart_syscalls, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_pcntl_signal_get_handler, 0, 0, 1) @@ -33,23 +33,23 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_sigprocmask, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, how, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, set, IS_ARRAY, 0) - ZEND_ARG_INFO(1, oldset) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, oldset, "null") ZEND_END_ARG_INFO() #endif #if defined(HAVE_STRUCT_SIGINFO_T) && HAVE_SIGWAITINFO && HAVE_SIGTIMEDWAIT ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pcntl_sigwaitinfo, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, set, IS_ARRAY, 0) - ZEND_ARG_INFO(1, info) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, info, "[]") ZEND_END_ARG_INFO() #endif #if defined(HAVE_STRUCT_SIGINFO_T) && HAVE_SIGWAITINFO && HAVE_SIGTIMEDWAIT ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pcntl_sigtimedwait, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, set, IS_ARRAY, 0) - ZEND_ARG_INFO(1, info) - ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, nanoseconds, IS_LONG, 0) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, info, "[]") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, seconds, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, nanoseconds, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #endif @@ -77,8 +77,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_exec, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, args, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, envs, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, args, IS_ARRAY, 0, "[]") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, envs, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_alarm, 0, 1, IS_LONG, 0) @@ -92,7 +92,7 @@ ZEND_END_ARG_INFO() #if defined(HAVE_GETPRIORITY) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pcntl_getpriority, 0, 0, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, pid, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, process_identifier, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, process_identifier, IS_LONG, 0, "PRIO_PROCESS") ZEND_END_ARG_INFO() #endif @@ -100,7 +100,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_setpriority, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, priority, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, pid, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, process_identifier, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, process_identifier, IS_LONG, 0, "PRIO_PROCESS") ZEND_END_ARG_INFO() #endif diff --git a/ext/pcre/php_pcre_arginfo.h b/ext/pcre/php_pcre_arginfo.h index 5b55e5229a7ab..31fb0d9df7c5f 100644 --- a/ext/pcre/php_pcre_arginfo.h +++ b/ext/pcre/php_pcre_arginfo.h @@ -3,25 +3,25 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_preg_match, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, subject, IS_STRING, 0) - ZEND_ARG_INFO(1, subpatterns) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, subpatterns, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_preg_match_all, 0, 2, MAY_BE_LONG|MAY_BE_FALSE|MAY_BE_NULL) ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, subject, IS_STRING, 0) - ZEND_ARG_INFO(1, subpatterns) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, subpatterns, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_preg_replace, 0, 3, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_NULL) ZEND_ARG_INFO(0, regex) ZEND_ARG_INFO(0, replace) ZEND_ARG_INFO(0, subject) - ZEND_ARG_TYPE_INFO(0, limit, IS_LONG, 0) - ZEND_ARG_INFO(1, count) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, limit, IS_LONG, 0, "-1") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, count, "null") ZEND_END_ARG_INFO() #define arginfo_preg_filter arginfo_preg_replace @@ -30,35 +30,35 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_preg_replace_callback, 0, 3, MAY ZEND_ARG_INFO(0, regex) ZEND_ARG_INFO(0, callback) ZEND_ARG_INFO(0, subject) - ZEND_ARG_TYPE_INFO(0, limit, IS_LONG, 0) - ZEND_ARG_INFO(1, count) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, limit, IS_LONG, 0, "-1") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, count, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_preg_replace_callback_array, 0, 2, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_NULL) ZEND_ARG_TYPE_INFO(0, pattern, IS_ARRAY, 0) ZEND_ARG_INFO(0, subject) - ZEND_ARG_TYPE_INFO(0, limit, IS_LONG, 0) - ZEND_ARG_INFO(1, count) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, limit, IS_LONG, 0, "-1") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, count, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_preg_split, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, subject, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, limit, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, limit, IS_LONG, 0, "-1") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_preg_quote, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, delim_char, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, delim_char, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_preg_grep, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, regex, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, input, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_preg_last_error, 0, 0, IS_LONG, 0) diff --git a/ext/pdo/pdo_dbh_arginfo.h b/ext/pdo/pdo_dbh_arginfo.h index 65edc7710ecd8..833d60099a729 100644 --- a/ext/pdo/pdo_dbh_arginfo.h +++ b/ext/pdo/pdo_dbh_arginfo.h @@ -2,9 +2,9 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDO___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, dsn, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, username, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, passwd, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, options, IS_ARRAY, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, username, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, passwd, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDO_beginTransaction, 0, 0, 0) @@ -29,19 +29,19 @@ ZEND_END_ARG_INFO() #define arginfo_class_PDO_inTransaction arginfo_class_PDO_beginTransaction ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDO_lastInsertId, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDO_prepare, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, driver_options, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, driver_options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() #define arginfo_class_PDO_query arginfo_class_PDO_exec ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDO_quote, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, parameter_type, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, parameter_type, IS_LONG, 0, "PDO::PARAM_STR") ZEND_END_ARG_INFO() #define arginfo_class_PDO_rollBack arginfo_class_PDO_beginTransaction diff --git a/ext/pdo/pdo_stmt_arginfo.h b/ext/pdo/pdo_stmt_arginfo.h index 7e00f79197238..604b95a9ea716 100644 --- a/ext/pdo/pdo_stmt_arginfo.h +++ b/ext/pdo/pdo_stmt_arginfo.h @@ -1,25 +1,25 @@ /* This is a generated file, edit the .stub.php file instead. */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_bindColumn, 0, 0, 2) - ZEND_ARG_TYPE_MASK(0, column, MAY_BE_LONG|MAY_BE_STRING) + ZEND_ARG_TYPE_MASK(0, column, MAY_BE_LONG|MAY_BE_STRING, NULL) ZEND_ARG_INFO(1, param) - ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, maxlen, IS_LONG, 0) - ZEND_ARG_INFO(0, driverdata) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, maxlen, IS_LONG, 0, "0") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, driverdata, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_bindParam, 0, 0, 2) - ZEND_ARG_TYPE_MASK(0, parameter, MAY_BE_LONG|MAY_BE_STRING) + ZEND_ARG_TYPE_MASK(0, parameter, MAY_BE_LONG|MAY_BE_STRING, NULL) ZEND_ARG_INFO(1, param) - ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, maxlen, IS_LONG, 0) - ZEND_ARG_INFO(0, driverdata) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_LONG, 0, "PDO::PARAM_STR") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, maxlen, IS_LONG, 0, "0") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, driverdata, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_bindValue, 0, 0, 2) ZEND_ARG_INFO(0, parameter) ZEND_ARG_INFO(0, value) - ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_LONG, 0, "PDO::PARAM_STR") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_closeCursor, 0, 0, 0) @@ -34,28 +34,28 @@ ZEND_END_ARG_INFO() #define arginfo_class_PDOStatement_errorInfo arginfo_class_PDOStatement_closeCursor ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_execute, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, input_parameters, IS_ARRAY, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, input_parameters, IS_ARRAY, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_fetch, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, fetch_style, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, cursor_orientation, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, cursor_offset, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, fetch_style, IS_LONG, 0, "PDO::FETCH_BOTH") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cursor_orientation, IS_LONG, 0, "PDO::FETCH_ORI_NEXT") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cursor_offset, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_fetchAll, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, fetch_style, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, fetch_style, IS_LONG, 0, "PDO::FETCH_BOTH") ZEND_ARG_INFO(0, fetch_argument) - ZEND_ARG_TYPE_INFO(0, ctor_args, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ctor_args, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_fetchColumn, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, column_number, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, column_number, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_fetchObject, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, class_name, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, ctor_args, IS_ARRAY, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class_name, IS_STRING, 1, "\"stdClass\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ctor_args, IS_ARRAY, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_getAttribute, 0, 0, 1) diff --git a/ext/phar/phar_object_arginfo.h b/ext/phar/phar_object_arginfo.h index 8cae13ebe8cc3..5f096eb0aceef 100644 --- a/ext/phar/phar_object_arginfo.h +++ b/ext/phar/phar_object_arginfo.h @@ -2,8 +2,8 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, alias, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FilesystemIterator::SKIP_DOTS | FilesystemIterator::UNIX_PATHS") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, alias, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar___destruct, 0, 0, 0) @@ -49,8 +49,8 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_decompress, 0, 0, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_convertToExecutable, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, format, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, compression_type, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, format, IS_LONG, 0, "9021976") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, compression_type, IS_LONG, 0, "9021976") ZEND_ARG_TYPE_INFO(0, file_ext, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -73,8 +73,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_extractTo, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, pathto, IS_STRING, 0) - ZEND_ARG_INFO(0, files) - ZEND_ARG_TYPE_INFO(0, overwrite, _IS_BOOL, 0) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, files, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, overwrite, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #define arginfo_class_Phar_getAlias arginfo_class_Phar___destruct @@ -121,7 +121,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_setAlias, 0, 0, 1) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_setDefaultStub, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, index, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, index, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO(0, webindex, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -136,7 +136,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar_setStub, 0, 0, 1) ZEND_ARG_INFO(0, newstub) - ZEND_ARG_INFO(0, maxlen) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, maxlen, "-1") ZEND_END_ARG_INFO() #define arginfo_class_Phar_startBuffering arginfo_class_Phar___destruct @@ -147,7 +147,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_apiVersion, 0, 0, IS_ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_canCompress, 0, 0, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, method, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, method, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_canWrite, 0, 0, _IS_BOOL, 0) @@ -168,21 +168,21 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_isValidPharFilename, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, executable, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, executable, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_loadPhar, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, alias, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, alias, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_mapPhar, 0, 0, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, alias, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, alias, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_running, 0, 0, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, retphar, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, retphar, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_mount, 0, 2, IS_VOID, 0) @@ -199,18 +199,18 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_unlinkArchive, 0, 1, ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_webPhar, 0, 0, IS_VOID, 0) - ZEND_ARG_TYPE_INFO(0, alias, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, index, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, alias, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, index, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO(0, f404, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, mimetypes, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mimetypes, IS_ARRAY, 0, "[]") ZEND_ARG_INFO(0, rewrites) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PharData___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, alias, IS_STRING, 1) - ZEND_ARG_INFO(0, fileformat) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FilesystemIterator::SKIP_DOTS | FilesystemIterator::UNIX_PATHS") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, alias, IS_STRING, 1, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, fileformat, "0") ZEND_END_ARG_INFO() #define arginfo_class_PharData___destruct arginfo_class_Phar___destruct @@ -352,7 +352,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_PharFileInfo_hasMetadata arginfo_class_Phar___destruct ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PharFileInfo_isCompressed, 0, 0, 0) - ZEND_ARG_INFO(0, compression_type) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, compression_type, "9021976") ZEND_END_ARG_INFO() #define arginfo_class_PharFileInfo_isCRCChecked arginfo_class_Phar___destruct diff --git a/ext/posix/posix_arginfo.h b/ext/posix/posix_arginfo.h index f2eb6be2b85ae..06dad22c62dc6 100644 --- a/ext/posix/posix_arginfo.h +++ b/ext/posix/posix_arginfo.h @@ -104,14 +104,14 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_mknod, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, pathname, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, major, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, minor, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, major, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, minor, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_access, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, file, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_getgrnam, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) diff --git a/ext/pspell/pspell_arginfo.h b/ext/pspell/pspell_arginfo.h index 68242d767cc9b..f09b2db79f2b7 100644 --- a/ext/pspell/pspell_arginfo.h +++ b/ext/pspell/pspell_arginfo.h @@ -5,7 +5,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pspell_new, 0, 1, MAY_BE_LONG|MA ZEND_ARG_TYPE_INFO(0, spelling, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, jargon, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pspell_new_personal, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) @@ -14,7 +14,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pspell_new_personal, 0, 2, MAY_B ZEND_ARG_TYPE_INFO(0, spelling, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, jargon, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) - ZEND_ARG_INFO(0, mode) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, mode, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pspell_new_config, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) diff --git a/ext/readline/readline_arginfo.h b/ext/readline/readline_arginfo.h index 21378a3edb754..88b286bc377b0 100644 --- a/ext/readline/readline_arginfo.h +++ b/ext/readline/readline_arginfo.h @@ -1,7 +1,7 @@ /* This is a generated file, edit the .stub.php file instead. */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_readline, 0, 0, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, prompt, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, prompt, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_readline_info, 0, 0, 0) diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 6b9ca5b595195..5f7f5270a1c9d 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -558,8 +558,7 @@ static void _class_const_string(smart_str *str, char *name, zend_class_constant } /* }}} */ -/* {{{ _get_recv_opcode */ -static zend_op* _get_recv_op(zend_op_array *op_array, uint32_t offset) +static zend_op *get_recv_op(zend_op_array *op_array, uint32_t offset) { zend_op *op = op_array->opcodes; zend_op *end = op + op_array->last; @@ -573,9 +572,18 @@ static zend_op* _get_recv_op(zend_op_array *op_array, uint32_t offset) } ++op; } + ZEND_ASSERT(0 && "Failed to find op"); return NULL; } -/* }}} */ + +static zval *get_default_from_recv(zend_op_array *op_array, uint32_t offset) { + zend_op *recv = get_recv_op(op_array, offset); + if (!recv || recv->opcode != ZEND_RECV_INIT) { + return NULL; + } + + return RT_CONSTANT(recv, recv->op2); +} static int format_default_value(smart_str *str, zval *value, zend_class_entry *scope) { zval zv; @@ -639,12 +647,21 @@ static void _parameter_string(smart_str *str, zend_function *fptr, struct _zend_ smart_str_append_printf(str, "$%s", has_internal_arg_info(fptr) ? ((zend_internal_arg_info*)arg_info)->name : ZSTR_VAL(arg_info->name)); - if (fptr->type == ZEND_USER_FUNCTION && !required) { - zend_op *precv = _get_recv_op((zend_op_array*)fptr, offset); - if (precv && precv->opcode == ZEND_RECV_INIT && precv->op2_type != IS_UNUSED) { + if (!required) { + if (fptr->type == ZEND_INTERNAL_FUNCTION) { smart_str_appends(str, " = "); - if (format_default_value(str, RT_CONSTANT(precv, precv->op2), fptr->common.scope) == FAILURE) { - return; + if (((zend_internal_arg_info*)arg_info)->default_value) { + smart_str_appends(str, ((zend_internal_arg_info*)arg_info)->default_value); + } else { + smart_str_appends(str, ""); + } + } else { + zval *default_value = get_default_from_recv((zend_op_array*)fptr, offset); + if (default_value) { + smart_str_appends(str, " = "); + if (format_default_value(str, default_value, fptr->common.scope) == FAILURE) { + return; + } } } } @@ -1275,49 +1292,116 @@ static void reflection_class_constant_factory(zend_string *name_str, zend_class_ } /* }}} */ -/* {{{ _reflection_param_get_default_param */ -static parameter_reference *_reflection_param_get_default_param(INTERNAL_FUNCTION_PARAMETERS) -{ - reflection_object *intern; - parameter_reference *param; +static int get_default_via_ast(zval *default_value_zval, const char *default_value) { + zend_ast *ast; + zend_arena *ast_arena; - intern = Z_REFLECTION_P(ZEND_THIS); - if (intern->ptr == NULL) { - if (EG(exception) && EG(exception)->ce == reflection_exception_ptr) { - return NULL; - } - zend_throw_error(NULL, "Internal error: Failed to retrieve the reflection object"); - return NULL; + smart_str code = {0}; + smart_str_appends(&code, "ptr; - if (param->fptr->type != ZEND_USER_FUNCTION) { - zend_throw_exception_ex(reflection_exception_ptr, 0, "Cannot determine default value for internal functions"); - return NULL; + zend_ast_list *statement_list = zend_ast_get_list(ast); + zend_ast *const_expression_ast = statement_list->child[0]; + + zend_arena *original_ast_arena = CG(ast_arena); + uint32_t original_compiler_options = CG(compiler_options); + zend_file_context original_file_context; + CG(ast_arena) = ast_arena; + /* Disable constant substitution, to make getDefaultValueConstant() work. */ + CG(compiler_options) |= ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION | ZEND_COMPILE_NO_PERSISTENT_CONSTANT_SUBSTITUTION; + zend_file_context_begin(&original_file_context); + zend_const_expr_to_zval(default_value_zval, const_expression_ast); + CG(ast_arena) = original_ast_arena; + CG(compiler_options) = original_compiler_options; + zend_file_context_end(&original_file_context); + + zend_ast_destroy(ast); + zend_arena_destroy(ast_arena); + + return SUCCESS; +} + +static zend_string *try_parse_string(const char *str, size_t len, char quote) { + if (len == 0) { + return ZSTR_EMPTY_ALLOC(); } - return param; + for (size_t i = 0; i < len; i++) { + if (str[i] == '\\' || str[i] == quote) { + return NULL; + } + } + return zend_string_init(str, len, 0); } -/* }}} */ -/* {{{ _reflection_param_get_default_precv */ -static zend_op *_reflection_param_get_default_precv(INTERNAL_FUNCTION_PARAMETERS, parameter_reference *param) +static int get_default_from_arg_info(zval *default_value_zval, zend_internal_arg_info *arg_info) { - zend_op *precv; - - if (param == NULL) { - return NULL; + const char *default_value = arg_info->default_value; + if (!default_value) { + return FAILURE; } - precv = _get_recv_op((zend_op_array*)param->fptr, param->offset); - if (!precv || precv->opcode != ZEND_RECV_INIT || precv->op2_type == IS_UNUSED) { - zend_throw_exception_ex(reflection_exception_ptr, 0, "Internal error: Failed to retrieve the default value"); - return NULL; + /* Avoid going through the full AST machinery for some simple and common cases. */ + size_t default_value_len = strlen(default_value); + zend_ulong lval; + if (default_value_len == sizeof("null")-1 + && !memcmp(default_value, "null", sizeof("null")-1)) { + ZVAL_NULL(default_value_zval); + return SUCCESS; + } else if (default_value_len == sizeof("true")-1 + && !memcmp(default_value, "true", sizeof("true")-1)) { + ZVAL_TRUE(default_value_zval); + return SUCCESS; + } else if (default_value_len == sizeof("false")-1 + && !memcmp(default_value, "false", sizeof("false")-1)) { + ZVAL_FALSE(default_value_zval); + return SUCCESS; + } else if (default_value_len >= 2 + && (default_value[0] == '\'' || default_value[0] == '"') + && default_value[default_value_len - 1] == default_value[0]) { + zend_string *str = try_parse_string( + default_value + 1, default_value_len - 2, default_value[0]); + if (str) { + ZVAL_STR(default_value_zval, str); + return SUCCESS; + } + } else if (default_value_len == sizeof("[]")-1 + && !memcmp(default_value, "[]", sizeof("[]")-1)) { + ZVAL_EMPTY_ARRAY(default_value_zval); + return SUCCESS; + } else if (ZEND_HANDLE_NUMERIC_STR(default_value, default_value_len, lval)) { + ZVAL_LONG(default_value_zval, lval); + return SUCCESS; } - return precv; +#if 0 + fprintf(stderr, "Evaluating %s via AST\n", default_value); +#endif + return get_default_via_ast(default_value_zval, default_value); +} + +static int get_parameter_default(zval *result, parameter_reference *param) { + if (param->fptr->type == ZEND_INTERNAL_FUNCTION) { + return get_default_from_arg_info(result, (zend_internal_arg_info*) param->arg_info); + } else { + zval *default_value = get_default_from_recv((zend_op_array *) param->fptr, param->offset); + if (!default_value) { + return FAILURE; + } + + ZVAL_COPY(result, default_value); + return SUCCESS; + } } -/* }}} */ /* {{{ Preventing __clone from being called */ ZEND_METHOD(reflection, __clone) @@ -2612,23 +2696,19 @@ ZEND_METHOD(reflection_parameter, isDefaultValueAvailable) { reflection_object *intern; parameter_reference *param; - zend_op *precv; if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } - GET_REFLECTION_OBJECT_PTR(param); - if (param->fptr->type != ZEND_USER_FUNCTION) - { - RETURN_FALSE; - } + GET_REFLECTION_OBJECT_PTR(param); - precv = _get_recv_op((zend_op_array*)param->fptr, param->offset); - if (!precv || precv->opcode != ZEND_RECV_INIT || precv->op2_type == IS_UNUSED) { - RETURN_FALSE; + if (param->fptr->type == ZEND_INTERNAL_FUNCTION) { + RETURN_BOOL(((zend_internal_arg_info*) (param->arg_info))->default_value); + } else { + zval *default_value = get_default_from_recv((zend_op_array *)param->fptr, param->offset); + RETURN_BOOL(default_value != NULL); } - RETURN_TRUE; } /* }}} */ @@ -2636,24 +2716,21 @@ ZEND_METHOD(reflection_parameter, isDefaultValueAvailable) Returns the default value of this parameter or throws an exception */ ZEND_METHOD(reflection_parameter, getDefaultValue) { + reflection_object *intern; parameter_reference *param; - zend_op *precv; if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } - param = _reflection_param_get_default_param(INTERNAL_FUNCTION_PARAM_PASSTHRU); - if (!param) { - return; - } + GET_REFLECTION_OBJECT_PTR(param); - precv = _reflection_param_get_default_precv(INTERNAL_FUNCTION_PARAM_PASSTHRU, param); - if (!precv) { - return; + if (get_parameter_default(return_value, param) == FAILURE) { + zend_throw_exception_ex(reflection_exception_ptr, 0, + "Internal error: Failed to retrieve the default value"); + RETURN_THROWS(); } - ZVAL_COPY(return_value, RT_CONSTANT(precv, precv->op2)); if (Z_TYPE_P(return_value) == IS_CONSTANT_AST) { zval_update_constant_ex(return_value, param->fptr->common.scope); } @@ -2664,29 +2741,29 @@ ZEND_METHOD(reflection_parameter, getDefaultValue) Returns whether the default value of this parameter is constant */ ZEND_METHOD(reflection_parameter, isDefaultValueConstant) { - zend_op *precv; + reflection_object *intern; parameter_reference *param; if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } - param = _reflection_param_get_default_param(INTERNAL_FUNCTION_PARAM_PASSTHRU); - if (!param) { - RETURN_FALSE; - } - - precv = _reflection_param_get_default_precv(INTERNAL_FUNCTION_PARAM_PASSTHRU, param); - if (precv && Z_TYPE_P(RT_CONSTANT(precv, precv->op2)) == IS_CONSTANT_AST) { - zend_ast *ast = Z_ASTVAL_P(RT_CONSTANT(precv, precv->op2)); + GET_REFLECTION_OBJECT_PTR(param); - if (ast->kind == ZEND_AST_CONSTANT - || ast->kind == ZEND_AST_CONSTANT_CLASS) { - RETURN_TRUE; - } + zval default_value; + if (get_parameter_default(&default_value, param) == FAILURE) { + zend_throw_exception_ex(reflection_exception_ptr, 0, + "Internal error: Failed to retrieve the default value"); + RETURN_THROWS(); } - RETURN_FALSE; + if (Z_TYPE(default_value) == IS_CONSTANT_AST) { + zend_ast *ast = Z_ASTVAL(default_value); + RETVAL_BOOL(ast->kind == ZEND_AST_CONSTANT || ast->kind == ZEND_AST_CONSTANT_CLASS); + zval_ptr_dtor_nogc(&default_value); + } else { + RETURN_FALSE; + } } /* }}} */ @@ -2694,30 +2771,37 @@ ZEND_METHOD(reflection_parameter, isDefaultValueConstant) Returns the default value's constant name if default value is constant or null */ ZEND_METHOD(reflection_parameter, getDefaultValueConstantName) { - zend_op *precv; + reflection_object *intern; parameter_reference *param; if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } - param = _reflection_param_get_default_param(INTERNAL_FUNCTION_PARAM_PASSTHRU); - if (!param) { - return; + GET_REFLECTION_OBJECT_PTR(param); + + zval default_value; + if (get_parameter_default(&default_value, param) == FAILURE) { + zend_throw_exception_ex(reflection_exception_ptr, 0, + "Internal error: Failed to retrieve the default value"); + RETURN_THROWS(); } - precv = _reflection_param_get_default_precv(INTERNAL_FUNCTION_PARAM_PASSTHRU, param); - if (precv && Z_TYPE_P(RT_CONSTANT(precv, precv->op2)) == IS_CONSTANT_AST) { - zend_ast *ast = Z_ASTVAL_P(RT_CONSTANT(precv, precv->op2)); + if (Z_TYPE(default_value) != IS_CONSTANT_AST) { + zval_ptr_dtor_nogc(&default_value); + RETURN_NULL(); + } - if (ast->kind == ZEND_AST_CONSTANT) { - RETURN_STR_COPY(zend_ast_get_constant_name(ast)); - } else if (ast->kind == ZEND_AST_CONSTANT_CLASS) { - RETURN_STRINGL("__CLASS__", sizeof("__CLASS__")-1); - } + zend_ast *ast = Z_ASTVAL(default_value); + if (ast->kind == ZEND_AST_CONSTANT) { + RETVAL_STR_COPY(zend_ast_get_constant_name(ast)); + } else if (ast->kind == ZEND_AST_CONSTANT_CLASS) { + RETVAL_STRINGL("__CLASS__", sizeof("__CLASS__")-1); + } else { + RETVAL_NULL(); } + zval_ptr_dtor_nogc(&default_value); } -/* }}} */ /* {{{ proto public bool ReflectionParameter::isVariadic() Returns whether this parameter is a variadic parameter */ diff --git a/ext/reflection/php_reflection_arginfo.h b/ext/reflection/php_reflection_arginfo.h index 82c048ad5c881..19729edf92395 100644 --- a/ext/reflection/php_reflection_arginfo.h +++ b/ext/reflection/php_reflection_arginfo.h @@ -85,7 +85,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_ReflectionGenerator_getExecutingFile arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionGenerator_getTrace, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "DEBUG_BACKTRACE_PROVIDE_OBJECT") ZEND_END_ARG_INFO() #define arginfo_class_ReflectionGenerator_getFunction arginfo_class_ReflectionFunctionAbstract___clone @@ -124,7 +124,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_ReflectionMethod_getModifiers arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionMethod_invoke, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, object, IS_OBJECT, 1, "null") ZEND_ARG_VARIADIC_INFO(0, args) ZEND_END_ARG_INFO() @@ -178,7 +178,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_ReflectionClass_getMethod arginfo_class_ReflectionClass_hasMethod ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionClass_getMethods, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, filter, IS_LONG, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, filter, IS_LONG, 1, "null") ZEND_END_ARG_INFO() #define arginfo_class_ReflectionClass_hasProperty arginfo_class_ReflectionClass_hasMethod @@ -226,7 +226,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_ReflectionClass_newInstanceWithoutConstructor arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionClass_newInstanceArgs, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, args, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, args, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() #define arginfo_class_ReflectionClass_getParentClass arginfo_class_ReflectionFunctionAbstract___clone @@ -283,7 +283,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_ReflectionProperty_getName arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionProperty_getValue, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, object, IS_OBJECT, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionProperty_setValue, 0, 0, 1) diff --git a/ext/reflection/tests/ReflectionClass_toString_001.phpt b/ext/reflection/tests/ReflectionClass_toString_001.phpt index 2dc742e3ec7b1..367645d019d5d 100644 --- a/ext/reflection/tests/ReflectionClass_toString_001.phpt +++ b/ext/reflection/tests/ReflectionClass_toString_001.phpt @@ -131,7 +131,7 @@ Class [ class ReflectionClass implements Reflector, String Method [ public method getMethods ] { - Parameters [1] { - Parameter #0 [ ?int $filter ] + Parameter #0 [ ?int $filter = null ] } } @@ -152,7 +152,7 @@ Class [ class ReflectionClass implements Reflector, String Method [ public method getProperties ] { - Parameters [1] { - Parameter #0 [ ?int $filter ] + Parameter #0 [ ?int $filter = null ] } } @@ -259,7 +259,7 @@ Class [ class ReflectionClass implements Reflector, String Method [ public method newInstance ] { - Parameters [1] { - Parameter #0 [ ...$args ] + Parameter #0 [ ...$args = ] } } @@ -272,7 +272,7 @@ Class [ class ReflectionClass implements Reflector, String Method [ public method newInstanceArgs ] { - Parameters [1] { - Parameter #0 [ array $args ] + Parameter #0 [ array $args = [] ] } } @@ -299,7 +299,7 @@ Class [ class ReflectionClass implements Reflector, String - Parameters [2] { Parameter #0 [ string $name ] - Parameter #1 [ $default ] + Parameter #1 [ $default = ] } } diff --git a/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic1.phpt b/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic1.phpt index 4f3f114bada6e..98fcf5afac47a 100644 --- a/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic1.phpt +++ b/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic1.phpt @@ -11,13 +11,13 @@ function ReflectionParameterTest($test1=array(), $test2 = CONST_TEST_1, $test3 = $reflect = new ReflectionFunction('ReflectionParameterTest'); foreach($reflect->getParameters() as $param) { if($param->getName() == 'test1') { - var_dump($param->isDefaultValueConstant()); + var_dump(@$param->isDefaultValueConstant()); } if($param->getName() == 'test2') { - var_dump($param->isDefaultValueConstant()); + var_dump(@$param->isDefaultValueConstant()); } - if($param->isDefaultValueAvailable() && $param->isDefaultValueConstant()) { - var_dump($param->getDefaultValueConstantName()); + if($param->isDefaultValueAvailable() && @$param->isDefaultValueConstant()) { + var_dump(@$param->getDefaultValueConstantName()); } } @@ -36,8 +36,8 @@ $method = new ReflectionMethod('Foo', 'baz'); $params = $method->getParameters(); foreach ($params as $param) { - if ($param->isDefaultValueConstant()) { - var_dump($param->getDefaultValueConstantName()); + if (@$param->isDefaultValueConstant()) { + var_dump(@$param->getDefaultValueConstantName()); } } ?> diff --git a/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic2.phpt b/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic2.phpt index 28aeceeb2f830..e3d3b9dd96a7b 100644 --- a/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic2.phpt +++ b/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic2.phpt @@ -17,14 +17,12 @@ namespace { } $reflect = new ReflectionFunction('ReflectionParameterTest'); foreach($reflect->getParameters() as $param) { - if($param->isDefaultValueAvailable() && $param->isDefaultValueConstant()) { - echo $param->getDefaultValueConstantName() . "\n"; + if($param->isDefaultValueAvailable() && @$param->isDefaultValueConstant()) { + echo @$param->getDefaultValueConstantName() . "\n"; } } - echo "==DONE=="; } ?> --EXPECT-- ReflectionTestNamespace\TestClass::TEST_CONST_2 ReflectionTestNamespace\CONST_TEST_1 -==DONE== diff --git a/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_error.phpt b/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_error.phpt index 7f1451bbdb474..95551524047e0 100644 --- a/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_error.phpt +++ b/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_error.phpt @@ -12,8 +12,7 @@ $reflect = new ReflectionFunction('ReflectionParameterTest'); foreach($reflect->getParameters() as $param) { try { echo $param->getDefaultValueConstantName() . "\n"; - } - catch(ReflectionException $e) { + } catch(ReflectionException $e) { echo $e->getMessage() . "\n"; } } diff --git a/ext/reflection/tests/ReflectionParameter_export_basic.phpt b/ext/reflection/tests/ReflectionParameter_export_basic.phpt index 22b25de6636ce..68a43610ef32e 100644 --- a/ext/reflection/tests/ReflectionParameter_export_basic.phpt +++ b/ext/reflection/tests/ReflectionParameter_export_basic.phpt @@ -12,6 +12,6 @@ foreach($reflect->getParameters() as $key => $value) { echo new ReflectionParameter('ReflectionParameterTest', $key), "\n"; } ?> ---EXPECTF-- +--EXPECT-- Parameter #0 [ $test ] Parameter #1 [ $test2 = NULL ] diff --git a/ext/reflection/tests/ReflectionParameter_getDeclaringFunction_basic.phpt b/ext/reflection/tests/ReflectionParameter_getDeclaringFunction_basic.phpt index 7cbef6729235f..dee0196880635 100644 --- a/ext/reflection/tests/ReflectionParameter_getDeclaringFunction_basic.phpt +++ b/ext/reflection/tests/ReflectionParameter_getDeclaringFunction_basic.phpt @@ -32,4 +32,3 @@ Function [ function ReflectionParameterTest ] { Parameter #1 [ $test2 = NULL ] } } - diff --git a/ext/reflection/tests/internal_parameter_default_value/ReflectionParameter_getDefaultValueConstantName_Internal.phpt b/ext/reflection/tests/internal_parameter_default_value/ReflectionParameter_getDefaultValueConstantName_Internal.phpt new file mode 100644 index 0000000000000..b013c9db66725 --- /dev/null +++ b/ext/reflection/tests/internal_parameter_default_value/ReflectionParameter_getDefaultValueConstantName_Internal.phpt @@ -0,0 +1,53 @@ +--TEST-- +ReflectionParameter::getDefaultValueConstantName() should also work for parameters of internal functions. +--FILE-- +getMethod('setTime'); + +foreach ($method->getParameters() as $parameter) { + try { + var_dump($parameter->getDefaultValueConstantName()); + } catch (ReflectionException $exception) { + echo $exception->getMessage() . "\n"; + } +} + +echo "----------\n"; + +$class = new ReflectionClass('DateTimeZone'); +$method = $class->getMethod('getTransitions'); + +foreach ($method->getParameters() as $parameter) { + try { + var_dump($parameter->getDefaultValueConstantName()); + } catch (ReflectionException $exception) { + echo $exception->getMessage() . "\n"; + } +} + +echo "----------\n"; + +$class = new ReflectionClass('DateTimeZone'); +$method = $class->getMethod('listIdentifiers'); + +foreach ($method->getParameters() as $parameter) { + try { + var_dump($parameter->getDefaultValueConstantName()); + } catch (ReflectionException $exception) { + echo $exception->getMessage() . "\n"; + } +} + +?> +--EXPECT-- +Internal error: Failed to retrieve the default value +Internal error: Failed to retrieve the default value +NULL +NULL +---------- +string(11) "PHP_INT_MIN" +string(11) "PHP_INT_MAX" +---------- +string(17) "DateTimeZone::ALL" +NULL diff --git a/ext/reflection/tests/internal_parameter_default_value/ReflectionParameter_getDefaultValue_Internal.phpt b/ext/reflection/tests/internal_parameter_default_value/ReflectionParameter_getDefaultValue_Internal.phpt new file mode 100644 index 0000000000000..c1e1a14b279be --- /dev/null +++ b/ext/reflection/tests/internal_parameter_default_value/ReflectionParameter_getDefaultValue_Internal.phpt @@ -0,0 +1,37 @@ +--TEST-- +ReflectionParameter::getDefaultValue() should also work for parameters of internal functions. +--FILE-- +getMethod('setTime'); + +foreach ($method->getParameters() as $k => $parameter) { + try { + var_dump($parameter->getDefaultValue()); + } catch (ReflectionException $exception) { + echo $exception->getMessage() . "\n"; + } +} + +echo "----------\n"; + +$class = new ReflectionClass('DateTimeZone'); +$method = $class->getMethod('listIdentifiers'); + +foreach ($method->getParameters() as $parameter) { + try { + var_dump($parameter->getDefaultValue()); + } catch (ReflectionException $exception) { + echo $exception->getMessage() . "\n"; + } +} + +?> +--EXPECT-- +Internal error: Failed to retrieve the default value +Internal error: Failed to retrieve the default value +int(0) +int(0) +---------- +int(2047) +NULL diff --git a/ext/reflection/tests/internal_parameter_default_value/ReflectionParameter_isDefaultValueAvailable_Internal.phpt b/ext/reflection/tests/internal_parameter_default_value/ReflectionParameter_isDefaultValueAvailable_Internal.phpt new file mode 100644 index 0000000000000..bcdcb68f19f45 --- /dev/null +++ b/ext/reflection/tests/internal_parameter_default_value/ReflectionParameter_isDefaultValueAvailable_Internal.phpt @@ -0,0 +1,28 @@ +--TEST-- +ReflectionParameter::isDefaultValueAvailable() should also work for parameters of internal functions +--FILE-- +getMethod('setTime'); + +foreach ($method->getParameters() as $parameter) { + var_dump($parameter->isDefaultValueAvailable()); +} + +echo "----------\n"; + +$class = new ReflectionClass('DateTimeZone'); +$method = $class->getMethod('listIdentifiers'); + +foreach ($method->getParameters() as $parameter) { + var_dump($parameter->isDefaultValueAvailable()); +} +?> +--EXPECT-- +bool(false) +bool(false) +bool(true) +bool(true) +---------- +bool(true) +bool(true) diff --git a/ext/reflection/tests/internal_parameter_default_value/ReflectionParameter_isDefaultValueConstant_Internal.phpt b/ext/reflection/tests/internal_parameter_default_value/ReflectionParameter_isDefaultValueConstant_Internal.phpt new file mode 100644 index 0000000000000..35c5548074920 --- /dev/null +++ b/ext/reflection/tests/internal_parameter_default_value/ReflectionParameter_isDefaultValueConstant_Internal.phpt @@ -0,0 +1,36 @@ +--TEST-- +ReflectionParameter::isDefaultValueConstant() should also work for parameters of internal functions +--FILE-- +getMethod('setTime'); + +foreach ($method->getParameters() as $parameter) { + try { + var_dump($parameter->isDefaultValueConstant()); + } catch (ReflectionException $exception) { + echo $exception->getMessage() . "\n"; + } +} + +echo "----------\n"; + +$class = new ReflectionClass('DateTimeZone'); +$method = $class->getMethod('listIdentifiers'); + +foreach ($method->getParameters() as $parameter) { + try { + var_dump($parameter->isDefaultValueConstant()); + } catch (ReflectionException $exception) { + echo $exception->getMessage() . "\n"; + } +} +?> +--EXPECT-- +Internal error: Failed to retrieve the default value +Internal error: Failed to retrieve the default value +bool(false) +bool(false) +---------- +bool(true) +bool(false) diff --git a/ext/reflection/tests/internal_parameter_default_value/ReflectionParameter_toString_Internal.phpt b/ext/reflection/tests/internal_parameter_default_value/ReflectionParameter_toString_Internal.phpt new file mode 100644 index 0000000000000..6697232869e8b --- /dev/null +++ b/ext/reflection/tests/internal_parameter_default_value/ReflectionParameter_toString_Internal.phpt @@ -0,0 +1,28 @@ +--TEST-- +ReflectionParameter::__toString() should display default values for internal functions as well +--FILE-- +getMethod('setTime'); + +foreach ($method->getParameters() as $k => $parameter) { + echo $parameter . "\n"; +} + +echo "----------\n"; + +$class = new ReflectionClass('DateTimeZone'); +$method = $class->getMethod('listIdentifiers'); + +foreach ($method->getParameters() as $parameter) { + echo $parameter . "\n"; +} +?> +--EXPECT-- +Parameter #0 [ int $hour ] +Parameter #1 [ int $minute ] +Parameter #2 [ int $second = 0 ] +Parameter #3 [ int $microseconds = 0 ] +---------- +Parameter #0 [ int $what = DateTimeZone::ALL ] +Parameter #1 [ ?string $country = null ] diff --git a/ext/session/session_arginfo.h b/ext/session/session_arginfo.h index 60c17c1916a14..f8814376d665b 100644 --- a/ext/session/session_arginfo.h +++ b/ext/session/session_arginfo.h @@ -17,11 +17,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_session_id, 0, 0, MAY_BE_STRING| ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_session_create_id, 0, 0, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, prefix, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, prefix, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_session_regenerate_id, 0, 0, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, delete_old_session, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, delete_old_session, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_session_decode, 0, 1, _IS_BOOL, 0) @@ -58,14 +58,14 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_session_set_save_handler, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, open) - ZEND_ARG_INFO(0, close) - ZEND_ARG_INFO(0, read) - ZEND_ARG_INFO(0, write) - ZEND_ARG_INFO(0, destroy) - ZEND_ARG_INFO(0, gc) - ZEND_ARG_INFO(0, create_sid) - ZEND_ARG_INFO(0, validate_sid) - ZEND_ARG_INFO(0, update_timestamp) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, close, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, read, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, write, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, destroy, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, gc, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, create_sid, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, validate_sid, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, update_timestamp, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_session_cache_limiter, 0, 0, MAY_BE_STRING|MAY_BE_FALSE) @@ -73,19 +73,19 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_session_cache_limiter, 0, 0, MAY ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_session_cache_expire, 0, 0, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, new_cache_expire, IS_LONG, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, new_cache_expire, IS_LONG, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_session_set_cookie_params, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, lifetime_or_options) ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, secure, _IS_BOOL, 1) - ZEND_ARG_TYPE_INFO(0, httponly, _IS_BOOL, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, domain, IS_STRING, 0, "\"\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, secure, _IS_BOOL, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, httponly, _IS_BOOL, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_session_start, 0, 0, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SessionHandlerInterface_open, 0, 0, 2) diff --git a/ext/simplexml/simplexml_arginfo.h b/ext/simplexml/simplexml_arginfo.h index 06b9941b2e65f..c77878c9276a1 100644 --- a/ext/simplexml/simplexml_arginfo.h +++ b/ext/simplexml/simplexml_arginfo.h @@ -2,23 +2,23 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_simplexml_load_file, 0, 1, SimpleXMLElement, MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, class_name, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, ns, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, is_prefix, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class_name, IS_STRING, 1, "SimpleXMLElement::class") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ns, IS_STRING, 0, "\'\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, is_prefix, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_simplexml_load_string, 0, 1, SimpleXMLElement, MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, class_name, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, ns, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, is_prefix, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class_name, IS_STRING, 1, "SimpleXMLElement::class") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ns, IS_STRING, 0, "\'\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, is_prefix, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_simplexml_import_dom, 0, 1, SimpleXMLElement, 1) ZEND_ARG_OBJ_INFO(0, node, DOMNode, 0) - ZEND_ARG_TYPE_INFO(0, class_name, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class_name, IS_STRING, 1, "SimpleXMLElement::class") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SimpleXMLElement_xpath, 0, 0, 1) @@ -37,33 +37,33 @@ ZEND_END_ARG_INFO() #define arginfo_class_SimpleXMLElement_saveXML arginfo_class_SimpleXMLElement_asXML ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SimpleXMLElement_getNamespaces, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, recursive, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, recursive, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SimpleXMLElement_getDocNamespaces, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, recursive, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, from_root, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, recursive, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, from_root, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SimpleXMLElement_children, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, ns, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, is_prefix, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ns, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, is_prefix, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #define arginfo_class_SimpleXMLElement_attributes arginfo_class_SimpleXMLElement_children ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SimpleXMLElement___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, data_is_url, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, ns, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, is_prefix, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, data_is_url, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ns, IS_STRING, 0, "\'\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, is_prefix, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SimpleXMLElement_addChild, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, ns, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ns, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #define arginfo_class_SimpleXMLElement_addAttribute arginfo_class_SimpleXMLElement_addChild diff --git a/ext/skeleton/skeleton_arginfo.h b/ext/skeleton/skeleton_arginfo.h index 01430060b9ba6..3aab40365ca3b 100644 --- a/ext/skeleton/skeleton_arginfo.h +++ b/ext/skeleton/skeleton_arginfo.h @@ -4,7 +4,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_test1, 0, 0, IS_VOID, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_test2, 0, 0, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, str, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() diff --git a/ext/snmp/snmp_arginfo.h b/ext/snmp/snmp_arginfo.h index fdafded7d3a6d..8f1f95398d05c 100644 --- a/ext/snmp/snmp_arginfo.h +++ b/ext/snmp/snmp_arginfo.h @@ -45,7 +45,13 @@ ZEND_END_ARG_INFO() #define arginfo_snmp2_get arginfo_snmpget -#define arginfo_snmp2_getnext arginfo_snmpget +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_snmp2_getnext, 0, 3, MAY_BE_ARRAY|MAY_BE_BOOL) + ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, community, IS_STRING, 0) + ZEND_ARG_INFO(0, object_id) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timeout, IS_LONG, 0, "UNKOWN") + ZEND_ARG_TYPE_INFO(0, retries, IS_LONG, 0) +ZEND_END_ARG_INFO() #define arginfo_snmp2_walk arginfo_snmpget @@ -66,7 +72,18 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_snmp3_get, 0, 8, MAY_BE_ARRAY|MA ZEND_ARG_TYPE_INFO(0, retries, IS_LONG, 0) ZEND_END_ARG_INFO() -#define arginfo_snmp3_getnext arginfo_snmp3_get +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_snmp3_getnext, 0, 8, MAY_BE_ARRAY|MAY_BE_BOOL) + ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, sec_name, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, sec_level, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, auth_protocol, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, auth_passphrase, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, priv_protocol, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, priv_passphrase, IS_STRING, 0) + ZEND_ARG_INFO(0, object_id) + ZEND_ARG_TYPE_INFO(0, timeout, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, retries, IS_LONG, 0, "UNKOWN") +ZEND_END_ARG_INFO() #define arginfo_snmp3_walk arginfo_snmp3_get @@ -111,17 +128,17 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SNMP_setSecurity, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, sec_level, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, auth_protocol, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, auth_passphrase, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, priv_protocol, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, priv_passphrase, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, contextName, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, contextEngineID, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, auth_protocol, IS_STRING, 0, "\'\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, auth_passphrase, IS_STRING, 0, "\'\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, priv_protocol, IS_STRING, 0, "\'\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, priv_passphrase, IS_STRING, 0, "\'\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, contextName, IS_STRING, 0, "\'\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, contextEngineID, IS_STRING, 0, "\'\'") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SNMP_get, 0, 0, 1) ZEND_ARG_INFO(0, object_id) - ZEND_ARG_TYPE_INFO(0, use_orignames, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_orignames, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SNMP_getnext, 0, 0, 1) @@ -130,7 +147,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SNMP_walk, 0, 0, 1) ZEND_ARG_INFO(0, object_id) - ZEND_ARG_TYPE_INFO(0, suffix_keys, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, suffix_keys, _IS_BOOL, 0, "false") ZEND_ARG_TYPE_INFO(0, max_repetitions, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, non_repeaters, IS_LONG, 0) ZEND_END_ARG_INFO() diff --git a/ext/soap/soap_arginfo.h b/ext/soap/soap_arginfo.h index 82f30e9e67f6d..505629fb88e0d 100644 --- a/ext/soap/soap_arginfo.h +++ b/ext/soap/soap_arginfo.h @@ -1,7 +1,7 @@ /* This is a generated file, edit the .stub.php file instead. */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_use_soap_error_handler, 0, 0, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, handler, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, handler, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_is_soap_fault, 0, 1, _IS_BOOL, 0) @@ -17,17 +17,17 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapHeader___construct, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, namespace, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_INFO(0, data) - ZEND_ARG_TYPE_INFO(0, mustunderstand, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mustunderstand, _IS_BOOL, 0, "false") ZEND_ARG_INFO(0, actor) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapFault___construct, 0, 0, 2) ZEND_ARG_INFO(0, faultcode) ZEND_ARG_TYPE_INFO(0, faultstring, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, faultactor, IS_STRING, 1) - ZEND_ARG_INFO(0, detail) - ZEND_ARG_TYPE_INFO(0, faultname, IS_STRING, 1) - ZEND_ARG_INFO(0, headerfault) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, faultactor, IS_STRING, 1, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, detail, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, faultname, IS_STRING, 1, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, headerfault, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_SoapFault___toString, 0, 0, IS_STRING, 0) @@ -36,23 +36,23 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapVar___construct, 0, 0, 2) ZEND_ARG_INFO(0, data) ZEND_ARG_INFO(0, encoding) - ZEND_ARG_TYPE_INFO(0, type_name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, type_namespace, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, node_name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, node_namespace, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type_name, IS_STRING, 0, "\"\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type_namespace, IS_STRING, 0, "\"\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, node_name, IS_STRING, 0, "\"\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, node_namespace, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapServer___construct, 0, 0, 1) ZEND_ARG_INFO(0, wsdl) - ZEND_ARG_TYPE_INFO(0, options, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapServer_fault, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, code, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, actor, IS_STRING, 0) - ZEND_ARG_INFO(0, details) - ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, actor, IS_STRING, 0, "\"\"") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, details, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapServer_addSoapHeader, 0, 0, 1) @@ -93,9 +93,9 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapClient___soapCall, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, function_name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, arguments, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_ARRAY, 1) - ZEND_ARG_INFO(0, input_headers) - ZEND_ARG_INFO(0, output_headers) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 1, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, input_headers, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, output_headers, "null") ZEND_END_ARG_INFO() #define arginfo_class_SoapClient___getFunctions arginfo_class_SoapServer_getFunctions @@ -115,20 +115,20 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapClient___doRequest, 0, 0, 4) ZEND_ARG_TYPE_INFO(0, location, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, action, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, version, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, one_way, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, one_way, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapClient___setCookie, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #define arginfo_class_SoapClient___getCookies arginfo_class_SoapServer_getFunctions ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapClient___setSoapHeaders, 0, 0, 0) - ZEND_ARG_INFO(0, soapheaders) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, soapheaders, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapClient___setLocation, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, new_location, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, new_location, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() diff --git a/ext/sockets/sockets_arginfo.h b/ext/sockets/sockets_arginfo.h index 9eb39903de96f..73dcacfe0b24b 100644 --- a/ext/sockets/sockets_arginfo.h +++ b/ext/sockets/sockets_arginfo.h @@ -5,12 +5,12 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_select, 0, 4, MAY_BE_LONG ZEND_ARG_TYPE_INFO(1, write_fds, IS_ARRAY, 1) ZEND_ARG_TYPE_INFO(1, except_fds, IS_ARRAY, 1) ZEND_ARG_TYPE_INFO(0, tv_sec, IS_LONG, 1) - ZEND_ARG_TYPE_INFO(0, tv_usec, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, tv_usec, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_create_listen, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, port, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, backlog, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, backlog, IS_LONG, 0, "128") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_accept, 0, 0, 1) @@ -25,7 +25,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_listen, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, socket) - ZEND_ARG_TYPE_INFO(0, backlog, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, backlog, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_close, 0, 1, IS_VOID, 0) @@ -35,13 +35,13 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_write, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_INFO(0, socket) ZEND_ARG_TYPE_INFO(0, buf, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_read, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, socket) ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_LONG, 0, "PHP_BINARY_READ") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_getsockname, 0, 2, _IS_BOOL, 0) @@ -61,7 +61,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_connect, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(0, socket) ZEND_ARG_TYPE_INFO(0, addr, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, port, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_strerror, 0, 1, IS_STRING, 0) @@ -99,7 +99,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_sendto, 0, 5, MAY_BE_LONG ZEND_ARG_TYPE_INFO(0, len, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, addr, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, port, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_get_option, 0, 3, MAY_BE_ARRAY|MAY_BE_LONG|MAY_BE_FALSE) @@ -131,7 +131,7 @@ ZEND_END_ARG_INFO() #if defined(HAVE_SHUTDOWN) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_shutdown, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, socket) - ZEND_ARG_TYPE_INFO(0, how, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, how, IS_LONG, 0, "2") ZEND_END_ARG_INFO() #endif @@ -152,19 +152,19 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_sendmsg, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_INFO(0, socket) ZEND_ARG_TYPE_INFO(0, msghdr, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_recvmsg, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_INFO(0, socket) ZEND_ARG_TYPE_INFO(1, msghdr, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_cmsg_space, 0, 2, IS_LONG, 1) ZEND_ARG_TYPE_INFO(0, level, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, n, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, n, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_addrinfo_lookup, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) diff --git a/ext/sodium/libsodium_arginfo.h b/ext/sodium/libsodium_arginfo.h index 2bae9e46ba21b..8d902747dee69 100644 --- a/ext/sodium/libsodium_arginfo.h +++ b/ext/sodium/libsodium_arginfo.h @@ -143,15 +143,15 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_generichash, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, key, IS_STRING, 0, "\"\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "SODIUM_CRYPTO_GENERICHASH_BYTES") ZEND_END_ARG_INFO() #define arginfo_sodium_crypto_generichash_keygen arginfo_sodium_crypto_aead_chacha20poly1305_keygen ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_generichash_init, 0, 0, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, key, IS_STRING, 0, "\"\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "SODIUM_CRYPTO_GENERICHASH_BYTES") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_generichash_update, 0, 2, _IS_BOOL, 0) @@ -161,7 +161,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_generichash_final, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(1, state, IS_STRING, 0) - ZEND_ARG_INFO(0, length) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, length, "SODIUM_CRYPTO_GENERICHASH_BYTES") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_kdf_derive_from_key, 0, 4, IS_STRING, 0) @@ -180,7 +180,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_pwhash, 0, 5, IS_S ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, opslimit, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, memlimit, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, alg, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, alg, IS_LONG, 0, "SODIUM_CRYPTO_PWHASH_ALG_DEFAULT") ZEND_END_ARG_INFO() #endif @@ -258,8 +258,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_secretstream_xchacha20poly1305_push, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(1, state, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, msg, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, ad, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, tag, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ad, IS_STRING, 0, "\"\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, tag, IS_LONG, 0, "SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_MESSAGE") ZEND_END_ARG_INFO() #endif @@ -274,7 +274,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_secretstream_xchacha20poly1305_pull, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(1, state, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, c, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, ad, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ad, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() #endif @@ -362,7 +362,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_hex2bin, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_INFO(0, ignore) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, ignore, "\"\"") ZEND_END_ARG_INFO() #if defined(sodium_base64_VARIANT_ORIGINAL) @@ -376,7 +376,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_base642bin, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, id, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, ignore, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ignore, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() #endif diff --git a/ext/spl/php_spl_arginfo.h b/ext/spl/php_spl_arginfo.h index cc60ff97baebd..8dbb9c4d847c6 100644 --- a/ext/spl/php_spl_arginfo.h +++ b/ext/spl/php_spl_arginfo.h @@ -2,12 +2,12 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_implements, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_INFO(0, what) - ZEND_ARG_TYPE_INFO(0, autoload, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, autoload, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_parents, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_INFO(0, instance) - ZEND_ARG_TYPE_INFO(0, autoload, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, autoload, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() #define arginfo_class_uses arginfo_class_implements @@ -29,9 +29,9 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_spl_autoload_functions, 0, 0, MA ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_spl_autoload_register, 0, 0, _IS_BOOL, 0) - ZEND_ARG_INFO(0, autoload_function) - ZEND_ARG_TYPE_INFO(0, throw, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, prepend, _IS_BOOL, 0) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, autoload_function, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, throw, _IS_BOOL, 0, "true") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, prepend, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_spl_autoload_unregister, 0, 1, _IS_BOOL, 0) @@ -52,7 +52,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_iterator_apply, 0, 2, IS_LONG, 0) ZEND_ARG_OBJ_INFO(0, iterator, Traversable, 0) ZEND_ARG_TYPE_INFO(0, function, IS_CALLABLE, 0) - ZEND_ARG_TYPE_INFO(0, args, IS_ARRAY, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, args, IS_ARRAY, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_iterator_count, 0, 1, IS_LONG, 0) @@ -61,5 +61,5 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_iterator_to_array, 0, 1, IS_ARRAY, 0) ZEND_ARG_OBJ_INFO(0, iterator, Traversable, 0) - ZEND_ARG_TYPE_INFO(0, use_keys, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_keys, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() diff --git a/ext/spl/spl_array_arginfo.h b/ext/spl/spl_array_arginfo.h index fdd025aa2190d..c131c3f7fbd5d 100644 --- a/ext/spl/spl_array_arginfo.h +++ b/ext/spl/spl_array_arginfo.h @@ -1,9 +1,9 @@ /* This is a generated file, edit the .stub.php file instead. */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ArrayObject___construct, 0, 0, 0) - ZEND_ARG_INFO(0, input) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, iterator_class, IS_STRING, 0) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, input, "[]") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, iterator_class, IS_STRING, 0, "ArrayIterator::class") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ArrayObject_offsetExists, 0, 0, 1) @@ -35,7 +35,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ArrayObject_setFlags, 0, 0, 1) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ArrayObject_asort, 0, 0, 0) - ZEND_ARG_INFO(0, sort_flags) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, sort_flags, "SORT_REGULAR") ZEND_END_ARG_INFO() #define arginfo_class_ArrayObject_ksort arginfo_class_ArrayObject_asort @@ -77,8 +77,8 @@ ZEND_END_ARG_INFO() #define arginfo_class_ArrayObject___debugInfo arginfo_class_ArrayObject_getArrayCopy ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ArrayIterator___construct, 0, 0, 0) - ZEND_ARG_INFO(0, array) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, array, "[]") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #define arginfo_class_ArrayIterator_offsetExists arginfo_class_ArrayObject_offsetExists diff --git a/ext/spl/spl_directory_arginfo.h b/ext/spl/spl_directory_arginfo.h index 676749278b2b4..c65fba76b8106 100644 --- a/ext/spl/spl_directory_arginfo.h +++ b/ext/spl/spl_directory_arginfo.h @@ -12,7 +12,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_SplFileInfo_getExtension arginfo_class_SplFileInfo_getPath ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplFileInfo_getBasename, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, suffix, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, suffix, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() #define arginfo_class_SplFileInfo_getPathname arginfo_class_SplFileInfo_getPath @@ -58,14 +58,18 @@ ZEND_END_ARG_INFO() #define arginfo_class_SplFileInfo_getPathInfo arginfo_class_SplFileInfo_getFileInfo ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplFileInfo_openFile, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, open_mode, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, use_include_path, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, open_mode, IS_STRING, 0, "\'r\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_include_path, _IS_BOOL, 0, "false") ZEND_ARG_INFO(0, context) ZEND_END_ARG_INFO() -#define arginfo_class_SplFileInfo_setFileClass arginfo_class_SplFileInfo_getFileInfo +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplFileInfo_setFileClass, 0, 0, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class_name, IS_STRING, 0, "SplFileObject::class") +ZEND_END_ARG_INFO() -#define arginfo_class_SplFileInfo_setInfoClass arginfo_class_SplFileInfo_getFileInfo +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplFileInfo_setInfoClass, 0, 0, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class_name, IS_STRING, 0, "SplFileInfo::class") +ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_SplFileInfo___toString, 0, 0, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -104,7 +108,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_FilesystemIterator___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS") ZEND_END_ARG_INFO() #define arginfo_class_FilesystemIterator_rewind arginfo_class_SplFileInfo_getPath @@ -121,10 +125,13 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_FilesystemIterator_setFlags, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) ZEND_END_ARG_INFO() -#define arginfo_class_RecursiveDirectoryIterator___construct arginfo_class_FilesystemIterator___construct +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RecursiveDirectoryIterator___construct, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO") +ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RecursiveDirectoryIterator_hasChildren, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, allow_links, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, allow_links, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #define arginfo_class_RecursiveDirectoryIterator_getChildren arginfo_class_SplFileInfo_getPath @@ -133,15 +140,15 @@ ZEND_END_ARG_INFO() #define arginfo_class_RecursiveDirectoryIterator_getSubPathname arginfo_class_SplFileInfo_getPath -#define arginfo_class_GlobIterator___construct arginfo_class_FilesystemIterator___construct +#define arginfo_class_GlobIterator___construct arginfo_class_RecursiveDirectoryIterator___construct #define arginfo_class_GlobIterator_count arginfo_class_SplFileInfo_getPath ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplFileObject___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, file_name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, open_mode, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, use_include_path, _IS_BOOL, 0) - ZEND_ARG_INFO(0, context) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, open_mode, IS_STRING, 0, "\'r\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_include_path, _IS_BOOL, 0, "false") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() #define arginfo_class_SplFileObject_rewind arginfo_class_SplFileInfo_getPath @@ -157,29 +164,29 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplFileObject_fread, 0, 0, 1) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplFileObject_fgetcsv, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, delimiter, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, enclosure, IS_STRING, 0) - ZEND_ARG_INFO(0, escape) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, delimiter, IS_STRING, 0, "\",\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enclosure, IS_STRING, 0, "\'\"\'") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, escape, "\"\\\\\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplFileObject_fputcsv, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, fields, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, delimiter, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, enclosure, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, escape, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, delimiter, IS_STRING, 0, "\',\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enclosure, IS_STRING, 0, "\'\"\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, escape, IS_STRING, 0, "\"\\\\\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplFileObject_setCsvControl, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, delimiter, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, enclosure, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, escape, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, delimiter, IS_STRING, 0, "\",\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enclosure, IS_STRING, 0, "\"\\\"\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, escape, IS_STRING, 0, "\"\\\\\"") ZEND_END_ARG_INFO() #define arginfo_class_SplFileObject_getCsvControl arginfo_class_SplFileInfo_getPath ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplFileObject_flock, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, operation, IS_LONG, 0) - ZEND_ARG_INFO(1, wouldblock) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, wouldblock, "null") ZEND_END_ARG_INFO() #define arginfo_class_SplFileObject_fflush arginfo_class_SplFileInfo_getPath @@ -188,7 +195,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplFileObject_fseek, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, whence, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, whence, IS_LONG, 0, "SEEK_SET") ZEND_END_ARG_INFO() #define arginfo_class_SplFileObject_fgetc arginfo_class_SplFileInfo_getPath @@ -202,7 +209,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplFileObject_fwrite, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #define arginfo_class_SplFileObject_fstat arginfo_class_SplFileInfo_getPath @@ -240,5 +247,5 @@ ZEND_END_ARG_INFO() #define arginfo_class_SplFileObject___toString arginfo_class_SplFileInfo___toString ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplTempFileObject___construct, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, max_memory, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, max_memory, IS_LONG, 0, "2 * 1024 * 1024") ZEND_END_ARG_INFO() diff --git a/ext/spl/spl_fixedarray_arginfo.h b/ext/spl/spl_fixedarray_arginfo.h index d25d2313bc3cc..2791b291cc53e 100644 --- a/ext/spl/spl_fixedarray_arginfo.h +++ b/ext/spl/spl_fixedarray_arginfo.h @@ -1,7 +1,7 @@ /* This is a generated file, edit the .stub.php file instead. */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplFixedArray___construct, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, size, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplFixedArray___wakeup, 0, 0, 0) @@ -13,7 +13,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplFixedArray_fromArray, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, array, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, save_indexes, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, save_indexes, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() #define arginfo_class_SplFixedArray_getSize arginfo_class_SplFixedArray___wakeup diff --git a/ext/spl/spl_iterators_arginfo.h b/ext/spl/spl_iterators_arginfo.h index e8b233524e36e..6f2690ac87bbd 100644 --- a/ext/spl/spl_iterators_arginfo.h +++ b/ext/spl/spl_iterators_arginfo.h @@ -33,8 +33,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RecursiveIteratorIterator___construct, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, iterator, Traversable, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "self::LEAVES_ONLY") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #define arginfo_class_RecursiveIteratorIterator_rewind arginfo_class_EmptyIterator_current @@ -70,7 +70,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_RecursiveIteratorIterator_nextElement arginfo_class_EmptyIterator_current ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RecursiveIteratorIterator_setMaxDepth, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, max_depth, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, max_depth, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() #define arginfo_class_RecursiveIteratorIterator_getMaxDepth arginfo_class_EmptyIterator_current @@ -130,8 +130,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_LimitIterator___construct, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, iterator, Iterator, 0) - ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, count, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, count, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() #define arginfo_class_LimitIterator_rewind arginfo_class_EmptyIterator_current @@ -152,7 +152,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_CachingIterator___construct, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, iterator, Iterator, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "self::CALL_TOSTRING") ZEND_END_ARG_INFO() #define arginfo_class_CachingIterator_rewind arginfo_class_EmptyIterator_current @@ -242,9 +242,9 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RegexIterator___construct, 0, 0, 2) ZEND_ARG_OBJ_INFO(0, iterator, Iterator, 0) ZEND_ARG_TYPE_INFO(0, regex, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, preg_flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "self::MATCH") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, preg_flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #define arginfo_class_RegexIterator_accept arginfo_class_EmptyIterator_current @@ -270,9 +270,9 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RecursiveRegexIterator___construct, 0, 0, 2) ZEND_ARG_OBJ_INFO(0, iterator, RecursiveIterator, 0) ZEND_ARG_TYPE_INFO(0, regex, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, preg_flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "self::MATCH") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, preg_flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #define arginfo_class_RecursiveRegexIterator_accept arginfo_class_EmptyIterator_current @@ -283,9 +283,9 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RecursiveTreeIterator___construct, 0, 0, 1) ZEND_ARG_INFO(0, iterator) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, caching_it_flags, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "self::BYPASS_KEY") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, caching_it_flags, IS_LONG, 0, "CachingIterator::CATCH_GET_CHILD") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "self::SELF_FIRST") ZEND_END_ARG_INFO() #define arginfo_class_RecursiveTreeIterator_rewind arginfo_class_EmptyIterator_current diff --git a/ext/spl/spl_observer_arginfo.h b/ext/spl/spl_observer_arginfo.h index 5d6be3776d57b..a381c0dfbb47f 100644 --- a/ext/spl/spl_observer_arginfo.h +++ b/ext/spl/spl_observer_arginfo.h @@ -15,7 +15,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplObjectStorage_attach, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 0) - ZEND_ARG_INFO(0, info) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, info, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplObjectStorage_detach, 0, 0, 1) @@ -39,7 +39,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplObjectStorage_setInfo, 0, 0, 1) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplObjectStorage_count, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "COUNT_NORMAL") ZEND_END_ARG_INFO() #define arginfo_class_SplObjectStorage_rewind arginfo_class_SplSubject_notify @@ -66,7 +66,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplObjectStorage_offsetSet, 0, 0, 1) ZEND_ARG_INFO(0, object) - ZEND_ARG_INFO(0, info) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, info, "null") ZEND_END_ARG_INFO() #define arginfo_class_SplObjectStorage_offsetUnset arginfo_class_SplObjectStorage_offsetExists @@ -82,7 +82,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_SplObjectStorage___debugInfo arginfo_class_SplSubject_notify ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MultipleIterator___construct, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "MultipleIterator::MIT_NEED_ALL | MultipleIterator::MIT_KEYS_NUMERIC") ZEND_END_ARG_INFO() #define arginfo_class_MultipleIterator_getFlags arginfo_class_SplSubject_notify @@ -93,7 +93,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MultipleIterator_attachIterator, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, iterator, Iterator, 0) - ZEND_ARG_INFO(0, info) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, info, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MultipleIterator_detachIterator, 0, 0, 1) diff --git a/ext/spl/tests/bug71412.phpt b/ext/spl/tests/bug71412.phpt index ac4b0e701af45..8829aa64febd6 100644 --- a/ext/spl/tests/bug71412.phpt +++ b/ext/spl/tests/bug71412.phpt @@ -8,7 +8,7 @@ echo (new ReflectionMethod('ArrayIterator', '__construct')); Method [ public method __construct ] { - Parameters [2] { - Parameter #0 [ $array ] - Parameter #1 [ int $flags ] + Parameter #0 [ $array = [] ] + Parameter #1 [ int $flags = 0 ] } } diff --git a/ext/sqlite3/sqlite3_arginfo.h b/ext/sqlite3/sqlite3_arginfo.h index 9588d4623f45a..1656a6c0233c7 100644 --- a/ext/sqlite3/sqlite3_arginfo.h +++ b/ext/sqlite3/sqlite3_arginfo.h @@ -2,8 +2,8 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SQLite3___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, encryption_key, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encryption_key, IS_STRING, 0, "\'\'") ZEND_END_ARG_INFO() #define arginfo_class_SQLite3_open arginfo_class_SQLite3___construct @@ -36,8 +36,8 @@ ZEND_END_ARG_INFO() #if SQLITE_VERSION_NUMBER >= 3006011 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SQLite3_backup, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, destination_db, SQLite3, 0) - ZEND_ARG_TYPE_INFO(0, source_dbname, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, destination_dbname, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, source_dbname, IS_STRING, 0, "\"main\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, destination_dbname, IS_STRING, 0, "\"main\"") ZEND_END_ARG_INFO() #endif @@ -53,21 +53,21 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SQLite3_querySingle, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, entire_row, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, entire_row, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SQLite3_createFunction, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_INFO(0, callback) - ZEND_ARG_TYPE_INFO(0, argument_count, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, argument_count, IS_LONG, 0, "-1") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SQLite3_createAggregate, 0, 0, 3) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_INFO(0, step_callback) ZEND_ARG_INFO(0, final_callback) - ZEND_ARG_TYPE_INFO(0, argument_count, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, argument_count, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SQLite3_createCollation, 0, 0, 2) @@ -79,16 +79,16 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SQLite3_openBlob, 0, 0, 3) ZEND_ARG_TYPE_INFO(0, table, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, column, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, rowid, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, dbname, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dbname, IS_STRING, 0, "\"main\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "SQLITE3_OPEN_READONLY") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SQLite3_enableExceptions, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, enableExceptions, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enableExceptions, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SQLite3_enableExtendedResultCodes, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, enable, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enable, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SQLite3_setAuthorizer, 0, 0, 1) @@ -119,7 +119,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_SQLite3Stmt_execute arginfo_class_SQLite3_close ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SQLite3Stmt_getSQL, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, expanded, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, expanded, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #define arginfo_class_SQLite3Stmt_paramCount arginfo_class_SQLite3_close @@ -139,7 +139,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_SQLite3Result_columnType arginfo_class_SQLite3Result_columnName ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SQLite3Result_fetchArray, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "SQLITE3_BOTH") ZEND_END_ARG_INFO() #define arginfo_class_SQLite3Result_reset arginfo_class_SQLite3_close diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 7e0fbe84dcebe..575a998b68b5f 100755 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -9,9 +9,9 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_header_register_callback, 0, 1, ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ob_start, 0, 0, _IS_BOOL, 0) - ZEND_ARG_INFO(0, user_function) - ZEND_ARG_TYPE_INFO(0, chunk_size, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, user_function, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, chunk_size, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "PHP_OUTPUT_HANDLER_STDFLAGS") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ob_flush, 0, 0, _IS_BOOL, 0) @@ -40,11 +40,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ob_list_handlers, 0, 0, IS_ARRAY ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ob_get_status, 0, 0, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, full_status, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, full_status, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ob_implicit_flush, 0, 0, IS_VOID, 0) - ZEND_ARG_TYPE_INFO(0, flag, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flag, IS_LONG, 0, "1") ZEND_END_ARG_INFO() #define arginfo_output_reset_rewrite_vars arginfo_ob_flush @@ -57,7 +57,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_wrapper_register, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, protocol, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, classname, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #define arginfo_stream_register_wrapper arginfo_stream_wrapper_register @@ -75,14 +75,14 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_krsort, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(1, arg, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, sort_flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sort_flags, IS_LONG, 0, "SORT_REGULAR") ZEND_END_ARG_INFO() #define arginfo_ksort arginfo_krsort ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_count, 0, 1, IS_LONG, 0) ZEND_ARG_INFO(0, var) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "COUNT_NORMAL") ZEND_END_ARG_INFO() #define arginfo_sizeof arginfo_count @@ -111,7 +111,7 @@ ZEND_END_ARG_INFO() #define arginfo_uksort arginfo_usort ZEND_BEGIN_ARG_INFO_EX(arginfo_end, 0, 0, 1) - ZEND_ARG_TYPE_MASK(1, arg, MAY_BE_ARRAY|MAY_BE_OBJECT) + ZEND_ARG_TYPE_MASK(1, arg, MAY_BE_ARRAY|MAY_BE_OBJECT, NULL) ZEND_END_ARG_INFO() #define arginfo_prev arginfo_end @@ -121,13 +121,13 @@ ZEND_END_ARG_INFO() #define arginfo_reset arginfo_end ZEND_BEGIN_ARG_INFO_EX(arginfo_current, 0, 0, 1) - ZEND_ARG_TYPE_MASK(0, arg, MAY_BE_ARRAY|MAY_BE_OBJECT) + ZEND_ARG_TYPE_MASK(0, arg, MAY_BE_ARRAY|MAY_BE_OBJECT, NULL) ZEND_END_ARG_INFO() #define arginfo_pos arginfo_current ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_key, 0, 1, MAY_BE_LONG|MAY_BE_STRING|MAY_BE_NULL) - ZEND_ARG_TYPE_MASK(0, arg, MAY_BE_ARRAY|MAY_BE_OBJECT) + ZEND_ARG_TYPE_MASK(0, arg, MAY_BE_ARRAY|MAY_BE_OBJECT, NULL) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_min, 0, 0, 1) @@ -138,9 +138,9 @@ ZEND_END_ARG_INFO() #define arginfo_max arginfo_min ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_walk, 0, 2, _IS_BOOL, 0) - ZEND_ARG_TYPE_MASK(1, input, MAY_BE_ARRAY|MAY_BE_OBJECT) + ZEND_ARG_TYPE_MASK(1, input, MAY_BE_ARRAY|MAY_BE_OBJECT, NULL) ZEND_ARG_TYPE_INFO(0, funcname, IS_CALLABLE, 0) - ZEND_ARG_INFO(0, userdata) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, userdata, "null") ZEND_END_ARG_INFO() #define arginfo_array_walk_recursive arginfo_array_walk @@ -148,19 +148,19 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_in_array, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(0, needle) ZEND_ARG_TYPE_INFO(0, haystack, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, strict, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, strict, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_array_search, 0, 2, MAY_BE_LONG|MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, needle) ZEND_ARG_TYPE_INFO(0, haystack, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, strict, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, strict, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_extract, 0, 1, IS_LONG, 0) ZEND_ARG_TYPE_INFO(ZEND_SEND_PREFER_REF, arg, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, extract_type, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, prefix, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, extract_type, IS_LONG, 0, "EXTR_OVERWRITE") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, prefix, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_compact, 0, 1, IS_ARRAY, 0) @@ -182,7 +182,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_range, 0, 2, IS_ARRAY, 0) ZEND_ARG_INFO(0, low) ZEND_ARG_INFO(0, high) - ZEND_ARG_INFO(0, step) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, step, "1") ZEND_END_ARG_INFO() #define arginfo_shuffle arginfo_natsort @@ -201,15 +201,15 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_splice, 0, 2, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(1, arg, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 1) - ZEND_ARG_INFO(0, replacement) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, replacement, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_slice, 0, 2, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, arg, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 1) - ZEND_ARG_TYPE_INFO(0, preserve_keys, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, preserve_keys, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_merge, 0, 0, IS_ARRAY, 0) @@ -228,7 +228,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_keys, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, arg, IS_ARRAY, 0) ZEND_ARG_INFO(0, search_value) - ZEND_ARG_TYPE_INFO(0, strict, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, strict, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_array_key_first, 0, 1, MAY_BE_LONG|MAY_BE_STRING|MAY_BE_NULL) @@ -246,12 +246,12 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_column, 0, 2, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, arg, IS_ARRAY, 0) ZEND_ARG_INFO(0, column_key) - ZEND_ARG_INFO(0, index_key) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, index_key, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_reverse, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, input, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, preserve_keys, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, preserve_keys, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_pad, 0, 3, IS_ARRAY, 0) @@ -264,12 +264,12 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_change_key_case, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, input, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, case, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, case, IS_LONG, 0, "CASE_LOWER") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_unique, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, arg, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "SORT_STRING") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_intersect_key, 0, 2, IS_ARRAY, 0) @@ -314,14 +314,14 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_multisort, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arr1) - ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, sort_order) - ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, sort_flags) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(ZEND_SEND_PREFER_REF, sort_order, "SORT_ASC") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(ZEND_SEND_PREFER_REF, sort_flags, "SORT_REGULAR") ZEND_ARG_VARIADIC_INFO(ZEND_SEND_PREFER_REF, arr2) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_array_rand, 0, 1, MAY_BE_LONG|MAY_BE_STRING|MAY_BE_ARRAY) ZEND_ARG_TYPE_INFO(0, arg, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, num_req, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, num_req, IS_LONG, 0, "1") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_array_sum, 0, 1, MAY_BE_LONG|MAY_BE_DOUBLE) @@ -333,13 +333,13 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_array_reduce, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, arg, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0) - ZEND_ARG_INFO(0, initial) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, initial, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_filter, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, arg, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0) - ZEND_ARG_TYPE_INFO(0, use_keys, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_keys, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_map, 0, 2, IS_ARRAY, 0) @@ -358,7 +358,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_chunk, 0, 2, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, arg, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, preserve_keys, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, preserve_keys, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_combine, 0, 2, IS_ARRAY, 0) @@ -372,7 +372,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_base64_decode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, strict, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, strict, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_constant, 0, 0, 1) @@ -389,7 +389,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_getenv, 0, 0, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, variable, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, local_only, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, local_only, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #if defined(HAVE_PUTENV) @@ -400,8 +400,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_getopt, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, options, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, longopts, IS_ARRAY, 0) - ZEND_ARG_INFO(1, optind) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, longopts, IS_ARRAY, 0, "[]") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, optind, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_flush, 0, 0, IS_VOID, 0) @@ -437,7 +437,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_error_log, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, message_type, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, message_type, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO(0, destination, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, extra_headers, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -468,7 +468,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_highlight_file, 0, 1, MAY_BE_STRING|MAY_BE_BOOL|MAY_BE_NULL) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, return, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, return, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #define arginfo_show_source arginfo_highlight_file @@ -479,7 +479,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_highlight_string, 0, 1, MAY_BE_STRING|MAY_BE_BOOL|MAY_BE_NULL) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, return, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, return, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ini_get, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) @@ -487,8 +487,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ini_get, 0, 1, MAY_BE_STRING|MAY ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ini_get_all, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, extension, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, details, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, extension, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, details, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ini_set, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) @@ -510,7 +510,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_print_r, 0, 1, MAY_BE_STRING|MAY_BE_BOOL) ZEND_ARG_INFO(0, var) - ZEND_ARG_TYPE_INFO(0, return, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, return, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #define arginfo_connection_aborted arginfo_ob_get_level @@ -567,21 +567,21 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_parse_ini_file, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, process_sections, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, scanner_mode, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, process_sections, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, scanner_mode, IS_LONG, 0, "INI_SCANNER_NORMAL") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_parse_ini_string, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, ini_string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, process_sections, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, scanner_mode, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, process_sections, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, scanner_mode, IS_LONG, 0, "INI_SCANNER_NORMAL") ZEND_END_ARG_INFO() #if ZEND_DEBUG ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_config_get_hash, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, ini_string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, process_sections, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, scanner_mode, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, process_sections, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, scanner_mode, IS_LONG, 0, "INI_SCANNER_NORMAL") ZEND_END_ARG_INFO() #endif @@ -591,8 +591,8 @@ ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_get_browser, 0, 0, MAY_BE_OBJECT|MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, browser_name, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, return_array, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, browser_name, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, return_array, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_crc32, 0, 1, IS_LONG, 0) @@ -631,7 +631,7 @@ ZEND_END_ARG_INFO() #if defined(PHP_WIN32) || HAVE_DNS_SEARCH_FUNC ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dns_check_record, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, type, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_STRING, 0, "\"MX\"") ZEND_END_ARG_INFO() #endif @@ -642,10 +642,10 @@ ZEND_END_ARG_INFO() #if defined(PHP_WIN32) || HAVE_DNS_SEARCH_FUNC ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_dns_get_record, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) - ZEND_ARG_INFO(1, authns) - ZEND_ARG_INFO(1, addtl) - ZEND_ARG_TYPE_INFO(0, raw, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_LONG, 0, "DNS_ANY") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, authns, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, addtl, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, raw, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #endif @@ -653,7 +653,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dns_get_mx, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0) ZEND_ARG_INFO(1, mxhosts) - ZEND_ARG_INFO(1, weight) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, weight, "null") ZEND_END_ARG_INFO() #endif @@ -672,7 +672,7 @@ ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hrtime, 0, 0, MAY_BE_ARRAY|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, get_as_number, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, get_as_number, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_lcg_value, 0, 0, IS_DOUBLE, 0) @@ -680,12 +680,12 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_md5, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, raw_output, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, raw_output, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_md5_file, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, raw_output, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, raw_output, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #define arginfo_getmyuid arginfo_ob_get_length @@ -736,13 +736,13 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_metaphone, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, text, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, phones, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, phones, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_header, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, replace, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, http_response_code, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, replace, _IS_BOOL, 0, "true") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, http_response_code, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_header_remove, 0, 0, IS_VOID, 0) @@ -751,56 +751,56 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_setrawcookie, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) - ZEND_ARG_INFO(0, expires_or_options) - ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, secure, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, httponly, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_STRING, 0, "\'\'") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, expires_or_options, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, path, IS_STRING, 0, "\'\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, domain, IS_STRING, 0, "\'\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, secure, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, httponly, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #define arginfo_setcookie arginfo_setrawcookie ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_http_response_code, 0, 0, MAY_BE_LONG|MAY_BE_BOOL) - ZEND_ARG_TYPE_INFO(0, response_code, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, response_code, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_headers_sent, 0, 0, _IS_BOOL, 0) - ZEND_ARG_INFO(1, file) - ZEND_ARG_INFO(1, line) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, file, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, line, "null") ZEND_END_ARG_INFO() #define arginfo_headers_list arginfo_ob_list_handlers ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_htmlspecialchars, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, quote_style, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, double_encode, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, quote_style, IS_LONG, 0, "ENT_COMPAT") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, double_encode, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_htmlspecialchars_decode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, quote_style, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, quote_style, IS_LONG, 0, "ENT_COMPAT") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_html_entity_decode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, quote_style, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, quote_style, IS_LONG, 0, "ENT_COMPAT") ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) ZEND_END_ARG_INFO() #define arginfo_htmlentities arginfo_htmlspecialchars ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_get_html_translation_table, 0, 0, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, table, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, quote_style, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, table, IS_LONG, 0, "HTML_SPECIALCHARS") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, quote_style, IS_LONG, 0, "ENT_COMPAT") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 0, "\"UTF-8\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_assert, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, assertion) - ZEND_ARG_INFO(0, description) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, description, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_assert_options, 0, 1, MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_LONG|MAY_BE_STRING|MAY_BE_BOOL|MAY_BE_NULL) @@ -819,7 +819,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strspn, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, mask, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, start, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO(0, len, IS_LONG, 0) ZEND_END_ARG_INFO() @@ -838,7 +838,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_trim, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, character_mask, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, character_mask, IS_STRING, 0, "\" \\n\\r\\t\\v\\0\"") ZEND_END_ARG_INFO() #define arginfo_rtrim arginfo_trim @@ -849,19 +849,19 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_wordwrap, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, width, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, break, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, cut, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, width, IS_LONG, 0, "75") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, break, IS_STRING, 0, "\"\\n\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cut, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_explode, 0, 2, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, separator, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, limit, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, limit, IS_LONG, 0, "PHP_INT_MAX") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_implode, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_MASK(0, glue, MAY_BE_STRING|MAY_BE_ARRAY) + ZEND_ARG_TYPE_MASK(0, glue, MAY_BE_STRING|MAY_BE_ARRAY, NULL) ZEND_ARG_TYPE_INFO(0, pieces, IS_ARRAY, 0) ZEND_END_ARG_INFO() @@ -878,12 +878,12 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_basename, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, suffix, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, suffix, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dirname, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, levels, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, levels, IS_LONG, 0, "1") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pathinfo, 0, 1, MAY_BE_ARRAY|MAY_BE_STRING) @@ -894,7 +894,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stristr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, before_needle, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, before_needle, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #define arginfo_strstr arginfo_stristr @@ -904,7 +904,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strpos, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #define arginfo_stripos arginfo_strpos @@ -925,19 +925,19 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_chunk_split, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, chunklen, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, ending, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, chunklen, IS_LONG, 0, "76") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ending, IS_STRING, 0, "\"\\r\\n\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr_replace, 0, 3, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_TYPE_MASK(0, str, MAY_BE_STRING|MAY_BE_ARRAY) - ZEND_ARG_TYPE_MASK(0, replace, MAY_BE_STRING|MAY_BE_ARRAY) + ZEND_ARG_TYPE_MASK(0, str, MAY_BE_STRING|MAY_BE_ARRAY, NULL) + ZEND_ARG_TYPE_MASK(0, replace, MAY_BE_STRING|MAY_BE_ARRAY, NULL) ZEND_ARG_INFO(0, start) ZEND_ARG_INFO(0, length) ZEND_END_ARG_INFO() @@ -958,12 +958,12 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ucwords, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, delimiters, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, delimiters, IS_STRING, 0, "\" \\t\\r\\n\\f\\v\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_strtr, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_MASK(0, from, MAY_BE_STRING|MAY_BE_ARRAY) + ZEND_ARG_TYPE_MASK(0, from, MAY_BE_STRING|MAY_BE_ARRAY, NULL) ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -972,7 +972,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_similar_text, 0, 2, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, str1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, str2, IS_STRING, 0) - ZEND_ARG_INFO(1, percent) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, percent, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_addcslashes, 0, 2, IS_STRING, 0) @@ -989,7 +989,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_str_replace, 0, 3, MAY_BE_STRING|MAY_BE_ARRAY) ZEND_ARG_INFO(0, search) ZEND_ARG_INFO(0, replace) - ZEND_ARG_TYPE_MASK(0, subject, MAY_BE_STRING|MAY_BE_ARRAY) + ZEND_ARG_TYPE_MASK(0, subject, MAY_BE_STRING|MAY_BE_ARRAY, NULL) ZEND_ARG_INFO(1, replace_count) ZEND_END_ARG_INFO() @@ -997,12 +997,12 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hebrev, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, max_chars_per_line, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, max_chars_per_line, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_nl2br, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, is_xhtml, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, is_xhtml, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_strip_tags, 0, 1, IS_STRING, 0) @@ -1023,9 +1023,9 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_str_getcsv, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, delimiter, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, enclosure, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, escape, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, delimiter, IS_STRING, 0, "\',\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enclosure, IS_STRING, 0, "\'\"\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, escape, IS_STRING, 0, "\'\\\\\'") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_str_repeat, 0, 2, IS_STRING, 0) @@ -1035,7 +1035,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_count_chars, 0, 1, MAY_BE_ARRAY|MAY_BE_STRING) ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_strnatcmp, 0, 2, IS_LONG, 0) @@ -1050,15 +1050,15 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr_count, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_str_pad, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, pad_length, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, pad_string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, pad_type, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pad_string, IS_STRING, 0, "\" \"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pad_type, IS_LONG, 0, "STR_PAD_RIGHT") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sscanf, 0, 2, MAY_BE_ARRAY|MAY_BE_LONG|MAY_BE_NULL) @@ -1073,13 +1073,13 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_str_word_count, 0, 1, MAY_BE_ARRAY|MAY_BE_LONG) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, format, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, format, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO(0, charlist, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_str_split, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, split_length, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, split_length, IS_LONG, 0, "1") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strpbrk, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) @@ -1091,8 +1091,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr_compare, 0, 3, MAY_BE_LON ZEND_ARG_TYPE_INFO(0, main_str, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 1) - ZEND_ARG_TYPE_INFO(0, case_insensitivity, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, case_insensitivity, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #define arginfo_utf8_encode arginfo_bin2hex @@ -1135,31 +1135,31 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_scandir, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, sorting_order, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sorting_order, IS_LONG, 0, "0") ZEND_ARG_INFO(0, context) ZEND_END_ARG_INFO() #if defined(HAVE_GLOB) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_glob, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_exec, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, command, IS_STRING, 0) - ZEND_ARG_INFO(1, output) - ZEND_ARG_INFO(1, result_code) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, output, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, result_code, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_system, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, command, IS_STRING, 0) - ZEND_ARG_INFO(1, result_code) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, result_code, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_passthru, 0, 1, _IS_BOOL, 1) ZEND_ARG_TYPE_INFO(0, command, IS_STRING, 0) - ZEND_ARG_INFO(1, result_code) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, result_code, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_escapeshellcmd, 0, 1, IS_STRING, 0) @@ -1183,12 +1183,12 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_flock, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(0, handle) ZEND_ARG_TYPE_INFO(0, operation, IS_LONG, 0) - ZEND_ARG_INFO(1, wouldblock) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, wouldblock, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_get_meta_tags, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, use_include_path, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_include_path, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pclose, 0, 1, IS_LONG, 0) @@ -1202,8 +1202,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_readfile, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, use_include_path, _IS_BOOL, 0) - ZEND_ARG_INFO(0, context) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_include_path, _IS_BOOL, 0, "false") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_rewind, 0, 1, _IS_BOOL, 0) @@ -1212,7 +1212,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_rmdir, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, dirname, IS_STRING, 0) - ZEND_ARG_INFO(0, context) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_umask, 0, 0, IS_LONG, 0) @@ -1229,7 +1229,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_fgets, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, handle) - ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "1024") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_fread, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) @@ -1240,8 +1240,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_fopen, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, mode, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, use_include_path, _IS_BOOL, 0) - ZEND_ARG_INFO(0, context) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_include_path, _IS_BOOL, 0, "false") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_fscanf, 0, 2, MAY_BE_ARRAY|MAY_BE_LONG|MAY_BE_FALSE|MAY_BE_NULL) @@ -1264,7 +1264,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_fseek, 0, 2, IS_LONG, 0) ZEND_ARG_INFO(0, handle) ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, whence, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, whence, IS_LONG, 0, "SEEK_SET") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ftell, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) @@ -1283,21 +1283,21 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mkdir, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, pathname, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, recursive, _IS_BOOL, 0) - ZEND_ARG_INFO(0, context) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "0777") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, recursive, _IS_BOOL, 0, "false") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_rename, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, oldname, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, newname, IS_STRING, 0) - ZEND_ARG_INFO(0, context) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_copy, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, dest, IS_STRING, 0) - ZEND_ARG_INFO(0, context) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_tempnam, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) @@ -1310,44 +1310,44 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_file, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) - ZEND_ARG_INFO(0, context) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_file_get_contents, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, use_include_path, _IS_BOOL, 0) - ZEND_ARG_INFO(0, context) - ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_include_path, _IS_BOOL, 0, "false") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "0") ZEND_ARG_INFO(0, maxlen) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_unlink, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_INFO(0, context) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_file_put_contents, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) ZEND_ARG_INFO(0, content) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) - ZEND_ARG_INFO(0, context) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_fputcsv, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_INFO(0, handle) ZEND_ARG_TYPE_INFO(0, fields, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, delimiter, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, enclosure, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, escape, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, delimiter, IS_STRING, 0, "\",\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enclosure, IS_STRING, 0, "\"\\\"\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, escape, IS_STRING, 0, "\"\\\\\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_fgetcsv, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_INFO(0, handle) ZEND_ARG_INFO(0, length) - ZEND_ARG_TYPE_INFO(0, delimiter, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, enclosure, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, escape, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, delimiter, IS_STRING, 0, "\",\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enclosure, IS_STRING, 0, "\'\"\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, escape, IS_STRING, 0, "\"\\\\\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_realpath, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) @@ -1358,7 +1358,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_fnmatch, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #endif @@ -1442,14 +1442,14 @@ ZEND_END_ARG_INFO() #if HAVE_UTIME ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_touch, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, time, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, atime, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, time, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, atime, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_clearstatcache, 0, 0, IS_VOID, 0) - ZEND_ARG_TYPE_INFO(0, clear_realpath_cache, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, clear_realpath_cache, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, filename, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_disk_total_space, 0, 1, MAY_BE_DOUBLE|MAY_BE_FALSE) @@ -1498,19 +1498,19 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_fsockopen, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, port, IS_LONG, 0) - ZEND_ARG_INFO(1, errno) - ZEND_ARG_INFO(1, errstr) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "-1") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, errno, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, errstr, "null") ZEND_ARG_TYPE_INFO(0, timeout, IS_DOUBLE, 0) ZEND_END_ARG_INFO() #define arginfo_pfsockopen arginfo_fsockopen ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_http_build_query, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_MASK(0, data, MAY_BE_ARRAY|MAY_BE_OBJECT) - ZEND_ARG_TYPE_INFO(0, numeric_prefix, IS_STRING, 0) + ZEND_ARG_TYPE_MASK(0, data, MAY_BE_ARRAY|MAY_BE_OBJECT, NULL) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, numeric_prefix, IS_STRING, 0, "\"\"") ZEND_ARG_INFO(0, arg_separator) - ZEND_ARG_TYPE_INFO(0, enc_type, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enc_type, IS_LONG, 0, "PHP_QUERY_RFC1738") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_image_type_to_mime_type, 0, 1, IS_STRING, 0) @@ -1523,16 +1523,16 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_getimagesize, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, image_path, IS_STRING, 0) - ZEND_ARG_INFO(1, image_info) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, image_info, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_getimagesizefromstring, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, image, IS_STRING, 0) - ZEND_ARG_INFO(1, image_info) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, image_info, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phpinfo, 0, 0, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, what, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, what, IS_LONG, 0, "INFO_ALL") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_phpversion, 0, 0, MAY_BE_STRING|MAY_BE_FALSE) @@ -1540,13 +1540,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_phpversion, 0, 0, MAY_BE_STRING| ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phpcredits, 0, 0, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, flag, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flag, IS_LONG, 0, "CREDITS_ALL") ZEND_END_ARG_INFO() #define arginfo_php_sapi_name arginfo_ob_get_flush ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_php_uname, 0, 0, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_STRING, 0, "\"a\"") ZEND_END_ARG_INFO() #define arginfo_php_ini_scanned_files arginfo_ob_get_flush @@ -1556,7 +1556,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iptcembed, 0, 2, MAY_BE_STRING|MAY_BE_BOOL) ZEND_ARG_TYPE_INFO(0, iptcdata, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, jpeg_file_name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, spool, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, spool, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iptcparse, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) @@ -1598,24 +1598,24 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mail, 0, 3, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, subject, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) - ZEND_ARG_TYPE_MASK(0, additional_headers, MAY_BE_STRING|MAY_BE_ARRAY) - ZEND_ARG_TYPE_INFO(0, additional_parameters, IS_STRING, 0) + ZEND_ARG_TYPE_MASK(0, additional_headers, MAY_BE_STRING|MAY_BE_ARRAY, NULL) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, additional_parameters, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_abs, 0, 1, MAY_BE_LONG|MAY_BE_DOUBLE) - ZEND_ARG_TYPE_MASK(0, number, MAY_BE_LONG|MAY_BE_DOUBLE) + ZEND_ARG_TYPE_MASK(0, number, MAY_BE_LONG|MAY_BE_DOUBLE, NULL) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ceil, 0, 1, IS_DOUBLE, 0) - ZEND_ARG_TYPE_MASK(0, number, MAY_BE_LONG|MAY_BE_DOUBLE) + ZEND_ARG_TYPE_MASK(0, number, MAY_BE_LONG|MAY_BE_DOUBLE, NULL) ZEND_END_ARG_INFO() #define arginfo_floor arginfo_ceil ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_round, 0, 1, IS_DOUBLE, 0) - ZEND_ARG_TYPE_MASK(0, number, MAY_BE_LONG|MAY_BE_DOUBLE) - ZEND_ARG_TYPE_INFO(0, precision, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) + ZEND_ARG_TYPE_MASK(0, number, MAY_BE_LONG|MAY_BE_DOUBLE, NULL) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, precision, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PHP_ROUND_HALF_UP") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sin, 0, 1, IS_DOUBLE, 0) @@ -1677,7 +1677,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_log, 0, 1, IS_DOUBLE, 0) ZEND_ARG_TYPE_INFO(0, number, IS_DOUBLE, 0) - ZEND_ARG_TYPE_INFO(0, base, IS_DOUBLE, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, base, IS_DOUBLE, 0, "M_E") ZEND_END_ARG_INFO() #define arginfo_log10 arginfo_sin @@ -1721,9 +1721,9 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_number_format, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, number, IS_DOUBLE, 0) - ZEND_ARG_TYPE_INFO(0, decimals, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, decimal_point, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, thousands_separator, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, decimals, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, decimal_point, IS_STRING, 1, "\".\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, thousands_separator, IS_STRING, 1, "\",\"") ZEND_END_ARG_INFO() #define arginfo_fmod arginfo_hypot @@ -1735,19 +1735,19 @@ ZEND_END_ARG_INFO() #if defined(HAVE_GETTIMEOFDAY) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_microtime, 0, 0, MAY_BE_STRING|MAY_BE_DOUBLE) - ZEND_ARG_TYPE_INFO(0, get_as_float, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, get_as_float, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #endif #if defined(HAVE_GETTIMEOFDAY) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gettimeofday, 0, 0, MAY_BE_ARRAY|MAY_BE_DOUBLE) - ZEND_ARG_TYPE_INFO(0, return_float, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, return_float, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #endif #if defined(HAVE_GETRUSAGE) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_getrusage, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, who, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, who, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #endif @@ -1759,7 +1759,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_unpack, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_password_get_info, 0, 1, IS_ARRAY, 1) @@ -1769,13 +1769,13 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_password_hash, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0) ZEND_ARG_INFO(0, algo) - ZEND_ARG_TYPE_INFO(0, options, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_password_needs_rehash, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, hash, IS_STRING, 0) ZEND_ARG_INFO(0, algo) - ZEND_ARG_TYPE_INFO(0, options, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_password_verify, 0, 2, _IS_BOOL, 0) @@ -1790,9 +1790,9 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_proc_open, 0, 0, 3) ZEND_ARG_INFO(0, cmd) ZEND_ARG_TYPE_INFO(0, descriptorspec, IS_ARRAY, 0) ZEND_ARG_INFO(1, pipes) - ZEND_ARG_TYPE_INFO(0, cwd, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, env, IS_ARRAY, 1) - ZEND_ARG_TYPE_INFO(0, other_options, IS_ARRAY, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cwd, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, env, IS_ARRAY, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, other_options, IS_ARRAY, 1, "null") ZEND_END_ARG_INFO() #endif @@ -1805,7 +1805,7 @@ ZEND_END_ARG_INFO() #if defined(PHP_CAN_SUPPORT_PROC_OPEN) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_proc_terminate, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, process) - ZEND_ARG_TYPE_INFO(0, signal, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, signal, IS_LONG, 0, "SIGTERM") ZEND_END_ARG_INFO() #endif @@ -1820,15 +1820,15 @@ ZEND_END_ARG_INFO() #define arginfo_quoted_printable_encode arginfo_base64_encode ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mt_srand, 0, 0, IS_VOID, 0) - ZEND_ARG_TYPE_INFO(0, seed, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, seed, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "MT_RAND_MT19937") ZEND_END_ARG_INFO() #define arginfo_srand arginfo_mt_srand ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_rand, 0, 0, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, min, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, max, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, min, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, max, IS_LONG, 0, "PHP_INT_MAX") ZEND_END_ARG_INFO() #define arginfo_mt_rand arginfo_rand @@ -1855,12 +1855,12 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_select, 0, 4, MAY_BE_LONG ZEND_ARG_TYPE_INFO(1, write, IS_ARRAY, 1) ZEND_ARG_TYPE_INFO(1, except, IS_ARRAY, 1) ZEND_ARG_TYPE_INFO(0, tv_sec, IS_LONG, 1) - ZEND_ARG_TYPE_INFO(0, tv_usec, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, tv_usec, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_context_create, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_ARRAY, 1) - ZEND_ARG_TYPE_INFO(0, params, IS_ARRAY, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_context_set_params, 0, 2, _IS_BOOL, 0) @@ -1894,7 +1894,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_filter_prepend, 0, 0, 2) ZEND_ARG_INFO(0, stream) ZEND_ARG_TYPE_INFO(0, filtername, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, read_write, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, read_write, IS_LONG, 0, "0") ZEND_ARG_INFO(0, params) ZEND_END_ARG_INFO() @@ -1906,25 +1906,25 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_client, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, remote_socket, IS_STRING, 0) - ZEND_ARG_INFO(1, errno) - ZEND_ARG_INFO(1, errstr) - ZEND_ARG_TYPE_INFO(0, timeout, IS_DOUBLE, 0) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, errno, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, errstr, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timeout, IS_DOUBLE, 0, "STREAM_CLIENT_CONNECT") ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) - ZEND_ARG_INFO(0, context) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_server, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, local_socket, IS_STRING, 0) - ZEND_ARG_INFO(1, errno) - ZEND_ARG_INFO(1, errstr) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) - ZEND_ARG_INFO(0, context) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, errno, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, errstr, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "STREAM_SERVER_BIND | STREAM_SERVER_LISTEN") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_accept, 0, 0, 1) ZEND_ARG_INFO(0, server_socket) ZEND_ARG_TYPE_INFO(0, timeout, IS_DOUBLE, 0) - ZEND_ARG_INFO(1, peername) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, peername, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_socket_get_name, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) @@ -1935,22 +1935,22 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_socket_recvfrom, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, socket) ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) - ZEND_ARG_INFO(1, address) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, address, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_socket_sendto, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_INFO(0, socket) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, address, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, address, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_socket_enable_crypto, 0, 2, MAY_BE_LONG|MAY_BE_BOOL) ZEND_ARG_INFO(0, stream) ZEND_ARG_TYPE_INFO(0, enable, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, crypto_type, IS_LONG, 1) - ZEND_ARG_INFO(0, session_stream) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, crypto_type, IS_LONG, 1, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, session_stream, "null") ZEND_END_ARG_INFO() #if defined(HAVE_SHUTDOWN) @@ -1972,13 +1972,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_copy_to_stream, 0, 2, MAY ZEND_ARG_INFO(0, source) ZEND_ARG_INFO(0, dest) ZEND_ARG_TYPE_INFO(0, maxlength, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, position, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, position, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_get_contents, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, handle) ZEND_ARG_TYPE_INFO(0, maxlength, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, position, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, position, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_supports_lock, 0, 1, _IS_BOOL, 0) @@ -2010,7 +2010,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_get_line, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, handle) ZEND_ARG_TYPE_INFO(0, max_length, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, ending, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ending, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() #define arginfo_stream_resolve_include_path arginfo_filetype @@ -2039,7 +2039,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_set_timeout, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(0, socket) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, microseconds, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, microseconds, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #endif @@ -2058,7 +2058,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intval, 0, 1, IS_LONG, 0) ZEND_ARG_INFO(0, value) - ZEND_ARG_TYPE_INFO(0, base, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, base, IS_LONG, 0, "10") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_floatval, 0, 1, IS_DOUBLE, 0) @@ -2105,8 +2105,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_is_callable, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, value) - ZEND_ARG_TYPE_INFO(0, syntax_only, _IS_BOOL, 0) - ZEND_ARG_INFO(1, callable_name) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, syntax_only, _IS_BOOL, 0, "false") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, callable_name, "null") ZEND_END_ARG_INFO() #define arginfo_is_iterable arginfo_boolval @@ -2115,14 +2115,14 @@ ZEND_END_ARG_INFO() #if defined(HAVE_GETTIMEOFDAY) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_uniqid, 0, 0, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, prefix, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, more_entropy, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, prefix, IS_STRING, 0, "\"\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, more_entropy, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_INFO_EX(arginfo_parse_url, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, url, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, component, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, component, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_urlencode, 0, 1, IS_STRING, 0) @@ -2137,8 +2137,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_get_headers, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, url, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, format, IS_LONG, 0) - ZEND_ARG_INFO(0, context) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, format, IS_LONG, 0, "0") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_bucket_make_writeable, 0, 1, IS_OBJECT, 1) @@ -2175,7 +2175,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_var_export, 0, 1, IS_STRING, 1) ZEND_ARG_INFO(0, value) - ZEND_ARG_TYPE_INFO(0, return, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, return, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #define arginfo_debug_zval_dump arginfo_var_dump @@ -2184,11 +2184,11 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_unserialize, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_memory_get_usage, 0, 0, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, real_usage, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, real_usage, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #define arginfo_memory_get_peak_usage arginfo_memory_get_usage @@ -2227,14 +2227,14 @@ ZEND_END_ARG_INFO() #if defined(PHP_WIN32) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sapi_windows_set_ctrl_handler, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, handler) - ZEND_ARG_TYPE_INFO(0, add, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, add, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() #endif #if defined(PHP_WIN32) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sapi_windows_generate_ctrl_event, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, event, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, pid, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pid, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #endif diff --git a/ext/standard/tests/directory/DirectoryClass_basic_001.phpt b/ext/standard/tests/directory/DirectoryClass_basic_001.phpt index 5594207812510..d68f4d1bf5860 100644 --- a/ext/standard/tests/directory/DirectoryClass_basic_001.phpt +++ b/ext/standard/tests/directory/DirectoryClass_basic_001.phpt @@ -43,21 +43,21 @@ Class [ class Directory ] { Method [ public method close ] { - Parameters [1] { - Parameter #0 [ $dir_handle ] + Parameter #0 [ $dir_handle = ] } } Method [ public method rewind ] { - Parameters [1] { - Parameter #0 [ $dir_handle ] + Parameter #0 [ $dir_handle = ] } } Method [ public method read ] { - Parameters [1] { - Parameter #0 [ $dir_handle ] + Parameter #0 [ $dir_handle = ] } } } diff --git a/ext/standard/tests/strings/bug61116.phpt b/ext/standard/tests/strings/bug61116.phpt index a21ac519b5037..d03489560b231 100644 --- a/ext/standard/tests/strings/bug61116.phpt +++ b/ext/standard/tests/strings/bug61116.phpt @@ -10,9 +10,9 @@ Function [ function htmlspecialchars ] { - Parameters [4] { Parameter #0 [ string $string ] - Parameter #1 [ int $quote_style ] - Parameter #2 [ ?string $encoding ] - Parameter #3 [ bool $double_encode ] + Parameter #1 [ int $quote_style = ENT_COMPAT ] + Parameter #2 [ ?string $encoding = null ] + Parameter #3 [ bool $double_encode = true ] } - Return [ string ] } @@ -20,9 +20,9 @@ Function [ function htmlspecialchars ] { Function [ function get_html_translation_table ] { - Parameters [3] { - Parameter #0 [ int $table ] - Parameter #1 [ int $quote_style ] - Parameter #2 [ string $encoding ] + Parameter #0 [ int $table = HTML_SPECIALCHARS ] + Parameter #1 [ int $quote_style = ENT_COMPAT ] + Parameter #2 [ string $encoding = "UTF-8" ] } - Return [ array ] } diff --git a/ext/sysvmsg/sysvmsg_arginfo.h b/ext/sysvmsg/sysvmsg_arginfo.h index f68031ad3be37..88ec5af6b8f92 100644 --- a/ext/sysvmsg/sysvmsg_arginfo.h +++ b/ext/sysvmsg/sysvmsg_arginfo.h @@ -2,16 +2,16 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_msg_get_queue, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, key, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, perms, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, perms, IS_LONG, 0, "0666") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_msg_send, 0, 3, _IS_BOOL, 0) ZEND_ARG_INFO(0, queue) ZEND_ARG_TYPE_INFO(0, msgtype, IS_LONG, 0) ZEND_ARG_INFO(0, message) - ZEND_ARG_TYPE_INFO(0, serialize, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, blocking, _IS_BOOL, 0) - ZEND_ARG_INFO(1, errorcode) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, serialize, _IS_BOOL, 0, "true") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, blocking, _IS_BOOL, 0, "true") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, errorcode, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_msg_receive, 0, 5, _IS_BOOL, 0) @@ -20,9 +20,9 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_msg_receive, 0, 5, _IS_BOOL, 0) ZEND_ARG_INFO(1, msgtype) ZEND_ARG_TYPE_INFO(0, maxsize, IS_LONG, 0) ZEND_ARG_INFO(1, message) - ZEND_ARG_TYPE_INFO(0, unserialize, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) - ZEND_ARG_INFO(1, errorcode) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, unserialize, _IS_BOOL, 0, "true") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, errorcode, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_msg_remove_queue, 0, 1, _IS_BOOL, 0) diff --git a/ext/sysvsem/sysvsem_arginfo.h b/ext/sysvsem/sysvsem_arginfo.h index 74192a07038d3..2edb26534fc68 100644 --- a/ext/sysvsem/sysvsem_arginfo.h +++ b/ext/sysvsem/sysvsem_arginfo.h @@ -2,14 +2,14 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_sem_get, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, key, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, max_acquire, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, perm, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, auto_release, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, max_acquire, IS_LONG, 0, "1") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, perm, IS_LONG, 0, "0666") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, auto_release, IS_LONG, 0, "1") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sem_acquire, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, sem_identifier) - ZEND_ARG_TYPE_INFO(0, nowait, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, nowait, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sem_release, 0, 1, _IS_BOOL, 0) diff --git a/ext/sysvshm/sysvshm_arginfo.h b/ext/sysvshm/sysvshm_arginfo.h index 42f13e65002a4..408237ced1222 100644 --- a/ext/sysvshm/sysvshm_arginfo.h +++ b/ext/sysvshm/sysvshm_arginfo.h @@ -3,7 +3,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_shm_attach, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, key, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, memsize, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, perm, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, perm, IS_LONG, 0, "0666") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_shm_detach, 0, 1, _IS_BOOL, 0) diff --git a/ext/tidy/tidy_arginfo.h b/ext/tidy/tidy_arginfo.h index 7c2d8148d5e64..afda4844315ff 100644 --- a/ext/tidy/tidy_arginfo.h +++ b/ext/tidy/tidy_arginfo.h @@ -18,7 +18,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_tidy_parse_file, 0, 1, tidy, ZEND_ARG_TYPE_INFO(0, file, IS_STRING, 0) ZEND_ARG_INFO(0, config_options) ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, use_include_path, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_include_path, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_tidy_clean_repair, 0, 1, _IS_BOOL, 0) @@ -35,7 +35,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_tidy_repair_file, 0, 1, MAY_BE_S ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) ZEND_ARG_INFO(0, config_options) ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, use_include_path, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_include_path, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #define arginfo_tidy_diagnose arginfo_tidy_clean_repair @@ -93,7 +93,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_tidy___construct, 0, 0, 0) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) ZEND_ARG_INFO(0, config_options) ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, use_include_path, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_include_path, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_tidy_getOpt, 0, 0, 1) @@ -107,7 +107,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_tidy_parseFile, 0, 1, _IS_ ZEND_ARG_TYPE_INFO(0, file, IS_STRING, 0) ZEND_ARG_INFO(0, config_options) ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, use_include_path, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_include_path, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_tidy_parseString, 0, 1, _IS_BOOL, 0) @@ -126,7 +126,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_tidy_repairFile, 0, 1, _IS ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) ZEND_ARG_INFO(0, config_options) ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, use_include_path, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_include_path, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #define arginfo_class_tidy_diagnose arginfo_class_tidy_cleanRepair diff --git a/ext/tokenizer/tokenizer_arginfo.h b/ext/tokenizer/tokenizer_arginfo.h index d927c8d0e610e..29245a50914af 100644 --- a/ext/tokenizer/tokenizer_arginfo.h +++ b/ext/tokenizer/tokenizer_arginfo.h @@ -2,7 +2,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_token_get_all, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_token_name, 0, 1, IS_STRING, 0) @@ -11,14 +11,14 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_PhpToken_getAll, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, code, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PhpToken___construct, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, id, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, text, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, line, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, pos, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, line, IS_LONG, 0, "-1") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pos, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_PhpToken_is, 0, 1, _IS_BOOL, 0) diff --git a/ext/xml/xml_arginfo.h b/ext/xml/xml_arginfo.h index 67efcded894f1..ecd295b55f94f 100644 --- a/ext/xml/xml_arginfo.h +++ b/ext/xml/xml_arginfo.h @@ -6,7 +6,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_xml_parser_create_ns, 0, 0, XmlParser, MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, sep, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sep, IS_STRING, 0, "\':\'") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xml_set_object, 0, 2, _IS_BOOL, 0) @@ -42,7 +42,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xml_parse, 0, 2, IS_LONG, 0) ZEND_ARG_OBJ_INFO(0, parser, XmlParser, 0) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, isfinal, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, isfinal, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xml_parse_into_struct, 0, 3, IS_LONG, 0) diff --git a/ext/xmlreader/xmlreader_arginfo.h b/ext/xmlreader/xmlreader_arginfo.h index 2c93edeee68b1..39d84763f2306 100644 --- a/ext/xmlreader/xmlreader_arginfo.h +++ b/ext/xmlreader/xmlreader_arginfo.h @@ -46,8 +46,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_open, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, URI, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #define arginfo_class_XMLReader_readInnerXml arginfo_class_XMLReader_close @@ -73,10 +73,10 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_XML, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_expand, 0, 0, 0) - ZEND_ARG_OBJ_INFO(0, basenode, DOMNode, 1) + ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, basenode, DOMNode, 1, "null") ZEND_END_ARG_INFO() diff --git a/ext/xmlrpc/xmlrpc_arginfo.h b/ext/xmlrpc/xmlrpc_arginfo.h index d250c721d50b6..2abf0d5fa1e0d 100644 --- a/ext/xmlrpc/xmlrpc_arginfo.h +++ b/ext/xmlrpc/xmlrpc_arginfo.h @@ -6,13 +6,13 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_xmlrpc_decode, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, xml, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 0, "\"iso-8859-1\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_xmlrpc_decode_request, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, xml, IS_STRING, 0) ZEND_ARG_INFO(1, method) - ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 0, "\"iso-8859-1\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xmlrpc_encode_request, 0, 2, IS_STRING, 1) diff --git a/ext/xmlwriter/xmlwriter_arginfo.h b/ext/xmlwriter/xmlwriter_arginfo.h index e759a32e1044a..94a621750eb17 100644 --- a/ext/xmlwriter/xmlwriter_arginfo.h +++ b/ext/xmlwriter/xmlwriter_arginfo.h @@ -67,7 +67,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xmlwriter_write_element, 0, 2, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, xmlwriter, XMLWriter, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, content, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xmlwriter_write_element_ns, 0, 4, _IS_BOOL, 0) @@ -75,7 +75,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xmlwriter_write_element_ns, 0, 4 ZEND_ARG_TYPE_INFO(0, prefix, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, content, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xmlwriter_start_pi, 0, 2, _IS_BOOL, 0) @@ -106,9 +106,9 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xmlwriter_start_document, 0, 1, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, xmlwriter, XMLWriter, 0) - ZEND_ARG_TYPE_INFO(0, version, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, standalone, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, version, IS_STRING, 1, "\'1.0\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, standalone, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #define arginfo_xmlwriter_end_document arginfo_xmlwriter_start_comment @@ -118,8 +118,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xmlwriter_start_dtd, 0, 2, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, xmlwriter, XMLWriter, 0) ZEND_ARG_TYPE_INFO(0, qualifiedName, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, publicId, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, systemId, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, publicId, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, systemId, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #define arginfo_xmlwriter_end_dtd arginfo_xmlwriter_start_comment @@ -127,9 +127,9 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xmlwriter_write_dtd, 0, 2, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, xmlwriter, XMLWriter, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, publicId, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, systemId, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, subset, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, publicId, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, systemId, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, subset, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xmlwriter_start_dtd_element, 0, 2, _IS_BOOL, 0) @@ -163,7 +163,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xmlwriter_write_dtd_entity, 0, 3 ZEND_ARG_OBJ_INFO(0, xmlwriter, XMLWriter, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, isparam, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, isparam, _IS_BOOL, 0, "false") ZEND_ARG_TYPE_INFO(0, publicId, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, systemId, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, ndataid, IS_STRING, 0) @@ -171,12 +171,12 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xmlwriter_output_memory, 0, 1, IS_STRING, 0) ZEND_ARG_OBJ_INFO(0, xmlwriter, XMLWriter, 0) - ZEND_ARG_TYPE_INFO(0, flush, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flush, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_xmlwriter_flush, 0, 1, MAY_BE_STRING|MAY_BE_LONG) ZEND_ARG_OBJ_INFO(0, xmlwriter, XMLWriter, 0) - ZEND_ARG_TYPE_INFO(0, empty, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, empty, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_openUri, 0, 1, _IS_BOOL, 0) @@ -236,14 +236,14 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_writeElement, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, content, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_writeElementNs, 0, 3, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, prefix, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, content, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_startPi, 0, 1, _IS_BOOL, 0) @@ -270,9 +270,9 @@ ZEND_END_ARG_INFO() #define arginfo_class_XMLWriter_writeRaw arginfo_class_XMLWriter_writeCdata ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_startDocument, 0, 0, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, version, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, standalone, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, version, IS_STRING, 1, "\'1.0\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, standalone, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #define arginfo_class_XMLWriter_endDocument arginfo_class_XMLWriter_openMemory @@ -281,17 +281,17 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_startDtd, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, qualifiedName, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, publicId, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, systemId, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, publicId, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, systemId, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #define arginfo_class_XMLWriter_endDtd arginfo_class_XMLWriter_openMemory ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_writeDtd, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, publicId, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, systemId, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, subset, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, publicId, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, systemId, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, subset, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_startDtdElement, 0, 1, _IS_BOOL, 0) @@ -328,9 +328,9 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_writeDtdEntity, ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_outputMemory, 0, 0, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, flush, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flush, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_XMLWriter_flush, 0, 0, MAY_BE_STRING|MAY_BE_LONG) - ZEND_ARG_TYPE_INFO(0, empty, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, empty, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() diff --git a/ext/xsl/xsltprocessor_arginfo.h b/ext/xsl/xsltprocessor_arginfo.h index 4f0e62fa954d4..50ed54c8d0b40 100644 --- a/ext/xsl/xsltprocessor_arginfo.h +++ b/ext/xsl/xsltprocessor_arginfo.h @@ -6,7 +6,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XSLTProcessor_transformToDoc, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, document, IS_OBJECT, 0) - ZEND_ARG_TYPE_INFO(0, return_class, IS_STRING, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, return_class, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XSLTProcessor_transformToUri, 0, 0, 2) diff --git a/ext/zend_test/test_arginfo.h b/ext/zend_test/test_arginfo.h index b9924aef34cc3..bb0f32caeec6e 100644 --- a/ext/zend_test/test_arginfo.h +++ b/ext/zend_test/test_arginfo.h @@ -24,7 +24,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_leak_variable, 0, 1, IS_VOI ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_leak_bytes, 0, 0, IS_VOID, 0) - ZEND_ARG_TYPE_INFO(0, bytes, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bytes, IS_LONG, 0, "3") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class__ZendTestClass_is_object, 0, 0, IS_LONG, 0) diff --git a/ext/zip/php_zip_arginfo.h b/ext/zip/php_zip_arginfo.h index ffb3983527cb3..ac392ef517449 100644 --- a/ext/zip/php_zip_arginfo.h +++ b/ext/zip/php_zip_arginfo.h @@ -15,7 +15,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zip_entry_open, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(0, zip_dp) ZEND_ARG_INFO(0, zip_entry) - ZEND_ARG_TYPE_INFO(0, mode, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_STRING, 0, "\'rb\'") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zip_entry_close, 0, 1, _IS_BOOL, 0) @@ -24,7 +24,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_zip_entry_read, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, zip_entry) - ZEND_ARG_TYPE_INFO(0, len, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, len, IS_LONG, 0, "1024") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_zip_entry_name, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) @@ -41,7 +41,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_open, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_setPassword, 0, 0, 1) @@ -57,34 +57,34 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_addEmptyDir, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, dirname, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_addFromString, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "ZipArchive::FL_OVERWRITE") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_addFile, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filepath, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, entryname, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, start, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "ZipArchive::FL_OVERWRITE") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_replaceFile, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, filepath, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, index, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, start, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_addGlob, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_ARG_INFO(0, options) ZEND_END_ARG_INFO() @@ -109,7 +109,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_setArchiveComment, 0, 0, 1) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_getArchiveComment, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_setCommentIndex, 0, 0, 2) @@ -126,7 +126,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_setMtimeIndex, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, timestamp, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #endif @@ -134,18 +134,18 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_setMtimeName, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, timestamp, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_getCommentIndex, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_getCommentName, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_deleteIndex, 0, 0, 1) @@ -179,14 +179,14 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_getFromName, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, entryname, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, len, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, len, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_getFromIndex, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, len, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, len, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_getStream, 0, 0, 1) @@ -198,7 +198,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_setExternalAttributesName, 0, 0, ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, opsys, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #endif @@ -207,7 +207,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_setExternalAttributesIndex, 0, 0 ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, opsys, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #endif @@ -216,7 +216,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_getExternalAttributesName, 0, 0, ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_INFO(1, opsys) ZEND_ARG_INFO(1, attr) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #endif @@ -225,20 +225,20 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_getExternalAttributesIndex, 0, 0 ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) ZEND_ARG_INFO(1, opsys) ZEND_ARG_INFO(1, attr) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_setCompressionName, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, method, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, compflags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, compflags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_setCompressionIndex, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, method, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, compflags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, compflags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #if defined(HAVE_ENCRYPTION) diff --git a/ext/zlib/zlib_arginfo.h b/ext/zlib/zlib_arginfo.h index 2c477379d4bf7..b86926c906207 100644 --- a/ext/zlib/zlib_arginfo.h +++ b/ext/zlib/zlib_arginfo.h @@ -10,40 +10,48 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gzfile, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, use_include_path, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_include_path, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_gzopen, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, mode, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, use_include_path, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_include_path, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_readgzfile, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, use_include_path, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_include_path, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_zlib_encode, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, encoding, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, level, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, level, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_zlib_decode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, max_decoded_len, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, max_decoded_len, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gzdeflate, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, level, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, encoding, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, level, IS_LONG, 0, "-1") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_LONG, 0, "ZLIB_ENCODING_RAW") ZEND_END_ARG_INFO() -#define arginfo_gzencode arginfo_gzdeflate +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gzencode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, level, IS_LONG, 0, "-1") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_LONG, 0, "ZLIB_ENCODING_GZIP") +ZEND_END_ARG_INFO() -#define arginfo_gzcompress arginfo_gzdeflate +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gzcompress, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, level, IS_LONG, 0, "-1") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_LONG, 0, "ZLIB_ENCODING_DEFLATE") +ZEND_END_ARG_INFO() #define arginfo_gzinflate arginfo_zlib_decode @@ -78,7 +86,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gzseek, 0, 2, IS_LONG, 0) ZEND_ARG_INFO(0, fp) ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, whence, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, whence, IS_LONG, 0, "SEEK_SET") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gztell, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) @@ -92,18 +100,18 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gzgets, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, fp) - ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "1024") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_deflate_init, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, encoding, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_deflate_add, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, resource) ZEND_ARG_TYPE_INFO(0, add, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, flush_behavior, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flush_behavior, IS_LONG, 0, "ZLIB_SYNC_FLUSH") ZEND_END_ARG_INFO() #define arginfo_inflate_init arginfo_deflate_init @@ -111,7 +119,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_inflate_add, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, context) ZEND_ARG_TYPE_INFO(0, encoded_data, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, flush_mode, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flush_mode, IS_LONG, 0, "ZLIB_SYNC_FLUSH") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_inflate_get_status, 0, 1, IS_LONG, 0) diff --git a/sapi/apache2handler/php_functions_arginfo.h b/sapi/apache2handler/php_functions_arginfo.h index f5ac0e4c28038..a99296abb0d9e 100644 --- a/sapi/apache2handler/php_functions_arginfo.h +++ b/sapi/apache2handler/php_functions_arginfo.h @@ -23,12 +23,12 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_apache_setenv, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, variable, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, walk_to_top, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, walk_to_top, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_apache_getenv, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, variable, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, walk_to_top, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, walk_to_top, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_apache_get_version, 0, 0, MAY_BE_STRING|MAY_BE_FALSE) diff --git a/sapi/cli/tests/004.phpt b/sapi/cli/tests/004.phpt index f00f7b4fd9fd0..fb0ae99ddcdb9 100644 --- a/sapi/cli/tests/004.phpt +++ b/sapi/cli/tests/004.phpt @@ -20,10 +20,10 @@ string(45) "Exception: Function unknown() does not exist " string(42) "Exception: Function echo() does not exist " -string(143) "Function [ function phpinfo ] { +string(154) "Function [ function phpinfo ] { - Parameters [1] { - Parameter #0 [ int $what ] + Parameter #0 [ int $what = INFO_ALL ] } - Return [ bool ] } diff --git a/sapi/cli/tests/005.phpt b/sapi/cli/tests/005.phpt index e8faa79f0d84b..51b957dd7b684 100644 --- a/sapi/cli/tests/005.phpt +++ b/sapi/cli/tests/005.phpt @@ -37,7 +37,7 @@ string(183) "Class [ class stdClass ] { } " -string(1980) "Class [ class Exception implements Throwable, Stringable ] { +string(2003) "Class [ class Exception implements Throwable, Stringable ] { - Constants [0] { } @@ -68,9 +68,9 @@ string(1980) "Class [ class Exception implements Throwable, Stri Method [ public method __construct ] { - Parameters [3] { - Parameter #0 [ string $message ] - Parameter #1 [ int $code ] - Parameter #2 [ ?Throwable $previous ] + Parameter #0 [ string $message = ] + Parameter #1 [ int $code = 0 ] + Parameter #2 [ ?Throwable $previous = null ] } } diff --git a/sapi/cli/tests/006.phpt b/sapi/cli/tests/006.phpt index 84ad68c405cc8..e35f66dc68a82 100644 --- a/sapi/cli/tests/006.phpt +++ b/sapi/cli/tests/006.phpt @@ -70,9 +70,9 @@ string(%d) "Extension [ extension #%d pcre version %s ] { - Parameters [5] { Parameter #0 [ string $pattern ] Parameter #1 [ string $subject ] - Parameter #2 [ &$subpatterns ] - Parameter #3 [ int $flags ] - Parameter #4 [ int $offset ] + Parameter #2 [ &$subpatterns = null ] + Parameter #3 [ int $flags = 0 ] + Parameter #4 [ int $offset = 0 ] } - Return [ int|false ] } @@ -81,9 +81,9 @@ string(%d) "Extension [ extension #%d pcre version %s ] { - Parameters [5] { Parameter #0 [ string $pattern ] Parameter #1 [ string $subject ] - Parameter #2 [ &$subpatterns ] - Parameter #3 [ int $flags ] - Parameter #4 [ int $offset ] + Parameter #2 [ &$subpatterns = null ] + Parameter #3 [ int $flags = 0 ] + Parameter #4 [ int $offset = 0 ] } - Return [ int|false|null ] } @@ -93,8 +93,8 @@ string(%d) "Extension [ extension #%d pcre version %s ] { Parameter #0 [ $regex ] Parameter #1 [ $replace ] Parameter #2 [ $subject ] - Parameter #3 [ int $limit ] - Parameter #4 [ &$count ] + Parameter #3 [ int $limit = -1 ] + Parameter #4 [ &$count = null ] } - Return [ array|string|null ] } @@ -104,8 +104,8 @@ string(%d) "Extension [ extension #%d pcre version %s ] { Parameter #0 [ $regex ] Parameter #1 [ $replace ] Parameter #2 [ $subject ] - Parameter #3 [ int $limit ] - Parameter #4 [ &$count ] + Parameter #3 [ int $limit = -1 ] + Parameter #4 [ &$count = null ] } - Return [ array|string|null ] } @@ -115,9 +115,9 @@ string(%d) "Extension [ extension #%d pcre version %s ] { Parameter #0 [ $regex ] Parameter #1 [ $callback ] Parameter #2 [ $subject ] - Parameter #3 [ int $limit ] - Parameter #4 [ &$count ] - Parameter #5 [ int $flags ] + Parameter #3 [ int $limit = -1 ] + Parameter #4 [ &$count = null ] + Parameter #5 [ int $flags = 0 ] } - Return [ array|string|null ] } @@ -126,9 +126,9 @@ string(%d) "Extension [ extension #%d pcre version %s ] { - Parameters [5] { Parameter #0 [ array $pattern ] Parameter #1 [ $subject ] - Parameter #2 [ int $limit ] - Parameter #3 [ &$count ] - Parameter #4 [ int $flags ] + Parameter #2 [ int $limit = -1 ] + Parameter #3 [ &$count = null ] + Parameter #4 [ int $flags = 0 ] } - Return [ array|string|null ] } @@ -137,8 +137,8 @@ string(%d) "Extension [ extension #%d pcre version %s ] { - Parameters [4] { Parameter #0 [ string $pattern ] Parameter #1 [ string $subject ] - Parameter #2 [ int $limit ] - Parameter #3 [ int $flags ] + Parameter #2 [ int $limit = -1 ] + Parameter #3 [ int $flags = 0 ] } - Return [ array|false ] } @@ -146,7 +146,7 @@ string(%d) "Extension [ extension #%d pcre version %s ] { - Parameters [2] { Parameter #0 [ string $str ] - Parameter #1 [ ?string $delim_char ] + Parameter #1 [ ?string $delim_char = null ] } - Return [ string ] } @@ -155,7 +155,7 @@ string(%d) "Extension [ extension #%d pcre version %s ] { - Parameters [3] { Parameter #0 [ string $regex ] Parameter #1 [ array $input ] - Parameter #2 [ int $flags ] + Parameter #2 [ int $flags = 0 ] } - Return [ array|false ] } diff --git a/sapi/phpdbg/phpdbg_arginfo.h b/sapi/phpdbg/phpdbg_arginfo.h index e130ebd33f456..793d26f064846 100644 --- a/sapi/phpdbg/phpdbg_arginfo.h +++ b/sapi/phpdbg/phpdbg_arginfo.h @@ -35,9 +35,9 @@ ZEND_END_ARG_INFO() #define arginfo_phpdbg_start_oplog arginfo_phpdbg_break_next ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phpdbg_end_oplog, 0, 0, IS_ARRAY, 1) - ZEND_ARG_TYPE_INFO(0, options, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phpdbg_get_executable, 0, 0, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() diff --git a/scripts/dev/genfiles b/scripts/dev/genfiles index ffdfcdc3ca9f7..3e085c3e5397f 100755 --- a/scripts/dev/genfiles +++ b/scripts/dev/genfiles @@ -113,7 +113,7 @@ $MAKE RE2C="$RE2C" RE2C_FLAGS="$RE2C_FLAGS" YACC="$YACC" srcdir=sapi/phpdbg buil sapi/phpdbg/phpdbg_parser.c \ sapi/phpdbg/phpdbg_lexer.c -echo "genfiles: enerating json extension parser and lexer files" +echo "genfiles: Generating json extension parser and lexer files" $MAKE RE2C="$RE2C" RE2C_FLAGS="$RE2C_FLAGS" YACC="$YACC" srcdir=ext/json builddir=ext/json top_srcdir=. \ -f ext/json/Makefile.frag \ ext/json/json_parser.tab.c \ From 823a956855c1f38ed8ee888bf248917e28d40314 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 3 Apr 2020 10:06:41 +0200 Subject: [PATCH 073/338] Fixed bug #78434 The DO_INIT flag, which will skip the first resume on a primed generator, should always be set when starting to yield from a new generator, not only when the yield from happens during priming. --- NEWS | 3 +++ Zend/tests/generators/bug78434.phpt | 27 +++++++++++++++++++ .../generators/yield_from_multi_tree.phpt | 3 --- Zend/zend_generators.c | 6 +++-- 4 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 Zend/tests/generators/bug78434.phpt diff --git a/NEWS b/NEWS index 67d71eca64b5e..dd770268aefd2 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,9 @@ PHP NEWS ?? ??? ????, PHP 7.4.6 +- Core: + . Fixed bug #78434 (Generator yields no items after valid() call). (Nikita) + - DOM: . Fixed bug #78221 (DOMNode::normalize() doesn't remove empty text nodes). (cmb) diff --git a/Zend/tests/generators/bug78434.phpt b/Zend/tests/generators/bug78434.phpt new file mode 100644 index 0000000000000..dd9351e1684a1 --- /dev/null +++ b/Zend/tests/generators/bug78434.phpt @@ -0,0 +1,27 @@ +--TEST-- +Bug #78434: Generator skips first item after valid() call +--FILE-- +valid(); + yield from $generator; + + $generator = $function(); + $generator->valid(); + yield from $generator; +}; + +foreach ($wrapper() as $value) { + echo $value, "\n"; +} + +?> +--EXPECT-- +0 +0 diff --git a/Zend/tests/generators/yield_from_multi_tree.phpt b/Zend/tests/generators/yield_from_multi_tree.phpt index 9bec1381496ff..808d693eaec20 100644 --- a/Zend/tests/generators/yield_from_multi_tree.phpt +++ b/Zend/tests/generators/yield_from_multi_tree.phpt @@ -10,9 +10,6 @@ function from($levels) { } function gen($gen, $level) { - if ($level % 2) { - yield $gen->current(); - } yield from $gen; } diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c index 7031e9a8105f8..9d8546f5185b3 100644 --- a/Zend/zend_generators.c +++ b/Zend/zend_generators.c @@ -609,6 +609,7 @@ void zend_generator_yield_from(zend_generator *generator, zend_generator *from) generator->node.parent = from; zend_generator_get_current(generator); GC_DELREF(&from->std); + generator->flags |= ZEND_GENERATOR_DO_INIT; } ZEND_API zend_generator *zend_generator_update_current(zend_generator *generator, zend_generator *leaf) @@ -785,6 +786,7 @@ ZEND_API void zend_generator_resume(zend_generator *orig_generator) /* {{{ */ if (UNEXPECTED((orig_generator->flags & ZEND_GENERATOR_DO_INIT) != 0 && !Z_ISUNDEF(generator->value))) { /* We must not advance Generator if we yield from a Generator being currently run */ + orig_generator->flags &= ~ZEND_GENERATOR_DO_INIT; return; } @@ -864,15 +866,15 @@ ZEND_API void zend_generator_resume(zend_generator *orig_generator) /* {{{ */ goto try_again; } } + + orig_generator->flags &= ~ZEND_GENERATOR_DO_INIT; } /* }}} */ static inline void zend_generator_ensure_initialized(zend_generator *generator) /* {{{ */ { if (UNEXPECTED(Z_TYPE(generator->value) == IS_UNDEF) && EXPECTED(generator->execute_data) && EXPECTED(generator->node.parent == NULL)) { - generator->flags |= ZEND_GENERATOR_DO_INIT; zend_generator_resume(generator); - generator->flags &= ~ZEND_GENERATOR_DO_INIT; generator->flags |= ZEND_GENERATOR_AT_FIRST_YIELD; } } From 12324364f7a9c839942cab08b05605cd6cc9e4b8 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 9 Apr 2020 11:22:00 +0200 Subject: [PATCH 074/338] Add test to make sure internal param default eval doesn't error --- .../check_all.phpt | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 ext/reflection/tests/internal_parameter_default_value/check_all.phpt diff --git a/ext/reflection/tests/internal_parameter_default_value/check_all.phpt b/ext/reflection/tests/internal_parameter_default_value/check_all.phpt new file mode 100644 index 0000000000000..7bfe08bc56f14 --- /dev/null +++ b/ext/reflection/tests/internal_parameter_default_value/check_all.phpt @@ -0,0 +1,33 @@ +--TEST-- +Check that all internal parameter defaults evaluate without error +--FILE-- +getParameters() as $param) { + if ($param->isDefaultValueAvailable()) { + try { + $param->getDefaultValue(); + } catch (Error $e) { + echo "{$rf->getName()}: {$e->getMessage()}\n"; + } + } + } +} + +foreach (get_defined_functions()["internal"] as $func) { + $rf = new ReflectionFunction($func); + checkDefaults($rf); +} + +foreach (get_declared_classes() as $class) { + $rc = new ReflectionClass($class); + foreach ($rc->getMethods() as $method) { + checkDefaults($method); + } +} + +?> +===DONE=== +--EXPECT-- +===DONE=== From e6458d67cfa54cdcd6d3c96897106fa8cb738414 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 9 Apr 2020 10:55:53 +0200 Subject: [PATCH 075/338] Fix #79462: method_exists and property_exists incoherent behavior Both functions are closely related, so should behave the same for wrong input types, i.e. both should throw a TypeError. --- NEWS | 2 + Zend/zend_builtin_functions.c | 3 +- .../method_exists_variation_001.phpt | 50 ++++++++++--------- 3 files changed, 31 insertions(+), 24 deletions(-) diff --git a/NEWS b/NEWS index 1c25db5f0889a..2d1cc8a15c497 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,8 @@ PHP NEWS abstract trait function). (Nikita) . Fixed bug #62609 (Allow implementing Traversable on abstract classes). (Nikita) + . Fixed bug #79462 (method_exists and property_exists incoherent behavior). + (cmb) - CURL: . Bumped required libcurl version to 7.29.0. (cmb) diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 3b0e05c21283e..4753e9b7c1cb3 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1107,7 +1107,8 @@ ZEND_FUNCTION(method_exists) RETURN_FALSE; } } else { - RETURN_FALSE; + zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_type_name(klass)); + RETURN_THROWS(); } lcname = zend_string_tolower(method_name); diff --git a/ext/standard/tests/class_object/method_exists_variation_001.phpt b/ext/standard/tests/class_object/method_exists_variation_001.phpt index 3ad49456c63ac..b408b8eb0dcbc 100644 --- a/ext/standard/tests/class_object/method_exists_variation_001.phpt +++ b/ext/standard/tests/class_object/method_exists_variation_001.phpt @@ -78,7 +78,11 @@ $values = array( foreach($values as $value) { echo "\nArg value $value \n"; - var_dump( method_exists($value, $method) ); + try { + var_dump( method_exists($value, $method) ); + } catch (TypeError $e) { + echo $e->getMessage(), PHP_EOL; + } }; echo "Done"; @@ -89,69 +93,69 @@ Error: 2 - Undefined variable $undefined_var Error: 2 - Undefined variable $unset_var Arg value 0 -bool(false) +method_exists(): Argument #1 ($object_or_class) must be of type object|string, int given Arg value 1 -bool(false) +method_exists(): Argument #1 ($object_or_class) must be of type object|string, int given Arg value 12345 -bool(false) +method_exists(): Argument #1 ($object_or_class) must be of type object|string, int given Arg value -2345 -bool(false) +method_exists(): Argument #1 ($object_or_class) must be of type object|string, int given Arg value 10.5 -bool(false) +method_exists(): Argument #1 ($object_or_class) must be of type object|string, float given Arg value -10.5 -bool(false) +method_exists(): Argument #1 ($object_or_class) must be of type object|string, float given Arg value 101234567000 -bool(false) +method_exists(): Argument #1 ($object_or_class) must be of type object|string, float given Arg value 1.07654321E-9 -bool(false) +method_exists(): Argument #1 ($object_or_class) must be of type object|string, float given Arg value 0.5 -bool(false) +method_exists(): Argument #1 ($object_or_class) must be of type object|string, float given Error: 2 - Array to string conversion Arg value Array -bool(false) +method_exists(): Argument #1 ($object_or_class) must be of type object|string, array given Error: 2 - Array to string conversion Arg value Array -bool(false) +method_exists(): Argument #1 ($object_or_class) must be of type object|string, array given Error: 2 - Array to string conversion Arg value Array -bool(false) +method_exists(): Argument #1 ($object_or_class) must be of type object|string, array given Error: 2 - Array to string conversion Arg value Array -bool(false) +method_exists(): Argument #1 ($object_or_class) must be of type object|string, array given Error: 2 - Array to string conversion Arg value Array -bool(false) +method_exists(): Argument #1 ($object_or_class) must be of type object|string, array given Arg value -bool(false) +method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given Arg value -bool(false) +method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given Arg value 1 -bool(false) +method_exists(): Argument #1 ($object_or_class) must be of type object|string, bool given Arg value -bool(false) +method_exists(): Argument #1 ($object_or_class) must be of type object|string, bool given Arg value 1 -bool(false) +method_exists(): Argument #1 ($object_or_class) must be of type object|string, bool given Arg value -bool(false) +method_exists(): Argument #1 ($object_or_class) must be of type object|string, bool given Arg value bool(false) @@ -168,8 +172,8 @@ In autoload(String) bool(false) Arg value -bool(false) +method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given Arg value -bool(false) +method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given Done From ba64b3fd4126e4b6f89afd6d8a5643382ea0f27b Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 9 Apr 2020 13:38:40 +0300 Subject: [PATCH 076/338] Don't get number of passed arguments from "fake" INIT frames --- ext/opcache/jit/zend_jit_trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 65b5890021f95..6a05bc0d74f79 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -3014,7 +3014,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par break; } else if (p->op == ZEND_JIT_TRACE_INIT_CALL) { call = top; - TRACE_FRAME_INIT(call, p->func, 1, find_call_num_args(p-1)); + TRACE_FRAME_INIT(call, p->func, 1, !p->fake ? find_call_num_args(p-1) : -1); call->prev = frame->call; if (!p->fake) { TRACE_FRAME_SET_LAST_SEND_BY_VAL(call); From 41c2b275f73c1be477b1cfe115738afaffe2b945 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 9 Apr 2020 14:33:29 +0300 Subject: [PATCH 077/338] cleanup --- ext/opcache/jit/zend_jit_trace.c | 111 ++++++++++++++----------------- 1 file changed, 50 insertions(+), 61 deletions(-) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 6a05bc0d74f79..01ea6fa977ec5 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -1720,47 +1720,6 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par TRACE_FRAME_INIT(frame, op_array, 0, -1); stack = frame->stack; - if (trace_buffer->start == ZEND_JIT_TRACE_START_ENTER) { - i = 0; - while (i < op_array->last_var) { - if (!(ssa->var_info[i].type & MAY_BE_GUARD) - && has_concrete_type(ssa->var_info[i].type)) { - SET_STACK_TYPE(stack, i, concrete_type(ssa->var_info[i].type)); - } else if (i < op_array->num_args) { - SET_STACK_TYPE(stack, i, IS_UNKNOWN); - } else { - SET_STACK_TYPE(stack, i, IS_UNDEF); - } - i++; - } - } else { - int parent_vars_count = 0; - zend_jit_trace_stack *parent_stack = NULL; - - i = 0; - if (parent_trace) { - parent_vars_count = MIN(zend_jit_traces[parent_trace].exit_info[exit_num].stack_size, - op_array->last_var + op_array->T); - if (parent_vars_count) { - parent_stack = - zend_jit_traces[parent_trace].stack_map + - zend_jit_traces[parent_trace].exit_info[exit_num].stack_offset; - } - } - while (i < op_array->last_var + op_array->T) { - if (!(ssa->var_info[i].type & MAY_BE_GUARD) - && has_concrete_type(ssa->var_info[i].type)) { - SET_STACK_TYPE(stack, i, concrete_type(ssa->var_info[i].type)); - } else if (i < parent_vars_count - && STACK_TYPE(parent_stack, i) != IS_UNKNOWN) { - SET_STACK_TYPE(stack, i, STACK_TYPE(parent_stack, i)); - } else { - SET_STACK_TYPE(stack, i, IS_UNKNOWN); - } - i++; - } - } - opline = ((zend_jit_trace_start_rec*)p)->opline; name = zend_jit_trace_name(op_array, opline->lineno); p += ZEND_JIT_TRACE_START_REC_SIZE; @@ -1794,32 +1753,62 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par } } - if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP - || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_CALL - || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_RET) { + if (1) { + int last_var; + int parent_vars_count = 0; + zend_jit_trace_stack *parent_stack = NULL; - if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) { - /* Check loop-invariant variable types */ - for (i = 0; i < op_array->last_var + op_array->T; i++) { - uint32_t info = ssa->var_info[i].type; + if (parent_trace) { + parent_vars_count = MIN(zend_jit_traces[parent_trace].exit_info[exit_num].stack_size, + op_array->last_var + op_array->T); + if (parent_vars_count) { + parent_stack = + zend_jit_traces[parent_trace].stack_map + + zend_jit_traces[parent_trace].exit_info[exit_num].stack_offset; + } + } - ZEND_ASSERT(ssa->vars[i].definition == -1); - ZEND_ASSERT(ssa->vars[i].definition_phi == NULL); - ZEND_ASSERT(ssa->vars[i].var == i); + last_var = op_array->last_var; + if (trace_buffer->start != ZEND_JIT_TRACE_START_ENTER) { + last_var += op_array->T; + } - if (info & MAY_BE_GUARD) { - if (ssa->vars[i].use_chain != -1 - || (ssa->vars[i].phi_use_chain - && !(ssa->var_info[ssa->vars[i].phi_use_chain->ssa_var].type & MAY_BE_GUARD))) { - if (!zend_jit_type_guard(&dasm_state, opline, EX_NUM_TO_VAR(i), concrete_type(info))) { - goto jit_failure; - } - ssa->var_info[i].type = info & ~MAY_BE_GUARD; - SET_STACK_TYPE(stack, i, concrete_type(info)); - } + for (i = 0; i < last_var; i++) { + uint32_t info = ssa->var_info[i].type; + + if (!(info & MAY_BE_GUARD) && has_concrete_type(info)) { + SET_STACK_TYPE(stack, i, concrete_type(info)); + } else if (i < parent_vars_count + && STACK_TYPE(parent_stack, i) != IS_UNKNOWN) { + /* This must be already handled by trace type inference */ + ZEND_ASSERT(0); + SET_STACK_TYPE(stack, i, STACK_TYPE(parent_stack, i)); + } else if ((info & MAY_BE_GUARD) != 0 + && trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP + && (ssa->vars[i].use_chain != -1 + || (ssa->vars[i].phi_use_chain + && !(ssa->var_info[ssa->vars[i].phi_use_chain->ssa_var].type & MAY_BE_GUARD)))) { + /* Check loop-invariant variable type */ + if (!zend_jit_type_guard(&dasm_state, opline, EX_NUM_TO_VAR(i), concrete_type(info))) { + goto jit_failure; } + info &= ~MAY_BE_GUARD; + ssa->var_info[i].type = info; + SET_STACK_TYPE(stack, i, concrete_type(info)); + } else if (trace_buffer->start == ZEND_JIT_TRACE_START_ENTER + && i >= op_array->num_args) { + /* This must be already handled by trace type inference */ + ZEND_ASSERT(0); + SET_STACK_TYPE(stack, i, IS_UNDEF); + } else { + SET_STACK_TYPE(stack, i, IS_UNKNOWN); } } + } + + if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP + || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_CALL + || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_RET) { zend_jit_label(&dasm_state, 0); /* start of of trace loop */ From 73455778d4ae35110a987f1019e548aff721c3af Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Mon, 6 Apr 2020 15:22:59 +0200 Subject: [PATCH 078/338] Cache MBFL encoding for Oniguruma regex functions. Closes GH-5355 --- ext/mbstring/php_mbregex.c | 39 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index a701021c13ba2..ac6a633aed7e6 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -27,6 +27,7 @@ #include "ext/standard/info.h" #include "php_mbregex.h" #include "mbstring.h" +#include "libmbfl/filters/mbfilter_utf8.h" #include "php_onig_compat.h" /* must come prior to the oniguruma header */ #include @@ -50,6 +51,7 @@ ZEND_EXTERN_MODULE_GLOBALS(mbstring) struct _zend_mb_regex_globals { OnigEncoding default_mbctype; OnigEncoding current_mbctype; + const mbfl_encoding *current_mbctype_mbfl_encoding; HashTable ht_rc; zval search_str; zval *search_str_val; @@ -73,6 +75,7 @@ static int _php_mb_regex_globals_ctor(zend_mb_regex_globals *pglobals) { pglobals->default_mbctype = ONIG_ENCODING_UTF8; pglobals->current_mbctype = ONIG_ENCODING_UTF8; + pglobals->current_mbctype_mbfl_encoding = &mbfl_encoding_utf8; ZVAL_UNDEF(&pglobals->search_str); pglobals->search_re = (php_mb_regex_t*)NULL; pglobals->search_pos = 0; @@ -148,6 +151,7 @@ PHP_RINIT_FUNCTION(mb_regex) PHP_RSHUTDOWN_FUNCTION(mb_regex) { MBREX(current_mbctype) = MBREX(default_mbctype); + MBREX(current_mbctype_mbfl_encoding) = mbfl_name2encoding(php_mb_regex_get_default_mbctype()); if (!Z_ISUNDEF(MBREX(search_str))) { zval_ptr_dtor(&MBREX(search_str)); @@ -415,6 +419,7 @@ int php_mb_regex_set_mbctype(const char *encname) return FAILURE; } MBREX(current_mbctype) = mbctype; + MBREX(current_mbctype_mbfl_encoding) = mbfl_name2encoding(encname); return SUCCESS; } /* }}} */ @@ -441,7 +446,7 @@ const char *php_mb_regex_get_mbctype(void) /* {{{ php_mb_regex_get_mbctype_encoding */ const mbfl_encoding *php_mb_regex_get_mbctype_encoding(void) { - return mbfl_name2encoding(_php_mb_regex_mbctype2name(MBREX(current_mbctype))); + return MBREX(current_mbctype_mbfl_encoding); } /* }}} */ @@ -845,7 +850,6 @@ PHP_FUNCTION(mb_regex_encoding) { char *encoding = NULL; size_t encoding_len; - OnigEncoding mbctype; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s", &encoding, &encoding_len) == FAILURE) { RETURN_THROWS(); @@ -853,21 +857,16 @@ PHP_FUNCTION(mb_regex_encoding) if (!encoding) { const char *retval = php_mb_regex_get_mbctype(); + ZEND_ASSERT(retval != NULL); - if (retval == NULL) { - RETURN_FALSE; - } - - RETURN_STRING((char *)retval); + RETURN_STRING(retval); } else { - mbctype = _php_mb_regex_name2mbctype(encoding); - - if (mbctype == ONIG_ENCODING_UNDEF) { + if (php_mb_regex_set_mbctype(encoding) == FAILURE) { zend_argument_value_error(1, "must be a valid encoding, \"%s\" given", encoding); RETURN_THROWS(); } - MBREX(current_mbctype) = mbctype; + /* TODO Make function return previous encoding? */ RETURN_TRUE; } } @@ -1023,17 +1022,9 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp OnigUChar *string_lim; char *description = NULL; - const mbfl_encoding *enc; + const mbfl_encoding *enc = php_mb_regex_get_mbctype_encoding(); + ZEND_ASSERT(enc != NULL); - { - const char *current_enc_name; - current_enc_name = php_mb_regex_get_mbctype(); - if (current_enc_name == NULL || - (enc = mbfl_name2encoding(current_enc_name)) == NULL) { - php_error_docref(NULL, E_WARNING, "Unknown error"); - RETURN_FALSE; - } - } eval = 0; { char *option_str = NULL; @@ -1057,11 +1048,7 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp } } - if (!php_mb_check_encoding( - string, - string_len, - php_mb_regex_get_mbctype_encoding() - )) { + if (!php_mb_check_encoding(string, string_len, enc)) { RETURN_NULL(); } From 12ec7a273048f470a08a5aeb84dfde6adbde9d35 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 8 Apr 2020 21:05:59 +0200 Subject: [PATCH 079/338] Convert if blocks to assertions and adapt stubs accordingly --- ext/mbstring/mbstring.c | 110 ++++++++++++-------------------- ext/mbstring/mbstring.stub.php | 18 +++--- ext/mbstring/mbstring_arginfo.h | 31 +++++---- 3 files changed, 68 insertions(+), 91 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 8b9504cd2ef40..56731883ba8b4 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1336,12 +1336,8 @@ PHP_FUNCTION(mb_internal_encoding) RETURN_THROWS(); } if (name == NULL) { - name = MBSTRG(current_internal_encoding) ? MBSTRG(current_internal_encoding)->name: NULL; - if (name != NULL) { - RETURN_STRING(name); - } else { - RETURN_FALSE; - } + ZEND_ASSERT(MBSTRG(current_internal_encoding)); + RETURN_STRING(MBSTRG(current_internal_encoding)->name); } else { encoding = mbfl_name2encoding(name); if (!encoding) { @@ -1350,6 +1346,7 @@ PHP_FUNCTION(mb_internal_encoding) } else { MBSTRG(current_internal_encoding) = encoding; MBSTRG(internal_encoding_set) = 1; + /* TODO Return old encoding */ RETURN_TRUE; } } @@ -1426,6 +1423,7 @@ PHP_FUNCTION(mb_http_input) } } if (!list) { + // TODO should return empty string? RETURN_FALSE; } RETVAL_STRING(list); @@ -1433,11 +1431,13 @@ PHP_FUNCTION(mb_http_input) retname = 0; break; default: + // TODO ValueError result = MBSTRG(http_input_identify); break; } } + // FIXME this bloc seems useless except for default switch case if (retname) { if (result) { RETVAL_STRING(result->name); @@ -1461,12 +1461,8 @@ PHP_FUNCTION(mb_http_output) } if (name == NULL) { - name = MBSTRG(current_http_output_encoding) ? MBSTRG(current_http_output_encoding)->name: NULL; - if (name != NULL) { - RETURN_STRING(name); - } else { - RETURN_FALSE; - } + ZEND_ASSERT(MBSTRG(current_http_output_encoding)); + RETURN_STRING(MBSTRG(current_http_output_encoding)->name); } else { encoding = mbfl_name2encoding(name); if (!encoding) { @@ -1475,6 +1471,7 @@ PHP_FUNCTION(mb_http_output) } else { MBSTRG(http_output_set) = 1; MBSTRG(current_http_output_encoding) = encoding; + /* TODO Return previous encoding? */ RETURN_TRUE; } } @@ -2153,24 +2150,19 @@ static void php_mb_strstr_variants(INTERNAL_FUNCTION_PARAMETERS, unsigned int va if (!mbfl_is_error(n)) { if (part) { ret = mbfl_substr(&haystack, &result, 0, n); - if (ret != NULL) { - // TODO: avoid reallocation ??? - RETVAL_STRINGL((char *)ret->val, ret->len); - efree(ret->val); - } else { - RETVAL_FALSE; - } + ZEND_ASSERT(ret != NULL); + // TODO: avoid reallocation ??? + RETVAL_STRINGL((char *)ret->val, ret->len); + efree(ret->val); } else { ret = mbfl_substr(&haystack, &result, n, MBFL_SUBSTR_UNTIL_END); - if (ret != NULL) { - // TODO: avoid reallocation ??? - RETVAL_STRINGL((char *)ret->val, ret->len); - efree(ret->val); - } else { - RETVAL_FALSE; - } + ZEND_ASSERT(ret != NULL); + // TODO: avoid reallocation ??? + RETVAL_STRINGL((char *)ret->val, ret->len); + efree(ret->val); } } else { + // FIXME use handle_strpos_error(n) RETVAL_FALSE; } } @@ -2301,9 +2293,7 @@ PHP_FUNCTION(mb_substr) } ret = mbfl_substr(&string, &result, real_from, real_len); - if (NULL == ret) { - RETURN_FALSE; - } + ZEND_ASSERT(ret != NULL); // TODO: avoid reallocation ??? RETVAL_STRINGL((char *)ret->val, ret->len); /* the string is already strdup()'ed */ @@ -2355,13 +2345,12 @@ PHP_FUNCTION(mb_strcut) } if (from > string.len) { + // TODO Out of bounds ValueError RETURN_FALSE; } ret = mbfl_strcut(&string, &result, from, len); - if (ret == NULL) { - RETURN_FALSE; - } + ZEND_ASSERT(ret != NULL); // TODO: avoid reallocation ??? RETVAL_STRINGL((char *)ret->val, ret->len); /* the string is already strdup()'ed */ @@ -2388,11 +2377,8 @@ PHP_FUNCTION(mb_strwidth) } n = mbfl_strwidth(&string); - if (!mbfl_is_error(n)) { - RETVAL_LONG(n); - } else { - RETVAL_FALSE; - } + ZEND_ASSERT(n >= 0); + RETVAL_LONG(n); } /* }}} */ @@ -2449,10 +2435,7 @@ PHP_FUNCTION(mb_strimwidth) } ret = mbfl_strimwidth(&string, &marker, &result, from, width); - - if (ret == NULL) { - RETURN_FALSE; - } + ZEND_ASSERT(ret != NULL); // TODO: avoid reallocation ??? RETVAL_STRINGL((char *)ret->val, ret->len); /* the string is already strdup()'ed */ efree(ret->val); @@ -2968,13 +2951,10 @@ PHP_FUNCTION(mb_encode_mimeheader) mbfl_string_init(&result); ret = mbfl_mime_header_encode(&string, &result, charset, transenc, linefeed, indent); - if (ret != NULL) { - // TODO: avoid reallocation ??? - RETVAL_STRINGL((char *)ret->val, ret->len); /* the string is already strdup()'ed */ - efree(ret->val); - } else { - RETVAL_FALSE; - } + ZEND_ASSERT(ret != NULL); + // TODO: avoid reallocation ??? + RETVAL_STRINGL((char *)ret->val, ret->len); /* the string is already strdup()'ed */ + efree(ret->val); } /* }}} */ @@ -2993,13 +2973,10 @@ PHP_FUNCTION(mb_decode_mimeheader) mbfl_string_init(&result); ret = mbfl_mime_header_decode(&string, &result, MBSTRG(current_internal_encoding)); - if (ret != NULL) { - // TODO: avoid reallocation ??? - RETVAL_STRINGL((char *)ret->val, ret->len); /* the string is already strdup()'ed */ - efree(ret->val); - } else { - RETVAL_FALSE; - } + ZEND_ASSERT(ret != NULL); + // TODO: avoid reallocation ??? + RETVAL_STRINGL((char *)ret->val, ret->len); /* the string is already strdup()'ed */ + efree(ret->val); } /* }}} */ @@ -3090,13 +3067,10 @@ PHP_FUNCTION(mb_convert_kana) } ret = mbfl_ja_jp_hantozen(&string, &result, opt); - if (ret != NULL) { - // TODO: avoid reallocation ??? - RETVAL_STRINGL((char *)ret->val, ret->len); /* the string is already strdup()'ed */ - efree(ret->val); - } else { - RETVAL_FALSE; - } + ZEND_ASSERT(ret != NULL); + // TODO: avoid reallocation ??? + RETVAL_STRINGL((char *)ret->val, ret->len); /* the string is already strdup()'ed */ + efree(ret->val); } /* }}} */ @@ -3372,13 +3346,10 @@ php_mb_numericentity_exec(INTERNAL_FUNCTION_PARAMETERS, int type) mapsize /= 4; ret = mbfl_html_numeric_entity(&string, &result, convmap, mapsize, type); - if (ret != NULL) { - // TODO: avoid reallocation ??? - RETVAL_STRINGL((char *)ret->val, ret->len); - efree(ret->val); - } else { - RETVAL_FALSE; - } + ZEND_ASSERT(ret != NULL); + // TODO: avoid reallocation ??? + RETVAL_STRINGL((char *)ret->val, ret->len); + efree(ret->val); efree((void *)convmap); } /* }}} */ @@ -4016,6 +3987,7 @@ PHP_FUNCTION(mb_get_info) RETVAL_STRING("Off"); } } else { + // TODO Convert to ValueError RETURN_FALSE; } } diff --git a/ext/mbstring/mbstring.stub.php b/ext/mbstring/mbstring.stub.php index 7a75d4099ff8b..c2ae9e68b403e 100644 --- a/ext/mbstring/mbstring.stub.php +++ b/ext/mbstring/mbstring.stub.php @@ -43,13 +43,13 @@ function mb_strrichr(string $haystack, string $needle, bool $part = false, strin function mb_substr_count(string $haystack, string $needle, string $encoding = UNKNOWN): int {} -function mb_substr(string $str, int $start, ?int $length = null, string $encoding = UNKNOWN): string|false {} +function mb_substr(string $str, int $start, ?int $length = null, string $encoding = UNKNOWN): string {} function mb_strcut(string $str, int $start, ?int $length = null, string $encoding = UNKNOWN): string|false {} -function mb_strwidth(string $str, string $encoding = UNKNOWN): int|false {} +function mb_strwidth(string $str, string $encoding = UNKNOWN): int {} -function mb_strimwidth(string $str, int $start, int $width, string $trimmarker = UNKNOWN, string $encoding = UNKNOWN): string|false {} +function mb_strimwidth(string $str, int $start, int $width, string $trim_marker = UNKNOWN, string $encoding = UNKNOWN): string {} function mb_convert_encoding(array|string $str, string $to, array|string $from = UNKNOWN): array|string|false {} @@ -63,19 +63,19 @@ function mb_detect_encoding(string $str, array|string|null $encoding_list = null function mb_list_encodings(): array {} -function mb_encoding_aliases(string $encoding): array|false {} +function mb_encoding_aliases(string $encoding): array {} -function mb_encode_mimeheader(string $str, string $charset = UNKNOWN, string $transfer = UNKNOWN, string $linefeed = UNKNOWN, int $indent = 0): string|false {} +function mb_encode_mimeheader(string $str, string $charset = UNKNOWN, string $transfer = UNKNOWN, string $linefeed = UNKNOWN, int $indent = 0): string {} -function mb_decode_mimeheader(string $string): string|false {} +function mb_decode_mimeheader(string $string): string {} -function mb_convert_kana(string $str, string $option = UNKNOWN, string $encoding = UNKNOWN): string|false {} +function mb_convert_kana(string $str, string $option = UNKNOWN, string $encoding = UNKNOWN): string {} function mb_convert_variables(string $to, array|string $from, &$var, &...$vars): string|false {} -function mb_encode_numericentity(string $string, array $convmap, string $encoding = UNKNOWN, bool $is_hex = false): string|false {} +function mb_encode_numericentity(string $string, array $convmap, string $encoding = UNKNOWN, bool $is_hex = false): string {} -function mb_decode_numericentity(string $string, array $convmap, string $encoding = UNKNOWN): string|false {} +function mb_decode_numericentity(string $string, array $convmap, string $encoding = UNKNOWN): string {} function mb_send_mail(string $to, string $subject, string $message, $additional_headers = UNKNOWN, string $additional_parameters = UNKNOWN): bool {} diff --git a/ext/mbstring/mbstring_arginfo.h b/ext/mbstring/mbstring_arginfo.h index f7a12275f371a..564e167876e06 100644 --- a/ext/mbstring/mbstring_arginfo.h +++ b/ext/mbstring/mbstring_arginfo.h @@ -79,25 +79,27 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_substr_count, 0, 2, IS_LONG, ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_substr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_substr, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null") ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) ZEND_END_ARG_INFO() -#define arginfo_mb_strcut arginfo_mb_substr - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_strwidth, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_strcut, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null") ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_strimwidth, 0, 3, MAY_BE_STRING|MAY_BE_FALSE) +#define arginfo_mb_strwidth arginfo_mb_strlen + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_strimwidth, 0, 3, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, width, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, trimmarker, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, trim_marker, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -129,11 +131,11 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_list_encodings, 0, 0, IS_ARRAY, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_encoding_aliases, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_encoding_aliases, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_encode_mimeheader, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_encode_mimeheader, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, charset, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, transfer, IS_STRING, 0) @@ -141,11 +143,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_encode_mimeheader, 0, 1, MAY_ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, indent, IS_LONG, 0, "0") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_decode_mimeheader, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_decode_mimeheader, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_convert_kana, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_convert_kana, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, option, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) @@ -158,14 +160,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_convert_variables, 0, 3, MAY_ ZEND_ARG_VARIADIC_INFO(1, vars) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_encode_numericentity, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_encode_numericentity, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, convmap, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, is_hex, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_decode_numericentity, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_decode_numericentity, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, convmap, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) @@ -193,7 +195,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_scrub, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) ZEND_END_ARG_INFO() -#define arginfo_mb_ord arginfo_mb_strwidth +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ord, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) +ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_chr, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, cp, IS_LONG, 0) From 175e5ed4bf85b68a5a60cb481322c18f2f9f8f46 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 9 Apr 2020 14:06:11 +0200 Subject: [PATCH 080/338] Fix typo (UNKOWN -> UNKNOWN) --- ext/com_dotnet/com_extension.stub.php | 2 +- ext/com_dotnet/com_extension_arginfo.h | 2 +- ext/dba/dba.stub.php | 2 +- ext/dba/dba_arginfo.h | 2 +- ext/snmp/snmp.stub.php | 4 ++-- ext/snmp/snmp_arginfo.h | 21 ++------------------- 6 files changed, 8 insertions(+), 25 deletions(-) diff --git a/ext/com_dotnet/com_extension.stub.php b/ext/com_dotnet/com_extension.stub.php index fe35e17c42c27..d97a51968ecdc 100644 --- a/ext/com_dotnet/com_extension.stub.php +++ b/ext/com_dotnet/com_extension.stub.php @@ -75,7 +75,7 @@ public function __construct($value = null, int $type = VT_EMPTY, int $codepage = class com { /** @param string|array|null $server_name */ - public function __construct(string $module_name, $server_name = UNKOWN, int $codepage = CP_ACP, string $typelib = "") {} + public function __construct(string $module_name, $server_name = UNKNOWN, int $codepage = CP_ACP, string $typelib = "") {} } #if HAVE_MSCOREE_H diff --git a/ext/com_dotnet/com_extension_arginfo.h b/ext/com_dotnet/com_extension_arginfo.h index 9d8592d5dde8b..47e41ef2683c5 100644 --- a/ext/com_dotnet/com_extension_arginfo.h +++ b/ext/com_dotnet/com_extension_arginfo.h @@ -117,7 +117,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_com___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, module_name, IS_STRING, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, server_name, "UNKOWN") + ZEND_ARG_INFO(0, server_name) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, codepage, IS_LONG, 0, "CP_ACP") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, typelib, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() diff --git a/ext/dba/dba.stub.php b/ext/dba/dba.stub.php index 9127bb96d0c08..28076db7600a9 100644 --- a/ext/dba/dba.stub.php +++ b/ext/dba/dba.stub.php @@ -22,7 +22,7 @@ function dba_exists($key, $handle): bool {} * @param int|resource $skip actually this parameter is optional, not $handle * @param resource $handle */ -function dba_fetch($key, $skip, $handle = UNKOWN): string|false {} +function dba_fetch($key, $skip, $handle = UNKNOWN): string|false {} function dba_key_split(string $key): array|false {} diff --git a/ext/dba/dba_arginfo.h b/ext/dba/dba_arginfo.h index d2907d7f31bfb..ae4b84cd946d0 100644 --- a/ext/dba/dba_arginfo.h +++ b/ext/dba/dba_arginfo.h @@ -21,7 +21,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_dba_fetch, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, key) ZEND_ARG_INFO(0, skip) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, handle, "UNKOWN") + ZEND_ARG_INFO(0, handle) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_dba_key_split, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) diff --git a/ext/snmp/snmp.stub.php b/ext/snmp/snmp.stub.php index 54740debf8fc0..11e8516a944d3 100644 --- a/ext/snmp/snmp.stub.php +++ b/ext/snmp/snmp.stub.php @@ -40,7 +40,7 @@ function snmp_set_oid_numeric_print(int $oid_format): bool {} function snmp2_get(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {} /** @param array|string $object_id */ -function snmp2_getnext(string $host, string $community, $object_id, int $timeout = UNKOWN, int $retries = UNKNOWN): array|bool {} +function snmp2_getnext(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {} /** @param array|string $object_id */ function snmp2_walk(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {} @@ -59,7 +59,7 @@ function snmp2_set(string $host, string $community, $object_id, $type, $value, i function snmp3_get(string $host, string $sec_name, string $sec_level, string $auth_protocol, string $auth_passphrase, string $priv_protocol, string $priv_passphrase, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {} /** @param array|string $object_id */ -function snmp3_getnext(string $host, string $sec_name, string $sec_level, string $auth_protocol, string $auth_passphrase, string $priv_protocol, string $priv_passphrase, $object_id, int $timeout = UNKNOWN, int $retries = UNKOWN): array|bool {} +function snmp3_getnext(string $host, string $sec_name, string $sec_level, string $auth_protocol, string $auth_passphrase, string $priv_protocol, string $priv_passphrase, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {} /** @param array|string $object_id */ function snmp3_walk(string $host, string $sec_name, string $sec_level, string $auth_protocol, string $auth_passphrase, string $priv_protocol, string $priv_passphrase, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {} diff --git a/ext/snmp/snmp_arginfo.h b/ext/snmp/snmp_arginfo.h index 8f1f95398d05c..487304f1136c3 100644 --- a/ext/snmp/snmp_arginfo.h +++ b/ext/snmp/snmp_arginfo.h @@ -45,13 +45,7 @@ ZEND_END_ARG_INFO() #define arginfo_snmp2_get arginfo_snmpget -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_snmp2_getnext, 0, 3, MAY_BE_ARRAY|MAY_BE_BOOL) - ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, community, IS_STRING, 0) - ZEND_ARG_INFO(0, object_id) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timeout, IS_LONG, 0, "UNKOWN") - ZEND_ARG_TYPE_INFO(0, retries, IS_LONG, 0) -ZEND_END_ARG_INFO() +#define arginfo_snmp2_getnext arginfo_snmpget #define arginfo_snmp2_walk arginfo_snmpget @@ -72,18 +66,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_snmp3_get, 0, 8, MAY_BE_ARRAY|MA ZEND_ARG_TYPE_INFO(0, retries, IS_LONG, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_snmp3_getnext, 0, 8, MAY_BE_ARRAY|MAY_BE_BOOL) - ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, sec_name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, sec_level, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, auth_protocol, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, auth_passphrase, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, priv_protocol, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, priv_passphrase, IS_STRING, 0) - ZEND_ARG_INFO(0, object_id) - ZEND_ARG_TYPE_INFO(0, timeout, IS_LONG, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, retries, IS_LONG, 0, "UNKOWN") -ZEND_END_ARG_INFO() +#define arginfo_snmp3_getnext arginfo_snmp3_get #define arginfo_snmp3_walk arginfo_snmp3_get From 696ae335e3ef271a50f7f901725bb48c5b25bda9 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 9 Apr 2020 14:55:55 +0200 Subject: [PATCH 081/338] Export API for fetching internal func default Make this functionality available outside reflection. --- Zend/zend_API.c | 99 +++++++++++++++++++++++++++++++ Zend/zend_API.h | 4 ++ ext/reflection/php_reflection.c | 100 +------------------------------- 3 files changed, 105 insertions(+), 98 deletions(-) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 47730ff3ed9cb..4db760482ae1f 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -30,6 +30,7 @@ #include "zend_closures.h" #include "zend_inheritance.h" #include "zend_ini.h" +#include "zend_smart_str.h" #include @@ -4309,3 +4310,101 @@ ZEND_API zend_bool zend_is_countable(zval *countable) /* {{{ */ } } /* }}} */ + +static int get_default_via_ast(zval *default_value_zval, const char *default_value) { + zend_ast *ast; + zend_arena *ast_arena; + + smart_str code = {0}; + smart_str_appends(&code, "child[0]; + + zend_arena *original_ast_arena = CG(ast_arena); + uint32_t original_compiler_options = CG(compiler_options); + zend_file_context original_file_context; + CG(ast_arena) = ast_arena; + /* Disable constant substitution, to make getDefaultValueConstant() work. */ + CG(compiler_options) |= ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION | ZEND_COMPILE_NO_PERSISTENT_CONSTANT_SUBSTITUTION; + zend_file_context_begin(&original_file_context); + zend_const_expr_to_zval(default_value_zval, const_expression_ast); + CG(ast_arena) = original_ast_arena; + CG(compiler_options) = original_compiler_options; + zend_file_context_end(&original_file_context); + + zend_ast_destroy(ast); + zend_arena_destroy(ast_arena); + + return SUCCESS; +} + +static zend_string *try_parse_string(const char *str, size_t len, char quote) { + if (len == 0) { + return ZSTR_EMPTY_ALLOC(); + } + + for (size_t i = 0; i < len; i++) { + if (str[i] == '\\' || str[i] == quote) { + return NULL; + } + } + return zend_string_init(str, len, 0); +} + +ZEND_API int zend_get_default_from_internal_arg_info( + zval *default_value_zval, zend_internal_arg_info *arg_info) +{ + const char *default_value = arg_info->default_value; + if (!default_value) { + return FAILURE; + } + + /* Avoid going through the full AST machinery for some simple and common cases. */ + size_t default_value_len = strlen(default_value); + zend_ulong lval; + if (default_value_len == sizeof("null")-1 + && !memcmp(default_value, "null", sizeof("null")-1)) { + ZVAL_NULL(default_value_zval); + return SUCCESS; + } else if (default_value_len == sizeof("true")-1 + && !memcmp(default_value, "true", sizeof("true")-1)) { + ZVAL_TRUE(default_value_zval); + return SUCCESS; + } else if (default_value_len == sizeof("false")-1 + && !memcmp(default_value, "false", sizeof("false")-1)) { + ZVAL_FALSE(default_value_zval); + return SUCCESS; + } else if (default_value_len >= 2 + && (default_value[0] == '\'' || default_value[0] == '"') + && default_value[default_value_len - 1] == default_value[0]) { + zend_string *str = try_parse_string( + default_value + 1, default_value_len - 2, default_value[0]); + if (str) { + ZVAL_STR(default_value_zval, str); + return SUCCESS; + } + } else if (default_value_len == sizeof("[]")-1 + && !memcmp(default_value, "[]", sizeof("[]")-1)) { + ZVAL_EMPTY_ARRAY(default_value_zval); + return SUCCESS; + } else if (ZEND_HANDLE_NUMERIC_STR(default_value, default_value_len, lval)) { + ZVAL_LONG(default_value_zval, lval); + return SUCCESS; + } + +#if 0 + fprintf(stderr, "Evaluating %s via AST\n", default_value); +#endif + return get_default_via_ast(default_value_zval, default_value); +} diff --git a/Zend/zend_API.h b/Zend/zend_API.h index afc2ad8a7dbdc..799f1760ba55b 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -592,6 +592,10 @@ ZEND_API zend_bool zend_is_iterable(zval *iterable); ZEND_API zend_bool zend_is_countable(zval *countable); ZEND_API ZEND_FUNCTION(display_disabled_function); + +ZEND_API int zend_get_default_from_internal_arg_info( + zval *default_value_zval, zend_internal_arg_info *arg_info); + END_EXTERN_C() #if ZEND_DEBUG diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 5f7f5270a1c9d..058d2d59d22b3 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -1292,106 +1292,10 @@ static void reflection_class_constant_factory(zend_string *name_str, zend_class_ } /* }}} */ -static int get_default_via_ast(zval *default_value_zval, const char *default_value) { - zend_ast *ast; - zend_arena *ast_arena; - - smart_str code = {0}; - smart_str_appends(&code, "child[0]; - - zend_arena *original_ast_arena = CG(ast_arena); - uint32_t original_compiler_options = CG(compiler_options); - zend_file_context original_file_context; - CG(ast_arena) = ast_arena; - /* Disable constant substitution, to make getDefaultValueConstant() work. */ - CG(compiler_options) |= ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION | ZEND_COMPILE_NO_PERSISTENT_CONSTANT_SUBSTITUTION; - zend_file_context_begin(&original_file_context); - zend_const_expr_to_zval(default_value_zval, const_expression_ast); - CG(ast_arena) = original_ast_arena; - CG(compiler_options) = original_compiler_options; - zend_file_context_end(&original_file_context); - - zend_ast_destroy(ast); - zend_arena_destroy(ast_arena); - - return SUCCESS; -} - -static zend_string *try_parse_string(const char *str, size_t len, char quote) { - if (len == 0) { - return ZSTR_EMPTY_ALLOC(); - } - - for (size_t i = 0; i < len; i++) { - if (str[i] == '\\' || str[i] == quote) { - return NULL; - } - } - return zend_string_init(str, len, 0); -} - -static int get_default_from_arg_info(zval *default_value_zval, zend_internal_arg_info *arg_info) -{ - const char *default_value = arg_info->default_value; - if (!default_value) { - return FAILURE; - } - - /* Avoid going through the full AST machinery for some simple and common cases. */ - size_t default_value_len = strlen(default_value); - zend_ulong lval; - if (default_value_len == sizeof("null")-1 - && !memcmp(default_value, "null", sizeof("null")-1)) { - ZVAL_NULL(default_value_zval); - return SUCCESS; - } else if (default_value_len == sizeof("true")-1 - && !memcmp(default_value, "true", sizeof("true")-1)) { - ZVAL_TRUE(default_value_zval); - return SUCCESS; - } else if (default_value_len == sizeof("false")-1 - && !memcmp(default_value, "false", sizeof("false")-1)) { - ZVAL_FALSE(default_value_zval); - return SUCCESS; - } else if (default_value_len >= 2 - && (default_value[0] == '\'' || default_value[0] == '"') - && default_value[default_value_len - 1] == default_value[0]) { - zend_string *str = try_parse_string( - default_value + 1, default_value_len - 2, default_value[0]); - if (str) { - ZVAL_STR(default_value_zval, str); - return SUCCESS; - } - } else if (default_value_len == sizeof("[]")-1 - && !memcmp(default_value, "[]", sizeof("[]")-1)) { - ZVAL_EMPTY_ARRAY(default_value_zval); - return SUCCESS; - } else if (ZEND_HANDLE_NUMERIC_STR(default_value, default_value_len, lval)) { - ZVAL_LONG(default_value_zval, lval); - return SUCCESS; - } - -#if 0 - fprintf(stderr, "Evaluating %s via AST\n", default_value); -#endif - return get_default_via_ast(default_value_zval, default_value); -} - static int get_parameter_default(zval *result, parameter_reference *param) { if (param->fptr->type == ZEND_INTERNAL_FUNCTION) { - return get_default_from_arg_info(result, (zend_internal_arg_info*) param->arg_info); + return zend_get_default_from_internal_arg_info( + result, (zend_internal_arg_info *) param->arg_info); } else { zval *default_value = get_default_from_recv((zend_op_array *) param->fptr, param->offset); if (!default_value) { From d030ddb2cd27099dfd0d6a885b9aa9c9bdc3843c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 9 Apr 2020 15:06:53 +0200 Subject: [PATCH 082/338] Export the zend_string_concat3() API --- Zend/zend_API.c | 12 ++++-------- Zend/zend_compile.c | 19 +++---------------- Zend/zend_string.c | 16 ++++++++++++++++ Zend/zend_string.h | 5 +++++ ext/opcache/Optimizer/compact_literals.c | 13 ++++--------- 5 files changed, 32 insertions(+), 33 deletions(-) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 4db760482ae1f..1b132d64c90dc 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -30,7 +30,6 @@ #include "zend_closures.h" #include "zend_inheritance.h" #include "zend_ini.h" -#include "zend_smart_str.h" #include @@ -4315,14 +4314,11 @@ static int get_default_via_ast(zval *default_value_zval, const char *default_val zend_ast *ast; zend_arena *ast_arena; - smart_str code = {0}; - smart_str_appends(&code, "function_name) { if (op_array->scope) { - ZVAL_NEW_STR(zv, zend_concat3( + ZVAL_NEW_STR(zv, zend_string_concat3( ZSTR_VAL(op_array->scope->name), ZSTR_LEN(op_array->scope->name), "::", 2, ZSTR_VAL(op_array->function_name), ZSTR_LEN(op_array->function_name))); @@ -8566,7 +8553,7 @@ void zend_compile_const_expr_class_const(zend_ast **ast_ptr) /* {{{ */ zend_string_addref(class_name); } - name = zend_concat3( + name = zend_string_concat3( ZSTR_VAL(class_name), ZSTR_LEN(class_name), "::", 2, ZSTR_VAL(const_name), ZSTR_LEN(const_name)); zend_ast_destroy(ast); diff --git a/Zend/zend_string.c b/Zend/zend_string.c index 75e7e6249f48a..3caeeb7a9ac3e 100644 --- a/Zend/zend_string.c +++ b/Zend/zend_string.c @@ -461,3 +461,19 @@ ZEND_API zend_bool ZEND_FASTCALL I_WRAP_SONAME_FNNAME_ZU(NONE,zend_string_equal_ #endif #endif + +ZEND_API zend_string *zend_string_concat3( + const char *str1, size_t str1_len, + const char *str2, size_t str2_len, + const char *str3, size_t str3_len) +{ + size_t len = str1_len + str2_len + str3_len; + zend_string *res = zend_string_alloc(len, 0); + + memcpy(ZSTR_VAL(res), str1, str1_len); + memcpy(ZSTR_VAL(res) + str1_len, str2, str2_len); + memcpy(ZSTR_VAL(res) + str1_len + str2_len, str3, str3_len); + ZSTR_VAL(res)[len] = '\0'; + + return res; +} diff --git a/Zend/zend_string.h b/Zend/zend_string.h index f2076beee10c8..bb75d816c4411 100644 --- a/Zend/zend_string.h +++ b/Zend/zend_string.h @@ -34,6 +34,11 @@ ZEND_API zend_ulong ZEND_FASTCALL zend_string_hash_func(zend_string *str); ZEND_API zend_ulong ZEND_FASTCALL zend_hash_func(const char *str, size_t len); ZEND_API zend_string* ZEND_FASTCALL zend_interned_string_find_permanent(zend_string *str); +ZEND_API zend_string *zend_string_concat3( + const char *str1, size_t str1_len, + const char *str2, size_t str2_len, + const char *str3, size_t str3_len); + ZEND_API void zend_interned_strings_init(void); ZEND_API void zend_interned_strings_dtor(void); ZEND_API void zend_interned_strings_activate(void); diff --git a/ext/opcache/Optimizer/compact_literals.c b/ext/opcache/Optimizer/compact_literals.c index bd49891429db9..f6f32e45145fe 100644 --- a/ext/opcache/Optimizer/compact_literals.c +++ b/ext/opcache/Optimizer/compact_literals.c @@ -92,19 +92,14 @@ static uint32_t add_static_slot(HashTable *hash, int *cache_size) { uint32_t ret; - zend_string *key; - size_t key_len; zval *class_name = &op_array->literals[op1]; zval *prop_name = &op_array->literals[op2]; zval *pos, tmp; - key_len = Z_STRLEN_P(class_name) + sizeof("::") - 1 + Z_STRLEN_P(prop_name); - key = zend_string_alloc(key_len, 0); - memcpy(ZSTR_VAL(key), Z_STRVAL_P(class_name), Z_STRLEN_P(class_name)); - memcpy(ZSTR_VAL(key) + Z_STRLEN_P(class_name), "::", sizeof("::") - 1); - memcpy(ZSTR_VAL(key) + Z_STRLEN_P(class_name) + sizeof("::") - 1, - Z_STRVAL_P(prop_name), - Z_STRLEN_P(prop_name) + 1); + zend_string *key = zend_string_concat3( + Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), + "::", sizeof("::") - 1, + Z_STRVAL_P(prop_name), Z_STRLEN_P(prop_name)); ZSTR_H(key) = zend_string_hash_func(key); ZSTR_H(key) += kind; From 2d1bf6970daef6a538a1f61334c81da584a6cd07 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 9 Apr 2020 15:39:11 +0200 Subject: [PATCH 083/338] Add Z_PARAM_RESOURCE_OR_NULL() As a more explicit alternative to Z_PARAM_RESOURCE_EX(, 1, 0). --- Zend/zend_API.h | 3 +++ ext/standard/file.c | 20 ++++++++++---------- ext/standard/url.c | 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 799f1760ba55b..16efa3422216e 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -1517,6 +1517,9 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_value_error(uint32_t arg_num #define Z_PARAM_RESOURCE(dest) \ Z_PARAM_RESOURCE_EX(dest, 0, 0) +#define Z_PARAM_RESOURCE_OR_NULL(dest) \ + Z_PARAM_RESOURCE_EX(dest, 1, 0) + /* old "s" */ #define Z_PARAM_STRING_EX2(dest, dest_len, check_null, deref, separate) \ Z_PARAM_PROLOGUE(deref, separate); \ diff --git a/ext/standard/file.c b/ext/standard/file.c index 5cde0ef978152..f6a75946d1440 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -534,7 +534,7 @@ PHP_FUNCTION(file_get_contents) Z_PARAM_PATH(filename, filename_len) Z_PARAM_OPTIONAL Z_PARAM_BOOL(use_include_path) - Z_PARAM_RESOURCE_EX(zcontext, 1, 0) + Z_PARAM_RESOURCE_OR_NULL(zcontext) Z_PARAM_LONG(offset) Z_PARAM_LONG(maxlen) ZEND_PARSE_PARAMETERS_END(); @@ -593,7 +593,7 @@ PHP_FUNCTION(file_put_contents) Z_PARAM_ZVAL(data) Z_PARAM_OPTIONAL Z_PARAM_LONG(flags) - Z_PARAM_RESOURCE_EX(zcontext, 1, 0) + Z_PARAM_RESOURCE_OR_NULL(zcontext) ZEND_PARSE_PARAMETERS_END(); if (Z_TYPE_P(data) == IS_RESOURCE) { @@ -738,7 +738,7 @@ PHP_FUNCTION(file) Z_PARAM_PATH(filename, filename_len) Z_PARAM_OPTIONAL Z_PARAM_LONG(flags) - Z_PARAM_RESOURCE_EX(zcontext, 1, 0) + Z_PARAM_RESOURCE_OR_NULL(zcontext) ZEND_PARSE_PARAMETERS_END(); if (flags < 0 || flags > (PHP_FILE_USE_INCLUDE_PATH | PHP_FILE_IGNORE_NEW_LINES | PHP_FILE_SKIP_EMPTY_LINES | PHP_FILE_NO_DEFAULT_CONTEXT)) { @@ -879,7 +879,7 @@ PHP_FUNCTION(fopen) Z_PARAM_STRING(mode, mode_len) Z_PARAM_OPTIONAL Z_PARAM_BOOL(use_include_path) - Z_PARAM_RESOURCE_EX(zcontext, 1, 0) + Z_PARAM_RESOURCE_OR_NULL(zcontext) ZEND_PARSE_PARAMETERS_END(); context = php_stream_context_from_zval(zcontext, 0); @@ -1296,7 +1296,7 @@ PHP_FUNCTION(mkdir) Z_PARAM_OPTIONAL Z_PARAM_LONG(mode) Z_PARAM_BOOL(recursive) - Z_PARAM_RESOURCE_EX(zcontext, 1, 0) + Z_PARAM_RESOURCE_OR_NULL(zcontext) ZEND_PARSE_PARAMETERS_END(); context = php_stream_context_from_zval(zcontext, 0); @@ -1317,7 +1317,7 @@ PHP_FUNCTION(rmdir) ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_PATH(dir, dir_len) Z_PARAM_OPTIONAL - Z_PARAM_RESOURCE_EX(zcontext, 1, 0) + Z_PARAM_RESOURCE_OR_NULL(zcontext) ZEND_PARSE_PARAMETERS_END(); context = php_stream_context_from_zval(zcontext, 0); @@ -1342,7 +1342,7 @@ PHP_FUNCTION(readfile) Z_PARAM_PATH(filename, filename_len) Z_PARAM_OPTIONAL Z_PARAM_BOOL(use_include_path) - Z_PARAM_RESOURCE_EX(zcontext, 1, 0) + Z_PARAM_RESOURCE_OR_NULL(zcontext) ZEND_PARSE_PARAMETERS_END(); context = php_stream_context_from_zval(zcontext, 0); @@ -1419,7 +1419,7 @@ PHP_FUNCTION(rename) Z_PARAM_PATH(old_name, old_name_len) Z_PARAM_PATH(new_name, new_name_len) Z_PARAM_OPTIONAL - Z_PARAM_RESOURCE_EX(zcontext, 1, 0) + Z_PARAM_RESOURCE_OR_NULL(zcontext) ZEND_PARSE_PARAMETERS_END(); wrapper = php_stream_locate_url_wrapper(old_name, NULL, 0); @@ -1458,7 +1458,7 @@ PHP_FUNCTION(unlink) ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_PATH(filename, filename_len) Z_PARAM_OPTIONAL - Z_PARAM_RESOURCE_EX(zcontext, 1, 0) + Z_PARAM_RESOURCE_OR_NULL(zcontext) ZEND_PARSE_PARAMETERS_END(); context = php_stream_context_from_zval(zcontext, 0); @@ -1603,7 +1603,7 @@ PHP_FUNCTION(copy) Z_PARAM_PATH(source, source_len) Z_PARAM_PATH(target, target_len) Z_PARAM_OPTIONAL - Z_PARAM_RESOURCE_EX(zcontext, 1, 0) + Z_PARAM_RESOURCE_OR_NULL(zcontext) ZEND_PARSE_PARAMETERS_END(); if (php_check_open_basedir(source)) { diff --git a/ext/standard/url.c b/ext/standard/url.c index f2ef2c16d93a9..e3e04a9cd9e58 100644 --- a/ext/standard/url.c +++ b/ext/standard/url.c @@ -672,7 +672,7 @@ PHP_FUNCTION(get_headers) Z_PARAM_PATH(url, url_len) Z_PARAM_OPTIONAL Z_PARAM_LONG(format) - Z_PARAM_RESOURCE_EX(zcontext, 1, 0) + Z_PARAM_RESOURCE_OR_NULL(zcontext) ZEND_PARSE_PARAMETERS_END(); context = php_stream_context_from_zval(zcontext, 0); From 217dfc0832ce0fca48d7d7a70e7b6057520cb529 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 9 Apr 2020 15:36:29 +0200 Subject: [PATCH 084/338] Accept null context in stream_socket_(client|server) --- ext/standard/basic_functions.stub.php | 4 ++-- ext/standard/streamsfuncs.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 0c1c1ee380de5..557151a31d16a 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -1260,13 +1260,13 @@ function stream_filter_append($stream, string $filtername, int $read_write = 0, function stream_filter_remove($stream_filter): bool {} /** - * @param resource $context + * @param resource|null $context * @return resource|false */ function stream_socket_client(string $remote_socket, &$errno = null, &$errstr = null, float $timeout = STREAM_CLIENT_CONNECT, int $flags = UNKNOWN, $context = null) {} /** - * @param resource $context + * @param resource|null $context * @return resource|false */ function stream_socket_server(string $local_socket, &$errno = null, &$errstr = null, int $flags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $context = null) {} diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index 1bc338dc92f52..4922fdf4cc895 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -109,7 +109,7 @@ PHP_FUNCTION(stream_socket_client) Z_PARAM_ZVAL(zerrstr) Z_PARAM_DOUBLE(timeout) Z_PARAM_LONG(flags) - Z_PARAM_RESOURCE(zcontext) + Z_PARAM_RESOURCE_OR_NULL(zcontext) ZEND_PARSE_PARAMETERS_END(); context = php_stream_context_from_zval(zcontext, flags & PHP_FILE_NO_DEFAULT_CONTEXT); @@ -194,7 +194,7 @@ PHP_FUNCTION(stream_socket_server) Z_PARAM_ZVAL(zerrno) Z_PARAM_ZVAL(zerrstr) Z_PARAM_LONG(flags) - Z_PARAM_RESOURCE(zcontext) + Z_PARAM_RESOURCE_OR_NULL(zcontext) ZEND_PARSE_PARAMETERS_END(); context = php_stream_context_from_zval(zcontext, flags & PHP_FILE_NO_DEFAULT_CONTEXT); From b3f3a80f9c95ff69d9078f9f156417bdf9e91a14 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 9 Apr 2020 15:46:33 +0200 Subject: [PATCH 085/338] Make stream_socket_enable_crypto() session stream nullable --- ext/standard/basic_functions.stub.php | 2 +- ext/standard/streamsfuncs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 557151a31d16a..d0a3109a7f728 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -1289,7 +1289,7 @@ function stream_socket_sendto($socket, string $data, int $flags = 0, string $add /** * @param resource $stream - * @param resource $session_stream + * @param resource|null $session_stream */ function stream_socket_enable_crypto($stream, bool $enable, ?int $crypto_type = null, $session_stream = null): int|bool {} diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index 4922fdf4cc895..e8fd16d3dfc04 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -1495,7 +1495,7 @@ PHP_FUNCTION(stream_socket_enable_crypto) Z_PARAM_BOOL(enable) Z_PARAM_OPTIONAL Z_PARAM_LONG_OR_NULL(cryptokind, cryptokindnull) - Z_PARAM_RESOURCE(zsessstream) + Z_PARAM_RESOURCE_OR_NULL(zsessstream) ZEND_PARSE_PARAMETERS_END(); php_stream_from_zval(stream, zstream); From 1dcb559664277a2605eae4ca5c82310afa5a6d5f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 9 Apr 2020 15:52:05 +0200 Subject: [PATCH 086/338] Mark array_walk $userdata arg as UNKNOWN It makes a difference whether this arg is not passed or is null. --- ext/standard/basic_functions.stub.php | 4 ++-- ext/standard/basic_functions_arginfo.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index d0a3109a7f728..bde3924c5fcb4 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -120,9 +120,9 @@ function min($arg, ...$args) {} /** @return mixed */ function max($arg, ...$args) {} -function array_walk(array|object &$input, callable $funcname, $userdata = null): bool {} +function array_walk(array|object &$input, callable $funcname, $userdata = UNKNOWN): bool {} -function array_walk_recursive(array|object &$input, callable $funcname, $userdata = null): bool {} +function array_walk_recursive(array|object &$input, callable $funcname, $userdata = UNKNOWN): bool {} function in_array($needle, array $haystack, bool $strict = false): bool {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 575a998b68b5f..4ecc09fe438fc 100755 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -140,7 +140,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_walk, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_MASK(1, input, MAY_BE_ARRAY|MAY_BE_OBJECT, NULL) ZEND_ARG_TYPE_INFO(0, funcname, IS_CALLABLE, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, userdata, "null") + ZEND_ARG_INFO(0, userdata) ZEND_END_ARG_INFO() #define arginfo_array_walk_recursive arginfo_array_walk From 258c4dfdb2255fae480f9ba0a9b64a9680cea00f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 9 Apr 2020 16:01:44 +0200 Subject: [PATCH 087/338] Mark rand/mt_rand args as UNKNOWN The second argument should be mt_getrandmax(), not PHP_INT_MAX. Additionally this function only accepts either zero or two arguments, so err on the side of being conservative and mark both UNKNOWN. --- ext/standard/basic_functions.stub.php | 4 ++-- ext/standard/basic_functions_arginfo.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index bde3924c5fcb4..40b424040f1ed 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -1194,9 +1194,9 @@ function mt_srand(int $seed = 0, int $mode = MT_RAND_MT19937): void {} /** @alias mt_srand */ function srand(int $seed = 0, int $mode = MT_RAND_MT19937): void {} -function rand(int $min = 0, int $max = PHP_INT_MAX): int {} +function rand(int $min = UNKNOWN, int $max = UNKNOWN): int {} -function mt_rand(int $min = 0, int $max = PHP_INT_MAX): int {} +function mt_rand(int $min = UNKNOWN, int $max = UNKNOWN): int {} function mt_getrandmax(): int {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 4ecc09fe438fc..aca009456ee20 100755 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1827,8 +1827,8 @@ ZEND_END_ARG_INFO() #define arginfo_srand arginfo_mt_srand ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_rand, 0, 0, IS_LONG, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, min, IS_LONG, 0, "0") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, max, IS_LONG, 0, "PHP_INT_MAX") + ZEND_ARG_TYPE_INFO(0, min, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, max, IS_LONG, 0) ZEND_END_ARG_INFO() #define arginfo_mt_rand arginfo_rand From 87ba975e31bc2430f34a0d1512ced04b291e7b97 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 9 Apr 2020 16:06:37 +0200 Subject: [PATCH 088/338] Make touch() $atime parameter UNKNOWN The actual default here is $time, not 0. --- ext/standard/basic_functions.stub.php | 2 +- ext/standard/basic_functions_arginfo.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 40b424040f1ed..3554b77feee24 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -942,7 +942,7 @@ function lchgrp(string $filename, $group): bool {} function chmod(string $filename, int $mode): bool {} #if HAVE_UTIME -function touch(string $filename, int $time = 0, int $atime = 0): bool {} +function touch(string $filename, int $time = 0, int $atime = UNKNOWN): bool {} #endif function clearstatcache(bool $clear_realpath_cache = false, string $filename = ""): void {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index aca009456ee20..121380b7114b7 100755 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1443,7 +1443,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_touch, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, time, IS_LONG, 0, "0") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, atime, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO(0, atime, IS_LONG, 0) ZEND_END_ARG_INFO() #endif From 62e8dcbc48a8f3e391cf0b111dcb3e0d708be104 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 9 Apr 2020 14:51:55 +0200 Subject: [PATCH 089/338] Change parameter default to always available value `SIGTERM` is only defined in ext/pcntl, and as such never available on Windows. Moving the constant to ext/standard does not make much sense, because that parameter is actually unused on Windows. Therefore, we use the magic number `15` instead, what is also done in the PHP manual. --- ext/standard/basic_functions.stub.php | 2 +- ext/standard/basic_functions_arginfo.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 3554b77feee24..e3f6e4146ef1f 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -1175,7 +1175,7 @@ function proc_open($cmd, array $descriptorspec, &$pipes, ?string $cwd = null, ?a function proc_close($process): int {} /** @param resource $process */ -function proc_terminate($process, int $signal = SIGTERM): bool {} +function proc_terminate($process, int $signal = 15): bool {} /** @param resource $process */ function proc_get_status($process): array {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 121380b7114b7..73fab38357927 100755 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1805,7 +1805,7 @@ ZEND_END_ARG_INFO() #if defined(PHP_CAN_SUPPORT_PROC_OPEN) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_proc_terminate, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, process) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, signal, IS_LONG, 0, "SIGTERM") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, signal, IS_LONG, 0, "15") ZEND_END_ARG_INFO() #endif From 636c827aa2f72deb6d4f431a95b39a182b32dbeb Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 9 Apr 2020 16:21:48 +0200 Subject: [PATCH 090/338] Mark fgets() argument as UNKNOWN If no value is passed, this reads as much as necessary, not 1024 bytes. --- ext/standard/basic_functions.stub.php | 2 +- ext/standard/basic_functions_arginfo.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index e3f6e4146ef1f..067797111c047 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -801,7 +801,7 @@ function feof($handle): bool {} function fgetc($handle): string|false {} /** @param resource $handle */ -function fgets($handle, int $length = 1024): string|false {} +function fgets($handle, int $length = UNKNOWN): string|false {} /** @param resource $handle */ function fread($handle, int $length): string|false {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 73fab38357927..8fb731f912ebf 100755 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1229,7 +1229,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_fgets, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, handle) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "1024") + ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_fread, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) From 8a5b9cbc9f5b44c8e7dca3de27d1b258b88b2a34 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 9 Apr 2020 16:42:26 +0200 Subject: [PATCH 091/338] Fix mysqli_get_client_info() stub The dummy link argument is not nullable. --- ext/mysqli/mysqli.stub.php | 2 +- ext/mysqli/mysqli_arginfo.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/mysqli/mysqli.stub.php b/ext/mysqli/mysqli.stub.php index 58132a198d8e0..9a545296097ea 100644 --- a/ext/mysqli/mysqli.stub.php +++ b/ext/mysqli/mysqli.stub.php @@ -360,7 +360,7 @@ function mysqli_get_client_stats(): array {} function mysqli_get_charset(mysqli $mysqli_link): ?object {} -function mysqli_get_client_info(?mysqli $mysqli_link = null): ?string {} +function mysqli_get_client_info(mysqli $mysqli_link = UNKNOWN): ?string {} function mysqli_get_client_version(): int {} diff --git a/ext/mysqli/mysqli_arginfo.h b/ext/mysqli/mysqli_arginfo.h index 90ac950f016f4..7ab37584fbd63 100644 --- a/ext/mysqli/mysqli_arginfo.h +++ b/ext/mysqli/mysqli_arginfo.h @@ -144,7 +144,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_get_charset, 0, 1, IS_OBJ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_get_client_info, 0, 0, IS_STRING, 1) - ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, mysqli_link, mysqli, 1, "null") + ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) ZEND_END_ARG_INFO() #define arginfo_mysqli_get_client_version arginfo_mysqli_connect_errno From c10f30fdf9d7b7e03523e7266b2f0a5fc07595d9 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 9 Apr 2020 16:47:39 +0200 Subject: [PATCH 092/338] Mark spl_autoload_register function arg as UNKNOWN Not passing any parameters to this function has magic behavior. --- ext/spl/php_spl.stub.php | 2 +- ext/spl/php_spl_arginfo.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/spl/php_spl.stub.php b/ext/spl/php_spl.stub.php index b9c5335b70f4c..1ff967358e70b 100755 --- a/ext/spl/php_spl.stub.php +++ b/ext/spl/php_spl.stub.php @@ -15,7 +15,7 @@ function spl_autoload_extensions(string $file_extensions = UNKNOWN): string {} function spl_autoload_functions(): array|false {} -function spl_autoload_register($autoload_function = null, bool $throw = true, bool $prepend = false): bool {} +function spl_autoload_register($autoload_function = UNKNOWN, bool $throw = true, bool $prepend = false): bool {} function spl_autoload_unregister($autoload_function): bool {} diff --git a/ext/spl/php_spl_arginfo.h b/ext/spl/php_spl_arginfo.h index 8dbb9c4d847c6..29e813b551a9e 100644 --- a/ext/spl/php_spl_arginfo.h +++ b/ext/spl/php_spl_arginfo.h @@ -29,7 +29,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_spl_autoload_functions, 0, 0, MA ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_spl_autoload_register, 0, 0, _IS_BOOL, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, autoload_function, "null") + ZEND_ARG_INFO(0, autoload_function) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, throw, _IS_BOOL, 0, "true") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, prepend, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() From fcc6da3e42750094b9bad92103f5704fb4af7989 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 9 Apr 2020 16:50:46 +0200 Subject: [PATCH 093/338] Mark $time argument of touch() as UNKNOWN as well For some reason I thought that passing 0 is same as current time, but that's not the case. --- ext/standard/basic_functions.stub.php | 2 +- ext/standard/basic_functions_arginfo.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 067797111c047..f63a5dbae6f66 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -942,7 +942,7 @@ function lchgrp(string $filename, $group): bool {} function chmod(string $filename, int $mode): bool {} #if HAVE_UTIME -function touch(string $filename, int $time = 0, int $atime = UNKNOWN): bool {} +function touch(string $filename, int $time = UNKNOWN, int $atime = UNKNOWN): bool {} #endif function clearstatcache(bool $clear_realpath_cache = false, string $filename = ""): void {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 8fb731f912ebf..f5ff383d24a94 100755 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1442,7 +1442,7 @@ ZEND_END_ARG_INFO() #if HAVE_UTIME ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_touch, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, time, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO(0, time, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, atime, IS_LONG, 0) ZEND_END_ARG_INFO() #endif From 66f2ebe4482738dd45d2eee233e6c306d880e811 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 9 Apr 2020 19:31:18 +0300 Subject: [PATCH 094/338] Register allocator refactoring --- ext/opcache/jit/zend_jit.c | 84 +++++++++++++++++++++---------- ext/opcache/jit/zend_jit.h | 20 ++++++-- ext/opcache/jit/zend_jit_x86.dasc | 14 +++--- ext/opcache/jit/zend_jit_x86.h | 6 +-- 4 files changed, 83 insertions(+), 41 deletions(-) diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index b5c4ca82d7d9b..2ff1b07eec7ba 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -133,6 +133,19 @@ static zend_bool zend_ssa_is_last_use(const zend_op_array *op_array, const zend_ return use < 0 || zend_ssa_is_no_val_use(op_array->opcodes + use, ssa->ops + use, var); } +static zend_bool zend_ival_is_last_use(const zend_lifetime_interval *ival, int use) +{ + if (ival->flags & ZREG_LAST_USE) { + const zend_life_range *range = &ival->range; + + while (range->next) { + range = range->next; + } + return range->end == use; + } + return 0; +} + static zend_bool zend_is_commutative(zend_uchar opcode) { return @@ -702,9 +715,7 @@ static int zend_jit_add_range(zend_lifetime_interval **intervals, int var, uint3 } ival->ssa_var = var; ival->reg = ZREG_NONE; - ival->split = 0; - ival->store = 0; - ival->load = 0; + ival->flags = 0; ival->range.start = from; ival->range.end = to; ival->range.next = NULL; @@ -831,13 +842,12 @@ static int zend_jit_split_interval(zend_lifetime_interval *current, uint32_t pos } } - current->store = 1; + current->flags |= ZREG_STORE; ival->ssa_var = current->ssa_var; ival->reg = ZREG_NONE; - ival->split = 1; - ival->store = 0; - ival->load = 1; + ival->flags |= ZREG_SPLIT | ZREG_LOAD; + ival->flags &= ZREG_STORE; ival->hint = NULL; do { @@ -1431,7 +1441,7 @@ static int zend_jit_try_allocate_free_reg(const zend_op_array *op_array, zend_ss /* See "Linear Scan Register Allocation on SSA Form", Christian Wimmer and Michael Franz, CGO'10 (2010), Figure 6. */ - if (current->split) { + if (current->flags & ZREG_SPLIT) { /* for each interval it in inactive intersecting with current do */ /* freeUntilPos[it.reg] = next intersection of it with current */ it = inactive; @@ -1451,9 +1461,13 @@ static int zend_jit_try_allocate_free_reg(const zend_op_array *op_array, zend_ss range = ¤t->range; do { uint32_t line = range->start; + uint32_t last_use_line = (uint32_t)-1; zend_regset regset; zend_reg reg; + if ((current->flags & ZREG_LAST_USE) && !range->next) { + last_use_line = range->end; + } if (ssa->ops[line].op1_def == current->ssa_var || ssa->ops[line].op2_def == current->ssa_var || ssa->ops[line].result_def == current->ssa_var) { @@ -1463,7 +1477,7 @@ static int zend_jit_try_allocate_free_reg(const zend_op_array *op_array, zend_ss regset = zend_jit_get_scratch_regset( op_array->opcodes + line, ssa->ops + line, - op_array, ssa, current->ssa_var); + op_array, ssa, current->ssa_var, line == last_use_line); ZEND_REGSET_FOREACH(regset, reg) { if (line < freeUntilPos[reg]) { freeUntilPos[reg] = line; @@ -1717,6 +1731,22 @@ static zend_lifetime_interval** zend_jit_allocate_registers(const zend_op_array goto failure; } + if (list) { + /* Set ZREG_LAST_USE flags */ + ival = list; + while (ival) { + zend_life_range *range = &ival->range; + + while (range->next) { + range = range->next; + } + if (zend_ssa_is_last_use(op_array, ssa, ival->ssa_var, range->end)) { + ival->flags |= ZREG_LAST_USE; + } + ival = ival->list_next; + } + } + if (list) { if (ZCG(accel_directives).jit_debug & ZEND_JIT_DEBUG_REG_ALLOC) { fprintf(stderr, "Live Ranges \"%s\"\n", op_array->function_name ? ZSTR_VAL(op_array->function_name) : "[main]"); @@ -1733,10 +1763,10 @@ static zend_lifetime_interval** zend_jit_allocate_registers(const zend_op_array fprintf(stderr, ", %u-%u", range->start, range->end); range = range->next; } - if (ival->load) { + if (ival->flags & ZREG_LOAD) { fprintf(stderr, " load"); } - if (ival->store) { + if (ival->flags & ZREG_STORE) { fprintf(stderr, " store"); } if (ival->hint) { @@ -1781,13 +1811,13 @@ static zend_lifetime_interval** zend_jit_allocate_registers(const zend_op_array src = phi->sources[0]; if (intervals[i]) { if (!intervals[src]) { - intervals[i]->load = 1; + intervals[i]->flags |= ZREG_LOAD; } else if (intervals[i]->reg != intervals[src]->reg) { - intervals[i]->load = 1; - intervals[src]->store = 1; + intervals[i]->flags |= ZREG_LOAD; + intervals[src]->flags |= ZREG_STORE; } } else if (intervals[src]) { - intervals[src]->store = 1; + intervals[src]->flags |= ZREG_STORE; } } } else { @@ -1815,7 +1845,7 @@ static zend_lifetime_interval** zend_jit_allocate_registers(const zend_op_array } if (need_move) { if (intervals[i]) { - intervals[i]->load = 1; + intervals[i]->flags |= ZREG_LOAD; } for (k = 0; k < ssa->cfg.blocks[phi->block].predecessors_count; k++) { src = phi->sources[k]; @@ -1827,7 +1857,7 @@ static zend_lifetime_interval** zend_jit_allocate_registers(const zend_op_array src = ssa->vars[src].definition_phi->sources[0]; } if (intervals[src]) { - intervals[src]->store = 1; + intervals[src]->flags |= ZREG_STORE; } } } @@ -1838,15 +1868,15 @@ static zend_lifetime_interval** zend_jit_allocate_registers(const zend_op_array /* Remove useless register allocation */ for (i = 0; i < ssa->vars_count; i++) { if (intervals[i] && - (intervals[i]->load || - (intervals[i]->store && ssa->vars[i].definition >= 0)) && + ((intervals[i]->flags & ZREG_LOAD) || + ((intervals[i]->flags & ZREG_STORE) && ssa->vars[i].definition >= 0)) && ssa->vars[i].use_chain < 0) { zend_bool may_remove = 1; zend_ssa_phi *phi = ssa->vars[i].phi_use_chain; while (phi) { if (intervals[phi->ssa_var] && - !intervals[phi->ssa_var]->load) { + !(intervals[phi->ssa_var]->flags & ZREG_LOAD)) { may_remove = 0; break; } @@ -1860,8 +1890,8 @@ static zend_lifetime_interval** zend_jit_allocate_registers(const zend_op_array /* Remove intervals used once */ for (i = 0; i < ssa->vars_count; i++) { if (intervals[i] && - intervals[i]->load && - intervals[i]->store && + (intervals[i]->flags & ZREG_LOAD) && + (intervals[i]->flags & ZREG_STORE) && (ssa->vars[i].use_chain < 0 || zend_ssa_next_use(ssa->ops, i, ssa->vars[i].use_chain) < 0)) { zend_bool may_remove = 1; @@ -1869,7 +1899,7 @@ static zend_lifetime_interval** zend_jit_allocate_registers(const zend_op_array while (phi) { if (intervals[phi->ssa_var] && - !intervals[phi->ssa_var]->load) { + !(intervals[phi->ssa_var]->flags & ZREG_LOAD)) { may_remove = 0; break; } @@ -1899,10 +1929,10 @@ static zend_lifetime_interval** zend_jit_allocate_registers(const zend_op_array range = range->next; } fprintf(stderr, " (%s)", zend_reg_name[ival->reg]); - if (ival->load) { + if (ival->flags & ZREG_LOAD) { fprintf(stderr, " load"); } - if (ival->store) { + if (ival->flags & ZREG_STORE) { fprintf(stderr, " store"); } if (ival->hint) { @@ -2131,13 +2161,13 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op zend_lifetime_interval *ival = ra[phi->ssa_var]; if (ival) { - if (ival->load) { + if (ival->flags & ZREG_LOAD) { ZEND_ASSERT(ival->reg != ZREG_NONE); if (!zend_jit_load_var(&dasm_state, ssa->var_info[phi->ssa_var].type, ssa->vars[phi->ssa_var].var, ival->reg)) { goto jit_failure; } - } else if (ival->store) { + } else if (ival->flags & ZREG_STORE) { ZEND_ASSERT(ival->reg != ZREG_NONE); if (!zend_jit_store_var(&dasm_state, ssa->var_info[phi->ssa_var].type, ssa->vars[phi->ssa_var].var, ival->reg)) { diff --git a/ext/opcache/jit/zend_jit.h b/ext/opcache/jit/zend_jit.h index e53c88e19c4f7..cecd263eb8ad7 100644 --- a/ext/opcache/jit/zend_jit.h +++ b/ext/opcache/jit/zend_jit.h @@ -105,12 +105,24 @@ struct _zend_life_range { zend_life_range *next; }; +#define ZREG_FLAGS_SHIFT 8 + +#define ZREG_STORE (1<<0) +#define ZREG_LOAD (1<<1) +#define ZREG_LAST_USE (1<<2) +#define ZREG_SPLIT (1<<3) + struct _zend_lifetime_interval { int ssa_var; - int8_t reg; - zend_bool split; - zend_bool store; - zend_bool load; + union { + struct { + ZEND_ENDIAN_LOHI_3( + int8_t reg, + uint8_t flags, + uint16_t reserved + )}; + uint32_t reg_flags; + }; zend_life_range range; zend_lifetime_interval *hint; zend_lifetime_interval *used_as_hint; diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index b5c71f2cbb373..7fa4f108ea131 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -11114,7 +11114,7 @@ static zend_bool zend_needs_extra_reg_for_const(const zend_op_array *op_array, c return 0; } -static zend_regset zend_jit_get_scratch_regset(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, zend_ssa *ssa, int current_var) +static zend_regset zend_jit_get_scratch_regset(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, zend_ssa *ssa, int current_var, zend_bool last_use) { uint32_t op1_info, op2_info, res_info; zend_regset regset = ZEND_REGSET_SCRATCH; @@ -11222,7 +11222,7 @@ static zend_regset zend_jit_get_scratch_regset(const zend_op *opline, const zend regset = ZEND_REGSET_EMPTY; if ((op1_info & MAY_BE_LONG) && (op2_info & MAY_BE_LONG)) { if (ssa_op->result_def != current_var && - (ssa_op->op1_use != current_var || !zend_ssa_is_last_use(op_array, ssa, current_var, ssa_op - ssa->ops))) { + (ssa_op->op1_use != current_var || !last_use)) { ZEND_REGSET_INCL(regset, ZREG_R0); } res_info = OP1_INFO(); @@ -11244,14 +11244,14 @@ static zend_regset zend_jit_get_scratch_regset(const zend_op *opline, const zend } else { ZEND_REGSET_INCL(regset, ZREG_XMM0); if (ssa_op->result_def != current_var && - (ssa_op->op1_use != current_var || !zend_ssa_is_last_use(op_array, ssa, current_var, ssa_op - ssa->ops))) { + (ssa_op->op1_use != current_var || !last_use)) { ZEND_REGSET_INCL(regset, ZREG_XMM1); } } } if ((op1_info & MAY_BE_DOUBLE) && (op2_info & MAY_BE_DOUBLE)) { if (ssa_op->result_def != current_var && - (ssa_op->op1_use != current_var || !zend_ssa_is_last_use(op_array, ssa, current_var, ssa_op - ssa->ops))) { + (ssa_op->op1_use != current_var || !last_use)) { ZEND_REGSET_INCL(regset, ZREG_XMM0); } } @@ -11270,7 +11270,7 @@ static zend_regset zend_jit_get_scratch_regset(const zend_op *opline, const zend !(op2_info & ((MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF)-MAY_BE_LONG))) { regset = ZEND_REGSET_EMPTY; if (ssa_op->result_def != current_var && - (ssa_op->op1_use != current_var || !zend_ssa_is_last_use(op_array, ssa, current_var, ssa_op - ssa->ops))) { + (ssa_op->op1_use != current_var || !last_use)) { ZEND_REGSET_INCL(regset, ZREG_R0); } } @@ -11283,7 +11283,7 @@ static zend_regset zend_jit_get_scratch_regset(const zend_op *opline, const zend !(op2_info & ((MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF)-MAY_BE_LONG))) { regset = ZEND_REGSET_EMPTY; if (ssa_op->result_def != current_var && - (ssa_op->op1_use != current_var || !zend_ssa_is_last_use(op_array, ssa, current_var, ssa_op - ssa->ops))) { + (ssa_op->op1_use != current_var || !last_use)) { ZEND_REGSET_INCL(regset, ZREG_R0); } if (opline->op2_type != IS_CONST && ssa_op->op2_use != current_var) { @@ -11301,7 +11301,7 @@ static zend_regset zend_jit_get_scratch_regset(const zend_op *opline, const zend Z_TYPE_P(RT_CONSTANT(opline, opline->op2)) == IS_LONG && zend_long_is_power_of_two(Z_LVAL_P(RT_CONSTANT(opline, opline->op2)))) { if (ssa_op->result_def != current_var && - (ssa_op->op1_use != current_var || !zend_ssa_is_last_use(op_array, ssa, current_var, ssa_op - ssa->ops))) { + (ssa_op->op1_use != current_var || !last_use)) { ZEND_REGSET_INCL(regset, ZREG_R0); } } else { diff --git a/ext/opcache/jit/zend_jit_x86.h b/ext/opcache/jit/zend_jit_x86.h index 8b2365efada35..9a81c7f74b6c7 100644 --- a/ext/opcache/jit/zend_jit_x86.h +++ b/ext/opcache/jit/zend_jit_x86.h @@ -249,9 +249,9 @@ typedef uintptr_t zend_jit_addr; #define OP_REG(ssa_op, op) \ (ra && ssa_op->op >= 0 && ra[ssa_op->op] ? \ OP_REG_EX(ra[ssa_op->op]->reg, \ - ra[ssa_op->op]->store, \ - ra[ssa_op->op]->load, \ - zend_ssa_is_last_use(op_array, ssa, ssa_op->op, ssa_op - ssa->ops) \ + (ra[ssa_op->op]->flags & ZREG_STORE), \ + (ra[ssa_op->op]->flags & ZREG_LOAD), \ + zend_ival_is_last_use(ra[ssa_op->op], ssa_op - ssa->ops) \ ) : ZREG_NONE) static zend_always_inline zend_jit_addr _zend_jit_decode_op(zend_uchar op_type, znode_op op, const zend_op *opline, zend_reg reg) From d3dda1e0f10c00d6f62891685ad0b5662fd34393 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 10 Apr 2020 14:42:26 +0300 Subject: [PATCH 095/338] Fixed overflow handling --- ext/opcache/jit/zend_jit_trace.c | 4 ++++ ext/opcache/jit/zend_jit_x86.dasc | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 01ea6fa977ec5..e42970b97d7a0 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -1899,6 +1899,10 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par ssa->var_info[ssa_op->result_def].type &= ~MAY_BE_GUARD; } } + if (opline->result_type != IS_UNUSED + && (res_info & (MAY_BE_ANY|MAY_BE_GUARD)) == (MAY_BE_LONG|MAY_BE_GUARD)) { + ssa->var_info[ssa_op->result_def].type &= ~MAY_BE_GUARD; + } goto done; case ZEND_BW_OR: case ZEND_BW_AND: diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 7fa4f108ea131..df9c52ab43833 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -3411,10 +3411,14 @@ static int zend_jit_inc_dec(dasm_State **Dst, const zend_op *opline, const zend_ | LONG_OP_WITH_CONST sub, op1_def_addr, Z_L(1) } - if (may_overflow && (op1_def_info & MAY_BE_GUARD)) { + if (may_overflow && ((op1_def_info & MAY_BE_GUARD) || (opline->result_type != IS_UNUSED && (res_info & MAY_BE_GUARD)))) { int32_t exit_point = zend_jit_trace_get_exit_point(opline, opline, NULL); const void *exit_addr = zend_jit_trace_get_exit_addr(exit_point); | jo &exit_addr + if ((opline->opcode == ZEND_PRE_INC || opline->opcode == ZEND_PRE_DEC) && + opline->result_type != IS_UNUSED) { + | ZVAL_COPY_VALUE res_addr, res_use_info, op1_def_addr, MAY_BE_LONG, ZREG_R0, ZREG_R1 + } } else if (may_overflow) { | jo >1 if ((opline->opcode == ZEND_PRE_INC || opline->opcode == ZEND_PRE_DEC) && From 0a408be0d23170e94f8cccb9c0a6dd5476138145 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 10 Apr 2020 16:10:19 +0300 Subject: [PATCH 096/338] Separate zend_jit_dump_lifetime_interval() function --- ext/opcache/jit/zend_jit.c | 88 ++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 50 deletions(-) diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index 2ff1b07eec7ba..343b9457684b8 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -1692,6 +1692,42 @@ static zend_lifetime_interval* zend_jit_linear_scan(const zend_op_array *op_arra return handled; } +static void zend_jit_dump_lifetime_interval(const zend_op_array *op_array, const zend_ssa *ssa, const zend_lifetime_interval *ival) +{ + zend_life_range *range; + int var_num = ssa->vars[ival->ssa_var].var; + + fprintf(stderr, "#%d.", ival->ssa_var); + zend_dump_var(op_array, (var_num < op_array->last_var ? IS_CV : 0), var_num); + fprintf(stderr, ": %u-%u", ival->range.start, ival->range.end); + range = ival->range.next; + while (range) { + fprintf(stderr, ", %u-%u", range->start, range->end); + range = range->next; + } + if (ival->reg != ZREG_NONE) { + fprintf(stderr, " (%s)", zend_reg_name[ival->reg]); + } + if (ival->flags & ZREG_LAST_USE) { + fprintf(stderr, " last_use"); + } + if (ival->flags & ZREG_LOAD) { + fprintf(stderr, " load"); + } + if (ival->flags & ZREG_STORE) { + fprintf(stderr, " store"); + } + if (ival->hint) { + var_num = ssa->vars[ival->hint->ssa_var].var; + fprintf(stderr, " hint=#%d.", ival->hint->ssa_var); + zend_dump_var(op_array, (var_num < op_array->last_var ? IS_CV : 0), var_num); + if (ival->hint->reg != ZREG_NONE) { + fprintf(stderr, " (%s)", zend_reg_name[ival->hint->reg]); + } + } + fprintf(stderr, "\n"); +} + static zend_lifetime_interval** zend_jit_allocate_registers(const zend_op_array *op_array, zend_ssa *ssa) { void *checkpoint; @@ -1752,29 +1788,7 @@ static zend_lifetime_interval** zend_jit_allocate_registers(const zend_op_array fprintf(stderr, "Live Ranges \"%s\"\n", op_array->function_name ? ZSTR_VAL(op_array->function_name) : "[main]"); ival = list; while (ival) { - zend_life_range *range; - int var_num = ssa->vars[ival->ssa_var].var; - - fprintf(stderr, "#%d.", ival->ssa_var); - zend_dump_var(op_array, (var_num < op_array->last_var ? IS_CV : 0), var_num); - fprintf(stderr, ": %u-%u", ival->range.start, ival->range.end); - range = ival->range.next; - while (range) { - fprintf(stderr, ", %u-%u", range->start, range->end); - range = range->next; - } - if (ival->flags & ZREG_LOAD) { - fprintf(stderr, " load"); - } - if (ival->flags & ZREG_STORE) { - fprintf(stderr, " store"); - } - if (ival->hint) { - var_num = ssa->vars[ival->hint->ssa_var].var; - fprintf(stderr, " hint=#%d.", ival->hint->ssa_var); - zend_dump_var(op_array, (var_num < op_array->last_var ? IS_CV : 0), var_num); - } - fprintf(stderr, "\n"); + zend_jit_dump_lifetime_interval(op_array, ssa, ival); ival = ival->list_next; } fprintf(stderr, "\n"); @@ -1917,33 +1931,7 @@ static zend_lifetime_interval** zend_jit_allocate_registers(const zend_op_array for (i = 0; i < ssa->vars_count; i++) { ival = intervals[i]; while (ival) { - zend_life_range *range; - int var_num = ssa->vars[ival->ssa_var].var; - - fprintf(stderr, "#%d.", ival->ssa_var); - zend_dump_var(op_array, (var_num < op_array->last_var ? IS_CV : 0), var_num); - fprintf(stderr, ": %u-%u", ival->range.start, ival->range.end); - range = ival->range.next; - while (range) { - fprintf(stderr, ", %u-%u", range->start, range->end); - range = range->next; - } - fprintf(stderr, " (%s)", zend_reg_name[ival->reg]); - if (ival->flags & ZREG_LOAD) { - fprintf(stderr, " load"); - } - if (ival->flags & ZREG_STORE) { - fprintf(stderr, " store"); - } - if (ival->hint) { - var_num = ssa->vars[ival->hint->ssa_var].var; - fprintf(stderr, " hint=#%d.", ival->hint->ssa_var); - zend_dump_var(op_array, (var_num < op_array->last_var ? IS_CV : 0), var_num); - if (ival->hint->reg != ZREG_NONE) { - fprintf(stderr, " (%s)", zend_reg_name[ival->hint->reg]); - } - } - fprintf(stderr, "\n"); + zend_jit_dump_lifetime_interval(op_array, ssa, ival); ival = ival->list_next; } } From 5868aced2e37d243b09d888507a08f85604d9859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Fri, 10 Apr 2020 17:06:15 +0200 Subject: [PATCH 097/338] Fix the default parameter values of session_set_save_handler() Co-Authored-By: Christoph M. Becker --- ext/session/session.stub.php | 2 +- ext/session/session_arginfo.h | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ext/session/session.stub.php b/ext/session/session.stub.php index 09c35aae28d4f..1363b2aef4027 100644 --- a/ext/session/session.stub.php +++ b/ext/session/session.stub.php @@ -37,7 +37,7 @@ function session_register_shutdown(): void {} /** @alias session_write_close */ function session_commit(): bool {} -function session_set_save_handler($open, $close = null, $read = null, $write = null, $destroy = null, $gc = null, $create_sid = null, $validate_sid = null, $update_timestamp = null): bool {} +function session_set_save_handler($open, $close = UNKNOWN, $read = UNKNOWN, $write = UNKNOWN, $destroy = UNKNOWN, $gc = UNKNOWN, $create_sid = UNKNOWN, $validate_sid = UNKNOWN, $update_timestamp = UNKNOWN): bool {} function session_cache_limiter(string $cache_limiter = UNKNOWN): string|false {} diff --git a/ext/session/session_arginfo.h b/ext/session/session_arginfo.h index f8814376d665b..c4762eb25b609 100644 --- a/ext/session/session_arginfo.h +++ b/ext/session/session_arginfo.h @@ -58,14 +58,14 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_session_set_save_handler, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, open) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, close, "null") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, read, "null") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, write, "null") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, destroy, "null") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, gc, "null") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, create_sid, "null") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, validate_sid, "null") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, update_timestamp, "null") + ZEND_ARG_INFO(0, close) + ZEND_ARG_INFO(0, read) + ZEND_ARG_INFO(0, write) + ZEND_ARG_INFO(0, destroy) + ZEND_ARG_INFO(0, gc) + ZEND_ARG_INFO(0, create_sid) + ZEND_ARG_INFO(0, validate_sid) + ZEND_ARG_INFO(0, update_timestamp) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_session_cache_limiter, 0, 0, MAY_BE_STRING|MAY_BE_FALSE) From beff93f60ddb330cc5b04d716af3ba9cba108c8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Fri, 10 Apr 2020 17:17:12 +0200 Subject: [PATCH 098/338] Fix the default parameter values of stream_socket_client() $timeout and $flags were mixed up --- ext/standard/basic_functions.stub.php | 2 +- ext/standard/basic_functions_arginfo.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index f63a5dbae6f66..1700f3ad10cac 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -1263,7 +1263,7 @@ function stream_filter_remove($stream_filter): bool {} * @param resource|null $context * @return resource|false */ -function stream_socket_client(string $remote_socket, &$errno = null, &$errstr = null, float $timeout = STREAM_CLIENT_CONNECT, int $flags = UNKNOWN, $context = null) {} +function stream_socket_client(string $remote_socket, &$errno = null, &$errstr = null, float $timeout = UNKNOWN, int $flags = STREAM_CLIENT_CONNECT, $context = null) {} /** * @param resource|null $context diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index f5ff383d24a94..7208e2d0464d8 100755 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1908,8 +1908,8 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_client, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, remote_socket, IS_STRING, 0) ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, errno, "null") ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, errstr, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timeout, IS_DOUBLE, 0, "STREAM_CLIENT_CONNECT") - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, timeout, IS_DOUBLE, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "STREAM_CLIENT_CONNECT") ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() From 3eba187b155e548d87a57708fd66d61f63737baa Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 10 Apr 2020 17:54:59 +0200 Subject: [PATCH 099/338] Refactor and remove dead code in mb_ereg(i)_replace We do not support the 'e' option anymore. Merged together code which would emit an error if this option is present. This also makes it clearer that the whole branch in the replacement section supporting this option is never hit, thus removed. --- ext/mbstring/php_mbregex.c | 47 +++++++------------------------------- 1 file changed, 8 insertions(+), 39 deletions(-) diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index ac6a633aed7e6..cbbe3532f0aed 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -1059,8 +1059,12 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp syntax = MBREX(regex_default_syntax); } } - if (eval && !is_callable) { - php_error_docref(NULL, E_WARNING, "The 'e' option is no longer supported, use mb_ereg_replace_callback instead"); + if (eval) { + if (is_callable) { + php_error_docref(NULL, E_WARNING, "Option 'e' cannot be used with replacement callback"); + } else { + php_error_docref(NULL, E_WARNING, "The 'e' option is no longer supported, use mb_ereg_replace_callback instead"); + } RETURN_FALSE; } @@ -1070,7 +1074,7 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp RETURN_FALSE; } - if (eval || is_callable) { + if (is_callable) { pbuf = &eval_buf; description = zend_make_compiled_string_description("mbregex replace"); } else { @@ -1078,13 +1082,6 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp description = NULL; } - if (is_callable) { - if (eval) { - php_error_docref(NULL, E_WARNING, "Option 'e' cannot be used with replacement callback"); - RETURN_FALSE; - } - } - /* do the actual work */ err = 0; pos = (OnigUChar *)string; @@ -1106,35 +1103,7 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp mb_regex_substitute(pbuf, string, string_len, replace, replace_len, re, regs, enc); } - if (eval) { - zval v; - zend_string *eval_str; - /* null terminate buffer */ - smart_str_0(&eval_buf); - - if (eval_buf.s) { - eval_str = eval_buf.s; - } else { - eval_str = ZSTR_EMPTY_ALLOC(); - } - - /* do eval */ - if (zend_eval_stringl(ZSTR_VAL(eval_str), ZSTR_LEN(eval_str), &v, description) == FAILURE) { - efree(description); - zend_throw_error(NULL, "Failed evaluating code: %s%s", PHP_EOL, ZSTR_VAL(eval_str)); - onig_region_free(regs, 1); - smart_str_free(&out_buf); - smart_str_free(&eval_buf); - RETURN_FALSE; - } - - /* result of eval */ - convert_to_string(&v); - smart_str_appendl(&out_buf, Z_STRVAL(v), Z_STRLEN(v)); - /* Clean up */ - smart_str_free(&eval_buf); - zval_ptr_dtor_str(&v); - } else if (is_callable) { + if (is_callable) { zval args[1]; zval subpats, retval; int i; From 481c8c2958d33fd093c0a7934f881b68707f3012 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Fri, 10 Apr 2020 17:30:30 +0200 Subject: [PATCH 100/338] Add missing parameter to the stub of mysqli_real_connect --- ext/mysqli/mysqli.stub.php | 1 + ext/mysqli/mysqli_arginfo.h | 1 + 2 files changed, 2 insertions(+) diff --git a/ext/mysqli/mysqli.stub.php b/ext/mysqli/mysqli.stub.php index 9a545296097ea..367501580194f 100644 --- a/ext/mysqli/mysqli.stub.php +++ b/ext/mysqli/mysqli.stub.php @@ -414,6 +414,7 @@ function mysqli_real_connect( ?string $password = null, ?string $database = null, ?int $port = null, + ?string $socket = null, int $flags = 0 ): bool {} diff --git a/ext/mysqli/mysqli_arginfo.h b/ext/mysqli/mysqli_arginfo.h index 7ab37584fbd63..8645f0f34fc12 100644 --- a/ext/mysqli/mysqli_arginfo.h +++ b/ext/mysqli/mysqli_arginfo.h @@ -238,6 +238,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_real_connect, 0, 1, _IS_B ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, database, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, socket, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() From 7a72e1cc7ae8c0ca6642b175ef6f10f38c7a2a52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Fri, 10 Apr 2020 17:39:21 +0200 Subject: [PATCH 101/338] Fix the default value of the $flags parameter of mysqli_begin_transaction() --- ext/mysqli/mysqli.stub.php | 4 ++-- ext/mysqli/mysqli_arginfo.h | 15 +++++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ext/mysqli/mysqli.stub.php b/ext/mysqli/mysqli.stub.php index 367501580194f..8417225df491c 100644 --- a/ext/mysqli/mysqli.stub.php +++ b/ext/mysqli/mysqli.stub.php @@ -19,7 +19,7 @@ public function __construct( public function autocommit(bool $mode); /** @return bool */ - public function begin_transaction(int $flags = -1, string $name = UNKNOWN); + public function begin_transaction(int $flags = 0, string $name = UNKNOWN); /** @return bool */ public function change_user(string $user, string $password, ?string $database); @@ -284,7 +284,7 @@ function mysqli_affected_rows(mysqli $mysql_link): int|string {} function mysqli_autocommit(mysqli $mysql_link, bool $mode): bool {} -function mysqli_begin_transaction(mysqli $mysql_link, int $flags = -1, string $name = UNKNOWN): bool {} +function mysqli_begin_transaction(mysqli $mysql_link, int $flags = 0, string $name = UNKNOWN): bool {} function mysqli_change_user(mysqli $mysql_link, string $user, string $password, ?string $database): bool {} diff --git a/ext/mysqli/mysqli_arginfo.h b/ext/mysqli/mysqli_arginfo.h index 8645f0f34fc12..e40ba8ea09fb1 100644 --- a/ext/mysqli/mysqli_arginfo.h +++ b/ext/mysqli/mysqli_arginfo.h @@ -11,7 +11,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_begin_transaction, 0, 1, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, mysql_link, mysqli, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "-1") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -30,7 +30,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_close, 0, 1, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, mysql_link, mysqli, 0) ZEND_END_ARG_INFO() -#define arginfo_mysqli_commit arginfo_mysqli_begin_transaction +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_commit, 0, 1, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, mysql_link, mysqli, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "-1") + ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) +ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_mysqli_connect, 0, 0, mysqli, MAY_BE_NULL|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, host, IS_STRING, 1, "null") @@ -426,7 +430,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_autocommit, 0, 0, 1) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_begin_transaction, 0, 0, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "-1") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -441,7 +445,10 @@ ZEND_END_ARG_INFO() #define arginfo_class_mysqli_close arginfo_class_mysqli_character_set_name -#define arginfo_class_mysqli_commit arginfo_class_mysqli_begin_transaction +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_commit, 0, 0, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "-1") + ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) +ZEND_END_ARG_INFO() #define arginfo_class_mysqli_connect arginfo_class_mysqli___construct From ce3b49a8e81bdf4d39ca097e7699fde20998102e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Fri, 10 Apr 2020 18:03:20 +0200 Subject: [PATCH 102/338] Fix default value of the $class_name parameter of mysqli_fetch_object() --- ext/mysqli/mysqli.stub.php | 4 ++-- ext/mysqli/mysqli_arginfo.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/mysqli/mysqli.stub.php b/ext/mysqli/mysqli.stub.php index 8417225df491c..8d3dc75a9763a 100644 --- a/ext/mysqli/mysqli.stub.php +++ b/ext/mysqli/mysqli.stub.php @@ -203,7 +203,7 @@ public function fetch_array(int $result_type = MYSQLI_BOTH); public function fetch_assoc(); /** @return object|null */ - public function fetch_object(string $class_name = 'stdClass', array $params = []); + public function fetch_object(string $class_name = UNKNOWN, array $params = []); /** @return array|null */ public function fetch_row(); @@ -340,7 +340,7 @@ function mysqli_fetch_assoc(mysqli_result $mysql_result): ?array {} function mysqli_fetch_object( mysqli_result $mysqli_result, - string $class_name = 'stdClass', + string $class_name = UNKNOWN, array $params = [] ): ?object {} diff --git a/ext/mysqli/mysqli_arginfo.h b/ext/mysqli/mysqli_arginfo.h index e40ba8ea09fb1..a540a8fa23931 100644 --- a/ext/mysqli/mysqli_arginfo.h +++ b/ext/mysqli/mysqli_arginfo.h @@ -111,7 +111,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_fetch_object, 0, 1, IS_OBJECT, 1) ZEND_ARG_OBJ_INFO(0, mysqli_result, mysqli_result, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class_name, IS_STRING, 0, "\'stdClass\'") + ZEND_ARG_TYPE_INFO(0, class_name, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() @@ -601,7 +601,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_mysqli_result_fetch_assoc arginfo_class_mysqli_character_set_name ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result_fetch_object, 0, 0, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class_name, IS_STRING, 0, "\'stdClass\'") + ZEND_ARG_TYPE_INFO(0, class_name, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() From 4aa137c6a624f4f03b04bea60d61872ec490e4f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Fri, 10 Apr 2020 18:04:17 +0200 Subject: [PATCH 103/338] Fix the default value of the $length parameter of grapheme_substr() --- ext/intl/php_intl.stub.php | 2 +- ext/intl/php_intl_arginfo.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/intl/php_intl.stub.php b/ext/intl/php_intl.stub.php index dbe905dbeff88..3154996f00b5a 100644 --- a/ext/intl/php_intl.stub.php +++ b/ext/intl/php_intl.stub.php @@ -245,7 +245,7 @@ function grapheme_strrpos(string $haystack, string $needle, int $offset = 0): in function grapheme_strripos(string $haystack, string $needle, int $offset = 0): int|false {} -function grapheme_substr(string $string, int $start, ?int $length = 0): string|false {} +function grapheme_substr(string $string, int $start, ?int $length = null): string|false {} function grapheme_strstr(string $haystack, string $needle, bool $before_needle = false): string|false {} diff --git a/ext/intl/php_intl_arginfo.h b/ext/intl/php_intl_arginfo.h index ece7aa6ef5f7a..a0a7aa9133e86 100644 --- a/ext/intl/php_intl_arginfo.h +++ b/ext/intl/php_intl_arginfo.h @@ -463,7 +463,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_grapheme_substr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_grapheme_strstr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) From fe9860c2b00668b1afd2205b49d9636aba3da21b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Thu, 9 Apr 2020 09:46:44 +0200 Subject: [PATCH 104/338] Improve the default value format in incompatible signature error messages Closes GH-5361 --- Zend/tests/argument_restriction_001.phpt | 2 +- Zend/tests/argument_restriction_002.phpt | 2 +- Zend/tests/argument_restriction_003.phpt | 2 +- Zend/tests/argument_restriction_006.phpt | 2 +- Zend/tests/bug64988.phpt | 2 +- Zend/tests/bug71428.1.phpt | 2 +- Zend/tests/bug72119.phpt | 2 +- Zend/tests/bug73987.phpt | 2 +- Zend/tests/bug73987_2.phpt | 2 +- Zend/tests/objects_006.phpt | 2 +- Zend/tests/objects_007.phpt | 2 +- .../tests/type_declarations/variance/internal_parent.phpt | 2 +- .../adding_additional_optional_parameter_error.phpt | 2 +- Zend/zend_inheritance.c | 8 ++++++-- 14 files changed, 19 insertions(+), 15 deletions(-) diff --git a/Zend/tests/argument_restriction_001.phpt b/Zend/tests/argument_restriction_001.phpt index 47739dd29e96c..2c54636a58178 100644 --- a/Zend/tests/argument_restriction_001.phpt +++ b/Zend/tests/argument_restriction_001.phpt @@ -13,4 +13,4 @@ class Sub extends Base { } ?> --EXPECTF-- -Fatal error: Declaration of & Sub::test() must be compatible with & Base::test($foo, array $bar, $option = NULL, $extra = 'llllllllll...') in %s on line %d +Fatal error: Declaration of & Sub::test() must be compatible with & Base::test($foo, array $bar, $option = null, $extra = 'llllllllll...') in %s on line %d diff --git a/Zend/tests/argument_restriction_002.phpt b/Zend/tests/argument_restriction_002.phpt index f80e9779ff66c..0dd0388bd3a5d 100644 --- a/Zend/tests/argument_restriction_002.phpt +++ b/Zend/tests/argument_restriction_002.phpt @@ -13,4 +13,4 @@ class Sub extends Base { } ?> --EXPECTF-- -Fatal error: Declaration of Sub::test($foo, array &$bar) must be compatible with Base::test($foo, array &$bar, $option = NULL, $extra = 3.1415926535898) in %sargument_restriction_002.php on line %d +Fatal error: Declaration of Sub::test($foo, array &$bar) must be compatible with Base::test($foo, array &$bar, $option = null, $extra = 3.1415926535898) in %s on line %d diff --git a/Zend/tests/argument_restriction_003.phpt b/Zend/tests/argument_restriction_003.phpt index 2640be6ae0dc5..1a96a22a87f62 100644 --- a/Zend/tests/argument_restriction_003.phpt +++ b/Zend/tests/argument_restriction_003.phpt @@ -16,4 +16,4 @@ class Sub extends Base { } ?> --EXPECTF-- -Fatal error: Declaration of Sub::test() must be compatible with Base::test(Foo $foo, array $bar, $option = NULL, $extra = 'llllllllll...') in %s on line %d +Fatal error: Declaration of Sub::test() must be compatible with Base::test(Foo $foo, array $bar, $option = null, $extra = 'llllllllll...') in %s on line %d diff --git a/Zend/tests/argument_restriction_006.phpt b/Zend/tests/argument_restriction_006.phpt index 7c00281e99254..5d0c24889a7d4 100644 --- a/Zend/tests/argument_restriction_006.phpt +++ b/Zend/tests/argument_restriction_006.phpt @@ -13,4 +13,4 @@ class Sub extends Base { } ?> --EXPECTF-- -Fatal error: Declaration of Sub::test($foo, $extra) must be compatible with Base::test($foo, $extra = Array) in %s on line %d +Fatal error: Declaration of Sub::test($foo, $extra) must be compatible with Base::test($foo, $extra = [...]) in %s on line %d diff --git a/Zend/tests/bug64988.phpt b/Zend/tests/bug64988.phpt index bff388ca0f741..d295af7dd8a1a 100644 --- a/Zend/tests/bug64988.phpt +++ b/Zend/tests/bug64988.phpt @@ -26,4 +26,4 @@ $o = new Smooth1(); echo "okey"; ?> --EXPECTF-- -Fatal error: Declaration of Smooth1::insert(array $data) must be compatible with Noisy1::insert(array $data, $option1 = NULL) in %s on line %d +Fatal error: Declaration of Smooth1::insert(array $data) must be compatible with Noisy1::insert(array $data, $option1 = null) in %s on line %d diff --git a/Zend/tests/bug71428.1.phpt b/Zend/tests/bug71428.1.phpt index 7b20aa73b2244..ba6af017069f2 100644 --- a/Zend/tests/bug71428.1.phpt +++ b/Zend/tests/bug71428.1.phpt @@ -9,4 +9,4 @@ class B extends A { public function m(array $a = []) {} } --EXPECTF-- -Fatal error: Declaration of B::m(array $a = Array) must be compatible with A::m(?array $a = NULL) in %s on line %d +Fatal error: Declaration of B::m(array $a = []) must be compatible with A::m(?array $a = null) in %s on line %d diff --git a/Zend/tests/bug72119.phpt b/Zend/tests/bug72119.phpt index 7afac3cd5b42d..b374bcc007720 100644 --- a/Zend/tests/bug72119.phpt +++ b/Zend/tests/bug72119.phpt @@ -15,4 +15,4 @@ class Hello implements Foo { echo "OK\n"; ?> --EXPECTF-- -Fatal error: Declaration of Hello::bar(array $baz = Array) must be compatible with Foo::bar(?array $baz = NULL) in %s on line %d +Fatal error: Declaration of Hello::bar(array $baz = []) must be compatible with Foo::bar(?array $baz = null) in %s on line %d diff --git a/Zend/tests/bug73987.phpt b/Zend/tests/bug73987.phpt index b6e9e744aab6a..7875be77daebd 100644 --- a/Zend/tests/bug73987.phpt +++ b/Zend/tests/bug73987.phpt @@ -15,4 +15,4 @@ class B extends A { ?> --EXPECTF-- -Fatal error: Declaration of B::example($a, $b, $c = NULL) must be compatible with A::example($a, $b = NULL, $c = NULL) in %s on line %d +Fatal error: Declaration of B::example($a, $b, $c = null) must be compatible with A::example($a, $b = null, $c = null) in %s on line %d diff --git a/Zend/tests/bug73987_2.phpt b/Zend/tests/bug73987_2.phpt index 976280be1922e..f6861fa4da8ad 100644 --- a/Zend/tests/bug73987_2.phpt +++ b/Zend/tests/bug73987_2.phpt @@ -17,4 +17,4 @@ class C extends B { ?> --EXPECTF-- -Fatal error: Declaration of C::example($a, $b, $c = NULL) must be compatible with B::example($a, $b = NULL, $c = NULL) in %s on line %d +Fatal error: Declaration of C::example($a, $b, $c = null) must be compatible with B::example($a, $b = null, $c = null) in %s on line %d diff --git a/Zend/tests/objects_006.phpt b/Zend/tests/objects_006.phpt index 6ae7d574687c4..75043082b0f87 100644 --- a/Zend/tests/objects_006.phpt +++ b/Zend/tests/objects_006.phpt @@ -19,4 +19,4 @@ class test3 extends test { ?> --EXPECTF-- -Fatal error: Declaration of test3::foo($arg, $arg2) must be compatible with test::foo($arg, $arg2 = NULL) in %s on line %d +Fatal error: Declaration of test3::foo($arg, $arg2) must be compatible with test::foo($arg, $arg2 = null) in %s on line %d diff --git a/Zend/tests/objects_007.phpt b/Zend/tests/objects_007.phpt index 9a23522cb29c9..6147b3071dc50 100644 --- a/Zend/tests/objects_007.phpt +++ b/Zend/tests/objects_007.phpt @@ -19,4 +19,4 @@ class test3 extends test { ?> --EXPECTF-- -Fatal error: Declaration of test3::foo($arg, &$arg2) must be compatible with test::foo($arg, &$arg2 = NULL) in %s on line %d +Fatal error: Declaration of test3::foo($arg, &$arg2) must be compatible with test::foo($arg, &$arg2 = null) in %s on line %d diff --git a/Zend/tests/type_declarations/variance/internal_parent.phpt b/Zend/tests/type_declarations/variance/internal_parent.phpt index ae86a3bc3c89c..5b44630e9e194 100644 --- a/Zend/tests/type_declarations/variance/internal_parent.phpt +++ b/Zend/tests/type_declarations/variance/internal_parent.phpt @@ -9,4 +9,4 @@ class Test extends DateTime { ?> --EXPECTF-- -Fatal error: Could not check compatibility between Test::createFromFormat($format, $time, ?Wrong $timezone = NULL) and DateTime::createFromFormat(string $format, string $time, ?DateTimeZone $timezone = null), because class Wrong is not available in %s on line %d +Fatal error: Could not check compatibility between Test::createFromFormat($format, $time, ?Wrong $timezone = null) and DateTime::createFromFormat(string $format, string $time, ?DateTimeZone $timezone = null), because class Wrong is not available in %s on line %d diff --git a/Zend/tests/variadic/adding_additional_optional_parameter_error.phpt b/Zend/tests/variadic/adding_additional_optional_parameter_error.phpt index 4c6f36f10b531..a04cd84f5ea44 100644 --- a/Zend/tests/variadic/adding_additional_optional_parameter_error.phpt +++ b/Zend/tests/variadic/adding_additional_optional_parameter_error.phpt @@ -13,4 +13,4 @@ class MySQL implements DB { ?> --EXPECTF-- -Fatal error: Declaration of MySQL::query($query, ?int $extraParam = NULL, string ...$params) must be compatible with DB::query($query, string ...$params) in %s on line %d +Fatal error: Declaration of MySQL::query($query, ?int $extraParam = null, string ...$params) must be compatible with DB::query($query, string ...$params) in %s on line %d diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 5f7f115af4105..1c10da561665f 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -710,7 +710,7 @@ static ZEND_COLD zend_string *zend_get_function_declaration(const zend_function } else if (Z_TYPE_P(zv) == IS_TRUE) { smart_str_appends(&str, "true"); } else if (Z_TYPE_P(zv) == IS_NULL) { - smart_str_appends(&str, "NULL"); + smart_str_appends(&str, "null"); } else if (Z_TYPE_P(zv) == IS_STRING) { smart_str_appendc(&str, '\''); smart_str_appendl(&str, Z_STRVAL_P(zv), MIN(Z_STRLEN_P(zv), 10)); @@ -719,7 +719,11 @@ static ZEND_COLD zend_string *zend_get_function_declaration(const zend_function } smart_str_appendc(&str, '\''); } else if (Z_TYPE_P(zv) == IS_ARRAY) { - smart_str_appends(&str, "Array"); + if (zend_hash_num_elements(Z_ARRVAL_P(zv)) == 0) { + smart_str_appends(&str, "[]"); + } else { + smart_str_appends(&str, "[...]"); + } } else if (Z_TYPE_P(zv) == IS_CONSTANT_AST) { zend_ast *ast = Z_ASTVAL_P(zv); if (ast->kind == ZEND_AST_CONSTANT) { From 1d05771a70a64b897d4af832654202fdfd40de86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Thu, 9 Apr 2020 11:27:20 +0200 Subject: [PATCH 105/338] Add support for generating method entries from stubs Closes GH-5363 --- Zend/zend_API.h | 2 +- build/gen_stub.php | 272 ++++++++++++++++---- ext/date/php_date.c | 123 ++------- ext/date/php_date.h | 38 --- ext/date/php_date.stub.php | 325 ++++++++++++++++-------- ext/date/php_date_arginfo.h | 170 ++++++++++++- ext/date/tests/DateTimeZone_verify.phpt | 123 --------- 7 files changed, 639 insertions(+), 414 deletions(-) delete mode 100644 ext/date/tests/DateTimeZone_verify.phpt diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 16efa3422216e..fbf725adeeb24 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -85,7 +85,7 @@ typedef struct _zend_fcall_info_cache { #define ZEND_DEP_ME(classname, name, arg_info, flags) ZEND_RAW_FENTRY(#name, zim_##classname##_##name, arg_info, flags | ZEND_ACC_DEPRECATED) #define ZEND_ABSTRACT_ME(classname, name, arg_info) ZEND_RAW_FENTRY(#name, NULL, arg_info, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT) #define ZEND_MALIAS(classname, name, alias, arg_info, flags) ZEND_RAW_FENTRY(#name, zim_##classname##_##alias, arg_info, flags) -#define ZEND_ME_MAPPING(name, func_name, arg_types, flags) ZEND_RAW_FENTRY(#name, zif_##func_name, arg_types, flags) +#define ZEND_ME_MAPPING(name, func_name, arg_info, flags) ZEND_RAW_FENTRY(#name, zif_##func_name, arg_info, flags) #define ZEND_NS_FENTRY(ns, zend_name, name, arg_info, flags) ZEND_RAW_FENTRY(ZEND_NS_NAME(ns, #zend_name), name, arg_info, flags) diff --git a/build/gen_stub.php b/build/gen_stub.php index cfd1d42e36ee2..1cbb21d74cc65 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -6,6 +6,7 @@ use PhpParser\Node\Expr; use PhpParser\Node\Name; use PhpParser\Node\Stmt; +use PhpParser\Node\Stmt\Class_; use PhpParser\PrettyPrinter\Standard; use PhpParser\PrettyPrinterAbstract; @@ -206,7 +207,7 @@ public function tryToRepresentableType(): ?RepresentableType { $classType = $type; } else { // We can only represent a single class type. - return false; + return null; } } return new RepresentableType($classType, $builtinTypes); @@ -306,6 +307,33 @@ public function getDefaultValueString(): string { } } +class FunctionName { + /** @var string|null */ + public $className; + /** @var string */ + public $name; + + public function __construct(?string $className, string $name) + { + $this->className = $className; + $this->name = $name; + } + + public function getDeclaration(): string + { + if ($this->className) { + return "ZEND_METHOD($this->className, $this->name);\n"; + } + + return "ZEND_FUNCTION($this->name);\n"; + } + + public function __toString() + { + return $this->className ? "$this->className::$this->name" : $this->name; + } +} + class ReturnInfo { /** @var bool */ public $byRef; @@ -324,11 +352,11 @@ public function equals(ReturnInfo $other): bool { } class FuncInfo { - /** @var string */ + /** @var FunctionName */ public $name; - /** @var ?string */ - public $className; - /** @var ?string */ + /** @var int */ + public $flags; + /** @var FunctionName|null */ public $alias; /** @var bool */ public $isDeprecated; @@ -342,11 +370,17 @@ class FuncInfo { public $cond; public function __construct( - string $name, ?string $className, ?string $alias, bool $isDeprecated, array $args, ReturnInfo $return, - int $numRequiredArgs, ?string $cond + FunctionName $name, + int $flags, + ?FunctionName $alias, + bool $isDeprecated, + array $args, + ReturnInfo $return, + int $numRequiredArgs, + ?string $cond ) { $this->name = $name; - $this->className = $className; + $this->flags = $flags; $this->alias = $alias; $this->isDeprecated = $isDeprecated; $this->args = $args; @@ -372,10 +406,99 @@ public function equalsApartFromName(FuncInfo $other): bool { } public function getArgInfoName(): string { - if ($this->className) { - return 'arginfo_class_' . $this->className . '_' . $this->name; + if ($this->name->className) { + return 'arginfo_class_' . $this->name->className . '_' . $this->name->name; + } + return 'arginfo_' . $this->name->name; + } + + public function getDeclarationKey(): string + { + $name = $this->alias ?? $this->name; + + return "$name|$this->cond"; + } + + public function getDeclaration(): ?string + { + if ($this->flags & Class_::MODIFIER_ABSTRACT) { + return null; + } + + $name = $this->alias ?? $this->name; + + return $name->getDeclaration(); + } + + public function getFunctionEntry(): string { + if ($this->name->className) { + if ($this->alias) { + if ($this->alias->className) { + return sprintf( + "\tZEND_MALIAS(%s, %s, %s, %s, %s)\n", + $this->alias->className, $this->name, $this->alias->name, $this->getArgInfoName(), $this->getFlagsAsString() + ); + } else { + return sprintf( + "\tZEND_ME_MAPPING(%s, %s, %s, %s)\n", + $this->name->name, $this->alias->name, $this->getArgInfoName(), $this->getFlagsAsString() + ); + } + } else { + if ($this->flags & Class_::MODIFIER_ABSTRACT) { + return sprintf( + "\tZEND_ABSTRACT_ME(%s, %s, %s)\n", + $this->name->className, $this->name->name, $this->getArgInfoName() + ); + } + + return sprintf( + "\tZEND_ME(%s, %s, %s, %s)\n", + $this->name->className, $this->name->name, $this->getArgInfoName(), $this->getFlagsAsString() + ); + } + } else { + if ($this->alias) { + return sprintf( + "\tZEND_FALIAS(%s, %s, %s)\n", + $this->name, $this->alias->name, $this->getArgInfoName() + ); + } + + if ($this->isDeprecated) { + return sprintf("\tZEND_DEP_FE(%s, %s)\n", $this->name, $this->getArgInfoName()); + } + + return sprintf("\tZEND_FE(%s, %s)\n", $this->name, $this->getArgInfoName()); + } + } + + private function getFlagsAsString(): string + { + $flags = "ZEND_ACC_PUBLIC"; + if ($this->flags & Class_::MODIFIER_PROTECTED) { + $flags = "ZEND_ACC_PROTECTED"; + } elseif ($this->flags & Class_::MODIFIER_PRIVATE) { + $flags = "ZEND_ACC_PRIVATE"; + } + + if ($this->flags & Class_::MODIFIER_STATIC) { + $flags .= "|ZEND_ACC_STATIC"; + } + + if ($this->flags & Class_::MODIFIER_FINAL) { + $flags .= "|ZEND_ACC_FINAL"; + } + + if ($this->flags & Class_::MODIFIER_ABSTRACT) { + $flags .= "|ZEND_ACC_ABSTRACT"; + } + + if ($this->isDeprecated) { + $flags .= "|ZEND_ACC_DEPRECATED"; } - return 'arginfo_' . $this->name; + + return $flags; } } @@ -406,6 +529,9 @@ public function __construct( $this->generateFunctionEntries = $generateFunctionEntries; } + /** + * @return iterable + */ public function getAllFuncInfos(): iterable { yield from $this->funcInfos; foreach ($this->classInfos as $classInfo) { @@ -417,7 +543,7 @@ public function getAllFuncInfos(): iterable { class DocCommentTag { /** @var string */ public $name; - /** @var ?string */ + /** @var string|null */ public $value; public function __construct(string $name, ?string $value) { @@ -458,7 +584,11 @@ function parseDocComment(DocComment $comment): array { } function parseFunctionLike( - PrettyPrinterAbstract $prettyPrinter, string $name, ?string $className, Node\FunctionLike $func, ?string $cond + PrettyPrinterAbstract $prettyPrinter, + FunctionName $name, + int $flags, + Node\FunctionLike $func, + ?string $cond ): FuncInfo { $comment = $func->getDocComment(); $paramMeta = []; @@ -476,7 +606,12 @@ function parseFunctionLike( } $paramMeta[$varName]['preferRef'] = true; } else if ($tag->name === 'alias') { - $alias = $tag->getValue(); + $aliasParts = explode("::", $tag->getValue()); + if (count($aliasParts) === 1) { + $alias = new FunctionName(null, $aliasParts[0]); + } else { + $alias = new FunctionName($aliasParts[0], $aliasParts[1]); + } } else if ($tag->name === 'deprecated') { $isDeprecated = true; } else if ($tag->name === 'return') { @@ -533,14 +668,25 @@ function parseFunctionLike( } $returnType = $func->getReturnType(); - if ($returnType === null && !$haveDocReturnType && substr($name, 0, 2) !== '__') { + if ($returnType === null && !$haveDocReturnType && strpos($name->name, '__') !== 0) { throw new Exception("Missing return type for function $name()"); } $return = new ReturnInfo( $func->returnsByRef(), - $returnType ? Type::fromNode($returnType) : null); - return new FuncInfo($name, $className, $alias, $isDeprecated, $args, $return, $numRequiredArgs, $cond); + $returnType ? Type::fromNode($returnType) : null + ); + + return new FuncInfo( + $name, + $flags, + $alias, + $isDeprecated, + $args, + $return, + $numRequiredArgs, + $cond + ); } function handlePreprocessorConditions(array &$conds, Stmt $stmt): ?string { @@ -622,7 +768,14 @@ function parseStubFile(string $fileName): FileInfo { } if ($stmt instanceof Stmt\Function_) { - $funcInfos[] = parseFunctionLike($prettyPrinter, $stmt->name->toString(), null, $stmt, $cond); + $funcInfos[] = parseFunctionLike( + $prettyPrinter, + new FunctionName(null, $stmt->name->toString()), + 0, + $stmt, + $cond + ); + continue; } @@ -639,8 +792,22 @@ function parseStubFile(string $fileName): FileInfo { throw new Exception("Not implemented {$classStmt->getType()}"); } + $flags = $classStmt->flags; + if ($stmt instanceof Stmt\Interface_) { + $flags |= Class_::MODIFIER_ABSTRACT; + } + + if ($flags & Class_::MODIFIER_ABSTRACT && !($flags & Class_::MODIFIER_PUBLIC)) { + throw new Exception("Abstract non-public methods are not supported"); + } + $methodInfos[] = parseFunctionLike( - $prettyPrinter, $classStmt->name->toString(), $className, $classStmt, $cond); + $prettyPrinter, + new FunctionName($className, $classStmt->name->toString()), + $flags, + $classStmt, + $cond + ); } $classInfos[] = new ClassInfo($className, $methodInfos); @@ -746,7 +913,8 @@ function funcInfoToCode(FuncInfo $funcInfo): string { return $code . "\n"; } -function findEquivalentFuncInfo(array $generatedFuncInfos, $funcInfo): ?FuncInfo { +/** @param FuncInfo[] $generatedFuncInfos */ +function findEquivalentFuncInfo(array $generatedFuncInfos, FuncInfo $funcInfo): ?FuncInfo { foreach ($generatedFuncInfos as $generatedFuncInfo) { if ($generatedFuncInfo->equalsApartFromName($funcInfo)) { return $generatedFuncInfo; @@ -755,7 +923,7 @@ function findEquivalentFuncInfo(array $generatedFuncInfos, $funcInfo): ?FuncInfo return null; } -/** @param FuncInfo[] $funcInfos */ +/** @param iterable $funcInfos */ function generateCodeWithConditions( iterable $funcInfos, string $separator, Closure $codeGenerator): string { $code = ""; @@ -778,13 +946,11 @@ function generateCodeWithConditions( } function generateArgInfoCode(FileInfo $fileInfo): string { - $funcInfos = $fileInfo->funcInfos; - $code = "/* This is a generated file, edit the .stub.php file instead. */\n"; $generatedFuncInfos = []; $code .= generateCodeWithConditions( $fileInfo->getAllFuncInfos(), "\n", - function(FuncInfo $funcInfo) use(&$generatedFuncInfos) { + function (FuncInfo $funcInfo) use(&$generatedFuncInfos) { /* If there already is an equivalent arginfo structure, only emit a #define */ if ($generatedFuncInfo = findEquivalentFuncInfo($generatedFuncInfos, $funcInfo)) { $code = sprintf( @@ -802,40 +968,50 @@ function(FuncInfo $funcInfo) use(&$generatedFuncInfos) { if ($fileInfo->generateFunctionEntries) { $code .= "\n\n"; - $generatedDeclarations = []; - $code .= generateCodeWithConditions($funcInfos, "", function(FuncInfo $funcInfo) use (&$generatedDeclarations) { - $name = $funcInfo->alias ?? $funcInfo->name; - $key = "$name|$funcInfo->cond"; - if (isset($generatedDeclarations[$key])) { - return null; - } - $generatedDeclarations[$key] = true; - return "ZEND_FUNCTION($name);\n"; - }); + $generatedFunctionDeclarations = []; + $code .= generateCodeWithConditions( + $fileInfo->getAllFuncInfos(), "", + function (FuncInfo $funcInfo) use(&$generatedFunctionDeclarations) { + $key = $funcInfo->getDeclarationKey(); + if (isset($generatedFunctionDeclarations[$key])) { + return null; + } - $code .= "\n\nstatic const zend_function_entry ext_functions[] = {\n"; - $code .= generateCodeWithConditions($fileInfo->funcInfos, "", function(FuncInfo $funcInfo) { - if ($funcInfo->alias) { - return sprintf( - "\tZEND_FALIAS(%s, %s, %s)\n", - $funcInfo->name, $funcInfo->alias, $funcInfo->getArgInfoName() - ); - } + $generatedFunctionDeclarations[$key] = true; - if ($funcInfo->isDeprecated) { - return sprintf("\tZEND_DEP_FE(%s, %s)\n", $funcInfo->name, $funcInfo->getArgInfoName()); + return $funcInfo->getDeclaration(); } + ); - return sprintf("\tZEND_FE(%s, %s)\n", $funcInfo->name, $funcInfo->getArgInfoName()); - }); - $code .= "\tZEND_FE_END\n"; - $code .= "};\n"; + $code .= "\n\n"; + + $code .= generateFunctionEntries(null, $fileInfo->funcInfos); + + foreach ($fileInfo->classInfos as $classInfo) { + $code .= generateFunctionEntries($classInfo->name, $classInfo->funcInfos); + } } return $code; } +/** @param FuncInfo[] $funcInfos */ +function generateFunctionEntries(?string $className, array $funcInfos): string { + $code = ""; + + $functionEntryName = $className ? "class_{$className}_methods" : "ext_functions"; + + $code .= "\n\nstatic const zend_function_entry {$functionEntryName}[] = {\n"; + $code .= generateCodeWithConditions($funcInfos, "", function (FuncInfo $funcInfo) { + return $funcInfo->getFunctionEntry(); + }); + $code .= "\tZEND_FE_END\n"; + $code .= "};\n"; + + return $code; +} + function initPhpParser() { $version = "4.3.0"; $phpParserDir = __DIR__ . "/PHP-Parser-$version"; diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 5c6825e50f3c5..67a9d66f635db 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -76,97 +76,6 @@ PHPAPI time_t php_time() #include "php_date_arginfo.h" -static const zend_function_entry date_funcs_interface[] = { - PHP_ABSTRACT_ME(DateTimeInterface, format, arginfo_class_DateTimeInterface_format) - PHP_ABSTRACT_ME(DateTimeInterface, getTimezone, arginfo_class_DateTimeInterface_getTimezone) - PHP_ABSTRACT_ME(DateTimeInterface, getOffset, arginfo_class_DateTimeInterface_getOffset) - PHP_ABSTRACT_ME(DateTimeInterface, getTimestamp, arginfo_class_DateTimeInterface_getTimestamp) - PHP_ABSTRACT_ME(DateTimeInterface, diff, arginfo_class_DateTimeInterface_diff) - PHP_ABSTRACT_ME(DateTimeInterface, __wakeup, arginfo_class_DateTimeInterface___wakeup) - PHP_FE_END -}; - -static const zend_function_entry date_funcs_date[] = { - PHP_ME(DateTime, __construct, arginfo_class_DateTime___construct, ZEND_ACC_PUBLIC) - PHP_ME(DateTime, __wakeup, arginfo_class_DateTimeInterface___wakeup, ZEND_ACC_PUBLIC) - PHP_ME(DateTime, __set_state, arginfo_class_DateTime___set_state, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME(DateTime, createFromImmutable, arginfo_class_DateTime_createFromImmutable, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME(DateTime, createFromInterface, arginfo_class_DateTime_createFromInterface, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME_MAPPING(createFromFormat, date_create_from_format, arginfo_class_DateTime_createFromFormat, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME_MAPPING(getLastErrors, date_get_last_errors, arginfo_class_DateTime_getLastErrors, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME_MAPPING(format, date_format, arginfo_class_DateTimeInterface_format, 0) - PHP_ME_MAPPING(modify, date_modify, arginfo_class_DateTime_modify, 0) - PHP_ME_MAPPING(add, date_add, arginfo_class_DateTime_add, 0) - PHP_ME_MAPPING(sub, date_sub, arginfo_class_DateTime_sub, 0) - PHP_ME_MAPPING(getTimezone, date_timezone_get, arginfo_class_DateTimeInterface_getTimezone, 0) - PHP_ME_MAPPING(setTimezone, date_timezone_set, arginfo_class_DateTime_setTimezone, 0) - PHP_ME_MAPPING(getOffset, date_offset_get, arginfo_class_DateTimeInterface_getOffset, 0) - PHP_ME_MAPPING(setTime, date_time_set, arginfo_class_DateTime_setTime, 0) - PHP_ME_MAPPING(setDate, date_date_set, arginfo_class_DateTime_setDate, 0) - PHP_ME_MAPPING(setISODate, date_isodate_set, arginfo_class_DateTime_setISODate, 0) - PHP_ME_MAPPING(setTimestamp, date_timestamp_set, arginfo_class_DateTime_setTimestamp, 0) - PHP_ME_MAPPING(getTimestamp, date_timestamp_get, arginfo_class_DateTimeInterface_getTimestamp, 0) - PHP_ME_MAPPING(diff, date_diff, arginfo_class_DateTimeInterface_diff, 0) - PHP_FE_END -}; - -static const zend_function_entry date_funcs_immutable[] = { - PHP_ME(DateTimeImmutable, __construct, arginfo_class_DateTimeImmutable___construct, ZEND_ACC_PUBLIC) - PHP_ME(DateTime, __wakeup, arginfo_class_DateTimeInterface___wakeup, ZEND_ACC_PUBLIC) - PHP_ME(DateTimeImmutable, __set_state, arginfo_class_DateTimeImmutable___set_state, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME_MAPPING(createFromFormat, date_create_immutable_from_format, arginfo_class_DateTimeImmutable_createFromFormat, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME_MAPPING(getLastErrors, date_get_last_errors, arginfo_class_DateTimeImmutable_getLastErrors, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME_MAPPING(format, date_format, arginfo_class_DateTimeInterface_format, 0) - PHP_ME_MAPPING(getTimezone, date_timezone_get, arginfo_class_DateTimeInterface_getTimezone, 0) - PHP_ME_MAPPING(getOffset, date_offset_get, arginfo_class_DateTimeInterface_getOffset, 0) - PHP_ME_MAPPING(getTimestamp, date_timestamp_get, arginfo_class_DateTimeInterface_getTimestamp, 0) - PHP_ME_MAPPING(diff, date_diff, arginfo_class_DateTimeInterface_diff, 0) - PHP_ME(DateTimeImmutable, modify, arginfo_class_DateTimeImmutable_modify, 0) - PHP_ME(DateTimeImmutable, add, arginfo_class_DateTimeImmutable_add, 0) - PHP_ME(DateTimeImmutable, sub, arginfo_class_DateTimeImmutable_sub, 0) - PHP_ME(DateTimeImmutable, setTimezone, arginfo_class_DateTimeImmutable_setTimezone, 0) - PHP_ME(DateTimeImmutable, setTime, arginfo_class_DateTimeImmutable_setTime, 0) - PHP_ME(DateTimeImmutable, setDate, arginfo_class_DateTimeImmutable_setDate, 0) - PHP_ME(DateTimeImmutable, setISODate, arginfo_class_DateTimeImmutable_setISODate, 0) - PHP_ME(DateTimeImmutable, setTimestamp, arginfo_class_DateTimeImmutable_setTimestamp, 0) - PHP_ME(DateTimeImmutable, createFromMutable, arginfo_class_DateTimeImmutable_createFromMutable, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME(DateTimeImmutable, createFromInterface, arginfo_class_DateTimeImmutable_createFromInterface, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_FE_END -}; - -static const zend_function_entry date_funcs_timezone[] = { - PHP_ME(DateTimeZone, __construct, arginfo_class_DateTimeZone___construct, ZEND_ACC_PUBLIC) - PHP_ME(DateTimeZone, __wakeup, arginfo_class_DateTimeZone___wakeup, ZEND_ACC_PUBLIC) - PHP_ME(DateTimeZone, __set_state, arginfo_class_DateTimeZone___set_state, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME_MAPPING(getName, timezone_name_get, arginfo_class_DateTimeZone_getName, 0) - PHP_ME_MAPPING(getOffset, timezone_offset_get, arginfo_class_DateTimeZone_getOffset, 0) - PHP_ME_MAPPING(getTransitions, timezone_transitions_get, arginfo_class_DateTimeZone_getTransitions, 0) - PHP_ME_MAPPING(getLocation, timezone_location_get, arginfo_class_DateTimeZone_getLocation, 0) - PHP_ME_MAPPING(listAbbreviations, timezone_abbreviations_list, arginfo_class_DateTimeZone_listAbbreviations, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME_MAPPING(listIdentifiers, timezone_identifiers_list, arginfo_class_DateTimeZone_listIdentifiers, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_FE_END -}; - -static const zend_function_entry date_funcs_interval[] = { - PHP_ME(DateInterval, __construct, arginfo_class_DateInterval___construct, ZEND_ACC_PUBLIC) - PHP_ME(DateInterval, __wakeup, arginfo_class_DateInterval___wakeup, ZEND_ACC_PUBLIC) - PHP_ME(DateInterval, __set_state, arginfo_class_DateInterval___set_state, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME_MAPPING(format, date_interval_format, arginfo_class_DateInterval_format, 0) - PHP_ME_MAPPING(createFromDateString, date_interval_create_from_date_string, arginfo_class_DateInterval_createFromDateString, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_FE_END -}; - -static const zend_function_entry date_funcs_period[] = { - PHP_ME(DatePeriod, __construct, arginfo_class_DatePeriod___construct, ZEND_ACC_PUBLIC) - PHP_ME(DatePeriod, __wakeup, arginfo_class_DatePeriod___wakeup, ZEND_ACC_PUBLIC) - PHP_ME(DatePeriod, __set_state, arginfo_class_DatePeriod___set_state, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME(DatePeriod, getStartDate, arginfo_class_DatePeriod_getStartDate, ZEND_ACC_PUBLIC) - PHP_ME(DatePeriod, getEndDate, arginfo_class_DatePeriod_getEndDate, ZEND_ACC_PUBLIC) - PHP_ME(DatePeriod, getDateInterval, arginfo_class_DatePeriod_getDateInterval, ZEND_ACC_PUBLIC) - PHP_ME(DatePeriod, getRecurrences, arginfo_class_DatePeriod_getRecurrences, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - static char* guess_timezone(const timelib_tzdb *tzdb); static void date_register_classes(void); /* }}} */ @@ -1681,7 +1590,7 @@ static void date_register_classes(void) /* {{{ */ { zend_class_entry ce_date, ce_immutable, ce_timezone, ce_interval, ce_period, ce_interface; - INIT_CLASS_ENTRY(ce_interface, "DateTimeInterface", date_funcs_interface); + INIT_CLASS_ENTRY(ce_interface, "DateTimeInterface", class_DateTimeInterface_methods); date_ce_interface = zend_register_internal_interface(&ce_interface); date_ce_interface->interface_gets_implemented = implement_date_interface_handler; @@ -1702,7 +1611,7 @@ static void date_register_classes(void) /* {{{ */ REGISTER_DATE_INTERFACE_CONST_STRING("RSS", DATE_FORMAT_RFC1123); REGISTER_DATE_INTERFACE_CONST_STRING("W3C", DATE_FORMAT_RFC3339); - INIT_CLASS_ENTRY(ce_date, "DateTime", date_funcs_date); + INIT_CLASS_ENTRY(ce_date, "DateTime", class_DateTime_methods); ce_date.create_object = date_object_new_date; date_ce_date = zend_register_internal_class_ex(&ce_date, NULL); memcpy(&date_object_handlers_date, &std_object_handlers, sizeof(zend_object_handlers)); @@ -1714,7 +1623,7 @@ static void date_register_classes(void) /* {{{ */ date_object_handlers_date.get_gc = date_object_get_gc; zend_class_implements(date_ce_date, 1, date_ce_interface); - INIT_CLASS_ENTRY(ce_immutable, "DateTimeImmutable", date_funcs_immutable); + INIT_CLASS_ENTRY(ce_immutable, "DateTimeImmutable", class_DateTimeImmutable_methods); ce_immutable.create_object = date_object_new_date; date_ce_immutable = zend_register_internal_class_ex(&ce_immutable, NULL); memcpy(&date_object_handlers_immutable, &std_object_handlers, sizeof(zend_object_handlers)); @@ -1724,7 +1633,7 @@ static void date_register_classes(void) /* {{{ */ date_object_handlers_immutable.get_gc = date_object_get_gc; zend_class_implements(date_ce_immutable, 1, date_ce_interface); - INIT_CLASS_ENTRY(ce_timezone, "DateTimeZone", date_funcs_timezone); + INIT_CLASS_ENTRY(ce_timezone, "DateTimeZone", class_DateTimeZone_methods); ce_timezone.create_object = date_object_new_timezone; date_ce_timezone = zend_register_internal_class_ex(&ce_timezone, NULL); memcpy(&date_object_handlers_timezone, &std_object_handlers, sizeof(zend_object_handlers)); @@ -1754,7 +1663,7 @@ static void date_register_classes(void) /* {{{ */ REGISTER_TIMEZONE_CLASS_CONST_STRING("ALL_WITH_BC", PHP_DATE_TIMEZONE_GROUP_ALL_W_BC); REGISTER_TIMEZONE_CLASS_CONST_STRING("PER_COUNTRY", PHP_DATE_TIMEZONE_PER_COUNTRY); - INIT_CLASS_ENTRY(ce_interval, "DateInterval", date_funcs_interval); + INIT_CLASS_ENTRY(ce_interval, "DateInterval", class_DateInterval_methods); ce_interval.create_object = date_object_new_interval; date_ce_interval = zend_register_internal_class_ex(&ce_interval, NULL); memcpy(&date_object_handlers_interval, &std_object_handlers, sizeof(zend_object_handlers)); @@ -1769,7 +1678,7 @@ static void date_register_classes(void) /* {{{ */ date_object_handlers_interval.get_gc = date_object_get_gc_interval; date_object_handlers_interval.compare = date_interval_compare_objects; - INIT_CLASS_ENTRY(ce_period, "DatePeriod", date_funcs_period); + INIT_CLASS_ENTRY(ce_period, "DatePeriod", class_DatePeriod_methods); ce_period.create_object = date_object_new_period; date_ce_period = zend_register_internal_class_ex(&ce_period, NULL); date_ce_period->get_iterator = date_object_period_get_iterator; @@ -2691,6 +2600,26 @@ PHP_METHOD(DateTime, __wakeup) } /* }}} */ +/* {{{ proto DateTimeImmutable::__wakeup() +*/ +PHP_METHOD(DateTimeImmutable, __wakeup) +{ + zval *object = ZEND_THIS; + php_date_obj *dateobj; + HashTable *myht; + + ZEND_PARSE_PARAMETERS_NONE(); + + dateobj = Z_PHPDATE_P(object); + + myht = Z_OBJPROP_P(object); + + if (!php_date_initialize_from_hash(&dateobj, myht)) { + zend_throw_error(NULL, "Invalid serialization data for DateTimeImmutable object"); + } +} +/* }}} */ + /* Helper function used to add an associative array of warnings and errors to a zval */ static void zval_from_error_container(zval *z, timelib_error_container *error) /* {{{ */ { diff --git a/ext/date/php_date.h b/ext/date/php_date.h index e3008e47e01b0..871114c44b0d4 100644 --- a/ext/date/php_date.h +++ b/ext/date/php_date.h @@ -26,44 +26,6 @@ extern zend_module_entry date_module_entry; #define phpext_date_ptr &date_module_entry -/* Advanced Interface */ -PHP_METHOD(DateTime, __construct); -PHP_METHOD(DateTime, __wakeup); -PHP_METHOD(DateTime, __set_state); -PHP_METHOD(DateTime, createFromImmutable); -PHP_METHOD(DateTime, createFromInterface); - -PHP_METHOD(DateTimeImmutable, __construct); -PHP_METHOD(DateTimeImmutable, __set_state); -PHP_METHOD(DateTimeImmutable, modify); -PHP_METHOD(DateTimeImmutable, add); -PHP_METHOD(DateTimeImmutable, sub); -PHP_METHOD(DateTimeImmutable, setTimezone); -PHP_METHOD(DateTimeImmutable, setTime); -PHP_METHOD(DateTimeImmutable, setDate); -PHP_METHOD(DateTimeImmutable, setISODate); -PHP_METHOD(DateTimeImmutable, setTimestamp); -PHP_METHOD(DateTimeImmutable, createFromMutable); -PHP_METHOD(DateTimeImmutable, createFromInterface); - -PHP_METHOD(DateTimeZone, __construct); -PHP_METHOD(DateTimeZone, __wakeup); -PHP_METHOD(DateTimeZone, __set_state); - -PHP_METHOD(DateInterval, __construct); -PHP_METHOD(DateInterval, __wakeup); -PHP_METHOD(DateInterval, __set_state); -PHP_FUNCTION(date_interval_format); -PHP_FUNCTION(date_interval_create_from_date_string); - -PHP_METHOD(DatePeriod, __construct); -PHP_METHOD(DatePeriod, __wakeup); -PHP_METHOD(DatePeriod, __set_state); -PHP_METHOD(DatePeriod, getStartDate); -PHP_METHOD(DatePeriod, getEndDate); -PHP_METHOD(DatePeriod, getDateInterval); -PHP_METHOD(DatePeriod, getRecurrences); - PHP_RINIT_FUNCTION(date); PHP_RSHUTDOWN_FUNCTION(date); PHP_MINIT_FUNCTION(date); diff --git a/ext/date/php_date.stub.php b/ext/date/php_date.stub.php index 23936a9d487a1..533eb455feb23 100644 --- a/ext/date/php_date.stub.php +++ b/ext/date/php_date.stub.php @@ -117,7 +117,8 @@ function date_sun_info(int $time, float $latitude, float $longitude): array {} // NB: Adding return types to methods is a BC break! // For now only using @return annotations here. -interface DateTimeInterface { +interface DateTimeInterface +{ /** @return string */ public function format(string $format); @@ -136,153 +137,279 @@ public function diff(DateTimeInterface $object, bool $absolute = false); public function __wakeup(); } -class DateTime implements DateTimeInterface { - public function __construct(string $time = "now", ?DateTimeZone $timezone = null); +class DateTime implements DateTimeInterface +{ + public function __construct(string $time = "now", ?DateTimeZone $timezone = null) {} - /** @return DateTime */ - public static function __set_state(array $array); - - /** @return DateTime */ - public static function createFromImmutable(DateTimeImmutable $object); - - public static function createFromInterface(DateTimeInterface $object): DateTime; - - /** @return DateTime|false */ - public static function createFromFormat( - string $format, string $time, ?DateTimeZone $timezone = null); - - /** @return array|false */ - public static function getLastErrors(); - - /** @return DateTime|false */ - public function modify(string $modify); - - /** @return DateTime */ - public function add(DateInterval $interval); - - /** @return DateTime */ - public function sub(DateInterval $interval); - - /** @return DateTime */ - public function setTimezone(DateTimeZone $timezone); - - /** @return DateTime */ - public function setTime(int $hour, int $minute, int $second = 0, int $microseconds = 0); + public function __wakeup() {} /** @return DateTime */ - public function setDate(int $year, int $month, int $day); + public static function __set_state(array $array) {} /** @return DateTime */ - public function setISODate(int $year, int $week, int $day = 1); - - /** @return DateTime */ - public function setTimestamp(int $timestamp); + public static function createFromImmutable(DateTimeImmutable $object) {} + + public static function createFromInterface(DateTimeInterface $object): DateTime {} + + /** + * @return DateTime|false + * @alias date_create_from_format + */ + public static function createFromFormat(string $format, string $time, ?DateTimeZone $timezone = null) {} + + /** + * @return array|false + * @alias date_get_last_errors + */ + public static function getLastErrors() {} + + /** + * @return string + * @alias date_format + */ + public function format(string $format) {} + + /** + * @return DateTime|false + * @alias date_modify + */ + public function modify(string $modify) {} + + /** + * @return DateTime + * @alias date_add + */ + public function add(DateInterval $interval) {} + + /** + * @return DateTime + * @alias date_sub + */ + public function sub(DateInterval $interval) {} + + /** + * @return DateTimeZone|false + * @alias date_timezone_get + */ + public function getTimezone() {} + + /** + * @return DateTime + * @alias date_timezone_set + */ + public function setTimezone(DateTimeZone $timezone) {} + + /** + * @return int|false + * @alias date_offset_get + */ + public function getOffset() {} + + /** + * @return DateTime + * @alias date_time_set + */ + public function setTime(int $hour, int $minute, int $second = 0, int $microseconds = 0) {} + + /** + * @return DateTime + * @alias date_date_set + */ + public function setDate(int $year, int $month, int $day) {} + + /** + * @return DateTime + * @alias date_isodate_set + */ + public function setISODate(int $year, int $week, int $day = 1) {} + + /** + * @return DateTime + * @alias date_timestamp_set + */ + public function setTimestamp(int $timestamp) {} + + /** + * @return int|false + * @alias date_timestamp_get + */ + public function getTimestamp() {} + + /** + * @return DateInterval|false + * @alias date_diff + */ + public function diff(DateTimeInterface $object, bool $absolute = false) {} } -class DateTimeImmutable implements DateTimeInterface { - public function __construct(string $time = "now", ?DateTimeZone $timezone = null); +class DateTimeImmutable implements DateTimeInterface +{ + public function __construct(string $time = "now", ?DateTimeZone $timezone = null) {} - /** @return DateTimeZone */ - public static function __set_state(array $array); - - /** @return DateTimeImmutable */ - public static function createFromMutable(DateTime $object); + public function __wakeup() {} - public static function createFromInterface(DateTimeInterface $object): DateTimeImmutable; - - /** @return DateTimeImmutable|false */ - public static function createFromFormat( - string $format, string $time, ?DateTimeZone $timezone = null); - - /** @return array|false */ - public static function getLastErrors(); + /** @return DateTimeZone */ + public static function __set_state(array $array) {} + + /** + * @return DateTimeImmutable|false + * @alias date_create_immutable_from_format + */ + public static function createFromFormat(string $format, string $time, ?DateTimeZone $timezone = null) {} + + /** + * @return array|false + * @alias date_get_last_errors + */ + public static function getLastErrors() {} + + /** + * @return string + * @alias date_format + */ + public function format(string $format) {} + + /** + * @return DateTimeZone|false + * @alias date_timezone_get + */ + public function getTimezone() {} + + /** + * @return int|false + * @alias date_offset_get + */ + public function getOffset() {} + + /** + * @return int|false + * @alias date_timestamp_get + */ + public function getTimestamp() {} + + /** + * @return DateInterval|false + * @alias date_diff + */ + public function diff(DateTimeInterface $object, bool $absolute = false) {} /** @return DateTimeImmutable|false */ - public function modify(string $modify); + public function modify(string $modify) {} /** @return DateTimeImmutable */ - public function add(DateInterval $interval); + public function add(DateInterval $interval) {} /** @return DateTimeImmutable */ - public function sub(DateInterval $interval); + public function sub(DateInterval $interval) {} /** @return DateTimeImmutable */ - public function setTimezone(DateTimeZone $timezone); + public function setTimezone(DateTimeZone $timezone) {} /** @return DateTimeImmutable */ - public function setTime(int $hour, int $minute, int $second = 0, int $microseconds = 0); + public function setTime(int $hour, int $minute, int $second = 0, int $microseconds = 0) {} /** @return DateTimeImmutable */ - public function setDate(int $year, int $month, int $day); + public function setDate(int $year, int $month, int $day) {} /** @return DateTimeImmutable */ - public function setISODate(int $year, int $week, int $day = 1); + public function setISODate(int $year, int $week, int $day = 1) {} /** @return DateTimeImmutable */ - public function setTimestamp(int $timestamp); -} - -class DateTimeZone { - public function __construct(string $timezone); - - /** @return string */ - public function getName(); - - /** @return int */ - public function getOffset(DateTimeInterface $datetime); - - /** @return array|false */ - public function getTransitions( - int $timestamp_begin = PHP_INT_MIN, int $timestamp_end = PHP_INT_MAX); + public function setTimestamp(int $timestamp) {} - /** @return array|false */ - public function getLocation(); + /** @return DateTimeImmutable */ + public static function createFromMutable(DateTime $object) {} - /** @return array */ - public static function listAbbreviations(); + public static function createFromInterface(DateTimeInterface $object): DateTimeImmutable {} +} - /** @return array|false */ - public static function listIdentifiers(int $what = DateTimeZone::ALL, ?string $country = null); - - public function __wakeup(); +class DateTimeZone +{ + public function __construct(string $timezone) {} + + /** + * @return string + * @alias timezone_name_get + */ + public function getName() {} + + /** + * @return int + * @alias timezone_offset_get + */ + public function getOffset(DateTimeInterface $datetime) {} + + /** + * @return array|false + * @alias timezone_transitions_get + */ + public function getTransitions(int $timestamp_begin = PHP_INT_MIN, int $timestamp_end = PHP_INT_MAX) {} + + /** + * @return array|false + * @alias timezone_location_get + */ + public function getLocation() {} + + /** + * @return array + * @alias timezone_abbreviations_list + */ + public static function listAbbreviations() {} + + /** + * @return array|false + * @alias timezone_identifiers_list + */ + public static function listIdentifiers(int $what = DateTimeZone::ALL, ?string $country = null) {} + + public function __wakeup() {} /** @return DateTimeZone */ - public static function __set_state(array $array); + public static function __set_state(array $array) {} } -class DateInterval { - public function __construct(string $interval_spec); +class DateInterval +{ + public function __construct(string $interval_spec) {} - /** @return DateInterval|false */ - public static function createFromDateString(string $time); + /** + * @return DateInterval|false + * @alias date_interval_create_from_date_string + */ + public static function createFromDateString(string $time) {} - /** @return string */ - public function format(string $format); + /** + * @return string + * @alias date_interval_format + */ + public function format(string $format) {} - public function __wakeup(); + public function __wakeup() {} /** @return DateInterval */ - public static function __set_state(array $array); + public static function __set_state(array $array) {} } -class DatePeriod implements Traversable { +class DatePeriod implements Traversable +{ /* Has an overloaded signature */ - public function __construct($start, $interval = UNKNOWN, $end = UNKNOWN); + public function __construct($start, $interval = UNKNOWN, $end = UNKNOWN) {} /** @return DateTimeInterface */ - public function getStartDate(); + public function getStartDate() {} /** @return DateTimeInterface|null */ - public function getEndDate(); + public function getEndDate() {} /** @return DateInterval */ - public function getDateInterval(); + public function getDateInterval() {} /** @return int|null */ - public function getRecurrences(); + public function getRecurrences() {} - public function __wakeup(); + public function __wakeup() {} /** @return DatePeriod */ - public static function __set_state(array $array); + public static function __set_state(array $array) {} } diff --git a/ext/date/php_date_arginfo.h b/ext/date/php_date_arginfo.h index 1cc39b228857f..29646d081c394 100644 --- a/ext/date/php_date_arginfo.h +++ b/ext/date/php_date_arginfo.h @@ -249,6 +249,8 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTime___construct, 0, 0, 0) ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, timezone, DateTimeZone, 1, "null") ZEND_END_ARG_INFO() +#define arginfo_class_DateTime___wakeup arginfo_class_DateTimeInterface_getTimezone + ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTime___set_state, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, array, IS_ARRAY, 0) ZEND_END_ARG_INFO() @@ -269,6 +271,8 @@ ZEND_END_ARG_INFO() #define arginfo_class_DateTime_getLastErrors arginfo_class_DateTimeInterface_getTimezone +#define arginfo_class_DateTime_format arginfo_class_DateTimeInterface_format + ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTime_modify, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, modify, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -279,10 +283,14 @@ ZEND_END_ARG_INFO() #define arginfo_class_DateTime_sub arginfo_class_DateTime_add +#define arginfo_class_DateTime_getTimezone arginfo_class_DateTimeInterface_getTimezone + ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTime_setTimezone, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, timezone, DateTimeZone, 0) ZEND_END_ARG_INFO() +#define arginfo_class_DateTime_getOffset arginfo_class_DateTimeInterface_getTimezone + ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTime_setTime, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, hour, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, minute, IS_LONG, 0) @@ -306,22 +314,30 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTime_setTimestamp, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, timestamp, IS_LONG, 0) ZEND_END_ARG_INFO() -#define arginfo_class_DateTimeImmutable___construct arginfo_class_DateTime___construct +#define arginfo_class_DateTime_getTimestamp arginfo_class_DateTimeInterface_getTimezone -#define arginfo_class_DateTimeImmutable___set_state arginfo_class_DateTime___set_state +#define arginfo_class_DateTime_diff arginfo_class_DateTimeInterface_diff -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTimeImmutable_createFromMutable, 0, 0, 1) - ZEND_ARG_OBJ_INFO(0, object, DateTime, 0) -ZEND_END_ARG_INFO() +#define arginfo_class_DateTimeImmutable___construct arginfo_class_DateTime___construct -ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_DateTimeImmutable_createFromInterface, 0, 1, DateTimeImmutable, 0) - ZEND_ARG_OBJ_INFO(0, object, DateTimeInterface, 0) -ZEND_END_ARG_INFO() +#define arginfo_class_DateTimeImmutable___wakeup arginfo_class_DateTimeInterface_getTimezone + +#define arginfo_class_DateTimeImmutable___set_state arginfo_class_DateTime___set_state #define arginfo_class_DateTimeImmutable_createFromFormat arginfo_class_DateTime_createFromFormat #define arginfo_class_DateTimeImmutable_getLastErrors arginfo_class_DateTimeInterface_getTimezone +#define arginfo_class_DateTimeImmutable_format arginfo_class_DateTimeInterface_format + +#define arginfo_class_DateTimeImmutable_getTimezone arginfo_class_DateTimeInterface_getTimezone + +#define arginfo_class_DateTimeImmutable_getOffset arginfo_class_DateTimeInterface_getTimezone + +#define arginfo_class_DateTimeImmutable_getTimestamp arginfo_class_DateTimeInterface_getTimezone + +#define arginfo_class_DateTimeImmutable_diff arginfo_class_DateTimeInterface_diff + #define arginfo_class_DateTimeImmutable_modify arginfo_class_DateTime_modify #define arginfo_class_DateTimeImmutable_add arginfo_class_DateTime_add @@ -338,6 +354,14 @@ ZEND_END_ARG_INFO() #define arginfo_class_DateTimeImmutable_setTimestamp arginfo_class_DateTime_setTimestamp +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTimeImmutable_createFromMutable, 0, 0, 1) + ZEND_ARG_OBJ_INFO(0, object, DateTime, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_DateTimeImmutable_createFromInterface, 0, 1, DateTimeImmutable, 0) + ZEND_ARG_OBJ_INFO(0, object, DateTimeInterface, 0) +ZEND_END_ARG_INFO() + ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTimeZone___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, timezone, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -447,6 +471,39 @@ ZEND_FUNCTION(date_default_timezone_get); ZEND_FUNCTION(date_sunrise); ZEND_FUNCTION(date_sunset); ZEND_FUNCTION(date_sun_info); +ZEND_METHOD(DateTime, __construct); +ZEND_METHOD(DateTime, __wakeup); +ZEND_METHOD(DateTime, __set_state); +ZEND_METHOD(DateTime, createFromImmutable); +ZEND_METHOD(DateTime, createFromInterface); +ZEND_METHOD(DateTimeImmutable, __construct); +ZEND_METHOD(DateTimeImmutable, __wakeup); +ZEND_METHOD(DateTimeImmutable, __set_state); +ZEND_METHOD(DateTimeImmutable, modify); +ZEND_METHOD(DateTimeImmutable, add); +ZEND_METHOD(DateTimeImmutable, sub); +ZEND_METHOD(DateTimeImmutable, setTimezone); +ZEND_METHOD(DateTimeImmutable, setTime); +ZEND_METHOD(DateTimeImmutable, setDate); +ZEND_METHOD(DateTimeImmutable, setISODate); +ZEND_METHOD(DateTimeImmutable, setTimestamp); +ZEND_METHOD(DateTimeImmutable, createFromMutable); +ZEND_METHOD(DateTimeImmutable, createFromInterface); +ZEND_METHOD(DateTimeZone, __construct); +ZEND_METHOD(DateTimeZone, __wakeup); +ZEND_METHOD(DateTimeZone, __set_state); +ZEND_METHOD(DateInterval, __construct); +ZEND_METHOD(DateInterval, __wakeup); +ZEND_METHOD(DateInterval, __set_state); +ZEND_METHOD(DatePeriod, __construct); +ZEND_METHOD(DatePeriod, getStartDate); +ZEND_METHOD(DatePeriod, getEndDate); +ZEND_METHOD(DatePeriod, getDateInterval); +ZEND_METHOD(DatePeriod, getRecurrences); +ZEND_METHOD(DatePeriod, __wakeup); +ZEND_METHOD(DatePeriod, __set_state); + + static const zend_function_entry ext_functions[] = { @@ -500,3 +557,100 @@ static const zend_function_entry ext_functions[] = { ZEND_FE(date_sun_info, arginfo_date_sun_info) ZEND_FE_END }; + + +static const zend_function_entry class_DateTimeInterface_methods[] = { + ZEND_ABSTRACT_ME(DateTimeInterface, format, arginfo_class_DateTimeInterface_format) + ZEND_ABSTRACT_ME(DateTimeInterface, getTimezone, arginfo_class_DateTimeInterface_getTimezone) + ZEND_ABSTRACT_ME(DateTimeInterface, getOffset, arginfo_class_DateTimeInterface_getOffset) + ZEND_ABSTRACT_ME(DateTimeInterface, getTimestamp, arginfo_class_DateTimeInterface_getTimestamp) + ZEND_ABSTRACT_ME(DateTimeInterface, diff, arginfo_class_DateTimeInterface_diff) + ZEND_ABSTRACT_ME(DateTimeInterface, __wakeup, arginfo_class_DateTimeInterface___wakeup) + ZEND_FE_END +}; + + +static const zend_function_entry class_DateTime_methods[] = { + ZEND_ME(DateTime, __construct, arginfo_class_DateTime___construct, ZEND_ACC_PUBLIC) + ZEND_ME(DateTime, __wakeup, arginfo_class_DateTime___wakeup, ZEND_ACC_PUBLIC) + ZEND_ME(DateTime, __set_state, arginfo_class_DateTime___set_state, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(DateTime, createFromImmutable, arginfo_class_DateTime_createFromImmutable, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(DateTime, createFromInterface, arginfo_class_DateTime_createFromInterface, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME_MAPPING(createFromFormat, date_create_from_format, arginfo_class_DateTime_createFromFormat, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME_MAPPING(getLastErrors, date_get_last_errors, arginfo_class_DateTime_getLastErrors, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME_MAPPING(format, date_format, arginfo_class_DateTime_format, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(modify, date_modify, arginfo_class_DateTime_modify, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(add, date_add, arginfo_class_DateTime_add, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(sub, date_sub, arginfo_class_DateTime_sub, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(getTimezone, date_timezone_get, arginfo_class_DateTime_getTimezone, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(setTimezone, date_timezone_set, arginfo_class_DateTime_setTimezone, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(getOffset, date_offset_get, arginfo_class_DateTime_getOffset, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(setTime, date_time_set, arginfo_class_DateTime_setTime, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(setDate, date_date_set, arginfo_class_DateTime_setDate, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(setISODate, date_isodate_set, arginfo_class_DateTime_setISODate, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(setTimestamp, date_timestamp_set, arginfo_class_DateTime_setTimestamp, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(getTimestamp, date_timestamp_get, arginfo_class_DateTime_getTimestamp, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(diff, date_diff, arginfo_class_DateTime_diff, ZEND_ACC_PUBLIC) + ZEND_FE_END +}; + + +static const zend_function_entry class_DateTimeImmutable_methods[] = { + ZEND_ME(DateTimeImmutable, __construct, arginfo_class_DateTimeImmutable___construct, ZEND_ACC_PUBLIC) + ZEND_ME(DateTimeImmutable, __wakeup, arginfo_class_DateTimeImmutable___wakeup, ZEND_ACC_PUBLIC) + ZEND_ME(DateTimeImmutable, __set_state, arginfo_class_DateTimeImmutable___set_state, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME_MAPPING(createFromFormat, date_create_immutable_from_format, arginfo_class_DateTimeImmutable_createFromFormat, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME_MAPPING(getLastErrors, date_get_last_errors, arginfo_class_DateTimeImmutable_getLastErrors, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME_MAPPING(format, date_format, arginfo_class_DateTimeImmutable_format, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(getTimezone, date_timezone_get, arginfo_class_DateTimeImmutable_getTimezone, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(getOffset, date_offset_get, arginfo_class_DateTimeImmutable_getOffset, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(getTimestamp, date_timestamp_get, arginfo_class_DateTimeImmutable_getTimestamp, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(diff, date_diff, arginfo_class_DateTimeImmutable_diff, ZEND_ACC_PUBLIC) + ZEND_ME(DateTimeImmutable, modify, arginfo_class_DateTimeImmutable_modify, ZEND_ACC_PUBLIC) + ZEND_ME(DateTimeImmutable, add, arginfo_class_DateTimeImmutable_add, ZEND_ACC_PUBLIC) + ZEND_ME(DateTimeImmutable, sub, arginfo_class_DateTimeImmutable_sub, ZEND_ACC_PUBLIC) + ZEND_ME(DateTimeImmutable, setTimezone, arginfo_class_DateTimeImmutable_setTimezone, ZEND_ACC_PUBLIC) + ZEND_ME(DateTimeImmutable, setTime, arginfo_class_DateTimeImmutable_setTime, ZEND_ACC_PUBLIC) + ZEND_ME(DateTimeImmutable, setDate, arginfo_class_DateTimeImmutable_setDate, ZEND_ACC_PUBLIC) + ZEND_ME(DateTimeImmutable, setISODate, arginfo_class_DateTimeImmutable_setISODate, ZEND_ACC_PUBLIC) + ZEND_ME(DateTimeImmutable, setTimestamp, arginfo_class_DateTimeImmutable_setTimestamp, ZEND_ACC_PUBLIC) + ZEND_ME(DateTimeImmutable, createFromMutable, arginfo_class_DateTimeImmutable_createFromMutable, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(DateTimeImmutable, createFromInterface, arginfo_class_DateTimeImmutable_createFromInterface, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_FE_END +}; + + +static const zend_function_entry class_DateTimeZone_methods[] = { + ZEND_ME(DateTimeZone, __construct, arginfo_class_DateTimeZone___construct, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(getName, timezone_name_get, arginfo_class_DateTimeZone_getName, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(getOffset, timezone_offset_get, arginfo_class_DateTimeZone_getOffset, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(getTransitions, timezone_transitions_get, arginfo_class_DateTimeZone_getTransitions, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(getLocation, timezone_location_get, arginfo_class_DateTimeZone_getLocation, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(listAbbreviations, timezone_abbreviations_list, arginfo_class_DateTimeZone_listAbbreviations, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME_MAPPING(listIdentifiers, timezone_identifiers_list, arginfo_class_DateTimeZone_listIdentifiers, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(DateTimeZone, __wakeup, arginfo_class_DateTimeZone___wakeup, ZEND_ACC_PUBLIC) + ZEND_ME(DateTimeZone, __set_state, arginfo_class_DateTimeZone___set_state, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_FE_END +}; + + +static const zend_function_entry class_DateInterval_methods[] = { + ZEND_ME(DateInterval, __construct, arginfo_class_DateInterval___construct, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(createFromDateString, date_interval_create_from_date_string, arginfo_class_DateInterval_createFromDateString, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME_MAPPING(format, date_interval_format, arginfo_class_DateInterval_format, ZEND_ACC_PUBLIC) + ZEND_ME(DateInterval, __wakeup, arginfo_class_DateInterval___wakeup, ZEND_ACC_PUBLIC) + ZEND_ME(DateInterval, __set_state, arginfo_class_DateInterval___set_state, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_FE_END +}; + + +static const zend_function_entry class_DatePeriod_methods[] = { + ZEND_ME(DatePeriod, __construct, arginfo_class_DatePeriod___construct, ZEND_ACC_PUBLIC) + ZEND_ME(DatePeriod, getStartDate, arginfo_class_DatePeriod_getStartDate, ZEND_ACC_PUBLIC) + ZEND_ME(DatePeriod, getEndDate, arginfo_class_DatePeriod_getEndDate, ZEND_ACC_PUBLIC) + ZEND_ME(DatePeriod, getDateInterval, arginfo_class_DatePeriod_getDateInterval, ZEND_ACC_PUBLIC) + ZEND_ME(DatePeriod, getRecurrences, arginfo_class_DatePeriod_getRecurrences, ZEND_ACC_PUBLIC) + ZEND_ME(DatePeriod, __wakeup, arginfo_class_DatePeriod___wakeup, ZEND_ACC_PUBLIC) + ZEND_ME(DatePeriod, __set_state, arginfo_class_DatePeriod___set_state, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_FE_END +}; diff --git a/ext/date/tests/DateTimeZone_verify.phpt b/ext/date/tests/DateTimeZone_verify.phpt deleted file mode 100644 index 0787d11c27e1f..0000000000000 --- a/ext/date/tests/DateTimeZone_verify.phpt +++ /dev/null @@ -1,123 +0,0 @@ ---TEST-- -Test DateTimeZone class registration ---FILE-- -getMethods(); -var_dump($methods); - -echo "..and get names of all its class constants\n"; -$constants = $class->getConstants(); -var_dump($constants); -?> ---EXPECTF-- -*** Verify DateTimeZone class *** -Verify DateTimeZone class registered OK -object(ReflectionClass)#%d (1) { - ["name"]=> - string(12) "DateTimeZone" -} -..and get names of all its methods -array(9) { - [0]=> - object(ReflectionMethod)#%d (2) { - ["name"]=> - string(11) "__construct" - ["class"]=> - string(12) "DateTimeZone" - } - [1]=> - object(ReflectionMethod)#%d (2) { - ["name"]=> - string(8) "__wakeup" - ["class"]=> - string(12) "DateTimeZone" - } - [2]=> - object(ReflectionMethod)#%d (2) { - ["name"]=> - string(11) "__set_state" - ["class"]=> - string(12) "DateTimeZone" - } - [3]=> - object(ReflectionMethod)#%d (2) { - ["name"]=> - string(7) "getName" - ["class"]=> - string(12) "DateTimeZone" - } - [4]=> - object(ReflectionMethod)#%d (2) { - ["name"]=> - string(9) "getOffset" - ["class"]=> - string(12) "DateTimeZone" - } - [5]=> - object(ReflectionMethod)#%d (2) { - ["name"]=> - string(14) "getTransitions" - ["class"]=> - string(12) "DateTimeZone" - } - [6]=> - object(ReflectionMethod)#%d (2) { - ["name"]=> - string(11) "getLocation" - ["class"]=> - string(12) "DateTimeZone" - } - [7]=> - object(ReflectionMethod)#%d (2) { - ["name"]=> - string(17) "listAbbreviations" - ["class"]=> - string(12) "DateTimeZone" - } - [8]=> - object(ReflectionMethod)#%d (2) { - ["name"]=> - string(15) "listIdentifiers" - ["class"]=> - string(12) "DateTimeZone" - } -} -..and get names of all its class constants -array(14) { - ["AFRICA"]=> - int(1) - ["AMERICA"]=> - int(2) - ["ANTARCTICA"]=> - int(4) - ["ARCTIC"]=> - int(8) - ["ASIA"]=> - int(16) - ["ATLANTIC"]=> - int(32) - ["AUSTRALIA"]=> - int(64) - ["EUROPE"]=> - int(128) - ["INDIAN"]=> - int(256) - ["PACIFIC"]=> - int(512) - ["UTC"]=> - int(1024) - ["ALL"]=> - int(2047) - ["ALL_WITH_BC"]=> - int(4095) - ["PER_COUNTRY"]=> - int(4096) -} From ca006e54e30bc5ac96f35af1ed7fd73a8c422cf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sat, 11 Apr 2020 10:23:51 +0200 Subject: [PATCH 106/338] Add missing visibility modifiers in stubs --- Zend/zend_closures.stub.php | 8 +-- Zend/zend_exceptions.stub.php | 38 +++++++-------- Zend/zend_generators.stub.php | 16 +++--- Zend/zend_interfaces.stub.php | 28 +++++------ ext/ffi/ffi.stub.php | 34 ++++++------- ext/fileinfo/fileinfo.stub.php | 8 +-- ext/session/session.stub.php | 18 +++---- ext/snmp/snmp.stub.php | 18 +++---- ext/soap/soap.stub.php | 56 ++++++++++----------- ext/sqlite3/sqlite3.stub.php | 80 +++++++++++++++--------------- ext/xmlreader/xmlreader.stub.php | 50 +++++++++---------- ext/xmlwriter/xmlwriter.stub.php | 84 ++++++++++++++++---------------- 12 files changed, 219 insertions(+), 219 deletions(-) diff --git a/Zend/zend_closures.stub.php b/Zend/zend_closures.stub.php index 0dc92789a0024..65ad4635dae8a 100644 --- a/Zend/zend_closures.stub.php +++ b/Zend/zend_closures.stub.php @@ -5,17 +5,17 @@ private function __construct() {} /** @return ?Closure */ - static function bind(Closure $closure, ?object $newthis, $newscope = UNKNOWN) {} + public static function bind(Closure $closure, ?object $newthis, $newscope = UNKNOWN) {} /** @return ?Closure */ - function bindTo(?object $newthis, $newscope = UNKNOWN) {} + public function bindTo(?object $newthis, $newscope = UNKNOWN) {} /** @return mixed */ - function call(object $newthis, ...$parameters) {} + public function call(object $newthis, ...$parameters) {} /** * @param callable $callable Not a proper type annotation due to bug #78770 * @return Closure */ - function fromCallable($callable) {} + public function fromCallable($callable) {} } diff --git a/Zend/zend_exceptions.stub.php b/Zend/zend_exceptions.stub.php index cf631f3c2b00a..83e3a3ba45191 100644 --- a/Zend/zend_exceptions.stub.php +++ b/Zend/zend_exceptions.stub.php @@ -3,63 +3,63 @@ interface Throwable extends Stringable { /** @return string */ - function getMessage(); + public function getMessage(); /** @return int */ - function getCode(); + public function getCode(); /** @return string */ - function getFile(); + public function getFile(); /** @return int */ - function getLine(); + public function getLine(); /** @return array */ - function getTrace(); + public function getTrace(); /** @return ?Throwable */ - function getPrevious(); + public function getPrevious(); /** @return string */ - function getTraceAsString(); + public function getTraceAsString(); } class Exception implements Throwable { final private function __clone() {} - function __construct(string $message = UNKNOWN, int $code = 0, ?Throwable $previous = null) {} + public function __construct(string $message = UNKNOWN, int $code = 0, ?Throwable $previous = null) {} - function __wakeup() {} + public function __wakeup() {} /** @return string */ - final function getMessage() {} + final public function getMessage() {} /** @return int */ - final function getCode() {} + final public function getCode() {} /** @return string */ - final function getFile() {} + final public function getFile() {} /** @return int */ - final function getLine() {} + final public function getLine() {} /** @return array */ - final function getTrace() {} + final public function getTrace() {} /** @return ?Throwable */ - final function getPrevious() {} + final public function getPrevious() {} /** @return string */ - final function getTraceAsString() {} + final public function getTraceAsString() {} - function __toString(): string {} + public function __toString(): string {} } class ErrorException extends Exception { - function __construct(string $message = UNKNOWN, int $code = 0, int $severity = E_ERROR, string $filename = UNKNOWN, int $lineno = 0, ?Throwable $previous = null) {} + public function __construct(string $message = UNKNOWN, int $code = 0, int $severity = E_ERROR, string $filename = UNKNOWN, int $lineno = 0, ?Throwable $previous = null) {} /** @return int */ - final function getSeverity() {} + final public function getSeverity() {} } diff --git a/Zend/zend_generators.stub.php b/Zend/zend_generators.stub.php index 3599cc0e69c2b..7f45f726b5e40 100644 --- a/Zend/zend_generators.stub.php +++ b/Zend/zend_generators.stub.php @@ -2,24 +2,24 @@ final class Generator implements Iterator { - function rewind(): void {} + public function rewind(): void {} - function valid(): bool {} + public function valid(): bool {} /** @return mixed */ - function current() {} + public function current() {} /** @return mixed */ - function key() {} + public function key() {} - function next(): void {} + public function next(): void {} /** @return mixed */ - function send($value) {} + public function send($value) {} /** @return mixed */ - function throw(Throwable $exception) {} + public function throw(Throwable $exception) {} /** @return mixed */ - function getReturn() {} + public function getReturn() {} } diff --git a/Zend/zend_interfaces.stub.php b/Zend/zend_interfaces.stub.php index b78257f53f0c6..1deb28a384376 100644 --- a/Zend/zend_interfaces.stub.php +++ b/Zend/zend_interfaces.stub.php @@ -5,59 +5,59 @@ interface Traversable {} interface IteratorAggregate extends Traversable { /** @return Traversable */ - function getIterator(); + public function getIterator(); } interface Iterator extends Traversable { /** @return mixed */ - function current(); + public function current(); /** @return void */ - function next(); + public function next(); /** @return mixed */ - function key(); + public function key(); /** @return bool */ - function valid(); + public function valid(); /** @return void */ - function rewind(); + public function rewind(); } interface ArrayAccess { /** @return bool */ - function offsetExists($offset); + public function offsetExists($offset); /* actually this should be return by ref but atm cannot be */ /** @return mixed */ - function offsetGet($offset); + public function offsetGet($offset); /** @return void */ - function offsetSet($offset, $value); + public function offsetSet($offset, $value); /** @return void */ - function offsetUnset($offset); + public function offsetUnset($offset); } interface Serializable { /** @return string */ - function serialize(); + public function serialize(); /** @return void */ - function unserialize(string $serialized); + public function unserialize(string $serialized); } interface Countable { /** @return int */ - function count(); + public function count(); } interface Stringable { - function __toString(): string; + public function __toString(): string; } diff --git a/ext/ffi/ffi.stub.php b/ext/ffi/ffi.stub.php index 5819443f06b56..384a89ad08197 100644 --- a/ext/ffi/ffi.stub.php +++ b/ext/ffi/ffi.stub.php @@ -2,46 +2,46 @@ final class FFI { - static function cdef(string $code = UNKNOWN, string $lib = UNKNOWN): ?FFI {} + public static function cdef(string $code = UNKNOWN, string $lib = UNKNOWN): ?FFI {} - static function load(string $filename): ?FFI {} + public static function load(string $filename): ?FFI {} - static function scope(string $scope_name): ?FFI {} + public static function scope(string $scope_name): ?FFI {} /** @param FFI\CType|string $type */ - static function new($type, bool $owned = true, bool $persistent = false): ?FFI\CData {} + public static function new($type, bool $owned = true, bool $persistent = false): ?FFI\CData {} /** @prefer-ref $ptr */ - static function free(FFI\CData $ptr): void {} + public static function free(FFI\CData $ptr): void {} /** * @param FFI\CType|string $type * @prefer-ref $ptr */ - static function cast($type, $ptr): ?FFI\CData {} + public static function cast($type, $ptr): ?FFI\CData {} - static function type(string $type): ?FFI\CType {} + public static function type(string $type): ?FFI\CType {} /** @prefer-ref $ptr */ - static function typeof(FFI\CData $ptr): ?FFI\CType {} + public static function typeof(FFI\CData $ptr): ?FFI\CType {} - static function arrayType(FFI\CType $type, array $dims): ?FFI\CType {} + public static function arrayType(FFI\CType $type, array $dims): ?FFI\CType {} /** @prefer-ref $ptr */ - static function addr(FFI\CData $ptr): FFI\CData {} + public static function addr(FFI\CData $ptr): FFI\CData {} /** @prefer-ref $ptr */ - static function sizeof(object $ptr): ?int {} + public static function sizeof(object $ptr): ?int {} /** @prefer-ref $ptr */ - static function alignof(object $ptr): ?int {} + public static function alignof(object $ptr): ?int {} /** * @prefer-ref $dst * @prefer-ref $src * @param string|FFI\CData $dst */ - static function memcpy(FFI\CData $dst, $src, int $size): void {} + public static function memcpy(FFI\CData $dst, $src, int $size): void {} /** * @prefer-ref $ptr1 @@ -49,14 +49,14 @@ static function memcpy(FFI\CData $dst, $src, int $size): void {} * @prefer-ref $ptr2 * @param string|FFI\CData $ptr2 */ - static function memcmp($ptr1, $ptr2, int $size): ?int {} + public static function memcmp($ptr1, $ptr2, int $size): ?int {} /** @prefer-ref $ptr */ - static function memset(FFI\CData $ptr, int $ch, int $size): void {} + public static function memset(FFI\CData $ptr, int $ch, int $size): void {} /** @prefer-ref $ptr */ - static function string(FFI\CData $ptr, int $size = UNKNOWN): ?string {} + public static function string(FFI\CData $ptr, int $size = UNKNOWN): ?string {} /** @prefer-ref $ptr */ - static function isNull(FFI\CData $ptr): bool {} + public static function isNull(FFI\CData $ptr): bool {} } diff --git a/ext/fileinfo/fileinfo.stub.php b/ext/fileinfo/fileinfo.stub.php index 6835a4930f92e..a5ecb8872fb9e 100644 --- a/ext/fileinfo/fileinfo.stub.php +++ b/ext/fileinfo/fileinfo.stub.php @@ -4,22 +4,22 @@ class finfo { - function __construct(int $options = FILEINFO_NONE, string $arg = "") {} + public function __construct(int $options = FILEINFO_NONE, string $arg = "") {} /** * @param ?resource $context * @return string|false */ - function file(string $file_name, int $options = FILEINFO_NONE, $context = null) {} + public function file(string $file_name, int $options = FILEINFO_NONE, $context = null) {} /** * @param ?resource $context * @return string|false */ - function buffer(string $string, int $options = FILEINFO_NONE, $context = null) {} + public function buffer(string $string, int $options = FILEINFO_NONE, $context = null) {} /** @return bool */ - function set_flags(int $options) {} + public function set_flags(int $options) {} } /** @return resource|false */ diff --git a/ext/session/session.stub.php b/ext/session/session.stub.php index 1363b2aef4027..8c3a6480259cb 100644 --- a/ext/session/session.stub.php +++ b/ext/session/session.stub.php @@ -50,35 +50,35 @@ function session_start(array $options = []): bool {} interface SessionHandlerInterface { /** @return bool */ - function open(string $save_path, string $session_name); + public function open(string $save_path, string $session_name); /** @return bool */ - function close(); + public function close(); /** @return string */ - function read(string $key); + public function read(string $key); /** @return bool */ - function write(string $key, string $val); + public function write(string $key, string $val); /** @return bool */ - function destroy(string $key); + public function destroy(string $key); /** @return int|bool */ - function gc(int $maxlifetime); + public function gc(int $maxlifetime); } interface SessionIdInterface { /** @return string */ - function create_sid(); + public function create_sid(); } interface SessionUpdateTimestampHandlerInterface { /** @return bool */ - function validateId(string $key); + public function validateId(string $key); /** @return bool */ - function updateTimestamp(string $key, string $val); + public function updateTimestamp(string $key, string $val); } diff --git a/ext/snmp/snmp.stub.php b/ext/snmp/snmp.stub.php index 11e8516a944d3..bee2b393182fc 100644 --- a/ext/snmp/snmp.stub.php +++ b/ext/snmp/snmp.stub.php @@ -82,31 +82,31 @@ function snmp_read_mib(string $filename): bool {} class SNMP { - function __construct(int $version, string $host, string $community, int $timeout = UNKNOWN, int $retries = UNKNOWN) {} + public function __construct(int $version, string $host, string $community, int $timeout = UNKNOWN, int $retries = UNKNOWN) {} /** @return bool */ - function close() {} + public function close() {} /** @return bool */ - function setSecurity(string $sec_level, string $auth_protocol = '', string $auth_passphrase = '', string $priv_protocol = '', string $priv_passphrase = '', string $contextName = '', string $contextEngineID = '') {} + public function setSecurity(string $sec_level, string $auth_protocol = '', string $auth_passphrase = '', string $priv_protocol = '', string $priv_passphrase = '', string $contextName = '', string $contextEngineID = '') {} /** * @param array|string $object_id * @return array|bool */ - function get($object_id, bool $use_orignames = false) {} + public function get($object_id, bool $use_orignames = false) {} /** * @param array|string $object_id * @return array|bool */ - function getnext($object_id) {} + public function getnext($object_id) {} /** * @param array|string $object_id * @return array|bool */ - function walk($object_id, bool $suffix_keys = false, int $max_repetitions = UNKNOWN, int $non_repeaters = UNKNOWN) {} + public function walk($object_id, bool $suffix_keys = false, int $max_repetitions = UNKNOWN, int $non_repeaters = UNKNOWN) {} /** * @param array|string $object_id @@ -114,11 +114,11 @@ function walk($object_id, bool $suffix_keys = false, int $max_repetitions = UNKN * @param array|string $value * @return array|bool */ - function set($object_id, $type, $value) {} + public function set($object_id, $type, $value) {} /** @return int */ - function getErrno() {} + public function getErrno() {} /** @return string */ - function getError() {} + public function getError() {} } diff --git a/ext/soap/soap.stub.php b/ext/soap/soap.stub.php index 77070dccf75cb..19553b7732e72 100644 --- a/ext/soap/soap.stub.php +++ b/ext/soap/soap.stub.php @@ -6,95 +6,95 @@ function is_soap_fault($object): bool {} class SoapParam { - function __construct($data, string $name); + public function __construct($data, string $name); } class SoapHeader { - function __construct(string $namespace, string $name, $data = UNKNOWN, bool $mustunderstand = false, $actor = UNKNOWN); + public function __construct(string $namespace, string $name, $data = UNKNOWN, bool $mustunderstand = false, $actor = UNKNOWN); } class SoapFault extends Exception { - function __construct($faultcode, string $faultstring, ?string $faultactor = null, $detail = null, ?string $faultname = null, $headerfault = null); + public function __construct($faultcode, string $faultstring, ?string $faultactor = null, $detail = null, ?string $faultname = null, $headerfault = null); - function __toString(): string; + public function __toString(): string; } class SoapVar { - function __construct($data, $encoding, string $type_name = "", string $type_namespace = "", string $node_name = "", string $node_namespace = ""); + public function __construct($data, $encoding, string $type_name = "", string $type_namespace = "", string $node_name = "", string $node_namespace = ""); } class SoapServer { - function __construct($wsdl, array $options = []); + public function __construct($wsdl, array $options = []); /** @return void */ - function fault(string $code, string $string, string $actor = "", $details = null, string $name = ""); + public function fault(string $code, string $string, string $actor = "", $details = null, string $name = ""); /** @return void */ - function addSoapHeader(SoapHeader $object); + public function addSoapHeader(SoapHeader $object); /** @return void */ - function setPersistence(int $mode); + public function setPersistence(int $mode); /** @return void */ - function setClass(string $class_name, ...$argv); + public function setClass(string $class_name, ...$argv); /** @return void */ - function setObject(object $object); + public function setObject(object $object); /** @return array */ - function getFunctions(); + public function getFunctions(); /** @return void */ - function addFunction($functions); + public function addFunction($functions); /** @return void */ - function handle(string $soap_request = UNKNOWN); + public function handle(string $soap_request = UNKNOWN); } class SoapClient { - function __construct($wsdl, array $options = []); + public function __construct($wsdl, array $options = []); /** @return mixed */ - function __call(string $function_name, array $arguments); + public function __call(string $function_name, array $arguments); /** @return mixed */ - function __soapCall(string $function_name, array $arguments, ?array $options = null, $input_headers = null, $output_headers = null); + public function __soapCall(string $function_name, array $arguments, ?array $options = null, $input_headers = null, $output_headers = null); /** @return array|null */ - function __getFunctions(); + public function __getFunctions(); /** @return array|null */ - function __getTypes(); + public function __getTypes(); /** @return ?string */ - function __getLastRequest(); + public function __getLastRequest(); /** @return ?string */ - function __getLastResponse(); + public function __getLastResponse(); /** @return ?string */ - function __getLastRequestHeaders(); + public function __getLastRequestHeaders(); /** @return ?string */ - function __getLastResponseHeaders(); + public function __getLastResponseHeaders(); /** @return ?string */ - function __doRequest(string $request, string $location, string $action, int $version, int $one_way = 0); + public function __doRequest(string $request, string $location, string $action, int $version, int $one_way = 0); /** @return void */ - function __setCookie(string $name, ?string $value = null); + public function __setCookie(string $name, ?string $value = null); /** @return array */ - function __getCookies(); + public function __getCookies(); /** @return bool */ - function __setSoapHeaders($soapheaders = null); + public function __setSoapHeaders($soapheaders = null); /** @return ?string */ - function __setLocation(string $new_location = ""); + public function __setLocation(string $new_location = ""); } diff --git a/ext/sqlite3/sqlite3.stub.php b/ext/sqlite3/sqlite3.stub.php index 8f3bc4f2dd1b8..18478d85b3ce0 100644 --- a/ext/sqlite3/sqlite3.stub.php +++ b/ext/sqlite3/sqlite3.stub.php @@ -2,130 +2,130 @@ class SQLite3 { - function __construct(string $filename, int $flags = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, string $encryption_key = '') {} + public function __construct(string $filename, int $flags = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, string $encryption_key = '') {} /** @return void */ - function open(string $filename, int $flags = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, string $encryption_key = '') {} + public function open(string $filename, int $flags = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, string $encryption_key = '') {} /** @return bool */ - function close() {} + public function close() {} /** @return array */ - function version() {} + public function version() {} /** @return int */ - function lastInsertRowID() {} + public function lastInsertRowID() {} /** @return int */ - function lastErrorCode() {} + public function lastErrorCode() {} /** @return int */ - function lastExtendedErrorCode() {} + public function lastExtendedErrorCode() {} /** @return string */ - function lastErrorMsg() {} + public function lastErrorMsg() {} /** @return int */ - function changes() {} + public function changes() {} /** @return bool */ - function busyTimeout(int $ms) {} + public function busyTimeout(int $ms) {} #ifndef SQLITE_OMIT_LOAD_EXTENSION /** @return bool */ - function loadExtension(string $shared_library) {} + public function loadExtension(string $shared_library) {} #endif #if SQLITE_VERSION_NUMBER >= 3006011 /** @return bool */ - function backup(SQLite3 $destination_db, string $source_dbname = "main", string $destination_dbname = "main") {} + public function backup(SQLite3 $destination_db, string $source_dbname = "main", string $destination_dbname = "main") {} #endif /** @return string */ - function escapeString(string $value) {} + public function escapeString(string $value) {} /** @return SQLite3Stmt|false */ - function prepare(string $query) {} + public function prepare(string $query) {} /** @return SQLite3Result|false|null */ - function query(string $query) {} + public function query(string $query) {} /** @return mixed */ - function querySingle(string $query, bool $entire_row = false) {} + public function querySingle(string $query, bool $entire_row = false) {} /** @return bool */ - function createFunction(string $name, $callback, int $argument_count = -1, int $flags = 0) {} + public function createFunction(string $name, $callback, int $argument_count = -1, int $flags = 0) {} /** @return bool */ - function createAggregate(string $name, $step_callback, $final_callback, int $argument_count = -1) {} + public function createAggregate(string $name, $step_callback, $final_callback, int $argument_count = -1) {} /** @return bool */ - function createCollation(string $name, $callback) {} + public function createCollation(string $name, $callback) {} /** @return resource|false */ - function openBlob(string $table, string $column, int $rowid, string $dbname = "main", int $flags = SQLITE3_OPEN_READONLY) {} + public function openBlob(string $table, string $column, int $rowid, string $dbname = "main", int $flags = SQLITE3_OPEN_READONLY) {} /** @return bool */ - function enableExceptions(bool $enableExceptions = false) {} + public function enableExceptions(bool $enableExceptions = false) {} /** @return bool */ - function enableExtendedResultCodes(bool $enable = true) {} + public function enableExtendedResultCodes(bool $enable = true) {} /** @return bool */ - function setAuthorizer(?callable $callback) {} + public function setAuthorizer(?callable $callback) {} } class SQLite3Stmt { - function __construct(SQLite3 $sqlite3, string $sql) {} + public function __construct(SQLite3 $sqlite3, string $sql) {} /** @return bool */ - function bindParam($param_number, &$param, int $type = UNKNOWN) {} + public function bindParam($param_number, &$param, int $type = UNKNOWN) {} /** @return bool */ - function bindValue($param_number, $param, int $type = UNKNOWN) {} + public function bindValue($param_number, $param, int $type = UNKNOWN) {} /** @return bool */ - function clear() {} + public function clear() {} /** @return bool */ - function close() {} + public function close() {} /** @return SQLite3Result|false */ - function execute() {} + public function execute() {} /** @return string|false */ - function getSQL(bool $expanded = false) {} + public function getSQL(bool $expanded = false) {} /** @return int */ - function paramCount() {} + public function paramCount() {} /** @return bool */ - function readOnly() {} + public function readOnly() {} /** @return bool */ - function reset() {} + public function reset() {} } class SQLite3Result { - function __construct() {} + public function __construct() {} /** @return int */ - function numColumns() {} + public function numColumns() {} /** @return string|false */ - function columnName(int $column_number) {} + public function columnName(int $column_number) {} /** @return int|false */ - function columnType(int $column_number) {} + public function columnType(int $column_number) {} /** @return array|false */ - function fetchArray(int $mode = SQLITE3_BOTH) {} + public function fetchArray(int $mode = SQLITE3_BOTH) {} /** @return bool */ - function reset() {} + public function reset() {} /** @return bool */ - function finalize() {} + public function finalize() {} } diff --git a/ext/xmlreader/xmlreader.stub.php b/ext/xmlreader/xmlreader.stub.php index 6608e60768e04..5a8a108a9d878 100644 --- a/ext/xmlreader/xmlreader.stub.php +++ b/ext/xmlreader/xmlreader.stub.php @@ -3,77 +3,77 @@ class XMLReader { /** @return bool */ - function close() {} + public function close() {} /** @return string|null|false */ - function getAttribute(string $name) {} + public function getAttribute(string $name) {} /** @return ?string */ - function getAttributeNo(int $index) {} + public function getAttributeNo(int $index) {} /** @return string|null|false */ - function getAttributeNs(string $name, string $namespaceURI) {} + public function getAttributeNs(string $name, string $namespaceURI) {} /** @return bool */ - function getParserProperty(int $property) {} + public function getParserProperty(int $property) {} /** @return bool */ - function isValid() {} + public function isValid() {} /** @return string|null|false */ - function lookupNamespace(string $prefix) {} + public function lookupNamespace(string $prefix) {} /** @return bool */ - function moveToAttribute(string $name) {} + public function moveToAttribute(string $name) {} /** @return bool */ - function moveToAttributeNo(int $index) {} + public function moveToAttributeNo(int $index) {} /** @return bool */ - function moveToAttributeNs(string $name, string $namespaceURI) {} + public function moveToAttributeNs(string $name, string $namespaceURI) {} /** @return bool */ - function moveToElement() {} + public function moveToElement() {} /** @return bool */ - function moveToFirstAttribute() {} + public function moveToFirstAttribute() {} /** @return bool */ - function moveToNextAttribute() {} + public function moveToNextAttribute() {} /** @return bool */ - function read() {} + public function read() {} /** @return bool */ - function next(string $localname = UNKNOWN) {} + public function next(string $localname = UNKNOWN) {} /** @return bool|XMLReader */ - function open(string $URI, ?string $encoding = null, int $options = 0) {} + public function open(string $URI, ?string $encoding = null, int $options = 0) {} /** @return string */ - function readInnerXml() {} + public function readInnerXml() {} /** @return string */ - function readOuterXml() {} + public function readOuterXml() {} /** @return string */ - function readString() {} + public function readString() {} /** @return bool */ - function setSchema(?string $filename) {} + public function setSchema(?string $filename) {} /** @return bool */ - function setParserProperty(int $property, bool $value) {} + public function setParserProperty(int $property, bool $value) {} /** @return bool */ - function setRelaxNGSchema(?string $filename) {} + public function setRelaxNGSchema(?string $filename) {} /** @return bool */ - function setRelaxNGSchemaSource(?string $source) {} + public function setRelaxNGSchemaSource(?string $source) {} /** @return bool|XMLReader */ - function XML(string $source, ?string $encoding = null, int $options = 0) {} + public function XML(string $source, ?string $encoding = null, int $options = 0) {} /** @return DOMNode|bool */ - function expand(?DOMNode $basenode = null) {} + public function expand(?DOMNode $basenode = null) {} } diff --git a/ext/xmlwriter/xmlwriter.stub.php b/ext/xmlwriter/xmlwriter.stub.php index 35a0dec65885c..7dc6bc47bd562 100644 --- a/ext/xmlwriter/xmlwriter.stub.php +++ b/ext/xmlwriter/xmlwriter.stub.php @@ -86,87 +86,87 @@ function xmlwriter_flush(XMLWriter $xmlwriter, bool $empty = true): string|int { class XMLWriter { - function openUri(string $uri): bool {} + public function openUri(string $uri): bool {} - function openMemory(): bool {} + public function openMemory(): bool {} - function setIndent(bool $indent): bool {} + public function setIndent(bool $indent): bool {} - function setIdentString(string $indentString): bool {} + public function setIdentString(string $indentString): bool {} - function startComment(): bool {} + public function startComment(): bool {} - function endComment(): bool {} + public function endComment(): bool {} - function startAttribute(string $name): bool {} + public function startAttribute(string $name): bool {} - function endAttribute(): bool {} + public function endAttribute(): bool {} - function writeAttribute(string $name, string $value): bool {} + public function writeAttribute(string $name, string $value): bool {} - function startAttributeNs(string $prefix, string $name, ?string $uri): bool {} + public function startAttributeNs(string $prefix, string $name, ?string $uri): bool {} - function writeAttributeNs(string $prefix, string $name, ?string $uri, string $content): bool {} + public function writeAttributeNs(string $prefix, string $name, ?string $uri, string $content): bool {} - function startElement(string $name): bool {} + public function startElement(string $name): bool {} - function endElement(): bool {} + public function endElement(): bool {} - function fullEndElement(): bool {} + public function fullEndElement(): bool {} - function startElementNs(?string $prefix, string $name, ?string $uri): bool {} + public function startElementNs(?string $prefix, string $name, ?string $uri): bool {} - function writeElement(string $name, ?string $content = null): bool {} + public function writeElement(string $name, ?string $content = null): bool {} - function writeElementNs(?string $prefix, string $name, ?string $uri, ?string $content = null): bool {} + public function writeElementNs(?string $prefix, string $name, ?string $uri, ?string $content = null): bool {} - function startPi(string $target): bool {} + public function startPi(string $target): bool {} - function endPi(): bool {} + public function endPi(): bool {} - function writePi(string $target, string $content): bool {} + public function writePi(string $target, string $content): bool {} - function startCdata(): bool {} + public function startCdata(): bool {} - function endCdata(): bool {} + public function endCdata(): bool {} - function writeCdata(string $content): bool {} + public function writeCdata(string $content): bool {} - function text(string $content): bool {} + public function text(string $content): bool {} - function writeRaw(string $content): bool {} + public function writeRaw(string $content): bool {} - function startDocument(?string $version = '1.0', ?string $encoding = null, ?string $standalone = null): bool {} + public function startDocument(?string $version = '1.0', ?string $encoding = null, ?string $standalone = null): bool {} - function endDocument(): bool {} + public function endDocument(): bool {} - function writeComment(string $content): bool {} + public function writeComment(string $content): bool {} - function startDtd(string $qualifiedName, ?string $publicId = null, ?string $systemId = null): bool {} + public function startDtd(string $qualifiedName, ?string $publicId = null, ?string $systemId = null): bool {} - function endDtd(): bool {} + public function endDtd(): bool {} - function writeDtd(string $name, ?string $publicId = null, ?string $systemId = null, ?string $subset = null): bool {} + public function writeDtd(string $name, ?string $publicId = null, ?string $systemId = null, ?string $subset = null): bool {} - function startDtdElement(string $qualifiedName): bool {} + public function startDtdElement(string $qualifiedName): bool {} - function endDtdElement(): bool {} + public function endDtdElement(): bool {} - function writeDtdElement(string $name, string $content): bool {} + public function writeDtdElement(string $name, string $content): bool {} - function startDtdAttlist(string $name): bool {} + public function startDtdAttlist(string $name): bool {} - function endDtdAttlist(): bool {} + public function endDtdAttlist(): bool {} - function writeDtdAttlist(string $name, string $content): bool {} + public function writeDtdAttlist(string $name, string $content): bool {} - function startDtdEntity(string $name, bool $isparam): bool {} + public function startDtdEntity(string $name, bool $isparam): bool {} - function endDtdEntity(): bool {} + public function endDtdEntity(): bool {} - function writeDtdEntity(string $name, string $content, bool $isparam, string $publicId = UNKNOWN, string $systemId = UNKNOWN, string $ndataid = UNKNOWN): bool {} + public function writeDtdEntity(string $name, string $content, bool $isparam, string $publicId = UNKNOWN, string $systemId = UNKNOWN, string $ndataid = UNKNOWN): bool {} - function outputMemory(bool $flush = true): string {} + public function outputMemory(bool $flush = true): string {} - function flush(bool $empty = true): string|int {} + public function flush(bool $empty = true): string|int {} } From 3fe49d81f850977db93981cf66ed3057f57fd0c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sat, 11 Apr 2020 13:27:04 +0200 Subject: [PATCH 107/338] Generate method entries from stubs for a couple of extensions Closes GH-5368 --- Zend/zend_API.h | 1 + build/gen_stub.php | 14 +++++++------- ext/com_dotnet/com_extension.c | 21 +++------------------ ext/com_dotnet/com_extension_arginfo.h | 25 +++++++++++++++++++++++++ ext/com_dotnet/com_persist.stub.php | 20 +++++++++++--------- ext/date/php_date_arginfo.h | 14 ++++++-------- ext/dom/documenttype.c | 11 ----------- ext/dom/dom_arginfo.h | 5 +++++ ext/dom/dom_fe.h | 1 - ext/dom/php_dom.c | 2 +- ext/fileinfo/fileinfo.c | 13 +------------ ext/fileinfo/fileinfo.stub.php | 8 +++++++- ext/fileinfo/fileinfo_arginfo.h | 9 +++++++++ ext/hash/hash.c | 9 ++------- ext/hash/hash_arginfo.h | 7 +++++++ ext/json/json.c | 9 +-------- ext/json/json_arginfo.h | 6 ++++++ ext/zend_test/test.c | 21 +++++---------------- ext/zend_test/test.stub.php | 7 ++++--- ext/zend_test/test_arginfo.h | 16 ++++++++++++++++ 20 files changed, 117 insertions(+), 102 deletions(-) diff --git a/Zend/zend_API.h b/Zend/zend_API.h index fbf725adeeb24..44c24bbca17eb 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -84,6 +84,7 @@ typedef struct _zend_fcall_info_cache { #define ZEND_ME(classname, name, arg_info, flags) ZEND_RAW_FENTRY(#name, zim_##classname##_##name, arg_info, flags) #define ZEND_DEP_ME(classname, name, arg_info, flags) ZEND_RAW_FENTRY(#name, zim_##classname##_##name, arg_info, flags | ZEND_ACC_DEPRECATED) #define ZEND_ABSTRACT_ME(classname, name, arg_info) ZEND_RAW_FENTRY(#name, NULL, arg_info, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT) +#define ZEND_ABSTRACT_ME_WITH_FLAGS(classname, name, arg_info, flags) ZEND_RAW_FENTRY(#name, NULL, arg_info, flags) #define ZEND_MALIAS(classname, name, alias, arg_info, flags) ZEND_RAW_FENTRY(#name, zim_##classname##_##alias, arg_info, flags) #define ZEND_ME_MAPPING(name, func_name, arg_info, flags) ZEND_RAW_FENTRY(#name, zif_##func_name, arg_info, flags) diff --git a/build/gen_stub.php b/build/gen_stub.php index 1cbb21d74cc65..02a035debd180 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -447,8 +447,8 @@ public function getFunctionEntry(): string { } else { if ($this->flags & Class_::MODIFIER_ABSTRACT) { return sprintf( - "\tZEND_ABSTRACT_ME(%s, %s, %s)\n", - $this->name->className, $this->name->name, $this->getArgInfoName() + "\tZEND_ABSTRACT_ME_WITH_FLAGS(%s, %s, %s, %s)\n", + $this->name->className, $this->name->name, $this->getArgInfoName(), $this->getFlagsAsString() ); } @@ -797,8 +797,8 @@ function parseStubFile(string $fileName): FileInfo { $flags |= Class_::MODIFIER_ABSTRACT; } - if ($flags & Class_::MODIFIER_ABSTRACT && !($flags & Class_::MODIFIER_PUBLIC)) { - throw new Exception("Abstract non-public methods are not supported"); + if (!($flags & Class_::VISIBILITY_MODIFIER_MASK)) { + throw new Exception("Method visibility modifier is required"); } $methodInfos[] = parseFunctionLike( @@ -984,9 +984,9 @@ function (FuncInfo $funcInfo) use(&$generatedFunctionDeclarations) { } ); - $code .= "\n\n"; - - $code .= generateFunctionEntries(null, $fileInfo->funcInfos); + if (!empty($fileInfo->funcInfos)) { + $code .= generateFunctionEntries(null, $fileInfo->funcInfos); + } foreach ($fileInfo->classInfos as $classInfo) { $code .= generateFunctionEntries($classInfo->name, $classInfo->funcInfos); diff --git a/ext/com_dotnet/com_extension.c b/ext/com_dotnet/com_extension.c index b37e4b8ffe12f..14094aa039203 100644 --- a/ext/com_dotnet/com_extension.c +++ b/ext/com_dotnet/com_extension.c @@ -37,21 +37,6 @@ zend_class_entry *php_com_exception_class_entry, *php_com_saproxy_class_entry; -static const zend_function_entry com_variant_funcs[] = { - PHP_ME(variant, __construct, arginfo_class_variant___construct, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - -static const zend_function_entry com_com_funcs[] = { - PHP_ME(com, __construct, arginfo_class_com___construct, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - -static const zend_function_entry com_dotnet_funcs[] = { - PHP_ME(dotnet, __construct, arginfo_class_dotnet___construct, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - /* {{{ com_dotnet_module_entry */ zend_module_entry com_dotnet_module_entry = { @@ -196,14 +181,14 @@ PHP_MINIT_FUNCTION(com_dotnet) /* php_com_saproxy_class_entry->constructor->common.fn_flags |= ZEND_ACC_PROTECTED; */ php_com_saproxy_class_entry->get_iterator = php_com_saproxy_iter_get; - INIT_CLASS_ENTRY(ce, "variant", com_variant_funcs); + INIT_CLASS_ENTRY(ce, "variant", class_variant_methods); ce.create_object = php_com_object_new; php_com_variant_class_entry = zend_register_internal_class(&ce); php_com_variant_class_entry->get_iterator = php_com_iter_get; php_com_variant_class_entry->serialize = zend_class_serialize_deny; php_com_variant_class_entry->unserialize = zend_class_unserialize_deny; - INIT_CLASS_ENTRY(ce, "com", com_com_funcs); + INIT_CLASS_ENTRY(ce, "com", class_com_methods); ce.create_object = php_com_object_new; tmp = zend_register_internal_class_ex(&ce, php_com_variant_class_entry); tmp->get_iterator = php_com_iter_get; @@ -211,7 +196,7 @@ PHP_MINIT_FUNCTION(com_dotnet) tmp->unserialize = zend_class_unserialize_deny; #if HAVE_MSCOREE_H - INIT_CLASS_ENTRY(ce, "dotnet", com_dotnet_funcs); + INIT_CLASS_ENTRY(ce, "dotnet", class_dotnet_methods); ce.create_object = php_com_object_new; tmp = zend_register_internal_class_ex(&ce, php_com_variant_class_entry); tmp->get_iterator = php_com_iter_get; diff --git a/ext/com_dotnet/com_extension_arginfo.h b/ext/com_dotnet/com_extension_arginfo.h index 47e41ef2683c5..f4b924358ce13 100644 --- a/ext/com_dotnet/com_extension_arginfo.h +++ b/ext/com_dotnet/com_extension_arginfo.h @@ -163,6 +163,11 @@ ZEND_FUNCTION(com_event_sink); ZEND_FUNCTION(com_print_typeinfo); ZEND_FUNCTION(com_message_pump); ZEND_FUNCTION(com_load_typelib); +ZEND_METHOD(variant, __construct); +ZEND_METHOD(com, __construct); +#if HAVE_MSCOREE_H +ZEND_METHOD(dotnet, __construct); +#endif static const zend_function_entry ext_functions[] = { @@ -200,3 +205,23 @@ static const zend_function_entry ext_functions[] = { ZEND_FE(com_load_typelib, arginfo_com_load_typelib) ZEND_FE_END }; + + +static const zend_function_entry class_variant_methods[] = { + ZEND_ME(variant, __construct, arginfo_class_variant___construct, ZEND_ACC_PUBLIC) + ZEND_FE_END +}; + + +static const zend_function_entry class_com_methods[] = { + ZEND_ME(com, __construct, arginfo_class_com___construct, ZEND_ACC_PUBLIC) + ZEND_FE_END +}; + + +static const zend_function_entry class_dotnet_methods[] = { +#if HAVE_MSCOREE_H + ZEND_ME(dotnet, __construct, arginfo_class_dotnet___construct, ZEND_ACC_PUBLIC) +#endif + ZEND_FE_END +}; diff --git a/ext/com_dotnet/com_persist.stub.php b/ext/com_dotnet/com_persist.stub.php index 5f183b175a72d..c4155bceb1a45 100644 --- a/ext/com_dotnet/com_persist.stub.php +++ b/ext/com_dotnet/com_persist.stub.php @@ -1,21 +1,23 @@ ce_flags |= ZEND_ACC_FINAL; php_hashcontext_ce->create_object = php_hashcontext_create; diff --git a/ext/hash/hash_arginfo.h b/ext/hash/hash_arginfo.h index 65b2612823f35..156c7ad2d2766 100644 --- a/ext/hash/hash_arginfo.h +++ b/ext/hash/hash_arginfo.h @@ -148,6 +148,7 @@ ZEND_FUNCTION(mhash_count); #if defined(PHP_MHASH_BC) ZEND_FUNCTION(mhash); #endif +ZEND_METHOD(HashContext, __construct); static const zend_function_entry ext_functions[] = { @@ -183,3 +184,9 @@ static const zend_function_entry ext_functions[] = { #endif ZEND_FE_END }; + + +static const zend_function_entry class_HashContext_methods[] = { + ZEND_ME(HashContext, __construct, arginfo_class_HashContext___construct, ZEND_ACC_PRIVATE) + ZEND_FE_END +}; diff --git a/ext/json/json.c b/ext/json/json.c index c64378fd565de..68990f5ca41bd 100644 --- a/ext/json/json.c +++ b/ext/json/json.c @@ -37,13 +37,6 @@ PHP_JSON_API zend_class_entry *php_json_exception_ce; PHP_JSON_API ZEND_DECLARE_MODULE_GLOBALS(json) -/* {{{ JsonSerializable methods */ -static const zend_function_entry json_serializable_interface[] = { - PHP_ABSTRACT_ME(JsonSerializable, jsonSerialize, arginfo_class_JsonSerializable_jsonSerialize) - PHP_FE_END -}; -/* }}} */ - /* Register constant for options and errors */ #define PHP_JSON_REGISTER_CONSTANT(_name, _value) \ REGISTER_LONG_CONSTANT(_name, _value, CONST_CS | CONST_PERSISTENT); @@ -53,7 +46,7 @@ static PHP_MINIT_FUNCTION(json) { zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "JsonSerializable", json_serializable_interface); + INIT_CLASS_ENTRY(ce, "JsonSerializable", class_JsonSerializable_methods); php_json_serializable_ce = zend_register_internal_interface(&ce); INIT_CLASS_ENTRY(ce, "JsonException", NULL); diff --git a/ext/json/json_arginfo.h b/ext/json/json_arginfo.h index 9107e088e2280..3cc3bbbba8f3a 100644 --- a/ext/json/json_arginfo.h +++ b/ext/json/json_arginfo.h @@ -36,3 +36,9 @@ static const zend_function_entry ext_functions[] = { ZEND_FE(json_last_error_msg, arginfo_json_last_error_msg) ZEND_FE_END }; + + +static const zend_function_entry class_JsonSerializable_methods[] = { + ZEND_ABSTRACT_ME_WITH_FLAGS(JsonSerializable, jsonSerialize, arginfo_class_JsonSerializable_jsonSerialize, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT) + ZEND_FE_END +}; diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c index f7c2913fac288..ab152e0a45602 100644 --- a/ext/zend_test/test.c +++ b/ext/zend_test/test.c @@ -181,33 +181,22 @@ static zend_function *zend_test_class_static_method_get(zend_class_entry *ce, ze } /* }}} */ -static ZEND_METHOD(_ZendTestClass, __toString) /* {{{ */ { +ZEND_METHOD(_ZendTestClass, __toString) /* {{{ */ { RETURN_EMPTY_STRING(); } /* }}} */ /* Internal function returns bool, we return int. */ -static ZEND_METHOD(_ZendTestClass, is_object) /* {{{ */ { +ZEND_METHOD(_ZendTestClass, is_object) /* {{{ */ { RETURN_LONG(42); } /* }}} */ -static ZEND_METHOD(_ZendTestTrait, testMethod) /* {{{ */ { +ZEND_METHOD(_ZendTestTrait, testMethod) /* {{{ */ { RETURN_TRUE; } /* }}} */ -static const zend_function_entry zend_test_class_methods[] = { - ZEND_ME(_ZendTestClass, is_object, arginfo_class__ZendTestClass_is_object, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - ZEND_ME(_ZendTestClass, __toString, arginfo_class__ZendTestClass___toString, ZEND_ACC_DEPRECATED) - ZEND_FE_END -}; - -static const zend_function_entry zend_test_trait_methods[] = { - ZEND_ME(_ZendTestTrait, testMethod, arginfo_class__ZendTestTrait_testMethod, ZEND_ACC_PUBLIC) - ZEND_FE_END -}; - PHP_MINIT_FUNCTION(zend_test) { zend_class_entry class_entry; @@ -215,7 +204,7 @@ PHP_MINIT_FUNCTION(zend_test) INIT_CLASS_ENTRY(class_entry, "_ZendTestInterface", NULL); zend_test_interface = zend_register_internal_interface(&class_entry); zend_declare_class_constant_long(zend_test_interface, ZEND_STRL("DUMMY"), 0); - INIT_CLASS_ENTRY(class_entry, "_ZendTestClass", zend_test_class_methods); + INIT_CLASS_ENTRY(class_entry, "_ZendTestClass", class__ZendTestClass_methods); zend_test_class = zend_register_internal_class(&class_entry); zend_class_implements(zend_test_class, 1, zend_test_interface); zend_test_class->create_object = zend_test_class_new; @@ -275,7 +264,7 @@ PHP_MINIT_FUNCTION(zend_test) memcpy(&zend_test_class_handlers, &std_object_handlers, sizeof(zend_object_handlers)); zend_test_class_handlers.get_method = zend_test_class_method_get; - INIT_CLASS_ENTRY(class_entry, "_ZendTestTrait", zend_test_trait_methods); + INIT_CLASS_ENTRY(class_entry, "_ZendTestTrait", class__ZendTestTrait_methods); zend_test_trait = zend_register_internal_class(&class_entry); zend_test_trait->ce_flags |= ZEND_ACC_TRAIT; zend_declare_property_null(zend_test_trait, "testProp", sizeof("testProp")-1, ZEND_ACC_PUBLIC); diff --git a/ext/zend_test/test.stub.php b/ext/zend_test/test.stub.php index 84724fd2557b1..f3360fa7f304b 100644 --- a/ext/zend_test/test.stub.php +++ b/ext/zend_test/test.stub.php @@ -3,13 +3,14 @@ /** @generate-function-entries */ class _ZendTestClass { - public static function is_object(): int; + public static function is_object(): int {} - public function __toString(): string; + /** @deprecated */ + public function __toString(): string {} } trait _ZendTestTrait { - public function testMethod(): bool; + public function testMethod(): bool {} } function zend_test_array_return(): array {} diff --git a/ext/zend_test/test_arginfo.h b/ext/zend_test/test_arginfo.h index bb0f32caeec6e..659d4eba66119 100644 --- a/ext/zend_test/test_arginfo.h +++ b/ext/zend_test/test_arginfo.h @@ -45,6 +45,9 @@ ZEND_FUNCTION(zend_create_unterminated_string); ZEND_FUNCTION(zend_terminate_string); ZEND_FUNCTION(zend_leak_variable); ZEND_FUNCTION(zend_leak_bytes); +ZEND_METHOD(_ZendTestClass, is_object); +ZEND_METHOD(_ZendTestClass, __toString); +ZEND_METHOD(_ZendTestTrait, testMethod); static const zend_function_entry ext_functions[] = { @@ -58,3 +61,16 @@ static const zend_function_entry ext_functions[] = { ZEND_FE(zend_leak_bytes, arginfo_zend_leak_bytes) ZEND_FE_END }; + + +static const zend_function_entry class__ZendTestClass_methods[] = { + ZEND_ME(_ZendTestClass, is_object, arginfo_class__ZendTestClass_is_object, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(_ZendTestClass, __toString, arginfo_class__ZendTestClass___toString, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) + ZEND_FE_END +}; + + +static const zend_function_entry class__ZendTestTrait_methods[] = { + ZEND_ME(_ZendTestTrait, testMethod, arginfo_class__ZendTestTrait_testMethod, ZEND_ACC_PUBLIC) + ZEND_FE_END +}; From 7b2a8a6dda165ccba9e1366d9f690b75ee4acfe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sat, 11 Apr 2020 14:13:11 +0200 Subject: [PATCH 108/338] Lowercase NULL to null in stubs --- ext/filter/filter.stub.php | 8 ++++---- ext/filter/filter_arginfo.h | 8 ++++---- ext/gd/gd.stub.php | 12 ++++++------ ext/gd/gd_arginfo.h | 12 ++++++------ 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ext/filter/filter.stub.php b/ext/filter/filter.stub.php index 5014e60dd95e0..517a3a055c17a 100644 --- a/ext/filter/filter.stub.php +++ b/ext/filter/filter.stub.php @@ -8,26 +8,26 @@ function filter_has_var(int $type, string $variable_name): bool {} * @param mixed $options * @return mixed */ -function filter_input(int $type, string $variable_name, int $filter = FILTER_DEFAULT, $options = NULL) {} +function filter_input(int $type, string $variable_name, int $filter = FILTER_DEFAULT, $options = null) {} /** * @param mixed $variable * @param mixed $options * @return mixed */ -function filter_var($variable, int $filter = FILTER_DEFAULT, $options = NULL) {} +function filter_var($variable, int $filter = FILTER_DEFAULT, $options = null) {} /** * @param mixed $options * @return mixed */ -function filter_input_array(int $type, $options = NULL, bool $add_empty = true) {} +function filter_input_array(int $type, $options = null, bool $add_empty = true) {} /** * @param mixed $options * @return mixed */ -function filter_var_array(array $data, $options = NULL, bool $add_empty = true) {} +function filter_var_array(array $data, $options = null, bool $add_empty = true) {} function filter_list(): array {} diff --git a/ext/filter/filter_arginfo.h b/ext/filter/filter_arginfo.h index 10a8a5af9d07c..8d3f1c0394465 100644 --- a/ext/filter/filter_arginfo.h +++ b/ext/filter/filter_arginfo.h @@ -9,24 +9,24 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_filter_input, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, variable_name, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, filter, IS_LONG, 0, "FILTER_DEFAULT") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, options, "NULL") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, options, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_filter_var, 0, 0, 1) ZEND_ARG_INFO(0, variable) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, filter, IS_LONG, 0, "FILTER_DEFAULT") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, options, "NULL") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, options, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_filter_input_array, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, options, "NULL") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, options, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, add_empty, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_filter_var_array, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, data, IS_ARRAY, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, options, "NULL") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, options, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, add_empty, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() diff --git a/ext/gd/gd.stub.php b/ext/gd/gd.stub.php index 79dca96fa8a80..3202a8b54190a 100644 --- a/ext/gd/gd.stub.php +++ b/ext/gd/gd.stub.php @@ -98,28 +98,28 @@ function imagecreatefromtga(string $filename): GdImage|false {} function imagexbm(GdImage $im, ?string $filename, int $foreground = UNKNOWN): bool {} -function imagegif(GdImage $im, $to = NULL): bool {} +function imagegif(GdImage $im, $to = null): bool {} #ifdef HAVE_GD_PNG -function imagepng(GdImage $im, $to = NULL, int $quality = UNKNOWN, int $filters = UNKNOWN): bool {} +function imagepng(GdImage $im, $to = null, int $quality = UNKNOWN, int $filters = UNKNOWN): bool {} #endif #ifdef HAVE_GD_WEBP -function imagewebp(GdImage $im, $to = NULL, int $quality = UNKNOWN): bool {} +function imagewebp(GdImage $im, $to = null, int $quality = UNKNOWN): bool {} #endif #ifdef HAVE_GD_JPG -function imagejpeg(GdImage $im, $to = NULL, int $quality = UNKNOWN): bool {} +function imagejpeg(GdImage $im, $to = null, int $quality = UNKNOWN): bool {} #endif -function imagewbmp(GdImage $im, $to = NULL, int $foreground = UNKNOWN): bool {} +function imagewbmp(GdImage $im, $to = null, int $foreground = UNKNOWN): bool {} function imagegd(GdImage $im, $to = UNKNOWN): bool {} function imagegd2(GdImage $im, $to = UNKNOWN, int $chunk_size = UNKNOWN, int $type = UNKNOWN): bool {} #ifdef HAVE_GD_BMP -function imagebmp(GdImage $im, $to = NULL, int $compressed = 1): bool {} +function imagebmp(GdImage $im, $to = null, int $compressed = 1): bool {} #endif function imagedestroy(GdImage $im): bool {} diff --git a/ext/gd/gd_arginfo.h b/ext/gd/gd_arginfo.h index f2673c935c411..eb60f889ef883 100644 --- a/ext/gd/gd_arginfo.h +++ b/ext/gd/gd_arginfo.h @@ -204,13 +204,13 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagegif, 0, 1, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, im, GdImage, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, to, "NULL") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, to, "null") ZEND_END_ARG_INFO() #if defined(HAVE_GD_PNG) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagepng, 0, 1, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, im, GdImage, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, to, "NULL") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, to, "null") ZEND_ARG_TYPE_INFO(0, quality, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, filters, IS_LONG, 0) ZEND_END_ARG_INFO() @@ -219,7 +219,7 @@ ZEND_END_ARG_INFO() #if defined(HAVE_GD_WEBP) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagewebp, 0, 1, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, im, GdImage, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, to, "NULL") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, to, "null") ZEND_ARG_TYPE_INFO(0, quality, IS_LONG, 0) ZEND_END_ARG_INFO() #endif @@ -227,14 +227,14 @@ ZEND_END_ARG_INFO() #if defined(HAVE_GD_JPG) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagejpeg, 0, 1, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, im, GdImage, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, to, "NULL") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, to, "null") ZEND_ARG_TYPE_INFO(0, quality, IS_LONG, 0) ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagewbmp, 0, 1, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, im, GdImage, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, to, "NULL") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, to, "null") ZEND_ARG_TYPE_INFO(0, foreground, IS_LONG, 0) ZEND_END_ARG_INFO() @@ -253,7 +253,7 @@ ZEND_END_ARG_INFO() #if defined(HAVE_GD_BMP) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagebmp, 0, 1, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, im, GdImage, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, to, "NULL") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, to, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, compressed, IS_LONG, 0, "1") ZEND_END_ARG_INFO() #endif From 047d8147047b319feca477ff4ba28ca5a2426a05 Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Sat, 11 Apr 2020 16:52:47 -0400 Subject: [PATCH 109/338] Fix an undefined class error running gen_stub in php8 For whatever reason, php 8 would not have loaded the subsequent classes when running `php build/gen_stub.php path/to/filename.php`. I assume it didn't load the classes immediately because there's a possibility the code before it would throw. (Probably because __toString was added recently and prevents early binding) Also, fix a typo Closes GH-5369 --- build/Makefile.global | 2 +- build/gen_stub.php | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/build/Makefile.global b/build/Makefile.global index 7b5d2a4919146..237308d265976 100644 --- a/build/Makefile.global +++ b/build/Makefile.global @@ -142,7 +142,7 @@ prof-clean: prof-use: CCACHE_DISABLE=1 $(MAKE) PROF_FLAGS=-fprofile-use all -# olny php above 7.1.0 supports nullable return type +# only php above 7.1.0 supports nullable return type %_arginfo.h: %.stub.php @if test -e "$(top_srcdir)/build/gen_stub.php"; then \ if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \ diff --git a/build/gen_stub.php b/build/gen_stub.php index 02a035debd180..b108191f64447 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -26,21 +26,6 @@ protected function pName_FullyQualified(Name\FullyQualified $node) { } } -if ($argc >= 2) { - if (is_file($argv[1])) { - // Generate single file. - processStubFile($argv[1]); - } else if (is_dir($argv[1])) { - processDirectory($argv[1]); - } else { - echo "$argv[1] is neither a file nor a directory.\n"; - exit(1); - } -} else { - // Regenerate all stub files we can find. - processDirectory('.'); -} - function processDirectory(string $dir) { $it = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($dir), @@ -1044,3 +1029,18 @@ function initPhpParser() { } }); } + +if ($argc >= 2) { + if (is_file($argv[1])) { + // Generate single file. + processStubFile($argv[1]); + } else if (is_dir($argv[1])) { + processDirectory($argv[1]); + } else { + echo "$argv[1] is neither a file nor a directory.\n"; + exit(1); + } +} else { + // Regenerate all stub files we can find. + processDirectory('.'); +} From e088836bbc755a2bb1d827d4de6206222b0ca792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sun, 12 Apr 2020 00:25:33 +0200 Subject: [PATCH 110/338] Fix nullable types in PHPDoc --- ext/dom/document.stub.php | 2 +- ext/dom/namednodemap.stub.php | 6 +++--- ext/dom/node.stub.php | 6 +++--- ext/dom/nodelist.stub.php | 2 +- ext/fileinfo/fileinfo.stub.php | 8 +++---- ext/intl/locale/locale.stub.php | 16 +++++++------- ext/intl/timezone/timezone.stub.php | 4 ++-- ext/ldap/ldap.stub.php | 2 +- ext/phar/phar_object.stub.php | 20 ++++++++--------- ext/reflection/php_reflection.stub.php | 30 +++++++++++++------------- ext/simplexml/sxe.stub.php | 4 ++-- ext/soap/soap.stub.php | 12 +++++------ ext/xmlreader/xmlreader.stub.php | 2 +- 13 files changed, 57 insertions(+), 57 deletions(-) diff --git a/ext/dom/document.stub.php b/ext/dom/document.stub.php index 02c10c5f7ab85..fefb46f450682 100644 --- a/ext/dom/document.stub.php +++ b/ext/dom/document.stub.php @@ -34,7 +34,7 @@ public function createProcessingInstruction(string $target, string $data = "") { /** @return DOMText|false */ public function createTextNode(string $data) {} - /** @return ?DOMElement */ + /** @return DOMElement|null */ public function getElementById(string $elementId) {} /** @return DOMNodeList */ diff --git a/ext/dom/namednodemap.stub.php b/ext/dom/namednodemap.stub.php index 3884e99519a40..701960e8a6aaf 100644 --- a/ext/dom/namednodemap.stub.php +++ b/ext/dom/namednodemap.stub.php @@ -2,13 +2,13 @@ class DOMNamedNodeMap { - /** @return ?DOMNode */ + /** @return DOMNode|null */ public function getNamedItem(string $name) {} - /** @return ?DOMNode */ + /** @return DOMNode|null */ public function getNamedItemNS(?string $namespaceURI, string $localName) {} - /** @return ?DOMNode */ + /** @return DOMNode|null */ public function item(int $index) {} /** @return int|false */ diff --git a/ext/dom/node.stub.php b/ext/dom/node.stub.php index 50b79a04d39cd..b3d461fd3714b 100644 --- a/ext/dom/node.stub.php +++ b/ext/dom/node.stub.php @@ -31,7 +31,7 @@ public function cloneNode(bool $recursive = false) {} /** @return int */ public function getLineNo() {} - /** @return ?string */ + /** @return string|null */ public function getNodePath() {} /** @return bool */ @@ -52,10 +52,10 @@ public function isSameNode(DOMNode $other) {} /** @return bool */ public function isSupported(string $feature, string $version) {} - /** @return ?string */ + /** @return string|null */ public function lookupNamespaceUri(?string $prefix) {} - /** @return ?string */ + /** @return string|null */ public function lookupPrefix(string $namespaceURI) {} /** @return void */ diff --git a/ext/dom/nodelist.stub.php b/ext/dom/nodelist.stub.php index e7e2b7cce3d50..57123427aa36e 100644 --- a/ext/dom/nodelist.stub.php +++ b/ext/dom/nodelist.stub.php @@ -5,6 +5,6 @@ class DOMNodeList /** @return int|false */ public function count() {} - /** @return ?DOMNode */ + /** @return DOMNode|null */ public function item(int $index) {} } diff --git a/ext/fileinfo/fileinfo.stub.php b/ext/fileinfo/fileinfo.stub.php index 262ff2e4ddb5a..a951e573dcd07 100644 --- a/ext/fileinfo/fileinfo.stub.php +++ b/ext/fileinfo/fileinfo.stub.php @@ -8,14 +8,14 @@ class finfo public function __construct(int $options = FILEINFO_NONE, string $arg = "") {} /** - * @param ?resource $context + * @param resource|null $context * @return string|false * @alias finfo_file */ public function file(string $file_name, int $options = FILEINFO_NONE, $context = null) {} /** - * @param ?resource $context + * @param resource|null $context * @return string|false * @alias finfo_buffer */ @@ -43,13 +43,13 @@ function finfo_set_flags($finfo, int $options): bool {} /** * @param resource $finfo - * @param ?resource $context + * @param resource|null $context */ function finfo_file($finfo, string $file_name, int $options = FILEINFO_NONE, $context = null): string|false {} /** * @param resource $finfo - * @param ?resource $context + * @param resource|null $context */ function finfo_buffer($finfo, string $string, int $options = FILEINFO_NONE, $context = null): string|false {} diff --git a/ext/intl/locale/locale.stub.php b/ext/intl/locale/locale.stub.php index e739f601aea84..093e46f35d576 100644 --- a/ext/intl/locale/locale.stub.php +++ b/ext/intl/locale/locale.stub.php @@ -8,13 +8,13 @@ public static function getDefault() {} /** @return bool */ public static function setDefault(string $locale) {} - /** @return ?string */ + /** @return string|null */ public static function getPrimaryLanguage(string $locale) {} - /** @return ?string */ + /** @return string|null */ public static function getScript(string $locale) {} - /** @return ?string */ + /** @return string|null */ public static function getRegion(string $locale) {} /** @return array|false|null */ @@ -38,19 +38,19 @@ public static function getDisplayVariant(string $locale, ?string $in_locale = nu /** @return string|false */ public static function composeLocale(array $subtags) {} - /** @return ?array */ + /** @return array|null */ public static function parseLocale(string $locale) {} - /** @return ?array */ + /** @return array|null */ public static function getAllVariants(string $locale) {} - /** @return ?bool */ + /** @return bool|null */ public static function filterMatches(string $langtag, string $locale, bool $canonicalize = false) {} - /** @return ?string */ + /** @return string|null */ public static function lookup(array $langtag, string $locale, bool $canonicalize = false, ?string $def = null) {} - /** @return ?string */ + /** @return string|null */ public static function canonicalize(string $locale) {} /** @return string|false */ diff --git a/ext/intl/timezone/timezone.stub.php b/ext/intl/timezone/timezone.stub.php index cf473a91f6956..fad55faeee60a 100644 --- a/ext/intl/timezone/timezone.stub.php +++ b/ext/intl/timezone/timezone.stub.php @@ -16,13 +16,13 @@ public static function createDefault() {} */ public static function createEnumeration($countryOrRawOffset = null) {} - /** @return ?IntlTimeZone */ + /** @return IntlTimeZone|null */ public static function createTimeZone(string $zoneId) {} /** @return IntlIterator|false */ public static function createTimeZoneIDEnumeration(int $zoneType, ?string $region = null, ?int $rawOffset = null) {} - /** @return ?IntlTimeZone */ + /** @return IntlTimeZone|null */ public static function fromDateTimeZone(DateTimeZone $zone) {} /** @return string|false */ diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php index afe6b7e91894f..413d20fcf0e41 100644 --- a/ext/ldap/ldap.stub.php +++ b/ext/ldap/ldap.stub.php @@ -223,7 +223,7 @@ function ldap_rename_ext($link_identifier, string $dn, string $newrdn, string $n /** @param resource $link_identifier */ function ldap_get_option($link_identifier, int $option, &$retval = null): bool {} -/** @param ?resource $link_identifier */ +/** @param resource|null $link_identifier */ function ldap_set_option($link_identifier, int $option, $newval): bool {} /** diff --git a/ext/phar/phar_object.stub.php b/ext/phar/phar_object.stub.php index af7d57cabc263..80a9128f118a7 100644 --- a/ext/phar/phar_object.stub.php +++ b/ext/phar/phar_object.stub.php @@ -27,16 +27,16 @@ public function compressFiles(int $compression_type) {} /** @return bool */ public function decompressFiles() {} - /** @return ?Phar */ + /** @return Phar|null */ public function compress(int $compression_type, string $file_ext = UNKNOWN) {} - /** @return ?Phar */ + /** @return Phar|null */ public function decompress(string $file_ext = UNKNOWN) {} - /** @return ?Phar */ + /** @return Phar|null */ public function convertToExecutable(int $format = 9021976, int $compression_type = 9021976, string $file_ext = UNKNOWN) {} - /** @return ?Phar */ + /** @return Phar|null */ public function convertToData(int $format = 9021976, int $compression_type = 9021976, string $file_ext = UNKNOWN) {} /** @return bool */ @@ -54,7 +54,7 @@ public function delMetadata() {} /** @return bool */ public function extractTo(string $pathto, $files = null, bool $overwrite = false) {} - /** @return ?string */ + /** @return string|null */ public function getAlias() {} /** @return string */ @@ -204,16 +204,16 @@ public function compressFiles(int $compression_type) {} /** @return bool */ public function decompressFiles() {} - /** @return ?Phar */ + /** @return Phar|null */ public function compress(int $compression_type, string $file_ext = UNKNOWN) {} - /** @return ?Phar */ + /** @return Phar|null */ public function decompress(string $file_ext = UNKNOWN) {} - /** @return ?Phar */ + /** @return Phar|null */ public function convertToExecutable(int $format = 9021976, int $compression_type = 9021976, string $file_ext = UNKNOWN) {} - /** @return ?Phar */ + /** @return Phar|null */ public function convertToData(int $format = 9021976, int $compression_type = 9021976, string $file_ext = UNKNOWN) {} /** @return bool */ @@ -231,7 +231,7 @@ public function delMetadata() {} /** @return bool */ public function extractTo(string $pathto, $files = null, bool $overwrite = false) {} - /** @return ?string */ + /** @return string|null */ public function getAlias() {} /** @return string */ diff --git a/ext/reflection/php_reflection.stub.php b/ext/reflection/php_reflection.stub.php index 84d2c30779b59..00c7013f099af 100644 --- a/ext/reflection/php_reflection.stub.php +++ b/ext/reflection/php_reflection.stub.php @@ -39,10 +39,10 @@ public function isGenerator() {} /** @return bool */ public function isVariadic() {} - /** @return ?object */ + /** @return object|null */ public function getClosureThis() {} - /** @return ?ReflectionClass */ + /** @return ReflectionClass|null */ public function getClosureScopeClass() {} /** @return string|false */ @@ -51,7 +51,7 @@ public function getDocComment() {} /** @return int|false */ public function getEndLine() {} - /** @return ?ReflectionExtension */ + /** @return ReflectionExtension|null */ public function getExtension() {} /** @return string|false */ @@ -90,7 +90,7 @@ public function returnsReference() {} /** @return bool */ public function hasReturnType() {} - /** @return ?ReflectionType */ + /** @return ReflectionType|null */ public function getReturnType() {} } @@ -130,7 +130,7 @@ public function getTrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT) {} /** @return ReflectionFunctionAbstract */ public function getFunction() {} - /** @return ?object */ + /** @return object|null */ public function getThis() {} /** @return Generator */ @@ -229,7 +229,7 @@ public function getEndLine() {} /** @return string|false */ public function getDocComment() {} - /** @return ?ReflectionMethod */ + /** @return ReflectionMethod|null */ public function getConstructor() {} /** @return bool */ @@ -253,7 +253,7 @@ public function getProperties(?int $filter = null) {} /** @return bool */ public function hasConstant(string $name) {} - /** @return ?array */ + /** @return array|null */ public function getConstants() {} /** @return ReflectionClassConstant[] */ @@ -316,7 +316,7 @@ public function getParentClass() {} */ public function isSubclassOf($class) {} - /** @return ?array */ + /** @return array|null */ public function getStaticProperties() {} /** @return mixed */ @@ -340,7 +340,7 @@ public function isIterateable() {} */ public function implementsInterface($interface) {} - /** @return ?ReflectionExtension */ + /** @return ReflectionExtension|null */ public function getExtension() {} /** @return string|false */ @@ -409,7 +409,7 @@ public function getDocComment() {} /** @return void */ public function setAccessible(bool $visible) {} - /** @return ?ReflectionType */ + /** @return ReflectionType|null */ public function getType() {} /** @return bool */ @@ -479,16 +479,16 @@ public function canBePassedByValue() {} /** @return ReflectionFunctionAbstract */ public function getDeclaringFunction() {} - /** @return ?ReflectionClass */ + /** @return ReflectionClass|null */ public function getDeclaringClass() {} - /** @return ?ReflectionClass */ + /** @return ReflectionClass|null */ public function getClass() {} /** @return bool */ public function hasType() {} - /** @return ?ReflectionType */ + /** @return ReflectionType|null */ public function getType() {} /** @return bool */ @@ -515,7 +515,7 @@ public function getDefaultValue() {} /** @return bool */ public function isDefaultValueConstant() {} - /** @return ?string */ + /** @return string|null */ public function getDefaultValueConstantName() {} /** @return bool */ @@ -557,7 +557,7 @@ public function __toString(): string {} /** @return string */ public function getName() {} - /** @return ?string */ + /** @return string|null */ public function getVersion() {} /** @return ReflectionFunction[] */ diff --git a/ext/simplexml/sxe.stub.php b/ext/simplexml/sxe.stub.php index 98ea3327ba7bb..d609e93846998 100644 --- a/ext/simplexml/sxe.stub.php +++ b/ext/simplexml/sxe.stub.php @@ -8,7 +8,7 @@ public function rewind() {} /** @return bool */ public function valid() {} - /** @return ?SimpleXMLElement */ + /** @return SimpleXMLElement|null */ public function current() {} /** @return string|false */ @@ -20,6 +20,6 @@ public function next() {} /** @return bool */ public function hasChildren() {} - /** @return ?SimpleXMLIterator */ + /** @return SimpleXMLIterator|null */ public function getChildren() {} } diff --git a/ext/soap/soap.stub.php b/ext/soap/soap.stub.php index 19553b7732e72..a3ae6e93d333c 100644 --- a/ext/soap/soap.stub.php +++ b/ext/soap/soap.stub.php @@ -71,19 +71,19 @@ public function __getFunctions(); /** @return array|null */ public function __getTypes(); - /** @return ?string */ + /** @return string|null */ public function __getLastRequest(); - /** @return ?string */ + /** @return string|null */ public function __getLastResponse(); - /** @return ?string */ + /** @return string|null */ public function __getLastRequestHeaders(); - /** @return ?string */ + /** @return string|null */ public function __getLastResponseHeaders(); - /** @return ?string */ + /** @return string|null */ public function __doRequest(string $request, string $location, string $action, int $version, int $one_way = 0); /** @return void */ @@ -95,6 +95,6 @@ public function __getCookies(); /** @return bool */ public function __setSoapHeaders($soapheaders = null); - /** @return ?string */ + /** @return string|null */ public function __setLocation(string $new_location = ""); } diff --git a/ext/xmlreader/xmlreader.stub.php b/ext/xmlreader/xmlreader.stub.php index 5a8a108a9d878..5cc08651fae4d 100644 --- a/ext/xmlreader/xmlreader.stub.php +++ b/ext/xmlreader/xmlreader.stub.php @@ -8,7 +8,7 @@ public function close() {} /** @return string|null|false */ public function getAttribute(string $name) {} - /** @return ?string */ + /** @return string|null */ public function getAttributeNo(int $index) {} /** @return string|null|false */ From 68a56483ea5794ac0d683968457dec9fa8a85b5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sun, 12 Apr 2020 01:49:13 +0200 Subject: [PATCH 111/338] Generate method entries for ext/xsl Closes GH-5372 --- ext/xsl/php_xsl.c | 3 +- ext/xsl/php_xsl.h | 1 - ...sltprocessor.stub.php => php_xsl.stub.php} | 2 ++ ...tprocessor_arginfo.h => php_xsl_arginfo.h} | 31 ++++++++++++++++ ext/xsl/xsl_fe.h | 36 ------------------- ext/xsl/xsltprocessor.c | 24 ------------- 6 files changed, 35 insertions(+), 62 deletions(-) rename ext/xsl/{xsltprocessor.stub.php => php_xsl.stub.php} (97%) rename ext/xsl/{xsltprocessor_arginfo.h => php_xsl_arginfo.h} (50%) delete mode 100644 ext/xsl/xsl_fe.h diff --git a/ext/xsl/php_xsl.c b/ext/xsl/php_xsl.c index da67e9ea6429c..63974643bcaae 100644 --- a/ext/xsl/php_xsl.c +++ b/ext/xsl/php_xsl.c @@ -22,6 +22,7 @@ #include "php_ini.h" #include "ext/standard/info.h" #include "php_xsl.h" +#include "php_xsl_arginfo.h" zend_class_entry *xsl_xsltprocessor_class_entry; static zend_object_handlers xsl_object_handlers; @@ -129,7 +130,7 @@ PHP_MINIT_FUNCTION(xsl) xsl_object_handlers.clone_obj = NULL; xsl_object_handlers.free_obj = xsl_objects_free_storage; - REGISTER_XSL_CLASS(ce, "XSLTProcessor", NULL, php_xsl_xsltprocessor_class_functions, xsl_xsltprocessor_class_entry); + REGISTER_XSL_CLASS(ce, "XSLTProcessor", NULL, class_XSLTProcessor_methods, xsl_xsltprocessor_class_entry); #if HAVE_XSL_EXSLT exsltRegisterAll(); #endif diff --git a/ext/xsl/php_xsl.h b/ext/xsl/php_xsl.h index 0d105ce2a0c54..94d4409b3618b 100644 --- a/ext/xsl/php_xsl.h +++ b/ext/xsl/php_xsl.h @@ -38,7 +38,6 @@ extern zend_module_entry xsl_module_entry; #endif #include "../dom/xml_common.h" -#include "xsl_fe.h" #include #include diff --git a/ext/xsl/xsltprocessor.stub.php b/ext/xsl/php_xsl.stub.php similarity index 97% rename from ext/xsl/xsltprocessor.stub.php rename to ext/xsl/php_xsl.stub.php index 8b4dcd1697631..23f187fbddea7 100644 --- a/ext/xsl/xsltprocessor.stub.php +++ b/ext/xsl/php_xsl.stub.php @@ -1,5 +1,7 @@ | - +----------------------------------------------------------------------+ -*/ - -#ifndef XSL_FE_H -#define XSL_FE_H - -extern const zend_function_entry php_xsl_xsltprocessor_class_functions[]; -extern zend_class_entry *xsl_xsltprocessor_class_entry; - -PHP_METHOD(XSLTProcessor, importStylesheet); -PHP_METHOD(XSLTProcessor, transformToDoc); -PHP_METHOD(XSLTProcessor, transformToUri); -PHP_METHOD(XSLTProcessor, transformToXml); -PHP_METHOD(XSLTProcessor, setParameter); -PHP_METHOD(XSLTProcessor, getParameter); -PHP_METHOD(XSLTProcessor, removeParameter); -PHP_METHOD(XSLTProcessor, hasExsltSupport); -PHP_METHOD(XSLTProcessor, registerPHPFunctions); -PHP_METHOD(XSLTProcessor, setProfiling); -PHP_METHOD(XSLTProcessor, setSecurityPrefs); -PHP_METHOD(XSLTProcessor, getSecurityPrefs); - -#endif diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index 539fe39e617d3..1ced2b7b74049 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -21,32 +21,8 @@ #include "php.h" #include "php_xsl.h" -#include "xsltprocessor_arginfo.h" #include "ext/libxml/php_libxml.h" -/* -* class xsl_xsltprocessor -* -* URL: https://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html# -* Since: -*/ - -const zend_function_entry php_xsl_xsltprocessor_class_functions[] = { - PHP_ME(XSLTProcessor, importStylesheet, arginfo_class_XSLTProcessor_importStylesheet, ZEND_ACC_PUBLIC) - PHP_ME(XSLTProcessor, transformToDoc, arginfo_class_XSLTProcessor_transformToDoc, ZEND_ACC_PUBLIC) - PHP_ME(XSLTProcessor, transformToUri, arginfo_class_XSLTProcessor_transformToUri, ZEND_ACC_PUBLIC) - PHP_ME(XSLTProcessor, transformToXml, arginfo_class_XSLTProcessor_transformToXml, ZEND_ACC_PUBLIC) - PHP_ME(XSLTProcessor, setParameter, arginfo_class_XSLTProcessor_setParameter, ZEND_ACC_PUBLIC) - PHP_ME(XSLTProcessor, getParameter, arginfo_class_XSLTProcessor_getParameter, ZEND_ACC_PUBLIC) - PHP_ME(XSLTProcessor, removeParameter, arginfo_class_XSLTProcessor_removeParameter, ZEND_ACC_PUBLIC) - PHP_ME(XSLTProcessor, hasExsltSupport, arginfo_class_XSLTProcessor_hasExsltSupport, ZEND_ACC_PUBLIC) - PHP_ME(XSLTProcessor, registerPHPFunctions, arginfo_class_XSLTProcessor_registerPHPFunctions, ZEND_ACC_PUBLIC) - PHP_ME(XSLTProcessor, setProfiling, arginfo_class_XSLTProcessor_setProfiling, ZEND_ACC_PUBLIC) - PHP_ME(XSLTProcessor, setSecurityPrefs, arginfo_class_XSLTProcessor_setSecurityPrefs, ZEND_ACC_PUBLIC) - PHP_ME(XSLTProcessor, getSecurityPrefs, arginfo_class_XSLTProcessor_getSecurityPrefs, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - /* {{{ php_xsl_xslt_string_to_xpathexpr() Translates a string to a XPath Expression */ static char *php_xsl_xslt_string_to_xpathexpr(const char *str) From 01762e56edb6260875e381465f08e64c00f556fb Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Sun, 12 Apr 2020 19:34:05 +0200 Subject: [PATCH 112/338] Adapt assertion as mbfl_strwidth returns a size_t --- ext/mbstring/mbstring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 56731883ba8b4..74274f4ae4026 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -2377,7 +2377,7 @@ PHP_FUNCTION(mb_strwidth) } n = mbfl_strwidth(&string); - ZEND_ASSERT(n >= 0); + ZEND_ASSERT(n != (size_t) -1); RETVAL_LONG(n); } /* }}} */ From 422c8390a01ce9b6f612e0183bd0e4500c0608be Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Sun, 12 Apr 2020 21:10:03 +0200 Subject: [PATCH 113/338] Fix [-Wempty-body] compiler warning in Phar extension --- ext/phar/phar_path_check.re | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/phar/phar_path_check.re b/ext/phar/phar_path_check.re index ed532dfe6ba6f..08277b30c2ac2 100644 --- a/ext/phar/phar_path_check.re +++ b/ext/phar/phar_path_check.re @@ -35,7 +35,7 @@ phar_path_check_result phar_path_check(char **s, size_t *len, const char **error #define YYCURSOR p #define YYLIMIT p+*len #define YYMARKER m -#define YYFILL(n) +#define YYFILL(n) do {} while (0) loop: /*!re2c From dfd0acf0d722fbbebeab349b0d4366dd8f30bbee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sat, 11 Apr 2020 22:01:51 +0200 Subject: [PATCH 114/338] Generate method entries for ext/dom Closes GH-5374 --- build/gen_stub.php | 2 +- ext/dom/attr.c | 11 +- ext/dom/attr.stub.php | 9 - ext/dom/attr_arginfo.h | 9 - ext/dom/cdatasection.c | 8 +- ext/dom/cdatasection.stub.php | 6 - ext/dom/cdatasection_arginfo.h | 5 - ext/dom/characterdata.c | 32 +- ext/dom/characterdata.stub.php | 30 - ext/dom/characterdata_arginfo.h | 34 - ext/dom/comment.c | 8 +- ext/dom/comment.stub.php | 6 - ext/dom/comment_arginfo.h | 5 - ext/dom/document.c | 112 +--- ext/dom/document.stub.php | 109 --- ext/dom/document_arginfo.h | 154 ----- ext/dom/documentfragment.c | 17 +- ext/dom/documentfragment.stub.php | 15 - ext/dom/documentfragment_arginfo.h | 14 - ext/dom/dom.stub.php | 8 - ext/dom/dom_arginfo.h | 19 - ext/dom/dom_fe.h | 229 ------- ext/dom/domexception.c | 4 - ext/dom/domexception.h | 49 ++ ext/dom/domimplementation.c | 17 +- ext/dom/domimplementation.stub.php | 17 - ext/dom/domimplementation_arginfo.h | 20 - ext/dom/element.c | 81 +-- ext/dom/element.stub.php | 77 --- ext/dom/element_arginfo.h | 85 --- ext/dom/entity.c | 4 - ext/dom/entityreference.c | 8 +- ext/dom/entityreference.stub.php | 6 - ext/dom/entityreference_arginfo.h | 5 - ext/dom/namednodemap.c | 18 +- ext/dom/namednodemap.stub.php | 16 - ext/dom/namednodemap_arginfo.h | 17 - ext/dom/node.c | 65 +- ext/dom/node.stub.php | 69 -- ext/dom/node_arginfo.h | 79 --- ext/dom/nodelist.c | 11 +- ext/dom/nodelist.stub.php | 10 - ext/dom/nodelist_arginfo.h | 8 - ext/dom/notation.c | 4 - ext/dom/parentnode.c | 9 - ext/dom/parentnode.stub.php | 10 - ext/dom/parentnode_arginfo.h | 7 - ext/dom/php_dom.c | 42 +- ext/dom/php_dom.h | 2 +- ext/dom/php_dom.stub.php | 433 ++++++++++++ ext/dom/php_dom_arginfo.h | 839 ++++++++++++++++++++++++ ext/dom/processinginstruction.c | 8 +- ext/dom/processinginstruction.stub.php | 6 - ext/dom/processinginstruction_arginfo.h | 6 - ext/dom/text.c | 15 +- ext/dom/text.stub.php | 14 - ext/dom/text_arginfo.h | 14 - ext/dom/xpath.c | 21 +- ext/dom/xpath.stub.php | 23 - ext/dom/xpath_arginfo.h | 33 - 60 files changed, 1457 insertions(+), 1537 deletions(-) delete mode 100644 ext/dom/attr.stub.php delete mode 100644 ext/dom/attr_arginfo.h delete mode 100644 ext/dom/cdatasection.stub.php delete mode 100644 ext/dom/cdatasection_arginfo.h delete mode 100644 ext/dom/characterdata.stub.php delete mode 100644 ext/dom/characterdata_arginfo.h delete mode 100644 ext/dom/comment.stub.php delete mode 100644 ext/dom/comment_arginfo.h delete mode 100644 ext/dom/document.stub.php delete mode 100644 ext/dom/document_arginfo.h delete mode 100644 ext/dom/documentfragment.stub.php delete mode 100644 ext/dom/documentfragment_arginfo.h delete mode 100644 ext/dom/dom.stub.php delete mode 100644 ext/dom/dom_arginfo.h delete mode 100644 ext/dom/dom_fe.h create mode 100644 ext/dom/domexception.h delete mode 100644 ext/dom/domimplementation.stub.php delete mode 100644 ext/dom/domimplementation_arginfo.h delete mode 100644 ext/dom/element.stub.php delete mode 100644 ext/dom/element_arginfo.h delete mode 100644 ext/dom/entityreference.stub.php delete mode 100644 ext/dom/entityreference_arginfo.h delete mode 100644 ext/dom/namednodemap.stub.php delete mode 100644 ext/dom/namednodemap_arginfo.h delete mode 100644 ext/dom/node.stub.php delete mode 100644 ext/dom/node_arginfo.h delete mode 100644 ext/dom/nodelist.stub.php delete mode 100644 ext/dom/nodelist_arginfo.h delete mode 100644 ext/dom/parentnode.stub.php delete mode 100644 ext/dom/parentnode_arginfo.h create mode 100644 ext/dom/php_dom.stub.php create mode 100644 ext/dom/php_dom_arginfo.h delete mode 100644 ext/dom/processinginstruction.stub.php delete mode 100644 ext/dom/processinginstruction_arginfo.h delete mode 100644 ext/dom/text.stub.php delete mode 100644 ext/dom/text_arginfo.h delete mode 100644 ext/dom/xpath.stub.php delete mode 100644 ext/dom/xpath_arginfo.h diff --git a/build/gen_stub.php b/build/gen_stub.php index b108191f64447..131f60bab7697 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -421,7 +421,7 @@ public function getFunctionEntry(): string { if ($this->alias->className) { return sprintf( "\tZEND_MALIAS(%s, %s, %s, %s, %s)\n", - $this->alias->className, $this->name, $this->alias->name, $this->getArgInfoName(), $this->getFlagsAsString() + $this->alias->className, $this->name->name, $this->alias->name, $this->getArgInfoName(), $this->getFlagsAsString() ); } else { return sprintf( diff --git a/ext/dom/attr.c b/ext/dom/attr.c index 9c097eb8430a2..f6612e791a7d7 100644 --- a/ext/dom/attr.c +++ b/ext/dom/attr.c @@ -24,7 +24,6 @@ #if HAVE_LIBXML && HAVE_DOM #include "php_dom.h" -#include "attr_arginfo.h" /* * class DOMAttr extends DOMNode @@ -33,14 +32,8 @@ * Since: */ -const zend_function_entry php_dom_attr_class_functions[] = { - PHP_ME(domattr, isId, arginfo_class_DOMAttr_isId, ZEND_ACC_PUBLIC) - PHP_ME(domattr, __construct, arginfo_class_DOMAttr___construct, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - /* {{{ proto DOMAttr::__construct(string name, [string value]) */ -PHP_METHOD(domattr, __construct) +PHP_METHOD(DOMAttr, __construct) { xmlAttrPtr nodep = NULL; xmlNodePtr oldnode = NULL; @@ -213,7 +206,7 @@ int dom_attr_schema_type_info_read(dom_object *obj, zval *retval) URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Attr-isId Since: DOM Level 3 */ -PHP_METHOD(domattr, isId) +PHP_METHOD(DOMAttr, isId) { zval *id; dom_object *intern; diff --git a/ext/dom/attr.stub.php b/ext/dom/attr.stub.php deleted file mode 100644 index 0d8f748421ed5..0000000000000 --- a/ext/dom/attr.stub.php +++ /dev/null @@ -1,9 +0,0 @@ - #ifdef LIBXML_SCHEMAS_ENABLED #include @@ -45,49 +44,6 @@ struct _idsIterator { * Since: */ -const zend_function_entry php_dom_document_class_functions[] = { /* {{{ */ - PHP_ME(domdocument, createElement, arginfo_class_DOMDocument_createElement, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, createDocumentFragment, arginfo_class_DOMDocument_createDocumentFragment, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, createTextNode, arginfo_class_DOMDocument_createTextNode, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, createComment, arginfo_class_DOMDocument_createComment, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, createCDATASection, arginfo_class_DOMDocument_createCDATASection, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, createProcessingInstruction, arginfo_class_DOMDocument_createProcessingInstruction, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, createAttribute, arginfo_class_DOMDocument_createAttribute, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, createEntityReference, arginfo_class_DOMDocument_createEntityReference, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, getElementsByTagName, arginfo_class_DOMDocument_getElementsByTagName, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, importNode, arginfo_class_DOMDocument_importNode, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, createElementNS, arginfo_class_DOMDocument_createElementNS, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, createAttributeNS, arginfo_class_DOMDocument_createAttributeNS, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, getElementsByTagNameNS, arginfo_class_DOMDocument_getElementsByTagNameNS, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, getElementById, arginfo_class_DOMDocument_getElementById, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, adoptNode, arginfo_class_DOMDocument_adoptNode, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, normalizeDocument, arginfo_class_DOMDocument_normalizeDocument, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, load, arginfo_class_DOMDocument_load, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, save, arginfo_class_DOMDocument_save, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, loadXML, arginfo_class_DOMDocument_loadXML, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, saveXML, arginfo_class_DOMDocument_saveXML, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, __construct, arginfo_class_DOMDocument___construct, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, validate, arginfo_class_DOMDocument_validate, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, xinclude, arginfo_class_DOMDocument_xinclude, ZEND_ACC_PUBLIC) -#if defined(LIBXML_HTML_ENABLED) - PHP_ME(domdocument, loadHTML, arginfo_class_DOMDocument_loadHTML, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, loadHTMLFile, arginfo_class_DOMDocument_loadHTMLFile, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, saveHTML, arginfo_class_DOMDocument_saveHTML, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, saveHTMLFile, arginfo_class_DOMDocument_saveHTMLFile, ZEND_ACC_PUBLIC) -#endif /* defined(LIBXML_HTML_ENABLED) */ -#if defined(LIBXML_SCHEMAS_ENABLED) - PHP_ME(domdocument, schemaValidate, arginfo_class_DOMDocument_schemaValidate, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, schemaValidateSource, arginfo_class_DOMDocument_schemaValidateSource, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, relaxNGValidate, arginfo_class_DOMDocument_relaxNGValidate, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, relaxNGValidateSource, arginfo_class_DOMDocument_relaxNGValidateSource, ZEND_ACC_PUBLIC) -#endif - PHP_ME(domdocument, registerNodeClass, arginfo_class_DOMDocument_registerNodeClass, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, append, arginfo_class_DOMDocument_append, ZEND_ACC_PUBLIC) - PHP_ME(domdocument, prepend, arginfo_class_DOMDocument_prepend, ZEND_ACC_PUBLIC) - PHP_FE_END -}; -/* }}} */ - /* {{{ docType DOMDocumentType readonly=yes URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-B63ED1A31 @@ -553,7 +509,7 @@ int dom_document_config_read(dom_object *obj, zval *retval) URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-2141741547 Since: */ -PHP_METHOD(domdocument, createElement) +PHP_METHOD(DOMDocument, createElement) { zval *id; xmlNode *node; @@ -588,7 +544,7 @@ PHP_METHOD(domdocument, createElement) URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-35CB04B5 Since: */ -PHP_METHOD(domdocument, createDocumentFragment) +PHP_METHOD(DOMDocument, createDocumentFragment) { zval *id; xmlNode *node; @@ -616,7 +572,7 @@ PHP_METHOD(domdocument, createDocumentFragment) URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1975348127 Since: */ -PHP_METHOD(domdocument, createTextNode) +PHP_METHOD(DOMDocument, createTextNode) { zval *id; xmlNode *node; @@ -646,7 +602,7 @@ PHP_METHOD(domdocument, createTextNode) URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1334481328 Since: */ -PHP_METHOD(domdocument, createComment) +PHP_METHOD(DOMDocument, createComment) { zval *id; xmlNode *node; @@ -676,7 +632,7 @@ PHP_METHOD(domdocument, createComment) URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-D26C0AF8 Since: */ -PHP_METHOD(domdocument, createCDATASection) +PHP_METHOD(DOMDocument, createCDATASection) { zval *id; xmlNode *node; @@ -706,7 +662,7 @@ PHP_METHOD(domdocument, createCDATASection) URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-135944439 Since: */ -PHP_METHOD(domdocument, createProcessingInstruction) +PHP_METHOD(DOMDocument, createProcessingInstruction) { zval *id; xmlNode *node; @@ -743,7 +699,7 @@ PHP_METHOD(domdocument, createProcessingInstruction) URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1084891198 Since: */ -PHP_METHOD(domdocument, createAttribute) +PHP_METHOD(DOMDocument, createAttribute) { zval *id; xmlAttrPtr node; @@ -779,7 +735,7 @@ PHP_METHOD(domdocument, createAttribute) URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-392B75AE Since: */ -PHP_METHOD(domdocument, createEntityReference) +PHP_METHOD(DOMDocument, createEntityReference) { zval *id; xmlNode *node; @@ -814,7 +770,7 @@ PHP_METHOD(domdocument, createEntityReference) URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-A6C9094 Since: */ -PHP_METHOD(domdocument, getElementsByTagName) +PHP_METHOD(DOMDocument, getElementsByTagName) { zval *id; xmlDocPtr docp; @@ -841,7 +797,7 @@ PHP_METHOD(domdocument, getElementsByTagName) URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Core-Document-importNode Since: DOM Level 2 */ -PHP_METHOD(domdocument, importNode) +PHP_METHOD(DOMDocument, importNode) { zval *id, *node; xmlDocPtr docp; @@ -897,7 +853,7 @@ PHP_METHOD(domdocument, importNode) URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-DocCrElNS Since: DOM Level 2 */ -PHP_METHOD(domdocument, createElementNS) +PHP_METHOD(DOMDocument, createElementNS) { zval *id; xmlDocPtr docp; @@ -962,7 +918,7 @@ PHP_METHOD(domdocument, createElementNS) URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-DocCrAttrNS Since: DOM Level 2 */ -PHP_METHOD(domdocument, createAttributeNS) +PHP_METHOD(DOMDocument, createAttributeNS) { zval *id; xmlDocPtr docp; @@ -1029,7 +985,7 @@ PHP_METHOD(domdocument, createAttributeNS) URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-getElBTNNS Since: DOM Level 2 */ -PHP_METHOD(domdocument, getElementsByTagNameNS) +PHP_METHOD(DOMDocument, getElementsByTagNameNS) { zval *id; xmlDocPtr docp; @@ -1057,7 +1013,7 @@ PHP_METHOD(domdocument, getElementsByTagNameNS) URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-getElBId Since: DOM Level 2 */ -PHP_METHOD(domdocument, getElementById) +PHP_METHOD(DOMDocument, getElementById) { zval *id; xmlDocPtr docp; @@ -1089,7 +1045,7 @@ PHP_METHOD(domdocument, getElementById) URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-adoptNode Since: DOM Level 3 */ -PHP_METHOD(domdocument, adoptNode) +PHP_METHOD(DOMDocument, adoptNode) { zval *nodep = NULL; @@ -1105,7 +1061,7 @@ PHP_METHOD(domdocument, adoptNode) URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-normalizeDocument Since: DOM Level 3 */ -PHP_METHOD(domdocument, normalizeDocument) +PHP_METHOD(DOMDocument, normalizeDocument) { zval *id; xmlDocPtr docp; @@ -1123,7 +1079,7 @@ PHP_METHOD(domdocument, normalizeDocument) /* }}} end dom_document_normalize_document */ /* {{{ proto DOMDocument::__construct([string version], [string encoding]); */ -PHP_METHOD(domdocument, __construct) +PHP_METHOD(DOMDocument, __construct) { xmlDoc *docp = NULL, *olddoc; dom_object *intern; @@ -1411,7 +1367,7 @@ static void dom_parse_document(INTERNAL_FUNCTION_PARAMETERS, int mode) { URL: http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#LS-DocumentLS-load Since: DOM Level 3 */ -PHP_METHOD(domdocument, load) +PHP_METHOD(DOMDocument, load) { dom_parse_document(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_FILE); } @@ -1421,7 +1377,7 @@ PHP_METHOD(domdocument, load) URL: http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#LS-DocumentLS-loadXML Since: DOM Level 3 */ -PHP_METHOD(domdocument, loadXML) +PHP_METHOD(DOMDocument, loadXML) { dom_parse_document(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_STRING); } @@ -1430,7 +1386,7 @@ PHP_METHOD(domdocument, loadXML) /* {{{ proto int dom_document_save(string file) Convenience method to save to file */ -PHP_METHOD(domdocument, save) +PHP_METHOD(DOMDocument, save) { zval *id; xmlDoc *docp; @@ -1476,7 +1432,7 @@ PHP_METHOD(domdocument, save) URL: http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#LS-DocumentLS-saveXML Since: DOM Level 3 */ -PHP_METHOD(domdocument, saveXML) +PHP_METHOD(DOMDocument, saveXML) { zval *id, *nodep = NULL; xmlDoc *docp; @@ -1587,7 +1543,7 @@ static void php_dom_remove_xinclude_nodes(xmlNodePtr cur) /* {{{ */ /* {{{ proto int dom_document_xinclude([int options]) Substitutues xincludes in a DomDocument */ -PHP_METHOD(domdocument, xinclude) +PHP_METHOD(DOMDocument, xinclude) { zval *id; xmlDoc *docp; @@ -1634,7 +1590,7 @@ PHP_METHOD(domdocument, xinclude) /* {{{ proto bool dom_document_validate() Since: DOM extended */ -PHP_METHOD(domdocument, validate) +PHP_METHOD(DOMDocument, validate) { zval *id; xmlDoc *docp; @@ -1754,14 +1710,14 @@ static void _dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type /* }}} */ /* {{{ proto bool dom_document_schema_validate_file(string filename, int flags); */ -PHP_METHOD(domdocument, schemaValidate) +PHP_METHOD(DOMDocument, schemaValidate) { _dom_document_schema_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_FILE); } /* }}} end dom_document_schema_validate_file */ /* {{{ proto bool dom_document_schema_validate(string source, int flags); */ -PHP_METHOD(domdocument, schemaValidateSource) +PHP_METHOD(DOMDocument, schemaValidateSource) { _dom_document_schema_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_STRING); } @@ -1848,14 +1804,14 @@ static void _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAMETERS, int typ /* }}} */ /* {{{ proto bool dom_document_relaxNG_validate_file(string filename); */ -PHP_METHOD(domdocument, relaxNGValidate) +PHP_METHOD(DOMDocument, relaxNGValidate) { _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_FILE); } /* }}} end dom_document_relaxNG_validate_file */ /* {{{ proto bool dom_document_relaxNG_validate_xml(string source); */ -PHP_METHOD(domdocument, relaxNGValidateSource) +PHP_METHOD(DOMDocument, relaxNGValidateSource) { _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_STRING); } @@ -1962,7 +1918,7 @@ static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */ /* {{{ proto DOMNode dom_document_load_html_file(string source) Since: DOM extended */ -PHP_METHOD(domdocument, loadHTMLFile) +PHP_METHOD(DOMDocument, loadHTMLFile) { dom_load_html(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_FILE); } @@ -1971,7 +1927,7 @@ PHP_METHOD(domdocument, loadHTMLFile) /* {{{ proto DOMNode dom_document_load_html(string source) Since: DOM extended */ -PHP_METHOD(domdocument, loadHTML) +PHP_METHOD(DOMDocument, loadHTML) { dom_load_html(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_STRING); } @@ -1980,7 +1936,7 @@ PHP_METHOD(domdocument, loadHTML) /* {{{ proto int dom_document_save_html_file(string file) Convenience method to save to file as html */ -PHP_METHOD(domdocument, saveHTMLFile) +PHP_METHOD(DOMDocument, saveHTMLFile) { zval *id; xmlDoc *docp; @@ -2020,7 +1976,7 @@ PHP_METHOD(domdocument, saveHTMLFile) /* {{{ proto string dom_document_save_html() Convenience method to output as html */ -PHP_METHOD(domdocument, saveHTML) +PHP_METHOD(DOMDocument, saveHTML) { zval *id, *nodep = NULL; xmlDoc *docp; @@ -2108,7 +2064,7 @@ PHP_METHOD(domdocument, saveHTML) /* {{{ proto bool DOMDocument::registerNodeClass(string baseclass, string extendedclass) Register extended class used to create base node type */ -PHP_METHOD(domdocument, registerNodeClass) +PHP_METHOD(DOMDocument, registerNodeClass) { zval *id; xmlDoc *docp; @@ -2134,7 +2090,7 @@ PHP_METHOD(domdocument, registerNodeClass) URL: https://dom.spec.whatwg.org/#dom-parentnode-append Since: DOM Living Standard (DOM4) */ -PHP_METHOD(domdocument, append) +PHP_METHOD(DOMDocument, append) { int argc; zval *args, *id; @@ -2156,7 +2112,7 @@ PHP_METHOD(domdocument, append) URL: https://dom.spec.whatwg.org/#dom-parentnode-prepend Since: DOM Living Standard (DOM4) */ -PHP_METHOD(domdocument, prepend) +PHP_METHOD(DOMDocument, prepend) { int argc; zval *args, *id; diff --git a/ext/dom/document.stub.php b/ext/dom/document.stub.php deleted file mode 100644 index fefb46f450682..0000000000000 --- a/ext/dom/document.stub.php +++ /dev/null @@ -1,109 +0,0 @@ - | - | Rob Richards | - +----------------------------------------------------------------------+ -*/ - -#ifndef DOM_FE_H -#define DOM_FE_H - -extern const zend_function_entry php_dom_domexception_class_functions[]; -extern const zend_function_entry php_dom_parent_node_class_functions[]; -extern const zend_function_entry php_dom_child_node_class_functions[]; -extern const zend_function_entry php_dom_domimplementation_class_functions[]; -extern const zend_function_entry php_dom_documentfragment_class_functions[]; -extern const zend_function_entry php_dom_document_class_functions[]; -extern const zend_function_entry php_dom_node_class_functions[]; -extern const zend_function_entry php_dom_nodelist_class_functions[]; -extern const zend_function_entry php_dom_namednodemap_class_functions[]; -extern const zend_function_entry php_dom_characterdata_class_functions[]; -extern const zend_function_entry php_dom_attr_class_functions[]; -extern const zend_function_entry php_dom_element_class_functions[]; -extern const zend_function_entry php_dom_text_class_functions[]; -extern const zend_function_entry php_dom_comment_class_functions[]; -extern const zend_function_entry php_dom_cdatasection_class_functions[]; -extern const zend_function_entry php_dom_notation_class_functions[]; -extern const zend_function_entry php_dom_entity_class_functions[]; -extern const zend_function_entry php_dom_entityreference_class_functions[]; -extern const zend_function_entry php_dom_processinginstruction_class_functions[]; -extern const zend_function_entry php_dom_xpath_class_functions[]; - -/* domexception errors */ -typedef enum { -/* PHP_ERR is non-spec code for PHP errors: */ - PHP_ERR = 0, - INDEX_SIZE_ERR = 1, - DOMSTRING_SIZE_ERR = 2, - HIERARCHY_REQUEST_ERR = 3, - WRONG_DOCUMENT_ERR = 4, - INVALID_CHARACTER_ERR = 5, - NO_DATA_ALLOWED_ERR = 6, - NO_MODIFICATION_ALLOWED_ERR = 7, - NOT_FOUND_ERR = 8, - NOT_SUPPORTED_ERR = 9, - INUSE_ATTRIBUTE_ERR = 10, -/* Introduced in DOM Level 2: */ - INVALID_STATE_ERR = 11, -/* Introduced in DOM Level 2: */ - SYNTAX_ERR = 12, -/* Introduced in DOM Level 2: */ - INVALID_MODIFICATION_ERR = 13, -/* Introduced in DOM Level 2: */ - NAMESPACE_ERR = 14, -/* Introduced in DOM Level 2: */ - INVALID_ACCESS_ERR = 15, -/* Introduced in DOM Level 3: */ - VALIDATION_ERR = 16 -} dom_exception_code; - -/* domimplementation methods */ -PHP_METHOD(domimplementation, hasFeature); -PHP_METHOD(domimplementation, createDocumentType); -PHP_METHOD(domimplementation, createDocument); -PHP_METHOD(domimplementation, getFeature); - -/* domdocumentfragment methods */ -PHP_METHOD(domdocumentfragment, __construct); -PHP_METHOD(domdocumentfragment, appendXML); -PHP_METHOD(domdocumentfragment, append); -PHP_METHOD(domdocumentfragment, prepend); - -/* domdocument methods */ -PHP_METHOD(domdocument, createElement); -PHP_METHOD(domdocument, createDocumentFragment); -PHP_METHOD(domdocument, createTextNode); -PHP_METHOD(domdocument, createComment); -PHP_METHOD(domdocument, createCDATASection); -PHP_METHOD(domdocument, createProcessingInstruction); -PHP_METHOD(domdocument, createAttribute); -PHP_METHOD(domdocument, createEntityReference); -PHP_METHOD(domdocument, getElementsByTagName); -PHP_METHOD(domdocument, importNode); -PHP_METHOD(domdocument, createElementNS); -PHP_METHOD(domdocument, createAttributeNS); -PHP_METHOD(domdocument, getElementsByTagNameNS); -PHP_METHOD(domdocument, getElementById); -PHP_METHOD(domdocument, adoptNode); -PHP_METHOD(domdocument, normalizeDocument); -PHP_METHOD(domdocument, __construct); - /* convenience methods */ -PHP_METHOD(domdocument, load); -PHP_METHOD(domdocument, save); -PHP_METHOD(domdocument, loadXML); -PHP_METHOD(domdocument, saveXML); -PHP_METHOD(domdocument, validate); -PHP_METHOD(domdocument, xinclude); -PHP_METHOD(domdocument, registerNodeClass); -PHP_METHOD(domdocument, append); -PHP_METHOD(domdocument, prepend); - -#if defined(LIBXML_HTML_ENABLED) -PHP_METHOD(domdocument, loadHTML); -PHP_METHOD(domdocument, loadHTMLFile); -PHP_METHOD(domdocument, saveHTML); -PHP_METHOD(domdocument, saveHTMLFile); -#endif /* defined(LIBXML_HTML_ENABLED) */ - -#if defined(LIBXML_SCHEMAS_ENABLED) -PHP_METHOD(domdocument, schemaValidate); -PHP_METHOD(domdocument, schemaValidateSource); -PHP_METHOD(domdocument, relaxNGValidate); -PHP_METHOD(domdocument, relaxNGValidateSource); -#endif - -/* domnode methods */ -PHP_METHOD(domnode, insertBefore); -PHP_METHOD(domnode, replaceChild); -PHP_METHOD(domnode, removeChild); -PHP_METHOD(domnode, appendChild); -PHP_METHOD(domnode, hasChildNodes); -PHP_METHOD(domnode, cloneNode); -PHP_METHOD(domnode, normalize); -PHP_METHOD(domnode, isSupported); -PHP_METHOD(domnode, hasAttributes); -PHP_METHOD(domnode, isSameNode); -PHP_METHOD(domnode, lookupPrefix); -PHP_METHOD(domnode, isDefaultNamespace); -PHP_METHOD(domnode, lookupNamespaceURI); -PHP_METHOD(domnode, C14N); -PHP_METHOD(domnode, C14NFile); -PHP_METHOD(domnode, getNodePath); -PHP_METHOD(domnode, getLineNo); - -/* domnodelist methods */ -PHP_METHOD(domnodelist, item); -PHP_METHOD(domnodelist, count); - -/* domnamednodemap methods */ -PHP_METHOD(domnamednodemap, getNamedItem); -PHP_METHOD(domnamednodemap, item); -PHP_METHOD(domnamednodemap, getNamedItemNS); -PHP_METHOD(domnamednodemap, count); - -/* domcharacterdata methods */ -PHP_METHOD(domcharacterdata, substringData); -PHP_METHOD(domcharacterdata, appendData); -PHP_METHOD(domcharacterdata, insertData); -PHP_METHOD(domcharacterdata, deleteData); -PHP_METHOD(domcharacterdata, replaceData); -PHP_METHOD(domcharacterdata, remove); -PHP_METHOD(domcharacterdata, after); -PHP_METHOD(domcharacterdata, before); -PHP_METHOD(domcharacterdata, replaceWith); - -/* domattr methods */ -PHP_METHOD(domattr, isId); -PHP_METHOD(domattr, __construct); - -/* domelement methods */ -PHP_METHOD(domelement, getAttribute); -PHP_METHOD(domelement, setAttribute); -PHP_METHOD(domelement, removeAttribute); -PHP_METHOD(domelement, getAttributeNode); -PHP_METHOD(domelement, setAttributeNode); -PHP_METHOD(domelement, removeAttributeNode); -PHP_METHOD(domelement, getElementsByTagName); -PHP_METHOD(domelement, getAttributeNS); -PHP_METHOD(domelement, setAttributeNS); -PHP_METHOD(domelement, removeAttributeNS); -PHP_METHOD(domelement, getAttributeNodeNS); -PHP_METHOD(domelement, setAttributeNodeNS); -PHP_METHOD(domelement, getElementsByTagNameNS); -PHP_METHOD(domelement, hasAttribute); -PHP_METHOD(domelement, hasAttributeNS); -PHP_METHOD(domelement, setIdAttribute); -PHP_METHOD(domelement, setIdAttributeNS); -PHP_METHOD(domelement, setIdAttributeNode); -PHP_METHOD(domelement, __construct); -PHP_METHOD(domelement, remove); -PHP_METHOD(domelement, after); -PHP_METHOD(domelement, before); -PHP_METHOD(domelement, append); -PHP_METHOD(domelement, prepend); -PHP_METHOD(domelement, replaceWith); - -/* domtext methods */ -PHP_METHOD(domtext, splitText); -PHP_METHOD(domtext, isWhitespaceInElementContent); -PHP_METHOD(domtext, replaceWholeText); -PHP_METHOD(domtext, __construct); - -/* domcomment methods */ -PHP_METHOD(domcomment, __construct); - -/* domcdatasection methods */ -PHP_METHOD(domcdatasection, __construct); - -/* domdocumenttype methods */ - -/* domnotation methods */ - -/* domentity methods */ - -/* domentityreference methods */ -PHP_METHOD(domentityreference, __construct); - -/* domprocessinginstruction methods */ -PHP_METHOD(domprocessinginstruction, __construct); - -#if defined(LIBXML_XPATH_ENABLED) -/* xpath methods */ -PHP_METHOD(domxpath, __construct); -PHP_METHOD(domxpath, registerNamespace); -PHP_METHOD(domxpath, query); -PHP_METHOD(domxpath, evaluate); -PHP_METHOD(domxpath, registerPhpFunctions); -#endif - -#endif /* DOM_FE_H */ diff --git a/ext/dom/domexception.c b/ext/dom/domexception.c index e398a8003b48a..f0f5e7d765e21 100644 --- a/ext/dom/domexception.c +++ b/ext/dom/domexception.c @@ -32,10 +32,6 @@ extern zend_class_entry *dom_domexception_class_entry; -const zend_function_entry php_dom_domexception_class_functions[] = { - PHP_FE_END -}; - void php_dom_throw_error_with_message(int error_code, char *error_message, int strict_error) /* {{{ */ { if (strict_error == 1) { diff --git a/ext/dom/domexception.h b/ext/dom/domexception.h new file mode 100644 index 0000000000000..d067bfc611dcf --- /dev/null +++ b/ext/dom/domexception.h @@ -0,0 +1,49 @@ +/* + +----------------------------------------------------------------------+ + | Copyright (c) The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Christian Stocker | + | Rob Richards | + +----------------------------------------------------------------------+ +*/ + +#ifndef DOM_EXCEPTION_H +#define DOM_EXCEPTION_H + +/* domexception errors */ +typedef enum { +/* PHP_ERR is non-spec code for PHP errors: */ + PHP_ERR = 0, + INDEX_SIZE_ERR = 1, + DOMSTRING_SIZE_ERR = 2, + HIERARCHY_REQUEST_ERR = 3, + WRONG_DOCUMENT_ERR = 4, + INVALID_CHARACTER_ERR = 5, + NO_DATA_ALLOWED_ERR = 6, + NO_MODIFICATION_ALLOWED_ERR = 7, + NOT_FOUND_ERR = 8, + NOT_SUPPORTED_ERR = 9, + INUSE_ATTRIBUTE_ERR = 10, +/* Introduced in DOM Level 2: */ + INVALID_STATE_ERR = 11, +/* Introduced in DOM Level 2: */ + SYNTAX_ERR = 12, +/* Introduced in DOM Level 2: */ + INVALID_MODIFICATION_ERR = 13, +/* Introduced in DOM Level 2: */ + NAMESPACE_ERR = 14, +/* Introduced in DOM Level 2: */ + INVALID_ACCESS_ERR = 15, +/* Introduced in DOM Level 3: */ + VALIDATION_ERR = 16 +} dom_exception_code; + +#endif /* DOM_EXCEPTION_H */ diff --git a/ext/dom/domimplementation.c b/ext/dom/domimplementation.c index 51b946da2a61c..c5492356fbec9 100644 --- a/ext/dom/domimplementation.c +++ b/ext/dom/domimplementation.c @@ -22,7 +22,6 @@ #include "php.h" #if HAVE_LIBXML && HAVE_DOM #include "php_dom.h" -#include "domimplementation_arginfo.h" /* * class DOMImplementation @@ -31,19 +30,11 @@ * Since: */ -const zend_function_entry php_dom_domimplementation_class_functions[] = { - PHP_ME(domimplementation, getFeature, arginfo_class_DOMImplementation_getFeature, ZEND_ACC_PUBLIC) - PHP_ME(domimplementation, hasFeature, arginfo_class_DOMImplementation_hasFeature, ZEND_ACC_PUBLIC) - PHP_ME(domimplementation, createDocumentType, arginfo_class_DOMImplementation_createDocumentType, ZEND_ACC_PUBLIC) - PHP_ME(domimplementation, createDocument, arginfo_class_DOMImplementation_createDocument, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - /* {{{ proto bool dom_domimplementation_has_feature(string feature, string version); URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-5CED94D7 Since: */ -PHP_METHOD(domimplementation, hasFeature) +PHP_METHOD(DOMImplementation, hasFeature) { size_t feature_len, version_len; char *feature, *version; @@ -64,7 +55,7 @@ PHP_METHOD(domimplementation, hasFeature) URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Level-2-Core-DOM-createDocType Since: DOM Level 2 */ -PHP_METHOD(domimplementation, createDocumentType) +PHP_METHOD(DOMImplementation, createDocumentType) { xmlDtd *doctype; int ret; @@ -126,7 +117,7 @@ PHP_METHOD(domimplementation, createDocumentType) URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Level-2-Core-DOM-createDocument Since: DOM Level 2 */ -PHP_METHOD(domimplementation, createDocument) +PHP_METHOD(DOMImplementation, createDocument) { zval *node = NULL; xmlDoc *docp; @@ -231,7 +222,7 @@ PHP_METHOD(domimplementation, createDocument) URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMImplementation3-getFeature Since: DOM Level 3 */ -PHP_METHOD(domimplementation, getFeature) +PHP_METHOD(DOMImplementation, getFeature) { size_t feature_len, version_len; char *feature, *version; diff --git a/ext/dom/domimplementation.stub.php b/ext/dom/domimplementation.stub.php deleted file mode 100644 index 86b28d196ed6b..0000000000000 --- a/ext/dom/domimplementation.stub.php +++ /dev/null @@ -1,17 +0,0 @@ -ce_flags |= ZEND_ACC_FINAL; zend_declare_property_long(dom_domexception_class_entry, "code", sizeof("code")-1, 0, ZEND_ACC_PUBLIC); - INIT_CLASS_ENTRY(ce, "DOMParentNode", php_dom_parent_node_class_functions); + INIT_CLASS_ENTRY(ce, "DOMParentNode", class_DOMParentNode_methods); dom_parentnode_class_entry = zend_register_internal_interface(&ce); - INIT_CLASS_ENTRY(ce, "DOMChildNode", php_dom_child_node_class_functions); + INIT_CLASS_ENTRY(ce, "DOMChildNode", class_DOMChildNode_methods); dom_childnode_class_entry = zend_register_internal_interface(&ce); - REGISTER_DOM_CLASS(ce, "DOMImplementation", NULL, php_dom_domimplementation_class_functions, dom_domimplementation_class_entry); + REGISTER_DOM_CLASS(ce, "DOMImplementation", NULL, class_DOMImplementation_methods, dom_domimplementation_class_entry); - REGISTER_DOM_CLASS(ce, "DOMNode", NULL, php_dom_node_class_functions, dom_node_class_entry); + REGISTER_DOM_CLASS(ce, "DOMNode", NULL, class_DOMNode_methods, dom_node_class_entry); zend_hash_init(&dom_node_prop_handlers, 0, NULL, dom_dtor_prop_handler, 1); dom_register_prop_handler(&dom_node_prop_handlers, "nodeName", sizeof("nodeName")-1, dom_node_node_name_read, NULL); @@ -625,7 +625,7 @@ PHP_MINIT_FUNCTION(dom) dom_register_prop_handler(&dom_namespace_node_prop_handlers, "parentNode", sizeof("parentNode")-1, dom_node_parent_node_read, NULL); zend_hash_add_ptr(&classes, ce.name, &dom_namespace_node_prop_handlers); - REGISTER_DOM_CLASS(ce, "DOMDocumentFragment", dom_node_class_entry, php_dom_documentfragment_class_functions, dom_documentfragment_class_entry); + REGISTER_DOM_CLASS(ce, "DOMDocumentFragment", dom_node_class_entry, class_DOMDocumentFragment_methods, dom_documentfragment_class_entry); zend_hash_init(&dom_documentfragment_prop_handlers, 0, NULL, dom_dtor_prop_handler, 1); dom_register_prop_handler(&dom_documentfragment_prop_handlers, "firstElementChild", sizeof("firstElementChild")-1, dom_parent_node_first_element_child_read, NULL); @@ -636,7 +636,7 @@ PHP_MINIT_FUNCTION(dom) zend_hash_add_ptr(&classes, ce.name, &dom_documentfragment_prop_handlers); zend_class_implements(dom_documentfragment_class_entry, 1, dom_parentnode_class_entry); - REGISTER_DOM_CLASS(ce, "DOMDocument", dom_node_class_entry, php_dom_document_class_functions, dom_document_class_entry); + REGISTER_DOM_CLASS(ce, "DOMDocument", dom_node_class_entry, class_DOMDocument_methods, dom_document_class_entry); zend_hash_init(&dom_document_prop_handlers, 0, NULL, dom_dtor_prop_handler, 1); dom_register_prop_handler(&dom_document_prop_handlers, "doctype", sizeof("doctype")-1, dom_document_doctype_read, NULL); dom_register_prop_handler(&dom_document_prop_handlers, "implementation", sizeof("implementation")-1, dom_document_implementation_read, NULL); @@ -666,7 +666,7 @@ PHP_MINIT_FUNCTION(dom) zend_hash_add_ptr(&classes, ce.name, &dom_document_prop_handlers); zend_class_implements(dom_document_class_entry, 1, dom_parentnode_class_entry); - INIT_CLASS_ENTRY(ce, "DOMNodeList", php_dom_nodelist_class_functions); + INIT_CLASS_ENTRY(ce, "DOMNodeList", class_DOMNodeList_methods); ce.create_object = dom_nnodemap_objects_new; dom_nodelist_class_entry = zend_register_internal_class_ex(&ce, NULL); dom_nodelist_class_entry->get_iterator = php_dom_get_iterator; @@ -676,7 +676,7 @@ PHP_MINIT_FUNCTION(dom) dom_register_prop_handler(&dom_nodelist_prop_handlers, "length", sizeof("length")-1, dom_nodelist_length_read, NULL); zend_hash_add_ptr(&classes, ce.name, &dom_nodelist_prop_handlers); - INIT_CLASS_ENTRY(ce, "DOMNamedNodeMap", php_dom_namednodemap_class_functions); + INIT_CLASS_ENTRY(ce, "DOMNamedNodeMap", class_DOMNamedNodeMap_methods); ce.create_object = dom_nnodemap_objects_new; dom_namednodemap_class_entry = zend_register_internal_class_ex(&ce, NULL); dom_namednodemap_class_entry->get_iterator = php_dom_get_iterator; @@ -686,7 +686,7 @@ PHP_MINIT_FUNCTION(dom) dom_register_prop_handler(&dom_namednodemap_prop_handlers, "length", sizeof("length")-1, dom_namednodemap_length_read, NULL); zend_hash_add_ptr(&classes, ce.name, &dom_namednodemap_prop_handlers); - REGISTER_DOM_CLASS(ce, "DOMCharacterData", dom_node_class_entry, php_dom_characterdata_class_functions, dom_characterdata_class_entry); + REGISTER_DOM_CLASS(ce, "DOMCharacterData", dom_node_class_entry, class_DOMCharacterData_methods, dom_characterdata_class_entry); zend_hash_init(&dom_characterdata_prop_handlers, 0, NULL, dom_dtor_prop_handler, 1); dom_register_prop_handler(&dom_characterdata_prop_handlers, "data", sizeof("data")-1, dom_characterdata_data_read, dom_characterdata_data_write); @@ -698,7 +698,7 @@ PHP_MINIT_FUNCTION(dom) zend_class_implements(dom_characterdata_class_entry, 1, dom_childnode_class_entry); - REGISTER_DOM_CLASS(ce, "DOMAttr", dom_node_class_entry, php_dom_attr_class_functions, dom_attr_class_entry); + REGISTER_DOM_CLASS(ce, "DOMAttr", dom_node_class_entry, class_DOMAttr_methods, dom_attr_class_entry); zend_hash_init(&dom_attr_prop_handlers, 0, NULL, dom_dtor_prop_handler, 1); dom_register_prop_handler(&dom_attr_prop_handlers, "name", sizeof("name")-1, dom_attr_name_read, NULL); @@ -709,7 +709,7 @@ PHP_MINIT_FUNCTION(dom) zend_hash_merge(&dom_attr_prop_handlers, &dom_node_prop_handlers, dom_copy_prop_handler, 0); zend_hash_add_ptr(&classes, ce.name, &dom_attr_prop_handlers); - REGISTER_DOM_CLASS(ce, "DOMElement", dom_node_class_entry, php_dom_element_class_functions, dom_element_class_entry); + REGISTER_DOM_CLASS(ce, "DOMElement", dom_node_class_entry, class_DOMElement_methods, dom_element_class_entry); zend_hash_init(&dom_element_prop_handlers, 0, NULL, dom_dtor_prop_handler, 1); dom_register_prop_handler(&dom_element_prop_handlers, "tagName", sizeof("tagName")-1, dom_element_tag_name_read, NULL); @@ -724,17 +724,17 @@ PHP_MINIT_FUNCTION(dom) zend_class_implements(dom_element_class_entry, 2, dom_parentnode_class_entry, dom_childnode_class_entry); - REGISTER_DOM_CLASS(ce, "DOMText", dom_characterdata_class_entry, php_dom_text_class_functions, dom_text_class_entry); + REGISTER_DOM_CLASS(ce, "DOMText", dom_characterdata_class_entry, class_DOMText_methods, dom_text_class_entry); zend_hash_init(&dom_text_prop_handlers, 0, NULL, dom_dtor_prop_handler, 1); dom_register_prop_handler(&dom_text_prop_handlers, "wholeText", sizeof("wholeText")-1, dom_text_whole_text_read, NULL); zend_hash_merge(&dom_text_prop_handlers, &dom_characterdata_prop_handlers, dom_copy_prop_handler, 0); zend_hash_add_ptr(&classes, ce.name, &dom_text_prop_handlers); - REGISTER_DOM_CLASS(ce, "DOMComment", dom_characterdata_class_entry, php_dom_comment_class_functions, dom_comment_class_entry); + REGISTER_DOM_CLASS(ce, "DOMComment", dom_characterdata_class_entry, class_DOMComment_methods, dom_comment_class_entry); zend_hash_add_ptr(&classes, ce.name, &dom_characterdata_prop_handlers); - REGISTER_DOM_CLASS(ce, "DOMCdataSection", dom_text_class_entry, php_dom_cdatasection_class_functions, dom_cdatasection_class_entry); + REGISTER_DOM_CLASS(ce, "DOMCdataSection", dom_text_class_entry, class_DOMCdataSection_methods, dom_cdatasection_class_entry); zend_hash_add_ptr(&classes, ce.name, &dom_text_prop_handlers); REGISTER_DOM_CLASS(ce, "DOMDocumentType", dom_node_class_entry, class_DOMDocumentType_methods, dom_documenttype_class_entry); @@ -749,7 +749,7 @@ PHP_MINIT_FUNCTION(dom) zend_hash_merge(&dom_documenttype_prop_handlers, &dom_node_prop_handlers, dom_copy_prop_handler, 0); zend_hash_add_ptr(&classes, ce.name, &dom_documenttype_prop_handlers); - REGISTER_DOM_CLASS(ce, "DOMNotation", dom_node_class_entry, php_dom_notation_class_functions, dom_notation_class_entry); + REGISTER_DOM_CLASS(ce, "DOMNotation", dom_node_class_entry, class_DOMNotation_methods, dom_notation_class_entry); zend_hash_init(&dom_notation_prop_handlers, 0, NULL, dom_dtor_prop_handler, 1); dom_register_prop_handler(&dom_notation_prop_handlers, "publicId", sizeof("publicId")-1, dom_notation_public_id_read, NULL); @@ -757,7 +757,7 @@ PHP_MINIT_FUNCTION(dom) zend_hash_merge(&dom_notation_prop_handlers, &dom_node_prop_handlers, dom_copy_prop_handler, 0); zend_hash_add_ptr(&classes, ce.name, &dom_notation_prop_handlers); - REGISTER_DOM_CLASS(ce, "DOMEntity", dom_node_class_entry, php_dom_entity_class_functions, dom_entity_class_entry); + REGISTER_DOM_CLASS(ce, "DOMEntity", dom_node_class_entry, class_DOMEntity_methods, dom_entity_class_entry); zend_hash_init(&dom_entity_prop_handlers, 0, NULL, dom_dtor_prop_handler, 1); dom_register_prop_handler(&dom_entity_prop_handlers, "publicId", sizeof("publicId")-1, dom_entity_public_id_read, NULL); @@ -769,10 +769,10 @@ PHP_MINIT_FUNCTION(dom) zend_hash_merge(&dom_entity_prop_handlers, &dom_node_prop_handlers, dom_copy_prop_handler, 0); zend_hash_add_ptr(&classes, ce.name, &dom_entity_prop_handlers); - REGISTER_DOM_CLASS(ce, "DOMEntityReference", dom_node_class_entry, php_dom_entityreference_class_functions, dom_entityreference_class_entry); + REGISTER_DOM_CLASS(ce, "DOMEntityReference", dom_node_class_entry, class_DOMEntityReference_methods, dom_entityreference_class_entry); zend_hash_add_ptr(&classes, ce.name, &dom_node_prop_handlers); - REGISTER_DOM_CLASS(ce, "DOMProcessingInstruction", dom_node_class_entry, php_dom_processinginstruction_class_functions, dom_processinginstruction_class_entry); + REGISTER_DOM_CLASS(ce, "DOMProcessingInstruction", dom_node_class_entry, class_DOMProcessingInstruction_methods, dom_processinginstruction_class_entry); zend_hash_init(&dom_processinginstruction_prop_handlers, 0, NULL, dom_dtor_prop_handler, 1); dom_register_prop_handler(&dom_processinginstruction_prop_handlers, "target", sizeof("target")-1, dom_processinginstruction_target_read, NULL); @@ -785,7 +785,7 @@ PHP_MINIT_FUNCTION(dom) dom_xpath_object_handlers.offset = XtOffsetOf(dom_xpath_object, dom) + XtOffsetOf(dom_object, std); dom_xpath_object_handlers.free_obj = dom_xpath_objects_free_storage; - INIT_CLASS_ENTRY(ce, "DOMXPath", php_dom_xpath_class_functions); + INIT_CLASS_ENTRY(ce, "DOMXPath", class_DOMXPath_methods); ce.create_object = dom_xpath_objects_new; dom_xpath_class_entry = zend_register_internal_class_ex(&ce, NULL); diff --git a/ext/dom/php_dom.h b/ext/dom/php_dom.h index e1058e849b74c..ec01196af7c8d 100644 --- a/ext/dom/php_dom.h +++ b/ext/dom/php_dom.h @@ -93,7 +93,7 @@ typedef struct { HashPosition pos; } php_dom_iterator; -#include "dom_fe.h" +#include "domexception.h" dom_object *dom_object_get_data(xmlNodePtr obj); dom_doc_propsptr dom_get_doc_props(php_libxml_ref_obj *document); diff --git a/ext/dom/php_dom.stub.php b/ext/dom/php_dom.stub.php new file mode 100644 index 0000000000000..8f1b3754714db --- /dev/null +++ b/ext/dom/php_dom.stub.php @@ -0,0 +1,433 @@ + Date: Sun, 12 Apr 2020 19:53:32 +0200 Subject: [PATCH 115/338] Generate method entries for ext/session and ext/reflection Closes GH-5376 --- ext/reflection/php_reflection.c | 679 +++++++----------------- ext/reflection/php_reflection.stub.php | 17 +- ext/reflection/php_reflection_arginfo.h | 475 ++++++++++++++++- ext/session/session.c | 84 +-- ext/session/session.stub.php | 26 + ext/session/session_arginfo.h | 109 ++++ 6 files changed, 833 insertions(+), 557 deletions(-) diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 058d2d59d22b3..6023ef0c0d8ce 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -1308,7 +1308,7 @@ static int get_parameter_default(zval *result, parameter_reference *param) { } /* {{{ Preventing __clone from being called */ -ZEND_METHOD(reflection, __clone) +ZEND_METHOD(ReflectionClass, __clone) { /* Should never be executable */ _DO_THROW("Cannot clone object using __clone()"); @@ -1317,7 +1317,7 @@ ZEND_METHOD(reflection, __clone) /* {{{ proto public static array Reflection::getModifierNames(int modifiers) Returns an array of modifier names */ -ZEND_METHOD(reflection, getModifierNames) +ZEND_METHOD(Reflection, getModifierNames) { zend_long modifiers; @@ -1355,7 +1355,7 @@ ZEND_METHOD(reflection, getModifierNames) /* {{{ proto public void ReflectionFunction::__construct(string name) Constructor. Throws an Exception in case the given function does not exist */ -ZEND_METHOD(reflection_function, __construct) +ZEND_METHOD(ReflectionFunction, __construct) { zval *object; zval *closure = NULL; @@ -1409,7 +1409,7 @@ ZEND_METHOD(reflection_function, __construct) /* {{{ proto public string ReflectionFunction::__toString() Returns a string representation */ -ZEND_METHOD(reflection_function, __toString) +ZEND_METHOD(ReflectionFunction, __toString) { reflection_object *intern; zend_function *fptr; @@ -1426,7 +1426,7 @@ ZEND_METHOD(reflection_function, __toString) /* {{{ proto public string ReflectionFunction::getName() Returns this function's name */ -ZEND_METHOD(reflection_function, getName) +ZEND_METHOD(ReflectionFunctionAbstract, getName) { reflection_object *intern; zend_function *fptr; @@ -1442,7 +1442,7 @@ ZEND_METHOD(reflection_function, getName) /* {{{ proto public bool ReflectionFunction::isClosure() Returns whether this is a closure */ -ZEND_METHOD(reflection_function, isClosure) +ZEND_METHOD(ReflectionFunctionAbstract, isClosure) { reflection_object *intern; zend_function *fptr; @@ -1457,7 +1457,7 @@ ZEND_METHOD(reflection_function, isClosure) /* {{{ proto public bool ReflectionFunction::getClosureThis() Returns this pointer bound to closure */ -ZEND_METHOD(reflection_function, getClosureThis) +ZEND_METHOD(ReflectionFunctionAbstract, getClosureThis) { reflection_object *intern; zval* closure_this; @@ -1478,7 +1478,7 @@ ZEND_METHOD(reflection_function, getClosureThis) /* {{{ proto public ReflectionClass ReflectionFunction::getClosureScopeClass() Returns the scope associated to the closure */ -ZEND_METHOD(reflection_function, getClosureScopeClass) +ZEND_METHOD(ReflectionFunctionAbstract, getClosureScopeClass) { reflection_object *intern; const zend_function *closure_func; @@ -1498,7 +1498,7 @@ ZEND_METHOD(reflection_function, getClosureScopeClass) /* {{{ proto public mixed ReflectionFunction::getClosure() Returns a dynamically created closure for the function */ -ZEND_METHOD(reflection_function, getClosure) +ZEND_METHOD(ReflectionFunction, getClosure) { reflection_object *intern; zend_function *fptr; @@ -1520,7 +1520,7 @@ ZEND_METHOD(reflection_function, getClosure) /* {{{ proto public bool ReflectionFunction::isInternal() Returns whether this is an internal function */ -ZEND_METHOD(reflection_function, isInternal) +ZEND_METHOD(ReflectionFunctionAbstract, isInternal) { reflection_object *intern; zend_function *fptr; @@ -1535,7 +1535,7 @@ ZEND_METHOD(reflection_function, isInternal) /* {{{ proto public bool ReflectionFunction::isUserDefined() Returns whether this is a user-defined function */ -ZEND_METHOD(reflection_function, isUserDefined) +ZEND_METHOD(ReflectionFunctionAbstract, isUserDefined) { reflection_object *intern; zend_function *fptr; @@ -1550,7 +1550,7 @@ ZEND_METHOD(reflection_function, isUserDefined) /* {{{ proto public bool ReflectionFunction::isDisabled() Returns whether this function has been disabled or not */ -ZEND_METHOD(reflection_function, isDisabled) +ZEND_METHOD(ReflectionFunction, isDisabled) { reflection_object *intern; zend_function *fptr; @@ -1567,7 +1567,7 @@ ZEND_METHOD(reflection_function, isDisabled) /* {{{ proto public string ReflectionFunction::getFileName() Returns the filename of the file this function was declared in */ -ZEND_METHOD(reflection_function, getFileName) +ZEND_METHOD(ReflectionFunctionAbstract, getFileName) { reflection_object *intern; zend_function *fptr; @@ -1585,7 +1585,7 @@ ZEND_METHOD(reflection_function, getFileName) /* {{{ proto public int ReflectionFunction::getStartLine() Returns the line this function's declaration starts at */ -ZEND_METHOD(reflection_function, getStartLine) +ZEND_METHOD(ReflectionFunctionAbstract, getStartLine) { reflection_object *intern; zend_function *fptr; @@ -1603,7 +1603,7 @@ ZEND_METHOD(reflection_function, getStartLine) /* {{{ proto public int ReflectionFunction::getEndLine() Returns the line this function's declaration ends at */ -ZEND_METHOD(reflection_function, getEndLine) +ZEND_METHOD(ReflectionFunctionAbstract, getEndLine) { reflection_object *intern; zend_function *fptr; @@ -1621,7 +1621,7 @@ ZEND_METHOD(reflection_function, getEndLine) /* {{{ proto public string ReflectionFunction::getDocComment() Returns the doc comment for this function */ -ZEND_METHOD(reflection_function, getDocComment) +ZEND_METHOD(ReflectionFunctionAbstract, getDocComment) { reflection_object *intern; zend_function *fptr; @@ -1639,7 +1639,7 @@ ZEND_METHOD(reflection_function, getDocComment) /* {{{ proto public array ReflectionFunction::getStaticVariables() Returns an associative array containing this function's static variables and their values */ -ZEND_METHOD(reflection_function, getStaticVariables) +ZEND_METHOD(ReflectionFunctionAbstract, getStaticVariables) { reflection_object *intern; zend_function *fptr; @@ -1675,7 +1675,7 @@ ZEND_METHOD(reflection_function, getStaticVariables) /* {{{ proto public mixed ReflectionFunction::invoke([mixed* args]) Invokes the function */ -ZEND_METHOD(reflection_function, invoke) +ZEND_METHOD(ReflectionFunction, invoke) { zval retval; zval *params = NULL; @@ -1727,7 +1727,7 @@ ZEND_METHOD(reflection_function, invoke) /* {{{ proto public mixed ReflectionFunction::invokeArgs(array args) Invokes the function and pass its arguments as array. */ -ZEND_METHOD(reflection_function, invokeArgs) +ZEND_METHOD(ReflectionFunction, invokeArgs) { zval retval; zval *params, *val; @@ -1795,7 +1795,7 @@ ZEND_METHOD(reflection_function, invokeArgs) /* {{{ proto public bool ReflectionFunction::returnsReference() Gets whether this function returns a reference */ -ZEND_METHOD(reflection_function, returnsReference) +ZEND_METHOD(ReflectionFunctionAbstract, returnsReference) { reflection_object *intern; zend_function *fptr; @@ -1812,7 +1812,7 @@ ZEND_METHOD(reflection_function, returnsReference) /* {{{ proto public bool ReflectionFunction::getNumberOfParameters() Gets the number of parameters */ -ZEND_METHOD(reflection_function, getNumberOfParameters) +ZEND_METHOD(ReflectionFunctionAbstract, getNumberOfParameters) { reflection_object *intern; zend_function *fptr; @@ -1835,7 +1835,7 @@ ZEND_METHOD(reflection_function, getNumberOfParameters) /* {{{ proto public bool ReflectionFunction::getNumberOfRequiredParameters() Gets the number of required parameters */ -ZEND_METHOD(reflection_function, getNumberOfRequiredParameters) +ZEND_METHOD(ReflectionFunctionAbstract, getNumberOfRequiredParameters) { reflection_object *intern; zend_function *fptr; @@ -1852,7 +1852,7 @@ ZEND_METHOD(reflection_function, getNumberOfRequiredParameters) /* {{{ proto public ReflectionParameter[] ReflectionFunction::getParameters() Returns an array of parameter objects for this function */ -ZEND_METHOD(reflection_function, getParameters) +ZEND_METHOD(ReflectionFunctionAbstract, getParameters) { reflection_object *intern; zend_function *fptr; @@ -1896,7 +1896,7 @@ ZEND_METHOD(reflection_function, getParameters) /* {{{ proto public ReflectionExtension|NULL ReflectionFunction::getExtension() Returns NULL or the extension the function belongs to */ -ZEND_METHOD(reflection_function, getExtension) +ZEND_METHOD(ReflectionFunctionAbstract, getExtension) { reflection_object *intern; zend_function *fptr; @@ -1923,7 +1923,7 @@ ZEND_METHOD(reflection_function, getExtension) /* {{{ proto public string|false ReflectionFunction::getExtensionName() Returns false or the name of the extension the function belongs to */ -ZEND_METHOD(reflection_function, getExtensionName) +ZEND_METHOD(ReflectionFunctionAbstract, getExtensionName) { reflection_object *intern; zend_function *fptr; @@ -1949,7 +1949,7 @@ ZEND_METHOD(reflection_function, getExtensionName) /* }}} */ /* {{{ proto public void ReflectionGenerator::__construct(object Generator) */ -ZEND_METHOD(reflection_generator, __construct) +ZEND_METHOD(ReflectionGenerator, __construct) { zval *generator, *object; reflection_object *intern; @@ -1982,7 +1982,7 @@ ZEND_METHOD(reflection_generator, __construct) } /* {{{ proto public array ReflectionGenerator::getTrace($options = DEBUG_BACKTRACE_PROVIDE_OBJECT) */ -ZEND_METHOD(reflection_generator, getTrace) +ZEND_METHOD(ReflectionGenerator, getTrace) { zend_long options = DEBUG_BACKTRACE_PROVIDE_OBJECT; zend_generator *generator = (zend_generator *) Z_OBJ(Z_REFLECTION_P(ZEND_THIS)->obj); @@ -2018,7 +2018,7 @@ ZEND_METHOD(reflection_generator, getTrace) /* }}} */ /* {{{ proto public int ReflectionGenerator::getExecutingLine() */ -ZEND_METHOD(reflection_generator, getExecutingLine) +ZEND_METHOD(ReflectionGenerator, getExecutingLine) { zend_generator *generator = (zend_generator *) Z_OBJ(Z_REFLECTION_P(ZEND_THIS)->obj); zend_execute_data *ex = generator->execute_data; @@ -2034,7 +2034,7 @@ ZEND_METHOD(reflection_generator, getExecutingLine) /* }}} */ /* {{{ proto public string ReflectionGenerator::getExecutingFile() */ -ZEND_METHOD(reflection_generator, getExecutingFile) +ZEND_METHOD(ReflectionGenerator, getExecutingFile) { zend_generator *generator = (zend_generator *) Z_OBJ(Z_REFLECTION_P(ZEND_THIS)->obj); zend_execute_data *ex = generator->execute_data; @@ -2050,7 +2050,7 @@ ZEND_METHOD(reflection_generator, getExecutingFile) /* }}} */ /* {{{ proto public ReflectionFunctionAbstract ReflectionGenerator::getFunction() */ -ZEND_METHOD(reflection_generator, getFunction) +ZEND_METHOD(ReflectionGenerator, getFunction) { zend_generator *generator = (zend_generator *) Z_OBJ(Z_REFLECTION_P(ZEND_THIS)->obj); zend_execute_data *ex = generator->execute_data; @@ -2074,7 +2074,7 @@ ZEND_METHOD(reflection_generator, getFunction) /* }}} */ /* {{{ proto public object ReflectionGenerator::getThis() */ -ZEND_METHOD(reflection_generator, getThis) +ZEND_METHOD(ReflectionGenerator, getThis) { zend_generator *generator = (zend_generator *) Z_OBJ(Z_REFLECTION_P(ZEND_THIS)->obj); zend_execute_data *ex = generator->execute_data; @@ -2095,7 +2095,7 @@ ZEND_METHOD(reflection_generator, getThis) /* }}} */ /* {{{ proto public Generator ReflectionGenerator::getExecutingGenerator() */ -ZEND_METHOD(reflection_generator, getExecutingGenerator) +ZEND_METHOD(ReflectionGenerator, getExecutingGenerator) { zend_generator *generator = (zend_generator *) Z_OBJ(Z_REFLECTION_P(ZEND_THIS)->obj); zend_execute_data *ex = generator->execute_data; @@ -2116,7 +2116,7 @@ ZEND_METHOD(reflection_generator, getExecutingGenerator) /* {{{ proto public void ReflectionParameter::__construct(mixed function, mixed parameter) Constructor. Throws an Exception in case the given method does not exist */ -ZEND_METHOD(reflection_parameter, __construct) +ZEND_METHOD(ReflectionParameter, __construct) { parameter_reference *ref; zval *reference, *parameter; @@ -2304,7 +2304,7 @@ ZEND_METHOD(reflection_parameter, __construct) /* {{{ proto public string ReflectionParameter::__toString() Returns a string representation */ -ZEND_METHOD(reflection_parameter, __toString) +ZEND_METHOD(ReflectionParameter, __toString) { reflection_object *intern; parameter_reference *param; @@ -2322,7 +2322,7 @@ ZEND_METHOD(reflection_parameter, __toString) /* {{{ proto public string ReflectionParameter::getName() Returns this parameters's name */ -ZEND_METHOD(reflection_parameter, getName) +ZEND_METHOD(ReflectionParameter, getName) { reflection_object *intern; parameter_reference *param; @@ -2342,7 +2342,7 @@ ZEND_METHOD(reflection_parameter, getName) /* {{{ proto public ReflectionFunction ReflectionParameter::getDeclaringFunction() Returns the ReflectionFunction for the function of this parameter */ -ZEND_METHOD(reflection_parameter, getDeclaringFunction) +ZEND_METHOD(ReflectionParameter, getDeclaringFunction) { reflection_object *intern; parameter_reference *param; @@ -2362,7 +2362,7 @@ ZEND_METHOD(reflection_parameter, getDeclaringFunction) /* {{{ proto public ReflectionClass|NULL ReflectionParameter::getDeclaringClass() Returns in which class this parameter is defined (not the type of the parameter) */ -ZEND_METHOD(reflection_parameter, getDeclaringClass) +ZEND_METHOD(ReflectionParameter, getDeclaringClass) { reflection_object *intern; parameter_reference *param; @@ -2380,7 +2380,7 @@ ZEND_METHOD(reflection_parameter, getDeclaringClass) /* {{{ proto public ReflectionClass|NULL ReflectionParameter::getClass() Returns this parameters's class hint or NULL if there is none */ -ZEND_METHOD(reflection_parameter, getClass) +ZEND_METHOD(ReflectionParameter, getClass) { reflection_object *intern; parameter_reference *param; @@ -2443,7 +2443,7 @@ ZEND_METHOD(reflection_parameter, getClass) /* {{{ proto public bool ReflectionParameter::hasType() Returns whether parameter has a type */ -ZEND_METHOD(reflection_parameter, hasType) +ZEND_METHOD(ReflectionParameter, hasType) { reflection_object *intern; parameter_reference *param; @@ -2459,7 +2459,7 @@ ZEND_METHOD(reflection_parameter, hasType) /* {{{ proto public ReflectionType ReflectionParameter::getType() Returns the type associated with the parameter */ -ZEND_METHOD(reflection_parameter, getType) +ZEND_METHOD(ReflectionParameter, getType) { reflection_object *intern; parameter_reference *param; @@ -2478,7 +2478,7 @@ ZEND_METHOD(reflection_parameter, getType) /* {{{ proto public bool ReflectionParameter::isArray() Returns whether parameter MUST be an array */ -ZEND_METHOD(reflection_parameter, isArray) +ZEND_METHOD(ReflectionParameter, isArray) { reflection_object *intern; parameter_reference *param; @@ -2496,7 +2496,7 @@ ZEND_METHOD(reflection_parameter, isArray) /* {{{ proto public bool ReflectionParameter::isCallable() Returns whether parameter MUST be callable */ -ZEND_METHOD(reflection_parameter, isCallable) +ZEND_METHOD(ReflectionParameter, isCallable) { reflection_object *intern; parameter_reference *param; @@ -2514,7 +2514,7 @@ ZEND_METHOD(reflection_parameter, isCallable) /* {{{ proto public bool ReflectionParameter::allowsNull() Returns whether NULL is allowed as this parameters's value */ -ZEND_METHOD(reflection_parameter, allowsNull) +ZEND_METHOD(ReflectionParameter, allowsNull) { reflection_object *intern; parameter_reference *param; @@ -2531,7 +2531,7 @@ ZEND_METHOD(reflection_parameter, allowsNull) /* {{{ proto public bool ReflectionParameter::isPassedByReference() Returns whether this parameters is passed to by reference */ -ZEND_METHOD(reflection_parameter, isPassedByReference) +ZEND_METHOD(ReflectionParameter, isPassedByReference) { reflection_object *intern; parameter_reference *param; @@ -2547,7 +2547,7 @@ ZEND_METHOD(reflection_parameter, isPassedByReference) /* {{{ proto public bool ReflectionParameter::canBePassedByValue() Returns whether this parameter can be passed by value */ -ZEND_METHOD(reflection_parameter, canBePassedByValue) +ZEND_METHOD(ReflectionParameter, canBePassedByValue) { reflection_object *intern; parameter_reference *param; @@ -2564,7 +2564,7 @@ ZEND_METHOD(reflection_parameter, canBePassedByValue) /* {{{ proto public bool ReflectionParameter::getPosition() Returns whether this parameter is an optional parameter */ -ZEND_METHOD(reflection_parameter, getPosition) +ZEND_METHOD(ReflectionParameter, getPosition) { reflection_object *intern; parameter_reference *param; @@ -2580,7 +2580,7 @@ ZEND_METHOD(reflection_parameter, getPosition) /* {{{ proto public bool ReflectionParameter::isOptional() Returns whether this parameter is an optional parameter */ -ZEND_METHOD(reflection_parameter, isOptional) +ZEND_METHOD(ReflectionParameter, isOptional) { reflection_object *intern; parameter_reference *param; @@ -2596,7 +2596,7 @@ ZEND_METHOD(reflection_parameter, isOptional) /* {{{ proto public bool ReflectionParameter::isDefaultValueAvailable() Returns whether the default value of this parameter is available */ -ZEND_METHOD(reflection_parameter, isDefaultValueAvailable) +ZEND_METHOD(ReflectionParameter, isDefaultValueAvailable) { reflection_object *intern; parameter_reference *param; @@ -2618,7 +2618,7 @@ ZEND_METHOD(reflection_parameter, isDefaultValueAvailable) /* {{{ proto public bool ReflectionParameter::getDefaultValue() Returns the default value of this parameter or throws an exception */ -ZEND_METHOD(reflection_parameter, getDefaultValue) +ZEND_METHOD(ReflectionParameter, getDefaultValue) { reflection_object *intern; parameter_reference *param; @@ -2643,7 +2643,7 @@ ZEND_METHOD(reflection_parameter, getDefaultValue) /* {{{ proto public bool ReflectionParameter::isDefaultValueConstant() Returns whether the default value of this parameter is constant */ -ZEND_METHOD(reflection_parameter, isDefaultValueConstant) +ZEND_METHOD(ReflectionParameter, isDefaultValueConstant) { reflection_object *intern; parameter_reference *param; @@ -2673,7 +2673,7 @@ ZEND_METHOD(reflection_parameter, isDefaultValueConstant) /* {{{ proto public mixed ReflectionParameter::getDefaultValueConstantName() Returns the default value's constant name if default value is constant or null */ -ZEND_METHOD(reflection_parameter, getDefaultValueConstantName) +ZEND_METHOD(ReflectionParameter, getDefaultValueConstantName) { reflection_object *intern; parameter_reference *param; @@ -2709,7 +2709,7 @@ ZEND_METHOD(reflection_parameter, getDefaultValueConstantName) /* {{{ proto public bool ReflectionParameter::isVariadic() Returns whether this parameter is a variadic parameter */ -ZEND_METHOD(reflection_parameter, isVariadic) +ZEND_METHOD(ReflectionParameter, isVariadic) { reflection_object *intern; parameter_reference *param; @@ -2725,7 +2725,7 @@ ZEND_METHOD(reflection_parameter, isVariadic) /* {{{ proto public bool ReflectionType::allowsNull() Returns whether parameter MAY be null */ -ZEND_METHOD(reflection_type, allowsNull) +ZEND_METHOD(ReflectionType, allowsNull) { reflection_object *intern; type_reference *param; @@ -2746,7 +2746,7 @@ static zend_string *zend_type_to_string_without_null(zend_type type) { /* {{{ proto public string ReflectionType::__toString() Return the text of the type hint */ -ZEND_METHOD(reflection_type, __toString) +ZEND_METHOD(ReflectionType, __toString) { reflection_object *intern; type_reference *param; @@ -2762,7 +2762,7 @@ ZEND_METHOD(reflection_type, __toString) /* {{{ proto public string ReflectionNamedType::getName() Return the name of the type */ -ZEND_METHOD(reflection_named_type, getName) +ZEND_METHOD(ReflectionNamedType, getName) { reflection_object *intern; type_reference *param; @@ -2781,7 +2781,7 @@ ZEND_METHOD(reflection_named_type, getName) /* {{{ proto public bool ReflectionNamedType::isBuiltin() Returns whether type is a builtin type */ -ZEND_METHOD(reflection_named_type, isBuiltin) +ZEND_METHOD(ReflectionNamedType, isBuiltin) { reflection_object *intern; type_reference *param; @@ -2809,7 +2809,7 @@ static void append_type_mask(zval *return_value, uint32_t type_mask) { /* {{{ proto public string ReflectionUnionType::getTypes() Returns the types that are part of this union type */ -ZEND_METHOD(reflection_union_type, getTypes) +ZEND_METHOD(ReflectionUnionType, getTypes) { reflection_object *intern; type_reference *param; @@ -2870,7 +2870,7 @@ ZEND_METHOD(reflection_union_type, getTypes) /* {{{ proto public void ReflectionMethod::__construct(mixed class_or_method [, string name]) Constructor. Throws an Exception in case the given method does not exist */ -ZEND_METHOD(reflection_method, __construct) +ZEND_METHOD(ReflectionMethod, __construct) { zval *classname; zval *object, *orig_obj; @@ -2962,7 +2962,7 @@ ZEND_METHOD(reflection_method, __construct) /* {{{ proto public string ReflectionMethod::__toString() Returns a string representation */ -ZEND_METHOD(reflection_method, __toString) +ZEND_METHOD(ReflectionMethod, __toString) { reflection_object *intern; zend_function *mptr; @@ -2979,7 +2979,7 @@ ZEND_METHOD(reflection_method, __toString) /* {{{ proto public mixed ReflectionMethod::getClosure([mixed object]) Invokes the function */ -ZEND_METHOD(reflection_method, getClosure) +ZEND_METHOD(ReflectionMethod, getClosure) { reflection_object *intern; zval *obj; @@ -3135,7 +3135,7 @@ static void reflection_method_invoke(INTERNAL_FUNCTION_PARAMETERS, int variadic) /* {{{ proto public mixed ReflectionMethod::invoke(mixed object, [mixed* args]) Invokes the method. */ -ZEND_METHOD(reflection_method, invoke) +ZEND_METHOD(ReflectionMethod, invoke) { reflection_method_invoke(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); } @@ -3143,7 +3143,7 @@ ZEND_METHOD(reflection_method, invoke) /* {{{ proto public mixed ReflectionMethod::invokeArgs(mixed object, array args) Invokes the function and pass its arguments as array. */ -ZEND_METHOD(reflection_method, invokeArgs) +ZEND_METHOD(ReflectionMethod, invokeArgs) { reflection_method_invoke(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); } @@ -3151,7 +3151,7 @@ ZEND_METHOD(reflection_method, invokeArgs) /* {{{ proto public bool ReflectionMethod::isFinal() Returns whether this method is final */ -ZEND_METHOD(reflection_method, isFinal) +ZEND_METHOD(ReflectionMethod, isFinal) { _function_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_FINAL); } @@ -3159,7 +3159,7 @@ ZEND_METHOD(reflection_method, isFinal) /* {{{ proto public bool ReflectionMethod::isAbstract() Returns whether this method is abstract */ -ZEND_METHOD(reflection_method, isAbstract) +ZEND_METHOD(ReflectionMethod, isAbstract) { _function_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_ABSTRACT); } @@ -3167,7 +3167,7 @@ ZEND_METHOD(reflection_method, isAbstract) /* {{{ proto public bool ReflectionMethod::isPublic() Returns whether this method is public */ -ZEND_METHOD(reflection_method, isPublic) +ZEND_METHOD(ReflectionMethod, isPublic) { _function_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_PUBLIC); } @@ -3175,7 +3175,7 @@ ZEND_METHOD(reflection_method, isPublic) /* {{{ proto public bool ReflectionMethod::isPrivate() Returns whether this method is private */ -ZEND_METHOD(reflection_method, isPrivate) +ZEND_METHOD(ReflectionMethod, isPrivate) { _function_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_PRIVATE); } @@ -3183,7 +3183,7 @@ ZEND_METHOD(reflection_method, isPrivate) /* {{{ proto public bool ReflectionMethod::isProtected() Returns whether this method is protected */ -ZEND_METHOD(reflection_method, isProtected) +ZEND_METHOD(ReflectionMethod, isProtected) { _function_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_PROTECTED); } @@ -3191,7 +3191,7 @@ ZEND_METHOD(reflection_method, isProtected) /* {{{ proto public bool ReflectionMethod::isStatic() Returns whether this method is static */ -ZEND_METHOD(reflection_method, isStatic) +ZEND_METHOD(ReflectionMethod, isStatic) { _function_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_STATIC); } @@ -3199,7 +3199,7 @@ ZEND_METHOD(reflection_method, isStatic) /* {{{ proto public bool ReflectionFunction::isDeprecated() Returns whether this function is deprecated */ -ZEND_METHOD(reflection_function, isDeprecated) +ZEND_METHOD(ReflectionFunctionAbstract, isDeprecated) { _function_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_DEPRECATED); } @@ -3207,7 +3207,7 @@ ZEND_METHOD(reflection_function, isDeprecated) /* {{{ proto public bool ReflectionFunction::isGenerator() Returns whether this function is a generator */ -ZEND_METHOD(reflection_function, isGenerator) +ZEND_METHOD(ReflectionFunctionAbstract, isGenerator) { _function_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_GENERATOR); } @@ -3215,7 +3215,7 @@ ZEND_METHOD(reflection_function, isGenerator) /* {{{ proto public bool ReflectionFunction::isVariadic() Returns whether this function is variadic */ -ZEND_METHOD(reflection_function, isVariadic) +ZEND_METHOD(ReflectionFunctionAbstract, isVariadic) { _function_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_VARIADIC); } @@ -3223,7 +3223,7 @@ ZEND_METHOD(reflection_function, isVariadic) /* {{{ proto public bool ReflectionFunction::inNamespace() Returns whether this function is defined in namespace */ -ZEND_METHOD(reflection_function, inNamespace) +ZEND_METHOD(ReflectionFunctionAbstract, inNamespace) { reflection_object *intern; zend_function *fptr; @@ -3242,7 +3242,7 @@ ZEND_METHOD(reflection_function, inNamespace) /* {{{ proto public string ReflectionFunction::getNamespaceName() Returns the name of namespace where this function is defined */ -ZEND_METHOD(reflection_function, getNamespaceName) +ZEND_METHOD(ReflectionFunctionAbstract, getNamespaceName) { reflection_object *intern; zend_function *fptr; @@ -3264,7 +3264,7 @@ ZEND_METHOD(reflection_function, getNamespaceName) /* {{{ proto public string ReflectionFunction::getShortName() Returns the short name of the function (without namespace part) */ -ZEND_METHOD(reflection_function, getShortName) +ZEND_METHOD(ReflectionFunctionAbstract, getShortName) { reflection_object *intern; zend_function *fptr; @@ -3286,7 +3286,7 @@ ZEND_METHOD(reflection_function, getShortName) /* {{{ proto public bool ReflectionFunctionAbstract:hasReturnType() Return whether the function has a return type */ -ZEND_METHOD(reflection_function, hasReturnType) +ZEND_METHOD(ReflectionFunctionAbstract, hasReturnType) { reflection_object *intern; zend_function *fptr; @@ -3303,7 +3303,7 @@ ZEND_METHOD(reflection_function, hasReturnType) /* {{{ proto public string ReflectionFunctionAbstract::getReturnType() Returns the return type associated with the function */ -ZEND_METHOD(reflection_function, getReturnType) +ZEND_METHOD(ReflectionFunctionAbstract, getReturnType) { reflection_object *intern; zend_function *fptr; @@ -3324,7 +3324,7 @@ ZEND_METHOD(reflection_function, getReturnType) /* {{{ proto public bool ReflectionMethod::isConstructor() Returns whether this method is the constructor */ -ZEND_METHOD(reflection_method, isConstructor) +ZEND_METHOD(ReflectionMethod, isConstructor) { reflection_object *intern; zend_function *mptr; @@ -3342,7 +3342,7 @@ ZEND_METHOD(reflection_method, isConstructor) /* {{{ proto public bool ReflectionMethod::isDestructor() Returns whether this method is static */ -ZEND_METHOD(reflection_method, isDestructor) +ZEND_METHOD(ReflectionMethod, isDestructor) { reflection_object *intern; zend_function *mptr; @@ -3357,7 +3357,7 @@ ZEND_METHOD(reflection_method, isDestructor) /* {{{ proto public int ReflectionMethod::getModifiers() Returns a bitfield of the access modifiers for this method */ -ZEND_METHOD(reflection_method, getModifiers) +ZEND_METHOD(ReflectionMethod, getModifiers) { reflection_object *intern; zend_function *mptr; @@ -3375,7 +3375,7 @@ ZEND_METHOD(reflection_method, getModifiers) /* {{{ proto public ReflectionClass ReflectionMethod::getDeclaringClass() Get the declaring class */ -ZEND_METHOD(reflection_method, getDeclaringClass) +ZEND_METHOD(ReflectionMethod, getDeclaringClass) { reflection_object *intern; zend_function *mptr; @@ -3392,7 +3392,7 @@ ZEND_METHOD(reflection_method, getDeclaringClass) /* {{{ proto public ReflectionClass ReflectionMethod::getPrototype() Get the prototype */ -ZEND_METHOD(reflection_method, getPrototype) +ZEND_METHOD(ReflectionMethod, getPrototype) { reflection_object *intern; zend_function *mptr; @@ -3415,7 +3415,7 @@ ZEND_METHOD(reflection_method, getPrototype) /* {{{ proto public void ReflectionMethod::setAccessible(bool visible) Sets whether non-public methods can be invoked */ -ZEND_METHOD(reflection_method, setAccessible) +ZEND_METHOD(ReflectionMethod, setAccessible) { reflection_object *intern; zend_bool visible; @@ -3432,7 +3432,7 @@ ZEND_METHOD(reflection_method, setAccessible) /* {{{ proto public void ReflectionClassConstant::__construct(mixed class, string name) Constructor. Throws an Exception in case the given class constant does not exist */ -ZEND_METHOD(reflection_class_constant, __construct) +ZEND_METHOD(ReflectionClassConstant, __construct) { zval *classname, *object; zend_string *constname; @@ -3482,7 +3482,7 @@ ZEND_METHOD(reflection_class_constant, __construct) /* {{{ proto public string ReflectionClassConstant::__toString() Returns a string representation */ -ZEND_METHOD(reflection_class_constant, __toString) +ZEND_METHOD(ReflectionClassConstant, __toString) { reflection_object *intern; zend_class_constant *ref; @@ -3502,7 +3502,7 @@ ZEND_METHOD(reflection_class_constant, __toString) /* {{{ proto public string ReflectionClassConstant::getName() Returns the constant' name */ -ZEND_METHOD(reflection_class_constant, getName) +ZEND_METHOD(ReflectionClassConstant, getName) { if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); @@ -3526,7 +3526,7 @@ static void _class_constant_check_flag(INTERNAL_FUNCTION_PARAMETERS, int mask) / /* {{{ proto public bool ReflectionClassConstant::isPublic() Returns whether this constant is public */ -ZEND_METHOD(reflection_class_constant, isPublic) +ZEND_METHOD(ReflectionClassConstant, isPublic) { _class_constant_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_PUBLIC); } @@ -3534,7 +3534,7 @@ ZEND_METHOD(reflection_class_constant, isPublic) /* {{{ proto public bool ReflectionClassConstant::isPrivate() Returns whether this constant is private */ -ZEND_METHOD(reflection_class_constant, isPrivate) +ZEND_METHOD(ReflectionClassConstant, isPrivate) { _class_constant_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_PRIVATE); } @@ -3542,7 +3542,7 @@ ZEND_METHOD(reflection_class_constant, isPrivate) /* {{{ proto public bool ReflectionClassConstant::isProtected() Returns whether this constant is protected */ -ZEND_METHOD(reflection_class_constant, isProtected) +ZEND_METHOD(ReflectionClassConstant, isProtected) { _class_constant_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_PROTECTED); } @@ -3550,7 +3550,7 @@ ZEND_METHOD(reflection_class_constant, isProtected) /* {{{ proto public int ReflectionClassConstant::getModifiers() Returns a bitfield of the access modifiers for this constant */ -ZEND_METHOD(reflection_class_constant, getModifiers) +ZEND_METHOD(ReflectionClassConstant, getModifiers) { reflection_object *intern; zend_class_constant *ref; @@ -3566,7 +3566,7 @@ ZEND_METHOD(reflection_class_constant, getModifiers) /* {{{ proto public mixed ReflectionClassConstant::getValue() Returns this constant's value */ -ZEND_METHOD(reflection_class_constant, getValue) +ZEND_METHOD(ReflectionClassConstant, getValue) { reflection_object *intern; zend_class_constant *ref; @@ -3585,7 +3585,7 @@ ZEND_METHOD(reflection_class_constant, getValue) /* {{{ proto public ReflectionClass ReflectionClassConstant::getDeclaringClass() Get the declaring class */ -ZEND_METHOD(reflection_class_constant, getDeclaringClass) +ZEND_METHOD(ReflectionClassConstant, getDeclaringClass) { reflection_object *intern; zend_class_constant *ref; @@ -3601,7 +3601,7 @@ ZEND_METHOD(reflection_class_constant, getDeclaringClass) /* {{{ proto public string ReflectionClassConstant::getDocComment() Returns the doc comment for this constant */ -ZEND_METHOD(reflection_class_constant, getDocComment) +ZEND_METHOD(ReflectionClassConstant, getDocComment) { reflection_object *intern; zend_class_constant *ref; @@ -3665,7 +3665,7 @@ static void reflection_class_object_ctor(INTERNAL_FUNCTION_PARAMETERS, int is_ob /* {{{ proto public void ReflectionClass::__construct(mixed argument) throws ReflectionException Constructor. Takes a string or an instance as an argument */ -ZEND_METHOD(reflection_class, __construct) +ZEND_METHOD(ReflectionClass, __construct) { reflection_class_object_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); } @@ -3715,7 +3715,7 @@ static void add_class_vars(zend_class_entry *ce, zend_bool statics, zval *return /* {{{ proto public array ReflectionClass::getStaticProperties() Returns an associative array containing all static property values of the class */ -ZEND_METHOD(reflection_class, getStaticProperties) +ZEND_METHOD(ReflectionClass, getStaticProperties) { reflection_object *intern; zend_class_entry *ce; @@ -3737,7 +3737,7 @@ ZEND_METHOD(reflection_class, getStaticProperties) /* {{{ proto public mixed ReflectionClass::getStaticPropertyValue(string name [, mixed default]) Returns the value of a static property */ -ZEND_METHOD(reflection_class, getStaticPropertyValue) +ZEND_METHOD(ReflectionClass, getStaticPropertyValue) { reflection_object *intern; zend_class_entry *ce; @@ -3770,7 +3770,7 @@ ZEND_METHOD(reflection_class, getStaticPropertyValue) /* {{{ proto public void ReflectionClass::setStaticPropertyValue(string $name, mixed $value) Sets the value of a static property */ -ZEND_METHOD(reflection_class, setStaticPropertyValue) +ZEND_METHOD(ReflectionClass, setStaticPropertyValue) { reflection_object *intern; zend_class_entry *ce; @@ -3816,7 +3816,7 @@ ZEND_METHOD(reflection_class, setStaticPropertyValue) /* {{{ proto public array ReflectionClass::getDefaultProperties() Returns an associative array containing copies of all default property values of the class */ -ZEND_METHOD(reflection_class, getDefaultProperties) +ZEND_METHOD(ReflectionClass, getDefaultProperties) { reflection_object *intern; zend_class_entry *ce; @@ -3836,7 +3836,7 @@ ZEND_METHOD(reflection_class, getDefaultProperties) /* {{{ proto public string ReflectionClass::__toString() Returns a string representation */ -ZEND_METHOD(reflection_class, __toString) +ZEND_METHOD(ReflectionClass, __toString) { reflection_object *intern; zend_class_entry *ce; @@ -3853,7 +3853,7 @@ ZEND_METHOD(reflection_class, __toString) /* {{{ proto public string ReflectionClass::getName() Returns the class' name */ -ZEND_METHOD(reflection_class, getName) +ZEND_METHOD(ReflectionClass, getName) { reflection_object *intern; zend_class_entry *ce; @@ -3869,7 +3869,7 @@ ZEND_METHOD(reflection_class, getName) /* {{{ proto public bool ReflectionClass::isInternal() Returns whether this class is an internal class */ -ZEND_METHOD(reflection_class, isInternal) +ZEND_METHOD(ReflectionClass, isInternal) { reflection_object *intern; zend_class_entry *ce; @@ -3884,7 +3884,7 @@ ZEND_METHOD(reflection_class, isInternal) /* {{{ proto public bool ReflectionClass::isUserDefined() Returns whether this class is user-defined */ -ZEND_METHOD(reflection_class, isUserDefined) +ZEND_METHOD(ReflectionClass, isUserDefined) { reflection_object *intern; zend_class_entry *ce; @@ -3899,7 +3899,7 @@ ZEND_METHOD(reflection_class, isUserDefined) /* {{{ proto public bool ReflectionClass::isAnonymous() Returns whether this class is anonymous */ -ZEND_METHOD(reflection_class, isAnonymous) +ZEND_METHOD(ReflectionClass, isAnonymous) { reflection_object *intern; zend_class_entry *ce; @@ -3914,7 +3914,7 @@ ZEND_METHOD(reflection_class, isAnonymous) /* {{{ proto public string ReflectionClass::getFileName() Returns the filename of the file this class was declared in */ -ZEND_METHOD(reflection_class, getFileName) +ZEND_METHOD(ReflectionClass, getFileName) { reflection_object *intern; zend_class_entry *ce; @@ -3932,7 +3932,7 @@ ZEND_METHOD(reflection_class, getFileName) /* {{{ proto public int ReflectionClass::getStartLine() Returns the line this class' declaration starts at */ -ZEND_METHOD(reflection_class, getStartLine) +ZEND_METHOD(ReflectionClass, getStartLine) { reflection_object *intern; zend_class_entry *ce; @@ -3950,7 +3950,7 @@ ZEND_METHOD(reflection_class, getStartLine) /* {{{ proto public int ReflectionClass::getEndLine() Returns the line this class' declaration ends at */ -ZEND_METHOD(reflection_class, getEndLine) +ZEND_METHOD(ReflectionClass, getEndLine) { reflection_object *intern; zend_class_entry *ce; @@ -3968,7 +3968,7 @@ ZEND_METHOD(reflection_class, getEndLine) /* {{{ proto public string ReflectionClass::getDocComment() Returns the doc comment for this class */ -ZEND_METHOD(reflection_class, getDocComment) +ZEND_METHOD(ReflectionClass, getDocComment) { reflection_object *intern; zend_class_entry *ce; @@ -3986,7 +3986,7 @@ ZEND_METHOD(reflection_class, getDocComment) /* {{{ proto public ReflectionMethod ReflectionClass::getConstructor() Returns the class' constructor if there is one, NULL otherwise */ -ZEND_METHOD(reflection_class, getConstructor) +ZEND_METHOD(ReflectionClass, getConstructor) { reflection_object *intern; zend_class_entry *ce; @@ -4006,7 +4006,7 @@ ZEND_METHOD(reflection_class, getConstructor) /* {{{ proto public bool ReflectionClass::hasMethod(string name) Returns whether a method exists or not */ -ZEND_METHOD(reflection_class, hasMethod) +ZEND_METHOD(ReflectionClass, hasMethod) { reflection_object *intern; zend_class_entry *ce; @@ -4025,7 +4025,7 @@ ZEND_METHOD(reflection_class, hasMethod) /* {{{ proto public ReflectionMethod ReflectionClass::getMethod(string name) throws ReflectionException Returns the class' method specified by its name */ -ZEND_METHOD(reflection_class, getMethod) +ZEND_METHOD(ReflectionClass, getMethod) { reflection_object *intern; zend_class_entry *ce; @@ -4078,7 +4078,7 @@ static void _addmethod(zend_function *mptr, zend_class_entry *ce, zval *retval, /* {{{ proto public ReflectionMethod[] ReflectionClass::getMethods([long $filter]) Returns an array of this class' methods */ -ZEND_METHOD(reflection_class, getMethods) +ZEND_METHOD(ReflectionClass, getMethods) { reflection_object *intern; zend_class_entry *ce; @@ -4124,7 +4124,7 @@ ZEND_METHOD(reflection_class, getMethods) /* {{{ proto public bool ReflectionClass::hasProperty(string name) Returns whether a property exists or not */ -ZEND_METHOD(reflection_class, hasProperty) +ZEND_METHOD(ReflectionClass, hasProperty) { reflection_object *intern; zend_property_info *property_info; @@ -4154,7 +4154,7 @@ ZEND_METHOD(reflection_class, hasProperty) /* {{{ proto public ReflectionProperty ReflectionClass::getProperty(string name) throws ReflectionException Returns the class' property specified by its name */ -ZEND_METHOD(reflection_class, getProperty) +ZEND_METHOD(ReflectionClass, getProperty) { reflection_object *intern; zend_class_entry *ce, *ce2; @@ -4257,7 +4257,7 @@ static void _adddynproperty(zval *ptr, zend_string *key, zend_class_entry *ce, z /* {{{ proto public ReflectionProperty[] ReflectionClass::getProperties([long $filter]) Returns an array of this class' properties */ -ZEND_METHOD(reflection_class, getProperties) +ZEND_METHOD(ReflectionClass, getProperties) { reflection_object *intern; zend_class_entry *ce; @@ -4293,7 +4293,7 @@ ZEND_METHOD(reflection_class, getProperties) /* {{{ proto public bool ReflectionClass::hasConstant(string name) Returns whether a constant exists or not */ -ZEND_METHOD(reflection_class, hasConstant) +ZEND_METHOD(ReflectionClass, hasConstant) { reflection_object *intern; zend_class_entry *ce; @@ -4314,7 +4314,7 @@ ZEND_METHOD(reflection_class, hasConstant) /* {{{ proto public array ReflectionClass::getConstants() Returns an associative array containing this class' constants and their values */ -ZEND_METHOD(reflection_class, getConstants) +ZEND_METHOD(ReflectionClass, getConstants) { reflection_object *intern; zend_class_entry *ce; @@ -4340,7 +4340,7 @@ ZEND_METHOD(reflection_class, getConstants) /* {{{ proto public array ReflectionClass::getReflectionConstants() Returns an associative array containing this class' constants as ReflectionClassConstant objects */ -ZEND_METHOD(reflection_class, getReflectionConstants) +ZEND_METHOD(ReflectionClass, getReflectionConstants) { reflection_object *intern; zend_class_entry *ce; @@ -4362,7 +4362,7 @@ ZEND_METHOD(reflection_class, getReflectionConstants) /* {{{ proto public mixed ReflectionClass::getConstant(string name) Returns the class' constant specified by its name */ -ZEND_METHOD(reflection_class, getConstant) +ZEND_METHOD(ReflectionClass, getConstant) { reflection_object *intern; zend_class_entry *ce; @@ -4388,7 +4388,7 @@ ZEND_METHOD(reflection_class, getConstant) /* {{{ proto public mixed ReflectionClass::getReflectionConstant(string name) Returns the class' constant as ReflectionClassConstant objects */ -ZEND_METHOD(reflection_class, getReflectionConstant) +ZEND_METHOD(ReflectionClass, getReflectionConstant) { reflection_object *intern; zend_class_entry *ce; @@ -4423,7 +4423,7 @@ static void _class_check_flag(INTERNAL_FUNCTION_PARAMETERS, int mask) /* {{{ proto public bool ReflectionClass::isInstantiable() Returns whether this class is instantiable */ -ZEND_METHOD(reflection_class, isInstantiable) +ZEND_METHOD(ReflectionClass, isInstantiable) { reflection_object *intern; zend_class_entry *ce; @@ -4448,7 +4448,7 @@ ZEND_METHOD(reflection_class, isInstantiable) /* {{{ proto public bool ReflectionClass::isCloneable() Returns whether this class is cloneable */ -ZEND_METHOD(reflection_class, isCloneable) +ZEND_METHOD(ReflectionClass, isCloneable) { reflection_object *intern; zend_class_entry *ce; @@ -4485,7 +4485,7 @@ ZEND_METHOD(reflection_class, isCloneable) /* {{{ proto public bool ReflectionClass::isInterface() Returns whether this is an interface or a class */ -ZEND_METHOD(reflection_class, isInterface) +ZEND_METHOD(ReflectionClass, isInterface) { _class_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_INTERFACE); } @@ -4493,7 +4493,7 @@ ZEND_METHOD(reflection_class, isInterface) /* {{{ proto public bool ReflectionClass::isTrait() Returns whether this is a trait */ -ZEND_METHOD(reflection_class, isTrait) +ZEND_METHOD(ReflectionClass, isTrait) { _class_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_TRAIT); } @@ -4501,7 +4501,7 @@ ZEND_METHOD(reflection_class, isTrait) /* {{{ proto public bool ReflectionClass::isFinal() Returns whether this class is final */ -ZEND_METHOD(reflection_class, isFinal) +ZEND_METHOD(ReflectionClass, isFinal) { _class_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_FINAL); } @@ -4509,7 +4509,7 @@ ZEND_METHOD(reflection_class, isFinal) /* {{{ proto public bool ReflectionClass::isAbstract() Returns whether this class is abstract */ -ZEND_METHOD(reflection_class, isAbstract) +ZEND_METHOD(ReflectionClass, isAbstract) { _class_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS); } @@ -4517,7 +4517,7 @@ ZEND_METHOD(reflection_class, isAbstract) /* {{{ proto public int ReflectionClass::getModifiers() Returns a bitfield of the access modifiers for this class */ -ZEND_METHOD(reflection_class, getModifiers) +ZEND_METHOD(ReflectionClass, getModifiers) { reflection_object *intern; zend_class_entry *ce; @@ -4535,7 +4535,7 @@ ZEND_METHOD(reflection_class, getModifiers) /* {{{ proto public bool ReflectionClass::isInstance(stdclass object) Returns whether the given object is an instance of this class */ -ZEND_METHOD(reflection_class, isInstance) +ZEND_METHOD(ReflectionClass, isInstance) { reflection_object *intern; zend_class_entry *ce; @@ -4551,7 +4551,7 @@ ZEND_METHOD(reflection_class, isInstance) /* {{{ proto public object ReflectionClass::newInstance([mixed* args], ...) Returns an instance of this class */ -ZEND_METHOD(reflection_class, newInstance) +ZEND_METHOD(ReflectionClass, newInstance) { zval retval; reflection_object *intern; @@ -4625,7 +4625,7 @@ ZEND_METHOD(reflection_class, newInstance) /* {{{ proto public object ReflectionClass::newInstanceWithoutConstructor() Returns an instance of this class without invoking its constructor */ -ZEND_METHOD(reflection_class, newInstanceWithoutConstructor) +ZEND_METHOD(ReflectionClass, newInstanceWithoutConstructor) { reflection_object *intern; zend_class_entry *ce; @@ -4648,7 +4648,7 @@ ZEND_METHOD(reflection_class, newInstanceWithoutConstructor) /* {{{ proto public object ReflectionClass::newInstanceArgs([array args]) Returns an instance of this class */ -ZEND_METHOD(reflection_class, newInstanceArgs) +ZEND_METHOD(ReflectionClass, newInstanceArgs) { zval retval, *val; reflection_object *intern; @@ -4735,7 +4735,7 @@ ZEND_METHOD(reflection_class, newInstanceArgs) /* {{{ proto public ReflectionClass[] ReflectionClass::getInterfaces() Returns an array of interfaces this class implements */ -ZEND_METHOD(reflection_class, getInterfaces) +ZEND_METHOD(ReflectionClass, getInterfaces) { reflection_object *intern; zend_class_entry *ce; @@ -4763,7 +4763,7 @@ ZEND_METHOD(reflection_class, getInterfaces) /* {{{ proto public String[] ReflectionClass::getInterfaceNames() Returns an array of names of interfaces this class implements */ -ZEND_METHOD(reflection_class, getInterfaceNames) +ZEND_METHOD(ReflectionClass, getInterfaceNames) { reflection_object *intern; zend_class_entry *ce; @@ -4790,7 +4790,7 @@ ZEND_METHOD(reflection_class, getInterfaceNames) /* {{{ proto public ReflectionClass[] ReflectionClass::getTraits() Returns an array of traits used by this class */ -ZEND_METHOD(reflection_class, getTraits) +ZEND_METHOD(ReflectionClass, getTraits) { reflection_object *intern; zend_class_entry *ce; @@ -4822,7 +4822,7 @@ ZEND_METHOD(reflection_class, getTraits) /* {{{ proto public String[] ReflectionClass::getTraitNames() Returns an array of names of traits used by this class */ -ZEND_METHOD(reflection_class, getTraitNames) +ZEND_METHOD(ReflectionClass, getTraitNames) { reflection_object *intern; zend_class_entry *ce; @@ -4847,7 +4847,7 @@ ZEND_METHOD(reflection_class, getTraitNames) /* {{{ proto public array ReflectionClass::getTraitAliases() Returns an array of trait aliases */ -ZEND_METHOD(reflection_class, getTraitAliases) +ZEND_METHOD(ReflectionClass, getTraitAliases) { reflection_object *intern; zend_class_entry *ce; @@ -4882,7 +4882,7 @@ ZEND_METHOD(reflection_class, getTraitAliases) /* {{{ proto public ReflectionClass ReflectionClass::getParentClass() Returns the class' parent class, or, if none exists, FALSE */ -ZEND_METHOD(reflection_class, getParentClass) +ZEND_METHOD(ReflectionClass, getParentClass) { reflection_object *intern; zend_class_entry *ce; @@ -4902,7 +4902,7 @@ ZEND_METHOD(reflection_class, getParentClass) /* {{{ proto public bool ReflectionClass::isSubclassOf(string|ReflectionClass class) Returns whether this class is a subclass of another class */ -ZEND_METHOD(reflection_class, isSubclassOf) +ZEND_METHOD(ReflectionClass, isSubclassOf) { reflection_object *intern, *argument; zend_class_entry *ce, *class_ce; @@ -4944,7 +4944,7 @@ ZEND_METHOD(reflection_class, isSubclassOf) /* {{{ proto public bool ReflectionClass::implementsInterface(string|ReflectionClass interface_name) Returns whether this class is a subclass of another class */ -ZEND_METHOD(reflection_class, implementsInterface) +ZEND_METHOD(ReflectionClass, implementsInterface) { reflection_object *intern, *argument; zend_class_entry *ce, *interface_ce; @@ -4991,7 +4991,7 @@ ZEND_METHOD(reflection_class, implementsInterface) /* {{{ proto public bool ReflectionClass::isIterable() Returns whether this class is iterable (can be used inside foreach) */ -ZEND_METHOD(reflection_class, isIterable) +ZEND_METHOD(ReflectionClass, isIterable) { reflection_object *intern; zend_class_entry *ce; @@ -5013,7 +5013,7 @@ ZEND_METHOD(reflection_class, isIterable) /* {{{ proto public ReflectionExtension|NULL ReflectionClass::getExtension() Returns NULL or the extension the class belongs to */ -ZEND_METHOD(reflection_class, getExtension) +ZEND_METHOD(ReflectionClass, getExtension) { reflection_object *intern; zend_class_entry *ce; @@ -5032,7 +5032,7 @@ ZEND_METHOD(reflection_class, getExtension) /* {{{ proto public string|false ReflectionClass::getExtensionName() Returns false or the name of the extension the class belongs to */ -ZEND_METHOD(reflection_class, getExtensionName) +ZEND_METHOD(ReflectionClass, getExtensionName) { reflection_object *intern; zend_class_entry *ce; @@ -5053,7 +5053,7 @@ ZEND_METHOD(reflection_class, getExtensionName) /* {{{ proto public bool ReflectionClass::inNamespace() Returns whether this class is defined in namespace */ -ZEND_METHOD(reflection_class, inNamespace) +ZEND_METHOD(ReflectionClass, inNamespace) { reflection_object *intern; zend_class_entry *ce; @@ -5072,7 +5072,7 @@ ZEND_METHOD(reflection_class, inNamespace) /* {{{ proto public string ReflectionClass::getNamespaceName() Returns the name of namespace where this class is defined */ -ZEND_METHOD(reflection_class, getNamespaceName) +ZEND_METHOD(ReflectionClass, getNamespaceName) { reflection_object *intern; zend_class_entry *ce; @@ -5094,7 +5094,7 @@ ZEND_METHOD(reflection_class, getNamespaceName) /* {{{ proto public string ReflectionClass::getShortName() Returns the short name of the class (without namespace part) */ -ZEND_METHOD(reflection_class, getShortName) +ZEND_METHOD(ReflectionClass, getShortName) { reflection_object *intern; zend_class_entry *ce; @@ -5116,7 +5116,7 @@ ZEND_METHOD(reflection_class, getShortName) /* {{{ proto public void ReflectionObject::__construct(mixed argument) throws ReflectionException Constructor. Takes an instance as an argument */ -ZEND_METHOD(reflection_object, __construct) +ZEND_METHOD(ReflectionObject, __construct) { reflection_class_object_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); } @@ -5124,7 +5124,7 @@ ZEND_METHOD(reflection_object, __construct) /* {{{ proto public void ReflectionProperty::__construct(mixed class, string name) Constructor. Throws an Exception in case the given property does not exist */ -ZEND_METHOD(reflection_property, __construct) +ZEND_METHOD(ReflectionProperty, __construct) { zval *classname; zend_string *name; @@ -5196,7 +5196,7 @@ ZEND_METHOD(reflection_property, __construct) /* {{{ proto public string ReflectionProperty::__toString() Returns a string representation */ -ZEND_METHOD(reflection_property, __toString) +ZEND_METHOD(ReflectionProperty, __toString) { reflection_object *intern; property_reference *ref; @@ -5213,7 +5213,7 @@ ZEND_METHOD(reflection_property, __toString) /* {{{ proto public string ReflectionProperty::getName() Returns the class' name */ -ZEND_METHOD(reflection_property, getName) +ZEND_METHOD(ReflectionProperty, getName) { reflection_object *intern; property_reference *ref; @@ -5242,7 +5242,7 @@ static void _property_check_flag(INTERNAL_FUNCTION_PARAMETERS, int mask) /* {{{ /* {{{ proto public bool ReflectionProperty::isPublic() Returns whether this property is public */ -ZEND_METHOD(reflection_property, isPublic) +ZEND_METHOD(ReflectionProperty, isPublic) { _property_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_PUBLIC); } @@ -5250,7 +5250,7 @@ ZEND_METHOD(reflection_property, isPublic) /* {{{ proto public bool ReflectionProperty::isPrivate() Returns whether this property is private */ -ZEND_METHOD(reflection_property, isPrivate) +ZEND_METHOD(ReflectionProperty, isPrivate) { _property_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_PRIVATE); } @@ -5258,7 +5258,7 @@ ZEND_METHOD(reflection_property, isPrivate) /* {{{ proto public bool ReflectionProperty::isProtected() Returns whether this property is protected */ -ZEND_METHOD(reflection_property, isProtected) +ZEND_METHOD(ReflectionProperty, isProtected) { _property_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_PROTECTED); } @@ -5266,7 +5266,7 @@ ZEND_METHOD(reflection_property, isProtected) /* {{{ proto public bool ReflectionProperty::isStatic() Returns whether this property is static */ -ZEND_METHOD(reflection_property, isStatic) +ZEND_METHOD(ReflectionProperty, isStatic) { _property_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_STATIC); } @@ -5274,7 +5274,7 @@ ZEND_METHOD(reflection_property, isStatic) /* {{{ proto public bool ReflectionProperty::isDefault() Returns whether this property is default (declared at compilation time). */ -ZEND_METHOD(reflection_property, isDefault) +ZEND_METHOD(ReflectionProperty, isDefault) { reflection_object *intern; property_reference *ref; @@ -5289,7 +5289,7 @@ ZEND_METHOD(reflection_property, isDefault) /* {{{ proto public int ReflectionProperty::getModifiers() Returns a bitfield of the access modifiers for this property */ -ZEND_METHOD(reflection_property, getModifiers) +ZEND_METHOD(ReflectionProperty, getModifiers) { reflection_object *intern; property_reference *ref; @@ -5306,7 +5306,7 @@ ZEND_METHOD(reflection_property, getModifiers) /* {{{ proto public mixed ReflectionProperty::getValue([stdclass object]) Returns this property's value */ -ZEND_METHOD(reflection_property, getValue) +ZEND_METHOD(ReflectionProperty, getValue) { reflection_object *intern; property_reference *ref; @@ -5360,7 +5360,7 @@ ZEND_METHOD(reflection_property, getValue) /* {{{ proto public void ReflectionProperty::setValue([stdclass object,] mixed value) Sets this property's value */ -ZEND_METHOD(reflection_property, setValue) +ZEND_METHOD(ReflectionProperty, setValue) { reflection_object *intern; property_reference *ref; @@ -5397,7 +5397,7 @@ ZEND_METHOD(reflection_property, setValue) /* {{{ proto public mixed ReflectionProperty::isInitialized([stdclass object]) Returns this property's value */ -ZEND_METHOD(reflection_property, isInitialized) +ZEND_METHOD(ReflectionProperty, isInitialized) { reflection_object *intern; property_reference *ref; @@ -5450,7 +5450,7 @@ ZEND_METHOD(reflection_property, isInitialized) /* {{{ proto public ReflectionClass ReflectionProperty::getDeclaringClass() Get the declaring class */ -ZEND_METHOD(reflection_property, getDeclaringClass) +ZEND_METHOD(ReflectionProperty, getDeclaringClass) { reflection_object *intern; property_reference *ref; @@ -5468,7 +5468,7 @@ ZEND_METHOD(reflection_property, getDeclaringClass) /* {{{ proto public string ReflectionProperty::getDocComment() Returns the doc comment for this property */ -ZEND_METHOD(reflection_property, getDocComment) +ZEND_METHOD(ReflectionProperty, getDocComment) { reflection_object *intern; property_reference *ref; @@ -5486,7 +5486,7 @@ ZEND_METHOD(reflection_property, getDocComment) /* {{{ proto public int ReflectionProperty::setAccessible(bool visible) Sets whether non-public properties can be requested */ -ZEND_METHOD(reflection_property, setAccessible) +ZEND_METHOD(ReflectionProperty, setAccessible) { reflection_object *intern; zend_bool visible; @@ -5503,7 +5503,7 @@ ZEND_METHOD(reflection_property, setAccessible) /* {{{ proto public ReflectionType ReflectionProperty::getType() Returns the type associated with the property */ -ZEND_METHOD(reflection_property, getType) +ZEND_METHOD(ReflectionProperty, getType) { reflection_object *intern; property_reference *ref; @@ -5524,7 +5524,7 @@ ZEND_METHOD(reflection_property, getType) /* {{{ proto public bool ReflectionProperty::hasType() Returns whether property has a type */ -ZEND_METHOD(reflection_property, hasType) +ZEND_METHOD(ReflectionProperty, hasType) { reflection_object *intern; property_reference *ref; @@ -5541,7 +5541,7 @@ ZEND_METHOD(reflection_property, hasType) /* {{{ proto public bool ReflectionProperty::hasDefaultValue() Returns whether property has a default value */ -ZEND_METHOD(reflection_property, hasDefaultValue) +ZEND_METHOD(ReflectionProperty, hasDefaultValue) { reflection_object *intern; property_reference *ref; @@ -5567,7 +5567,7 @@ ZEND_METHOD(reflection_property, hasDefaultValue) /* {{{ proto public mixed ReflectionProperty::getDefaultValue() Returns the default value of a property */ -ZEND_METHOD(reflection_property, getDefaultValue) +ZEND_METHOD(ReflectionProperty, getDefaultValue) { reflection_object *intern; property_reference *ref; @@ -5607,7 +5607,7 @@ ZEND_METHOD(reflection_property, getDefaultValue) /* {{{ proto public void ReflectionExtension::__construct(string name) Constructor. Throws an Exception in case the given extension does not exist */ -ZEND_METHOD(reflection_extension, __construct) +ZEND_METHOD(ReflectionExtension, __construct) { zval *object; char *lcname; @@ -5641,7 +5641,7 @@ ZEND_METHOD(reflection_extension, __construct) /* {{{ proto public string ReflectionExtension::__toString() Returns a string representation */ -ZEND_METHOD(reflection_extension, __toString) +ZEND_METHOD(ReflectionExtension, __toString) { reflection_object *intern; zend_module_entry *module; @@ -5658,7 +5658,7 @@ ZEND_METHOD(reflection_extension, __toString) /* {{{ proto public string ReflectionExtension::getName() Returns this extension's name */ -ZEND_METHOD(reflection_extension, getName) +ZEND_METHOD(ReflectionExtension, getName) { reflection_object *intern; zend_module_entry *module; @@ -5674,7 +5674,7 @@ ZEND_METHOD(reflection_extension, getName) /* {{{ proto public string ReflectionExtension::getVersion() Returns this extension's version */ -ZEND_METHOD(reflection_extension, getVersion) +ZEND_METHOD(ReflectionExtension, getVersion) { reflection_object *intern; zend_module_entry *module; @@ -5695,7 +5695,7 @@ ZEND_METHOD(reflection_extension, getVersion) /* {{{ proto public ReflectionFunction[] ReflectionExtension::getFunctions() Returns an array of this extension's functions */ -ZEND_METHOD(reflection_extension, getFunctions) +ZEND_METHOD(ReflectionExtension, getFunctions) { reflection_object *intern; zend_module_entry *module; @@ -5720,7 +5720,7 @@ ZEND_METHOD(reflection_extension, getFunctions) /* {{{ proto public array ReflectionExtension::getConstants() Returns an associative array containing this extension's constants and their values */ -ZEND_METHOD(reflection_extension, getConstants) +ZEND_METHOD(ReflectionExtension, getConstants) { reflection_object *intern; zend_module_entry *module; @@ -5759,7 +5759,7 @@ static void _addinientry(zend_ini_entry *ini_entry, zval *retval, int number) /* {{{ proto public array ReflectionExtension::getINIEntries() Returns an associative array containing this extension's INI entries and their values */ -ZEND_METHOD(reflection_extension, getINIEntries) +ZEND_METHOD(ReflectionExtension, getINIEntries) { reflection_object *intern; zend_module_entry *module; @@ -5803,7 +5803,7 @@ static void add_extension_class(zend_class_entry *ce, zend_string *key, zval *cl /* {{{ proto public ReflectionClass[] ReflectionExtension::getClasses() Returns an array containing ReflectionClass objects for all classes of this extension */ -ZEND_METHOD(reflection_extension, getClasses) +ZEND_METHOD(ReflectionExtension, getClasses) { reflection_object *intern; zend_module_entry *module; @@ -5824,7 +5824,7 @@ ZEND_METHOD(reflection_extension, getClasses) /* {{{ proto public array ReflectionExtension::getClassNames() Returns an array containing all names of all classes of this extension */ -ZEND_METHOD(reflection_extension, getClassNames) +ZEND_METHOD(ReflectionExtension, getClassNames) { reflection_object *intern; zend_module_entry *module; @@ -5845,7 +5845,7 @@ ZEND_METHOD(reflection_extension, getClassNames) /* {{{ proto public array ReflectionExtension::getDependencies() Returns an array containing all names of all extensions this extension depends on */ -ZEND_METHOD(reflection_extension, getDependencies) +ZEND_METHOD(ReflectionExtension, getDependencies) { reflection_object *intern; zend_module_entry *module; @@ -5911,7 +5911,7 @@ ZEND_METHOD(reflection_extension, getDependencies) /* {{{ proto public void ReflectionExtension::info() Prints phpinfo block for the extension */ -ZEND_METHOD(reflection_extension, info) +ZEND_METHOD(ReflectionExtension, info) { reflection_object *intern; zend_module_entry *module; @@ -5927,7 +5927,7 @@ ZEND_METHOD(reflection_extension, info) /* {{{ proto public bool ReflectionExtension::isPersistent() Returns whether this extension is persistent */ -ZEND_METHOD(reflection_extension, isPersistent) +ZEND_METHOD(ReflectionExtension, isPersistent) { reflection_object *intern; zend_module_entry *module; @@ -5943,7 +5943,7 @@ ZEND_METHOD(reflection_extension, isPersistent) /* {{{ proto public bool ReflectionExtension::isTemporary() Returns whether this extension is temporary */ -ZEND_METHOD(reflection_extension, isTemporary) +ZEND_METHOD(ReflectionExtension, isTemporary) { reflection_object *intern; zend_module_entry *module; @@ -5959,7 +5959,7 @@ ZEND_METHOD(reflection_extension, isTemporary) /* {{{ proto public void ReflectionZendExtension::__construct(string name) Constructor. Throws an Exception in case the given Zend extension does not exist */ -ZEND_METHOD(reflection_zend_extension, __construct) +ZEND_METHOD(ReflectionZendExtension, __construct) { zval *object; reflection_object *intern; @@ -5989,7 +5989,7 @@ ZEND_METHOD(reflection_zend_extension, __construct) /* {{{ proto public string ReflectionZendExtension::__toString() Returns a string representation */ -ZEND_METHOD(reflection_zend_extension, __toString) +ZEND_METHOD(ReflectionZendExtension, __toString) { reflection_object *intern; zend_extension *extension; @@ -6006,7 +6006,7 @@ ZEND_METHOD(reflection_zend_extension, __toString) /* {{{ proto public string ReflectionZendExtension::getName() Returns the name of this Zend extension */ -ZEND_METHOD(reflection_zend_extension, getName) +ZEND_METHOD(ReflectionZendExtension, getName) { reflection_object *intern; zend_extension *extension; @@ -6022,7 +6022,7 @@ ZEND_METHOD(reflection_zend_extension, getName) /* {{{ proto public string ReflectionZendExtension::getVersion() Returns the version information of this Zend extension */ -ZEND_METHOD(reflection_zend_extension, getVersion) +ZEND_METHOD(ReflectionZendExtension, getVersion) { reflection_object *intern; zend_extension *extension; @@ -6042,7 +6042,7 @@ ZEND_METHOD(reflection_zend_extension, getVersion) /* {{{ proto public void ReflectionZendExtension::getAuthor() * Returns the name of this Zend extension's author */ -ZEND_METHOD(reflection_zend_extension, getAuthor) +ZEND_METHOD(ReflectionZendExtension, getAuthor) { reflection_object *intern; zend_extension *extension; @@ -6062,7 +6062,7 @@ ZEND_METHOD(reflection_zend_extension, getAuthor) /* {{{ proto public void ReflectionZendExtension::getURL() Returns this Zend extension's URL*/ -ZEND_METHOD(reflection_zend_extension, getURL) +ZEND_METHOD(ReflectionZendExtension, getURL) { reflection_object *intern; zend_extension *extension; @@ -6082,7 +6082,7 @@ ZEND_METHOD(reflection_zend_extension, getURL) /* {{{ proto public void ReflectionZendExtension::getCopyright() Returns this Zend extension's copyright information */ -ZEND_METHOD(reflection_zend_extension, getCopyright) +ZEND_METHOD(ReflectionZendExtension, getCopyright) { reflection_object *intern; zend_extension *extension; @@ -6102,7 +6102,7 @@ ZEND_METHOD(reflection_zend_extension, getCopyright) /* {{{ proto public ReflectionReference::__construct() * Dummy constructor -- always throws ReflectionExceptions. */ -ZEND_METHOD(reflection_reference, __construct) +ZEND_METHOD(ReflectionReference, __construct) { _DO_THROW( "Cannot directly instantiate ReflectionReference. " @@ -6123,7 +6123,7 @@ static zend_bool is_ignorable_reference(HashTable *ht, zval *ref) { /* {{{ proto public ReflectionReference|null ReflectionReference::fromArrayElement(array array, mixed key) * Create ReflectionReference for array item. Returns null if not a reference. */ -ZEND_METHOD(reflection_reference, fromArrayElement) +ZEND_METHOD(ReflectionReference, fromArrayElement) { HashTable *ht; zval *key, *item; @@ -6161,7 +6161,7 @@ ZEND_METHOD(reflection_reference, fromArrayElement) /* {{{ proto public int|string ReflectionReference::getId() * Returns a unique identifier for the reference. * The format of the return value is unspecified and may change. */ -ZEND_METHOD(reflection_reference, getId) +ZEND_METHOD(ReflectionReference, getId) { reflection_object *intern; unsigned char digest[20]; @@ -6195,277 +6195,6 @@ ZEND_METHOD(reflection_reference, getId) } /* }}} */ -/* {{{ method tables */ -static const zend_function_entry reflection_exception_functions[] = { - PHP_FE_END -}; - -static const zend_function_entry reflection_functions[] = { - ZEND_ME(reflection, getModifierNames, arginfo_class_Reflection_getModifierNames, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_FE_END -}; - -static const zend_function_entry reflector_functions[] = { - PHP_FE_END -}; - -static const zend_function_entry reflection_function_abstract_functions[] = { - ZEND_ME(reflection, __clone, arginfo_class_ReflectionFunctionAbstract___clone, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL) - ZEND_ME(reflection_function, inNamespace, arginfo_class_ReflectionFunctionAbstract_inNamespace, 0) - ZEND_ME(reflection_function, isClosure, arginfo_class_ReflectionFunctionAbstract_isClosure, 0) - ZEND_ME(reflection_function, isDeprecated, arginfo_class_ReflectionFunctionAbstract_isDeprecated, 0) - ZEND_ME(reflection_function, isInternal, arginfo_class_ReflectionFunctionAbstract_isInternal, 0) - ZEND_ME(reflection_function, isUserDefined, arginfo_class_ReflectionFunctionAbstract_isUserDefined, 0) - ZEND_ME(reflection_function, isGenerator, arginfo_class_ReflectionFunctionAbstract_isGenerator, 0) - ZEND_ME(reflection_function, isVariadic, arginfo_class_ReflectionFunctionAbstract_isVariadic, 0) - ZEND_ME(reflection_function, getClosureThis, arginfo_class_ReflectionFunctionAbstract_getClosureThis, 0) - ZEND_ME(reflection_function, getClosureScopeClass, arginfo_class_ReflectionFunctionAbstract_getClosureScopeClass, 0) - ZEND_ME(reflection_function, getDocComment, arginfo_class_ReflectionFunctionAbstract_getDocComment, 0) - ZEND_ME(reflection_function, getEndLine, arginfo_class_ReflectionFunctionAbstract_getEndLine, 0) - ZEND_ME(reflection_function, getExtension, arginfo_class_ReflectionFunctionAbstract_getExtension, 0) - ZEND_ME(reflection_function, getExtensionName, arginfo_class_ReflectionFunctionAbstract_getExtensionName, 0) - ZEND_ME(reflection_function, getFileName, arginfo_class_ReflectionFunctionAbstract_getFileName, 0) - ZEND_ME(reflection_function, getName, arginfo_class_ReflectionFunctionAbstract_getName, 0) - ZEND_ME(reflection_function, getNamespaceName, arginfo_class_ReflectionFunctionAbstract_getNamespaceName, 0) - ZEND_ME(reflection_function, getNumberOfParameters, arginfo_class_ReflectionFunctionAbstract_getNumberOfParameters, 0) - ZEND_ME(reflection_function, getNumberOfRequiredParameters, arginfo_class_ReflectionFunctionAbstract_getNumberOfRequiredParameters, 0) - ZEND_ME(reflection_function, getParameters, arginfo_class_ReflectionFunctionAbstract_getParameters, 0) - ZEND_ME(reflection_function, getShortName, arginfo_class_ReflectionFunctionAbstract_getShortName, 0) - ZEND_ME(reflection_function, getStartLine, arginfo_class_ReflectionFunctionAbstract_getStartLine, 0) - ZEND_ME(reflection_function, getStaticVariables, arginfo_class_ReflectionFunctionAbstract_getStaticVariables, 0) - ZEND_ME(reflection_function, returnsReference, arginfo_class_ReflectionFunctionAbstract_returnsReference, 0) - ZEND_ME(reflection_function, hasReturnType, arginfo_class_ReflectionFunctionAbstract_hasReturnType, 0) - ZEND_ME(reflection_function, getReturnType, arginfo_class_ReflectionFunctionAbstract_getReturnType, 0) - PHP_FE_END -}; - -static const zend_function_entry reflection_function_functions[] = { - ZEND_ME(reflection_function, __construct, arginfo_class_ReflectionFunction___construct, 0) - ZEND_ME(reflection_function, __toString, arginfo_class_ReflectionFunction___toString, 0) - ZEND_ME(reflection_function, isDisabled, arginfo_class_ReflectionFunction_isDisabled, 0) - ZEND_ME(reflection_function, invoke, arginfo_class_ReflectionFunction_invoke, 0) - ZEND_ME(reflection_function, invokeArgs, arginfo_class_ReflectionFunction_invokeArgs, 0) - ZEND_ME(reflection_function, getClosure, arginfo_class_ReflectionFunction_getClosure, 0) - PHP_FE_END -}; - -static const zend_function_entry reflection_generator_functions[] = { - ZEND_ME(reflection_generator, __construct, arginfo_class_ReflectionGenerator___construct, 0) - ZEND_ME(reflection_generator, getExecutingLine, arginfo_class_ReflectionGenerator_getExecutingLine, 0) - ZEND_ME(reflection_generator, getExecutingFile, arginfo_class_ReflectionGenerator_getExecutingFile, 0) - ZEND_ME(reflection_generator, getTrace, arginfo_class_ReflectionGenerator_getTrace, 0) - ZEND_ME(reflection_generator, getFunction, arginfo_class_ReflectionGenerator_getFunction, 0) - ZEND_ME(reflection_generator, getThis, arginfo_class_ReflectionGenerator_getThis, 0) - ZEND_ME(reflection_generator, getExecutingGenerator, arginfo_class_ReflectionGenerator_getExecutingGenerator, 0) - PHP_FE_END -}; - -static const zend_function_entry reflection_method_functions[] = { - ZEND_ME(reflection_method, __construct, arginfo_class_ReflectionMethod___construct, 0) - ZEND_ME(reflection_method, __toString, arginfo_class_ReflectionMethod___toString, 0) - ZEND_ME(reflection_method, isPublic, arginfo_class_ReflectionMethod_isPublic, 0) - ZEND_ME(reflection_method, isPrivate, arginfo_class_ReflectionMethod_isPrivate, 0) - ZEND_ME(reflection_method, isProtected, arginfo_class_ReflectionMethod_isProtected, 0) - ZEND_ME(reflection_method, isAbstract, arginfo_class_ReflectionMethod_isAbstract, 0) - ZEND_ME(reflection_method, isFinal, arginfo_class_ReflectionMethod_isFinal, 0) - ZEND_ME(reflection_method, isStatic, arginfo_class_ReflectionMethod_isStatic, 0) - ZEND_ME(reflection_method, isConstructor, arginfo_class_ReflectionMethod_isConstructor, 0) - ZEND_ME(reflection_method, isDestructor, arginfo_class_ReflectionMethod_isDestructor, 0) - ZEND_ME(reflection_method, getClosure, arginfo_class_ReflectionMethod_getClosure, 0) - ZEND_ME(reflection_method, getModifiers, arginfo_class_ReflectionMethod_getModifiers, 0) - ZEND_ME(reflection_method, invoke, arginfo_class_ReflectionMethod_invoke, 0) - ZEND_ME(reflection_method, invokeArgs, arginfo_class_ReflectionMethod_invokeArgs, 0) - ZEND_ME(reflection_method, getDeclaringClass, arginfo_class_ReflectionMethod_getDeclaringClass, 0) - ZEND_ME(reflection_method, getPrototype, arginfo_class_ReflectionMethod_getPrototype, 0) - ZEND_ME(reflection_method, setAccessible, arginfo_class_ReflectionMethod_setAccessible, 0) - PHP_FE_END -}; - -static const zend_function_entry reflection_class_functions[] = { - ZEND_ME(reflection, __clone, arginfo_class_ReflectionClass___clone, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL) - ZEND_ME(reflection_class, __construct, arginfo_class_ReflectionClass___construct, 0) - ZEND_ME(reflection_class, __toString, arginfo_class_ReflectionClass___toString, 0) - ZEND_ME(reflection_class, getName, arginfo_class_ReflectionClass_getName, 0) - ZEND_ME(reflection_class, isInternal, arginfo_class_ReflectionClass_isInternal, 0) - ZEND_ME(reflection_class, isUserDefined, arginfo_class_ReflectionClass_isUserDefined, 0) - ZEND_ME(reflection_class, isAnonymous, arginfo_class_ReflectionClass_isAnonymous, 0) - ZEND_ME(reflection_class, isInstantiable, arginfo_class_ReflectionClass_isInstantiable, 0) - ZEND_ME(reflection_class, isCloneable, arginfo_class_ReflectionClass_isCloneable, 0) - ZEND_ME(reflection_class, getFileName, arginfo_class_ReflectionClass_getFileName, 0) - ZEND_ME(reflection_class, getStartLine, arginfo_class_ReflectionClass_getStartLine, 0) - ZEND_ME(reflection_class, getEndLine, arginfo_class_ReflectionClass_getEndLine, 0) - ZEND_ME(reflection_class, getDocComment, arginfo_class_ReflectionClass_getDocComment, 0) - ZEND_ME(reflection_class, getConstructor, arginfo_class_ReflectionClass_getConstructor, 0) - ZEND_ME(reflection_class, hasMethod, arginfo_class_ReflectionClass_hasMethod, 0) - ZEND_ME(reflection_class, getMethod, arginfo_class_ReflectionClass_getMethod, 0) - ZEND_ME(reflection_class, getMethods, arginfo_class_ReflectionClass_getMethods, 0) - ZEND_ME(reflection_class, hasProperty, arginfo_class_ReflectionClass_hasProperty, 0) - ZEND_ME(reflection_class, getProperty, arginfo_class_ReflectionClass_getProperty, 0) - ZEND_ME(reflection_class, getProperties, arginfo_class_ReflectionClass_getProperties, 0) - ZEND_ME(reflection_class, hasConstant, arginfo_class_ReflectionClass_hasConstant, 0) - ZEND_ME(reflection_class, getConstants, arginfo_class_ReflectionClass_getConstants, 0) - ZEND_ME(reflection_class, getReflectionConstants, arginfo_class_ReflectionClass_getReflectionConstants, 0) - ZEND_ME(reflection_class, getConstant, arginfo_class_ReflectionClass_getConstant, 0) - ZEND_ME(reflection_class, getReflectionConstant, arginfo_class_ReflectionClass_getReflectionConstant, 0) - ZEND_ME(reflection_class, getInterfaces, arginfo_class_ReflectionClass_getInterfaces, 0) - ZEND_ME(reflection_class, getInterfaceNames, arginfo_class_ReflectionClass_getInterfaceNames, 0) - ZEND_ME(reflection_class, isInterface, arginfo_class_ReflectionClass_isInterface, 0) - ZEND_ME(reflection_class, getTraits, arginfo_class_ReflectionClass_getTraits, 0) - ZEND_ME(reflection_class, getTraitNames, arginfo_class_ReflectionClass_getTraitNames, 0) - ZEND_ME(reflection_class, getTraitAliases, arginfo_class_ReflectionClass_getTraitAliases, 0) - ZEND_ME(reflection_class, isTrait, arginfo_class_ReflectionClass_isTrait, 0) - ZEND_ME(reflection_class, isAbstract, arginfo_class_ReflectionClass_isAbstract, 0) - ZEND_ME(reflection_class, isFinal, arginfo_class_ReflectionClass_isFinal, 0) - ZEND_ME(reflection_class, getModifiers, arginfo_class_ReflectionClass_getModifiers, 0) - ZEND_ME(reflection_class, isInstance, arginfo_class_ReflectionClass_isIntance, 0) - ZEND_ME(reflection_class, newInstance, arginfo_class_ReflectionClass_newInstance, 0) - ZEND_ME(reflection_class, newInstanceWithoutConstructor, arginfo_class_ReflectionClass_newInstanceWithoutConstructor, 0) - ZEND_ME(reflection_class, newInstanceArgs, arginfo_class_ReflectionClass_newInstanceArgs, 0) - ZEND_ME(reflection_class, getParentClass, arginfo_class_ReflectionClass_getParentClass, 0) - ZEND_ME(reflection_class, isSubclassOf, arginfo_class_ReflectionClass_isSubclassOf, 0) - ZEND_ME(reflection_class, getStaticProperties, arginfo_class_ReflectionClass_getStaticProperties, 0) - ZEND_ME(reflection_class, getStaticPropertyValue, arginfo_class_ReflectionClass_getStaticPropertyValue, 0) - ZEND_ME(reflection_class, setStaticPropertyValue, arginfo_class_ReflectionClass_setStaticPropertyValue, 0) - ZEND_ME(reflection_class, getDefaultProperties, arginfo_class_ReflectionClass_getDefaultProperties, 0) - ZEND_ME(reflection_class, isIterable, arginfo_class_ReflectionClass_isIterable, 0) - ZEND_MALIAS(reflection_class, isIterateable, isIterable, arginfo_class_ReflectionClass_isIterateable, 0) - ZEND_ME(reflection_class, implementsInterface, arginfo_class_ReflectionClass_implementsInterface, 0) - ZEND_ME(reflection_class, getExtension, arginfo_class_ReflectionClass_getExtension, 0) - ZEND_ME(reflection_class, getExtensionName, arginfo_class_ReflectionClass_getExtensionName, 0) - ZEND_ME(reflection_class, inNamespace, arginfo_class_ReflectionClass_inNamespace, 0) - ZEND_ME(reflection_class, getNamespaceName, arginfo_class_ReflectionClass_getNamespaceName, 0) - ZEND_ME(reflection_class, getShortName, arginfo_class_ReflectionClass_getShortName, 0) - PHP_FE_END -}; - -static const zend_function_entry reflection_object_functions[] = { - ZEND_ME(reflection_object, __construct, arginfo_class_ReflectionObject___construct, 0) - PHP_FE_END -}; - -static const zend_function_entry reflection_property_functions[] = { - ZEND_ME(reflection, __clone, arginfo_class_ReflectionProperty___clone, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL) - ZEND_ME(reflection_property, __construct, arginfo_class_ReflectionProperty___construct, 0) - ZEND_ME(reflection_property, __toString, arginfo_class_ReflectionProperty___toString, 0) - ZEND_ME(reflection_property, getName, arginfo_class_ReflectionProperty_getName, 0) - ZEND_ME(reflection_property, getValue, arginfo_class_ReflectionProperty_getValue, 0) - ZEND_ME(reflection_property, setValue, arginfo_class_ReflectionProperty_setValue, 0) - ZEND_ME(reflection_property, isInitialized, arginfo_class_ReflectionProperty_isInitialized, 0) - ZEND_ME(reflection_property, isPublic, arginfo_class_ReflectionProperty_isPublic, 0) - ZEND_ME(reflection_property, isPrivate, arginfo_class_ReflectionProperty_isPrivate, 0) - ZEND_ME(reflection_property, isProtected, arginfo_class_ReflectionProperty_isProtected, 0) - ZEND_ME(reflection_property, isStatic, arginfo_class_ReflectionProperty_isStatic, 0) - ZEND_ME(reflection_property, isDefault, arginfo_class_ReflectionProperty_isDefault, 0) - ZEND_ME(reflection_property, getModifiers, arginfo_class_ReflectionProperty_getModifiers, 0) - ZEND_ME(reflection_property, getDeclaringClass, arginfo_class_ReflectionProperty_getDeclaringClass, 0) - ZEND_ME(reflection_property, getDocComment, arginfo_class_ReflectionProperty_getDocComment, 0) - ZEND_ME(reflection_property, setAccessible, arginfo_class_ReflectionProperty_setAccessible, 0) - ZEND_ME(reflection_property, getType, arginfo_class_ReflectionProperty_getType, 0) - ZEND_ME(reflection_property, hasType, arginfo_class_ReflectionProperty_hasType, 0) - ZEND_ME(reflection_property, hasDefaultValue, arginfo_class_ReflectionProperty_hasDefaultValue, 0) - ZEND_ME(reflection_property, getDefaultValue, arginfo_class_ReflectionProperty_getDefaultValue, 0) - PHP_FE_END -}; - -static const zend_function_entry reflection_class_constant_functions[] = { - ZEND_ME(reflection, __clone, arginfo_class_ReflectionClassConstant___clone, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL) - ZEND_ME(reflection_class_constant, __construct, arginfo_class_ReflectionClassConstant___construct, 0) - ZEND_ME(reflection_class_constant, __toString, arginfo_class_ReflectionClassConstant___toString, 0) - ZEND_ME(reflection_class_constant, getName, arginfo_class_ReflectionClassConstant_getName, 0) - ZEND_ME(reflection_class_constant, getValue, arginfo_class_ReflectionClassConstant_getValue, 0) - ZEND_ME(reflection_class_constant, isPublic, arginfo_class_ReflectionClassConstant_isPublic, 0) - ZEND_ME(reflection_class_constant, isPrivate, arginfo_class_ReflectionClassConstant_isPrivate, 0) - ZEND_ME(reflection_class_constant, isProtected, arginfo_class_ReflectionClassConstant_isProtected, 0) - ZEND_ME(reflection_class_constant, getModifiers, arginfo_class_ReflectionClassConstant_getModifiers, 0) - ZEND_ME(reflection_class_constant, getDeclaringClass, arginfo_class_ReflectionClassConstant_getDeclaringClass, 0) - ZEND_ME(reflection_class_constant, getDocComment, arginfo_class_ReflectionClassConstant_getDocComment, 0) - PHP_FE_END -}; - -static const zend_function_entry reflection_parameter_functions[] = { - ZEND_ME(reflection, __clone, arginfo_class_ReflectionParameter___clone, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL) - ZEND_ME(reflection_parameter, __construct, arginfo_class_ReflectionParameter___construct, 0) - ZEND_ME(reflection_parameter, __toString, arginfo_class_ReflectionParameter___toString, 0) - ZEND_ME(reflection_parameter, getName, arginfo_class_ReflectionParameter_getName, 0) - ZEND_ME(reflection_parameter, isPassedByReference, arginfo_class_ReflectionParameter_isPassedByReference, 0) - ZEND_ME(reflection_parameter, canBePassedByValue, arginfo_class_ReflectionParameter_canBePassedByValue, 0) - ZEND_ME(reflection_parameter, getDeclaringFunction, arginfo_class_ReflectionParameter_getDeclaringFunction, 0) - ZEND_ME(reflection_parameter, getDeclaringClass, arginfo_class_ReflectionParameter_getDeclaringClass, 0) - ZEND_ME(reflection_parameter, getClass, arginfo_class_ReflectionParameter_getClass, 0) - ZEND_ME(reflection_parameter, hasType, arginfo_class_ReflectionParameter_hasType, 0) - ZEND_ME(reflection_parameter, getType, arginfo_class_ReflectionParameter_getType, 0) - ZEND_ME(reflection_parameter, isArray, arginfo_class_ReflectionParameter_isArray, 0) - ZEND_ME(reflection_parameter, isCallable, arginfo_class_ReflectionParameter_isCallable, 0) - ZEND_ME(reflection_parameter, allowsNull, arginfo_class_ReflectionParameter_allowsNull, 0) - ZEND_ME(reflection_parameter, getPosition, arginfo_class_ReflectionParameter_getPosition, 0) - ZEND_ME(reflection_parameter, isOptional, arginfo_class_ReflectionParameter_isOptional, 0) - ZEND_ME(reflection_parameter, isDefaultValueAvailable, arginfo_class_ReflectionParameter_isDefaultValueAvailable, 0) - ZEND_ME(reflection_parameter, getDefaultValue, arginfo_class_ReflectionParameter_getDefaultValue, 0) - ZEND_ME(reflection_parameter, isDefaultValueConstant, arginfo_class_ReflectionParameter_isDefaultValueConstant, 0) - ZEND_ME(reflection_parameter, getDefaultValueConstantName, arginfo_class_ReflectionParameter_getDefaultValueConstantName, 0) - ZEND_ME(reflection_parameter, isVariadic, arginfo_class_ReflectionParameter_isVariadic, 0) - PHP_FE_END -}; - -static const zend_function_entry reflection_type_functions[] = { - ZEND_ME(reflection, __clone, arginfo_class_ReflectionType___clone, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL) - ZEND_ME(reflection_type, allowsNull, arginfo_class_ReflectionType_allowsNull, 0) - ZEND_ME(reflection_type, __toString, arginfo_class_ReflectionType___toString, 0) - PHP_FE_END -}; - -static const zend_function_entry reflection_named_type_functions[] = { - ZEND_ME(reflection_named_type, getName, arginfo_class_ReflectionNamedType_getName, 0) - ZEND_ME(reflection_named_type, isBuiltin, arginfo_class_ReflectionNamedType_isBuiltin, 0) - PHP_FE_END -}; - -static const zend_function_entry reflection_union_type_functions[] = { - ZEND_ME(reflection_union_type, getTypes, arginfo_class_ReflectionUnionType_getTypes, 0) - PHP_FE_END -}; - -static const zend_function_entry reflection_extension_functions[] = { - ZEND_ME(reflection, __clone, arginfo_class_ReflectionExtension___clone, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL) - ZEND_ME(reflection_extension, __construct, arginfo_class_ReflectionExtension___construct, 0) - ZEND_ME(reflection_extension, __toString, arginfo_class_ReflectionExtension___toString, 0) - ZEND_ME(reflection_extension, getName, arginfo_class_ReflectionExtension_getName, 0) - ZEND_ME(reflection_extension, getVersion, arginfo_class_ReflectionExtension_getVersion, 0) - ZEND_ME(reflection_extension, getFunctions, arginfo_class_ReflectionExtension_getFunctions, 0) - ZEND_ME(reflection_extension, getConstants, arginfo_class_ReflectionExtension_getConstants, 0) - ZEND_ME(reflection_extension, getINIEntries, arginfo_class_ReflectionExtension_getINIEntries, 0) - ZEND_ME(reflection_extension, getClasses, arginfo_class_ReflectionExtension_getClasses, 0) - ZEND_ME(reflection_extension, getClassNames, arginfo_class_ReflectionExtension_getClassNames, 0) - ZEND_ME(reflection_extension, getDependencies, arginfo_class_ReflectionExtension_getDependencies, 0) - ZEND_ME(reflection_extension, info, arginfo_class_ReflectionExtension_info, 0) - ZEND_ME(reflection_extension, isPersistent, arginfo_class_ReflectionExtension_isPersistent, 0) - ZEND_ME(reflection_extension, isTemporary, arginfo_class_ReflectionExtension_isTemporary, 0) - PHP_FE_END -}; - -static const zend_function_entry reflection_zend_extension_functions[] = { - ZEND_ME(reflection, __clone, arginfo_class_ReflectionZendExtension___clone, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL) - ZEND_ME(reflection_zend_extension, __construct, arginfo_class_ReflectionZendExtension___construct, 0) - ZEND_ME(reflection_zend_extension, __toString, arginfo_class_ReflectionZendExtension___toString, 0) - ZEND_ME(reflection_zend_extension, getName, arginfo_class_ReflectionZendExtension_getName, 0) - ZEND_ME(reflection_zend_extension, getVersion, arginfo_class_ReflectionZendExtension_getVersion, 0) - ZEND_ME(reflection_zend_extension, getAuthor, arginfo_class_ReflectionZendExtension_getAuthor, 0) - ZEND_ME(reflection_zend_extension, getURL, arginfo_class_ReflectionZendExtension_getURL, 0) - ZEND_ME(reflection_zend_extension, getCopyright, arginfo_class_ReflectionZendExtension_getCopyright, 0) - PHP_FE_END -}; - -static const zend_function_entry reflection_reference_functions[] = { - ZEND_ME(reflection_reference, fromArrayElement, arginfo_class_ReflectionReference_fromArrayElement, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - ZEND_ME(reflection_reference, getId, arginfo_class_ReflectionReference_getId, ZEND_ACC_PUBLIC) - - /* Always throwing dummy methods */ - ZEND_ME(reflection, __clone, arginfo_class_ReflectionReference___clone, ZEND_ACC_PRIVATE) - ZEND_ME(reflection_reference, __construct, arginfo_class_ReflectionReference___construct, ZEND_ACC_PRIVATE) - PHP_FE_END -}; -/* }}} */ - static const zend_function_entry reflection_ext_functions[] = { /* {{{ */ PHP_FE_END }; /* }}} */ @@ -6505,54 +6234,54 @@ PHP_MINIT_FUNCTION(reflection) /* {{{ */ reflection_object_handlers.write_property = _reflection_write_property; reflection_object_handlers.get_gc = reflection_get_gc; - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionException", reflection_exception_functions); + INIT_CLASS_ENTRY(_reflection_entry, "ReflectionException", class_ReflectionException_methods); reflection_exception_ptr = zend_register_internal_class_ex(&_reflection_entry, zend_ce_exception); - INIT_CLASS_ENTRY(_reflection_entry, "Reflection", reflection_functions); + INIT_CLASS_ENTRY(_reflection_entry, "Reflection", class_Reflection_methods); reflection_ptr = zend_register_internal_class(&_reflection_entry); - INIT_CLASS_ENTRY(_reflection_entry, "Reflector", reflector_functions); + INIT_CLASS_ENTRY(_reflection_entry, "Reflector", class_Reflector_methods); reflector_ptr = zend_register_internal_interface(&_reflection_entry); zend_class_implements(reflector_ptr, 1, zend_ce_stringable); - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionFunctionAbstract", reflection_function_abstract_functions); + INIT_CLASS_ENTRY(_reflection_entry, "ReflectionFunctionAbstract", class_ReflectionFunctionAbstract_methods); reflection_init_class_handlers(&_reflection_entry); reflection_function_abstract_ptr = zend_register_internal_class(&_reflection_entry); zend_class_implements(reflection_function_abstract_ptr, 1, reflector_ptr); zend_declare_property_string(reflection_function_abstract_ptr, "name", sizeof("name")-1, "", ZEND_ACC_ABSTRACT); - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionFunction", reflection_function_functions); + INIT_CLASS_ENTRY(_reflection_entry, "ReflectionFunction", class_ReflectionFunction_methods); reflection_init_class_handlers(&_reflection_entry); reflection_function_ptr = zend_register_internal_class_ex(&_reflection_entry, reflection_function_abstract_ptr); zend_declare_property_string(reflection_function_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC); REGISTER_REFLECTION_CLASS_CONST_LONG(function, "IS_DEPRECATED", ZEND_ACC_DEPRECATED); - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionGenerator", reflection_generator_functions); + INIT_CLASS_ENTRY(_reflection_entry, "ReflectionGenerator", class_ReflectionGenerator_methods); reflection_init_class_handlers(&_reflection_entry); reflection_generator_ptr = zend_register_internal_class(&_reflection_entry); - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionParameter", reflection_parameter_functions); + INIT_CLASS_ENTRY(_reflection_entry, "ReflectionParameter", class_ReflectionParameter_methods); reflection_init_class_handlers(&_reflection_entry); reflection_parameter_ptr = zend_register_internal_class(&_reflection_entry); zend_class_implements(reflection_parameter_ptr, 1, reflector_ptr); zend_declare_property_string(reflection_parameter_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC); - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionType", reflection_type_functions); + INIT_CLASS_ENTRY(_reflection_entry, "ReflectionType", class_ReflectionType_methods); reflection_init_class_handlers(&_reflection_entry); reflection_type_ptr = zend_register_internal_class(&_reflection_entry); reflection_type_ptr->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; zend_class_implements(reflection_type_ptr, 1, zend_ce_stringable); - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionNamedType", reflection_named_type_functions); + INIT_CLASS_ENTRY(_reflection_entry, "ReflectionNamedType", class_ReflectionNamedType_methods); reflection_init_class_handlers(&_reflection_entry); reflection_named_type_ptr = zend_register_internal_class_ex(&_reflection_entry, reflection_type_ptr); - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionUnionType", reflection_union_type_functions); + INIT_CLASS_ENTRY(_reflection_entry, "ReflectionUnionType", class_ReflectionUnionType_methods); reflection_init_class_handlers(&_reflection_entry); reflection_union_type_ptr = zend_register_internal_class_ex(&_reflection_entry, reflection_type_ptr); - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionMethod", reflection_method_functions); + INIT_CLASS_ENTRY(_reflection_entry, "ReflectionMethod", class_ReflectionMethod_methods); reflection_init_class_handlers(&_reflection_entry); reflection_method_ptr = zend_register_internal_class_ex(&_reflection_entry, reflection_function_abstract_ptr); zend_declare_property_string(reflection_method_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC); @@ -6565,7 +6294,7 @@ PHP_MINIT_FUNCTION(reflection) /* {{{ */ REGISTER_REFLECTION_CLASS_CONST_LONG(method, "IS_ABSTRACT", ZEND_ACC_ABSTRACT); REGISTER_REFLECTION_CLASS_CONST_LONG(method, "IS_FINAL", ZEND_ACC_FINAL); - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionClass", reflection_class_functions); + INIT_CLASS_ENTRY(_reflection_entry, "ReflectionClass", class_ReflectionClass_methods); reflection_init_class_handlers(&_reflection_entry); reflection_class_ptr = zend_register_internal_class(&_reflection_entry); zend_class_implements(reflection_class_ptr, 1, reflector_ptr); @@ -6576,18 +6305,18 @@ PHP_MINIT_FUNCTION(reflection) /* {{{ */ REGISTER_REFLECTION_CLASS_CONST_LONG(class, "IS_EXPLICIT_ABSTRACT", ZEND_ACC_EXPLICIT_ABSTRACT_CLASS); REGISTER_REFLECTION_CLASS_CONST_LONG(class, "IS_FINAL", ZEND_ACC_FINAL); - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionObject", reflection_object_functions); + INIT_CLASS_ENTRY(_reflection_entry, "ReflectionObject", class_ReflectionObject_methods); reflection_init_class_handlers(&_reflection_entry); reflection_object_ptr = zend_register_internal_class_ex(&_reflection_entry, reflection_class_ptr); - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionProperty", reflection_property_functions); + INIT_CLASS_ENTRY(_reflection_entry, "ReflectionProperty", class_ReflectionProperty_methods); reflection_init_class_handlers(&_reflection_entry); reflection_property_ptr = zend_register_internal_class(&_reflection_entry); zend_class_implements(reflection_property_ptr, 1, reflector_ptr); zend_declare_property_string(reflection_property_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC); zend_declare_property_string(reflection_property_ptr, "class", sizeof("class")-1, "", ZEND_ACC_PUBLIC); - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionClassConstant", reflection_class_constant_functions); + INIT_CLASS_ENTRY(_reflection_entry, "ReflectionClassConstant", class_ReflectionClassConstant_methods); reflection_init_class_handlers(&_reflection_entry); reflection_class_constant_ptr = zend_register_internal_class(&_reflection_entry); zend_class_implements(reflection_class_constant_ptr, 1, reflector_ptr); @@ -6599,19 +6328,19 @@ PHP_MINIT_FUNCTION(reflection) /* {{{ */ REGISTER_REFLECTION_CLASS_CONST_LONG(property, "IS_PROTECTED", ZEND_ACC_PROTECTED); REGISTER_REFLECTION_CLASS_CONST_LONG(property, "IS_PRIVATE", ZEND_ACC_PRIVATE); - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionExtension", reflection_extension_functions); + INIT_CLASS_ENTRY(_reflection_entry, "ReflectionExtension", class_ReflectionExtension_methods); reflection_init_class_handlers(&_reflection_entry); reflection_extension_ptr = zend_register_internal_class(&_reflection_entry); zend_class_implements(reflection_extension_ptr, 1, reflector_ptr); zend_declare_property_string(reflection_extension_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC); - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionZendExtension", reflection_zend_extension_functions); + INIT_CLASS_ENTRY(_reflection_entry, "ReflectionZendExtension", class_ReflectionZendExtension_methods); reflection_init_class_handlers(&_reflection_entry); reflection_zend_extension_ptr = zend_register_internal_class(&_reflection_entry); zend_class_implements(reflection_zend_extension_ptr, 1, reflector_ptr); zend_declare_property_string(reflection_zend_extension_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC); - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionReference", reflection_reference_functions); + INIT_CLASS_ENTRY(_reflection_entry, "ReflectionReference", class_ReflectionReference_methods); reflection_init_class_handlers(&_reflection_entry); _reflection_entry.ce_flags |= ZEND_ACC_FINAL; reflection_reference_ptr = zend_register_internal_class(&_reflection_entry); diff --git a/ext/reflection/php_reflection.stub.php b/ext/reflection/php_reflection.stub.php index 00c7013f099af..be6269fe78ba1 100644 --- a/ext/reflection/php_reflection.stub.php +++ b/ext/reflection/php_reflection.stub.php @@ -1,5 +1,7 @@ ce_flags |= ZEND_ACC_INTERFACE; - INIT_CLASS_ENTRY(ce, PS_SID_IFACE_NAME, php_session_id_iface_functions); + INIT_CLASS_ENTRY(ce, PS_SID_IFACE_NAME, class_SessionIdInterface_methods); php_session_id_iface_entry = zend_register_internal_class(&ce); php_session_id_iface_entry->ce_flags |= ZEND_ACC_INTERFACE; - INIT_CLASS_ENTRY(ce, PS_UPDATE_TIMESTAMP_IFACE_NAME, php_session_update_timestamp_iface_functions); + INIT_CLASS_ENTRY(ce, PS_UPDATE_TIMESTAMP_IFACE_NAME, class_SessionUpdateTimestampHandlerInterface_methods); php_session_update_timestamp_iface_entry = zend_register_internal_class(&ce); php_session_update_timestamp_iface_entry->ce_flags |= ZEND_ACC_INTERFACE; /* Register base class */ - INIT_CLASS_ENTRY(ce, PS_CLASS_NAME, php_session_class_functions); + INIT_CLASS_ENTRY(ce, PS_CLASS_NAME, class_SessionHandler_methods); php_session_class_entry = zend_register_internal_class(&ce); zend_class_implements(php_session_class_entry, 1, php_session_iface_entry); zend_class_implements(php_session_class_entry, 1, php_session_id_iface_entry); @@ -3251,7 +3177,7 @@ zend_module_entry session_module_entry = { NULL, session_deps, "session", - session_functions, + ext_functions, PHP_MINIT(session), PHP_MSHUTDOWN(session), PHP_RINIT(session), PHP_RSHUTDOWN(session), PHP_MINFO(session), diff --git a/ext/session/session.stub.php b/ext/session/session.stub.php index 8c3a6480259cb..24942aba9b477 100644 --- a/ext/session/session.stub.php +++ b/ext/session/session.stub.php @@ -1,5 +1,7 @@ Date: Sun, 12 Apr 2020 18:23:54 +0200 Subject: [PATCH 116/338] Fix [-Werror=missing-braces] compiler warning Partial fix to bug 79431 --- Zend/zend_execute_API.c | 2 +- Zend/zend_types.h | 2 +- ext/pdo/pdo_stmt.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 514c40ec1bab8..1c7c904b194a8 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -46,7 +46,7 @@ ZEND_API void (*zend_execute_ex)(zend_execute_data *execute_data); ZEND_API void (*zend_execute_internal)(zend_execute_data *execute_data, zval *return_value); /* true globals */ -ZEND_API const zend_fcall_info empty_fcall_info = { 0, {{0}, {{0}}, {0}}, NULL, NULL, NULL, 0, 0 }; +ZEND_API const zend_fcall_info empty_fcall_info = {0}; ZEND_API const zend_fcall_info_cache empty_fcall_info_cache = { NULL, NULL, NULL, NULL }; #ifdef ZEND_WIN32 diff --git a/Zend/zend_types.h b/Zend/zend_types.h index d8b2280e47f8b..3543277b779bf 100644 --- a/Zend/zend_types.h +++ b/Zend/zend_types.h @@ -302,6 +302,7 @@ typedef union _zend_value { struct _zval_struct { zend_value value; /* value */ union { + uint32_t type_info; struct { ZEND_ENDIAN_LOHI_3( zend_uchar type, /* active type */ @@ -310,7 +311,6 @@ struct _zval_struct { uint16_t extra; /* not further specified */ } u) } v; - uint32_t type_info; } u1; union { uint32_t next; /* hash collision chain */ diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 5eeea861a6998..e258ed194c808 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -750,7 +750,7 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value, enum pdo_ { int flags, idx, old_arg_count = 0; zend_class_entry *ce = NULL, *old_ce = NULL; - zval grp_val, *pgrp, retval, old_ctor_args = {{0}, {{0}}, {0}}; + zval grp_val, *pgrp, retval, old_ctor_args = {{0}, {0}, {0}}; int colno; if (how == PDO_FETCH_USE_DEFAULT) { From 83004588140dbf360e92c53779715b1a2c16f286 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Mon, 13 Apr 2020 20:25:22 +0200 Subject: [PATCH 117/338] Fix [-Wchar-subscripts] in Hash extension Use size_t type instead of char for string index. Char may be unsigned on some platforms. partial fix to bug 79431 --- ext/hash/hash_sha3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/hash/hash_sha3.c b/ext/hash/hash_sha3.c index 85be0e85c9467..e576adfcbfb94 100644 --- a/ext/hash/hash_sha3.c +++ b/ext/hash/hash_sha3.c @@ -49,14 +49,14 @@ static inline uint64_t load64(const unsigned char* x) { return ret; } static inline void store64(unsigned char* x, uint64_t val) { - char i; + size_t i; for (i = 0; i < 8; ++i) { x[i] = val & 0xFF; val >>= 8; } } static inline void xor64(unsigned char* x, uint64_t val) { - char i; + size_t i; for (i = 0; i < 8; ++i) { x[i] ^= val & 0xFF; val >>= 8; From 14fcc813948254b84f382ff537247d8a7e5e0e62 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Mon, 13 Apr 2020 21:00:44 -0700 Subject: [PATCH 118/338] Fix bug #79330 - make all execution modes consistent in rejecting \0 --- ext/standard/exec.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ext/standard/exec.c b/ext/standard/exec.c index b748e173ceff7..da5d3e921553e 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -531,6 +531,15 @@ PHP_FUNCTION(shell_exec) Z_PARAM_STRING(command, command_len) ZEND_PARSE_PARAMETERS_END(); + if (!command_len) { + php_error_docref(NULL, E_WARNING, "Cannot execute a blank command"); + RETURN_FALSE; + } + if (strlen(command) != command_len) { + php_error_docref(NULL, E_WARNING, "NULL byte detected. Possible attack"); + RETURN_FALSE; + } + #ifdef PHP_WIN32 if ((in=VCWD_POPEN(command, "rt"))==NULL) { #else From 9d6bf8221b05f86ce5875832f0f646c4c1f218be Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Mon, 13 Apr 2020 21:07:04 -0700 Subject: [PATCH 119/338] Fix bug #79465 - use unsigneds as indexes. --- ext/standard/url.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/standard/url.c b/ext/standard/url.c index fe6d7f9de1d69..1dd073e2bb423 100644 --- a/ext/standard/url.c +++ b/ext/standard/url.c @@ -559,7 +559,7 @@ PHPAPI size_t php_url_decode(char *str, size_t len) #ifndef CHARSET_EBCDIC *dest = (char) php_htoi(data + 1); #else - *dest = os_toebcdic[(char) php_htoi(data + 1)]; + *dest = os_toebcdic[(unsigned char) php_htoi(data + 1)]; #endif data += 2; len -= 2; @@ -651,7 +651,7 @@ PHPAPI size_t php_raw_url_decode(char *str, size_t len) #ifndef CHARSET_EBCDIC *dest = (char) php_htoi(data + 1); #else - *dest = os_toebcdic[(char) php_htoi(data + 1)]; + *dest = os_toebcdic[(unsigned char) php_htoi(data + 1)]; #endif data += 2; len -= 2; From 8967588702e707956df1a02055596148fa114a2f Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 14 Apr 2020 08:53:35 +0200 Subject: [PATCH 120/338] Add NEWS entries [ci skip] --- NEWS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS b/NEWS index ff1aa47d3ba44..9ebfbf1627324 100644 --- a/NEWS +++ b/NEWS @@ -49,6 +49,8 @@ PHP NEWS (cmb) - Standard: + . Fixed bug #79330 (shell_exec() silently truncates after a null byte). (stas) + . Fixed bug #79465 (OOB Read in urldecode()). (stas) . Fixed bug #79410 (system() swallows last chunk if it is exactly 4095 bytes without newline). (Christian Schneider) From d4471c6aaecab2f1cc467ea8e92040c73685bd21 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 14 Apr 2020 10:36:55 +0200 Subject: [PATCH 121/338] Remove int6store() The implementation is broken (syntactically). As it's not used anyway, I'm just dropping it instead. --- ext/mysqli/mysqli_api.c | 2 +- ext/mysqlnd/mysqlnd_portability.h | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index 80c8ca76fa1f7..e924a90ef951c 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -1715,7 +1715,7 @@ static int mysqli_options_get_option_zval_type(int option) case MYSQL_OPT_LOCAL_INFILE: case MYSQL_OPT_NAMED_PIPE: #ifdef MYSQL_OPT_PROTOCOL - case MYSQL_OPT_PROTOCOL: + case MYSQL_OPT_PROTOCOL: #endif /* MySQL 4.1.0 */ case MYSQL_OPT_READ_TIMEOUT: case MYSQL_OPT_WRITE_TIMEOUT: diff --git a/ext/mysqlnd/mysqlnd_portability.h b/ext/mysqlnd/mysqlnd_portability.h index 20649061933b6..5bed10a690c92 100644 --- a/ext/mysqlnd/mysqlnd_portability.h +++ b/ext/mysqlnd/mysqlnd_portability.h @@ -154,15 +154,6 @@ This file is public domain and comes with NO WARRANTY of any kind */ *(((zend_uchar *)(T))+3)=(zend_uchar) (((A) >> 24)); \ *(((zend_uchar *)(T))+4)=(zend_uchar) (((A) >> 32)); } -/* From Andrey Hristov, based on int5store() */ -#define int6store(T,A) { \ - *(((zend_uchar *)(T)))= (zend_uchar)((A));\ - *(((zend_uchar *)(T))+1))=(zend_uchar) (((A) >> 8));\ - *(((zend_uchar *)(T))+2))=(zend_uchar) (((A) >> 16));\ - *(((zend_uchar *)(T))+3))=(zend_uchar) (((A) >> 24)); \ - *(((zend_uchar *)(T))+4))=(zend_uchar) (((A) >> 32)); \ - *(((zend_uchar *)(T))+5))=(zend_uchar) (((A) >> 40)); } - #define int8store(T,A) *((uint64_t *) (T))= (uint64_t) (A) typedef union { @@ -236,14 +227,6 @@ typedef union { *(((char *)(T))+2) = (char)(((A) >> 16));\ *(((char *)(T))+3) = (char)(((A) >> 24)); \ *(((char *)(T))+4) = (char)(((A) >> 32)); } while (0) -/* Based on int5store() from Andrey Hristov */ -#define int6store(T,A) do { \ - *(((char *)(T))) = (char)((A));\ - *(((char *)(T))+1) = (char)(((A) >> 8));\ - *(((char *)(T))+2) = (char)(((A) >> 16));\ - *(((char *)(T))+3) = (char)(((A) >> 24)); \ - *(((char *)(T))+4) = (char)(((A) >> 32)); \ - *(((char *)(T))+5) = (char)(((A) >> 40)); } while (0) #define int8store(T,A) { uint32_t def_temp= (uint32_t) (A), def_temp2= (uint32_t) ((A) >> 32); \ int4store((T),def_temp); \ int4store((T+4),def_temp2); \ From 80598f12507c5cbde04163289e4d2575f05d2a0c Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 8 Apr 2020 13:19:39 +0200 Subject: [PATCH 122/338] Syntax errors caused by unclosed {, [, ( mention specific location Aside from a few very specific syntax errors for which detailed exceptions are thrown, generally PHP just emits the default error messages generated by bison on syntax error. These messages are very uninformative; they just say "Unexpected ... at line ...". This is most problematic with constructs which can span an arbitrary number of lines, such as blocks of code delimited by { }, 'if' conditions delimited by ( ), and so on. If a closing delimiter is missed, the block will run for the entire remainder of the source file (which could be thousands of lines), and then at the end, a parse error will be thrown with the dreaded words: "Unexpected end of file". Therefore, track the positions of opening and closing delimiters and ensure that they match up correctly. If any mismatch or missing delimiter is detected, immediately throw a parse error which points the user to the offending line. This is best done in the *lexer* and not in the parser. Thanks to Nikita Popov and George Peter Banyard for suggesting improvements. Fixes bug #79368. Closes GH-5364. --- NEWS | 2 + Zend/tests/bug60099.phpt | 2 +- .../eval_parse_error_with_doc_comment.phpt | 2 +- Zend/tests/require_parse_exception.phpt | 4 +- Zend/zend_globals.h | 1 + Zend/zend_language_scanner.h | 7 ++ Zend/zend_language_scanner.l | 113 ++++++++++++++++-- .../tests/token_get_all_variation17.phpt | 17 ++- ext/tokenizer/tokenizer.c | 4 +- tests/lang/syntax_errors.phpt | 57 +++++++++ 10 files changed, 192 insertions(+), 17 deletions(-) create mode 100644 tests/lang/syntax_errors.phpt diff --git a/NEWS b/NEWS index 2d1cc8a15c497..430edada41792 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,8 @@ PHP NEWS (Nikita) . Fixed bug #79462 (method_exists and property_exists incoherent behavior). (cmb) + . Fixed bug #79368 ("Unexpected end of file" is not an acceptable error + message). (Alex Dowad) - CURL: . Bumped required libcurl version to 7.29.0. (cmb) diff --git a/Zend/tests/bug60099.phpt b/Zend/tests/bug60099.phpt index a8745fa5221e1..fbb5e85fb73b4 100644 --- a/Zend/tests/bug60099.phpt +++ b/Zend/tests/bug60099.phpt @@ -7,4 +7,4 @@ namespace foo { ?> --EXPECTF-- -Parse error: syntax error, unexpected end of file in %s on line %d +Parse error: Unclosed '{' on line 2 in %s on line %d diff --git a/Zend/tests/eval_parse_error_with_doc_comment.phpt b/Zend/tests/eval_parse_error_with_doc_comment.phpt index 62561aaa7998b..09bc39b83d8c7 100644 --- a/Zend/tests/eval_parse_error_with_doc_comment.phpt +++ b/Zend/tests/eval_parse_error_with_doc_comment.phpt @@ -12,4 +12,4 @@ EOC ?> --EXPECTF-- -Parse error: syntax error, unexpected end of file in %s(%d) : eval()'d code on line %d +Parse error: Unclosed '{' in %s(%d) : eval()'d code on line %d diff --git a/Zend/tests/require_parse_exception.phpt b/Zend/tests/require_parse_exception.phpt index 859589231e81b..d035e296245a5 100644 --- a/Zend/tests/require_parse_exception.phpt +++ b/Zend/tests/require_parse_exception.phpt @@ -43,8 +43,8 @@ var_dump("\u{ffffff}");'); ?> --EXPECT-- Deprecated: Directive 'allow_url_include' is deprecated in Unknown on line 0 -syntax error, unexpected end of file on line 2 -syntax error, unexpected end of file on line 3 +Unclosed '{' on line 2 +Unclosed '{' on line 3 syntax error, unexpected end of file, expecting '(' on line 2 Invalid numeric literal on line 2 Invalid UTF-8 codepoint escape sequence on line 2 diff --git a/Zend/zend_globals.h b/Zend/zend_globals.h index 2dc769a5efe17..b7139fdfd6287 100644 --- a/Zend/zend_globals.h +++ b/Zend/zend_globals.h @@ -285,6 +285,7 @@ struct _zend_php_scanner_globals { int yy_state; zend_stack state_stack; zend_ptr_stack heredoc_label_stack; + zend_stack nest_location_stack; /* for syntax error reporting */ zend_bool heredoc_scan_ahead; int heredoc_indentation; zend_bool heredoc_indentation_uses_spaces; diff --git a/Zend/zend_language_scanner.h b/Zend/zend_language_scanner.h index 4d51a064fc6b1..35eccaf7e631b 100644 --- a/Zend/zend_language_scanner.h +++ b/Zend/zend_language_scanner.h @@ -30,6 +30,7 @@ typedef struct _zend_lex_state { int yy_state; zend_stack state_stack; zend_ptr_stack heredoc_label_stack; + zend_stack nest_location_stack; /* for syntax error reporting */ zend_file_handle *in; uint32_t lineno; @@ -63,6 +64,12 @@ typedef struct _zend_heredoc_label { zend_bool indentation_uses_spaces; } zend_heredoc_label; +/* Track locations of unclosed {, [, (, etc. for better syntax error reporting */ +typedef struct _zend_nest_location { + char text; + int lineno; +} zend_nest_location; + BEGIN_EXTERN_C() ZEND_API void zend_save_lexical_state(zend_lex_state *lex_state); ZEND_API void zend_restore_lexical_state(zend_lex_state *lex_state); diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index 984d73474b205..8a3e88edfc30a 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -192,6 +192,7 @@ void startup_scanner(void) CG(doc_comment) = NULL; CG(extra_fn_flags) = 0; zend_stack_init(&SCNG(state_stack), sizeof(int)); + zend_stack_init(&SCNG(nest_location_stack), sizeof(zend_nest_location)); zend_ptr_stack_init(&SCNG(heredoc_label_stack)); SCNG(heredoc_scan_ahead) = 0; } @@ -205,6 +206,7 @@ void shutdown_scanner(void) CG(parse_error) = 0; RESET_DOC_COMMENT(); zend_stack_destroy(&SCNG(state_stack)); + zend_stack_destroy(&SCNG(nest_location_stack)); zend_ptr_stack_clean(&SCNG(heredoc_label_stack), (void (*)(void *)) &heredoc_label_dtor, 1); zend_ptr_stack_destroy(&SCNG(heredoc_label_stack)); SCNG(heredoc_scan_ahead) = 0; @@ -223,6 +225,9 @@ ZEND_API void zend_save_lexical_state(zend_lex_state *lex_state) lex_state->state_stack = SCNG(state_stack); zend_stack_init(&SCNG(state_stack), sizeof(int)); + lex_state->nest_location_stack = SCNG(nest_location_stack); + zend_stack_init(&SCNG(nest_location_stack), sizeof(zend_nest_location)); + lex_state->heredoc_label_stack = SCNG(heredoc_label_stack); zend_ptr_stack_init(&SCNG(heredoc_label_stack)); @@ -258,6 +263,9 @@ ZEND_API void zend_restore_lexical_state(zend_lex_state *lex_state) zend_stack_destroy(&SCNG(state_stack)); SCNG(state_stack) = lex_state->state_stack; + zend_stack_destroy(&SCNG(nest_location_stack)); + SCNG(nest_location_stack) = lex_state->nest_location_stack; + zend_ptr_stack_clean(&SCNG(heredoc_label_stack), (void (*)(void *)) &heredoc_label_dtor, 1); zend_ptr_stack_destroy(&SCNG(heredoc_label_stack)); SCNG(heredoc_label_stack) = lex_state->heredoc_label_stack; @@ -1250,6 +1258,63 @@ static void copy_heredoc_label_stack(void *void_heredoc_label) zend_ptr_stack_push(&SCNG(heredoc_label_stack), (void *) new_heredoc_label); } +/* Check that { }, [ ], ( ) are nested correctly */ +static void report_bad_nesting(char opening, int opening_lineno, char closing) +{ + char buf[256]; + size_t used = 0; + + used = snprintf(buf, sizeof(buf), "Unclosed '%c'", opening); + + if (opening_lineno != CG(zend_lineno)) { + used += snprintf(buf + used, sizeof(buf) - used, " on line %d", opening_lineno); + } + + if (closing) { /* 'closing' will be 0 if at end of file */ + used += snprintf(buf + used, sizeof(buf) - used, " does not match '%c'", closing); + } + + zend_throw_exception(zend_ce_parse_error, buf, 0); +} + +static void enter_nesting(char opening) +{ + zend_nest_location nest_loc = {opening, CG(zend_lineno)}; + zend_stack_push(&SCNG(nest_location_stack), &nest_loc); +} + +static int exit_nesting(char closing) +{ + if (zend_stack_is_empty(&SCNG(nest_location_stack))) { + zend_throw_exception_ex(zend_ce_parse_error, 0, "Unmatched '%c'", closing); + return -1; + } + + zend_nest_location *nest_loc = zend_stack_top(&SCNG(nest_location_stack)); + char opening = nest_loc->text; + + if ((opening == '{' && closing != '}') || + (opening == '[' && closing != ']') || + (opening == '(' && closing != ')')) { + report_bad_nesting(opening, nest_loc->lineno, closing); + return -1; + } + + zend_stack_del_top(&SCNG(nest_location_stack)); + return 0; +} + +static int check_nesting_at_end() +{ + if (!zend_stack_is_empty(&SCNG(nest_location_stack))) { + zend_nest_location *nest_loc = zend_stack_top(&SCNG(nest_location_stack)); + report_bad_nesting(nest_loc->text, nest_loc->lineno, 0); + return -1; + } + + return 0; +} + #define PARSER_MODE() \ EXPECTED(elem != NULL) @@ -1277,6 +1342,22 @@ static void copy_heredoc_label_stack(void *void_heredoc_label) goto emit_token; \ } while (0) +#define RETURN_EXIT_NESTING_TOKEN(_token) do { \ + if (exit_nesting(_token) && PARSER_MODE()) { \ + RETURN_TOKEN(T_ERROR); \ + } else { \ + RETURN_TOKEN(_token); \ + } \ + } while(0) + +#define RETURN_END_TOKEN do { \ + if (check_nesting_at_end() && PARSER_MODE()) { \ + RETURN_TOKEN(T_ERROR); \ + } else { \ + RETURN_TOKEN(END); \ + } \ + } while (0) + int ZEND_FASTCALL lex_scan(zval *zendlval, zend_parser_stack_elem *elem) { int token; @@ -1297,7 +1378,7 @@ BNUM "0b"[01]+(_[01]+)* LABEL [a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]* WHITESPACE [ \n\r\t]+ TABS_AND_SPACES [ \t]* -TOKENS [;:,.\[\]()|^&+-/*=%!~$<>?@] +TOKENS [;:,.|^&+-/*=%!~$<>?@] ANY_CHAR [^] NEWLINE ("\r"|"\n"|"\r\n") @@ -1770,6 +1851,16 @@ NEWLINE ("\r"|"\n"|"\r\n") RETURN_TOKEN(T_SR); } +"]"|")" { + /* Check that ] and ) match up properly with a preceding [ or ( */ + RETURN_EXIT_NESTING_TOKEN(yytext[0]); +} + +"["|"(" { + enter_nesting(yytext[0]); + RETURN_TOKEN(yytext[0]); +} + {TOKENS} { RETURN_TOKEN(yytext[0]); } @@ -1777,22 +1868,23 @@ NEWLINE ("\r"|"\n"|"\r\n") "{" { yy_push_state(ST_IN_SCRIPTING); + enter_nesting('{'); RETURN_TOKEN('{'); } "${" { yy_push_state(ST_LOOKING_FOR_VARNAME); + enter_nesting('{'); RETURN_TOKEN(T_DOLLAR_OPEN_CURLY_BRACES); } - "}" { RESET_DOC_COMMENT(); if (!zend_stack_is_empty(&SCNG(state_stack))) { yy_pop_state(); } - RETURN_TOKEN('}'); + RETURN_EXIT_NESTING_TOKEN('}'); } @@ -2088,7 +2180,7 @@ string: {ANY_CHAR} { if (YYCURSOR > YYLIMIT) { - RETURN_TOKEN(END); + RETURN_END_TOKEN; } inline_char_handler: @@ -2165,7 +2257,7 @@ inline_char_handler: RETURN_TOKEN(']'); } -{TOKENS}|[{}"`] { +{TOKENS}|[[(){}"`] { /* Only '[' or '-' can be valid, but returning other tokens will allow a more explicit parse error */ RETURN_TOKEN(yytext[0]); } @@ -2569,6 +2661,7 @@ skip_escape_conversion: "{$" { yy_push_state(ST_IN_SCRIPTING); yyless(1); + enter_nesting('{'); RETURN_TOKEN(T_CURLY_OPEN); } @@ -2593,7 +2686,7 @@ skip_escape_conversion: } if (YYCURSOR > YYLIMIT) { - RETURN_TOKEN(END); + RETURN_END_TOKEN; } if (yytext[0] == '\\' && YYCURSOR < YYLIMIT) { YYCURSOR++; @@ -2640,7 +2733,7 @@ double_quotes_scan_done: {ANY_CHAR} { if (YYCURSOR > YYLIMIT) { - RETURN_TOKEN(END); + RETURN_END_TOKEN; } if (yytext[0] == '\\' && YYCURSOR < YYLIMIT) { YYCURSOR++; @@ -2689,7 +2782,7 @@ double_quotes_scan_done: int newline = 0, indentation = 0, spacing = 0; if (YYCURSOR > YYLIMIT) { - RETURN_TOKEN(END); + RETURN_END_TOKEN; } YYCURSOR--; @@ -2813,7 +2906,7 @@ heredoc_scan_done: int newline = 0, indentation = 0, spacing = -1; if (YYCURSOR > YYLIMIT) { - RETURN_TOKEN(END); + RETURN_END_TOKEN; } YYCURSOR--; @@ -2901,7 +2994,7 @@ nowdoc_scan_done: {ANY_CHAR} { if (YYCURSOR > YYLIMIT) { - RETURN_TOKEN(END); + RETURN_END_TOKEN; } RETURN_TOKEN(T_BAD_CHARACTER); diff --git a/ext/tokenizer/tests/token_get_all_variation17.phpt b/ext/tokenizer/tests/token_get_all_variation17.phpt index dcbabccc767b1..da4df47594a16 100644 --- a/ext/tokenizer/tests/token_get_all_variation17.phpt +++ b/ext/tokenizer/tests/token_get_all_variation17.phpt @@ -32,6 +32,7 @@ try { } catch(Exception $e) { echo "caught exception:"; } +} ?>'; $tokens = token_get_all($source); var_dump($tokens); @@ -40,7 +41,7 @@ echo "Done" ?> --EXPECTF-- *** Testing token_get_all() : with exception keywords *** -array(81) { +array(83) { [0]=> array(3) { [0]=> @@ -601,13 +602,25 @@ array(81) { int(14) } [80]=> + string(1) "}" + [81]=> array(3) { [0]=> int(%d) [1]=> - string(2) "?>" + string(1) " +" [2]=> int(15) } + [82]=> + array(3) { + [0]=> + int(%d) + [1]=> + string(2) "?>" + [2]=> + int(16) + } } Done diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c index 222c3e96a3928..364d70bf08f72 100644 --- a/ext/tokenizer/tokenizer.c +++ b/ext/tokenizer/tokenizer.c @@ -392,6 +392,8 @@ static zend_bool tokenize(zval *return_value, zend_string *source, zend_class_en array_init(return_value); while ((token_type = lex_scan(&token, NULL))) { + ZEND_ASSERT(token_type != T_ERROR); + add_token( return_value, token_type, zendtext, zendleng, token_line, token_class, &interned_strings); @@ -408,7 +410,7 @@ static zend_bool tokenize(zval *return_value, zend_string *source, zend_class_en && --need_tokens == 0 ) { /* fetch the rest into a T_INLINE_HTML */ - if (zendcursor != zendlimit) { + if (zendcursor < zendlimit) { add_token( return_value, T_INLINE_HTML, zendcursor, zendlimit - zendcursor, token_line, token_class, &interned_strings); diff --git a/tests/lang/syntax_errors.phpt b/tests/lang/syntax_errors.phpt new file mode 100644 index 0000000000000..1fecb035de76a --- /dev/null +++ b/tests/lang/syntax_errors.phpt @@ -0,0 +1,57 @@ +--TEST-- +Detailed reporting on specific types of syntax errors +--FILE-- + 2", /* unclosed ( */ + "[1, 2,", /* unclosed [ */ + "if(1) { echo 'hello'; ", /* unclosed { */ + "(1 + 2));", /* too many ) */ + "[1, 2]]", /* too many ] */ + "if (1) { } }", /* too many } */ + "(1 + 2];", /* ] doesn't match ( */ + "[1, 2)];", /* ) doesn't match [ */ + "if(1) { echo 'a'; )}", /* ) doesn't match { */ + /* separately test cases where the faulty construct spans multiple lines, + since the error message should refer to the starting line in those cases */ + "if(1 > 2) {\n echo '1';", /* unclosed (, spans multiple lines */ + "[1,\n2,\n3,", /* unclosed [, spans multiple lines */ + "{\n echo '1';\n echo '2';", /* unclosed {, spans multiple lines */ + "(1 +\n 2 +\n 3))", /* too many ), spans multiple lines */ + "[1,\n2,\n3]];", /* too many ], spans multiple lines */ + "if (1)\n {\n }}", /* too many }, spans multiple lines */ + "(1 +\n\n 2])", /* ] doesn't match (, spans multiple lines */ + "[1,\n2,\n3)]", /* ) doesn't match [, spans multiple lines */ + "if(1) {\n echo 'a';\n)}", /* ) doesn't match {, spans multiple lines */ + ]; + +foreach ($badCode as $code) { + try { + eval($code); + } catch (ParseError $e) { + echo $e->getMessage(), "\n"; + } +} + +echo "==DONE==\n"; +?> +--EXPECT-- +Unclosed '(' +Unclosed '[' +Unclosed '{' +Unmatched ')' +Unmatched ']' +Unmatched '}' +Unclosed '(' does not match ']' +Unclosed '[' does not match ')' +Unclosed '{' does not match ')' +Unclosed '{' on line 1 +Unclosed '[' on line 1 +Unclosed '{' on line 1 +Unmatched ')' +Unmatched ']' +Unmatched '}' +Unclosed '(' on line 1 does not match ']' +Unclosed '[' on line 1 does not match ')' +Unclosed '{' on line 1 does not match ')' +==DONE== From c5fb4f0794c6efe06f64d6d462e14357d527b564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Mon, 13 Apr 2020 16:28:55 +0200 Subject: [PATCH 123/338] Generate function entries from stubs for a couple of extensions Migrates ext/standard, ext/tidy, ext/tokenizer, ext/xml, ext/xml_reader, and ext/xml_writer. Closes GH-5381. --- ext/standard/dir.c | 9 +- ext/standard/dir.stub.php | 5 + ext/standard/dir_arginfo.h | 13 + ext/standard/user_filters.c | 9 +- ext/standard/user_filters.stub.php | 17 +- ext/standard/user_filters_arginfo.h | 11 + ext/tidy/php_tidy.h | 10 - ext/tidy/tidy.c | 191 +++------------ ext/tidy/tidy.stub.php | 144 ++++++++--- ext/tidy/tidy_arginfo.h | 163 +++++++++++-- ext/tokenizer/tokenizer.c | 25 +- ext/tokenizer/tokenizer.stub.php | 17 +- ext/tokenizer/tokenizer_arginfo.h | 28 +++ ext/xml/xml.c | 6 +- ext/xml/xml.stub.php | 4 + ext/xml/xml_arginfo.h | 5 + ext/xmlreader/php_xmlreader.c | 88 +++---- ...reader.stub.php => php_xmlreader.stub.php} | 6 +- ext/xmlreader/php_xmlreader_arginfo.h | 139 +++++++++++ ext/xmlreader/xmlreader_arginfo.h | 82 ------- ext/xmlwriter/php_xmlwriter.c | 229 ++++-------------- ...writer.stub.php => php_xmlwriter.stub.php} | 46 +++- ...iter_arginfo.h => php_xmlwriter_arginfo.h} | 140 ++++++++++- 23 files changed, 778 insertions(+), 609 deletions(-) rename ext/xmlreader/{xmlreader.stub.php => php_xmlreader.stub.php} (89%) create mode 100644 ext/xmlreader/php_xmlreader_arginfo.h delete mode 100644 ext/xmlreader/xmlreader_arginfo.h rename ext/xmlwriter/{xmlwriter.stub.php => php_xmlwriter.stub.php} (77%) rename ext/xmlwriter/{xmlwriter_arginfo.h => php_xmlwriter_arginfo.h} (61%) diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 0eaadac3e49a8..0b18c1f146278 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -87,13 +87,6 @@ static zend_class_entry *dir_class_entry_ptr; } \ } -static const zend_function_entry php_dir_class_functions[] = { - PHP_FALIAS(close, closedir, arginfo_class_Directory_close) - PHP_FALIAS(rewind, rewinddir, arginfo_class_Directory_rewind) - PHP_FALIAS(read, readdir, arginfo_class_Directory_read) - PHP_FE_END -}; - static void php_set_default_dir(zend_resource *res) { @@ -119,7 +112,7 @@ PHP_MINIT_FUNCTION(dir) static char dirsep_str[2], pathsep_str[2]; zend_class_entry dir_class_entry; - INIT_CLASS_ENTRY(dir_class_entry, "Directory", php_dir_class_functions); + INIT_CLASS_ENTRY(dir_class_entry, "Directory", class_Directory_methods); dir_class_entry_ptr = zend_register_internal_class(&dir_class_entry); #ifdef ZTS diff --git a/ext/standard/dir.stub.php b/ext/standard/dir.stub.php index 0ffef772856ad..39881f759bf73 100755 --- a/ext/standard/dir.stub.php +++ b/ext/standard/dir.stub.php @@ -1,22 +1,27 @@ ce_flags |= __flags; \ @@ -229,50 +229,6 @@ static PHP_MSHUTDOWN_FUNCTION(tidy); static PHP_RINIT_FUNCTION(tidy); static PHP_MINFO_FUNCTION(tidy); -static PHP_FUNCTION(tidy_getopt); -static PHP_FUNCTION(tidy_parse_string); -static PHP_FUNCTION(tidy_parse_file); -static PHP_FUNCTION(tidy_clean_repair); -static PHP_FUNCTION(tidy_repair_string); -static PHP_FUNCTION(tidy_repair_file); -static PHP_FUNCTION(tidy_diagnose); -static PHP_FUNCTION(tidy_get_output); -static PHP_FUNCTION(tidy_get_error_buffer); -static PHP_FUNCTION(tidy_get_release); -static PHP_FUNCTION(tidy_get_config); -static PHP_FUNCTION(tidy_get_status); -static PHP_FUNCTION(tidy_get_html_ver); -#if HAVE_TIDYOPTGETDOC -static PHP_FUNCTION(tidy_get_opt_doc); -#endif -static PHP_FUNCTION(tidy_is_xhtml); -static PHP_FUNCTION(tidy_is_xml); -static PHP_FUNCTION(tidy_error_count); -static PHP_FUNCTION(tidy_warning_count); -static PHP_FUNCTION(tidy_access_count); -static PHP_FUNCTION(tidy_config_count); - -static PHP_FUNCTION(tidy_get_root); -static PHP_FUNCTION(tidy_get_html); -static PHP_FUNCTION(tidy_get_head); -static PHP_FUNCTION(tidy_get_body); - -static TIDY_DOC_METHOD(__construct); -static TIDY_DOC_METHOD(parseFile); -static TIDY_DOC_METHOD(parseString); - -static TIDY_NODE_METHOD(hasChildren); -static TIDY_NODE_METHOD(hasSiblings); -static TIDY_NODE_METHOD(isComment); -static TIDY_NODE_METHOD(isHtml); -static TIDY_NODE_METHOD(isText); -static TIDY_NODE_METHOD(isJste); -static TIDY_NODE_METHOD(isAsp); -static TIDY_NODE_METHOD(isPhp); -static TIDY_NODE_METHOD(getParent); -static TIDY_NODE_METHOD(__construct); -/* }}} */ - ZEND_DECLARE_MODULE_GLOBALS(tidy) PHP_INI_BEGIN() @@ -280,75 +236,6 @@ STD_PHP_INI_ENTRY("tidy.default_config", "", PHP_INI_SYSTEM, OnUpdateString, STD_PHP_INI_ENTRY("tidy.clean_output", "0", PHP_INI_USER, php_tidy_set_clean_output, clean_output, zend_tidy_globals, tidy_globals) PHP_INI_END() -static const zend_function_entry tidy_functions[] = { - PHP_FE(tidy_getopt, arginfo_tidy_getopt) - PHP_FE(tidy_parse_string, arginfo_tidy_parse_string) - PHP_FE(tidy_parse_file, arginfo_tidy_parse_file) - PHP_FE(tidy_get_output, arginfo_tidy_get_output) - PHP_FE(tidy_get_error_buffer, arginfo_tidy_get_error_buffer) - PHP_FE(tidy_clean_repair, arginfo_tidy_clean_repair) - PHP_FE(tidy_repair_string, arginfo_tidy_repair_string) - PHP_FE(tidy_repair_file, arginfo_tidy_repair_file) - PHP_FE(tidy_diagnose, arginfo_tidy_diagnose) - PHP_FE(tidy_get_release, arginfo_tidy_get_release) - PHP_FE(tidy_get_config, arginfo_tidy_get_config) - PHP_FE(tidy_get_status, arginfo_tidy_get_status) - PHP_FE(tidy_get_html_ver, arginfo_tidy_get_html_ver) - PHP_FE(tidy_is_xhtml, arginfo_tidy_is_xhtml) - PHP_FE(tidy_is_xml, arginfo_tidy_is_xml) - PHP_FE(tidy_error_count, arginfo_tidy_error_count) - PHP_FE(tidy_warning_count, arginfo_tidy_warning_count) - PHP_FE(tidy_access_count, arginfo_tidy_access_count) - PHP_FE(tidy_config_count, arginfo_tidy_config_count) -#if HAVE_TIDYOPTGETDOC - PHP_FE(tidy_get_opt_doc, arginfo_tidy_get_opt_doc) -#endif - PHP_FE(tidy_get_root, arginfo_tidy_get_root) - PHP_FE(tidy_get_head, arginfo_tidy_get_head) - PHP_FE(tidy_get_html, arginfo_tidy_get_html) - PHP_FE(tidy_get_body, arginfo_tidy_get_body) - PHP_FE_END -}; - -static const zend_function_entry tidy_funcs_doc[] = { - TIDY_METHOD_MAP(getOpt, tidy_getopt, arginfo_class_tidy_getOpt) - TIDY_METHOD_MAP(cleanRepair, tidy_clean_repair, arginfo_class_tidy_cleanRepair) - TIDY_DOC_ME(parseFile, arginfo_class_tidy_parseFile) - TIDY_DOC_ME(parseString, arginfo_class_tidy_parseString) - TIDY_METHOD_MAP(repairString, tidy_repair_string, arginfo_class_tidy_repairString) - TIDY_METHOD_MAP(repairFile, tidy_repair_file, arginfo_class_tidy_repairFile) - TIDY_METHOD_MAP(diagnose, tidy_diagnose, arginfo_class_tidy_diagnose) - TIDY_METHOD_MAP(getRelease, tidy_get_release, arginfo_class_tidy_getRelease) - TIDY_METHOD_MAP(getConfig, tidy_get_config, arginfo_class_tidy_getConfig) - TIDY_METHOD_MAP(getStatus, tidy_get_status, arginfo_class_tidy_getStatus) - TIDY_METHOD_MAP(getHtmlVer, tidy_get_html_ver, arginfo_class_tidy_getHtmlVer) -#if HAVE_TIDYOPTGETDOC - TIDY_METHOD_MAP(getOptDoc, tidy_get_opt_doc, arginfo_class_tidy_getOptDoc) -#endif - TIDY_METHOD_MAP(isXhtml, tidy_is_xhtml, arginfo_class_tidy_isXhtml) - TIDY_METHOD_MAP(isXml, tidy_is_xml, arginfo_class_tidy_isXml) - TIDY_METHOD_MAP(root, tidy_get_root, arginfo_class_tidy_root) - TIDY_METHOD_MAP(head, tidy_get_head, arginfo_class_tidy_head) - TIDY_METHOD_MAP(html, tidy_get_html, arginfo_class_tidy_html) - TIDY_METHOD_MAP(body, tidy_get_body, arginfo_class_tidy_body) - TIDY_DOC_ME(__construct, arginfo_class_tidy___construct) - PHP_FE_END -}; - -static const zend_function_entry tidy_funcs_node[] = { - TIDY_NODE_ME(hasChildren, arginfo_class_tidyNode_hasChildren) - TIDY_NODE_ME(hasSiblings, arginfo_class_tidyNode_hasSiblings) - TIDY_NODE_ME(isComment, arginfo_class_tidyNode_isComment) - TIDY_NODE_ME(isHtml, arginfo_class_tidyNode_isHtml) - TIDY_NODE_ME(isText, arginfo_class_tidyNode_isText) - TIDY_NODE_ME(isJste, arginfo_class_tidyNode_isJste) - TIDY_NODE_ME(isAsp, arginfo_class_tidyNode_isAsp) - TIDY_NODE_ME(isPhp, arginfo_class_tidyNode_isPhp) - TIDY_NODE_ME(getParent, arginfo_class_tidyNode_getParent) - TIDY_NODE_PRIVATE_ME(__construct, arginfo_class_tidyNode___construct) - PHP_FE_END -}; - static zend_class_entry *tidy_ce_doc, *tidy_ce_node; static zend_object_handlers tidy_object_handlers_doc; @@ -357,7 +244,7 @@ static zend_object_handlers tidy_object_handlers_node; zend_module_entry tidy_module_entry = { STANDARD_MODULE_HEADER, "tidy", - tidy_functions, + ext_functions, PHP_MINIT(tidy), PHP_MSHUTDOWN(tidy), PHP_RINIT(tidy), @@ -1099,7 +986,7 @@ static int php_tidy_output_handler(void **nothing, php_output_context *output_co /* {{{ proto bool tidy_parse_string(string input [, mixed config_options [, string encoding]]) Parse a document stored in a string */ -static PHP_FUNCTION(tidy_parse_string) +PHP_FUNCTION(tidy_parse_string) { char *enc = NULL; size_t enc_len = 0; @@ -1130,7 +1017,7 @@ static PHP_FUNCTION(tidy_parse_string) /* {{{ proto string tidy_get_error_buffer() Return warnings and errors which occurred parsing the specified document*/ -static PHP_FUNCTION(tidy_get_error_buffer) +PHP_FUNCTION(tidy_get_error_buffer) { TIDY_FETCH_OBJECT; @@ -1144,7 +1031,7 @@ static PHP_FUNCTION(tidy_get_error_buffer) /* {{{ proto string tidy_get_output(tidy tidy) Return a string representing the parsed tidy markup */ -static PHP_FUNCTION(tidy_get_output) +PHP_FUNCTION(tidy_get_output) { TidyBuffer output; TIDY_FETCH_OBJECT; @@ -1159,7 +1046,7 @@ static PHP_FUNCTION(tidy_get_output) /* {{{ proto bool tidy_parse_file(string file [, mixed config_options [, string encoding [, bool use_include_path]]]) Parse markup in file or URI */ -static PHP_FUNCTION(tidy_parse_file) +PHP_FUNCTION(tidy_parse_file) { char *enc = NULL; size_t enc_len = 0; @@ -1200,7 +1087,7 @@ static PHP_FUNCTION(tidy_parse_file) /* {{{ proto bool tidy_clean_repair(tidy tidy) Execute configured cleanup and repair operations on parsed markup */ -static PHP_FUNCTION(tidy_clean_repair) +PHP_FUNCTION(tidy_clean_repair) { TIDY_FETCH_OBJECT; @@ -1215,7 +1102,7 @@ static PHP_FUNCTION(tidy_clean_repair) /* {{{ proto bool tidy_repair_string(string data [, mixed config_file [, string encoding]]) Repair a string using an optionally provided configuration file */ -static PHP_FUNCTION(tidy_repair_string) +PHP_FUNCTION(tidy_repair_string) { php_tidy_quick_repair(INTERNAL_FUNCTION_PARAM_PASSTHRU, FALSE); } @@ -1223,7 +1110,7 @@ static PHP_FUNCTION(tidy_repair_string) /* {{{ proto bool tidy_repair_file(string filename [, mixed config_file [, string encoding [, bool use_include_path]]]) Repair a file using an optionally provided configuration file */ -static PHP_FUNCTION(tidy_repair_file) +PHP_FUNCTION(tidy_repair_file) { php_tidy_quick_repair(INTERNAL_FUNCTION_PARAM_PASSTHRU, TRUE); } @@ -1231,7 +1118,7 @@ static PHP_FUNCTION(tidy_repair_file) /* {{{ proto bool tidy_diagnose() Run configured diagnostics on parsed and repaired markup. */ -static PHP_FUNCTION(tidy_diagnose) +PHP_FUNCTION(tidy_diagnose) { TIDY_FETCH_OBJECT; @@ -1246,7 +1133,7 @@ static PHP_FUNCTION(tidy_diagnose) /* {{{ proto string tidy_get_release() Get release date (version) for Tidy library */ -static PHP_FUNCTION(tidy_get_release) +PHP_FUNCTION(tidy_get_release) { if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); @@ -1264,7 +1151,7 @@ static PHP_FUNCTION(tidy_get_release) #if HAVE_TIDYOPTGETDOC /* {{{ proto string tidy_get_opt_doc(tidy resource, string optname) Returns the documentation for the given option name */ -static PHP_FUNCTION(tidy_get_opt_doc) +PHP_FUNCTION(tidy_get_opt_doc) { PHPTidyObj *obj; char *optval, *optname; @@ -1297,7 +1184,7 @@ static PHP_FUNCTION(tidy_get_opt_doc) /* {{{ proto array tidy_get_config(tidy tidy) Get current Tidy configuration */ -static PHP_FUNCTION(tidy_get_config) +PHP_FUNCTION(tidy_get_config) { TidyIterator itOpt; char *opt_name; @@ -1336,7 +1223,7 @@ static PHP_FUNCTION(tidy_get_config) /* {{{ proto int tidy_get_status(tidy tidy) Get status of specified document. */ -static PHP_FUNCTION(tidy_get_status) +PHP_FUNCTION(tidy_get_status) { TIDY_FETCH_OBJECT; @@ -1346,7 +1233,7 @@ static PHP_FUNCTION(tidy_get_status) /* {{{ proto int tidy_get_html_ver(tidy tidy) Get the Detected HTML version for the specified document. */ -static PHP_FUNCTION(tidy_get_html_ver) +PHP_FUNCTION(tidy_get_html_ver) { TIDY_FETCH_OBJECT; @@ -1356,7 +1243,7 @@ static PHP_FUNCTION(tidy_get_html_ver) /* {{{ proto bool tidy_is_xhtml(tidy tidy) Indicates if the document is a XHTML document. */ -static PHP_FUNCTION(tidy_is_xhtml) +PHP_FUNCTION(tidy_is_xhtml) { TIDY_FETCH_OBJECT; @@ -1366,7 +1253,7 @@ static PHP_FUNCTION(tidy_is_xhtml) /* {{{ proto bool tidy_is_xml(tidy tidy) Indicates if the document is a generic (non HTML/XHTML) XML document. */ -static PHP_FUNCTION(tidy_is_xml) +PHP_FUNCTION(tidy_is_xml) { TIDY_FETCH_OBJECT; @@ -1376,7 +1263,7 @@ static PHP_FUNCTION(tidy_is_xml) /* {{{ proto int tidy_error_count(tidy tidy) Returns the Number of Tidy errors encountered for specified document. */ -static PHP_FUNCTION(tidy_error_count) +PHP_FUNCTION(tidy_error_count) { TIDY_FETCH_OBJECT; @@ -1386,7 +1273,7 @@ static PHP_FUNCTION(tidy_error_count) /* {{{ proto int tidy_warning_count(tidy tidy) Returns the Number of Tidy warnings encountered for specified document. */ -static PHP_FUNCTION(tidy_warning_count) +PHP_FUNCTION(tidy_warning_count) { TIDY_FETCH_OBJECT; @@ -1396,7 +1283,7 @@ static PHP_FUNCTION(tidy_warning_count) /* {{{ proto int tidy_access_count(tidy tidy) Returns the Number of Tidy accessibility warnings encountered for specified document. */ -static PHP_FUNCTION(tidy_access_count) +PHP_FUNCTION(tidy_access_count) { TIDY_FETCH_OBJECT; @@ -1406,7 +1293,7 @@ static PHP_FUNCTION(tidy_access_count) /* {{{ proto int tidy_config_count(tidy tidy) Returns the Number of Tidy configuration errors encountered for specified document. */ -static PHP_FUNCTION(tidy_config_count) +PHP_FUNCTION(tidy_config_count) { TIDY_FETCH_OBJECT; @@ -1416,7 +1303,7 @@ static PHP_FUNCTION(tidy_config_count) /* {{{ proto mixed tidy_getopt(string option) Returns the value of the specified configuration option for the tidy document. */ -static PHP_FUNCTION(tidy_getopt) +PHP_FUNCTION(tidy_getopt) { PHPTidyObj *obj; char *optname; @@ -1466,7 +1353,7 @@ static PHP_FUNCTION(tidy_getopt) } /* }}} */ -static TIDY_DOC_METHOD(__construct) +PHP_METHOD(tidy, __construct) { char *enc = NULL; size_t enc_len = 0; @@ -1503,7 +1390,7 @@ static TIDY_DOC_METHOD(__construct) } } -static TIDY_DOC_METHOD(parseFile) +PHP_METHOD(tidy, parseFile) { char *enc = NULL; size_t enc_len = 0; @@ -1542,7 +1429,7 @@ static TIDY_DOC_METHOD(parseFile) zend_string_release_ex(contents, 0); } -static TIDY_DOC_METHOD(parseString) +PHP_METHOD(tidy, parseString) { char *enc = NULL; size_t enc_len = 0; @@ -1575,7 +1462,7 @@ static TIDY_DOC_METHOD(parseString) /* {{{ proto TidyNode tidy_get_root() Returns a TidyNode Object representing the root of the tidy parse tree */ -static PHP_FUNCTION(tidy_get_root) +PHP_FUNCTION(tidy_get_root) { php_tidy_create_node(INTERNAL_FUNCTION_PARAM_PASSTHRU, is_root_node); } @@ -1583,7 +1470,7 @@ static PHP_FUNCTION(tidy_get_root) /* {{{ proto TidyNode tidy_get_html() Returns a TidyNode Object starting from the tag of the tidy parse tree */ -static PHP_FUNCTION(tidy_get_html) +PHP_FUNCTION(tidy_get_html) { php_tidy_create_node(INTERNAL_FUNCTION_PARAM_PASSTHRU, is_html_node); } @@ -1591,7 +1478,7 @@ static PHP_FUNCTION(tidy_get_html) /* {{{ proto TidyNode tidy_get_head() Returns a TidyNode Object starting from the tag of the tidy parse tree */ -static PHP_FUNCTION(tidy_get_head) +PHP_FUNCTION(tidy_get_head) { php_tidy_create_node(INTERNAL_FUNCTION_PARAM_PASSTHRU, is_head_node); } @@ -1599,7 +1486,7 @@ static PHP_FUNCTION(tidy_get_head) /* {{{ proto TidyNode tidy_get_body(tidy tidy) Returns a TidyNode Object starting from the tag of the tidy parse tree */ -static PHP_FUNCTION(tidy_get_body) +PHP_FUNCTION(tidy_get_body) { php_tidy_create_node(INTERNAL_FUNCTION_PARAM_PASSTHRU, is_body_node); } @@ -1607,7 +1494,7 @@ static PHP_FUNCTION(tidy_get_body) /* {{{ proto bool tidyNode::hasChildren() Returns true if this node has children */ -static TIDY_NODE_METHOD(hasChildren) +PHP_METHOD(tidyNode, hasChildren) { TIDY_FETCH_ONLY_OBJECT; @@ -1621,7 +1508,7 @@ static TIDY_NODE_METHOD(hasChildren) /* {{{ proto bool tidyNode::hasSiblings() Returns true if this node has siblings */ -static TIDY_NODE_METHOD(hasSiblings) +PHP_METHOD(tidyNode, hasSiblings) { TIDY_FETCH_ONLY_OBJECT; @@ -1635,7 +1522,7 @@ static TIDY_NODE_METHOD(hasSiblings) /* {{{ proto bool tidyNode::isComment() Returns true if this node represents a comment */ -static TIDY_NODE_METHOD(isComment) +PHP_METHOD(tidyNode, isComment) { TIDY_FETCH_ONLY_OBJECT; @@ -1649,7 +1536,7 @@ static TIDY_NODE_METHOD(isComment) /* {{{ proto bool tidyNode::isHtml() Returns true if this node is part of a HTML document */ -static TIDY_NODE_METHOD(isHtml) +PHP_METHOD(tidyNode, isHtml) { TIDY_FETCH_ONLY_OBJECT; @@ -1663,7 +1550,7 @@ static TIDY_NODE_METHOD(isHtml) /* {{{ proto bool tidyNode::isText() Returns true if this node represents text (no markup) */ -static TIDY_NODE_METHOD(isText) +PHP_METHOD(tidyNode, isText) { TIDY_FETCH_ONLY_OBJECT; @@ -1677,7 +1564,7 @@ static TIDY_NODE_METHOD(isText) /* {{{ proto bool tidyNode::isJste() Returns true if this node is JSTE */ -static TIDY_NODE_METHOD(isJste) +PHP_METHOD(tidyNode, isJste) { TIDY_FETCH_ONLY_OBJECT; @@ -1691,7 +1578,7 @@ static TIDY_NODE_METHOD(isJste) /* {{{ proto bool tidyNode::isAsp() Returns true if this node is ASP */ -static TIDY_NODE_METHOD(isAsp) +PHP_METHOD(tidyNode, isAsp) { TIDY_FETCH_ONLY_OBJECT; @@ -1705,7 +1592,7 @@ static TIDY_NODE_METHOD(isAsp) /* {{{ proto bool tidyNode::isPhp() Returns true if this node is PHP */ -static TIDY_NODE_METHOD(isPhp) +PHP_METHOD(tidyNode, isPhp) { TIDY_FETCH_ONLY_OBJECT; @@ -1719,7 +1606,7 @@ static TIDY_NODE_METHOD(isPhp) /* {{{ proto tidyNode tidyNode::getParent() Returns the parent node if available or NULL */ -static TIDY_NODE_METHOD(getParent) +PHP_METHOD(tidyNode, getParent) { TidyNode parent_node; PHPTidyObj *newobj; @@ -1743,7 +1630,7 @@ static TIDY_NODE_METHOD(getParent) /* {{{ proto tidyNode::__construct() __constructor for tidyNode. */ -static TIDY_NODE_METHOD(__construct) +PHP_METHOD(tidyNode, __construct) { zend_throw_error(NULL, "You should not create a tidyNode manually"); } diff --git a/ext/tidy/tidy.stub.php b/ext/tidy/tidy.stub.php index 423fecb090244..528fe425c91d8 100644 --- a/ext/tidy/tidy.stub.php +++ b/ext/tidy/tidy.stub.php @@ -1,5 +1,7 @@ create_object = xml_parser_create_object; xml_parser_ce->ce_flags |= ZEND_ACC_FINAL; diff --git a/ext/xml/xml.stub.php b/ext/xml/xml.stub.php index 1c43441b4deb3..9693eeba81623 100644 --- a/ext/xml/xml.stub.php +++ b/ext/xml/xml.stub.php @@ -57,3 +57,7 @@ function xml_parser_free(XmlParser $parser): bool {} function xml_parser_set_option(XmlParser $parser, int $option, $value): bool {} function xml_parser_get_option(XmlParser $parser, int $option): string|int|false {} + +final class XMLParser +{ +} diff --git a/ext/xml/xml_arginfo.h b/ext/xml/xml_arginfo.h index ecd295b55f94f..1e448ac816148 100644 --- a/ext/xml/xml_arginfo.h +++ b/ext/xml/xml_arginfo.h @@ -131,3 +131,8 @@ static const zend_function_entry ext_functions[] = { ZEND_FE(xml_parser_get_option, arginfo_xml_parser_get_option) ZEND_FE_END }; + + +static const zend_function_entry class_XMLParser_methods[] = { + ZEND_FE_END +}; diff --git a/ext/xmlreader/php_xmlreader.c b/ext/xmlreader/php_xmlreader.c index 8ba87763c168c..acb39a7fc973a 100644 --- a/ext/xmlreader/php_xmlreader.c +++ b/ext/xmlreader/php_xmlreader.c @@ -23,13 +23,13 @@ #include "php_ini.h" #include "ext/standard/info.h" #include "php_xmlreader.h" +#include "php_xmlreader_arginfo.h" #ifdef HAVE_DOM #include "ext/dom/xml_common.h" #include "ext/dom/dom_ce.h" #endif #include #include -#include "xmlreader_arginfo.h" zend_class_entry *xmlreader_class_entry; @@ -523,7 +523,7 @@ static void php_xmlreader_set_relaxng_schema(INTERNAL_FUNCTION_PARAMETERS, int t /* {{{ proto bool XMLReader::close() Closes xmlreader - current frees resources until xmlTextReaderClose is fixed in libxml */ -PHP_METHOD(xmlreader, close) +PHP_METHOD(XMLReader, close) { zval *id; xmlreader_object *intern; @@ -545,7 +545,7 @@ PHP_METHOD(xmlreader, close) /* {{{ proto string XMLReader::getAttribute(string name) Get value of an attribute from current element */ -PHP_METHOD(xmlreader, getAttribute) +PHP_METHOD(XMLReader, getAttribute) { php_xmlreader_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextReaderGetAttribute); } @@ -553,7 +553,7 @@ PHP_METHOD(xmlreader, getAttribute) /* {{{ proto string XMLReader::getAttributeNo(int index) Get value of an attribute at index from current element */ -PHP_METHOD(xmlreader, getAttributeNo) +PHP_METHOD(XMLReader, getAttributeNo) { zval *id; zend_long attr_pos; @@ -579,7 +579,7 @@ PHP_METHOD(xmlreader, getAttributeNo) /* {{{ proto string XMLReader::getAttributeNs(string name, string namespaceURI) Get value of a attribute via name and namespace from current element */ -PHP_METHOD(xmlreader, getAttributeNs) +PHP_METHOD(XMLReader, getAttributeNs) { zval *id; size_t name_len = 0, ns_uri_len = 0; @@ -610,7 +610,7 @@ PHP_METHOD(xmlreader, getAttributeNs) /* {{{ proto bool XMLReader::getParserProperty(int property) Indicates whether given property (one of the parser option constants) is set or not on parser */ -PHP_METHOD(xmlreader, getParserProperty) +PHP_METHOD(XMLReader, getParserProperty) { zval *id; zend_long property; @@ -640,7 +640,7 @@ PHP_METHOD(xmlreader, getParserProperty) Returns boolean indicating if parsed document is valid or not. Must set XMLREADER_LOADDTD or XMLREADER_VALIDATE parser option prior to the first call to read or this method will always return FALSE */ -PHP_METHOD(xmlreader, isValid) +PHP_METHOD(XMLReader, isValid) { php_xmlreader_no_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextReaderIsValid); } @@ -648,7 +648,7 @@ PHP_METHOD(xmlreader, isValid) /* {{{ proto string XMLReader::lookupNamespace(string prefix) Return namespaceURI for associated prefix on current node */ -PHP_METHOD(xmlreader, lookupNamespace) +PHP_METHOD(XMLReader, lookupNamespace) { php_xmlreader_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextReaderLookupNamespace); } @@ -656,7 +656,7 @@ PHP_METHOD(xmlreader, lookupNamespace) /* {{{ proto bool XMLReader::moveToAttribute(string name) Positions reader at specified attribute - Returns TRUE on success and FALSE on failure */ -PHP_METHOD(xmlreader, moveToAttribute) +PHP_METHOD(XMLReader, moveToAttribute) { zval *id; size_t name_len = 0; @@ -690,7 +690,7 @@ PHP_METHOD(xmlreader, moveToAttribute) /* {{{ proto bool XMLReader::moveToAttributeNo(int index) Positions reader at attribute at specified index. Returns TRUE on success and FALSE on failure */ -PHP_METHOD(xmlreader, moveToAttributeNo) +PHP_METHOD(XMLReader, moveToAttributeNo) { zval *id; zend_long attr_pos; @@ -718,7 +718,7 @@ PHP_METHOD(xmlreader, moveToAttributeNo) /* {{{ proto bool XMLReader::moveToAttributeNs(string name, string namespaceURI) Positions reader at attribute spcified by name and namespaceURI. Returns TRUE on success and FALSE on failure */ -PHP_METHOD(xmlreader, moveToAttributeNs) +PHP_METHOD(XMLReader, moveToAttributeNs) { zval *id; size_t name_len=0, ns_uri_len=0; @@ -751,7 +751,7 @@ PHP_METHOD(xmlreader, moveToAttributeNs) /* {{{ proto bool XMLReader::moveToElement() Moves the position of the current instance to the node that contains the current Attribute node. */ -PHP_METHOD(xmlreader, moveToElement) +PHP_METHOD(XMLReader, moveToElement) { php_xmlreader_no_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextReaderMoveToElement); } @@ -759,7 +759,7 @@ PHP_METHOD(xmlreader, moveToElement) /* {{{ proto bool XMLReader::moveToFirstAttribute() Moves the position of the current instance to the first attribute associated with the current node. */ -PHP_METHOD(xmlreader, moveToFirstAttribute) +PHP_METHOD(XMLReader, moveToFirstAttribute) { php_xmlreader_no_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextReaderMoveToFirstAttribute); } @@ -767,7 +767,7 @@ PHP_METHOD(xmlreader, moveToFirstAttribute) /* {{{ proto bool XMLReader::moveToNextAttribute() Moves the position of the current instance to the next attribute associated with the current node. */ -PHP_METHOD(xmlreader, moveToNextAttribute) +PHP_METHOD(XMLReader, moveToNextAttribute) { php_xmlreader_no_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextReaderMoveToNextAttribute); } @@ -775,7 +775,7 @@ PHP_METHOD(xmlreader, moveToNextAttribute) /* {{{ proto bool XMLReader::read() Moves the position of the current instance to the next node in the stream. */ -PHP_METHOD(xmlreader, read) +PHP_METHOD(XMLReader, read) { zval *id; int retval; @@ -803,7 +803,7 @@ PHP_METHOD(xmlreader, read) /* {{{ proto bool XMLReader::next([string localname]) Moves the position of the current instance to the next node in the stream. */ -PHP_METHOD(xmlreader, next) +PHP_METHOD(XMLReader, next) { zval *id; int retval; @@ -839,7 +839,7 @@ PHP_METHOD(xmlreader, next) /* {{{ proto bool XMLReader::open(string URI [, string encoding [, int options]]) Sets the URI that the XMLReader will parse. */ -PHP_METHOD(xmlreader, open) +PHP_METHOD(XMLReader, open) { zval *id; size_t source_len = 0, encoding_len = 0; @@ -895,7 +895,7 @@ PHP_METHOD(xmlreader, open) /* }}} */ /* Not Yet Implemented in libxml - functions exist just not coded -PHP_METHOD(xmlreader, resetState) +PHP_METHOD(XMLReader, resetState) { } @@ -903,7 +903,7 @@ PHP_METHOD(xmlreader, resetState) /* {{{ proto string XMLReader::readInnerXml() Reads the contents of the current node, including child nodes and markup. */ -PHP_METHOD(xmlreader, readInnerXml) +PHP_METHOD(XMLReader, readInnerXml) { php_xmlreader_no_arg_string(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextReaderReadInnerXml); } @@ -911,7 +911,7 @@ PHP_METHOD(xmlreader, readInnerXml) /* {{{ proto bool XMLReader::readOuterXml() Reads the contents of the current node, including child nodes and markup. */ -PHP_METHOD(xmlreader, readOuterXml) +PHP_METHOD(XMLReader, readOuterXml) { php_xmlreader_no_arg_string(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextReaderReadOuterXml); } @@ -919,7 +919,7 @@ PHP_METHOD(xmlreader, readOuterXml) /* {{{ proto bool XMLReader::readString() Reads the contents of an element or a text node as a string. */ -PHP_METHOD(xmlreader, readString) +PHP_METHOD(XMLReader, readString) { php_xmlreader_no_arg_string(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextReaderReadString); } @@ -927,7 +927,7 @@ PHP_METHOD(xmlreader, readString) /* {{{ proto bool XMLReader::setSchema(string filename) Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). */ -PHP_METHOD(xmlreader, setSchema) +PHP_METHOD(XMLReader, setSchema) { #ifdef LIBXML_SCHEMAS_ENABLED zval *id; @@ -970,7 +970,7 @@ PHP_METHOD(xmlreader, setSchema) /* {{{ proto bool XMLReader::setParserProperty(int property, bool value) Sets parser property (one of the parser option constants). Properties must be set after open() or XML() and before the first read() is called */ -PHP_METHOD(xmlreader, setParserProperty) +PHP_METHOD(XMLReader, setParserProperty) { zval *id; zend_long property; @@ -999,7 +999,7 @@ PHP_METHOD(xmlreader, setParserProperty) /* {{{ proto bool XMLReader::setRelaxNGSchema(string filename) Sets the string that the XMLReader will parse. */ -PHP_METHOD(xmlreader, setRelaxNGSchema) +PHP_METHOD(XMLReader, setRelaxNGSchema) { php_xmlreader_set_relaxng_schema(INTERNAL_FUNCTION_PARAM_PASSTHRU, XMLREADER_LOAD_FILE); } @@ -1007,7 +1007,7 @@ PHP_METHOD(xmlreader, setRelaxNGSchema) /* {{{ proto bool XMLReader::setRelaxNGSchemaSource(string source) Sets the string that the XMLReader will parse. */ -PHP_METHOD(xmlreader, setRelaxNGSchemaSource) +PHP_METHOD(XMLReader, setRelaxNGSchemaSource) { php_xmlreader_set_relaxng_schema(INTERNAL_FUNCTION_PARAM_PASSTHRU, XMLREADER_LOAD_STRING); } @@ -1021,7 +1021,7 @@ XMLPUBFUN int XMLCALL /* {{{ proto bool XMLReader::XML(string source [, string encoding [, int options]]) Sets the string that the XMLReader will parse. */ -PHP_METHOD(xmlreader, XML) +PHP_METHOD(XMLReader, XML) { zval *id; size_t source_len = 0, encoding_len = 0; @@ -1105,7 +1105,7 @@ PHP_METHOD(xmlreader, XML) /* {{{ proto bool XMLReader::expand() Moves the position of the current instance to the next node in the stream. */ -PHP_METHOD(xmlreader, expand) +PHP_METHOD(XMLReader, expand) { #ifdef HAVE_DOM zval *id, *basenode = NULL; @@ -1153,38 +1153,6 @@ PHP_METHOD(xmlreader, expand) } /* }}} */ -static const zend_function_entry xmlreader_functions[] /* {{{ */ = { - PHP_ME(xmlreader, close, arginfo_class_XMLReader_close, ZEND_ACC_PUBLIC) - PHP_ME(xmlreader, getAttribute, arginfo_class_XMLReader_getAttribute, ZEND_ACC_PUBLIC) - PHP_ME(xmlreader, getAttributeNo, arginfo_class_XMLReader_getAttributeNo, ZEND_ACC_PUBLIC) - PHP_ME(xmlreader, getAttributeNs, arginfo_class_XMLReader_getAttributeNs, ZEND_ACC_PUBLIC) - PHP_ME(xmlreader, getParserProperty, arginfo_class_XMLReader_getParserProperty, ZEND_ACC_PUBLIC) - PHP_ME(xmlreader, isValid, arginfo_class_XMLReader_isValid, ZEND_ACC_PUBLIC) - PHP_ME(xmlreader, lookupNamespace, arginfo_class_XMLReader_lookupNamespace, ZEND_ACC_PUBLIC) - PHP_ME(xmlreader, moveToAttributeNo, arginfo_class_XMLReader_moveToAttributeNo, ZEND_ACC_PUBLIC) - PHP_ME(xmlreader, moveToAttribute, arginfo_class_XMLReader_moveToAttribute, ZEND_ACC_PUBLIC) - PHP_ME(xmlreader, moveToAttributeNs, arginfo_class_XMLReader_moveToAttributeNs, ZEND_ACC_PUBLIC) - PHP_ME(xmlreader, moveToElement, arginfo_class_XMLReader_moveToElement, ZEND_ACC_PUBLIC) - PHP_ME(xmlreader, moveToFirstAttribute, arginfo_class_XMLReader_moveToFirstAttribute, ZEND_ACC_PUBLIC) - PHP_ME(xmlreader, moveToNextAttribute, arginfo_class_XMLReader_moveToNextAttribute, ZEND_ACC_PUBLIC) - PHP_ME(xmlreader, open, arginfo_class_XMLReader_open, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME(xmlreader, read, arginfo_class_XMLReader_read, ZEND_ACC_PUBLIC) - PHP_ME(xmlreader, next, arginfo_class_XMLReader_next, ZEND_ACC_PUBLIC) - PHP_ME(xmlreader, readInnerXml, arginfo_class_XMLReader_readInnerXml, ZEND_ACC_PUBLIC) - PHP_ME(xmlreader, readOuterXml, arginfo_class_XMLReader_readOuterXml, ZEND_ACC_PUBLIC) - PHP_ME(xmlreader, readString, arginfo_class_XMLReader_readString, ZEND_ACC_PUBLIC) - PHP_ME(xmlreader, setSchema, arginfo_class_XMLReader_setSchema, ZEND_ACC_PUBLIC) -/* Not Yet Implemented though defined in libxml as of 2.6.9dev - PHP_ME(xmlreader, resetState, NULL, ZEND_ACC_PUBLIC) -*/ - PHP_ME(xmlreader, setParserProperty, arginfo_class_XMLReader_setParserProperty, ZEND_ACC_PUBLIC) - PHP_ME(xmlreader, setRelaxNGSchema, arginfo_class_XMLReader_setRelaxNGSchema, ZEND_ACC_PUBLIC) - PHP_ME(xmlreader, setRelaxNGSchemaSource, arginfo_class_XMLReader_setRelaxNGSchemaSource, ZEND_ACC_PUBLIC) - PHP_ME(xmlreader, XML, arginfo_class_XMLReader_XML, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME(xmlreader, expand, arginfo_class_XMLReader_expand, ZEND_ACC_PUBLIC) - PHP_FE_END -}; /* }}} */ - /* {{{ PHP_MINIT_FUNCTION */ PHP_MINIT_FUNCTION(xmlreader) @@ -1202,7 +1170,7 @@ PHP_MINIT_FUNCTION(xmlreader) xmlreader_object_handlers.get_method = xmlreader_get_method; xmlreader_object_handlers.clone_obj = NULL; - INIT_CLASS_ENTRY(ce, "XMLReader", xmlreader_functions); + INIT_CLASS_ENTRY(ce, "XMLReader", class_XMLReader_methods); ce.create_object = xmlreader_objects_new; xmlreader_class_entry = zend_register_internal_class(&ce); diff --git a/ext/xmlreader/xmlreader.stub.php b/ext/xmlreader/php_xmlreader.stub.php similarity index 89% rename from ext/xmlreader/xmlreader.stub.php rename to ext/xmlreader/php_xmlreader.stub.php index 5cc08651fae4d..cbf7bb1beec45 100644 --- a/ext/xmlreader/xmlreader.stub.php +++ b/ext/xmlreader/php_xmlreader.stub.php @@ -1,5 +1,7 @@ Date: Sun, 12 Apr 2020 18:50:41 +0200 Subject: [PATCH 124/338] Generate method entries from stubs for curl, ffi, pdo, phar Closes GH-5375 --- ext/curl/curl_file.c | 12 +- ext/curl/curl_file.stub.php | 2 + ext/curl/curl_file_arginfo.h | 19 +++ ext/ffi/ffi.c | 23 +--- ext/ffi/ffi.stub.php | 2 + ext/ffi/ffi_arginfo.h | 41 ++++++ ext/pdo/pdo_dbh.c | 52 +++----- ext/pdo/pdo_dbh.stub.php | 3 + ext/pdo/pdo_dbh_arginfo.h | 37 ++++++ ext/pdo/pdo_stmt.c | 68 ++++------ ext/pdo/pdo_stmt.stub.php | 6 + ext/pdo/pdo_stmt_arginfo.h | 50 ++++++++ ext/phar/phar_object.c | 154 +---------------------- ext/phar/phar_object.stub.php | 194 ++++++++++++++++++++++++----- ext/phar/phar_object_arginfo.h | 220 +++++++++++++++++++++++++++++++++ 15 files changed, 584 insertions(+), 299 deletions(-) diff --git a/ext/curl/curl_file.c b/ext/curl/curl_file.c index e034babd0fead..3f4fe03fa42ad 100644 --- a/ext/curl/curl_file.c +++ b/ext/curl/curl_file.c @@ -128,20 +128,10 @@ ZEND_METHOD(CURLFile, setPostFilename) } /* }}} */ -static const zend_function_entry curlfile_funcs[] = { - PHP_ME(CURLFile, __construct, arginfo_class_CURLFile___construct, ZEND_ACC_PUBLIC) - PHP_ME(CURLFile, getFilename, arginfo_class_CURLFile_getFilename, ZEND_ACC_PUBLIC) - PHP_ME(CURLFile, getMimeType, arginfo_class_CURLFile_getMimeType, ZEND_ACC_PUBLIC) - PHP_ME(CURLFile, setMimeType, arginfo_class_CURLFile_setMimeType, ZEND_ACC_PUBLIC) - PHP_ME(CURLFile, getPostFilename, arginfo_class_CURLFile_getPostFilename, ZEND_ACC_PUBLIC) - PHP_ME(CURLFile, setPostFilename, arginfo_class_CURLFile_setPostFilename, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - void curlfile_register_class(void) { zend_class_entry ce; - INIT_CLASS_ENTRY( ce, "CURLFile", curlfile_funcs ); + INIT_CLASS_ENTRY( ce, "CURLFile", class_CURLFile_methods ); curl_CURLFile_class = zend_register_internal_class(&ce); curl_CURLFile_class->serialize = zend_class_serialize_deny; curl_CURLFile_class->unserialize = zend_class_unserialize_deny; diff --git a/ext/curl/curl_file.stub.php b/ext/curl/curl_file.stub.php index e1b289bd975aa..8b3f46d259fdb 100644 --- a/ext/curl/curl_file.stub.php +++ b/ext/curl/curl_file.stub.php @@ -1,5 +1,7 @@ ce_flags |= ZEND_ACC_FINAL; - INIT_CLASS_ENTRY(ce, "FFI", zend_ffi_functions); + INIT_CLASS_ENTRY(ce, "FFI", class_FFI_methods); zend_ffi_ce = zend_register_internal_class(&ce); zend_ffi_ce->ce_flags |= ZEND_ACC_FINAL; zend_ffi_ce->create_object = zend_ffi_new; diff --git a/ext/ffi/ffi.stub.php b/ext/ffi/ffi.stub.php index 384a89ad08197..4d3100579e935 100644 --- a/ext/ffi/ffi.stub.php +++ b/ext/ffi/ffi.stub.php @@ -1,5 +1,7 @@ common.function_name) { @@ -1316,7 +1296,7 @@ void pdo_dbh_init(void) { zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "PDO", pdo_dbh_functions); + INIT_CLASS_ENTRY(ce, "PDO", class_PDO_methods); pdo_dbh_ce = zend_register_internal_class(&ce); pdo_dbh_ce->create_object = pdo_dbh_new; pdo_dbh_ce->serialize = zend_class_serialize_deny; diff --git a/ext/pdo/pdo_dbh.stub.php b/ext/pdo/pdo_dbh.stub.php index 01a3b2b09aa58..a743fb3a20a6a 100644 --- a/ext/pdo/pdo_dbh.stub.php +++ b/ext/pdo/pdo_dbh.stub.php @@ -1,7 +1,10 @@ get_iterator = pdo_stmt_iter_get; pdo_dbstmt_ce->create_object = pdo_dbstmt_new; @@ -2629,7 +2603,7 @@ void pdo_stmt_init(void) pdo_dbstmt_object_handlers.compare = dbstmt_compare; pdo_dbstmt_object_handlers.clone_obj = NULL; - INIT_CLASS_ENTRY(ce, "PDORow", pdo_row_functions); + INIT_CLASS_ENTRY(ce, "PDORow", class_PDORow_methods); pdo_row_ce = zend_register_internal_class(&ce); pdo_row_ce->ce_flags |= ZEND_ACC_FINAL; /* when removing this a lot of handlers need to be redone */ pdo_row_ce->create_object = pdo_row_new; diff --git a/ext/pdo/pdo_stmt.stub.php b/ext/pdo/pdo_stmt.stub.php index 57d302fef48aa..fe87ffc40daa3 100644 --- a/ext/pdo/pdo_stmt.stub.php +++ b/ext/pdo/pdo_stmt.stub.php @@ -1,5 +1,7 @@ Date: Tue, 14 Apr 2020 11:32:33 +0200 Subject: [PATCH 125/338] Remove PDO::dbh_constructor() --- ext/pdo/pdo_dbh.c | 5 ++--- ext/pdo/pdo_dbh.stub.php | 1 - ext/pdo/pdo_dbh_arginfo.h | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index 56940395936a9..4ff5da3e13b04 100644 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -190,9 +190,8 @@ static char *dsn_from_uri(char *uri, char *buf, size_t buflen) /* {{{ */ } /* }}} */ -/* {{{ proto PDO::__construct(string dsn[, string username[, string passwd [, array options]]]) - */ -PHP_METHOD(PDO, dbh_constructor) +/* {{{ proto PDO::__construct(string dsn[, string username[, string passwd [, array options]]]) */ +PHP_METHOD(PDO, __construct) { zval *object = ZEND_THIS; pdo_dbh_t *dbh = NULL; diff --git a/ext/pdo/pdo_dbh.stub.php b/ext/pdo/pdo_dbh.stub.php index a743fb3a20a6a..e0ecf122ffc55 100644 --- a/ext/pdo/pdo_dbh.stub.php +++ b/ext/pdo/pdo_dbh.stub.php @@ -4,7 +4,6 @@ class PDO { - /** @alias PDO::dbh_constructor */ public function __construct(string $dsn, ?string $username = null, ?string $passwd = null, ?array $options = null) {} /** @return bool */ diff --git a/ext/pdo/pdo_dbh_arginfo.h b/ext/pdo/pdo_dbh_arginfo.h index e82bf0c18ece3..1f9e7c33f4a87 100644 --- a/ext/pdo/pdo_dbh_arginfo.h +++ b/ext/pdo/pdo_dbh_arginfo.h @@ -52,7 +52,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDO_setAttribute, 0, 0, 2) ZEND_END_ARG_INFO() -ZEND_METHOD(PDO, dbh_constructor); +ZEND_METHOD(PDO, __construct); ZEND_METHOD(PDO, beginTransaction); ZEND_METHOD(PDO, commit); ZEND_METHOD(PDO, errorCode); @@ -70,7 +70,7 @@ ZEND_METHOD(PDO, setAttribute); static const zend_function_entry class_PDO_methods[] = { - ZEND_MALIAS(PDO, __construct, dbh_constructor, arginfo_class_PDO___construct, ZEND_ACC_PUBLIC) + ZEND_ME(PDO, __construct, arginfo_class_PDO___construct, ZEND_ACC_PUBLIC) ZEND_ME(PDO, beginTransaction, arginfo_class_PDO_beginTransaction, ZEND_ACC_PUBLIC) ZEND_ME(PDO, commit, arginfo_class_PDO_commit, ZEND_ACC_PUBLIC) ZEND_ME(PDO, errorCode, arginfo_class_PDO_errorCode, ZEND_ACC_PUBLIC) From 95eaccd0bb901495323c36282d4e783556be1964 Mon Sep 17 00:00:00 2001 From: dinosaur Date: Tue, 14 Apr 2020 07:46:34 +0800 Subject: [PATCH 126/338] Fixed bug #79468 Close the stream filter resources when removing them from the stream. --- NEWS | 4 ++++ ext/standard/tests/filters/bug79468.phpt | 21 +++++++++++++++++++++ main/streams/streams.c | 6 ++++++ 3 files changed, 31 insertions(+) create mode 100644 ext/standard/tests/filters/bug79468.phpt diff --git a/NEWS b/NEWS index 9ebfbf1627324..95e520e32ac8a 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,10 @@ PHP NEWS . Fixed bug #79441 (Segfault in mb_chr() if internal encoding is unsupported). (Girgias) +- Standard: + . Fixed bug #79468 (SIGSEGV when closing stream handle with a stream filter + appended). (dinosaur) + 16 Apr 2020, PHP 7.3.17 - Core: diff --git a/ext/standard/tests/filters/bug79468.phpt b/ext/standard/tests/filters/bug79468.phpt new file mode 100644 index 0000000000000..60a848ec016d4 --- /dev/null +++ b/ext/standard/tests/filters/bug79468.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #79468 SIGSEGV when closing stream handle with a stream filter appended +--SKIPIF-- + +--FILE-- +getMessage()); +} +?> +--EXPECTF-- +Warning: stream_filter_remove(): Invalid resource given, not a stream filter in %s on line %d diff --git a/main/streams/streams.c b/main/streams/streams.c index 5daf4fe83decf..fb9c68007398e 100644 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -476,9 +476,15 @@ fprintf(stderr, "stream_free: %s:%p[%s] preserve_handle=%d release_cast=%d remov if (close_options & PHP_STREAM_FREE_RELEASE_STREAM) { while (stream->readfilters.head) { + if (stream->readfilters.head->res != NULL) { + zend_list_close(stream->readfilters.head->res); + } php_stream_filter_remove(stream->readfilters.head, 1); } while (stream->writefilters.head) { + if (stream->writefilters.head->res != NULL) { + zend_list_close(stream->writefilters.head->res); + } php_stream_filter_remove(stream->writefilters.head, 1); } From ae1364c35006bfcd0d7feeecddb7499000eba1b5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 14 Apr 2020 12:52:24 +0200 Subject: [PATCH 127/338] Increase timeout on ubsan/asan job This one occasionally runs for more than 2:30 hours. --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b59550766d4cc..4dec0f4027745 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -69,7 +69,7 @@ jobs: CFLAGS='-fsanitize=undefined,address -DZEND_TRACK_ARENA_ALLOC' LDFLAGS='-fsanitize=undefined,address' runTestsParameters: --asan - timeoutInMinutes: 150 + timeoutInMinutes: 180 - template: azure/msan_job.yml parameters: configurationName: DEBUG_ZTS_MSAN From f00bcfbb7dfe759ffab5abd05e3171fdeeb2f02e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sun, 12 Apr 2020 14:03:43 +0200 Subject: [PATCH 128/338] Generate method entries for ext/intl Closes GH-5370 --- ext/intl/breakiterator/breakiterator.stub.php | 2 + .../breakiterator/breakiterator_arginfo.h | 78 ++++ .../breakiterator/breakiterator_class.cpp | 60 +-- .../breakiterator/breakiterator_iterators.cpp | 7 +- .../breakiterator/breakiterator_methods.cpp | 42 +- .../breakiterator/breakiterator_methods.h | 62 --- .../breakiterator/codepointiterator_methods.h | 22 - .../rulebasedbreakiterator_methods.h | 30 -- ext/intl/calendar/calendar.stub.php | 230 ++++++++--- ext/intl/calendar/calendar_arginfo.h | 114 +++++- ext/intl/calendar/calendar_class.cpp | 74 +--- ext/intl/calendar/calendar_methods.h | 112 ----- ext/intl/calendar/gregoriancalendar_methods.h | 30 -- ext/intl/collator/collator.stub.php | 67 ++- ext/intl/collator/collator_arginfo.h | 35 ++ ext/intl/collator/collator_attr.c | 1 - ext/intl/collator/collator_attr.h | 26 -- ext/intl/collator/collator_class.c | 30 +- ext/intl/collator/collator_compare.c | 1 - ext/intl/collator/collator_compare.h | 23 -- ext/intl/collator/collator_create.c | 1 - ext/intl/collator/collator_create.h | 25 -- ext/intl/collator/collator_error.c | 1 - ext/intl/collator/collator_error.h | 24 -- ext/intl/collator/collator_locale.c | 1 - ext/intl/collator/collator_locale.h | 23 -- ext/intl/collator/collator_sort.h | 5 - ext/intl/common/common.stub.php | 2 + ext/intl/common/common_arginfo.h | 17 + ext/intl/common/common_enum.cpp | 22 +- ext/intl/common/common_error.h | 5 - ext/intl/converter/converter.c | 77 +--- ext/intl/converter/converter.stub.php | 2 + ext/intl/converter/converter_arginfo.h | 45 ++ ext/intl/dateformat/dateformat.h | 4 - ext/intl/dateformat/dateformat.stub.php | 84 +++- ext/intl/dateformat/dateformat_arginfo.h | 49 +++ ext/intl/dateformat/dateformat_attr.c | 1 - ext/intl/dateformat/dateformat_attr.h | 28 -- ext/intl/dateformat/dateformat_attrcpp.cpp | 1 - ext/intl/dateformat/dateformat_attrcpp.h | 30 -- ext/intl/dateformat/dateformat_class.c | 36 +- ext/intl/dateformat/dateformat_create.h | 2 - ext/intl/dateformat/dateformat_format.c | 1 - ext/intl/dateformat/dateformat_format.h | 22 - .../dateformat/dateformat_format_object.h | 17 - ext/intl/dateformat/dateformat_parse.c | 1 - ext/intl/dateformat/dateformat_parse.h | 22 - ext/intl/formatter/formatter.stub.php | 78 +++- ext/intl/formatter/formatter_arginfo.h | 41 ++ ext/intl/formatter/formatter_attr.c | 1 - ext/intl/formatter/formatter_attr.h | 30 -- ext/intl/formatter/formatter_class.c | 30 +- ext/intl/formatter/formatter_format.h | 3 - ext/intl/formatter/formatter_main.h | 25 -- ext/intl/formatter/formatter_parse.c | 1 - ext/intl/formatter/formatter_parse.h | 23 -- ext/intl/grapheme/grapheme.h | 10 - ext/intl/idn/idn.h | 3 - ext/intl/locale/locale.stub.php | 92 ++++- ext/intl/locale/locale_arginfo.h | 43 ++ ext/intl/locale/locale_class.c | 30 +- ext/intl/locale/locale_methods.c | 1 - ext/intl/locale/locale_methods.h | 45 -- ext/intl/msgformat/msgformat.h | 25 -- ext/intl/msgformat/msgformat.stub.php | 52 ++- ext/intl/msgformat/msgformat_arginfo.h | 29 ++ ext/intl/msgformat/msgformat_attr.c | 1 - ext/intl/msgformat/msgformat_attr.h | 24 -- ext/intl/msgformat/msgformat_class.c | 25 +- ext/intl/msgformat/msgformat_format.c | 1 - ext/intl/msgformat/msgformat_format.h | 23 -- ext/intl/msgformat/msgformat_helpers.cpp | 1 - ext/intl/msgformat/msgformat_parse.c | 1 - ext/intl/msgformat/msgformat_parse.h | 23 -- ext/intl/normalizer/normalizer.stub.php | 17 +- ext/intl/normalizer/normalizer_arginfo.h | 17 + ext/intl/normalizer/normalizer_class.c | 17 +- ext/intl/normalizer/normalizer_normalize.c | 1 - ext/intl/normalizer/normalizer_normalize.h | 26 -- ext/intl/php_intl.c | 245 +---------- ext/intl/php_intl.stub.php | 4 +- ext/intl/php_intl_arginfo.h | 383 +++++++++++++++++- .../resourcebundle/resourcebundle.stub.php | 28 +- .../resourcebundle/resourcebundle_arginfo.h | 21 + .../resourcebundle/resourcebundle_class.c | 17 +- .../resourcebundle/resourcebundle_class.h | 7 - ext/intl/spoofchecker/spoofchecker.stub.php | 2 + ext/intl/spoofchecker/spoofchecker_arginfo.h | 23 ++ ext/intl/spoofchecker/spoofchecker_class.c | 17 +- ext/intl/spoofchecker/spoofchecker_class.h | 1 - ext/intl/spoofchecker/spoofchecker_create.c | 1 - ext/intl/spoofchecker/spoofchecker_create.h | 22 - ext/intl/spoofchecker/spoofchecker_main.h | 28 -- ext/intl/timezone/timezone.stub.php | 118 ++++-- ext/intl/timezone/timezone_arginfo.h | 65 +++ ext/intl/timezone/timezone_class.cpp | 39 +- ext/intl/timezone/timezone_methods.h | 71 ---- .../transliterator/transliterator.stub.php | 37 +- .../transliterator/transliterator_arginfo.h | 23 ++ .../transliterator/transliterator_class.c | 19 +- .../transliterator/transliterator_methods.c | 1 - .../transliterator/transliterator_methods.h | 36 -- ext/intl/uchar/uchar.c | 69 +--- ext/intl/uchar/uchar.stub.php | 2 + ext/intl/uchar/uchar_arginfo.h | 129 ++++++ 106 files changed, 1829 insertions(+), 1912 deletions(-) delete mode 100644 ext/intl/breakiterator/breakiterator_methods.h delete mode 100644 ext/intl/breakiterator/codepointiterator_methods.h delete mode 100644 ext/intl/breakiterator/rulebasedbreakiterator_methods.h delete mode 100644 ext/intl/calendar/calendar_methods.h delete mode 100644 ext/intl/calendar/gregoriancalendar_methods.h delete mode 100644 ext/intl/collator/collator_attr.h delete mode 100644 ext/intl/collator/collator_compare.h delete mode 100644 ext/intl/collator/collator_create.h delete mode 100644 ext/intl/collator/collator_error.h delete mode 100644 ext/intl/collator/collator_locale.h delete mode 100644 ext/intl/dateformat/dateformat_attr.h delete mode 100644 ext/intl/dateformat/dateformat_attrcpp.h delete mode 100644 ext/intl/dateformat/dateformat_format.h delete mode 100644 ext/intl/dateformat/dateformat_format_object.h delete mode 100644 ext/intl/dateformat/dateformat_parse.h delete mode 100644 ext/intl/formatter/formatter_attr.h delete mode 100644 ext/intl/formatter/formatter_main.h delete mode 100644 ext/intl/formatter/formatter_parse.h delete mode 100644 ext/intl/locale/locale_methods.h delete mode 100644 ext/intl/msgformat/msgformat.h delete mode 100644 ext/intl/msgformat/msgformat_attr.h delete mode 100644 ext/intl/msgformat/msgformat_format.h delete mode 100644 ext/intl/msgformat/msgformat_parse.h delete mode 100644 ext/intl/normalizer/normalizer_normalize.h delete mode 100644 ext/intl/spoofchecker/spoofchecker_create.h delete mode 100644 ext/intl/spoofchecker/spoofchecker_main.h delete mode 100644 ext/intl/timezone/timezone_methods.h delete mode 100644 ext/intl/transliterator/transliterator_methods.h diff --git a/ext/intl/breakiterator/breakiterator.stub.php b/ext/intl/breakiterator/breakiterator.stub.php index 663932d64e46e..fc26215f7d230 100644 --- a/ext/intl/breakiterator/breakiterator.stub.php +++ b/ext/intl/breakiterator/breakiterator.stub.php @@ -1,5 +1,7 @@ #include #include @@ -218,57 +215,6 @@ static zend_object *BreakIterator_object_create(zend_class_entry *ce) } /* }}} */ -/* {{{ BreakIterator_class_functions - * Every 'IntlBreakIterator' class method has an entry in this table - */ -static const zend_function_entry BreakIterator_class_functions[] = { - PHP_ME(BreakIterator, __construct, arginfo_class_IntlBreakIterator___construct, ZEND_ACC_PRIVATE) - PHP_ME(BreakIterator, createWordInstance, arginfo_class_IntlBreakIterator_createWordInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC) - PHP_ME(BreakIterator, createLineInstance, arginfo_class_IntlBreakIterator_createLineInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC) - PHP_ME(BreakIterator, createCharacterInstance, arginfo_class_IntlBreakIterator_createCharacterInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC) - PHP_ME(BreakIterator, createSentenceInstance, arginfo_class_IntlBreakIterator_createSentenceInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC) - PHP_ME(BreakIterator, createTitleInstance, arginfo_class_IntlBreakIterator_createTitleInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC) - PHP_ME(BreakIterator, createCodePointInstance, arginfo_class_IntlBreakIterator_createCodePointInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC) - PHP_ME(BreakIterator, getText, arginfo_class_IntlBreakIterator_getText, ZEND_ACC_PUBLIC) - PHP_ME(BreakIterator, setText, arginfo_class_IntlBreakIterator_setText, ZEND_ACC_PUBLIC) - PHP_ME(BreakIterator, first, arginfo_class_IntlBreakIterator_first, ZEND_ACC_PUBLIC) - PHP_ME(BreakIterator, last, arginfo_class_IntlBreakIterator_last, ZEND_ACC_PUBLIC) - PHP_ME(BreakIterator, previous, arginfo_class_IntlBreakIterator_previous, ZEND_ACC_PUBLIC) - PHP_ME(BreakIterator, next, arginfo_class_IntlBreakIterator_next, ZEND_ACC_PUBLIC) - PHP_ME(BreakIterator, current, arginfo_class_IntlBreakIterator_current, ZEND_ACC_PUBLIC) - PHP_ME(BreakIterator, following, arginfo_class_IntlBreakIterator_following, ZEND_ACC_PUBLIC) - PHP_ME(BreakIterator, preceding, arginfo_class_IntlBreakIterator_preceding, ZEND_ACC_PUBLIC) - PHP_ME(BreakIterator, isBoundary, arginfo_class_IntlBreakIterator_isBoundary, ZEND_ACC_PUBLIC) - PHP_ME(BreakIterator, getLocale, arginfo_class_IntlBreakIterator_getLocale, ZEND_ACC_PUBLIC) - PHP_ME(BreakIterator, getPartsIterator, arginfo_class_IntlBreakIterator_getPartsIterator, ZEND_ACC_PUBLIC) - - PHP_ME(BreakIterator, getErrorCode, arginfo_class_IntlBreakIterator_getErrorCode, ZEND_ACC_PUBLIC) - PHP_ME(BreakIterator, getErrorMessage, arginfo_class_IntlBreakIterator_getErrorMessage, ZEND_ACC_PUBLIC) - PHP_FE_END -}; -/* }}} */ - -/* {{{ RuleBasedBreakIterator_class_functions - */ -static const zend_function_entry RuleBasedBreakIterator_class_functions[] = { - PHP_ME(IntlRuleBasedBreakIterator, __construct, arginfo_class_IntlRuleBasedBreakIterator___construct, ZEND_ACC_PUBLIC) - PHP_ME(IntlRuleBasedBreakIterator, getRules, arginfo_class_IntlRuleBasedBreakIterator_getRules, ZEND_ACC_PUBLIC) - PHP_ME(IntlRuleBasedBreakIterator, getRuleStatus, arginfo_class_IntlRuleBasedBreakIterator_getRuleStatus, ZEND_ACC_PUBLIC) - PHP_ME(IntlRuleBasedBreakIterator, getRuleStatusVec, arginfo_class_IntlRuleBasedBreakIterator_getRuleStatusVec, ZEND_ACC_PUBLIC) - PHP_ME(IntlRuleBasedBreakIterator, getBinaryRules, arginfo_class_IntlRuleBasedBreakIterator_getBinaryRules, ZEND_ACC_PUBLIC) - PHP_FE_END -}; -/* }}} */ - -/* {{{ CodePointBreakIterator_class_functions - */ -static const zend_function_entry CodePointBreakIterator_class_functions[] = { - PHP_ME(IntlCodePointBreakIterator, getLastCodePoint, arginfo_class_IntlCodePointBreakIterator_getLastCodePoint, ZEND_ACC_PUBLIC) - PHP_FE_END -}; -/* }}} */ - - /* {{{ breakiterator_register_BreakIterator_class * Initialize 'BreakIterator' class */ @@ -277,7 +223,7 @@ U_CFUNC void breakiterator_register_BreakIterator_class(void) zend_class_entry ce; /* Create and register 'BreakIterator' class. */ - INIT_CLASS_ENTRY(ce, "IntlBreakIterator", BreakIterator_class_functions); + INIT_CLASS_ENTRY(ce, "IntlBreakIterator", class_IntlBreakIterator_methods); ce.create_object = BreakIterator_object_create; ce.get_iterator = _breakiterator_get_iterator; BreakIterator_ce_ptr = zend_register_internal_class(&ce); @@ -327,13 +273,13 @@ U_CFUNC void breakiterator_register_BreakIterator_class(void) /* Create and register 'RuleBasedBreakIterator' class. */ INIT_CLASS_ENTRY(ce, "IntlRuleBasedBreakIterator", - RuleBasedBreakIterator_class_functions); + class_IntlRuleBasedBreakIterator_methods); RuleBasedBreakIterator_ce_ptr = zend_register_internal_class_ex(&ce, BreakIterator_ce_ptr); /* Create and register 'CodePointBreakIterator' class. */ INIT_CLASS_ENTRY(ce, "IntlCodePointBreakIterator", - CodePointBreakIterator_class_functions); + class_IntlCodePointBreakIterator_methods); CodePointBreakIterator_ce_ptr = zend_register_internal_class_ex(&ce, BreakIterator_ce_ptr); } diff --git a/ext/intl/breakiterator/breakiterator_iterators.cpp b/ext/intl/breakiterator/breakiterator_iterators.cpp index a8d14e94b8359..c55d9a2d94b16 100644 --- a/ext/intl/breakiterator/breakiterator_iterators.cpp +++ b/ext/intl/breakiterator/breakiterator_iterators.cpp @@ -286,17 +286,12 @@ U_CFUNC PHP_METHOD(IntlPartsIterator, getBreakIterator) ZVAL_COPY_DEREF(return_value, biter_zval); } -static const zend_function_entry IntlPartsIterator_class_functions[] = { - PHP_ME(IntlPartsIterator, getBreakIterator, arginfo_class_IntlPartsIterator_getBreakIterator, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - U_CFUNC void breakiterator_register_IntlPartsIterator_class(void) { zend_class_entry ce; /* Create and register 'BreakIterator' class. */ - INIT_CLASS_ENTRY(ce, "IntlPartsIterator", IntlPartsIterator_class_functions); + INIT_CLASS_ENTRY(ce, "IntlPartsIterator", class_IntlPartsIterator_methods); IntlPartsIterator_ce_ptr = zend_register_internal_class_ex(&ce, IntlIterator_ce_ptr); IntlPartsIterator_ce_ptr->create_object = IntlPartsIterator_object_create; diff --git a/ext/intl/breakiterator/breakiterator_methods.cpp b/ext/intl/breakiterator/breakiterator_methods.cpp index 3c9e93b160283..4aecfc4f78d93 100644 --- a/ext/intl/breakiterator/breakiterator_methods.cpp +++ b/ext/intl/breakiterator/breakiterator_methods.cpp @@ -33,7 +33,7 @@ using PHP::CodePointBreakIterator; using icu::BreakIterator; using icu::Locale; -U_CFUNC PHP_METHOD(BreakIterator, __construct) +U_CFUNC PHP_METHOD(IntlBreakIterator, __construct) { zend_throw_exception( NULL, "An object of this type cannot be created with the new operator", @@ -73,42 +73,42 @@ static void _breakiter_factory(const char *func_name, breakiterator_object_create(return_value, biter, 1); } -U_CFUNC PHP_METHOD(BreakIterator, createWordInstance) +U_CFUNC PHP_METHOD(IntlBreakIterator, createWordInstance) { _breakiter_factory("breakiter_create_word_instance", &BreakIterator::createWordInstance, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_METHOD(BreakIterator, createLineInstance) +U_CFUNC PHP_METHOD(IntlBreakIterator, createLineInstance) { _breakiter_factory("breakiter_create_line_instance", &BreakIterator::createLineInstance, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_METHOD(BreakIterator, createCharacterInstance) +U_CFUNC PHP_METHOD(IntlBreakIterator, createCharacterInstance) { _breakiter_factory("breakiter_create_character_instance", &BreakIterator::createCharacterInstance, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_METHOD(BreakIterator, createSentenceInstance) +U_CFUNC PHP_METHOD(IntlBreakIterator, createSentenceInstance) { _breakiter_factory("breakiter_create_sentence_instance", &BreakIterator::createSentenceInstance, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_METHOD(BreakIterator, createTitleInstance) +U_CFUNC PHP_METHOD(IntlBreakIterator, createTitleInstance) { _breakiter_factory("breakiter_create_title_instance", &BreakIterator::createTitleInstance, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_METHOD(BreakIterator, createCodePointInstance) +U_CFUNC PHP_METHOD(IntlBreakIterator, createCodePointInstance) { intl_error_reset(NULL); @@ -120,7 +120,7 @@ U_CFUNC PHP_METHOD(BreakIterator, createCodePointInstance) breakiterator_object_create(return_value, cpbi, 1); } -U_CFUNC PHP_METHOD(BreakIterator, getText) +U_CFUNC PHP_METHOD(IntlBreakIterator, getText) { BREAKITER_METHOD_INIT_VARS; object = ZEND_THIS; @@ -138,7 +138,7 @@ U_CFUNC PHP_METHOD(BreakIterator, getText) } } -U_CFUNC PHP_METHOD(BreakIterator, setText) +U_CFUNC PHP_METHOD(IntlBreakIterator, setText) { UText *ut = NULL; zend_string *text; @@ -217,28 +217,28 @@ static void _breakiter_int32_ret_int32( RETURN_LONG((zend_long)res); } -U_CFUNC PHP_METHOD(BreakIterator, first) +U_CFUNC PHP_METHOD(IntlBreakIterator, first) { _breakiter_no_args_ret_int32("breakiter_first", &BreakIterator::first, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_METHOD(BreakIterator, last) +U_CFUNC PHP_METHOD(IntlBreakIterator, last) { _breakiter_no_args_ret_int32("breakiter_last", &BreakIterator::last, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_METHOD(BreakIterator, previous) +U_CFUNC PHP_METHOD(IntlBreakIterator, previous) { _breakiter_no_args_ret_int32("breakiter_previous", &BreakIterator::previous, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_METHOD(BreakIterator, next) +U_CFUNC PHP_METHOD(IntlBreakIterator, next) { bool no_arg_version = false; @@ -267,7 +267,7 @@ U_CFUNC PHP_METHOD(BreakIterator, next) } } -U_CFUNC PHP_METHOD(BreakIterator, current) +U_CFUNC PHP_METHOD(IntlBreakIterator, current) { BREAKITER_METHOD_INIT_VARS; object = ZEND_THIS; @@ -283,21 +283,21 @@ U_CFUNC PHP_METHOD(BreakIterator, current) RETURN_LONG((zend_long)res); } -U_CFUNC PHP_METHOD(BreakIterator, following) +U_CFUNC PHP_METHOD(IntlBreakIterator, following) { _breakiter_int32_ret_int32("breakiter_following", &BreakIterator::following, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_METHOD(BreakIterator, preceding) +U_CFUNC PHP_METHOD(IntlBreakIterator, preceding) { _breakiter_int32_ret_int32("breakiter_preceding", &BreakIterator::preceding, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_METHOD(BreakIterator, isBoundary) +U_CFUNC PHP_METHOD(IntlBreakIterator, isBoundary) { zend_long offset; BREAKITER_METHOD_INIT_VARS; @@ -322,7 +322,7 @@ U_CFUNC PHP_METHOD(BreakIterator, isBoundary) RETURN_BOOL((zend_long)res); } -U_CFUNC PHP_METHOD(BreakIterator, getLocale) +U_CFUNC PHP_METHOD(IntlBreakIterator, getLocale) { zend_long locale_type; BREAKITER_METHOD_INIT_VARS; @@ -348,7 +348,7 @@ U_CFUNC PHP_METHOD(BreakIterator, getLocale) RETURN_STRING(locale.getName()); } -U_CFUNC PHP_METHOD(BreakIterator, getPartsIterator) +U_CFUNC PHP_METHOD(IntlBreakIterator, getPartsIterator) { zend_long key_type = 0; BREAKITER_METHOD_INIT_VARS; @@ -372,7 +372,7 @@ U_CFUNC PHP_METHOD(BreakIterator, getPartsIterator) object, return_value, (parts_iter_key_type)key_type); } -U_CFUNC PHP_METHOD(BreakIterator, getErrorCode) +U_CFUNC PHP_METHOD(IntlBreakIterator, getErrorCode) { BREAKITER_METHOD_INIT_VARS; object = ZEND_THIS; @@ -386,7 +386,7 @@ U_CFUNC PHP_METHOD(BreakIterator, getErrorCode) RETURN_LONG((zend_long)BREAKITER_ERROR_CODE(bio)); } -U_CFUNC PHP_METHOD(BreakIterator, getErrorMessage) +U_CFUNC PHP_METHOD(IntlBreakIterator, getErrorMessage) { zend_string* message = NULL; BREAKITER_METHOD_INIT_VARS; diff --git a/ext/intl/breakiterator/breakiterator_methods.h b/ext/intl/breakiterator/breakiterator_methods.h deleted file mode 100644 index 880fdc168f3fe..0000000000000 --- a/ext/intl/breakiterator/breakiterator_methods.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Gustavo Lopes | - +----------------------------------------------------------------------+ - */ - -#ifndef BREAKITERATOR_METHODS_H -#define BREAKITERATOR_METHODS_H - -#include - -PHP_METHOD(BreakIterator, __construct); - -PHP_METHOD(BreakIterator, createWordInstance); - -PHP_METHOD(BreakIterator, createLineInstance); - -PHP_METHOD(BreakIterator, createCharacterInstance); - -PHP_METHOD(BreakIterator, createSentenceInstance); - -PHP_METHOD(BreakIterator, createTitleInstance); - -PHP_METHOD(BreakIterator, createCodePointInstance); - -PHP_METHOD(BreakIterator, getText); - -PHP_METHOD(BreakIterator, setText); - -PHP_METHOD(BreakIterator, first); - -PHP_METHOD(BreakIterator, last); - -PHP_METHOD(BreakIterator, previous); - -PHP_METHOD(BreakIterator, next); - -PHP_METHOD(BreakIterator, current); - -PHP_METHOD(BreakIterator, following); - -PHP_METHOD(BreakIterator, preceding); - -PHP_METHOD(BreakIterator, isBoundary); - -PHP_METHOD(BreakIterator, getLocale); - -PHP_METHOD(BreakIterator, getPartsIterator); - -PHP_METHOD(BreakIterator, getErrorCode); - -PHP_METHOD(BreakIterator, getErrorMessage); - -#endif diff --git a/ext/intl/breakiterator/codepointiterator_methods.h b/ext/intl/breakiterator/codepointiterator_methods.h deleted file mode 100644 index 04576d0eb1d1d..0000000000000 --- a/ext/intl/breakiterator/codepointiterator_methods.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Gustavo Lopes | - +----------------------------------------------------------------------+ - */ - -#ifndef CODEPOINTITERATOR_METHODS_H -#define CODEPOINTITERATOR_METHODS_H - -#include - -PHP_METHOD(IntlCodePointBreakIterator, getLastCodePoint); - -#endif diff --git a/ext/intl/breakiterator/rulebasedbreakiterator_methods.h b/ext/intl/breakiterator/rulebasedbreakiterator_methods.h deleted file mode 100644 index 9b6802bcfaa35..0000000000000 --- a/ext/intl/breakiterator/rulebasedbreakiterator_methods.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Gustavo Lopes | - +----------------------------------------------------------------------+ - */ - -#ifndef RULEBASEDBREAKITERATOR_METHODS_H -#define RULEBASEDBREAKITERATOR_METHODS_H - -#include - -PHP_METHOD(IntlRuleBasedBreakIterator, __construct); - -PHP_METHOD(IntlRuleBasedBreakIterator, getRules); - -PHP_METHOD(IntlRuleBasedBreakIterator, getRuleStatus); - -PHP_METHOD(IntlRuleBasedBreakIterator, getRuleStatusVec); - -PHP_METHOD(IntlRuleBasedBreakIterator, getBinaryRules); - -#endif diff --git a/ext/intl/calendar/calendar.stub.php b/ext/intl/calendar/calendar.stub.php index 85001da58c407..fafee62640c68 100644 --- a/ext/intl/calendar/calendar.stub.php +++ b/ext/intl/calendar/calendar.stub.php @@ -1,154 +1,283 @@ #include } @@ -265,74 +263,6 @@ static zend_object *Calendar_object_create(zend_class_entry *ce) } /* }}} */ -/* {{{ Calendar_class_functions - * Every 'IntlCalendar' class method has an entry in this table - */ -static const zend_function_entry Calendar_class_functions[] = { - PHP_ME(IntlCalendar, __construct, arginfo_class_IntlCalendar___construct, ZEND_ACC_PRIVATE) - PHP_ME_MAPPING(createInstance, intlcal_create_instance, arginfo_class_IntlCalendar_createInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getKeywordValuesForLocale, intlcal_get_keyword_values_for_locale, arginfo_class_IntlCalendar_getKeywordValuesForLocale, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getNow, intlcal_get_now, arginfo_class_IntlCalendar_getNow, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getAvailableLocales, intlcal_get_available_locales, arginfo_class_IntlCalendar_getAvailableLocales, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(get, intlcal_get, arginfo_class_IntlCalendar_get, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getTime, intlcal_get_time, arginfo_class_IntlCalendar_getTime, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(setTime, intlcal_set_time, arginfo_class_IntlCalendar_setTime, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(add, intlcal_add, arginfo_class_IntlCalendar_add, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(setTimeZone, intlcal_set_time_zone, arginfo_class_IntlCalendar_setTimeZone, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(after, intlcal_after, arginfo_class_IntlCalendar_after, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(before, intlcal_before, arginfo_class_IntlCalendar_before, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(set, intlcal_set, arginfo_class_IntlCalendar_set, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(roll, intlcal_roll, arginfo_class_IntlCalendar_roll, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(clear, intlcal_clear, arginfo_class_IntlCalendar_clear, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(fieldDifference, intlcal_field_difference, arginfo_class_IntlCalendar_fieldDifference, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getActualMaximum, intlcal_get_actual_maximum, arginfo_class_IntlCalendar_getActualMaximum, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getActualMinimum, intlcal_get_actual_minimum, arginfo_class_IntlCalendar_getActualMinimum, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getDayOfWeekType, intlcal_get_day_of_week_type, arginfo_class_IntlCalendar_getDayOfWeekType, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getFirstDayOfWeek, intlcal_get_first_day_of_week, arginfo_class_IntlCalendar_getFirstDayOfWeek, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getGreatestMinimum, intlcal_get_greatest_minimum, arginfo_class_IntlCalendar_getGreatestMinimum, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getLeastMaximum, intlcal_get_least_maximum, arginfo_class_IntlCalendar_getLeastMaximum, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getLocale, intlcal_get_locale, arginfo_class_IntlCalendar_getLocale, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getMaximum, intlcal_get_maximum, arginfo_class_IntlCalendar_getMaximum, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getMinimalDaysInFirstWeek, intlcal_get_minimal_days_in_first_week, arginfo_class_IntlCalendar_getMinimalDaysInFirstWeek, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getMinimum, intlcal_get_minimum, arginfo_class_IntlCalendar_getMinimum, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getTimeZone, intlcal_get_time_zone, arginfo_class_IntlCalendar_getTimeZone, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getType, intlcal_get_type, arginfo_class_IntlCalendar_getType, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getWeekendTransition,intlcal_get_weekend_transition, arginfo_class_IntlCalendar_getWeekendTransition, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(inDaylightTime, intlcal_in_daylight_time, arginfo_class_IntlCalendar_inDaylightTime, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(isEquivalentTo, intlcal_is_equivalent_to, arginfo_class_IntlCalendar_isEquivalentTo, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(isLenient, intlcal_is_lenient, arginfo_class_IntlCalendar_isLenient, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(isSet, intlcal_is_set, arginfo_class_IntlCalendar_isSet, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(isWeekend, intlcal_is_weekend, arginfo_class_IntlCalendar_isWeekend, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(setFirstDayOfWeek, intlcal_set_first_day_of_week, arginfo_class_IntlCalendar_setFirstDayOfWeek, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(setLenient, intlcal_set_lenient, arginfo_class_IntlCalendar_setLenient, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(setMinimalDaysInFirstWeek,intlcal_set_minimal_days_in_first_week, arginfo_class_IntlCalendar_setMinimalDaysInFirstWeek, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(equals, intlcal_equals, arginfo_class_IntlCalendar_equals, ZEND_ACC_PUBLIC) - - PHP_ME_MAPPING(getRepeatedWallTimeOption, intlcal_get_repeated_wall_time_option, arginfo_class_IntlCalendar_getRepeatedWallTimeOption, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getSkippedWallTimeOption, intlcal_get_skipped_wall_time_option, arginfo_class_IntlCalendar_getSkippedWallTimeOption, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(setRepeatedWallTimeOption, intlcal_set_repeated_wall_time_option, arginfo_class_IntlCalendar_setRepeatedWallTimeOption, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(setSkippedWallTimeOption, intlcal_set_skipped_wall_time_option, arginfo_class_IntlCalendar_setSkippedWallTimeOption, ZEND_ACC_PUBLIC) - - PHP_ME_MAPPING(fromDateTime, intlcal_from_date_time, arginfo_class_IntlCalendar_fromDateTime, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(toDateTime, intlcal_to_date_time, arginfo_class_IntlCalendar_toDateTime, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getErrorCode, intlcal_get_error_code, arginfo_class_IntlCalendar_getErrorCode, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getErrorMessage, intlcal_get_error_message, arginfo_class_IntlCalendar_getErrorMessage, ZEND_ACC_PUBLIC) - PHP_FE_END -}; -/* }}} */ - -/* {{{ GregorianCalendar_class_functions - */ -static const zend_function_entry GregorianCalendar_class_functions[] = { - PHP_ME(IntlGregorianCalendar, __construct, arginfo_class_IntlGregorianCalendar___construct, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(setGregorianChange, intlgregcal_set_gregorian_change, arginfo_class_IntlGregorianCalendar_setGregorianChange, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getGregorianChange, intlgregcal_get_gregorian_change, arginfo_class_IntlGregorianCalendar_getGregorianChange, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(isLeapYear, intlgregcal_is_leap_year, arginfo_class_IntlGregorianCalendar_isLeapYear, ZEND_ACC_PUBLIC) - PHP_FE_END -}; -/* }}} */ - - /* {{{ calendar_register_IntlCalendar_class * Initialize 'IntlCalendar' class */ @@ -341,7 +271,7 @@ void calendar_register_IntlCalendar_class(void) zend_class_entry ce; /* Create and register 'IntlCalendar' class. */ - INIT_CLASS_ENTRY(ce, "IntlCalendar", Calendar_class_functions); + INIT_CLASS_ENTRY(ce, "IntlCalendar", class_IntlCalendar_methods); ce.create_object = Calendar_object_create; Calendar_ce_ptr = zend_register_internal_class(&ce); @@ -401,7 +331,7 @@ void calendar_register_IntlCalendar_class(void) CALENDAR_DECL_LONG_CONST("WALLTIME_NEXT_VALID", UCAL_WALLTIME_NEXT_VALID); /* Create and register 'IntlGregorianCalendar' class. */ - INIT_CLASS_ENTRY(ce, "IntlGregorianCalendar", GregorianCalendar_class_functions); + INIT_CLASS_ENTRY(ce, "IntlGregorianCalendar", class_IntlGregorianCalendar_methods); GregorianCalendar_ce_ptr = zend_register_internal_class_ex(&ce, Calendar_ce_ptr); } diff --git a/ext/intl/calendar/calendar_methods.h b/ext/intl/calendar/calendar_methods.h deleted file mode 100644 index c9c8387d2320b..0000000000000 --- a/ext/intl/calendar/calendar_methods.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Gustavo Lopes | - +----------------------------------------------------------------------+ - */ - -#ifndef CALENDAR_METHODS_H -#define CALENDAR_METHODS_H - -#include - -PHP_METHOD(IntlCalendar, __construct); - -PHP_FUNCTION(intlcal_create_instance); - -PHP_FUNCTION(intlcal_get_keyword_values_for_locale); - -PHP_FUNCTION(intlcal_get_now); - -PHP_FUNCTION(intlcal_get_available_locales); - -PHP_FUNCTION(intlcal_get); - -PHP_FUNCTION(intlcal_get_time); - -PHP_FUNCTION(intlcal_set_time); - -PHP_FUNCTION(intlcal_add); - -PHP_FUNCTION(intlcal_set_time_zone); - -PHP_FUNCTION(intlcal_after); - -PHP_FUNCTION(intlcal_before); - -PHP_FUNCTION(intlcal_set); - -PHP_FUNCTION(intlcal_roll); - -PHP_FUNCTION(intlcal_clear); - -PHP_FUNCTION(intlcal_field_difference); - -PHP_FUNCTION(intlcal_get_actual_maximum); - -PHP_FUNCTION(intlcal_get_actual_minimum); - -PHP_FUNCTION(intlcal_get_day_of_week_type); - -PHP_FUNCTION(intlcal_get_first_day_of_week); - -PHP_FUNCTION(intlcal_get_greatest_minimum); - -PHP_FUNCTION(intlcal_get_least_maximum); - -PHP_FUNCTION(intlcal_get_locale); - -PHP_FUNCTION(intlcal_get_maximum); - -PHP_FUNCTION(intlcal_get_minimal_days_in_first_week); - -PHP_FUNCTION(intlcal_get_minimum); - -PHP_FUNCTION(intlcal_get_time_zone); - -PHP_FUNCTION(intlcal_get_type); - -PHP_FUNCTION(intlcal_get_weekend_transition); - -PHP_FUNCTION(intlcal_in_daylight_time); - -PHP_FUNCTION(intlcal_is_equivalent_to); - -PHP_FUNCTION(intlcal_is_lenient); - -PHP_FUNCTION(intlcal_is_set); - -PHP_FUNCTION(intlcal_is_weekend); - -PHP_FUNCTION(intlcal_set_first_day_of_week); - -PHP_FUNCTION(intlcal_set_lenient); - -PHP_FUNCTION(intlcal_set_minimal_days_in_first_week); - -PHP_FUNCTION(intlcal_equals); - -PHP_FUNCTION(intlcal_get_repeated_wall_time_option); - -PHP_FUNCTION(intlcal_get_skipped_wall_time_option); - -PHP_FUNCTION(intlcal_set_repeated_wall_time_option); - -PHP_FUNCTION(intlcal_set_skipped_wall_time_option); - -PHP_FUNCTION(intlcal_from_date_time); - -PHP_FUNCTION(intlcal_to_date_time); - -PHP_FUNCTION(intlcal_get_error_code); - -PHP_FUNCTION(intlcal_get_error_message); - -#endif /* #ifndef CALENDAR_METHODS_H */ diff --git a/ext/intl/calendar/gregoriancalendar_methods.h b/ext/intl/calendar/gregoriancalendar_methods.h deleted file mode 100644 index a5351f986fb54..0000000000000 --- a/ext/intl/calendar/gregoriancalendar_methods.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Gustavo Lopes | - +----------------------------------------------------------------------+ - */ - -#ifndef GREORIANCALENDAR_METHODS_H -#define GREORIANCALENDAR_METHODS_H - -#include - -PHP_FUNCTION(intlgregcal_create_instance); - -PHP_METHOD(IntlGregorianCalendar, __construct); - -PHP_FUNCTION(intlgregcal_set_gregorian_change); - -PHP_FUNCTION(intlgregcal_get_gregorian_change); - -PHP_FUNCTION(intlgregcal_is_leap_year); - -#endif diff --git a/ext/intl/collator/collator.stub.php b/ext/intl/collator/collator.stub.php index e3d7489fc5349..6e8c61c21ab81 100644 --- a/ext/intl/collator/collator.stub.php +++ b/ext/intl/collator/collator.stub.php @@ -1,45 +1,86 @@ diff --git a/ext/intl/collator/collator_attr.h b/ext/intl/collator/collator_attr.h deleted file mode 100644 index 682e618b9f1ec..0000000000000 --- a/ext/intl/collator/collator_attr.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Vadim Savchuk | - | Dmitry Lakhtyuk | - +----------------------------------------------------------------------+ - */ - -#ifndef COLLATOR_ATTR_H -#define COLLATOR_ATTR_H - -#include - -PHP_FUNCTION( collator_get_attribute ); -PHP_FUNCTION( collator_set_attribute ); -PHP_FUNCTION( collator_get_strength ); -PHP_FUNCTION( collator_set_strength ); - -#endif // COLLATOR_ATTR_H diff --git a/ext/intl/collator/collator_class.c b/ext/intl/collator/collator_class.c index 26417061142e0..44452c147fa8b 100644 --- a/ext/intl/collator/collator_class.c +++ b/ext/intl/collator/collator_class.c @@ -15,13 +15,8 @@ #include "collator_class.h" #include "php_intl.h" -#include "collator_attr.h" -#include "collator_compare.h" #include "collator_sort.h" #include "collator_convert.h" -#include "collator_locale.h" -#include "collator_create.h" -#include "collator_error.h" #include "collator_arginfo.h" #include "intl_error.h" @@ -63,29 +58,6 @@ zend_object *Collator_object_create(zend_class_entry *ce ) * 'Collator' class registration structures & functions */ -/* {{{ Collator_class_functions - * Every 'Collator' class method has an entry in this table - */ - -static const zend_function_entry Collator_class_functions[] = { - PHP_ME( Collator, __construct, arginfo_class_Collator___construct, ZEND_ACC_PUBLIC ) - ZEND_FENTRY( create, ZEND_FN( collator_create ), arginfo_class_Collator_create, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) - PHP_NAMED_FE( compare, ZEND_FN( collator_compare ), arginfo_class_Collator_compare ) - PHP_NAMED_FE( sort, ZEND_FN( collator_sort ), arginfo_class_Collator_sort ) - PHP_NAMED_FE( sortWithSortKeys, ZEND_FN( collator_sort_with_sort_keys ), arginfo_class_Collator_sortWithSortKeys ) - PHP_NAMED_FE( asort, ZEND_FN( collator_asort ), arginfo_class_Collator_asort ) - PHP_NAMED_FE( getAttribute, ZEND_FN( collator_get_attribute ), arginfo_class_Collator_getAttribute ) - PHP_NAMED_FE( setAttribute, ZEND_FN( collator_set_attribute ), arginfo_class_Collator_setAttribute ) - PHP_NAMED_FE( getStrength, ZEND_FN( collator_get_strength ), arginfo_class_Collator_getStrength ) - PHP_NAMED_FE( setStrength, ZEND_FN( collator_set_strength ), arginfo_class_Collator_setStrength ) - PHP_NAMED_FE( getLocale, ZEND_FN( collator_get_locale ), arginfo_class_Collator_getLocale ) - PHP_NAMED_FE( getErrorCode, ZEND_FN( collator_get_error_code ), arginfo_class_Collator_getErrorCode ) - PHP_NAMED_FE( getErrorMessage, ZEND_FN( collator_get_error_message ), arginfo_class_Collator_getErrorMessage ) - PHP_NAMED_FE( getSortKey, ZEND_FN( collator_get_sort_key ), arginfo_class_Collator_getSortKey ) - PHP_FE_END -}; -/* }}} */ - /* {{{ collator_register_Collator_class * Initialize 'Collator' class */ @@ -94,7 +66,7 @@ void collator_register_Collator_class( void ) zend_class_entry ce; /* Create and register 'Collator' class. */ - INIT_CLASS_ENTRY( ce, "Collator", Collator_class_functions ); + INIT_CLASS_ENTRY( ce, "Collator", class_Collator_methods ); ce.create_object = Collator_object_create; Collator_ce_ptr = zend_register_internal_class( &ce ); diff --git a/ext/intl/collator/collator_compare.c b/ext/intl/collator/collator_compare.c index f4afc757860b8..a5d125652a919 100644 --- a/ext/intl/collator/collator_compare.c +++ b/ext/intl/collator/collator_compare.c @@ -19,7 +19,6 @@ #include "php_intl.h" #include "collator_class.h" -#include "collator_compare.h" #include "intl_convert.h" /* {{{ proto int Collator::compare( string $str1, string $str2 ) diff --git a/ext/intl/collator/collator_compare.h b/ext/intl/collator/collator_compare.h deleted file mode 100644 index aa58d88ab904c..0000000000000 --- a/ext/intl/collator/collator_compare.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Vadim Savchuk | - | Dmitry Lakhtyuk | - +----------------------------------------------------------------------+ - */ - -#ifndef COLLATOR_COMPARE_H -#define COLLATOR_COMPARE_H - -#include - -PHP_FUNCTION( collator_compare ); - -#endif // COLLATOR_COMPARE_H diff --git a/ext/intl/collator/collator_create.c b/ext/intl/collator/collator_create.c index 051bb99cb828b..e3cf17060a0fb 100644 --- a/ext/intl/collator/collator_create.c +++ b/ext/intl/collator/collator_create.c @@ -19,7 +19,6 @@ #include "php_intl.h" #include "collator_class.h" -#include "collator_create.h" #include "intl_data.h" /* {{{ */ diff --git a/ext/intl/collator/collator_create.h b/ext/intl/collator/collator_create.h deleted file mode 100644 index 7f70fe9e4b0aa..0000000000000 --- a/ext/intl/collator/collator_create.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Vadim Savchuk | - | Dmitry Lakhtyuk | - +----------------------------------------------------------------------+ - */ - -#ifndef COLLATOR_CREATE_H -#define COLLATOR_CREATE_H - -#include - -PHP_FUNCTION( collator_create ); - -PHP_METHOD( Collator, __construct ); - -#endif // COLLATOR_CREATE_H diff --git a/ext/intl/collator/collator_error.c b/ext/intl/collator/collator_error.c index 679c4557b458b..a32cb183b8256 100644 --- a/ext/intl/collator/collator_error.c +++ b/ext/intl/collator/collator_error.c @@ -19,7 +19,6 @@ #include "php_intl.h" #include "collator_class.h" -#include "collator_error.h" /* {{{ proto int Collator::getErrorCode( Collator $coll ) * Get collator's last error code. }}} */ diff --git a/ext/intl/collator/collator_error.h b/ext/intl/collator/collator_error.h deleted file mode 100644 index 912d8f9d35f82..0000000000000 --- a/ext/intl/collator/collator_error.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Vadim Savchuk | - | Dmitry Lakhtyuk | - +----------------------------------------------------------------------+ - */ - -#ifndef COLLATOR_ERROR_H -#define COLLATOR_ERROR_H - -#include - -PHP_FUNCTION( collator_get_error_code ); -PHP_FUNCTION( collator_get_error_message ); - -#endif // COLLATOR_ERROR_H diff --git a/ext/intl/collator/collator_locale.c b/ext/intl/collator/collator_locale.c index dcf3a4917eab5..4a138f8a46575 100644 --- a/ext/intl/collator/collator_locale.c +++ b/ext/intl/collator/collator_locale.c @@ -19,7 +19,6 @@ #include "php_intl.h" #include "collator_class.h" -#include "collator_locale.h" #include "intl_convert.h" #include diff --git a/ext/intl/collator/collator_locale.h b/ext/intl/collator/collator_locale.h deleted file mode 100644 index 505e2f17fd7d6..0000000000000 --- a/ext/intl/collator/collator_locale.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Vadim Savchuk | - | Dmitry Lakhtyuk | - +----------------------------------------------------------------------+ - */ - -#ifndef COLLATOR_LOCALE_H -#define COLLATOR_LOCALE_H - -#include - -PHP_FUNCTION( collator_get_locale ); - -#endif // COLLATOR_LOCALE_H diff --git a/ext/intl/collator/collator_sort.h b/ext/intl/collator/collator_sort.h index 5d1d1050d9ba1..6b33962fa85ee 100644 --- a/ext/intl/collator/collator_sort.h +++ b/ext/intl/collator/collator_sort.h @@ -20,9 +20,4 @@ typedef int (*collator_compare_func_t)( zval *result, zval *op1, zval *op2 ); -PHP_FUNCTION( collator_sort ); -PHP_FUNCTION( collator_sort_with_sort_keys ); -PHP_FUNCTION( collator_get_sort_key ); -PHP_FUNCTION( collator_asort ); - #endif // COLLATOR_SORT_H diff --git a/ext/intl/common/common.stub.php b/ext/intl/common/common.stub.php index 8bb6e38ce8e1d..a0a8a20ffbb4d 100644 --- a/ext/intl/common/common.stub.php +++ b/ext/intl/common/common.stub.php @@ -1,5 +1,7 @@ zo; } -static PHP_METHOD(IntlIterator, current) +PHP_METHOD(IntlIterator, current) { zval *data; INTLITERATOR_METHOD_INIT_VARS; @@ -220,7 +220,7 @@ static PHP_METHOD(IntlIterator, current) } } -static PHP_METHOD(IntlIterator, key) +PHP_METHOD(IntlIterator, key) { INTLITERATOR_METHOD_INIT_VARS; @@ -237,7 +237,7 @@ static PHP_METHOD(IntlIterator, key) } } -static PHP_METHOD(IntlIterator, next) +PHP_METHOD(IntlIterator, next) { INTLITERATOR_METHOD_INIT_VARS; @@ -252,7 +252,7 @@ static PHP_METHOD(IntlIterator, next) ii->iterator->index++; } -static PHP_METHOD(IntlIterator, rewind) +PHP_METHOD(IntlIterator, rewind) { INTLITERATOR_METHOD_INIT_VARS; @@ -269,7 +269,7 @@ static PHP_METHOD(IntlIterator, rewind) } } -static PHP_METHOD(IntlIterator, valid) +PHP_METHOD(IntlIterator, valid) { INTLITERATOR_METHOD_INIT_VARS; @@ -281,16 +281,6 @@ static PHP_METHOD(IntlIterator, valid) RETURN_BOOL(ii->iterator->funcs->valid(ii->iterator) == SUCCESS); } -static const zend_function_entry IntlIterator_class_functions[] = { - PHP_ME(IntlIterator, current, arginfo_class_IntlIterator_current, ZEND_ACC_PUBLIC) - PHP_ME(IntlIterator, key, arginfo_class_IntlIterator_key, ZEND_ACC_PUBLIC) - PHP_ME(IntlIterator, next, arginfo_class_IntlIterator_next, ZEND_ACC_PUBLIC) - PHP_ME(IntlIterator, rewind, arginfo_class_IntlIterator_rewind, ZEND_ACC_PUBLIC) - PHP_ME(IntlIterator, valid, arginfo_class_IntlIterator_valid, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - - /* {{{ intl_register_IntlIterator_class * Initialize 'IntlIterator' class */ @@ -299,7 +289,7 @@ U_CFUNC void intl_register_IntlIterator_class(void) zend_class_entry ce; /* Create and register 'IntlIterator' class. */ - INIT_CLASS_ENTRY(ce, "IntlIterator", IntlIterator_class_functions); + INIT_CLASS_ENTRY(ce, "IntlIterator", class_IntlIterator_methods); ce.create_object = IntlIterator_object_create; IntlIterator_ce_ptr = zend_register_internal_class(&ce); IntlIterator_ce_ptr->get_iterator = IntlIterator_get_iterator; diff --git a/ext/intl/common/common_error.h b/ext/intl/common/common_error.h index 48a42d41e59d4..a01788a8b2c4f 100644 --- a/ext/intl/common/common_error.h +++ b/ext/intl/common/common_error.h @@ -18,11 +18,6 @@ #include -PHP_FUNCTION( intl_get_error_code ); -PHP_FUNCTION( intl_get_error_message ); -PHP_FUNCTION( intl_is_failure ); -PHP_FUNCTION( intl_error_name ); - void intl_expose_icu_error_codes( INIT_FUNC_ARGS ); #endif // INTL_COMMON_ERROR_H diff --git a/ext/intl/converter/converter.c b/ext/intl/converter/converter.c index fa12e24cf79cb..1d84aba45382a 100644 --- a/ext/intl/converter/converter.c +++ b/ext/intl/converter/converter.c @@ -106,7 +106,7 @@ static void php_converter_default_callback(zval *return_value, zval *zobj, zend_ /* {{{ proto void UConverter::toUCallback(int $reason, string $source, string $codeUnits, int &$error) */ -static PHP_METHOD(UConverter, toUCallback) { +PHP_METHOD(UConverter, toUCallback) { zend_long reason; zend_string *source, *codeUnits; zval *error; @@ -123,7 +123,7 @@ static PHP_METHOD(UConverter, toUCallback) { /* {{{ proto void UConverter::fromUCallback(int $reason, array $source, int $codePoint, int &$error) */ -static PHP_METHOD(UConverter, fromUCallback) { +PHP_METHOD(UConverter, fromUCallback) { zend_long reason; zval *source, *error; zend_long codePoint; @@ -419,14 +419,14 @@ static void php_converter_do_set_encoding(UConverter **pcnv, INTERNAL_FUNCTION_P /* }}} */ /* {{{ proto bool UConverter::setSourceEncoding(string encoding) */ -static PHP_METHOD(UConverter, setSourceEncoding) { +PHP_METHOD(UConverter, setSourceEncoding) { php_converter_object *objval = CONV_GET(ZEND_THIS); php_converter_do_set_encoding(&(objval->src), INTERNAL_FUNCTION_PARAM_PASSTHRU); } /* }}} */ /* {{{ proto bool UConverter::setDestinationEncoding(string encoding) */ -static PHP_METHOD(UConverter, setDestinationEncoding) { +PHP_METHOD(UConverter, setDestinationEncoding) { php_converter_object *objval = CONV_GET(ZEND_THIS); php_converter_do_set_encoding(&(objval->dest), INTERNAL_FUNCTION_PARAM_PASSTHRU); } @@ -457,14 +457,14 @@ static void php_converter_do_get_encoding(php_converter_object *objval, UConvert /* }}} */ /* {{{ proto string UConverter::getSourceEncoding() */ -static PHP_METHOD(UConverter, getSourceEncoding) { +PHP_METHOD(UConverter, getSourceEncoding) { php_converter_object *objval = CONV_GET(ZEND_THIS); php_converter_do_get_encoding(objval, objval->src, INTERNAL_FUNCTION_PARAM_PASSTHRU); } /* }}} */ /* {{{ proto string UConverter::getDestinationEncoding() */ -static PHP_METHOD(UConverter, getDestinationEncoding) { +PHP_METHOD(UConverter, getDestinationEncoding) { php_converter_object *objval = CONV_GET(ZEND_THIS); php_converter_do_get_encoding(objval, objval->dest, INTERNAL_FUNCTION_PARAM_PASSTHRU); } @@ -494,14 +494,14 @@ static void php_converter_do_get_type(php_converter_object *objval, UConverter * /* }}} */ /* {{{ proto int UConverter::getSourceType() */ -static PHP_METHOD(UConverter, getSourceType) { +PHP_METHOD(UConverter, getSourceType) { php_converter_object *objval = CONV_GET(ZEND_THIS); php_converter_do_get_type(objval, objval->src, INTERNAL_FUNCTION_PARAM_PASSTHRU); } /* }}} */ /* {{{ proto int UConverter::getDestinationType() */ -static PHP_METHOD(UConverter, getDestinationType) { +PHP_METHOD(UConverter, getDestinationType) { php_converter_object *objval = CONV_GET(ZEND_THIS); php_converter_do_get_type(objval, objval->dest, INTERNAL_FUNCTION_PARAM_PASSTHRU); } @@ -532,7 +532,7 @@ static void php_converter_resolve_callback(zval *zobj, /* }}} */ /* {{{ proto UConverter::__construct([string dest = 'utf-8',[string src = 'utf-8']]) */ -static PHP_METHOD(UConverter, __construct) { +PHP_METHOD(UConverter, __construct) { php_converter_object *objval = CONV_GET(ZEND_THIS); char *src = "utf-8"; size_t src_len = sizeof("utf-8") - 1; @@ -553,7 +553,7 @@ static PHP_METHOD(UConverter, __construct) { /* }}} */ /* {{{ proto bool UConverter::setSubstChars(string $chars) */ -static PHP_METHOD(UConverter, setSubstChars) { +PHP_METHOD(UConverter, setSubstChars) { php_converter_object *objval = CONV_GET(ZEND_THIS); char *chars; size_t chars_len; @@ -593,7 +593,7 @@ static PHP_METHOD(UConverter, setSubstChars) { /* }}} */ /* {{{ proto string UConverter::getSubstChars() */ -static PHP_METHOD(UConverter, getSubstChars) { +PHP_METHOD(UConverter, getSubstChars) { php_converter_object *objval = CONV_GET(ZEND_THIS); char chars[127]; int8_t chars_len = sizeof(chars); @@ -681,7 +681,7 @@ static zend_string* php_converter_do_convert(UConverter *dest_cnv, /* {{{ proto string UConverter::reasonText(int reason) */ #define UCNV_REASON_CASE(v) case (UCNV_ ## v) : RETURN_STRINGL( "REASON_" #v , sizeof( "REASON_" #v ) - 1); -static PHP_METHOD(UConverter, reasonText) { +PHP_METHOD(UConverter, reasonText) { zend_long reason; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &reason) == FAILURE) { @@ -704,7 +704,7 @@ static PHP_METHOD(UConverter, reasonText) { /* }}} */ /* {{{ proto string UConverter::convert(string str[, bool reverse]) */ -static PHP_METHOD(UConverter, convert) { +PHP_METHOD(UConverter, convert) { php_converter_object *objval = CONV_GET(ZEND_THIS); char *str; size_t str_len; @@ -730,7 +730,7 @@ static PHP_METHOD(UConverter, convert) { /* }}} */ /* {{{ proto string UConverter::transcode(string $str, string $toEncoding, string $fromEncoding[, Array $options = array()]) */ -static PHP_METHOD(UConverter, transcode) { +PHP_METHOD(UConverter, transcode) { char *str, *src, *dest; size_t str_len, src_len, dest_len; zval *options = NULL; @@ -787,7 +787,7 @@ static PHP_METHOD(UConverter, transcode) { /* }}} */ /* {{{ proto int UConverter::getErrorCode() */ -static PHP_METHOD(UConverter, getErrorCode) { +PHP_METHOD(UConverter, getErrorCode) { php_converter_object *objval = CONV_GET(ZEND_THIS); if (zend_parse_parameters_none() == FAILURE) { @@ -799,7 +799,7 @@ static PHP_METHOD(UConverter, getErrorCode) { /* }}} */ /* {{{ proto string UConverter::getErrorMessage() */ -static PHP_METHOD(UConverter, getErrorMessage) { +PHP_METHOD(UConverter, getErrorMessage) { php_converter_object *objval = CONV_GET(ZEND_THIS); zend_string *message = intl_error_get_message(&(objval->error)); @@ -816,7 +816,7 @@ static PHP_METHOD(UConverter, getErrorMessage) { /* }}} */ /* {{{ proto array UConverter::getAvailable() */ -static PHP_METHOD(UConverter, getAvailable) { +PHP_METHOD(UConverter, getAvailable) { int32_t i, count = ucnv_countAvailable(); @@ -834,7 +834,7 @@ static PHP_METHOD(UConverter, getAvailable) { /* }}} */ /* {{{ proto array UConverter::getAliases(string name) */ -static PHP_METHOD(UConverter, getAliases) { +PHP_METHOD(UConverter, getAliases) { char *name; size_t name_len; UErrorCode error = U_ZERO_ERROR; @@ -868,7 +868,7 @@ static PHP_METHOD(UConverter, getAliases) { /* }}} */ /* {{{ proto array UConverter::getStandards() */ -static PHP_METHOD(UConverter, getStandards) { +PHP_METHOD(UConverter, getStandards) { uint16_t i, count; if (zend_parse_parameters_none() == FAILURE) { @@ -891,43 +891,6 @@ static PHP_METHOD(UConverter, getStandards) { } /* }}} */ -static const zend_function_entry php_converter_methods[] = { - PHP_ME(UConverter, __construct, arginfo_class_UConverter___construct, ZEND_ACC_PUBLIC) - - /* Encoding selection */ - PHP_ME(UConverter, setSourceEncoding, arginfo_class_UConverter_setSourceEncoding, ZEND_ACC_PUBLIC) - PHP_ME(UConverter, setDestinationEncoding, arginfo_class_UConverter_setDestinationEncoding, ZEND_ACC_PUBLIC) - PHP_ME(UConverter, getSourceEncoding, arginfo_class_UConverter_getSourceEncoding, ZEND_ACC_PUBLIC) - PHP_ME(UConverter, getDestinationEncoding, arginfo_class_UConverter_getDestinationEncoding, ZEND_ACC_PUBLIC) - - /* Introspection for algorithmic converters */ - PHP_ME(UConverter, getSourceType, arginfo_class_UConverter_getSourceType, ZEND_ACC_PUBLIC) - PHP_ME(UConverter, getDestinationType, arginfo_class_UConverter_getDestinationType, ZEND_ACC_PUBLIC) - - /* Basic codeunit error handling */ - PHP_ME(UConverter, getSubstChars, arginfo_class_UConverter_getSubstChars, ZEND_ACC_PUBLIC) - PHP_ME(UConverter, setSubstChars, arginfo_class_UConverter_setSubstChars, ZEND_ACC_PUBLIC) - - /* Default callback handlers */ - PHP_ME(UConverter, toUCallback, arginfo_class_UConverter_toUCallback, ZEND_ACC_PUBLIC) - PHP_ME(UConverter, fromUCallback, arginfo_class_UConverter_fromUCallback, ZEND_ACC_PUBLIC) - - /* Core conversion workhorses */ - PHP_ME(UConverter, convert, arginfo_class_UConverter_convert, ZEND_ACC_PUBLIC) - PHP_ME(UConverter, transcode, arginfo_class_UConverter_transcode, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) - - /* Error inspection */ - PHP_ME(UConverter, getErrorCode, arginfo_class_UConverter_getErrorCode, ZEND_ACC_PUBLIC) - PHP_ME(UConverter, getErrorMessage, arginfo_class_UConverter_getErrorMessage, ZEND_ACC_PUBLIC) - - /* Enumeration and lookup */ - PHP_ME(UConverter, reasonText, arginfo_class_UConverter_reasonText, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) - PHP_ME(UConverter, getAvailable, arginfo_class_UConverter_getAvailable, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) - PHP_ME(UConverter, getAliases, arginfo_class_UConverter_getAliases, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) - PHP_ME(UConverter, getStandards, arginfo_class_UConverter_getStandards, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) - PHP_FE_END -}; - /* {{{ Converter create/clone/destroy */ static void php_converter_dtor_object(zend_object *obj) { php_converter_object *objval = php_converter_fetch_object(obj); @@ -1009,7 +972,7 @@ static zend_object *php_converter_clone_object(zend_object *object) { int php_converter_minit(INIT_FUNC_ARGS) { zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "UConverter", php_converter_methods); + INIT_CLASS_ENTRY(ce, "UConverter", class_UConverter_methods); php_converter_ce = zend_register_internal_class(&ce); php_converter_ce->create_object = php_converter_create_object; memcpy(&php_converter_object_handlers, &std_object_handlers, sizeof(zend_object_handlers)); diff --git a/ext/intl/converter/converter.stub.php b/ext/intl/converter/converter.stub.php index 9441e433be362..fd6aa175b0fdb 100644 --- a/ext/intl/converter/converter.stub.php +++ b/ext/intl/converter/converter.stub.php @@ -1,5 +1,7 @@ -PHP_FUNCTION( datefmt_create ); -PHP_FUNCTION( datefmt_get_error_code ); -PHP_FUNCTION( datefmt_get_error_message ); -PHP_METHOD( IntlDateFormatter, __construct ); void dateformat_register_constants( INIT_FUNC_ARGS ); /* diff --git a/ext/intl/dateformat/dateformat.stub.php b/ext/intl/dateformat/dateformat.stub.php index 615eafd6e2c90..f5ccd271a62c7 100644 --- a/ext/intl/dateformat/dateformat.stub.php +++ b/ext/intl/dateformat/dateformat.stub.php @@ -1,5 +1,7 @@ #include diff --git a/ext/intl/dateformat/dateformat_attr.h b/ext/intl/dateformat/dateformat_attr.h deleted file mode 100644 index 321c1d607a83f..0000000000000 --- a/ext/intl/dateformat/dateformat_attr.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Kirti Velankar | - +----------------------------------------------------------------------+ -*/ -#ifndef DATE_FORMAT_ATTR_H -#define DATE_FORMAT_ATTR_H - -#include - -//PHP_FUNCTION( datefmt_get_timezone ); -PHP_FUNCTION( datefmt_get_datetype ); -PHP_FUNCTION( datefmt_get_timetype ); -PHP_FUNCTION( datefmt_get_locale ); -PHP_FUNCTION( datefmt_get_pattern ); -PHP_FUNCTION( datefmt_set_pattern ); -PHP_FUNCTION( datefmt_is_lenient ); -PHP_FUNCTION( datefmt_set_lenient ); - -#endif // DATE_FORMAT_ATTR_H diff --git a/ext/intl/dateformat/dateformat_attrcpp.cpp b/ext/intl/dateformat/dateformat_attrcpp.cpp index c37c451565d88..adf4759e7929f 100644 --- a/ext/intl/dateformat/dateformat_attrcpp.cpp +++ b/ext/intl/dateformat/dateformat_attrcpp.cpp @@ -21,7 +21,6 @@ extern "C" { #include "../php_intl.h" #include "dateformat_class.h" -#include "dateformat_attrcpp.h" #define USE_TIMEZONE_POINTER 1 #include "../timezone/timezone_class.h" #define USE_CALENDAR_POINTER 1 diff --git a/ext/intl/dateformat/dateformat_attrcpp.h b/ext/intl/dateformat/dateformat_attrcpp.h deleted file mode 100644 index e2f9ffe9b2d79..0000000000000 --- a/ext/intl/dateformat/dateformat_attrcpp.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Gustavo Lopes | - +----------------------------------------------------------------------+ -*/ - -#ifndef DATEFORMAT_ATTRCPP_H -#define DATEFORMAT_ATTRCPP_H - -PHP_FUNCTION(datefmt_get_timezone_id); - -PHP_FUNCTION(datefmt_get_timezone); - -PHP_FUNCTION(datefmt_set_timezone); - -PHP_FUNCTION(datefmt_get_calendar); - -PHP_FUNCTION(datefmt_set_calendar); - -PHP_FUNCTION(datefmt_get_calendar_object); - -#endif /* DATEFORMAT_ATTRCPP_H */ diff --git a/ext/intl/dateformat/dateformat_class.c b/ext/intl/dateformat/dateformat_class.c index 58331053dbf90..7d9dde20b056b 100644 --- a/ext/intl/dateformat/dateformat_class.c +++ b/ext/intl/dateformat/dateformat_class.c @@ -16,12 +16,7 @@ #include "dateformat_class.h" #include "php_intl.h" #include "dateformat_data.h" -#include "dateformat_format.h" -#include "dateformat_format_object.h" -#include "dateformat_parse.h" #include "dateformat.h" -#include "dateformat_attr.h" -#include "dateformat_attrcpp.h" #include "dateformat_arginfo.h" #include @@ -107,35 +102,6 @@ zend_object *IntlDateFormatter_object_clone(zend_object *object) * 'IntlDateFormatter' class registration structures & functions */ -/* {{{ IntlDateFormatter_class_functions - * Every 'IntlDateFormatter' class method has an entry in this table - */ -static const zend_function_entry IntlDateFormatter_class_functions[] = { - PHP_ME( IntlDateFormatter, __construct, arginfo_class_IntlDateFormatter___construct, ZEND_ACC_PUBLIC ) - ZEND_FENTRY( create, ZEND_FN( datefmt_create ), arginfo_class_IntlDateFormatter_create, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) - PHP_NAMED_FE( getDateType, ZEND_FN( datefmt_get_datetype ), arginfo_class_IntlDateFormatter_getDateType ) - PHP_NAMED_FE( getTimeType, ZEND_FN( datefmt_get_timetype ), arginfo_class_IntlDateFormatter_getTimeType ) - PHP_NAMED_FE( getCalendar, ZEND_FN( datefmt_get_calendar ), arginfo_class_IntlDateFormatter_getCalendar ) - PHP_NAMED_FE( getCalendarObject, ZEND_FN( datefmt_get_calendar_object ), arginfo_class_IntlDateFormatter_getCalendarObject ) - PHP_NAMED_FE( setCalendar, ZEND_FN( datefmt_set_calendar ), arginfo_class_IntlDateFormatter_setCalendar ) - PHP_NAMED_FE( getTimeZoneId, ZEND_FN( datefmt_get_timezone_id ), arginfo_class_IntlDateFormatter_getTimeZoneId ) - PHP_NAMED_FE( getTimeZone, ZEND_FN( datefmt_get_timezone ), arginfo_class_IntlDateFormatter_getTimeZone ) - PHP_NAMED_FE( setTimeZone, ZEND_FN( datefmt_set_timezone ), arginfo_class_IntlDateFormatter_setTimeZone ) - PHP_NAMED_FE( setPattern, ZEND_FN( datefmt_set_pattern ), arginfo_class_IntlDateFormatter_setPattern ) - PHP_NAMED_FE( getPattern, ZEND_FN( datefmt_get_pattern ), arginfo_class_IntlDateFormatter_getPattern ) - PHP_NAMED_FE( getLocale, ZEND_FN( datefmt_get_locale ), arginfo_class_IntlDateFormatter_getLocale ) - PHP_NAMED_FE( setLenient, ZEND_FN( datefmt_set_lenient ), arginfo_class_IntlDateFormatter_setLenient ) - PHP_NAMED_FE( isLenient, ZEND_FN( datefmt_is_lenient ), arginfo_class_IntlDateFormatter_isLenient ) - PHP_NAMED_FE( format, ZEND_FN( datefmt_format ), arginfo_class_IntlDateFormatter_format ) - PHP_ME_MAPPING( formatObject, datefmt_format_object, arginfo_class_IntlDateFormatter_formatObject, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_NAMED_FE( parse, ZEND_FN( datefmt_parse), arginfo_class_IntlDateFormatter_parse ) - PHP_NAMED_FE( localtime, ZEND_FN( datefmt_localtime ), arginfo_class_IntlDateFormatter_localtime ) - PHP_NAMED_FE( getErrorCode, ZEND_FN( datefmt_get_error_code ), arginfo_class_IntlDateFormatter_getErrorCode ) - PHP_NAMED_FE( getErrorMessage, ZEND_FN( datefmt_get_error_message ), arginfo_class_IntlDateFormatter_getErrorMessage ) - PHP_FE_END -}; -/* }}} */ - /* {{{ dateformat_register_class * Initialize 'IntlDateFormatter' class */ @@ -144,7 +110,7 @@ void dateformat_register_IntlDateFormatter_class( void ) zend_class_entry ce; /* Create and register 'IntlDateFormatter' class. */ - INIT_CLASS_ENTRY( ce, "IntlDateFormatter", IntlDateFormatter_class_functions ); + INIT_CLASS_ENTRY( ce, "IntlDateFormatter", class_IntlDateFormatter_methods ); ce.create_object = IntlDateFormatter_object_create; IntlDateFormatter_ce_ptr = zend_register_internal_class( &ce ); diff --git a/ext/intl/dateformat/dateformat_create.h b/ext/intl/dateformat/dateformat_create.h index 3bf357b702b29..f8d1e1b9334f6 100644 --- a/ext/intl/dateformat/dateformat_create.h +++ b/ext/intl/dateformat/dateformat_create.h @@ -16,8 +16,6 @@ #include -PHP_FUNCTION( datefmt_create ); -PHP_METHOD( IntlDateFormatter, __construct ); void dateformat_register_constants( INIT_FUNC_ARGS ); #endif // DATE_FORMATTER_H diff --git a/ext/intl/dateformat/dateformat_format.c b/ext/intl/dateformat/dateformat_format.c index 3c70089b7ab58..4b1b5208443b8 100644 --- a/ext/intl/dateformat/dateformat_format.c +++ b/ext/intl/dateformat/dateformat_format.c @@ -25,7 +25,6 @@ #include "../common/common_date.h" #include "dateformat.h" #include "dateformat_class.h" -#include "dateformat_format.h" #include "dateformat_data.h" /* {{{ diff --git a/ext/intl/dateformat/dateformat_format.h b/ext/intl/dateformat/dateformat_format.h deleted file mode 100644 index b8bd248d23433..0000000000000 --- a/ext/intl/dateformat/dateformat_format.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Stanislav Malyshev | - +----------------------------------------------------------------------+ - */ - -#ifndef DATE_FORMAT_FORMAT_H -#define DATE_FORMAT_FORMAT_H - -#include - -PHP_FUNCTION( datefmt_format ); - -#endif // DATE_FORMAT_FORMAT_H diff --git a/ext/intl/dateformat/dateformat_format_object.h b/ext/intl/dateformat/dateformat_format_object.h deleted file mode 100644 index a4c9c42589eab..0000000000000 --- a/ext/intl/dateformat/dateformat_format_object.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Gustavo Lopes | - +----------------------------------------------------------------------+ - */ - -#include - -PHP_FUNCTION(datefmt_format_object); diff --git a/ext/intl/dateformat/dateformat_parse.c b/ext/intl/dateformat/dateformat_parse.c index c6fc4fa9ca8c0..d63cce999dc3a 100644 --- a/ext/intl/dateformat/dateformat_parse.c +++ b/ext/intl/dateformat/dateformat_parse.c @@ -23,7 +23,6 @@ #include "intl_convert.h" #include "dateformat.h" #include "dateformat_class.h" -#include "dateformat_parse.h" #include "dateformat_data.h" /* {{{ diff --git a/ext/intl/dateformat/dateformat_parse.h b/ext/intl/dateformat/dateformat_parse.h deleted file mode 100644 index e9184864f0c97..0000000000000 --- a/ext/intl/dateformat/dateformat_parse.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Kirti Velankar | - +----------------------------------------------------------------------+ -*/ -#ifndef DATE_FORMAT_PARSE_H -#define DATE_FORMAT_PARSE_H - -#include - -PHP_FUNCTION( datefmt_parse ); -PHP_FUNCTION( datefmt_localtime ); - -#endif // DATE_FORMAT_PARSE_H diff --git a/ext/intl/formatter/formatter.stub.php b/ext/intl/formatter/formatter.stub.php index 6badb6e87d770..2d5dc119666a5 100644 --- a/ext/intl/formatter/formatter.stub.php +++ b/ext/intl/formatter/formatter.stub.php @@ -1,57 +1,105 @@ diff --git a/ext/intl/formatter/formatter_attr.h b/ext/intl/formatter/formatter_attr.h deleted file mode 100644 index 5451aa0e9a9c2..0000000000000 --- a/ext/intl/formatter/formatter_attr.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Stanislav Malyshev | - +----------------------------------------------------------------------+ - */ - -#ifndef FORMATTER_ATTR_H -#define FORMATTER_ATTR_H - -#include - -PHP_FUNCTION( numfmt_set_attribute ); -PHP_FUNCTION( numfmt_get_attribute ); -PHP_FUNCTION( numfmt_set_text_attribute ); -PHP_FUNCTION( numfmt_get_text_attribute ); -PHP_FUNCTION( numfmt_set_symbol ); -PHP_FUNCTION( numfmt_get_symbol ); -PHP_FUNCTION( numfmt_set_pattern ); -PHP_FUNCTION( numfmt_get_pattern ); -PHP_FUNCTION( numfmt_get_locale ); - -#endif // FORMATTER_ATTR_H diff --git a/ext/intl/formatter/formatter_class.c b/ext/intl/formatter/formatter_class.c index ee4e74c835830..f7965ec7d11e5 100644 --- a/ext/intl/formatter/formatter_class.c +++ b/ext/intl/formatter/formatter_class.c @@ -18,9 +18,6 @@ #include "php_intl.h" #include "formatter_data.h" #include "formatter_format.h" -#include "formatter_parse.h" -#include "formatter_main.h" -#include "formatter_attr.h" #include "formatter_arginfo.h" #include @@ -92,31 +89,6 @@ zend_object *NumberFormatter_object_clone(zend_object *object) * 'NumberFormatter' class registration structures & functions */ -/* {{{ NumberFormatter_class_functions - * Every 'NumberFormatter' class method has an entry in this table - */ -static const zend_function_entry NumberFormatter_class_functions[] = { - PHP_ME( NumberFormatter, __construct, arginfo_class_NumberFormatter___construct, ZEND_ACC_PUBLIC ) - ZEND_FENTRY( create, ZEND_FN( numfmt_create ), arginfo_class_NumberFormatter_create, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) - PHP_NAMED_FE( format, ZEND_FN( numfmt_format ), arginfo_class_NumberFormatter_format ) - PHP_NAMED_FE( parse, ZEND_FN( numfmt_parse ), arginfo_class_NumberFormatter_parse ) - PHP_NAMED_FE( formatCurrency, ZEND_FN( numfmt_format_currency ), arginfo_class_NumberFormatter_formatCurrency ) - PHP_NAMED_FE( parseCurrency, ZEND_FN( numfmt_parse_currency ), arginfo_class_NumberFormatter_parseCurrency ) - PHP_NAMED_FE( setAttribute, ZEND_FN( numfmt_set_attribute ), arginfo_class_NumberFormatter_setAttribute ) - PHP_NAMED_FE( getAttribute, ZEND_FN( numfmt_get_attribute ), arginfo_class_NumberFormatter_getAttribute ) - PHP_NAMED_FE( setTextAttribute, ZEND_FN( numfmt_set_text_attribute ), arginfo_class_NumberFormatter_setTextAttribute ) - PHP_NAMED_FE( getTextAttribute, ZEND_FN( numfmt_get_text_attribute ), arginfo_class_NumberFormatter_getTextAttribute ) - PHP_NAMED_FE( setSymbol, ZEND_FN( numfmt_set_symbol ), arginfo_class_NumberFormatter_setSymbol ) - PHP_NAMED_FE( getSymbol, ZEND_FN( numfmt_get_symbol ), arginfo_class_NumberFormatter_getSymbol ) - PHP_NAMED_FE( setPattern, ZEND_FN( numfmt_set_pattern ), arginfo_class_NumberFormatter_setPattern ) - PHP_NAMED_FE( getPattern, ZEND_FN( numfmt_get_pattern ), arginfo_class_NumberFormatter_getPattern ) - PHP_NAMED_FE( getLocale, ZEND_FN( numfmt_get_locale ), arginfo_class_NumberFormatter_getLocale ) - PHP_NAMED_FE( getErrorCode, ZEND_FN( numfmt_get_error_code ), arginfo_class_NumberFormatter_getErrorCode ) - PHP_NAMED_FE( getErrorMessage, ZEND_FN( numfmt_get_error_message ), arginfo_class_NumberFormatter_getErrorMessage ) - PHP_FE_END -}; -/* }}} */ - /* {{{ formatter_register_class * Initialize 'NumberFormatter' class */ @@ -125,7 +97,7 @@ void formatter_register_class( void ) zend_class_entry ce; /* Create and register 'NumberFormatter' class. */ - INIT_CLASS_ENTRY( ce, "NumberFormatter", NumberFormatter_class_functions ); + INIT_CLASS_ENTRY( ce, "NumberFormatter", class_NumberFormatter_methods ); ce.create_object = NumberFormatter_object_create; NumberFormatter_ce_ptr = zend_register_internal_class( &ce ); NumberFormatter_ce_ptr->serialize = zend_class_serialize_deny; diff --git a/ext/intl/formatter/formatter_format.h b/ext/intl/formatter/formatter_format.h index d6c0364962290..ab4362674622e 100644 --- a/ext/intl/formatter/formatter_format.h +++ b/ext/intl/formatter/formatter_format.h @@ -17,9 +17,6 @@ #include -PHP_FUNCTION( numfmt_format ); -PHP_FUNCTION( numfmt_format_currency ); - #define FORMAT_TYPE_DEFAULT 0 #define FORMAT_TYPE_INT32 1 #define FORMAT_TYPE_INT64 2 diff --git a/ext/intl/formatter/formatter_main.h b/ext/intl/formatter/formatter_main.h deleted file mode 100644 index f932e3cc71d6e..0000000000000 --- a/ext/intl/formatter/formatter_main.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Stanislav Malyshev | - +----------------------------------------------------------------------+ - */ - -#ifndef FORMATTER_MAIN_H -#define FORMATTER_MAIN_H - -#include - -PHP_FUNCTION( numfmt_create ); -PHP_FUNCTION( numfmt_get_error_code ); -PHP_FUNCTION( numfmt_get_error_message ); -PHP_METHOD( NumberFormatter, __construct ); - -#endif // FORMATTER_FORMAT_H diff --git a/ext/intl/formatter/formatter_parse.c b/ext/intl/formatter/formatter_parse.c index 1278c014d539b..b455398ddc4e6 100644 --- a/ext/intl/formatter/formatter_parse.c +++ b/ext/intl/formatter/formatter_parse.c @@ -23,7 +23,6 @@ #include "formatter_class.h" #include "formatter_format.h" -#include "formatter_parse.h" #include "intl_convert.h" #define ICU_LOCALE_BUG 1 diff --git a/ext/intl/formatter/formatter_parse.h b/ext/intl/formatter/formatter_parse.h deleted file mode 100644 index 039669d7fae59..0000000000000 --- a/ext/intl/formatter/formatter_parse.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Stanislav Malyshev | - +----------------------------------------------------------------------+ - */ - -#ifndef FORMATTER_PARSE_H -#define FORMATTER_PARSE_H - -#include - -PHP_FUNCTION( numfmt_parse ); -PHP_FUNCTION( numfmt_parse_currency ); - -#endif // FORMATTER_PARSE_H diff --git a/ext/intl/grapheme/grapheme.h b/ext/intl/grapheme/grapheme.h index 62aa1ec1b2a7f..db5ef51352ae3 100644 --- a/ext/intl/grapheme/grapheme.h +++ b/ext/intl/grapheme/grapheme.h @@ -18,16 +18,6 @@ #include #include -PHP_FUNCTION(grapheme_strlen); -PHP_FUNCTION(grapheme_strpos); -PHP_FUNCTION(grapheme_stripos); -PHP_FUNCTION(grapheme_strrpos); -PHP_FUNCTION(grapheme_strripos); -PHP_FUNCTION(grapheme_substr); -PHP_FUNCTION(grapheme_strstr); -PHP_FUNCTION(grapheme_stristr); -PHP_FUNCTION(grapheme_extract); - void grapheme_register_constants( INIT_FUNC_ARGS ); void grapheme_close_global_iterator( void ); diff --git a/ext/intl/idn/idn.h b/ext/intl/idn/idn.h index 801af9ee73075..2ad2864100b47 100644 --- a/ext/intl/idn/idn.h +++ b/ext/intl/idn/idn.h @@ -19,9 +19,6 @@ #include -PHP_FUNCTION(idn_to_ascii); -PHP_FUNCTION(idn_to_utf8); - void idn_register_constants(INIT_FUNC_ARGS); #endif /* IDN_IDN_H */ diff --git a/ext/intl/locale/locale.stub.php b/ext/intl/locale/locale.stub.php index 093e46f35d576..8a23a291b0d95 100644 --- a/ext/intl/locale/locale.stub.php +++ b/ext/intl/locale/locale.stub.php @@ -1,58 +1,114 @@ | - +----------------------------------------------------------------------+ -*/ - -#ifndef LOCALE_METHODS_H -#define LOCALE_METHODS_H - -#include - -PHP_FUNCTION( locale_get_primary_language ); -PHP_FUNCTION( locale_get_script ); -PHP_FUNCTION( locale_get_region ); -PHP_FUNCTION( locale_get_all_variants); - -PHP_NAMED_FUNCTION( zif_locale_get_default ); -PHP_NAMED_FUNCTION( zif_locale_set_default ); - -PHP_FUNCTION( locale_get_display_name ); -PHP_FUNCTION( locale_get_display_language ); -PHP_FUNCTION( locale_get_display_script ); -PHP_FUNCTION( locale_get_display_region ); -PHP_FUNCTION( locale_get_display_variant ); - -PHP_FUNCTION( locale_get_keywords ); -PHP_FUNCTION( locale_canonicalize); - -PHP_FUNCTION( locale_compose); -PHP_FUNCTION( locale_parse); - -PHP_FUNCTION( locale_filter_matches); -PHP_FUNCTION( locale_lookup); -PHP_FUNCTION( locale_canonicalize); -PHP_FUNCTION( locale_accept_from_http); - -#endif // LOCALE_METHODS_H diff --git a/ext/intl/msgformat/msgformat.h b/ext/intl/msgformat/msgformat.h deleted file mode 100644 index e4a55ffa5e3f3..0000000000000 --- a/ext/intl/msgformat/msgformat.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Stanislav Malyshev | - +----------------------------------------------------------------------+ - */ - -#ifndef MSG_FORMATTER_H -#define MSG_FORMATTER_H - -#include - -PHP_FUNCTION( msgfmt_create ); -PHP_FUNCTION( msgfmt_get_error_code ); -PHP_FUNCTION( msgfmt_get_error_message ); -PHP_METHOD( MessageFormatter, __construct ); - -#endif // MSG_FORMAT_H diff --git a/ext/intl/msgformat/msgformat.stub.php b/ext/intl/msgformat/msgformat.stub.php index 8dbd6b8bba0ce..a7fdb91a0cf39 100644 --- a/ext/intl/msgformat/msgformat.stub.php +++ b/ext/intl/msgformat/msgformat.stub.php @@ -1,36 +1,68 @@ | - +----------------------------------------------------------------------+ - */ - -#ifndef MSG_FORMAT_ATTR_H -#define MSG_FORMAT_ATTR_H - -#include - -PHP_FUNCTION( msgfmt_set_pattern ); -PHP_FUNCTION( msgfmt_get_pattern ); -PHP_FUNCTION( msgfmt_get_locale ); - -#endif // MSG_FORMAT_ATTR_H diff --git a/ext/intl/msgformat/msgformat_class.c b/ext/intl/msgformat/msgformat_class.c index 2adbcbbfac915..d8bf9a006c050 100644 --- a/ext/intl/msgformat/msgformat_class.c +++ b/ext/intl/msgformat/msgformat_class.c @@ -17,10 +17,6 @@ #include "msgformat_class.h" #include "php_intl.h" #include "msgformat_data.h" -#include "msgformat_format.h" -#include "msgformat_parse.h" -#include "msgformat.h" -#include "msgformat_attr.h" #include "msgformat_arginfo.h" #include @@ -92,25 +88,6 @@ zend_object *MessageFormatter_object_clone(zend_object *object) * 'MessageFormatter' class registration structures & functions */ -/* {{{ MessageFormatter_class_functions - * Every 'MessageFormatter' class method has an entry in this table - */ -static const zend_function_entry MessageFormatter_class_functions[] = { - PHP_ME( MessageFormatter, __construct, arginfo_class_MessageFormatter___construct, ZEND_ACC_PUBLIC ) - ZEND_FENTRY( create, ZEND_FN( msgfmt_create ), arginfo_class_MessageFormatter_create, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) - PHP_NAMED_FE( format, ZEND_FN( msgfmt_format ), arginfo_class_MessageFormatter_format ) - ZEND_FENTRY( formatMessage, ZEND_FN( msgfmt_format_message ), arginfo_class_MessageFormatter_formatMessage, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) - PHP_NAMED_FE( parse, ZEND_FN( msgfmt_parse ), arginfo_class_MessageFormatter_parse ) - ZEND_FENTRY( parseMessage, ZEND_FN( msgfmt_parse_message ), arginfo_class_MessageFormatter_parseMessage, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) - PHP_NAMED_FE( setPattern, ZEND_FN( msgfmt_set_pattern ), arginfo_class_MessageFormatter_setPattern ) - PHP_NAMED_FE( getPattern, ZEND_FN( msgfmt_get_pattern ), arginfo_class_MessageFormatter_getPattern ) - PHP_NAMED_FE( getLocale, ZEND_FN( msgfmt_get_locale ), arginfo_class_MessageFormatter_getLocale ) - PHP_NAMED_FE( getErrorCode, ZEND_FN( msgfmt_get_error_code ), arginfo_class_MessageFormatter_getErrorCode ) - PHP_NAMED_FE( getErrorMessage, ZEND_FN( msgfmt_get_error_message ), arginfo_class_MessageFormatter_getErrorMessage ) - PHP_FE_END -}; -/* }}} */ - /* {{{ msgformat_register_class * Initialize 'MessageFormatter' class */ @@ -119,7 +96,7 @@ void msgformat_register_class( void ) zend_class_entry ce; /* Create and register 'MessageFormatter' class. */ - INIT_CLASS_ENTRY( ce, "MessageFormatter", MessageFormatter_class_functions ); + INIT_CLASS_ENTRY( ce, "MessageFormatter", class_MessageFormatter_methods ); ce.create_object = MessageFormatter_object_create; MessageFormatter_ce_ptr = zend_register_internal_class( &ce ); diff --git a/ext/intl/msgformat/msgformat_format.c b/ext/intl/msgformat/msgformat_format.c index 56a3a11782219..d54f3a12c6d87 100644 --- a/ext/intl/msgformat/msgformat_format.c +++ b/ext/intl/msgformat/msgformat_format.c @@ -20,7 +20,6 @@ #include "php_intl.h" #include "msgformat_class.h" -#include "msgformat_format.h" #include "msgformat_data.h" #include "msgformat_helpers.h" #include "intl_convert.h" diff --git a/ext/intl/msgformat/msgformat_format.h b/ext/intl/msgformat/msgformat_format.h deleted file mode 100644 index 9694d57f8d174..0000000000000 --- a/ext/intl/msgformat/msgformat_format.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Stanislav Malyshev | - +----------------------------------------------------------------------+ - */ - -#ifndef MSG_FORMAT_FORMAT_H -#define MSG_FORMAT_FORMAT_H - -#include - -PHP_FUNCTION( msgfmt_format ); -PHP_FUNCTION( msgfmt_format_message ); - -#endif // MSG_FORMAT_FORMAT_H diff --git a/ext/intl/msgformat/msgformat_helpers.cpp b/ext/intl/msgformat/msgformat_helpers.cpp index 3644e393d3962..55d3bdd7861e8 100644 --- a/ext/intl/msgformat/msgformat_helpers.cpp +++ b/ext/intl/msgformat/msgformat_helpers.cpp @@ -35,7 +35,6 @@ extern "C" { #include "php_intl.h" #include "msgformat_class.h" -#include "msgformat_format.h" #include "msgformat_helpers.h" #include "intl_convert.h" #define USE_TIMEZONE_POINTER diff --git a/ext/intl/msgformat/msgformat_parse.c b/ext/intl/msgformat/msgformat_parse.c index 006d9d8999aa7..70fbf253958f8 100644 --- a/ext/intl/msgformat/msgformat_parse.c +++ b/ext/intl/msgformat/msgformat_parse.c @@ -20,7 +20,6 @@ #include "php_intl.h" #include "msgformat_class.h" -#include "msgformat_parse.h" #include "msgformat_data.h" #include "msgformat_helpers.h" #include "intl_convert.h" diff --git a/ext/intl/msgformat/msgformat_parse.h b/ext/intl/msgformat/msgformat_parse.h deleted file mode 100644 index 8fe1b7beac540..0000000000000 --- a/ext/intl/msgformat/msgformat_parse.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Stanislav Malyshev | - +----------------------------------------------------------------------+ - */ - -#ifndef MSG_FORMAT_PARSE_H -#define MSG_FORMAT_PARSE_H - -#include - -PHP_FUNCTION( msgfmt_parse ); -PHP_FUNCTION( msgfmt_parse_message ); - -#endif // MSG_FORMAT_PARSE_H diff --git a/ext/intl/normalizer/normalizer.stub.php b/ext/intl/normalizer/normalizer.stub.php index cfa19252627d5..797eb236b7e77 100644 --- a/ext/intl/normalizer/normalizer.stub.php +++ b/ext/intl/normalizer/normalizer.stub.php @@ -1,15 +1,26 @@ = 56 - /** @return string|null */ + /** + * @return string|null + * @alias normalizer_get_raw_decomposition + */ public static function getRawDecomposition(string $input, int $form = Normalizer::FORM_C) {} #endif } diff --git a/ext/intl/normalizer/normalizer_arginfo.h b/ext/intl/normalizer/normalizer_arginfo.h index d4cb5d80fec7b..aee7284c8b42a 100644 --- a/ext/intl/normalizer/normalizer_arginfo.h +++ b/ext/intl/normalizer/normalizer_arginfo.h @@ -13,3 +13,20 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Normalizer_getRawDecomposition, 0, 0, 1) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, form, IS_LONG, 0, "Normalizer::FORM_C") ZEND_END_ARG_INFO() #endif + + +ZEND_FUNCTION(normalizer_normalize); +ZEND_FUNCTION(normalizer_is_normalized); +#if U_ICU_VERSION_MAJOR_NUM >= 56 +ZEND_FUNCTION(normalizer_get_raw_decomposition); +#endif + + +static const zend_function_entry class_Normalizer_methods[] = { + ZEND_ME_MAPPING(normalize, normalizer_normalize, arginfo_class_Normalizer_normalize, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME_MAPPING(isNormalized, normalizer_is_normalized, arginfo_class_Normalizer_isNormalized, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) +#if U_ICU_VERSION_MAJOR_NUM >= 56 + ZEND_ME_MAPPING(getRawDecomposition, normalizer_get_raw_decomposition, arginfo_class_Normalizer_getRawDecomposition, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) +#endif + ZEND_FE_END +}; diff --git a/ext/intl/normalizer/normalizer_class.c b/ext/intl/normalizer/normalizer_class.c index 0b6033893cb4a..7a46acb0b29f4 100644 --- a/ext/intl/normalizer/normalizer_class.c +++ b/ext/intl/normalizer/normalizer_class.c @@ -14,7 +14,6 @@ #include "normalizer_class.h" #include "php_intl.h" -#include "normalizer_normalize.h" #include "normalizer_arginfo.h" #include "intl_error.h" @@ -26,20 +25,6 @@ zend_class_entry *Normalizer_ce_ptr = NULL; * 'Normalizer' class registration structures & functions */ -/* {{{ Normalizer_class_functions - * Every 'Normalizer' class method has an entry in this table - */ - -static const zend_function_entry Normalizer_class_functions[] = { - ZEND_FENTRY( normalize, ZEND_FN( normalizer_normalize ), arginfo_class_Normalizer_normalize, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) - ZEND_FENTRY( isNormalized, ZEND_FN( normalizer_is_normalized ), arginfo_class_Normalizer_isNormalized, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) -#if U_ICU_VERSION_MAJOR_NUM >= 56 - ZEND_FENTRY( getRawDecomposition, ZEND_FN( normalizer_get_raw_decomposition ), arginfo_class_Normalizer_getRawDecomposition, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) -#endif - PHP_FE_END -}; -/* }}} */ - /* {{{ normalizer_register_Normalizer_class * Initialize 'Normalizer' class */ @@ -48,7 +33,7 @@ void normalizer_register_Normalizer_class( void ) zend_class_entry ce; /* Create and register 'Normalizer' class. */ - INIT_CLASS_ENTRY( ce, "Normalizer", Normalizer_class_functions ); + INIT_CLASS_ENTRY( ce, "Normalizer", class_Normalizer_methods ); ce.create_object = NULL; Normalizer_ce_ptr = zend_register_internal_class( &ce ); diff --git a/ext/intl/normalizer/normalizer_normalize.c b/ext/intl/normalizer/normalizer_normalize.c index 5a768730f6914..0672631bcd81f 100644 --- a/ext/intl/normalizer/normalizer_normalize.c +++ b/ext/intl/normalizer/normalizer_normalize.c @@ -24,7 +24,6 @@ #endif #include "normalizer.h" #include "normalizer_class.h" -#include "normalizer_normalize.h" #include "intl_convert.h" #include diff --git a/ext/intl/normalizer/normalizer_normalize.h b/ext/intl/normalizer/normalizer_normalize.h deleted file mode 100644 index 9c15f348ce40a..0000000000000 --- a/ext/intl/normalizer/normalizer_normalize.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Ed Batutis | - +----------------------------------------------------------------------+ - */ - -#ifndef NORMALIZER_NORMALIZE_H -#define NORMALIZER_NORMALIZE_H - -#include - -PHP_FUNCTION( normalizer_normalize ); -PHP_FUNCTION( normalizer_is_normalized ); -#if U_ICU_VERSION_MAJOR_NUM >= 56 -PHP_FUNCTION( normalizer_get_raw_decomposition ); -#endif - -#endif // NORMALIZER_NORMALIZE_H diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.c index 2997f453e7d1b..be2ed2718e84a 100644 --- a/ext/intl/php_intl.c +++ b/ext/intl/php_intl.c @@ -25,60 +25,37 @@ #include "intl_error.h" #include "collator/collator_class.h" #include "collator/collator.h" -#include "collator/collator_attr.h" -#include "collator/collator_compare.h" #include "collator/collator_sort.h" #include "collator/collator_convert.h" -#include "collator/collator_locale.h" -#include "collator/collator_create.h" -#include "collator/collator_error.h" #include "converter/converter.h" #include "formatter/formatter.h" #include "formatter/formatter_class.h" -#include "formatter/formatter_attr.h" #include "formatter/formatter_format.h" -#include "formatter/formatter_main.h" -#include "formatter/formatter_parse.h" #include "grapheme/grapheme.h" -#include "msgformat/msgformat.h" #include "msgformat/msgformat_class.h" -#include "msgformat/msgformat_attr.h" -#include "msgformat/msgformat_format.h" -#include "msgformat/msgformat_parse.h" #include "normalizer/normalizer.h" #include "normalizer/normalizer_class.h" -#include "normalizer/normalizer_normalize.h" #include "locale/locale.h" #include "locale/locale_class.h" -#include "locale/locale_methods.h" #include "dateformat/dateformat.h" #include "dateformat/dateformat_class.h" -#include "dateformat/dateformat_attr.h" -#include "dateformat/dateformat_attrcpp.h" -#include "dateformat/dateformat_format.h" -#include "dateformat/dateformat_format_object.h" -#include "dateformat/dateformat_parse.h" #include "dateformat/dateformat_data.h" #include "resourcebundle/resourcebundle_class.h" #include "transliterator/transliterator.h" #include "transliterator/transliterator_class.h" -#include "transliterator/transliterator_methods.h" #include "timezone/timezone_class.h" -#include "timezone/timezone_methods.h" #include "calendar/calendar_class.h" -#include "calendar/calendar_methods.h" -#include "calendar/gregoriancalendar_methods.h" #include "breakiterator/breakiterator_class.h" #include "breakiterator/breakiterator_iterators.h" @@ -88,10 +65,7 @@ # include "spoofchecker/spoofchecker_class.h" # include "spoofchecker/spoofchecker.h" -# include "spoofchecker/spoofchecker_create.h" -# include "spoofchecker/spoofchecker_main.h" -#include "msgformat/msgformat.h" #include "common/common_error.h" #include "common/common_enum.h" @@ -121,223 +95,6 @@ const char *intl_locale_get_default( void ) return INTL_G(default_locale); } -/* {{{ intl_functions - * - * Every user visible function must have an entry in intl_functions[]. - */ -static const zend_function_entry intl_functions[] = { - - /* collator functions */ - PHP_FE( collator_create, arginfo_collator_create ) - PHP_FE( collator_compare, arginfo_collator_compare ) - PHP_FE( collator_get_attribute, arginfo_collator_get_attribute ) - PHP_FE( collator_set_attribute, arginfo_collator_set_attribute ) - PHP_FE( collator_get_strength, arginfo_collator_get_strength ) - PHP_FE( collator_set_strength, arginfo_collator_set_strength ) - PHP_FE( collator_sort, arginfo_collator_sort ) - PHP_FE( collator_sort_with_sort_keys, arginfo_collator_sort_with_sort_keys ) - PHP_FE( collator_asort, arginfo_collator_asort ) - PHP_FE( collator_get_locale, arginfo_collator_get_locale ) - PHP_FE( collator_get_error_code, arginfo_collator_get_error_code ) - PHP_FE( collator_get_error_message, arginfo_collator_get_error_message ) - PHP_FE( collator_get_sort_key, arginfo_collator_get_sort_key ) - - /* formatter functions */ - PHP_FE( numfmt_create, arginfo_numfmt_create ) - PHP_FE( numfmt_format, arginfo_numfmt_format ) - PHP_FE( numfmt_parse, arginfo_numfmt_parse ) - PHP_FE( numfmt_format_currency, arginfo_numfmt_format_currency ) - PHP_FE( numfmt_parse_currency, arginfo_numfmt_parse_currency ) - PHP_FE( numfmt_set_attribute, arginfo_numfmt_set_attribute ) - PHP_FE( numfmt_get_attribute, arginfo_numfmt_get_attribute ) - PHP_FE( numfmt_set_text_attribute, arginfo_numfmt_set_text_attribute ) - PHP_FE( numfmt_get_text_attribute, arginfo_numfmt_get_text_attribute ) - PHP_FE( numfmt_set_symbol, arginfo_numfmt_set_symbol ) - PHP_FE( numfmt_get_symbol, arginfo_numfmt_get_symbol ) - PHP_FE( numfmt_set_pattern, arginfo_numfmt_set_pattern ) - PHP_FE( numfmt_get_pattern, arginfo_numfmt_get_pattern ) - PHP_FE( numfmt_get_locale, arginfo_numfmt_get_locale ) - PHP_FE( numfmt_get_error_code, arginfo_numfmt_get_error_code ) - PHP_FE( numfmt_get_error_message, arginfo_numfmt_get_error_message ) - - /* normalizer functions */ - PHP_FE( normalizer_normalize, arginfo_normalizer_normalize ) - PHP_FE( normalizer_is_normalized, arginfo_normalizer_is_normalized ) -#if U_ICU_VERSION_MAJOR_NUM >= 56 - PHP_FE( normalizer_get_raw_decomposition, arginfo_normalizer_get_raw_decomposition ) -#endif - - /* Locale functions */ - PHP_NAMED_FE( locale_get_default, zif_locale_get_default, arginfo_locale_get_default ) - PHP_NAMED_FE( locale_set_default, zif_locale_set_default, arginfo_locale_set_default ) - PHP_FE( locale_get_primary_language, arginfo_locale_get_primary_language ) - PHP_FE( locale_get_script, arginfo_locale_get_script ) - PHP_FE( locale_get_region, arginfo_locale_get_region ) - PHP_FE( locale_get_keywords, arginfo_locale_get_keywords ) - PHP_FE( locale_get_display_script, arginfo_locale_get_display_script ) - PHP_FE( locale_get_display_region, arginfo_locale_get_display_region ) - PHP_FE( locale_get_display_name, arginfo_locale_get_display_name ) - PHP_FE( locale_get_display_language, arginfo_locale_get_display_language) - PHP_FE( locale_get_display_variant, arginfo_locale_get_display_variant ) - PHP_FE( locale_compose, arginfo_locale_compose ) - PHP_FE( locale_parse, arginfo_locale_parse ) - PHP_FE( locale_get_all_variants, arginfo_locale_get_all_variants ) - PHP_FE( locale_filter_matches, arginfo_locale_filter_matches ) - PHP_FE( locale_canonicalize, arginfo_locale_canonicalize ) - PHP_FE( locale_lookup, arginfo_locale_lookup ) - PHP_FE( locale_accept_from_http, arginfo_locale_accept_from_http ) - - /* MessageFormatter functions */ - PHP_FE( msgfmt_create, arginfo_msgfmt_create ) - PHP_FE( msgfmt_format, arginfo_msgfmt_format ) - PHP_FE( msgfmt_format_message, arginfo_msgfmt_format_message ) - PHP_FE( msgfmt_parse, arginfo_msgfmt_parse ) - PHP_FE( msgfmt_parse_message, arginfo_msgfmt_parse_message ) - PHP_FE( msgfmt_set_pattern, arginfo_msgfmt_set_pattern ) - PHP_FE( msgfmt_get_pattern, arginfo_msgfmt_get_locale ) - PHP_FE( msgfmt_get_locale, arginfo_msgfmt_get_locale ) - PHP_FE( msgfmt_get_error_code, arginfo_msgfmt_get_error_code ) - PHP_FE( msgfmt_get_error_message, arginfo_msgfmt_get_error_message ) - - /* IntlDateFormatter functions */ - PHP_FE( datefmt_create, arginfo_datefmt_create ) - PHP_FE( datefmt_get_datetype, arginfo_datefmt_get_datetype ) - PHP_FE( datefmt_get_timetype, arginfo_datefmt_get_timetype ) - PHP_FE( datefmt_get_calendar, arginfo_datefmt_get_calendar ) - PHP_FE( datefmt_get_calendar_object, arginfo_datefmt_get_calendar_object ) - PHP_FE( datefmt_set_calendar, arginfo_datefmt_set_calendar ) - PHP_FE( datefmt_get_locale, arginfo_datefmt_get_locale ) - PHP_FE( datefmt_get_timezone_id, arginfo_datefmt_get_timezone_id ) - PHP_FE( datefmt_get_timezone, arginfo_datefmt_get_timezone ) - PHP_FE( datefmt_set_timezone, arginfo_datefmt_set_timezone ) - PHP_FE( datefmt_get_pattern, arginfo_datefmt_get_pattern ) - PHP_FE( datefmt_set_pattern, arginfo_datefmt_set_pattern ) - PHP_FE( datefmt_is_lenient, arginfo_datefmt_is_lenient ) - PHP_FE( datefmt_set_lenient, arginfo_datefmt_set_lenient ) - PHP_FE( datefmt_format, arginfo_datefmt_format ) - PHP_FE( datefmt_format_object, arginfo_datefmt_format_object ) - PHP_FE( datefmt_parse, arginfo_datefmt_parse ) - PHP_FE( datefmt_localtime , arginfo_datefmt_localtime ) - PHP_FE( datefmt_get_error_code, arginfo_datefmt_get_error_code ) - PHP_FE( datefmt_get_error_message, arginfo_datefmt_get_error_message ) - - /* grapheme functions */ - PHP_FE( grapheme_strlen, arginfo_grapheme_strlen ) - PHP_FE( grapheme_strpos, arginfo_grapheme_strpos ) - PHP_FE( grapheme_stripos, arginfo_grapheme_stripos ) - PHP_FE( grapheme_strrpos, arginfo_grapheme_strrpos ) - PHP_FE( grapheme_strripos, arginfo_grapheme_strripos ) - PHP_FE( grapheme_substr, arginfo_grapheme_substr ) - PHP_FE( grapheme_strstr, arginfo_grapheme_strstr ) - PHP_FE( grapheme_stristr, arginfo_grapheme_stristr ) - PHP_FE( grapheme_extract, arginfo_grapheme_extract ) - - /* IDN functions */ - PHP_FE( idn_to_ascii, arginfo_idn_to_ascii) - PHP_FE( idn_to_utf8, arginfo_idn_to_utf8) - - /* ResourceBundle functions */ - PHP_FE( resourcebundle_create, arginfo_resourcebundle_create ) - PHP_FE( resourcebundle_get, arginfo_resourcebundle_get ) - PHP_FE( resourcebundle_count, arginfo_resourcebundle_count ) - PHP_FE( resourcebundle_locales, arginfo_resourcebundle_locales ) - PHP_FE( resourcebundle_get_error_code, arginfo_resourcebundle_get_error_code ) - PHP_FE( resourcebundle_get_error_message, arginfo_resourcebundle_get_error_message ) - - /* Transliterator functions */ - PHP_FE( transliterator_create, arginfo_transliterator_create ) - PHP_FE( transliterator_create_from_rules, arginfo_transliterator_create_from_rules ) - PHP_FE( transliterator_list_ids, arginfo_transliterator_list_ids ) - PHP_FE( transliterator_create_inverse, arginfo_transliterator_create_inverse) - PHP_FE( transliterator_transliterate, arginfo_transliterator_transliterate ) - PHP_FE( transliterator_get_error_code, arginfo_transliterator_get_error_code ) - PHP_FE( transliterator_get_error_message, arginfo_transliterator_get_error_message ) - - /* TimeZone functions */ - PHP_FE( intltz_create_time_zone, arginfo_intltz_create_time_zone ) - PHP_FE( intltz_from_date_time_zone, arginfo_intltz_from_date_time_zone ) - PHP_FE( intltz_create_default, arginfo_intltz_create_default ) - PHP_FE( intltz_get_id, arginfo_intltz_get_id ) - PHP_FE( intltz_get_gmt, arginfo_intltz_get_gmt ) - PHP_FE( intltz_get_unknown, arginfo_intltz_get_unknown ) - PHP_FE( intltz_create_enumeration, arginfo_intltz_create_enumeration ) - PHP_FE( intltz_count_equivalent_ids, arginfo_intltz_count_equivalent_ids ) - PHP_FE( intltz_create_time_zone_id_enumeration, arginfo_intltz_create_time_zone_id_enumeration ) - PHP_FE( intltz_get_canonical_id, arginfo_intltz_get_canonical_id ) - PHP_FE( intltz_get_region, arginfo_intltz_get_region ) - PHP_FE( intltz_get_tz_data_version, arginfo_intltz_get_tz_data_version ) - PHP_FE( intltz_get_equivalent_id, arginfo_intltz_get_equivalent_id ) - PHP_FE( intltz_use_daylight_time, arginfo_intltz_use_daylight_time ) - PHP_FE( intltz_get_offset, arginfo_intltz_get_offset ) - PHP_FE( intltz_get_raw_offset, arginfo_intltz_get_raw_offset ) - PHP_FE( intltz_has_same_rules, arginfo_intltz_has_same_rules ) - PHP_FE( intltz_get_display_name, arginfo_intltz_get_display_name ) - PHP_FE( intltz_get_dst_savings, arginfo_intltz_get_dst_savings ) - PHP_FE( intltz_to_date_time_zone, arginfo_intltz_to_date_time_zone ) - PHP_FE( intltz_get_error_code, arginfo_intltz_get_error_code ) - PHP_FE( intltz_get_error_message, arginfo_intltz_get_error_message ) - - PHP_FE( intlcal_create_instance, arginfo_intlcal_create_instance ) - PHP_FE( intlcal_get_keyword_values_for_locale, arginfo_intlcal_get_keyword_values_for_locale ) - PHP_FE( intlcal_get_now, arginfo_intlcal_get_now ) - PHP_FE( intlcal_get_available_locales, arginfo_intlcal_get_available_locales ) - PHP_FE( intlcal_get, arginfo_intlcal_get ) - PHP_FE( intlcal_get_time, arginfo_intlcal_get_time ) - PHP_FE( intlcal_set_time, arginfo_intlcal_set_time ) - PHP_FE( intlcal_add, arginfo_intlcal_add ) - PHP_FE( intlcal_set_time_zone, arginfo_intlcal_set_time_zone ) - PHP_FE( intlcal_after, arginfo_intlcal_after ) - PHP_FE( intlcal_before, arginfo_intlcal_before ) - PHP_FE( intlcal_set, arginfo_intlcal_set ) - PHP_FE( intlcal_roll, arginfo_intlcal_roll ) - PHP_FE( intlcal_clear, arginfo_intlcal_clear ) - PHP_FE( intlcal_field_difference, arginfo_intlcal_field_difference ) - PHP_FE( intlcal_get_actual_maximum, arginfo_intlcal_get_actual_maximum ) - PHP_FE( intlcal_get_actual_minimum, arginfo_intlcal_get_actual_minimum ) - PHP_FE( intlcal_get_day_of_week_type, arginfo_intlcal_get_day_of_week_type ) - PHP_FE( intlcal_get_first_day_of_week, arginfo_intlcal_get_first_day_of_week ) - PHP_FE( intlcal_get_greatest_minimum, arginfo_intlcal_get_greatest_minimum ) - PHP_FE( intlcal_get_least_maximum, arginfo_intlcal_get_least_maximum ) - PHP_FE( intlcal_get_locale, arginfo_intlcal_get_locale ) - PHP_FE( intlcal_get_maximum, arginfo_intlcal_get_maximum ) - PHP_FE( intlcal_get_minimal_days_in_first_week, arginfo_intlcal_get_minimal_days_in_first_week ) - PHP_FE( intlcal_get_minimum, arginfo_intlcal_get_minimum ) - PHP_FE( intlcal_get_time_zone, arginfo_intlcal_get_time_zone ) - PHP_FE( intlcal_get_type, arginfo_intlcal_get_type ) - PHP_FE( intlcal_get_weekend_transition, arginfo_intlcal_get_weekend_transition ) - PHP_FE( intlcal_in_daylight_time, arginfo_intlcal_in_daylight_time ) - PHP_FE( intlcal_is_equivalent_to, arginfo_intlcal_is_equivalent_to ) - PHP_FE( intlcal_is_lenient, arginfo_intlcal_is_lenient ) - PHP_FE( intlcal_is_set, arginfo_intlcal_is_set ) - PHP_FE( intlcal_is_weekend, arginfo_intlcal_is_weekend ) - PHP_FE( intlcal_set_first_day_of_week, arginfo_intlcal_set_first_day_of_week ) - PHP_FE( intlcal_set_lenient, arginfo_intlcal_set_lenient ) - PHP_FE( intlcal_set_minimal_days_in_first_week, arginfo_intlcal_set_minimal_days_in_first_week ) - PHP_FE( intlcal_equals, arginfo_intlcal_equals ) - PHP_FE( intlcal_from_date_time, arginfo_intlcal_from_date_time ) - PHP_FE( intlcal_to_date_time, arginfo_intlcal_to_date_time ) - PHP_FE( intlcal_get_repeated_wall_time_option, arginfo_intlcal_get_repeated_wall_time_option ) - PHP_FE( intlcal_get_skipped_wall_time_option, arginfo_intlcal_get_skipped_wall_time_option ) - PHP_FE( intlcal_set_repeated_wall_time_option, arginfo_intlcal_set_repeated_wall_time_option ) - PHP_FE( intlcal_set_skipped_wall_time_option, arginfo_intlcal_set_skipped_wall_time_option ) - PHP_FE( intlcal_get_error_code, arginfo_intlcal_get_error_code ) - PHP_FE( intlcal_get_error_message, arginfo_intlcal_get_error_message ) - - PHP_FE( intlgregcal_create_instance, arginfo_intlgregcal_create_instance ) - PHP_FE( intlgregcal_set_gregorian_change, arginfo_intlgregcal_set_gregorian_change ) - PHP_FE( intlgregcal_get_gregorian_change, arginfo_intlgregcal_get_gregorian_change ) - PHP_FE( intlgregcal_is_leap_year, arginfo_intlgregcal_is_leap_year ) - - /* common functions */ - PHP_FE( intl_get_error_code, arginfo_intl_get_error_code ) - PHP_FE( intl_get_error_message, arginfo_intl_get_error_message ) - PHP_FE( intl_is_failure, arginfo_intl_is_failure ) - PHP_FE( intl_error_name, arginfo_intl_error_name ) - - PHP_FE_END -}; -/* }}} */ - /* {{{ INI Settings */ PHP_INI_BEGIN() STD_PHP_INI_ENTRY(LOCALE_INI_NAME, NULL, PHP_INI_ALL, OnUpdateStringUnempty, default_locale, zend_intl_globals, intl_globals) @@ -352,7 +109,7 @@ static PHP_GINIT_FUNCTION(intl); zend_module_entry intl_module_entry = { STANDARD_MODULE_HEADER, "intl", - intl_functions, + ext_functions, PHP_MINIT( intl ), PHP_MSHUTDOWN( intl ), PHP_RINIT( intl ), diff --git a/ext/intl/php_intl.stub.php b/ext/intl/php_intl.stub.php index 3154996f00b5a..f1caad8429244 100644 --- a/ext/intl/php_intl.stub.php +++ b/ext/intl/php_intl.stub.php @@ -1,5 +1,7 @@ = 56 +ZEND_FUNCTION(normalizer_get_raw_decomposition); +#endif +ZEND_FUNCTION(resourcebundle_create); +ZEND_FUNCTION(resourcebundle_get); +ZEND_FUNCTION(resourcebundle_count); +ZEND_FUNCTION(resourcebundle_locales); +ZEND_FUNCTION(resourcebundle_get_error_code); +ZEND_FUNCTION(resourcebundle_get_error_message); +ZEND_FUNCTION(intltz_count_equivalent_ids); +ZEND_FUNCTION(intltz_create_default); +ZEND_FUNCTION(intltz_create_enumeration); +ZEND_FUNCTION(intltz_create_time_zone); +ZEND_FUNCTION(intltz_create_time_zone_id_enumeration); +ZEND_FUNCTION(intltz_from_date_time_zone); +ZEND_FUNCTION(intltz_get_canonical_id); +ZEND_FUNCTION(intltz_get_display_name); +ZEND_FUNCTION(intltz_get_dst_savings); +ZEND_FUNCTION(intltz_get_equivalent_id); +ZEND_FUNCTION(intltz_get_error_code); +ZEND_FUNCTION(intltz_get_error_message); +ZEND_FUNCTION(intltz_get_gmt); +ZEND_FUNCTION(intltz_get_id); +ZEND_FUNCTION(intltz_get_offset); +ZEND_FUNCTION(intltz_get_raw_offset); +ZEND_FUNCTION(intltz_get_region); +ZEND_FUNCTION(intltz_get_tz_data_version); +ZEND_FUNCTION(intltz_get_unknown); +#if U_ICU_VERSION_MAJOR_NUM >= 52 +ZEND_FUNCTION(intltz_get_windows_id); +#endif +#if U_ICU_VERSION_MAJOR_NUM >= 52 +ZEND_FUNCTION(intltz_get_id_for_windows_id); +#endif +ZEND_FUNCTION(intltz_has_same_rules); +ZEND_FUNCTION(intltz_to_date_time_zone); +ZEND_FUNCTION(intltz_use_daylight_time); +ZEND_FUNCTION(transliterator_create); +ZEND_FUNCTION(transliterator_create_from_rules); +ZEND_FUNCTION(transliterator_list_ids); +ZEND_FUNCTION(transliterator_create_inverse); +ZEND_FUNCTION(transliterator_transliterate); +ZEND_FUNCTION(transliterator_get_error_code); +ZEND_FUNCTION(transliterator_get_error_message); + + +static const zend_function_entry ext_functions[] = { + ZEND_FE(intlcal_create_instance, arginfo_intlcal_create_instance) + ZEND_FE(intlcal_get_keyword_values_for_locale, arginfo_intlcal_get_keyword_values_for_locale) + ZEND_FE(intlcal_get_now, arginfo_intlcal_get_now) + ZEND_FE(intlcal_get_available_locales, arginfo_intlcal_get_available_locales) + ZEND_FE(intlcal_get, arginfo_intlcal_get) + ZEND_FE(intlcal_get_time, arginfo_intlcal_get_time) + ZEND_FE(intlcal_set_time, arginfo_intlcal_set_time) + ZEND_FE(intlcal_add, arginfo_intlcal_add) + ZEND_FE(intlcal_set_time_zone, arginfo_intlcal_set_time_zone) + ZEND_FE(intlcal_after, arginfo_intlcal_after) + ZEND_FE(intlcal_before, arginfo_intlcal_before) + ZEND_FE(intlcal_set, arginfo_intlcal_set) + ZEND_FE(intlcal_roll, arginfo_intlcal_roll) + ZEND_FE(intlcal_clear, arginfo_intlcal_clear) + ZEND_FE(intlcal_field_difference, arginfo_intlcal_field_difference) + ZEND_FE(intlcal_get_actual_maximum, arginfo_intlcal_get_actual_maximum) + ZEND_FE(intlcal_get_actual_minimum, arginfo_intlcal_get_actual_minimum) + ZEND_FE(intlcal_get_day_of_week_type, arginfo_intlcal_get_day_of_week_type) + ZEND_FE(intlcal_get_first_day_of_week, arginfo_intlcal_get_first_day_of_week) + ZEND_FE(intlcal_get_least_maximum, arginfo_intlcal_get_least_maximum) + ZEND_FE(intlcal_get_greatest_minimum, arginfo_intlcal_get_greatest_minimum) + ZEND_FE(intlcal_get_locale, arginfo_intlcal_get_locale) + ZEND_FE(intlcal_get_maximum, arginfo_intlcal_get_maximum) + ZEND_FE(intlcal_get_minimal_days_in_first_week, arginfo_intlcal_get_minimal_days_in_first_week) + ZEND_FE(intlcal_set_minimal_days_in_first_week, arginfo_intlcal_set_minimal_days_in_first_week) + ZEND_FE(intlcal_get_minimum, arginfo_intlcal_get_minimum) + ZEND_FE(intlcal_get_time_zone, arginfo_intlcal_get_time_zone) + ZEND_FE(intlcal_get_type, arginfo_intlcal_get_type) + ZEND_FE(intlcal_get_weekend_transition, arginfo_intlcal_get_weekend_transition) + ZEND_FE(intlcal_in_daylight_time, arginfo_intlcal_in_daylight_time) + ZEND_FE(intlcal_is_lenient, arginfo_intlcal_is_lenient) + ZEND_FE(intlcal_is_set, arginfo_intlcal_is_set) + ZEND_FE(intlcal_is_equivalent_to, arginfo_intlcal_is_equivalent_to) + ZEND_FE(intlcal_is_weekend, arginfo_intlcal_is_weekend) + ZEND_FE(intlcal_set_first_day_of_week, arginfo_intlcal_set_first_day_of_week) + ZEND_FE(intlcal_set_lenient, arginfo_intlcal_set_lenient) + ZEND_FE(intlcal_get_repeated_wall_time_option, arginfo_intlcal_get_repeated_wall_time_option) + ZEND_FE(intlcal_equals, arginfo_intlcal_equals) + ZEND_FE(intlcal_get_skipped_wall_time_option, arginfo_intlcal_get_skipped_wall_time_option) + ZEND_FE(intlcal_set_repeated_wall_time_option, arginfo_intlcal_set_repeated_wall_time_option) + ZEND_FE(intlcal_set_skipped_wall_time_option, arginfo_intlcal_set_skipped_wall_time_option) + ZEND_FE(intlcal_from_date_time, arginfo_intlcal_from_date_time) + ZEND_FE(intlcal_to_date_time, arginfo_intlcal_to_date_time) + ZEND_FE(intlcal_get_error_code, arginfo_intlcal_get_error_code) + ZEND_FE(intlcal_get_error_message, arginfo_intlcal_get_error_message) + ZEND_FE(intlgregcal_create_instance, arginfo_intlgregcal_create_instance) + ZEND_FE(intlgregcal_set_gregorian_change, arginfo_intlgregcal_set_gregorian_change) + ZEND_FE(intlgregcal_get_gregorian_change, arginfo_intlgregcal_get_gregorian_change) + ZEND_FE(intlgregcal_is_leap_year, arginfo_intlgregcal_is_leap_year) + ZEND_FE(collator_create, arginfo_collator_create) + ZEND_FE(collator_compare, arginfo_collator_compare) + ZEND_FE(collator_get_attribute, arginfo_collator_get_attribute) + ZEND_FE(collator_set_attribute, arginfo_collator_set_attribute) + ZEND_FE(collator_get_strength, arginfo_collator_get_strength) + ZEND_FE(collator_set_strength, arginfo_collator_set_strength) + ZEND_FE(collator_sort, arginfo_collator_sort) + ZEND_FE(collator_sort_with_sort_keys, arginfo_collator_sort_with_sort_keys) + ZEND_FE(collator_asort, arginfo_collator_asort) + ZEND_FE(collator_get_locale, arginfo_collator_get_locale) + ZEND_FE(collator_get_error_code, arginfo_collator_get_error_code) + ZEND_FE(collator_get_error_message, arginfo_collator_get_error_message) + ZEND_FE(collator_get_sort_key, arginfo_collator_get_sort_key) + ZEND_FE(intl_get_error_code, arginfo_intl_get_error_code) + ZEND_FE(intl_get_error_message, arginfo_intl_get_error_message) + ZEND_FE(intl_is_failure, arginfo_intl_is_failure) + ZEND_FE(intl_error_name, arginfo_intl_error_name) + ZEND_FE(datefmt_create, arginfo_datefmt_create) + ZEND_FE(datefmt_get_datetype, arginfo_datefmt_get_datetype) + ZEND_FE(datefmt_get_timetype, arginfo_datefmt_get_timetype) + ZEND_FE(datefmt_get_calendar, arginfo_datefmt_get_calendar) + ZEND_FE(datefmt_set_calendar, arginfo_datefmt_set_calendar) + ZEND_FE(datefmt_get_timezone_id, arginfo_datefmt_get_timezone_id) + ZEND_FE(datefmt_get_calendar_object, arginfo_datefmt_get_calendar_object) + ZEND_FE(datefmt_get_timezone, arginfo_datefmt_get_timezone) + ZEND_FE(datefmt_set_timezone, arginfo_datefmt_set_timezone) + ZEND_FE(datefmt_set_pattern, arginfo_datefmt_set_pattern) + ZEND_FE(datefmt_get_pattern, arginfo_datefmt_get_pattern) + ZEND_FE(datefmt_get_locale, arginfo_datefmt_get_locale) + ZEND_FE(datefmt_set_lenient, arginfo_datefmt_set_lenient) + ZEND_FE(datefmt_is_lenient, arginfo_datefmt_is_lenient) + ZEND_FE(datefmt_format, arginfo_datefmt_format) + ZEND_FE(datefmt_format_object, arginfo_datefmt_format_object) + ZEND_FE(datefmt_parse, arginfo_datefmt_parse) + ZEND_FE(datefmt_localtime, arginfo_datefmt_localtime) + ZEND_FE(datefmt_get_error_code, arginfo_datefmt_get_error_code) + ZEND_FE(datefmt_get_error_message, arginfo_datefmt_get_error_message) + ZEND_FE(numfmt_create, arginfo_numfmt_create) + ZEND_FE(numfmt_format, arginfo_numfmt_format) + ZEND_FE(numfmt_parse, arginfo_numfmt_parse) + ZEND_FE(numfmt_format_currency, arginfo_numfmt_format_currency) + ZEND_FE(numfmt_parse_currency, arginfo_numfmt_parse_currency) + ZEND_FE(numfmt_set_attribute, arginfo_numfmt_set_attribute) + ZEND_FE(numfmt_get_attribute, arginfo_numfmt_get_attribute) + ZEND_FE(numfmt_set_text_attribute, arginfo_numfmt_set_text_attribute) + ZEND_FE(numfmt_get_text_attribute, arginfo_numfmt_get_text_attribute) + ZEND_FE(numfmt_set_symbol, arginfo_numfmt_set_symbol) + ZEND_FE(numfmt_get_symbol, arginfo_numfmt_get_symbol) + ZEND_FE(numfmt_set_pattern, arginfo_numfmt_set_pattern) + ZEND_FE(numfmt_get_pattern, arginfo_numfmt_get_pattern) + ZEND_FE(numfmt_get_locale, arginfo_numfmt_get_locale) + ZEND_FE(numfmt_get_error_code, arginfo_numfmt_get_error_code) + ZEND_FE(numfmt_get_error_message, arginfo_numfmt_get_error_message) + ZEND_FE(grapheme_strlen, arginfo_grapheme_strlen) + ZEND_FE(grapheme_strpos, arginfo_grapheme_strpos) + ZEND_FE(grapheme_stripos, arginfo_grapheme_stripos) + ZEND_FE(grapheme_strrpos, arginfo_grapheme_strrpos) + ZEND_FE(grapheme_strripos, arginfo_grapheme_strripos) + ZEND_FE(grapheme_substr, arginfo_grapheme_substr) + ZEND_FE(grapheme_strstr, arginfo_grapheme_strstr) + ZEND_FE(grapheme_stristr, arginfo_grapheme_stristr) + ZEND_FE(grapheme_extract, arginfo_grapheme_extract) + ZEND_FE(idn_to_ascii, arginfo_idn_to_ascii) + ZEND_FE(idn_to_utf8, arginfo_idn_to_utf8) + ZEND_FE(locale_get_default, arginfo_locale_get_default) + ZEND_FE(locale_set_default, arginfo_locale_set_default) + ZEND_FE(locale_get_primary_language, arginfo_locale_get_primary_language) + ZEND_FE(locale_get_script, arginfo_locale_get_script) + ZEND_FE(locale_get_region, arginfo_locale_get_region) + ZEND_FE(locale_get_keywords, arginfo_locale_get_keywords) + ZEND_FE(locale_get_display_script, arginfo_locale_get_display_script) + ZEND_FE(locale_get_display_region, arginfo_locale_get_display_region) + ZEND_FE(locale_get_display_name, arginfo_locale_get_display_name) + ZEND_FE(locale_get_display_language, arginfo_locale_get_display_language) + ZEND_FE(locale_get_display_variant, arginfo_locale_get_display_variant) + ZEND_FE(locale_compose, arginfo_locale_compose) + ZEND_FE(locale_parse, arginfo_locale_parse) + ZEND_FE(locale_get_all_variants, arginfo_locale_get_all_variants) + ZEND_FE(locale_filter_matches, arginfo_locale_filter_matches) + ZEND_FE(locale_canonicalize, arginfo_locale_canonicalize) + ZEND_FE(locale_lookup, arginfo_locale_lookup) + ZEND_FE(locale_accept_from_http, arginfo_locale_accept_from_http) + ZEND_FE(msgfmt_create, arginfo_msgfmt_create) + ZEND_FE(msgfmt_format, arginfo_msgfmt_format) + ZEND_FE(msgfmt_format_message, arginfo_msgfmt_format_message) + ZEND_FE(msgfmt_parse, arginfo_msgfmt_parse) + ZEND_FE(msgfmt_parse_message, arginfo_msgfmt_parse_message) + ZEND_FE(msgfmt_set_pattern, arginfo_msgfmt_set_pattern) + ZEND_FE(msgfmt_get_pattern, arginfo_msgfmt_get_pattern) + ZEND_FE(msgfmt_get_locale, arginfo_msgfmt_get_locale) + ZEND_FE(msgfmt_get_error_code, arginfo_msgfmt_get_error_code) + ZEND_FE(msgfmt_get_error_message, arginfo_msgfmt_get_error_message) + ZEND_FE(normalizer_normalize, arginfo_normalizer_normalize) + ZEND_FE(normalizer_is_normalized, arginfo_normalizer_is_normalized) +#if U_ICU_VERSION_MAJOR_NUM >= 56 + ZEND_FE(normalizer_get_raw_decomposition, arginfo_normalizer_get_raw_decomposition) +#endif + ZEND_FE(resourcebundle_create, arginfo_resourcebundle_create) + ZEND_FE(resourcebundle_get, arginfo_resourcebundle_get) + ZEND_FE(resourcebundle_count, arginfo_resourcebundle_count) + ZEND_FE(resourcebundle_locales, arginfo_resourcebundle_locales) + ZEND_FE(resourcebundle_get_error_code, arginfo_resourcebundle_get_error_code) + ZEND_FE(resourcebundle_get_error_message, arginfo_resourcebundle_get_error_message) + ZEND_FE(intltz_count_equivalent_ids, arginfo_intltz_count_equivalent_ids) + ZEND_FE(intltz_create_default, arginfo_intltz_create_default) + ZEND_FE(intltz_create_enumeration, arginfo_intltz_create_enumeration) + ZEND_FE(intltz_create_time_zone, arginfo_intltz_create_time_zone) + ZEND_FE(intltz_create_time_zone_id_enumeration, arginfo_intltz_create_time_zone_id_enumeration) + ZEND_FE(intltz_from_date_time_zone, arginfo_intltz_from_date_time_zone) + ZEND_FE(intltz_get_canonical_id, arginfo_intltz_get_canonical_id) + ZEND_FE(intltz_get_display_name, arginfo_intltz_get_display_name) + ZEND_FE(intltz_get_dst_savings, arginfo_intltz_get_dst_savings) + ZEND_FE(intltz_get_equivalent_id, arginfo_intltz_get_equivalent_id) + ZEND_FE(intltz_get_error_code, arginfo_intltz_get_error_code) + ZEND_FE(intltz_get_error_message, arginfo_intltz_get_error_message) + ZEND_FE(intltz_get_gmt, arginfo_intltz_get_gmt) + ZEND_FE(intltz_get_id, arginfo_intltz_get_id) + ZEND_FE(intltz_get_offset, arginfo_intltz_get_offset) + ZEND_FE(intltz_get_raw_offset, arginfo_intltz_get_raw_offset) + ZEND_FE(intltz_get_region, arginfo_intltz_get_region) + ZEND_FE(intltz_get_tz_data_version, arginfo_intltz_get_tz_data_version) + ZEND_FE(intltz_get_unknown, arginfo_intltz_get_unknown) +#if U_ICU_VERSION_MAJOR_NUM >= 52 + ZEND_FE(intltz_get_windows_id, arginfo_intltz_get_windows_id) +#endif +#if U_ICU_VERSION_MAJOR_NUM >= 52 + ZEND_FE(intltz_get_id_for_windows_id, arginfo_intltz_get_id_for_windows_id) +#endif + ZEND_FE(intltz_has_same_rules, arginfo_intltz_has_same_rules) + ZEND_FE(intltz_to_date_time_zone, arginfo_intltz_to_date_time_zone) + ZEND_FE(intltz_use_daylight_time, arginfo_intltz_use_daylight_time) + ZEND_FE(transliterator_create, arginfo_transliterator_create) + ZEND_FE(transliterator_create_from_rules, arginfo_transliterator_create_from_rules) + ZEND_FE(transliterator_list_ids, arginfo_transliterator_list_ids) + ZEND_FE(transliterator_create_inverse, arginfo_transliterator_create_inverse) + ZEND_FE(transliterator_transliterate, arginfo_transliterator_transliterate) + ZEND_FE(transliterator_get_error_code, arginfo_transliterator_get_error_code) + ZEND_FE(transliterator_get_error_message, arginfo_transliterator_get_error_message) + ZEND_FE_END +}; diff --git a/ext/intl/resourcebundle/resourcebundle.stub.php b/ext/intl/resourcebundle/resourcebundle.stub.php index 34430edf636fe..da3bb186faf59 100644 --- a/ext/intl/resourcebundle/resourcebundle.stub.php +++ b/ext/intl/resourcebundle/resourcebundle.stub.php @@ -1,27 +1,45 @@ = 58 +ZEND_METHOD(Spoofchecker, setRestrictionLevel); +#endif + + +static const zend_function_entry class_Spoofchecker_methods[] = { + ZEND_ME(Spoofchecker, __construct, arginfo_class_Spoofchecker___construct, ZEND_ACC_PUBLIC) + ZEND_ME(Spoofchecker, isSuspicious, arginfo_class_Spoofchecker_isSuspicious, ZEND_ACC_PUBLIC) + ZEND_ME(Spoofchecker, areConfusable, arginfo_class_Spoofchecker_areConfusable, ZEND_ACC_PUBLIC) + ZEND_ME(Spoofchecker, setAllowedLocales, arginfo_class_Spoofchecker_setAllowedLocales, ZEND_ACC_PUBLIC) + ZEND_ME(Spoofchecker, setChecks, arginfo_class_Spoofchecker_setChecks, ZEND_ACC_PUBLIC) +#if U_ICU_VERSION_MAJOR_NUM >= 58 + ZEND_ME(Spoofchecker, setRestrictionLevel, arginfo_class_Spoofchecker_setRestrictionLevel, ZEND_ACC_PUBLIC) +#endif + ZEND_FE_END +}; diff --git a/ext/intl/spoofchecker/spoofchecker_class.c b/ext/intl/spoofchecker/spoofchecker_class.c index e6fdcefa08149..e1c8dc63a16a8 100644 --- a/ext/intl/spoofchecker/spoofchecker_class.c +++ b/ext/intl/spoofchecker/spoofchecker_class.c @@ -13,8 +13,6 @@ */ #include "spoofchecker_class.h" -#include "spoofchecker_main.h" -#include "spoofchecker_create.h" #include "spoofchecker_arginfo.h" #include "php_intl.h" #include "intl_error.h" @@ -63,19 +61,6 @@ zend_object *Spoofchecker_object_create(zend_class_entry *ce) * Every 'Spoofchecker' class method has an entry in this table */ -static const zend_function_entry Spoofchecker_class_functions[] = { - PHP_ME(Spoofchecker, __construct, arginfo_class_Spoofchecker___construct, ZEND_ACC_PUBLIC) - PHP_ME(Spoofchecker, isSuspicious, arginfo_class_Spoofchecker_isSuspicious, ZEND_ACC_PUBLIC) - PHP_ME(Spoofchecker, areConfusable, arginfo_class_Spoofchecker_areConfusable, ZEND_ACC_PUBLIC) - PHP_ME(Spoofchecker, setAllowedLocales, arginfo_class_Spoofchecker_setAllowedLocales, ZEND_ACC_PUBLIC) - PHP_ME(Spoofchecker, setChecks, arginfo_class_Spoofchecker_setChecks, ZEND_ACC_PUBLIC) -#if U_ICU_VERSION_MAJOR_NUM >= 58 - PHP_ME(Spoofchecker, setRestrictionLevel, arginfo_class_Spoofchecker_setRestrictionLevel, ZEND_ACC_PUBLIC) -#endif - PHP_FE_END -}; -/* }}} */ - static zend_object *spoofchecker_clone_obj(zend_object *object) /* {{{ */ { zend_object *new_obj_val; @@ -108,7 +93,7 @@ void spoofchecker_register_Spoofchecker_class(void) zend_class_entry ce; /* Create and register 'Spoofchecker' class. */ - INIT_CLASS_ENTRY(ce, "Spoofchecker", Spoofchecker_class_functions); + INIT_CLASS_ENTRY(ce, "Spoofchecker", class_Spoofchecker_methods); ce.create_object = Spoofchecker_object_create; Spoofchecker_ce_ptr = zend_register_internal_class(&ce); diff --git a/ext/intl/spoofchecker/spoofchecker_class.h b/ext/intl/spoofchecker/spoofchecker_class.h index 12593e35bebe1..2cbefe6241c96 100644 --- a/ext/intl/spoofchecker/spoofchecker_class.h +++ b/ext/intl/spoofchecker/spoofchecker_class.h @@ -18,7 +18,6 @@ #include #include "intl_common.h" -#include "spoofchecker_create.h" #include "intl_error.h" #include "intl_data.h" diff --git a/ext/intl/spoofchecker/spoofchecker_create.c b/ext/intl/spoofchecker/spoofchecker_create.c index 6c4143a580cc9..e49f215ca4c7f 100644 --- a/ext/intl/spoofchecker/spoofchecker_create.c +++ b/ext/intl/spoofchecker/spoofchecker_create.c @@ -18,7 +18,6 @@ #include "php_intl.h" #include "spoofchecker_class.h" -#include "spoofchecker_create.h" #include "intl_data.h" /* {{{ proto Spoofchecker::__construct() diff --git a/ext/intl/spoofchecker/spoofchecker_create.h b/ext/intl/spoofchecker/spoofchecker_create.h deleted file mode 100644 index 4b573cbf07209..0000000000000 --- a/ext/intl/spoofchecker/spoofchecker_create.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Scott MacVicar | - +----------------------------------------------------------------------+ - */ - -#ifndef SPOOFCHECKER_CREATE_H -#define SPOOFCHECKER_CREATE_H - -#include - -PHP_METHOD(Spoofchecker, __construct); - -#endif // SPOOFCHECKER_CREATE_H diff --git a/ext/intl/spoofchecker/spoofchecker_main.h b/ext/intl/spoofchecker/spoofchecker_main.h deleted file mode 100644 index a7774c24ad577..0000000000000 --- a/ext/intl/spoofchecker/spoofchecker_main.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Scott MacVicar | - +----------------------------------------------------------------------+ - */ - -#ifndef SPOOFCHECKER_MAIN_H -#define SPOOFCHECKER_MAIN_H - -#include - -PHP_METHOD(Spoofchecker, isSuspicious); -PHP_METHOD(Spoofchecker, areConfusable); -PHP_METHOD(Spoofchecker, setAllowedLocales); -PHP_METHOD(Spoofchecker, setChecks); -#if U_ICU_VERSION_MAJOR_NUM >= 58 -PHP_METHOD(Spoofchecker, setRestrictionLevel); -#endif - -#endif // SPOOFCHECKER_MAIN_H diff --git a/ext/intl/timezone/timezone.stub.php b/ext/intl/timezone/timezone.stub.php index fad55faeee60a..d34170a281159 100644 --- a/ext/intl/timezone/timezone.stub.php +++ b/ext/intl/timezone/timezone.stub.php @@ -1,82 +1,154 @@ = 52 - /** @return string|false */ + /** + * @return string|false + * @alias intltz_get_windows_id + */ public static function getWindowsID(string $timezone) {} - /** @return string|false */ + /** + * @return string|false + * @alias intltz_get_id_for_windows_id + */ public static function getIDForWindowsID(string $timezone, string $region = UNKNOWN) {} #endif - /** @return bool */ + /** + * @return bool + * @alias intltz_has_same_rules + */ public function hasSameRules(IntlTimeZone $otherTimeZone) {} - /** @return DateTimeZone|false */ + /** + * @return DateTimeZone|false + * @alias intltz_to_date_time_zone + */ public function toDateTimeZone() {} - /** @return bool */ + /** + * @return bool + * @alias intltz_use_daylight_time + */ public function useDaylightTime() {} } diff --git a/ext/intl/timezone/timezone_arginfo.h b/ext/intl/timezone/timezone_arginfo.h index a379891dae9db..e6fdb2feaa8d4 100644 --- a/ext/intl/timezone/timezone_arginfo.h +++ b/ext/intl/timezone/timezone_arginfo.h @@ -86,3 +86,68 @@ ZEND_END_ARG_INFO() #define arginfo_class_IntlTimeZone_toDateTimeZone arginfo_class_IntlTimeZone___construct #define arginfo_class_IntlTimeZone_useDaylightTime arginfo_class_IntlTimeZone___construct + + +ZEND_METHOD(IntlTimeZone, __construct); +ZEND_FUNCTION(intltz_count_equivalent_ids); +ZEND_FUNCTION(intltz_create_default); +ZEND_FUNCTION(intltz_create_enumeration); +ZEND_FUNCTION(intltz_create_time_zone); +ZEND_FUNCTION(intltz_create_time_zone_id_enumeration); +ZEND_FUNCTION(intltz_from_date_time_zone); +ZEND_FUNCTION(intltz_get_canonical_id); +ZEND_FUNCTION(intltz_get_display_name); +ZEND_FUNCTION(intltz_get_dst_savings); +ZEND_FUNCTION(intltz_get_equivalent_id); +ZEND_FUNCTION(intltz_get_error_code); +ZEND_FUNCTION(intltz_get_error_message); +ZEND_FUNCTION(intltz_get_gmt); +ZEND_FUNCTION(intltz_get_id); +ZEND_FUNCTION(intltz_get_offset); +ZEND_FUNCTION(intltz_get_raw_offset); +ZEND_FUNCTION(intltz_get_region); +ZEND_FUNCTION(intltz_get_tz_data_version); +ZEND_FUNCTION(intltz_get_unknown); +#if U_ICU_VERSION_MAJOR_NUM >= 52 +ZEND_FUNCTION(intltz_get_windows_id); +#endif +#if U_ICU_VERSION_MAJOR_NUM >= 52 +ZEND_FUNCTION(intltz_get_id_for_windows_id); +#endif +ZEND_FUNCTION(intltz_has_same_rules); +ZEND_FUNCTION(intltz_to_date_time_zone); +ZEND_FUNCTION(intltz_use_daylight_time); + + +static const zend_function_entry class_IntlTimeZone_methods[] = { + ZEND_ME(IntlTimeZone, __construct, arginfo_class_IntlTimeZone___construct, ZEND_ACC_PRIVATE) + ZEND_ME_MAPPING(countEquivalentIDs, intltz_count_equivalent_ids, arginfo_class_IntlTimeZone_countEquivalentIDs, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME_MAPPING(createDefault, intltz_create_default, arginfo_class_IntlTimeZone_createDefault, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME_MAPPING(createEnumeration, intltz_create_enumeration, arginfo_class_IntlTimeZone_createEnumeration, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME_MAPPING(createTimeZone, intltz_create_time_zone, arginfo_class_IntlTimeZone_createTimeZone, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME_MAPPING(createTimeZoneIDEnumeration, intltz_create_time_zone_id_enumeration, arginfo_class_IntlTimeZone_createTimeZoneIDEnumeration, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME_MAPPING(fromDateTimeZone, intltz_from_date_time_zone, arginfo_class_IntlTimeZone_fromDateTimeZone, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME_MAPPING(getCanonicalID, intltz_get_canonical_id, arginfo_class_IntlTimeZone_getCanonicalID, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME_MAPPING(getDisplayName, intltz_get_display_name, arginfo_class_IntlTimeZone_getDisplayName, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(getDSTSavings, intltz_get_dst_savings, arginfo_class_IntlTimeZone_getDSTSavings, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(getEquivalentID, intltz_get_equivalent_id, arginfo_class_IntlTimeZone_getEquivalentID, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME_MAPPING(getErrorCode, intltz_get_error_code, arginfo_class_IntlTimeZone_getErrorCode, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(getErrorMessage, intltz_get_error_message, arginfo_class_IntlTimeZone_getErrorMessage, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(getGMT, intltz_get_gmt, arginfo_class_IntlTimeZone_getGMT, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME_MAPPING(getID, intltz_get_id, arginfo_class_IntlTimeZone_getID, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(getOffset, intltz_get_offset, arginfo_class_IntlTimeZone_getOffset, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(getRawOffset, intltz_get_raw_offset, arginfo_class_IntlTimeZone_getRawOffset, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(getRegion, intltz_get_region, arginfo_class_IntlTimeZone_getRegion, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME_MAPPING(getTZDataVersion, intltz_get_tz_data_version, arginfo_class_IntlTimeZone_getTZDataVersion, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME_MAPPING(getUnknown, intltz_get_unknown, arginfo_class_IntlTimeZone_getUnknown, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) +#if U_ICU_VERSION_MAJOR_NUM >= 52 + ZEND_ME_MAPPING(getWindowsID, intltz_get_windows_id, arginfo_class_IntlTimeZone_getWindowsID, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) +#endif +#if U_ICU_VERSION_MAJOR_NUM >= 52 + ZEND_ME_MAPPING(getIDForWindowsID, intltz_get_id_for_windows_id, arginfo_class_IntlTimeZone_getIDForWindowsID, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) +#endif + ZEND_ME_MAPPING(hasSameRules, intltz_has_same_rules, arginfo_class_IntlTimeZone_hasSameRules, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(toDateTimeZone, intltz_to_date_time_zone, arginfo_class_IntlTimeZone_toDateTimeZone, ZEND_ACC_PUBLIC) + ZEND_ME_MAPPING(useDaylightTime, intltz_use_daylight_time, arginfo_class_IntlTimeZone_useDaylightTime, ZEND_ACC_PUBLIC) + ZEND_FE_END +}; diff --git a/ext/intl/timezone/timezone_class.cpp b/ext/intl/timezone/timezone_class.cpp index 11a9177320857..b3d447f5d51a0 100644 --- a/ext/intl/timezone/timezone_class.cpp +++ b/ext/intl/timezone/timezone_class.cpp @@ -29,7 +29,6 @@ extern "C" { #include "../intl_convert.h" #define USE_TIMEZONE_POINTER 1 #include "timezone_class.h" -#include "timezone_methods.h" #include "timezone_arginfo.h" #include #include @@ -391,42 +390,6 @@ static zend_object *TimeZone_object_create(zend_class_entry *ce) } /* }}} */ -/* {{{ TimeZone_class_functions - * Every 'IntlTimeZone' class method has an entry in this table - */ -static const zend_function_entry TimeZone_class_functions[] = { - PHP_ME(IntlTimeZone, __construct, arginfo_class_IntlTimeZone___construct, ZEND_ACC_PRIVATE) - PHP_ME_MAPPING(createTimeZone, intltz_create_time_zone, arginfo_class_IntlTimeZone_createTimeZone, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) - PHP_ME_MAPPING(fromDateTimeZone, intltz_from_date_time_zone, arginfo_class_IntlTimeZone_fromDateTimeZone, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) - PHP_ME_MAPPING(createDefault, intltz_create_default, arginfo_class_IntlTimeZone_createDefault, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) - PHP_ME_MAPPING(getGMT, intltz_get_gmt, arginfo_class_IntlTimeZone_getGMT, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) - PHP_ME_MAPPING(getUnknown, intltz_get_unknown, arginfo_class_IntlTimeZone_getUnknown, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) - PHP_ME_MAPPING(createEnumeration, intltz_create_enumeration, arginfo_class_IntlTimeZone_createEnumeration, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) - PHP_ME_MAPPING(countEquivalentIDs, intltz_count_equivalent_ids, arginfo_class_IntlTimeZone_countEquivalentIDs, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) - PHP_ME_MAPPING(createTimeZoneIDEnumeration, intltz_create_time_zone_id_enumeration, arginfo_class_IntlTimeZone_createTimeZoneIDEnumeration, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) - PHP_ME_MAPPING(getCanonicalID, intltz_get_canonical_id, arginfo_class_IntlTimeZone_getCanonicalID, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) - PHP_ME_MAPPING(getRegion, intltz_get_region, arginfo_class_IntlTimeZone_getRegion, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) - PHP_ME_MAPPING(getTZDataVersion, intltz_get_tz_data_version, arginfo_class_IntlTimeZone_getTZDataVersion, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) - PHP_ME_MAPPING(getEquivalentID, intltz_get_equivalent_id, arginfo_class_IntlTimeZone_getEquivalentID, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) - - PHP_ME_MAPPING(getID, intltz_get_id, arginfo_class_IntlTimeZone_getID, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(useDaylightTime, intltz_use_daylight_time, arginfo_class_IntlTimeZone_useDaylightTime, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getOffset, intltz_get_offset, arginfo_class_IntlTimeZone_getOffset, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getRawOffset, intltz_get_raw_offset, arginfo_class_IntlTimeZone_getRawOffset, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(hasSameRules, intltz_has_same_rules, arginfo_class_IntlTimeZone_hasSameRules, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getDisplayName, intltz_get_display_name, arginfo_class_IntlTimeZone_getDisplayName, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getDSTSavings, intltz_get_dst_savings, arginfo_class_IntlTimeZone_getDSTSavings, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(toDateTimeZone, intltz_to_date_time_zone, arginfo_class_IntlTimeZone_toDateTimeZone, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getErrorCode, intltz_get_error_code, arginfo_class_IntlTimeZone_getErrorCode, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(getErrorMessage, intltz_get_error_message, arginfo_class_IntlTimeZone_getErrorMessage, ZEND_ACC_PUBLIC) -#if U_ICU_VERSION_MAJOR_NUM >= 52 - PHP_ME_MAPPING(getWindowsID, intltz_get_windows_id, arginfo_class_IntlTimeZone_getWindowsID, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) - PHP_ME_MAPPING(getIDForWindowsID, intltz_get_id_for_windows_id, arginfo_class_IntlTimeZone_getIDForWindowsID, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) -#endif - PHP_FE_END -}; -/* }}} */ - /* {{{ timezone_register_IntlTimeZone_class * Initialize 'IntlTimeZone' class */ @@ -435,7 +398,7 @@ U_CFUNC void timezone_register_IntlTimeZone_class(void) zend_class_entry ce; /* Create and register 'IntlTimeZone' class. */ - INIT_CLASS_ENTRY(ce, "IntlTimeZone", TimeZone_class_functions); + INIT_CLASS_ENTRY(ce, "IntlTimeZone", class_IntlTimeZone_methods); ce.create_object = TimeZone_object_create; TimeZone_ce_ptr = zend_register_internal_class(&ce); if (!TimeZone_ce_ptr) { diff --git a/ext/intl/timezone/timezone_methods.h b/ext/intl/timezone/timezone_methods.h deleted file mode 100644 index 2f9ec349a1c3c..0000000000000 --- a/ext/intl/timezone/timezone_methods.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Gustavo Lopes | - +----------------------------------------------------------------------+ - */ - -#ifndef TIMEZONE_METHODS_H -#define TIMEZONE_METHODS_H - -#include - -PHP_METHOD(IntlTimeZone, __construct); - -PHP_FUNCTION(intltz_create_time_zone); - -PHP_FUNCTION(intltz_from_date_time_zone); - -PHP_FUNCTION(intltz_create_default); - -PHP_FUNCTION(intltz_get_id); - -PHP_FUNCTION(intltz_get_gmt); - -PHP_FUNCTION(intltz_get_unknown); - -PHP_FUNCTION(intltz_create_enumeration); - -PHP_FUNCTION(intltz_count_equivalent_ids); - -PHP_FUNCTION(intltz_create_time_zone_id_enumeration); - -PHP_FUNCTION(intltz_get_canonical_id); - -PHP_FUNCTION(intltz_get_region); - -PHP_FUNCTION(intltz_get_tz_data_version); - -PHP_FUNCTION(intltz_get_equivalent_id); - -PHP_FUNCTION(intltz_use_daylight_time); - -PHP_FUNCTION(intltz_get_offset); - -PHP_FUNCTION(intltz_get_raw_offset); - -PHP_FUNCTION(intltz_has_same_rules); - -PHP_FUNCTION(intltz_get_display_name); - -PHP_FUNCTION(intltz_get_dst_savings); - -PHP_FUNCTION(intltz_to_date_time_zone); - -PHP_FUNCTION(intltz_get_error_code); - -PHP_FUNCTION(intltz_get_error_message); - -#if U_ICU_VERSION_MAJOR_NUM >= 52 -PHP_FUNCTION(intltz_get_windows_id); -PHP_FUNCTION(intltz_get_id_for_windows_id); -#endif - -#endif /* #ifndef TIMEZONE_METHODS_H */ diff --git a/ext/intl/transliterator/transliterator.stub.php b/ext/intl/transliterator/transliterator.stub.php index 12cab5d99a967..5b47f05dd3d89 100644 --- a/ext/intl/transliterator/transliterator.stub.php +++ b/ext/intl/transliterator/transliterator.stub.php @@ -1,27 +1,50 @@ | - +----------------------------------------------------------------------+ - */ - -#ifndef TRANSLITERATOR_METHODS_H -#define TRANSLITERATOR_METHODS_H - -#include - -PHP_FUNCTION( transliterator_create ); - -PHP_FUNCTION( transliterator_create_from_rules ); - -PHP_FUNCTION( transliterator_list_ids ); - -PHP_FUNCTION( transliterator_create_inverse ); - -PHP_FUNCTION( transliterator_transliterate ); - -PHP_METHOD( Transliterator, __construct ); - -PHP_FUNCTION( transliterator_get_error_code ); - -PHP_FUNCTION( transliterator_get_error_message ); - -#endif /* #ifndef TRANSLITERATOR_METHODS_H */ diff --git a/ext/intl/uchar/uchar.c b/ext/intl/uchar/uchar.c index 670976e2f3c64..e5092f18fd722 100644 --- a/ext/intl/uchar/uchar.c +++ b/ext/intl/uchar/uchar.c @@ -617,77 +617,10 @@ IC_CHAR_METHOD_CHAR(getBidiPairedBracket) #undef IC_CHAR_METHOD_CHAR /* }}} */ -static const zend_function_entry intlchar_methods[] = { -#define IC_ME(mname) PHP_ME(IntlChar, mname, arginfo_class_IntlChar_##mname, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) - IC_ME(chr) - IC_ME(ord) - IC_ME(hasBinaryProperty) - IC_ME(isUAlphabetic) - IC_ME(isULowercase) - IC_ME(isUUppercase) - IC_ME(isUWhiteSpace) - IC_ME(getIntPropertyValue) - IC_ME(getIntPropertyMinValue) - IC_ME(getIntPropertyMaxValue) - IC_ME(getNumericValue) - IC_ME(islower) - IC_ME(isupper) - IC_ME(istitle) - IC_ME(isdigit) - IC_ME(isalpha) - IC_ME(isalnum) - IC_ME(isxdigit) - IC_ME(ispunct) - IC_ME(isgraph) - IC_ME(isblank) - IC_ME(isdefined) - IC_ME(isspace) - IC_ME(isJavaSpaceChar) - IC_ME(isWhitespace) - IC_ME(iscntrl) - IC_ME(isISOControl) - IC_ME(isprint) - IC_ME(isbase) - IC_ME(charDirection) - IC_ME(isMirrored) - IC_ME(charMirror) -#if U_ICU_VERSION_MAJOR_NUM >= 52 - IC_ME(getBidiPairedBracket) -#endif /* ICU >= 52 */ - IC_ME(charType) - IC_ME(enumCharTypes) - IC_ME(getCombiningClass) - IC_ME(charDigitValue) - IC_ME(getBlockCode) - IC_ME(charName) - IC_ME(charFromName) - IC_ME(enumCharNames) - IC_ME(getPropertyName) - IC_ME(getPropertyEnum) - IC_ME(getPropertyValueName) - IC_ME(getPropertyValueEnum) - IC_ME(isIDStart) - IC_ME(isIDPart) - IC_ME(isIDIgnorable) - IC_ME(isJavaIDStart) - IC_ME(isJavaIDPart) - IC_ME(tolower) - IC_ME(toupper) - IC_ME(totitle) - IC_ME(foldCase) - IC_ME(digit) - IC_ME(forDigit) - IC_ME(charAge) - IC_ME(getUnicodeVersion) - IC_ME(getFC_NFKC_Closure) -#undef IC_ME - PHP_FE_END -}; - int php_uchar_minit(INIT_FUNC_ARGS) { zend_class_entry tmp, *ce; - INIT_CLASS_ENTRY(tmp, "IntlChar", intlchar_methods); + INIT_CLASS_ENTRY(tmp, "IntlChar", class_IntlChar_methods); ce = zend_register_internal_class(&tmp); #define IC_CONSTL(name, val) \ diff --git a/ext/intl/uchar/uchar.stub.php b/ext/intl/uchar/uchar.stub.php index e9c7d0e3ff455..398b153185355 100644 --- a/ext/intl/uchar/uchar.stub.php +++ b/ext/intl/uchar/uchar.stub.php @@ -1,5 +1,7 @@ = 52 +ZEND_METHOD(IntlChar, getBidiPairedBracket); +#endif +ZEND_METHOD(IntlChar, getBlockCode); +ZEND_METHOD(IntlChar, getCombiningClass); +ZEND_METHOD(IntlChar, getFC_NFKC_Closure); +ZEND_METHOD(IntlChar, getIntPropertyMaxValue); +ZEND_METHOD(IntlChar, getIntPropertyMinValue); +ZEND_METHOD(IntlChar, getIntPropertyValue); +ZEND_METHOD(IntlChar, getNumericValue); +ZEND_METHOD(IntlChar, getPropertyEnum); +ZEND_METHOD(IntlChar, getPropertyName); +ZEND_METHOD(IntlChar, getPropertyValueEnum); +ZEND_METHOD(IntlChar, getPropertyValueName); +ZEND_METHOD(IntlChar, getUnicodeVersion); +ZEND_METHOD(IntlChar, isalnum); +ZEND_METHOD(IntlChar, isalpha); +ZEND_METHOD(IntlChar, isbase); +ZEND_METHOD(IntlChar, isblank); +ZEND_METHOD(IntlChar, iscntrl); +ZEND_METHOD(IntlChar, isdefined); +ZEND_METHOD(IntlChar, isdigit); +ZEND_METHOD(IntlChar, isgraph); +ZEND_METHOD(IntlChar, isIDIgnorable); +ZEND_METHOD(IntlChar, isIDPart); +ZEND_METHOD(IntlChar, isIDStart); +ZEND_METHOD(IntlChar, isISOControl); +ZEND_METHOD(IntlChar, isJavaIDPart); +ZEND_METHOD(IntlChar, isJavaIDStart); +ZEND_METHOD(IntlChar, isJavaSpaceChar); +ZEND_METHOD(IntlChar, islower); +ZEND_METHOD(IntlChar, isMirrored); +ZEND_METHOD(IntlChar, isprint); +ZEND_METHOD(IntlChar, ispunct); +ZEND_METHOD(IntlChar, isspace); +ZEND_METHOD(IntlChar, istitle); +ZEND_METHOD(IntlChar, isUAlphabetic); +ZEND_METHOD(IntlChar, isULowercase); +ZEND_METHOD(IntlChar, isupper); +ZEND_METHOD(IntlChar, isUUppercase); +ZEND_METHOD(IntlChar, isUWhiteSpace); +ZEND_METHOD(IntlChar, isWhitespace); +ZEND_METHOD(IntlChar, isxdigit); +ZEND_METHOD(IntlChar, ord); +ZEND_METHOD(IntlChar, tolower); +ZEND_METHOD(IntlChar, totitle); +ZEND_METHOD(IntlChar, toupper); + + +static const zend_function_entry class_IntlChar_methods[] = { + ZEND_ME(IntlChar, hasBinaryProperty, arginfo_class_IntlChar_hasBinaryProperty, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, charAge, arginfo_class_IntlChar_charAge, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, charDigitValue, arginfo_class_IntlChar_charDigitValue, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, charDirection, arginfo_class_IntlChar_charDirection, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, charFromName, arginfo_class_IntlChar_charFromName, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, charMirror, arginfo_class_IntlChar_charMirror, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, charName, arginfo_class_IntlChar_charName, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, charType, arginfo_class_IntlChar_charType, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, chr, arginfo_class_IntlChar_chr, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, digit, arginfo_class_IntlChar_digit, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, enumCharNames, arginfo_class_IntlChar_enumCharNames, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, enumCharTypes, arginfo_class_IntlChar_enumCharTypes, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, foldCase, arginfo_class_IntlChar_foldCase, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, forDigit, arginfo_class_IntlChar_forDigit, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) +#if U_ICU_VERSION_MAJOR_NUM >= 52 + ZEND_ME(IntlChar, getBidiPairedBracket, arginfo_class_IntlChar_getBidiPairedBracket, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) +#endif + ZEND_ME(IntlChar, getBlockCode, arginfo_class_IntlChar_getBlockCode, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, getCombiningClass, arginfo_class_IntlChar_getCombiningClass, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, getFC_NFKC_Closure, arginfo_class_IntlChar_getFC_NFKC_Closure, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, getIntPropertyMaxValue, arginfo_class_IntlChar_getIntPropertyMaxValue, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, getIntPropertyMinValue, arginfo_class_IntlChar_getIntPropertyMinValue, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, getIntPropertyValue, arginfo_class_IntlChar_getIntPropertyValue, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, getNumericValue, arginfo_class_IntlChar_getNumericValue, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, getPropertyEnum, arginfo_class_IntlChar_getPropertyEnum, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, getPropertyName, arginfo_class_IntlChar_getPropertyName, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, getPropertyValueEnum, arginfo_class_IntlChar_getPropertyValueEnum, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, getPropertyValueName, arginfo_class_IntlChar_getPropertyValueName, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, getUnicodeVersion, arginfo_class_IntlChar_getUnicodeVersion, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, isalnum, arginfo_class_IntlChar_isalnum, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, isalpha, arginfo_class_IntlChar_isalpha, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, isbase, arginfo_class_IntlChar_isbase, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, isblank, arginfo_class_IntlChar_isblank, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, iscntrl, arginfo_class_IntlChar_iscntrl, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, isdefined, arginfo_class_IntlChar_isdefined, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, isdigit, arginfo_class_IntlChar_isdigit, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, isgraph, arginfo_class_IntlChar_isgraph, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, isIDIgnorable, arginfo_class_IntlChar_isIDIgnorable, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, isIDPart, arginfo_class_IntlChar_isIDPart, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, isIDStart, arginfo_class_IntlChar_isIDStart, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, isISOControl, arginfo_class_IntlChar_isISOControl, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, isJavaIDPart, arginfo_class_IntlChar_isJavaIDPart, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, isJavaIDStart, arginfo_class_IntlChar_isJavaIDStart, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, isJavaSpaceChar, arginfo_class_IntlChar_isJavaSpaceChar, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, islower, arginfo_class_IntlChar_islower, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, isMirrored, arginfo_class_IntlChar_isMirrored, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, isprint, arginfo_class_IntlChar_isprint, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, ispunct, arginfo_class_IntlChar_ispunct, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, isspace, arginfo_class_IntlChar_isspace, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, istitle, arginfo_class_IntlChar_istitle, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, isUAlphabetic, arginfo_class_IntlChar_isUAlphabetic, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, isULowercase, arginfo_class_IntlChar_isULowercase, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, isupper, arginfo_class_IntlChar_isupper, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, isUUppercase, arginfo_class_IntlChar_isUUppercase, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, isUWhiteSpace, arginfo_class_IntlChar_isUWhiteSpace, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, isWhitespace, arginfo_class_IntlChar_isWhitespace, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, isxdigit, arginfo_class_IntlChar_isxdigit, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, ord, arginfo_class_IntlChar_ord, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, tolower, arginfo_class_IntlChar_tolower, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, totitle, arginfo_class_IntlChar_totitle, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(IntlChar, toupper, arginfo_class_IntlChar_toupper, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_FE_END +}; From a1b46fc15260ffeedbf67f4c08e5eda151667f38 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 14 Apr 2020 13:55:56 +0200 Subject: [PATCH 129/338] Fix test cases --- ext/standard/tests/file/windows_mb_path/test_big5_0.phpt | 2 +- ext/standard/tests/file/windows_mb_path/test_big5_2.phpt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/standard/tests/file/windows_mb_path/test_big5_0.phpt b/ext/standard/tests/file/windows_mb_path/test_big5_0.phpt index 6517cf88c13e4..be4641f0cc4b1 100644 --- a/ext/standard/tests/file/windows_mb_path/test_big5_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_big5_0.phpt @@ -11,7 +11,7 @@ skip_if_wrong_cp(950, "ansi"); ?> --INI-- -defalut_charset=big5 +default_charset=big5 --FILE-- --INI-- -defalut_charset=cp950 +default_charset=cp950 --FILE-- Date: Tue, 14 Apr 2020 15:37:20 +0300 Subject: [PATCH 130/338] Added missed '~' --- ext/opcache/jit/zend_jit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index 343b9457684b8..27f889f031d2d 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -847,7 +847,7 @@ static int zend_jit_split_interval(zend_lifetime_interval *current, uint32_t pos ival->ssa_var = current->ssa_var; ival->reg = ZREG_NONE; ival->flags |= ZREG_SPLIT | ZREG_LOAD; - ival->flags &= ZREG_STORE; + ival->flags &= ~ZREG_STORE; ival->hint = NULL; do { From 1f48feebb9be61cfd613f8fc62af87fa53bc741b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Mon, 13 Apr 2020 10:41:23 +0200 Subject: [PATCH 131/338] Improve some TypeError and ValueError messages Closes GH-5377 --- ext/bz2/bz2.c | 2 +- ext/bz2/tests/001.phpt | 6 ++-- ext/gd/gd.c | 6 ++-- ext/gd/libgd/gd.h | 2 +- ext/iconv/tests/iconv_strpos.phpt | 4 +-- ext/mbstring/mbstring.c | 4 +-- ext/mbstring/tests/bug43840.phpt | 12 +++---- ext/mbstring/tests/bug43841.phpt | 12 +++---- ext/mbstring/tests/bug45923.phpt | 32 +++++++++--------- .../tests/mb_stripos_empty_needle.phpt | 8 ++--- .../tests/mb_stripos_invalid_offset.phpt | 20 +++++------ .../tests/mb_stripos_variation5_Bug45923.phpt | 20 +++++------ .../tests/mb_strpos_empty_needle.phpt | 8 ++--- .../tests/mb_strpos_invalid_offset.phpt | 20 +++++------ .../tests/mb_strpos_offset_errors.phpt | 16 ++++----- ext/mbstring/tests/mb_strpos_variation5.phpt | 20 +++++------ .../tests/mb_strripos_empty_needle.phpt | 8 ++--- .../mb_strripos_variation5_Bug45923.phpt | 16 ++++----- .../tests/mb_strrpos_empty_needle.phpt | 8 ++--- ext/reflection/php_reflection.c | 4 +-- .../ReflectionProperty_getValue_error.phpt | 2 +- .../ReflectionProperty_isInitialized.phpt | 2 +- ext/standard/array.c | 13 ++++--- ext/standard/dir.c | 4 +-- ext/standard/string.c | 20 +++++------ .../tests/array/array_column_error.phpt | 8 ++--- .../tests/array/count_invalid_mode.phpt | 6 ++-- .../tests/dir/closedir_variation3.phpt | 2 +- .../tests/dir/rewinddir_variation3.phpt | 2 +- ext/standard/tests/serialize/max_depth.phpt | 4 +-- ext/standard/tests/strings/bug40754.phpt | 10 +++--- .../tests/strings/count_chars_basic.phpt | 2 +- ext/standard/tests/strings/str_repeat.phpt | Bin 3055 -> 3070 bytes ext/standard/tests/strings/stripos_error.phpt | 4 +-- .../tests/strings/stripos_variation11.phpt | 16 ++++----- .../tests/strings/stripos_variation7.phpt | 2 +- ext/standard/tests/strings/strpos.phpt | Bin 8041 -> 8133 bytes .../tests/strings/strripos_offset.phpt | 8 ++--- .../strings/strrpos_negative_offset.phpt | 4 +-- .../tests/strings/strrpos_offset.phpt | 8 ++--- .../tests/strings/strrpos_variation11.phpt | 16 ++++----- .../tests/strings/strrpos_variation7.phpt | 2 +- ext/standard/user_filters.c | 2 +- ext/standard/var.c | 4 +-- ext/tokenizer/tests/PhpToken_methods.phpt | 4 +-- ext/tokenizer/tokenizer.c | 4 +-- 46 files changed, 188 insertions(+), 189 deletions(-) diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c index 360f9d9c20583..ee690dbda3c0c 100644 --- a/ext/bz2/bz2.c +++ b/ext/bz2/bz2.c @@ -345,7 +345,7 @@ PHP_FUNCTION(bzopen) } if (mode_len != 1 || (mode[0] != 'r' && mode[0] != 'w')) { - zend_argument_value_error(2, "must be a valid mode. Only 'w' and 'r' are supported"); + zend_argument_value_error(2, "must be either 'r' or 'w'"); RETURN_THROWS(); } diff --git a/ext/bz2/tests/001.phpt b/ext/bz2/tests/001.phpt index 081558a7d4d49..90547c6642733 100644 --- a/ext/bz2/tests/001.phpt +++ b/ext/bz2/tests/001.phpt @@ -37,15 +37,15 @@ var_dump(bzopen($fp, "r")); ?> --EXPECTF-- -bzopen(): Argument #2 ($mode) must be a valid mode. Only 'w' and 'r' are supported +bzopen(): Argument #2 ($mode) must be either 'r' or 'w' Warning: bzopen(): Filename cannot be empty in %s on line %d bool(false) Warning: bzopen(): Filename cannot be empty in %s on line %d bool(false) -bzopen(): Argument #2 ($mode) must be a valid mode. Only 'w' and 'r' are supported -bzopen(): Argument #2 ($mode) must be a valid mode. Only 'w' and 'r' are supported +bzopen(): Argument #2 ($mode) must be either 'r' or 'w' +bzopen(): Argument #2 ($mode) must be either 'r' or 'w' Warning: bzopen(no_such_file): Failed to open stream: No such file or directory in %s on line %d bool(false) diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 157460b50bc5b..80b05ab89ed57 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -338,7 +338,7 @@ PHP_MINIT_FUNCTION(gd) /* GD2 image format types */ REGISTER_LONG_CONSTANT("IMG_GD2_RAW", GD2_FMT_RAW, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("IMG_GD2_COMPRESSED", GD2_FMT_COMPRESSED, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("IMG_FLIP_HORIZONTAL", GD_FLIP_HORINZONTAL, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("IMG_FLIP_HORIZONTAL", GD_FLIP_HORIZONTAL, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("IMG_FLIP_VERTICAL", GD_FLIP_VERTICAL, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("IMG_FLIP_BOTH", GD_FLIP_BOTH, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("IMG_EFFECT_REPLACE", gdEffectReplace, CONST_CS | CONST_PERSISTENT); @@ -3536,7 +3536,7 @@ PHP_FUNCTION(imageflip) gdImageFlipVertical(im); break; - case GD_FLIP_HORINZONTAL: + case GD_FLIP_HORIZONTAL: gdImageFlipHorizontal(im); break; @@ -3545,7 +3545,7 @@ PHP_FUNCTION(imageflip) break; default: - zend_argument_value_error(2, "must be a valid mode"); + zend_argument_value_error(2, "must be either IMG_FLIP_VERTICAL, IMG_FLIP_HORIZONTAL, or IMG_FLIP_BOTH"); RETURN_THROWS(); } diff --git a/ext/gd/libgd/gd.h b/ext/gd/libgd/gd.h index cddd6c1f7a6b8..739f844f25d99 100644 --- a/ext/gd/libgd/gd.h +++ b/ext/gd/libgd/gd.h @@ -824,7 +824,7 @@ void gdImageFlipHorizontal(gdImagePtr im); void gdImageFlipVertical(gdImagePtr im); void gdImageFlipBoth(gdImagePtr im); -#define GD_FLIP_HORINZONTAL 1 +#define GD_FLIP_HORIZONTAL 1 #define GD_FLIP_VERTICAL 2 #define GD_FLIP_BOTH 3 diff --git a/ext/iconv/tests/iconv_strpos.phpt b/ext/iconv/tests/iconv_strpos.phpt index 860ecfc4713ca..1dafd6c06b482 100644 --- a/ext/iconv/tests/iconv_strpos.phpt +++ b/ext/iconv/tests/iconv_strpos.phpt @@ -36,12 +36,12 @@ var_dump(iconv_strpos("string", "")); var_dump(iconv_strpos("", "string")); ?> ---EXPECTF-- +--EXPECT-- bool(false) bool(false) int(5) int(5) -Offset not contained in string +strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) bool(false) int(7) int(7) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 74274f4ae4026..163943cddff6d 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1986,10 +1986,10 @@ static void handle_strpos_error(size_t error) { php_error_docref(NULL, E_WARNING, "Conversion error"); break; case MBFL_ERROR_OFFSET: - zend_value_error("Offset not contained in string"); + zend_argument_value_error(3, "must be contained in argument #1 ($haystack)"); break; default: - zend_value_error("Unknown error in mb_strpos"); + zend_value_error("mb_strpos(): Unknown error"); break; } } diff --git a/ext/mbstring/tests/bug43840.phpt b/ext/mbstring/tests/bug43840.phpt index 7a3fd030944ea..e225804f8a2c2 100644 --- a/ext/mbstring/tests/bug43840.phpt +++ b/ext/mbstring/tests/bug43840.phpt @@ -54,18 +54,18 @@ bool(false) -- Offset is 22 -- --Multibyte String:-- -Offset not contained in string +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --ASCII String:-- -Offset not contained in string +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -- Offset is 53 -- --Multibyte String:-- -Offset not contained in string +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --ASCII String:-- -Offset not contained in string +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -- Offset is 54 -- --Multibyte String:-- -Offset not contained in string +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --ASCII String:-- -Offset not contained in string +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) diff --git a/ext/mbstring/tests/bug43841.phpt b/ext/mbstring/tests/bug43841.phpt index 4a1da505d4e76..4297eeac00d6f 100644 --- a/ext/mbstring/tests/bug43841.phpt +++ b/ext/mbstring/tests/bug43841.phpt @@ -47,21 +47,21 @@ foreach ($offsets as $i) { --EXPECT-- -- Offset is -25 -- Multibyte String: -Offset not contained in string +mb_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) ASCII String: mb_strrpos: -Offset not contained in string +mb_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) strrpos: -Offset not contained in string +strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -- Offset is -24 -- Multibyte String: -Offset not contained in string +mb_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) ASCII String: mb_strrpos: -Offset not contained in string +mb_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) strrpos: -Offset not contained in string +strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -- Offset is -13 -- Multibyte String: diff --git a/ext/mbstring/tests/bug45923.phpt b/ext/mbstring/tests/bug45923.phpt index 37d2b13f8bbc3..36fdda7c0043c 100644 --- a/ext/mbstring/tests/bug45923.phpt +++ b/ext/mbstring/tests/bug45923.phpt @@ -44,7 +44,7 @@ bool(false) > Offset: 11 bool(false) > Offset: 12 -Offset not contained in string +strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) > Offset: -1 bool(false) > Offset: -3 @@ -52,7 +52,7 @@ int(8) > Offset: -6 int(8) > Offset: -20 -Offset not contained in string +strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) ------- mb_strpos ----------- @@ -67,7 +67,7 @@ bool(false) > Offset: 11 bool(false) > Offset: 12 -Offset not contained in string +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) > Offset: -1 bool(false) > Offset: -3 @@ -75,7 +75,7 @@ int(8) > Offset: -6 int(8) > Offset: -20 -Offset not contained in string +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) ------- stripos ----------- @@ -90,7 +90,7 @@ bool(false) > Offset: 11 bool(false) > Offset: 12 -Offset not contained in string +stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) > Offset: -1 bool(false) > Offset: -3 @@ -98,7 +98,7 @@ int(8) > Offset: -6 int(8) > Offset: -20 -Offset not contained in string +stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) ------- mb_stripos ----------- @@ -113,7 +113,7 @@ bool(false) > Offset: 11 bool(false) > Offset: 12 -Offset not contained in string +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) > Offset: -1 bool(false) > Offset: -3 @@ -121,7 +121,7 @@ int(8) > Offset: -6 int(8) > Offset: -20 -Offset not contained in string +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) ------- strrpos ----------- @@ -136,7 +136,7 @@ bool(false) > Offset: 11 bool(false) > Offset: 12 -Offset not contained in string +strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) > Offset: -1 int(8) > Offset: -3 @@ -144,7 +144,7 @@ int(8) > Offset: -6 int(4) > Offset: -20 -Offset not contained in string +strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) ------- mb_strrpos ----------- @@ -159,7 +159,7 @@ bool(false) > Offset: 11 bool(false) > Offset: 12 -Offset not contained in string +mb_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) > Offset: -1 int(8) > Offset: -3 @@ -167,7 +167,7 @@ int(8) > Offset: -6 int(4) > Offset: -20 -Offset not contained in string +mb_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) ------- strripos ----------- @@ -182,7 +182,7 @@ bool(false) > Offset: 11 bool(false) > Offset: 12 -Offset not contained in string +strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) > Offset: -1 int(8) > Offset: -3 @@ -190,7 +190,7 @@ int(8) > Offset: -6 int(4) > Offset: -20 -Offset not contained in string +strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) ------- mb_strripos ----------- @@ -205,7 +205,7 @@ bool(false) > Offset: 11 bool(false) > Offset: 12 -Offset not contained in string +mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) > Offset: -1 int(8) > Offset: -3 @@ -213,4 +213,4 @@ int(8) > Offset: -6 int(4) > Offset: -20 -Offset not contained in string +mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) diff --git a/ext/mbstring/tests/mb_stripos_empty_needle.phpt b/ext/mbstring/tests/mb_stripos_empty_needle.phpt index d991e8bdb5be0..04e4dcef78a2a 100644 --- a/ext/mbstring/tests/mb_stripos_empty_needle.phpt +++ b/ext/mbstring/tests/mb_stripos_empty_needle.phpt @@ -73,10 +73,10 @@ int(2) int(5) -- ASCII string with out of bound positive offset -- -Offset not contained in string +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -- ASCII string with out of bound negative offset -- -Offset not contained in string +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -- Multi-byte string without offset -- int(0) @@ -88,7 +88,7 @@ int(2) int(19) -- Multi-byte string with out of bound positive offset -- -Offset not contained in string +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -- Multi-byte string with out of bound negative offset -- -Offset not contained in string +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) diff --git a/ext/mbstring/tests/mb_stripos_invalid_offset.phpt b/ext/mbstring/tests/mb_stripos_invalid_offset.phpt index f4ce16d010f49..123634faee0d9 100644 --- a/ext/mbstring/tests/mb_stripos_invalid_offset.phpt +++ b/ext/mbstring/tests/mb_stripos_invalid_offset.phpt @@ -81,13 +81,13 @@ try { --EXPECT-- String len: 42 == INVALID OFFSET == -Offset not contained in string -Offset not contained in string -Offset not contained in string -Offset not contained in string -Offset not contained in string -Offset not contained in string -Offset not contained in string -Offset not contained in string -Offset not contained in string -Offset not contained in string +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) diff --git a/ext/mbstring/tests/mb_stripos_variation5_Bug45923.phpt b/ext/mbstring/tests/mb_stripos_variation5_Bug45923.phpt index b071fdbff3558..95db4a2c250be 100644 --- a/ext/mbstring/tests/mb_stripos_variation5_Bug45923.phpt +++ b/ext/mbstring/tests/mb_stripos_variation5_Bug45923.phpt @@ -55,9 +55,9 @@ for ($i = -30; $i <= 60; $i += 10) { **-- Offset is: -30 --** -- ASCII String -- -Offset not contained in string +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --Multibyte String -- -Offset not contained in string +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) **-- Offset is: -20 --** -- ASCII String -- @@ -91,24 +91,24 @@ int(20) **-- Offset is: 30 --** -- ASCII String -- -Offset not contained in string +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --Multibyte String -- -Offset not contained in string +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) **-- Offset is: 40 --** -- ASCII String -- -Offset not contained in string +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --Multibyte String -- -Offset not contained in string +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) **-- Offset is: 50 --** -- ASCII String -- -Offset not contained in string +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --Multibyte String -- -Offset not contained in string +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) **-- Offset is: 60 --** -- ASCII String -- -Offset not contained in string +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --Multibyte String -- -Offset not contained in string +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) diff --git a/ext/mbstring/tests/mb_strpos_empty_needle.phpt b/ext/mbstring/tests/mb_strpos_empty_needle.phpt index da3e984b3ad73..0517281f3fc65 100644 --- a/ext/mbstring/tests/mb_strpos_empty_needle.phpt +++ b/ext/mbstring/tests/mb_strpos_empty_needle.phpt @@ -72,10 +72,10 @@ int(2) int(5) -- ASCII string with out of bound positive offset -- -Offset not contained in string +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -- ASCII string with out of bound negative offset -- -Offset not contained in string +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -- Multi-byte string without offset -- int(0) @@ -87,7 +87,7 @@ int(2) int(19) -- Multi-byte string with out of bound positive offset -- -Offset not contained in string +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -- Multi-byte string with out of bound negative offset -- -Offset not contained in string +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) diff --git a/ext/mbstring/tests/mb_strpos_invalid_offset.phpt b/ext/mbstring/tests/mb_strpos_invalid_offset.phpt index 3e2ea65e9a5a4..46485291e6345 100644 --- a/ext/mbstring/tests/mb_strpos_invalid_offset.phpt +++ b/ext/mbstring/tests/mb_strpos_invalid_offset.phpt @@ -81,13 +81,13 @@ try { --EXPECT-- String len: 42 == INVALID OFFSET == -Offset not contained in string -Offset not contained in string -Offset not contained in string -Offset not contained in string -Offset not contained in string -Offset not contained in string -Offset not contained in string -Offset not contained in string -Offset not contained in string -Offset not contained in string +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) diff --git a/ext/mbstring/tests/mb_strpos_offset_errors.phpt b/ext/mbstring/tests/mb_strpos_offset_errors.phpt index 41d7e257d4409..68dc75b338ba2 100644 --- a/ext/mbstring/tests/mb_strpos_offset_errors.phpt +++ b/ext/mbstring/tests/mb_strpos_offset_errors.phpt @@ -46,11 +46,11 @@ try { ?> --EXPECT-- -Offset not contained in string -Offset not contained in string -Offset not contained in string -Offset not contained in string -Offset not contained in string -Offset not contained in string -Offset not contained in string -Offset not contained in string +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +mb_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +mb_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +mb_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) diff --git a/ext/mbstring/tests/mb_strpos_variation5.phpt b/ext/mbstring/tests/mb_strpos_variation5.phpt index fe7542099a97d..ea2192087a750 100644 --- a/ext/mbstring/tests/mb_strpos_variation5.phpt +++ b/ext/mbstring/tests/mb_strpos_variation5.phpt @@ -55,9 +55,9 @@ for ($i = -30; $i <= 60; $i += 10) { **-- Offset is: -30 --** -- ASCII String -- -Offset not contained in string +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --Multibyte String -- -Offset not contained in string +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) **-- Offset is: -20 --** -- ASCII String -- @@ -91,24 +91,24 @@ int(20) **-- Offset is: 30 --** -- ASCII String -- -Offset not contained in string +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --Multibyte String -- -Offset not contained in string +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) **-- Offset is: 40 --** -- ASCII String -- -Offset not contained in string +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --Multibyte String -- -Offset not contained in string +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) **-- Offset is: 50 --** -- ASCII String -- -Offset not contained in string +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --Multibyte String -- -Offset not contained in string +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) **-- Offset is: 60 --** -- ASCII String -- -Offset not contained in string +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --Multibyte String -- -Offset not contained in string +mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) diff --git a/ext/mbstring/tests/mb_strripos_empty_needle.phpt b/ext/mbstring/tests/mb_strripos_empty_needle.phpt index 7d41b05a61e90..ebc5e54060035 100644 --- a/ext/mbstring/tests/mb_strripos_empty_needle.phpt +++ b/ext/mbstring/tests/mb_strripos_empty_needle.phpt @@ -73,10 +73,10 @@ int(7) int(5) -- ASCII string with out of bound positive offset -- -Offset not contained in string +mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -- ASCII string with out of bound negative offset -- -Offset not contained in string +mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -- Multi-byte string without offset -- int(21) @@ -88,7 +88,7 @@ int(21) int(19) -- Multi-byte string with out of bound positive offset -- -Offset not contained in string +mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -- Multi-byte string with out of bound negative offset -- -Offset not contained in string +mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) diff --git a/ext/mbstring/tests/mb_strripos_variation5_Bug45923.phpt b/ext/mbstring/tests/mb_strripos_variation5_Bug45923.phpt index ad20bfe3d9014..4160643ce6416 100644 --- a/ext/mbstring/tests/mb_strripos_variation5_Bug45923.phpt +++ b/ext/mbstring/tests/mb_strripos_variation5_Bug45923.phpt @@ -81,24 +81,24 @@ int(20) **-- Offset is: 30 --** -- ASCII String -- -Offset not contained in string +mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --Multibyte String -- -Offset not contained in string +mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) **-- Offset is: 40 --** -- ASCII String -- -Offset not contained in string +mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --Multibyte String -- -Offset not contained in string +mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) **-- Offset is: 50 --** -- ASCII String -- -Offset not contained in string +mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --Multibyte String -- -Offset not contained in string +mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) **-- Offset is: 60 --** -- ASCII String -- -Offset not contained in string +mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --Multibyte String -- -Offset not contained in string +mb_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) diff --git a/ext/mbstring/tests/mb_strrpos_empty_needle.phpt b/ext/mbstring/tests/mb_strrpos_empty_needle.phpt index 974c44dac00c1..6be2773276eb9 100644 --- a/ext/mbstring/tests/mb_strrpos_empty_needle.phpt +++ b/ext/mbstring/tests/mb_strrpos_empty_needle.phpt @@ -73,10 +73,10 @@ int(7) int(5) -- ASCII string with out of bound positive offset -- -Offset not contained in string +mb_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -- ASCII string with out of bound negative offset -- -Offset not contained in string +mb_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -- Multi-byte string without offset -- int(21) @@ -88,7 +88,7 @@ int(21) int(19) -- Multi-byte string with out of bound positive offset -- -Offset not contained in string +mb_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -- Multi-byte string with out of bound negative offset -- -Offset not contained in string +mb_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 6023ef0c0d8ce..e23f0076a9662 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -5335,7 +5335,7 @@ ZEND_METHOD(ReflectionProperty, getValue) zval rv; if (!object) { - zend_type_error("No object provided for getValue() on instance property"); + zend_argument_type_error(1, "must be provided for instance properties"); RETURN_THROWS(); } @@ -5428,7 +5428,7 @@ ZEND_METHOD(ReflectionProperty, isInitialized) int retval; if (!object) { - zend_type_error("No object provided for isInitialized() on instance property"); + zend_argument_type_error(1, "must be provided for instance properties"); RETURN_THROWS(); } diff --git a/ext/reflection/tests/ReflectionProperty_getValue_error.phpt b/ext/reflection/tests/ReflectionProperty_getValue_error.phpt index c5da067c32d93..40254319cc14f 100644 --- a/ext/reflection/tests/ReflectionProperty_getValue_error.phpt +++ b/ext/reflection/tests/ReflectionProperty_getValue_error.phpt @@ -66,4 +66,4 @@ Invalid instance: Given object is not an instance of the class this property was declared in Missing instance: -No object provided for getValue() on instance property +ReflectionProperty::getValue(): Argument #1 ($object) must be provided for instance properties diff --git a/ext/reflection/tests/ReflectionProperty_isInitialized.phpt b/ext/reflection/tests/ReflectionProperty_isInitialized.phpt index 29541e405b174..ac87873c6ac99 100644 --- a/ext/reflection/tests/ReflectionProperty_isInitialized.phpt +++ b/ext/reflection/tests/ReflectionProperty_isInitialized.phpt @@ -114,7 +114,7 @@ bool(false) Object type: bool(false) Given object is not an instance of the class this property was declared in -No object provided for isInitialized() on instance property +ReflectionProperty::isInitialized(): Argument #1 ($object) must be provided for instance properties Class with __isset: bool(false) bool(false) diff --git a/ext/standard/array.c b/ext/standard/array.c index daecdc7a52e32..dd7914f8c78c7 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -704,7 +704,7 @@ PHP_FUNCTION(count) ZEND_PARSE_PARAMETERS_END(); if (mode != COUNT_NORMAL && mode != COUNT_RECURSIVE) { - zend_argument_value_error(2, "must be a valid mode"); + zend_argument_value_error(2, "must be either COUNT_NORMAL or COUNT_RECURSIVE"); RETURN_THROWS(); } @@ -4087,8 +4087,7 @@ PHP_FUNCTION(array_count_values) * Specialized conversion rules for array_column() function */ static inline -zend_bool array_column_param_helper(zval *param, - const char *name) { +zend_bool array_column_param_helper(zval *param, int parameter_number) { switch (Z_TYPE_P(param)) { case IS_DOUBLE: convert_to_long_ex(param); @@ -4105,7 +4104,7 @@ zend_bool array_column_param_helper(zval *param, return 1; default: - zend_type_error("The %s key should be either a string or an integer", name); + zend_argument_type_error(parameter_number, "must be of type string|int, %s given", zend_zval_type_name(param)); return 0; } } @@ -4166,9 +4165,9 @@ PHP_FUNCTION(array_column) Z_PARAM_ZVAL_EX(index, 1, 0) ZEND_PARSE_PARAMETERS_END(); - if ((column && !array_column_param_helper(column, "column")) || - (index && !array_column_param_helper(index, "index"))) { - return; + if ((column && !array_column_param_helper(column, 2)) || + (index && !array_column_param_helper(index, 3))) { + RETURN_THROWS(); } array_init_size(return_value, zend_hash_num_elements(input)); diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 0b18c1f146278..da1af5ad74112 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -254,7 +254,7 @@ PHP_FUNCTION(closedir) FETCH_DIRP(); if (!(dirp->flags & PHP_STREAM_FLAG_IS_DIR)) { - zend_type_error("%d is not a valid Directory resource", dirp->res->handle); + zend_argument_type_error(1, "must be a valid Directory resource"); RETURN_THROWS(); } @@ -368,7 +368,7 @@ PHP_FUNCTION(rewinddir) FETCH_DIRP(); if (!(dirp->flags & PHP_STREAM_FLAG_IS_DIR)) { - zend_type_error("%d is not a valid Directory resource", dirp->res->handle); + zend_argument_type_error(1, "must be a valid Directory resource"); RETURN_THROWS(); } diff --git a/ext/standard/string.c b/ext/standard/string.c index a22992aa81737..4c0aaad974d48 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1889,7 +1889,7 @@ PHP_FUNCTION(strpos) offset += (zend_long)ZSTR_LEN(haystack); } if (offset < 0 || (size_t)offset > ZSTR_LEN(haystack)) { - zend_value_error("Offset not contained in string"); + zend_argument_value_error(3, "must be contained in argument #1 ($haystack)"); RETURN_THROWS(); } @@ -1925,7 +1925,7 @@ PHP_FUNCTION(stripos) offset += (zend_long)ZSTR_LEN(haystack); } if (offset < 0 || (size_t)offset > ZSTR_LEN(haystack)) { - zend_value_error("Offset not contained in string"); + zend_argument_value_error(3, "must be contained in argument #1 ($haystack)"); RETURN_THROWS(); } @@ -1967,14 +1967,14 @@ PHP_FUNCTION(strrpos) if (offset >= 0) { if ((size_t)offset > ZSTR_LEN(haystack)) { - zend_value_error("Offset not contained in string"); + zend_argument_value_error(3, "must be contained in argument #1 ($haystack)"); RETURN_THROWS(); } p = ZSTR_VAL(haystack) + (size_t)offset; e = ZSTR_VAL(haystack) + ZSTR_LEN(haystack); } else { if (offset < -ZEND_LONG_MAX || (size_t)(-offset) > ZSTR_LEN(haystack)) { - zend_value_error("Offset not contained in string"); + zend_argument_value_error(3, "must be contained in argument #1 ($haystack)"); RETURN_THROWS(); } @@ -2017,7 +2017,7 @@ PHP_FUNCTION(strripos) char lowered; if (offset >= 0) { if ((size_t)offset > ZSTR_LEN(haystack)) { - zend_value_error("Offset not contained in string"); + zend_argument_value_error(3, "must be contained in argument #1 ($haystack)"); RETURN_THROWS(); } p = ZSTR_VAL(haystack) + (size_t)offset; @@ -2025,7 +2025,7 @@ PHP_FUNCTION(strripos) } else { p = ZSTR_VAL(haystack); if (offset < -ZEND_LONG_MAX || (size_t)(-offset) > ZSTR_LEN(haystack)) { - zend_value_error("Offset not contained in string"); + zend_argument_value_error(3, "must be contained in argument #1 ($haystack)"); RETURN_THROWS(); } e = ZSTR_VAL(haystack) + (ZSTR_LEN(haystack) + (size_t)offset); @@ -2045,7 +2045,7 @@ PHP_FUNCTION(strripos) if (offset >= 0) { if ((size_t)offset > ZSTR_LEN(haystack)) { zend_string_release_ex(haystack_dup, 0); - zend_value_error("Offset not contained in string"); + zend_argument_value_error(3, "must be contained in argument #1 ($haystack)"); RETURN_THROWS(); } p = ZSTR_VAL(haystack_dup) + offset; @@ -2053,7 +2053,7 @@ PHP_FUNCTION(strripos) } else { if (offset < -ZEND_LONG_MAX || (size_t)(-offset) > ZSTR_LEN(haystack)) { zend_string_release_ex(haystack_dup, 0); - zend_value_error("Offset not contained in string"); + zend_argument_value_error(3, "must be contained in argument #1 ($haystack)"); RETURN_THROWS(); } @@ -5273,7 +5273,7 @@ PHP_FUNCTION(str_repeat) ZEND_PARSE_PARAMETERS_END(); if (mult < 0) { - zend_value_error("Second argument has to be greater than or equal to 0"); + zend_argument_value_error(2, "must be greater than or equal to 0"); RETURN_THROWS(); } @@ -5331,7 +5331,7 @@ PHP_FUNCTION(count_chars) ZEND_PARSE_PARAMETERS_END(); if (mymode < 0 || mymode > 4) { - zend_value_error("Unknown mode"); + zend_argument_value_error(2, "must be between 1 and 4 (inclusive)"); RETURN_THROWS(); } diff --git a/ext/standard/tests/array/array_column_error.phpt b/ext/standard/tests/array/array_column_error.phpt index 6fb5169d454bd..547ecf91cb354 100644 --- a/ext/standard/tests/array/array_column_error.phpt +++ b/ext/standard/tests/array/array_column_error.phpt @@ -46,15 +46,15 @@ DONE *** Testing array_column() : error conditions *** -- Testing array_column() column key parameter should be a string or an integer (testing bool) -- -The column key should be either a string or an integer +array_column(): Argument #2 ($column_key) must be of type string|int, bool given -- Testing array_column() column key parameter should be a string or integer (testing array) -- -The column key should be either a string or an integer +array_column(): Argument #2 ($column_key) must be of type string|int, array given -- Testing array_column() index key parameter should be a string or an integer (testing bool) -- -The index key should be either a string or an integer +array_column(): Argument #3 ($index_key) must be of type string|int, bool given -- Testing array_column() index key parameter should be a string or integer (testing array) -- -The index key should be either a string or an integer +array_column(): Argument #3 ($index_key) must be of type string|int, array given DONE diff --git a/ext/standard/tests/array/count_invalid_mode.phpt b/ext/standard/tests/array/count_invalid_mode.phpt index a411a2983ed5b..4f7950e7271ee 100644 --- a/ext/standard/tests/array/count_invalid_mode.phpt +++ b/ext/standard/tests/array/count_invalid_mode.phpt @@ -29,9 +29,9 @@ int(0) int(0) int(0) int(0) -count(): Argument #2 ($mode) must be a valid mode -count(): Argument #2 ($mode) must be a valid mode -count(): Argument #2 ($mode) must be a valid mode +count(): Argument #2 ($mode) must be either COUNT_NORMAL or COUNT_RECURSIVE +count(): Argument #2 ($mode) must be either COUNT_NORMAL or COUNT_RECURSIVE +count(): Argument #2 ($mode) must be either COUNT_NORMAL or COUNT_RECURSIVE int(0) int(0) int(0) diff --git a/ext/standard/tests/dir/closedir_variation3.phpt b/ext/standard/tests/dir/closedir_variation3.phpt index 1d9c644a3e652..0f50c1db03716 100644 --- a/ext/standard/tests/dir/closedir_variation3.phpt +++ b/ext/standard/tests/dir/closedir_variation3.phpt @@ -37,7 +37,7 @@ if(is_resource($fp)) { resource(%d) of type (stream) -- Try to close the file pointer using closedir() -- -%d is not a valid Directory resource +closedir(): Argument #1 ($dir_handle) must be a valid Directory resource -- Check file pointer: -- resource(%d) of type (stream) diff --git a/ext/standard/tests/dir/rewinddir_variation3.phpt b/ext/standard/tests/dir/rewinddir_variation3.phpt index 07508eac3f7ab..7619f82ecff7d 100644 --- a/ext/standard/tests/dir/rewinddir_variation3.phpt +++ b/ext/standard/tests/dir/rewinddir_variation3.phpt @@ -38,7 +38,7 @@ if ($result1 === $result2) { -- Open a file using fopen -- resource(%d) of type (stream) -%d is not a valid Directory resource +rewinddir(): Argument #1 ($dir_handle) must be a valid Directory resource -- Check if rewinddir() has repositioned the file pointer -- rewinddir() does not work on file pointers diff --git a/ext/standard/tests/serialize/max_depth.phpt b/ext/standard/tests/serialize/max_depth.phpt index 5e1c869b1d25e..79ab13e9f1658 100644 --- a/ext/standard/tests/serialize/max_depth.phpt +++ b/ext/standard/tests/serialize/max_depth.phpt @@ -104,8 +104,8 @@ var_dump(is_array(unserialize( ?> --EXPECTF-- Invalid max_depth: -max_depth should be int -max_depth cannot be negative +unserialize(): 'max_depth' option must be of type int, string given +unserialize(): 'max_depth' option must be greater than or equal to 0 Array: bool(true) diff --git a/ext/standard/tests/strings/bug40754.phpt b/ext/standard/tests/strings/bug40754.phpt index 5f35b4da44429..b71f28044aefd 100644 --- a/ext/standard/tests/strings/bug40754.phpt +++ b/ext/standard/tests/strings/bug40754.phpt @@ -71,15 +71,15 @@ substr_count(): Argument #3 ($offset) must be contained in argument #1 ($haystac Warning: substr_compare(): The start position cannot exceed initial string length in %s on line %d bool(false) -Offset not contained in string +stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) substr_count(): Argument #3 ($offset) must be contained in argument #1 ($haystack) Warning: substr_count(): Invalid length value in %s on line %d bool(false) -Offset not contained in string -Offset not contained in string -Offset not contained in string -Offset not contained in string +strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) int(2) string(8) "abcdeabc" bool(false) diff --git a/ext/standard/tests/strings/count_chars_basic.phpt b/ext/standard/tests/strings/count_chars_basic.phpt index c1868714b06e6..0e5c3455e8cb9 100644 --- a/ext/standard/tests/strings/count_chars_basic.phpt +++ b/ext/standard/tests/strings/count_chars_basic.phpt @@ -1575,4 +1575,4 @@ array(238) { } string(18) " Rabcdefghimnorstu" string(476) "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f5051535455565758595a5b5c5d5e5f606a6b6c7071767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff" -Unknown mode +count_chars(): Argument #2 ($mode) must be between 1 and 4 (inclusive) diff --git a/ext/standard/tests/strings/str_repeat.phpt b/ext/standard/tests/strings/str_repeat.phpt index 4751dc783ffc1d72d635fb0324a43c99d7b385ba..73a17818efd9172e9b542b718aded5aff0784594 100644 GIT binary patch delta 50 zcmaDa{!e_vPHwg0lA`#c)PmH+5)Dl&1;?WF(%jU%5(Q-=1r3$l(wq`ah1}BOlF8?} FSxT3T^xi9%j}i9&LIUP)qRUTTU$W}ZTENl|8AIu`-y%)Al}15GY2 J7k@ujE&wK99X --EXPECT-- strripos(): Argument #3 ($offset) must be of type int, float given -Offset not contained in string -Offset not contained in string -Offset not contained in string -Offset not contained in string +strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) Done diff --git a/ext/standard/tests/strings/strrpos_negative_offset.phpt b/ext/standard/tests/strings/strrpos_negative_offset.phpt index 41b2b16b56917..e4ac469ba4b81 100644 --- a/ext/standard/tests/strings/strrpos_negative_offset.phpt +++ b/ext/standard/tests/strings/strrpos_negative_offset.phpt @@ -32,11 +32,11 @@ int(7) bool(false) int(5) int(1) -Offset not contained in string +strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) int(0) int(0) int(7) bool(false) int(5) int(1) -Offset not contained in string +strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) diff --git a/ext/standard/tests/strings/strrpos_offset.phpt b/ext/standard/tests/strings/strrpos_offset.phpt index 13df98e71c8ea..46b37955e4ab8 100644 --- a/ext/standard/tests/strings/strrpos_offset.phpt +++ b/ext/standard/tests/strings/strrpos_offset.phpt @@ -37,8 +37,8 @@ echo "Done\n"; ?> --EXPECT-- strrpos(): Argument #3 ($offset) must be of type int, float given -Offset not contained in string -Offset not contained in string -Offset not contained in string -Offset not contained in string +strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) Done diff --git a/ext/standard/tests/strings/strrpos_variation11.phpt b/ext/standard/tests/strings/strrpos_variation11.phpt index df0aac0153a3f..185af4e1547a7 100644 --- a/ext/standard/tests/strings/strrpos_variation11.phpt +++ b/ext/standard/tests/strings/strrpos_variation11.phpt @@ -146,35 +146,35 @@ int(0) bool(false) -- Iteration 16 -- int(0) -ValueError: Offset not contained in string +ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -- Iteration 17 -- int(0) bool(false) -- Iteration 18 -- int(0) -ValueError: Offset not contained in string +ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -- Iteration 19 -- int(0) bool(false) -- Iteration 20 -- int(0) -ValueError: Offset not contained in string +ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -- Iteration 21 -- int(0) -ValueError: Offset not contained in string +ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -- Iteration 22 -- int(0) -ValueError: Offset not contained in string +ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -- Iteration 23 -- int(0) -ValueError: Offset not contained in string +ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -- Iteration 24 -- TypeError: strrpos(): Argument #1 ($haystack) must be of type string, resource given TypeError: strrpos(): Argument #1 ($haystack) must be of type string, resource given -- Iteration 25 -- int(0) -ValueError: Offset not contained in string +ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -- Iteration 26 -- int(0) -ValueError: Offset not contained in string +ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) *** Done *** diff --git a/ext/standard/tests/strings/strrpos_variation7.phpt b/ext/standard/tests/strings/strrpos_variation7.phpt index 9a02a4a0ec00f..79715453c9ef7 100644 --- a/ext/standard/tests/strings/strrpos_variation7.phpt +++ b/ext/standard/tests/strings/strrpos_variation7.phpt @@ -30,7 +30,7 @@ echo "*** Done ***"; *** Testing strrpos() function: with heredoc strings *** -- With empty heredoc string -- int(0) -Offset not contained in string +strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) int(0) int(0) *** Done *** diff --git a/ext/standard/user_filters.c b/ext/standard/user_filters.c index fc8fd826c8f6b..4d11ae2b4410e 100644 --- a/ext/standard/user_filters.c +++ b/ext/standard/user_filters.c @@ -416,7 +416,7 @@ static void php_stream_bucket_attach(int append, INTERNAL_FUNCTION_PARAMETERS) ZEND_PARSE_PARAMETERS_END(); if (NULL == (pzbucket = zend_hash_str_find(Z_OBJPROP_P(zobject), "bucket", sizeof("bucket")-1))) { - zend_value_error("Object has no bucket property"); + zend_argument_value_error(2, "must be an object that has a 'bucket' property"); RETURN_THROWS(); } diff --git a/ext/standard/var.c b/ext/standard/var.c index dc133dd5ce5eb..e1bc4c5597f40 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -1240,11 +1240,11 @@ PHP_FUNCTION(unserialize) max_depth = zend_hash_str_find_deref(Z_ARRVAL_P(options), "max_depth", sizeof("max_depth") - 1); if (max_depth) { if (Z_TYPE_P(max_depth) != IS_LONG) { - zend_type_error("max_depth should be int"); + zend_type_error("unserialize(): 'max_depth' option must be of type int, %s given", zend_zval_type_name(max_depth)); goto cleanup; } if (Z_LVAL_P(max_depth) < 0) { - zend_value_error("max_depth cannot be negative"); + zend_value_error("unserialize(): 'max_depth' option must be greater than or equal to 0"); goto cleanup; } diff --git a/ext/tokenizer/tests/PhpToken_methods.phpt b/ext/tokenizer/tests/PhpToken_methods.phpt index 9429cea7ed9c2..3e08f3c39e155 100644 --- a/ext/tokenizer/tests/PhpToken_methods.phpt +++ b/ext/tokenizer/tests/PhpToken_methods.phpt @@ -108,8 +108,8 @@ bool(false) bool(false) Error: -Kind must be of type int, string or array -Kind array must have elements of type int or string +PhpToken::is(): Argument #1 ($kind) must be of type string|int|array, float given +PhpToken::is(): Argument #1 ($kind) must only have elements of type string|int, float given Typed property PhpToken::$id must not be accessed before initialization Typed property PhpToken::$text must not be accessed before initialization Typed property PhpToken::$id must not be accessed before initialization diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c index f07a839bb61d8..db573232233a9 100644 --- a/ext/tokenizer/tokenizer.c +++ b/ext/tokenizer/tokenizer.c @@ -192,13 +192,13 @@ PHP_METHOD(PhpToken, is) RETURN_TRUE; } } else { - zend_type_error("Kind array must have elements of type int or string"); + zend_argument_type_error(1, "must only have elements of type string|int, %s given", zend_zval_type_name(entry)); RETURN_THROWS(); } } ZEND_HASH_FOREACH_END(); RETURN_FALSE; } else { - zend_type_error("Kind must be of type int, string or array"); + zend_argument_type_error(1, "must be of type string|int|array, %s given", zend_zval_type_name(kind)); RETURN_THROWS(); } } From 04ab4d09bef7c0c6c1664d5665c0b8cce3cca89b Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Tue, 14 Apr 2020 13:56:48 +0200 Subject: [PATCH 132/338] Add Intl resource bundle files for big-endian architecture. Little and Big endian files have their own designated folder. Both use the ASCII charset family. We may want to add a big-endian/EBCDIC charset family resource bundle in the future. The build script is currently left untouched as it seems to mostly be for Windows. --- ext/intl/tests/_files/resourcebundle_be/es.res | Bin 0 -> 384 bytes .../_files/resourcebundle_be/res_index.res | Bin 0 -> 128 bytes .../tests/_files/resourcebundle_be/root.res | Bin 0 -> 400 bytes .../es.res | Bin .../res_index.res | Bin .../root.res | Bin 388 -> 400 bytes ext/intl/tests/resourcebundle.build | 1 + ext/intl/tests/resourcebundle.inc | 10 +++++++++- 8 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 ext/intl/tests/_files/resourcebundle_be/es.res create mode 100644 ext/intl/tests/_files/resourcebundle_be/res_index.res create mode 100644 ext/intl/tests/_files/resourcebundle_be/root.res rename ext/intl/tests/_files/{resourcebundle => resourcebundle_le}/es.res (100%) rename ext/intl/tests/_files/{resourcebundle => resourcebundle_le}/res_index.res (100%) rename ext/intl/tests/_files/{resourcebundle => resourcebundle_le}/root.res (92%) diff --git a/ext/intl/tests/_files/resourcebundle_be/es.res b/ext/intl/tests/_files/resourcebundle_be/es.res new file mode 100644 index 0000000000000000000000000000000000000000..5564e199cec3cf6c71634f73598950aa479d9fd6 GIT binary patch literal 384 zcmZ{gF-`+95Jlf6fh^EaP$7z?Aq^6O6i5^lp`i#AsZvF9HWn;OoM_h|=r{sbpxu%y za0MzV8m>Uiw-q4@u=G6h|9Hlh$=*9`K|+Ipt$ImAd5fQw!KK8i*cQVjLE~-ZD_<7w zDyD_=G2YqS&&!yO3m2m|e5ef#{ne+str2ItI~#``X~)y)&>T~(U&88BQZ6D`q}yDk!; pU(yNrVnu}i2=!E~iQtSlp~DV64(j?5_BWxcIidGBgVPT<`v!H1NvZ$< literal 0 HcmV?d00001 diff --git a/ext/intl/tests/_files/resourcebundle_be/res_index.res b/ext/intl/tests/_files/resourcebundle_be/res_index.res new file mode 100644 index 0000000000000000000000000000000000000000..03892a6afb16c9c561c2e08780ceb117c108e4fd GIT binary patch literal 128 zcmZQjxTVe@!oa}Dz{C)gTI|Hg1Z1-?z<~k-gBXy*2E=?oECIzpRSb-tdBr7(IXS5* sKKaRsIjO}AKva~UU&63z)heJo5FpV^47v;kU_Qtk0icC43JeTF04!({?*IS* literal 0 HcmV?d00001 diff --git a/ext/intl/tests/_files/resourcebundle_be/root.res b/ext/intl/tests/_files/resourcebundle_be/root.res new file mode 100644 index 0000000000000000000000000000000000000000..7df81bc0db5fe35ae0cd3f3cfd5cacf79fb05559 GIT binary patch literal 400 zcmZ{gu}T9$5Qe|YMRSUUg_T&GjcEkY6oQQqEGz;-nrI_z;t@}hOW0dPJ0HPUu-(#E z@D;4AYjlf z^pDHR>bm4Cx-td-KE&*dCa(G)G^ wtcyfwQiQ+4v{pozNx09%nh44@C$!n2%YpY#u)hf%)d{)BIh=mN*;0%C2c3OXA^-pY literal 0 HcmV?d00001 diff --git a/ext/intl/tests/_files/resourcebundle/es.res b/ext/intl/tests/_files/resourcebundle_le/es.res similarity index 100% rename from ext/intl/tests/_files/resourcebundle/es.res rename to ext/intl/tests/_files/resourcebundle_le/es.res diff --git a/ext/intl/tests/_files/resourcebundle/res_index.res b/ext/intl/tests/_files/resourcebundle_le/res_index.res similarity index 100% rename from ext/intl/tests/_files/resourcebundle/res_index.res rename to ext/intl/tests/_files/resourcebundle_le/res_index.res diff --git a/ext/intl/tests/_files/resourcebundle/root.res b/ext/intl/tests/_files/resourcebundle_le/root.res similarity index 92% rename from ext/intl/tests/_files/resourcebundle/root.res rename to ext/intl/tests/_files/resourcebundle_le/root.res index 62cb48c45718392516578b864c11a8c34678cf3f..52cd79e002c2060cf68c1823663889af9a36d266 100644 GIT binary patch delta 20 ScmZo+p1{1Jg^_0!5&!^PA_`Oh delta 7 OcmbQh+`_z}g%JP=!U9kL diff --git a/ext/intl/tests/resourcebundle.build b/ext/intl/tests/resourcebundle.build index 273e4407b7aea..ee645a0c55401 100644 --- a/ext/intl/tests/resourcebundle.build +++ b/ext/intl/tests/resourcebundle.build @@ -1,4 +1,5 @@ Date: Tue, 14 Apr 2020 16:05:57 +0200 Subject: [PATCH 133/338] Don't leak peername if accept fails Even if the accept fails, the peername may be populated. --- ext/standard/streamsfuncs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index 6fbfb0bcdc504..493f3d08645f0 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -295,6 +295,9 @@ PHP_FUNCTION(stream_socket_accept) } php_stream_to_zval(clistream, return_value); } else { + if (peername) { + zend_string_release(peername); + } php_error_docref(NULL, E_WARNING, "accept failed: %s", errstr ? ZSTR_VAL(errstr) : "Unknown error"); RETVAL_FALSE; } From b9b2e8ddde01c7b70e2cb3d9d6e343fc7e109188 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 14 Apr 2020 15:14:40 +0200 Subject: [PATCH 134/338] Fix socket_write() default value --- ext/sockets/sockets.stub.php | 2 +- ext/sockets/sockets_arginfo.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/sockets/sockets.stub.php b/ext/sockets/sockets.stub.php index a40e87e4de63c..5fe5b1cf7347f 100644 --- a/ext/sockets/sockets.stub.php +++ b/ext/sockets/sockets.stub.php @@ -26,7 +26,7 @@ function socket_listen($socket, int $backlog = 0): bool {} function socket_close($socket): void {} /** @param resource $socket */ -function socket_write($socket, string $buf, int $length = 0): int|false {} +function socket_write($socket, string $buf, int $length = UNKNOWN): int|false {} /** @param resource $socket */ function socket_read($socket, int $length, int $type = PHP_BINARY_READ): string|false {} diff --git a/ext/sockets/sockets_arginfo.h b/ext/sockets/sockets_arginfo.h index 73dcacfe0b24b..929ad01229060 100644 --- a/ext/sockets/sockets_arginfo.h +++ b/ext/sockets/sockets_arginfo.h @@ -35,7 +35,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_write, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_INFO(0, socket) ZEND_ARG_TYPE_INFO(0, buf, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_read, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) From d0006b5fac607a10b47a407beb32cab156351e8f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 14 Apr 2020 15:16:28 +0200 Subject: [PATCH 135/338] Use UNKNOWN default for socket_connect() Specifying the port is mandatory for INET sockets. --- ext/sockets/sockets.stub.php | 2 +- ext/sockets/sockets_arginfo.h | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ext/sockets/sockets.stub.php b/ext/sockets/sockets.stub.php index 5fe5b1cf7347f..680a1b883559f 100644 --- a/ext/sockets/sockets.stub.php +++ b/ext/sockets/sockets.stub.php @@ -41,7 +41,7 @@ function socket_getpeername($socket, &$addr, &$port = UNKNOWN): bool {} function socket_create(int $domain, int $type, int $protocol) {} /** @param resource $socket */ -function socket_connect($socket, string $addr, int $port = 0): bool {} +function socket_connect($socket, string $addr, int $port = UNKNOWN): bool {} function socket_strerror(int $errno): string {} diff --git a/ext/sockets/sockets_arginfo.h b/ext/sockets/sockets_arginfo.h index 929ad01229060..3c8e91d0ec2db 100644 --- a/ext/sockets/sockets_arginfo.h +++ b/ext/sockets/sockets_arginfo.h @@ -61,14 +61,18 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_connect, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(0, socket) ZEND_ARG_TYPE_INFO(0, addr, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO(0, port, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_strerror, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, errno, IS_LONG, 0) ZEND_END_ARG_INFO() -#define arginfo_socket_bind arginfo_socket_connect +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_bind, 0, 2, _IS_BOOL, 0) + ZEND_ARG_INFO(0, socket) + ZEND_ARG_TYPE_INFO(0, addr, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "0") +ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_recv, 0, 4, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_INFO(0, socket) From 6df761b7ffc0f54d9d282c394a2a5e53c3d036ef Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Tue, 14 Apr 2020 10:25:37 -0400 Subject: [PATCH 136/338] NEWS --- NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS b/NEWS index a6b9db32e3155..7e551b1d094a2 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2020, PHP 7.2.30 +- Standard: + . Fixed bug #79330 (shell_exec() silently truncates after a null byte). (stas) + . Fixed bug #79465 (OOB Read in urldecode()). (stas) 19 Mar 2020, PHP 7.2.29 From 13842eda375a87543650fbf95ffc64f00f3586fc Mon Sep 17 00:00:00 2001 From: dinosaur Date: Tue, 14 Apr 2020 07:46:34 +0800 Subject: [PATCH 137/338] Fixed bug #79468 Close the stream filter resources when removing them from the stream. --- NEWS | 2 ++ ext/standard/tests/filters/bug79468.phpt | 21 +++++++++++++++++++++ main/streams/streams.c | 6 ++++++ 3 files changed, 29 insertions(+) create mode 100644 ext/standard/tests/filters/bug79468.phpt diff --git a/NEWS b/NEWS index 7e551b1d094a2..a1530faa038a4 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,8 @@ PHP NEWS ?? ??? 2020, PHP 7.2.30 - Standard: + . Fixed bug #79468 (SIGSEGV when closing stream handle with a stream filter + appended). (dinosaur) . Fixed bug #79330 (shell_exec() silently truncates after a null byte). (stas) . Fixed bug #79465 (OOB Read in urldecode()). (stas) diff --git a/ext/standard/tests/filters/bug79468.phpt b/ext/standard/tests/filters/bug79468.phpt new file mode 100644 index 0000000000000..60a848ec016d4 --- /dev/null +++ b/ext/standard/tests/filters/bug79468.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #79468 SIGSEGV when closing stream handle with a stream filter appended +--SKIPIF-- + +--FILE-- +getMessage()); +} +?> +--EXPECTF-- +Warning: stream_filter_remove(): Invalid resource given, not a stream filter in %s on line %d diff --git a/main/streams/streams.c b/main/streams/streams.c index b504711db36dd..bf9537d33c053 100644 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -477,9 +477,15 @@ fprintf(stderr, "stream_free: %s:%p[%s] preserve_handle=%d release_cast=%d remov if (close_options & PHP_STREAM_FREE_RELEASE_STREAM) { while (stream->readfilters.head) { + if (stream->readfilters.head->res != NULL) { + zend_list_close(stream->readfilters.head->res); + } php_stream_filter_remove(stream->readfilters.head, 1); } while (stream->writefilters.head) { + if (stream->writefilters.head->res != NULL) { + zend_list_close(stream->writefilters.head->res); + } php_stream_filter_remove(stream->writefilters.head, 1); } From bac5137e4ec7e64f1357d7de53764e79751b5c1a Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 14 Apr 2020 16:52:13 +0200 Subject: [PATCH 138/338] Add zend_create_member_string() API This is a recurring pattern. --- Zend/zend_API.c | 18 +++--------------- Zend/zend_compile.c | 16 ++++++++++------ Zend/zend_compile.h | 1 + ext/opcache/Optimizer/compact_literals.c | 6 +----- 4 files changed, 15 insertions(+), 26 deletions(-) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 1b132d64c90dc..6dab0d3f292cd 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -3102,25 +3102,13 @@ static zend_always_inline int zend_is_callable_check_func(int check_flags, zval } /* }}} */ -static zend_string *zend_create_method_string(zend_string *class_name, zend_string *method_name) { - zend_string *callable_name = zend_string_alloc( - ZSTR_LEN(class_name) + ZSTR_LEN(method_name) + sizeof("::") - 1, 0); - char *ptr = ZSTR_VAL(callable_name); - memcpy(ptr, ZSTR_VAL(class_name), ZSTR_LEN(class_name)); - ptr += ZSTR_LEN(class_name); - memcpy(ptr, "::", sizeof("::") - 1); - ptr += sizeof("::") - 1; - memcpy(ptr, ZSTR_VAL(method_name), ZSTR_LEN(method_name) + 1); - return callable_name; -} - ZEND_API zend_string *zend_get_callable_name_ex(zval *callable, zend_object *object) /* {{{ */ { try_again: switch (Z_TYPE_P(callable)) { case IS_STRING: if (object) { - return zend_create_method_string(object->ce->name, Z_STR_P(callable)); + return zend_create_member_string(object->ce->name, Z_STR_P(callable)); } return zend_string_copy(Z_STR_P(callable)); @@ -3139,9 +3127,9 @@ ZEND_API zend_string *zend_get_callable_name_ex(zval *callable, zend_object *obj } if (Z_TYPE_P(obj) == IS_STRING) { - return zend_create_method_string(Z_STR_P(obj), Z_STR_P(method)); + return zend_create_member_string(Z_STR_P(obj), Z_STR_P(method)); } else if (Z_TYPE_P(obj) == IS_OBJECT) { - return zend_create_method_string(Z_OBJCE_P(obj)->name, Z_STR_P(method)); + return zend_create_member_string(Z_OBJCE_P(obj)->name, Z_STR_P(method)); } else { return ZSTR_KNOWN(ZEND_STR_ARRAY_CAPITALIZED); } diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 1f7ee48beef23..1c7f5f1073ead 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -852,6 +852,13 @@ uint32_t zend_add_member_modifier(uint32_t flags, uint32_t new_flag) /* {{{ */ } /* }}} */ +ZEND_API zend_string *zend_create_member_string(zend_string *class_name, zend_string *member_name) { + return zend_string_concat3( + ZSTR_VAL(class_name), ZSTR_LEN(class_name), + "::", sizeof("::") - 1, + ZSTR_VAL(member_name), ZSTR_LEN(member_name)); +} + zend_string *zend_concat_names(char *name1, size_t name1_len, char *name2, size_t name2_len) { return zend_string_concat3(name1, name1_len, "\\", 1, name2, name2_len); } @@ -7160,10 +7167,8 @@ static zend_bool zend_try_ct_eval_magic_const(zval *zv, zend_ast *ast) /* {{{ */ } if (op_array && op_array->function_name) { if (op_array->scope) { - ZVAL_NEW_STR(zv, zend_string_concat3( - ZSTR_VAL(op_array->scope->name), ZSTR_LEN(op_array->scope->name), - "::", 2, - ZSTR_VAL(op_array->function_name), ZSTR_LEN(op_array->function_name))); + ZVAL_NEW_STR(zv, + zend_create_member_string(op_array->scope->name, op_array->function_name)); } else { ZVAL_STR_COPY(zv, op_array->function_name); } @@ -8553,8 +8558,7 @@ void zend_compile_const_expr_class_const(zend_ast **ast_ptr) /* {{{ */ zend_string_addref(class_name); } - name = zend_string_concat3( - ZSTR_VAL(class_name), ZSTR_LEN(class_name), "::", 2, ZSTR_VAL(const_name), ZSTR_LEN(const_name)); + name = zend_create_member_string(class_name, const_name); zend_ast_destroy(ast); zend_string_release_ex(class_name, 0); diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 5dd4c39d6aebc..b925c809db2e2 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -783,6 +783,7 @@ ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle); ZEND_API void zend_cleanup_internal_class_data(zend_class_entry *ce); ZEND_API void zend_cleanup_internal_classes(void); ZEND_API void zend_type_release(zend_type type, zend_bool persistent); +ZEND_API zend_string *zend_create_member_string(zend_string *class_name, zend_string *member_name); ZEND_API ZEND_COLD void zend_user_exception_handler(void); diff --git a/ext/opcache/Optimizer/compact_literals.c b/ext/opcache/Optimizer/compact_literals.c index f6f32e45145fe..f29262bd46b78 100644 --- a/ext/opcache/Optimizer/compact_literals.c +++ b/ext/opcache/Optimizer/compact_literals.c @@ -96,11 +96,7 @@ static uint32_t add_static_slot(HashTable *hash, zval *prop_name = &op_array->literals[op2]; zval *pos, tmp; - zend_string *key = zend_string_concat3( - Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), - "::", sizeof("::") - 1, - Z_STRVAL_P(prop_name), Z_STRLEN_P(prop_name)); - + zend_string *key = zend_create_member_string(Z_STR_P(class_name), Z_STR_P(prop_name)); ZSTR_H(key) = zend_string_hash_func(key); ZSTR_H(key) += kind; From 4a935bc2c9a58319b416655d473367b54fe113de Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 14 Apr 2020 17:02:47 +0200 Subject: [PATCH 139/338] Always use __invoke callable name for objects The callable name is provided also if it's not callable, in which case it's basically "what it would be if it were callable", which is ClassName::__invoke. The current behavior of casting the object to string makes very little sense as this will just throw an exception for most objects. --- Zend/zend_API.c | 21 ++---- .../general_functions/is_callable_basic2.phpt | 64 +++++++++++++++++++ 2 files changed, 70 insertions(+), 15 deletions(-) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 6dab0d3f292cd..cbd89f7c0cd8f 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -3136,21 +3136,12 @@ ZEND_API zend_string *zend_get_callable_name_ex(zval *callable, zend_object *obj } case IS_OBJECT: { - zend_class_entry *calling_scope; - zend_function *fptr; - zend_object *object; - zend_object *zobj = Z_OBJ_P(callable); - - if (zobj->handlers->get_closure - && zobj->handlers->get_closure(zobj, &calling_scope, &fptr, &object, 1) == SUCCESS) { - zend_class_entry *ce = zobj->ce; - zend_string *callable_name = zend_string_alloc( - ZSTR_LEN(ce->name) + sizeof("::__invoke") - 1, 0); - memcpy(ZSTR_VAL(callable_name), ZSTR_VAL(ce->name), ZSTR_LEN(ce->name)); - memcpy(ZSTR_VAL(callable_name) + ZSTR_LEN(ce->name), "::__invoke", sizeof("::__invoke")); - return callable_name; - } - return zval_get_string_func(callable); + zend_class_entry *ce = Z_OBJCE_P(callable); + zend_string *callable_name = zend_string_alloc( + ZSTR_LEN(ce->name) + sizeof("::__invoke") - 1, 0); + memcpy(ZSTR_VAL(callable_name), ZSTR_VAL(ce->name), ZSTR_LEN(ce->name)); + memcpy(ZSTR_VAL(callable_name) + ZSTR_LEN(ce->name), "::__invoke", sizeof("::__invoke")); + return callable_name; } case IS_REFERENCE: callable = Z_REFVAL_P(callable); diff --git a/ext/standard/tests/general_functions/is_callable_basic2.phpt b/ext/standard/tests/general_functions/is_callable_basic2.phpt index e744350cdb4b2..2927b43d40855 100644 --- a/ext/standard/tests/general_functions/is_callable_basic2.phpt +++ b/ext/standard/tests/general_functions/is_callable_basic2.phpt @@ -116,6 +116,7 @@ foreach($objects as $object) { array( @$temp_class_obj->value, 100 ), array( $object, 'func' ), array( 'object_class', 'foo1' ), + $object, ); /* use check_iscallable_objects() to check whether given object/string has valid method name */ @@ -213,6 +214,14 @@ bool(true) object_class::foo1 bool(false) object_class::foo1 +-- Innerloop iteration 11 of Outerloop iteration 1 -- +bool(false) +bool(false) +bool(false) +bool(false) +object_class::__invoke +bool(false) +object_class::__invoke --- Outerloop iteration 2 --- -- Innerloop iteration 1 of Outerloop iteration 2 -- bool(false) @@ -294,6 +303,14 @@ bool(true) object_class::foo1 bool(false) object_class::foo1 +-- Innerloop iteration 11 of Outerloop iteration 2 -- +bool(false) +bool(false) +bool(false) +bool(false) +no_member_class::__invoke +bool(false) +no_member_class::__invoke --- Outerloop iteration 3 --- -- Innerloop iteration 1 of Outerloop iteration 3 -- bool(false) @@ -375,6 +392,14 @@ bool(true) object_class::foo1 bool(false) object_class::foo1 +-- Innerloop iteration 11 of Outerloop iteration 3 -- +bool(false) +bool(false) +bool(false) +bool(false) +contains_object_class::__invoke +bool(false) +contains_object_class::__invoke --- Outerloop iteration 4 --- -- Innerloop iteration 1 of Outerloop iteration 4 -- bool(false) @@ -456,6 +481,14 @@ bool(true) object_class::foo1 bool(false) object_class::foo1 +-- Innerloop iteration 11 of Outerloop iteration 4 -- +bool(false) +bool(false) +bool(false) +bool(false) +contains_object_class::__invoke +bool(false) +contains_object_class::__invoke --- Outerloop iteration 5 --- -- Innerloop iteration 1 of Outerloop iteration 5 -- bool(true) @@ -537,6 +570,14 @@ bool(true) object_class::foo1 bool(false) object_class::foo1 +-- Innerloop iteration 11 of Outerloop iteration 5 -- +bool(false) +bool(false) +bool(false) +bool(false) +object_class::__invoke +bool(false) +object_class::__invoke --- Outerloop iteration 6 --- -- Innerloop iteration 1 of Outerloop iteration 6 -- bool(false) @@ -618,6 +659,14 @@ bool(true) object_class::foo1 bool(false) object_class::foo1 +-- Innerloop iteration 11 of Outerloop iteration 6 -- +bool(false) +bool(false) +bool(false) +bool(false) +no_member_class::__invoke +bool(false) +no_member_class::__invoke --- Outerloop iteration 7 --- -- Innerloop iteration 1 of Outerloop iteration 7 -- bool(true) @@ -699,6 +748,14 @@ bool(true) object_class::foo1 bool(false) object_class::foo1 +-- Innerloop iteration 11 of Outerloop iteration 7 -- +bool(false) +bool(false) +bool(false) +bool(false) +object_class::__invoke +bool(false) +object_class::__invoke --- Outerloop iteration 8 --- -- Innerloop iteration 1 of Outerloop iteration 8 -- bool(false) @@ -780,3 +837,10 @@ bool(true) object_class::foo1 bool(false) object_class::foo1 +-- Innerloop iteration 11 of Outerloop iteration 8 -- +bool(false) +bool(false) +bool(false) +bool(false) + +bool(false) From adea221b1a661bba126276c66e1c81feac612d2c Mon Sep 17 00:00:00 2001 From: Guillaume Charifi Date: Tue, 14 Apr 2020 12:04:23 +0200 Subject: [PATCH 140/338] Improve socket cmsg space handling. This should also fix the null pointer arithmetic warning on MacOS as we don't depend on whack code written by Apple. Closes GH-5387 --- ext/sockets/sendrecvmsg.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/ext/sockets/sendrecvmsg.c b/ext/sockets/sendrecvmsg.c index 7786f70721ffb..211495f327027 100644 --- a/ext/sockets/sendrecvmsg.c +++ b/ext/sockets/sendrecvmsg.c @@ -302,12 +302,18 @@ PHP_FUNCTION(socket_cmsg_space) return; } - if (entry->var_el_size > 0 && n > (zend_long)((ZEND_LONG_MAX - entry->size - - CMSG_SPACE(0) - 15L) / entry->var_el_size)) { - /* the -15 is to account for any padding CMSG_SPACE may add after the data */ - php_error_docref(NULL, E_WARNING, "The value for the " + if (entry->var_el_size > 0) { + size_t rem_size = ZEND_LONG_MAX - entry->size; + size_t n_max = rem_size / entry->var_el_size; + size_t size = entry->size + n * entry->var_el_size; + size_t total_size = CMSG_SPACE(size); + if (n > n_max /* zend_long overflow */ + || total_size > ZEND_LONG_MAX + || total_size < size /* align overflow */) { + php_error_docref(NULL, E_WARNING, "The value for the " "third argument (" ZEND_LONG_FMT ") is too large", n); - return; + return; + } } RETURN_LONG((zend_long)CMSG_SPACE(entry->size + n * entry->var_el_size)); From 4fb705a03dc73bfafbd81bd1ba23b30b0ec2a502 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 14 Apr 2020 17:17:38 +0200 Subject: [PATCH 141/338] Add zend_string_concat2 API --- Zend/zend_API.c | 8 +++----- Zend/zend_compile.c | 13 +++---------- Zend/zend_string.c | 14 ++++++++++++++ Zend/zend_string.h | 3 +++ ext/ffi/ffi.c | 8 ++------ ext/pcre/php_pcre.c | 6 +++--- 6 files changed, 28 insertions(+), 24 deletions(-) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index cbd89f7c0cd8f..ea78c22a463c3 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -3137,11 +3137,9 @@ ZEND_API zend_string *zend_get_callable_name_ex(zval *callable, zend_object *obj case IS_OBJECT: { zend_class_entry *ce = Z_OBJCE_P(callable); - zend_string *callable_name = zend_string_alloc( - ZSTR_LEN(ce->name) + sizeof("::__invoke") - 1, 0); - memcpy(ZSTR_VAL(callable_name), ZSTR_VAL(ce->name), ZSTR_LEN(ce->name)); - memcpy(ZSTR_VAL(callable_name) + ZSTR_LEN(ce->name), "::__invoke", sizeof("::__invoke")); - return callable_name; + return zend_string_concat2( + ZSTR_VAL(ce->name), ZSTR_LEN(ce->name), + "::__invoke", sizeof("::__invoke") - 1); } case IS_REFERENCE: callable = Z_REFVAL_P(callable); diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 1c7f5f1073ead..953bf6dfd59eb 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1161,12 +1161,8 @@ static zend_string *add_type_string(zend_string *type, zend_string *new_type) { return zend_string_copy(new_type); } - // TODO: Switch to smart_str? - result = zend_string_alloc(ZSTR_LEN(type) + ZSTR_LEN(new_type) + 1, 0); - memcpy(ZSTR_VAL(result), ZSTR_VAL(type), ZSTR_LEN(type)); - ZSTR_VAL(result)[ZSTR_LEN(type)] = '|'; - memcpy(ZSTR_VAL(result) + ZSTR_LEN(type) + 1, ZSTR_VAL(new_type), ZSTR_LEN(new_type)); - ZSTR_VAL(result)[ZSTR_LEN(type) + ZSTR_LEN(new_type) + 1] = '\0'; + result = zend_string_concat3( + ZSTR_VAL(type), ZSTR_LEN(type), "|", 1, ZSTR_VAL(new_type), ZSTR_LEN(new_type)); zend_string_release(type); return result; } @@ -1243,10 +1239,7 @@ zend_string *zend_type_to_string_resolved(zend_type type, zend_class_entry *scop if (type_mask & MAY_BE_NULL) { zend_bool is_union = !str || memchr(ZSTR_VAL(str), '|', ZSTR_LEN(str)) != NULL; if (!is_union) { - zend_string *nullable_str = zend_string_alloc(ZSTR_LEN(str) + 1, 0); - ZSTR_VAL(nullable_str)[0] = '?'; - memcpy(ZSTR_VAL(nullable_str) + 1, ZSTR_VAL(str), ZSTR_LEN(str)); - ZSTR_VAL(nullable_str)[ZSTR_LEN(nullable_str)] = '\0'; + zend_string *nullable_str = zend_string_concat2("?", 1, ZSTR_VAL(str), ZSTR_LEN(str)); zend_string_release(str); return nullable_str; } diff --git a/Zend/zend_string.c b/Zend/zend_string.c index 3caeeb7a9ac3e..7eae674f08a21 100644 --- a/Zend/zend_string.c +++ b/Zend/zend_string.c @@ -462,6 +462,20 @@ ZEND_API zend_bool ZEND_FASTCALL I_WRAP_SONAME_FNNAME_ZU(NONE,zend_string_equal_ #endif +ZEND_API zend_string *zend_string_concat2( + const char *str1, size_t str1_len, + const char *str2, size_t str2_len) +{ + size_t len = str1_len + str2_len; + zend_string *res = zend_string_alloc(len, 0); + + memcpy(ZSTR_VAL(res), str1, str1_len); + memcpy(ZSTR_VAL(res) + str1_len, str2, str2_len); + ZSTR_VAL(res)[len] = '\0'; + + return res; +} + ZEND_API zend_string *zend_string_concat3( const char *str1, size_t str1_len, const char *str2, size_t str2_len, diff --git a/Zend/zend_string.h b/Zend/zend_string.h index bb75d816c4411..45ef3cbb01b71 100644 --- a/Zend/zend_string.h +++ b/Zend/zend_string.h @@ -34,6 +34,9 @@ ZEND_API zend_ulong ZEND_FASTCALL zend_string_hash_func(zend_string *str); ZEND_API zend_ulong ZEND_FASTCALL zend_hash_func(const char *str, size_t len); ZEND_API zend_string* ZEND_FASTCALL zend_interned_string_find_permanent(zend_string *str); +ZEND_API zend_string *zend_string_concat2( + const char *str1, size_t str1_len, + const char *str2, size_t str2_len); ZEND_API zend_string *zend_string_concat3( const char *str1, size_t str1_len, const char *str2, size_t str2_len, diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c index 95ae8e3711dbd..ba1130a64eec0 100644 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@ -1605,12 +1605,8 @@ static zend_string *zend_ffi_get_class_name(zend_string *prefix, const zend_ffi_ if (!zend_ffi_ctype_name(&buf, type)) { return zend_string_copy(prefix); } else { - zend_string *name = zend_string_alloc(ZSTR_LEN(prefix) + 1 + buf.end - buf.start, 0); - memcpy(ZSTR_VAL(name), ZSTR_VAL(prefix), ZSTR_LEN(prefix)); - ZSTR_VAL(name)[ZSTR_LEN(prefix)] = ':'; - memcpy(ZSTR_VAL(name) + ZSTR_LEN(prefix) + 1, buf.start, buf.end - buf.start); - ZSTR_VAL(name)[ZSTR_LEN(name)] = 0; - return name; + return zend_string_concat3( + ZSTR_VAL(prefix), ZSTR_LEN(prefix), ":", 1, buf.start, buf.end - buf.start); } } /* }}} */ diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 26ed8b43e715c..a5e806b30cb98 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -597,9 +597,9 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache_ex(zend_string *regex, in if (locale_aware && BG(locale_string) && (ZSTR_LEN(BG(locale_string)) != 1 && ZSTR_VAL(BG(locale_string))[0] != 'C')) { - key = zend_string_alloc(ZSTR_LEN(regex) + ZSTR_LEN(BG(locale_string)) + 1, 0); - memcpy(ZSTR_VAL(key), ZSTR_VAL(BG(locale_string)), ZSTR_LEN(BG(locale_string)) + 1); - memcpy(ZSTR_VAL(key) + ZSTR_LEN(BG(locale_string)), ZSTR_VAL(regex), ZSTR_LEN(regex) + 1); + key = zend_string_concat2( + ZSTR_VAL(BG(locale_string)), ZSTR_LEN(BG(locale_string)), + ZSTR_VAL(regex), ZSTR_LEN(regex)); } else { key = regex; } From af63050071fbd8132f1cb3297ddf31d2a0bc2df6 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 25 Mar 2020 21:30:54 +0100 Subject: [PATCH 142/338] Remove XFAIL section of a passing COM test Closes GH-5297 --- ext/com_dotnet/tests/bug49192.phpt | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/ext/com_dotnet/tests/bug49192.phpt b/ext/com_dotnet/tests/bug49192.phpt index e16c1358b1767..cd85a9a64ccd9 100644 --- a/ext/com_dotnet/tests/bug49192.phpt +++ b/ext/com_dotnet/tests/bug49192.phpt @@ -3,23 +3,9 @@ Bug #49192 (PHP crashes when GC invoked on COM object) --SKIPIF-- ---XFAIL-- -1 --FILE-- From 7a185b5d0a5949be2bd0baff3f4bc5eb65bfce03 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 14 Apr 2020 17:38:56 +0200 Subject: [PATCH 143/338] Fix filter_(var|input)_array default --- ext/filter/filter.stub.php | 4 ++-- ext/filter/filter_arginfo.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/filter/filter.stub.php b/ext/filter/filter.stub.php index 517a3a055c17a..0923b9ba16434 100644 --- a/ext/filter/filter.stub.php +++ b/ext/filter/filter.stub.php @@ -21,13 +21,13 @@ function filter_var($variable, int $filter = FILTER_DEFAULT, $options = null) {} * @param mixed $options * @return mixed */ -function filter_input_array(int $type, $options = null, bool $add_empty = true) {} +function filter_input_array(int $type, $options = FILTER_DEFAULT, bool $add_empty = true) {} /** * @param mixed $options * @return mixed */ -function filter_var_array(array $data, $options = null, bool $add_empty = true) {} +function filter_var_array(array $data, $options = FILTER_DEFAULT, bool $add_empty = true) {} function filter_list(): array {} diff --git a/ext/filter/filter_arginfo.h b/ext/filter/filter_arginfo.h index 8d3f1c0394465..8e2e2763cd34e 100644 --- a/ext/filter/filter_arginfo.h +++ b/ext/filter/filter_arginfo.h @@ -20,13 +20,13 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_filter_input_array, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, options, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, options, "FILTER_DEFAULT") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, add_empty, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_filter_var_array, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, data, IS_ARRAY, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, options, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, options, "FILTER_DEFAULT") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, add_empty, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() From 907bf786f1972dd88fe804ce7ff0cc183a719e0b Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 14 Apr 2020 14:05:32 +0200 Subject: [PATCH 144/338] Remove XFAIL from tests for 'bug' 48770 Bug 48770 was opened due to conflicting expectations about the behavior of: call_user_func_array(array($this, 'parent::methodName'), array($arg1,$arg2)) The one reporting the 'bug' seemed to think that since the method name was prefixed with `parent::`, it should call the method in the superclass of the *class where this code appears*. However, `$this` might be an instance of a subclass. If so, then it is quite reasonable that `call_user_func_array` will call the method as defined in the superclass of *the receiver*. So the 'bug' is not really a bug. Therefore, there is no need for an XFAIL in the tests. They should just pass. Amend tests to reflect the actual expected behavior of `call_user_func_array`, not what the person who reported bug 48770 thought it should be. Closes GH-5386. --- Zend/tests/bug48770.phpt | 41 ++++++++++---------------------------- Zend/tests/bug48770_2.phpt | 10 ++++------ Zend/tests/bug48770_3.phpt | 7 +------ 3 files changed, 16 insertions(+), 42 deletions(-) diff --git a/Zend/tests/bug48770.phpt b/Zend/tests/bug48770.phpt index e96047c79be33..13ff963d0677e 100644 --- a/Zend/tests/bug48770.phpt +++ b/Zend/tests/bug48770.phpt @@ -1,53 +1,34 @@ --TEST-- Bug #48770 (call_user_func_array() fails to call parent from inheriting class) ---XFAIL-- -See Bug #48770 --FILE-- func('This should work!'); +$c->callFuncInParent('Which function will be called??'); ?> --EXPECT-- -string(26) "A::func: This should work!" +B::func called diff --git a/Zend/tests/bug48770_2.phpt b/Zend/tests/bug48770_2.phpt index b8f88445f8189..f3bfffcba6e8a 100644 --- a/Zend/tests/bug48770_2.phpt +++ b/Zend/tests/bug48770_2.phpt @@ -1,7 +1,5 @@ --TEST-- Bug #48770 (call_user_func_array() fails to call parent from inheriting class) ---XFAIL-- -See Bug #48770 --FILE-- func('This should work!'); ?> --EXPECT-- -string(27) "A::func2: This should work!" -string(27) "A::func3: This should work!" -call_user_func_array(): Argument #1 ($function) must be a valid callback, cannot access private method A::func22() -call_user_func_array(): Argument #1 ($function) must be a valid callback, class 'A' does not have a method 'inexistent' +string(27) "B::func2: This should work!" +string(27) "B::func3: This should work!" +call_user_func_array(): Argument #1 ($function) must be a valid callback, cannot access private method B::func22() +call_user_func_array(): Argument #1 ($function) must be a valid callback, class 'B' does not have a method 'inexistent' diff --git a/Zend/tests/bug48770_3.phpt b/Zend/tests/bug48770_3.phpt index 0ce0d6911987a..f2b537363b560 100644 --- a/Zend/tests/bug48770_3.phpt +++ b/Zend/tests/bug48770_3.phpt @@ -1,7 +1,5 @@ --TEST-- Bug #48770 (call_user_func_array() fails to call parent from inheriting class) ---XFAIL-- -See Bug #48770 --FILE-- func('This should work!'); --EXPECT-- string(27) "B::func2: This should work!" string(27) "B::func3: This should work!" -call_user_func_array(): Argument #1 ($function) must be a valid callback, class 'B' does not have a method 'inexistent' +call_user_func_array(): Argument #1 ($function) must be a valid callback, class 'C' does not have a method 'inexistent' From 177c455f04f95d5ba7f48c16fea960dceecc2635 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 14 Apr 2020 17:50:54 +0200 Subject: [PATCH 145/338] Fix test after callback name change --- ext/xml/tests/bug72085.phpt | 60 +++++++++++++------------------------ 1 file changed, 20 insertions(+), 40 deletions(-) diff --git a/ext/xml/tests/bug72085.phpt b/ext/xml/tests/bug72085.phpt index 078210f56922d..e205891fcbb5c 100644 --- a/ext/xml/tests/bug72085.phpt +++ b/ext/xml/tests/bug72085.phpt @@ -11,62 +11,42 @@ xml_set_element_handler($var1, new Exception(""), 4096); xml_parse($var1, str_repeat("", 10)); ?> --EXPECTF-- -Warning: Invalid callback Exception in %s%ebug72085.php:%d -Stack trace: -#0 {main}, no array or string given in %s%ebug72085.php on line %d +Warning: Invalid callback Exception::__invoke, no array or string given in %s on line %d -Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d +Warning: xml_parse(): Unable to call handler in %s on line %d -Warning: Invalid callback Exception in %s%ebug72085.php:%d -Stack trace: -#0 {main}, no array or string given in %s%ebug72085.php on line %d +Warning: Invalid callback Exception::__invoke, no array or string given in %s on line %d -Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d +Warning: xml_parse(): Unable to call handler in %s on line %d -Warning: Invalid callback Exception in %s%ebug72085.php:%d -Stack trace: -#0 {main}, no array or string given in %s%ebug72085.php on line %d +Warning: Invalid callback Exception::__invoke, no array or string given in %s on line %d -Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d +Warning: xml_parse(): Unable to call handler in %s on line %d -Warning: Invalid callback Exception in %s%ebug72085.php:%d -Stack trace: -#0 {main}, no array or string given in %s%ebug72085.php on line %d +Warning: Invalid callback Exception::__invoke, no array or string given in %s on line %d -Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d +Warning: xml_parse(): Unable to call handler in %s on line %d -Warning: Invalid callback Exception in %s%ebug72085.php:%d -Stack trace: -#0 {main}, no array or string given in %s%ebug72085.php on line %d +Warning: Invalid callback Exception::__invoke, no array or string given in %s on line %d -Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d +Warning: xml_parse(): Unable to call handler in %s on line %d -Warning: Invalid callback Exception in %s%ebug72085.php:%d -Stack trace: -#0 {main}, no array or string given in %s%ebug72085.php on line %d +Warning: Invalid callback Exception::__invoke, no array or string given in %s on line %d -Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d +Warning: xml_parse(): Unable to call handler in %s on line %d -Warning: Invalid callback Exception in %s%ebug72085.php:%d -Stack trace: -#0 {main}, no array or string given in %s%ebug72085.php on line %d +Warning: Invalid callback Exception::__invoke, no array or string given in %s on line %d -Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d +Warning: xml_parse(): Unable to call handler in %s on line %d -Warning: Invalid callback Exception in %s%ebug72085.php:%d -Stack trace: -#0 {main}, no array or string given in %s%ebug72085.php on line %d +Warning: Invalid callback Exception::__invoke, no array or string given in %s on line %d -Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d +Warning: xml_parse(): Unable to call handler in %s on line %d -Warning: Invalid callback Exception in %s%ebug72085.php:%d -Stack trace: -#0 {main}, no array or string given in %s%ebug72085.php on line %d +Warning: Invalid callback Exception::__invoke, no array or string given in %s on line %d -Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d +Warning: xml_parse(): Unable to call handler in %s on line %d -Warning: Invalid callback Exception in %s%ebug72085.php:%d -Stack trace: -#0 {main}, no array or string given in %s%ebug72085.php on line %d +Warning: Invalid callback Exception::__invoke, no array or string given in %s on line %d -Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d +Warning: xml_parse(): Unable to call handler in %s on line %d From 110e6e4f95f4dc9850ad849abd79ceb70258c291 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 14 Apr 2020 17:55:04 +0200 Subject: [PATCH 146/338] Make gen_stub.php compatible with PHP 7.1 again Not worth bumping requirements over this... --- build/gen_stub.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/gen_stub.php b/build/gen_stub.php index 131f60bab7697..d784907048bb3 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -560,8 +560,8 @@ function parseDocComment(DocComment $comment): array { $tags = []; foreach (explode("\n", $commentText) as $commentLine) { $regex = '/^\*\s*@([a-z-]+)(?:\s+(.+))?$/'; - if (preg_match($regex, trim($commentLine), $matches, PREG_UNMATCHED_AS_NULL)) { - $tags[] = new DocCommentTag($matches[1], $matches[2]); + if (preg_match($regex, trim($commentLine), $matches)) { + $tags[] = new DocCommentTag($matches[1], $matches[2] ?? null); } } From c4cdf1ae1286280e9c59df85c90b0a722631e23c Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 14 Apr 2020 18:18:18 +0200 Subject: [PATCH 147/338] Add missing CVE --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 95e520e32ac8a..b7ded38bf1b98 100644 --- a/NEWS +++ b/NEWS @@ -54,7 +54,7 @@ PHP NEWS - Standard: . Fixed bug #79330 (shell_exec() silently truncates after a null byte). (stas) - . Fixed bug #79465 (OOB Read in urldecode()). (stas) + . Fixed bug #79465 (OOB Read in urldecode()). (CVE-2020-7067) (stas) . Fixed bug #79410 (system() swallows last chunk if it is exactly 4095 bytes without newline). (Christian Schneider) From 8c5faf7ad1a28edd7c20a474602b77c3ebae911e Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 13 Apr 2020 23:24:40 +0200 Subject: [PATCH 148/338] Fix #79472: ext/ffi/tests/040.phpt TC fails on Big endian arch For now we are choosing the simplest solution, namely to skip the test on big-endian architectures. --- ext/ffi/tests/040.phpt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ext/ffi/tests/040.phpt b/ext/ffi/tests/040.phpt index 24bcfb6307e84..54f48f809e0e9 100644 --- a/ext/ffi/tests/040.phpt +++ b/ext/ffi/tests/040.phpt @@ -1,7 +1,12 @@ --TEST-- FFI 040: Support for scalar types --SKIPIF-- - + --INI-- ffi.enable=1 --FILE-- From 13938342f8fedb915cc2a7c3dc5a200018ba8446 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 25 Mar 2020 19:13:59 +0100 Subject: [PATCH 149/338] Add -Wno-ignored-qualifiers compiler flag to Tidy extension. This is an issue in the provided library and needs to be fixed upstream. --- ext/tidy/config.m4 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/tidy/config.m4 b/ext/tidy/config.m4 index dab58787d46bb..56f1bb3009be8 100644 --- a/ext/tidy/config.m4 +++ b/ext/tidy/config.m4 @@ -65,8 +65,9 @@ if test "$PHP_TIDY" != "no"; then PHP_ADD_LIBRARY_WITH_PATH($TIDY_LIB_NAME, $TIDY_LIBDIR, TIDY_SHARED_LIBADD) PHP_ADD_INCLUDE($TIDY_INCDIR) - - PHP_NEW_EXTENSION(tidy, tidy.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) + dnl Add -Wno-empty-body as this is an issue upstream + TIDY_COMPILER_FLAGS="$TIDY_CFLAGS -Wno-ignored-qualifiers -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1" + PHP_NEW_EXTENSION(tidy, tidy.c, $ext_shared,, $TIDY_COMPILER_FLAGS) PHP_SUBST(TIDY_SHARED_LIBADD) AC_DEFINE(HAVE_TIDY,1,[ ]) fi From a2a6c7f2272dc62c9da249186afcccdd8c4abca7 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Thu, 26 Mar 2020 21:17:23 +0100 Subject: [PATCH 150/338] Add -Wno-type-limits compiler flag to Sodium extension This may happen on 32bits --- ext/sodium/config.m4 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/sodium/config.m4 b/ext/sodium/config.m4 index 906e0ca7f225a..0676b66910680 100644 --- a/ext/sodium/config.m4 +++ b/ext/sodium/config.m4 @@ -11,6 +11,8 @@ if test "$PHP_SODIUM" != "no"; then AC_DEFINE(HAVE_LIBSODIUMLIB, 1, [ ]) - PHP_NEW_EXTENSION(sodium, libsodium.c sodium_pwhash.c, $ext_shared) + dnl Add -Wno-type-limits as this may arise on 32bits platforms + SODIUM_COMPILER_FLAGS="$LIBSODIUM_CFLAGS -Wno-type-limits" + PHP_NEW_EXTENSION(sodium, libsodium.c sodium_pwhash.c, $ext_shared, , $SODIUM_COMPILER_FLAGS) PHP_SUBST(SODIUM_SHARED_LIBADD) fi From 1c334db4c818eb4175e9e246f3fc5d91bcfe1eef Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 5 Feb 2020 17:36:41 +0100 Subject: [PATCH 151/338] Add -Wextra compiler warnings and exclude the trigger happy ones The compile warnings which are explicitly suppressed are: * -Wno-implicit-fallthrough * -Wno-unused-parameter * -Wno-sign-compare * -Wno-clobbered, only with GCC Closes GH-5151 --- Zend/Zend.m4 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Zend/Zend.m4 b/Zend/Zend.m4 index fc4634580ecee..7c715e853bf5b 100644 --- a/Zend/Zend.m4 +++ b/Zend/Zend.m4 @@ -221,7 +221,10 @@ else AC_DEFINE(ZEND_DEBUG,0,[ ]) fi -test -n "$GCC" && CFLAGS="$CFLAGS -Wall -Wno-strict-aliasing" +test -n "$GCC" && CFLAGS="$CFLAGS -Wall -Wextra -Wno-strict-aliasing -Wno-implicit-fallthrough -Wno-unused-parameter -Wno-sign-compare" +dnl Check if compiler supports -Wno-clobbered (only GCC) +AX_CHECK_COMPILE_FLAG([-Wno-clobbered], CFLAGS="$CFLAGS -Wno-clobbered", , [-Werror]) + test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS" if test "$ZEND_ZTS" = "yes"; then From ed179c2ef4ed4d371267da9d1b745df519ffa0d5 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 15 Apr 2020 09:07:21 +0200 Subject: [PATCH 152/338] workaround typo in system libgd 2.3.0 --- ext/gd/gd.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 80b05ab89ed57..1c6cc74be66df 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -80,6 +80,11 @@ static int le_gd_font; #define M_PI 3.14159265358979323846 #endif +/* workaround typo in system libgd 2.3.0 */ +#if defined(GD_FLIP_HORINZONTAL) && !defined(GD_FLIP_HORIZONTAL) +#define GD_FLIP_HORIZONTAL GD_FLIP_HORINZONTAL +#endif + #ifdef HAVE_GD_FREETYPE static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int, int); #endif From 8e5df6092ded14164e6784e304db4b675e8465a4 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 15 Apr 2020 09:26:55 +0200 Subject: [PATCH 153/338] fix test using short_tag --- tests/lang/syntax_errors.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lang/syntax_errors.phpt b/tests/lang/syntax_errors.phpt index 1fecb035de76a..1b52c31c6a096 100644 --- a/tests/lang/syntax_errors.phpt +++ b/tests/lang/syntax_errors.phpt @@ -1,7 +1,7 @@ --TEST-- Detailed reporting on specific types of syntax errors --FILE-- - 2", /* unclosed ( */ "[1, 2,", /* unclosed [ */ From 53e07bac79c657ec93e8acf6f9e0c94d04c42de3 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 15 Apr 2020 09:58:19 +0200 Subject: [PATCH 154/338] Fix function libxml free error signature Fixes a -Wcast-function-type warning. --- ext/libxml/libxml.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index ec72c79b60b04..f015c71d2452d 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -418,11 +418,10 @@ php_libxml_output_buffer_create_filename(const char *URI, return(ret); } -static int _php_libxml_free_error(xmlErrorPtr error) +static void _php_libxml_free_error(void *ptr) { /* This will free the libxml alloc'd memory */ - xmlResetError(error); - return 1; + xmlResetError((xmlErrorPtr) ptr); } static void _php_list_set_error_structure(xmlErrorPtr error, const char *msg) @@ -943,7 +942,7 @@ PHP_FUNCTION(libxml_use_internal_errors) xmlSetStructuredErrorFunc(NULL, php_libxml_structured_error_handler); if (LIBXML(error_list) == NULL) { LIBXML(error_list) = (zend_llist *) emalloc(sizeof(zend_llist)); - zend_llist_init(LIBXML(error_list), sizeof(xmlError), (llist_dtor_func_t) _php_libxml_free_error, 0); + zend_llist_init(LIBXML(error_list), sizeof(xmlError), _php_libxml_free_error, 0); } } RETURN_BOOL(retval); From 4d5ad3fb24fa325ebb1cf6b590a9b965f9c5d668 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 15 Apr 2020 10:04:20 +0200 Subject: [PATCH 155/338] Fix PHP_HAVALUpdate signature Fixes a -Wcast-function-type warning. --- ext/hash/hash_haval.c | 2 +- ext/hash/php_hash_haval.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/hash/hash_haval.c b/ext/hash/hash_haval.c index 92e48669ae684..62f63cbee1534 100644 --- a/ext/hash/hash_haval.c +++ b/ext/hash/hash_haval.c @@ -278,7 +278,7 @@ PHP_HASH_HAVAL_INIT(5,256) /* {{{ PHP_HAVALUpdate */ -PHP_HASH_API void PHP_HAVALUpdate(PHP_HAVAL_CTX *context, const unsigned char *input, unsigned int inputLen) +PHP_HASH_API void PHP_HAVALUpdate(PHP_HAVAL_CTX *context, const unsigned char *input, size_t inputLen) { unsigned int i, index, partLen; diff --git a/ext/hash/php_hash_haval.h b/ext/hash/php_hash_haval.h index 1033fd59dc51c..8eaaf2d2b74f5 100644 --- a/ext/hash/php_hash_haval.h +++ b/ext/hash/php_hash_haval.h @@ -32,7 +32,7 @@ typedef struct { #define PHP_HASH_HAVAL_INIT_DECL(p,b) PHP_HASH_API void PHP_##p##HAVAL##b##Init(PHP_HAVAL_CTX *); \ PHP_HASH_API void PHP_HAVAL##b##Final(unsigned char*, PHP_HAVAL_CTX *); -PHP_HASH_API void PHP_HAVALUpdate(PHP_HAVAL_CTX *, const unsigned char *, unsigned int); +PHP_HASH_API void PHP_HAVALUpdate(PHP_HAVAL_CTX *, const unsigned char *, size_t); PHP_HASH_HAVAL_INIT_DECL(3,128) PHP_HASH_HAVAL_INIT_DECL(3,160) From 2d517f68fb0a48aa342fdf22fb3c9f21686b8dd5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 15 Apr 2020 10:28:48 +0200 Subject: [PATCH 156/338] Fix function signature mismatches in GMP This is fairly annoying. Add adapter functions for cases where we are discarding a return value. Some of the issues are legitimate in that we were previously truncating some unsigned long return values to int implicitly, though I doubt it makes a difference in practice. This fixes -Wcast-function-type warnings. --- ext/gmp/gmp.c | 134 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 88 insertions(+), 46 deletions(-) diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index a714b0760f13e..a14c65f2978df 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -186,26 +186,49 @@ static void gmp_cmp(zval *return_value, zval *a_arg, zval *b_arg); * include parameter parsing. */ typedef void (*gmp_unary_op_t)(mpz_ptr, mpz_srcptr); -typedef int (*gmp_unary_opl_t)(mpz_srcptr); +typedef mp_bitcnt_t (*gmp_unary_opl_t)(mpz_srcptr); typedef void (*gmp_unary_ui_op_t)(mpz_ptr, gmp_ulong); typedef void (*gmp_binary_op_t)(mpz_ptr, mpz_srcptr, mpz_srcptr); -typedef int (*gmp_binary_opl_t)(mpz_srcptr, mpz_srcptr); typedef void (*gmp_binary_ui_op_t)(mpz_ptr, mpz_srcptr, gmp_ulong); typedef void (*gmp_binary_op2_t)(mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); -typedef void (*gmp_binary_ui_op2_t)(mpz_ptr, mpz_ptr, mpz_srcptr, gmp_ulong); +typedef gmp_ulong (*gmp_binary_ui_op2_t)(mpz_ptr, mpz_ptr, mpz_srcptr, gmp_ulong); static inline void gmp_zval_binary_ui_op(zval *return_value, zval *a_arg, zval *b_arg, gmp_binary_op_t gmp_op, gmp_binary_ui_op_t gmp_ui_op, int check_b_zero); static inline void gmp_zval_binary_ui_op2(zval *return_value, zval *a_arg, zval *b_arg, gmp_binary_op2_t gmp_op, gmp_binary_ui_op2_t gmp_ui_op, int check_b_zero); static inline void gmp_zval_unary_op(zval *return_value, zval *a_arg, gmp_unary_op_t gmp_op); static inline void gmp_zval_unary_ui_op(zval *return_value, zval *a_arg, gmp_unary_ui_op_t gmp_op); +static void gmp_mpz_tdiv_q_ui(mpz_ptr a, mpz_srcptr b, gmp_ulong c) { + mpz_tdiv_q_ui(a, b, c); +} +static void gmp_mpz_tdiv_r_ui(mpz_ptr a, mpz_srcptr b, gmp_ulong c) { + mpz_tdiv_r_ui(a, b, c); +} +static void gmp_mpz_fdiv_q_ui(mpz_ptr a, mpz_srcptr b, gmp_ulong c) { + mpz_fdiv_q_ui(a, b, c); +} +static void gmp_mpz_fdiv_r_ui(mpz_ptr a, mpz_srcptr b, gmp_ulong c) { + mpz_fdiv_r_ui(a, b, c); +} +static void gmp_mpz_cdiv_r_ui(mpz_ptr a, mpz_srcptr b, gmp_ulong c) { + mpz_cdiv_r_ui(a, b, c); +} +static void gmp_mpz_cdiv_q_ui(mpz_ptr a, mpz_srcptr b, gmp_ulong c) { + mpz_cdiv_q_ui(a, b, c); +} +static void gmp_mpz_mod_ui(mpz_ptr a, mpz_srcptr b, gmp_ulong c) { + mpz_mod_ui(a, b, c); +} +static void gmp_mpz_gcd_ui(mpz_ptr a, mpz_srcptr b, gmp_ulong c) { + mpz_gcd_ui(a, b, c); +} + /* Binary operations */ #define gmp_binary_ui_op(op, uop) _gmp_binary_ui_op(INTERNAL_FUNCTION_PARAM_PASSTHRU, op, uop, 0) #define gmp_binary_op(op) _gmp_binary_ui_op(INTERNAL_FUNCTION_PARAM_PASSTHRU, op, NULL, 0) -#define gmp_binary_opl(op) _gmp_binary_opl(INTERNAL_FUNCTION_PARAM_PASSTHRU, op) #define gmp_binary_ui_op_no_zero(op, uop) \ _gmp_binary_ui_op(INTERNAL_FUNCTION_PARAM_PASSTHRU, op, uop, 1) @@ -328,8 +351,7 @@ static void shift_operator_helper(gmp_binary_ui_op_t op, zval *return_value, zva #define DO_BINARY_UI_OP_EX(op, uop, check_b_zero) \ gmp_zval_binary_ui_op( \ - result, op1, op2, op, (gmp_binary_ui_op_t) uop, \ - check_b_zero \ + result, op1, op2, op, uop, check_b_zero \ ); \ return SUCCESS; @@ -353,9 +375,9 @@ static int gmp_do_operation_ex(zend_uchar opcode, zval *result, zval *op1, zval shift_operator_helper(mpz_pow_ui, result, op1, op2); return SUCCESS; case ZEND_DIV: - DO_BINARY_UI_OP_EX(mpz_tdiv_q, mpz_tdiv_q_ui, 1); + DO_BINARY_UI_OP_EX(mpz_tdiv_q, gmp_mpz_tdiv_q_ui, 1); case ZEND_MOD: - DO_BINARY_UI_OP_EX(mpz_mod, mpz_mod_ui, 1); + DO_BINARY_UI_OP_EX(mpz_mod, gmp_mpz_mod_ui, 1); case ZEND_SL: shift_operator_helper(mpz_mul_2exp, result, op1, op2); return SUCCESS; @@ -836,28 +858,6 @@ static inline void _gmp_unary_opl(INTERNAL_FUNCTION_PARAMETERS, gmp_unary_opl_t } /* }}} */ -/* {{{ _gmp_binary_opl - */ -static inline void _gmp_binary_opl(INTERNAL_FUNCTION_PARAMETERS, gmp_binary_opl_t gmp_op) -{ - zval *a_arg, *b_arg; - mpz_ptr gmpnum_a, gmpnum_b; - gmp_temp_t temp_a, temp_b; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "zz", &a_arg, &b_arg) == FAILURE){ - RETURN_THROWS(); - } - - FETCH_GMP_ZVAL(gmpnum_a, a_arg, temp_a); - FETCH_GMP_ZVAL_DEP(gmpnum_b, b_arg, temp_b, temp_a); - - RETVAL_LONG(gmp_op(gmpnum_a, gmpnum_b)); - - FREE_GMP_TEMP(temp_a); - FREE_GMP_TEMP(temp_b); -} -/* }}} */ - /* {{{ proto GMP gmp_init(mixed number [, int base]) Initializes GMP number */ ZEND_FUNCTION(gmp_init) @@ -1077,13 +1077,13 @@ ZEND_FUNCTION(gmp_div_qr) switch (round) { case GMP_ROUND_ZERO: - gmp_zval_binary_ui_op2(return_value, a_arg, b_arg, mpz_tdiv_qr, (gmp_binary_ui_op2_t) mpz_tdiv_qr_ui, 1); + gmp_zval_binary_ui_op2(return_value, a_arg, b_arg, mpz_tdiv_qr, mpz_tdiv_qr_ui, 1); break; case GMP_ROUND_PLUSINF: - gmp_zval_binary_ui_op2(return_value, a_arg, b_arg, mpz_cdiv_qr, (gmp_binary_ui_op2_t) mpz_cdiv_qr_ui, 1); + gmp_zval_binary_ui_op2(return_value, a_arg, b_arg, mpz_cdiv_qr, mpz_cdiv_qr_ui, 1); break; case GMP_ROUND_MINUSINF: - gmp_zval_binary_ui_op2(return_value, a_arg, b_arg, mpz_fdiv_qr, (gmp_binary_ui_op2_t) mpz_fdiv_qr_ui, 1); + gmp_zval_binary_ui_op2(return_value, a_arg, b_arg, mpz_fdiv_qr, mpz_fdiv_qr_ui, 1); break; default: php_error_docref(NULL, E_WARNING, "Invalid rounding mode"); @@ -1105,13 +1105,13 @@ ZEND_FUNCTION(gmp_div_r) switch (round) { case GMP_ROUND_ZERO: - gmp_zval_binary_ui_op(return_value, a_arg, b_arg, mpz_tdiv_r, (gmp_binary_ui_op_t) mpz_tdiv_r_ui, 1); + gmp_zval_binary_ui_op(return_value, a_arg, b_arg, mpz_tdiv_r, gmp_mpz_tdiv_r_ui, 1); break; case GMP_ROUND_PLUSINF: - gmp_zval_binary_ui_op(return_value, a_arg, b_arg, mpz_cdiv_r, (gmp_binary_ui_op_t) mpz_cdiv_r_ui, 1); + gmp_zval_binary_ui_op(return_value, a_arg, b_arg, mpz_cdiv_r, gmp_mpz_cdiv_r_ui, 1); break; case GMP_ROUND_MINUSINF: - gmp_zval_binary_ui_op(return_value, a_arg, b_arg, mpz_fdiv_r, (gmp_binary_ui_op_t) mpz_fdiv_r_ui, 1); + gmp_zval_binary_ui_op(return_value, a_arg, b_arg, mpz_fdiv_r, gmp_mpz_fdiv_r_ui, 1); break; default: php_error_docref(NULL, E_WARNING, "Invalid rounding mode"); @@ -1133,13 +1133,13 @@ ZEND_FUNCTION(gmp_div_q) switch (round) { case GMP_ROUND_ZERO: - gmp_zval_binary_ui_op(return_value, a_arg, b_arg, mpz_tdiv_q, (gmp_binary_ui_op_t) mpz_tdiv_q_ui, 1); + gmp_zval_binary_ui_op(return_value, a_arg, b_arg, mpz_tdiv_q, gmp_mpz_tdiv_q_ui, 1); break; case GMP_ROUND_PLUSINF: - gmp_zval_binary_ui_op(return_value, a_arg, b_arg, mpz_cdiv_q, (gmp_binary_ui_op_t) mpz_cdiv_q_ui, 1); + gmp_zval_binary_ui_op(return_value, a_arg, b_arg, mpz_cdiv_q, gmp_mpz_cdiv_q_ui, 1); break; case GMP_ROUND_MINUSINF: - gmp_zval_binary_ui_op(return_value, a_arg, b_arg, mpz_fdiv_q, (gmp_binary_ui_op_t) mpz_fdiv_q_ui, 1); + gmp_zval_binary_ui_op(return_value, a_arg, b_arg, mpz_fdiv_q, gmp_mpz_fdiv_q_ui, 1); break; default: php_error_docref(NULL, E_WARNING, "Invalid rounding mode"); @@ -1153,7 +1153,7 @@ ZEND_FUNCTION(gmp_div_q) Computes a modulo b */ ZEND_FUNCTION(gmp_mod) { - gmp_binary_ui_op_no_zero(mpz_mod, (gmp_binary_ui_op_t) mpz_mod_ui); + gmp_binary_ui_op_no_zero(mpz_mod, gmp_mpz_mod_ui); } /* }}} */ @@ -1529,7 +1529,7 @@ ZEND_FUNCTION(gmp_prob_prime) Computes greatest common denominator (gcd) of a and b */ ZEND_FUNCTION(gmp_gcd) { - gmp_binary_ui_op(mpz_gcd, (gmp_binary_ui_op_t) mpz_gcd_ui); + gmp_binary_ui_op(mpz_gcd, gmp_mpz_gcd_ui); } /* }}} */ @@ -1537,7 +1537,7 @@ ZEND_FUNCTION(gmp_gcd) Computes least common multiple (lcm) of a and b */ ZEND_FUNCTION(gmp_lcm) { - gmp_binary_ui_op(mpz_lcm, (gmp_binary_ui_op_t) mpz_lcm_ui); + gmp_binary_ui_op(mpz_lcm, mpz_lcm_ui); } /* }}} */ @@ -1603,7 +1603,21 @@ ZEND_FUNCTION(gmp_invert) Computes Jacobi symbol */ ZEND_FUNCTION(gmp_jacobi) { - gmp_binary_opl(mpz_jacobi); + zval *a_arg, *b_arg; + mpz_ptr gmpnum_a, gmpnum_b; + gmp_temp_t temp_a, temp_b; + + if (zend_parse_parameters(ZEND_NUM_ARGS(), "zz", &a_arg, &b_arg) == FAILURE){ + RETURN_THROWS(); + } + + FETCH_GMP_ZVAL(gmpnum_a, a_arg, temp_a); + FETCH_GMP_ZVAL_DEP(gmpnum_b, b_arg, temp_b, temp_a); + + RETVAL_LONG(mpz_jacobi(gmpnum_a, gmpnum_b)); + + FREE_GMP_TEMP(temp_a); + FREE_GMP_TEMP(temp_b); } /* }}} */ @@ -1611,7 +1625,21 @@ ZEND_FUNCTION(gmp_jacobi) Computes Legendre symbol */ ZEND_FUNCTION(gmp_legendre) { - gmp_binary_opl(mpz_legendre); + zval *a_arg, *b_arg; + mpz_ptr gmpnum_a, gmpnum_b; + gmp_temp_t temp_a, temp_b; + + if (zend_parse_parameters(ZEND_NUM_ARGS(), "zz", &a_arg, &b_arg) == FAILURE){ + RETURN_THROWS(); + } + + FETCH_GMP_ZVAL(gmpnum_a, a_arg, temp_a); + FETCH_GMP_ZVAL_DEP(gmpnum_b, b_arg, temp_b, temp_a); + + RETVAL_LONG(mpz_legendre(gmpnum_a, gmpnum_b)); + + FREE_GMP_TEMP(temp_a); + FREE_GMP_TEMP(temp_b); } /* }}} */ @@ -1946,7 +1974,7 @@ ZEND_FUNCTION(gmp_testbit) Calculates the population count of a */ ZEND_FUNCTION(gmp_popcount) { - gmp_unary_opl((gmp_unary_opl_t) mpz_popcount); + gmp_unary_opl(mpz_popcount); } /* }}} */ @@ -1954,7 +1982,21 @@ ZEND_FUNCTION(gmp_popcount) Calculates hamming distance between a and b */ ZEND_FUNCTION(gmp_hamdist) { - gmp_binary_opl((gmp_binary_opl_t) mpz_hamdist); + zval *a_arg, *b_arg; + mpz_ptr gmpnum_a, gmpnum_b; + gmp_temp_t temp_a, temp_b; + + if (zend_parse_parameters(ZEND_NUM_ARGS(), "zz", &a_arg, &b_arg) == FAILURE){ + RETURN_THROWS(); + } + + FETCH_GMP_ZVAL(gmpnum_a, a_arg, temp_a); + FETCH_GMP_ZVAL_DEP(gmpnum_b, b_arg, temp_b, temp_a); + + RETVAL_LONG(mpz_hamdist(gmpnum_a, gmpnum_b)); + + FREE_GMP_TEMP(temp_a); + FREE_GMP_TEMP(temp_b); } /* }}} */ From fb718ccc7ef6b3c0a509469190c4ff2cc0a17c61 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 15 Apr 2020 10:37:33 +0200 Subject: [PATCH 157/338] Suppress SIG_ERR cast warnings By casting to void*. I don't want to deal with this right now. --- ext/pcntl/pcntl.c | 4 ++-- ext/pcntl/php_signal.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index c7aa6bcbc3b34..a4554a61cdca2 100644 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -979,7 +979,7 @@ PHP_FUNCTION(pcntl_signal) php_error_docref(NULL, E_WARNING, "Invalid value for handle argument specified"); RETURN_FALSE; } - if (php_signal(signo, (Sigfunc *) Z_LVAL_P(handle), (int) restart_syscalls) == (Sigfunc *)SIG_ERR) { + if (php_signal(signo, (Sigfunc *) Z_LVAL_P(handle), (int) restart_syscalls) == (void *)SIG_ERR) { PCNTL_G(last_error) = errno; php_error_docref(NULL, E_WARNING, "Error assigning signal"); RETURN_FALSE; @@ -1002,7 +1002,7 @@ PHP_FUNCTION(pcntl_signal) handle = zend_hash_index_update(&PCNTL_G(php_signal_table), signo, handle); Z_TRY_ADDREF_P(handle); - if (php_signal4(signo, pcntl_signal_handler, (int) restart_syscalls, 1) == (Sigfunc *)SIG_ERR) { + if (php_signal4(signo, pcntl_signal_handler, (int) restart_syscalls, 1) == (void *)SIG_ERR) { PCNTL_G(last_error) = errno; php_error_docref(NULL, E_WARNING, "Error assigning signal"); RETURN_FALSE; diff --git a/ext/pcntl/php_signal.c b/ext/pcntl/php_signal.c index 44d92dabd009f..95b4a16d6df9e 100644 --- a/ext/pcntl/php_signal.c +++ b/ext/pcntl/php_signal.c @@ -49,7 +49,7 @@ Sigfunc *php_signal4(int signo, Sigfunc *func, int restart, int mask_all) #endif } if (zend_sigaction(signo, &act, &oact) < 0) { - return (Sigfunc*)SIG_ERR; + return (void*)SIG_ERR; } #ifdef HAVE_STRUCT_SIGINFO_T From 7643cf19966fd84c3f122f4887034d0170a04920 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 15 Apr 2020 10:41:19 +0200 Subject: [PATCH 158/338] More precise ifunc resolver return type Fixes -Wattribute-alias warning. --- ext/standard/base64.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ext/standard/base64.c b/ext/standard/base64.c index 2229af960e3ef..79825597ac0ed 100644 --- a/ext/standard/base64.c +++ b/ext/standard/base64.c @@ -383,9 +383,12 @@ zend_string *php_base64_decode_ex_default(const unsigned char *str, size_t lengt PHPAPI zend_string *php_base64_encode(const unsigned char *str, size_t length) __attribute__((ifunc("resolve_base64_encode"))); PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, size_t length, zend_bool strict) __attribute__((ifunc("resolve_base64_decode"))); +typedef zend_string *(*base64_encode_func_t)(const unsigned char *, size_t); +typedef zend_string *(*base64_decode_func_t)(const unsigned char *, size_t, zend_bool); + ZEND_NO_SANITIZE_ADDRESS ZEND_ATTRIBUTE_UNUSED /* clang mistakenly warns about this */ -static void *resolve_base64_encode() { +static base64_encode_func_t resolve_base64_encode() { # if ZEND_INTRIN_AVX2_FUNC_PROTO if (zend_cpu_supports_avx2()) { return php_base64_encode_avx2; @@ -401,7 +404,7 @@ static void *resolve_base64_encode() { ZEND_NO_SANITIZE_ADDRESS ZEND_ATTRIBUTE_UNUSED /* clang mistakenly warns about this */ -static void *resolve_base64_decode() { +static base64_decode_func_t resolve_base64_decode() { # if ZEND_INTRIN_AVX2_FUNC_PROTO if (zend_cpu_supports_avx2()) { return php_base64_decode_ex_avx2; From e15409b43cacf711608189c299191f2969ea331c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 15 Apr 2020 10:45:18 +0200 Subject: [PATCH 159/338] Adjust zend_write_func signature Make it return size_t instead of int, to line up with actual implementation. --- Zend/zend.c | 2 +- Zend/zend.h | 2 +- ext/ffi/tests/200.phpt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Zend/zend.c b/Zend/zend.c index d4c2e7c25c073..555483a7be25a 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -820,7 +820,7 @@ int zend_startup(zend_utility_functions *utility_functions) /* {{{ */ /* Set up utility functions and values */ zend_error_cb = utility_functions->error_function; zend_printf = utility_functions->printf_function; - zend_write = (zend_write_func_t) utility_functions->write_function; + zend_write = utility_functions->write_function; zend_fopen = utility_functions->fopen_function; if (!zend_fopen) { zend_fopen = zend_fopen_wrapper; diff --git a/Zend/zend.h b/Zend/zend.h index fd1fee909935b..cd41cde5ef1b7 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -205,7 +205,7 @@ typedef struct _zend_utility_values { zend_bool html_errors; } zend_utility_values; -typedef int (*zend_write_func_t)(const char *str, size_t str_length); +typedef size_t (*zend_write_func_t)(const char *str, size_t str_length); #define zend_bailout() _zend_bailout(__FILE__, __LINE__) diff --git a/ext/ffi/tests/200.phpt b/ext/ffi/tests/200.phpt index e80d1ed08c6b8..39dcbdf71a6b7 100644 --- a/ext/ffi/tests/200.phpt +++ b/ext/ffi/tests/200.phpt @@ -17,7 +17,7 @@ opcache.jit=0 Date: Wed, 15 Apr 2020 10:49:44 +0200 Subject: [PATCH 160/338] Make zend_list_free return void And assert that the refcount is zero. This function should only be used internally as the resource destructor. --- Zend/zend_list.c | 11 ++++------- Zend/zend_list.h | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Zend/zend_list.c b/Zend/zend_list.c index 2288cf6913c7f..3464ca27d524d 100644 --- a/Zend/zend_list.c +++ b/Zend/zend_list.c @@ -51,13 +51,10 @@ ZEND_API int ZEND_FASTCALL zend_list_delete(zend_resource *res) } } -ZEND_API int ZEND_FASTCALL zend_list_free(zend_resource *res) +ZEND_API void ZEND_FASTCALL zend_list_free(zend_resource *res) { - if (GC_REFCOUNT(res) <= 0) { - return zend_hash_index_del(&EG(regular_list), res->handle); - } else { - return SUCCESS; - } + ZEND_ASSERT(GC_REFCOUNT(res) == 0); + zend_hash_index_del(&EG(regular_list), res->handle); } static void zend_resource_dtor(zend_resource *res) @@ -82,7 +79,7 @@ static void zend_resource_dtor(zend_resource *res) ZEND_API int ZEND_FASTCALL zend_list_close(zend_resource *res) { if (GC_REFCOUNT(res) <= 0) { - return zend_list_free(res); + zend_list_free(res); } else if (res->type >= 0) { zend_resource_dtor(res); } diff --git a/Zend/zend_list.h b/Zend/zend_list.h index b9a1d5e159a27..92fdd3d4178f3 100644 --- a/Zend/zend_list.h +++ b/Zend/zend_list.h @@ -53,7 +53,7 @@ int zend_init_rsrc_list_dtors(void); void zend_destroy_rsrc_list_dtors(void); ZEND_API zval* ZEND_FASTCALL zend_list_insert(void *ptr, int type); -ZEND_API int ZEND_FASTCALL zend_list_free(zend_resource *res); +ZEND_API void ZEND_FASTCALL zend_list_free(zend_resource *res); ZEND_API int ZEND_FASTCALL zend_list_delete(zend_resource *res); ZEND_API int ZEND_FASTCALL zend_list_close(zend_resource *res); From d68dfaf05e88b5962416a656d625f53bb0288236 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 15 Apr 2020 10:59:58 +0200 Subject: [PATCH 161/338] Remove return value from llist apply functions Unlike the hash apply functions, these do not return int. --- Zend/zend_builtin_functions.c | 5 ++--- sapi/cgi/cgi_main.c | 5 ++--- sapi/cli/php_cli.c | 3 +-- sapi/fpm/fpm/fpm_main.c | 5 ++--- sapi/phpdbg/phpdbg_prompt.c | 3 +-- sapi/phpdbg/phpdbg_utils.c | 1 - 6 files changed, 8 insertions(+), 14 deletions(-) diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 4753e9b7c1cb3..111dfc019343e 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1674,11 +1674,10 @@ ZEND_FUNCTION(get_resources) } /* }}} */ -static int add_zendext_info(zend_extension *ext, void *arg) /* {{{ */ +static void add_zendext_info(zend_extension *ext, void *arg) /* {{{ */ { zval *name_array = (zval *)arg; add_next_index_string(name_array, ext->name); - return 0; } /* }}} */ @@ -1695,7 +1694,7 @@ ZEND_FUNCTION(get_loaded_extensions) array_init(return_value); if (zendext) { - zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t)add_zendext_info, return_value); + zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) add_zendext_info, return_value); } else { zend_module_entry *module; diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 723bffc8658aa..dfe595a97abf4 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -258,10 +258,9 @@ static void print_modules(void) zend_hash_destroy(&sorted_registry); } -static int print_extension_info(zend_extension *ext, void *arg) +static void print_extension_info(zend_extension *ext) { php_printf("%s\n", ext->name); - return 0; } static int extension_name_cmp(const zend_llist_element **f, const zend_llist_element **s) @@ -278,7 +277,7 @@ static void print_extensions(void) zend_llist_copy(&sorted_exts, &zend_extensions); sorted_exts.dtor = NULL; zend_llist_sort(&sorted_exts, extension_name_cmp); - zend_llist_apply_with_argument(&sorted_exts, (llist_apply_with_arg_func_t) print_extension_info, NULL); + zend_llist_apply(&sorted_exts, (llist_apply_func_t) print_extension_info); zend_llist_destroy(&sorted_exts); } diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index a5aafcd23171a..d80b2fb95b676 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -195,10 +195,9 @@ static void print_modules(void) /* {{{ */ } /* }}} */ -static int print_extension_info(zend_extension *ext, void *arg) /* {{{ */ +static void print_extension_info(zend_extension *ext) /* {{{ */ { php_printf("%s\n", ext->name); - return ZEND_HASH_APPLY_KEEP; } /* }}} */ diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index 00102e6112e64..c5e20b93da868 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -206,10 +206,9 @@ static void print_modules(void) /* {{{ */ } /* }}} */ -static int print_extension_info(zend_extension *ext, void *arg) /* {{{ */ +static void print_extension_info(zend_extension *ext) /* {{{ */ { php_printf("%s\n", ext->name); - return 0; } /* }}} */ @@ -228,7 +227,7 @@ static void print_extensions(void) /* {{{ */ zend_llist_copy(&sorted_exts, &zend_extensions); sorted_exts.dtor = NULL; zend_llist_sort(&sorted_exts, extension_name_cmp); - zend_llist_apply_with_argument(&sorted_exts, (llist_apply_with_arg_func_t) print_extension_info, NULL); + zend_llist_apply(&sorted_exts, (llist_apply_func_t) print_extension_info); zend_llist_destroy(&sorted_exts); } /* }}} */ diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index a441d4d6ae88a..3c26fa7ef4ff9 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -1228,9 +1228,8 @@ static int add_module_info(zend_module_entry *module) /* {{{ */ { } /* }}} */ -static int add_zendext_info(zend_extension *ext) /* {{{ */ { +static void add_zendext_info(zend_extension *ext) /* {{{ */ { phpdbg_write("extension", "name=\"%s\"", "%s\n", ext->name); - return 0; } /* }}} */ diff --git a/sapi/phpdbg/phpdbg_utils.c b/sapi/phpdbg/phpdbg_utils.c index 1efad03a79317..548c9e96b1c9b 100644 --- a/sapi/phpdbg/phpdbg_utils.c +++ b/sapi/phpdbg/phpdbg_utils.c @@ -710,7 +710,6 @@ PHPDBG_API void phpdbg_xml_var_dump(zval *zv) { ZEND_HASH_FOREACH_KEY_VAL_IND(myht, num, key, val) { element_dump_func(val, key, num); } ZEND_HASH_FOREACH_END(); - zend_hash_apply_with_arguments(myht, (apply_func_args_t) element_dump_func, 0); GC_UNPROTECT_RECURSION(myht); if (Z_TYPE_P(zv) == IS_OBJECT) { zend_release_properties(myht); From 79a36ff7f33194cf08ebe511bd828e1cdaea8e41 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 15 Apr 2020 11:20:33 +0200 Subject: [PATCH 162/338] Fixed bug #79477 Make sure to deindirect properties when creating array. --- NEWS | 1 + Zend/tests/bug79477.phpt | 20 ++++++++++++++++++++ Zend/zend_hash.c | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 Zend/tests/bug79477.phpt diff --git a/NEWS b/NEWS index b7ded38bf1b98..adbaf6223e56c 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ PHP NEWS - Core: . Fixed bug #79434 (PHP 7.3 and PHP-7.4 crash with NULL-pointer dereference on !CS constant). (Nikita) + . Fixed bug #79477 (casting object into array creates references). (Nikita) - DOM: . Fixed bug #78221 (DOMNode::normalize() doesn't remove empty text nodes). diff --git a/Zend/tests/bug79477.phpt b/Zend/tests/bug79477.phpt new file mode 100644 index 0000000000000..cb5340d104775 --- /dev/null +++ b/Zend/tests/bug79477.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #79477: casting object into array creates references +--FILE-- +{1} = null; + +$arr = (array) $obj; +$arr['prop'] = 'new value'; + +echo $obj->prop, "\n"; + +?> +--EXPECT-- +default value diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index 6fc4666da9ae2..16fd24e3dc28c 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -2722,7 +2722,7 @@ ZEND_API HashTable* ZEND_FASTCALL zend_proptable_to_symtable(HashTable *ht, zend { HashTable *new_ht = zend_new_array(zend_hash_num_elements(ht)); - ZEND_HASH_FOREACH_KEY_VAL(ht, num_key, str_key, zv) { + ZEND_HASH_FOREACH_KEY_VAL_IND(ht, num_key, str_key, zv) { do { if (Z_OPT_REFCOUNTED_P(zv)) { if (Z_ISREF_P(zv) && Z_REFCOUNT_P(zv) == 1) { From 0a2fd0db3cb57a567954c55e6607cf2102eb91ce Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 15 Apr 2020 11:25:06 +0200 Subject: [PATCH 163/338] Fix directory clash in tempnam_variation4 test --- ext/standard/tests/file/tempnam_variation4-0.phpt | 2 +- ext/standard/tests/file/tempnam_variation4-1.phpt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/standard/tests/file/tempnam_variation4-0.phpt b/ext/standard/tests/file/tempnam_variation4-0.phpt index 646179beca659..cbd09a5025ccb 100644 --- a/ext/standard/tests/file/tempnam_variation4-0.phpt +++ b/ext/standard/tests/file/tempnam_variation4-0.phpt @@ -20,7 +20,7 @@ require __DIR__ . '/../skipif_root.inc'; echo "*** Testing tempnam() with dir of permissions from 0000 to 0350 ***\n"; $file_path = __DIR__; -$dir_name = $file_path."/tempnam_variation4"; +$dir_name = $file_path."/tempnam_variation4-0"; $prefix = "tempnamVar4."; mkdir($dir_name); diff --git a/ext/standard/tests/file/tempnam_variation4-1.phpt b/ext/standard/tests/file/tempnam_variation4-1.phpt index b614404c94d7b..46807125c6c5a 100644 --- a/ext/standard/tests/file/tempnam_variation4-1.phpt +++ b/ext/standard/tests/file/tempnam_variation4-1.phpt @@ -20,7 +20,7 @@ require __DIR__ . '/../skipif_root.inc'; echo "*** Testing tempnam() with dir of permissions from 0351 to 0777 ***\n"; $file_path = __DIR__; -$dir_name = $file_path."/tempnam_variation4"; +$dir_name = $file_path."/tempnam_variation4-1"; $prefix = "tempnamVar4."; mkdir($dir_name); From fd5dc557598c3121f8a4ce5cddc475ab6cc310bc Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 15 Apr 2020 11:27:03 +0200 Subject: [PATCH 164/338] Force short_open_tag=0 in run-tests.php Make sure we don't accidentially add tests depending on short tags. --- run-tests.php | 1 + 1 file changed, 1 insertion(+) diff --git a/run-tests.php b/run-tests.php index ebcaabba02a5a..822850af71b7b 100755 --- a/run-tests.php +++ b/run-tests.php @@ -262,6 +262,7 @@ function main() 'opcache.revalidate_freq=0', 'zend.assertions=1', 'zend.exception_ignore_args=0', + 'short_open_tag=0', ); $no_file_cache = '-d opcache.file_cache= -d opcache.file_cache_only=0'; From 782dc8d73bc5e38f1f43b8103ea0cdb3e0c56663 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 15 Apr 2020 13:08:09 +0300 Subject: [PATCH 165/338] Removed unused parameter --- ext/opcache/jit/zend_jit_x86.dasc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index df9c52ab43833..bfc2c7e0f73b5 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -11105,7 +11105,7 @@ static zend_bool zend_jit_may_be_in_reg(const zend_op_array *op_array, zend_ssa return 1; } -static zend_bool zend_needs_extra_reg_for_const(const zend_op_array *op_array, const zend_op *opline, zend_uchar op_type, znode_op op) +static zend_bool zend_needs_extra_reg_for_const(const zend_op *opline, zend_uchar op_type, znode_op op) { |.if X64 || if (op_type == IS_CONST) { @@ -11259,8 +11259,8 @@ static zend_regset zend_jit_get_scratch_regset(const zend_op *opline, const zend ZEND_REGSET_INCL(regset, ZREG_XMM0); } } - if (zend_needs_extra_reg_for_const(op_array, opline, opline->op1_type, opline->op1) || - zend_needs_extra_reg_for_const(op_array, opline, opline->op1_type, opline->op2)) { + if (zend_needs_extra_reg_for_const(opline, opline->op1_type, opline->op1) || + zend_needs_extra_reg_for_const(opline, opline->op1_type, opline->op2)) { ZEND_REGSET_INCL(regset, ZREG_R0); } } @@ -11345,8 +11345,8 @@ static zend_regset zend_jit_get_scratch_regset(const zend_op *opline, const zend ZEND_REGSET_INCL(regset, ZREG_XMM0); } } - if (zend_needs_extra_reg_for_const(op_array, opline, opline->op1_type, opline->op1) || - zend_needs_extra_reg_for_const(op_array, opline, opline->op1_type, opline->op2)) { + if (zend_needs_extra_reg_for_const(opline, opline->op1_type, opline->op1) || + zend_needs_extra_reg_for_const(opline, opline->op1_type, opline->op2)) { ZEND_REGSET_INCL(regset, ZREG_R0); } } From 99084262c3f56dd8a4efa6fa689441966745440f Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 15 Apr 2020 13:09:55 +0300 Subject: [PATCH 166/338] Use proper macro --- ext/opcache/jit/zend_jit_trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index e42970b97d7a0..a819b08cd6ab3 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -2137,7 +2137,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par op1_def_info = OP1_DEF_INFO(); if (!zend_jit_assign_dim_op(&dasm_state, opline, op_array, op1_info, op1_def_info, op2_info, - op1_data_info, OP1_DATA_RANGE(), + op1_data_info, OP1_DATA_RANGE_EX(), zend_may_throw(opline, ssa_op, op_array, ssa))) { goto jit_failure; } From dd163d05ffeb1e3fea8cc5ba2b187324e9b32553 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 15 Apr 2020 12:58:50 +0200 Subject: [PATCH 167/338] Remove OP_RANGE_EX distinction Only leave OP_RANGE macros, which always have the "EX" behavior. This was already done for most other macros before, but these were missed. This helps avoid mistakes by using the wrong macro. --- ext/opcache/jit/zend_jit.c | 15 ++++----------- ext/opcache/jit/zend_jit_trace.c | 10 +++++----- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index 27f889f031d2d..9f03a118265c5 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -161,22 +161,15 @@ static zend_bool zend_long_is_power_of_two(zend_long x) return (x > 0) && !(x & (x - 1)); } -#define OP_RANGE_EX(ssa_op, opN) \ +#define OP_RANGE(ssa_op, opN) \ (((opline->opN##_type & (IS_TMP_VAR|IS_VAR|IS_CV)) && \ (ssa_op)->opN##_use >= 0 && \ ssa->var_info[(ssa_op)->opN##_use].has_range) ? \ &ssa->var_info[(ssa_op)->opN##_use].range : NULL) -#define OP_RANGE(line, opN) \ - (ssa->var_info ? OP_RANGE_EX(ssa->ops + (line), opN) : NULL) - -#define OP1_RANGE() OP_RANGE(opline - op_array->opcodes, op1) -#define OP2_RANGE() OP_RANGE(opline - op_array->opcodes, op2) -#define OP1_DATA_RANGE() OP_RANGE(opline - op_array->opcodes + 1, op1) - -#define OP1_RANGE_EX() OP_RANGE_EX(ssa_op, op1) -#define OP2_RANGE_EX() OP_RANGE_EX(ssa_op, op2) -#define OP1_DATA_RANGE_EX() OP_RANGE_EX(ssa_op + 1, op1) +#define OP1_RANGE() OP_RANGE(ssa_op, op1) +#define OP2_RANGE() OP_RANGE(ssa_op, op2) +#define OP1_DATA_RANGE() OP_RANGE(ssa_op + 1, op1) #include "dynasm/dasm_x86.h" #include "jit/zend_jit_helpers.c" diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index a819b08cd6ab3..8034e408c18d0 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -1952,8 +1952,8 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par } res_info = RES_INFO(); if (!zend_jit_long_math(&dasm_state, opline, op_array, - op1_info, OP1_RANGE_EX(), OP1_REG_ADDR(), - op2_info, OP2_RANGE_EX(), OP2_REG_ADDR(), + op1_info, OP1_RANGE(), OP1_REG_ADDR(), + op2_info, OP2_RANGE(), OP2_REG_ADDR(), res_use_info, res_info, res_addr, send_result, zend_may_throw(opline, ssa_op, op_array, ssa))) { @@ -2106,8 +2106,8 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par } op1_def_info = OP1_DEF_INFO(); if (!zend_jit_assign_op(&dasm_state, opline, op_array, - op1_info, op1_def_info, OP1_RANGE_EX(), - op2_info, OP2_RANGE_EX(), + op1_info, op1_def_info, OP1_RANGE(), + op2_info, OP2_RANGE(), (op1_def_info & MAY_BE_LONG) && (op1_def_info & (MAY_BE_DOUBLE|MAY_BE_GUARD)) && zend_may_overflow_ex(opline, ssa_op, op_array, ssa), zend_may_throw(opline, ssa_op, op_array, ssa))) { goto jit_failure; @@ -2137,7 +2137,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par op1_def_info = OP1_DEF_INFO(); if (!zend_jit_assign_dim_op(&dasm_state, opline, op_array, op1_info, op1_def_info, op2_info, - op1_data_info, OP1_DATA_RANGE_EX(), + op1_data_info, OP1_DATA_RANGE(), zend_may_throw(opline, ssa_op, op_array, ssa))) { goto jit_failure; } From 481caf17bc4e40fd437e6ed51cb4c97ed8c10e96 Mon Sep 17 00:00:00 2001 From: vibhutisawant Date: Sat, 11 Apr 2020 07:45:03 -0700 Subject: [PATCH 168/338] Fix Bug #79431 Various compiler warnings on Big endian architecture with GCC 5.4.0 Fix [-Werror=maybe-uninitialized] compilation warnings on big endian system Closes GH-5373 --- ext/intl/collator/collator_is_numeric.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/intl/collator/collator_is_numeric.c b/ext/intl/collator/collator_is_numeric.c index b71e658e5785f..dffa2c81b94cc 100644 --- a/ext/intl/collator/collator_is_numeric.c +++ b/ext/intl/collator/collator_is_numeric.c @@ -69,7 +69,7 @@ static double collator_u_strtod(const UChar *nptr, UChar **endptr) /* {{{ */ char buf[64], *numbuf, *bufpos; size_t length = u - nstart; double value; - ALLOCA_FLAG(use_heap); + ALLOCA_FLAG(use_heap = 0); if (length < sizeof(buf)) { numbuf = buf; From 75a58ba5226b45b4e2d68e859fc3517b9c7de6dd Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Thu, 16 Apr 2020 01:39:51 +0200 Subject: [PATCH 169/338] Improve error messages for magic methods by appending method's class Closes GH-5397. --- Zend/tests/bug61025.phpt | 4 +-- Zend/tests/bug65322.phpt | 2 +- Zend/tests/bug67436/bug67436.phpt | 4 +-- Zend/tests/bug67436/bug67436_nohandler.phpt | 2 +- Zend/tests/bug70215.phpt | 2 +- Zend/tests/errmsg_045.phpt | 2 +- Zend/tests/magic_methods_002.phpt | 2 +- Zend/tests/magic_methods_003.phpt | 2 +- Zend/tests/magic_methods_004.phpt | 2 +- Zend/tests/magic_methods_005.phpt | 2 +- Zend/tests/magic_methods_006.phpt | 2 +- Zend/tests/magic_methods_007.phpt | 2 +- Zend/tests/magic_methods_008.phpt | 2 +- Zend/tests/magic_methods_009.phpt | 2 +- Zend/tests/magic_methods_010.phpt | 2 +- Zend/zend_compile.c | 28 +++++++++++---------- tests/classes/__call_005.phpt | 2 +- tests/classes/__call_007.phpt | 2 +- 18 files changed, 34 insertions(+), 32 deletions(-) diff --git a/Zend/tests/bug61025.phpt b/Zend/tests/bug61025.phpt index f6731535fb2a3..54f6443f85c80 100644 --- a/Zend/tests/bug61025.phpt +++ b/Zend/tests/bug61025.phpt @@ -20,9 +20,9 @@ echo $b->__invoke(); ?> --EXPECTF-- -Warning: The magic method __invoke() must have public visibility and cannot be static in %sbug61025.php on line %d +Warning: The magic method InvokeAble::__invoke() must have public visibility and cannot be static in %sbug61025.php on line %d -Warning: The magic method __invoke() must have public visibility and cannot be static in %sbug61025.php on line %d +Warning: The magic method Bar::__invoke() must have public visibility and cannot be static in %sbug61025.php on line %d Bar Fatal error: Uncaught Error: Call to private method Bar::__invoke() from context '' in %sbug61025.php:%d Stack trace: diff --git a/Zend/tests/bug65322.phpt b/Zend/tests/bug65322.phpt index 2ae2780bb628d..9b5da8e4b7fa4 100644 --- a/Zend/tests/bug65322.phpt +++ b/Zend/tests/bug65322.phpt @@ -19,6 +19,6 @@ eval('class A { private function __invoke() { } }'); ?> --EXPECTF-- -string(76) "The magic method __invoke() must have public visibility and cannot be static" +string(%d) "The magic method A::__invoke() must have public visibility and cannot be static" string(%d) "%s(%d) : eval()'d code" string(1) "X" diff --git a/Zend/tests/bug67436/bug67436.phpt b/Zend/tests/bug67436/bug67436.phpt index 0d8ec870062ed..ade29731ae4e4 100644 --- a/Zend/tests/bug67436/bug67436.phpt +++ b/Zend/tests/bug67436/bug67436.phpt @@ -21,7 +21,7 @@ a::staticTest(); $b = new b(); $b->test(); ---EXPECT-- -string(76) "The magic method __invoke() must have public visibility and cannot be static" +--EXPECTF-- +string(%d) "The magic method b::__invoke() must have public visibility and cannot be static" b::test() a::test(c::TESTCONSTANT) diff --git a/Zend/tests/bug67436/bug67436_nohandler.phpt b/Zend/tests/bug67436/bug67436_nohandler.phpt index 64c7f706421ad..abccfb62f4923 100644 --- a/Zend/tests/bug67436/bug67436_nohandler.phpt +++ b/Zend/tests/bug67436/bug67436_nohandler.phpt @@ -14,6 +14,6 @@ a::staticTest(); $b = new b(); $b->test(); --EXPECTF-- -Warning: The magic method __invoke() must have public visibility and cannot be static in %s on line %d +Warning: The magic method b::__invoke() must have public visibility and cannot be static in %s on line %d b::test() a::test(c::TESTCONSTANT) diff --git a/Zend/tests/bug70215.phpt b/Zend/tests/bug70215.phpt index 851a6b855ed20..76a96722251a0 100644 --- a/Zend/tests/bug70215.phpt +++ b/Zend/tests/bug70215.phpt @@ -17,5 +17,5 @@ $b(); ?> --EXPECTF-- -Warning: The magic method __invoke() must have public visibility and cannot be static in %s on line %d +Warning: The magic method A::__invoke() must have public visibility and cannot be static in %s on line %d A diff --git a/Zend/tests/errmsg_045.phpt b/Zend/tests/errmsg_045.phpt index 172f56f26b9cf..35e6c7b00fef0 100644 --- a/Zend/tests/errmsg_045.phpt +++ b/Zend/tests/errmsg_045.phpt @@ -14,7 +14,7 @@ eval('class A { private function __invoke() { } }'); ?> --EXPECTF-- -string(76) "The magic method __invoke() must have public visibility and cannot be static" +string(%d) "The magic method A::__invoke() must have public visibility and cannot be static" string(%d) "%s(%d) : eval()'d code" Warning: Undefined variable $undefined in %s on line %d diff --git a/Zend/tests/magic_methods_002.phpt b/Zend/tests/magic_methods_002.phpt index fdbb97be40950..dbd4977ad6fe9 100644 --- a/Zend/tests/magic_methods_002.phpt +++ b/Zend/tests/magic_methods_002.phpt @@ -11,4 +11,4 @@ class foo { ?> --EXPECTF-- -Warning: The magic method __unset() must have public visibility and cannot be static in %s on line %d +Warning: The magic method foo::__unset() must have public visibility and cannot be static in %s on line %d diff --git a/Zend/tests/magic_methods_003.phpt b/Zend/tests/magic_methods_003.phpt index cd96d15b2fae1..d2207e9db76cf 100644 --- a/Zend/tests/magic_methods_003.phpt +++ b/Zend/tests/magic_methods_003.phpt @@ -11,4 +11,4 @@ class foo { ?> --EXPECTF-- -Warning: The magic method __unset() must have public visibility and cannot be static in %s on line %d +Warning: The magic method foo::__unset() must have public visibility and cannot be static in %s on line %d diff --git a/Zend/tests/magic_methods_004.phpt b/Zend/tests/magic_methods_004.phpt index 3c1df73d095b3..695747fdc72bb 100644 --- a/Zend/tests/magic_methods_004.phpt +++ b/Zend/tests/magic_methods_004.phpt @@ -11,4 +11,4 @@ class foo { ?> --EXPECTF-- -Warning: The magic method __unset() must have public visibility and cannot be static in %s on line %d +Warning: The magic method foo::__unset() must have public visibility and cannot be static in %s on line %d diff --git a/Zend/tests/magic_methods_005.phpt b/Zend/tests/magic_methods_005.phpt index 8e7749381ca27..14704c9229fc8 100644 --- a/Zend/tests/magic_methods_005.phpt +++ b/Zend/tests/magic_methods_005.phpt @@ -9,4 +9,4 @@ interface a { ?> --EXPECTF-- -Warning: The magic method __call() must have public visibility and cannot be static in %s on line %d +Warning: The magic method a::__call() must have public visibility and cannot be static in %s on line %d diff --git a/Zend/tests/magic_methods_006.phpt b/Zend/tests/magic_methods_006.phpt index 68eac7439d6f0..92c01636ce162 100644 --- a/Zend/tests/magic_methods_006.phpt +++ b/Zend/tests/magic_methods_006.phpt @@ -9,4 +9,4 @@ interface a { ?> --EXPECTF-- -Warning: The magic method __callStatic() must have public visibility and be static in %s on line %d +Warning: The magic method a::__callStatic() must have public visibility and be static in %s on line %d diff --git a/Zend/tests/magic_methods_007.phpt b/Zend/tests/magic_methods_007.phpt index 63f4cadff574d..dd7714e5df1d0 100644 --- a/Zend/tests/magic_methods_007.phpt +++ b/Zend/tests/magic_methods_007.phpt @@ -9,6 +9,6 @@ abstract class b { ?> --EXPECTF-- -Warning: The magic method __set() must have public visibility and cannot be static in %s on line %d +Warning: The magic method b::__set() must have public visibility and cannot be static in %s on line %d Fatal error: Method b::__set() must take exactly 2 arguments in %s on line %d diff --git a/Zend/tests/magic_methods_008.phpt b/Zend/tests/magic_methods_008.phpt index 7d7a839afe82e..de99ecafd9e3d 100644 --- a/Zend/tests/magic_methods_008.phpt +++ b/Zend/tests/magic_methods_008.phpt @@ -14,6 +14,6 @@ class a extends b { ?> --EXPECTF-- -Warning: The magic method __set() must have public visibility and cannot be static in %s on line %d +Warning: The magic method a::__set() must have public visibility and cannot be static in %s on line %d Fatal error: Access level to a::__set() must be public (as in class b) in %s on line 8 diff --git a/Zend/tests/magic_methods_009.phpt b/Zend/tests/magic_methods_009.phpt index ff609ce4523c4..17a99cef48616 100644 --- a/Zend/tests/magic_methods_009.phpt +++ b/Zend/tests/magic_methods_009.phpt @@ -10,4 +10,4 @@ class a { ?> --EXPECTF-- -Warning: The magic method __callStatic() must have public visibility and be static in %s on line %d +Warning: The magic method a::__callStatic() must have public visibility and be static in %s on line %d diff --git a/Zend/tests/magic_methods_010.phpt b/Zend/tests/magic_methods_010.phpt index 8ec3f23e614d1..6118bda67b56e 100644 --- a/Zend/tests/magic_methods_010.phpt +++ b/Zend/tests/magic_methods_010.phpt @@ -10,6 +10,6 @@ class a { ?> --EXPECTF-- -Warning: The magic method __toString() must have public visibility and cannot be static in %s on line %d +Warning: The magic method a::__toString() must have public visibility and cannot be static in %s on line %d Fatal error: Method a::__tostring() cannot take arguments in %s on line %d diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 953bf6dfd59eb..9d186b30fdcf8 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -6049,16 +6049,18 @@ static void zend_compile_implicit_closure_uses(closure_info *info) ZEND_HASH_FOREACH_END(); } -static void zend_check_magic_method_attr(uint32_t attr, const char* method, zend_bool is_static) /* {{{ */ +static void zend_check_magic_method_attr(uint32_t attr, zend_class_entry *ce, const char* method, zend_bool is_static) /* {{{ */ { if (is_static) { if (!(attr & ZEND_ACC_PUBLIC) || !(attr & ZEND_ACC_STATIC)) { - zend_error(E_WARNING, "The magic method %s() must have public visibility and be static", method); + zend_error(E_WARNING, + "The magic method %s::%s() must have public visibility and be static", + ZSTR_VAL(ce->name), method); } } else if (!(attr & ZEND_ACC_PUBLIC) || (attr & ZEND_ACC_STATIC)) { zend_error(E_WARNING, - "The magic method %s() must have public visibility and cannot be static", - method); + "The magic method %s::%s() must have public visibility and cannot be static", + ZSTR_VAL(ce->name), method); } } /* }}} */ @@ -6138,35 +6140,35 @@ void zend_begin_method_decl(zend_op_array *op_array, zend_string *name, zend_boo } else if (zend_string_equals_literal(lcname, ZEND_CLONE_FUNC_NAME)) { ce->clone = (zend_function *) op_array; } else if (zend_string_equals_literal(lcname, ZEND_CALL_FUNC_NAME)) { - zend_check_magic_method_attr(fn_flags, "__call", 0); + zend_check_magic_method_attr(fn_flags, ce, "__call", 0); ce->__call = (zend_function *) op_array; } else if (zend_string_equals_literal(lcname, ZEND_CALLSTATIC_FUNC_NAME)) { - zend_check_magic_method_attr(fn_flags, "__callStatic", 1); + zend_check_magic_method_attr(fn_flags, ce, "__callStatic", 1); ce->__callstatic = (zend_function *) op_array; } else if (zend_string_equals_literal(lcname, ZEND_GET_FUNC_NAME)) { - zend_check_magic_method_attr(fn_flags, "__get", 0); + zend_check_magic_method_attr(fn_flags, ce, "__get", 0); ce->__get = (zend_function *) op_array; ce->ce_flags |= ZEND_ACC_USE_GUARDS; } else if (zend_string_equals_literal(lcname, ZEND_SET_FUNC_NAME)) { - zend_check_magic_method_attr(fn_flags, "__set", 0); + zend_check_magic_method_attr(fn_flags, ce, "__set", 0); ce->__set = (zend_function *) op_array; ce->ce_flags |= ZEND_ACC_USE_GUARDS; } else if (zend_string_equals_literal(lcname, ZEND_UNSET_FUNC_NAME)) { - zend_check_magic_method_attr(fn_flags, "__unset", 0); + zend_check_magic_method_attr(fn_flags, ce, "__unset", 0); ce->__unset = (zend_function *) op_array; ce->ce_flags |= ZEND_ACC_USE_GUARDS; } else if (zend_string_equals_literal(lcname, ZEND_ISSET_FUNC_NAME)) { - zend_check_magic_method_attr(fn_flags, "__isset", 0); + zend_check_magic_method_attr(fn_flags, ce, "__unset", 0); ce->__isset = (zend_function *) op_array; ce->ce_flags |= ZEND_ACC_USE_GUARDS; } else if (zend_string_equals_literal(lcname, ZEND_TOSTRING_FUNC_NAME)) { - zend_check_magic_method_attr(fn_flags, "__toString", 0); + zend_check_magic_method_attr(fn_flags, ce, "__toString", 0); ce->__tostring = (zend_function *) op_array; add_stringable_interface(ce); } else if (zend_string_equals_literal(lcname, ZEND_INVOKE_FUNC_NAME)) { - zend_check_magic_method_attr(fn_flags, "__invoke", 0); + zend_check_magic_method_attr(fn_flags, ce, "__invoke", 0); } else if (zend_string_equals_literal(lcname, ZEND_DEBUGINFO_FUNC_NAME)) { - zend_check_magic_method_attr(fn_flags, "__debugInfo", 0); + zend_check_magic_method_attr(fn_flags, ce, "__debugInfo", 0); ce->__debugInfo = (zend_function *) op_array; } diff --git a/tests/classes/__call_005.phpt b/tests/classes/__call_005.phpt index 8c4d52efa7850..8db8cec43e3dd 100644 --- a/tests/classes/__call_005.phpt +++ b/tests/classes/__call_005.phpt @@ -22,7 +22,7 @@ $b = new B(); $b->test(); ?> --EXPECTF-- -Warning: The magic method __call() must have public visibility and cannot be static in %s__call_005.php on line 3 +Warning: The magic method A::__call() must have public visibility and cannot be static in %s__call_005.php on line 3 In A::__call(test1, array(1,a)) object(B)#1 (0) { } diff --git a/tests/classes/__call_007.phpt b/tests/classes/__call_007.phpt index 26dd8e29b60e4..6f90e84f7db62 100644 --- a/tests/classes/__call_007.phpt +++ b/tests/classes/__call_007.phpt @@ -51,7 +51,7 @@ try { } ?> --EXPECTF-- -Warning: The magic method __call() must have public visibility and cannot be static in %s on line 3 +Warning: The magic method A::__call() must have public visibility and cannot be static in %s on line 3 ---> Invoke __call via simple method call. object(A)#1 (0) { } From b10b73eb866d44dbd69343a94501bdc7f0994197 Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Thu, 16 Apr 2020 10:39:25 +0200 Subject: [PATCH 170/338] Fix magic method name --- Zend/zend_compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 9d186b30fdcf8..bb9b42fee650f 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -6158,7 +6158,7 @@ void zend_begin_method_decl(zend_op_array *op_array, zend_string *name, zend_boo ce->__unset = (zend_function *) op_array; ce->ce_flags |= ZEND_ACC_USE_GUARDS; } else if (zend_string_equals_literal(lcname, ZEND_ISSET_FUNC_NAME)) { - zend_check_magic_method_attr(fn_flags, ce, "__unset", 0); + zend_check_magic_method_attr(fn_flags, ce, "__isset", 0); ce->__isset = (zend_function *) op_array; ce->ce_flags |= ZEND_ACC_USE_GUARDS; } else if (zend_string_equals_literal(lcname, ZEND_TOSTRING_FUNC_NAME)) { From a1c1736bfb88d006542dc9bcc10d7101617517a6 Mon Sep 17 00:00:00 2001 From: guirish Date: Fri, 10 Apr 2020 05:45:40 -0400 Subject: [PATCH 171/338] Fix MySQL local infile / attr handling on big endian systems Make sure pointer types match what is used by libmysql everywhere. Closes GH-5380. --- ext/mysqli/mysqli_api.c | 6 +++--- ext/mysqli/mysqli_nonapi.c | 4 ++-- ext/mysqlnd/mysqlnd_ps.c | 10 +++++----- ext/pdo_mysql/mysql_driver.c | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index c4ed1bf54326b..8632971893a79 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -2327,7 +2327,7 @@ PHP_FUNCTION(mysqli_stmt_attr_set) #if MYSQL_VERSION_ID >= 50107 my_bool mode_b; #endif - zend_ulong mode; + unsigned long mode; zend_long attr; void *mode_p; @@ -2370,7 +2370,7 @@ PHP_FUNCTION(mysqli_stmt_attr_get) { MY_STMT *stmt; zval *mysql_stmt; - zend_ulong value = 0; + unsigned long value = 0; zend_long attr; int rc; @@ -2387,7 +2387,7 @@ PHP_FUNCTION(mysqli_stmt_attr_get) if (attr == STMT_ATTR_UPDATE_MAX_LENGTH) value = *((my_bool *)&value); #endif - RETURN_LONG((zend_ulong)value); + RETURN_LONG((unsigned long)value); } /* }}} */ diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c index 0f5714bf214ac..4736e4fcb2a45 100644 --- a/ext/mysqli/mysqli_nonapi.c +++ b/ext/mysqli/mysqli_nonapi.c @@ -305,8 +305,8 @@ void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_real_conne #if !defined(MYSQLI_USE_MYSQLND) mysql->mysql->reconnect = MyG(reconnect); #endif - - mysql_options(mysql->mysql, MYSQL_OPT_LOCAL_INFILE, (char *)&MyG(allow_local_infile)); + unsigned int allow_local_infile = MyG(allow_local_infile); + mysql_options(mysql->mysql, MYSQL_OPT_LOCAL_INFILE, (char *)&allow_local_infile); end: if (!mysqli_resource) { diff --git a/ext/mysqlnd/mysqlnd_ps.c b/ext/mysqlnd/mysqlnd_ps.c index b2017b9127f59..d93a5ed7b1267 100644 --- a/ext/mysqlnd/mysqlnd_ps.c +++ b/ext/mysqlnd/mysqlnd_ps.c @@ -1899,8 +1899,8 @@ MYSQLND_METHOD(mysqlnd_stmt, attr_set)(MYSQLND_STMT * const s, break; } case STMT_ATTR_CURSOR_TYPE: { - unsigned int ival = *(unsigned int *) value; - if (ival > (zend_ulong) CURSOR_TYPE_READ_ONLY) { + unsigned long ival = *(unsigned long *) value; + if (ival > (unsigned long) CURSOR_TYPE_READ_ONLY) { SET_CLIENT_ERROR(stmt->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "Not implemented"); DBG_INF("FAIL"); DBG_RETURN(FAIL); @@ -1909,7 +1909,7 @@ MYSQLND_METHOD(mysqlnd_stmt, attr_set)(MYSQLND_STMT * const s, break; } case STMT_ATTR_PREFETCH_ROWS: { - unsigned int ival = *(unsigned int *) value; + unsigned long ival = *(unsigned long *) value; if (ival == 0) { ival = MYSQLND_DEFAULT_PREFETCH_ROWS; } else if (ival > 1) { @@ -1948,10 +1948,10 @@ MYSQLND_METHOD(mysqlnd_stmt, attr_get)(const MYSQLND_STMT * const s, *(zend_bool *) value= stmt->update_max_length; break; case STMT_ATTR_CURSOR_TYPE: - *(zend_ulong *) value= stmt->flags; + *(unsigned long *) value= stmt->flags; break; case STMT_ATTR_PREFETCH_ROWS: - *(zend_ulong *) value= stmt->prefetch_rows; + *(unsigned long *) value= stmt->prefetch_rows; break; default: DBG_RETURN(FAIL); diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index b7b6770327fb1..6431ccf4e14ba 100644 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -628,7 +628,7 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /* handle MySQL options */ if (driver_options) { zend_long connect_timeout = pdo_attr_lval(driver_options, PDO_ATTR_TIMEOUT, 30); - zend_long local_infile = pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_LOCAL_INFILE, 0); + unsigned int local_infile = (unsigned int) pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_LOCAL_INFILE, 0); zend_string *init_cmd = NULL; #ifndef PDO_USE_MYSQLND zend_string *default_file = NULL, *default_group = NULL; @@ -779,7 +779,7 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options) } else { #if defined(MYSQL_OPT_LOCAL_INFILE) || defined(PDO_USE_MYSQLND) // in case there are no driver options disable 'local infile' explicitly - zend_long local_infile = 0; + unsigned int local_infile = 0; if (mysql_options(H->server, MYSQL_OPT_LOCAL_INFILE, (const char *)&local_infile)) { pdo_mysql_error(dbh); goto cleanup; From e88e9afe952d90ada054634e403be0cebe06d1c9 Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Thu, 16 Apr 2020 11:38:27 +0200 Subject: [PATCH 172/338] Move test to its folder --- ext/com_dotnet/{ => tests}/bug79247.phpt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ext/com_dotnet/{ => tests}/bug79247.phpt (100%) diff --git a/ext/com_dotnet/bug79247.phpt b/ext/com_dotnet/tests/bug79247.phpt similarity index 100% rename from ext/com_dotnet/bug79247.phpt rename to ext/com_dotnet/tests/bug79247.phpt From 00013401ff218058ff621dd681f74d228ecce9bb Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 21 Feb 2020 13:13:36 +0100 Subject: [PATCH 173/338] Allow using prototypes when optimizing arg passing Closes GH-5193. --- ext/opcache/Optimizer/optimize_func_calls.c | 8 ++++++-- ext/opcache/Optimizer/zend_call_graph.c | 6 ++++-- ext/opcache/Optimizer/zend_optimizer.c | 16 +++++++++++----- ext/opcache/Optimizer/zend_optimizer_internal.h | 2 +- 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/ext/opcache/Optimizer/optimize_func_calls.c b/ext/opcache/Optimizer/optimize_func_calls.c index 2894ca89f4d54..309a1401671ae 100644 --- a/ext/opcache/Optimizer/optimize_func_calls.c +++ b/ext/opcache/Optimizer/optimize_func_calls.c @@ -39,6 +39,7 @@ typedef struct _optimizer_call_info { zend_function *func; zend_op *opline; + zend_bool is_prototype; zend_bool try_inline; uint32_t func_arg_num; } optimizer_call_info; @@ -172,9 +173,12 @@ void zend_optimize_func_calls(zend_op_array *op_array, zend_optimizer_ctx *ctx) case ZEND_INIT_METHOD_CALL: case ZEND_INIT_FCALL: case ZEND_NEW: + /* The argument passing optimizations are valid for prototypes as well, + * as inheritance cannot change between ref <-> non-ref arguments. */ call_stack[call].func = zend_optimizer_get_called_func( - ctx->script, op_array, opline); - call_stack[call].try_inline = opline->opcode != ZEND_NEW; + ctx->script, op_array, opline, &call_stack[call].is_prototype); + call_stack[call].try_inline = + !call_stack[call].is_prototype && opline->opcode != ZEND_NEW; /* break missing intentionally */ case ZEND_INIT_DYNAMIC_CALL: case ZEND_INIT_USER_CALL: diff --git a/ext/opcache/Optimizer/zend_call_graph.c b/ext/opcache/Optimizer/zend_call_graph.c index 51b307bf5e175..3b79bc445d538 100644 --- a/ext/opcache/Optimizer/zend_call_graph.c +++ b/ext/opcache/Optimizer/zend_call_graph.c @@ -93,6 +93,7 @@ int zend_analyze_calls(zend_arena **arena, zend_script *script, uint32_t build_f int call = 0; zend_call_info **call_stack; ALLOCA_FLAG(use_heap); + zend_bool is_prototype; call_stack = do_alloca((op_array->last / 2) * sizeof(zend_call_info*), use_heap); call_info = NULL; @@ -103,8 +104,9 @@ int zend_analyze_calls(zend_arena **arena, zend_script *script, uint32_t build_f case ZEND_INIT_STATIC_METHOD_CALL: call_stack[call] = call_info; func = zend_optimizer_get_called_func( - script, op_array, opline); - if (func) { + script, op_array, opline, &is_prototype); + /* TODO: Support prototypes? */ + if (func && !is_prototype) { call_info = zend_arena_calloc(arena, 1, sizeof(zend_call_info) + (sizeof(zend_send_arg_info) * ((int)opline->extended_value - 1))); call_info->caller_op_array = op_array; call_info->caller_init_opline = opline; diff --git a/ext/opcache/Optimizer/zend_optimizer.c b/ext/opcache/Optimizer/zend_optimizer.c index facb238c21cb2..6f896af27ce41 100644 --- a/ext/opcache/Optimizer/zend_optimizer.c +++ b/ext/opcache/Optimizer/zend_optimizer.c @@ -777,8 +777,9 @@ static zend_class_entry *get_class_entry_from_op1( } zend_function *zend_optimizer_get_called_func( - zend_script *script, zend_op_array *op_array, zend_op *opline) + zend_script *script, zend_op_array *op_array, zend_op *opline, zend_bool *is_prototype) { + *is_prototype = 0; switch (opline->opcode) { case ZEND_INIT_FCALL: { @@ -825,7 +826,7 @@ zend_function *zend_optimizer_get_called_func( if (fbc) { zend_bool is_public = (fbc->common.fn_flags & ZEND_ACC_PUBLIC) != 0; zend_bool same_scope = fbc->common.scope == op_array->scope; - if (is_public|| same_scope) { + if (is_public || same_scope) { return fbc; } } @@ -843,10 +844,15 @@ zend_function *zend_optimizer_get_called_func( zend_bool is_private = (fbc->common.fn_flags & ZEND_ACC_PRIVATE) != 0; zend_bool is_final = (fbc->common.fn_flags & ZEND_ACC_FINAL) != 0; zend_bool same_scope = fbc->common.scope == op_array->scope; - if ((is_private && same_scope) - || (is_final && (!is_private || same_scope))) { - return fbc; + if (is_private) { + /* Only use private method if in the same scope. We can't even use it + * as a prototype, as it may be overridden with changed signature. */ + return same_scope ? fbc : NULL; } + /* If the method is non-final, it may be overriden, + * but only with a compatible method signature. */ + *is_prototype = !is_final; + return fbc; } } break; diff --git a/ext/opcache/Optimizer/zend_optimizer_internal.h b/ext/opcache/Optimizer/zend_optimizer_internal.h index 5207e6cb749fa..ed0dac3e1921d 100644 --- a/ext/opcache/Optimizer/zend_optimizer_internal.h +++ b/ext/opcache/Optimizer/zend_optimizer_internal.h @@ -110,7 +110,7 @@ void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx void zend_optimizer_compact_vars(zend_op_array *op_array); int zend_optimizer_is_disabled_func(const char *name, size_t len); zend_function *zend_optimizer_get_called_func( - zend_script *script, zend_op_array *op_array, zend_op *opline); + zend_script *script, zend_op_array *op_array, zend_op *opline, zend_bool *is_prototype); uint32_t zend_optimizer_classify_function(zend_string *name, uint32_t num_args); void zend_optimizer_migrate_jump(zend_op_array *op_array, zend_op *new_opline, zend_op *opline); void zend_optimizer_shift_jump(zend_op_array *op_array, zend_op *opline, uint32_t *shiftlist); From 0b709e3409a1899caa6aaf3a5442e83524e2355c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 16 Apr 2020 11:52:37 +0200 Subject: [PATCH 174/338] Fix bug #79336 Make reading of floats and doubles host-endian independent. --- NEWS | 4 ++++ ext/exif/exif.c | 43 ++++++++++++++++++++++++++++++++++--------- 2 files changed, 38 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index f6dead73f9fd9..9afe0d6734667 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,10 @@ PHP NEWS . Fixed bug #78221 (DOMNode::normalize() doesn't remove empty text nodes). (cmb) +- EXIF: + . Fixed bug #79336 (ext/exif/tests/bug79046.phpt fails on Big endian arch). + (Nikita) + - MBString: . Fixed bug #79441 (Segfault in mb_chr() if internal encoding is unsupported). (Girgias) diff --git a/ext/exif/exif.c b/ext/exif/exif.c index 2dee5cdffe216..31ef1e2dd0fa9 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -1487,7 +1487,7 @@ static signed short php_ifd_get16s(void *value, int motorola_intel) } /* }}} */ -/* {{{ php_ifd_get32s +/* {{{ php_ifd_get32u * Convert a 32 bit unsigned value from file's native byte order */ static unsigned php_ifd_get32u(void *void_value, int motorola_intel) { @@ -1506,6 +1506,33 @@ static unsigned php_ifd_get32u(void *void_value, int motorola_intel) } /* }}} */ +/* {{{ php_ifd_get64u + * Convert a 64 bit unsigned value from file's native byte order */ +static uint64_t php_ifd_get64u(void *void_value, int motorola_intel) +{ + uchar *value = (uchar *) void_value; + if (motorola_intel) { + return ((uint64_t)value[0] << 56) + | ((uint64_t)value[1] << 48) + | ((uint64_t)value[2] << 40) + | ((uint64_t)value[3] << 32) + | ((uint64_t)value[4] << 24) + | ((uint64_t)value[5] << 16) + | ((uint64_t)value[6] << 8 ) + | ((uint64_t)value[7] ); + } else { + return ((uint64_t)value[7] << 56) + | ((uint64_t)value[6] << 48) + | ((uint64_t)value[5] << 40) + | ((uint64_t)value[4] << 32) + | ((uint64_t)value[3] << 24) + | ((uint64_t)value[2] << 16) + | ((uint64_t)value[1] << 8 ) + | ((uint64_t)value[0] ); + } +} +/* }}} */ + /* {{{ php_ifd_get32u * Convert a 32 bit signed value from file's native byte order */ static unsigned php_ifd_get32s(void *value, int motorola_intel) @@ -1547,17 +1574,15 @@ static void php_ifd_set32u(char *data, size_t value, int motorola_intel) /* }}} */ static float php_ifd_get_float(char *data) { - /* Copy to avoid alignment issues */ - float f; - memcpy(&f, data, sizeof(float)); - return f; + union { uint32_t i; float f; } u; + u.i = php_ifd_get32u(data, 0); + return u.f; } static double php_ifd_get_double(char *data) { - /* Copy to avoid alignment issues */ - double f; - memcpy(&f, data, sizeof(double)); - return f; + union { uint64_t i; double f; } u; + u.i = php_ifd_get64u(data, 0); + return u.f; } #ifdef EXIF_DEBUG From 850feffac0b5ae5ad63638fe1577251971c54f7a Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Mon, 13 Apr 2020 00:13:58 +0200 Subject: [PATCH 175/338] Add S390X architecture as a Travis job This gives us a way to compile and test a big endian architecture. Closes GH-5382. --- .travis.yml | 2 ++ travis/compile.sh | 6 ++++++ travis/setup-pgsql.sh | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a3dd87ca0088c..7318269344bbf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -74,6 +74,8 @@ jobs: arch: amd64 - env: ENABLE_ZTS=1 ENABLE_DEBUG=1 SKIP_IO_CAPTURE_TESTS=1 ARM64=1 arch: arm64 + - env: ENABLE_ZTS=1 ENABLE_DEBUG=1 SKIP_IO_CAPTURE_TESTS=1 S390X=1 + arch: s390x before_script: - ccache --version diff --git a/travis/compile.sh b/travis/compile.sh index c1cc3aa04ed73..7af4bb21b0d41 100755 --- a/travis/compile.sh +++ b/travis/compile.sh @@ -9,6 +9,11 @@ if [[ "$ENABLE_DEBUG" == 1 ]]; then else DEBUG=""; fi +if [[ "$S390X" == 1 ]]; then + S390X_CONFIG="--without-pcre-jit"; +else + S390X_CONFIG=""; +fi if [[ -z "$CONFIG_LOG_FILE" ]]; then CONFIG_QUIET="--quiet" @@ -32,6 +37,7 @@ MAKE_JOBS=${MAKE_JOBS:-$(nproc)} $CONFIG_QUIET \ $DEBUG \ $TS \ +$S390X_CONFIG \ --enable-phpdbg \ --enable-fpm \ --with-pdo-mysql=mysqlnd \ diff --git a/travis/setup-pgsql.sh b/travis/setup-pgsql.sh index 91723562653cf..d0929de9f0afd 100755 --- a/travis/setup-pgsql.sh +++ b/travis/setup-pgsql.sh @@ -1,6 +1,6 @@ #!/bin/bash echo ' ' >> "./ext/pgsql/tests/config.inc" -if [ -z "$ARM64" ]; then +if [ -z "$ARM64" -o -z "$S390X"]; then psql -c 'create database test;' -U postgres fi From ea0110f0de79124e298eba7724149b9513845fcb Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 16 Apr 2020 14:35:51 +0300 Subject: [PATCH 176/338] Improve registers reuse --- ext/opcache/jit/zend_jit.c | 12 ++++++++---- ext/opcache/jit/zend_jit_x86.dasc | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index 9f03a118265c5..d360514f3f4f5 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -1391,10 +1391,6 @@ static int zend_jit_try_allocate_free_reg(const zend_op_array *op_array, zend_ss */ available = ZEND_REGSET_DIFFERENCE(available, ZEND_REGSET_PRESERVED); - if (ZEND_REGSET_IS_EMPTY(available)) { - return 0; - } - /* Set freeUntilPos of all physical registers to maxInt */ for (i = 0; i < ZREG_NUM; i++) { freeUntilPos[i] = 0xffffffff; @@ -1432,6 +1428,10 @@ static int zend_jit_try_allocate_free_reg(const zend_op_array *op_array, zend_ss } } + if (hint == ZREG_NONE && ZEND_REGSET_IS_EMPTY(available)) { + return 0; + } + /* See "Linear Scan Register Allocation on SSA Form", Christian Wimmer and Michael Franz, CGO'10 (2010), Figure 6. */ if (current->flags & ZREG_SPLIT) { @@ -1519,6 +1519,10 @@ static int zend_jit_try_allocate_free_reg(const zend_op_array *op_array, zend_ss return 1; } + if (ZEND_REGSET_IS_EMPTY(available)) { + return 0; + } + pos = 0; reg = ZREG_NONE; pos2 = 0; reg2 = ZREG_NONE; low_priority_regs = *hints; diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index bfc2c7e0f73b5..d6e1c27bbd3b9 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -10947,7 +10947,7 @@ static zend_bool zend_jit_verify_return_type(dasm_State **Dst, const zend_op *op static zend_bool zend_jit_may_reuse_reg(const zend_op *opline, const zend_ssa_op *ssa_op, zend_ssa *ssa, int def_var, int use_var) { - if (ssa->var_info[def_var].type != ssa->var_info[use_var].type) { + if ((ssa->var_info[def_var].type & ~MAY_BE_GUARD) != (ssa->var_info[use_var].type & ~MAY_BE_GUARD)) { return 0; } From add8c15a317fc591e26f645989f03cd24d895b9c Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Thu, 16 Apr 2020 11:26:54 +0200 Subject: [PATCH 177/338] Align magic methods' camelCase with documentation Closes GH-5398 --- Zend/tests/magic_methods_010.phpt | 2 +- Zend/zend_API.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Zend/tests/magic_methods_010.phpt b/Zend/tests/magic_methods_010.phpt index 6118bda67b56e..4c939d3faa192 100644 --- a/Zend/tests/magic_methods_010.phpt +++ b/Zend/tests/magic_methods_010.phpt @@ -12,4 +12,4 @@ class a { --EXPECTF-- Warning: The magic method a::__toString() must have public visibility and cannot be static in %s on line %d -Fatal error: Method a::__tostring() cannot take arguments in %s on line %d +Fatal error: Method a::__toString() cannot take arguments in %s on line %d diff --git a/Zend/zend_API.c b/Zend/zend_API.c index ea78c22a463c3..6d23b3437295c 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2019,10 +2019,10 @@ ZEND_API void zend_check_magic_method_implementation(const zend_class_entry *ce, } else if (name_len == sizeof(ZEND_TOSTRING_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_TOSTRING_FUNC_NAME, sizeof(ZEND_TOSTRING_FUNC_NAME)-1) && fptr->common.num_args != 0 ) { - zend_error(error_type, "Method %s::%s() cannot take arguments", ZSTR_VAL(ce->name), ZEND_TOSTRING_FUNC_NAME); + zend_error(error_type, "Method %s::__toString() cannot take arguments", ZSTR_VAL(ce->name)); } else if (name_len == sizeof(ZEND_DEBUGINFO_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_DEBUGINFO_FUNC_NAME, sizeof(ZEND_DEBUGINFO_FUNC_NAME)-1) && fptr->common.num_args != 0) { - zend_error(error_type, "Method %s::%s() cannot take arguments", ZSTR_VAL(ce->name), ZEND_DEBUGINFO_FUNC_NAME); + zend_error(error_type, "Method %s::__debugInfo() cannot take arguments", ZSTR_VAL(ce->name)); } } /* }}} */ From 7a260a4a1c14ab193414b947fe8df93cdefa9d32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Thu, 16 Apr 2020 18:56:23 +0200 Subject: [PATCH 178/338] Revert unintended test change --- ext/standard/tests/network/bug73594.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/standard/tests/network/bug73594.phpt b/ext/standard/tests/network/bug73594.phpt index 79607cacec0cd..370b6162fde9e 100644 --- a/ext/standard/tests/network/bug73594.phpt +++ b/ext/standard/tests/network/bug73594.phpt @@ -24,4 +24,4 @@ $res = dns_get_record('php.net', DNS_MX, $auth, $additional); var_dump(!empty($res) && empty($additional)); ?> --EXPECT-- -bool(true) +bool(false) From a1eaaa692e91fa28ee1ba050150547cd1317be87 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 17 Apr 2020 09:48:15 +0200 Subject: [PATCH 179/338] Fix #79475: [JIT] func_get_args() assertion violation `func_get_args()` may return `zend_empty_array`, which has refcount 2 to enforce separation. We have to cater to that during type inference so that the optimization in the JIT macro `SEPARATE_ARRAY` doesn't prevent the separation. --- ext/opcache/Optimizer/zend_func_info.c | 2 +- ext/opcache/Optimizer/zend_inference.c | 2 +- ext/opcache/tests/bug79475.phpt | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 ext/opcache/tests/bug79475.phpt diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index 7cde2dd34f1f5..c9c567ffbfe34 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -93,7 +93,7 @@ static const func_info_t func_infos[] = { /* zend */ F1("zend_version", MAY_BE_STRING), FN("func_get_arg", UNKNOWN_INFO), - F1("func_get_args", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ANY), + FN("func_get_args", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ANY), F1("get_class_vars", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF), FN("get_object_vars", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF), FN("get_mangled_object_vars", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF), diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c index 8144185d07166..f868f78265d64 100644 --- a/ext/opcache/Optimizer/zend_inference.c +++ b/ext/opcache/Optimizer/zend_inference.c @@ -3465,7 +3465,7 @@ static zend_always_inline int _zend_update_type_info( UPDATE_SSA_TYPE(MAY_BE_LONG, ssa_op->result_def); break; case ZEND_FUNC_GET_ARGS: - UPDATE_SSA_TYPE(MAY_BE_RC1| MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ANY, ssa_op->result_def); + UPDATE_SSA_TYPE(MAY_BE_RC1|MAY_BE_RCN| MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ANY, ssa_op->result_def); break; case ZEND_GET_CLASS: case ZEND_GET_CALLED_CLASS: diff --git a/ext/opcache/tests/bug79475.phpt b/ext/opcache/tests/bug79475.phpt new file mode 100644 index 0000000000000..6f536c25f0d3d --- /dev/null +++ b/ext/opcache/tests/bug79475.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #79475 ([JIT] func_get_args() assertion violation) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +done From d31ccb5fc8a0f6f5fded085ee170c8bd99eb83e7 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 17 Apr 2020 14:55:14 +0300 Subject: [PATCH 180/338] zend_timeout() may access EX(opline) --- Zend/zend_vm_def.h | 2 +- Zend/zend_vm_execute.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index fbd79019e7629..9c46476b6add1 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -8879,10 +8879,10 @@ ZEND_VM_DEFINE_OP(137, ZEND_OP_DATA); ZEND_VM_HELPER(zend_interrupt_helper, ANY, ANY) { EG(vm_interrupt) = 0; + SAVE_OPLINE(); if (EG(timed_out)) { zend_timeout(0); } else if (zend_interrupt_function) { - SAVE_OPLINE(); zend_interrupt_function(execute_data); ZEND_VM_ENTER(); } diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 33518478c32e9..a84cfe3d4bb3f 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -2054,10 +2054,10 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMP_FORWARD_SPEC_H static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_interrupt_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS) { EG(vm_interrupt) = 0; + SAVE_OPLINE(); if (EG(timed_out)) { zend_timeout(0); } else if (zend_interrupt_function) { - SAVE_OPLINE(); zend_interrupt_function(execute_data); ZEND_VM_ENTER(); } From 7574823911cc0407e4ed6209bccf3908afd4c46f Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 17 Apr 2020 14:17:14 +0200 Subject: [PATCH 181/338] Enable JIT for AppVeyor CI This is not supposed to bring any test performance optimization, but allows us to test basic JIT functionality on Windows. --- appveyor/test_task.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor/test_task.bat b/appveyor/test_task.bat index dccdde4e822bf..9a4913c2dfad2 100644 --- a/appveyor/test_task.bat +++ b/appveyor/test_task.bat @@ -63,7 +63,7 @@ set OPENSSL_CONF= rem set SSLEAY_CONF= rem prepare for Opcache -if "%OPCACHE%" equ "1" set OPCACHE_OPTS=-d opcache.enable=1 -d opcache.enable_cli=1 -d opcache.protect_memory=1 +if "%OPCACHE%" equ "1" set OPCACHE_OPTS=-d opcache.enable=1 -d opcache.enable_cli=1 -d opcache.protect_memory=1 -d opcache.jit_buffer_size=16M rem prepare for enchant mkdir c:\enchant_plugins From 7352213b386658d5dc987cdf5c975fdf5c0bd563 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 17 Apr 2020 14:23:31 +0200 Subject: [PATCH 182/338] Early return if variadic type check fails Don't check all the remaining arguments after one check failed. I don't think this makes an observable behavior difference, because we already suppress duplicate exceptions in argument type error reporting. --- Zend/zend_hash.h | 6 +++++- Zend/zend_vm_def.h | 6 +++++- Zend/zend_vm_execute.h | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index 4d3fffd59622d..289b9a3349d46 100644 --- a/Zend/zend_hash.h +++ b/Zend/zend_hash.h @@ -1112,13 +1112,17 @@ static zend_always_inline void *zend_hash_get_current_data_ptr_ex(HashTable *ht, ZEND_HASH_FILL_NEXT(); \ } while (0) -#define ZEND_HASH_FILL_END() \ +#define ZEND_HASH_FILL_FINISH() do { \ __fill_ht->nNumUsed = __fill_idx; \ __fill_ht->nNumOfElements = __fill_idx; \ __fill_ht->nNextFreeElement = __fill_idx; \ __fill_ht->nInternalPointer = 0; \ } while (0) +#define ZEND_HASH_FILL_END() \ + ZEND_HASH_FILL_FINISH(); \ + } while (0) + static zend_always_inline zval *_zend_hash_append_ex(HashTable *ht, zend_string *key, zval *zv, int interned) { uint32_t idx = ht->nNumUsed++; diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 342034451794e..0797322a86d38 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -5162,7 +5162,11 @@ ZEND_VM_HANDLER(164, ZEND_RECV_VARIADIC, NUM, UNUSED, CACHE_SLOT) 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_variadic_arg_type(EX(func), arg_num, param, CACHE_ADDR(opline->extended_value)); + if (UNEXPECTED(!zend_verify_variadic_arg_type(EX(func), arg_num, param, CACHE_ADDR(opline->extended_value)))) { + ZEND_HASH_FILL_FINISH(); + HANDLE_EXCEPTION(); + } + if (Z_OPT_REFCOUNTED_P(param)) Z_ADDREF_P(param); ZEND_HASH_FILL_ADD(param); param++; diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 46b23f3839a17..33e97f2b0489f 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -3134,7 +3134,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RECV_VARIADIC_SPEC_UNUSED_HAND 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_variadic_arg_type(EX(func), arg_num, param, CACHE_ADDR(opline->extended_value)); + if (UNEXPECTED(!zend_verify_variadic_arg_type(EX(func), arg_num, param, CACHE_ADDR(opline->extended_value)))) { + ZEND_HASH_FILL_FINISH(); + HANDLE_EXCEPTION(); + } + if (Z_OPT_REFCOUNTED_P(param)) Z_ADDREF_P(param); ZEND_HASH_FILL_ADD(param); param++; From 08c5c69eff6f0110b373c55ee2246591d14cc82b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 17 Apr 2020 15:31:57 +0200 Subject: [PATCH 183/338] Remove ZEND_ACC_DTOR flag This is only used in reflection, where doing a simple string check is acceptable. I'm also dropping the "dtor" printing in the reflection dump. Dtors are just one of many magic methods, I don't think there's a point in explicitly highlighting them, when the name is already unambiguous. --- Zend/zend_API.c | 1 - Zend/zend_compile.c | 1 - Zend/zend_compile.h | 5 +---- ext/reflection/php_reflection.c | 8 +++----- ext/reflection/tests/ReflectionMethod_basic2.phpt | 2 +- 5 files changed, 5 insertions(+), 12 deletions(-) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 6d23b3437295c..7ec8806d18351 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2286,7 +2286,6 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio } } if (dtor) { - dtor->common.fn_flags |= ZEND_ACC_DTOR; if (dtor->common.fn_flags & ZEND_ACC_STATIC) { zend_error(error_type, "Destructor %s::%s() cannot be static", ZSTR_VAL(scope->name), ZSTR_VAL(dtor->common.function_name)); } diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index bb9b42fee650f..2e30295980c4f 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -6720,7 +6720,6 @@ zend_op *zend_compile_class_decl(zend_ast *ast, zend_bool toplevel) /* {{{ */ } } if (ce->destructor) { - ce->destructor->common.fn_flags |= ZEND_ACC_DTOR; if (ce->destructor->common.fn_flags & ZEND_ACC_STATIC) { zend_error_noreturn(E_COMPILE_ERROR, "Destructor %s::%s() cannot be static", ZSTR_VAL(ce->name), ZSTR_VAL(ce->destructor->common.function_name)); diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index b925c809db2e2..8631747c06300 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -275,7 +275,7 @@ typedef struct _zend_oparray_context { /* Whether this class was used in its unlinked state. | | | */ #define ZEND_ACC_HAS_UNLINKED_USES (1 << 23) /* X | | | */ /* | | | */ -/* Function Flags (unused: 17, 23, 26) | | | */ +/* Function Flags (unused: 17, 23, 26, 29) | | | */ /* ============== | | | */ /* | | | */ /* deprecation flag | | | */ @@ -328,9 +328,6 @@ typedef struct _zend_oparray_context { /* functions is a constructor | | | */ #define ZEND_ACC_CTOR (1 << 28) /* | X | | */ /* | | | */ -/* function is a destructor | | | */ -#define ZEND_ACC_DTOR (1 << 29) /* | X | | */ -/* | | | */ /* closure uses $this | | | */ #define ZEND_ACC_USES_THIS (1 << 30) /* | X | | */ /* | | | */ diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index e23f0076a9662..552913dd1ef02 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -767,9 +767,6 @@ static void _function_string(smart_str *str, zend_function *fptr, zend_class_ent if (fptr->common.fn_flags & ZEND_ACC_CTOR) { smart_str_appends(str, ", ctor"); } - if (fptr->common.fn_flags & ZEND_ACC_DTOR) { - smart_str_appends(str, ", dtor"); - } smart_str_appends(str, "> "); if (fptr->common.fn_flags & ZEND_ACC_ABSTRACT) { @@ -3341,7 +3338,7 @@ ZEND_METHOD(ReflectionMethod, isConstructor) /* }}} */ /* {{{ proto public bool ReflectionMethod::isDestructor() - Returns whether this method is static */ + Returns whether this method is a destructor */ ZEND_METHOD(ReflectionMethod, isDestructor) { reflection_object *intern; @@ -3351,7 +3348,8 @@ ZEND_METHOD(ReflectionMethod, isDestructor) RETURN_THROWS(); } GET_REFLECTION_OBJECT_PTR(mptr); - RETURN_BOOL(mptr->common.fn_flags & ZEND_ACC_DTOR); + RETURN_BOOL(zend_string_equals_literal_ci( + mptr->common.function_name, ZEND_DESTRUCTOR_FUNC_NAME)); } /* }}} */ diff --git a/ext/reflection/tests/ReflectionMethod_basic2.phpt b/ext/reflection/tests/ReflectionMethod_basic2.phpt index f7d4b9f4d6e9a..7af5e84ea9105 100644 --- a/ext/reflection/tests/ReflectionMethod_basic2.phpt +++ b/ext/reflection/tests/ReflectionMethod_basic2.phpt @@ -126,7 +126,7 @@ string(%d) "Method [ public method __construct ] { Reflecting on method TestClass::__destruct() __toString(): -string(%d) "Method [ public method __destruct ] { +string(%d) "Method [ public method __destruct ] { @@ %s 28 - 28 } " From 2a4c81f1ee12fc0fdb31a194d37d382d096bee26 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 15 Apr 2020 01:22:10 +0200 Subject: [PATCH 184/338] Fix [-Wjump-misses-init] in php_mbregex.c by adding an inner scope --- ext/mbstring/php_mbregex.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index cbbe3532f0aed..43855545d7322 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -768,6 +768,7 @@ static inline void mb_regex_substitute( p++; break; case 'k': + { clen = (int) php_mb_mbchar_bytes_ex(++p, enc); if (clen != 1 || p == eos || (p[0] != '<' && p[0] != '\'')) { /* not a backref delimiter */ @@ -817,6 +818,7 @@ static inline void mb_regex_substitute( } no = onig_name_to_backref_number(regexp, (OnigUChar *)name, (OnigUChar *)name_end, regs); break; + } default: /* We're not treating \ as an escape character and will interpret something like * \\1 as \ followed by \1, rather than \\ followed by 1. This is because this From 9f8eb9d515bade9c76f5febf32341f3ced34cb7e Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 15 Apr 2020 01:26:24 +0200 Subject: [PATCH 185/338] Fix [-Wjump-misses-init] in sockets extension --- ext/sockets/multicast.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/sockets/multicast.c b/ext/sockets/multicast.c index 9c2ede219dd9c..663d6440704e5 100644 --- a/ext/sockets/multicast.c +++ b/ext/sockets/multicast.c @@ -157,11 +157,11 @@ static int php_do_mcast_opt(php_socket *php_sock, int level, int optname, zval * goto mcast_req_fun; case PHP_MCAST_LEAVE_GROUP: { + mcast_req_fun = &php_mcast_leave; +mcast_req_fun: ; php_sockaddr_storage group = {0}; socklen_t glen; - mcast_req_fun = &php_mcast_leave; -mcast_req_fun: convert_to_array_ex(arg4); opt_ht = Z_ARRVAL_P(arg4); @@ -191,13 +191,13 @@ static int php_do_mcast_opt(php_socket *php_sock, int level, int optname, zval * goto mcast_sreq_fun; case PHP_MCAST_LEAVE_SOURCE_GROUP: { + mcast_sreq_fun = &php_mcast_leave_source; + mcast_sreq_fun: ; php_sockaddr_storage group = {0}, source = {0}; socklen_t glen, slen; - mcast_sreq_fun = &php_mcast_leave_source; - mcast_sreq_fun: convert_to_array_ex(arg4); opt_ht = Z_ARRVAL_P(arg4); From 925679b057a66a94916d29f63143eb8cc35d61dc Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 15 Apr 2020 01:28:19 +0200 Subject: [PATCH 186/338] Fix [-Wjump-misses-init] in spl_directory.c by adding an inner scope --- ext/spl/spl_directory.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index af7185ac7113b..2472f555a9999 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -516,6 +516,7 @@ static spl_filesystem_object *spl_filesystem_object_create_type(int num_args, sp } break; case SPL_FS_FILE: + { ce = ce ? ce : source->file_class; if (UNEXPECTED(zend_update_class_constants(ce) != SUCCESS)) { @@ -563,6 +564,7 @@ static spl_filesystem_object *spl_filesystem_object_create_type(int num_args, sp } } break; + } case SPL_FS_DIR: zend_restore_error_handling(&error_handling); zend_throw_exception_ex(spl_ce_RuntimeException, 0, "Operation not supported"); From 594287a7369087e74feed88163e1803e77e6e78a Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 15 Apr 2020 02:20:13 +0200 Subject: [PATCH 187/338] Fix [-Wjump-misses-init] warning in MySQL new driver extension --- ext/mysqlnd/mysqlnd_protocol_frame_codec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/mysqlnd/mysqlnd_protocol_frame_codec.c b/ext/mysqlnd/mysqlnd_protocol_frame_codec.c index cdea2a007f717..6997ed9b26374 100644 --- a/ext/mysqlnd/mysqlnd_protocol_frame_codec.c +++ b/ext/mysqlnd/mysqlnd_protocol_frame_codec.c @@ -368,7 +368,8 @@ MYSQLND_METHOD(mysqlnd_pfc, set_client_option)(MYSQLND_PFC * const pfc, enum_mys } pfc->data->sha256_server_public_key = value? mnd_pestrdup(value, pers) : NULL; break; - case MYSQLND_OPT_NET_CMD_BUFFER_SIZE: + } + case MYSQLND_OPT_NET_CMD_BUFFER_SIZE: { DBG_INF("MYSQLND_OPT_NET_CMD_BUFFER_SIZE"); if (*(unsigned int*) value < MYSQLND_NET_CMD_BUFFER_MIN_SIZE) { DBG_RETURN(FAIL); From 826a7456717b8fab22d43deedf7b6ab1b1f426be Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Tue, 14 Apr 2020 23:39:23 +0200 Subject: [PATCH 188/338] Fix [-Wjump-misses-init] in generated zend_opcode.c --- Zend/zend_opcode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index 49dedf5f963e4..0dd42f8e6e1ba 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -682,7 +682,8 @@ static void emit_live_range( /* Trivial live-range, no need to store it. */ return; } - /* break missing intentionally */ + } + /* explicit fallthrough */ default: start++; kind = ZEND_LIVE_TMPVAR; @@ -693,7 +694,6 @@ static void emit_live_range( return; } break; - } case ZEND_COPY_TMP: { /* COPY_TMP has a split live-range: One from the definition until the use in From ec88bbc4c621b385e79b1475606883a5834403a5 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Wed, 15 Apr 2020 15:58:03 +0200 Subject: [PATCH 189/338] Enhance test failure SH script to allow gdb, valgrind, rr as alternative modes. --- run-tests.php | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/run-tests.php b/run-tests.php index 822850af71b7b..b708f73c72b8a 100755 --- a/run-tests.php +++ b/run-tests.php @@ -2748,10 +2748,24 @@ function run_test($php, $file, $env) } // write .sh - if (strpos($log_format, 'S') !== false && file_put_contents($sh_filename, "#!/bin/sh - -{$cmd} -", FILE_BINARY) === false) { + if (strpos($log_format, 'S') !== false && file_put_contents($sh_filename, << Date: Sun, 19 Apr 2020 15:53:06 +0200 Subject: [PATCH 190/338] [skip ci] Fix comment in Tidy autoconf file --- ext/tidy/config.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/tidy/config.m4 b/ext/tidy/config.m4 index 56f1bb3009be8..bc0976a1dd9b3 100644 --- a/ext/tidy/config.m4 +++ b/ext/tidy/config.m4 @@ -65,7 +65,7 @@ if test "$PHP_TIDY" != "no"; then PHP_ADD_LIBRARY_WITH_PATH($TIDY_LIB_NAME, $TIDY_LIBDIR, TIDY_SHARED_LIBADD) PHP_ADD_INCLUDE($TIDY_INCDIR) - dnl Add -Wno-empty-body as this is an issue upstream + dnl Add -Wno-ignored-qualifiers as this is an issue upstream TIDY_COMPILER_FLAGS="$TIDY_CFLAGS -Wno-ignored-qualifiers -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1" PHP_NEW_EXTENSION(tidy, tidy.c, $ext_shared,, $TIDY_COMPILER_FLAGS) PHP_SUBST(TIDY_SHARED_LIBADD) From 4e1219ac88a2a4e0dd939c910889bfd88608e4ff Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Sat, 18 Apr 2020 12:12:35 -0400 Subject: [PATCH 191/338] [skip ci] Fix typos in jit code comments And in Opcache's zend_cfg.h Closes GH-5414 --- ext/opcache/Optimizer/zend_cfg.h | 4 ++-- ext/opcache/jit/zend_jit.c | 12 ++++++------ ext/opcache/jit/zend_jit_x86.dasc | 24 ++++++++++++------------ 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ext/opcache/Optimizer/zend_cfg.h b/ext/opcache/Optimizer/zend_cfg.h index 51e2e63b4bcc6..eb607c83c2f4c 100644 --- a/ext/opcache/Optimizer/zend_cfg.h +++ b/ext/opcache/Optimizer/zend_cfg.h @@ -19,8 +19,8 @@ #ifndef ZEND_CFG_H #define ZEND_CFG_H -/* zend_basic_bloc.flags */ -#define ZEND_BB_START (1<<0) /* fist block */ +/* zend_basic_block.flags */ +#define ZEND_BB_START (1<<0) /* first block */ #define ZEND_BB_FOLLOW (1<<1) /* follows the next block */ #define ZEND_BB_TARGET (1<<2) /* jump target */ #define ZEND_BB_EXIT (1<<3) /* without successors */ diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index d360514f3f4f5..838795856f7bd 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -1241,7 +1241,7 @@ static int zend_jit_compute_liveness(const zend_op_array *op_array, zend_ssa *ss if (ssa->vars[src].definition_phi && ssa->vars[src].definition_phi->pi >= 0 && phi->block == ssa->vars[src].definition_phi->block) { - /* Skip zero-lenght interval for Pi variable */ + /* Skip zero-length interval for Pi variable */ src = ssa->vars[src].definition_phi->sources[0]; } if (intervals[src]) { @@ -1387,7 +1387,7 @@ static int zend_jit_try_allocate_free_reg(const zend_op_array *op_array, zend_ss } /* TODO: Allow usage of preserved registers ??? - * Their values have to be stored in prologuee and restored in epilogue + * Their values have to be stored in prologue and restored in epilogue */ available = ZEND_REGSET_DIFFERENCE(available, ZEND_REGSET_PRESERVED); @@ -1482,7 +1482,7 @@ static int zend_jit_try_allocate_free_reg(const zend_op_array *op_array, zend_ss } while (range); #if 0 - /* Coalesing */ + /* Coalescing */ if (ssa->vars[current->ssa_var].definition == current->start) { zend_op *opline = op_array->opcodes + current->start; int hint = -1; @@ -1565,7 +1565,7 @@ static int zend_jit_try_allocate_free_reg(const zend_op_array *op_array, zend_ss } return 1; #if 0 - // TODO: allow low prioirity register usage + // TODO: allow low priority register usage } else if (reg2 != ZREG_NONE && zend_interval_end(current) < pos2) { /* register available for the whole interval */ current->reg = reg2; @@ -1840,7 +1840,7 @@ static zend_lifetime_interval** zend_jit_allocate_registers(const zend_op_array if (ssa->vars[src].definition_phi && ssa->vars[src].definition_phi->pi >= 0 && phi->block == ssa->vars[src].definition_phi->block) { - /* Skip zero-lenght interval for Pi variable */ + /* Skip zero-length interval for Pi variable */ src = ssa->vars[src].definition_phi->sources[0]; } if (intervals[i]) { @@ -1864,7 +1864,7 @@ static zend_lifetime_interval** zend_jit_allocate_registers(const zend_op_array if (ssa->vars[src].definition_phi && ssa->vars[src].definition_phi->pi >= 0 && phi->block == ssa->vars[src].definition_phi->block) { - /* Skip zero-lenght interval for Pi variable */ + /* Skip zero-length interval for Pi variable */ src = ssa->vars[src].definition_phi->sources[0]; } if (intervals[src]) { diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index d6e1c27bbd3b9..3fd7d4e83fded 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -27,7 +27,7 @@ |.define FP, r14 |.define IP, r15 |.define IPl, r15d - |.define RX, r15 // the same as VM IP reused as a general purpos reg + |.define RX, r15 // the same as VM IP reused as a general purpose reg |.define CARG1, rcx // x64/POSIX C call arguments. |.define CARG2, rdx |.define CARG3, r8 @@ -51,7 +51,7 @@ |.define FP, r14 |.define IP, r15 |.define IPl, r15d - |.define RX, r15 // the same as VM IP reused as a general purpos reg + |.define RX, r15 // the same as VM IP reused as a general purpose reg |.define CARG1, rdi // x64/POSIX C call arguments. |.define CARG2, rsi |.define CARG3, rdx @@ -77,7 +77,7 @@ |.define FP, esi |.define IP, edi |.define IPl, edi - |.define RX, edi // the same as VM IP reused as a general purpos reg + |.define RX, edi // the same as VM IP reused as a general purpose reg |.define FCARG1a, ecx // x86 fastcall arguments. |.define FCARG2a, edx |.define FCARG1d, ecx @@ -286,7 +286,7 @@ static void* dasm_labels[zend_lb_MAX]; /* In 64-bit build we compare only low 32-bits. * x86_64 cmp instruction doesn't support immediate 64-bit operand, and full - * comparison would require additinal load of 64-bit address into register. + * comparison would require an additional load of 64-bit address into register. * This is not a problem at all, while JIT buffer size is less than 4GB. */ |.macro CMP_IP, addr @@ -2382,7 +2382,7 @@ static int zend_jit_trace_exit_stub(dasm_State **Dst) |.else | add r4, 8*4+8*8 /* CPU regs + SSE regs */ |.endif - | // execute_data = EG(current_excute_data) + | // execute_data = EG(current_execute_data) | MEM_OP2_2_ZTS mov, FP, aword, executor_globals, current_execute_data, r0 | test eax, eax | jl ->trace_halt @@ -7969,7 +7969,7 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend } } if (!func) { - /* resolve function ar run time */ + /* resolve function at run time */ } else if (func->type == ZEND_USER_FUNCTION) { ZEND_ASSERT(opline->opcode != ZEND_DO_ICALL); call_num_args = call_info->num_args; @@ -7978,7 +7978,7 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend call_num_args = call_info->num_args; #if ZEND_DEBUG if (func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) { - // TODO: Mow most internal functions have type hints ??? + // TODO: Now most internal functions have type hints ??? if (!trace) { goto fallback; } @@ -8391,7 +8391,7 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend } if (trace) { - // TODO: This is a qucik dirty fix ?????? + // TODO: This is a quick dirty fix ?????? // // Internal function may call another trace that, // replaces EG(trace_id) and the following side exit @@ -10298,7 +10298,7 @@ static uint32_t zend_get_known_property_offset(zend_class_entry *ce, zend_string } if (ce->info.user.filename != filename) { - /* class declaration might be changed infdependently */ + /* class declaration might be changed independently */ return ZEND_WRONG_PROPERTY_OFFSET; } @@ -10309,7 +10309,7 @@ static uint32_t zend_get_known_property_offset(zend_class_entry *ce, zend_string if (parent->type == ZEND_INTERNAL_CLASS) { break; } else if (parent->info.user.filename != filename) { - /* some of parents class declarations might be changed infdependently */ + /* some of parents class declarations might be changed independently */ /* TODO: this check may be not enough, because even * in the same it's possible to conditionally define * few classes with the same name, and "parent" may @@ -10345,7 +10345,7 @@ static zend_bool zend_may_be_dynamic_property(zend_class_entry *ce, zend_string } if (ce->info.user.filename != filename) { - /* class declaration might be changed infdependently */ + /* class declaration might be changed independently */ return 1; } @@ -11052,7 +11052,7 @@ static zend_bool zend_jit_var_supports_reg(zend_ssa *ssa, int var) if (zend_jit_reg_alloc < ZEND_JIT_REG_ALLOC_GLOBAL) { /* Disable global register allocation, - * register allocation forSAA variables connected through Phi functions + * register allocation for SSA variables connected through Phi functions */ if (ssa->vars[var].definition_phi) { return 0; From 928b25cd6e6a6c6f039b22e7ff55c1a67339256c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sun, 19 Apr 2020 18:34:37 +0200 Subject: [PATCH 192/338] Generate function entries from stubs for mysqli Closes GH-5420 --- ext/mysqli/config.m4 | 2 +- ext/mysqli/config.w32 | 1 - ext/mysqli/mysqli.c | 15 +- ext/mysqli/mysqli.stub.php | 550 ++++++++++++++++++++-------- ext/mysqli/mysqli_arginfo.h | 410 ++++++++++++++++++++- ext/mysqli/mysqli_driver.c | 7 - ext/mysqli/mysqli_exception.c | 7 - ext/mysqli/mysqli_fe.c | 295 --------------- ext/mysqli/mysqli_fe.h | 135 ------- ext/mysqli/mysqli_warning.c | 10 - ext/mysqli/mysqli_warning.stub.php | 9 - ext/mysqli/mysqli_warning_arginfo.h | 8 - 12 files changed, 811 insertions(+), 638 deletions(-) delete mode 100644 ext/mysqli/mysqli_fe.c delete mode 100644 ext/mysqli/mysqli_fe.h delete mode 100644 ext/mysqli/mysqli_warning.stub.php delete mode 100644 ext/mysqli/mysqli_warning_arginfo.h diff --git a/ext/mysqli/config.m4 b/ext/mysqli/config.m4 index 4f011adf8d2ee..c38f013583da7 100644 --- a/ext/mysqli/config.m4 +++ b/ext/mysqli/config.m4 @@ -107,7 +107,7 @@ if test "$PHP_MYSQLI" != "no"; then fi mysqli_sources="mysqli.c mysqli_api.c mysqli_prop.c mysqli_nonapi.c \ - mysqli_fe.c mysqli_report.c mysqli_driver.c mysqli_warning.c \ + mysqli_report.c mysqli_driver.c mysqli_warning.c \ mysqli_exception.c mysqli_result_iterator.c" PHP_NEW_EXTENSION(mysqli, $mysqli_sources, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) PHP_SUBST(MYSQLI_SHARED_LIBADD) diff --git a/ext/mysqli/config.w32 b/ext/mysqli/config.w32 index bd76923c0c7d3..ed6f2be7e7f26 100644 --- a/ext/mysqli/config.w32 +++ b/ext/mysqli/config.w32 @@ -13,7 +13,6 @@ if (PHP_MYSQLI != "no") { "mysqli_api.c " + "mysqli_driver.c " + "mysqli_exception.c " + - "mysqli_fe.c " + "mysqli_nonapi.c " + "mysqli_prop.c " + "mysqli_result_iterator.c " + diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index 5d5413a5936c5..85ed67627f88c 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -32,6 +32,7 @@ #include "zend_exceptions.h" #include "ext/spl/spl_exceptions.h" #include "zend_interfaces.h" +#include "mysqli_arginfo.h" ZEND_DECLARE_MODULE_GLOBALS(mysqli) static PHP_GINIT_FUNCTION(mysqli); @@ -572,13 +573,13 @@ PHP_MINIT_FUNCTION(mysqli) le_pmysqli = zend_register_list_destructors_ex(NULL, php_mysqli_dtor, "MySqli persistent connection", module_number); - INIT_CLASS_ENTRY(cex, "mysqli_sql_exception", mysqli_exception_methods); + INIT_CLASS_ENTRY(cex, "mysqli_sql_exception", class_mysqli_sql_exception_methods); mysqli_exception_class_entry = zend_register_internal_class_ex(&cex, spl_ce_RuntimeException); mysqli_exception_class_entry->ce_flags |= ZEND_ACC_FINAL; zend_declare_property_long(mysqli_exception_class_entry, "code", sizeof("code")-1, 0, ZEND_ACC_PROTECTED); zend_declare_property_string(mysqli_exception_class_entry, "sqlstate", sizeof("sqlstate")-1, "00000", ZEND_ACC_PROTECTED); - REGISTER_MYSQLI_CLASS_ENTRY("mysqli_driver", mysqli_driver_class_entry, mysqli_driver_methods); + REGISTER_MYSQLI_CLASS_ENTRY("mysqli_driver", mysqli_driver_class_entry, class_mysqli_driver_methods); ce = mysqli_driver_class_entry; zend_hash_init(&mysqli_driver_properties, 0, NULL, free_prop_handler, 1); MYSQLI_ADD_PROPERTIES(&mysqli_driver_properties, mysqli_driver_property_entries); @@ -591,7 +592,7 @@ PHP_MINIT_FUNCTION(mysqli) ce->ce_flags |= ZEND_ACC_FINAL; zend_hash_add_ptr(&classes, ce->name, &mysqli_driver_properties); - REGISTER_MYSQLI_CLASS_ENTRY("mysqli", mysqli_link_class_entry, mysqli_link_methods); + REGISTER_MYSQLI_CLASS_ENTRY("mysqli", mysqli_link_class_entry, class_mysqli_methods); ce = mysqli_link_class_entry; zend_hash_init(&mysqli_link_properties, 0, NULL, free_prop_handler, 1); MYSQLI_ADD_PROPERTIES(&mysqli_link_properties, mysqli_link_property_entries); @@ -615,7 +616,7 @@ PHP_MINIT_FUNCTION(mysqli) zend_declare_property_null(ce, "warning_count", sizeof("warning_count") - 1, ZEND_ACC_PUBLIC); zend_hash_add_ptr(&classes, ce->name, &mysqli_link_properties); - REGISTER_MYSQLI_CLASS_ENTRY("mysqli_warning", mysqli_warning_class_entry, mysqli_warning_methods); + REGISTER_MYSQLI_CLASS_ENTRY("mysqli_warning", mysqli_warning_class_entry, class_mysqli_warning_methods); ce = mysqli_warning_class_entry; ce->ce_flags |= ZEND_ACC_FINAL; zend_hash_init(&mysqli_warning_properties, 0, NULL, free_prop_handler, 1); @@ -625,7 +626,7 @@ PHP_MINIT_FUNCTION(mysqli) zend_declare_property_null(ce, "errno", sizeof("errno") - 1, ZEND_ACC_PUBLIC); zend_hash_add_ptr(&classes, ce->name, &mysqli_warning_properties); - REGISTER_MYSQLI_CLASS_ENTRY("mysqli_result", mysqli_result_class_entry, mysqli_result_methods); + REGISTER_MYSQLI_CLASS_ENTRY("mysqli_result", mysqli_result_class_entry, class_mysqli_result_methods); ce = mysqli_result_class_entry; zend_hash_init(&mysqli_result_properties, 0, NULL, free_prop_handler, 1); MYSQLI_ADD_PROPERTIES(&mysqli_result_properties, mysqli_result_property_entries); @@ -638,7 +639,7 @@ PHP_MINIT_FUNCTION(mysqli) zend_class_implements(mysqli_result_class_entry, 1, zend_ce_traversable); zend_hash_add_ptr(&classes, ce->name, &mysqli_result_properties); - REGISTER_MYSQLI_CLASS_ENTRY("mysqli_stmt", mysqli_stmt_class_entry, mysqli_stmt_methods); + REGISTER_MYSQLI_CLASS_ENTRY("mysqli_stmt", mysqli_stmt_class_entry, class_mysqli_stmt_methods); ce = mysqli_stmt_class_entry; zend_hash_init(&mysqli_stmt_properties, 0, NULL, free_prop_handler, 1); MYSQLI_ADD_PROPERTIES(&mysqli_stmt_properties, mysqli_stmt_property_entries); @@ -975,7 +976,7 @@ zend_module_entry mysqli_module_entry = { STANDARD_MODULE_HEADER_EX, NULL, mysqli_deps, "mysqli", - mysqli_functions, + ext_functions, PHP_MINIT(mysqli), PHP_MSHUTDOWN(mysqli), PHP_RINIT(mysqli), diff --git a/ext/mysqli/mysqli.stub.php b/ext/mysqli/mysqli.stub.php index 8d3dc75a9763a..e370b30242e8b 100644 --- a/ext/mysqli/mysqli.stub.php +++ b/ext/mysqli/mysqli.stub.php @@ -1,11 +1,14 @@ | - | Andrey Hristov | - | Ulf Wendel | - +----------------------------------------------------------------------+ -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#include "php.h" -#include "php_ini.h" -#include "ext/standard/info.h" -#include "php_mysqli_structs.h" -#include "mysqli_fe.h" -#include "mysqli_priv.h" - -#include "mysqli_arginfo.h" - -#ifdef MYSQLI_USE_FULL_TYPED_ARGINFO_0 -#define MYSQLI_ZEND_ARG_OBJ_INFO_LINK() ZEND_ARG_OBJ_INFO(0, link, mysqli, 0) -#define MYSQLI_ZEND_ARG_OBJ_INFO_RESULT() ZEND_ARG_OBJ_INFO(0, result, mysqli_result, 0) -#define MYSQLI_ZEND_ARG_OBJ_INFO_STMT() ZEND_ARG_OBJ_INFO(0, stmt, mysqli_stmt, 0) -#else -#define MYSQLI_ZEND_ARG_OBJ_INFO_LINK() ZEND_ARG_INFO(0, link) -#define MYSQLI_ZEND_ARG_OBJ_INFO_RESULT() ZEND_ARG_INFO(0, result) -#define MYSQLI_ZEND_ARG_OBJ_INFO_STMT() ZEND_ARG_INFO(0, stmt) -#endif - -/* {{{ mysqli_functions[] - * - * Every user visible function must have an entry in mysqli_functions[]. - */ -const zend_function_entry mysqli_functions[] = { - PHP_FE(mysqli_affected_rows, arginfo_mysqli_affected_rows) - PHP_FE(mysqli_autocommit, arginfo_mysqli_autocommit) - PHP_FE(mysqli_begin_transaction, arginfo_mysqli_begin_transaction) - PHP_FE(mysqli_change_user, arginfo_mysqli_change_user) - PHP_FE(mysqli_character_set_name, arginfo_mysqli_character_set_name) - PHP_FE(mysqli_close, arginfo_mysqli_close) - PHP_FE(mysqli_commit, arginfo_mysqli_commit) - PHP_FE(mysqli_connect, arginfo_mysqli_connect) - PHP_FE(mysqli_connect_errno, arginfo_mysqli_connect_errno) - PHP_FE(mysqli_connect_error, arginfo_mysqli_connect_error) - PHP_FE(mysqli_data_seek, arginfo_mysqli_data_seek) - PHP_FE(mysqli_dump_debug_info, arginfo_mysqli_dump_debug_info) - PHP_FE(mysqli_debug, arginfo_mysqli_debug) - PHP_FE(mysqli_errno, arginfo_mysqli_errno) - PHP_FE(mysqli_error, arginfo_mysqli_error) - PHP_FE(mysqli_error_list, arginfo_mysqli_error_list) - PHP_FE(mysqli_stmt_execute, arginfo_mysqli_stmt_execute) - PHP_FALIAS(mysqli_execute, mysqli_stmt_execute, arginfo_mysqli_execute) - PHP_FE(mysqli_fetch_field, arginfo_mysqli_fetch_field) - PHP_FE(mysqli_fetch_fields, arginfo_mysqli_fetch_fields) - PHP_FE(mysqli_fetch_field_direct, arginfo_mysqli_fetch_field_direct) - PHP_FE(mysqli_fetch_lengths, arginfo_mysqli_fetch_lengths) -#ifdef MYSQLI_USE_MYSQLND - PHP_FE(mysqli_fetch_all, arginfo_mysqli_fetch_all) -#endif - PHP_FE(mysqli_fetch_array, arginfo_mysqli_fetch_array) - PHP_FE(mysqli_fetch_assoc, arginfo_mysqli_fetch_assoc) - PHP_FE(mysqli_fetch_object, arginfo_mysqli_fetch_object) - PHP_FE(mysqli_fetch_row, arginfo_mysqli_fetch_row) - PHP_FE(mysqli_field_count, arginfo_mysqli_field_count) - PHP_FE(mysqli_field_seek, arginfo_mysqli_field_seek) - PHP_FE(mysqli_field_tell, arginfo_mysqli_field_tell) - PHP_FE(mysqli_free_result, arginfo_mysqli_free_result) -#if defined(MYSQLI_USE_MYSQLND) - PHP_FE(mysqli_get_connection_stats, arginfo_mysqli_get_connection_stats) - PHP_FE(mysqli_get_client_stats, arginfo_mysqli_get_client_stats) -#endif -#ifdef HAVE_MYSQLI_GET_CHARSET - PHP_FE(mysqli_get_charset, arginfo_mysqli_get_charset) -#endif - PHP_FE(mysqli_get_client_info, arginfo_mysqli_get_client_info) - PHP_FE(mysqli_get_client_version, arginfo_mysqli_get_client_version) - PHP_FE(mysqli_get_links_stats, arginfo_mysqli_get_links_stats) - PHP_FE(mysqli_get_host_info, arginfo_mysqli_get_host_info) - PHP_FE(mysqli_get_proto_info, arginfo_mysqli_get_proto_info) - PHP_FE(mysqli_get_server_info, arginfo_mysqli_get_server_info) - PHP_FE(mysqli_get_server_version, arginfo_mysqli_get_server_version) - PHP_FE(mysqli_get_warnings, arginfo_mysqli_get_warnings) - PHP_FE(mysqli_init, arginfo_mysqli_init) - PHP_FE(mysqli_info, arginfo_mysqli_info) - PHP_FE(mysqli_insert_id, arginfo_mysqli_insert_id) - PHP_FE(mysqli_kill, arginfo_mysqli_kill) - PHP_FE(mysqli_more_results, arginfo_mysqli_more_results) - PHP_FE(mysqli_multi_query, arginfo_mysqli_multi_query) - PHP_FE(mysqli_next_result, arginfo_mysqli_next_result) - PHP_FE(mysqli_num_fields, arginfo_mysqli_num_fields) - PHP_FE(mysqli_num_rows, arginfo_mysqli_num_rows) - PHP_FE(mysqli_options, arginfo_mysqli_options) - PHP_FE(mysqli_ping, arginfo_mysqli_ping) -#if defined(MYSQLI_USE_MYSQLND) - PHP_FE(mysqli_poll, arginfo_mysqli_poll) -#endif - PHP_FE(mysqli_prepare, arginfo_mysqli_prepare) - PHP_FE(mysqli_report, arginfo_mysqli_report) - PHP_FE(mysqli_query, arginfo_mysqli_query) - PHP_FE(mysqli_real_connect, arginfo_mysqli_real_connect) - PHP_FE(mysqli_real_escape_string, arginfo_mysqli_real_escape_string) - PHP_FE(mysqli_real_query, arginfo_mysqli_real_query) -#if defined(MYSQLI_USE_MYSQLND) - PHP_FE(mysqli_reap_async_query, arginfo_mysqli_reap_async_query) -#endif - PHP_FE(mysqli_release_savepoint, arginfo_mysqli_release_savepoint) - PHP_FE(mysqli_rollback, arginfo_mysqli_rollback) - PHP_FE(mysqli_savepoint, arginfo_mysqli_savepoint) - PHP_FE(mysqli_select_db, arginfo_mysqli_select_db) -#ifdef HAVE_MYSQLI_SET_CHARSET - PHP_FE(mysqli_set_charset, arginfo_mysqli_set_charset) -#endif - PHP_FE(mysqli_stmt_affected_rows, arginfo_mysqli_stmt_affected_rows) - PHP_FE(mysqli_stmt_attr_get, arginfo_mysqli_stmt_attr_get) - PHP_FE(mysqli_stmt_attr_set, arginfo_mysqli_stmt_attr_set) - PHP_FE(mysqli_stmt_bind_param, arginfo_mysqli_stmt_bind_param) - PHP_FE(mysqli_stmt_bind_result, arginfo_mysqli_stmt_bind_result) - PHP_FE(mysqli_stmt_close, arginfo_mysqli_stmt_close) - PHP_FE(mysqli_stmt_data_seek, arginfo_mysqli_stmt_data_seek) - PHP_FE(mysqli_stmt_errno, arginfo_mysqli_stmt_errno) - PHP_FE(mysqli_stmt_error, arginfo_mysqli_stmt_error) - PHP_FE(mysqli_stmt_error_list, arginfo_mysqli_stmt_error_list) - PHP_FE(mysqli_stmt_fetch, arginfo_mysqli_stmt_fetch) - PHP_FE(mysqli_stmt_field_count, arginfo_mysqli_stmt_field_count) - PHP_FE(mysqli_stmt_free_result, arginfo_mysqli_stmt_free_result) -#if defined(MYSQLI_USE_MYSQLND) - PHP_FE(mysqli_stmt_get_result, arginfo_mysqli_stmt_get_result) -#endif - PHP_FE(mysqli_stmt_get_warnings, arginfo_mysqli_stmt_get_warnings) - PHP_FE(mysqli_stmt_init, arginfo_mysqli_stmt_init) - PHP_FE(mysqli_stmt_insert_id, arginfo_mysqli_stmt_insert_id) -#if defined(MYSQLI_USE_MYSQLND) - PHP_FE(mysqli_stmt_more_results, arginfo_mysqli_stmt_more_results) - PHP_FE(mysqli_stmt_next_result, arginfo_mysqli_stmt_next_result) -#endif - PHP_FE(mysqli_stmt_num_rows, arginfo_mysqli_stmt_num_rows) - PHP_FE(mysqli_stmt_param_count, arginfo_mysqli_stmt_param_count) - PHP_FE(mysqli_stmt_prepare, arginfo_mysqli_stmt_prepare) - PHP_FE(mysqli_stmt_reset, arginfo_mysqli_stmt_reset) - PHP_FE(mysqli_stmt_result_metadata, arginfo_mysqli_stmt_result_metadata) - PHP_FE(mysqli_stmt_send_long_data, arginfo_mysqli_stmt_send_long_data) - PHP_FE(mysqli_stmt_store_result, arginfo_mysqli_stmt_store_result) - PHP_FE(mysqli_stmt_sqlstate, arginfo_mysqli_stmt_sqlstate) - PHP_FE(mysqli_sqlstate, arginfo_mysqli_sqlstate) - PHP_FE(mysqli_ssl_set, arginfo_mysqli_ssl_set) - PHP_FE(mysqli_stat, arginfo_mysqli_stat) - PHP_FE(mysqli_store_result, arginfo_mysqli_store_result) - PHP_FE(mysqli_thread_id, arginfo_mysqli_thread_id) - PHP_FE(mysqli_thread_safe, arginfo_mysqli_thread_safe) - PHP_FE(mysqli_use_result, arginfo_mysqli_use_result) - PHP_FE(mysqli_warning_count, arginfo_mysqli_warning_count) - - PHP_FE(mysqli_refresh, arginfo_mysqli_refresh) - - /* Aliases */ - PHP_FALIAS(mysqli_escape_string, mysqli_real_escape_string, arginfo_mysqli_escape_string) - PHP_FALIAS(mysqli_set_opt, mysqli_options, arginfo_mysqli_set_opt) - - PHP_FE_END -}; -/* }}} */ - -/* {{{ mysqli_link_methods[] - * - * Every user visible function must have an entry in mysqli_link_methods[]. - */ -const zend_function_entry mysqli_link_methods[] = { - PHP_ME_MAPPING(autocommit, mysqli_autocommit, arginfo_class_mysqli_autocommit, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(begin_transaction, mysqli_begin_transaction, arginfo_class_mysqli_begin_transaction, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(change_user, mysqli_change_user, arginfo_class_mysqli_change_user, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(character_set_name, mysqli_character_set_name, arginfo_class_mysqli_character_set_name, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(close, mysqli_close, arginfo_class_mysqli_close, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(commit, mysqli_commit, arginfo_class_mysqli_commit, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(connect, mysqli_connect, arginfo_class_mysqli_connect, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(dump_debug_info, mysqli_dump_debug_info, arginfo_class_mysqli_dump_debug_info, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(debug, mysqli_debug, arginfo_class_mysqli_debug, ZEND_ACC_PUBLIC) -#ifdef HAVE_MYSQLI_GET_CHARSET - PHP_ME_MAPPING(get_charset, mysqli_get_charset, arginfo_class_mysqli_get_charset, ZEND_ACC_PUBLIC) -#endif - PHP_ME_MAPPING(get_client_info, mysqli_get_client_info, arginfo_class_mysqli_get_client_info, ZEND_ACC_PUBLIC) -#if defined(MYSQLI_USE_MYSQLND) - PHP_ME_MAPPING(get_connection_stats, mysqli_get_connection_stats, arginfo_class_mysqli_get_connection_stats, ZEND_ACC_PUBLIC) -#endif - PHP_ME_MAPPING(get_server_info, mysqli_get_server_info, arginfo_class_mysqli_get_server_info, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(get_warnings, mysqli_get_warnings, arginfo_class_mysqli_get_warnings, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(init, mysqli_init_method, arginfo_class_mysqli_init, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(kill, mysqli_kill, arginfo_class_mysqli_kill, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(multi_query, mysqli_multi_query, arginfo_class_mysqli_multi_query, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(__construct, mysqli_link_construct, arginfo_class_mysqli___construct, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(more_results, mysqli_more_results, arginfo_class_mysqli_more_results, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(next_result, mysqli_next_result, arginfo_class_mysqli_next_result, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(options, mysqli_options, arginfo_class_mysqli_options, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(ping, mysqli_ping, arginfo_class_mysqli_ping, ZEND_ACC_PUBLIC) -#if defined(MYSQLI_USE_MYSQLND) - PHP_ME_MAPPING(poll, mysqli_poll, arginfo_class_mysqli_poll, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) -#endif - PHP_ME_MAPPING(prepare, mysqli_prepare, arginfo_class_mysqli_prepare, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(query, mysqli_query, arginfo_class_mysqli_query, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(real_connect, mysqli_real_connect, arginfo_class_mysqli_real_connect, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(real_escape_string, mysqli_real_escape_string, arginfo_class_mysqli_real_escape_string, ZEND_ACC_PUBLIC) -#if defined(MYSQLI_USE_MYSQLND) - PHP_ME_MAPPING(reap_async_query, mysqli_reap_async_query, arginfo_class_mysqli_reap_async_query, ZEND_ACC_PUBLIC) -#endif - PHP_ME_MAPPING(escape_string, mysqli_real_escape_string, arginfo_class_mysqli_real_escape_string, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(real_query, mysqli_real_query, arginfo_class_mysqli_real_query, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(release_savepoint, mysqli_release_savepoint, arginfo_class_mysqli_release_savepoint, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(rollback, mysqli_rollback, arginfo_class_mysqli_rollback, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(savepoint, mysqli_savepoint, arginfo_class_mysqli_savepoint, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(select_db, mysqli_select_db, arginfo_class_mysqli_select_db, ZEND_ACC_PUBLIC) -#ifdef HAVE_MYSQLI_SET_CHARSET - PHP_ME_MAPPING(set_charset, mysqli_set_charset, arginfo_class_mysqli_set_charset, ZEND_ACC_PUBLIC) -#endif - PHP_ME_MAPPING(set_opt, mysqli_options, arginfo_class_mysqli_set_opt, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(ssl_set, mysqli_ssl_set, arginfo_class_mysqli_ssl_set, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(stat, mysqli_stat, arginfo_class_mysqli_stat, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(stmt_init, mysqli_stmt_init, arginfo_class_mysqli_stmt_init, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(store_result, mysqli_store_result, arginfo_class_mysqli_store_result, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(thread_safe, mysqli_thread_safe, arginfo_class_mysqli_thread_safe, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(use_result, mysqli_use_result, arginfo_class_mysqli_use_result, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(refresh, mysqli_refresh, arginfo_class_mysqli_refresh, ZEND_ACC_PUBLIC) - PHP_FE_END -}; -/* }}} */ - -/* {{{ mysqli_result_methods[] - * - * Every user visible function must have an entry in mysqli_result_methods[]. - */ -const zend_function_entry mysqli_result_methods[] = { - PHP_ME_MAPPING(__construct, mysqli_result_construct, arginfo_class_mysqli_result___construct, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(close, mysqli_free_result, arginfo_class_mysqli_result_close, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(free, mysqli_free_result, arginfo_class_mysqli_result_free, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(data_seek, mysqli_data_seek, arginfo_class_mysqli_result_data_seek, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(fetch_field, mysqli_fetch_field, arginfo_class_mysqli_result_fetch_field, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(fetch_fields, mysqli_fetch_fields, arginfo_class_mysqli_result_fetch_fields, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(fetch_field_direct, mysqli_fetch_field_direct, arginfo_class_mysqli_result_fetch_field_direct, ZEND_ACC_PUBLIC) -#if defined(MYSQLI_USE_MYSQLND) - PHP_ME_MAPPING(fetch_all, mysqli_fetch_all, arginfo_class_mysqli_result_fetch_all, ZEND_ACC_PUBLIC) -#endif - PHP_ME_MAPPING(fetch_array, mysqli_fetch_array, arginfo_class_mysqli_result_fetch_array, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(fetch_assoc, mysqli_fetch_assoc, arginfo_class_mysqli_result_fetch_assoc, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(fetch_object, mysqli_fetch_object, arginfo_class_mysqli_result_fetch_object, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(fetch_row, mysqli_fetch_row, arginfo_class_mysqli_result_fetch_row, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(field_seek, mysqli_field_seek, arginfo_class_mysqli_result_field_seek, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(free_result, mysqli_free_result, arginfo_class_mysqli_result_free_result, ZEND_ACC_PUBLIC) - PHP_FE_END -}; -/* }}} */ - -/* {{{ mysqli_stmt_methods[] - * - * Every user visible function must have an entry in mysqli_stmt_methods[]. - */ -const zend_function_entry mysqli_stmt_methods[] = { - PHP_ME_MAPPING(__construct, mysqli_stmt_construct, arginfo_class_mysqli_stmt___construct, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(attr_get, mysqli_stmt_attr_get, arginfo_class_mysqli_stmt_attr_get, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(attr_set, mysqli_stmt_attr_set, arginfo_class_mysqli_stmt_attr_set, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(bind_param, mysqli_stmt_bind_param, arginfo_class_mysqli_stmt_bind_param, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(bind_result, mysqli_stmt_bind_result, arginfo_class_mysqli_stmt_bind_result, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(close, mysqli_stmt_close, arginfo_class_mysqli_stmt_close, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(data_seek, mysqli_stmt_data_seek, arginfo_class_mysqli_stmt_data_seek, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(execute, mysqli_stmt_execute, arginfo_class_mysqli_stmt_execute, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(fetch, mysqli_stmt_fetch, arginfo_class_mysqli_stmt_fetch, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(get_warnings, mysqli_stmt_get_warnings, arginfo_class_mysqli_stmt_get_warnings, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(result_metadata, mysqli_stmt_result_metadata, arginfo_class_mysqli_stmt_result_metadata, ZEND_ACC_PUBLIC) -#if defined(MYSQLI_USE_MYSQLND) - PHP_ME_MAPPING(more_results, mysqli_stmt_more_results, arginfo_class_mysqli_stmt_more_results, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(next_result, mysqli_stmt_next_result, arginfo_class_mysqli_stmt_next_result, ZEND_ACC_PUBLIC) -#endif - PHP_ME_MAPPING(num_rows, mysqli_stmt_num_rows, arginfo_class_mysqli_stmt_num_rows, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(send_long_data, mysqli_stmt_send_long_data, arginfo_class_mysqli_stmt_send_long_data, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(free_result, mysqli_stmt_free_result, arginfo_class_mysqli_stmt_free_result, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(reset, mysqli_stmt_reset, arginfo_class_mysqli_stmt_reset, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(prepare, mysqli_stmt_prepare, arginfo_class_mysqli_stmt_prepare, ZEND_ACC_PUBLIC) - PHP_ME_MAPPING(store_result, mysqli_stmt_store_result, arginfo_class_mysqli_stmt_store_result, ZEND_ACC_PUBLIC) -#if defined(MYSQLI_USE_MYSQLND) - PHP_ME_MAPPING(get_result, mysqli_stmt_get_result, arginfo_class_mysqli_stmt_get_result, ZEND_ACC_PUBLIC) -#endif - PHP_FE_END -}; -/* }}} */ diff --git a/ext/mysqli/mysqli_fe.h b/ext/mysqli/mysqli_fe.h deleted file mode 100644 index ab2974900dcb3..0000000000000 --- a/ext/mysqli/mysqli_fe.h +++ /dev/null @@ -1,135 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | Copyright (c) The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Author: Georg Richter | - Andrey Hristov | - +----------------------------------------------------------------------+ -*/ - -#ifndef MYSQLI_FE_H -#define MYSQLI_FE_H - -PHP_FUNCTION(mysqli); -PHP_FUNCTION(mysqli_affected_rows); -PHP_FUNCTION(mysqli_autocommit); -PHP_FUNCTION(mysqli_begin_transaction); -PHP_FUNCTION(mysqli_change_user); -PHP_FUNCTION(mysqli_character_set_name); -PHP_FUNCTION(mysqli_set_charset); -PHP_FUNCTION(mysqli_close); -PHP_FUNCTION(mysqli_commit); -PHP_FUNCTION(mysqli_connect); -PHP_FUNCTION(mysqli_connect_errno); -PHP_FUNCTION(mysqli_connect_error); -PHP_FUNCTION(mysqli_data_seek); -PHP_FUNCTION(mysqli_debug); -PHP_FUNCTION(mysqli_dump_debug_info); -PHP_FUNCTION(mysqli_errno); -PHP_FUNCTION(mysqli_error); -PHP_FUNCTION(mysqli_error_list); -PHP_FUNCTION(mysqli_fetch_all); -PHP_FUNCTION(mysqli_fetch_array); -PHP_FUNCTION(mysqli_fetch_assoc); -PHP_FUNCTION(mysqli_fetch_object); -PHP_FUNCTION(mysqli_fetch_field); -PHP_FUNCTION(mysqli_fetch_fields); -PHP_FUNCTION(mysqli_fetch_field_direct); -PHP_FUNCTION(mysqli_fetch_lengths); -PHP_FUNCTION(mysqli_fetch_row); -PHP_FUNCTION(mysqli_field_count); -PHP_FUNCTION(mysqli_field_seek); -PHP_FUNCTION(mysqli_field_tell); -PHP_FUNCTION(mysqli_free_result); -PHP_FUNCTION(mysqli_get_client_stats); -PHP_FUNCTION(mysqli_get_connection_stats); -PHP_FUNCTION(mysqli_get_charset); -PHP_FUNCTION(mysqli_get_client_info); -PHP_FUNCTION(mysqli_get_client_version); -PHP_FUNCTION(mysqli_get_host_info); -PHP_FUNCTION(mysqli_get_links_stats); -PHP_FUNCTION(mysqli_get_proto_info); -PHP_FUNCTION(mysqli_get_server_info); -PHP_FUNCTION(mysqli_get_server_version); -PHP_FUNCTION(mysqli_get_warnings); -PHP_FUNCTION(mysqli_info); -PHP_FUNCTION(mysqli_insert_id); -PHP_FUNCTION(mysqli_init); -PHP_FUNCTION(mysqli_init_method); -PHP_FUNCTION(mysqli_kill); -PHP_FUNCTION(mysqli_link_construct); -PHP_FUNCTION(mysqli_set_local_infile_default); -PHP_FUNCTION(mysqli_set_local_infile_handler); -PHP_FUNCTION(mysqli_more_results); -PHP_FUNCTION(mysqli_multi_query); -PHP_FUNCTION(mysqli_next_result); -PHP_FUNCTION(mysqli_num_fields); -PHP_FUNCTION(mysqli_num_rows); -PHP_FUNCTION(mysqli_options); -PHP_FUNCTION(mysqli_ping); -PHP_FUNCTION(mysqli_poll); -PHP_FUNCTION(mysqli_prepare); -PHP_FUNCTION(mysqli_query); -PHP_FUNCTION(mysqli_stmt_result_metadata); -PHP_FUNCTION(mysqli_report); -PHP_FUNCTION(mysqli_read_query_result); -PHP_FUNCTION(mysqli_real_connect); -PHP_FUNCTION(mysqli_real_query); -PHP_FUNCTION(mysqli_real_escape_string); -PHP_FUNCTION(mysqli_reap_async_query); -PHP_FUNCTION(mysqli_rollback); -PHP_FUNCTION(mysqli_row_seek); -PHP_FUNCTION(mysqli_select_db); -PHP_FUNCTION(mysqli_stmt_attr_get); -PHP_FUNCTION(mysqli_stmt_attr_set); -PHP_FUNCTION(mysqli_stmt_bind_param); -PHP_FUNCTION(mysqli_stmt_bind_result); -PHP_FUNCTION(mysqli_stmt_execute); -PHP_FUNCTION(mysqli_stmt_field_count); -PHP_FUNCTION(mysqli_stmt_init); -PHP_FUNCTION(mysqli_stmt_prepare); -PHP_FUNCTION(mysqli_stmt_fetch); -PHP_FUNCTION(mysqli_stmt_param_count); -PHP_FUNCTION(mysqli_stmt_send_long_data); -PHP_FUNCTION(mysqli_sqlstate); -PHP_FUNCTION(mysqli_ssl_set); -PHP_FUNCTION(mysqli_stat); -PHP_FUNCTION(mysqli_refresh); -PHP_FUNCTION(mysqli_savepoint); -PHP_FUNCTION(mysqli_release_savepoint); -PHP_FUNCTION(mysqli_stmt_affected_rows); -PHP_FUNCTION(mysqli_stmt_close); -PHP_FUNCTION(mysqli_stmt_data_seek); -PHP_FUNCTION(mysqli_stmt_errno); -PHP_FUNCTION(mysqli_stmt_error); -PHP_FUNCTION(mysqli_stmt_error_list); -PHP_FUNCTION(mysqli_stmt_free_result); -PHP_FUNCTION(mysqli_stmt_get_result); -PHP_FUNCTION(mysqli_stmt_get_warnings); -PHP_FUNCTION(mysqli_stmt_reset); -PHP_FUNCTION(mysqli_stmt_insert_id); -PHP_FUNCTION(mysqli_stmt_more_results); -PHP_FUNCTION(mysqli_stmt_next_result); -PHP_FUNCTION(mysqli_stmt_num_rows); -PHP_FUNCTION(mysqli_stmt_sqlstate); -PHP_FUNCTION(mysqli_stmt_store_result); -PHP_FUNCTION(mysqli_store_result); -PHP_FUNCTION(mysqli_thread_id); -PHP_FUNCTION(mysqli_thread_safe); -PHP_FUNCTION(mysqli_use_result); -PHP_FUNCTION(mysqli_warning_count); - -PHP_FUNCTION(mysqli_stmt_construct); -PHP_FUNCTION(mysqli_result_construct); -PHP_FUNCTION(mysqli_driver_construct); -PHP_METHOD(mysqli_warning,__construct); - -#endif /* MYSQLI_FE_H */ diff --git a/ext/mysqli/mysqli_warning.c b/ext/mysqli/mysqli_warning.c index 673ca48aae410..16cb0ebdfb8c6 100644 --- a/ext/mysqli/mysqli_warning.c +++ b/ext/mysqli/mysqli_warning.c @@ -26,8 +26,6 @@ #include "php_mysqli_structs.h" #include "mysqli_priv.h" -#include "mysqli_warning_arginfo.h" - /* Define these in the PHP7 tree to make merging easy process */ #define ZSTR_DUPLICATE (1<<0) #define ZSTR_AUTOFREE (1<<1) @@ -318,14 +316,6 @@ PHP_METHOD(mysqli_warning, __construct) } /* }}} */ -/* {{{ mysqli_warning_methods */ -const zend_function_entry mysqli_warning_methods[] = { - PHP_ME(mysqli_warning, __construct, arginfo_class_mysqli_warning___construct, ZEND_ACC_PROTECTED) - PHP_ME(mysqli_warning, next, arginfo_class_mysqli_warning_next, ZEND_ACC_PUBLIC) - PHP_FE_END -}; -/* }}} */ - /* {{{ mysqli_warning_property_entries */ const mysqli_property_entry mysqli_warning_property_entries[] = { {"message", sizeof("message") - 1, mysqli_warning_message, NULL}, diff --git a/ext/mysqli/mysqli_warning.stub.php b/ext/mysqli/mysqli_warning.stub.php deleted file mode 100644 index aa92204e507d9..0000000000000 --- a/ext/mysqli/mysqli_warning.stub.php +++ /dev/null @@ -1,9 +0,0 @@ - Date: Sun, 19 Apr 2020 11:53:36 -0400 Subject: [PATCH 193/338] Speed up ZEND_SWITCH_STRING/ZEND_SWITCH_LONG for wrong type This has the minor benefit of avoiding loading the address of the jump table when the expression for the switch isn't a string/long. gcc doesn't seem to optimize that. The previous function body is the original implementation: ad8652818a5 ``` // Before: 0.267s, after: 0.265s function test_switch($x) { for ($i = 0; $i < 10000000; $i++) { switch ($x) { case 'a': case 'b': echo "i=$i\n"; } } } test_switch(null); ``` Closes GH-5419 --- Zend/zend_vm_def.h | 4 ++-- Zend/zend_vm_execute.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 0797322a86d38..6a4719b3dd28f 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -8348,7 +8348,6 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(187, ZEND_SWITCH_LONG, CONST|TMPVARCV, CONST, JM HashTable *jumptable; op = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R); - jumptable = Z_ARRVAL_P(GET_OP2_ZVAL_PTR(BP_VAR_R)); if (Z_TYPE_P(op) != IS_LONG) { ZVAL_DEREF(op); @@ -8358,6 +8357,7 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(187, ZEND_SWITCH_LONG, CONST|TMPVARCV, CONST, JM } } + jumptable = Z_ARRVAL_P(GET_OP2_ZVAL_PTR(BP_VAR_R)); jump_zv = zend_hash_index_find(jumptable, Z_LVAL_P(op)); if (jump_zv != NULL) { ZEND_VM_SET_RELATIVE_OPCODE(opline, Z_LVAL_P(jump_zv)); @@ -8376,7 +8376,6 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(188, ZEND_SWITCH_STRING, CONST|TMPVARCV, CONST, HashTable *jumptable; op = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R); - jumptable = Z_ARRVAL_P(GET_OP2_ZVAL_PTR(BP_VAR_R)); if (Z_TYPE_P(op) != IS_STRING) { if (OP1_TYPE == IS_CONST) { @@ -8391,6 +8390,7 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(188, ZEND_SWITCH_STRING, CONST|TMPVARCV, CONST, } } + jumptable = Z_ARRVAL_P(GET_OP2_ZVAL_PTR(BP_VAR_R)); jump_zv = zend_hash_find_ex(jumptable, Z_STR_P(op), OP1_TYPE == IS_CONST); if (jump_zv != NULL) { ZEND_VM_SET_RELATIVE_OPCODE(opline, Z_LVAL_P(jump_zv)); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 33e97f2b0489f..346dbec656f9a 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -6454,7 +6454,6 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SWITCH_LONG_SPEC_ HashTable *jumptable; op = RT_CONSTANT(opline, opline->op1); - jumptable = Z_ARRVAL_P(RT_CONSTANT(opline, opline->op2)); if (Z_TYPE_P(op) != IS_LONG) { ZVAL_DEREF(op); @@ -6464,6 +6463,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SWITCH_LONG_SPEC_ } } + jumptable = Z_ARRVAL_P(RT_CONSTANT(opline, opline->op2)); jump_zv = zend_hash_index_find(jumptable, Z_LVAL_P(op)); if (jump_zv != NULL) { ZEND_VM_SET_RELATIVE_OPCODE(opline, Z_LVAL_P(jump_zv)); @@ -6482,7 +6482,6 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SWITCH_STRING_SPE HashTable *jumptable; op = RT_CONSTANT(opline, opline->op1); - jumptable = Z_ARRVAL_P(RT_CONSTANT(opline, opline->op2)); if (Z_TYPE_P(op) != IS_STRING) { if (IS_CONST == IS_CONST) { @@ -6497,6 +6496,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SWITCH_STRING_SPE } } + jumptable = Z_ARRVAL_P(RT_CONSTANT(opline, opline->op2)); jump_zv = zend_hash_find_ex(jumptable, Z_STR_P(op), IS_CONST == IS_CONST); if (jump_zv != NULL) { ZEND_VM_SET_RELATIVE_OPCODE(opline, Z_LVAL_P(jump_zv)); @@ -11316,7 +11316,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SWITCH_LONG_SPEC_TMPVARCV_CONS HashTable *jumptable; op = EX_VAR(opline->op1.var); - jumptable = Z_ARRVAL_P(RT_CONSTANT(opline, opline->op2)); if (Z_TYPE_P(op) != IS_LONG) { ZVAL_DEREF(op); @@ -11326,6 +11325,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SWITCH_LONG_SPEC_TMPVARCV_CONS } } + jumptable = Z_ARRVAL_P(RT_CONSTANT(opline, opline->op2)); jump_zv = zend_hash_index_find(jumptable, Z_LVAL_P(op)); if (jump_zv != NULL) { ZEND_VM_SET_RELATIVE_OPCODE(opline, Z_LVAL_P(jump_zv)); @@ -11344,7 +11344,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SWITCH_STRING_SPEC_TMPVARCV_CO HashTable *jumptable; op = EX_VAR(opline->op1.var); - jumptable = Z_ARRVAL_P(RT_CONSTANT(opline, opline->op2)); if (Z_TYPE_P(op) != IS_STRING) { if ((IS_TMP_VAR|IS_VAR|IS_CV) == IS_CONST) { @@ -11359,6 +11358,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SWITCH_STRING_SPEC_TMPVARCV_CO } } + jumptable = Z_ARRVAL_P(RT_CONSTANT(opline, opline->op2)); jump_zv = zend_hash_find_ex(jumptable, Z_STR_P(op), (IS_TMP_VAR|IS_VAR|IS_CV) == IS_CONST); if (jump_zv != NULL) { ZEND_VM_SET_RELATIVE_OPCODE(opline, Z_LVAL_P(jump_zv)); From 94e09bfe558656d3f1470dc960b900a951b0dffc Mon Sep 17 00:00:00 2001 From: Joe Cai Date: Mon, 20 Apr 2020 09:03:11 +1000 Subject: [PATCH 194/338] Fix #79497: Fix php_openssl_subtract_timeval() I stumbled upon this while debugging a strange issue with stream_socket_client() where it randomly throws out errors when the connection timeout is set to below 1s. The logic to calculate time difference in php_openssl_subtract_timeval() is wrong when a.tv_usec < b.tv_usec, causing connection errors before the timeout is reached. --- NEWS | 4 ++++ ext/openssl/xp_ssl.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index adbaf6223e56c..8f00881b2956b 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,10 @@ PHP NEWS . Fixed bug #79441 (Segfault in mb_chr() if internal encoding is unsupported). (Girgias) +- OpenSSL: + . Fixed bug #79497 (stream_socket_client() throws an unknown error sometimes + with <1s timeout). (Joe Cai) + - Standard: . Fixed bug #79468 (SIGSEGV when closing stream handle with a stream filter appended). (dinosaur) diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index 88d86c2096fac..ea29a340586ca 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -2209,8 +2209,8 @@ static struct timeval php_openssl_subtract_timeval(struct timeval a, struct time difference.tv_usec = a.tv_usec - b.tv_usec; if (a.tv_usec < b.tv_usec) { - b.tv_sec -= 1L; - b.tv_usec += 1000000L; + difference.tv_sec -= 1L; + difference.tv_usec += 1000000L; } return difference; From 4815be44db6b7a73cabfa872dc17d7e1574e1930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sun, 19 Apr 2020 20:05:16 +0200 Subject: [PATCH 195/338] Generate function entries from stubs Converts ext/pcntl, ext/simplexml, ext/snmp, ext/soap, ext/sqlite3. Closes GH-5421 --- ext/pcntl/pcntl.c | 45 +-------- ext/pcntl/pcntl.stub.php | 4 +- ext/pcntl/pcntl_arginfo.h | 90 +++++++++++++++++- ext/simplexml/simplexml.c | 35 +------ ext/simplexml/simplexml.stub.php | 7 +- ext/simplexml/simplexml_arginfo.h | 45 +++++++++ ext/simplexml/sxe.c | 28 ++---- ext/simplexml/sxe.stub.php | 2 + ext/simplexml/sxe_arginfo.h | 21 +++++ ext/snmp/php_snmp.h | 36 ------- ext/snmp/snmp.c | 72 +++----------- ext/snmp/snmp.stub.php | 2 + ext/snmp/snmp_arginfo.h | 76 +++++++++++++++ ext/soap/soap.c | 121 ++---------------------- ext/soap/soap.stub.php | 63 +++++++------ ext/soap/soap_arginfo.h | 96 +++++++++++++++++++ ext/sqlite3/sqlite3.c | 150 +++++++++--------------------- ext/sqlite3/sqlite3.stub.php | 14 ++- ext/sqlite3/sqlite3_arginfo.h | 108 +++++++++++++++++++++ 19 files changed, 563 insertions(+), 452 deletions(-) diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index a4554a61cdca2..a52429e5497dd 100644 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -57,53 +57,10 @@ ZEND_DECLARE_MODULE_GLOBALS(pcntl) static PHP_GINIT_FUNCTION(pcntl); -static const zend_function_entry pcntl_functions[] = { - PHP_FE(pcntl_fork, arginfo_pcntl_fork) - PHP_FE(pcntl_waitpid, arginfo_pcntl_waitpid) - PHP_FE(pcntl_wait, arginfo_pcntl_wait) - PHP_FE(pcntl_signal, arginfo_pcntl_signal) - PHP_FE(pcntl_signal_get_handler, arginfo_pcntl_signal_get_handler) - PHP_FE(pcntl_signal_dispatch, arginfo_pcntl_signal_dispatch) - PHP_FE(pcntl_wifexited, arginfo_pcntl_wifexited) - PHP_FE(pcntl_wifstopped, arginfo_pcntl_wifstopped) - PHP_FE(pcntl_wifsignaled, arginfo_pcntl_wifsignaled) - PHP_FE(pcntl_wexitstatus, arginfo_pcntl_wifexitstatus) - PHP_FE(pcntl_wtermsig, arginfo_pcntl_wtermsig) - PHP_FE(pcntl_wstopsig, arginfo_pcntl_wstopsig) - PHP_FE(pcntl_exec, arginfo_pcntl_exec) - PHP_FE(pcntl_alarm, arginfo_pcntl_alarm) - PHP_FE(pcntl_get_last_error, arginfo_pcntl_get_last_error) - PHP_FALIAS(pcntl_errno, pcntl_get_last_error, arginfo_pcntl_errno) - PHP_FE(pcntl_strerror, arginfo_pcntl_strerror) -#ifdef HAVE_GETPRIORITY - PHP_FE(pcntl_getpriority, arginfo_pcntl_getpriority) -#endif -#ifdef HAVE_SETPRIORITY - PHP_FE(pcntl_setpriority, arginfo_pcntl_setpriority) -#endif -#ifdef HAVE_SIGPROCMASK - PHP_FE(pcntl_sigprocmask, arginfo_pcntl_sigprocmask) -#endif -#ifdef HAVE_STRUCT_SIGINFO_T -# if HAVE_SIGWAITINFO && HAVE_SIGTIMEDWAIT - PHP_FE(pcntl_sigwaitinfo, arginfo_pcntl_sigwaitinfo) - PHP_FE(pcntl_sigtimedwait, arginfo_pcntl_sigtimedwait) -# endif -#endif -#ifdef HAVE_WCONTINUED - PHP_FE(pcntl_wifcontinued, arginfo_pcntl_wifcontinued) -#endif - PHP_FE(pcntl_async_signals, arginfo_pcntl_async_signals) -#ifdef HAVE_UNSHARE - PHP_FE(pcntl_unshare, arginfo_pcntl_unshare) -#endif - PHP_FE_END -}; - zend_module_entry pcntl_module_entry = { STANDARD_MODULE_HEADER, "pcntl", - pcntl_functions, + ext_functions, PHP_MINIT(pcntl), PHP_MSHUTDOWN(pcntl), PHP_RINIT(pcntl), diff --git a/ext/pcntl/pcntl.stub.php b/ext/pcntl/pcntl.stub.php index 82bac573169c3..60e9c98a7fe0f 100644 --- a/ext/pcntl/pcntl.stub.php +++ b/ext/pcntl/pcntl.stub.php @@ -1,5 +1,7 @@ get_iterator = php_sxe_get_iterator; diff --git a/ext/simplexml/simplexml.stub.php b/ext/simplexml/simplexml.stub.php index f78694c1399e8..68eaf2be6e254 100644 --- a/ext/simplexml/simplexml.stub.php +++ b/ext/simplexml/simplexml.stub.php @@ -1,5 +1,7 @@ create_object = ce_SimpleXMLElement->create_object; diff --git a/ext/simplexml/sxe.stub.php b/ext/simplexml/sxe.stub.php index d609e93846998..a6e24dbc5cfd5 100644 --- a/ext/simplexml/sxe.stub.php +++ b/ext/simplexml/sxe.stub.php @@ -1,5 +1,7 @@ value pairs for multi OID request */ -PHP_METHOD(snmp, get) +PHP_METHOD(SNMP, get) { php_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU, SNMP_CMD_GET, (-1)); } @@ -1591,7 +1557,7 @@ PHP_METHOD(snmp, get) /* {{{ proto mixed SNMP::getnext(mixed object_id) Fetch a SNMP object returning scalar for single OID and array of oid->value pairs for multi OID request */ -PHP_METHOD(snmp, getnext) +PHP_METHOD(SNMP, getnext) { php_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU, SNMP_CMD_GETNEXT, (-1)); } @@ -1599,7 +1565,7 @@ PHP_METHOD(snmp, getnext) /* {{{ proto mixed SNMP::walk(mixed object_id [, bool $suffix_as_key = FALSE [, int $max_repetitions [, int $non_repeaters]]) Return all objects including their respective object id within the specified one as array of oid->value pairs */ -PHP_METHOD(snmp, walk) +PHP_METHOD(SNMP, walk) { php_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU, SNMP_CMD_WALK, (-1)); } @@ -1607,7 +1573,7 @@ PHP_METHOD(snmp, walk) /* {{{ proto bool SNMP::set(mixed object_id, mixed type, mixed value) Set the value of a SNMP object */ -PHP_METHOD(snmp, set) +PHP_METHOD(SNMP, set) { php_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU, SNMP_CMD_SET, (-1)); } @@ -1615,7 +1581,7 @@ PHP_METHOD(snmp, set) /* {{{ proto bool SNMP::setSecurity(string sec_level, [ string auth_protocol, string auth_passphrase [, string priv_protocol, string priv_passphrase [, string contextName [, string contextEngineID]]]]) Set SNMPv3 security-related session parameters */ -PHP_METHOD(snmp, setSecurity) +PHP_METHOD(SNMP, setSecurity) { php_snmp_object *snmp_object; zval *object = ZEND_THIS; @@ -1640,7 +1606,7 @@ PHP_METHOD(snmp, setSecurity) /* {{{ proto int SNMP::getErrno() Get last error code number */ -PHP_METHOD(snmp, getErrno) +PHP_METHOD(SNMP, getErrno) { php_snmp_object *snmp_object; zval *object = ZEND_THIS; @@ -1658,7 +1624,7 @@ PHP_METHOD(snmp, getErrno) /* {{{ proto int SNMP::getError() Get last error message */ -PHP_METHOD(snmp, getError) +PHP_METHOD(SNMP, getError) { php_snmp_object *snmp_object; zval *object = ZEND_THIS; @@ -1979,22 +1945,6 @@ static void free_php_snmp_properties(zval *el) /* {{{ */ } /* }}} */ -/* {{{ php_snmp_class_methods[] */ -static const zend_function_entry php_snmp_class_methods[] = { - PHP_ME(snmp, __construct, arginfo_class_SNMP___construct, ZEND_ACC_PUBLIC) - PHP_ME(snmp, close, arginfo_class_SNMP_close, ZEND_ACC_PUBLIC) - PHP_ME(snmp, setSecurity, arginfo_class_SNMP_setSecurity, ZEND_ACC_PUBLIC) - - PHP_ME(snmp, get, arginfo_class_SNMP_get, ZEND_ACC_PUBLIC) - PHP_ME(snmp, getnext, arginfo_class_SNMP_getnext, ZEND_ACC_PUBLIC) - PHP_ME(snmp, walk, arginfo_class_SNMP_walk, ZEND_ACC_PUBLIC) - PHP_ME(snmp, set, arginfo_class_SNMP_set, ZEND_ACC_PUBLIC) - PHP_ME(snmp, getErrno, arginfo_class_SNMP_getErrno, ZEND_ACC_PUBLIC) - PHP_ME(snmp, getError, arginfo_class_SNMP_getError, ZEND_ACC_PUBLIC) - - PHP_FE_END -}; - #define PHP_SNMP_PROPERTY_ENTRY_RECORD(name) \ { "" #name "", sizeof("" #name "") - 1, php_snmp_read_##name, php_snmp_write_##name } @@ -2042,7 +1992,7 @@ PHP_MINIT_FUNCTION(snmp) php_snmp_object_handlers.get_gc = php_snmp_get_gc; /* Register SNMP Class */ - INIT_CLASS_ENTRY(ce, "SNMP", php_snmp_class_methods); + INIT_CLASS_ENTRY(ce, "SNMP", class_SNMP_methods); ce.create_object = php_snmp_object_new; php_snmp_object_handlers.offset = XtOffsetOf(php_snmp_object, zo); php_snmp_object_handlers.clone_obj = NULL; @@ -2137,7 +2087,7 @@ zend_module_entry snmp_module_entry = { NULL, snmp_module_deps, "snmp", - snmp_functions, + ext_functions, PHP_MINIT(snmp), PHP_MSHUTDOWN(snmp), NULL, diff --git a/ext/snmp/snmp.stub.php b/ext/snmp/snmp.stub.php index bee2b393182fc..06632b602dbc9 100644 --- a/ext/snmp/snmp.stub.php +++ b/ext/snmp/snmp.stub.php @@ -1,5 +1,7 @@ = 3006011 /* {{{ proto bool SQLite3::backup(SQLite3 destination_db[, string source_dbname = "main"[, string destination_dbname = "main"]]) Backups the current database to another one. */ -PHP_METHOD(sqlite3, backup) +PHP_METHOD(SQLite3, backup) { php_sqlite3_db_object *source_obj; php_sqlite3_db_object *destination_obj; @@ -1453,7 +1453,7 @@ PHP_METHOD(sqlite3, backup) /* {{{ proto int SQLite3Stmt::paramCount() Returns the number of parameters within the prepared statement. */ -PHP_METHOD(sqlite3stmt, paramCount) +PHP_METHOD(SQLite3Stmt, paramCount) { php_sqlite3_stmt *stmt_obj; zval *object = ZEND_THIS; @@ -1472,7 +1472,7 @@ PHP_METHOD(sqlite3stmt, paramCount) /* {{{ proto bool SQLite3Stmt::close() Closes the prepared statement. */ -PHP_METHOD(sqlite3stmt, close) +PHP_METHOD(SQLite3Stmt, close) { php_sqlite3_stmt *stmt_obj; zval *object = ZEND_THIS; @@ -1494,7 +1494,7 @@ PHP_METHOD(sqlite3stmt, close) /* {{{ proto bool SQLite3Stmt::reset() Reset the prepared statement to the state before it was executed, bindings still remain. */ -PHP_METHOD(sqlite3stmt, reset) +PHP_METHOD(SQLite3Stmt, reset) { php_sqlite3_stmt *stmt_obj; zval *object = ZEND_THIS; @@ -1517,7 +1517,7 @@ PHP_METHOD(sqlite3stmt, reset) /* {{{ proto bool SQLite3Stmt::clear() Clear all current bound parameters. */ -PHP_METHOD(sqlite3stmt, clear) +PHP_METHOD(SQLite3Stmt, clear) { php_sqlite3_stmt *stmt_obj; zval *object = ZEND_THIS; @@ -1547,7 +1547,7 @@ PHP_METHOD(sqlite3stmt, clear) /* {{{ proto bool SQLite3Stmt::readOnly() Returns true if a statement is definitely read only */ -PHP_METHOD(sqlite3stmt, readOnly) +PHP_METHOD(SQLite3Stmt, readOnly) { php_sqlite3_stmt *stmt_obj; zval *object = ZEND_THIS; @@ -1677,7 +1677,7 @@ static int php_sqlite3_bind_params(php_sqlite3_stmt *stmt_obj) /* {{{ */ /* {{{ proto string SQLite3Stmt::getSQL([expanded = false]) Returns the SQL statement used to prepare the query. If expanded is true, binded parameters and values will be expanded. */ -PHP_METHOD(sqlite3stmt, getSQL) +PHP_METHOD(SQLite3Stmt, getSQL) { php_sqlite3_stmt *stmt_obj; zend_bool expanded = 0; @@ -1822,7 +1822,7 @@ static void sqlite3stmt_bind(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto bool SQLite3Stmt::bindParam(int parameter_number, mixed parameter [, int type]) Bind Parameter to a stmt variable. */ -PHP_METHOD(sqlite3stmt, bindParam) +PHP_METHOD(SQLite3Stmt, bindParam) { sqlite3stmt_bind(INTERNAL_FUNCTION_PARAM_PASSTHRU); } @@ -1830,7 +1830,7 @@ PHP_METHOD(sqlite3stmt, bindParam) /* {{{ proto bool SQLite3Stmt::bindValue(int parameter_number, mixed parameter [, int type]) Bind Value of a parameter to a stmt variable. */ -PHP_METHOD(sqlite3stmt, bindValue) +PHP_METHOD(SQLite3Stmt, bindValue) { sqlite3stmt_bind(INTERNAL_FUNCTION_PARAM_PASSTHRU); } @@ -1840,7 +1840,7 @@ PHP_METHOD(sqlite3stmt, bindValue) /* {{{ proto SQLite3Result SQLite3Stmt::execute() Executes a prepared statement and returns a result set object. */ -PHP_METHOD(sqlite3stmt, execute) +PHP_METHOD(SQLite3Stmt, execute) { php_sqlite3_stmt *stmt_obj; php_sqlite3_result *result; @@ -1901,7 +1901,7 @@ PHP_METHOD(sqlite3stmt, execute) /* {{{ proto SQLite3Stmt::__construct(SQLite3 dbobject, String Statement) __constructor for SQLite3Stmt. */ -PHP_METHOD(sqlite3stmt, __construct) +PHP_METHOD(SQLite3Stmt, __construct) { php_sqlite3_stmt *stmt_obj; php_sqlite3_db_object *db_obj; @@ -1951,7 +1951,7 @@ PHP_METHOD(sqlite3stmt, __construct) /* {{{ proto int SQLite3Result::numColumns() Number of columns in the result set. */ -PHP_METHOD(sqlite3result, numColumns) +PHP_METHOD(SQLite3Result, numColumns) { php_sqlite3_result *result_obj; zval *object = ZEND_THIS; @@ -1969,7 +1969,7 @@ PHP_METHOD(sqlite3result, numColumns) /* {{{ proto string SQLite3Result::columnName(int column) Returns the name of the nth column. */ -PHP_METHOD(sqlite3result, columnName) +PHP_METHOD(SQLite3Result, columnName) { php_sqlite3_result *result_obj; zval *object = ZEND_THIS; @@ -1994,7 +1994,7 @@ PHP_METHOD(sqlite3result, columnName) /* {{{ proto int SQLite3Result::columnType(int column) Returns the type of the nth column. */ -PHP_METHOD(sqlite3result, columnType) +PHP_METHOD(SQLite3Result, columnType) { php_sqlite3_result *result_obj; zval *object = ZEND_THIS; @@ -2017,7 +2017,7 @@ PHP_METHOD(sqlite3result, columnType) /* {{{ proto array SQLite3Result::fetchArray([int mode]) Fetch a result row as both an associative or numerically indexed array or both. */ -PHP_METHOD(sqlite3result, fetchArray) +PHP_METHOD(SQLite3Result, fetchArray) { php_sqlite3_result *result_obj; zval *object = ZEND_THIS; @@ -2073,7 +2073,7 @@ PHP_METHOD(sqlite3result, fetchArray) /* {{{ proto bool SQLite3Result::reset() Resets the result set back to the first row. */ -PHP_METHOD(sqlite3result, reset) +PHP_METHOD(SQLite3Result, reset) { php_sqlite3_result *result_obj; zval *object = ZEND_THIS; @@ -2095,7 +2095,7 @@ PHP_METHOD(sqlite3result, reset) /* {{{ proto bool SQLite3Result::finalize() Closes the result set. */ -PHP_METHOD(sqlite3result, finalize) +PHP_METHOD(SQLite3Result, finalize) { php_sqlite3_result *result_obj; zval *object = ZEND_THIS; @@ -2121,76 +2121,12 @@ PHP_METHOD(sqlite3result, finalize) /* {{{ proto SQLite3Result::__construct() __constructor for SQLite3Result. */ -PHP_METHOD(sqlite3result, __construct) +PHP_METHOD(SQLite3Result, __construct) { zend_throw_exception(zend_ce_exception, "SQLite3Result cannot be directly instantiated", 0); } /* }}} */ -/* {{{ php_sqlite3_class_methods */ -static const zend_function_entry php_sqlite3_class_methods[] = { - PHP_ME(sqlite3, open, arginfo_class_SQLite3_open, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3, close, arginfo_class_SQLite3_close, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3, exec, arginfo_class_SQLite3_query, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3, version, arginfo_class_SQLite3_version, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME(sqlite3, lastInsertRowID, arginfo_class_SQLite3_lastInsertRowID, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3, lastErrorCode, arginfo_class_SQLite3_lastErrorCode, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3, lastExtendedErrorCode, arginfo_class_SQLite3_lastExtendedErrorCode, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3, enableExtendedResultCodes, arginfo_class_SQLite3_enableExtendedResultCodes, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3, lastErrorMsg, arginfo_class_SQLite3_lastErrorMsg, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3, busyTimeout, arginfo_class_SQLite3_busyTimeout, ZEND_ACC_PUBLIC) -#ifndef SQLITE_OMIT_LOAD_EXTENSION - PHP_ME(sqlite3, loadExtension, arginfo_class_SQLite3_loadExtension, ZEND_ACC_PUBLIC) -#endif - PHP_ME(sqlite3, changes, arginfo_class_SQLite3_changes, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3, escapeString, arginfo_class_SQLite3_escapeString, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME(sqlite3, prepare, arginfo_class_SQLite3_prepare, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3, query, arginfo_class_SQLite3_query, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3, querySingle, arginfo_class_SQLite3_querySingle, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3, createFunction, arginfo_class_SQLite3_createFunction, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3, createAggregate, arginfo_class_SQLite3_createAggregate, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3, createCollation, arginfo_class_SQLite3_createCollation, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3, openBlob, arginfo_class_SQLite3_openBlob, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3, enableExceptions, arginfo_class_SQLite3_enableExceptions, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3, setAuthorizer, arginfo_class_SQLite3_setAuthorizer, ZEND_ACC_PUBLIC) -#if SQLITE_VERSION_NUMBER >= 3006011 - PHP_ME(sqlite3, backup, arginfo_class_SQLite3_backup, ZEND_ACC_PUBLIC) -#endif - /* Aliases */ - PHP_MALIAS(sqlite3, __construct, open, arginfo_class_SQLite3___construct, ZEND_ACC_PUBLIC) - PHP_FE_END -}; -/* }}} */ - -/* {{{ php_sqlite3_stmt_class_methods */ -static const zend_function_entry php_sqlite3_stmt_class_methods[] = { - PHP_ME(sqlite3stmt, paramCount, arginfo_class_SQLite3Stmt_paramCount, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3stmt, close, arginfo_class_SQLite3Stmt_close, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3stmt, reset, arginfo_class_SQLite3Stmt_reset, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3stmt, clear, arginfo_class_SQLite3Stmt_clear, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3stmt, execute, arginfo_class_SQLite3Stmt_execute, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3stmt, bindParam, arginfo_class_SQLite3Stmt_bindParam, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3stmt, bindValue, arginfo_class_SQLite3Stmt_bindValue, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3stmt, readOnly, arginfo_class_SQLite3Stmt_readOnly, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3stmt, getSQL, arginfo_class_SQLite3Stmt_getSQL, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3stmt, __construct, arginfo_class_SQLite3Stmt___construct, ZEND_ACC_PRIVATE) - PHP_FE_END -}; -/* }}} */ - -/* {{{ php_sqlite3_result_class_methods */ -static const zend_function_entry php_sqlite3_result_class_methods[] = { - PHP_ME(sqlite3result, numColumns, arginfo_class_SQLite3Result_numColumns, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3result, columnName, arginfo_class_SQLite3Result_columnName, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3result, columnType, arginfo_class_SQLite3Result_columnType, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3result, fetchArray, arginfo_class_SQLite3Result_fetchArray, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3result, reset, arginfo_class_SQLite3Result_reset, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3result, finalize, arginfo_class_SQLite3Result_finalize, ZEND_ACC_PUBLIC) - PHP_ME(sqlite3result, __construct, arginfo_class_SQLite3Result___construct, ZEND_ACC_PRIVATE) - PHP_FE_END -}; -/* }}} */ - /* {{{ Authorization Callback */ static int php_sqlite3_authorizer(void *autharg, int action, const char *arg1, const char *arg2, const char *arg3, const char *arg4) @@ -2499,7 +2435,7 @@ PHP_MINIT_FUNCTION(sqlite3) memcpy(&sqlite3_result_object_handlers, &std_object_handlers, sizeof(zend_object_handlers)); /* Register SQLite 3 Class */ - INIT_CLASS_ENTRY(ce, "SQLite3", php_sqlite3_class_methods); + INIT_CLASS_ENTRY(ce, "SQLite3", class_SQLite3_methods); ce.create_object = php_sqlite3_object_new; sqlite3_object_handlers.offset = XtOffsetOf(php_sqlite3_db_object, zo); sqlite3_object_handlers.clone_obj = NULL; @@ -2509,7 +2445,7 @@ PHP_MINIT_FUNCTION(sqlite3) php_sqlite3_sc_entry->unserialize = zend_class_unserialize_deny; /* Register SQLite 3 Prepared Statement Class */ - INIT_CLASS_ENTRY(ce, "SQLite3Stmt", php_sqlite3_stmt_class_methods); + INIT_CLASS_ENTRY(ce, "SQLite3Stmt", class_SQLite3Stmt_methods); ce.create_object = php_sqlite3_stmt_object_new; sqlite3_stmt_object_handlers.offset = XtOffsetOf(php_sqlite3_stmt, zo); sqlite3_stmt_object_handlers.clone_obj = NULL; @@ -2519,7 +2455,7 @@ PHP_MINIT_FUNCTION(sqlite3) php_sqlite3_stmt_entry->unserialize = zend_class_unserialize_deny; /* Register SQLite 3 Result Class */ - INIT_CLASS_ENTRY(ce, "SQLite3Result", php_sqlite3_result_class_methods); + INIT_CLASS_ENTRY(ce, "SQLite3Result", class_SQLite3Result_methods); ce.create_object = php_sqlite3_result_object_new; sqlite3_result_object_handlers.offset = XtOffsetOf(php_sqlite3_result, zo); sqlite3_result_object_handlers.clone_obj = NULL; diff --git a/ext/sqlite3/sqlite3.stub.php b/ext/sqlite3/sqlite3.stub.php index 18478d85b3ce0..42ba303b00b08 100644 --- a/ext/sqlite3/sqlite3.stub.php +++ b/ext/sqlite3/sqlite3.stub.php @@ -1,7 +1,10 @@ = 3006011 +ZEND_METHOD(SQLite3, backup); +#endif +ZEND_METHOD(SQLite3, escapeString); +ZEND_METHOD(SQLite3, prepare); +ZEND_METHOD(SQLite3, exec); +ZEND_METHOD(SQLite3, query); +ZEND_METHOD(SQLite3, querySingle); +ZEND_METHOD(SQLite3, createFunction); +ZEND_METHOD(SQLite3, createAggregate); +ZEND_METHOD(SQLite3, createCollation); +ZEND_METHOD(SQLite3, openBlob); +ZEND_METHOD(SQLite3, enableExceptions); +ZEND_METHOD(SQLite3, enableExtendedResultCodes); +ZEND_METHOD(SQLite3, setAuthorizer); +ZEND_METHOD(SQLite3Stmt, __construct); +ZEND_METHOD(SQLite3Stmt, bindParam); +ZEND_METHOD(SQLite3Stmt, bindValue); +ZEND_METHOD(SQLite3Stmt, clear); +ZEND_METHOD(SQLite3Stmt, close); +ZEND_METHOD(SQLite3Stmt, execute); +ZEND_METHOD(SQLite3Stmt, getSQL); +ZEND_METHOD(SQLite3Stmt, paramCount); +ZEND_METHOD(SQLite3Stmt, readOnly); +ZEND_METHOD(SQLite3Stmt, reset); +ZEND_METHOD(SQLite3Result, __construct); +ZEND_METHOD(SQLite3Result, numColumns); +ZEND_METHOD(SQLite3Result, columnName); +ZEND_METHOD(SQLite3Result, columnType); +ZEND_METHOD(SQLite3Result, fetchArray); +ZEND_METHOD(SQLite3Result, reset); +ZEND_METHOD(SQLite3Result, finalize); + + +static const zend_function_entry class_SQLite3_methods[] = { + ZEND_MALIAS(SQLite3, __construct, open, arginfo_class_SQLite3___construct, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3, open, arginfo_class_SQLite3_open, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3, close, arginfo_class_SQLite3_close, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3, version, arginfo_class_SQLite3_version, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(SQLite3, lastInsertRowID, arginfo_class_SQLite3_lastInsertRowID, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3, lastErrorCode, arginfo_class_SQLite3_lastErrorCode, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3, lastExtendedErrorCode, arginfo_class_SQLite3_lastExtendedErrorCode, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3, lastErrorMsg, arginfo_class_SQLite3_lastErrorMsg, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3, changes, arginfo_class_SQLite3_changes, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3, busyTimeout, arginfo_class_SQLite3_busyTimeout, ZEND_ACC_PUBLIC) +#if !defined(SQLITE_OMIT_LOAD_EXTENSION) + ZEND_ME(SQLite3, loadExtension, arginfo_class_SQLite3_loadExtension, ZEND_ACC_PUBLIC) +#endif +#if SQLITE_VERSION_NUMBER >= 3006011 + ZEND_ME(SQLite3, backup, arginfo_class_SQLite3_backup, ZEND_ACC_PUBLIC) +#endif + ZEND_ME(SQLite3, escapeString, arginfo_class_SQLite3_escapeString, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(SQLite3, prepare, arginfo_class_SQLite3_prepare, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3, exec, arginfo_class_SQLite3_exec, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3, query, arginfo_class_SQLite3_query, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3, querySingle, arginfo_class_SQLite3_querySingle, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3, createFunction, arginfo_class_SQLite3_createFunction, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3, createAggregate, arginfo_class_SQLite3_createAggregate, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3, createCollation, arginfo_class_SQLite3_createCollation, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3, openBlob, arginfo_class_SQLite3_openBlob, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3, enableExceptions, arginfo_class_SQLite3_enableExceptions, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3, enableExtendedResultCodes, arginfo_class_SQLite3_enableExtendedResultCodes, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3, setAuthorizer, arginfo_class_SQLite3_setAuthorizer, ZEND_ACC_PUBLIC) + ZEND_FE_END +}; + + +static const zend_function_entry class_SQLite3Stmt_methods[] = { + ZEND_ME(SQLite3Stmt, __construct, arginfo_class_SQLite3Stmt___construct, ZEND_ACC_PRIVATE) + ZEND_ME(SQLite3Stmt, bindParam, arginfo_class_SQLite3Stmt_bindParam, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3Stmt, bindValue, arginfo_class_SQLite3Stmt_bindValue, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3Stmt, clear, arginfo_class_SQLite3Stmt_clear, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3Stmt, close, arginfo_class_SQLite3Stmt_close, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3Stmt, execute, arginfo_class_SQLite3Stmt_execute, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3Stmt, getSQL, arginfo_class_SQLite3Stmt_getSQL, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3Stmt, paramCount, arginfo_class_SQLite3Stmt_paramCount, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3Stmt, readOnly, arginfo_class_SQLite3Stmt_readOnly, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3Stmt, reset, arginfo_class_SQLite3Stmt_reset, ZEND_ACC_PUBLIC) + ZEND_FE_END +}; + + +static const zend_function_entry class_SQLite3Result_methods[] = { + ZEND_ME(SQLite3Result, __construct, arginfo_class_SQLite3Result___construct, ZEND_ACC_PRIVATE) + ZEND_ME(SQLite3Result, numColumns, arginfo_class_SQLite3Result_numColumns, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3Result, columnName, arginfo_class_SQLite3Result_columnName, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3Result, columnType, arginfo_class_SQLite3Result_columnType, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3Result, fetchArray, arginfo_class_SQLite3Result_fetchArray, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3Result, reset, arginfo_class_SQLite3Result_reset, ZEND_ACC_PUBLIC) + ZEND_ME(SQLite3Result, finalize, arginfo_class_SQLite3Result_finalize, ZEND_ACC_PUBLIC) + ZEND_FE_END +}; From 9955230312c825c62f162bb0b77c0127aafd86e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sun, 19 Apr 2020 23:05:02 +0200 Subject: [PATCH 196/338] Fix order of ZPP in ext/sqlite3 --- ext/sqlite3/sqlite3.c | 99 ++++++++++++++++++++++--------------------- 1 file changed, 50 insertions(+), 49 deletions(-) diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c index aa104f3d8b42a..b978c49d80431 100644 --- a/ext/sqlite3/sqlite3.c +++ b/ext/sqlite3/sqlite3.c @@ -215,12 +215,12 @@ PHP_METHOD(SQLite3, exec) char *errtext = NULL; db_obj = Z_SQLITE3_DB_P(object); - SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "S", &sql)) { RETURN_THROWS(); } + SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) + if (sqlite3_exec(db_obj->db, ZSTR_VAL(sql), NULL, NULL, &errtext) != SQLITE_OK) { php_sqlite3_error(db_obj, "%s", errtext); sqlite3_free(errtext); @@ -256,12 +256,12 @@ PHP_METHOD(SQLite3, lastInsertRowID) zval *object = ZEND_THIS; db_obj = Z_SQLITE3_DB_P(object); - SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) - if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } + SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) + RETURN_LONG((zend_long) sqlite3_last_insert_rowid(db_obj->db)); } /* }}} */ @@ -274,12 +274,12 @@ PHP_METHOD(SQLite3, lastErrorCode) zval *object = ZEND_THIS; db_obj = Z_SQLITE3_DB_P(object); - SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->db, SQLite3) - if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } + SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->db, SQLite3) + if (db_obj->initialised) { RETURN_LONG(sqlite3_errcode(db_obj->db)); } else { @@ -296,12 +296,12 @@ PHP_METHOD(SQLite3, lastExtendedErrorCode) zval *object = ZEND_THIS; db_obj = Z_SQLITE3_DB_P(object); - SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->db, SQLite3) - if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } + SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->db, SQLite3) + if (db_obj->initialised) { RETURN_LONG(sqlite3_extended_errcode(db_obj->db)); } else { @@ -320,12 +320,12 @@ PHP_METHOD(SQLite3, enableExtendedResultCodes) db_obj = Z_SQLITE3_DB_P(object); int ret; - SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->db, SQLite3) - if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &enable) == FAILURE) { RETURN_THROWS(); } + SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->db, SQLite3) + if (db_obj->initialised) { ret = sqlite3_extended_result_codes(db_obj->db, enable ? 1 : 0); if (ret == SQLITE_OK) @@ -346,12 +346,12 @@ PHP_METHOD(SQLite3, lastErrorMsg) zval *object = ZEND_THIS; db_obj = Z_SQLITE3_DB_P(object); - SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->db, SQLite3) - if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } + SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->db, SQLite3) + if (db_obj->initialised) { RETURN_STRING((char *)sqlite3_errmsg(db_obj->db)); } else { @@ -372,12 +372,12 @@ PHP_METHOD(SQLite3, busyTimeout) #endif db_obj = Z_SQLITE3_DB_P(object); - SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "l", &ms)) { RETURN_THROWS(); } + SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) + #ifdef SQLITE_ENABLE_API_ARMOR return_code = sqlite3_busy_timeout(db_obj->db, ms); if (return_code != SQLITE_OK) { @@ -405,12 +405,12 @@ PHP_METHOD(SQLite3, loadExtension) size_t extension_len, extension_dir_len; db_obj = Z_SQLITE3_DB_P(object); - SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "s", &extension, &extension_len)) { RETURN_THROWS(); } + SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) + #ifdef ZTS if ((strncmp(sapi_module.name, "cgi", 3) != 0) && (strcmp(sapi_module.name, "cli") != 0) && @@ -475,12 +475,12 @@ PHP_METHOD(SQLite3, changes) zval *object = ZEND_THIS; db_obj = Z_SQLITE3_DB_P(object); - SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) - if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } + SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) + RETURN_LONG(sqlite3_changes(db_obj->db)); } /* }}} */ @@ -521,12 +521,12 @@ PHP_METHOD(SQLite3, prepare) db_obj = Z_SQLITE3_DB_P(object); - SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "S", &sql)) { RETURN_THROWS(); } + SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) + if (!ZSTR_LEN(sql)) { RETURN_FALSE; } @@ -568,12 +568,12 @@ PHP_METHOD(SQLite3, query) int return_code; db_obj = Z_SQLITE3_DB_P(object); - SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "S", &sql)) { RETURN_THROWS(); } + SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) + if (!ZSTR_LEN(sql)) { RETURN_FALSE; } @@ -684,12 +684,12 @@ PHP_METHOD(SQLite3, querySingle) sqlite3_stmt *stmt; db_obj = Z_SQLITE3_DB_P(object); - SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "S|b", &sql, &entire_row)) { RETURN_THROWS(); } + SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) + if (!ZSTR_LEN(sql)) { RETURN_FALSE; } @@ -978,12 +978,12 @@ PHP_METHOD(SQLite3, createFunction) zend_long flags = 0; db_obj = Z_SQLITE3_DB_P(object); - SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) - if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz|ll", &sql_func, &sql_func_len, &callback_func, &sql_func_num_args, &flags) == FAILURE) { RETURN_THROWS(); } + SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) + if (!sql_func_len) { RETURN_FALSE; } @@ -1027,12 +1027,12 @@ PHP_METHOD(SQLite3, createAggregate) zend_long sql_func_num_args = -1; db_obj = Z_SQLITE3_DB_P(object); - SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) - if (zend_parse_parameters(ZEND_NUM_ARGS(), "szz|l", &sql_func, &sql_func_len, &step_callback, &fini_callback, &sql_func_num_args) == FAILURE) { RETURN_THROWS(); } + SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) + if (!sql_func_len) { RETURN_FALSE; } @@ -1083,12 +1083,12 @@ PHP_METHOD(SQLite3, createCollation) zval *callback_func; db_obj = Z_SQLITE3_DB_P(object); - SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) - if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &collation_name, &collation_name_len, &callback_func) == FAILURE) { RETURN_THROWS(); } + SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) + if (!collation_name_len) { RETURN_FALSE; } @@ -1292,8 +1292,6 @@ PHP_METHOD(SQLite3, openBlob) db_obj = Z_SQLITE3_DB_P(object); - SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) - if (zend_parse_parameters(ZEND_NUM_ARGS(), "ssl|sl", &table, &table_len, &column, &column_len, &rowid, &dbname, &dbname_len, &flags) == FAILURE) { RETURN_THROWS(); } @@ -1303,6 +1301,8 @@ PHP_METHOD(SQLite3, openBlob) RETURN_THROWS(); } + SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) + sqlite_flags = (flags & SQLITE_OPEN_READWRITE) ? 1 : 0; if (sqlite3_blob_open(db_obj->db, dbname, table, column, rowid, sqlite_flags, &blob) != SQLITE_OK) { @@ -1360,12 +1360,12 @@ PHP_METHOD(SQLite3, setAuthorizer) zend_fcall_info fci; zend_fcall_info_cache fcc; - SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) - ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_FUNC_EX(fci, fcc, 1, 0) ZEND_PARSE_PARAMETERS_END(); + SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) + /* Clear previously set callback */ if (ZEND_FCI_INITIALIZED(db_obj->authorizer_fci)) { zval_ptr_dtor(&db_obj->authorizer_fci.function_name); @@ -1398,9 +1398,6 @@ PHP_METHOD(SQLite3, backup) sqlite3_backup *dbBackup; int rc; // Return code - source_obj = Z_SQLITE3_DB_P(source_zval); - SQLITE3_CHECK_INITIALIZED(source_obj, source_obj->initialised, SQLite3) - if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|ss", &destination_zval, php_sqlite3_sc_entry, &source_dbname, &source_dbname_length, &destination_dbname, &destination_dbname_length) == FAILURE) { RETURN_THROWS(); } @@ -1415,6 +1412,9 @@ PHP_METHOD(SQLite3, backup) RETURN_THROWS(); } + source_obj = Z_SQLITE3_DB_P(source_zval); + SQLITE3_CHECK_INITIALIZED(source_obj, source_obj->initialised, SQLite3) + destination_obj = Z_SQLITE3_DB_P(destination_zval); SQLITE3_CHECK_INITIALIZED(destination_obj, destination_obj->initialised, SQLite3) @@ -1957,12 +1957,12 @@ PHP_METHOD(SQLite3Result, numColumns) zval *object = ZEND_THIS; result_obj = Z_SQLITE3_RESULT_P(object); - SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result) - if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } + SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result) + RETURN_LONG(sqlite3_column_count(result_obj->stmt_obj->stmt)); } /* }}} */ @@ -1977,11 +1977,12 @@ PHP_METHOD(SQLite3Result, columnName) char *column_name; result_obj = Z_SQLITE3_RESULT_P(object); - SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result) - if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &column) == FAILURE) { RETURN_THROWS(); } + + SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result) + column_name = (char*) sqlite3_column_name(result_obj->stmt_obj->stmt, column); if (column_name == NULL) { @@ -2001,12 +2002,12 @@ PHP_METHOD(SQLite3Result, columnType) zend_long column = 0; result_obj = Z_SQLITE3_RESULT_P(object); - SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result) - if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &column) == FAILURE) { RETURN_THROWS(); } + SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result) + if (!sqlite3_data_count(result_obj->stmt_obj->stmt)) { RETURN_FALSE; } @@ -2025,12 +2026,12 @@ PHP_METHOD(SQLite3Result, fetchArray) zend_long mode = PHP_SQLITE3_BOTH; result_obj = Z_SQLITE3_RESULT_P(object); - SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result) - if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &mode) == FAILURE) { RETURN_THROWS(); } + SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result) + ret = sqlite3_step(result_obj->stmt_obj->stmt); switch (ret) { case SQLITE_ROW: @@ -2079,12 +2080,12 @@ PHP_METHOD(SQLite3Result, reset) zval *object = ZEND_THIS; result_obj = Z_SQLITE3_RESULT_P(object); - SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result) - if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } + SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result) + if (sqlite3_reset(result_obj->stmt_obj->stmt) != SQLITE_OK) { RETURN_FALSE; } @@ -2101,12 +2102,12 @@ PHP_METHOD(SQLite3Result, finalize) zval *object = ZEND_THIS; result_obj = Z_SQLITE3_RESULT_P(object); - SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result) - if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } + SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result) + /* We need to finalize an internal statement */ if (result_obj->is_prepared_statement == 0) { zend_llist_del_element(&(result_obj->db_obj->free_list), &result_obj->stmt_obj_zval, From f62571c121ce2874858b5e7dd33642755ee9309c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 20 Apr 2020 10:46:20 +0200 Subject: [PATCH 197/338] Apply doc root fix for FPM This is the change from GH-5417 but for FPM. This was stripping the last character from the doc_root. Given how it is used, this should be harmless, but let's make it less confusing... --- sapi/fpm/fpm/fpm_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index 65890f9fdfb44..85d83593f33d4 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -627,7 +627,7 @@ static void sapi_cgi_log_message(char *message, int syslog_type_int) /* {{{ php_cgi_ini_activate_user_config */ -static void php_cgi_ini_activate_user_config(char *path, int path_len, const char *doc_root, int doc_root_len, int start) +static void php_cgi_ini_activate_user_config(char *path, int path_len, const char *doc_root, int doc_root_len) { char *ptr; time_t request_time = sapi_get_request_time(); @@ -677,7 +677,7 @@ static void php_cgi_ini_activate_user_config(char *path, int path_len, const cha to find more user.ini, if not we only scan the current path. */ if (strncmp(s1, s2, s_len) == 0) { - ptr = s2 + start; /* start is the point where doc_root ends! */ + ptr = s2 + doc_root_len; while ((ptr = strchr(ptr, DEFAULT_SLASH)) != NULL) { *ptr = 0; php_parse_user_ini_file(path, PG(user_ini_filename), entry->user_config); @@ -751,7 +751,7 @@ static int sapi_cgi_activate(void) /* {{{ */ --doc_root_len; } - php_cgi_ini_activate_user_config(path, path_len, doc_root, doc_root_len, doc_root_len - 1); + php_cgi_ini_activate_user_config(path, path_len, doc_root, doc_root_len); } } From fa10abd6d75aeb9fde1f53cf80116e39577a4555 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sun, 19 Apr 2020 14:22:24 +0200 Subject: [PATCH 198/338] Fix #79491: Search for .user.ini extends up to root dir The `start` parameter of `php_cgi_ini_activate_user_config` is supposed to hold the byte offset of the doc root in the given `path`. However, the current expression which fixes a potential type incompatibility will ever only evaluate to zero or one, because it uses the *logical* and operator (`&&`). Furthermore we notice that subtracting one from `doc_root_len` is not necessary, so there is even no need for the `start` parameter at all. --- NEWS | 3 +++ sapi/cgi/cgi_main.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 8f00881b2956b..84b0a46b1a115 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,9 @@ PHP NEWS . Fixed bug #78221 (DOMNode::normalize() doesn't remove empty text nodes). (cmb) +- FCGI: + . Fixed bug #79491 (Search for .user.ini extends up to root dir). (cmb) + - MBString: . Fixed bug #79441 (Segfault in mb_chr() if internal encoding is unsupported). (Girgias) diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index d6449ba228586..8c8e1463d5529 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -789,7 +789,7 @@ static void sapi_cgi_log_message(char *message, int syslog_type_int) /* {{{ php_cgi_ini_activate_user_config */ -static void php_cgi_ini_activate_user_config(char *path, size_t path_len, const char *doc_root, size_t doc_root_len, int start) +static void php_cgi_ini_activate_user_config(char *path, size_t path_len, const char *doc_root, size_t doc_root_len) { user_config_cache_entry *new_entry, *entry; time_t request_time = (time_t)sapi_get_request_time(); @@ -842,7 +842,7 @@ static void php_cgi_ini_activate_user_config(char *path, size_t path_len, const #else if (strncmp(s1, s2, s_len) == 0) { #endif - char *ptr = s2 + start; /* start is the point where doc_root ends! */ + char *ptr = s2 + doc_root_len; while ((ptr = strchr(ptr, DEFAULT_SLASH)) != NULL) { *ptr = 0; php_parse_user_ini_file(path, PG(user_ini_filename), entry->user_config); @@ -938,7 +938,7 @@ static int sapi_cgi_activate(void) doc_root = estrndup(doc_root, doc_root_len); zend_str_tolower(doc_root, doc_root_len); #endif - php_cgi_ini_activate_user_config(path, path_len, doc_root, doc_root_len, (doc_root_len > 0 && (doc_root_len - 1))); + php_cgi_ini_activate_user_config(path, path_len, doc_root, doc_root_len); #ifdef PHP_WIN32 efree(doc_root); From 0d11d373574a7f831db6e3a7add60f2bbe28413f Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 15 Apr 2020 15:25:14 +0200 Subject: [PATCH 199/338] Fix bug #67369 ArrayObject serializatino drops the iterator class When ArrayObject is round-tripped through serialize() and unserialize(), it forgets any iterator class name which was set using ::setIteratorClass(). Fix that. --- NEWS | 2 + ext/spl/spl_array.c | 40 ++++++++++++++++--- ...bject__serialize_saves_iterator_class.phpt | 15 +++++++ ext/spl/tests/array_025.phpt | 2 +- ext/spl/tests/bug45826.phpt | 12 +++--- ext/spl/tests/bug74669.phpt | 2 +- ext/spl/tests/unserialize_errors.phpt | 27 ++++++++++++- ext/standard/tests/serialize/bug45706.phpt | 4 +- 8 files changed, 90 insertions(+), 14 deletions(-) create mode 100644 ext/spl/tests/ArrayObject__serialize_saves_iterator_class.phpt diff --git a/NEWS b/NEWS index 034da7c676eab..60781fc2eba68 100644 --- a/NEWS +++ b/NEWS @@ -28,6 +28,8 @@ PHP NEWS - SPL: . Fixed bug #69264 (__debugInfo() ignored while extending SPL classes). (cmb) + . Fixed bug #67369 (ArrayObject serialization drops the iterator class). + (Alex Dowad) - Standard: . Fixed bug #79468 (SIGSEGV when closing stream handle with a stream filter diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index 3803055d3023c..5f70bfe7a03b7 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -1840,6 +1840,14 @@ SPL_METHOD(Array, __serialize) ZVAL_ARR(&tmp, zend_std_get_properties(ZEND_THIS)); Z_TRY_ADDREF(tmp); zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &tmp); + + /* iterator class */ + if (intern->ce_get_iterator == spl_ce_ArrayIterator) { + ZVAL_NULL(&tmp); + } else { + ZVAL_STR_COPY(&tmp, intern->ce_get_iterator->name); + } + zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &tmp); } /* }}} */ @@ -1849,18 +1857,22 @@ SPL_METHOD(Array, __unserialize) { spl_array_object *intern = Z_SPLARRAY_P(ZEND_THIS); HashTable *data; - zval *flags_zv, *storage_zv, *members_zv; + zval *flags_zv, *storage_zv, *members_zv, *iterator_class_zv; zend_long flags; if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "h", &data) == FAILURE) { return; } - flags_zv = zend_hash_index_find(data, 0); - storage_zv = zend_hash_index_find(data, 1); - members_zv = zend_hash_index_find(data, 2); + flags_zv = zend_hash_index_find(data, 0); + storage_zv = zend_hash_index_find(data, 1); + members_zv = zend_hash_index_find(data, 2); + iterator_class_zv = zend_hash_index_find(data, 3); + if (!flags_zv || !storage_zv || !members_zv || - Z_TYPE_P(flags_zv) != IS_LONG || Z_TYPE_P(members_zv) != IS_ARRAY) { + Z_TYPE_P(flags_zv) != IS_LONG || Z_TYPE_P(members_zv) != IS_ARRAY || + (iterator_class_zv && (Z_TYPE_P(iterator_class_zv) != IS_NULL && + Z_TYPE_P(iterator_class_zv) != IS_STRING))) { zend_throw_exception(spl_ce_UnexpectedValueException, "Incomplete or ill-typed serialization data", 0); return; @@ -1878,6 +1890,24 @@ SPL_METHOD(Array, __unserialize) } object_properties_load(&intern->std, Z_ARRVAL_P(members_zv)); + + if (iterator_class_zv && Z_TYPE_P(iterator_class_zv) == IS_STRING) { + zend_class_entry *ce = zend_lookup_class(Z_STR_P(iterator_class_zv)); + + if (!ce) { + zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, + "Cannot deserialize ArrayObject with iterator class '%s'; no such class exists", + ZSTR_VAL(Z_STR_P(iterator_class_zv))); + return; + } else if (!instanceof_function(ce, spl_ce_Iterator)) { + zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, + "Cannot deserialize ArrayObject with iterator class '%s'; this class does not implement the Iterator interface", + ZSTR_VAL(Z_STR_P(iterator_class_zv))); + return; + } else { + intern->ce_get_iterator = ce; + } + } } /* }}} */ diff --git a/ext/spl/tests/ArrayObject__serialize_saves_iterator_class.phpt b/ext/spl/tests/ArrayObject__serialize_saves_iterator_class.phpt new file mode 100644 index 0000000000000..9947311ea57f4 --- /dev/null +++ b/ext/spl/tests/ArrayObject__serialize_saves_iterator_class.phpt @@ -0,0 +1,15 @@ +--TEST-- +ArrayObject::__serialize saves any iterator class set by ::setIteratorClass +--FILE-- +setIteratorClass("MyArrayIterator"); +$serialized = serialize($arrayObject); +$backAgain = unserialize($serialized); +echo $backAgain->getIteratorClass(), "\n"; + +?> +--EXPECT-- +MyArrayIterator diff --git a/ext/spl/tests/array_025.phpt b/ext/spl/tests/array_025.phpt index 9a95de60eb48d..d64f8f04c1e14 100644 --- a/ext/spl/tests/array_025.phpt +++ b/ext/spl/tests/array_025.phpt @@ -24,7 +24,7 @@ ArrayObject Object ) ) -O:11:"ArrayObject":3:{i:0;i:0;i:1;O:11:"ArrayObject":3:{i:0;i:0;i:1;a:2:{i:0;i:1;i:1;i:2;}i:2;a:0:{}}i:2;a:0:{}} +O:11:"ArrayObject":4:{i:0;i:0;i:1;O:11:"ArrayObject":4:{i:0;i:0;i:1;a:2:{i:0;i:1;i:1;i:2;}i:2;a:0:{}i:3;N;}i:2;a:0:{}i:3;N;} ArrayObject Object ( [storage:ArrayObject:private] => ArrayObject Object diff --git a/ext/spl/tests/bug45826.phpt b/ext/spl/tests/bug45826.phpt index 8187b3a3203aa..d4e6653306ffb 100644 --- a/ext/spl/tests/bug45826.phpt +++ b/ext/spl/tests/bug45826.phpt @@ -16,7 +16,7 @@ $s2 = $o->serialize(); var_dump($s1); var_dump($s2); -$o1 =unserialize($s1); +$o1 = unserialize($s1); var_dump($o1[0] === $o1[1]); var_dump($o1[2] === $o1); @@ -69,8 +69,8 @@ var_dump($o2[2][2] === $o2[2]); --EXPECT-- bool(true) bool(true) -string(90) "O:11:"ArrayObject":3:{i:0;i:0;i:1;a:3:{i:0;O:8:"stdClass":0:{}i:1;r:4;i:2;r:1;}i:2;a:0:{}}" -string(131) "x:i:0;a:3:{i:0;O:8:"stdClass":0:{}i:1;r:3;i:2;O:11:"ArrayObject":3:{i:0;i:0;i:1;a:3:{i:0;r:3;i:1;r:3;i:2;r:5;}i:2;a:0:{}}};m:a:0:{}" +string(96) "O:11:"ArrayObject":4:{i:0;i:0;i:1;a:3:{i:0;O:8:"stdClass":0:{}i:1;r:4;i:2;r:1;}i:2;a:0:{}i:3;N;}" +string(137) "x:i:0;a:3:{i:0;O:8:"stdClass":0:{}i:1;r:3;i:2;O:11:"ArrayObject":4:{i:0;i:0;i:1;a:3:{i:0;r:3;i:1;r:3;i:2;r:5;}i:2;a:0:{}i:3;N;}};m:a:0:{}" bool(true) bool(true) bool(true) @@ -79,8 +79,8 @@ bool(true) #### Extending ArrayObject bool(true) bool(true) -string(91) "O:12:"ArrayObject2":3:{i:0;i:0;i:1;a:3:{i:0;O:8:"stdClass":0:{}i:1;r:4;i:2;r:1;}i:2;a:0:{}}" -array(3) { +string(97) "O:12:"ArrayObject2":4:{i:0;i:0;i:1;a:3:{i:0;O:8:"stdClass":0:{}i:1;r:4;i:2;r:1;}i:2;a:0:{}i:3;N;}" +array(4) { [0]=> int(0) [1]=> @@ -100,6 +100,8 @@ array(3) { [2]=> array(0) { } + [3]=> + NULL } bool(true) bool(true) diff --git a/ext/spl/tests/bug74669.phpt b/ext/spl/tests/bug74669.phpt index 264cd3b97a358..6b4ceec65cda0 100644 --- a/ext/spl/tests/bug74669.phpt +++ b/ext/spl/tests/bug74669.phpt @@ -104,7 +104,7 @@ object(SelfArray)#9 (1) { ["foo"]=> string(3) "bar" } -string(71) "O:9:"SelfArray":3:{i:0;i:16777216;i:1;N;i:2;a:1:{s:3:"foo";s:3:"bar";}}" +string(77) "O:9:"SelfArray":4:{i:0;i:16777216;i:1;N;i:2;a:1:{s:3:"foo";s:3:"bar";}i:3;N;}" object(SelfArray)#9 (1) { ["foo"]=> string(3) "bar" diff --git a/ext/spl/tests/unserialize_errors.phpt b/ext/spl/tests/unserialize_errors.phpt index 237d0673c46be..1138b5c8cd542 100644 --- a/ext/spl/tests/unserialize_errors.phpt +++ b/ext/spl/tests/unserialize_errors.phpt @@ -6,6 +6,7 @@ Errors from __unserialize() with invalid data echo "ArrayObject:\n"; try { + // empty array unserialize('O:11:"ArrayObject":0:{}'); } catch (Exception $e) { echo $e->getMessage(), "\n"; @@ -29,6 +30,27 @@ try { echo $e->getMessage(), "\n"; } +try { + // iterator class name is not a string + unserialize('O:11:"ArrayObject":4:{i:0;i:0;i:1;i:0;i:2;a:0:{}i:3;i:0;}'); +} catch (Exception $e) { + echo $e->getMessage(), "\n"; +} + +try { + unserialize('O:11:"ArrayObject":4:{i:0;i:0;i:1;a:2:{i:0;i:1;i:1;i:2;}i:2;a:0:{}i:3;s:11:"NonExistent";}'); +} catch (Exception $e) { + echo $e->getMessage(), "\n"; +} + +class Existent {} + +try { + unserialize('O:11:"ArrayObject":4:{i:0;i:0;i:1;a:2:{i:0;i:1;i:1;i:2;}i:2;a:0:{}i:3;s:8:"Existent";}'); +} catch (Exception $e) { + echo $e->getMessage(), "\n"; +} + echo "ArrayIterator:\n"; try { @@ -114,12 +136,15 @@ try { } ?> ---EXPECTF-- +--EXPECT-- ArrayObject: Incomplete or ill-typed serialization data Incomplete or ill-typed serialization data Incomplete or ill-typed serialization data Passed variable is not an array or object +Incomplete or ill-typed serialization data +Cannot deserialize ArrayObject with iterator class 'NonExistent'; no such class exists +Cannot deserialize ArrayObject with iterator class 'Existent'; this class does not implement the Iterator interface ArrayIterator: Incomplete or ill-typed serialization data Incomplete or ill-typed serialization data diff --git a/ext/standard/tests/serialize/bug45706.phpt b/ext/standard/tests/serialize/bug45706.phpt index 12cadfe0fa87f..cc71dec4e634d 100644 --- a/ext/standard/tests/serialize/bug45706.phpt +++ b/ext/standard/tests/serialize/bug45706.phpt @@ -15,7 +15,7 @@ var_dump($y); --EXPECTF-- array(2) { [0]=> - object(__PHP_Incomplete_Class)#3 (4) { + object(__PHP_Incomplete_Class)#3 (5) { ["__PHP_Incomplete_Class_Name"]=> string(4) "Bar1" ["0"]=> @@ -26,6 +26,8 @@ array(2) { ["2"]=> array(0) { } + ["3"]=> + NULL } [1]=> object(__PHP_Incomplete_Class)#4 (1) { From 5c404915679015b828c036e22db5de096d1cff50 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 20 Apr 2020 12:07:46 +0200 Subject: [PATCH 200/338] Fix file name clash in touch_variation1.phpt --- ext/standard/tests/file/touch_variation1.phpt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ext/standard/tests/file/touch_variation1.phpt b/ext/standard/tests/file/touch_variation1.phpt index 01599cfcf68d1..2169141c58a33 100644 --- a/ext/standard/tests/file/touch_variation1.phpt +++ b/ext/standard/tests/file/touch_variation1.phpt @@ -11,8 +11,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { --FILE-- Date: Fri, 17 Apr 2020 00:09:15 +0200 Subject: [PATCH 201/338] Improve a last couple of argument error messages Closes GH-5404 --- ext/dba/dba.c | 2 +- ext/dba/tests/dba013.phpt | 2 +- ext/dba/tests/dba014.phpt | 2 +- ext/dom/document.c | 2 +- ext/ffi/ffi.c | 2 +- ext/hash/hash.c | 12 +++++----- ext/hash/tests/reuse.phpt | 2 +- ext/mbstring/mbstring.c | 2 +- .../tests/mb_decode_numericentity.phpt | 2 +- .../tests/mb_encode_numericentity.phpt | 2 +- ext/standard/array.c | 18 +++++++------- ext/standard/basic_functions.c | 2 +- ext/standard/dir.c | 2 +- ext/standard/file.c | 2 +- ext/standard/math.c | 4 ++-- ext/standard/mt_rand.c | 2 +- ext/standard/proc_open.c | 4 ++-- ext/standard/streamsfuncs.c | 2 +- ext/standard/string.c | 6 ++--- ext/standard/tests/array/array_chunk2.phpt | 4 ++-- .../tests/array/array_chunk_variation5.phpt | 12 +++++----- .../tests/array/array_combine_error2.phpt | 6 ++--- .../tests/array/array_fill_error.phpt | 2 +- ext/standard/tests/array/array_pad.phpt | 2 +- ext/standard/tests/array/array_rand.phpt | 10 ++++---- .../tests/array/array_rand_variation5.phpt | 8 +++---- .../tests/array/extract_error_variation1.phpt | 2 +- ext/standard/tests/array/range_errors.phpt | 22 ++++++++--------- .../tests/dir/readdir_variation7.phpt | 2 +- ext/standard/tests/file/flock.phpt | 2 +- ext/standard/tests/file/flock_error.phpt | 8 +++---- .../tests/general_functions/bug46587.phpt | 2 +- .../general_functions/proc_open_array.phpt | 2 +- .../general_functions/proc_open_pipes3.phpt | 2 +- .../register_tick_function_error.phpt | 2 +- .../tests/math/base_convert_error.phpt | 4 ++-- ext/standard/tests/strings/explode.phpt | 8 +++---- ext/standard/tests/strings/explode1.phpt | 24 +++++++++---------- ext/standard/tests/strings/wordwrap.phpt | 2 +- .../tests/strings/wordwrap_error.phpt | 2 +- sapi/phpdbg/phpdbg.c | 2 +- win32/signal.c | 10 ++++---- 42 files changed, 105 insertions(+), 107 deletions(-) diff --git a/ext/dba/dba.c b/ext/dba/dba.c index 4e26157050067..01fffa3259bf9 100644 --- a/ext/dba/dba.c +++ b/ext/dba/dba.c @@ -107,7 +107,7 @@ static size_t php_dba_make_key(zval *key, char **key_str, char **key_free) size_t len; if (zend_hash_num_elements(Z_ARRVAL_P(key)) != 2) { - zend_throw_error(NULL, "Key does not have exactly two elements: (key, name)"); + zend_argument_error(NULL, 1, "must have exactly two elements: 'key' and 'name'"); return 0; } zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(key), &pos); diff --git a/ext/dba/tests/dba013.phpt b/ext/dba/tests/dba013.phpt index 8a446cf9a8f2e..1871ce9cad865 100644 --- a/ext/dba/tests/dba013.phpt +++ b/ext/dba/tests/dba013.phpt @@ -24,7 +24,7 @@ require(__DIR__ .'/clean.inc'); --EXPECTF-- database handler: %s -Fatal error: Uncaught Error: Key does not have exactly two elements: (key, name) in %sdba013.php:6 +Fatal error: Uncaught Error: dba_insert(): Argument #1 ($key) must have exactly two elements: 'key' and 'name' in %s.php:%d Stack trace: #0 %sdba013.php(6): dba_insert(Array, '%s', Resource id #%d) #1 {main} diff --git a/ext/dba/tests/dba014.phpt b/ext/dba/tests/dba014.phpt index 410c3af3c1723..2b7c2b7b25b0b 100644 --- a/ext/dba/tests/dba014.phpt +++ b/ext/dba/tests/dba014.phpt @@ -24,7 +24,7 @@ require(__DIR__ .'/clean.inc'); --EXPECTF-- database handler: %s -Fatal error: Uncaught Error: Key does not have exactly two elements: (key, name) in %sdba014.php:6 +Fatal error: Uncaught Error: dba_insert(): Argument #1 ($key) must have exactly two elements: 'key' and 'name' in %s.php:%d Stack trace: #0 %sdba014.php(6): dba_insert(Array, '%s', Resource id #%d) #1 {main} diff --git a/ext/dom/document.c b/ext/dom/document.c index 6d037a7f77764..919c59408685d 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -2082,7 +2082,7 @@ PHP_METHOD(DOMDocument, registerNodeClass) RETURN_TRUE; } - zend_throw_error(NULL, "Class %s is not derived from %s.", ZSTR_VAL(ce->name), ZSTR_VAL(basece->name)); + zend_argument_error(NULL, 2, "must be a class name derived from %s or null, '%s' given", ZSTR_VAL(basece->name), ZSTR_VAL(ce->name)); } /* }}} */ diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c index ba1130a64eec0..55c1b7093bfd3 100644 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@ -993,7 +993,7 @@ static zval *zend_ffi_cdata_get(zend_object *obj, zend_string *member, int read_ #endif if (UNEXPECTED(!zend_string_equals_literal(member, "cdata"))) { - zend_throw_error(zend_ffi_exception_ce, "only 'cdata' property may be read"); + zend_throw_error(zend_ffi_exception_ce, "Only 'cdata' property may be read"); return &EG(uninitialized_zval);; } diff --git a/ext/hash/hash.c b/ext/hash/hash.c index 7350572d0a73d..25c816d47a2c6 100644 --- a/ext/hash/hash.c +++ b/ext/hash/hash.c @@ -410,9 +410,9 @@ PHP_FUNCTION(hash_init) } /* }}} */ -#define PHP_HASHCONTEXT_VERIFY(func, hash) { \ +#define PHP_HASHCONTEXT_VERIFY(hash) { \ if (!hash->context) { \ - zend_throw_error(NULL, "%s(): supplied resource is not a valid Hash Context resource", func); \ + zend_argument_type_error(1, "must be a valid Hash Context resource"); \ RETURN_THROWS(); \ } \ } @@ -430,7 +430,7 @@ PHP_FUNCTION(hash_update) } hash = php_hashcontext_from_object(Z_OBJ_P(zhash)); - PHP_HASHCONTEXT_VERIFY("hash_update", hash); + PHP_HASHCONTEXT_VERIFY(hash); hash->ops->hash_update(hash->context, (unsigned char *) ZSTR_VAL(data), ZSTR_LEN(data)); RETURN_TRUE; @@ -451,7 +451,7 @@ PHP_FUNCTION(hash_update_stream) } hash = php_hashcontext_from_object(Z_OBJ_P(zhash)); - PHP_HASHCONTEXT_VERIFY("hash_update_stream", hash); + PHP_HASHCONTEXT_VERIFY(hash); php_stream_from_zval(stream, zstream); while (length) { @@ -492,7 +492,7 @@ PHP_FUNCTION(hash_update_file) } hash = php_hashcontext_from_object(Z_OBJ_P(zhash)); - PHP_HASHCONTEXT_VERIFY("hash_update_file", hash); + PHP_HASHCONTEXT_VERIFY(hash); context = php_stream_context_from_zval(zcontext, 0); stream = php_stream_open_wrapper_ex(ZSTR_VAL(filename), "rb", REPORT_ERRORS, NULL, context); @@ -525,7 +525,7 @@ PHP_FUNCTION(hash_final) } hash = php_hashcontext_from_object(Z_OBJ_P(zhash)); - PHP_HASHCONTEXT_VERIFY("hash_final", hash); + PHP_HASHCONTEXT_VERIFY(hash); digest_len = hash->ops->digest_size; digest = zend_string_alloc(digest_len, 0); diff --git a/ext/hash/tests/reuse.phpt b/ext/hash/tests/reuse.phpt index 78df4b41afea9..2b99801ebfd6e 100644 --- a/ext/hash/tests/reuse.phpt +++ b/ext/hash/tests/reuse.phpt @@ -13,4 +13,4 @@ catch (\Error $e) { } --EXPECT-- -hash_update(): supplied resource is not a valid Hash Context resource +hash_update(): Argument #1 ($context) must be a valid Hash Context resource diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 163943cddff6d..652027f4c5fba 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -3333,7 +3333,7 @@ php_mb_numericentity_exec(INTERNAL_FUNCTION_PARAMETERS, int type) /* conversion map */ i = zend_hash_num_elements(target_hash); if (i % 4 != 0) { - zend_value_error("count($convmap) must be a multiple of 4"); + zend_argument_value_error(2, "must have a multiple of 4 elements"); RETURN_THROWS(); } convmap = (int *)safe_emalloc(i, sizeof(int), 0); diff --git a/ext/mbstring/tests/mb_decode_numericentity.phpt b/ext/mbstring/tests/mb_decode_numericentity.phpt index 868554df31db4..00ef79306567a 100644 --- a/ext/mbstring/tests/mb_decode_numericentity.phpt +++ b/ext/mbstring/tests/mb_decode_numericentity.phpt @@ -42,4 +42,4 @@ aÅ’bÅ“cÅ dÅ¡e€fg � � föo -count($convmap) must be a multiple of 4 +mb_decode_numericentity(): Argument #2 ($convmap) must have a multiple of 4 elements diff --git a/ext/mbstring/tests/mb_encode_numericentity.phpt b/ext/mbstring/tests/mb_encode_numericentity.phpt index 3f14bfd48b117..f7e8002383a2b 100644 --- a/ext/mbstring/tests/mb_encode_numericentity.phpt +++ b/ext/mbstring/tests/mb_encode_numericentity.phpt @@ -31,4 +31,4 @@ try { ƒΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρςστυφχψωϑϒϖ•…′″‾⁄℘ℑℜ™ℵ←↑→↓↔↵⇐⇑⇒⇓⇔∀∂∃∅∇∈∉∋∏∑−∗√∝∞∠∧∨∩∪∫∴∼≅≈≠≡≤≥⊂⊃⊄⊆⊇⊕⊗⊥⋅⌈⌉⌊⌋〈〉◊♠♣♥♦ aŒbœcŠdše€fg föo -count($convmap) must be a multiple of 4 +mb_encode_numericentity(): Argument #2 ($convmap) must have a multiple of 4 elements diff --git a/ext/standard/array.c b/ext/standard/array.c index dd7914f8c78c7..d86177b5f9068 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -2396,7 +2396,7 @@ PHP_FUNCTION(extract) if (prefix) { if (ZSTR_LEN(prefix) && !php_valid_var_name(ZSTR_VAL(prefix), ZSTR_LEN(prefix))) { - zend_value_error("Prefix is not a valid identifier"); + zend_argument_value_error(3, "must be a valid identifier"); RETURN_THROWS(); } } @@ -2553,7 +2553,7 @@ PHP_FUNCTION(array_fill) if (EXPECTED(num > 0)) { if (sizeof(num) > 4 && UNEXPECTED(EXPECTED(num > 0x7fffffff))) { - zend_value_error("Too many elements"); + zend_argument_value_error(2, "is too large"); RETURN_THROWS(); } else if (UNEXPECTED(start_key > ZEND_LONG_MAX - num + 1)) { zend_throw_error(NULL, "Cannot add element to the array as the next element is already occupied"); @@ -2602,7 +2602,7 @@ PHP_FUNCTION(array_fill) } else if (EXPECTED(num == 0)) { RETURN_EMPTY_ARRAY(); } else { - zend_value_error("Number of elements can't be negative"); + zend_argument_value_error(2, "must be greater than or equal to 0"); RETURN_THROWS(); } } @@ -2843,7 +2843,7 @@ PHP_FUNCTION(range) } err: if (err) { - zend_value_error("Step exceeds the specified range"); + zend_argument_value_error(3, "must not exceed the specified range"); RETURN_THROWS(); } } @@ -4322,7 +4322,7 @@ PHP_FUNCTION(array_pad) input_size = zend_hash_num_elements(Z_ARRVAL_P(input)); pad_size_abs = ZEND_ABS(pad_size); if (pad_size_abs < 0 || pad_size_abs - input_size > Z_L(1048576)) { - zend_value_error("You may only pad up to 1048576 elements at a time"); + zend_argument_value_error(2, "must be less than or equal to 1048576"); RETURN_THROWS(); } @@ -5790,7 +5790,7 @@ PHP_FUNCTION(array_rand) num_avail = zend_hash_num_elements(Z_ARRVAL_P(input)); if (num_avail == 0) { - zend_value_error("Array is empty"); + zend_argument_value_error(1, "cannot be empty"); RETURN_THROWS(); } @@ -5831,7 +5831,7 @@ PHP_FUNCTION(array_rand) } if (num_req <= 0 || num_req > num_avail) { - zend_value_error("Second argument has to be between 1 and the number of elements in the array"); + zend_argument_value_error(2, "must be between 1 and the number of elements in argument #1 ($arg)"); RETURN_THROWS(); } @@ -6318,7 +6318,7 @@ PHP_FUNCTION(array_chunk) /* Do bounds checking for size parameter. */ if (size < 1) { - zend_value_error("Size parameter expected to be greater than 0"); + zend_argument_value_error(2, "must be greater than 0"); RETURN_THROWS(); } @@ -6387,7 +6387,7 @@ PHP_FUNCTION(array_combine) num_values = zend_hash_num_elements(values); if (num_keys != num_values) { - zend_value_error("Both parameters should have an equal number of elements"); + zend_argument_value_error(1, "and argument #2 ($values) must have the same number of elements"); RETURN_THROWS(); } diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 8596ce4a507f1..32a82aae26cbb 100755 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -2477,7 +2477,7 @@ PHP_FUNCTION(register_tick_function) if (!zend_is_callable(&tick_fe.arguments[0], 0, &function_name)) { efree(tick_fe.arguments); - zend_type_error("Invalid tick callback '%s' passed", ZSTR_VAL(function_name)); + zend_argument_type_error(1, "must be a valid tick callback, '%s' given", ZSTR_VAL(function_name)); zend_string_release_ex(function_name, 0); RETURN_THROWS(); } else if (function_name) { diff --git a/ext/standard/dir.c b/ext/standard/dir.c index da1af5ad74112..547a3dbfd6cbb 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -387,7 +387,7 @@ PHP_FUNCTION(readdir) FETCH_DIRP(); if (!(dirp->flags & PHP_STREAM_FLAG_IS_DIR)) { - zend_type_error("%d is not a valid Directory resource", dirp->res->handle); + zend_argument_type_error(1, "must be a valid Directory resource"); RETURN_THROWS(); } diff --git a/ext/standard/file.c b/ext/standard/file.c index f6a75946d1440..d14d8fed259a9 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -348,7 +348,7 @@ PHP_FUNCTION(flock) act = operation & 3; if (act < 1 || act > 3) { - zend_value_error("Illegal operation argument"); + zend_argument_value_error(2, "must be either LOCK_SH, LOCK_EX, or LOCK_UN"); RETURN_THROWS(); } diff --git a/ext/standard/math.c b/ext/standard/math.c index ef52dcaf76fcf..ca6c1f4b9d81c 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -1005,11 +1005,11 @@ PHP_FUNCTION(base_convert) } if (frombase < 2 || frombase > 36) { - zend_value_error("Invalid `from base' (" ZEND_LONG_FMT ")", frombase); + zend_argument_value_error(2, "must be between 2 and 36 (inclusive)"); RETURN_THROWS(); } if (tobase < 2 || tobase > 36) { - zend_value_error("Invalid `to base' (" ZEND_LONG_FMT ")", tobase); + zend_argument_value_error(3, "must be between 2 and 36 (inclusive)"); RETURN_THROWS(); } diff --git a/ext/standard/mt_rand.c b/ext/standard/mt_rand.c index d83636ed01aa9..d164ac3037a90 100644 --- a/ext/standard/mt_rand.c +++ b/ext/standard/mt_rand.c @@ -325,7 +325,7 @@ PHP_FUNCTION(mt_rand) ZEND_PARSE_PARAMETERS_END(); if (UNEXPECTED(max < min)) { - zend_value_error("max (" ZEND_LONG_FMT ") is smaller than min (" ZEND_LONG_FMT ")", max, min); + zend_argument_value_error(2, "must be greater than or equal to argument #1 ($min)"); RETURN_THROWS(); } diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index 267874acb44db..78cbeb4b3e67b 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -529,7 +529,7 @@ PHP_FUNCTION(proc_open) zval *arg_zv; uint32_t num_elems = zend_hash_num_elements(Z_ARRVAL_P(command_zv)); if (num_elems == 0) { - zend_value_error("Command array must have at least one element"); + zend_argument_value_error(1, "must have at least one element"); RETURN_THROWS(); } @@ -662,7 +662,7 @@ PHP_FUNCTION(proc_open) descriptors[ndesc].mode = DESC_FILE; } else if (Z_TYPE_P(descitem) != IS_ARRAY) { - zend_value_error("Descriptor item must be either an array or a File-Handle"); + zend_argument_value_error(2, "must only contain arrays and File-Handles"); goto exit_fail; } else { diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index e3e31a76cf701..7875285f5613f 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -1508,7 +1508,7 @@ PHP_FUNCTION(stream_socket_enable_crypto) zval *val; if (!GET_CTX_OPT(stream, "ssl", "crypto_method", val)) { - zend_value_error("When enabling encryption you must specify the crypto type"); + zend_argument_value_error(3, "must be specified when enabling encryption"); RETURN_THROWS(); } diff --git a/ext/standard/string.c b/ext/standard/string.c index 4c0aaad974d48..33de160aa83b7 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -931,12 +931,12 @@ PHP_FUNCTION(wordwrap) } if (breakchar_len == 0) { - zend_value_error("Break string cannot be empty"); + zend_argument_value_error(3, "cannot be empty"); RETURN_THROWS(); } if (linelength == 0 && docut) { - zend_value_error("Can't force cut when width is zero"); + zend_argument_value_error(4, "cannot be true when argument #2 ($width) is 0"); RETURN_THROWS(); } @@ -1143,7 +1143,7 @@ PHP_FUNCTION(explode) ZEND_PARSE_PARAMETERS_END(); if (ZSTR_LEN(delim) == 0) { - zend_value_error("Empty delimiter"); + zend_argument_value_error(1, "cannot be empty"); RETURN_THROWS(); } diff --git a/ext/standard/tests/array/array_chunk2.phpt b/ext/standard/tests/array/array_chunk2.phpt index a49ccc4eae25a..f3846a1d7806d 100644 --- a/ext/standard/tests/array/array_chunk2.phpt +++ b/ext/standard/tests/array/array_chunk2.phpt @@ -24,8 +24,8 @@ var_dump(array_chunk($input_array, 10)); var_dump(array_chunk($input_array, 10, true)); ?> --EXPECT-- -Size parameter expected to be greater than 0 -Size parameter expected to be greater than 0 +array_chunk(): Argument #2 ($size) must be greater than 0 +array_chunk(): Argument #2 ($size) must be greater than 0 array(5) { [0]=> array(1) { diff --git a/ext/standard/tests/array/array_chunk_variation5.phpt b/ext/standard/tests/array/array_chunk_variation5.phpt index fca31d51c8c57..be20656825d5d 100644 --- a/ext/standard/tests/array/array_chunk_variation5.phpt +++ b/ext/standard/tests/array/array_chunk_variation5.phpt @@ -49,9 +49,9 @@ foreach ($sizes as $size){ *** Testing array_chunk() : usage variations *** -- Testing array_chunk() when size = -1 -- -Size parameter expected to be greater than 0 -Size parameter expected to be greater than 0 -Size parameter expected to be greater than 0 +array_chunk(): Argument #2 ($size) must be greater than 0 +array_chunk(): Argument #2 ($size) must be greater than 0 +array_chunk(): Argument #2 ($size) must be greater than 0 -- Testing array_chunk() when size = 4 -- array(1) { @@ -89,9 +89,9 @@ array(1) { } -- Testing array_chunk() when size = 0 -- -Size parameter expected to be greater than 0 -Size parameter expected to be greater than 0 -Size parameter expected to be greater than 0 +array_chunk(): Argument #2 ($size) must be greater than 0 +array_chunk(): Argument #2 ($size) must be greater than 0 +array_chunk(): Argument #2 ($size) must be greater than 0 -- Testing array_chunk() when size = 1.5 -- array(3) { diff --git a/ext/standard/tests/array/array_combine_error2.phpt b/ext/standard/tests/array/array_combine_error2.phpt index 4eae53c120667..66707238a435c 100644 --- a/ext/standard/tests/array/array_combine_error2.phpt +++ b/ext/standard/tests/array/array_combine_error2.phpt @@ -47,8 +47,8 @@ array(0) { } -- Testing array_combine() function with empty array for $keys argument -- -Both parameters should have an equal number of elements +array_combine(): Argument #1 ($keys) and argument #2 ($values) must have the same number of elements -- Testing array_combine() function with empty array for $values argument -- -Both parameters should have an equal number of elements +array_combine(): Argument #1 ($keys) and argument #2 ($values) must have the same number of elements -- Testing array_combine() function by passing array with unequal number of elements -- -Both parameters should have an equal number of elements +array_combine(): Argument #1 ($keys) and argument #2 ($values) must have the same number of elements diff --git a/ext/standard/tests/array/array_fill_error.phpt b/ext/standard/tests/array/array_fill_error.phpt index 3a9423e2b8633..f205647f51cf3 100644 --- a/ext/standard/tests/array/array_fill_error.phpt +++ b/ext/standard/tests/array/array_fill_error.phpt @@ -24,4 +24,4 @@ try { ?> --EXPECT-- *** Testing array_fill() : error conditions *** -Number of elements can't be negative +array_fill(): Argument #2 ($num) must be greater than or equal to 0 diff --git a/ext/standard/tests/array/array_pad.phpt b/ext/standard/tests/array/array_pad.phpt index e4f8c5ce7f85e..6efef020b9dfd 100644 --- a/ext/standard/tests/array/array_pad.phpt +++ b/ext/standard/tests/array/array_pad.phpt @@ -84,4 +84,4 @@ array(4) { [3]=> float(2) } -You may only pad up to 1048576 elements at a time +array_pad(): Argument #2 ($pad_size) must be less than or equal to 1048576 diff --git a/ext/standard/tests/array/array_rand.phpt b/ext/standard/tests/array/array_rand.phpt index 4aebe8c23d2c6..d493e6c5a677f 100644 --- a/ext/standard/tests/array/array_rand.phpt +++ b/ext/standard/tests/array/array_rand.phpt @@ -38,11 +38,11 @@ var_dump(array_rand(array(1,2,3), 2)); ?> --EXPECTF-- -Array is empty -Array is empty -Second argument has to be between 1 and the number of elements in the array -Second argument has to be between 1 and the number of elements in the array -Second argument has to be between 1 and the number of elements in the array +array_rand(): Argument #1 ($arg) cannot be empty +array_rand(): Argument #1 ($arg) cannot be empty +array_rand(): Argument #2 ($num_req) must be between 1 and the number of elements in argument #1 ($arg) +array_rand(): Argument #2 ($num_req) must be between 1 and the number of elements in argument #1 ($arg) +array_rand(): Argument #2 ($num_req) must be between 1 and the number of elements in argument #1 ($arg) array(3) { [0]=> int(%d) diff --git a/ext/standard/tests/array/array_rand_variation5.phpt b/ext/standard/tests/array/array_rand_variation5.phpt index 04e71bdc4945c..2d66b35f04732 100644 --- a/ext/standard/tests/array/array_rand_variation5.phpt +++ b/ext/standard/tests/array/array_rand_variation5.phpt @@ -70,13 +70,13 @@ int(%d) int(%d) -- With num_req = 0 -- -Second argument has to be between 1 and the number of elements in the array +array_rand(): Argument #2 ($num_req) must be between 1 and the number of elements in argument #1 ($arg) -- With num_req = -1 -- -Second argument has to be between 1 and the number of elements in the array +array_rand(): Argument #2 ($num_req) must be between 1 and the number of elements in argument #1 ($arg) -- With num_req = -2 -- -Second argument has to be between 1 and the number of elements in the array +array_rand(): Argument #2 ($num_req) must be between 1 and the number of elements in argument #1 ($arg) -- With num_req more than number of members in 'input' array -- -Second argument has to be between 1 and the number of elements in the array +array_rand(): Argument #2 ($num_req) must be between 1 and the number of elements in argument #1 ($arg) diff --git a/ext/standard/tests/array/extract_error_variation1.phpt b/ext/standard/tests/array/extract_error_variation1.phpt index a0caafb2130e5..a8fe2fa85007c 100644 --- a/ext/standard/tests/array/extract_error_variation1.phpt +++ b/ext/standard/tests/array/extract_error_variation1.phpt @@ -11,4 +11,4 @@ try { } ?> --EXPECT-- -Prefix is not a valid identifier +extract(): Argument #3 ($prefix) must be a valid identifier diff --git a/ext/standard/tests/array/range_errors.phpt b/ext/standard/tests/array/range_errors.phpt index 0bb336558282c..9b86c32177b35 100644 --- a/ext/standard/tests/array/range_errors.phpt +++ b/ext/standard/tests/array/range_errors.phpt @@ -87,33 +87,33 @@ foreach( $step_arr as $step ) { *** Testing error conditions *** -- Testing ( (low < high) && (step = 0) ) -- -Step exceeds the specified range -Step exceeds the specified range +range(): Argument #3 ($step) must not exceed the specified range +range(): Argument #3 ($step) must not exceed the specified range -- Testing ( (low > high) && (step = 0) ) -- -Step exceeds the specified range -Step exceeds the specified range +range(): Argument #3 ($step) must not exceed the specified range +range(): Argument #3 ($step) must not exceed the specified range -- Testing ( (low < high) && (high-low < step) ) -- -Step exceeds the specified range +range(): Argument #3 ($step) must not exceed the specified range -- Testing ( (low > high) && (low-high < step) ) -- -Step exceeds the specified range +range(): Argument #3 ($step) must not exceed the specified range -- Testing other conditions -- -Step exceeds the specified range +range(): Argument #3 ($step) must not exceed the specified range range(): Argument #3 ($step) must be of type int|float, string given -Step exceeds the specified range +range(): Argument #3 ($step) must not exceed the specified range Notice: A non well formed numeric value encountered in %s on line %d -Step exceeds the specified range +range(): Argument #3 ($step) must not exceed the specified range -- Testing Invalid steps -- range(): Argument #3 ($step) must be of type int|float, string given -Step exceeds the specified range -Step exceeds the specified range +range(): Argument #3 ($step) must not exceed the specified range +range(): Argument #3 ($step) must not exceed the specified range range(): Argument #3 ($step) must be of type int|float, string given range(): Argument #3 ($step) must be of type int|float, string given diff --git a/ext/standard/tests/dir/readdir_variation7.phpt b/ext/standard/tests/dir/readdir_variation7.phpt index a2c0ef059febe..79511ccf8b168 100644 --- a/ext/standard/tests/dir/readdir_variation7.phpt +++ b/ext/standard/tests/dir/readdir_variation7.phpt @@ -25,4 +25,4 @@ try { --EXPECTF-- *** Testing readdir() : usage variations *** resource(%d) of type (stream) -%d is not a valid Directory resource +readdir(): Argument #1 ($dir_handle) must be a valid Directory resource diff --git a/ext/standard/tests/file/flock.phpt b/ext/standard/tests/file/flock.phpt index ab0cfc6f4e13c..68e0f3fd309b8 100644 --- a/ext/standard/tests/file/flock.phpt +++ b/ext/standard/tests/file/flock.phpt @@ -60,4 +60,4 @@ int(0) bool(true) int(0) bool(true) -Illegal operation argument +flock(): Argument #2 ($operation) must be either LOCK_SH, LOCK_EX, or LOCK_UN diff --git a/ext/standard/tests/file/flock_error.phpt b/ext/standard/tests/file/flock_error.phpt index dc9123543d0dc..b346cd125aac5 100644 --- a/ext/standard/tests/file/flock_error.phpt +++ b/ext/standard/tests/file/flock_error.phpt @@ -57,13 +57,13 @@ unlink($file); --EXPECT-- *** Testing error conditions *** --- Iteration 0 --- -Illegal operation argument +flock(): Argument #2 ($operation) must be either LOCK_SH, LOCK_EX, or LOCK_UN --- Iteration 1 --- -Illegal operation argument +flock(): Argument #2 ($operation) must be either LOCK_SH, LOCK_EX, or LOCK_UN --- Iteration 2 --- -Illegal operation argument +flock(): Argument #2 ($operation) must be either LOCK_SH, LOCK_EX, or LOCK_UN --- Iteration 3 --- -Illegal operation argument +flock(): Argument #2 ($operation) must be either LOCK_SH, LOCK_EX, or LOCK_UN --- Iteration 4 --- flock(): Argument #2 ($operation) must be of type int, array given --- Iteration 5 --- diff --git a/ext/standard/tests/general_functions/bug46587.phpt b/ext/standard/tests/general_functions/bug46587.phpt index ee59feb4445ea..d9b3044406ffc 100644 --- a/ext/standard/tests/general_functions/bug46587.phpt +++ b/ext/standard/tests/general_functions/bug46587.phpt @@ -14,5 +14,5 @@ echo "Done.\n"; ?> --EXPECTF-- int(%d) -max (3) is smaller than min (8) +mt_rand(): Argument #2 ($max) must be greater than or equal to argument #1 ($min) Done. diff --git a/ext/standard/tests/general_functions/proc_open_array.phpt b/ext/standard/tests/general_functions/proc_open_array.phpt index b2ab4d8c9f057..7e822880d328f 100644 --- a/ext/standard/tests/general_functions/proc_open_array.phpt +++ b/ext/standard/tests/general_functions/proc_open_array.phpt @@ -68,7 +68,7 @@ proc_close($proc); ?> --EXPECT-- Empty command array: -Command array must have at least one element +proc_open(): Argument #1 ($cmd) must have at least one element Nul byte in program name: Command array element 1 contains a null byte diff --git a/ext/standard/tests/general_functions/proc_open_pipes3.phpt b/ext/standard/tests/general_functions/proc_open_pipes3.phpt index 848850b327b81..307fbbaa1d221 100644 --- a/ext/standard/tests/general_functions/proc_open_pipes3.phpt +++ b/ext/standard/tests/general_functions/proc_open_pipes3.phpt @@ -32,7 +32,7 @@ echo "END\n"; ?> --EXPECTF-- Warning: proc_open(): pi is not a valid descriptor spec/mode in %s on line %d -Descriptor item must be either an array or a File-Handle +proc_open(): Argument #2 ($descriptorspec) must only contain arrays and File-Handles array(4) { [3]=> resource(%d) of type (Unknown) diff --git a/ext/standard/tests/general_functions/register_tick_function_error.phpt b/ext/standard/tests/general_functions/register_tick_function_error.phpt index b71f1ea5d5bde..c44dbe0872bc2 100644 --- a/ext/standard/tests/general_functions/register_tick_function_error.phpt +++ b/ext/standard/tests/general_functions/register_tick_function_error.phpt @@ -11,4 +11,4 @@ try { } ?> --EXPECT-- -Invalid tick callback 'a' passed +register_tick_function(): Argument #1 ($function) must be a valid tick callback, 'a' given diff --git a/ext/standard/tests/math/base_convert_error.phpt b/ext/standard/tests/math/base_convert_error.phpt index 279cfe7924b4a..2f20aeeef53f1 100644 --- a/ext/standard/tests/math/base_convert_error.phpt +++ b/ext/standard/tests/math/base_convert_error.phpt @@ -34,6 +34,6 @@ try { ?> --EXPECT-- *** Testing base_convert() : error conditions *** -Invalid `from base' (1) -Invalid `to base' (37) +base_convert(): Argument #2 ($frombase) must be between 2 and 36 (inclusive) +base_convert(): Argument #3 ($tobase) must be between 2 and 36 (inclusive) Object of class classA could not be converted to string diff --git a/ext/standard/tests/strings/explode.phpt b/ext/standard/tests/strings/explode.phpt index 8375364175a5c..f937c4e890986 100644 --- a/ext/standard/tests/strings/explode.phpt +++ b/ext/standard/tests/strings/explode.phpt @@ -60,9 +60,9 @@ array ( 4 => 'd', ) d6bee42a771449205344c0938ad4f035 -Empty delimiter -Empty delimiter -Empty delimiter +explode(): Argument #1 ($separator) cannot be empty +explode(): Argument #1 ($separator) cannot be empty +explode(): Argument #1 ($separator) cannot be empty array(1) { [0]=> string(0) "" @@ -77,7 +77,7 @@ array(1) { [0]=> string(0) "" } -Empty delimiter +explode(): Argument #1 ($separator) cannot be empty array(1) { [0]=> string(3) "acb" diff --git a/ext/standard/tests/strings/explode1.phpt b/ext/standard/tests/strings/explode1.phpt index cfc203b42869a..4d62aa029d583 100644 --- a/ext/standard/tests/strings/explode1.phpt +++ b/ext/standard/tests/strings/explode1.phpt @@ -98,15 +98,15 @@ var_dump( explode("b", $obj) ); --EXPECT-- *** Testing explode() for basic operations *** -- Iteration 1 -- -Empty delimiter -Empty delimiter -Empty delimiter -Empty delimiter +explode(): Argument #1 ($separator) cannot be empty +explode(): Argument #1 ($separator) cannot be empty +explode(): Argument #1 ($separator) cannot be empty +explode(): Argument #1 ($separator) cannot be empty -- Iteration 2 -- -Empty delimiter -Empty delimiter -Empty delimiter -Empty delimiter +explode(): Argument #1 ($separator) cannot be empty +explode(): Argument #1 ($separator) cannot be empty +explode(): Argument #1 ($separator) cannot be empty +explode(): Argument #1 ($separator) cannot be empty -- Iteration 3 -- array(1) { [0]=> @@ -208,10 +208,10 @@ array(2) { string(56) "234NULL23abcd00000TRUEFALSE-11.234444true-11.24%PHP%ZEND" } -- Iteration 7 -- -Empty delimiter -Empty delimiter -Empty delimiter -Empty delimiter +explode(): Argument #1 ($separator) cannot be empty +explode(): Argument #1 ($separator) cannot be empty +explode(): Argument #1 ($separator) cannot be empty +explode(): Argument #1 ($separator) cannot be empty -- Iteration 8 -- array(2) { [0]=> diff --git a/ext/standard/tests/strings/wordwrap.phpt b/ext/standard/tests/strings/wordwrap.phpt index 0563b2e77fadd..cb16b0fa37cf9 100644 --- a/ext/standard/tests/strings/wordwrap.phpt +++ b/ext/standard/tests/strings/wordwrap.phpt @@ -40,4 +40,4 @@ try { } --EXPECT-- OK -Break string cannot be empty +wordwrap(): Argument #3 ($break) cannot be empty diff --git a/ext/standard/tests/strings/wordwrap_error.phpt b/ext/standard/tests/strings/wordwrap_error.phpt index af0f8eb61be3c..a3f75de6fb5b0 100644 --- a/ext/standard/tests/strings/wordwrap_error.phpt +++ b/ext/standard/tests/strings/wordwrap_error.phpt @@ -52,7 +52,7 @@ var_dump( wordwrap($str, $width, $break, $cut) ); -- width = 0 & cut = false -- string(39) "testing
\nwordwrap
\nfunction" -- width = 0 & cut = true -- -Can't force cut when width is zero +wordwrap(): Argument #4 ($cut) cannot be true when argument #2 ($width) is 0 -- width = -10 & cut = false -- string(39) "testing
\nwordwrap
\nfunction" -- width = -10 & cut = true -- diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index 9e173d40d86d4..8a1d8213948bf 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -429,7 +429,7 @@ static PHP_FUNCTION(phpdbg_color) break; default: - zend_value_error("phpdbg detected an incorrect color constant"); + zend_argument_value_error(1, "must be either PHPDBG_COLOR_PROMPT, PHPDBG_COLOR_NOTICE, or PHPDBG_COLOR_ERROR"); } } /* }}} */ diff --git a/win32/signal.c b/win32/signal.c index 27ebf835c9797..26bedd1088b6e 100644 --- a/win32/signal.c +++ b/win32/signal.c @@ -98,13 +98,13 @@ PHP_FUNCTION(sapi_windows_set_ctrl_handler) #if ZTS if (!tsrm_is_main_thread()) { zend_throw_error(NULL, "CTRL events can only be received on the main thread"); - return; + RETURN_THROWS(); } #endif if (!php_win32_console_is_cli_sapi()) { zend_throw_error(NULL, "CTRL events trapping is only supported on console"); - return; + RETURN_THROWS(); } @@ -118,10 +118,8 @@ PHP_FUNCTION(sapi_windows_set_ctrl_handler) } if (!zend_is_callable(handler, 0, NULL)) { - zend_string *func_name = zend_get_callable_name(handler); - zend_type_error("%s is not a callable function name error", ZSTR_VAL(func_name)); - zend_string_release_ex(func_name, 0); - return; + zend_argument_type_error(1, "must be a valid callable function name"); + RETURN_THROWS(); } if (!SetConsoleCtrlHandler(NULL, FALSE) || !SetConsoleCtrlHandler(php_win32_signal_system_ctrl_handler, add)) { From d757be640f5105b8542b781ce93804af494229a8 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 17 Apr 2020 15:48:20 +0200 Subject: [PATCH 202/338] Fix #71263: fread() does not report bzip2.decompress errors If the bzip2.decompress filter fails to decompress the stream, we raise a notice instead of failing silently. --- NEWS | 3 +++ ext/bz2/bz2_filter.c | 1 + ext/bz2/tests/bug71263.phpt | 10 ++++++---- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 430edada41792..5e6ff58f39daa 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,9 @@ PHP NEWS . Fixed bug #79368 ("Unexpected end of file" is not an acceptable error message). (Alex Dowad) +- BZ2: + . Fixed bug #71263 (fread() does not report bzip2.decompress errors). (cmb) + - CURL: . Bumped required libcurl version to 7.29.0. (cmb) diff --git a/ext/bz2/bz2_filter.c b/ext/bz2/bz2_filter.c index 40e01edca0201..bb001198f4266 100644 --- a/ext/bz2/bz2_filter.c +++ b/ext/bz2/bz2_filter.c @@ -123,6 +123,7 @@ static php_stream_filter_status_t php_bz2_decompress_filter( } } else if (status != BZ_OK) { /* Something bad happened */ + php_error_docref(NULL, E_NOTICE, "bzip2 decompression failed"); php_stream_bucket_delref(bucket); return PSFS_ERR_FATAL; } diff --git a/ext/bz2/tests/bug71263.phpt b/ext/bz2/tests/bug71263.phpt index 108469a2930e6..b20bbd8ef1daa 100644 --- a/ext/bz2/tests/bug71263.phpt +++ b/ext/bz2/tests/bug71263.phpt @@ -1,12 +1,10 @@ --TEST-- -Bug #71263: fread() does not detects decoding errors from filter bzip2.decompress +Bug #71263: fread() does not report bzip2.decompress errors --SKIPIF-- --FILE-- ---EXPECT-- +--EXPECTF-- Compressed len = 81 + +Notice: fread(): bzip2 decompression failed in %s on line %d read: bool(false) Compressed len = 81 read: string(0) "" Compressed len = 81 + +Notice: fread(): bzip2 decompression failed in %s on line %d read: bool(false) From b0b43e86ae0bdf7da6fb59fe79862299e70bda2f Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 20 Apr 2020 16:02:03 +0300 Subject: [PATCH 203/338] Register allocator and deoptimizer for tracing JIT. --- ext/opcache/jit/zend_jit.c | 16 +- ext/opcache/jit/zend_jit_internal.h | 8 +- ext/opcache/jit/zend_jit_trace.c | 825 +++++++++++++++++++++++++++- ext/opcache/jit/zend_jit_x86.dasc | 44 +- 4 files changed, 850 insertions(+), 43 deletions(-) diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index 838795856f7bd..f519e6d749f25 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -1370,7 +1370,7 @@ static uint32_t zend_interval_intersection(zend_lifetime_interval *ival1, zend_l /* See "Optimized Interval Splitting in a Linear Scan Register Allocator", Christian Wimmer VEE'05 (2005), Figure 4. Allocation without spilling */ -static int zend_jit_try_allocate_free_reg(const zend_op_array *op_array, zend_ssa *ssa, zend_lifetime_interval *current, zend_regset available, zend_regset *hints, zend_lifetime_interval *active, zend_lifetime_interval *inactive, zend_lifetime_interval **list, zend_lifetime_interval **free) +static int zend_jit_try_allocate_free_reg(const zend_op_array *op_array, const zend_op **ssa_opcodes, zend_ssa *ssa, zend_lifetime_interval *current, zend_regset available, zend_regset *hints, zend_lifetime_interval *active, zend_lifetime_interval *inactive, zend_lifetime_interval **list, zend_lifetime_interval **free) { zend_lifetime_interval *it; uint32_t freeUntilPos[ZREG_NUM]; @@ -1403,7 +1403,9 @@ static int zend_jit_try_allocate_free_reg(const zend_op_array *op_array, zend_ss while (it) { if (current->range.start != zend_interval_end(it)) { freeUntilPos[it->reg] = 0; - } else if (zend_jit_may_reuse_reg(op_array->opcodes + current->range.start, ssa->ops + current->range.start, ssa, current->ssa_var, it->ssa_var)) { + } else if (zend_jit_may_reuse_reg( + ssa_opcodes ? ssa_opcodes[current->range.start] : op_array->opcodes + current->range.start, + ssa->ops + current->range.start, ssa, current->ssa_var, it->ssa_var)) { if (!ZEND_REGSET_IN(*hints, it->reg) && /* TODO: Avoid most often scratch registers. Find a better way ??? */ (!current->used_as_hint || @@ -1468,7 +1470,7 @@ static int zend_jit_try_allocate_free_reg(const zend_op_array *op_array, zend_ss } while (line <= range->end) { regset = zend_jit_get_scratch_regset( - op_array->opcodes + line, + ssa_opcodes ? ssa_opcodes[line] : op_array->opcodes + line, ssa->ops + line, op_array, ssa, current->ssa_var, line == last_use_line); ZEND_REGSET_FOREACH(regset, reg) { @@ -1600,7 +1602,7 @@ static int zend_jit_allocate_blocked_reg(void) /* See "Optimized Interval Splitting in a Linear Scan Register Allocator", Christian Wimmer VEE'10 (2005), Figure 2. */ -static zend_lifetime_interval* zend_jit_linear_scan(const zend_op_array *op_array, zend_ssa *ssa, zend_lifetime_interval *list) +static zend_lifetime_interval* zend_jit_linear_scan(const zend_op_array *op_array, const zend_op **ssa_opcodes, zend_ssa *ssa, zend_lifetime_interval *list) { zend_lifetime_interval *unhandled, *active, *inactive, *handled, *free; zend_lifetime_interval *current, **p, *q; @@ -1659,7 +1661,7 @@ static zend_lifetime_interval* zend_jit_linear_scan(const zend_op_array *op_arra } } - if (zend_jit_try_allocate_free_reg(op_array, ssa, current, available, &hints, active, inactive, &unhandled, &free) || + if (zend_jit_try_allocate_free_reg(op_array, ssa_opcodes, ssa, current, available, &hints, active, inactive, &unhandled, &free) || zend_jit_allocate_blocked_reg()) { ZEND_REGSET_EXCL(available, current->reg); current->list_next = active; @@ -1792,7 +1794,7 @@ static zend_lifetime_interval** zend_jit_allocate_registers(const zend_op_array } /* Linear Scan Register Allocation */ - list = zend_jit_linear_scan(op_array, ssa, list); + list = zend_jit_linear_scan(op_array, NULL, ssa, list); if (list) { intervals = zend_arena_calloc(&CG(arena), ssa->vars_count, sizeof(zend_lifetime_interval*)); @@ -2132,7 +2134,7 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op } } if (ssa->cfg.blocks[b].flags & ZEND_BB_LOOP_HEADER) { - if (!zend_jit_check_timeout(&dasm_state, op_array->opcodes + ssa->cfg.blocks[b].start)) { + if (!zend_jit_check_timeout(&dasm_state, op_array->opcodes + ssa->cfg.blocks[b].start, NULL)) { goto jit_failure; } } diff --git a/ext/opcache/jit/zend_jit_internal.h b/ext/opcache/jit/zend_jit_internal.h index 42054bf37f907..a385463029df0 100644 --- a/ext/opcache/jit/zend_jit_internal.h +++ b/ext/opcache/jit/zend_jit_internal.h @@ -302,9 +302,10 @@ typedef struct _zend_jit_trace_start_rec { #define ZEND_JIT_TRACE_START_REC_SIZE 2 typedef struct _zend_jit_trace_exit_info { - const zend_op *opline; /* opline where VM should continue execution */ - uint32_t stack_size; - uint32_t stack_offset; + const zend_op *opline; /* opline where VM should continue execution */ + const zend_op_array *op_array; + uint32_t stack_size; + uint32_t stack_offset; } zend_jit_trace_exit_info; typedef union _zend_jit_trace_stack { @@ -430,6 +431,7 @@ struct _zend_jit_trace_stack_frame { } while (0) typedef struct _zend_jit_globals { + zend_jit_trace_rec *current_trace; zend_jit_trace_stack_frame *current_frame; const zend_op *bad_root_cache_opline[ZEND_JIT_TRACE_BAD_ROOT_SLOTS]; diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 8034e408c18d0..ed4330a287f97 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -16,6 +16,7 @@ +----------------------------------------------------------------------+ */ +static zend_op_array dummy_op_array; static zend_jit_trace_info *zend_jit_traces = NULL; static const void **zend_jit_exit_groups = NULL; @@ -59,6 +60,10 @@ static int zend_jit_trace_startup(void) ZEND_JIT_COUNTER_NUM = 0; ZEND_JIT_EXIT_NUM = 0; ZEND_JIT_EXIT_COUNTERS = 0; + + memset(&dummy_op_array, 0, sizeof(dummy_op_array)); + dummy_op_array.fn_flags = ZEND_ACC_DONE_PASS_TWO; + return SUCCESS; } @@ -126,19 +131,26 @@ static uint32_t zend_jit_trace_get_exit_point(const zend_op *from_opline, const { zend_jit_trace_info *t = &zend_jit_traces[ZEND_JIT_TRACE_NUM]; uint32_t exit_point; - const zend_op_array *op_array = &JIT_G(current_frame)->func->op_array; + const zend_op_array *op_array; uint32_t stack_offset = (uint32_t)-1; - uint32_t stack_size = op_array->last_var + op_array->T; + uint32_t stack_size; zend_jit_trace_stack *stack = NULL; - if (stack_size) { - stack = JIT_G(current_frame)->stack; - do { - if (STACK_TYPE(stack, stack_size-1) != IS_UNKNOWN) { - break; - } - stack_size--; - } while (stack_size); + if (JIT_G(current_frame)) { + op_array = &JIT_G(current_frame)->func->op_array; + stack_size = op_array->last_var + op_array->T; + if (stack_size) { + stack = JIT_G(current_frame)->stack; + do { + if (STACK_TYPE(stack, stack_size-1) != IS_UNKNOWN) { + break; + } + stack_size--; + } while (stack_size); + } + } else { + op_array = NULL; + stack_size = 0; } /* Try to reuse exit points */ @@ -169,6 +181,7 @@ static uint32_t zend_jit_trace_get_exit_point(const zend_op *from_opline, const } t->exit_count++; t->exit_info[exit_point].opline = to_opline; + t->exit_info[exit_point].op_array = op_array; t->exit_info[exit_point].stack_size = stack_size; t->exit_info[exit_point].stack_offset = stack_offset; } @@ -804,6 +817,13 @@ static int is_checked_guard(const zend_ssa *tssa, const zend_op **ssa_opcodes, u return 0; } +typedef struct _zend_tssa { + zend_ssa ssa; + const zend_op **tssa_opcodes; +} zend_tssa; + +static const zend_op _nop_opcode = {0}; + static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uint32_t parent_trace, uint32_t exit_num, zend_script *script, const zend_op_array **op_arrays, int *num_op_arrays_ptr) { zend_ssa *tssa; @@ -914,13 +934,15 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin *num_op_arrays_ptr = num_op_arrays; /* 2. Construct TSSA */ - tssa = zend_arena_calloc(&CG(arena), 1, sizeof(zend_ssa)); + tssa = zend_arena_calloc(&CG(arena), 1, sizeof(zend_tssa)); tssa->cfg.blocks = zend_arena_calloc(&CG(arena), 2, sizeof(zend_basic_block)); tssa->blocks = zend_arena_calloc(&CG(arena), 2, sizeof(zend_ssa_block)); tssa->cfg.predecessors = zend_arena_calloc(&CG(arena), 2, sizeof(int)); tssa->ops = ssa_ops = zend_arena_alloc(&CG(arena), ssa_ops_count * sizeof(zend_ssa_op)); memset(ssa_ops, -1, ssa_ops_count * sizeof(zend_ssa_op)); - ssa_opcodes = zend_arena_calloc(&CG(arena), ssa_ops_count, sizeof(zend_op*)); + ssa_opcodes = zend_arena_calloc(&CG(arena), ssa_ops_count + 1, sizeof(zend_op*)); + ((zend_tssa*)tssa)->tssa_opcodes = ssa_opcodes; + ssa_opcodes[ssa_ops_count] = &_nop_opcode; JIT_G(current_frame) = frame = (zend_jit_trace_stack_frame*)((char*)zend_arena_alloc(&CG(arena), stack_bottom + stack_size) + stack_bottom); if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) { @@ -1679,6 +1701,601 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin return tssa; } +static void zend_jit_close_var(zend_jit_trace_stack *stack, uint32_t n, const zend_ssa *ssa, const zend_op **ssa_opcodes, const zend_op_array *op_array, const zend_ssa *op_array_ssa, int *start, int *end, uint8_t *flags, int idx) +{ + int32_t var = STACK_VAR(stack, n); + int32_t use; + + if (var >= 0 && start[var] >= 0 && end[var] >= 0) { + if (end[var] >= 0 && op_array_ssa->vars) { + use = ssa_opcodes[end[var]] - op_array->opcodes; + if (ssa->ops[end[var]].op1_use == var) { + if (zend_ssa_is_last_use(op_array, op_array_ssa, op_array_ssa->ops[use].op1_use, use)) { + flags[var] |= ZREG_LAST_USE; + return; + } + } else if (ssa->ops[end[var]].op2_use == var) { + if (zend_ssa_is_last_use(op_array, op_array_ssa, op_array_ssa->ops[use].op2_use, use)) { + flags[var] |= ZREG_LAST_USE; + return; + } + } else if (ssa->ops[end[var]].result_use == var) { + if (zend_ssa_is_last_use(op_array, op_array_ssa, op_array_ssa->ops[use].result_use, use)) { + flags[var] |= ZREG_LAST_USE; + return; + } + } + } +#if 0 + // TODO: try this optimization later ??? + if (flags[var] & (ZREG_LOAD|ZREG_STORE)) { + /* we don't have to extend live range if it's already in memory */ + return; + } +#endif + // TODO: shrink interval to last side exit ???? + end[var] = idx; + } +} + +static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace_rec *trace_buffer, zend_ssa *ssa) +{ + const zend_op **ssa_opcodes = ((zend_tssa*)ssa)->tssa_opcodes; + zend_jit_trace_rec *p; + const zend_op_array *op_array; + zend_jit_op_array_trace_extension *jit_extension; + const zend_ssa *op_array_ssa; + const zend_ssa_op *ssa_op; + int i, j, idx, count, level; + int *start, *end; + uint8_t *flags; + const zend_op_array **vars_op_array; + zend_lifetime_interval **intervals, *list, *ival; + void *checkpoint; + zend_jit_trace_stack_frame *frame; + zend_jit_trace_stack *stack; + ALLOCA_FLAG(use_heap); + + ZEND_ASSERT(ssa->var_info != NULL); + + start = do_alloca(sizeof(int) * ssa->vars_count * 2 + + ZEND_MM_ALIGNED_SIZE(sizeof(uint8_t) * ssa->vars_count) + + sizeof(zend_op_array*) * ssa->vars_count, use_heap); + if (!start) { + return NULL; + } + end = start + ssa->vars_count; + flags = (uint8_t*)(end + ssa->vars_count); + vars_op_array = (const zend_op_array**)(flags + ZEND_MM_ALIGNED_SIZE(sizeof(uint8_t) * ssa->vars_count)); + + memset(start, -1, sizeof(int) * ssa->vars_count * 2); + memset(flags, 0, sizeof(uint8_t) * ssa->vars_count); + memset(vars_op_array, 0, sizeof(zend_op_array*) * ssa->vars_count); + + op_array = trace_buffer->op_array; + jit_extension = + (zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(op_array); + op_array_ssa = &jit_extension->func_info.ssa; + frame = JIT_G(current_frame); + stack = frame->stack; + + count = 0; + + i = 0; + j = op_array->last_var; + if (trace_buffer->start != ZEND_JIT_TRACE_START_ENTER) { + j += op_array->T; + } + while (i < j) { + SET_STACK_VAR(stack, i, i); + vars_op_array[i] = op_array; + /* We don't start intervals for variables used in Phi */ + if ((ssa->vars[i].use_chain >= 0 /*|| ssa->vars[i].phi_use_chain*/) + && zend_jit_var_supports_reg(ssa, i)) { + start[i] = 0; + flags[i] = ZREG_LOAD; + count++; + } + i++; + } + + if (trace_buffer->start == ZEND_JIT_TRACE_START_ENTER) { + j = op_array->last_var + op_array->T; + while (i < j) { + SET_STACK_VAR(stack, i, -1); + i++; + } + } + + if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) { + zend_ssa_phi *phi = ssa->blocks[1].phis; + + while (phi) { + SET_STACK_VAR(stack, phi->var, phi->ssa_var); + vars_op_array[phi->ssa_var] = op_array; + if (ssa->vars[phi->ssa_var].use_chain >= 0 + && zend_jit_var_supports_reg(ssa, phi->ssa_var)) { + start[phi->ssa_var] = 0; + count++; + } + phi = phi->next; + } + } + + p = trace_buffer + ZEND_JIT_TRACE_START_REC_SIZE; + level = 0; + ssa_op = ssa->ops; + idx = 0; + for (;;p++) { + if (p->op == ZEND_JIT_TRACE_VM) { + const zend_op *opline = p->opline; + int len; + zend_bool support_opline; + + support_opline = + zend_jit_opline_supports_reg(op_array, ssa, opline, ssa_op); + if (support_opline) { + if (ssa_op->op1_use >= 0 + && start[ssa_op->op1_use] >= 0 + && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op1_use)) { + end[ssa_op->op1_use] = idx; + } + if (ssa_op->op2_use >= 0 + && start[ssa_op->op2_use] >= 0 + && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op2_use)) { + end[ssa_op->op2_use] = idx; + } + if (ssa_op->result_use >= 0 + && start[ssa_op->result_use] >= 0 + && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->result_use)) { + end[ssa_op->result_use] = idx; + } + } else { + if (ssa_op->op1_use >= 0 + && start[ssa_op->op1_use] >= 0 + && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op1_use)) { + start[ssa_op->op1_use] = -1; + end[ssa_op->op1_use] = -1; + count--; + } + if (ssa_op->op2_use >= 0 + && start[ssa_op->op2_use] >= 0 + && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op2_use)) { + start[ssa_op->op2_use] = -1; + end[ssa_op->op2_use] = -1; + count--; + } + if (ssa_op->result_use >= 0 + && start[ssa_op->result_use] >= 0 + && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->result_use)) { + start[ssa_op->result_use] = -1; + end[ssa_op->result_use] = -1; + count--; + } + } + + if (ssa_op->op1_def >= 0) { + zend_jit_close_var(stack, EX_VAR_TO_NUM(opline->op1.var), ssa, ssa_opcodes, op_array, op_array_ssa, start, end, flags, idx); + SET_STACK_VAR(stack, EX_VAR_TO_NUM(opline->op1.var), ssa_op->op1_def); + } + if (ssa_op->op2_def >= 0) { + zend_jit_close_var(stack, EX_VAR_TO_NUM(opline->op2.var), ssa, ssa_opcodes, op_array, op_array_ssa, start, end, flags, idx); + SET_STACK_VAR(stack, EX_VAR_TO_NUM(opline->op2.var), ssa_op->op2_def); + } + if (ssa_op->result_def >= 0) { + zend_jit_close_var(stack, EX_VAR_TO_NUM(opline->result.var), ssa, ssa_opcodes, op_array, op_array_ssa, start, end, flags, idx); + SET_STACK_VAR(stack, EX_VAR_TO_NUM(opline->result.var), ssa_op->result_def); + } + + if (support_opline) { + if (ssa_op->result_def >= 0 + && (ssa->vars[ssa_op->result_def].use_chain >= 0 + || ssa->vars[ssa_op->result_def].phi_use_chain) + && zend_jit_var_supports_reg(ssa, ssa_op->result_def)) { + start[ssa_op->result_def] = idx; + vars_op_array[ssa_op->result_def] = op_array; + count++; + } + if (ssa_op->op1_def >= 0 + && (ssa->vars[ssa_op->op1_def].use_chain >= 0 + || ssa->vars[ssa_op->op1_def].phi_use_chain) + && zend_jit_var_supports_reg(ssa, ssa_op->op1_def)) { + start[ssa_op->op1_def] = idx; + vars_op_array[ssa_op->op1_def] = op_array; + count++; + } + if (ssa_op->op2_def >= 0 + && (ssa->vars[ssa_op->op2_def].use_chain >= 0 + || ssa->vars[ssa_op->op2_def].phi_use_chain) + && zend_jit_var_supports_reg(ssa, ssa_op->op2_def)) { + start[ssa_op->op2_def] = idx; + vars_op_array[ssa_op->op2_def] = op_array; + count++; + } + } + + len = zend_jit_trace_op_len(opline); + switch (opline->opcode) { + case ZEND_ASSIGN_DIM: + case ZEND_ASSIGN_OBJ: + case ZEND_ASSIGN_STATIC_PROP: + case ZEND_ASSIGN_DIM_OP: + case ZEND_ASSIGN_OBJ_OP: + case ZEND_ASSIGN_STATIC_PROP_OP: + case ZEND_ASSIGN_OBJ_REF: + case ZEND_ASSIGN_STATIC_PROP_REF: + /* OP_DATA */ + ssa_op++; + opline++; + if (support_opline) { + if (ssa_op->op1_use >= 0 + && start[ssa_op->op1_use] >= 0 + && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op1_use)) { + end[ssa_op->op1_use] = idx; + } + } else { + if (ssa_op->op1_use >= 0 + && start[ssa_op->op1_use] >= 0 + && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op1_use)) { + start[ssa_op->op1_use] = -1; + end[ssa_op->op1_use] = -1; + count--; + } + } + if (ssa_op->op1_def >= 0) { + zend_jit_close_var(stack, EX_VAR_TO_NUM(opline->op1.var), ssa, ssa_opcodes, op_array, op_array_ssa, start, end, flags, idx); + SET_STACK_VAR(stack, EX_VAR_TO_NUM(opline->op1.var), ssa_op->op1_def); + } + if (support_opline) { + if (ssa_op->op1_def >= 0 + && (ssa->vars[ssa_op->op1_def].use_chain >= 0 + || ssa->vars[ssa_op->op1_def].phi_use_chain) + && zend_jit_var_supports_reg(ssa, ssa_op->op1_def)) { + start[ssa_op->op1_def] = idx; + vars_op_array[ssa_op->op1_def] = op_array; + count++; + } + } + ssa_op++; + opline++; + idx+=2; + break; + case ZEND_RECV_INIT: + ssa_op++; + opline++; + idx++; + while (opline->opcode == ZEND_RECV_INIT) { + /* RECV_INIT doesn't support registers */ + if (ssa_op->result_def >= 0) { + zend_jit_close_var(stack, EX_VAR_TO_NUM(opline->result.var), ssa, ssa_opcodes, op_array, op_array_ssa, start, end, flags, idx); + SET_STACK_VAR(stack, EX_VAR_TO_NUM(opline->result.var), ssa_op->result_def); + } + ssa_op++; + opline++; + idx++; + } + break; + case ZEND_BIND_GLOBAL: + ssa_op++; + opline++; + idx++; + while (opline->opcode == ZEND_BIND_GLOBAL) { + /* BIND_GLOBAL doesn't support registers */ + if (ssa_op->op1_def >= 0) { + zend_jit_close_var(stack, EX_VAR_TO_NUM(opline->op1.var), ssa, ssa_opcodes, op_array, op_array_ssa, start, end, flags, idx); + SET_STACK_VAR(stack, EX_VAR_TO_NUM(opline->op1.var), ssa_op->op1_def); + } + ssa_op++; + opline++; + idx++; + } + break; + default: + ssa_op += len; + idx += len; + break; + } + } else if (p->op == ZEND_JIT_TRACE_ENTER) { + /* New call frames */ + frame = zend_jit_trace_call_frame(frame, op_array); + stack = frame->stack; + op_array = p->op_array; + jit_extension = + (zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(op_array); + op_array_ssa = &jit_extension->func_info.ssa; + j = p->first_ssa_var; + for (i = 0; i < op_array->last_var; i++) { + SET_STACK_VAR(stack, i, j); + vars_op_array[j] = op_array; + if (ssa->vars[j].use_chain >= 0 + && zend_jit_var_supports_reg(ssa, j)) { + start[j] = idx; + flags[j] = ZREG_LOAD; + count++; + } + j++; + } + for (i = op_array->last_var; i < op_array->last_var + op_array->T; i++) { + SET_STACK_VAR(stack, i, -1); + } + level++; + } else if (p->op == ZEND_JIT_TRACE_BACK) { + /* Close exiting call frames */ + for (i = 0; i < op_array->last_var; i++) { + zend_jit_close_var(stack, i, ssa, ssa_opcodes, op_array, op_array_ssa, start, end, flags, idx-1); + } + op_array = p->op_array; + jit_extension = + (zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(op_array); + op_array_ssa = &jit_extension->func_info.ssa; + frame = zend_jit_trace_ret_frame(frame, op_array); + stack = frame->stack; + if (level == 0) { + /* New return frames */ + j = p->first_ssa_var; + for (i = 0; i < op_array->last_var + op_array->T; i++) { + SET_STACK_VAR(stack, i, j); + vars_op_array[j] = op_array; + if (ssa->vars[j].use_chain >= 0 + && zend_jit_var_supports_reg(ssa, j)) { + start[j] = idx; + flags[j] = ZREG_LOAD; + count++; + } + j++; + } + } else { + level--; + } + } else if (p->op == ZEND_JIT_TRACE_END) { + break; + } + } + + if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) { + zend_ssa_phi *phi = ssa->blocks[1].phis; + + while (phi) { + if (start[phi->sources[1]] >= 0) { + end[phi->sources[1]] = idx; + } + phi = phi->next; + } + + for (i = 0; i < op_array->last_var; i++) { + if (start[i] >= 0 && !ssa->vars[i].phi_use_chain) { + end[i] = idx; + } + } + } else { + for (i = 0; i < op_array->last_var; i++) { + zend_jit_close_var(stack, i, ssa, ssa_opcodes, op_array, op_array_ssa, start, end, flags, idx); + } + } + + if (!count) { + free_alloca(start, use_heap); + return NULL; + } + + checkpoint = zend_arena_checkpoint(CG(arena)); + intervals = zend_arena_calloc(&CG(arena), ssa->vars_count, sizeof(zend_lifetime_interval)); + memset(intervals, 0, sizeof(zend_lifetime_interval*) * ssa->vars_count); + list = zend_arena_alloc(&CG(arena), sizeof(zend_lifetime_interval) * count); + j = 0; +//fprintf(stderr, "(%d)\n", count); + for (i = 0; i < ssa->vars_count; i++) { + if (start[i] >= 0 && end[i] >= 0) { +//fprintf(stderr, "#%d: %d..%d\n", i, start[i], end[i]); + ZEND_ASSERT(j < count); + intervals[i] = &list[j]; + list[j].ssa_var = i; + list[j].reg = ZREG_NONE; + list[j].flags = flags[i]; + list[j].range.start = start[i]; + list[j].range.end = end[i]; + list[j].range.next = NULL; + list[j].hint = NULL; + list[j].used_as_hint = NULL; + list[j].list_next = NULL; + j++; + } + } + free_alloca(start, use_heap); + start = end = NULL; + + /* Add hints */ + if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) { + zend_ssa_phi *phi = ssa->blocks[1].phis; + + while (phi) { + if (intervals[phi->ssa_var]) { + if (intervals[phi->sources[1]]) { + intervals[phi->sources[1]]->hint = intervals[phi->ssa_var]; + } + } + phi = phi->next; + } + } + + for (i = 0; i < ssa->vars_count; i++) { + if (intervals[i] && !intervals[i]->hint) { + + if (ssa->vars[i].definition >= 0) { + uint32_t line = ssa->vars[i].definition; + const zend_op *opline = ssa_opcodes[line]; + + switch (opline->opcode) { + case ZEND_QM_ASSIGN: + case ZEND_POST_INC: + case ZEND_POST_DEC: + if (ssa->ops[line].op1_use >= 0 && + intervals[ssa->ops[line].op1_use] && + (i == ssa->ops[line].op1_def || + (i == ssa->ops[line].result_def && + (ssa->ops[line].op1_def < 0 || + !intervals[ssa->ops[line].op1_def])))) { + zend_jit_add_hint(intervals, i, ssa->ops[line].op1_use); + } + break; + case ZEND_SEND_VAR: + case ZEND_PRE_INC: + case ZEND_PRE_DEC: + if (i == ssa->ops[line].op1_def && + ssa->ops[line].op1_use >= 0 && + intervals[ssa->ops[line].op1_use]) { + zend_jit_add_hint(intervals, i, ssa->ops[line].op1_use); + } + break; + case ZEND_ASSIGN: + if (ssa->ops[line].op2_use >= 0 && + intervals[ssa->ops[line].op2_use] && + (i == ssa->ops[line].op2_def || + (i == ssa->ops[line].op1_def && + (ssa->ops[line].op2_def < 0 || + !intervals[ssa->ops[line].op2_def])) || + (i == ssa->ops[line].result_def && + (ssa->ops[line].op2_def < 0 || + !intervals[ssa->ops[line].op2_def]) && + (ssa->ops[line].op1_def < 0 || + !intervals[ssa->ops[line].op1_def])))) { + zend_jit_add_hint(intervals, i, ssa->ops[line].op2_use); + } + break; + } + } + } + } + + list = zend_jit_sort_intervals(intervals, ssa->vars_count); + + if (list) { + ival = list; + while (ival) { + if (ival->hint) { + ival->hint->used_as_hint = ival; + } + ival = ival->list_next; + } + } + + if (list) { + if (ZCG(accel_directives).jit_debug & ZEND_JIT_DEBUG_REG_ALLOC) { + fprintf(stderr, "---- TRACE %d Live Ranges\n", ZEND_JIT_TRACE_NUM); + ival = list; + while (ival) { + zend_jit_dump_lifetime_interval(vars_op_array[ival->ssa_var], ssa, ival); + ival = ival->list_next; + } + } + } + + /* Linear Scan Register Allocation (op_array is not actually used, only fn_flags matters) */ + list = zend_jit_linear_scan(&dummy_op_array, ssa_opcodes, ssa, list); + + if (list) { + zend_lifetime_interval *ival, *next; + + memset(intervals, 0, ssa->vars_count * sizeof(zend_lifetime_interval*)); + ival = list; + while (ival != NULL) { + ZEND_ASSERT(ival->reg != ZREG_NONE); + next = ival->list_next; + ival->list_next = intervals[ival->ssa_var]; + intervals[ival->ssa_var] = ival; + ival = next; + } + + /* SSA resolution */ + if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) { + zend_ssa_phi *phi = ssa->blocks[1].phis; + + while (phi) { + int def = phi->ssa_var; + int use = phi->sources[1]; + + if (intervals[def]) { + if (!intervals[use]) { + intervals[def]->flags |= ZREG_LOAD; + } else if (intervals[def]->reg != intervals[use]->reg) { + intervals[def]->flags |= ZREG_LOAD; + intervals[use]->flags |= ZREG_STORE; + } else { + use = phi->sources[0]; + ZEND_ASSERT(!intervals[use]); + intervals[use] = zend_arena_alloc(&CG(arena), sizeof(zend_lifetime_interval)); + intervals[use]->ssa_var = phi->sources[0]; + intervals[use]->reg = intervals[def]->reg; + intervals[use]->flags = ZREG_LOAD; + intervals[use]->range.start = 0; + intervals[use]->range.end = 0; + intervals[use]->range.next = NULL; + intervals[use]->hint = NULL; + intervals[use]->used_as_hint = NULL; + intervals[use]->list_next = NULL; + } + } else if (intervals[use] && !ssa->vars[phi->ssa_var].no_val) { + intervals[use]->flags |= ZREG_STORE; + } + phi = phi->next; + } + } + + /* Remove useless register allocation */ + for (i = 0; i < ssa->vars_count; i++) { + if (intervals[i] && + ((intervals[i]->flags & ZREG_LOAD) || + ((intervals[i]->flags & ZREG_STORE) && ssa->vars[i].definition >= 0)) && + ssa->vars[i].use_chain < 0) { + zend_bool may_remove = 1; + zend_ssa_phi *phi = ssa->vars[i].phi_use_chain; + + while (phi) { + if (intervals[phi->ssa_var] && + !(intervals[phi->ssa_var]->flags & ZREG_LOAD)) { + may_remove = 0; + break; + } + phi = zend_ssa_next_use_phi(ssa, i, phi); + } + if (may_remove) { + intervals[i] = NULL; + } + } + } + + // Remove intervals used once ???? + + if (ZCG(accel_directives).jit_debug & ZEND_JIT_DEBUG_REG_ALLOC) { + fprintf(stderr, "---- TRACE %d Allocated Live Ranges\n", ZEND_JIT_TRACE_NUM); + for (i = 0; i < ssa->vars_count; i++) { + ival = intervals[i]; + while (ival) { + zend_jit_dump_lifetime_interval(vars_op_array[ival->ssa_var], ssa, ival); + ival = ival->list_next; + } + } + } + + return intervals; + } + + zend_arena_release(&CG(arena), checkpoint); //??? + return NULL; +} + +static int zend_jit_trace_stack_needs_deoptimization(zend_jit_trace_stack *stack, uint32_t stack_size) +{ + uint32_t i; + + for (i = 0; i < stack_size; i++) { + if (STACK_REG(stack, i) != ZREG_NONE) { + return 1; + } + } + return 0; +} + static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t parent_trace, uint32_t exit_num) { const void *handler = NULL; @@ -1708,10 +2325,17 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par const zend_op *opline, *orig_opline; const zend_ssa_op *ssa_op, *orig_ssa_op; + JIT_G(current_trace) = trace_buffer; + checkpoint = zend_arena_checkpoint(CG(arena)); ssa = zend_jit_trace_build_tssa(trace_buffer, parent_trace, exit_num, script, op_arrays, &num_op_arrays); + /* Register allocation */ + if (zend_jit_reg_alloc) { + ra = zend_jit_trace_allocate_registers(trace_buffer, ssa); + } + p = trace_buffer; ZEND_ASSERT(p->op == ZEND_JIT_TRACE_START); op_array = p->op_array; @@ -1732,8 +2356,6 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par (zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(op_array); op_array_ssa = &jit_extension->func_info.ssa; - // TODO: register allocation ??? - dasm_growpc(&dasm_state, 1); /* trace needs just one global label for loop */ zend_jit_align_func(&dasm_state); @@ -1742,6 +2364,10 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par } zend_jit_trace_begin(&dasm_state, ZEND_JIT_TRACE_NUM); + for (i = 0; i < op_array->last_var + op_array->T; i++) { + SET_STACK_TYPE(stack, i, IS_UNKNOWN); + } + if (!parent_trace) { zend_jit_set_opline(&dasm_state, opline); } else { @@ -1804,6 +2430,29 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par SET_STACK_TYPE(stack, i, IS_UNKNOWN); } } + + // TODO: Merge two loops implementing paralel move ??? + for (i = 0; i < parent_vars_count; i++) { + if (STACK_REG(parent_stack, i) != ZREG_NONE) { + // TODO: optimize out useless stores ???? + if (!zend_jit_store_var(&dasm_state, ssa->var_info[i].type, i, STACK_REG(parent_stack, i))) { + goto jit_failure; + } + } + } + + if (ra + && trace_buffer->stop != ZEND_JIT_TRACE_STOP_RECURSIVE_CALL + && trace_buffer->stop != ZEND_JIT_TRACE_STOP_RECURSIVE_RET) { + for (i = 0; i < last_var; i++) { + if (ra[i] && (ra[i]->flags & ZREG_LOAD) != 0) { + //SET_STACK_REG(stack, i, ra[i]->reg); + if (!zend_jit_load_var(&dasm_state, ssa->var_info[i].type, i, ra[i]->reg)) { + goto jit_failure; + } + } + } + } } if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP @@ -1812,9 +2461,63 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par zend_jit_label(&dasm_state, 0); /* start of of trace loop */ + if (ra && trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) { + zend_ssa_phi *phi = ssa->blocks[1].phis; + + while (phi) { + zend_lifetime_interval *ival = ra[phi->ssa_var]; + + if (ival) { + if (ival->flags & ZREG_LOAD) { + ZEND_ASSERT(ival->reg != ZREG_NONE); + + if (!zend_jit_load_var(&dasm_state, ssa->var_info[phi->ssa_var].type, ssa->vars[phi->ssa_var].var, ival->reg)) { + goto jit_failure; + } + } else if (ival->flags & ZREG_STORE) { + ZEND_ASSERT(ival->reg != ZREG_NONE); + + if (!zend_jit_store_var(&dasm_state, ssa->var_info[phi->ssa_var].type, ssa->vars[phi->ssa_var].var, ival->reg)) { + goto jit_failure; + } + } else { + /* Register has to be writen back on side exit */ + SET_STACK_REG(stack, phi->var, ival->reg); + } + } + phi = phi->next; + } + } + if (trace_buffer->stop != ZEND_JIT_TRACE_STOP_RECURSIVE_RET) { - // TODO: interupt exit may require deoptimization through side exit ??? - zend_jit_check_timeout(&dasm_state, opline); + const void *exit_addr = NULL; + + if (ra && zend_jit_trace_stack_needs_deoptimization(stack, op_array->last_var + op_array->T)) { + uint32_t exit_point = zend_jit_trace_get_exit_point(NULL, NULL, NULL); + + exit_addr = zend_jit_trace_get_exit_addr(exit_point); + if (!exit_addr) { + goto jit_failure; + } + } + // TODO: interupt exit may require deoptimization through side exit ???? + zend_jit_check_timeout(&dasm_state, opline, exit_addr); + } + + if (ra && trace_buffer->stop != ZEND_JIT_TRACE_STOP_LOOP) { + int last_var = op_array->last_var; + + if (trace_buffer->start != ZEND_JIT_TRACE_START_ENTER) { + last_var += op_array->T; + } + for (i = 0; i < last_var; i++) { + if (ra && ra[i] && (ra[i]->flags & ZREG_LOAD) != 0) { + //SET_STACK_REG(stack, i, ra[i]->reg); + if (!zend_jit_load_var(&dasm_state, ssa->var_info[i].type, i, ra[i]->reg)) { + goto jit_failure; + } + } + } } } @@ -2806,6 +3509,9 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par SET_RES_STACK_VAR_TYPE(type); if (type != IS_UNKNOWN) { ssa->var_info[ssa_op->result_def].type &= ~MAY_BE_GUARD; + if (ra && ra[ssa_op->result_def]) { + SET_STACK_REG(stack, EX_VAR_TO_NUM(opline->result.var), ra[ssa_op->result_def]->reg); + } } } if (ssa_op->op1_def >= 0) { @@ -2834,6 +3540,9 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par SET_OP1_STACK_VAR_TYPE(type); if (type != IS_UNKNOWN) { ssa->var_info[ssa_op->op1_def].type &= ~MAY_BE_GUARD; + if (ra && ra[ssa_op->op1_def]) { + SET_STACK_REG(stack, EX_VAR_TO_NUM(opline->op1.var), ra[ssa_op->op1_def]->reg); + } } } if (ssa_op->op2_def >= 0) { @@ -2849,6 +3558,9 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par SET_OP2_STACK_VAR_TYPE(type); if (type != IS_UNKNOWN) { ssa->var_info[ssa_op->op2_def].type &= ~MAY_BE_GUARD; + if (ra && ra[ssa_op->op2_def]) { + SET_STACK_REG(stack, EX_VAR_TO_NUM(opline->op2.var), ra[ssa_op->op2_def]->reg); + } } } @@ -2879,6 +3591,9 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par SET_OP1_STACK_VAR_TYPE(type); if (type != IS_UNKNOWN) { ssa->var_info[ssa_op->op1_def].type &= ~MAY_BE_GUARD; + if (ra && ra[ssa_op->op1_def]) { + SET_STACK_REG(stack, EX_VAR_TO_NUM(opline->op1.var), ra[ssa_op->op1_def]->reg); + } } } ssa_op++; @@ -2895,6 +3610,9 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par type = concrete_type(ssa->var_info[ssa_op->result_def].type); } SET_RES_STACK_VAR_TYPE(type); + if (ra && ra[ssa_op->result_def]) { + SET_STACK_REG(stack, EX_VAR_TO_NUM(opline->result.var), ra[ssa_op->result_def]->reg); + } } ssa_op++; opline++; @@ -2912,6 +3630,9 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par type = concrete_type(ssa->var_info[ssa_op->op1_def].type); } SET_OP1_STACK_VAR_TYPE(type); + if (ra && ra[ssa_op->op1_def]) { + SET_STACK_REG(stack, EX_VAR_TO_NUM(opline->op1.var), ra[ssa_op->op1_def]->reg); + } } ssa_op++; opline++; @@ -2969,6 +3690,18 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par } JIT_G(current_frame) = frame = call; stack = frame->stack; + if (ra) { + for (i = 0; i < op_array->last_var; i++) { + int j = p->first_ssa_var + i; + + if (ra[j] && (ra[j]->flags & ZREG_LOAD) != 0) { + //SET_STACK_REG(stack, i, ra[j]->reg); + if (!zend_jit_load_var(&dasm_state, ssa->var_info[j].type, i, ra[j]->reg)) { + goto jit_failure; + } + } + } + } zend_jit_set_opline(&dasm_state, (p+1)->opline); } else if (p->op == ZEND_JIT_TRACE_BACK) { op_array = (zend_op_array*)p->op_array; @@ -2993,6 +3726,18 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par SET_STACK_TYPE(stack, i, IS_UNKNOWN); } } + if (ra) { + for (i = 0; i < op_array->last_var + op_array->T; i++) { + int j = p->first_ssa_var + i; + + if (ra[j] && (ra[j]->flags & ZREG_LOAD) != 0) { + //SET_STACK_REG(stack, i, ra[j]->reg); + if (!zend_jit_load_var(&dasm_state, ssa->var_info[j].type, i, ra[j]->reg)) { + goto jit_failure; + } + } + } + } } JIT_G(current_frame) = frame; if (res_type != IS_UNKNOWN @@ -3061,6 +3806,19 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par t->link = ZEND_JIT_TRACE_NUM; zend_jit_jmp(&dasm_state, 0); /* jump back to start of the trace loop */ } else if (p->stop == ZEND_JIT_TRACE_STOP_LINK) { + if (ra) { + /* Generate code for trace deoptimization */ + int i; + + for (i = 0; i < op_array->last_var + op_array->T; i++) { + if (STACK_REG(stack, i) != ZREG_NONE) { + // TODO: optimize out useless stores ???? + if (!zend_jit_store_var(&dasm_state, 1 << STACK_TYPE(stack, i), i, STACK_REG(stack, i))) { + goto jit_failure; + } + } + } + } if (!zend_jit_set_valid_ip(&dasm_state, p->opline)) { goto jit_failure; } @@ -3100,6 +3858,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par zend_arena_release(&CG(arena), checkpoint); JIT_G(current_frame) = NULL; + JIT_G(current_trace) = NULL; return handler; } @@ -3107,13 +3866,17 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par static int zend_jit_trace_exit_needs_deoptimization(uint32_t trace_num, uint32_t exit_num) { const zend_op *opline = zend_jit_traces[trace_num].exit_info[exit_num].opline; + uint32_t stack_size; + zend_jit_trace_stack *stack; opline = (const zend_op*)((uintptr_t)opline & ~(ZEND_JIT_EXIT_JITED|ZEND_JIT_EXIT_BLACKLISTED)); if (opline) { return 1; } - return 0; + stack_size = zend_jit_traces[trace_num].exit_info[exit_num].stack_size; + stack = zend_jit_traces[trace_num].stack_map + zend_jit_traces[trace_num].exit_info[exit_num].stack_offset; + return zend_jit_trace_stack_needs_deoptimization(stack, stack_size); } static const void *zend_jit_trace_exit_to_vm(uint32_t trace_num, uint32_t exit_num) @@ -3123,6 +3886,8 @@ static const void *zend_jit_trace_exit_to_vm(uint32_t trace_num, uint32_t exit_n void *checkpoint; char name[32]; const zend_op *opline; + uint32_t i, stack_size; + zend_jit_trace_stack *stack; if (!zend_jit_trace_exit_needs_deoptimization(trace_num, exit_num)) { return dasm_labels[zend_lbtrace_escape]; @@ -3139,7 +3904,16 @@ static const void *zend_jit_trace_exit_to_vm(uint32_t trace_num, uint32_t exit_n zend_jit_align_func(&dasm_state); - // TODO: Generate deoptimization code ??? + /* Deoptimization */ + stack_size = zend_jit_traces[trace_num].exit_info[exit_num].stack_size; + stack = zend_jit_traces[trace_num].stack_map + zend_jit_traces[trace_num].exit_info[exit_num].stack_offset; + for (i = 0; i < stack_size; i++) { + if (STACK_REG(stack, i) != ZREG_NONE) { + if (!zend_jit_store_var(&dasm_state, 1 << STACK_TYPE(stack, i), i, STACK_REG(stack, i))) { + goto jit_failure; + } + } + } opline = zend_jit_traces[trace_num].exit_info[exit_num].opline; opline = (const zend_op*)((uintptr_t)opline & ~(ZEND_JIT_EXIT_JITED|ZEND_JIT_EXIT_BLACKLISTED)); @@ -3151,10 +3925,9 @@ static const void *zend_jit_trace_exit_to_vm(uint32_t trace_num, uint32_t exit_n handler = dasm_link_and_encode(&dasm_state, NULL, NULL, NULL, NULL, name, 1); +jit_failure: dasm_free(&dasm_state); - zend_arena_release(&CG(arena), checkpoint); - return handler; } @@ -3505,14 +4278,13 @@ static void zend_jit_dump_exit_info(zend_jit_trace_info *t) fprintf(stderr, "---- TRACE %d exit info\n", t->id); for (i = 0; i < t->exit_count; i++) { + const zend_op_array *op_array = t->exit_info[i].op_array; uint32_t stack_size = t->exit_info[i].stack_size; zend_jit_trace_stack *stack = t->stack_map + t->exit_info[i].stack_offset; fprintf(stderr, " exit_%d:", i); if (t->exit_info[i].opline) { - // TODO: print exit opline number ??? - //fprintf(stderr, " %04d/", t->exit_info[i].opline - op_array->opcodes); - fprintf(stderr, " XXXX/"); + fprintf(stderr, " %04d/", (int)(t->exit_info[i].opline - op_array->opcodes)); } else { fprintf(stderr, " ----/"); } @@ -3524,8 +4296,9 @@ static void zend_jit_dump_exit_info(zend_jit_trace_info *t) for (j = 0; j < stack_size; j++) { zend_uchar type = STACK_TYPE(stack, j); if (type != IS_UNKNOWN) { - // TODO: print CV insted of X ??? - fprintf(stderr, " X%d:", j); + fprintf(stderr, " "); + zend_dump_var(op_array, (j < op_array->last_var) ? IS_CV : 0, j); + fprintf(stderr, ":"); if (type == IS_UNDEF) { fprintf(stderr, "undef"); } else { @@ -3953,7 +4726,7 @@ int ZEND_FASTCALL zend_jit_trace_exit(uint32_t exit_num, zend_jit_registers_buf /* Lock-free check if the side trace was already JIT-ed or blacklist-ed in another process */ // TODO: We may remoive this, becaus of the same check in zend_jit_trace_hot_side() ??? opline = t->exit_info[exit_num].opline; - if ((uintptr_t)opline & (ZEND_JIT_EXIT_JITED|ZEND_JIT_EXIT_BLACKLISTED)) { + if (EG(vm_interrupt) || ((uintptr_t)opline & (ZEND_JIT_EXIT_JITED|ZEND_JIT_EXIT_BLACKLISTED))) { opline = (const zend_op*)((uintptr_t)opline & ~(ZEND_JIT_EXIT_JITED|ZEND_JIT_EXIT_BLACKLISTED)); if (opline) { /* Set VM opline to continue interpretation */ diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 3fd7d4e83fded..8b6a62a43ef3f 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -2382,6 +2382,11 @@ static int zend_jit_trace_exit_stub(dasm_State **Dst) |.else | add r4, 8*4+8*8 /* CPU regs + SSE regs */ |.endif + + | // check for interrupt (try to avoid this ???) + | MEM_OP2_1_ZTS cmp, byte, executor_globals, vm_interrupt, 0, r0 + | jne ->interrupt_handler + | // execute_data = EG(current_execute_data) | MEM_OP2_2_ZTS mov, FP, aword, executor_globals, current_execute_data, r0 | test eax, eax @@ -2720,7 +2725,7 @@ static int zend_jit_set_valid_ip(dasm_State **Dst, const zend_op *opline) return 1; } -static int zend_jit_check_timeout(dasm_State **Dst, const zend_op *opline) +static int zend_jit_check_timeout(dasm_State **Dst, const zend_op *opline, const void *exit_addr) { #if 0 if (!zend_jit_set_valid_ip(Dst, opline)) { @@ -2731,13 +2736,21 @@ static int zend_jit_check_timeout(dasm_State **Dst, const zend_op *opline) #else | MEM_OP2_1_ZTS cmp, byte, executor_globals, vm_interrupt, 0, r0 if (last_valid_opline == opline) { - | jne ->interrupt_handler + if (exit_addr) { + | jne &exit_addr + } else { + | jne ->interrupt_handler + } } else { | jne >1 |.cold_code |1: | LOAD_IP_ADDR opline - | jmp ->interrupt_handler + if (exit_addr) { + | jmp &exit_addr + } else { + | jmp ->interrupt_handler + } |.code } #endif @@ -8472,7 +8485,7 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend |.code // TODO: Can we avoid checking for interrupts after each call ??? - if (!zend_jit_check_timeout(Dst, opline + 1)) { + if (!zend_jit_check_timeout(Dst, opline + 1, NULL)) { return 0; } if (opline->opcode != ZEND_DO_ICALL) { @@ -9448,13 +9461,17 @@ static int zend_jit_leave_func(dasm_State **Dst, const zend_op *opline, const ze && trace->op == ZEND_JIT_TRACE_BACK && trace->recursive) { const zend_op *next_opline = trace->opline; - uint32_t exit_point = zend_jit_trace_get_exit_point(opline, NULL, trace); - const void *exit_addr = zend_jit_trace_get_exit_addr(exit_point); + uint32_t exit_point; + const void *exit_addr; + zend_jit_trace_stack_frame *current_frame; trace++; ZEND_ASSERT(trace->op == ZEND_JIT_TRACE_VM || trace->op == ZEND_JIT_TRACE_END); next_opline = trace->opline; + current_frame = JIT_G(current_frame); + JIT_G(current_frame) = NULL; exit_point = zend_jit_trace_get_exit_point(opline, NULL, trace); + JIT_G(current_frame) = current_frame; exit_addr = zend_jit_trace_get_exit_addr(exit_point); if (!exit_addr) { return 0; @@ -11385,10 +11402,23 @@ static zend_regset zend_jit_get_scratch_regset(const zend_op *opline, const zend break; } + if (zend_jit_trigger == ZEND_JIT_ON_HOT_TRACE) { + if (ssa_op == ssa->ops + && JIT_G(current_trace)[ZEND_JIT_TRACE_START_REC_SIZE].op == ZEND_JIT_TRACE_INIT_CALL + && JIT_G(current_trace)[ZEND_JIT_TRACE_START_REC_SIZE].fake) { + ZEND_REGSET_INCL(regset, ZREG_R0); + ZEND_REGSET_INCL(regset, ZREG_R1); + } + } + #if ZTS /* %r0 is used to check EG(vm_interrupt) */ if (zend_jit_trigger == ZEND_JIT_ON_HOT_TRACE) { - // TODO: loop detection ??? + if (ssa_op == ssa->ops + && (JIT_G(current_trace)->stop == ZEND_JIT_TRACE_STOP_LOOP + || JIT_G(current_trace)->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_CALL)) { + ZEND_REGSET_INCL(regset, ZREG_R0); + } } else { uint32_t b = ssa->cfg.map[ssa_op - ssa->ops]; From 3e9dac2c6b5d69528ff5ef22ef7770c7532aa8cc Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 20 Apr 2020 16:35:52 +0200 Subject: [PATCH 204/338] Don't rand() in test Instead use port 0 to get a free port from the OS. --- ext/sockets/tests/socket_connect_params.phpt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/ext/sockets/tests/socket_connect_params.phpt b/ext/sockets/tests/socket_connect_params.phpt index 94c38de1cb923..45ff56d03103c 100644 --- a/ext/sockets/tests/socket_connect_params.phpt +++ b/ext/sockets/tests/socket_connect_params.phpt @@ -11,15 +11,17 @@ fa@php.net ?> --FILE-- --EXPECTF-- From 661c0ac7f3a7099bc1e0617b5e09dd799b44af23 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 15 Apr 2020 11:51:06 +0200 Subject: [PATCH 205/338] Remove support for EBCDIC Closes GH-5390. --- UPGRADING | 3 +++ build/php.m4 | 2 +- ext/standard/url.c | 30 ------------------------------ 3 files changed, 4 insertions(+), 31 deletions(-) diff --git a/UPGRADING b/UPGRADING index d412875c31b09..b6cc20547143f 100644 --- a/UPGRADING +++ b/UPGRADING @@ -601,6 +601,9 @@ PHP 8.0 UPGRADE NOTES 13. Other Changes ======================================== +- EBCDIC targets are no longer supported, though it's unlikely that they were + still working in the first place. + ======================================== 14. Performance Improvements ======================================== diff --git a/build/php.m4 b/build/php.m4 index 8cdfb4da518c1..c43340315fa4a 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -1384,7 +1384,7 @@ int main(void) { ac_cv_ebcdic=no ])]) if test "$ac_cv_ebcdic" = "yes"; then - AC_DEFINE(CHARSET_EBCDIC,1, [Define if system uses EBCDIC]) + AC_MSG_ERROR([PHP does not support EBCDIC targets]) fi ]) diff --git a/ext/standard/url.c b/ext/standard/url.c index 0d05ec98c1018..1b6dbaa6d8042 100644 --- a/ext/standard/url.c +++ b/ext/standard/url.c @@ -23,12 +23,6 @@ #include "url.h" #include "file.h" -#ifdef _OSD_POSIX -# ifndef CHARSET_EBCDIC -# define CHARSET_EBCDIC /* this machine uses EBCDIC, not ASCII! */ -# endif -# include "ebcdic.h" -#endif /*_OSD_POSIX*/ /* {{{ free_url */ @@ -469,7 +463,6 @@ PHPAPI zend_string *php_url_encode(char const *s, size_t len) if (c == ' ') { *to++ = '+'; -#ifndef CHARSET_EBCDIC } else if ((c < '0' && c != '-' && c != '.') || (c < 'A' && c > '9') || (c > 'Z' && c < 'a' && c != '_') || @@ -478,14 +471,6 @@ PHPAPI zend_string *php_url_encode(char const *s, size_t len) to[1] = hexchars[c >> 4]; to[2] = hexchars[c & 15]; to += 3; -#else /*CHARSET_EBCDIC*/ - } else if (!isalnum(c) && strchr("_-.", c) == NULL) { - /* Allow only alphanumeric chars and '_', '-', '.'; escape the rest */ - to[0] = '%'; - to[1] = hexchars[os_toascii[c] >> 4]; - to[2] = hexchars[os_toascii[c] & 15]; - to += 3; -#endif /*CHARSET_EBCDIC*/ } else { *to++ = c; } @@ -542,11 +527,7 @@ PHPAPI size_t php_url_decode(char *str, size_t len) } else if (*data == '%' && len >= 2 && isxdigit((int) *(data + 1)) && isxdigit((int) *(data + 2))) { -#ifndef CHARSET_EBCDIC *dest = (char) php_htoi(data + 1); -#else - *dest = os_toebcdic[(unsigned char) php_htoi(data + 1)]; -#endif data += 2; len -= 2; } else { @@ -574,7 +555,6 @@ PHPAPI zend_string *php_raw_url_encode(char const *s, size_t len) char c = s[x]; ret[y] = c; -#ifndef CHARSET_EBCDIC if ((c < '0' && c != '-' && c != '.') || (c < 'A' && c > '9') || (c > 'Z' && c < 'a' && c != '_') || @@ -582,12 +562,6 @@ PHPAPI zend_string *php_raw_url_encode(char const *s, size_t len) ret[y++] = '%'; ret[y++] = hexchars[(unsigned char) c >> 4]; ret[y] = hexchars[(unsigned char) c & 15]; -#else /*CHARSET_EBCDIC*/ - if (!isalnum(c) && strchr("_-.~", c) != NULL) { - ret[y++] = '%'; - ret[y++] = hexchars[os_toascii[(unsigned char) c] >> 4]; - ret[y] = hexchars[os_toascii[(unsigned char) c] & 15]; -#endif /*CHARSET_EBCDIC*/ } } ret[y] = '\0'; @@ -638,11 +612,7 @@ PHPAPI size_t php_raw_url_decode(char *str, size_t len) while (len--) { if (*data == '%' && len >= 2 && isxdigit((int) *(data + 1)) && isxdigit((int) *(data + 2))) { -#ifndef CHARSET_EBCDIC *dest = (char) php_htoi(data + 1); -#else - *dest = os_toebcdic[(unsigned char) php_htoi(data + 1)]; -#endif data += 2; len -= 2; } else { From 3d1b730c11a4e37884d25bf8af0d5726834986c4 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 20 Apr 2020 13:27:35 +0200 Subject: [PATCH 206/338] Fix #71417: fread() does not report zlib.inflate errors If the zlib.inflate filter fails to decompress the stream, we raise a notice instead of failing silently. --- NEWS | 3 +++ .../tests/filters/filter_errors_zlib_inflate.phpt | 4 ++++ ext/zlib/tests/bug71417.phpt | 8 +++++++- ext/zlib/tests/bug_52944.phpt | 4 +++- ext/zlib/tests/zlib_filter_inflate2.phpt | 3 ++- ext/zlib/zlib_filter.c | 1 + 6 files changed, 20 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 5e6ff58f39daa..e39f3587ad9c6 100644 --- a/NEWS +++ b/NEWS @@ -168,4 +168,7 @@ PHP NEWS . Add ZipArchive::isCompressionMethodSupported() and ZipArchive::isEncryptionMethodSupported() method (libzip 1.7.0). (Remi) +- Zlib: + . Fixed bug #71417 (fread() does not report zlib.inflate errors). (cmb) + <<< NOTE: Insert NEWS from last stable release here prior to actual release! >>> diff --git a/ext/standard/tests/filters/filter_errors_zlib_inflate.phpt b/ext/standard/tests/filters/filter_errors_zlib_inflate.phpt index be7bdba3fb90e..608a8ad28dbd5 100644 --- a/ext/standard/tests/filters/filter_errors_zlib_inflate.phpt +++ b/ext/standard/tests/filters/filter_errors_zlib_inflate.phpt @@ -10,5 +10,9 @@ filter_errors_test('zlib.inflate', gzencode('42')); --EXPECTF-- test filtering of buffered data +Notice: stream_filter_append(): zlib: data error in %s on line %d + Warning: stream_filter_append(): Filter failed to process pre-buffered data in %s test filtering of non buffered data + +Notice: stream_get_contents(): zlib: data error in %s on line %d diff --git a/ext/zlib/tests/bug71417.phpt b/ext/zlib/tests/bug71417.phpt index cadd1e67359a0..b601b4c725202 100644 --- a/ext/zlib/tests/bug71417.phpt +++ b/ext/zlib/tests/bug71417.phpt @@ -1,5 +1,5 @@ --TEST-- -Bug #71417: fread() does not detect decoding errors from filter zlib.inflate +Bug #71417: fread() does not report zlib.inflate errors --SKIPIF-- --FILE-- @@ -69,6 +69,8 @@ test(4); gzdecode(): Warning: gzdecode(): data error in %s on line %d + +Notice: fread(): zlib: data error in %s on line %d read: bool(false) gzdecode(): Warning: gzdecode(): data error in %s on line %d @@ -77,8 +79,12 @@ read: string(32) "The quick brown fox jumps over t" gzdecode(): Warning: gzdecode(): data error in %s on line %d + +Notice: fread(): zlib: data error in %s on line %d read: bool(false) gzdecode(): Warning: gzdecode(): data error in %s on line %d + +Notice: fread(): zlib: data error in %s on line %d read: bool(false) diff --git a/ext/zlib/tests/bug_52944.phpt b/ext/zlib/tests/bug_52944.phpt index 782e2396a7e6a..e63dde2d29369 100644 --- a/ext/zlib/tests/bug_52944.phpt +++ b/ext/zlib/tests/bug_52944.phpt @@ -18,7 +18,9 @@ var_dump(fread($fp,1)); var_dump(fread($fp,1)); fclose($fp); echo "Done.\n"; ---EXPECT-- +?> +--EXPECTF-- +Notice: fread(): zlib: data error in %s on line %d bool(false) string(0) "" Done. diff --git a/ext/zlib/tests/zlib_filter_inflate2.phpt b/ext/zlib/tests/zlib_filter_inflate2.phpt index 7dd2ebb594e58..0f7718dbdf4d2 100644 --- a/ext/zlib/tests/zlib_filter_inflate2.phpt +++ b/ext/zlib/tests/zlib_filter_inflate2.phpt @@ -33,7 +33,8 @@ fclose($fp); ---EXPECT-- +--EXPECTF-- +Notice: fread(): zlib: data error in %s on line %d 1 2 This is quite the thing ain't it diff --git a/ext/zlib/zlib_filter.c b/ext/zlib/zlib_filter.c index 9026fcfedfe31..cffa65f488df2 100644 --- a/ext/zlib/zlib_filter.c +++ b/ext/zlib/zlib_filter.c @@ -90,6 +90,7 @@ static php_stream_filter_status_t php_zlib_inflate_filter( exit_status = PSFS_PASS_ON; } else if (status != Z_OK) { /* Something bad happened */ + php_error_docref(NULL, E_NOTICE, "zlib: %s", zError(status)); php_stream_bucket_delref(bucket); /* reset these because despite the error the filter may be used again */ data->strm.next_in = data->inbuf; From 321d9d9ae39c676b4db4415440fe198c48691ab3 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 20 Apr 2020 17:39:28 +0200 Subject: [PATCH 207/338] Fix OPcache build `||` at the beginning of a line has special meaning for the DynAsm preprocessor. --- ext/opcache/jit/zend_jit_x86.dasc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 8b6a62a43ef3f..350872488272c 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -11415,8 +11415,8 @@ static zend_regset zend_jit_get_scratch_regset(const zend_op *opline, const zend /* %r0 is used to check EG(vm_interrupt) */ if (zend_jit_trigger == ZEND_JIT_ON_HOT_TRACE) { if (ssa_op == ssa->ops - && (JIT_G(current_trace)->stop == ZEND_JIT_TRACE_STOP_LOOP - || JIT_G(current_trace)->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_CALL)) { + && (JIT_G(current_trace)->stop == ZEND_JIT_TRACE_STOP_LOOP || + JIT_G(current_trace)->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_CALL)) { ZEND_REGSET_INCL(regset, ZREG_R0); } } else { From d554d91ce70c9397f4d700955fd9c70e578d362c Mon Sep 17 00:00:00 2001 From: Symeon Charalabides Date: Tue, 21 Apr 2020 01:44:57 +0200 Subject: [PATCH 208/338] Ensure hash_update_stream() always returns the same hash when $length = 0 --- .../tests/hash_update_stream_basic_001.phpt | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 ext/hash/tests/hash_update_stream_basic_001.phpt diff --git a/ext/hash/tests/hash_update_stream_basic_001.phpt b/ext/hash/tests/hash_update_stream_basic_001.phpt new file mode 100644 index 0000000000000..c145784dc94ea --- /dev/null +++ b/ext/hash/tests/hash_update_stream_basic_001.phpt @@ -0,0 +1,33 @@ +--TEST-- +Ensure hash_update_stream() always returns the same hash when $length = 0 +--CREDITS-- +Symeon Charalabides - @phpdublin +--SKIPIF-- + +--FILE-- + +--EXPECT-- +d41d8cd98f00b204e9800998ecf8427e +d41d8cd98f00b204e9800998ecf8427e +d41d8cd98f00b204e9800998ecf8427e From fa4bdf1cda3d48e2715841aa0bf5859e4b860ae5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 21 Apr 2020 10:17:19 +0200 Subject: [PATCH 209/338] Make gen_stub parallelism safe If PHP-Parser is not yet installed, make sure we don't try to install it N times in parallel. --- build/gen_stub.php | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/build/gen_stub.php b/build/gen_stub.php index d784907048bb3..5b2fee031784f 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -997,16 +997,26 @@ function generateFunctionEntries(?string $className, array $funcInfos): string { return $code; } -function initPhpParser() { - $version = "4.3.0"; - $phpParserDir = __DIR__ . "/PHP-Parser-$version"; - if (!is_dir($phpParserDir)) { +function installPhpParser(string $version, string $phpParserDir) { + $lockFile = __DIR__ . "/PHP-Parser-install-lock"; + $lockFd = fopen($lockFile, 'w+'); + if (!flock($lockFd, LOCK_EX)) { + throw new Exception("Failed to acquire installation lock"); + } + + try { + // Check whether a parallel process has already installed PHP-Parser. + if (is_dir($phpParserDir)) { + return; + } + $cwd = getcwd(); chdir(__DIR__); - passthru("wget https://github.com/nikic/PHP-Parser/archive/v$version.tar.gz", $exit); + $tarName = "v$version.tar.gz"; + passthru("wget https://github.com/nikic/PHP-Parser/archive/$tarName", $exit); if ($exit !== 0) { - passthru("curl -LO https://github.com/nikic/PHP-Parser/archive/v$version.tar.gz", $exit); + passthru("curl -LO https://github.com/nikic/PHP-Parser/archive/$tarName", $exit); } if ($exit !== 0) { throw new Exception("Failed to download PHP-Parser tarball"); @@ -1014,12 +1024,23 @@ function initPhpParser() { if (!mkdir($phpParserDir)) { throw new Exception("Failed to create directory $phpParserDir"); } - passthru("tar xvzf v$version.tar.gz -C PHP-Parser-$version --strip-components 1", $exit); + passthru("tar xvzf $tarName -C PHP-Parser-$version --strip-components 1", $exit); if ($exit !== 0) { throw new Exception("Failed to extract PHP-Parser tarball"); } - unlink(__DIR__ . "/v$version.tar.gz"); + unlink(__DIR__ . "/$tarName"); chdir($cwd); + } finally { + flock($lockFd, LOCK_UN); + @unlink($lockFile); + } +} + +function initPhpParser() { + $version = "4.3.0"; + $phpParserDir = __DIR__ . "/PHP-Parser-$version"; + if (!is_dir($phpParserDir)) { + installPhpParser($version, $phpParserDir); } spl_autoload_register(function(string $class) use($phpParserDir) { From 370c00e9cfb1ba9a51471fece87e13d566d715b4 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 28 Jan 2020 12:20:00 +0100 Subject: [PATCH 210/338] Add crude memory limit to tracked alloc Check whether the requested allocation size exceeds limit (rather than the cumulative size). This is useful to prevent allocations triggering OOM during fuzzing. --- Zend/zend_alloc.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 24cd4373449d2..753a8b830d4e3 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -2698,10 +2698,23 @@ ZEND_API void shutdown_memory_manager(int silent, int full_shutdown) #if ZEND_MM_CUSTOM static void *tracked_malloc(size_t size) { + zend_mm_heap *heap = AG(mm_heap); + if (size > heap->limit) { +#if ZEND_DEBUG + zend_mm_safe_error(heap, + "Allowed memory size of %zu bytes exhausted at %s:%d (tried to allocate %zu bytes)", + heap->limit, "file", 0, size); +#else + zend_mm_safe_error(heap, + "Allowed memory size of %zu bytes exhausted (tried to allocate %zu bytes)", + heap->limit, size); +#endif + } + void *ptr = __zend_malloc(size); zend_ulong h = ((uintptr_t) ptr) >> ZEND_MM_ALIGNMENT_LOG2; ZEND_ASSERT((void *) (uintptr_t) (h << ZEND_MM_ALIGNMENT_LOG2) == ptr); - zend_hash_index_add_empty_element(AG(mm_heap)->tracked_allocs, h); + zend_hash_index_add_empty_element(heap->tracked_allocs, h); return ptr; } @@ -2742,6 +2755,9 @@ static void alloc_globals_ctor(zend_alloc_globals *alloc_globals) zend_mm_heap *mm_heap = alloc_globals->mm_heap = malloc(sizeof(zend_mm_heap)); memset(mm_heap, 0, sizeof(zend_mm_heap)); mm_heap->use_custom_heap = ZEND_MM_CUSTOM_HEAP_STD; + mm_heap->limit = ((size_t)Z_L(-1) >> (size_t)Z_L(1)); + mm_heap->overflow = 0; + if (!tracked) { /* Use system allocator. */ mm_heap->custom_heap.std._malloc = __zend_malloc; From 832cfa15ebb32eb98409e2445350b5ae289f11c9 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 21 Apr 2020 12:07:36 +0300 Subject: [PATCH 211/338] Removed old TODO --- ext/opcache/jit/zend_jit_trace.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index ed4330a287f97..ff4efe81be74b 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -2500,7 +2500,6 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par goto jit_failure; } } - // TODO: interupt exit may require deoptimization through side exit ???? zend_jit_check_timeout(&dasm_state, opline, exit_addr); } From 292085f3362b9ada15f4e96ab1f2560e21d81bd6 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 21 Apr 2020 12:23:21 +0200 Subject: [PATCH 212/338] Generate zend_builtin_functions FEs from stubs --- Zend/zend_builtin_functions.c | 123 +------------------------- Zend/zend_builtin_functions.stub.php | 2 + Zend/zend_builtin_functions_arginfo.h | 121 +++++++++++++++++++++++++ 3 files changed, 124 insertions(+), 122 deletions(-) diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 111dfc019343e..5682d02822f90 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -27,131 +27,10 @@ #include "zend_extensions.h" #include "zend_closures.h" #include "zend_generators.h" - -static ZEND_FUNCTION(zend_version); -static ZEND_FUNCTION(func_num_args); -static ZEND_FUNCTION(func_get_arg); -static ZEND_FUNCTION(func_get_args); -static ZEND_FUNCTION(strlen); -static ZEND_FUNCTION(strcmp); -static ZEND_FUNCTION(strncmp); -static ZEND_FUNCTION(strcasecmp); -static ZEND_FUNCTION(strncasecmp); -static ZEND_FUNCTION(error_reporting); -static ZEND_FUNCTION(define); -static ZEND_FUNCTION(defined); -static ZEND_FUNCTION(get_class); -static ZEND_FUNCTION(get_called_class); -static ZEND_FUNCTION(get_parent_class); -static ZEND_FUNCTION(method_exists); -static ZEND_FUNCTION(property_exists); -static ZEND_FUNCTION(class_exists); -static ZEND_FUNCTION(interface_exists); -static ZEND_FUNCTION(trait_exists); -static ZEND_FUNCTION(function_exists); -static ZEND_FUNCTION(class_alias); -static ZEND_FUNCTION(get_included_files); -static ZEND_FUNCTION(is_subclass_of); -static ZEND_FUNCTION(is_a); -static ZEND_FUNCTION(get_class_vars); -static ZEND_FUNCTION(get_object_vars); -static ZEND_FUNCTION(get_mangled_object_vars); -static ZEND_FUNCTION(get_class_methods); -static ZEND_FUNCTION(trigger_error); -static ZEND_FUNCTION(set_error_handler); -static ZEND_FUNCTION(restore_error_handler); -static ZEND_FUNCTION(set_exception_handler); -static ZEND_FUNCTION(restore_exception_handler); -static ZEND_FUNCTION(get_declared_classes); -static ZEND_FUNCTION(get_declared_traits); -static ZEND_FUNCTION(get_declared_interfaces); -static ZEND_FUNCTION(get_defined_functions); -static ZEND_FUNCTION(get_defined_vars); -static ZEND_FUNCTION(get_resource_type); -static ZEND_FUNCTION(get_resources); -static ZEND_FUNCTION(get_loaded_extensions); -static ZEND_FUNCTION(extension_loaded); -static ZEND_FUNCTION(get_extension_funcs); -static ZEND_FUNCTION(get_defined_constants); -static ZEND_FUNCTION(debug_backtrace); -static ZEND_FUNCTION(debug_print_backtrace); -#if ZEND_DEBUG && defined(ZTS) -static ZEND_FUNCTION(zend_thread_id); -#endif -static ZEND_FUNCTION(gc_mem_caches); -static ZEND_FUNCTION(gc_collect_cycles); -static ZEND_FUNCTION(gc_enabled); -static ZEND_FUNCTION(gc_enable); -static ZEND_FUNCTION(gc_disable); -static ZEND_FUNCTION(gc_status); - #include "zend_builtin_functions_arginfo.h" /* }}} */ -static const zend_function_entry builtin_functions[] = { /* {{{ */ - ZEND_FE(zend_version, arginfo_zend_version) - ZEND_FE(func_num_args, arginfo_func_num_args) - ZEND_FE(func_get_arg, arginfo_func_get_arg) - ZEND_FE(func_get_args, arginfo_func_get_args) - ZEND_FE(strlen, arginfo_strlen) - ZEND_FE(strcmp, arginfo_strcmp) - ZEND_FE(strncmp, arginfo_strncmp) - ZEND_FE(strcasecmp, arginfo_strcasecmp) - ZEND_FE(strncasecmp, arginfo_strncasecmp) - ZEND_FE(error_reporting, arginfo_error_reporting) - ZEND_FE(define, arginfo_define) - ZEND_FE(defined, arginfo_defined) - ZEND_FE(get_class, arginfo_get_class) - ZEND_FE(get_called_class, arginfo_get_called_class) - ZEND_FE(get_parent_class, arginfo_get_parent_class) - ZEND_FE(method_exists, arginfo_method_exists) - ZEND_FE(property_exists, arginfo_property_exists) - ZEND_FE(class_exists, arginfo_class_exists) - ZEND_FE(interface_exists, arginfo_interface_exists) - ZEND_FE(trait_exists, arginfo_trait_exists) - ZEND_FE(function_exists, arginfo_function_exists) - ZEND_FE(class_alias, arginfo_class_alias) - ZEND_FE(get_included_files, arginfo_get_included_files) - ZEND_FALIAS(get_required_files, get_included_files, arginfo_get_required_files) - ZEND_FE(is_subclass_of, arginfo_is_subclass_of) - ZEND_FE(is_a, arginfo_is_a) - ZEND_FE(get_class_vars, arginfo_get_class_vars) - ZEND_FE(get_object_vars, arginfo_get_object_vars) - ZEND_FE(get_mangled_object_vars, arginfo_get_mangled_object_vars) - ZEND_FE(get_class_methods, arginfo_get_class_methods) - ZEND_FE(trigger_error, arginfo_trigger_error) - ZEND_FALIAS(user_error, trigger_error, arginfo_user_error) - ZEND_FE(set_error_handler, arginfo_set_error_handler) - ZEND_FE(restore_error_handler, arginfo_restore_error_handler) - ZEND_FE(set_exception_handler, arginfo_set_exception_handler) - ZEND_FE(restore_exception_handler, arginfo_restore_exception_handler) - ZEND_FE(get_declared_classes, arginfo_get_declared_classes) - ZEND_FE(get_declared_traits, arginfo_get_declared_traits) - ZEND_FE(get_declared_interfaces, arginfo_get_declared_interfaces) - ZEND_FE(get_defined_functions, arginfo_get_defined_functions) - ZEND_FE(get_defined_vars, arginfo_get_defined_vars) - ZEND_FE(get_resource_type, arginfo_get_resource_type) - ZEND_FE(get_resources, arginfo_get_resources) - ZEND_FE(get_loaded_extensions, arginfo_get_loaded_extensions) - ZEND_FE(extension_loaded, arginfo_extension_loaded) - ZEND_FE(get_extension_funcs, arginfo_get_extension_funcs) - ZEND_FE(get_defined_constants, arginfo_get_defined_constants) - ZEND_FE(debug_backtrace, arginfo_debug_backtrace) - ZEND_FE(debug_print_backtrace, arginfo_debug_print_backtrace) -#if ZEND_DEBUG && defined(ZTS) - ZEND_FE(zend_thread_id, arginfo_zend_thread_id) -#endif - ZEND_FE(gc_mem_caches, arginfo_gc_mem_caches) - ZEND_FE(gc_collect_cycles, arginfo_gc_collect_cycles) - ZEND_FE(gc_enabled, arginfo_gc_enabled) - ZEND_FE(gc_enable, arginfo_gc_enable) - ZEND_FE(gc_disable, arginfo_gc_disable) - ZEND_FE(gc_status, arginfo_gc_status) - ZEND_FE_END -}; -/* }}} */ - ZEND_MINIT_FUNCTION(core) { /* {{{ */ zend_class_entry class_entry; @@ -167,7 +46,7 @@ ZEND_MINIT_FUNCTION(core) { /* {{{ */ zend_module_entry zend_builtin_module = { /* {{{ */ STANDARD_MODULE_HEADER, "Core", - builtin_functions, + ext_functions, ZEND_MINIT(core), NULL, NULL, diff --git a/Zend/zend_builtin_functions.stub.php b/Zend/zend_builtin_functions.stub.php index 6f2f9f25f3fa9..ec3d5a5203d8a 100644 --- a/Zend/zend_builtin_functions.stub.php +++ b/Zend/zend_builtin_functions.stub.php @@ -1,5 +1,7 @@ Date: Tue, 21 Apr 2020 14:56:56 +0300 Subject: [PATCH 213/338] Register allocation is useless if JIT just calls standarad VM handlers --- ext/opcache/jit/zend_jit_trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index ff4efe81be74b..551f94a4930fc 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -2332,7 +2332,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par ssa = zend_jit_trace_build_tssa(trace_buffer, parent_trace, exit_num, script, op_arrays, &num_op_arrays); /* Register allocation */ - if (zend_jit_reg_alloc) { + if (zend_jit_reg_alloc && zend_jit_level >= ZEND_JIT_LEVEL_INLINE) { ra = zend_jit_trace_allocate_registers(trace_buffer, ssa); } From 94fba0262136eb09e8b745ecec3f50218cef07bb Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 21 Apr 2020 17:34:31 +0300 Subject: [PATCH 214/338] Reuse registers allocated for parent trace in side traces --- ext/opcache/jit/zend_jit.c | 9 ++++-- ext/opcache/jit/zend_jit_trace.c | 55 ++++++++++++++++++++++++++++++-- 2 files changed, 58 insertions(+), 6 deletions(-) diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index f519e6d749f25..267b2edb33c52 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -1717,9 +1717,12 @@ static void zend_jit_dump_lifetime_interval(const zend_op_array *op_array, const fprintf(stderr, " store"); } if (ival->hint) { - var_num = ssa->vars[ival->hint->ssa_var].var; - fprintf(stderr, " hint=#%d.", ival->hint->ssa_var); - zend_dump_var(op_array, (var_num < op_array->last_var ? IS_CV : 0), var_num); + fprintf(stderr, " hint"); + if (ival->hint->ssa_var >= 0) { + var_num = ssa->vars[ival->hint->ssa_var].var; + fprintf(stderr, "=#%d.", ival->hint->ssa_var); + zend_dump_var(op_array, (var_num < op_array->last_var ? IS_CV : 0), var_num); + } if (ival->hint->reg != ZREG_NONE) { fprintf(stderr, " (%s)", zend_reg_name[ival->hint->reg]); } diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 551f94a4930fc..394554500df5e 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -1738,7 +1738,7 @@ static void zend_jit_close_var(zend_jit_trace_stack *stack, uint32_t n, const ze } } -static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace_rec *trace_buffer, zend_ssa *ssa) +static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace_rec *trace_buffer, zend_ssa *ssa, uint32_t parent_trace, uint32_t exit_num) { const zend_op **ssa_opcodes = ((zend_tssa*)ssa)->tssa_opcodes; zend_jit_trace_rec *p; @@ -1751,22 +1751,28 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace uint8_t *flags; const zend_op_array **vars_op_array; zend_lifetime_interval **intervals, *list, *ival; + zend_lifetime_interval *hints = NULL; void *checkpoint; zend_jit_trace_stack_frame *frame; zend_jit_trace_stack *stack; + uint32_t parent_vars_count = parent_trace ? + zend_jit_traces[parent_trace].exit_info[exit_num].stack_size : 0; ALLOCA_FLAG(use_heap); ZEND_ASSERT(ssa->var_info != NULL); start = do_alloca(sizeof(int) * ssa->vars_count * 2 + ZEND_MM_ALIGNED_SIZE(sizeof(uint8_t) * ssa->vars_count) + - sizeof(zend_op_array*) * ssa->vars_count, use_heap); + ZEND_MM_ALIGNED_SIZE(sizeof(zend_op_array*) * ssa->vars_count) + + ZEND_MM_ALIGNED_SIZE(sizeof(zend_lifetime_interval) * parent_vars_count), + use_heap); if (!start) { return NULL; } end = start + ssa->vars_count; flags = (uint8_t*)(end + ssa->vars_count); vars_op_array = (const zend_op_array**)(flags + ZEND_MM_ALIGNED_SIZE(sizeof(uint8_t) * ssa->vars_count)); + hints = (zend_lifetime_interval*)((char*)vars_op_array + ZEND_MM_ALIGNED_SIZE(sizeof(zend_op_array*) * ssa->vars_count)); memset(start, -1, sizeof(int) * ssa->vars_count * 2); memset(flags, 0, sizeof(uint8_t) * ssa->vars_count); @@ -2105,6 +2111,30 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace start = end = NULL; /* Add hints */ + if (parent_vars_count) { + zend_jit_trace_stack *parent_stack = + zend_jit_traces[parent_trace].stack_map + + zend_jit_traces[parent_trace].exit_info[exit_num].stack_offset; + + j = trace_buffer->op_array->last_var; + if (trace_buffer->start != ZEND_JIT_TRACE_START_ENTER) { + j += trace_buffer->op_array->T; + } + if (parent_vars_count < (uint32_t)j) { + j = parent_vars_count; + } + if (j) { + memset(hints, 0, sizeof(zend_lifetime_interval) * j); + for (i = 0; i < j; i++) { + if (intervals[i] && STACK_REG(parent_stack, i) != ZREG_NONE) { + intervals[i]->hint = hints + i; + hints[i].ssa_var = - 1; + hints[i].reg = STACK_REG(parent_stack, i); + } + } + } + } + if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) { zend_ssa_phi *phi = ssa->blocks[1].phis; @@ -2241,6 +2271,25 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace } } + if (parent_vars_count) { + /* Variables that reuse registers from parent trace don't have to be loaded */ + j = op_array->last_var; + if (trace_buffer->start != ZEND_JIT_TRACE_START_ENTER) { + j += op_array->T; + } + if (parent_vars_count < (uint32_t)j) { + j = parent_vars_count; + } + for (i = 0; i < j; i++) { + if (intervals[i] + && intervals[i]->hint + && intervals[i]->reg == intervals[i]->hint->reg + && intervals[i]->hint->ssa_var == -1) { + intervals[i]->flags &= ~ZREG_LOAD; + } + } + } + /* Remove useless register allocation */ for (i = 0; i < ssa->vars_count; i++) { if (intervals[i] && @@ -2333,7 +2382,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par /* Register allocation */ if (zend_jit_reg_alloc && zend_jit_level >= ZEND_JIT_LEVEL_INLINE) { - ra = zend_jit_trace_allocate_registers(trace_buffer, ssa); + ra = zend_jit_trace_allocate_registers(trace_buffer, ssa, parent_trace, exit_num); } p = trace_buffer; From 40ceafc7f26c134f457b9e26105d904e10755771 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 21 Apr 2020 17:00:12 +0200 Subject: [PATCH 215/338] Fix number of required parameters in printf If n$ references are involved, the maximum argnum referenced may not the one at the end. Store it explicitly. --- ext/standard/formatted_print.c | 10 +++++----- ext/standard/tests/strings/sprintf_error.phpt | 7 +++++++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c index ad8a79960c282..f99187b1c8e79 100644 --- a/ext/standard/formatted_print.c +++ b/ext/standard/formatted_print.c @@ -399,7 +399,7 @@ php_formatted_print(char *format, size_t format_len, zval *args, int argc, int n char *temppos, padding; zend_string *result; int always_sign; - int bad_arg_number = 0; + int max_missing_argnum = -1; result = zend_string_alloc(size, 0); @@ -527,7 +527,7 @@ php_formatted_print(char *format, size_t format_len, zval *args, int argc, int n PRINTF_DEBUG(("sprintf: format character='%c'\n", *format)); if (argnum >= argc) { - bad_arg_number = 1; + max_missing_argnum = MAX(max_missing_argnum, argnum); continue; } @@ -626,12 +626,12 @@ php_formatted_print(char *format, size_t format_len, zval *args, int argc, int n } } - if (bad_arg_number == 1) { + if (max_missing_argnum >= 0) { efree(result); if (nb_additional_parameters == -1) { - zend_value_error("The arguments array must contain %d items, %d given", argnum + 1, argc); + zend_value_error("The arguments array must contain %d items, %d given", max_missing_argnum + 1, argc); } else { - zend_argument_count_error("%d parameters are required, %d given", argnum + nb_additional_parameters + 1, argc + nb_additional_parameters); + zend_argument_count_error("%d parameters are required, %d given", max_missing_argnum + nb_additional_parameters + 1, argc + nb_additional_parameters); } return NULL; } diff --git a/ext/standard/tests/strings/sprintf_error.phpt b/ext/standard/tests/strings/sprintf_error.phpt index 4ba7a539feab6..bc34b1d0f3dc6 100644 --- a/ext/standard/tests/strings/sprintf_error.phpt +++ b/ext/standard/tests/strings/sprintf_error.phpt @@ -60,6 +60,12 @@ try { echo $e->getMessage(), "\n"; } +try { + var_dump(sprintf('%100$d %d')); +} catch (\ArgumentCountError $e) { + echo $e->getMessage(), "\n"; +} + echo "Done"; ?> --EXPECTF-- @@ -75,4 +81,5 @@ sprintf() expects at least %d parameter, %d given 3 parameters are required, 1 given 4 parameters are required, 2 given 4 parameters are required, 1 given +101 parameters are required, 1 given Done From 2aa661887f2f313d5dbac04f78f07ab59c06d6d8 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 21 Apr 2020 18:24:03 +0200 Subject: [PATCH 216/338] Remove redundant vfprintf/vsprintf variation tests These duplicate vprintf() variation tests. While it's useful to test the vfprintf() and vsprintf() variants of the function, the main formatting machinery is shared between them, and it makes little sense to repeat the full set of format tests for all of them. --- .../tests/strings/vfprintf_variation10.phpt | Bin 2936 -> 0 bytes .../tests/strings/vfprintf_variation11.phpt | 86 -------- .../strings/vfprintf_variation11_64bit.phpt | 86 -------- .../tests/strings/vfprintf_variation12.phpt | 123 ------------ .../strings/vfprintf_variation12_64bit.phpt | 123 ------------ .../tests/strings/vfprintf_variation13.phpt | 86 -------- .../strings/vfprintf_variation13_64bit.phpt | 86 -------- .../tests/strings/vfprintf_variation14.phpt | 123 ------------ .../strings/vfprintf_variation14_64bit.phpt | 123 ------------ .../tests/strings/vfprintf_variation15.phpt | 73 ------- .../strings/vfprintf_variation15_64bit.phpt | 73 ------- .../tests/strings/vfprintf_variation16.phpt | 110 ----------- .../strings/vfprintf_variation16_64bit.phpt | 110 ----------- .../tests/strings/vfprintf_variation17.phpt | 68 ------- .../tests/strings/vfprintf_variation18.phpt | 105 ---------- .../tests/strings/vfprintf_variation19.phpt | 92 --------- .../strings/vfprintf_variation19_64bit.phpt | 92 --------- .../tests/strings/vfprintf_variation20.phpt | 173 ---------------- .../tests/strings/vfprintf_variation21.phpt | 164 ---------------- .../tests/strings/vfprintf_variation3.phpt | 84 -------- .../tests/strings/vfprintf_variation4.phpt | 111 ----------- .../strings/vfprintf_variation4_64bit.phpt | 112 ----------- .../tests/strings/vfprintf_variation5.phpt | 83 -------- .../tests/strings/vfprintf_variation6.phpt | 106 ---------- .../tests/strings/vfprintf_variation7.phpt | Bin 2374 -> 0 bytes .../tests/strings/vfprintf_variation8.phpt | 143 -------------- .../tests/strings/vfprintf_variation9.phpt | Bin 1836 -> 0 bytes .../tests/strings/vsprintf_variation1.phpt | 184 ------------------ .../tests/strings/vsprintf_variation10.phpt | Bin 2766 -> 0 bytes .../tests/strings/vsprintf_variation11.phpt | 84 -------- .../strings/vsprintf_variation11_64bit.phpt | 84 -------- .../tests/strings/vsprintf_variation12.phpt | 118 ----------- .../strings/vsprintf_variation12_64bit.phpt | 118 ----------- .../tests/strings/vsprintf_variation13.phpt | 84 -------- .../strings/vsprintf_variation13_64bit.phpt | 84 -------- .../tests/strings/vsprintf_variation14.phpt | 119 ----------- .../strings/vsprintf_variation14_64bit.phpt | 119 ----------- .../tests/strings/vsprintf_variation15.phpt | 66 ------- .../strings/vsprintf_variation15_64bit.phpt | 68 ------- .../tests/strings/vsprintf_variation16.phpt | 104 ---------- .../strings/vsprintf_variation16_64bit.phpt | 104 ---------- .../tests/strings/vsprintf_variation17.phpt | 64 ------ .../tests/strings/vsprintf_variation18.phpt | 100 ---------- .../tests/strings/vsprintf_variation19.phpt | 91 --------- .../strings/vsprintf_variation19_64bit.phpt | 91 --------- .../tests/strings/vsprintf_variation2.phpt | 171 ---------------- .../tests/strings/vsprintf_variation3.phpt | 81 -------- .../tests/strings/vsprintf_variation4.phpt | 104 ---------- .../strings/vsprintf_variation4_64bit.phpt | 104 ---------- .../tests/strings/vsprintf_variation5.phpt | 81 -------- .../tests/strings/vsprintf_variation6.phpt | 100 ---------- .../tests/strings/vsprintf_variation7.phpt | Bin 2233 -> 0 bytes .../tests/strings/vsprintf_variation8.phpt | 135 ------------- .../tests/strings/vsprintf_variation9.phpt | Bin 1701 -> 0 bytes 54 files changed, 4993 deletions(-) delete mode 100644 ext/standard/tests/strings/vfprintf_variation10.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation11.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation11_64bit.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation12.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation12_64bit.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation13.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation13_64bit.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation14.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation14_64bit.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation15.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation15_64bit.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation16.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation16_64bit.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation17.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation18.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation19.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation19_64bit.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation20.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation21.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation3.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation4.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation4_64bit.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation5.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation6.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation7.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation8.phpt delete mode 100644 ext/standard/tests/strings/vfprintf_variation9.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation1.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation10.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation11.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation11_64bit.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation12.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation12_64bit.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation13.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation13_64bit.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation14.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation14_64bit.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation15.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation15_64bit.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation16.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation16_64bit.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation17.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation18.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation19.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation19_64bit.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation2.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation3.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation4.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation4_64bit.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation5.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation6.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation7.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation8.phpt delete mode 100644 ext/standard/tests/strings/vsprintf_variation9.phpt diff --git a/ext/standard/tests/strings/vfprintf_variation10.phpt b/ext/standard/tests/strings/vfprintf_variation10.phpt deleted file mode 100644 index e3e6a5188054549de27033dd2a521bea4886c0a7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2936 zcmbtW&2HO95Vo&;im57tk}Ogp^;6ldlRAw87%++;cF-PN2sE{{h|pYtTv`c&_E4Y? zlc(sRw;p>h&`0SvyZn*l06EmMxVyudZ@!rw&939z%&%`8$GQ=@qQ_{R#i@!qU5bh{ zRIyCyl!`pK7xWlpaln$C912%KMv=@O0+rJyRx3(n>S*a>kQ5@f9Ou>L)f~XzK3}ia z)}TkPGpVHduoeVNc&WV+btn_LEV58gdljV11Uh}n70BFE+xUSX$gD(f+k3u>+#@7k4qN4=UD}2W+8XK86boH_vhrAe$A=4JOwl{>J9@^z{fl(`r+Kk5! zj~{+Jv<>A8E&`nyl$_ycN{;v4WJ}kji4EC~)2f7A4tXAgE6R(zGTu<8Du_|k`)He0 z48>4pD9yFR?x2bU+m_|nz*>6S7N$DS4Q|Im6!2z*NNSYG03~mJ98@YzC+@6Ijv0=p zQ>-|6{dY2QeY`V+=kq&qcpRTJN~4K89z%|CiuWVmJvrf}?+%BJmNWI-iPxucm|$mE zYch5xTUxV`I~w)rc!o^^=FD?F*vx#__q+Z5aP;qYKNw(6CqS4^8{giPUFj#t^AyiI z$Pv^*o|*H+Z{C126YdizGS%kI%#dV;Oz$Z-(>HQB(b?~`sMRN%Y&=#XNu=Fi*`7Zt zWz?$XtPPs=3;VcP)XZDA5RNC)Z)VyaHZA9g$Q~M{%7wi$>pd3id0fNj$?b3>vt-Gz zKfJxV;!$OVXf@PZBNmSFussgVx9dzaT}daP$wZluVYlq19b^y*EX591jt7*g1grdk zUaQvPl)+W`PA95awm5Il-G^ZAwM`Txd9%8C^LAdpdUbJijn%$+vo*D5%j597 zwT|bXKZB{-h~!axh80p+>mrlQ+}oPN1=X3Yf6jMOCIU@!8K?kkO`#Eo*(Z*uPddu2 zNQ@N4tYhqxxAo508H>`~Xf=s|A+`tqTfbOd?!q$BF89eEg*fgMxAtZ6u;wv}ajfDz zYcuDCUY*lo@$&M`VnHt1gX$Pr)JHvfw|cM8c;kpVUv=8in$FSx)*|gRD5$-Svb$Xz z$b@rT6(3I)U;TdJ}LHF_CPCnv7Q1)A$Vs7AkQhx5rLHmY$ zPbj;xF>Z&lNR`MCgm-2Em-~5VyL$(@xn6YXBciEpLx>x-cAGj5UBX=7g6L>Tj)Q}= zU!fxJ)EvdyraCnHB`RxF>c_`t)-RS7g^A1srxy15*0IPsyg7?|p%#2P@kL-O-CgLJ zD}Xu0i!_PTciRfc{_|(JfX#n;J^!BXcK_?HU;$|>Y!6Xe7xV|c;O+jILi&|{^iL$%r@wgm0xHnn#qf79K7ASE(^HHQV;m4Z?B*jde%E`(68g?a|JDnwZ~zt7 o-HBz)7>9%pV;lmbo^DB>Om{FQ6^3@h7zY&`CWZ%3cBY5ce;1(|@&Et; diff --git a/ext/standard/tests/strings/vfprintf_variation11.phpt b/ext/standard/tests/strings/vfprintf_variation11.phpt deleted file mode 100644 index 2c4134f3b7b5b..0000000000000 --- a/ext/standard/tests/strings/vfprintf_variation11.phpt +++ /dev/null @@ -1,86 +0,0 @@ ---TEST-- -Test vfprintf() function : usage variations - octal formats with octal values ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing vfprintf() : octal formats with octal values *** - --- Iteration 1 -- -0 --- Iteration 2 -- -37777777777 1 --- Iteration 3 -- -20000000000 o, 17777777777 20000000001 --- Iteration 4 -- - 37776543211 0000 --- Iteration 5 -- -111 2222 37777444445 37733333334 --- Iteration 6 -- -11073 7653 123 12 --- Iteration 7 -- -% %o o --- Iteration 8 -- -1 2 3 4 diff --git a/ext/standard/tests/strings/vfprintf_variation11_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation11_64bit.phpt deleted file mode 100644 index 355d14d185a51..0000000000000 --- a/ext/standard/tests/strings/vfprintf_variation11_64bit.phpt +++ /dev/null @@ -1,86 +0,0 @@ ---TEST-- -Test vfprintf() function : usage variations - octal formats with octal values ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing vfprintf() : octal formats with octal values *** - --- Iteration 1 -- -0 --- Iteration 2 -- -1777777777777777777777 1 --- Iteration 3 -- -1777777777760000000000 o, 17777777777 1777777777760000000001 --- Iteration 4 -- - 1777777777777776543211 0000 --- Iteration 5 -- -111 2222 1777777777777777444445 1777777777777733333334 --- Iteration 6 -- -11073 7653 123 12 --- Iteration 7 -- -% %o o --- Iteration 8 -- -1 2 3 4 diff --git a/ext/standard/tests/strings/vfprintf_variation12.phpt b/ext/standard/tests/strings/vfprintf_variation12.phpt deleted file mode 100644 index 02fe5ac6f8f2a..0000000000000 --- a/ext/standard/tests/strings/vfprintf_variation12.phpt +++ /dev/null @@ -1,123 +0,0 @@ ---TEST-- -Test vfprintf() function : usage variations - octal formats with non-octal values ---SKIPIF-- - ---FILE-- -"12twelve"), - array("3"), array("4"), array("1"), array("2") ), - - // array of boolean data - array( true, TRUE, false, - TRUE, 0, FALSE, 1, - true, false, TRUE, - 0, 1, 1, 0, - 1, TRUE, 0, FALSE), - -); - -/* creating dumping file */ -$data_file = __DIR__ . '/vfprintf_variation12.txt'; -if (!($fp = fopen($data_file, 'wt'))) - return; - -// looping to test vfprintf() with different octal formats from the above $format array -// and with non-octal values from the above $args_array array -$counter = 1; -foreach($args_array as $args) { - fprintf($fp, "\n-- Iteration %d --\n",$counter); - vfprintf($fp, $formats, $args); - $counter++; -} - -fclose($fp); -print_r(file_get_contents($data_file)); -echo "\n"; - -unlink($data_file); - -?> ---EXPECT-- -*** Testing vfprintf() : octal formats and non-octal values *** - --- Iteration 1 -- -2 0 12 - 361100 o 37777775456 2322 - - 30071 14 37777777764 37777416700 - 12 361100 2 0 --- Iteration 2 -- -2 37777777776 2 - 361100 o 37720715133 57062645 - - 57060664 4475347 37721631371 37720717336 - 2 361100 2 37777777776 --- Iteration 3 -- -0 0 0 - 173 o 37777777605 173 - - 2322 0 $0 _0 - 0 173 0 0 --- Iteration 4 -- -1 1 1 - 1 o 1 1 - - #1 1 $1 _1 - 1 1 1 1 --- Iteration 5 -- -1 1 0 - 1 o 0 1 - - #0 1 $1 _0 - 0 1 1 1 diff --git a/ext/standard/tests/strings/vfprintf_variation12_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation12_64bit.phpt deleted file mode 100644 index d6c28bc78e638..0000000000000 --- a/ext/standard/tests/strings/vfprintf_variation12_64bit.phpt +++ /dev/null @@ -1,123 +0,0 @@ ---TEST-- -Test vfprintf() function : usage variations - octal formats with non-octal values ---SKIPIF-- - ---FILE-- -"12twelve"), - array("3"), array("4"), array("1"), array("2") ), - - // array of boolean data - array( true, TRUE, false, - TRUE, 0, FALSE, 1, - true, false, TRUE, - 0, 1, 1, 0, - 1, TRUE, 0, FALSE), - -); - -/* creating dumping file */ -$data_file = __DIR__ . '/vfprintf_variation12_64bit.txt'; -if (!($fp = fopen($data_file, 'wt'))) - return; - -// looping to test vfprintf() with different octal formats from the above $format array -// and with non-octal values from the above $args_array array -$counter = 1; -foreach($args_array as $args) { - fprintf($fp, "\n-- Iteration %d --\n",$counter); - vfprintf($fp, $formats, $args); - $counter++; -} - -fclose($fp); -print_r(file_get_contents($data_file)); -echo "\n"; - -unlink($data_file); - -?> ---EXPECT-- -*** Testing vfprintf() : octal formats and non-octal values *** - --- Iteration 1 -- -2 0 12 - 361100 o 1777777777777777775456 2322 - - 30071 14 1777777777777777777764 1777777777777777416700 - 12 361100 2 0 --- Iteration 2 -- -2 1777777777777777777776 2 - 361100 o 1777777777777720715133 57062645 - - 57060664 4475347 1777777777777721631371 1777777777777720717336 - 2 361100 2 1777777777777777777776 --- Iteration 3 -- -0 0 0 - 173 o 1777777777777777777605 173 - - 2322 0 $0 _0 - 0 173 0 0 --- Iteration 4 -- -1 1 1 - 1 o 1 1 - - #1 1 $1 _1 - 1 1 1 1 --- Iteration 5 -- -1 1 0 - 1 o 0 1 - - #0 1 $1 _0 - 0 1 1 1 diff --git a/ext/standard/tests/strings/vfprintf_variation13.phpt b/ext/standard/tests/strings/vfprintf_variation13.phpt deleted file mode 100644 index 6331172a0d4a5..0000000000000 --- a/ext/standard/tests/strings/vfprintf_variation13.phpt +++ /dev/null @@ -1,86 +0,0 @@ ---TEST-- -Test vfprintf() function : usage variations - hexa formats with hexa values ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing vfprintf() : hexa formats with hexa values *** - --- Iteration 1 -- -0 --- Iteration 2 -- -ffffffff 1 22 --- Iteration 3 -- -7fffffff x, 7000000 80000000 --- Iteration 4 -- - ffed2979 0000 --- Iteration 5 -- -#1 2222 1b6db bbbbbbbc --- Iteration 6 -- -123b fab 0 a --- Iteration 7 -- -%34 x --- Iteration 8 -- -1 2 3 4 diff --git a/ext/standard/tests/strings/vfprintf_variation13_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation13_64bit.phpt deleted file mode 100644 index aaad2512a424e..0000000000000 --- a/ext/standard/tests/strings/vfprintf_variation13_64bit.phpt +++ /dev/null @@ -1,86 +0,0 @@ ---TEST-- -Test vfprintf() function : usage variations - hexa formats with hexa values ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing vfprintf() : hexa formats with hexa values *** - --- Iteration 1 -- -0 --- Iteration 2 -- -ffffffffffffffff 1 22 --- Iteration 3 -- -7fffffff x, 7000000 ffffffff80000000 --- Iteration 4 -- - ffffffffffed2979 0000 --- Iteration 5 -- -#1 2222 1b6db ffffffffbbbbbbbc --- Iteration 6 -- -123b fab 0 a --- Iteration 7 -- -%34 x --- Iteration 8 -- -1 2 3 4 diff --git a/ext/standard/tests/strings/vfprintf_variation14.phpt b/ext/standard/tests/strings/vfprintf_variation14.phpt deleted file mode 100644 index c22b290c071ed..0000000000000 --- a/ext/standard/tests/strings/vfprintf_variation14.phpt +++ /dev/null @@ -1,123 +0,0 @@ ---TEST-- -Test vfprintf() function : usage variations - hexa formats with non-hexa values ---SKIPIF-- - ---FILE-- -"12twelve"), - array("3"), array("4"), array("1"), array("2") ), - - // array of boolean data - array( true, TRUE, false, - TRUE, 0, FALSE, 1, - true, TRUE, FALSE, - 0, 1, 1, 0, - 1, TRUE, 0, FALSE), - -); - -/* creating dumping file */ -$data_file = __DIR__ . '/vfprintf_variation14.txt'; -if (!($fp = fopen($data_file, 'wt'))) - return; - -// looping to test vfprintf() with different hexa formats from the above $format array -// and with non-hexa values from the above $args_array array -$counter = 1; -foreach($args_array as $args) { - fprintf($fp, "\n-- Iteration %d --\n",$counter); - vfprintf($fp, $formats, $args); - $counter++; -} - -fclose($fp); -print_r(file_get_contents($data_file)); -echo "\n"; - -unlink($data_file); - -?> ---EXPECT-- -*** Testing vfprintf() : hexa formats and non-hexa values *** - --- Iteration 1 -- -2 0 a - 1e240 x fffffb2e 4d2 - - 3039 c fffffff4 fffe1dc0 - a 1e240 2 0 --- Iteration 2 -- -2 fffffffe 2 - 1e240 x ff439a5b bc65a5 - - bc61b4 127ae7 ff4732f9 ff439ede - 2 1e240 2 fffffffe --- Iteration 3 -- -0 0 0 - 7b x ffffff85 7b - - 4d2 0 $0 _0 - 0 7b 0 0 --- Iteration 4 -- -1 1 1 - 1 x 1 1 - - #1 1 $1 _1 - 1 1 1 1 --- Iteration 5 -- -1 1 0 - 1 x 0 1 - - #0 1 $1 _0 - 0 1 1 1 diff --git a/ext/standard/tests/strings/vfprintf_variation14_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation14_64bit.phpt deleted file mode 100644 index c7443a1544edd..0000000000000 --- a/ext/standard/tests/strings/vfprintf_variation14_64bit.phpt +++ /dev/null @@ -1,123 +0,0 @@ ---TEST-- -Test vfprintf() function : usage variations - hexa formats with non-hexa values ---SKIPIF-- - ---FILE-- -"12twelve"), - array("3"), array("4"), array("1"), array("2") ), - - // array of boolean data - array( true, TRUE, false, - TRUE, 0, FALSE, 1, - true, TRUE, FALSE, - 0, 1, 1, 0, - 1, TRUE, 0, FALSE), - -); - -/* creating dumping file */ -$data_file = __DIR__ . '/vfprintf_variation14_64bit.txt'; -if (!($fp = fopen($data_file, 'wt'))) - return; - -// looping to test vfprintf() with different hexa formats from the above $format array -// and with non-hexa values from the above $args_array array -$counter = 1; -foreach($args_array as $args) { - fprintf($fp, "\n-- Iteration %d --\n",$counter); - vfprintf($fp, $formats, $args); - $counter++; -} - -fclose($fp); -print_r(file_get_contents($data_file)); -echo "\n"; - -unlink($data_file); - -?> ---EXPECT-- -*** Testing vfprintf() : hexa formats and non-hexa values *** - --- Iteration 1 -- -2 0 a - 1e240 x fffffffffffffb2e 4d2 - - 3039 c fffffffffffffff4 fffffffffffe1dc0 - a 1e240 2 0 --- Iteration 2 -- -2 fffffffffffffffe 2 - 1e240 x ffffffffff439a5b bc65a5 - - bc61b4 127ae7 ffffffffff4732f9 ffffffffff439ede - 2 1e240 2 fffffffffffffffe --- Iteration 3 -- -0 0 0 - 7b x ffffffffffffff85 7b - - 4d2 0 $0 _0 - 0 7b 0 0 --- Iteration 4 -- -1 1 1 - 1 x 1 1 - - #1 1 $1 _1 - 1 1 1 1 --- Iteration 5 -- -1 1 0 - 1 x 0 1 - - #0 1 $1 _0 - 0 1 1 1 diff --git a/ext/standard/tests/strings/vfprintf_variation15.phpt b/ext/standard/tests/strings/vfprintf_variation15.phpt deleted file mode 100644 index 6ffcf7323c455..0000000000000 --- a/ext/standard/tests/strings/vfprintf_variation15.phpt +++ /dev/null @@ -1,73 +0,0 @@ ---TEST-- -Test vfprintf() function : usage variations - unsigned formats with unsigned values ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing vfprintf() : unsigned formats and unsigned values *** - --- Iteration 1 -- -1234567 342391 0 --- Iteration 2 -- -3755744308 u 1234 12345 --- Iteration 3 -- - 1234000 2450319192 120 --- Iteration 4 -- -#1 0 $0 10 --- Iteration 5 -- -1 2 3 4 diff --git a/ext/standard/tests/strings/vfprintf_variation15_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation15_64bit.phpt deleted file mode 100644 index 15332b7b32c38..0000000000000 --- a/ext/standard/tests/strings/vfprintf_variation15_64bit.phpt +++ /dev/null @@ -1,73 +0,0 @@ ---TEST-- -Test vfprintf() function : usage variations - unsigned formats with unsigned values ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing vfprintf() : unsigned formats and unsigned values *** - --- Iteration 1 -- -1234567 342391 0 --- Iteration 2 -- -12345678900 u 1234 12345 --- Iteration 3 -- - 1234000 101234567000 120 --- Iteration 4 -- -#1 0 $0 10 --- Iteration 5 -- -1 2 3 4 diff --git a/ext/standard/tests/strings/vfprintf_variation16.phpt b/ext/standard/tests/strings/vfprintf_variation16.phpt deleted file mode 100644 index 3cd509478e3f0..0000000000000 --- a/ext/standard/tests/strings/vfprintf_variation16.phpt +++ /dev/null @@ -1,110 +0,0 @@ ---TEST-- -Test vfprintf() function : usage variations - unsigned formats with signed and other types of values ---SKIPIF-- - ---FILE-- -"12twelve"), - array("3"), array("4"), array("1"), array("2") ), - - // array of boolean data - array( true, TRUE, false, - TRUE, 0, FALSE, 1, - true, TRUE, FALSE, - 0, 1, 1, 0, - 1, TRUE, 0, FALSE), - -); - -/* creating dumping file */ -$data_file = __DIR__ . '/vfprintf_variation16.txt'; -if (!($fp = fopen($data_file, 'wt'))) - return; - -// looping to test vfprintf() with different unsigned formats from the above $format array -// and with signed and other types of values from the above $args_array array -$counter = 1; -foreach($args_array as $args) { - fprintf($fp, "\n-- Iteration %d --\n",$counter); - vfprintf($fp, $formats, $args); - $counter++; -} - -fclose($fp); -print_r(file_get_contents($data_file)); -echo "\n"; - -unlink($data_file); - -?> ---EXPECT-- -*** Testing vfprintf() : unsigned formats and signed & other types of values *** - --- Iteration 1 -- -2 0 10 - 123456 u 1234 2820130816 - 2840207360 1177509888 12345 - 12 4294967284 4294843840 _3 - 10 123456 2 0 --- Iteration 2 -- -0 0 0 - 123 u 4294967173 123 - 0 0 0 - 1234 0 $0 _0 - 0 123 0 0 --- Iteration 3 -- -1 1 1 - 1 u 1 1 - 1 1 1 - #1 1 $1 _1 - 1 1 1 1 --- Iteration 4 -- -1 1 0 - 1 u 0 1 - 1 1 0 - #0 1 $1 _0 - 0 1 1 1 diff --git a/ext/standard/tests/strings/vfprintf_variation16_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation16_64bit.phpt deleted file mode 100644 index 49586c8027bed..0000000000000 --- a/ext/standard/tests/strings/vfprintf_variation16_64bit.phpt +++ /dev/null @@ -1,110 +0,0 @@ ---TEST-- -Test vfprintf() function : usage variations - unsigned formats with signed and other types of values ---SKIPIF-- - ---FILE-- -"12twelve"), - array("3"), array("4"), array("1"), array("2") ), - - // array of boolean data - array( true, TRUE, false, - TRUE, 0, FALSE, 1, - true, TRUE, FALSE, - 0, 1, 1, 0, - 1, TRUE, 0, FALSE), - -); - -/* creating dumping file */ -$data_file = __DIR__ . '/vfprintf_variation16_64bit.txt'; -if (!($fp = fopen($data_file, 'wt'))) - return; - -// looping to test vfprintf() with different unsigned formats from the above $format array -// and with signed and other types of values from the above $args_array array -$counter = 1; -foreach($args_array as $args) { - fprintf($fp, "\n-- Iteration %d --\n",$counter); - vfprintf($fp, $formats, $args); - $counter++; -} - -fclose($fp); -print_r(file_get_contents($data_file)); -echo "\n"; - -unlink($data_file); - -?> ---EXPECT-- -*** Testing vfprintf() : unsigned formats and signed & other types of values *** - --- Iteration 1 -- -2 0 10 - 123456 u 1234 20000000000 - 2000000000000 22000000000000 12345 - 12 18446744073709551604 18446744073709428160 _3 - 10 123456 2 0 --- Iteration 2 -- -0 0 0 - 123 u 18446744073709551493 123 - 0 0 0 - 1234 0 $0 _0 - 0 123 0 0 --- Iteration 3 -- -1 1 1 - 1 u 1 1 - 1 1 1 - #1 1 $1 _1 - 1 1 1 1 --- Iteration 4 -- -1 1 0 - 1 u 0 1 - 1 1 0 - #0 1 $1 _0 - 0 1 1 1 diff --git a/ext/standard/tests/strings/vfprintf_variation17.phpt b/ext/standard/tests/strings/vfprintf_variation17.phpt deleted file mode 100644 index 060b8c3e6b8c5..0000000000000 --- a/ext/standard/tests/strings/vfprintf_variation17.phpt +++ /dev/null @@ -1,68 +0,0 @@ ---TEST-- -Test vfprintf() function : usage variations - scientific formats with scientific values ---FILE-- - ---EXPECT-- -*** Testing vfprintf() : scientific formats and scientific values *** - --- Iteration 1 -- -0.000000e+0 +1.000000e+0 1.000000e+3 --- Iteration 2 -- -2.200000e+2 e 1.000000e+1 1.000000e+10 --- Iteration 3 -- --2.2000e+13 1.0000e+21 1.2000e+2 --- Iteration 4 -- -#########1.000000e+1 1.000000e+2 $$$$$$$$-1.000000e+3 _________1.000000e+2 --- Iteration 5 -- -1.000000e+3 2.000000e+3 3.000000e+3 4.000000e+3 diff --git a/ext/standard/tests/strings/vfprintf_variation18.phpt b/ext/standard/tests/strings/vfprintf_variation18.phpt deleted file mode 100644 index 6ca775b641bb4..0000000000000 --- a/ext/standard/tests/strings/vfprintf_variation18.phpt +++ /dev/null @@ -1,105 +0,0 @@ ---TEST-- -Test vfprintf() function : usage variations - scientific formats with non-scientific values ---FILE-- -"12twelve"), - array("3"), array("4"), array("1"), array("2") ), - - // array of boolean data - array( true, TRUE, false, - TRUE, 0, FALSE, 1, - true, false, TRUE, FALSE, - 0, 1, 1, 0, - 1, TRUE, 0, FALSE), - -); - -/* creating dumping file */ -$data_file = __DIR__ . '/vfprintf_variation18.txt'; -if (!($fp = fopen($data_file, 'wt'))) - return; - -// looping to test vfprintf() with different scientific formats from the above $format array -// and with non-scientific values from the above $args_array array -$counter = 1; -foreach($args_array as $args) { - fprintf($fp, "\n-- Iteration %d --\n",$counter); - vfprintf($fp, $formats, $args); - $counter++; -} - -fclose($fp); -print_r(file_get_contents($data_file)); -echo "\n"; - -unlink($data_file); -?> ---EXPECT-- -*** Testing vfprintf() : scientific formats and non-scientific values *** - --- Iteration 1 -- -2.200000e+0 +2.000000e-1 1.020000e+1 - 1.234562e+5 e -1.234679e+3 1.234679e+3 - 2.0000e+1 2.1220e+2 -4.110000e+11 2.2120e+3 - 1.234578e+4 1.200000e+1 -1.200000e+1 -1.234562e+5 - 1.020000e+1 1.234562e+5 2.200000e+0 2.000000e-1 --- Iteration 2 -- -0.000000e+0 +0.000000e+0 0.000000e+0 - 1.230000e+2 e -1.230000e+2 1.230000e+2 - 0.0000e+0 0.0000e+0 1.234560e+5 0.0000e+0 - 1.234000e+3 0.000000e+0 0.000000e+0 0.000000e+0 - 0.000000e+0 1.230000e+2 0.000000e+0 0.000000e+0 --- Iteration 3 -- -1.000000e+0 +1.000000e+0 1.000000e+0 - 1.000000e+0 e 1.000000e+0 1.000000e+0 - 1.0000e+0 1.0000e+0 1.000000e+0 1.0000e+0 - 1.000000e+0 1.000000e+0 1.000000e+0 1.000000e+0 - 1.000000e+0 1.000000e+0 1.000000e+0 1.000000e+0 --- Iteration 4 -- -1.000000e+0 +1.000000e+0 0.000000e+0 - 1.000000e+0 e 0.000000e+0 1.000000e+0 - 1.0000e+0 0.0000e+0 1.000000e+0 0.0000e+0 - 0.000000e+0 1.000000e+0 1.000000e+0 0.000000e+0 - 0.000000e+0 1.000000e+0 1.000000e+0 1.000000e+0 diff --git a/ext/standard/tests/strings/vfprintf_variation19.phpt b/ext/standard/tests/strings/vfprintf_variation19.phpt deleted file mode 100644 index f8ce7ec55d7ed..0000000000000 --- a/ext/standard/tests/strings/vfprintf_variation19.phpt +++ /dev/null @@ -1,92 +0,0 @@ ---TEST-- -Test vfprintf() function : usage variations - with whitespaces in format strings ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing vfprintf() : with white spaces in format strings *** - --- Iteration 1 -- -111 222 333 --- Iteration 2 -- -1.100000 0.200000 -0.600000 --- Iteration 3 -- -1.120000 -1.130000 0.230000 --- Iteration 4 -- -1 10 11 --- Iteration 5 -- -A B C --- Iteration 6 -- -2.000000e+1 2.000000e-1 -2.000000e+1 --- Iteration 7 -- -4294967285 22 33 --- Iteration 8 -- -12 37777777755 23 --- Iteration 9 -- -11 ffffffde 33 --- Iteration 10 -- -11 FFFFFFDE 33 --- Iteration 11 -- -2.000000E+1 2.000000E-1 -2.000000E+1 diff --git a/ext/standard/tests/strings/vfprintf_variation19_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation19_64bit.phpt deleted file mode 100644 index 4f7e0ee53b47d..0000000000000 --- a/ext/standard/tests/strings/vfprintf_variation19_64bit.phpt +++ /dev/null @@ -1,92 +0,0 @@ ---TEST-- -Test vfprintf() function : usage variations - with whitespaces in format strings ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing vfprintf() : with white spaces in format strings *** - --- Iteration 1 -- -111 222 333 --- Iteration 2 -- -1.100000 0.200000 -0.600000 --- Iteration 3 -- -1.120000 -1.130000 0.230000 --- Iteration 4 -- -1 10 11 --- Iteration 5 -- -A B C --- Iteration 6 -- -2.000000e+1 2.000000e-1 -2.000000e+1 --- Iteration 7 -- -18446744073709551605 22 33 --- Iteration 8 -- -12 1777777777777777777755 23 --- Iteration 9 -- -11 ffffffffffffffde 33 --- Iteration 10 -- -11 FFFFFFFFFFFFFFDE 33 --- Iteration 11 -- -2.000000E+1 2.000000E-1 -2.000000E+1 diff --git a/ext/standard/tests/strings/vfprintf_variation20.phpt b/ext/standard/tests/strings/vfprintf_variation20.phpt deleted file mode 100644 index f03b6879b151a..0000000000000 --- a/ext/standard/tests/strings/vfprintf_variation20.phpt +++ /dev/null @@ -1,173 +0,0 @@ ---TEST-- -Test vfprintf() function : usage variations - unexpected values for the format argument ---FILE-- - 'red', 'item' => 'pen'), - - // null data -/*15*/ NULL, - null, - - // boolean data -/*17*/ true, - false, - TRUE, - FALSE, - - // empty data -/*21*/ "", - '', - - // object data -/*23*/ new sample(), - - // undefined data -/*24*/ @$undefined_var, - - // unset data -/*25*/ @$unset_var, - - // resource data -/*26*/ $file_handle -); - -/* creating dumping file */ -$data_file = __DIR__ . '/vfprintf_variation20.txt'; -if (!($fp = fopen($data_file, 'wt'))) - return; - -fprintf($fp, "\n*** Testing vprintf() with with unexpected values for format argument ***\n"); - -$counter = 1; -foreach( $values as $value ) { - fprintf($fp, "\n-- Iteration %d --\n", $counter); - - try { - vfprintf($fp, $value, $args); - } catch (TypeError $exception) { - fprintf($fp, "%s\n", $exception->getMessage()); - } - $counter++; -} - -fclose($fp); -print_r(file_get_contents($data_file)); -echo "\n"; - -unlink($data_file); - -?> ---EXPECT-- -*** Testing vfprintf() : with unexpected values for format argument *** - -*** Testing vprintf() with with unexpected values for format argument *** - --- Iteration 1 -- -0 --- Iteration 2 -- -1 --- Iteration 3 -- -12345 --- Iteration 4 -- --2345 --- Iteration 5 -- -10.5 --- Iteration 6 -- --10.5 --- Iteration 7 -- -101234567000 --- Iteration 8 -- -1.07654321E-9 --- Iteration 9 -- -0.5 --- Iteration 10 -- -vfprintf(): Argument #2 ($format) must be of type string, array given - --- Iteration 11 -- -vfprintf(): Argument #2 ($format) must be of type string, array given - --- Iteration 12 -- -vfprintf(): Argument #2 ($format) must be of type string, array given - --- Iteration 13 -- -vfprintf(): Argument #2 ($format) must be of type string, array given - --- Iteration 14 -- -vfprintf(): Argument #2 ($format) must be of type string, array given - --- Iteration 15 -- - --- Iteration 16 -- - --- Iteration 17 -- -1 --- Iteration 18 -- - --- Iteration 19 -- -1 --- Iteration 20 -- - --- Iteration 21 -- - --- Iteration 22 -- - --- Iteration 23 -- -object --- Iteration 24 -- - --- Iteration 25 -- - --- Iteration 26 -- -vfprintf(): Argument #2 ($format) must be of type string, resource given diff --git a/ext/standard/tests/strings/vfprintf_variation21.phpt b/ext/standard/tests/strings/vfprintf_variation21.phpt deleted file mode 100644 index f44cc36a2c7f6..0000000000000 --- a/ext/standard/tests/strings/vfprintf_variation21.phpt +++ /dev/null @@ -1,164 +0,0 @@ ---TEST-- -Test vfprintf() function : usage variations - unexpected values for args argument ---FILE-- -getMessage() . "\n"); - } - $counter++; -} - -fclose($fp); -print_r(file_get_contents($data_file)); -echo "\n"; - -unlink($data_file); - - -?> ---EXPECTF-- -*** Testing vfprintf() : with unexpected values for args argument *** - -*** Testing vprintf() with unexpected values for args argument *** - --- Iteration 1 -- -0 --- Iteration 2 -- -1 --- Iteration 3 -- -12345 --- Iteration 4 -- --2345 --- Iteration 5 -- -10.5 --- Iteration 6 -- --10.5 --- Iteration 7 -- -101234567000 --- Iteration 8 -- -1.07654321E-9 --- Iteration 9 -- -0.5 --- Iteration 10 -- -The arguments array must contain 1 items, 0 given - --- Iteration 11 -- -The arguments array must contain 1 items, 0 given - --- Iteration 12 -- -1 --- Iteration 13 -- - --- Iteration 14 -- -1 --- Iteration 15 -- - --- Iteration 16 -- - --- Iteration 17 -- - --- Iteration 18 -- -string --- Iteration 19 -- -string --- Iteration 20 -- -The arguments array must contain 1 items, 0 given - --- Iteration 21 -- -The arguments array must contain 1 items, 0 given - --- Iteration 22 -- -The arguments array must contain 1 items, 0 given - --- Iteration 23 -- -Resource id #%d diff --git a/ext/standard/tests/strings/vfprintf_variation3.phpt b/ext/standard/tests/strings/vfprintf_variation3.phpt deleted file mode 100644 index 3f43709b4e227..0000000000000 --- a/ext/standard/tests/strings/vfprintf_variation3.phpt +++ /dev/null @@ -1,84 +0,0 @@ ---TEST-- -Test vfprintf() function : usage variations - int formats with int values ---FILE-- - ---EXPECT-- -*** Testing vfprintf() : int formats with int values *** - --- Iteration 1 -- -0 --- Iteration 2 -- --1 1 --- Iteration 3 -- -2147483647 d, 2147483640 -2147483640 --- Iteration 4 -- - 123456 12345678 -1234567 1234567 --- Iteration 5 -- -111 2222 333333 44444444 --- Iteration 6 -- -4667 4011 83 10 --- Iteration 7 -- -%-5678 d --- Iteration 8 -- -1 2 3 4 diff --git a/ext/standard/tests/strings/vfprintf_variation4.phpt b/ext/standard/tests/strings/vfprintf_variation4.phpt deleted file mode 100644 index d034bbffa06de..0000000000000 --- a/ext/standard/tests/strings/vfprintf_variation4.phpt +++ /dev/null @@ -1,111 +0,0 @@ ---TEST-- -Test vfprintf() function : usage variations - int formats with non-integer values ---SKIPIF-- - ---FILE-- -"12twelve"), - array("3"), array("4"), array("1"), array("2") ), - - // array of boolean data - array( true, TRUE, false, - TRUE, 0, FALSE, 1, - true, false, TRUE, FALSE, - 0, 1, 1, 0, - 1, TRUE, 0, FALSE), - -); - - -/* creating dumping file */ -$data_file = __DIR__ . '/vfprintf_variation4.txt'; -if (!($fp = fopen($data_file, 'wt'))) - return; - -// looping to test vfprintf() with different int formats from the above $format array -// and with non-int values from the above $args_array array -$counter = 1; -foreach($args_array as $args) { - fprintf($fp, "\n-- Iteration %d --\n",$counter); - vfprintf($fp, $formats, $args); - $counter++; -} - -fclose($fp); -print_r(file_get_contents($data_file)); -echo "\n"; - -unlink($data_file); - -?> ---EXPECT-- -*** Testing vfprintf() : int formats and non-integer values *** - --- Iteration 1 -- -2 +0 10 - 123456 d -1234 1234 - -1474836480 200000 4000 22000000 - 12345 12 -12 -123456 - 10 123456 2 0 --- Iteration 2 -- -0 +0 0 - 123 d -123 123 - 0 0 123456 0000 - 1234 0 $0 _0 - 0 123 0 0 --- Iteration 3 -- -1 +1 1 - 1 d 1 1 - 1 1 1 0001 - #1 1 $1 _1 - 1 1 1 1 --- Iteration 4 -- -1 +1 0 - 1 d 0 1 - 1 0 1 0000 - #0 1 $1 _0 - 0 1 1 1 diff --git a/ext/standard/tests/strings/vfprintf_variation4_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation4_64bit.phpt deleted file mode 100644 index c03e38e40cd84..0000000000000 --- a/ext/standard/tests/strings/vfprintf_variation4_64bit.phpt +++ /dev/null @@ -1,112 +0,0 @@ ---TEST-- -Test vfprintf() function : usage variations - int formats with non-integer values ---SKIPIF-- - ---FILE-- -"12twelve"), - array("3"), array("4"), array("1"), array("2") ), - - // array of boolean data - array( true, TRUE, false, - TRUE, 0, FALSE, 1, - true, false, TRUE, FALSE, - 0, 1, 1, 0, - 1, TRUE, 0, FALSE), - -); - - -/* creating dumping file */ -$data_file = __DIR__ . '/vfprintf_variation4_64bit.txt'; -if (!($fp = fopen($data_file, 'wt'))) - return; - -// looping to test vfprintf() with different int formats from the above $format array -// and with non-int values from the above $args_array array -$counter = 1; -foreach($args_array as $args) { - fprintf($fp, "\n-- Iteration %d --\n",$counter); - vfprintf($fp, $formats, $args); - $counter++; -} - -fclose($fp); -print_r(file_get_contents($data_file)); -echo "\n"; - -unlink($data_file); - -?> ---EXPECT-- -*** Testing vfprintf() : int formats and non-integer values *** - --- Iteration 1 -- -2 +0 10 - 123456 d -1234 1234 - 20000000000 200000 4000 22000000 - 12345 12 -12 -123456 - 10 123456 2 0 --- Iteration 2 -- -0 +0 0 - 123 d -123 123 - 0 0 123456 0000 - 1234 0 $0 _0 - 0 123 0 0 --- Iteration 3 -- -1 +1 1 - 1 d 1 1 - 1 1 1 0001 - #1 1 $1 _1 - 1 1 1 1 --- Iteration 4 -- -1 +1 0 - 1 d 0 1 - 1 0 1 0000 - #0 1 $1 _0 - 0 1 1 1 diff --git a/ext/standard/tests/strings/vfprintf_variation5.phpt b/ext/standard/tests/strings/vfprintf_variation5.phpt deleted file mode 100644 index 71f9b78fbf4b4..0000000000000 --- a/ext/standard/tests/strings/vfprintf_variation5.phpt +++ /dev/null @@ -1,83 +0,0 @@ ---TEST-- -Test vfprintf() function : usage variations - float formats with float values ---FILE-- - ---EXPECT-- -*** Testing vfprintf() : int formats with float values *** - --- Iteration 1 -- -0.000000 --- Iteration 2 -- --0.100000 0.100000 10.000001 --- Iteration 3 -- -2147483649.000000 f, 2147483640.000000 -2147483640.000000 --- Iteration 4 -- -200000.0000 0.0000 -200000.000000 -0.0000 --- Iteration 5 -- -20000.000000 -1999999999999999879418332743206357172224.000000 0.000000 20000000000000000000.000000 --- Iteration 6 -- -4667.000000 4011.000000 83.000000 10.000000 --- Iteration 7 -- -%-5678.567800 f --- Iteration 8 -- -1.110000 2.220000 3.330000 4.440000 diff --git a/ext/standard/tests/strings/vfprintf_variation6.phpt b/ext/standard/tests/strings/vfprintf_variation6.phpt deleted file mode 100644 index d220b8a81ffa3..0000000000000 --- a/ext/standard/tests/strings/vfprintf_variation6.phpt +++ /dev/null @@ -1,106 +0,0 @@ ---TEST-- -Test vfprintf() function : usage variations - float formats with non-float values ---FILE-- -"12twelve"), - array("3"), array("4"), array("1"), array("2") ), - - // array of boolean data - array( true, TRUE, false, - TRUE, 0, FALSE, 1, - true, false, TRUE, FALSE, - 0, 1, 1, 0, - 1, TRUE, 0, FALSE), - -); - -/* creating dumping file */ -$data_file = __DIR__ . '/vfprintf_variation6.txt'; -if (!($fp = fopen($data_file, 'wt'))) - return; - -// looping to test vfprintf() with different float formats from the above $format array -// and with non-float values from the above $args_array array -$counter = 1; -foreach($args_array as $args) { - fprintf($fp, "\n-- Iteration %d --\n",$counter); - vfprintf($fp, $formats, $args); - $counter++; -} - -fclose($fp); -print_r(file_get_contents($data_file)); -echo "\n"; - -unlink($data_file); - -?> ---EXPECT-- -*** Testing vfprintf() : float formats and non-float values *** - --- Iteration 1 -- -2.000000 -2.000000 2.000000 - 123456.000000 f -12346789.000000 12346789.000000 - 123200.0000 20000.0000 -40000.000000 22212.0000 - 12345780.000000 1211111.000000 -12111111.000000 -12345634.000000 - 2.000000 123456.000000 2.000000 -2.000000 --- Iteration 2 -- -0.000000 +0.000000 0.000000 - 123.000000 f -123.000000 123.000000 - 0.0000 0.0000 123456.000000 0.0000 - 1234.000000 0.000000 0.000000 0.000000 - 0.000000 123.000000 0.000000 0.000000 --- Iteration 3 -- -1.000000 +1.000000 1.000000 - 1.000000 f 1.000000 1.000000 - 1.0000 1.0000 1.000000 1.0000 - 1.000000 1.000000 1.000000 1.000000 - 1.000000 1.000000 1.000000 1.000000 --- Iteration 4 -- -1.000000 +1.000000 0.000000 - 1.000000 f 0.000000 1.000000 - 1.0000 0.0000 1.000000 0.0000 - 0.000000 1.000000 1.000000 0.000000 - 0.000000 1.000000 1.000000 1.000000 diff --git a/ext/standard/tests/strings/vfprintf_variation7.phpt b/ext/standard/tests/strings/vfprintf_variation7.phpt deleted file mode 100644 index d6becb602d180a29dc8cc51d1c9fd479c4f945ab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2374 zcmbVNZExE)5bnP6SKM5CvYp5;iPJ7`>x$L^0u)%Wc-Vk>5EzMygxaD&QgMu7|9uZB zDwfg>7zWsqc)WY={Vohw%ez$=vX#(=9!r%MCLN9_t%}&>vY-p9G=C8E$W_iQMN>%H zfbW4)skYo`+T|wmG|j^B=JwMPh*$5*tYp(MeOA&)vo8e!4fyn!)_RDBq=c50iUsvE zUL+gv95?X&8Xp9%6yH;ys|QUqVl<|YLdPmEtw9&`tICZa?(H!mX%LJA6~+p_wL*8b zrdTH8g2a=VY6G2ICDU3HBqL|pBxd6&gY8zTj*K@Mq1k1kpd?RIp#+?H5eon|q({D~ zgog2gO0G4`GSUK?OiN<^9$R{Y>Z244~xdkoF`o)CHOuIcLPYWdTOt+HGbexB~2M8Ya< z@x0K4ffKrr`Yvu=D6-h>seqpWsC0@=U)3kjo6lE z4`oQ@vlAU;$M6-dH?tLyy3i2(ZdRGkmZs~v7Ke0=r! z?8TyCo6jbW;NLTQm@Po_V!`VZPy+YpyJvLL+zn_jz~y{Kdf?cD!D%0ag?-HJN_tqTEVnHS_8oLK24kI~N6y>Gi%7KZ2O`!3cl%fS{) zg$^zyiWto%tfcQ+&wapVuE?W0#H~0w!mvlZk&UK5Wn#0D>)B4KP0~B2o_5Kl5561Q+r!uT>Fn&L7MRUD+`2;7?{O7uVL0ChkTYmiPuz*5aEG8}(Q}d3enEoY z$0&cGJYRL|w{_7jzZPas7Qz~6cG4PSG9?6T2~y0dw(g$0u`KQeZwNZ0Avj`n*2ffM z&KcL&)wZ1Bi%KwVowSCgT@iK4KO4 z5^}X*E7H!$){>!@{B|+;!m4HZv8)Os6s(_LGQio&ggbs=aoy+`(Vy_5u@n9x9qS?t z=@!y%-_anUFvRpcZa~pwbQrx(#v>!;2UC7;_`~@hPNX>>9bK}&7)#@g)WXIXw{Go3 zYG{)bJqQ!ouCtq<755SN>K#ze@~YV6#g{e%((vvFY~bZ@pO+u(R{y`tf&ruzf;l3< zs7pJsG}no*T$f_}qGeyb;5xNjbx#r|BGE55^bKBJtcAk|nJ{;dYulFYMCALDY*TiH s&aBXX+DBBkD*ekIK}&Rz-&kZ!T#UT##anxU-XnA@>J{yZ=BO0=8&$04@c;k- diff --git a/ext/standard/tests/strings/vfprintf_variation8.phpt b/ext/standard/tests/strings/vfprintf_variation8.phpt deleted file mode 100644 index ebf894f5e63c7..0000000000000 --- a/ext/standard/tests/strings/vfprintf_variation8.phpt +++ /dev/null @@ -1,143 +0,0 @@ ---TEST-- -Test vfprintf() function : usage variations - string formats with non-string values ---FILE-- -"12twelve"), - array("3"), array("4"), array("1"), array("2") ), - - // array of boolean data - array( true, TRUE, false, - TRUE, 0, FALSE, 1, - true, false, TRUE, FALSE, - 0, 1, 1, 0, - 1, TRUE, 0, FALSE), - -); - -/* creating dumping file */ -$data_file = __DIR__ . '/vfprintf_variation8.txt'; -if (!($fp = fopen($data_file, 'wt'))) - return; - -// looping to test vfprintf() with different string formats from the above $format array -// and with non-string values from the above $args_array array -$counter = 1; -foreach($args_array as $args) { - fprintf($fp, "\n-- Iteration %d --\n",$counter); - vfprintf($fp, $formats, $args); - $counter++; -} - -fclose($fp); -print_r(file_get_contents($data_file)); -echo "\n"; - -unlink($data_file); - -?> ---EXPECTF-- -*** Testing vfprintf() : string formats and non-string values *** - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - --- Iteration 1 -- -2.2 0.2 10.2 - 123456.234 s -1234.6789 1234.6789 - 2123 2765 -27654321000 1234 - 12.000000011111 -12.00000111111 -123456.234 3.33 - 10.2 123456.234 2.2 0.2 --- Iteration 2 -- -2 -2 2 - 123456 s -12346789 12346789 - 1232 2000 -40000 2221 - 12345780 1211111 -12111111 -12345634 - 2 123456 2 -2 --- Iteration 3 -- -Array Array Array - Array s Array Array - Arra Arra Array Arra - Array Array Array Array - Array Array Array Array --- Iteration 4 -- -1 1 - 1 s 1 - 1 0001 0000 - #0 1 $1 _0 - 1 1 1 diff --git a/ext/standard/tests/strings/vfprintf_variation9.phpt b/ext/standard/tests/strings/vfprintf_variation9.phpt deleted file mode 100644 index cd5a2653bc0c6dcbec99d8db58762037ff0787e9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1836 zcmbVN+iv4F5bZO+;?$KP+mU>Wb9J|iG;x6d`><#Nv_Q8IXqt+JI-)>QNft%FWj|oQ zq5sw)DJ61t+lK-cCC+eeXNJdVdb_&0O;dI&jm1M=>7umxV2Hdfg)LNxbJT|4Njz{} za3?WHA+}s2SNfh?gU7;dgXDqlYH3)S{&f9rMNYqeTWu>g8R5NFR@sl01o@)~&yj!u zv^1*LLL%DoaJ)Wl!D#LXGFbUDYgo|(I_}~rFO7C|B82yc)%BA_Mz-88KpPDM&?E790Y`#;B9kQ zgP_5iaA3fIUSISQ|2`1tr}SJl`yGA16AAhYr&zSdX4A13H1Da~Ocx|;%;N9nB#HeJ z`8AujI#M*h<}mss5PiRk`-c%}7jBukWgdx`4XHG$?83F&pslDWp86Ev^wSs0Cy z9hR}PU2(C6sn-oELY0;mG`d|FAGZY^5=zqmR;u)klFqIfx@HDnJTpIjSpd3&rxy&S zLx*Yjjzyf{_=KL*t`sEgp_d?ax`X4Bj`EBosawuYNp;q>`w!LhX*NGxCzw9v7w$zn zzjhoSlE0MXiv+YBbu=MCO7e)F;~@*ck09u_ST|Ce`o41Syr5f2*CE<)%QL@wgDktc z{yEDqMm%YUH+yD@v$1`$@sbre2Hy^%yrKcjRVB;8i<1QLqm73{y3QaLu(d8j=XXl^ zxbEh>;w4WunLe-^} znhKaL8ToWGLKQXa$4wh(h(D>2mO`myYW9aRO>s@uo;uOrAWiA+CaqH%b-Y}CZ_{{A z0@;OBerwOCv){c*yFWNsvcDM1#ZDRNU?#2SuS^eIpRzk?GdKMNmgzu0q;r9T0+ZC` zt|k#J75fJroFsez diff --git a/ext/standard/tests/strings/vsprintf_variation1.phpt b/ext/standard/tests/strings/vsprintf_variation1.phpt deleted file mode 100644 index 5366b403256cc..0000000000000 --- a/ext/standard/tests/strings/vsprintf_variation1.phpt +++ /dev/null @@ -1,184 +0,0 @@ ---TEST-- -Test vsprintf() function : usage variations - unexpected values for the format argument ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // object data - new sample(), - - // undefined data - @$undefined_var, - - // unset data - @$unset_var, - - // resource data - $file_handle -); - -// loop through each element of the array for format - -$counter = 1; -foreach($values as $value) { - echo "\n -- Iteration $counter --\n"; - try { - var_dump(vsprintf($value, $args)); - } catch (TypeError $exception) { - echo $exception->getMessage() . "\n"; - } - $counter++; -} - -// closing the resource -fclose($file_handle); - -echo "Done"; -?> ---EXPECT-- -*** Testing vsprintf() : with unexpected values for format argument *** - - -- Iteration 1 -- -string(1) "0" - - -- Iteration 2 -- -string(1) "1" - - -- Iteration 3 -- -string(5) "12345" - - -- Iteration 4 -- -string(5) "-2345" - - -- Iteration 5 -- -string(4) "10.5" - - -- Iteration 6 -- -string(5) "-10.5" - - -- Iteration 7 -- -string(12) "101234567000" - - -- Iteration 8 -- -string(13) "1.07654321E-9" - - -- Iteration 9 -- -string(3) "0.5" - - -- Iteration 10 -- -vsprintf(): Argument #1 ($format) must be of type string, array given - - -- Iteration 11 -- -vsprintf(): Argument #1 ($format) must be of type string, array given - - -- Iteration 12 -- -vsprintf(): Argument #1 ($format) must be of type string, array given - - -- Iteration 13 -- -vsprintf(): Argument #1 ($format) must be of type string, array given - - -- Iteration 14 -- -vsprintf(): Argument #1 ($format) must be of type string, array given - - -- Iteration 15 -- -string(0) "" - - -- Iteration 16 -- -string(0) "" - - -- Iteration 17 -- -string(1) "1" - - -- Iteration 18 -- -string(0) "" - - -- Iteration 19 -- -string(1) "1" - - -- Iteration 20 -- -string(0) "" - - -- Iteration 21 -- -string(0) "" - - -- Iteration 22 -- -string(0) "" - - -- Iteration 23 -- -string(6) "object" - - -- Iteration 24 -- -string(0) "" - - -- Iteration 25 -- -string(0) "" - - -- Iteration 26 -- -vsprintf(): Argument #1 ($format) must be of type string, resource given -Done diff --git a/ext/standard/tests/strings/vsprintf_variation10.phpt b/ext/standard/tests/strings/vsprintf_variation10.phpt deleted file mode 100644 index 5fb45b4e980c2c49df1d33d42b6284807bb74e1b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2766 zcmbtW&2HO95Vo&;iUBKwl10+uk5t*NlQ@k61Tcyqc7PsK7&NuA1jt;0Tv`o+_E4Y? zlc(sRw;p>h&`0SvyA&zWE_$eCac5>{zWru)HA~OCnOxs^o^>M%MUTZgUuJ6F?a{o< zQni#Bol#jN_ktdie3`JNAdk{TlG9w~4~Z&hvs4SpWaeq>W3nnmVR_!$cUKbtfAey^ zSX(E@^gfqLs!wY{z$_FNx^EV&bOY&9lIO`MJnxI1MaT3;6luO(^Xg~xL8vm%D5=(0 zVpgHC=d~>JR8T5s;*7+P>ZDLfHcRr^iGhaqtY65yf~_z{AM9Cnl0yZk&8_2 zXA8J?vLGsGofHMAD9M0oA;{^NB^}}rr^DGm&hN_yfEFa@+HG5CO-G~)N%rxvp|n?_ z9;&ui_UDKoa+=xa$m@h=V!q56B0;fqJ+UJ1qAZI&B&#A?(1k_h9Hn&B$Ja}t(a{Rx z6}~Z>Vq*&izE-Poz{((oO-D?fU;slsbSm{0qjrcojK`0FA7LkT4CPCvsVjryWH_4R z#CvV3rO%wn4b@&|RFU^NW{HWz#IpD zfS7UUhhficr-KggG#OxyhCmpNnze%wFQuO#&mx|6k`dfNo|&@{HZ$PNgk1tfrrOMm z4M}Fm^qz7veWJi3y82z4Y?mBz@K}h|N;(ae6NFJ^BYP{eH)z%qPQOuV=JpiEcsTlc ztm6@5drwTxz&LG}a27^yvEY^C8b%A#!A9n*8N+_}@#>04m6yV9sM`@6V?3OIQwyEC z5=~dq1!yW!6=cw>x@Q*^L;)+a2h9tBvOR*^`hlKZdvVFIR5hmy)u=Yt4Zdv%=3d9l zlU31ZHy=Ju>Z!MvSJ%+m;my|6o_4_Lhx@!took;Uym*07wGpdF@eC`Ju=YhI8#&mK zu>{qXt$)sUQmzD=<}6VO*qVbzoTf{hkxM$uolJ}shgs+7Qm`{;;!H#pZoHa8AQ0Pw z|D9hftNXA_v}gL{O3F2NcC;mAi#QNvIC(_s^}LEX%;Zk(t0<`0@o_Mke3CpM1;jIsfZ!wScrk zI3NI;j?|4$dt_hIZ}gh?^#@AnXZnT3ujns4|7P)blqaM=SbPl^c-t++@Lv(X{5Rs4 z=MbYd;sN2q6g~s-SG^l-p;yNGr&hGX0bDTC<`}mT4+$SeJOpAb?pWJm8*%s?qNc!z T2U~Cmh9e7m;-PKvW?TONnCRmS diff --git a/ext/standard/tests/strings/vsprintf_variation11.phpt b/ext/standard/tests/strings/vsprintf_variation11.phpt deleted file mode 100644 index defcd593e0167..0000000000000 --- a/ext/standard/tests/strings/vsprintf_variation11.phpt +++ /dev/null @@ -1,84 +0,0 @@ ---TEST-- -Test vsprintf() function : usage variations - octal formats with octal values ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing vsprintf() : octal formats with octal values *** - --- Iteration 1 -- -string(1) "0" - --- Iteration 2 -- -string(14) "37777777777 1 " - --- Iteration 3 -- -string(38) "20000000000 o, 17777777777 20000000001" - --- Iteration 4 -- -string(38) " 37776543211 0000" - --- Iteration 5 -- -string(32) "111 2222 37777444445 37733333334" - --- Iteration 6 -- -string(17) "11073 7653 123 12" - --- Iteration 7 -- -string(6) "% %o o" - --- Iteration 8 -- -string(7) "1 2 3 4" -Done diff --git a/ext/standard/tests/strings/vsprintf_variation11_64bit.phpt b/ext/standard/tests/strings/vsprintf_variation11_64bit.phpt deleted file mode 100644 index 127d3f594d23e..0000000000000 --- a/ext/standard/tests/strings/vsprintf_variation11_64bit.phpt +++ /dev/null @@ -1,84 +0,0 @@ ---TEST-- -Test vsprintf() function : usage variations - octal formats with octal values ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing vsprintf() : octal formats with octal values *** - --- Iteration 1 -- -string(1) "0" - --- Iteration 2 -- -string(25) "1777777777777777777777 1 " - --- Iteration 3 -- -string(60) "1777777777760000000000 o, 17777777777 1777777777760000000001" - --- Iteration 4 -- -string(49) " 1777777777777776543211 0000" - --- Iteration 5 -- -string(54) "111 2222 1777777777777777444445 1777777777777733333334" - --- Iteration 6 -- -string(17) "11073 7653 123 12" - --- Iteration 7 -- -string(6) "% %o o" - --- Iteration 8 -- -string(7) "1 2 3 4" -Done diff --git a/ext/standard/tests/strings/vsprintf_variation12.phpt b/ext/standard/tests/strings/vsprintf_variation12.phpt deleted file mode 100644 index 8ef03b3acdbdb..0000000000000 --- a/ext/standard/tests/strings/vsprintf_variation12.phpt +++ /dev/null @@ -1,118 +0,0 @@ ---TEST-- -Test vsprintf() function : usage variations - octal formats with non-octal values ---SKIPIF-- - ---FILE-- -"12twelve"), - array("3"), array("4"), array("1"), array("2") ), - - // array of boolean data - array( true, TRUE, false, - TRUE, 0, FALSE, 1, - true, false, TRUE, - 0, 1, 1, 0, - 1, TRUE, 0, FALSE), - -); - -// looping to test vsprintf() with different octal formats from the above $format array -// and with non-octal values from the above $args_array array -$counter = 1; -foreach($args_array as $args) { - echo "\n-- Iteration $counter --\n"; - var_dump( vsprintf($formats, $args) ); - $counter++; -} - -echo "Done"; -?> ---EXPECT-- -*** Testing vsprintf() : octal formats and non-octal values *** - --- Iteration 1 -- -string(114) "2 0 12 - 361100 o 37777775456 2322 - - 30071 14 37777777764 37777416700 - 12 361100 2 0" - --- Iteration 2 -- -string(144) "2 37777777776 2 - 361100 o 37720715133 57062645 - - 57060664 4475347 37721631371 37720717336 - 2 361100 2 37777777776" - --- Iteration 3 -- -string(86) "0 0 0 - 173 o 37777777605 173 - - 2322 0 $0 _0 - 0 173 0 0" - --- Iteration 4 -- -string(73) "1 1 1 - 1 o 1 1 - - #1 1 $1 _1 - 1 1 1 1" - --- Iteration 5 -- -string(73) "1 1 0 - 1 o 0 1 - - #0 1 $1 _0 - 0 1 1 1" -Done diff --git a/ext/standard/tests/strings/vsprintf_variation12_64bit.phpt b/ext/standard/tests/strings/vsprintf_variation12_64bit.phpt deleted file mode 100644 index b786bfe21e989..0000000000000 --- a/ext/standard/tests/strings/vsprintf_variation12_64bit.phpt +++ /dev/null @@ -1,118 +0,0 @@ ---TEST-- -Test vsprintf() function : usage variations - octal formats with non-octal values ---SKIPIF-- - ---FILE-- -"12twelve"), - array("3"), array("4"), array("1"), array("2") ), - - // array of boolean data - array( true, TRUE, false, - TRUE, 0, FALSE, 1, - true, false, TRUE, - 0, 1, 1, 0, - 1, TRUE, 0, FALSE), - -); - -// looping to test vsprintf() with different octal formats from the above $format array -// and with non-octal values from the above $args_array array -$counter = 1; -foreach($args_array as $args) { - echo "\n-- Iteration $counter --\n"; - var_dump( vsprintf($formats, $args) ); - $counter++; -} - -echo "Done"; -?> ---EXPECT-- -*** Testing vsprintf() : octal formats and non-octal values *** - --- Iteration 1 -- -string(151) "2 0 12 - 361100 o 1777777777777777775456 2322 - - 30071 14 1777777777777777777764 1777777777777777416700 - 12 361100 2 0" - --- Iteration 2 -- -string(203) "2 1777777777777777777776 2 - 361100 o 1777777777777720715133 57062645 - - 57060664 4475347 1777777777777721631371 1777777777777720717336 - 2 361100 2 1777777777777777777776" - --- Iteration 3 -- -string(101) "0 0 0 - 173 o 1777777777777777777605 173 - - 2322 0 $0 _0 - 0 173 0 0" - --- Iteration 4 -- -string(77) "1 1 1 - 1 o 1 1 - - #1 1 $1 _1 - 1 1 1 1" - --- Iteration 5 -- -string(77) "1 1 0 - 1 o 0 1 - - #0 1 $1 _0 - 0 1 1 1" -Done diff --git a/ext/standard/tests/strings/vsprintf_variation13.phpt b/ext/standard/tests/strings/vsprintf_variation13.phpt deleted file mode 100644 index 6899766b0af99..0000000000000 --- a/ext/standard/tests/strings/vsprintf_variation13.phpt +++ /dev/null @@ -1,84 +0,0 @@ ---TEST-- -Test vsprintf() function : usage variations - hexa formats with hexa values ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing vsprintf() : hexa formats with hexa values *** - --- Iteration 1 -- -string(1) "0" - --- Iteration 2 -- -string(13) "ffffffff 1 22" - --- Iteration 3 -- -string(28) "7fffffff x, 7000000 80000000" - --- Iteration 4 -- -string(35) " ffed2979 0000" - --- Iteration 5 -- -string(22) "#1 2222 1b6db bbbbbbbc" - --- Iteration 6 -- -string(12) "123b fab 0 a" - --- Iteration 7 -- -string(5) "%34 x" - --- Iteration 8 -- -string(7) "1 2 3 4" -Done diff --git a/ext/standard/tests/strings/vsprintf_variation13_64bit.phpt b/ext/standard/tests/strings/vsprintf_variation13_64bit.phpt deleted file mode 100644 index 3828414360e51..0000000000000 --- a/ext/standard/tests/strings/vsprintf_variation13_64bit.phpt +++ /dev/null @@ -1,84 +0,0 @@ ---TEST-- -Test vsprintf() function : usage variations - hexa formats with hexa values ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing vsprintf() : hexa formats with hexa values *** - --- Iteration 1 -- -string(1) "0" - --- Iteration 2 -- -string(21) "ffffffffffffffff 1 22" - --- Iteration 3 -- -string(36) "7fffffff x, 7000000 ffffffff80000000" - --- Iteration 4 -- -string(43) " ffffffffffed2979 0000" - --- Iteration 5 -- -string(30) "#1 2222 1b6db ffffffffbbbbbbbc" - --- Iteration 6 -- -string(12) "123b fab 0 a" - --- Iteration 7 -- -string(5) "%34 x" - --- Iteration 8 -- -string(7) "1 2 3 4" -Done diff --git a/ext/standard/tests/strings/vsprintf_variation14.phpt b/ext/standard/tests/strings/vsprintf_variation14.phpt deleted file mode 100644 index ede83de3c1513..0000000000000 --- a/ext/standard/tests/strings/vsprintf_variation14.phpt +++ /dev/null @@ -1,119 +0,0 @@ ---TEST-- -Test vsprintf() function : usage variations - hexa formats with non-hexa values ---SKIPIF-- - ---FILE-- -"12twelve"), - array("3"), array("4"), array("1"), array("2") ), - - // array of boolean data - array( true, TRUE, false, - TRUE, 0, FALSE, 1, - true, TRUE, FALSE, - 0, 1, 1, 0, - 1, TRUE, 0, FALSE), - -); - -// looping to test vsprintf() with different hexa formats from the above $format array -// and with non-hexa values from the above $args_array array - -$counter = 1; -foreach($args_array as $args) { - echo "\n-- Iteration $counter --\n"; - var_dump( vsprintf($formats, $args) ); - $counter++; -} - -echo "Done"; -?> ---EXPECT-- -*** Testing vsprintf() : hexa formats and non-hexa values *** - --- Iteration 1 -- -string(99) "2 0 a - 1e240 x fffffb2e 4d2 - - 3039 c fffffff4 fffe1dc0 - a 1e240 2 0" - --- Iteration 2 -- -string(122) "2 fffffffe 2 - 1e240 x ff439a5b bc65a5 - - bc61b4 127ae7 ff4732f9 ff439ede - 2 1e240 2 fffffffe" - --- Iteration 3 -- -string(80) "0 0 0 - 7b x ffffff85 7b - - 4d2 0 $0 _0 - 0 7b 0 0" - --- Iteration 4 -- -string(73) "1 1 1 - 1 x 1 1 - - #1 1 $1 _1 - 1 1 1 1" - --- Iteration 5 -- -string(73) "1 1 0 - 1 x 0 1 - - #0 1 $1 _0 - 0 1 1 1" -Done diff --git a/ext/standard/tests/strings/vsprintf_variation14_64bit.phpt b/ext/standard/tests/strings/vsprintf_variation14_64bit.phpt deleted file mode 100644 index 971a7ae3b2135..0000000000000 --- a/ext/standard/tests/strings/vsprintf_variation14_64bit.phpt +++ /dev/null @@ -1,119 +0,0 @@ ---TEST-- -Test vsprintf() function : usage variations - hexa formats with non-hexa values ---SKIPIF-- - ---FILE-- -"12twelve"), - array("3"), array("4"), array("1"), array("2") ), - - // array of boolean data - array( true, TRUE, false, - TRUE, 0, FALSE, 1, - true, TRUE, FALSE, - 0, 1, 1, 0, - 1, TRUE, 0, FALSE), - -); - -// looping to test vsprintf() with different hexa formats from the above $format array -// and with non-hexa values from the above $args_array array - -$counter = 1; -foreach($args_array as $args) { - echo "\n-- Iteration $counter --\n"; - var_dump( vsprintf($formats, $args) ); - $counter++; -} - -echo "Done"; -?> ---EXPECT-- -*** Testing vsprintf() : hexa formats and non-hexa values *** - --- Iteration 1 -- -string(127) "2 0 a - 1e240 x fffffffffffffb2e 4d2 - - 3039 c fffffffffffffff4 fffffffffffe1dc0 - a 1e240 2 0" - --- Iteration 2 -- -string(166) "2 fffffffffffffffe 2 - 1e240 x ffffffffff439a5b bc65a5 - - bc61b4 127ae7 ffffffffff4732f9 ffffffffff439ede - 2 1e240 2 fffffffffffffffe" - --- Iteration 3 -- -string(92) "0 0 0 - 7b x ffffffffffffff85 7b - - 4d2 0 $0 _0 - 0 7b 0 0" - --- Iteration 4 -- -string(77) "1 1 1 - 1 x 1 1 - - #1 1 $1 _1 - 1 1 1 1" - --- Iteration 5 -- -string(77) "1 1 0 - 1 x 0 1 - - #0 1 $1 _0 - 0 1 1 1" -Done diff --git a/ext/standard/tests/strings/vsprintf_variation15.phpt b/ext/standard/tests/strings/vsprintf_variation15.phpt deleted file mode 100644 index f31aadfb46f6a..0000000000000 --- a/ext/standard/tests/strings/vsprintf_variation15.phpt +++ /dev/null @@ -1,66 +0,0 @@ ---TEST-- -Test vsprintf() function : usage variations - unsigned formats with unsigned values ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing vsprintf() : unsigned formats and unsigned values *** - --- Iteration 1 -- -string(16) "1234567 342391 0" - --- Iteration 2 -- -string(23) "3755744308 u 1234 12345" - --- Iteration 3 -- -string(25) " 1234000 1012345 120" - --- Iteration 4 -- -string(10) "#1 0 $0 10" - --- Iteration 5 -- -string(7) "1 2 3 4" diff --git a/ext/standard/tests/strings/vsprintf_variation15_64bit.phpt b/ext/standard/tests/strings/vsprintf_variation15_64bit.phpt deleted file mode 100644 index d4efd44fbda64..0000000000000 --- a/ext/standard/tests/strings/vsprintf_variation15_64bit.phpt +++ /dev/null @@ -1,68 +0,0 @@ ---TEST-- -Test vsprintf() function : usage variations - unsigned formats with unsigned values ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing vsprintf() : unsigned formats and unsigned values *** - --- Iteration 1 -- -string(16) "1234567 342391 0" - --- Iteration 2 -- -string(24) "12345678900 u 1234 12345" - --- Iteration 3 -- -string(34) " 1234000 3875820019684212736 120" - --- Iteration 4 -- -string(10) "#1 0 $0 10" - --- Iteration 5 -- -string(7) "1 2 3 4" -Done diff --git a/ext/standard/tests/strings/vsprintf_variation16.phpt b/ext/standard/tests/strings/vsprintf_variation16.phpt deleted file mode 100644 index 862828d5ad5ee..0000000000000 --- a/ext/standard/tests/strings/vsprintf_variation16.phpt +++ /dev/null @@ -1,104 +0,0 @@ ---TEST-- -Test vsprintf() function : usage variations - unsigned formats with signed and other types of values ---SKIPIF-- - ---FILE-- -"12twelve"), - array("3"), array("4"), array("1"), array("2") ), - - // array of boolean data - array( true, TRUE, false, - TRUE, 0, FALSE, 1, - true, TRUE, FALSE, - 0, 1, 1, 0, - 1, TRUE, 0, FALSE), - -); - -// looping to test vsprintf() with different unsigned formats from the above $format array -// and with signed and other types of values from the above $args_array array -$counter = 1; -foreach($args_array as $args) { - echo "\n-- Iteration $counter --\n"; - var_dump( vsprintf($formats, $args) ); - $counter++; -} - -echo "Done"; -?> ---EXPECT-- -*** Testing vsprintf() : unsigned formats and signed & other types of values *** - --- Iteration 1 -- -string(113) "2 0 10 - 123456 u 1234 2820130816 - 2840207360 1177509888 12345 - 12 4294967284 4294843840 _3 - 10 123456 2 0" - --- Iteration 2 -- -string(86) "0 0 0 - 123 u 4294967173 123 - 0 0 0 - 1234 0 $0 _0 - 0 123 0 0" - --- Iteration 3 -- -string(74) "1 1 1 - 1 u 1 1 - 1 1 1 - #1 1 $1 _1 - 1 1 1 1" - --- Iteration 4 -- -string(74) "1 1 0 - 1 u 0 1 - 1 1 0 - #0 1 $1 _0 - 0 1 1 1" -Done diff --git a/ext/standard/tests/strings/vsprintf_variation16_64bit.phpt b/ext/standard/tests/strings/vsprintf_variation16_64bit.phpt deleted file mode 100644 index e6cbd844842d5..0000000000000 --- a/ext/standard/tests/strings/vsprintf_variation16_64bit.phpt +++ /dev/null @@ -1,104 +0,0 @@ ---TEST-- -Test vsprintf() function : usage variations - unsigned formats with signed and other types of values ---SKIPIF-- - ---FILE-- -"12twelve"), - array("3"), array("4"), array("1"), array("2") ), - - // array of boolean data - array( true, TRUE, false, - TRUE, 0, FALSE, 1, - true, TRUE, FALSE, - 0, 1, 1, 0, - 1, TRUE, 0, FALSE), - -); - -// looping to test vsprintf() with different unsigned formats from the above $format array -// and with signed and other types of values from the above $args_array array -$counter = 1; -foreach($args_array as $args) { - echo "\n-- Iteration $counter --\n"; - var_dump( vsprintf($formats, $args) ); - $counter++; -} - -echo "Done"; -?> ---EXPECT-- -*** Testing vsprintf() : unsigned formats and signed & other types of values *** - --- Iteration 1 -- -string(145) "2 0 10 - 123456 u 1234 20000000000 - 2000000000000 22000000000000 12345 - 12 18446744073709551604 18446744073709428160 _3 - 10 123456 2 0" - --- Iteration 2 -- -string(100) "0 0 0 - 123 u 18446744073709551493 123 - 0 0 0 - 1234 0 $0 _0 - 0 123 0 0" - --- Iteration 3 -- -string(78) "1 1 1 - 1 u 1 1 - 1 1 1 - #1 1 $1 _1 - 1 1 1 1" - --- Iteration 4 -- -string(78) "1 1 0 - 1 u 0 1 - 1 1 0 - #0 1 $1 _0 - 0 1 1 1" -Done diff --git a/ext/standard/tests/strings/vsprintf_variation17.phpt b/ext/standard/tests/strings/vsprintf_variation17.phpt deleted file mode 100644 index 17790432aabb4..0000000000000 --- a/ext/standard/tests/strings/vsprintf_variation17.phpt +++ /dev/null @@ -1,64 +0,0 @@ ---TEST-- -Test vsprintf() function : usage variations - scientific formats with scientific values ---FILE-- - ---EXPECT-- -*** Testing vsprintf() : scientific formats and scientific values *** - --- Iteration 1 -- -string(36) "0.000000e+0 +1.000000e+0 1.000000e+3" - --- Iteration 2 -- -string(38) "2.200000e+2 e 1.000000e+1 1.000000e+10" - --- Iteration 3 -- -string(32) "-2.2000e+13 1.0000e+21 1.2000e+2" - --- Iteration 4 -- -string(74) "#########1.000000e+1 1.000000e+2 $$$$$$$$-1.000000e+3 _________1.000000e+2" - --- Iteration 5 -- -string(47) "1.000000e+3 2.000000e+3 3.000000e+3 4.000000e+3" -Done diff --git a/ext/standard/tests/strings/vsprintf_variation18.phpt b/ext/standard/tests/strings/vsprintf_variation18.phpt deleted file mode 100644 index c044dbbdb8496..0000000000000 --- a/ext/standard/tests/strings/vsprintf_variation18.phpt +++ /dev/null @@ -1,100 +0,0 @@ ---TEST-- -Test vsprintf() function : usage variations - scientific formats with non-scientific values ---FILE-- -"12twelve"), - array("3"), array("4"), array("1"), array("2") ), - - // array of boolean data - array( true, TRUE, false, - TRUE, 0, FALSE, 1, - true, false, TRUE, FALSE, - 0, 1, 1, 0, - 1, TRUE, 0, FALSE), - -); - -// looping to test vsprintf() with different scientific formats from the above $format array -// and with non-scientific values from the above $args_array array -$counter = 1; -foreach($args_array as $args) { - echo "\n-- Iteration $counter --\n"; - var_dump( vsprintf($formats, $args) ); - $counter++; -} - -echo "Done"; -?> ---EXPECT-- -*** Testing vsprintf() : scientific formats and non-scientific values *** - --- Iteration 1 -- -string(231) "2.200000e+0 +2.000000e-1 1.020000e+1 - 1.234562e+5 e -1.234679e+3 1.234679e+3 - 2.0000e+1 2.1220e+2 -4.110000e+11 2.2120e+3 - 1.234578e+4 1.200000e+1 -1.200000e+1 -1.234562e+5 - 1.020000e+1 1.234562e+5 2.200000e+0 2.000000e-1" - --- Iteration 2 -- -string(227) "0.000000e+0 +0.000000e+0 0.000000e+0 - 1.230000e+2 e -1.230000e+2 1.230000e+2 - 0.0000e+0 0.0000e+0 1.234560e+5 0.0000e+0 - 1.234000e+3 0.000000e+0 0.000000e+0 0.000000e+0 - 0.000000e+0 1.230000e+2 0.000000e+0 0.000000e+0" - --- Iteration 3 -- -string(226) "1.000000e+0 +1.000000e+0 1.000000e+0 - 1.000000e+0 e 1.000000e+0 1.000000e+0 - 1.0000e+0 1.0000e+0 1.000000e+0 1.0000e+0 - 1.000000e+0 1.000000e+0 1.000000e+0 1.000000e+0 - 1.000000e+0 1.000000e+0 1.000000e+0 1.000000e+0" - --- Iteration 4 -- -string(226) "1.000000e+0 +1.000000e+0 0.000000e+0 - 1.000000e+0 e 0.000000e+0 1.000000e+0 - 1.0000e+0 0.0000e+0 1.000000e+0 0.0000e+0 - 0.000000e+0 1.000000e+0 1.000000e+0 0.000000e+0 - 0.000000e+0 1.000000e+0 1.000000e+0 1.000000e+0" -Done diff --git a/ext/standard/tests/strings/vsprintf_variation19.phpt b/ext/standard/tests/strings/vsprintf_variation19.phpt deleted file mode 100644 index e2b3fe0778591..0000000000000 --- a/ext/standard/tests/strings/vsprintf_variation19.phpt +++ /dev/null @@ -1,91 +0,0 @@ ---TEST-- -Test vsprintf() function : usage variations - with whitespaces in format strings ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing vsprintf() : with white spaces in format strings *** - --- Iteration 1 -- -string(13) "111 222 333" - --- Iteration 2 -- -string(29) "1.100000 0.200000 -0.600000" - --- Iteration 3 -- -string(29) "1.120000 -1.130000 0.230000" - --- Iteration 4 -- -string(9) "1 10 11" - --- Iteration 5 -- -string(7) "A B C" - --- Iteration 6 -- -string(38) "2.000000e+1 2.000000e-1 -2.000000e+1" - --- Iteration 7 -- -string(18) "4294967285 22 33" - --- Iteration 8 -- -string(19) "12 37777777755 23" - --- Iteration 9 -- -string(16) "11 ffffffde 33" - --- Iteration 10 -- -string(16) "11 FFFFFFDE 33" - --- Iteration 11 -- -string(38) "2.000000E+1 2.000000E-1 -2.000000E+1" -Done diff --git a/ext/standard/tests/strings/vsprintf_variation19_64bit.phpt b/ext/standard/tests/strings/vsprintf_variation19_64bit.phpt deleted file mode 100644 index 5cef628edbff9..0000000000000 --- a/ext/standard/tests/strings/vsprintf_variation19_64bit.phpt +++ /dev/null @@ -1,91 +0,0 @@ ---TEST-- -Test vsprintf() function : usage variations - with whitespaces in format strings ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing vsprintf() : with white spaces in format strings *** - --- Iteration 1 -- -string(13) "111 222 333" - --- Iteration 2 -- -string(29) "1.100000 0.200000 -0.600000" - --- Iteration 3 -- -string(29) "1.120000 -1.130000 0.230000" - --- Iteration 4 -- -string(9) "1 10 11" - --- Iteration 5 -- -string(7) "A B C" - --- Iteration 6 -- -string(38) "2.000000e+1 2.000000e-1 -2.000000e+1" - --- Iteration 7 -- -string(28) "18446744073709551605 22 33" - --- Iteration 8 -- -string(30) "12 1777777777777777777755 23" - --- Iteration 9 -- -string(24) "11 ffffffffffffffde 33" - --- Iteration 10 -- -string(24) "11 FFFFFFFFFFFFFFDE 33" - --- Iteration 11 -- -string(38) "2.000000E+1 2.000000E-1 -2.000000E+1" -Done diff --git a/ext/standard/tests/strings/vsprintf_variation2.phpt b/ext/standard/tests/strings/vsprintf_variation2.phpt deleted file mode 100644 index 3af9b854fe1b1..0000000000000 --- a/ext/standard/tests/strings/vsprintf_variation2.phpt +++ /dev/null @@ -1,171 +0,0 @@ ---TEST-- -Test vsprintf() function : usage variations - unexpected values for args argument ---FILE-- -getMessage(), "\n"; - } - $counter++; -}; - -// closing the resource -fclose($file_handle); - -echo "Done"; -?> ---EXPECTF-- -*** Testing vsprintf() : with unexpected values for args argument *** - --- Iteration 1 -- -string(1) "0" - --- Iteration 2 -- -string(1) "1" - --- Iteration 3 -- -string(5) "12345" - --- Iteration 4 -- -string(5) "-2345" - --- Iteration 5 -- -string(4) "10.5" - --- Iteration 6 -- -string(5) "-10.5" - --- Iteration 7 -- -string(12) "101234567000" - --- Iteration 8 -- -string(13) "1.07654321E-9" - --- Iteration 9 -- -string(3) "0.5" - --- Iteration 10 -- -The arguments array must contain 1 items, 0 given - --- Iteration 11 -- -The arguments array must contain 1 items, 0 given - --- Iteration 12 -- -string(1) "1" - --- Iteration 13 -- -string(0) "" - --- Iteration 14 -- -string(1) "1" - --- Iteration 15 -- -string(0) "" - --- Iteration 16 -- -string(0) "" - --- Iteration 17 -- -string(0) "" - --- Iteration 18 -- -string(6) "string" - --- Iteration 19 -- -string(6) "string" - --- Iteration 20 -- -The arguments array must contain 1 items, 0 given - --- Iteration 21 -- -The arguments array must contain 1 items, 0 given - --- Iteration 22 -- -The arguments array must contain 1 items, 0 given - --- Iteration 23 -- -string(%d) "Resource id #%d" -Done diff --git a/ext/standard/tests/strings/vsprintf_variation3.phpt b/ext/standard/tests/strings/vsprintf_variation3.phpt deleted file mode 100644 index 4fa51c92de8c9..0000000000000 --- a/ext/standard/tests/strings/vsprintf_variation3.phpt +++ /dev/null @@ -1,81 +0,0 @@ ---TEST-- -Test vsprintf() function : usage variations - int formats with int values ---FILE-- - ---EXPECT-- -*** Testing vsprintf() : int formats with int values *** - --- Iteration 1 -- -string(1) "0" - --- Iteration 2 -- -string(5) "-1 1 " - --- Iteration 3 -- -string(36) "2147483647 d, 2147483640 -2147483640" - --- Iteration 4 -- -string(38) " 123456 12345678 -1234567 1234567" - --- Iteration 5 -- -string(24) "111 2222 333333 44444444" - --- Iteration 6 -- -string(15) "4667 4011 83 10" - --- Iteration 7 -- -string(8) "%-5678 d" - --- Iteration 8 -- -string(7) "1 2 3 4" -Done diff --git a/ext/standard/tests/strings/vsprintf_variation4.phpt b/ext/standard/tests/strings/vsprintf_variation4.phpt deleted file mode 100644 index 69b6c913ea742..0000000000000 --- a/ext/standard/tests/strings/vsprintf_variation4.phpt +++ /dev/null @@ -1,104 +0,0 @@ ---TEST-- -Test vsprintf() function : usage variations - int formats with non-integer values ---SKIPIF-- - ---FILE-- -"12twelve"), - array("3"), array("4"), array("1"), array("2") ), - - // array of boolean data - array( true, TRUE, false, - TRUE, 0, FALSE, 1, - true, false, TRUE, FALSE, - 0, 1, 1, 0, - 1, TRUE, 0, FALSE), - -); - -// looping to test vsprintf() with different int formats from the above $format array -// and with non-int values from the above $args_array array -$counter = 1; -foreach($args_array as $args) { - echo "\n-- Iteration $counter --\n"; - var_dump( vsprintf($formats, $args) ); - $counter++; -} - -echo "Done"; -?> ---EXPECT-- -*** Testing vsprintf() : int formats and non-integer values *** - --- Iteration 1 -- -string(111) "2 +0 10 - 123456 d -1234 1234 - -1474836480 200000 4000 22000000 - 12345 12 -12 -123456 - 10 123456 2 0" - --- Iteration 2 -- -string(91) "0 +0 0 - 123 d -123 123 - 0 0 123456 0000 - 1234 0 $0 _0 - 0 123 0 0" - --- Iteration 3 -- -string(80) "1 +1 1 - 1 d 1 1 - 1 1 1 0001 - #1 1 $1 _1 - 1 1 1 1" - --- Iteration 4 -- -string(80) "1 +1 0 - 1 d 0 1 - 1 0 1 0000 - #0 1 $1 _0 - 0 1 1 1" -Done diff --git a/ext/standard/tests/strings/vsprintf_variation4_64bit.phpt b/ext/standard/tests/strings/vsprintf_variation4_64bit.phpt deleted file mode 100644 index 069d077ea267b..0000000000000 --- a/ext/standard/tests/strings/vsprintf_variation4_64bit.phpt +++ /dev/null @@ -1,104 +0,0 @@ ---TEST-- -Test vsprintf() function : usage variations - int formats with non-integer values ---SKIPIF-- - ---FILE-- -"12twelve"), - array("3"), array("4"), array("1"), array("2") ), - - // array of boolean data - array( true, TRUE, false, - TRUE, 0, FALSE, 1, - true, false, TRUE, FALSE, - 0, 1, 1, 0, - 1, TRUE, 0, FALSE), - -); - -// looping to test vsprintf() with different int formats from the above $format array -// and with non-int values from the above $args_array array -$counter = 1; -foreach($args_array as $args) { - echo "\n-- Iteration $counter --\n"; - var_dump( vsprintf($formats, $args) ); - $counter++; -} - -echo "Done"; -?> ---EXPECT-- -*** Testing vsprintf() : int formats and non-integer values *** - --- Iteration 1 -- -string(111) "2 +0 10 - 123456 d -1234 1234 - 20000000000 200000 4000 22000000 - 12345 12 -12 -123456 - 10 123456 2 0" - --- Iteration 2 -- -string(91) "0 +0 0 - 123 d -123 123 - 0 0 123456 0000 - 1234 0 $0 _0 - 0 123 0 0" - --- Iteration 3 -- -string(80) "1 +1 1 - 1 d 1 1 - 1 1 1 0001 - #1 1 $1 _1 - 1 1 1 1" - --- Iteration 4 -- -string(80) "1 +1 0 - 1 d 0 1 - 1 0 1 0000 - #0 1 $1 _0 - 0 1 1 1" -Done diff --git a/ext/standard/tests/strings/vsprintf_variation5.phpt b/ext/standard/tests/strings/vsprintf_variation5.phpt deleted file mode 100644 index 8c7046021b6df..0000000000000 --- a/ext/standard/tests/strings/vsprintf_variation5.phpt +++ /dev/null @@ -1,81 +0,0 @@ ---TEST-- -Test vsprintf() function : usage variations - float formats with float values ---FILE-- - ---EXPECT-- -*** Testing vsprintf() : int formats with float values *** - --- Iteration 1 -- -string(8) "0.000000" - --- Iteration 2 -- -string(28) "-0.100000 0.100000 10.000001" - --- Iteration 3 -- -string(57) "2147483649.000000 f, 2147483640.000000 -2147483640.000000" - --- Iteration 4 -- -string(45) "200000.0000 0.0000 -200000.000000 -0.0000" - --- Iteration 5 -- -string(98) "20000.000000 -1999999999999999879418332743206357172224.000000 0.000000 20000000000000000000.000000" - --- Iteration 6 -- -string(43) "4667.000000 4011.000000 83.000000 10.000000" - --- Iteration 7 -- -string(15) "%-5678.567800 f" - --- Iteration 8 -- -string(35) "1.110000 2.220000 3.330000 4.440000" -Done diff --git a/ext/standard/tests/strings/vsprintf_variation6.phpt b/ext/standard/tests/strings/vsprintf_variation6.phpt deleted file mode 100644 index 732f805441289..0000000000000 --- a/ext/standard/tests/strings/vsprintf_variation6.phpt +++ /dev/null @@ -1,100 +0,0 @@ ---TEST-- -Test vsprintf() function : usage variations - float formats with non-float values ---FILE-- -"12twelve"), - array("3"), array("4"), array("1"), array("2") ), - - // array of boolean data - array( true, TRUE, false, - TRUE, 0, FALSE, 1, - true, false, TRUE, FALSE, - 0, 1, 1, 0, - 1, TRUE, 0, FALSE), - -); - -// looping to test vsprintf() with different float formats from the above $format array -// and with non-float values from the above $args_array array -$counter = 1; -foreach($args_array as $args) { - echo "\n-- Iteration $counter --\n"; - var_dump( vsprintf($formats, $args) ); - $counter++; -} - -echo "Done"; -?> ---EXPECT-- -*** Testing vsprintf() : float formats and non-float values *** - --- Iteration 1 -- -string(243) "2.000000 -2.000000 2.000000 - 123456.000000 f -12346789.000000 12346789.000000 - 123200.0000 20000.0000 -40000.000000 22212.0000 - 12345780.000000 1211111.000000 -12111111.000000 -12345634.000000 - 2.000000 123456.000000 2.000000 -2.000000" - --- Iteration 2 -- -string(195) "0.000000 +0.000000 0.000000 - 123.000000 f -123.000000 123.000000 - 0.0000 0.0000 123456.000000 0.0000 - 1234.000000 0.000000 0.000000 0.000000 - 0.000000 123.000000 0.000000 0.000000" - --- Iteration 3 -- -string(178) "1.000000 +1.000000 1.000000 - 1.000000 f 1.000000 1.000000 - 1.0000 1.0000 1.000000 1.0000 - 1.000000 1.000000 1.000000 1.000000 - 1.000000 1.000000 1.000000 1.000000" - --- Iteration 4 -- -string(178) "1.000000 +1.000000 0.000000 - 1.000000 f 0.000000 1.000000 - 1.0000 0.0000 1.000000 0.0000 - 0.000000 1.000000 1.000000 0.000000 - 0.000000 1.000000 1.000000 1.000000" -Done diff --git a/ext/standard/tests/strings/vsprintf_variation7.phpt b/ext/standard/tests/strings/vsprintf_variation7.phpt deleted file mode 100644 index 57ac54fda98d9e18eef64e04f8da3ccf770fa7f9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2233 zcmbVNZENF35WarhUoq(H%66jIvYp)Jt=H0X;NYM~<3gb>Mv>N$z}AZ0Rea{S|K4X` zWXleP(%`JLvop`U>@%Y%n$I5RQN-q4X?jtWEK0rV^=Va?sV+oGH&mKO~VO zmrSHSa>Y7cu=J(Br@Onm*>7_;&kIHPdAWt+8LO4S^F|j8n(&2dJ;rq;5aoJDCGwO- zst9%7JM+R+1=dzMo!u?*})0Q|TR?;VSn@93fkUSGYdRRz)1OQ2Zmx zp&m_D?;ZPkj40@;;M_jX6m=u~Kl=R|@1NBU4aI~^b>4*SY z7A5%vFO2mpNztnHlS>utQtG5YPak7#^8#wAkdmuPfW%r5Ht;cPv3CoZm=!ND56iW zvY!yzV?>c1U1UBl%dFm1y~Et|kSO&bhQAuiDE_-o=m^?lot@pX?~FNrA5Had*@vI- zIhy_XW%ld*0biv5J6;)3TG7V@ELY}U+$XU6L}A=kxQ2!$^&3lgOfsTzqalG diff --git a/ext/standard/tests/strings/vsprintf_variation8.phpt b/ext/standard/tests/strings/vsprintf_variation8.phpt deleted file mode 100644 index 061e628c023b1..0000000000000 --- a/ext/standard/tests/strings/vsprintf_variation8.phpt +++ /dev/null @@ -1,135 +0,0 @@ ---TEST-- -Test vsprintf() function : usage variations - string formats with non-string values ---FILE-- -"12twelve"), - array("3"), array("4"), array("1"), array("2") ), - - // array of boolean data - array( true, TRUE, false, - TRUE, FALSE, 1, - true, false, TRUE, FALSE, - 0, 1, 1, 0, - 1, TRUE, 0, FALSE), - -); - -// looping to test vsprintf() with different string formats from the above $format array -// and with non-string values from the above $args_array array -$counter = 1; -foreach($args_array as $args) { - echo "\n-- Iteration $counter --\n"; - var_dump( vsprintf($formats, $args) ); - $counter++; -} - -?> ---EXPECTF-- -*** Testing vsprintf() : string formats and non-string values *** - --- Iteration 1 -- -string(177) "2.2 0.2 10.2 - 123456.234 -1234.6789 1234.6789 - 2123 2765 -27654321000 2123 - 12345.78 12.000000011111 -12.00000111111 -123456.234 - 10.2 123456.234 2.2 0.2" - --- Iteration 2 -- -string(133) "2 -2 2 - 123456 -12346789 12346789 - 1232 2000 -40000 2221 - 12345780 1211111 -12111111 -12345634 - 2 123456 2 -2" - --- Iteration 3 -- - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d -string(132) "Array Array Array - Array Array Array - Arra Arra Array Arra - Array Array Array Array - Array Array Array Array" - --- Iteration 4 -- -string(82) "1 1 - 1 1 - 1 0001 0000 - #0 1 $1 _0 - 1 1 1" diff --git a/ext/standard/tests/strings/vsprintf_variation9.phpt b/ext/standard/tests/strings/vsprintf_variation9.phpt deleted file mode 100644 index fc9b16dbee01f83be2395c9947f3bea6c1c2fddc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1701 zcmbVM|4!R55Z>Q@ic{9AO&j-TXbatjSm`7r{y>92CXK0bU57@3II^7rn)WPvfIY+B zZD%JbAxvnRlsNI-=kI*qolWW0^74vOawW8ZolaGpn5gYTlqKB6GJzw=G`kV7V=89W zqJaY6G6j)Tcg$$GkIgo>?AUE4G@Rkq*4bTdKcg$1tYbmW-TNL&~(q=thFsioIHnSMaR_uhYrNpQY+! z`mbsSxa>Od<^;FbhmDBh#1cFUUJ6edWd+{nfHnc}n%oQAx67eP@m&=2Tl_!g0W?GF z2us*-&~t|3JFt^Mh_+%`>+J|FEjKjWxEhr{bQDhkh9(+#)6H7VaRa@f9fo!oHF%5o zm>OnwV%5}8$cfEm8^#(}+71!WlI2x}57(7HL_JcDwR*1*QN6{VzfWtw>lW!0=d4TW4C#CSW zQl_?}Y~$9BygSF6IEsW4iFw|qk&<_=G;A$*qAW+Qh^+}8v={dP)E8A0c2bfCmsw(j zg7+|-6D*A_QG4IkOqYRt_>TJL2kSba6wYv!yNzJaL8&`9U~j6`Cc8`9PghJq89=4V zU(1zr_{|6GOW1RDyL0k`kUZY0Oavat;}3YREx%kW7xudR|I Date: Fri, 10 Jan 2020 15:54:08 +0100 Subject: [PATCH 217/338] Promote warnings to Errors in sockets's extension. --- ext/sockets/multicast.c | 22 +-- ext/sockets/sendrecvmsg.c | 33 ++-- ext/sockets/sockets.c | 164 +++++++++--------- ext/sockets/tests/mcast_ipv4_send_error.phpt | 26 +-- ext/sockets/tests/socket_connect_params.phpt | 13 +- .../socket_create_pair-wrongparams-win32.phpt | 22 ++- .../tests/socket_create_pair-wrongparams.phpt | 24 +-- .../tests/socket_export_stream-4-win.phpt | 7 +- ext/sockets/tests/socket_export_stream-4.phpt | 2 +- .../tests/socket_import_stream-4-win.phpt | 7 +- ext/sockets/tests/socket_import_stream-4.phpt | 2 +- ext/sockets/tests/socket_send_params.phpt | 10 +- ext/sockets/tests/socket_sendto_params.phpt | 10 +- ...socket_set_option_error_socket_option.phpt | 2 +- .../tests/socket_set_option_rcvtimeo.phpt | 10 +- .../tests/socket_set_option_seolinger.phpt | 20 ++- .../tests/socket_set_option_sndtimeo.phpt | 10 +- ext/sockets/tests/socket_shutdown-win32.phpt | 4 +- ext/sockets/tests/socket_shutdown.phpt | 4 +- 19 files changed, 205 insertions(+), 187 deletions(-) diff --git a/ext/sockets/multicast.c b/ext/sockets/multicast.c index 663d6440704e5..d7f435cd859b0 100644 --- a/ext/sockets/multicast.c +++ b/ext/sockets/multicast.c @@ -87,14 +87,11 @@ static int php_get_if_index_from_zval(zval *val, unsigned *out) if (Z_TYPE_P(val) == IS_LONG) { if (Z_LVAL_P(val) < 0 || (zend_ulong)Z_LVAL_P(val) > UINT_MAX) { - php_error_docref(NULL, E_WARNING, - "The interface index cannot be negative or larger than %u;" - " given " ZEND_LONG_FMT, UINT_MAX, Z_LVAL_P(val)); - ret = FAILURE; - } else { - *out = Z_LVAL_P(val); - ret = SUCCESS; + zend_value_error("Index must be between 0 and %u", UINT_MAX); + return FAILURE; } + *out = Z_LVAL_P(val); + ret = SUCCESS; } else { zend_string *tmp_str; zend_string *str = zval_get_tmp_string(val, &tmp_str); @@ -127,7 +124,7 @@ static int php_get_address_from_array(const HashTable *ht, const char *key, zend_string *str, *tmp_str; if ((val = zend_hash_str_find(ht, key, strlen(key))) == NULL) { - php_error_docref(NULL, E_WARNING, "No key \"%s\" passed in optval", key); + zend_value_error("No key \"%s\" passed in optval", key); return FAILURE; } str = zval_get_tmp_string(val, &tmp_str); @@ -282,8 +279,7 @@ int php_do_setsockopt_ip_mcast(php_socket *php_sock, case IP_MULTICAST_TTL: convert_to_long_ex(arg4); if (Z_LVAL_P(arg4) < 0L || Z_LVAL_P(arg4) > 255L) { - php_error_docref(NULL, E_WARNING, - "Expected a value between 0 and 255"); + zend_argument_value_error(4, "must be between 0 and 255"); return FAILURE; } ipv4_mcast_ttl_lback = (unsigned char) Z_LVAL_P(arg4); @@ -347,8 +343,7 @@ int php_do_setsockopt_ipv6_mcast(php_socket *php_sock, case IPV6_MULTICAST_HOPS: convert_to_long_ex(arg4); if (Z_LVAL_P(arg4) < -1L || Z_LVAL_P(arg4) > 255L) { - php_error_docref(NULL, E_WARNING, - "Expected a value between -1 and 255"); + zend_argument_value_error(4, "must be between -1 and 255"); return FAILURE; } ov = (int) Z_LVAL_P(arg4); @@ -496,8 +491,7 @@ static int _php_mcast_join_leave( } #endif else { - php_error_docref(NULL, E_WARNING, - "Option %s is inapplicable to this socket type", + zend_value_error("Option %s is inapplicable to this socket type", join ? "MCAST_JOIN_GROUP" : "MCAST_LEAVE_GROUP"); return -2; } diff --git a/ext/sockets/sendrecvmsg.c b/ext/sockets/sendrecvmsg.c index 211495f327027..6e145f57d98ac 100644 --- a/ext/sockets/sendrecvmsg.c +++ b/ext/sockets/sendrecvmsg.c @@ -66,12 +66,11 @@ inline ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags) } #endif -#define LONG_CHECK_VALID_INT(l) \ +#define LONG_CHECK_VALID_INT(l, arg_pos) \ do { \ if ((l) < INT_MIN && (l) > INT_MAX) { \ - php_error_docref(NULL, E_WARNING, "The value " ZEND_LONG_FMT " does not fit inside " \ - "the boundaries of a native integer", (l)); \ - return; \ + zend_argument_value_error((arg_pos), "must be between %d and %d", INT_MIN, INT_MAX); \ + RETURN_THROWS(); \ } \ } while (0) @@ -177,7 +176,7 @@ PHP_FUNCTION(socket_sendmsg) RETURN_THROWS(); } - LONG_CHECK_VALID_INT(flags); + LONG_CHECK_VALID_INT(flags, 3); if ((php_sock = (php_socket *)zend_fetch_resource(Z_RES_P(zsocket), php_sockets_le_socket_name, php_sockets_le_socket())) == NULL) { @@ -222,7 +221,7 @@ PHP_FUNCTION(socket_recvmsg) RETURN_THROWS(); } - LONG_CHECK_VALID_INT(flags); + LONG_CHECK_VALID_INT(flags, 3); if ((php_sock = (php_socket *)zend_fetch_resource(Z_RES_P(zsocket), php_sockets_le_socket_name, php_sockets_le_socket())) == NULL) { @@ -285,21 +284,20 @@ PHP_FUNCTION(socket_cmsg_space) RETURN_THROWS(); } - LONG_CHECK_VALID_INT(level); - LONG_CHECK_VALID_INT(type); - LONG_CHECK_VALID_INT(n); + LONG_CHECK_VALID_INT(level, 1); + LONG_CHECK_VALID_INT(type, 2); + LONG_CHECK_VALID_INT(n, 3); if (n < 0) { - php_error_docref(NULL, E_WARNING, "The third argument " - "cannot be negative"); - return; + zend_argument_value_error(3, "must be greater or equal than 0"); + RETURN_THROWS(); } entry = get_ancillary_reg_entry(level, type); if (entry == NULL) { - php_error_docref(NULL, E_WARNING, "The pair level " ZEND_LONG_FMT "/type " ZEND_LONG_FMT " is " - "not supported by PHP", level, type); - return; + zend_value_error("Pair level " ZEND_LONG_FMT " and/or type " ZEND_LONG_FMT " is not supported", + level, type); + RETURN_THROWS(); } if (entry->var_el_size > 0) { @@ -310,9 +308,8 @@ PHP_FUNCTION(socket_cmsg_space) if (n > n_max /* zend_long overflow */ || total_size > ZEND_LONG_MAX || total_size < size /* align overflow */) { - php_error_docref(NULL, E_WARNING, "The value for the " - "third argument (" ZEND_LONG_FMT ") is too large", n); - return; + zend_argument_value_error(3, "is too large"); + RETURN_THROWS(); } } diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 0009d35ececa9..e305bd479015d 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -692,6 +692,7 @@ PHP_FUNCTION(socket_select) } if (!sets) { + /* TODO Convert to Error? */ php_error_docref(NULL, E_WARNING, "No resource arrays were passed to select"); RETURN_FALSE; } @@ -923,8 +924,8 @@ PHP_FUNCTION(socket_write) } if (length < 0) { - php_error_docref(NULL, E_WARNING, "Length cannot be negative"); - RETURN_FALSE; + zend_argument_value_error(3, "must be greater than or equal to 0"); + RETURN_THROWS(); } if ((php_sock = (php_socket *)zend_fetch_resource(Z_RES_P(arg1), le_socket_name, le_socket)) == NULL) { @@ -1078,8 +1079,8 @@ PHP_FUNCTION(socket_getsockname) break; default: - php_error_docref(NULL, E_WARNING, "Unsupported address family %d", sa->sa_family); - RETURN_FALSE; + zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6"); + RETURN_THROWS(); } } /* }}} */ @@ -1155,8 +1156,8 @@ PHP_FUNCTION(socket_getpeername) break; default: - php_error_docref(NULL, E_WARNING, "Unsupported address family %d", sa->sa_family); - RETURN_FALSE; + zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6"); + RETURN_THROWS(); } } /* }}} */ @@ -1165,30 +1166,33 @@ PHP_FUNCTION(socket_getpeername) Creates an endpoint for communication in the domain specified by domain, of type specified by type */ PHP_FUNCTION(socket_create) { - zend_long arg1, arg2, arg3; + zend_long domain, type, protocol; php_socket *php_sock = php_create_socket(); - if (zend_parse_parameters(ZEND_NUM_ARGS(), "lll", &arg1, &arg2, &arg3) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "lll", &domain, &type, &protocol) == FAILURE) { efree(php_sock); RETURN_THROWS(); } - if (arg1 != AF_UNIX + if (domain != AF_UNIX #if HAVE_IPV6 - && arg1 != AF_INET6 + && domain != AF_INET6 #endif - && arg1 != AF_INET) { - php_error_docref(NULL, E_WARNING, "Invalid socket domain [" ZEND_LONG_FMT "] specified for argument 1, assuming AF_INET", arg1); - arg1 = AF_INET; + && domain != AF_INET) { + zend_argument_value_error(1, "must be either AF_UNIX, AF_INET6 or AF_INET"); + efree(php_sock); + RETURN_THROWS(); } - if (arg2 > 10) { - php_error_docref(NULL, E_WARNING, "Invalid socket type [" ZEND_LONG_FMT "] specified for argument 2, assuming SOCK_STREAM", arg2); - arg2 = SOCK_STREAM; + if (type > 10) { + zend_argument_value_error(2, "must be either SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET," + " SOCK_RAW, or SOCK_RDM"); + efree(php_sock); + RETURN_THROWS(); } - php_sock->bsd_socket = socket(arg1, arg2, arg3); - php_sock->type = arg1; + php_sock->bsd_socket = socket(domain, type, protocol); + php_sock->type = domain; if (IS_INVALID_SOCKET(php_sock)) { SOCKETS_G(last_error) = errno; @@ -1208,19 +1212,18 @@ PHP_FUNCTION(socket_create) Opens a connection to addr:port on the socket specified by socket */ PHP_FUNCTION(socket_connect) { - zval *arg1; + zval *resource_socket; php_socket *php_sock; char *addr; int retval; size_t addr_len; zend_long port = 0; - int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc, "rs|l", &arg1, &addr, &addr_len, &port) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs|l", &resource_socket, &addr, &addr_len, &port) == FAILURE) { RETURN_THROWS(); } - if ((php_sock = (php_socket *)zend_fetch_resource(Z_RES_P(arg1), le_socket_name, le_socket)) == NULL) { + if ((php_sock = (php_socket *)zend_fetch_resource(Z_RES_P(resource_socket), le_socket_name, le_socket)) == NULL) { RETURN_THROWS(); } @@ -1229,9 +1232,9 @@ PHP_FUNCTION(socket_connect) case AF_INET6: { struct sockaddr_in6 sin6 = {0}; - if (argc != 3) { - php_error_docref(NULL, E_WARNING, "Socket of type AF_INET6 requires 3 arguments"); - RETURN_FALSE; + if (ZEND_NUM_ARGS() != 3) { + zend_argument_value_error(3, "must be specified for the AF_INET6 socket type"); + RETURN_THROWS(); } memset(&sin6, 0, sizeof(struct sockaddr_in6)); @@ -1250,9 +1253,9 @@ PHP_FUNCTION(socket_connect) case AF_INET: { struct sockaddr_in sin = {0}; - if (argc != 3) { - php_error_docref(NULL, E_WARNING, "Socket of type AF_INET requires 3 arguments"); - RETURN_FALSE; + if (ZEND_NUM_ARGS() != 3) { + zend_argument_value_error(3, "must be specified for the AF_INET socket type"); + RETURN_THROWS(); } sin.sin_family = AF_INET; @@ -1270,8 +1273,8 @@ PHP_FUNCTION(socket_connect) struct sockaddr_un s_un = {0}; if (addr_len >= sizeof(s_un.sun_path)) { - php_error_docref(NULL, E_WARNING, "Path too long"); - RETURN_FALSE; + zend_argument_value_error(2, "must be less than %d", sizeof(s_un.sun_path)); + RETURN_THROWS(); } s_un.sun_family = AF_UNIX; @@ -1282,8 +1285,8 @@ PHP_FUNCTION(socket_connect) } default: - php_error_docref(NULL, E_WARNING, "Unsupported socket type %d", php_sock->type); - RETURN_FALSE; + zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6"); + RETURN_THROWS(); } if (retval != 0) { @@ -1338,10 +1341,8 @@ PHP_FUNCTION(socket_bind) sa->sun_family = AF_UNIX; if (addr_len >= sizeof(sa->sun_path)) { - php_error_docref(NULL, E_WARNING, - "Invalid path: too long (maximum size is %d)", - (int)sizeof(sa->sun_path) - 1); - RETURN_FALSE; + zend_argument_value_error(2, "must be less than %d", sizeof(sa->sun_path)); + RETURN_THROWS(); } memcpy(&sa->sun_path, addr, addr_len); @@ -1381,12 +1382,12 @@ PHP_FUNCTION(socket_bind) } #endif default: - php_error_docref(NULL, E_WARNING, "Unsupported socket type '%d', must be AF_UNIX, AF_INET, or AF_INET6", php_sock->type); - RETURN_FALSE; + zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6"); + RETURN_THROWS(); } if (retval != 0) { - PHP_SOCKET_ERROR(php_sock, "unable to bind address", errno); + PHP_SOCKET_ERROR(php_sock, "Unable to bind address", errno); RETURN_FALSE; } @@ -1429,7 +1430,7 @@ PHP_FUNCTION(socket_recv) } if (retval == -1) { - PHP_SOCKET_ERROR(php_sock, "unable to read from socket", errno); + PHP_SOCKET_ERROR(php_sock, "Unable to read from socket", errno); RETURN_FALSE; } @@ -1452,8 +1453,8 @@ PHP_FUNCTION(socket_send) } if (len < 0) { - php_error_docref(NULL, E_WARNING, "Length cannot be negative"); - RETURN_FALSE; + zend_argument_value_error(3, "must be greater than or equal to 0"); + RETURN_THROWS(); } if ((php_sock = (php_socket *)zend_fetch_resource(Z_RES_P(arg1), le_socket_name, le_socket)) == NULL) { @@ -1463,7 +1464,7 @@ PHP_FUNCTION(socket_send) retval = send(php_sock->bsd_socket, buf, (buf_len < (size_t)len ? buf_len : (size_t)len), flags); if (retval == (size_t)-1) { - PHP_SOCKET_ERROR(php_sock, "unable to write to socket", errno); + PHP_SOCKET_ERROR(php_sock, "Unable to write to socket", errno); RETURN_FALSE; } @@ -1498,6 +1499,7 @@ PHP_FUNCTION(socket_recvfrom) } /* overflow check */ + /* Shouldthrow ? */ if ((arg3 + 2) < 3) { RETURN_FALSE; } @@ -1513,7 +1515,7 @@ PHP_FUNCTION(socket_recvfrom) retval = recvfrom(php_sock->bsd_socket, ZSTR_VAL(recv_buf), arg3, arg4, (struct sockaddr *)&s_un, (socklen_t *)&slen); if (retval < 0) { - PHP_SOCKET_ERROR(php_sock, "unable to recvfrom", errno); + PHP_SOCKET_ERROR(php_sock, "Unable to recvfrom", errno); zend_string_efree(recv_buf); RETURN_FALSE; } @@ -1537,7 +1539,7 @@ PHP_FUNCTION(socket_recvfrom) retval = recvfrom(php_sock->bsd_socket, ZSTR_VAL(recv_buf), arg3, arg4, (struct sockaddr *)&sin, (socklen_t *)&slen); if (retval < 0) { - PHP_SOCKET_ERROR(php_sock, "unable to recvfrom", errno); + PHP_SOCKET_ERROR(php_sock, "Unable to recvfrom", errno); zend_string_efree(recv_buf); RETURN_FALSE; } @@ -1580,8 +1582,8 @@ PHP_FUNCTION(socket_recvfrom) break; #endif default: - php_error_docref(NULL, E_WARNING, "Unsupported socket type %d", php_sock->type); - RETURN_FALSE; + zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6"); + RETURN_THROWS(); } RETURN_LONG(retval); @@ -1610,8 +1612,8 @@ PHP_FUNCTION(socket_sendto) } if (len < 0) { - php_error_docref(NULL, E_WARNING, "Length cannot be negative"); - RETURN_FALSE; + zend_argument_value_error(3, "must be greater than or equal to 0"); + RETURN_THROWS(); } if ((php_sock = (php_socket *)zend_fetch_resource(Z_RES_P(arg1), le_socket_name, le_socket)) == NULL) { @@ -1660,12 +1662,12 @@ PHP_FUNCTION(socket_sendto) break; #endif default: - php_error_docref(NULL, E_WARNING, "Unsupported socket type %d", php_sock->type); - RETURN_FALSE; + zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6"); + RETURN_THROWS(); } if (retval == -1) { - PHP_SOCKET_ERROR(php_sock, "unable to write to socket", errno); + PHP_SOCKET_ERROR(php_sock, "Unable to write to socket", errno); RETURN_FALSE; } @@ -1703,7 +1705,7 @@ PHP_FUNCTION(socket_get_option) unsigned int if_index; optlen = sizeof(if_addr); if (getsockopt(php_sock->bsd_socket, level, optname, (char*)&if_addr, &optlen) != 0) { - PHP_SOCKET_ERROR(php_sock, "unable to retrieve socket option", errno); + PHP_SOCKET_ERROR(php_sock, "Unable to retrieve socket option", errno); RETURN_FALSE; } if (php_add4_to_if_index(&if_addr, php_sock, &if_index) == SUCCESS) { @@ -1731,7 +1733,7 @@ PHP_FUNCTION(socket_get_option) optlen = sizeof(linger_val); if (getsockopt(php_sock->bsd_socket, level, optname, (char*)&linger_val, &optlen) != 0) { - PHP_SOCKET_ERROR(php_sock, "unable to retrieve socket option", errno); + PHP_SOCKET_ERROR(php_sock, "Unable to retrieve socket option", errno); RETURN_FALSE; } @@ -1746,14 +1748,14 @@ PHP_FUNCTION(socket_get_option) optlen = sizeof(tv); if (getsockopt(php_sock->bsd_socket, level, optname, (char*)&tv, &optlen) != 0) { - PHP_SOCKET_ERROR(php_sock, "unable to retrieve socket option", errno); + PHP_SOCKET_ERROR(php_sock, "Unable to retrieve socket option", errno); RETURN_FALSE; } #else optlen = sizeof(int); if (getsockopt(php_sock->bsd_socket, level, optname, (char*)&timeout, &optlen) != 0) { - PHP_SOCKET_ERROR(php_sock, "unable to retrieve socket option", errno); + PHP_SOCKET_ERROR(php_sock, "Unable to retrieve socket option", errno); RETURN_FALSE; } @@ -1771,7 +1773,7 @@ PHP_FUNCTION(socket_get_option) optlen = sizeof(other_val); if (getsockopt(php_sock->bsd_socket, level, optname, (char*)&other_val, &optlen) != 0) { - PHP_SOCKET_ERROR(php_sock, "unable to retrieve socket option", errno); + PHP_SOCKET_ERROR(php_sock, "Unable to retrieve socket option", errno); RETURN_FALSE; } if (optlen == 1) @@ -1845,12 +1847,12 @@ PHP_FUNCTION(socket_set_option) opt_ht = Z_ARRVAL_P(arg4); if ((l_onoff = zend_hash_str_find(opt_ht, l_onoff_key, sizeof(l_onoff_key) - 1)) == NULL) { - php_error_docref(NULL, E_WARNING, "No key \"%s\" passed in optval", l_onoff_key); - RETURN_FALSE; + zend_argument_value_error(4, "must have key \"%s\"", l_onoff_key); + RETURN_THROWS(); } if ((l_linger = zend_hash_str_find(opt_ht, l_linger_key, sizeof(l_linger_key) - 1)) == NULL) { - php_error_docref(NULL, E_WARNING, "No key \"%s\" passed in optval", l_linger_key); - RETURN_FALSE; + zend_argument_value_error(4, "must have key \"%s\"", l_linger_key); + RETURN_THROWS(); } convert_to_long_ex(l_onoff); @@ -1873,12 +1875,12 @@ PHP_FUNCTION(socket_set_option) opt_ht = Z_ARRVAL_P(arg4); if ((sec = zend_hash_str_find(opt_ht, sec_key, sizeof(sec_key) - 1)) == NULL) { - php_error_docref(NULL, E_WARNING, "No key \"%s\" passed in optval", sec_key); - RETURN_FALSE; + zend_argument_value_error(4, "must have key \"%s\"", sec_key); + RETURN_THROWS(); } if ((usec = zend_hash_str_find(opt_ht, usec_key, sizeof(usec_key) - 1)) == NULL) { - php_error_docref(NULL, E_WARNING, "No key \"%s\" passed in optval", usec_key); - RETURN_FALSE; + zend_argument_value_error(4, "must have key \"%s\"", usec_key); + RETURN_THROWS(); } convert_to_long_ex(sec); @@ -1920,7 +1922,7 @@ PHP_FUNCTION(socket_set_option) retval = setsockopt(php_sock->bsd_socket, level, optname, opt_ptr, optlen); if (retval != 0) { - PHP_SOCKET_ERROR(php_sock, "unable to set socket option", errno); + PHP_SOCKET_ERROR(php_sock, "Unable to set socket option", errno); RETURN_FALSE; } @@ -1942,23 +1944,24 @@ PHP_FUNCTION(socket_create_pair) RETURN_THROWS(); } - php_sock[0] = php_create_socket(); - php_sock[1] = php_create_socket(); - if (domain != AF_INET #if HAVE_IPV6 && domain != AF_INET6 #endif && domain != AF_UNIX) { - php_error_docref(NULL, E_WARNING, "Invalid socket domain [" ZEND_LONG_FMT "] specified for argument 1, assuming AF_INET", domain); - domain = AF_INET; + zend_argument_value_error(1, "must be either AF_UNIX, AF_INET6 or AF_INET"); + RETURN_THROWS(); } if (type > 10) { - php_error_docref(NULL, E_WARNING, "Invalid socket type [" ZEND_LONG_FMT "] specified for argument 2, assuming SOCK_STREAM", type); - type = SOCK_STREAM; + zend_argument_value_error(2, "must be either SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET," + " SOCK_RAW, or SOCK_RDM"); + RETURN_THROWS(); } + php_sock[0] = php_create_socket(); + php_sock[1] = php_create_socket(); + if (socketpair(domain, type, protocol, fds_array) != 0) { SOCKETS_G(last_error) = errno; php_error_docref(NULL, E_WARNING, "Unable to create socket pair [%d]: %s", errno, sockets_strerror(errno)); @@ -2012,7 +2015,7 @@ PHP_FUNCTION(socket_shutdown) } if (shutdown(php_sock->bsd_socket, how_shutdown) != 0) { - PHP_SOCKET_ERROR(php_sock, "unable to shutdown socket", errno); + PHP_SOCKET_ERROR(php_sock, "Unable to shutdown socket", errno); RETURN_FALSE; } @@ -2092,7 +2095,7 @@ php_socket *socket_import_file_descriptor(PHP_SOCKET socket) if (getsockname(socket, (struct sockaddr*)&addr, &addr_len) == 0) { retsock->type = addr.ss_family; } else { - PHP_SOCKET_ERROR(retsock, "unable to obtain socket family", errno); + PHP_SOCKET_ERROR(retsock, "Unable to obtain socket family", errno); goto error; } @@ -2100,7 +2103,7 @@ php_socket *socket_import_file_descriptor(PHP_SOCKET socket) #ifndef PHP_WIN32 t = fcntl(socket, F_GETFL); if (t == -1) { - PHP_SOCKET_ERROR(retsock, "unable to obtain blocking state", errno); + PHP_SOCKET_ERROR(retsock, "Unable to obtain blocking state", errno); goto error; } else { retsock->blocking = !(t & O_NONBLOCK); @@ -2286,6 +2289,7 @@ PHP_FUNCTION(socket_addrinfo_lookup) } else if (zend_string_equals_literal(key, "ai_family")) { hints.ai_family = zval_get_long(hint); } else { + /* TODO Promote to warning/error? */ php_error_docref(NULL, E_NOTICE, "Unknown hint %s", ZSTR_VAL(key)); } } @@ -2367,10 +2371,10 @@ PHP_FUNCTION(socket_addrinfo_bind) break; } default: - php_error_docref(NULL, E_WARNING, "Unsupported socket type '%d', must be AF_UNIX, AF_INET, or AF_INET6", php_sock->type); close(php_sock->bsd_socket); efree(php_sock); - RETURN_FALSE; + zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6"); + RETURN_THROWS(); } if (retval != 0) { @@ -2433,10 +2437,10 @@ PHP_FUNCTION(socket_addrinfo_connect) break; } default: - php_error_docref(NULL, E_WARNING, "Unsupported socket type '%d', must be AF_UNIX, AF_INET, or AF_INET6", php_sock->type); + zend_argument_value_error(1, "socket type must be either AF_UNIX, AF_INET, or AF_INET6"); close(php_sock->bsd_socket); efree(php_sock); - RETURN_FALSE; + RETURN_THROWS(); } if (retval != 0) { diff --git a/ext/sockets/tests/mcast_ipv4_send_error.phpt b/ext/sockets/tests/mcast_ipv4_send_error.phpt index 91063f425357d..5d254c6843303 100644 --- a/ext/sockets/tests/mcast_ipv4_send_error.phpt +++ b/ext/sockets/tests/mcast_ipv4_send_error.phpt @@ -38,8 +38,12 @@ echo "\n"; echo "Setting IP_MULTICAST_TTL with 256\n"; //if we had a simple cast to unsigned char, this would be the same as 0 -$r = socket_set_option($s, $level, IP_MULTICAST_TTL, 256); -var_dump($r); +try { + $r = socket_set_option($s, $level, IP_MULTICAST_TTL, 256); + var_dump($r); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} $r = socket_get_option($s, $level, IP_MULTICAST_TTL); var_dump($r); echo "\n"; @@ -53,12 +57,16 @@ echo "\n"; echo "Setting IP_MULTICAST_TTL with -1\n"; //should give error, not be the same as 255 -$r = socket_set_option($s, $level, IP_MULTICAST_TTL, -1); -var_dump($r); +try { + $r = socket_set_option($s, $level, IP_MULTICAST_TTL, -1); + var_dump($r); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} $r = socket_get_option($s, $level, IP_MULTICAST_TTL); var_dump($r); echo "\n"; ---EXPECTF-- +--EXPECT-- Setting IP_MULTICAST_LOOP with 256 bool(true) int(1) @@ -68,9 +76,7 @@ bool(true) int(0) Setting IP_MULTICAST_TTL with 256 - -Warning: socket_set_option(): Expected a value between 0 and 255 in %s on line %d -bool(false) +socket_set_option(): Argument #4 ($optval) must be between 0 and 255 int(1) Setting IP_MULTICAST_TTL with "254" @@ -78,7 +84,5 @@ bool(true) int(254) Setting IP_MULTICAST_TTL with -1 - -Warning: socket_set_option(): Expected a value between 0 and 255 in %s on line %d -bool(false) +socket_set_option(): Argument #4 ($optval) must be between 0 and 255 int(254) diff --git a/ext/sockets/tests/socket_connect_params.phpt b/ext/sockets/tests/socket_connect_params.phpt index 3d3b759a14d93..ea7c4971d1fe0 100644 --- a/ext/sockets/tests/socket_connect_params.phpt +++ b/ext/sockets/tests/socket_connect_params.phpt @@ -18,10 +18,14 @@ socket_getsockname($s_c, $addr, $port); // wrong parameter count try { $s_w = socket_connect($s_c); -} catch (TypeError $e) { - echo $e->getMessage(), "\n"; +} catch (\ArgumentCountError $e) { + echo $e->getMessage() . \PHP_EOL; +} +try { + $s_w = socket_connect($s_c, '0.0.0.0'); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; } -$s_w = socket_connect($s_c, '0.0.0.0'); $s_w = socket_connect($s_c, '0.0.0.0', $port); socket_close($s_c); @@ -29,7 +33,6 @@ socket_close($s_c); ?> --EXPECTF-- socket_connect() expects at least 2 parameters, 1 given - -Warning: socket_connect(): Socket of type AF_INET requires 3 arguments in %s on line %d +socket_connect(): Argument #3 ($port) must be specified for the AF_INET socket type Warning: socket_connect(): unable to connect [%i]: %a in %s on line %d diff --git a/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt b/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt index 9216a87046d1f..de939f66577df 100644 --- a/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt +++ b/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt @@ -13,17 +13,21 @@ if (!extension_loaded('sockets')) { var_dump(socket_create_pair(AF_INET, null, null, $sockets)); -var_dump(socket_create_pair(31337, null, null, $sockets)); - -var_dump(socket_create_pair(AF_INET, 31337, 0, $sockets)); ---EXPECTF-- -bool(true) - -Warning: socket_create_pair(): Invalid socket domain [31337] specified for argument 1, assuming AF_INET in %s on line %d -bool(true) +try { + var_dump(socket_create_pair(31337, null, null, $sockets)); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} -Warning: socket_create_pair(): Invalid socket type [31337] specified for argument 2, assuming SOCK_STREAM in %s on line %d +try { + var_dump(socket_create_pair(AF_INET, 31337, 0, $sockets)); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} +--EXPECT-- bool(true) +socket_create_pair(): Argument #1 ($domain) must be either AF_UNIX, AF_INET6 or AF_INET +socket_create_pair(): Argument #2 ($type) must be either SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET, SOCK_RAW, or SOCK_RDM --CREDITS-- Till Klampaeckel, till@php.net Berlin TestFest 2009 diff --git a/ext/sockets/tests/socket_create_pair-wrongparams.phpt b/ext/sockets/tests/socket_create_pair-wrongparams.phpt index a7bc17b86b3bc..7adbc91d8ad5a 100644 --- a/ext/sockets/tests/socket_create_pair-wrongparams.phpt +++ b/ext/sockets/tests/socket_create_pair-wrongparams.phpt @@ -13,24 +13,24 @@ if (!extension_loaded('sockets')) { var_dump(socket_create_pair(AF_INET, null, null, $sockets)); -var_dump(socket_create_pair(31337, null, null, $sockets)); +try { + var_dump(socket_create_pair(31337, null, null, $sockets)); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} -var_dump(socket_create_pair(AF_INET, 31337, 0, $sockets)); +try { + var_dump(socket_create_pair(AF_INET, 31337, 0, $sockets)); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} ?> --EXPECTF-- Warning: socket_create_pair(): Unable to create socket pair [%d]: %s not supported in %s on line %d bool(false) - -Warning: socket_create_pair(): Invalid socket domain [31337] specified for argument 1, assuming AF_INET in %s on line %d - -Warning: socket_create_pair(): Unable to create socket pair [%d]: %s not supported in %s on line %d -bool(false) - -Warning: socket_create_pair(): Invalid socket type [31337] specified for argument 2, assuming SOCK_STREAM in %s on line %d - -Warning: socket_create_pair(): Unable to create socket pair [%d]: %s not supported %s on line %d -bool(false) +socket_create_pair(): Argument #1 ($domain) must be either AF_UNIX, AF_INET6 or AF_INET +socket_create_pair(): Argument #2 ($type) must be either SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET, SOCK_RAW, or SOCK_RDM --CREDITS-- Till Klampaeckel, till@php.net Berlin TestFest 2009 diff --git a/ext/sockets/tests/socket_export_stream-4-win.phpt b/ext/sockets/tests/socket_export_stream-4-win.phpt index 24fc604f6e2a1..6865a880b1c5b 100644 --- a/ext/sockets/tests/socket_export_stream-4-win.phpt +++ b/ext/sockets/tests/socket_export_stream-4-win.phpt @@ -73,8 +73,6 @@ socket_bind($sock4, '0.0.0.0', 0); $stream4 = socket_export_stream($sock4); socket_close($sock4); test($stream4, $sock4); - -echo "Done.\n"; --EXPECTF-- normal stream_set_blocking 1 @@ -99,7 +97,7 @@ Warning: socket_set_block(): unable to set blocking mode [%d]: An operation was in %s on line %d socket_get_option -Warning: socket_get_option(): unable to retrieve socket option [%d]: An operation was attempted on something that is not a socket. +Warning: socket_get_option(): Unable to retrieve socket option [%d]: An operation was attempted on something that is not a socket. in %s on line %d @@ -110,6 +108,3 @@ stream_set_blocking stream_set_blocking(): supplied resource is not a valid stre socket_set_block socket_set_block(): supplied resource is not a valid Socket resource socket_get_option socket_get_option(): supplied resource is not a valid Socket resource - - -Done. diff --git a/ext/sockets/tests/socket_export_stream-4.phpt b/ext/sockets/tests/socket_export_stream-4.phpt index 77050f02f41ca..6acc88d16b8f8 100644 --- a/ext/sockets/tests/socket_export_stream-4.phpt +++ b/ext/sockets/tests/socket_export_stream-4.phpt @@ -98,7 +98,7 @@ socket_set_block Warning: socket_set_block(): unable to set blocking mode [%d]: %s in %s on line %d socket_get_option -Warning: socket_get_option(): unable to retrieve socket option [%d]: %s in %s on line %d +Warning: socket_get_option(): Unable to retrieve socket option [%d]: %s in %s on line %d diff --git a/ext/sockets/tests/socket_import_stream-4-win.phpt b/ext/sockets/tests/socket_import_stream-4-win.phpt index 16a9c0087ec8e..8040572597830 100644 --- a/ext/sockets/tests/socket_import_stream-4-win.phpt +++ b/ext/sockets/tests/socket_import_stream-4-win.phpt @@ -68,8 +68,6 @@ $stream4 = stream_socket_server("udp://0.0.0.0:0", $errno, $errstr, STREAM_SERVE $sock4 = socket_import_stream($stream4); socket_close($sock4); test($stream4, $sock4); - -echo "Done.\n"; --EXPECTF-- normal stream_set_blocking 1 @@ -94,7 +92,7 @@ Warning: socket_set_block(): unable to set blocking mode [10038]: %s in %ssocket_import_stream-4-win.php on line %d socket_get_option -Warning: socket_get_option(): unable to retrieve socket option [10038]: %s +Warning: socket_get_option(): Unable to retrieve socket option [10038]: %s in %ssocket_import_stream-4-win.php on line %d @@ -105,6 +103,3 @@ stream_set_blocking stream_set_blocking(): supplied resource is not a valid stre socket_set_block socket_set_block(): supplied resource is not a valid Socket resource socket_get_option socket_get_option(): supplied resource is not a valid Socket resource - - -Done. diff --git a/ext/sockets/tests/socket_import_stream-4.phpt b/ext/sockets/tests/socket_import_stream-4.phpt index d0ccf6b71e0be..a4c38b5a1b163 100644 --- a/ext/sockets/tests/socket_import_stream-4.phpt +++ b/ext/sockets/tests/socket_import_stream-4.phpt @@ -93,7 +93,7 @@ socket_set_block Warning: socket_set_block(): unable to set blocking mode [%d]: %s in %s on line %d socket_get_option -Warning: socket_get_option(): unable to retrieve socket option [%d]: %s in %s on line %d +Warning: socket_get_option(): Unable to retrieve socket option [%d]: %s in %s on line %d diff --git a/ext/sockets/tests/socket_send_params.phpt b/ext/sockets/tests/socket_send_params.phpt index cc05288eb9536..4c3f57729f597 100644 --- a/ext/sockets/tests/socket_send_params.phpt +++ b/ext/sockets/tests/socket_send_params.phpt @@ -9,8 +9,12 @@ ext/sockets - socket_send - test with incorrect parameters --FILE-- getMessage() . \PHP_EOL; + } socket_close($s_c); ?> ---EXPECTF-- -Warning: socket_send(): Length cannot be negative in %s on line %i +--EXPECT-- +socket_send(): Argument #3 ($len) must be greater than or equal to 0 diff --git a/ext/sockets/tests/socket_sendto_params.phpt b/ext/sockets/tests/socket_sendto_params.phpt index e4808a93ee544..09cb859ad75fe 100644 --- a/ext/sockets/tests/socket_sendto_params.phpt +++ b/ext/sockets/tests/socket_sendto_params.phpt @@ -9,8 +9,12 @@ ext/sockets - socket_sendto - test with incorrect parameters --FILE-- getMessage() . \PHP_EOL; + } socket_close($s_c); ?> ---EXPECTF-- -Warning: socket_sendto(): Length cannot be negative in %s on line %i +--EXPECT-- +socket_sendto(): Argument #3 ($len) must be greater than or equal to 0 diff --git a/ext/sockets/tests/socket_set_option_error_socket_option.phpt b/ext/sockets/tests/socket_set_option_error_socket_option.phpt index 53d76fa4c1153..d1d9c842ae526 100644 --- a/ext/sockets/tests/socket_set_option_error_socket_option.phpt +++ b/ext/sockets/tests/socket_set_option_error_socket_option.phpt @@ -28,7 +28,7 @@ socket_set_option( $socket, SOL_SOCKET, 1, 1); socket_close($socket); ?> --EXPECTF-- -Warning: socket_set_option(): unable to set socket option [%d]: Permission denied in %s on line %d +Warning: socket_set_option(): Unable to set socket option [%d]: Permission denied in %s on line %d --CREDITS-- Moritz Neuhaeuser, info@xcompile.net PHP Testfest Berlin 2009-05-10 diff --git a/ext/sockets/tests/socket_set_option_rcvtimeo.phpt b/ext/sockets/tests/socket_set_option_rcvtimeo.phpt index 07238aa9e4c3d..819d0ee443696 100644 --- a/ext/sockets/tests/socket_set_option_rcvtimeo.phpt +++ b/ext/sockets/tests/socket_set_option_rcvtimeo.phpt @@ -18,7 +18,11 @@ if (!$socket) { socket_set_block($socket); //wrong params -$retval_1 = socket_set_option( $socket, SOL_SOCKET, SO_RCVTIMEO, array()); +try { + $retval_1 = socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, []); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} //set/get comparison $options = array("sec" => 1, "usec" => 0); @@ -29,8 +33,8 @@ var_dump($retval_2); var_dump($retval_3 === $options); socket_close($socket); ?> ---EXPECTF-- -Warning: socket_set_option(): No key "sec" passed in optval in %s on line %d +--EXPECT-- +socket_set_option(): Argument #4 ($optval) must have key "sec" bool(true) bool(true) --CREDITS-- diff --git a/ext/sockets/tests/socket_set_option_seolinger.phpt b/ext/sockets/tests/socket_set_option_seolinger.phpt index d284a37f63917..132d4e0c6e04b 100644 --- a/ext/sockets/tests/socket_set_option_seolinger.phpt +++ b/ext/sockets/tests/socket_set_option_seolinger.phpt @@ -18,7 +18,11 @@ if (!$socket) { die('Unable to create AF_INET socket [socket]'); } // wrong params -$retval_1 = socket_set_option( $socket, SOL_SOCKET, SO_LINGER, array()); +try { + $retval_1 = socket_set_option( $socket, SOL_SOCKET, SO_LINGER, []); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} // set/get comparison $options = array("l_onoff" => 1, "l_linger" => 1); @@ -27,7 +31,11 @@ $retval_3 = socket_get_option( $socket, SOL_SOCKET, SO_LINGER); //l_linger not given $options_2 = array("l_onoff" => 1); -var_dump(socket_set_option( $socket, SOL_SOCKET, SO_LINGER, $options_2)); +try { + var_dump(socket_set_option( $socket, SOL_SOCKET, SO_LINGER, $options_2)); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} var_dump($retval_2); var_dump($retval_3["l_linger"] === $options["l_linger"]); @@ -36,11 +44,9 @@ var_dump((bool)$retval_3["l_onoff"] === (bool)$options["l_onoff"]); socket_close($socket); ?> ---EXPECTF-- -Warning: socket_set_option(): No key "l_onoff" passed in optval in %s on line %d - -Warning: socket_set_option(): No key "l_linger" passed in optval in %s on line %d -bool(false) +--EXPECT-- +socket_set_option(): Argument #4 ($optval) must have key "l_onoff" +socket_set_option(): Argument #4 ($optval) must have key "l_linger" bool(true) bool(true) bool(true) diff --git a/ext/sockets/tests/socket_set_option_sndtimeo.phpt b/ext/sockets/tests/socket_set_option_sndtimeo.phpt index 9c79fd8270fbf..359aab9ae9a5b 100644 --- a/ext/sockets/tests/socket_set_option_sndtimeo.phpt +++ b/ext/sockets/tests/socket_set_option_sndtimeo.phpt @@ -18,7 +18,11 @@ if (!$socket) { socket_set_block($socket); //wrong params -$retval_1 = socket_set_option( $socket, SOL_SOCKET, SO_SNDTIMEO, array()); +try { + $retval_1 = socket_set_option( $socket, SOL_SOCKET, SO_SNDTIMEO, []); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} //set/get comparison $options = array("sec" => 1, "usec" => 0); @@ -29,8 +33,8 @@ var_dump($retval_2); var_dump($retval_3 === $options); socket_close($socket); ?> ---EXPECTF-- -Warning: socket_set_option(): No key "sec" passed in optval in %s on line %d +--EXPECT-- +socket_set_option(): Argument #4 ($optval) must have key "sec" bool(true) bool(true) --CREDITS-- diff --git a/ext/sockets/tests/socket_shutdown-win32.phpt b/ext/sockets/tests/socket_shutdown-win32.phpt index 6280e61044474..aced74b7f8ec3 100644 --- a/ext/sockets/tests/socket_shutdown-win32.phpt +++ b/ext/sockets/tests/socket_shutdown-win32.phpt @@ -50,10 +50,10 @@ bool(true) bool(true) bool(true) -Warning: socket_shutdown(): unable to shutdown socket [%d]: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied. +Warning: socket_shutdown(): Unable to shutdown socket [%d]: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied. in %s on line %d bool(false) -Warning: socket_shutdown(): unable to shutdown socket [%d]: An invalid argument was supplied. +Warning: socket_shutdown(): Unable to shutdown socket [%d]: An invalid argument was supplied. in %s on line %d bool(false) diff --git a/ext/sockets/tests/socket_shutdown.phpt b/ext/sockets/tests/socket_shutdown.phpt index 747016b795c0c..554958a77a807 100644 --- a/ext/sockets/tests/socket_shutdown.phpt +++ b/ext/sockets/tests/socket_shutdown.phpt @@ -51,8 +51,8 @@ bool(true) bool(true) bool(true) -Warning: socket_shutdown(): unable to shutdown socket [%d]: Transport endpoint is not connected in %s on line %d +Warning: socket_shutdown(): Unable to shutdown socket [%d]: Transport endpoint is not connected in %s on line %d bool(false) -Warning: socket_shutdown(): unable to shutdown socket [%d]: Invalid argument in %s on line %d +Warning: socket_shutdown(): Unable to shutdown socket [%d]: Invalid argument in %s on line %d bool(false) From 0b99017516ec897c48012974e80db22494bb6251 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 22 Apr 2020 00:50:32 +0200 Subject: [PATCH 218/338] Fix error message in ext/socket --- ext/sockets/sendrecvmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/sockets/sendrecvmsg.c b/ext/sockets/sendrecvmsg.c index 6e145f57d98ac..32f559a192258 100644 --- a/ext/sockets/sendrecvmsg.c +++ b/ext/sockets/sendrecvmsg.c @@ -289,7 +289,7 @@ PHP_FUNCTION(socket_cmsg_space) LONG_CHECK_VALID_INT(n, 3); if (n < 0) { - zend_argument_value_error(3, "must be greater or equal than 0"); + zend_argument_value_error(3, "must be greater than or equal to 0"); RETURN_THROWS(); } From 30a5f3da99ba554e5553e4771a81402c20306640 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 22 Apr 2020 10:11:58 +0200 Subject: [PATCH 219/338] printf: Report error if missing padding character --- ext/standard/formatted_print.c | 14 ++++++++++---- ext/standard/tests/strings/bug67249.phpt | 8 ++++++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c index f99187b1c8e79..52c7cc94d2eb4 100644 --- a/ext/standard/formatted_print.c +++ b/ext/standard/formatted_print.c @@ -470,10 +470,16 @@ php_formatted_print(char *format, size_t format_len, zval *args, int argc, int n /* space padding, the default */ } else if (*format == '+') { always_sign = 1; - } else if (*format == '\'' && format_len > 1) { - format++; - format_len--; - padding = *format; + } else if (*format == '\'') { + if (format_len > 1) { + format++; + format_len--; + padding = *format; + } else { + zend_value_error("Missing padding character"); + zend_string_efree(result); + return NULL; + } } else { PRINTF_DEBUG(("sprintf: end of modifiers\n")); break; diff --git a/ext/standard/tests/strings/bug67249.phpt b/ext/standard/tests/strings/bug67249.phpt index 6ea75289e64a4..a0e0843f4b19a 100644 --- a/ext/standard/tests/strings/bug67249.phpt +++ b/ext/standard/tests/strings/bug67249.phpt @@ -2,7 +2,11 @@ Bug #67249 (printf out-of-bounds read) --FILE-- getMessage(), "\n"; +} ?> --EXPECT-- -string(0) "" +Missing padding character From 02e553963718a5d4d0462c82a9994f147516a007 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 22 Apr 2020 10:13:25 +0200 Subject: [PATCH 220/338] printf: Unify error case There were a couple of places using efree() on result, which works, but is very fishy. Unify error handling with goto. --- ext/standard/formatted_print.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c index 52c7cc94d2eb4..1385edf52d193 100644 --- a/ext/standard/formatted_print.c +++ b/ext/standard/formatted_print.c @@ -447,9 +447,8 @@ php_formatted_print(char *format, size_t format_len, zval *args, int argc, int n argnum = php_sprintf_getnumber(&format, &format_len); if (argnum <= 0) { - zend_string_efree(result); zend_value_error("Argument number must be greater than zero"); - return NULL; + goto fail; } argnum--; format++; /* skip the '$' */ @@ -477,8 +476,7 @@ php_formatted_print(char *format, size_t format_len, zval *args, int argc, int n padding = *format; } else { zend_value_error("Missing padding character"); - zend_string_efree(result); - return NULL; + goto fail; } } else { PRINTF_DEBUG(("sprintf: end of modifiers\n")); @@ -494,9 +492,8 @@ php_formatted_print(char *format, size_t format_len, zval *args, int argc, int n if (isdigit((int)*format)) { PRINTF_DEBUG(("sprintf: getting width\n")); if ((width = php_sprintf_getnumber(&format, &format_len)) < 0) { - efree(result); zend_value_error("Width must be greater than zero and less than %d", INT_MAX); - return NULL; + goto fail; } adjusting |= ADJ_WIDTH; } else { @@ -511,9 +508,8 @@ php_formatted_print(char *format, size_t format_len, zval *args, int argc, int n PRINTF_DEBUG(("sprintf: getting precision\n")); if (isdigit((int)*format)) { if ((precision = php_sprintf_getnumber(&format, &format_len)) < 0) { - efree(result); zend_value_error("Precision must be greater than zero and less than %d", INT_MAX); - return NULL; + goto fail; } adjusting |= ADJ_PRECISION; expprec = 1; @@ -633,13 +629,12 @@ php_formatted_print(char *format, size_t format_len, zval *args, int argc, int n } if (max_missing_argnum >= 0) { - efree(result); if (nb_additional_parameters == -1) { zend_value_error("The arguments array must contain %d items, %d given", max_missing_argnum + 1, argc); } else { zend_argument_count_error("%d parameters are required, %d given", max_missing_argnum + nb_additional_parameters + 1, argc + nb_additional_parameters); } - return NULL; + goto fail; } exit: @@ -647,6 +642,10 @@ php_formatted_print(char *format, size_t format_len, zval *args, int argc, int n ZSTR_VAL(result)[outpos]=0; ZSTR_LEN(result) = outpos; return result; + +fail: + zend_string_efree(result); + return NULL; } /* }}} */ From 6ef0d470bfe3c6f45ff34241d8964a73f494acc5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 22 Apr 2020 11:02:55 +0200 Subject: [PATCH 221/338] Remove some redundant sprintf variation tests Add a single test that feeds different data types into the relevant format specifiers, and remove tests that test full matrices of different types with different formats and modifiers. We're just interested in how the types are going to be interpreted, the behavior of all the modifiers is going to stay the same. --- .../tests/strings/sprintf_variation11.phpt | 79 ---- .../tests/strings/sprintf_variation12.phpt | 263 ----------- .../tests/strings/sprintf_variation13.phpt | 358 --------------- .../tests/strings/sprintf_variation14.phpt | 102 ----- .../tests/strings/sprintf_variation16.phpt | 278 ------------ .../tests/strings/sprintf_variation17.phpt | 78 ---- .../tests/strings/sprintf_variation18.phpt | 422 ------------------ .../tests/strings/sprintf_variation19.phpt | 326 -------------- .../tests/strings/sprintf_variation20.phpt | 102 ----- .../tests/strings/sprintf_variation21.phpt | Bin 5041 -> 0 bytes .../tests/strings/sprintf_variation22.phpt | Bin 2513 -> 0 bytes .../tests/strings/sprintf_variation23.phpt | 76 ---- .../tests/strings/sprintf_variation24.phpt | Bin 3458 -> 0 bytes .../tests/strings/sprintf_variation25.phpt | Bin 4651 -> 0 bytes .../tests/strings/sprintf_variation26.phpt | Bin 1693 -> 0 bytes .../tests/strings/sprintf_variation29.phpt | 172 ------- .../strings/sprintf_variation29_64bit.phpt | 168 ------- .../tests/strings/sprintf_variation30.phpt | 78 ---- .../tests/strings/sprintf_variation31.phpt | 246 ---------- .../tests/strings/sprintf_variation32.phpt | 342 -------------- .../tests/strings/sprintf_variation33.phpt | 102 ----- .../tests/strings/sprintf_variation35.phpt | 237 ---------- .../strings/sprintf_variation35_64bit.phpt | 233 ---------- .../tests/strings/sprintf_variation36.phpt | 76 ---- .../tests/strings/sprintf_variation37.phpt | 230 ---------- .../tests/strings/sprintf_variation38.phpt | 326 -------------- .../tests/strings/sprintf_variation39.phpt | 102 ----- .../tests/strings/sprintf_variation4.phpt | 237 ---------- .../tests/strings/sprintf_variation41.phpt | 316 ------------- .../strings/sprintf_variation41_64bit.phpt | 312 ------------- .../tests/strings/sprintf_variation42.phpt | 79 ---- .../tests/strings/sprintf_variation43.phpt | 262 ----------- .../tests/strings/sprintf_variation44.phpt | 365 --------------- .../strings/sprintf_variation44_64bit.phpt | 361 --------------- .../tests/strings/sprintf_variation45.phpt | 102 ----- .../tests/strings/sprintf_variation48.phpt | 76 ---- .../tests/strings/sprintf_variation49.phpt | 278 ------------ .../strings/sprintf_variation4_64bit.phpt | 233 ---------- .../tests/strings/sprintf_variation5.phpt | 73 --- .../tests/strings/sprintf_variation50.phpt | 343 -------------- .../tests/strings/sprintf_variation51.phpt | 102 ----- .../tests/strings/sprintf_variation54.phpt | Bin 0 -> 2252 bytes .../tests/strings/sprintf_variation6.phpt | 278 ------------ .../tests/strings/sprintf_variation7.phpt | 102 ----- .../tests/strings/sprintf_variation8.phpt | 374 ---------------- 45 files changed, 8289 deletions(-) delete mode 100644 ext/standard/tests/strings/sprintf_variation11.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation12.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation13.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation14.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation16.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation17.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation18.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation19.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation20.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation21.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation22.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation23.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation24.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation25.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation26.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation29.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation29_64bit.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation30.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation31.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation32.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation33.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation35.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation35_64bit.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation36.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation37.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation38.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation39.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation4.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation41.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation41_64bit.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation42.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation43.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation44.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation44_64bit.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation45.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation48.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation49.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation4_64bit.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation5.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation50.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation51.phpt create mode 100644 ext/standard/tests/strings/sprintf_variation54.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation6.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation7.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation8.phpt diff --git a/ext/standard/tests/strings/sprintf_variation11.phpt b/ext/standard/tests/strings/sprintf_variation11.phpt deleted file mode 100644 index d3de553580c63..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation11.phpt +++ /dev/null @@ -1,79 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - float formats with resource values ---FILE-- - ---EXPECTF-- -*** Testing sprintf() : float formats with resource values *** - --- Iteration 1 -- -string(%d) "%d.000000" -string(1) "f" -string(%d) "%d.000000" -string(1) "f" -string(%d) " %d.000000" -string(%d) "%d.000000 " -string(%d) " %d.000000" -string(%d) " -%d.000000" -string(%d) "%d.000000" -string(30) "%s%d.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 2 -- -string(%d) "%d.000000" -string(1) "f" -string(%d) "%d.000000" -string(1) "f" -string(%d) " %d.000000" -string(%d) "%d.000000 " -string(%d) " %d.000000" -string(%d) " -%d.000000" -string(%d) "%d.000000" -string(30) "%s%d.000000" -string(4) "0-9]" -string(1) "f" -Done diff --git a/ext/standard/tests/strings/sprintf_variation12.phpt b/ext/standard/tests/strings/sprintf_variation12.phpt deleted file mode 100644 index 6657ff9cca6be..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation12.phpt +++ /dev/null @@ -1,263 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - float formats with arrays ---FILE-- - "One", "two" => 2) -); - -// various float formats -$float_formats = array( - "%f", "%hf", "%lf", - "%Lf", " %f", "%f ", - "\t%f", "\n%f", "%4f", - "%30f", "%[0-9]", "%*f" -); - -$count = 1; -foreach($array_values as $array_value) { - echo "\n-- Iteration $count --\n"; - - foreach($float_formats as $format) { - // with two arguments - var_dump( sprintf($format, $array_value) ); - } - $count++; -}; - -echo "Done"; -?> ---EXPECT-- -*** Testing sprintf() : float formats with arrays *** - --- Iteration 1 -- -string(8) "0.000000" -string(1) "f" -string(8) "0.000000" -string(1) "f" -string(9) " 0.000000" -string(9) "0.000000 " -string(9) " 0.000000" -string(9) " -0.000000" -string(8) "0.000000" -string(30) " 0.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 2 -- -string(8) "1.000000" -string(1) "f" -string(8) "1.000000" -string(1) "f" -string(9) " 1.000000" -string(9) "1.000000 " -string(9) " 1.000000" -string(9) " -1.000000" -string(8) "1.000000" -string(30) " 1.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 3 -- -string(8) "1.000000" -string(1) "f" -string(8) "1.000000" -string(1) "f" -string(9) " 1.000000" -string(9) "1.000000 " -string(9) " 1.000000" -string(9) " -1.000000" -string(8) "1.000000" -string(30) " 1.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 4 -- -string(8) "1.000000" -string(1) "f" -string(8) "1.000000" -string(1) "f" -string(9) " 1.000000" -string(9) "1.000000 " -string(9) " 1.000000" -string(9) " -1.000000" -string(8) "1.000000" -string(30) " 1.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 5 -- -string(8) "1.000000" -string(1) "f" -string(8) "1.000000" -string(1) "f" -string(9) " 1.000000" -string(9) "1.000000 " -string(9) " 1.000000" -string(9) " -1.000000" -string(8) "1.000000" -string(30) " 1.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 6 -- -string(8) "1.000000" -string(1) "f" -string(8) "1.000000" -string(1) "f" -string(9) " 1.000000" -string(9) "1.000000 " -string(9) " 1.000000" -string(9) " -1.000000" -string(8) "1.000000" -string(30) " 1.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 7 -- -string(8) "1.000000" -string(1) "f" -string(8) "1.000000" -string(1) "f" -string(9) " 1.000000" -string(9) "1.000000 " -string(9) " 1.000000" -string(9) " -1.000000" -string(8) "1.000000" -string(30) " 1.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 8 -- -string(8) "1.000000" -string(1) "f" -string(8) "1.000000" -string(1) "f" -string(9) " 1.000000" -string(9) "1.000000 " -string(9) " 1.000000" -string(9) " -1.000000" -string(8) "1.000000" -string(30) " 1.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 9 -- -string(8) "1.000000" -string(1) "f" -string(8) "1.000000" -string(1) "f" -string(9) " 1.000000" -string(9) "1.000000 " -string(9) " 1.000000" -string(9) " -1.000000" -string(8) "1.000000" -string(30) " 1.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 10 -- -string(8) "1.000000" -string(1) "f" -string(8) "1.000000" -string(1) "f" -string(9) " 1.000000" -string(9) "1.000000 " -string(9) " 1.000000" -string(9) " -1.000000" -string(8) "1.000000" -string(30) " 1.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 11 -- -string(8) "1.000000" -string(1) "f" -string(8) "1.000000" -string(1) "f" -string(9) " 1.000000" -string(9) "1.000000 " -string(9) " 1.000000" -string(9) " -1.000000" -string(8) "1.000000" -string(30) " 1.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 12 -- -string(8) "1.000000" -string(1) "f" -string(8) "1.000000" -string(1) "f" -string(9) " 1.000000" -string(9) "1.000000 " -string(9) " 1.000000" -string(9) " -1.000000" -string(8) "1.000000" -string(30) " 1.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 13 -- -string(8) "1.000000" -string(1) "f" -string(8) "1.000000" -string(1) "f" -string(9) " 1.000000" -string(9) "1.000000 " -string(9) " 1.000000" -string(9) " -1.000000" -string(8) "1.000000" -string(30) " 1.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 14 -- -string(8) "1.000000" -string(1) "f" -string(8) "1.000000" -string(1) "f" -string(9) " 1.000000" -string(9) "1.000000 " -string(9) " 1.000000" -string(9) " -1.000000" -string(8) "1.000000" -string(30) " 1.000000" -string(4) "0-9]" -string(1) "f" -Done diff --git a/ext/standard/tests/strings/sprintf_variation13.phpt b/ext/standard/tests/strings/sprintf_variation13.phpt deleted file mode 100644 index 10900c1438698..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation13.phpt +++ /dev/null @@ -1,358 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - float formats with strings ---FILE-- - ---EXPECT-- -*** Testing sprintf() : float formats with strings *** - --- Iteration 1 -- -string(8) "0.000000" -string(1) "f" -string(8) "0.000000" -string(1) "f" -string(9) " 0.000000" -string(9) "0.000000 " -string(9) " 0.000000" -string(9) " -0.000000" -string(8) "0.000000" -string(30) " 0.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 2 -- -string(8) "0.000000" -string(1) "f" -string(8) "0.000000" -string(1) "f" -string(9) " 0.000000" -string(9) "0.000000 " -string(9) " 0.000000" -string(9) " -0.000000" -string(8) "0.000000" -string(30) " 0.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 3 -- -string(8) "0.000000" -string(1) "f" -string(8) "0.000000" -string(1) "f" -string(9) " 0.000000" -string(9) "0.000000 " -string(9) " 0.000000" -string(9) " -0.000000" -string(8) "0.000000" -string(30) " 0.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 4 -- -string(8) "0.000000" -string(1) "f" -string(8) "0.000000" -string(1) "f" -string(9) " 0.000000" -string(9) "0.000000 " -string(9) " 0.000000" -string(9) " -0.000000" -string(8) "0.000000" -string(30) " 0.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 5 -- -string(8) "1.000000" -string(1) "f" -string(8) "1.000000" -string(1) "f" -string(9) " 1.000000" -string(9) "1.000000 " -string(9) " 1.000000" -string(9) " -1.000000" -string(8) "1.000000" -string(30) " 1.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 6 -- -string(8) "1.000000" -string(1) "f" -string(8) "1.000000" -string(1) "f" -string(9) " 1.000000" -string(9) "1.000000 " -string(9) " 1.000000" -string(9) " -1.000000" -string(8) "1.000000" -string(30) " 1.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 7 -- -string(8) "0.000000" -string(1) "f" -string(8) "0.000000" -string(1) "f" -string(9) " 0.000000" -string(9) "0.000000 " -string(9) " 0.000000" -string(9) " -0.000000" -string(8) "0.000000" -string(30) " 0.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 8 -- -string(8) "0.000000" -string(1) "f" -string(8) "0.000000" -string(1) "f" -string(9) " 0.000000" -string(9) "0.000000 " -string(9) " 0.000000" -string(9) " -0.000000" -string(8) "0.000000" -string(30) " 0.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 9 -- -string(8) "0.000000" -string(1) "f" -string(8) "0.000000" -string(1) "f" -string(9) " 0.000000" -string(9) "0.000000 " -string(9) " 0.000000" -string(9) " -0.000000" -string(8) "0.000000" -string(30) " 0.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 10 -- -string(8) "0.000000" -string(1) "f" -string(8) "0.000000" -string(1) "f" -string(9) " 0.000000" -string(9) "0.000000 " -string(9) " 0.000000" -string(9) " -0.000000" -string(8) "0.000000" -string(30) " 0.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 11 -- -string(8) "0.000000" -string(1) "f" -string(8) "0.000000" -string(1) "f" -string(9) " 0.000000" -string(9) "0.000000 " -string(9) " 0.000000" -string(9) " -0.000000" -string(8) "0.000000" -string(30) " 0.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 12 -- -string(8) "0.000000" -string(1) "f" -string(8) "0.000000" -string(1) "f" -string(9) " 0.000000" -string(9) "0.000000 " -string(9) " 0.000000" -string(9) " -0.000000" -string(8) "0.000000" -string(30) " 0.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 13 -- -string(8) "0.000000" -string(1) "f" -string(8) "0.000000" -string(1) "f" -string(9) " 0.000000" -string(9) "0.000000 " -string(9) " 0.000000" -string(9) " -0.000000" -string(8) "0.000000" -string(30) " 0.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 14 -- -string(8) "0.000000" -string(1) "f" -string(8) "0.000000" -string(1) "f" -string(9) " 0.000000" -string(9) "0.000000 " -string(9) " 0.000000" -string(9) " -0.000000" -string(8) "0.000000" -string(30) " 0.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 15 -- -string(8) "0.000000" -string(1) "f" -string(8) "0.000000" -string(1) "f" -string(9) " 0.000000" -string(9) "0.000000 " -string(9) " 0.000000" -string(9) " -0.000000" -string(8) "0.000000" -string(30) " 0.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 16 -- -string(8) "0.000000" -string(1) "f" -string(8) "0.000000" -string(1) "f" -string(9) " 0.000000" -string(9) "0.000000 " -string(9) " 0.000000" -string(9) " -0.000000" -string(8) "0.000000" -string(30) " 0.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 17 -- -string(8) "0.000000" -string(1) "f" -string(8) "0.000000" -string(1) "f" -string(9) " 0.000000" -string(9) "0.000000 " -string(9) " 0.000000" -string(9) " -0.000000" -string(8) "0.000000" -string(30) " 0.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 18 -- -string(8) "0.000000" -string(1) "f" -string(8) "0.000000" -string(1) "f" -string(9) " 0.000000" -string(9) "0.000000 " -string(9) " 0.000000" -string(9) " -0.000000" -string(8) "0.000000" -string(30) " 0.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 19 -- -string(10) "123.456000" -string(1) "f" -string(10) "123.456000" -string(1) "f" -string(11) " 123.456000" -string(11) "123.456000 " -string(11) " 123.456000" -string(11) " -123.456000" -string(10) "123.456000" -string(30) " 123.456000" -string(4) "0-9]" -string(1) "f" - --- Iteration 20 -- -string(10) "123.456000" -string(1) "f" -string(10) "123.456000" -string(1) "f" -string(11) " 123.456000" -string(11) "123.456000 " -string(11) " 123.456000" -string(11) " -123.456000" -string(10) "123.456000" -string(30) " 123.456000" -string(4) "0-9]" -string(1) "f" -Done diff --git a/ext/standard/tests/strings/sprintf_variation14.phpt b/ext/standard/tests/strings/sprintf_variation14.phpt deleted file mode 100644 index 49f4d5f12ab83..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation14.phpt +++ /dev/null @@ -1,102 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - float formats with boolean values ---FILE-- - ---EXPECT-- -*** Testing sprintf() : float formats with boolean values *** - --- Iteration 1 -- -string(8) "1.000000" -string(1) "f" -string(8) "1.000000" -string(1) "f" -string(9) " 1.000000" -string(9) "1.000000 " -string(9) " 1.000000" -string(9) " -1.000000" -string(8) "1.000000" -string(30) " 1.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 2 -- -string(8) "0.000000" -string(1) "f" -string(8) "0.000000" -string(1) "f" -string(9) " 0.000000" -string(9) "0.000000 " -string(9) " 0.000000" -string(9) " -0.000000" -string(8) "0.000000" -string(30) " 0.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 3 -- -string(8) "1.000000" -string(1) "f" -string(8) "1.000000" -string(1) "f" -string(9) " 1.000000" -string(9) "1.000000 " -string(9) " 1.000000" -string(9) " -1.000000" -string(8) "1.000000" -string(30) " 1.000000" -string(4) "0-9]" -string(1) "f" - --- Iteration 4 -- -string(8) "0.000000" -string(1) "f" -string(8) "0.000000" -string(1) "f" -string(9) " 0.000000" -string(9) "0.000000 " -string(9) " 0.000000" -string(9) " -0.000000" -string(8) "0.000000" -string(30) " 0.000000" -string(4) "0-9]" -string(1) "f" -Done diff --git a/ext/standard/tests/strings/sprintf_variation16.phpt b/ext/standard/tests/strings/sprintf_variation16.phpt deleted file mode 100644 index 40c0e87d149bf..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation16.phpt +++ /dev/null @@ -1,278 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - string formats with float values ---FILE-- - ---EXPECT-- -*** Testing sprintf() : string formats with float values *** - --- Iteration 1 -- -string(11) "-2147483649" -string(1) "s" -string(11) "-2147483649" -string(1) "s" -string(12) " -2147483649" -string(12) "-2147483649 " -string(12) " -2147483649" -string(12) " --2147483649" -string(11) "-2147483649" -string(30) " -2147483649" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 2 -- -string(10) "2147483648" -string(1) "s" -string(10) "2147483648" -string(1) "s" -string(11) " 2147483648" -string(11) "2147483648 " -string(11) " 2147483648" -string(11) " -2147483648" -string(10) "2147483648" -string(30) " 2147483648" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 3 -- -string(11) "-2147483649" -string(1) "s" -string(11) "-2147483649" -string(1) "s" -string(12) " -2147483649" -string(12) "-2147483649 " -string(12) " -2147483649" -string(12) " --2147483649" -string(11) "-2147483649" -string(30) " -2147483649" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 4 -- -string(11) "34359738369" -string(1) "s" -string(11) "34359738369" -string(1) "s" -string(12) " 34359738369" -string(12) "34359738369 " -string(12) " 34359738369" -string(12) " -34359738369" -string(11) "34359738369" -string(30) " 34359738369" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 5 -- -string(10) "2147483649" -string(1) "s" -string(10) "2147483649" -string(1) "s" -string(11) " 2147483649" -string(11) "2147483649 " -string(11) " 2147483649" -string(11) " -2147483649" -string(10) "2147483649" -string(30) " 2147483649" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 6 -- -string(11) "-2147483649" -string(1) "s" -string(11) "-2147483649" -string(1) "s" -string(12) " -2147483649" -string(12) "-2147483649 " -string(12) " -2147483649" -string(12) " --2147483649" -string(11) "-2147483649" -string(30) " -2147483649" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 7 -- -string(1) "0" -string(1) "s" -string(1) "0" -string(1) "s" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 8 -- -string(4) "-0.1" -string(1) "s" -string(4) "-0.1" -string(1) "s" -string(5) " -0.1" -string(5) "-0.1 " -string(5) " -0.1" -string(5) " --0.1" -string(4) "-0.1" -string(30) " -0.1" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 9 -- -string(1) "1" -string(1) "s" -string(1) "1" -string(1) "s" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 10 -- -string(4) "1000" -string(1) "s" -string(4) "1000" -string(1) "s" -string(5) " 1000" -string(5) "1000 " -string(5) " 1000" -string(5) " -1000" -string(4) "1000" -string(30) " 1000" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 11 -- -string(4) "-100" -string(1) "s" -string(4) "-100" -string(1) "s" -string(5) " -100" -string(5) "-100 " -string(5) " -100" -string(5) " --100" -string(4) "-100" -string(30) " -100" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 12 -- -string(9) "123456000" -string(1) "s" -string(9) "123456000" -string(1) "s" -string(10) " 123456000" -string(10) "123456000 " -string(10) " 123456000" -string(10) " -123456000" -string(9) "123456000" -string(30) " 123456000" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 13 -- -string(11) "-1234567000" -string(1) "s" -string(11) "-1234567000" -string(1) "s" -string(12) " -1234567000" -string(12) "-1234567000 " -string(12) " -1234567000" -string(12) " --1234567000" -string(11) "-1234567000" -string(30) " -1234567000" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 14 -- -string(2) "10" -string(1) "s" -string(2) "10" -string(1) "s" -string(3) " 10" -string(3) "10 " -string(3) " 10" -string(3) " -10" -string(4) " 10" -string(30) " 10" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 15 -- -string(7) "1012300" -string(1) "s" -string(7) "1012300" -string(1) "s" -string(8) " 1012300" -string(8) "1012300 " -string(8) " 1012300" -string(8) " -1012300" -string(7) "1012300" -string(30) " 1012300" -string(10) "a-zA-Z0-9]" -string(1) "s" -Done diff --git a/ext/standard/tests/strings/sprintf_variation17.phpt b/ext/standard/tests/strings/sprintf_variation17.phpt deleted file mode 100644 index ac040faeaf9ab..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation17.phpt +++ /dev/null @@ -1,78 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - string formats with resource values ---FILE-- - ---EXPECTF-- -*** Testing sprintf() : string formats with resource values *** - --- Iteration 1 -- -string(%d) "Resource id #%d" -string(1) "s" -string(%d) "Resource id #%d" -string(1) "s" -string(%d) " Resource id #%d" -string(%d) "Resource id #%d " -string(%d) " Resource id #%d" -string(%d) " -Resource id #%d" -string(%d) "Resource id #%d" -string(30) "%sResource id #%d" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 2 -- -string(%d) "Resource id #%d" -string(1) "s" -string(%d) "Resource id #%d" -string(1) "s" -string(%d) " Resource id #%d" -string(%d) "Resource id #%d " -string(%d) " Resource id #%d" -string(%d) " -Resource id #%d" -string(%d) "Resource id #%d" -string(30) "%sResource id #%d" -string(10) "a-zA-Z0-9]" -string(1) "s" -Done diff --git a/ext/standard/tests/strings/sprintf_variation18.phpt b/ext/standard/tests/strings/sprintf_variation18.phpt deleted file mode 100644 index 74547cf53ef88..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation18.phpt +++ /dev/null @@ -1,422 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - string formats with array values ---FILE-- - "One", "two" => 2) -); - -// array of string formats -$string_formats = array( - "%s", "%hs", "%ls", - "%Ls"," %s", "%s ", - "\t%s", "\n%s", "%4s", - "%30s", "%[a-zA-Z0-9]", "%*s" -); - -$count = 1; -foreach($array_values as $array_value) { - echo "\n-- Iteration $count --\n"; - - foreach($string_formats as $format) { - var_dump( sprintf($format, $array_value) ); - } - $count++; -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing sprintf() : string formats with array values *** - --- Iteration 1 -- - -Warning: Array to string conversion in %s on line %d -string(5) "Array" -string(1) "s" - -Warning: Array to string conversion in %s on line %d -string(5) "Array" -string(1) "s" - -Warning: Array to string conversion in %s on line %d -string(6) " Array" - -Warning: Array to string conversion in %s on line %d -string(6) "Array " - -Warning: Array to string conversion in %s on line %d -string(6) " Array" - -Warning: Array to string conversion in %s on line %d -string(6) " -Array" - -Warning: Array to string conversion in %s on line %d -string(5) "Array" - -Warning: Array to string conversion in %s on line %d -string(30) " Array" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 2 -- - -Warning: Array to string conversion in %s on line %d -string(5) "Array" -string(1) "s" - -Warning: Array to string conversion in %s on line %d -string(5) "Array" -string(1) "s" - -Warning: Array to string conversion in %s on line %d -string(6) " Array" - -Warning: Array to string conversion in %s on line %d -string(6) "Array " - -Warning: Array to string conversion in %s on line %d -string(6) " Array" - -Warning: Array to string conversion in %s on line %d -string(6) " -Array" - -Warning: Array to string conversion in %s on line %d -string(5) "Array" - -Warning: Array to string conversion in %s on line %d -string(30) " Array" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 3 -- - -Warning: Array to string conversion in %s on line %d -string(5) "Array" -string(1) "s" - -Warning: Array to string conversion in %s on line %d -string(5) "Array" -string(1) "s" - -Warning: Array to string conversion in %s on line %d -string(6) " Array" - -Warning: Array to string conversion in %s on line %d -string(6) "Array " - -Warning: Array to string conversion in %s on line %d -string(6) " Array" - -Warning: Array to string conversion in %s on line %d -string(6) " -Array" - -Warning: Array to string conversion in %s on line %d -string(5) "Array" - -Warning: Array to string conversion in %s on line %d -string(30) " Array" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 4 -- - -Warning: Array to string conversion in %s on line %d -string(5) "Array" -string(1) "s" - -Warning: Array to string conversion in %s on line %d -string(5) "Array" -string(1) "s" - -Warning: Array to string conversion in %s on line %d -string(6) " Array" - -Warning: Array to string conversion in %s on line %d -string(6) "Array " - -Warning: Array to string conversion in %s on line %d -string(6) " Array" - -Warning: Array to string conversion in %s on line %d -string(6) " -Array" - -Warning: Array to string conversion in %s on line %d -string(5) "Array" - -Warning: Array to string conversion in %s on line %d -string(30) " Array" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 5 -- - -Warning: Array to string conversion in %s on line %d -string(5) "Array" -string(1) "s" - -Warning: Array to string conversion in %s on line %d -string(5) "Array" -string(1) "s" - -Warning: Array to string conversion in %s on line %d -string(6) " Array" - -Warning: Array to string conversion in %s on line %d -string(6) "Array " - -Warning: Array to string conversion in %s on line %d -string(6) " Array" - -Warning: Array to string conversion in %s on line %d -string(6) " -Array" - -Warning: Array to string conversion in %s on line %d -string(5) "Array" - -Warning: Array to string conversion in %s on line %d -string(30) " Array" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 6 -- - -Warning: Array to string conversion in %s on line %d -string(5) "Array" -string(1) "s" - -Warning: Array to string conversion in %s on line %d -string(5) "Array" -string(1) "s" - -Warning: Array to string conversion in %s on line %d -string(6) " Array" - -Warning: Array to string conversion in %s on line %d -string(6) "Array " - -Warning: Array to string conversion in %s on line %d -string(6) " Array" - -Warning: Array to string conversion in %s on line %d -string(6) " -Array" - -Warning: Array to string conversion in %s on line %d -string(5) "Array" - -Warning: Array to string conversion in %s on line %d -string(30) " Array" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 7 -- - -Warning: Array to string conversion in %s on line %d -string(5) "Array" -string(1) "s" - -Warning: Array to string conversion in %s on line %d -string(5) "Array" -string(1) "s" - -Warning: Array to string conversion in %s on line %d -string(6) " Array" - -Warning: Array to string conversion in %s on line %d -string(6) "Array " - -Warning: Array to string conversion in %s on line %d -string(6) " Array" - -Warning: Array to string conversion in %s on line %d -string(6) " -Array" - -Warning: Array to string conversion in %s on line %d -string(5) "Array" - -Warning: Array to string conversion in %s on line %d -string(30) " Array" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 8 -- - -Warning: Array to string conversion in %s on line %d -string(5) "Array" -string(1) "s" - -Warning: Array to string conversion in %s on line %d -string(5) "Array" -string(1) "s" - -Warning: Array to string conversion in %s on line %d -string(6) " Array" - -Warning: Array to string conversion in %s on line %d -string(6) "Array " - -Warning: Array to string conversion in %s on line %d -string(6) " Array" - -Warning: Array to string conversion in %s on line %d -string(6) " -Array" - -Warning: Array to string conversion in %s on line %d -string(5) "Array" - -Warning: Array to string conversion in %s on line %d -string(30) " Array" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 9 -- - -Warning: Array to string conversion in %s on line %d -string(5) "Array" -string(1) "s" - -Warning: Array to string conversion in %s on line %d -string(5) "Array" -string(1) "s" - -Warning: Array to string conversion in %s on line %d -string(6) " Array" - -Warning: Array to string conversion in %s on line %d -string(6) "Array " - -Warning: Array to string conversion in %s on line %d -string(6) " Array" - -Warning: Array to string conversion in %s on line %d -string(6) " -Array" - -Warning: Array to string conversion in %s on line %d -string(5) "Array" - -Warning: Array to string conversion in %s on line %d -string(30) " Array" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 10 -- - -Warning: Array to string conversion in %s on line %d -string(5) "Array" -string(1) "s" - -Warning: Array to string conversion in %s on line %d -string(5) "Array" -string(1) "s" - -Warning: Array to string conversion in %s on line %d -string(6) " Array" - -Warning: Array to string conversion in %s on line %d -string(6) "Array " - -Warning: Array to string conversion in %s on line %d -string(6) " Array" - -Warning: Array to string conversion in %s on line %d -string(6) " -Array" - -Warning: Array to string conversion in %s on line %d -string(5) "Array" - -Warning: Array to string conversion in %s on line %d -string(30) " Array" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 11 -- - -Warning: Array to string conversion in %s on line %d -string(5) "Array" -string(1) "s" - -Warning: Array to string conversion in %s on line %d -string(5) "Array" -string(1) "s" - -Warning: Array to string conversion in %s on line %d -string(6) " Array" - -Warning: Array to string conversion in %s on line %d -string(6) "Array " - -Warning: Array to string conversion in %s on line %d -string(6) " Array" - -Warning: Array to string conversion in %s on line %d -string(6) " -Array" - -Warning: Array to string conversion in %s on line %d -string(5) "Array" - -Warning: Array to string conversion in %s on line %d -string(30) " Array" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 12 -- - -Warning: Array to string conversion in %s on line %d -string(5) "Array" -string(1) "s" - -Warning: Array to string conversion in %s on line %d -string(5) "Array" -string(1) "s" - -Warning: Array to string conversion in %s on line %d -string(6) " Array" - -Warning: Array to string conversion in %s on line %d -string(6) "Array " - -Warning: Array to string conversion in %s on line %d -string(6) " Array" - -Warning: Array to string conversion in %s on line %d -string(6) " -Array" - -Warning: Array to string conversion in %s on line %d -string(5) "Array" - -Warning: Array to string conversion in %s on line %d -string(30) " Array" -string(10) "a-zA-Z0-9]" -string(1) "s" -Done diff --git a/ext/standard/tests/strings/sprintf_variation19.phpt b/ext/standard/tests/strings/sprintf_variation19.phpt deleted file mode 100644 index ede367bbff40a..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation19.phpt +++ /dev/null @@ -1,326 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - string formats with integer values ---FILE-- - ---EXPECT-- -*** Testing sprintf() : string formats with integer values *** - --- Iteration 1 -- -string(1) "0" -string(1) "s" -string(1) "0" -string(1) "s" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 2 -- -string(1) "1" -string(1) "s" -string(1) "1" -string(1) "s" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 3 -- -string(2) "-1" -string(1) "s" -string(2) "-1" -string(1) "s" -string(3) " -1" -string(3) "-1 " -string(3) " -1" -string(3) " --1" -string(4) " -1" -string(30) " -1" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 4 -- -string(11) "-2147483648" -string(1) "s" -string(11) "-2147483648" -string(1) "s" -string(12) " -2147483648" -string(12) "-2147483648 " -string(12) " -2147483648" -string(12) " --2147483648" -string(11) "-2147483648" -string(30) " -2147483648" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 5 -- -string(11) "-2147483647" -string(1) "s" -string(11) "-2147483647" -string(1) "s" -string(12) " -2147483647" -string(12) "-2147483647 " -string(12) " -2147483647" -string(12) " --2147483647" -string(11) "-2147483647" -string(30) " -2147483647" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 6 -- -string(10) "2147483647" -string(1) "s" -string(10) "2147483647" -string(1) "s" -string(11) " 2147483647" -string(11) "2147483647 " -string(11) " 2147483647" -string(11) " -2147483647" -string(10) "2147483647" -string(30) " 2147483647" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 7 -- -string(10) "2147483640" -string(1) "s" -string(10) "2147483640" -string(1) "s" -string(11) " 2147483640" -string(11) "2147483640 " -string(11) " 2147483640" -string(11) " -2147483640" -string(10) "2147483640" -string(30) " 2147483640" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 8 -- -string(4) "4667" -string(1) "s" -string(4) "4667" -string(1) "s" -string(5) " 4667" -string(5) "4667 " -string(5) " 4667" -string(5) " -4667" -string(4) "4667" -string(30) " 4667" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 9 -- -string(4) "4779" -string(1) "s" -string(4) "4779" -string(1) "s" -string(5) " 4779" -string(5) "4779 " -string(5) " 4779" -string(5) " -4779" -string(4) "4779" -string(30) " 4779" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 10 -- -string(4) "4095" -string(1) "s" -string(4) "4095" -string(1) "s" -string(5) " 4095" -string(5) "4095 " -string(5) " 4095" -string(5) " -4095" -string(4) "4095" -string(30) " 4095" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 11 -- -string(3) "250" -string(1) "s" -string(3) "250" -string(1) "s" -string(4) " 250" -string(4) "250 " -string(4) " 250" -string(4) " -250" -string(4) " 250" -string(30) " 250" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 12 -- -string(11) "-2147483648" -string(1) "s" -string(11) "-2147483648" -string(1) "s" -string(12) " -2147483648" -string(12) "-2147483648 " -string(12) " -2147483648" -string(12) " --2147483648" -string(11) "-2147483648" -string(30) " -2147483648" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 13 -- -string(10) "2147483647" -string(1) "s" -string(10) "2147483647" -string(1) "s" -string(11) " 2147483647" -string(11) "2147483647 " -string(11) " 2147483647" -string(11) " -2147483647" -string(10) "2147483647" -string(30) " 2147483647" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 14 -- -string(10) "2147483647" -string(1) "s" -string(10) "2147483647" -string(1) "s" -string(11) " 2147483647" -string(11) "2147483647 " -string(11) " 2147483647" -string(11) " -2147483647" -string(10) "2147483647" -string(30) " 2147483647" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 15 -- -string(2) "83" -string(1) "s" -string(2) "83" -string(1) "s" -string(3) " 83" -string(3) "83 " -string(3) " 83" -string(3) " -83" -string(4) " 83" -string(30) " 83" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 16 -- -string(1) "1" -string(1) "s" -string(1) "1" -string(1) "s" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 17 -- -string(11) "-2147483648" -string(1) "s" -string(11) "-2147483648" -string(1) "s" -string(12) " -2147483648" -string(12) "-2147483648 " -string(12) " -2147483648" -string(12) " --2147483648" -string(11) "-2147483648" -string(30) " -2147483648" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 18 -- -string(10) "2147483647" -string(1) "s" -string(10) "2147483647" -string(1) "s" -string(11) " 2147483647" -string(11) "2147483647 " -string(11) " 2147483647" -string(11) " -2147483647" -string(10) "2147483647" -string(30) " 2147483647" -string(10) "a-zA-Z0-9]" -string(1) "s" -Done diff --git a/ext/standard/tests/strings/sprintf_variation20.phpt b/ext/standard/tests/strings/sprintf_variation20.phpt deleted file mode 100644 index a110311127e57..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation20.phpt +++ /dev/null @@ -1,102 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - string formats with boolean values ---FILE-- - ---EXPECT-- -*** Testing sprintf() : string formats with boolean values *** - --- Iteration 1 -- -string(1) "1" -string(1) "s" -string(1) "1" -string(1) "s" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 2 -- -string(0) "" -string(1) "s" -string(0) "" -string(1) "s" -string(1) " " -string(1) " " -string(1) " " -string(1) " -" -string(4) " " -string(30) " " -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 3 -- -string(1) "1" -string(1) "s" -string(1) "1" -string(1) "s" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(10) "a-zA-Z0-9]" -string(1) "s" - --- Iteration 4 -- -string(0) "" -string(1) "s" -string(0) "" -string(1) "s" -string(1) " " -string(1) " " -string(1) " " -string(1) " -" -string(4) " " -string(30) " " -string(10) "a-zA-Z0-9]" -string(1) "s" -Done diff --git a/ext/standard/tests/strings/sprintf_variation21.phpt b/ext/standard/tests/strings/sprintf_variation21.phpt deleted file mode 100644 index 30c0527277d79ac5b6f72d9d856091fcb41482ab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5041 zcmds)U2oGo6vxLU{uD={Lv3l+rYm%;@bJ1xNL(Pc3nVs8Uh1}y)}&8fpa}7a_=1QV zILA)w*qZ~@b5ZSyv}XVO?c?){eeBlvPmfMceV?6*EQf57MsYrAwqR1kVICzh972)t zsen&BjW|8Yz=v?gQ$8(xbnOrr&*a|rK6UZgSb zGNBwhs({q;Bq`ERK$wihA&6z(&2k=(c{=W@!Lap(gx(8TyUUmeX9;-ib{pu0RFiCB z-hbi-?06P?BgVR2;AzUgKr*r4O{08Q7wTQXQ`NG`0D2w#2)R14&XuS`U$wd8g{DSU&Z+XyDmpk@2ipm zDsUClK&6lhTg3v}t1iaHe9>I*FlB?zwZSoOfN%Jx27B;e#J(Yl%I9?w3oPbm|KNUh z^x@snE7~ak%ih2+Pz5jmjHmXhX3zp}$EzxQtAFA3u^;G;BzIulljL2~Wm;Yzv*M9i zo#|>an3_q_w@B`+GoUagiOZ8D+9Y|$A~9X2C5_@#8EE033O%j(UNwi6F z3#)5rk^HEs6PG7Rv`O-ZRVSv)w4_pSs*UR8z#B^t71L!} z(hGB{&1S_u=67mPT%JVHCdn-vDZ&5eoDb}S{ubAYebS%QEHIZR7nn9lo>;YFx=c$d z2dCPsR_vo*fA^p`<__laB#JgkZsAKyV4wB6dat9nJc*)BlG`YI`>?-FwL(8f*>CyD Bk>daW diff --git a/ext/standard/tests/strings/sprintf_variation22.phpt b/ext/standard/tests/strings/sprintf_variation22.phpt deleted file mode 100644 index e12da7f75fe3fbd5fd683b4ba58e10b8fc1acbfa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2513 zcmds2+iu!G5G9YJ6C1z9*M~4?Tz@Hs|o2 zi6z5G1Qfgl6EF+Jn#l-$Ead`btAI&$X%+K`Q2P1&VxUCdoQ8{#v~9Q)fehqr$UzB4 zQe~MZ$u_WR^x(P$>*WofLY0ZRn?lEN#^VM78_sy-iDihz^xzAZvG9Ry%8}}!5yYEU zK`cBDUNGf7;5V`zN#;+Pn6^zab$g;MJ07vygm7;WfMwe@U^}u!HdNi)U4wcy@~u80 z?KUtW*ewLJd|#@%OB2&2cx!Ie2|&l`wA4X6j*F*jpv${D>hfb99h?|Ac&%Z_>GEcm zGzuBBRgx;A$f9feDYK35@&=arAWmuww+S8U6Nw zetiF;`f{v=ZO_uBRlOkgr84XGiK>G$Z&A>g6~I? diff --git a/ext/standard/tests/strings/sprintf_variation23.phpt b/ext/standard/tests/strings/sprintf_variation23.phpt deleted file mode 100644 index b35d5cc849379..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation23.phpt +++ /dev/null @@ -1,76 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - char formats with resource values ---FILE-- - ---EXPECTF-- -*** Testing sprintf() : char formats with resource values *** - --- Iteration 1 -- -string(1) "%a" -string(1) "c" -string(1) "%a" -string(1) "c" -string(2) " %a" -string(2) "%a " -string(2) " %a" -string(2) " -%a" -string(1) "%a" -string(1) "%a" -string(11) "a-bA-B@#$&]" -string(1) "c" - --- Iteration 2 -- -string(1) "%a" -string(1) "%a" -string(1) "%a" -string(1) "c" -string(2) " %a" -string(2) "%a " -string(2) " %a" -string(2) " -%a" -string(1) "%a" -string(1) "%a" -string(11) "a-bA-B@#$&]" -string(1) "c" diff --git a/ext/standard/tests/strings/sprintf_variation24.phpt b/ext/standard/tests/strings/sprintf_variation24.phpt deleted file mode 100644 index e3324ce417849b77861e0137ab7be9aa83a9a860..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3458 zcmds3U2obj6m1{pUvcHZMA8@turFBKbt{!Bp{*)Znp6<-f+>+8L5{Pwn)=^&jnm*T zb=vmUJfQga+UMSLd@aM+s6QMrMn)o0kgR1Gsd>$Tc^U;Oj3ekmn(!L|Ke!CJo=Jc~ zu;3Erv0QPLz-_1&z@_B(xM-P*gfMn?KIkLqhvW5PO&Ts-$XLbdek}kA6NOoB@?;sT z7(Tf6U=`kp8C1Bu@wc#EuTLfp0T)h163B3^i|N9pP^pZ7XXPl|XbAPnVVuf9KoHMF z7sQ=vB#K8fE@uss3|CJ#lIsC+8-$2p5d(Ey7qlIAkq*}VXVrk)#u4oi(r9FM#Pgyr zs0dw}8kgYE1ZxDcf#c=FrZx7h@t3Q?z=Bb_Tw0JC<foS99?)M?&1sD0_sH=PUbFtUi~eVQd;h;>3DQ{Nd_XqSMm667x<_q< zZvI8Ah5KN;QNumRcWU^e7$sZydrm8+gZ2sA#b9YgC9NGL`*{VLrl{np*ha}VsNw#O zl46u>q0aIo`X?pr(kSVaM#<~aD0x#FC2vck7d&mP)Y_OP!O!7>#1qA2Gh`UlO5 z!I^UjQ(rE*3gEk|<`5{oa;Ci&p$G`2SJ%C+j(T>!ny*OHh8yWCUp=e@=!miNX15rY zFd*F5Vd<{L1WH`aSOOc3#%NR{V8f*d9OJZXw0+*6M zfIr=cjVn{a+{Osu9r{%XfMwP7cco&!trmh7B8G?|8m?Qh!92ybttqxta35sxISOJa z847&5y6E-07mluhi$#UhGQ!f;ASHvwo0dq+DmzvktnwUx z7W&5sEcYS|G3x-DhYAftFD6bm{wFOAaL?)23;OZH^U{k^6xepGD7BK~hn~_EWgVjP z5ZswpGu7q+>{x2>L+65LKJ+MsYb9jV#U#q$~Ox+_7E<$wC7UV7t=5XS*y(;QpQ|&XDO-PA8*N+f{O07$ql#QF2-sB`-5d z4!8YnnsoP`iC$9>ldmotCV5C=2>y(JS)ziXW2=g42S(mpT|9oslu|OJ}+G(ERTC4Qi?O{ M+5bH3&A(Cd6MxCeJ^%m! diff --git a/ext/standard/tests/strings/sprintf_variation26.phpt b/ext/standard/tests/strings/sprintf_variation26.phpt deleted file mode 100644 index b6e52fe94855f73e6e252274ef7ec115dbb74623..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1693 zcmd5*U2obj6m1{pUvZU%iKLj6wokCF>sBgN;-M-`np6;SjUkaBjvQxeHTA#mIu7Im zp>Ep4_7Ek<*FN{0;~PpR!|{YtG7+hUG*MBkmu(N0S+2_6`IyrQ2!y>;Ksa$=u5xipu{EY@hKHz24( zFdnv>ZdnTTB@ce08k_qxrW9_qQ2C@m!AGgh6m!{<)~p&zYuj>x8P@qC+a&GXh!q<; zd(AOYfERphvy+nndBK#eo@*Hkyv@sxIMBmycf&8{Px+hSAV^d(*aPIV!`kk7;2b+u zgsJ{U?F`RBdC_u^hZw48%`>T>^V79%bk=(1OLIDTr`~2^ZCE;#Qb^W7azIbF#rGn diff --git a/ext/standard/tests/strings/sprintf_variation29.phpt b/ext/standard/tests/strings/sprintf_variation29.phpt deleted file mode 100644 index abb82415ccc0b..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation29.phpt +++ /dev/null @@ -1,172 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - octal formats with float values ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing sprintf() : octal formats with float values *** - --- Iteration 1 -- -string(1) "0" -string(1) "o" -string(1) "0" -string(1) "o" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-7]" -string(1) "o" - --- Iteration 2 -- -string(1) "0" -string(1) "o" -string(1) "0" -string(1) "o" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-7]" -string(1) "o" - --- Iteration 3 -- -string(1) "1" -string(1) "o" -string(1) "1" -string(1) "o" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-7]" -string(1) "o" - --- Iteration 4 -- -string(6) "303240" -string(1) "o" -string(6) "303240" -string(1) "o" -string(7) " 303240" -string(7) "303240 " -string(7) " 303240" -string(7) " -303240" -string(6) "303240" -string(30) " 303240" -string(4) "0-7]" -string(1) "o" - --- Iteration 5 -- -string(11) "37774136700" -string(1) "o" -string(11) "37774136700" -string(1) "o" -string(12) " 37774136700" -string(12) "37774136700 " -string(12) " 37774136700" -string(12) " -37774136700" -string(11) "37774136700" -string(30) " 37774136700" -string(4) "0-7]" -string(1) "o" - --- Iteration 6 -- -string(9) "575360400" -string(1) "o" -string(9) "575360400" -string(1) "o" -string(10) " 575360400" -string(10) "575360400 " -string(10) " 575360400" -string(10) " -575360400" -string(9) "575360400" -string(30) " 575360400" -string(4) "0-7]" -string(1) "o" - --- Iteration 7 -- -string(11) "30431233000" -string(1) "o" -string(11) "30431233000" -string(1) "o" -string(12) " 30431233000" -string(12) "30431233000 " -string(12) " 30431233000" -string(12) " -30431233000" -string(11) "30431233000" -string(30) " 30431233000" -string(4) "0-7]" -string(1) "o" - --- Iteration 8 -- -string(7) "4002620" -string(1) "o" -string(7) "4002620" -string(1) "o" -string(8) " 4002620" -string(8) "4002620 " -string(8) " 4002620" -string(8) " -4002620" -string(7) "4002620" -string(30) " 4002620" -string(4) "0-7]" -string(1) "o" -Done diff --git a/ext/standard/tests/strings/sprintf_variation29_64bit.phpt b/ext/standard/tests/strings/sprintf_variation29_64bit.phpt deleted file mode 100644 index 8dc7a45d16ea2..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation29_64bit.phpt +++ /dev/null @@ -1,168 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - octal formats with float values ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing sprintf() : octal formats with float values *** - --- Iteration 1 -- -string(1) "0" -string(1) "o" -string(1) "0" -string(1) "o" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-7]" -string(1) "o" - --- Iteration 2 -- -string(1) "0" -string(1) "o" -string(1) "0" -string(1) "o" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-7]" -string(1) "o" - --- Iteration 3 -- -string(1) "1" -string(1) "o" -string(1) "1" -string(1) "o" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-7]" -string(1) "o" - --- Iteration 4 -- -string(6) "303240" -string(1) "o" -string(6) "303240" -string(1) "o" -string(7) " 303240" -string(7) "303240 " -string(7) " 303240" -string(7) " -303240" -string(6) "303240" -string(30) " 303240" -string(4) "0-7]" -string(1) "o" - --- Iteration 5 -- -string(22) "1777777777777774136700" -string(1) "o" -string(22) "1777777777777774136700" -string(1) "o" -string(23) " 1777777777777774136700" -string(23) "1777777777777774136700 " -string(23) " 1777777777777774136700" -string(23) " -1777777777777774136700" -string(22) "1777777777777774136700" -string(30) " 1777777777777774136700" -string(4) "0-7]" -string(1) "o" - --- Iteration 6 -- -string(9) "575360400" -string(1) "o" -string(9) "575360400" -string(1) "o" -string(10) " 575360400" -string(10) "575360400 " -string(10) " 575360400" -string(10) " -575360400" -string(9) "575360400" -string(30) " 575360400" -string(4) "0-7]" -string(1) "o" - --- Iteration 7 -- -string(22) "1777777777770431233000" -string(1) "o" -string(22) "1777777777770431233000" -string(1) "o" -string(23) " 1777777777770431233000" -string(23) "1777777777770431233000 " -string(23) " 1777777777770431233000" -string(23) " -1777777777770431233000" -string(22) "1777777777770431233000" -string(30) " 1777777777770431233000" -string(4) "0-7]" -string(1) "o" - --- Iteration 8 -- -string(7) "4002620" -string(1) "o" -string(7) "4002620" -string(1) "o" -string(8) " 4002620" -string(8) "4002620 " -string(8) " 4002620" -string(8) " -4002620" -string(7) "4002620" -string(30) " 4002620" -string(4) "0-7]" -string(1) "o" -Done diff --git a/ext/standard/tests/strings/sprintf_variation30.phpt b/ext/standard/tests/strings/sprintf_variation30.phpt deleted file mode 100644 index 885dc26718376..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation30.phpt +++ /dev/null @@ -1,78 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - octal formats with resource values ---FILE-- - ---EXPECTF-- -*** Testing sprintf() : octal formats with resource values *** - --- Iteration 1 -- -string(%d) "%d" -string(1) "o" -string(%d) "%d" -string(1) "o" -string(%d) " %d" -string(%d) "%d " -string(%d) " %d" -string(%d) " -%d" -string(4) "%s%d" -string(30) "%s%d" -string(4) "0-7]" -string(1) "o" - --- Iteration 2 -- -string(%d) "%d" -string(1) "o" -string(%d) "%d" -string(1) "o" -string(%d) " %d" -string(%d) "%d " -string(%d) " %d" -string(%d) " -%d" -string(4) "%s%d" -string(30) "%s%d" -string(4) "0-7]" -string(1) "o" -Done diff --git a/ext/standard/tests/strings/sprintf_variation31.phpt b/ext/standard/tests/strings/sprintf_variation31.phpt deleted file mode 100644 index a9a43bd15f071..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation31.phpt +++ /dev/null @@ -1,246 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - octal formats with array values ---FILE-- - "One", "two" => 2) -); - -// array of octal formats -$octal_formats = array( - "%o", "%ho", "%lo", - "%Lo", " %o", "%o ", - "\t%o", "\n%o", "%4o", - "%30o", "%[0-7]", "%*o" -); - -$count = 1; -foreach($array_values as $array_value) { - echo "\n-- Iteration $count --\n"; - - foreach($octal_formats as $format) { - var_dump( sprintf($format, $array_value) ); - } - $count++; -}; - -echo "Done"; -?> ---EXPECT-- -*** Testing sprintf() : octal formats with array values *** - --- Iteration 1 -- -string(1) "0" -string(1) "o" -string(1) "0" -string(1) "o" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-7]" -string(1) "o" - --- Iteration 2 -- -string(1) "1" -string(1) "o" -string(1) "1" -string(1) "o" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-7]" -string(1) "o" - --- Iteration 3 -- -string(1) "1" -string(1) "o" -string(1) "1" -string(1) "o" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-7]" -string(1) "o" - --- Iteration 4 -- -string(1) "1" -string(1) "o" -string(1) "1" -string(1) "o" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-7]" -string(1) "o" - --- Iteration 5 -- -string(1) "1" -string(1) "o" -string(1) "1" -string(1) "o" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-7]" -string(1) "o" - --- Iteration 6 -- -string(1) "1" -string(1) "o" -string(1) "1" -string(1) "o" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-7]" -string(1) "o" - --- Iteration 7 -- -string(1) "1" -string(1) "o" -string(1) "1" -string(1) "o" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-7]" -string(1) "o" - --- Iteration 8 -- -string(1) "1" -string(1) "o" -string(1) "1" -string(1) "o" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-7]" -string(1) "o" - --- Iteration 9 -- -string(1) "1" -string(1) "o" -string(1) "1" -string(1) "o" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-7]" -string(1) "o" - --- Iteration 10 -- -string(1) "1" -string(1) "o" -string(1) "1" -string(1) "o" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-7]" -string(1) "o" - --- Iteration 11 -- -string(1) "1" -string(1) "o" -string(1) "1" -string(1) "o" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-7]" -string(1) "o" - --- Iteration 12 -- -string(1) "1" -string(1) "o" -string(1) "1" -string(1) "o" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-7]" -string(1) "o" - --- Iteration 13 -- -string(1) "1" -string(1) "o" -string(1) "1" -string(1) "o" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-7]" -string(1) "o" -Done diff --git a/ext/standard/tests/strings/sprintf_variation32.phpt b/ext/standard/tests/strings/sprintf_variation32.phpt deleted file mode 100644 index 2d4352e75bffa..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation32.phpt +++ /dev/null @@ -1,342 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - octal formats with string values ---FILE-- - ---EXPECT-- -*** Testing sprintf() : octal formats with string values *** - --- Iteration 1 -- -string(1) "0" -string(1) "o" -string(1) "0" -string(1) "o" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-7]" -string(1) "o" - --- Iteration 2 -- -string(1) "0" -string(1) "o" -string(1) "0" -string(1) "o" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-7]" -string(1) "o" - --- Iteration 3 -- -string(1) "0" -string(1) "o" -string(1) "0" -string(1) "o" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-7]" -string(1) "o" - --- Iteration 4 -- -string(1) "0" -string(1) "o" -string(1) "0" -string(1) "o" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-7]" -string(1) "o" - --- Iteration 5 -- -string(1) "1" -string(1) "o" -string(1) "1" -string(1) "o" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-7]" -string(1) "o" - --- Iteration 6 -- -string(1) "1" -string(1) "o" -string(1) "1" -string(1) "o" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-7]" -string(1) "o" - --- Iteration 7 -- -string(3) "173" -string(1) "o" -string(3) "173" -string(1) "o" -string(4) " 173" -string(4) "173 " -string(4) " 173" -string(4) " -173" -string(4) " 173" -string(30) " 173" -string(4) "0-7]" -string(1) "o" - --- Iteration 8 -- -string(1) "0" -string(1) "o" -string(1) "0" -string(1) "o" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-7]" -string(1) "o" - --- Iteration 9 -- -string(1) "0" -string(1) "o" -string(1) "0" -string(1) "o" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-7]" -string(1) "o" - --- Iteration 10 -- -string(1) "0" -string(1) "o" -string(1) "0" -string(1) "o" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-7]" -string(1) "o" - --- Iteration 11 -- -string(1) "0" -string(1) "o" -string(1) "0" -string(1) "o" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-7]" -string(1) "o" - --- Iteration 12 -- -string(1) "0" -string(1) "o" -string(1) "0" -string(1) "o" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-7]" -string(1) "o" - --- Iteration 13 -- -string(1) "0" -string(1) "o" -string(1) "0" -string(1) "o" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-7]" -string(1) "o" - --- Iteration 14 -- -string(1) "0" -string(1) "o" -string(1) "0" -string(1) "o" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-7]" -string(1) "o" - --- Iteration 15 -- -string(1) "0" -string(1) "o" -string(1) "0" -string(1) "o" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-7]" -string(1) "o" - --- Iteration 16 -- -string(1) "0" -string(1) "o" -string(1) "0" -string(1) "o" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-7]" -string(1) "o" - --- Iteration 17 -- -string(1) "0" -string(1) "o" -string(1) "0" -string(1) "o" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-7]" -string(1) "o" - --- Iteration 18 -- -string(1) "0" -string(1) "o" -string(1) "0" -string(1) "o" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-7]" -string(1) "o" - --- Iteration 19 -- -string(1) "0" -string(1) "o" -string(1) "0" -string(1) "o" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-7]" -string(1) "o" -Done diff --git a/ext/standard/tests/strings/sprintf_variation33.phpt b/ext/standard/tests/strings/sprintf_variation33.phpt deleted file mode 100644 index 54b2403f146b8..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation33.phpt +++ /dev/null @@ -1,102 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - octal formats with boolean values ---FILE-- - ---EXPECT-- -*** Testing sprintf() : octal formats with boolean values *** - --- Iteration 1 -- -string(1) "1" -string(1) "o" -string(1) "1" -string(1) "o" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-7]" -string(1) "o" - --- Iteration 2 -- -string(1) "0" -string(1) "o" -string(1) "0" -string(1) "o" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-7]" -string(1) "o" - --- Iteration 3 -- -string(1) "1" -string(1) "o" -string(1) "1" -string(1) "o" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-7]" -string(1) "o" - --- Iteration 4 -- -string(1) "0" -string(1) "o" -string(1) "0" -string(1) "o" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-7]" -string(1) "o" -Done diff --git a/ext/standard/tests/strings/sprintf_variation35.phpt b/ext/standard/tests/strings/sprintf_variation35.phpt deleted file mode 100644 index 2056f083cb447..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation35.phpt +++ /dev/null @@ -1,237 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - hexa formats with float values ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing sprintf() : hexa formats with float values *** - --- Iteration 1 -- -string(8) "7fffffff" -string(9) "7fffffffx" -string(8) "7fffffff" -string(1) "x" -string(9) " 7fffffff" -string(9) "7fffffff " -string(9) " 7fffffff" -string(9) " -7fffffff" -string(8) "7fffffff" -string(30) " 7fffffff" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 2 -- -string(1) "1" -string(2) "1x" -string(1) "1" -string(1) "x" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 3 -- -string(8) "80000001" -string(9) "80000001x" -string(8) "80000001" -string(1) "x" -string(9) " 80000001" -string(9) "80000001 " -string(9) " 80000001" -string(9) " -80000001" -string(8) "80000001" -string(30) " 80000001" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 4 -- -string(1) "0" -string(2) "0x" -string(1) "0" -string(1) "x" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 5 -- -string(1) "0" -string(2) "0x" -string(1) "0" -string(1) "x" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 6 -- -string(1) "1" -string(2) "1x" -string(1) "1" -string(1) "x" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 7 -- -string(5) "186a0" -string(6) "186a0x" -string(5) "186a0" -string(1) "x" -string(6) " 186a0" -string(6) "186a0 " -string(6) " 186a0" -string(6) " -186a0" -string(5) "186a0" -string(30) " 186a0" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 8 -- -string(8) "fff0bdc0" -string(9) "fff0bdc0x" -string(8) "fff0bdc0" -string(1) "x" -string(9) " fff0bdc0" -string(9) "fff0bdc0 " -string(9) " fff0bdc0" -string(9) " -fff0bdc0" -string(8) "fff0bdc0" -string(30) " fff0bdc0" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 9 -- -string(7) "5f5e100" -string(8) "5f5e100x" -string(7) "5f5e100" -string(1) "x" -string(8) " 5f5e100" -string(8) "5f5e100 " -string(8) " 5f5e100" -string(8) " -5f5e100" -string(7) "5f5e100" -string(30) " 5f5e100" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 10 -- -string(8) "c4653600" -string(9) "c4653600x" -string(8) "c4653600" -string(1) "x" -string(9) " c4653600" -string(9) "c4653600 " -string(9) " c4653600" -string(9) " -c4653600" -string(8) "c4653600" -string(30) " c4653600" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 11 -- -string(1) "a" -string(2) "ax" -string(1) "a" -string(1) "x" -string(2) " a" -string(2) "a " -string(2) " a" -string(2) " -a" -string(4) " a" -string(30) " a" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 12 -- -string(6) "100590" -string(7) "100590x" -string(6) "100590" -string(1) "x" -string(7) " 100590" -string(7) "100590 " -string(7) " 100590" -string(7) " -100590" -string(6) "100590" -string(30) " 100590" -string(10) "0-9A-Fa-f]" -string(1) "x" -Done diff --git a/ext/standard/tests/strings/sprintf_variation35_64bit.phpt b/ext/standard/tests/strings/sprintf_variation35_64bit.phpt deleted file mode 100644 index 386a2b6b582cb..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation35_64bit.phpt +++ /dev/null @@ -1,233 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - hexa formats with float values ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing sprintf() : hexa formats with float values *** - --- Iteration 1 -- -string(8) "7fffffff" -string(9) "7fffffffx" -string(8) "7fffffff" -string(1) "x" -string(9) " 7fffffff" -string(9) "7fffffff " -string(9) " 7fffffff" -string(9) " -7fffffff" -string(8) "7fffffff" -string(30) " 7fffffff" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 2 -- -string(9) "800000001" -string(10) "800000001x" -string(9) "800000001" -string(1) "x" -string(10) " 800000001" -string(10) "800000001 " -string(10) " 800000001" -string(10) " -800000001" -string(9) "800000001" -string(30) " 800000001" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 3 -- -string(8) "80000001" -string(9) "80000001x" -string(8) "80000001" -string(1) "x" -string(9) " 80000001" -string(9) "80000001 " -string(9) " 80000001" -string(9) " -80000001" -string(8) "80000001" -string(30) " 80000001" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 4 -- -string(1) "0" -string(2) "0x" -string(1) "0" -string(1) "x" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 5 -- -string(1) "0" -string(2) "0x" -string(1) "0" -string(1) "x" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 6 -- -string(1) "1" -string(2) "1x" -string(1) "1" -string(1) "x" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 7 -- -string(5) "186a0" -string(6) "186a0x" -string(5) "186a0" -string(1) "x" -string(6) " 186a0" -string(6) "186a0 " -string(6) " 186a0" -string(6) " -186a0" -string(5) "186a0" -string(30) " 186a0" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 8 -- -string(16) "fffffffffff0bdc0" -string(17) "fffffffffff0bdc0x" -string(16) "fffffffffff0bdc0" -string(1) "x" -string(17) " fffffffffff0bdc0" -string(17) "fffffffffff0bdc0 " -string(17) " fffffffffff0bdc0" -string(17) " -fffffffffff0bdc0" -string(16) "fffffffffff0bdc0" -string(30) " fffffffffff0bdc0" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 9 -- -string(7) "5f5e100" -string(8) "5f5e100x" -string(7) "5f5e100" -string(1) "x" -string(8) " 5f5e100" -string(8) "5f5e100 " -string(8) " 5f5e100" -string(8) " -5f5e100" -string(7) "5f5e100" -string(30) " 5f5e100" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 10 -- -string(16) "ffffffffc4653600" -string(17) "ffffffffc4653600x" -string(16) "ffffffffc4653600" -string(1) "x" -string(17) " ffffffffc4653600" -string(17) "ffffffffc4653600 " -string(17) " ffffffffc4653600" -string(17) " -ffffffffc4653600" -string(16) "ffffffffc4653600" -string(30) " ffffffffc4653600" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 11 -- -string(1) "a" -string(2) "ax" -string(1) "a" -string(1) "x" -string(2) " a" -string(2) "a " -string(2) " a" -string(2) " -a" -string(4) " a" -string(30) " a" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 12 -- -string(6) "100590" -string(7) "100590x" -string(6) "100590" -string(1) "x" -string(7) " 100590" -string(7) "100590 " -string(7) " 100590" -string(7) " -100590" -string(6) "100590" -string(30) " 100590" -string(10) "0-9A-Fa-f]" -string(1) "x" -Done diff --git a/ext/standard/tests/strings/sprintf_variation36.phpt b/ext/standard/tests/strings/sprintf_variation36.phpt deleted file mode 100644 index 17869f0ade93c..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation36.phpt +++ /dev/null @@ -1,76 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - hexa formats with resource values ---FILE-- - ---EXPECTF-- -*** Testing sprintf() : hexa formats with resource values *** - --- Iteration 1 -- -string(%d) "%a" -string(%d) "%ax" -string(%d) "%a" -string(1) "x" -string(%d) " %a" -string(%d) "%a " -string(%d) " %a" -string(%d) " -%a" -string(4) "%a" -string(30) "%a" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 2 -- -string(%d) "%a" -string(%d) "%ax" -string(%d) "%a" -string(1) "x" -string(%d) " %a" -string(%d) "%a " -string(%d) " %a" -string(%d) " -%a" -string(4) "%a" -string(30) "%a" -string(10) "0-9A-Fa-f]" -string(1) "x" diff --git a/ext/standard/tests/strings/sprintf_variation37.phpt b/ext/standard/tests/strings/sprintf_variation37.phpt deleted file mode 100644 index a76f7efd5c3b5..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation37.phpt +++ /dev/null @@ -1,230 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - hexa formats with array values ---FILE-- - "One", "two" => 2) -); - -// array of hexa formats -$hexa_formats = array( - "%x", "%xx", "%lx", - "%Lx", " %x", "%x ", - "\t%x", "\n%x", "%4x", - "%30x", "%[0-9A-Fa-f]", "%*x" -); - -$count = 1; -foreach($array_values as $array_value) { - echo "\n-- Iteration $count --\n"; - - foreach($hexa_formats as $format) { - var_dump( sprintf($format, $array_value) ); - } - $count++; -}; - -echo "Done"; -?> ---EXPECT-- -*** Testing sprintf() : hexa formats with array values *** - --- Iteration 1 -- -string(1) "0" -string(2) "0x" -string(1) "0" -string(1) "x" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 2 -- -string(1) "1" -string(2) "1x" -string(1) "1" -string(1) "x" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 3 -- -string(1) "1" -string(2) "1x" -string(1) "1" -string(1) "x" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 4 -- -string(1) "1" -string(2) "1x" -string(1) "1" -string(1) "x" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 5 -- -string(1) "1" -string(2) "1x" -string(1) "1" -string(1) "x" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 6 -- -string(1) "1" -string(2) "1x" -string(1) "1" -string(1) "x" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 7 -- -string(1) "1" -string(2) "1x" -string(1) "1" -string(1) "x" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 8 -- -string(1) "1" -string(2) "1x" -string(1) "1" -string(1) "x" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 9 -- -string(1) "1" -string(2) "1x" -string(1) "1" -string(1) "x" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 10 -- -string(1) "1" -string(2) "1x" -string(1) "1" -string(1) "x" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 11 -- -string(1) "1" -string(2) "1x" -string(1) "1" -string(1) "x" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 12 -- -string(1) "1" -string(2) "1x" -string(1) "1" -string(1) "x" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(10) "0-9A-Fa-f]" -string(1) "x" -Done diff --git a/ext/standard/tests/strings/sprintf_variation38.phpt b/ext/standard/tests/strings/sprintf_variation38.phpt deleted file mode 100644 index a48a77a6d5d99..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation38.phpt +++ /dev/null @@ -1,326 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - hexa formats with string values ---FILE-- - ---EXPECT-- -*** Testing sprintf() : hexa formats with string values *** - --- Iteration 1 -- -string(1) "0" -string(2) "0x" -string(1) "0" -string(1) "x" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 2 -- -string(1) "0" -string(2) "0x" -string(1) "0" -string(1) "x" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 3 -- -string(1) "0" -string(2) "0x" -string(1) "0" -string(1) "x" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 4 -- -string(1) "0" -string(2) "0x" -string(1) "0" -string(1) "x" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 5 -- -string(1) "1" -string(2) "1x" -string(1) "1" -string(1) "x" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 6 -- -string(1) "1" -string(2) "1x" -string(1) "1" -string(1) "x" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 7 -- -string(1) "0" -string(2) "0x" -string(1) "0" -string(1) "x" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 8 -- -string(1) "0" -string(2) "0x" -string(1) "0" -string(1) "x" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 9 -- -string(1) "0" -string(2) "0x" -string(1) "0" -string(1) "x" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 10 -- -string(1) "0" -string(2) "0x" -string(1) "0" -string(1) "x" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 11 -- -string(1) "0" -string(2) "0x" -string(1) "0" -string(1) "x" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 12 -- -string(1) "0" -string(2) "0x" -string(1) "0" -string(1) "x" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 13 -- -string(1) "0" -string(2) "0x" -string(1) "0" -string(1) "x" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 14 -- -string(1) "0" -string(2) "0x" -string(1) "0" -string(1) "x" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 15 -- -string(1) "0" -string(2) "0x" -string(1) "0" -string(1) "x" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 16 -- -string(1) "0" -string(2) "0x" -string(1) "0" -string(1) "x" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 17 -- -string(1) "0" -string(2) "0x" -string(1) "0" -string(1) "x" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 18 -- -string(1) "0" -string(2) "0x" -string(1) "0" -string(1) "x" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(10) "0-9A-Fa-f]" -string(1) "x" -Done diff --git a/ext/standard/tests/strings/sprintf_variation39.phpt b/ext/standard/tests/strings/sprintf_variation39.phpt deleted file mode 100644 index 0d842af057b78..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation39.phpt +++ /dev/null @@ -1,102 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - hexa formats with boolean values ---FILE-- - ---EXPECT-- -*** Testing sprintf() : hexa formats with boolean values *** - --- Iteration 1 -- -string(1) "1" -string(2) "1x" -string(1) "1" -string(1) "x" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 2 -- -string(1) "0" -string(2) "0x" -string(1) "0" -string(1) "x" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 3 -- -string(1) "1" -string(2) "1x" -string(1) "1" -string(1) "x" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(10) "0-9A-Fa-f]" -string(1) "x" - --- Iteration 4 -- -string(1) "0" -string(2) "0x" -string(1) "0" -string(1) "x" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(10) "0-9A-Fa-f]" -string(1) "x" -Done diff --git a/ext/standard/tests/strings/sprintf_variation4.phpt b/ext/standard/tests/strings/sprintf_variation4.phpt deleted file mode 100644 index 5345fd1088f24..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation4.phpt +++ /dev/null @@ -1,237 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - int formats with float values ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing sprintf() : integer formats with float values *** - --- Iteration 1 -- -string(11) "-2147483648" -string(1) "d" -string(11) "-2147483648" -string(1) "d" -string(12) " -2147483648" -string(12) "-2147483648 " -string(12) " -2147483648" -string(12) " --2147483648" -string(11) "-2147483648" -string(30) " -2147483648" -string(4) "0-9]" -string(1) "d" - --- Iteration 2 -- -string(1) "1" -string(1) "d" -string(1) "1" -string(1) "d" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "d" - --- Iteration 3 -- -string(11) "-2147483647" -string(1) "d" -string(11) "-2147483647" -string(1) "d" -string(12) " -2147483647" -string(12) "-2147483647 " -string(12) " -2147483647" -string(12) " --2147483647" -string(11) "-2147483647" -string(30) " -2147483647" -string(4) "0-9]" -string(1) "d" - --- Iteration 4 -- -string(1) "0" -string(1) "d" -string(1) "0" -string(1) "d" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "d" - --- Iteration 5 -- -string(1) "0" -string(1) "d" -string(1) "0" -string(1) "d" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "d" - --- Iteration 6 -- -string(1) "1" -string(1) "d" -string(1) "1" -string(1) "d" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "d" - --- Iteration 7 -- -string(6) "100000" -string(1) "d" -string(6) "100000" -string(1) "d" -string(7) " 100000" -string(7) "100000 " -string(7) " 100000" -string(7) " -100000" -string(6) "100000" -string(30) " 100000" -string(4) "0-9]" -string(1) "d" - --- Iteration 8 -- -string(8) "-1000000" -string(1) "d" -string(8) "-1000000" -string(1) "d" -string(9) " -1000000" -string(9) "-1000000 " -string(9) " -1000000" -string(9) " --1000000" -string(8) "-1000000" -string(30) " -1000000" -string(4) "0-9]" -string(1) "d" - --- Iteration 9 -- -string(9) "100000000" -string(1) "d" -string(9) "100000000" -string(1) "d" -string(10) " 100000000" -string(10) "100000000 " -string(10) " 100000000" -string(10) " -100000000" -string(9) "100000000" -string(30) " 100000000" -string(4) "0-9]" -string(1) "d" - --- Iteration 10 -- -string(11) "-1000000000" -string(1) "d" -string(11) "-1000000000" -string(1) "d" -string(12) " -1000000000" -string(12) "-1000000000 " -string(12) " -1000000000" -string(12) " --1000000000" -string(11) "-1000000000" -string(30) " -1000000000" -string(4) "0-9]" -string(1) "d" - --- Iteration 11 -- -string(2) "10" -string(1) "d" -string(2) "10" -string(1) "d" -string(3) " 10" -string(3) "10 " -string(3) " 10" -string(3) " -10" -string(4) " 10" -string(30) " 10" -string(4) "0-9]" -string(1) "d" - --- Iteration 12 -- -string(7) "1050000" -string(1) "d" -string(7) "1050000" -string(1) "d" -string(8) " 1050000" -string(8) "1050000 " -string(8) " 1050000" -string(8) " -1050000" -string(7) "1050000" -string(30) " 1050000" -string(4) "0-9]" -string(1) "d" -Done diff --git a/ext/standard/tests/strings/sprintf_variation41.phpt b/ext/standard/tests/strings/sprintf_variation41.phpt deleted file mode 100644 index e888fac941b35..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation41.phpt +++ /dev/null @@ -1,316 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - unsigned formats with float values ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing sprintf() : unsigned formats with float values *** - --- Iteration 1 -- -string(10) "2147483647" -string(1) "u" -string(10) "2147483647" -string(1) "u" -string(11) " 2147483647" -string(11) "2147483647 " -string(11) " 2147483647" -string(11) " -2147483647" -string(10) "2147483647" -string(30) " 2147483647" -string(4) "0-9]" -string(1) "u" - --- Iteration 2 -- -string(1) "1" -string(1) "u" -string(1) "1" -string(1) "u" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "u" - --- Iteration 3 -- -string(10) "2147483649" -string(1) "u" -string(10) "2147483649" -string(1) "u" -string(11) " 2147483649" -string(11) "2147483649 " -string(11) " 2147483649" -string(11) " -2147483649" -string(10) "2147483649" -string(30) " 2147483649" -string(4) "0-9]" -string(1) "u" - --- Iteration 4 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 5 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 6 -- -string(1) "1" -string(1) "u" -string(1) "1" -string(1) "u" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "u" - --- Iteration 7 -- -string(6) "100000" -string(1) "u" -string(6) "100000" -string(1) "u" -string(7) " 100000" -string(7) "100000 " -string(7) " 100000" -string(7) " -100000" -string(6) "100000" -string(30) " 100000" -string(4) "0-9]" -string(1) "u" - --- Iteration 8 -- -string(6) "500000" -string(1) "u" -string(6) "500000" -string(1) "u" -string(7) " 500000" -string(7) "500000 " -string(7) " 500000" -string(7) " -500000" -string(6) "500000" -string(30) " 500000" -string(4) "0-9]" -string(1) "u" - --- Iteration 9 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 10 -- -string(10) "4294867296" -string(1) "u" -string(10) "4294867296" -string(1) "u" -string(11) " 4294867296" -string(11) "4294867296 " -string(11) " 4294867296" -string(11) " -4294867296" -string(10) "4294867296" -string(30) " 4294867296" -string(4) "0-9]" -string(1) "u" - --- Iteration 11 -- -string(10) "4294867296" -string(1) "u" -string(10) "4294867296" -string(1) "u" -string(11) " 4294867296" -string(11) "4294867296 " -string(11) " 4294867296" -string(11) " -4294867296" -string(10) "4294867296" -string(30) " 4294867296" -string(4) "0-9]" -string(1) "u" - --- Iteration 12 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 13 -- -string(6) "100000" -string(1) "u" -string(6) "100000" -string(1) "u" -string(7) " 100000" -string(7) "100000 " -string(7) " 100000" -string(7) " -100000" -string(6) "100000" -string(30) " 100000" -string(4) "0-9]" -string(1) "u" - --- Iteration 14 -- -string(9) "100000000" -string(1) "u" -string(9) "100000000" -string(1) "u" -string(10) " 100000000" -string(10) "100000000 " -string(10) " 100000000" -string(10) " -100000000" -string(9) "100000000" -string(30) " 100000000" -string(4) "0-9]" -string(1) "u" - --- Iteration 15 -- -string(10) "3294967296" -string(1) "u" -string(10) "3294967296" -string(1) "u" -string(11) " 3294967296" -string(11) "3294967296 " -string(11) " 3294967296" -string(11) " -3294967296" -string(10) "3294967296" -string(30) " 3294967296" -string(4) "0-9]" -string(1) "u" - --- Iteration 16 -- -string(2) "10" -string(1) "u" -string(2) "10" -string(1) "u" -string(3) " 10" -string(3) "10 " -string(3) " 10" -string(3) " -10" -string(4) " 10" -string(30) " 10" -string(4) "0-9]" -string(1) "u" - --- Iteration 17 -- -string(7) "1050000" -string(1) "u" -string(7) "1050000" -string(1) "u" -string(8) " 1050000" -string(8) "1050000 " -string(8) " 1050000" -string(8) " -1050000" -string(7) "1050000" -string(30) " 1050000" -string(4) "0-9]" -string(1) "u" -Done diff --git a/ext/standard/tests/strings/sprintf_variation41_64bit.phpt b/ext/standard/tests/strings/sprintf_variation41_64bit.phpt deleted file mode 100644 index c976a7b7995e7..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation41_64bit.phpt +++ /dev/null @@ -1,312 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - unsigned formats with float values ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing sprintf() : unsigned formats with float values *** - --- Iteration 1 -- -string(10) "2147483647" -string(1) "u" -string(10) "2147483647" -string(1) "u" -string(11) " 2147483647" -string(11) "2147483647 " -string(11) " 2147483647" -string(11) " -2147483647" -string(10) "2147483647" -string(30) " 2147483647" -string(4) "0-9]" -string(1) "u" - --- Iteration 2 -- -string(11) "34359738369" -string(1) "u" -string(11) "34359738369" -string(1) "u" -string(12) " 34359738369" -string(12) "34359738369 " -string(12) " 34359738369" -string(12) " -34359738369" -string(11) "34359738369" -string(30) " 34359738369" -string(4) "0-9]" -string(1) "u" - --- Iteration 3 -- -string(10) "2147483649" -string(1) "u" -string(10) "2147483649" -string(1) "u" -string(11) " 2147483649" -string(11) "2147483649 " -string(11) " 2147483649" -string(11) " -2147483649" -string(10) "2147483649" -string(30) " 2147483649" -string(4) "0-9]" -string(1) "u" - --- Iteration 4 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 5 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 6 -- -string(1) "1" -string(1) "u" -string(1) "1" -string(1) "u" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "u" - --- Iteration 7 -- -string(6) "100000" -string(1) "u" -string(6) "100000" -string(1) "u" -string(7) " 100000" -string(7) "100000 " -string(7) " 100000" -string(7) " -100000" -string(6) "100000" -string(30) " 100000" -string(4) "0-9]" -string(1) "u" - --- Iteration 8 -- -string(6) "500000" -string(1) "u" -string(6) "500000" -string(1) "u" -string(7) " 500000" -string(7) "500000 " -string(7) " 500000" -string(7) " -500000" -string(6) "500000" -string(30) " 500000" -string(4) "0-9]" -string(1) "u" - --- Iteration 9 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 10 -- -string(20) "18446744073709451616" -string(1) "u" -string(20) "18446744073709451616" -string(1) "u" -string(21) " 18446744073709451616" -string(21) "18446744073709451616 " -string(21) " 18446744073709451616" -string(21) " -18446744073709451616" -string(20) "18446744073709451616" -string(30) " 18446744073709451616" -string(4) "0-9]" -string(1) "u" - --- Iteration 11 -- -string(20) "18446744073709451616" -string(1) "u" -string(20) "18446744073709451616" -string(1) "u" -string(21) " 18446744073709451616" -string(21) "18446744073709451616 " -string(21) " 18446744073709451616" -string(21) " -18446744073709451616" -string(20) "18446744073709451616" -string(30) " 18446744073709451616" -string(4) "0-9]" -string(1) "u" - --- Iteration 12 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 13 -- -string(6) "100000" -string(1) "u" -string(6) "100000" -string(1) "u" -string(7) " 100000" -string(7) "100000 " -string(7) " 100000" -string(7) " -100000" -string(6) "100000" -string(30) " 100000" -string(4) "0-9]" -string(1) "u" - --- Iteration 14 -- -string(9) "100000000" -string(1) "u" -string(9) "100000000" -string(1) "u" -string(10) " 100000000" -string(10) "100000000 " -string(10) " 100000000" -string(10) " -100000000" -string(9) "100000000" -string(30) " 100000000" -string(4) "0-9]" -string(1) "u" - --- Iteration 15 -- -string(20) "18446744072709551616" -string(1) "u" -string(20) "18446744072709551616" -string(1) "u" -string(21) " 18446744072709551616" -string(21) "18446744072709551616 " -string(21) " 18446744072709551616" -string(21) " -18446744072709551616" -string(20) "18446744072709551616" -string(30) " 18446744072709551616" -string(4) "0-9]" -string(1) "u" - --- Iteration 16 -- -string(2) "10" -string(1) "u" -string(2) "10" -string(1) "u" -string(3) " 10" -string(3) "10 " -string(3) " 10" -string(3) " -10" -string(4) " 10" -string(30) " 10" -string(4) "0-9]" -string(1) "u" - --- Iteration 17 -- -string(7) "1050000" -string(1) "u" -string(7) "1050000" -string(1) "u" -string(8) " 1050000" -string(8) "1050000 " -string(8) " 1050000" -string(8) " -1050000" -string(7) "1050000" -string(30) " 1050000" -string(4) "0-9]" -string(1) "u" -Done diff --git a/ext/standard/tests/strings/sprintf_variation42.phpt b/ext/standard/tests/strings/sprintf_variation42.phpt deleted file mode 100644 index 8dcec355acd0a..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation42.phpt +++ /dev/null @@ -1,79 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - unsigned formats with resource values ---FILE-- - ---EXPECTF-- -*** Testing sprintf() : unsigned formats with resource values *** - --- Iteration 1 -- -string(%d) "%d" -string(1) "u" -string(%d) "%d" -string(1) "u" -string(%d) " %d" -string(%d) "%d " -string(%d) " %d" -string(%d) " -%d" -string(4) "%s%d" -string(30) "%s%d" -string(4) "0-9]" -string(1) "u" - --- Iteration 2 -- -string(%d) "%d" -string(1) "u" -string(%d) "%d" -string(1) "u" -string(%d) " %d" -string(%d) "%d " -string(%d) " %d" -string(%d) " -%d" -string(4) "%s%d" -string(30) "%s%d" -string(4) "0-9]" -string(1) "u" -Done diff --git a/ext/standard/tests/strings/sprintf_variation43.phpt b/ext/standard/tests/strings/sprintf_variation43.phpt deleted file mode 100644 index 0c86b468f5ffa..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation43.phpt +++ /dev/null @@ -1,262 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - unsigned formats with array values ---FILE-- - "One", "two" => 2) -); - -// array of unsigned formats -$unsigned_formats = array( - "%u", "%hu", "%lu", - "%Lu", " %u", "%u ", - "\t%u", "\n%u", "%4u", - "%30u", "%[0-9]", "%*u" -); - -$count = 1; -foreach($array_values as $array_value) { - echo "\n-- Iteration $count --\n"; - - foreach($unsigned_formats as $format) { - var_dump( sprintf($format, $array_value) ); - } - $count++; -}; - -echo "Done"; -?> ---EXPECT-- -*** Testing sprintf() : unsigned formats with array values *** - --- Iteration 1 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 2 -- -string(1) "1" -string(1) "u" -string(1) "1" -string(1) "u" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "u" - --- Iteration 3 -- -string(1) "1" -string(1) "u" -string(1) "1" -string(1) "u" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "u" - --- Iteration 4 -- -string(1) "1" -string(1) "u" -string(1) "1" -string(1) "u" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "u" - --- Iteration 5 -- -string(1) "1" -string(1) "u" -string(1) "1" -string(1) "u" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "u" - --- Iteration 6 -- -string(1) "1" -string(1) "u" -string(1) "1" -string(1) "u" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "u" - --- Iteration 7 -- -string(1) "1" -string(1) "u" -string(1) "1" -string(1) "u" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "u" - --- Iteration 8 -- -string(1) "1" -string(1) "u" -string(1) "1" -string(1) "u" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "u" - --- Iteration 9 -- -string(1) "1" -string(1) "u" -string(1) "1" -string(1) "u" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "u" - --- Iteration 10 -- -string(1) "1" -string(1) "u" -string(1) "1" -string(1) "u" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "u" - --- Iteration 11 -- -string(1) "1" -string(1) "u" -string(1) "1" -string(1) "u" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "u" - --- Iteration 12 -- -string(1) "1" -string(1) "u" -string(1) "1" -string(1) "u" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "u" - --- Iteration 13 -- -string(1) "1" -string(1) "u" -string(1) "1" -string(1) "u" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "u" - --- Iteration 14 -- -string(1) "1" -string(1) "u" -string(1) "1" -string(1) "u" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "u" -Done diff --git a/ext/standard/tests/strings/sprintf_variation44.phpt b/ext/standard/tests/strings/sprintf_variation44.phpt deleted file mode 100644 index 10c65a8d2995e..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation44.phpt +++ /dev/null @@ -1,365 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - unsigned formats with string values ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing sprintf() : unsigned formats with string values *** - --- Iteration 1 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 2 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 3 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 4 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 5 -- -string(1) "1" -string(1) "u" -string(1) "1" -string(1) "u" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "u" - --- Iteration 6 -- -string(1) "1" -string(1) "u" -string(1) "1" -string(1) "u" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "u" - --- Iteration 7 -- -string(10) "4294967173" -string(1) "u" -string(10) "4294967173" -string(1) "u" -string(11) " 4294967173" -string(11) "4294967173 " -string(11) " 4294967173" -string(11) " -4294967173" -string(10) "4294967173" -string(30) " 4294967173" -string(4) "0-9]" -string(1) "u" - --- Iteration 8 -- -string(3) "123" -string(1) "u" -string(3) "123" -string(1) "u" -string(4) " 123" -string(4) "123 " -string(4) " 123" -string(4) " -123" -string(4) " 123" -string(30) " 123" -string(4) "0-9]" -string(1) "u" - --- Iteration 9 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 10 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 11 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 12 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 13 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 14 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 15 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 16 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 17 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 18 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 19 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 20 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" -Done diff --git a/ext/standard/tests/strings/sprintf_variation44_64bit.phpt b/ext/standard/tests/strings/sprintf_variation44_64bit.phpt deleted file mode 100644 index 24c80ded3b560..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation44_64bit.phpt +++ /dev/null @@ -1,361 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - unsigned formats with string values ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing sprintf() : unsigned formats with string values *** - --- Iteration 1 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 2 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 3 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 4 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 5 -- -string(1) "1" -string(1) "u" -string(1) "1" -string(1) "u" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "u" - --- Iteration 6 -- -string(1) "1" -string(1) "u" -string(1) "1" -string(1) "u" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "u" - --- Iteration 7 -- -string(20) "18446744073709551493" -string(1) "u" -string(20) "18446744073709551493" -string(1) "u" -string(21) " 18446744073709551493" -string(21) "18446744073709551493 " -string(21) " 18446744073709551493" -string(21) " -18446744073709551493" -string(20) "18446744073709551493" -string(30) " 18446744073709551493" -string(4) "0-9]" -string(1) "u" - --- Iteration 8 -- -string(3) "123" -string(1) "u" -string(3) "123" -string(1) "u" -string(4) " 123" -string(4) "123 " -string(4) " 123" -string(4) " -123" -string(4) " 123" -string(30) " 123" -string(4) "0-9]" -string(1) "u" - --- Iteration 9 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 10 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 11 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 12 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 13 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 14 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 15 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 16 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 17 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 18 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 19 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 20 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" -Done diff --git a/ext/standard/tests/strings/sprintf_variation45.phpt b/ext/standard/tests/strings/sprintf_variation45.phpt deleted file mode 100644 index d6bf31c56b9ae..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation45.phpt +++ /dev/null @@ -1,102 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - unsigned formats with boolean values ---FILE-- - ---EXPECT-- -*** Testing sprintf() : unsigned formats with boolean values *** - --- Iteration 1 -- -string(1) "1" -string(1) "u" -string(1) "1" -string(1) "u" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "u" - --- Iteration 2 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" - --- Iteration 3 -- -string(1) "1" -string(1) "u" -string(1) "1" -string(1) "u" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "u" - --- Iteration 4 -- -string(1) "0" -string(1) "u" -string(1) "0" -string(1) "u" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "u" -Done diff --git a/ext/standard/tests/strings/sprintf_variation48.phpt b/ext/standard/tests/strings/sprintf_variation48.phpt deleted file mode 100644 index 73dc5950a96e2..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation48.phpt +++ /dev/null @@ -1,76 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - scientific formats with resource values ---FILE-- - ---EXPECTF-- -*** Testing sprintf() : scientific formats with resource values *** - --- Iteration 1 -- -string(%d) "%f" -string(1) "e" -string(%d) "%f" -string(1) "e" -string(%d) " %f" -string(%d) "%f " -string(%d) " %f" -string(%d) " -%f" -string(%d) "%f" -string(30) "%s%f" -string(%d) "0-1]" -string(1) "e" - --- Iteration 2 -- -string(%d) "%f" -string(1) "e" -string(%d) "%f" -string(1) "e" -string(%d) " %f" -string(%d) "%f " -string(%d) " %f" -string(%d) " -%f" -string(%d) "%f" -string(30) "%s%f" -string(%d) "0-1]" -string(1) "e" diff --git a/ext/standard/tests/strings/sprintf_variation49.phpt b/ext/standard/tests/strings/sprintf_variation49.phpt deleted file mode 100644 index f3ab223a06f5e..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation49.phpt +++ /dev/null @@ -1,278 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - scientific formats with array values ---FILE-- - "One", "two" => 2) -); - -// array of scientific formats -$scientific_formats = array( - "%e", "%he", "%le", - "%Le", " %e", "%e ", - "\t%e", "\n%e", "%4e", - "%30e", "%[0-1]", "%*e" -); - -$count = 1; -foreach($array_values as $array_value) { - echo "\n-- Iteration $count --\n"; - - foreach($scientific_formats as $format) { - var_dump( sprintf($format, $array_value) ); - } - $count++; -}; - -echo "Done"; -?> ---EXPECT-- -*** Testing sprintf() : scientific formats with array values *** - --- Iteration 1 -- -string(11) "0.000000e+0" -string(1) "e" -string(11) "0.000000e+0" -string(1) "e" -string(12) " 0.000000e+0" -string(12) "0.000000e+0 " -string(12) " 0.000000e+0" -string(12) " -0.000000e+0" -string(11) "0.000000e+0" -string(30) " 0.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 2 -- -string(11) "1.000000e+0" -string(1) "e" -string(11) "1.000000e+0" -string(1) "e" -string(12) " 1.000000e+0" -string(12) "1.000000e+0 " -string(12) " 1.000000e+0" -string(12) " -1.000000e+0" -string(11) "1.000000e+0" -string(30) " 1.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 3 -- -string(11) "1.000000e+0" -string(1) "e" -string(11) "1.000000e+0" -string(1) "e" -string(12) " 1.000000e+0" -string(12) "1.000000e+0 " -string(12) " 1.000000e+0" -string(12) " -1.000000e+0" -string(11) "1.000000e+0" -string(30) " 1.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 4 -- -string(11) "1.000000e+0" -string(1) "e" -string(11) "1.000000e+0" -string(1) "e" -string(12) " 1.000000e+0" -string(12) "1.000000e+0 " -string(12) " 1.000000e+0" -string(12) " -1.000000e+0" -string(11) "1.000000e+0" -string(30) " 1.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 5 -- -string(11) "1.000000e+0" -string(1) "e" -string(11) "1.000000e+0" -string(1) "e" -string(12) " 1.000000e+0" -string(12) "1.000000e+0 " -string(12) " 1.000000e+0" -string(12) " -1.000000e+0" -string(11) "1.000000e+0" -string(30) " 1.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 6 -- -string(11) "1.000000e+0" -string(1) "e" -string(11) "1.000000e+0" -string(1) "e" -string(12) " 1.000000e+0" -string(12) "1.000000e+0 " -string(12) " 1.000000e+0" -string(12) " -1.000000e+0" -string(11) "1.000000e+0" -string(30) " 1.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 7 -- -string(11) "1.000000e+0" -string(1) "e" -string(11) "1.000000e+0" -string(1) "e" -string(12) " 1.000000e+0" -string(12) "1.000000e+0 " -string(12) " 1.000000e+0" -string(12) " -1.000000e+0" -string(11) "1.000000e+0" -string(30) " 1.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 8 -- -string(11) "1.000000e+0" -string(1) "e" -string(11) "1.000000e+0" -string(1) "e" -string(12) " 1.000000e+0" -string(12) "1.000000e+0 " -string(12) " 1.000000e+0" -string(12) " -1.000000e+0" -string(11) "1.000000e+0" -string(30) " 1.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 9 -- -string(11) "1.000000e+0" -string(1) "e" -string(11) "1.000000e+0" -string(1) "e" -string(12) " 1.000000e+0" -string(12) "1.000000e+0 " -string(12) " 1.000000e+0" -string(12) " -1.000000e+0" -string(11) "1.000000e+0" -string(30) " 1.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 10 -- -string(11) "1.000000e+0" -string(1) "e" -string(11) "1.000000e+0" -string(1) "e" -string(12) " 1.000000e+0" -string(12) "1.000000e+0 " -string(12) " 1.000000e+0" -string(12) " -1.000000e+0" -string(11) "1.000000e+0" -string(30) " 1.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 11 -- -string(11) "1.000000e+0" -string(1) "e" -string(11) "1.000000e+0" -string(1) "e" -string(12) " 1.000000e+0" -string(12) "1.000000e+0 " -string(12) " 1.000000e+0" -string(12) " -1.000000e+0" -string(11) "1.000000e+0" -string(30) " 1.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 12 -- -string(11) "1.000000e+0" -string(1) "e" -string(11) "1.000000e+0" -string(1) "e" -string(12) " 1.000000e+0" -string(12) "1.000000e+0 " -string(12) " 1.000000e+0" -string(12) " -1.000000e+0" -string(11) "1.000000e+0" -string(30) " 1.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 13 -- -string(11) "1.000000e+0" -string(1) "e" -string(11) "1.000000e+0" -string(1) "e" -string(12) " 1.000000e+0" -string(12) "1.000000e+0 " -string(12) " 1.000000e+0" -string(12) " -1.000000e+0" -string(11) "1.000000e+0" -string(30) " 1.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 14 -- -string(11) "1.000000e+0" -string(1) "e" -string(11) "1.000000e+0" -string(1) "e" -string(12) " 1.000000e+0" -string(12) "1.000000e+0 " -string(12) " 1.000000e+0" -string(12) " -1.000000e+0" -string(11) "1.000000e+0" -string(30) " 1.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 15 -- -string(11) "1.000000e+0" -string(1) "e" -string(11) "1.000000e+0" -string(1) "e" -string(12) " 1.000000e+0" -string(12) "1.000000e+0 " -string(12) " 1.000000e+0" -string(12) " -1.000000e+0" -string(11) "1.000000e+0" -string(30) " 1.000000e+0" -string(4) "0-1]" -string(1) "e" -Done diff --git a/ext/standard/tests/strings/sprintf_variation4_64bit.phpt b/ext/standard/tests/strings/sprintf_variation4_64bit.phpt deleted file mode 100644 index 79aff1fc39e62..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation4_64bit.phpt +++ /dev/null @@ -1,233 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - int formats with float values ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing sprintf() : integer formats with float values *** - --- Iteration 1 -- -string(10) "2147483648" -string(1) "d" -string(10) "2147483648" -string(1) "d" -string(11) " 2147483648" -string(11) "2147483648 " -string(11) " 2147483648" -string(11) " -2147483648" -string(10) "2147483648" -string(30) " 2147483648" -string(4) "0-9]" -string(1) "d" - --- Iteration 2 -- -string(11) "34359738369" -string(1) "d" -string(11) "34359738369" -string(1) "d" -string(12) " 34359738369" -string(12) "34359738369 " -string(12) " 34359738369" -string(12) " -34359738369" -string(11) "34359738369" -string(30) " 34359738369" -string(4) "0-9]" -string(1) "d" - --- Iteration 3 -- -string(10) "2147483649" -string(1) "d" -string(10) "2147483649" -string(1) "d" -string(11) " 2147483649" -string(11) "2147483649 " -string(11) " 2147483649" -string(11) " -2147483649" -string(10) "2147483649" -string(30) " 2147483649" -string(4) "0-9]" -string(1) "d" - --- Iteration 4 -- -string(1) "0" -string(1) "d" -string(1) "0" -string(1) "d" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "d" - --- Iteration 5 -- -string(1) "0" -string(1) "d" -string(1) "0" -string(1) "d" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "d" - --- Iteration 6 -- -string(1) "1" -string(1) "d" -string(1) "1" -string(1) "d" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "d" - --- Iteration 7 -- -string(6) "100000" -string(1) "d" -string(6) "100000" -string(1) "d" -string(7) " 100000" -string(7) "100000 " -string(7) " 100000" -string(7) " -100000" -string(6) "100000" -string(30) " 100000" -string(4) "0-9]" -string(1) "d" - --- Iteration 8 -- -string(8) "-1000000" -string(1) "d" -string(8) "-1000000" -string(1) "d" -string(9) " -1000000" -string(9) "-1000000 " -string(9) " -1000000" -string(9) " --1000000" -string(8) "-1000000" -string(30) " -1000000" -string(4) "0-9]" -string(1) "d" - --- Iteration 9 -- -string(9) "100000000" -string(1) "d" -string(9) "100000000" -string(1) "d" -string(10) " 100000000" -string(10) "100000000 " -string(10) " 100000000" -string(10) " -100000000" -string(9) "100000000" -string(30) " 100000000" -string(4) "0-9]" -string(1) "d" - --- Iteration 10 -- -string(11) "-1000000000" -string(1) "d" -string(11) "-1000000000" -string(1) "d" -string(12) " -1000000000" -string(12) "-1000000000 " -string(12) " -1000000000" -string(12) " --1000000000" -string(11) "-1000000000" -string(30) " -1000000000" -string(4) "0-9]" -string(1) "d" - --- Iteration 11 -- -string(2) "10" -string(1) "d" -string(2) "10" -string(1) "d" -string(3) " 10" -string(3) "10 " -string(3) " 10" -string(3) " -10" -string(4) " 10" -string(30) " 10" -string(4) "0-9]" -string(1) "d" - --- Iteration 12 -- -string(7) "1050000" -string(1) "d" -string(7) "1050000" -string(1) "d" -string(8) " 1050000" -string(8) "1050000 " -string(8) " 1050000" -string(8) " -1050000" -string(7) "1050000" -string(30) " 1050000" -string(4) "0-9]" -string(1) "d" -Done diff --git a/ext/standard/tests/strings/sprintf_variation5.phpt b/ext/standard/tests/strings/sprintf_variation5.phpt deleted file mode 100644 index a5cb86bddac09..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation5.phpt +++ /dev/null @@ -1,73 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - int formats with resource values ---FILE-- - ---EXPECTF-- -*** Testing sprintf() : integer formats with resource values *** - --- Iteration 1 -- -string(%d) "%d" -string(1) "d" -string(%d) " %d" -string(%d) " %d" -string(%d) " -%d" -string(%d) "%s%d" -string(%d) "0-9]" -string(1) "d" - --- Iteration 2 -- -string(%d) "%d" -string(1) "d" -string(%d) " %d" -string(%d) " %d" -string(%d) " -%d" -string(%d) "%s%d" -string(%d) "0-9]" -string(1) "d" -Done diff --git a/ext/standard/tests/strings/sprintf_variation50.phpt b/ext/standard/tests/strings/sprintf_variation50.phpt deleted file mode 100644 index ccd8bf1bd47a9..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation50.phpt +++ /dev/null @@ -1,343 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - scientific formats with string values ---FILE-- - ---EXPECT-- -*** Testing sprintf() : scientific formats with string values *** - --- Iteration 1 -- -string(11) "0.000000e+0" -string(1) "e" -string(11) "0.000000e+0" -string(1) "e" -string(12) " 0.000000e+0" -string(12) "0.000000e+0 " -string(12) " 0.000000e+0" -string(12) " -0.000000e+0" -string(11) "0.000000e+0" -string(30) " 0.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 2 -- -string(11) "0.000000e+0" -string(1) "e" -string(11) "0.000000e+0" -string(1) "e" -string(12) " 0.000000e+0" -string(12) "0.000000e+0 " -string(12) " 0.000000e+0" -string(12) " -0.000000e+0" -string(11) "0.000000e+0" -string(30) " 0.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 3 -- -string(11) "0.000000e+0" -string(1) "e" -string(11) "0.000000e+0" -string(1) "e" -string(12) " 0.000000e+0" -string(12) "0.000000e+0 " -string(12) " 0.000000e+0" -string(12) " -0.000000e+0" -string(11) "0.000000e+0" -string(30) " 0.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 4 -- -string(11) "0.000000e+0" -string(1) "e" -string(11) "0.000000e+0" -string(1) "e" -string(12) " 0.000000e+0" -string(12) "0.000000e+0 " -string(12) " 0.000000e+0" -string(12) " -0.000000e+0" -string(11) "0.000000e+0" -string(30) " 0.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 5 -- -string(11) "1.000000e+0" -string(1) "e" -string(11) "1.000000e+0" -string(1) "e" -string(12) " 1.000000e+0" -string(12) "1.000000e+0 " -string(12) " 1.000000e+0" -string(12) " -1.000000e+0" -string(11) "1.000000e+0" -string(30) " 1.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 6 -- -string(11) "1.000000e+0" -string(1) "e" -string(11) "1.000000e+0" -string(1) "e" -string(12) " 1.000000e+0" -string(12) "1.000000e+0 " -string(12) " 1.000000e+0" -string(12) " -1.000000e+0" -string(11) "1.000000e+0" -string(30) " 1.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 7 -- -string(11) "0.000000e+0" -string(1) "e" -string(11) "0.000000e+0" -string(1) "e" -string(12) " 0.000000e+0" -string(12) "0.000000e+0 " -string(12) " 0.000000e+0" -string(12) " -0.000000e+0" -string(11) "0.000000e+0" -string(30) " 0.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 8 -- -string(11) "0.000000e+0" -string(1) "e" -string(11) "0.000000e+0" -string(1) "e" -string(12) " 0.000000e+0" -string(12) "0.000000e+0 " -string(12) " 0.000000e+0" -string(12) " -0.000000e+0" -string(11) "0.000000e+0" -string(30) " 0.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 9 -- -string(11) "0.000000e+0" -string(1) "e" -string(11) "0.000000e+0" -string(1) "e" -string(12) " 0.000000e+0" -string(12) "0.000000e+0 " -string(12) " 0.000000e+0" -string(12) " -0.000000e+0" -string(11) "0.000000e+0" -string(30) " 0.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 10 -- -string(11) "0.000000e+0" -string(1) "e" -string(11) "0.000000e+0" -string(1) "e" -string(12) " 0.000000e+0" -string(12) "0.000000e+0 " -string(12) " 0.000000e+0" -string(12) " -0.000000e+0" -string(11) "0.000000e+0" -string(30) " 0.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 11 -- -string(11) "0.000000e+0" -string(1) "e" -string(11) "0.000000e+0" -string(1) "e" -string(12) " 0.000000e+0" -string(12) "0.000000e+0 " -string(12) " 0.000000e+0" -string(12) " -0.000000e+0" -string(11) "0.000000e+0" -string(30) " 0.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 12 -- -string(11) "0.000000e+0" -string(1) "e" -string(11) "0.000000e+0" -string(1) "e" -string(12) " 0.000000e+0" -string(12) "0.000000e+0 " -string(12) " 0.000000e+0" -string(12) " -0.000000e+0" -string(11) "0.000000e+0" -string(30) " 0.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 13 -- -string(11) "0.000000e+0" -string(1) "e" -string(11) "0.000000e+0" -string(1) "e" -string(12) " 0.000000e+0" -string(12) "0.000000e+0 " -string(12) " 0.000000e+0" -string(12) " -0.000000e+0" -string(11) "0.000000e+0" -string(30) " 0.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 14 -- -string(11) "0.000000e+0" -string(1) "e" -string(11) "0.000000e+0" -string(1) "e" -string(12) " 0.000000e+0" -string(12) "0.000000e+0 " -string(12) " 0.000000e+0" -string(12) " -0.000000e+0" -string(11) "0.000000e+0" -string(30) " 0.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 15 -- -string(11) "0.000000e+0" -string(1) "e" -string(11) "0.000000e+0" -string(1) "e" -string(12) " 0.000000e+0" -string(12) "0.000000e+0 " -string(12) " 0.000000e+0" -string(12) " -0.000000e+0" -string(11) "0.000000e+0" -string(30) " 0.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 16 -- -string(11) "0.000000e+0" -string(1) "e" -string(11) "0.000000e+0" -string(1) "e" -string(12) " 0.000000e+0" -string(12) "0.000000e+0 " -string(12) " 0.000000e+0" -string(12) " -0.000000e+0" -string(11) "0.000000e+0" -string(30) " 0.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 17 -- -string(11) "0.000000e+0" -string(1) "e" -string(11) "0.000000e+0" -string(1) "e" -string(12) " 0.000000e+0" -string(12) "0.000000e+0 " -string(12) " 0.000000e+0" -string(12) " -0.000000e+0" -string(11) "0.000000e+0" -string(30) " 0.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 18 -- -string(11) "0.000000e+0" -string(1) "e" -string(11) "0.000000e+0" -string(1) "e" -string(12) " 0.000000e+0" -string(12) "0.000000e+0 " -string(12) " 0.000000e+0" -string(12) " -0.000000e+0" -string(11) "0.000000e+0" -string(30) " 0.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 19 -- -string(12) "3.333333e+29" -string(1) "e" -string(12) "3.333333e+29" -string(1) "e" -string(13) " 3.333333e+29" -string(13) "3.333333e+29 " -string(13) " 3.333333e+29" -string(13) " -3.333333e+29" -string(12) "3.333333e+29" -string(30) " 3.333333e+29" -string(4) "0-1]" -string(1) "e" -Done diff --git a/ext/standard/tests/strings/sprintf_variation51.phpt b/ext/standard/tests/strings/sprintf_variation51.phpt deleted file mode 100644 index ab056b3f2f13d..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation51.phpt +++ /dev/null @@ -1,102 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - scientific formats with boolean values ---FILE-- - ---EXPECT-- -*** Testing sprintf() : scientific formats with boolean values *** - --- Iteration 1 -- -string(11) "1.000000e+0" -string(1) "e" -string(11) "1.000000e+0" -string(1) "e" -string(12) " 1.000000e+0" -string(12) "1.000000e+0 " -string(12) " 1.000000e+0" -string(12) " -1.000000e+0" -string(11) "1.000000e+0" -string(30) " 1.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 2 -- -string(11) "0.000000e+0" -string(1) "e" -string(11) "0.000000e+0" -string(1) "e" -string(12) " 0.000000e+0" -string(12) "0.000000e+0 " -string(12) " 0.000000e+0" -string(12) " -0.000000e+0" -string(11) "0.000000e+0" -string(30) " 0.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 3 -- -string(11) "1.000000e+0" -string(1) "e" -string(11) "1.000000e+0" -string(1) "e" -string(12) " 1.000000e+0" -string(12) "1.000000e+0 " -string(12) " 1.000000e+0" -string(12) " -1.000000e+0" -string(11) "1.000000e+0" -string(30) " 1.000000e+0" -string(4) "0-1]" -string(1) "e" - --- Iteration 4 -- -string(11) "0.000000e+0" -string(1) "e" -string(11) "0.000000e+0" -string(1) "e" -string(12) " 0.000000e+0" -string(12) "0.000000e+0 " -string(12) " 0.000000e+0" -string(12) " -0.000000e+0" -string(11) "0.000000e+0" -string(30) " 0.000000e+0" -string(4) "0-1]" -string(1) "e" -Done diff --git a/ext/standard/tests/strings/sprintf_variation54.phpt b/ext/standard/tests/strings/sprintf_variation54.phpt new file mode 100644 index 0000000000000000000000000000000000000000..ff00c0440a45f709b130339e82dd5d9b85c3b86e GIT binary patch literal 2252 zcmcIlTWi}e6yD`czv9eGi34_NI`-mjEu*9mb}MUPgRU6YmJ@fLlu2?gl>GM{*~hZu z_Gw)W5&n+OMc;RhoG?6{ot%at(<@a7llv3MrTU#14cCQPLRRECS6mn{w=1q$7@mBb zAJ304;@!b&xne~Q{wscCxX^_ZaVe9GXTEo-rSK*bjOV_me-$fG{7+RVuA$l5V+Z?~ z?P&gK=5n!7Tl+nnjrBNyab}mwF1cM&yWEV=_t@wvDJ#r|o}wzt0P>{NJOHCATz3O_ zv;8&zFPG8_;OrcKQ(SVn;=+$(TQ-hyUwM-N1iuDtvcodb8dEbo1y9l?`0hN326~^s z9RqwiA3BJ2sb5&4Th1dl=+MLpOCztAyCAuE+~zl}P;(~!-BsFo?_B9)nQnP8|F z{S@9_eFR&;s9QRaMfRynw%zo$Y&ohQvtw-w)NPQ(9jamNO03zMHQk>5IG!Dz+Tq!v`Lex>7<0JpV&7o<8L?^Su^X{n#wZ+{ z95GzF?YiR;worDqvvbV&JyD_%iwHg_mE3}n*m4~C1*B43ab>3$3ITX9d?^dTVJl;` zZ!gjGe`RVr9kFlJb0{)+jU}BFck76Ky}0D50hvQ;hto|d9=a+s5YoT}CkBRR9V^DN zX51QqcN`{xJA)IL0vde@H2S(=61NMs%Jz_z2U|tK9Y;%xjFuJqB2AI<2>yW{ex&ZV z32RmZx`aErWN>r|H*^WKbP0BJ$v|{lM05#m(k0_l(aksLZtv6&ez_WR%X(-h@bY}3g(i4s literal 0 HcmV?d00001 diff --git a/ext/standard/tests/strings/sprintf_variation6.phpt b/ext/standard/tests/strings/sprintf_variation6.phpt deleted file mode 100644 index 1480e45a0f229..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation6.phpt +++ /dev/null @@ -1,278 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - int formats with arrays ---FILE-- - "One", "two" => 2) -); - -// various integer formats -$int_formats = array( - "%d", "%hd", "%ld", - "%Ld", " %d", "%d ", - "\t%d", "\n%d", "%4d", - "%30d", "%[0-9]", "%*d" -); - -$count = 1; -foreach($array_types as $arr) { - echo "\n-- Iteration $count --\n"; - - foreach($int_formats as $format) { - var_dump( sprintf($format, $arr) ); - } - $count++; -}; - -echo "Done"; -?> ---EXPECT-- -*** Testing sprintf() : integer formats with arrays *** - --- Iteration 1 -- -string(1) "0" -string(1) "d" -string(1) "0" -string(1) "d" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "d" - --- Iteration 2 -- -string(1) "1" -string(1) "d" -string(1) "1" -string(1) "d" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "d" - --- Iteration 3 -- -string(1) "1" -string(1) "d" -string(1) "1" -string(1) "d" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "d" - --- Iteration 4 -- -string(1) "1" -string(1) "d" -string(1) "1" -string(1) "d" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "d" - --- Iteration 5 -- -string(1) "1" -string(1) "d" -string(1) "1" -string(1) "d" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "d" - --- Iteration 6 -- -string(1) "1" -string(1) "d" -string(1) "1" -string(1) "d" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "d" - --- Iteration 7 -- -string(1) "1" -string(1) "d" -string(1) "1" -string(1) "d" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "d" - --- Iteration 8 -- -string(1) "1" -string(1) "d" -string(1) "1" -string(1) "d" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "d" - --- Iteration 9 -- -string(1) "1" -string(1) "d" -string(1) "1" -string(1) "d" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "d" - --- Iteration 10 -- -string(1) "1" -string(1) "d" -string(1) "1" -string(1) "d" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "d" - --- Iteration 11 -- -string(1) "1" -string(1) "d" -string(1) "1" -string(1) "d" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "d" - --- Iteration 12 -- -string(1) "1" -string(1) "d" -string(1) "1" -string(1) "d" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "d" - --- Iteration 13 -- -string(1) "1" -string(1) "d" -string(1) "1" -string(1) "d" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "d" - --- Iteration 14 -- -string(1) "1" -string(1) "d" -string(1) "1" -string(1) "d" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "d" - --- Iteration 15 -- -string(1) "1" -string(1) "d" -string(1) "1" -string(1) "d" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "d" -Done diff --git a/ext/standard/tests/strings/sprintf_variation7.phpt b/ext/standard/tests/strings/sprintf_variation7.phpt deleted file mode 100644 index e910bfb687b7f..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation7.phpt +++ /dev/null @@ -1,102 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - int formats with boolean values ---FILE-- - ---EXPECT-- -*** Testing sprintf() : integer formats with boolean values *** - --- Iteration 1 -- -string(1) "1" -string(1) "d" -string(1) "1" -string(1) "d" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "d" - --- Iteration 2 -- -string(1) "0" -string(1) "d" -string(1) "0" -string(1) "d" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "d" - --- Iteration 3 -- -string(1) "1" -string(1) "d" -string(1) "1" -string(1) "d" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "d" - --- Iteration 4 -- -string(1) "0" -string(1) "d" -string(1) "0" -string(1) "d" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "d" -Done diff --git a/ext/standard/tests/strings/sprintf_variation8.phpt b/ext/standard/tests/strings/sprintf_variation8.phpt deleted file mode 100644 index c20cfcc5888df..0000000000000 --- a/ext/standard/tests/strings/sprintf_variation8.phpt +++ /dev/null @@ -1,374 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - int formats with string values ---FILE-- - ---EXPECT-- -*** Testing sprintf() : integer formats with string values *** - --- Iteration 1 -- -string(1) "0" -string(1) "d" -string(1) "0" -string(1) "d" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "d" - --- Iteration 2 -- -string(1) "0" -string(1) "d" -string(1) "0" -string(1) "d" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "d" - --- Iteration 3 -- -string(1) "0" -string(1) "d" -string(1) "0" -string(1) "d" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "d" - --- Iteration 4 -- -string(1) "0" -string(1) "d" -string(1) "0" -string(1) "d" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "d" - --- Iteration 5 -- -string(1) "1" -string(1) "d" -string(1) "1" -string(1) "d" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "d" - --- Iteration 6 -- -string(1) "1" -string(1) "d" -string(1) "1" -string(1) "d" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" -string(4) "0-9]" -string(1) "d" - --- Iteration 7 -- -string(4) "-123" -string(1) "d" -string(4) "-123" -string(1) "d" -string(5) " -123" -string(5) "-123 " -string(5) " -123" -string(5) " --123" -string(4) "-123" -string(30) " -123" -string(4) "0-9]" -string(1) "d" - --- Iteration 8 -- -string(3) "123" -string(1) "d" -string(3) "123" -string(1) "d" -string(4) " 123" -string(4) "123 " -string(4) " 123" -string(4) " -123" -string(4) " 123" -string(30) " 123" -string(4) "0-9]" -string(1) "d" - --- Iteration 9 -- -string(3) "123" -string(1) "d" -string(3) "123" -string(1) "d" -string(4) " 123" -string(4) "123 " -string(4) " 123" -string(4) " -123" -string(4) " 123" -string(30) " 123" -string(4) "0-9]" -string(1) "d" - --- Iteration 10 -- -string(1) "0" -string(1) "d" -string(1) "0" -string(1) "d" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "d" - --- Iteration 11 -- -string(1) "0" -string(1) "d" -string(1) "0" -string(1) "d" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "d" - --- Iteration 12 -- -string(1) "0" -string(1) "d" -string(1) "0" -string(1) "d" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "d" - --- Iteration 13 -- -string(1) "0" -string(1) "d" -string(1) "0" -string(1) "d" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "d" - --- Iteration 14 -- -string(1) "0" -string(1) "d" -string(1) "0" -string(1) "d" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "d" - --- Iteration 15 -- -string(1) "0" -string(1) "d" -string(1) "0" -string(1) "d" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "d" - --- Iteration 16 -- -string(1) "0" -string(1) "d" -string(1) "0" -string(1) "d" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "d" - --- Iteration 17 -- -string(1) "0" -string(1) "d" -string(1) "0" -string(1) "d" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "d" - --- Iteration 18 -- -string(1) "0" -string(1) "d" -string(1) "0" -string(1) "d" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "d" - --- Iteration 19 -- -string(1) "0" -string(1) "d" -string(1) "0" -string(1) "d" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "d" - --- Iteration 20 -- -string(1) "0" -string(1) "d" -string(1) "0" -string(1) "d" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "d" - --- Iteration 21 -- -string(1) "0" -string(1) "d" -string(1) "0" -string(1) "d" -string(2) " 0" -string(2) "0 " -string(2) " 0" -string(2) " -0" -string(4) " 0" -string(30) " 0" -string(4) "0-9]" -string(1) "d" -Done From f6455c504813dfec9ef1fbfdf88c9d5f4e164876 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 21 Apr 2020 18:18:21 +0200 Subject: [PATCH 222/338] Emit diagnostic on unknown printf specifier Removing lots of bogus tests... Closes GH-5435. --- ext/standard/formatted_print.c | 3 +- ext/standard/tests/strings/printf.phpt | 10 +- ext/standard/tests/strings/printf_64bit.phpt | 8 +- .../tests/strings/sprintf_variation10.phpt | 78 +---------- .../tests/strings/sprintf_variation15.phpt | Bin 7412 -> 5922 bytes .../tests/strings/sprintf_variation27.phpt | Bin 2687 -> 2043 bytes .../tests/strings/sprintf_variation28.phpt | 78 +---------- .../strings/sprintf_variation28_64bit.phpt | 78 +---------- .../tests/strings/sprintf_variation3.phpt | 78 +---------- .../tests/strings/sprintf_variation34.phpt | 60 +-------- .../strings/sprintf_variation34_64bit.phpt | 60 +-------- .../tests/strings/sprintf_variation40.phpt | 78 +---------- .../strings/sprintf_variation40_64bit.phpt | 78 +---------- .../tests/strings/sprintf_variation46.phpt | 78 +---------- .../tests/strings/sprintf_variation47.phpt | 82 +----------- .../tests/strings/sprintf_variation52.phpt | 8 +- .../tests/strings/sprintf_variation9.phpt | 126 +----------------- .../tests/strings/vfprintf_error3.phpt | 10 +- .../tests/strings/vprintf_variation10.phpt | Bin 2748 -> 2692 bytes .../tests/strings/vprintf_variation11.phpt | 24 ++-- .../strings/vprintf_variation11_64bit.phpt | 24 ++-- .../tests/strings/vprintf_variation12.phpt | 32 ++--- .../strings/vprintf_variation12_64bit.phpt | 32 ++--- .../tests/strings/vprintf_variation13.phpt | 10 +- .../strings/vprintf_variation13_64bit.phpt | 10 +- .../tests/strings/vprintf_variation14.phpt | 12 +- .../strings/vprintf_variation14_64bit.phpt | 32 ++--- .../tests/strings/vprintf_variation15.phpt | 8 +- .../strings/vprintf_variation15_64bit.phpt | 8 +- .../tests/strings/vprintf_variation16.phpt | 28 ++-- .../strings/vprintf_variation16_64bit.phpt | 28 ++-- .../tests/strings/vprintf_variation17.phpt | 8 +- .../tests/strings/vprintf_variation18.phpt | 26 ++-- .../tests/strings/vprintf_variation3.phpt | 16 +-- .../tests/strings/vprintf_variation4.phpt | 26 ++-- .../strings/vprintf_variation4_64bit.phpt | 26 ++-- .../tests/strings/vprintf_variation5.phpt | 8 +- .../tests/strings/vprintf_variation6.phpt | 26 ++-- .../tests/strings/vprintf_variation7.phpt | Bin 2204 -> 2167 bytes .../tests/strings/vprintf_variation8.phpt | 26 ++-- .../tests/strings/vprintf_variation9.phpt | Bin 1668 -> 1647 bytes 41 files changed, 255 insertions(+), 1068 deletions(-) diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c index 1385edf52d193..5c67776f5b214 100644 --- a/ext/standard/formatted_print.c +++ b/ext/standard/formatted_print.c @@ -621,7 +621,8 @@ php_formatted_print(char *format, size_t format_len, zval *args, int argc, int n break; default: - break; + zend_value_error("Unknown format specifier '%c'", *format); + goto fail; } format++; format_len--; diff --git a/ext/standard/tests/strings/printf.phpt b/ext/standard/tests/strings/printf.phpt index c409d1a8f9f8d..9d0b88e121c1b 100644 --- a/ext/standard/tests/strings/printf.phpt +++ b/ext/standard/tests/strings/printf.phpt @@ -5,7 +5,7 @@ precision=14 --SKIPIF-- 2147483647) { - die("skip 32bit test only"); + die("skip 32bit test only"); } ?> --FILE-- @@ -207,7 +207,11 @@ echo"\n\n*** Output for precision value more than maximum ***\n"; printf("%.988f",1.23456789e10); echo"\n\n*** Output for invalid width(-15) specifier ***\n"; -printf("%030.-15s", $tempstring); +try { + printf("%030.-15s", $tempstring); +} catch (ValueError $e) { + echo $e->getMessage(); +} echo"\n\n*** Output for '%F' as the format parameter ***\n"; printf("%F",1.23456789e10); @@ -679,7 +683,7 @@ Notice: printf(): Requested precision of 988 digits was truncated to PHP maximum 12345678900.00000000000000000000000000000000000000000000000000000 *** Output for invalid width(-15) specifier *** -15s +Unknown format specifier '-' *** Output for '%F' as the format parameter *** 12345678900.000000 diff --git a/ext/standard/tests/strings/printf_64bit.phpt b/ext/standard/tests/strings/printf_64bit.phpt index 9d3b448495800..2990bd8570947 100644 --- a/ext/standard/tests/strings/printf_64bit.phpt +++ b/ext/standard/tests/strings/printf_64bit.phpt @@ -207,7 +207,11 @@ echo"\n\n*** Output for precision value more than maximum ***\n"; printf("%.988f",1.23456789e10); echo"\n\n*** Output for invalid width(-15) specifier ***\n"; -printf("%030.-15s", $tempstring); +try { + printf("%030.-15s", $tempstring); +} catch (ValueError $e) { + echo $e->getMessage(); +} echo"\n\n*** Output for '%F' as the format parameter ***\n"; printf("%F",1.23456789e10); @@ -679,7 +683,7 @@ Notice: printf(): Requested precision of 988 digits was truncated to PHP maximum 12345678900.0000000000%d *** Output for invalid width(-15) specifier *** -15s +Unknown format specifier '-' *** Output for '%F' as the format parameter *** 12345678900.000000 diff --git a/ext/standard/tests/strings/sprintf_variation10.phpt b/ext/standard/tests/strings/sprintf_variation10.phpt index c298b083bc87e..796cb91a0390d 100644 --- a/ext/standard/tests/strings/sprintf_variation10.phpt +++ b/ext/standard/tests/strings/sprintf_variation10.phpt @@ -33,10 +33,8 @@ $integer_values = array ( // various float formats $float_formats = array( - "%f", "%hf", "%lf", - "%Lf", " %f", "%f ", - "\t%f", "\n%f", "%4f", - "%30f", "%[0-9]", "%*f" + "%f", "%lf", " %f", "%f ", + "\t%f", "\n%f", "%4f", "%30f", ); $count = 1; @@ -57,9 +55,7 @@ echo "Done"; -- Iteration 1 -- string(8) "0.000000" -string(1) "f" string(8) "0.000000" -string(1) "f" string(9) " 0.000000" string(9) "0.000000 " string(9) " 0.000000" @@ -67,14 +63,10 @@ string(9) " 0.000000" string(8) "0.000000" string(30) " 0.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 2 -- string(8) "1.000000" -string(1) "f" string(8) "1.000000" -string(1) "f" string(9) " 1.000000" string(9) "1.000000 " string(9) " 1.000000" @@ -82,14 +74,10 @@ string(9) " 1.000000" string(8) "1.000000" string(30) " 1.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 3 -- string(9) "-1.000000" -string(1) "f" string(9) "-1.000000" -string(1) "f" string(10) " -1.000000" string(10) "-1.000000 " string(10) " -1.000000" @@ -97,14 +85,10 @@ string(10) " -1.000000" string(9) "-1.000000" string(30) " -1.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 4 -- string(18) "-2147483648.000000" -string(1) "f" string(18) "-2147483648.000000" -string(1) "f" string(19) " -2147483648.000000" string(19) "-2147483648.000000 " string(19) " -2147483648.000000" @@ -112,14 +96,10 @@ string(19) " -2147483648.000000" string(18) "-2147483648.000000" string(30) " -2147483648.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 5 -- string(18) "-2147483647.000000" -string(1) "f" string(18) "-2147483647.000000" -string(1) "f" string(19) " -2147483647.000000" string(19) "-2147483647.000000 " string(19) " -2147483647.000000" @@ -127,14 +107,10 @@ string(19) " -2147483647.000000" string(18) "-2147483647.000000" string(30) " -2147483647.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 6 -- string(17) "2147483647.000000" -string(1) "f" string(17) "2147483647.000000" -string(1) "f" string(18) " 2147483647.000000" string(18) "2147483647.000000 " string(18) " 2147483647.000000" @@ -142,14 +118,10 @@ string(18) " 2147483647.000000" string(17) "2147483647.000000" string(30) " 2147483647.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 7 -- string(17) "2147483640.000000" -string(1) "f" string(17) "2147483640.000000" -string(1) "f" string(18) " 2147483640.000000" string(18) "2147483640.000000 " string(18) " 2147483640.000000" @@ -157,14 +129,10 @@ string(18) " 2147483640.000000" string(17) "2147483640.000000" string(30) " 2147483640.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 8 -- string(11) "4667.000000" -string(1) "f" string(11) "4667.000000" -string(1) "f" string(12) " 4667.000000" string(12) "4667.000000 " string(12) " 4667.000000" @@ -172,14 +140,10 @@ string(12) " 4667.000000" string(11) "4667.000000" string(30) " 4667.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 9 -- string(11) "4779.000000" -string(1) "f" string(11) "4779.000000" -string(1) "f" string(12) " 4779.000000" string(12) "4779.000000 " string(12) " 4779.000000" @@ -187,14 +151,10 @@ string(12) " 4779.000000" string(11) "4779.000000" string(30) " 4779.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 10 -- string(11) "4095.000000" -string(1) "f" string(11) "4095.000000" -string(1) "f" string(12) " 4095.000000" string(12) "4095.000000 " string(12) " 4095.000000" @@ -202,14 +162,10 @@ string(12) " 4095.000000" string(11) "4095.000000" string(30) " 4095.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 11 -- string(10) "250.000000" -string(1) "f" string(10) "250.000000" -string(1) "f" string(11) " 250.000000" string(11) "250.000000 " string(11) " 250.000000" @@ -217,14 +173,10 @@ string(11) " 250.000000" string(10) "250.000000" string(30) " 250.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 12 -- string(18) "-2147483648.000000" -string(1) "f" string(18) "-2147483648.000000" -string(1) "f" string(19) " -2147483648.000000" string(19) "-2147483648.000000 " string(19) " -2147483648.000000" @@ -232,14 +184,10 @@ string(19) " -2147483648.000000" string(18) "-2147483648.000000" string(30) " -2147483648.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 13 -- string(17) "2147483647.000000" -string(1) "f" string(17) "2147483647.000000" -string(1) "f" string(18) " 2147483647.000000" string(18) "2147483647.000000 " string(18) " 2147483647.000000" @@ -247,14 +195,10 @@ string(18) " 2147483647.000000" string(17) "2147483647.000000" string(30) " 2147483647.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 14 -- string(17) "2147483647.000000" -string(1) "f" string(17) "2147483647.000000" -string(1) "f" string(18) " 2147483647.000000" string(18) "2147483647.000000 " string(18) " 2147483647.000000" @@ -262,14 +206,10 @@ string(18) " 2147483647.000000" string(17) "2147483647.000000" string(30) " 2147483647.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 15 -- string(9) "83.000000" -string(1) "f" string(9) "83.000000" -string(1) "f" string(10) " 83.000000" string(10) "83.000000 " string(10) " 83.000000" @@ -277,14 +217,10 @@ string(10) " 83.000000" string(9) "83.000000" string(30) " 83.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 16 -- string(8) "1.000000" -string(1) "f" string(8) "1.000000" -string(1) "f" string(9) " 1.000000" string(9) "1.000000 " string(9) " 1.000000" @@ -292,14 +228,10 @@ string(9) " 1.000000" string(8) "1.000000" string(30) " 1.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 17 -- string(18) "-2147483648.000000" -string(1) "f" string(18) "-2147483648.000000" -string(1) "f" string(19) " -2147483648.000000" string(19) "-2147483648.000000 " string(19) " -2147483648.000000" @@ -307,14 +239,10 @@ string(19) " -2147483648.000000" string(18) "-2147483648.000000" string(30) " -2147483648.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 18 -- string(17) "2147483647.000000" -string(1) "f" string(17) "2147483647.000000" -string(1) "f" string(18) " 2147483647.000000" string(18) "2147483647.000000 " string(18) " 2147483647.000000" @@ -322,6 +250,4 @@ string(18) " 2147483647.000000" string(17) "2147483647.000000" string(30) " 2147483647.000000" -string(4) "0-9]" -string(1) "f" Done diff --git a/ext/standard/tests/strings/sprintf_variation15.phpt b/ext/standard/tests/strings/sprintf_variation15.phpt index d908d40632e0d401af360bc38359b647a40588d3..07774a92ecf0408df9fc189a387a123fe9edf226 100644 GIT binary patch delta 316 zcmY+rjbU9G|=aXoeQp{i&?Qk3`Q&0_F zV;v4vK{0OfqIw*~1qIFbxbK?7t)}p(wb;}hdb+~B-lAcYg42_BZq;RA?6YhN-c5tP z*`c0r0<)YZ_LxdKJSRKu<0=t1C>hy$+PU$#A*7&rb&U7^VrF-(v3qO>b3J6GEi1M$3)`X%g0H9=4+g~ zQ2XwQNkLiMT&bHzyq_{k%vfU zALG$y0;Z?iJW{}9@r{SbWRcIS4^%#pR~+ir`MgAGl;G2Wr6*lJm~Jn=dg6R~oDb&H zH+(Rk{^cXmr%n9&vc*csdBOsPS3G$WKasxB7J#L)Kmk~EB?}N4U2g?o2}Mv)5*mJr zg3ZK*z#>6A7I1E^64Hd~{U&&6a*Ys&4BpItOeg@VTtLJI!rJU0Y{590UzlAMf4Na6 x;sn*YUIZ5WS43V<&J!i1bFZitEV9WcuM)&ywxQ%kZCIg(&%a7sF8O(>TmbumgBbt- diff --git a/ext/standard/tests/strings/sprintf_variation27.phpt b/ext/standard/tests/strings/sprintf_variation27.phpt index 0dc39db05d8dbf1ed85e1393b9d4507c3c90c669..746a6074e3c4ec7a9ac516ea1a38ef6e1a351452 100644 GIT binary patch delta 135 zcmew_@|%Cd3r5DA$v+vjI24prjSZ5ObT+#%c`#05;hJp088}&sMF+XM(A G$^`(z-zPQz delta 449 zcmey(|6gRo3r4|=WF;L1CDj}t#iamb_)LDusHF&I8XG|5q7!wK9Ce)>lvUJX!HTt# zl{QN=c`!~s$;vl5j-8J&d2%0H)Z`7!9Q=lw3Q9=IC!b=Kn|y{@j!2ckED)8uSwLnM zu|!SY$AaC=TTqp+z$$+NRldccGLcnday8JM)vWQ8&#+=M&4x(V<+Bm%k8eb)tYyby brV3gpDsdH;6lLb6YkgetMessage(), "\n"; +} echo"\n-- Testing for '%X' as the format parameter --\n"; var_dump(sprintf("%X", 12)); @@ -51,7 +55,7 @@ Notice: sprintf(): Requested precision of 988 digits was truncated to PHP maximu string(65) "12345678900.00000000000000000000000000000000000000000000000000000" -- Testing for invalid width(-15) specifier -- -string(3) "15s" +Unknown format specifier '-' -- Testing for '%X' as the format parameter -- string(1) "C" diff --git a/ext/standard/tests/strings/sprintf_variation9.phpt b/ext/standard/tests/strings/sprintf_variation9.phpt index d0f9632c98fab..59d73484264a2 100644 --- a/ext/standard/tests/strings/sprintf_variation9.phpt +++ b/ext/standard/tests/strings/sprintf_variation9.phpt @@ -46,10 +46,8 @@ $float_values = array ( // various float formats $float_formats = array( - "%f", "%hf", "%lf", - "%Lf", " %f", "%f ", - "\t%f", "\n%f", "%4f", - "%30f", "%[0-9]", "%*f", + "%f", "%lf", " %f", "%f ", + "\t%f", "\n%f", "%4f", "%30f", ); $count = 1; @@ -69,9 +67,7 @@ echo "Done"; -- Iteration 1 -- string(18) "-2147483649.000000" -string(1) "f" string(18) "-2147483649.000000" -string(1) "f" string(19) " -2147483649.000000" string(19) "-2147483649.000000 " string(19) " -2147483649.000000" @@ -79,14 +75,10 @@ string(19) " -2147483649.000000" string(18) "-2147483649.000000" string(30) " -2147483649.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 2 -- string(17) "2147483648.000000" -string(1) "f" string(17) "2147483648.000000" -string(1) "f" string(18) " 2147483648.000000" string(18) "2147483648.000000 " string(18) " 2147483648.000000" @@ -94,14 +86,10 @@ string(18) " 2147483648.000000" string(17) "2147483648.000000" string(30) " 2147483648.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 3 -- string(18) "-2147483649.000000" -string(1) "f" string(18) "-2147483649.000000" -string(1) "f" string(19) " -2147483649.000000" string(19) "-2147483649.000000 " string(19) " -2147483649.000000" @@ -109,14 +97,10 @@ string(19) " -2147483649.000000" string(18) "-2147483649.000000" string(30) " -2147483649.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 4 -- string(18) "34359738369.000000" -string(1) "f" string(18) "34359738369.000000" -string(1) "f" string(19) " 34359738369.000000" string(19) "34359738369.000000 " string(19) " 34359738369.000000" @@ -124,14 +108,10 @@ string(19) " 34359738369.000000" string(18) "34359738369.000000" string(30) " 34359738369.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 5 -- string(17) "2147483649.000000" -string(1) "f" string(17) "2147483649.000000" -string(1) "f" string(18) " 2147483649.000000" string(18) "2147483649.000000 " string(18) " 2147483649.000000" @@ -139,14 +119,10 @@ string(18) " 2147483649.000000" string(17) "2147483649.000000" string(30) " 2147483649.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 6 -- string(18) "-2147483649.000000" -string(1) "f" string(18) "-2147483649.000000" -string(1) "f" string(19) " -2147483649.000000" string(19) "-2147483649.000000 " string(19) " -2147483649.000000" @@ -154,14 +130,10 @@ string(19) " -2147483649.000000" string(18) "-2147483649.000000" string(30) " -2147483649.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 7 -- string(8) "0.000000" -string(1) "f" string(8) "0.000000" -string(1) "f" string(9) " 0.000000" string(9) "0.000000 " string(9) " 0.000000" @@ -169,14 +141,10 @@ string(9) " 0.000000" string(8) "0.000000" string(30) " 0.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 8 -- string(9) "-0.100000" -string(1) "f" string(9) "-0.100000" -string(1) "f" string(10) " -0.100000" string(10) "-0.100000 " string(10) " -0.100000" @@ -184,14 +152,10 @@ string(10) " -0.100000" string(9) "-0.100000" string(30) " -0.100000" -string(4) "0-9]" -string(1) "f" -- Iteration 9 -- string(9) "10.000000" -string(1) "f" string(9) "10.000000" -string(1) "f" string(10) " 10.000000" string(10) "10.000000 " string(10) " 10.000000" @@ -199,14 +163,10 @@ string(10) " 10.000000" string(9) "10.000000" string(30) " 10.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 10 -- string(14) "1050000.000000" -string(1) "f" string(14) "1050000.000000" -string(1) "f" string(15) " 1050000.000000" string(15) "1050000.000000 " string(15) " 1050000.000000" @@ -214,14 +174,10 @@ string(15) " 1050000.000000" string(14) "1050000.000000" string(30) " 1050000.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 11 -- string(13) "100000.000000" -string(1) "f" string(13) "100000.000000" -string(1) "f" string(14) " 100000.000000" string(14) "100000.000000 " string(14) " 100000.000000" @@ -229,14 +185,10 @@ string(14) " 100000.000000" string(13) "100000.000000" string(30) " 100000.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 12 -- string(14) "-100000.000000" -string(1) "f" string(14) "-100000.000000" -string(1) "f" string(15) " -100000.000000" string(15) "-100000.000000 " string(15) " -100000.000000" @@ -244,14 +196,10 @@ string(15) " -100000.000000" string(14) "-100000.000000" string(30) " -100000.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 13 -- string(8) "0.000010" -string(1) "f" string(8) "0.000010" -string(1) "f" string(9) " 0.000010" string(9) "0.000010 " string(9) " 0.000010" @@ -259,14 +207,10 @@ string(9) " 0.000010" string(8) "0.000010" string(30) " 0.000010" -string(4) "0-9]" -string(1) "f" -- Iteration 14 -- string(9) "-0.000010" -string(1) "f" string(9) "-0.000010" -string(1) "f" string(10) " -0.000010" string(10) "-0.000010 " string(10) " -0.000010" @@ -274,14 +218,10 @@ string(10) " -0.000010" string(9) "-0.000010" string(30) " -0.000010" -string(4) "0-9]" -string(1) "f" -- Iteration 15 -- string(13) "100000.000000" -string(1) "f" string(13) "100000.000000" -string(1) "f" string(14) " 100000.000000" string(14) "100000.000000 " string(14) " 100000.000000" @@ -289,14 +229,10 @@ string(14) " 100000.000000" string(13) "100000.000000" string(30) " 100000.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 16 -- string(14) "-100000.000000" -string(1) "f" string(14) "-100000.000000" -string(1) "f" string(15) " -100000.000000" string(15) "-100000.000000 " string(15) " -100000.000000" @@ -304,14 +240,10 @@ string(15) " -100000.000000" string(14) "-100000.000000" string(30) " -100000.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 17 -- string(13) "100000.000000" -string(1) "f" string(13) "100000.000000" -string(1) "f" string(14) " 100000.000000" string(14) "100000.000000 " string(14) " 100000.000000" @@ -319,14 +251,10 @@ string(14) " 100000.000000" string(13) "100000.000000" string(30) " 100000.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 18 -- string(14) "-100000.000000" -string(1) "f" string(14) "-100000.000000" -string(1) "f" string(15) " -100000.000000" string(15) "-100000.000000 " string(15) " -100000.000000" @@ -334,14 +262,10 @@ string(15) " -100000.000000" string(14) "-100000.000000" string(30) " -100000.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 19 -- string(13) "100000.000000" -string(1) "f" string(13) "100000.000000" -string(1) "f" string(14) " 100000.000000" string(14) "100000.000000 " string(14) " 100000.000000" @@ -349,14 +273,10 @@ string(14) " 100000.000000" string(13) "100000.000000" string(30) " 100000.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 20 -- string(14) "-100000.000000" -string(1) "f" string(14) "-100000.000000" -string(1) "f" string(15) " -100000.000000" string(15) "-100000.000000 " string(15) " -100000.000000" @@ -364,14 +284,10 @@ string(15) " -100000.000000" string(14) "-100000.000000" string(30) " -100000.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 21 -- string(8) "0.000010" -string(1) "f" string(8) "0.000010" -string(1) "f" string(9) " 0.000010" string(9) "0.000010 " string(9) " 0.000010" @@ -379,14 +295,10 @@ string(9) " 0.000010" string(8) "0.000010" string(30) " 0.000010" -string(4) "0-9]" -string(1) "f" -- Iteration 22 -- string(9) "-0.000010" -string(1) "f" string(9) "-0.000010" -string(1) "f" string(10) " -0.000010" string(10) "-0.000010 " string(10) " -0.000010" @@ -394,14 +306,10 @@ string(10) " -0.000010" string(9) "-0.000010" string(30) " -0.000010" -string(4) "0-9]" -string(1) "f" -- Iteration 23 -- string(14) "5000000.000000" -string(1) "f" string(14) "5000000.000000" -string(1) "f" string(15) " 5000000.000000" string(15) "5000000.000000 " string(15) " 5000000.000000" @@ -409,14 +317,10 @@ string(15) " 5000000.000000" string(14) "5000000.000000" string(30) " 5000000.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 24 -- string(15) "-5000000.000000" -string(1) "f" string(15) "-5000000.000000" -string(1) "f" string(16) " -5000000.000000" string(16) "-5000000.000000 " string(16) " -5000000.000000" @@ -424,14 +328,10 @@ string(16) " -5000000.000000" string(15) "-5000000.000000" string(30) " -5000000.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 25 -- string(8) "0.000000" -string(1) "f" string(8) "0.000000" -string(1) "f" string(9) " 0.000000" string(9) "0.000000 " string(9) " 0.000000" @@ -439,14 +339,10 @@ string(9) " 0.000000" string(8) "0.000000" string(30) " 0.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 26 -- string(9) "-0.000000" -string(1) "f" string(9) "-0.000000" -string(1) "f" string(10) " -0.000000" string(10) "-0.000000 " string(10) " -0.000000" @@ -454,14 +350,10 @@ string(10) " -0.000000" string(9) "-0.000000" string(30) " -0.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 27 -- string(50) "5000000000000000069686058479707049565356032.000000" -string(1) "f" string(50) "5000000000000000069686058479707049565356032.000000" -string(1) "f" string(51) " 5000000000000000069686058479707049565356032.000000" string(51) "5000000000000000069686058479707049565356032.000000 " string(51) " 5000000000000000069686058479707049565356032.000000" @@ -469,14 +361,10 @@ string(51) " 5000000000000000069686058479707049565356032.000000" string(50) "5000000000000000069686058479707049565356032.000000" string(50) "5000000000000000069686058479707049565356032.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 28 -- string(51) "-5000000000000000069686058479707049565356032.000000" -string(1) "f" string(51) "-5000000000000000069686058479707049565356032.000000" -string(1) "f" string(52) " -5000000000000000069686058479707049565356032.000000" string(52) "-5000000000000000069686058479707049565356032.000000 " string(52) " -5000000000000000069686058479707049565356032.000000" @@ -484,14 +372,10 @@ string(52) " -5000000000000000069686058479707049565356032.000000" string(51) "-5000000000000000069686058479707049565356032.000000" string(51) "-5000000000000000069686058479707049565356032.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 29 -- string(8) "0.000000" -string(1) "f" string(8) "0.000000" -string(1) "f" string(9) " 0.000000" string(9) "0.000000 " string(9) " 0.000000" @@ -499,14 +383,10 @@ string(9) " 0.000000" string(8) "0.000000" string(30) " 0.000000" -string(4) "0-9]" -string(1) "f" -- Iteration 30 -- string(9) "-0.000000" -string(1) "f" string(9) "-0.000000" -string(1) "f" string(10) " -0.000000" string(10) "-0.000000 " string(10) " -0.000000" @@ -514,6 +394,4 @@ string(10) " -0.000000" string(9) "-0.000000" string(30) " -0.000000" -string(4) "0-9]" -string(1) "f" Done diff --git a/ext/standard/tests/strings/vfprintf_error3.phpt b/ext/standard/tests/strings/vfprintf_error3.phpt index 16dba223c3a38..e409f8741b635 100644 --- a/ext/standard/tests/strings/vfprintf_error3.phpt +++ b/ext/standard/tests/strings/vfprintf_error3.phpt @@ -23,7 +23,11 @@ try { echo $exception->getMessage() . "\n"; } -var_dump( vfprintf( $fp, "Foo %y fake", "not available" ) ); +try { + var_dump( vfprintf( $fp, "Foo %y fake", "not available" ) ); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} rewind( $fp ); var_dump( stream_get_contents( $fp ) ); @@ -44,5 +48,5 @@ unlink( $file ); --EXPECT-- -- Testing vfprintf() function with wrong variable types as argument -- vfprintf(): Argument #2 ($format) must be of type string, array given -int(9) -string(9) "Foo fake" +Unknown format specifier 'y' +string(0) "" diff --git a/ext/standard/tests/strings/vprintf_variation10.phpt b/ext/standard/tests/strings/vprintf_variation10.phpt index a69a8b27b536c0c436824ccdf7007b446885e533..56a964a89f1486b022547fd4d9cfcd877ddc35f4 100644 GIT binary patch delta 121 zcmdlZ+9J9^iD|PMQxN0idglF;U0CLCe$OJqxLJ}-pK-G{J0H{JXihCg^T}-6Og|iHXr?vpiEMBctx*Jm#Z7QjcW`my)58aYkxRPQKFS3oLSsEI_XM<|nL{ zjEn}GrP&3T7?US!acVPKP7dQ#0J9Z%Rw_6u?B~kNE735qoV*Y$d;qNE4VcZ%1yXL# O1yUZyrOj-q$prw7IUw5r diff --git a/ext/standard/tests/strings/vprintf_variation11.phpt b/ext/standard/tests/strings/vprintf_variation11.phpt index 21b6a27a55b14..b05d8ac681987 100644 --- a/ext/standard/tests/strings/vprintf_variation11.phpt +++ b/ext/standard/tests/strings/vprintf_variation11.phpt @@ -21,12 +21,12 @@ echo "*** Testing vprintf() : octal formats with octal values ***\n"; // defining array of octal formats $formats = array( "%o", - "%+o %-o %O", - "%lo %Lo, %4o %-4o", + "%+o %-o", + "%lo %4o %-4o", "%10.4o %-10.4o %04o %04.4o", "%'#2o %'2o %'$2o %'_2o", "%o %o %o %o", - "%% %%o %10 o%", + "%% %%o %10", '%3$o %4$o %1$o %2$o' ); @@ -34,12 +34,12 @@ $formats = array( // Each sub array contains octal values which correspond to each format string in $format $args_array = array( array(00), - array(-01, 01, +022), - array(-020000000000, 020000000000, 017777777777, -017777777777), + array(-01, 01), + array(-020000000000, 017777777777, -017777777777), array(0123456, 01234567, -01234567, 01234567), array(0111, 02222, -0333333, -044444444), array(0x123b, 0xfAb, 0123, 012), - array(01234, 0567, -01234, 02345), + array(01234, 0567, -01234), array(03, 04, 01, 02) ); @@ -64,12 +64,12 @@ foreach($formats as $format) { int(1) -- Iteration 2 -- -37777777777 1 -int(14) +37777777777 1 +int(13) -- Iteration 3 -- -20000000000 o, 17777777777 20000000001 -int(38) +20000000000 17777777777 20000000001 +int(35) -- Iteration 4 -- 37776543211 0000 @@ -84,8 +84,8 @@ int(32) int(17) -- Iteration 7 -- -% %o o -int(6) +% %o +int(5) -- Iteration 8 -- 1 2 3 4 diff --git a/ext/standard/tests/strings/vprintf_variation11_64bit.phpt b/ext/standard/tests/strings/vprintf_variation11_64bit.phpt index e2ffb93ac4cbe..46800e820a886 100644 --- a/ext/standard/tests/strings/vprintf_variation11_64bit.phpt +++ b/ext/standard/tests/strings/vprintf_variation11_64bit.phpt @@ -21,12 +21,12 @@ echo "*** Testing vprintf() : octal formats with octal values ***\n"; // defining array of octal formats $formats = array( "%o", - "%+o %-o %O", - "%lo %Lo, %4o %-4o", + "%+o %-o", + "%lo %4o %-4o", "%10.4o %-10.4o %04o %04.4o", "%'#2o %'2o %'$2o %'_2o", "%o %o %o %o", - "%% %%o %10 o%", + "%% %%o %10", '%3$o %4$o %1$o %2$o' ); @@ -34,12 +34,12 @@ $formats = array( // Each sub array contains octal values which correspond to each format string in $format $args_array = array( array(00), - array(-01, 01, +022), - array(-020000000000, 020000000000, 017777777777, -017777777777), + array(-01, 01), + array(-020000000000, 017777777777, -017777777777), array(0123456, 01234567, -01234567, 01234567), array(0111, 02222, -0333333, -044444444), array(0x123b, 0xfAb, 0123, 012), - array(01234, 0567, -01234, 02345), + array(01234, 0567, -01234), array(03, 04, 01, 02) ); @@ -64,12 +64,12 @@ foreach($formats as $format) { int(1) -- Iteration 2 -- -1777777777777777777777 1 -int(25) +1777777777777777777777 1 +int(24) -- Iteration 3 -- -1777777777760000000000 o, 17777777777 1777777777760000000001 -int(60) +1777777777760000000000 17777777777 1777777777760000000001 +int(57) -- Iteration 4 -- 1777777777777776543211 0000 @@ -84,8 +84,8 @@ int(54) int(17) -- Iteration 7 -- -% %o o -int(6) +% %o +int(5) -- Iteration 8 -- 1 2 3 4 diff --git a/ext/standard/tests/strings/vprintf_variation12.phpt b/ext/standard/tests/strings/vprintf_variation12.phpt index 4f8a9b05a7048..3bd79f9226934 100644 --- a/ext/standard/tests/strings/vprintf_variation12.phpt +++ b/ext/standard/tests/strings/vprintf_variation12.phpt @@ -21,7 +21,7 @@ echo "*** Testing vprintf() : octal formats and non-octal values ***\n"; // defining array of octal formats $formats = '%o %+o %-o - %lo %Lo %4o %-4o + %lo %4o %-4o %10.4o %-10.4o %.4o %\'#2o %\'2o %\'$2o %\'_2o %3$o %4$o %1$o %2$o'; @@ -32,35 +32,35 @@ $args_array = array( // array of float values array(2.2, .2, 10.2, - 123456.234, 123456.234, -1234.6789, +1234.6789, + 123456.234, -1234.6789, +1234.6789, 2e10, +2e12, 22e+12, 12345.780, 12.000000011111, -12.00000111111, -123456.234, 3.33, +4.44, 1.11,-2.22 ), // array of int values array(2, -2, +2, - 123456, 123456234, -12346789, +12346789, + 123456, -12346789, +12346789, 123200, +20000, 22212, 12345780, 1211111, -12111111, -12345634, 3, +4, 1,-2 ), // array of strings array(" ", ' ', 'hello', - '123hello', "123hello", '-123hello', '+123hello', + '123hello', '-123hello', '+123hello', "\12345678hello", "-\12345678hello", 'h123456ello', "1234hello", "hello\0world", "NULL", "true", "3", "4", '1', '2'), // different arrays array( array(0), array(1, 2), array(-1, -1), - array("123"), array('123'), array('-123'), array("-123"), + array("123"), array('-123'), array("-123"), array(true), array(false), array(FALSE), array("123hello"), array("1", "2"), array('123hello'), array(12=>"12twelve"), array("3"), array("4"), array("1"), array("2") ), // array of boolean data array( true, TRUE, false, - TRUE, 0, FALSE, 1, + TRUE, FALSE, 1, true, false, TRUE, 0, 1, 1, 0, 1, TRUE, 0, FALSE), @@ -84,40 +84,40 @@ foreach($args_array as $args) { -- Iteration 1 -- 2 0 12 - 361100 o 37777775456 2322 + 361100 37777775456 2322 30071 14 37777777764 37777416700 12 361100 2 0 -int(114) +int(112) -- Iteration 2 -- 2 37777777776 2 - 361100 o 37720715133 57062645 + 361100 37720715133 57062645 57060664 4475347 37721631371 37720717336 2 361100 2 37777777776 -int(144) +int(142) -- Iteration 3 -- 0 0 0 - 173 o 37777777605 173 + 173 37777777605 173 2322 0 $0 _0 0 173 0 0 -int(86) +int(84) -- Iteration 4 -- 1 1 1 - 1 o 1 1 + 1 1 1 #1 1 $1 _1 1 1 1 1 -int(73) +int(71) -- Iteration 5 -- 1 1 0 - 1 o 0 1 + 1 0 1 #0 1 $1 _0 0 1 1 1 -int(73) +int(71) diff --git a/ext/standard/tests/strings/vprintf_variation12_64bit.phpt b/ext/standard/tests/strings/vprintf_variation12_64bit.phpt index 9e63f1a0df2d9..5b34b4a5b6799 100644 --- a/ext/standard/tests/strings/vprintf_variation12_64bit.phpt +++ b/ext/standard/tests/strings/vprintf_variation12_64bit.phpt @@ -21,7 +21,7 @@ echo "*** Testing vprintf() : octal formats and non-octal values ***\n"; // defining array of octal formats $formats = '%o %+o %-o - %lo %Lo %4o %-4o + %lo %4o %-4o %10.4o %-10.4o %.4o %\'#2o %\'2o %\'$2o %\'_2o %3$o %4$o %1$o %2$o'; @@ -32,35 +32,35 @@ $args_array = array( // array of float values array(2.2, .2, 10.2, - 123456.234, 123456.234, -1234.6789, +1234.6789, + 123456.234, -1234.6789, +1234.6789, 2e10, +2e12, 22e+12, 12345.780, 12.000000011111, -12.00000111111, -123456.234, 3.33, +4.44, 1.11,-2.22 ), // array of int values array(2, -2, +2, - 123456, 123456234, -12346789, +12346789, + 123456, -12346789, +12346789, 123200, +20000, 22212, 12345780, 1211111, -12111111, -12345634, 3, +4, 1,-2 ), // array of strings array(" ", ' ', 'hello', - '123hello', "123hello", '-123hello', '+123hello', + '123hello', '-123hello', '+123hello', "\12345678hello", "-\12345678hello", 'h123456ello', "1234hello", "hello\0world", "NULL", "true", "3", "4", '1', '2'), // different arrays array( array(0), array(1, 2), array(-1, -1), - array("123"), array('123'), array('-123'), array("-123"), + array("123"), array('-123'), array("-123"), array(true), array(false), array(FALSE), array("123hello"), array("1", "2"), array('123hello'), array(12=>"12twelve"), array("3"), array("4"), array("1"), array("2") ), // array of boolean data array( true, TRUE, false, - TRUE, 0, FALSE, 1, + TRUE, FALSE, 1, true, false, TRUE, 0, 1, 1, 0, 1, TRUE, 0, FALSE), @@ -84,40 +84,40 @@ foreach($args_array as $args) { -- Iteration 1 -- 2 0 12 - 361100 o 1777777777777777775456 2322 + 361100 1777777777777777775456 2322 30071 14 1777777777777777777764 1777777777777777416700 12 361100 2 0 -int(151) +int(149) -- Iteration 2 -- 2 1777777777777777777776 2 - 361100 o 1777777777777720715133 57062645 + 361100 1777777777777720715133 57062645 57060664 4475347 1777777777777721631371 1777777777777720717336 2 361100 2 1777777777777777777776 -int(203) +int(201) -- Iteration 3 -- 0 0 0 - 173 o 1777777777777777777605 173 + 173 1777777777777777777605 173 2322 0 $0 _0 0 173 0 0 -int(101) +int(99) -- Iteration 4 -- 1 1 1 - 1 o 1 1 + 1 1 1 #1 1 $1 _1 1 1 1 1 -int(77) +int(75) -- Iteration 5 -- 1 1 0 - 1 o 0 1 + 1 0 1 #0 1 $1 _0 0 1 1 1 -int(77) +int(75) diff --git a/ext/standard/tests/strings/vprintf_variation13.phpt b/ext/standard/tests/strings/vprintf_variation13.phpt index c598118285b94..25968538c8e6f 100644 --- a/ext/standard/tests/strings/vprintf_variation13.phpt +++ b/ext/standard/tests/strings/vprintf_variation13.phpt @@ -22,7 +22,7 @@ echo "*** Testing vprintf() : hexa formats with hexa values ***\n"; $formats = array( "%x", "%+x %-x %X", - "%lx %Lx, %4x %-4x", + "%lx %4x %-4x", "%10.4x %-10.4x %04x %04.4x", "%'#2x %'2x %'$2x %'_2x", "%x %x %x %x", @@ -35,7 +35,7 @@ $formats = array( $args_array = array( array(0x0), array(-0x1, 0x1, +0x22), - array(0x7FFFFFFF, -0x7fffffff, +0x7000000, -0x80000000), + array(0x7FFFFFFF, +0x7000000, -0x80000000), array(123456, 12345678, -1234567, 1234567), array(1, 0x2222, 0333333, -0x44444444), array(0x123b, 0xfAb, "0xaxz", 012), @@ -56,7 +56,7 @@ foreach($formats as $format) { } ?> ---EXPECT-- +--EXPECTF-- *** Testing vprintf() : hexa formats with hexa values *** -- Iteration 1 -- @@ -68,8 +68,8 @@ ffffffff 1 22 int(13) -- Iteration 3 -- -7fffffff x, 7000000 80000000 -int(28) +7fffffff 7000000 80000000 +int(25) -- Iteration 4 -- ffed2979 0000 diff --git a/ext/standard/tests/strings/vprintf_variation13_64bit.phpt b/ext/standard/tests/strings/vprintf_variation13_64bit.phpt index b5b750b5429e1..261d10fe4e285 100644 --- a/ext/standard/tests/strings/vprintf_variation13_64bit.phpt +++ b/ext/standard/tests/strings/vprintf_variation13_64bit.phpt @@ -22,7 +22,7 @@ echo "*** Testing vprintf() : hexa formats with hexa values ***\n"; $formats = array( "%x", "%+x %-x %X", - "%lx %Lx, %4x %-4x", + "%lx %4x %-4x", "%10.4x %-10.4x %04x %04.4x", "%'#2x %'2x %'$2x %'_2x", "%x %x %x %x", @@ -35,7 +35,7 @@ $formats = array( $args_array = array( array(0x0), array(-0x1, 0x1, +0x22), - array(0x7FFFFFFF, -0x7fffffff, +0x7000000, -0x80000000), + array(0x7FFFFFFF, +0x7000000, -0x80000000), array(123456, 12345678, -1234567, 1234567), array(1, 0x2222, 0333333, -0x44444444), array(0x123b, 0xfAb, "0xaxz", 012), @@ -56,7 +56,7 @@ foreach($formats as $format) { } ?> ---EXPECT-- +--EXPECTF-- *** Testing vprintf() : hexa formats with hexa values *** -- Iteration 1 -- @@ -68,8 +68,8 @@ ffffffffffffffff 1 22 int(21) -- Iteration 3 -- -7fffffff x, 7000000 ffffffff80000000 -int(36) +7fffffff 7000000 ffffffff80000000 +int(33) -- Iteration 4 -- ffffffffffed2979 0000 diff --git a/ext/standard/tests/strings/vprintf_variation14.phpt b/ext/standard/tests/strings/vprintf_variation14.phpt index 04a90a00d397e..4ea430bcb8a45 100644 --- a/ext/standard/tests/strings/vprintf_variation14.phpt +++ b/ext/standard/tests/strings/vprintf_variation14.phpt @@ -21,7 +21,7 @@ echo "*** Testing vprintf() : hexa formats and non-hexa values ***\n"; // defining array of different hexa formats $formats = '%x %+x %-x - %lx %Lx %4x %-4x + %lx x %4x %-4x %10.4x %-10.4x %.4x %\'#2x %\'2x %\'$2x %\'_2x %3$x %4$x %1$x %2$x'; @@ -32,35 +32,35 @@ $args_array = array( // array of float values array(2.2, .2, 10.2, - 123456.234, 123456.234, -1234.6789, +1234.6789, + 123456.234, -1234.6789, +1234.6789, 2e10, +2e12, 22e+12, 12345.780, 12.000000011111, -12.00000111111, -123456.234, 3.33, +4.44, 1.11,-2.22 ), // array of int values array(2, -2, +2, - 123456, 123456234, -12346789, +12346789, + 123456, -12346789, +12346789, 123200, +20000, 22212, 12345780, 1211111, -12111111, -12345634, 3, +4, 1,-2 ), // array of strings array(" ", ' ', 'hello', - '123hello', "123hello", '-123hello', '+123hello', + '123hello', '-123hello', '+123hello', "\12345678hello", "-\12345678hello", 'h123456ello', "1234hello", "hello\0world", "NULL", "true", "3", "4", '1', '2'), // different arrays array( array(0), array(1, 2), array(-1, -1), - array("123"), array('123'), array('-123'), array("-123"), + array("123"), array('-123'), array("-123"), array(true), array(TRUE), array(FALSE), array("123hello"), array("1", "2"), array('123hello'), array(12=>"12twelve"), array("3"), array("4"), array("1"), array("2") ), // array of boolean data array( true, TRUE, false, - TRUE, 0, FALSE, 1, + TRUE, FALSE, 1, true, TRUE, FALSE, 0, 1, 1, 0, 1, TRUE, 0, FALSE), diff --git a/ext/standard/tests/strings/vprintf_variation14_64bit.phpt b/ext/standard/tests/strings/vprintf_variation14_64bit.phpt index 387663167a447..85fdab372a6fc 100644 --- a/ext/standard/tests/strings/vprintf_variation14_64bit.phpt +++ b/ext/standard/tests/strings/vprintf_variation14_64bit.phpt @@ -21,7 +21,7 @@ echo "*** Testing vprintf() : hexa formats and non-hexa values ***\n"; // defining array of different hexa formats $formats = '%x %+x %-x - %lx %Lx %4x %-4x + %lx %4x %-4x %10.4x %-10.4x %.4x %\'#2x %\'2x %\'$2x %\'_2x %3$x %4$x %1$x %2$x'; @@ -32,35 +32,35 @@ $args_array = array( // array of float values array(2.2, .2, 10.2, - 123456.234, 123456.234, -1234.6789, +1234.6789, + 123456.234, -1234.6789, +1234.6789, 2e10, +2e12, 22e+12, 12345.780, 12.000000011111, -12.00000111111, -123456.234, 3.33, +4.44, 1.11,-2.22 ), // array of int values array(2, -2, +2, - 123456, 123456234, -12346789, +12346789, + 123456, -12346789, +12346789, 123200, +20000, 22212, 12345780, 1211111, -12111111, -12345634, 3, +4, 1,-2 ), // array of strings array(" ", ' ', 'hello', - '123hello', "123hello", '-123hello', '+123hello', + '123hello', '-123hello', '+123hello', "\12345678hello", "-\12345678hello", 'h123456ello', "1234hello", "hello\0world", "NULL", "true", "3", "4", '1', '2'), // different arrays array( array(0), array(1, 2), array(-1, -1), - array("123"), array('123'), array('-123'), array("-123"), + array("123"), array('-123'), array("-123"), array(true), array(TRUE), array(FALSE), array("123hello"), array("1", "2"), array('123hello'), array(12=>"12twelve"), array("3"), array("4"), array("1"), array("2") ), // array of boolean data array( true, TRUE, false, - TRUE, 0, FALSE, 1, + TRUE, FALSE, 1, true, TRUE, FALSE, 0, 1, 1, 0, 1, TRUE, 0, FALSE), @@ -85,40 +85,40 @@ foreach($args_array as $args) { -- Iteration 1 -- 2 0 a - 1e240 x fffffffffffffb2e 4d2 + 1e240 fffffffffffffb2e 4d2 3039 c fffffffffffffff4 fffffffffffe1dc0 a 1e240 2 0 -int(127) +int(125) -- Iteration 2 -- 2 fffffffffffffffe 2 - 1e240 x ffffffffff439a5b bc65a5 + 1e240 ffffffffff439a5b bc65a5 bc61b4 127ae7 ffffffffff4732f9 ffffffffff439ede 2 1e240 2 fffffffffffffffe -int(166) +int(164) -- Iteration 3 -- 0 0 0 - 7b x ffffffffffffff85 7b + 7b ffffffffffffff85 7b 4d2 0 $0 _0 0 7b 0 0 -int(92) +int(90) -- Iteration 4 -- 1 1 1 - 1 x 1 1 + 1 1 1 #1 1 $1 _1 1 1 1 1 -int(77) +int(75) -- Iteration 5 -- 1 1 0 - 1 x 0 1 + 1 0 1 #0 1 $1 _0 0 1 1 1 -int(77) +int(75) diff --git a/ext/standard/tests/strings/vprintf_variation15.phpt b/ext/standard/tests/strings/vprintf_variation15.phpt index 751dc5f6cb483..40dd2acce95f6 100644 --- a/ext/standard/tests/strings/vprintf_variation15.phpt +++ b/ext/standard/tests/strings/vprintf_variation15.phpt @@ -21,7 +21,7 @@ echo "*** Testing vprintf() : unsigned formats and unsigned values ***\n"; // defining array of unsigned formats $formats = array( '%u %+u %-u', - '%lu %Lu %4u %-4u', + '%lu %4u %-4u', '%10.4u %-10.4u %.4u', '%\'#2u %\'2u %\'$2u %\'_2u', '%3$u %4$u %1$u %2$u' @@ -31,7 +31,7 @@ $formats = array( // Each sub array contains unsigned values which correspond to each format string in $format $args_array = array( array(1234567, 01234567, 0 ), - array(12345678900, 12345678900, 1234, 12345), + array(12345678900, 1234, 12345), array("1234000", 10.1234567e10, 1.2e2), array(1, 0, 00, "10_"), array(3, 4, 1, 2) @@ -57,8 +57,8 @@ foreach($formats as $format) { int(16) -- Iteration 2 -- -3755744308 u 1234 12345 -int(23) +3755744308 1234 12345 +int(21) -- Iteration 3 -- 1234000 2450319192 120 diff --git a/ext/standard/tests/strings/vprintf_variation15_64bit.phpt b/ext/standard/tests/strings/vprintf_variation15_64bit.phpt index 3bf70f4cf1e1d..6a154143974e5 100644 --- a/ext/standard/tests/strings/vprintf_variation15_64bit.phpt +++ b/ext/standard/tests/strings/vprintf_variation15_64bit.phpt @@ -21,7 +21,7 @@ echo "*** Testing vprintf() : unsigned formats and unsigned values ***\n"; // defining array of unsigned formats $formats = array( '%u %+u %-u', - '%lu %Lu %4u %-4u', + '%lu %4u %-4u', '%10.4u %-10.4u %.4u', '%\'#2u %\'2u %\'$2u %\'_2u', '%3$u %4$u %1$u %2$u' @@ -31,7 +31,7 @@ $formats = array( // Each sub array contains unsigned values which correspond to each format string in $format $args_array = array( array(1234567, 01234567, 0 ), - array(12345678900, 12345678900, 1234, 12345), + array(12345678900, 1234, 12345), array("1234000", 10e20, 1.2e2), array(1, 0, 00, "10_"), array(3, 4, 1, 2) @@ -57,8 +57,8 @@ foreach($formats as $format) { int(16) -- Iteration 2 -- -12345678900 u 1234 12345 -int(24) +12345678900 1234 12345 +int(22) -- Iteration 3 -- 1234000 3875820019684212736 120 diff --git a/ext/standard/tests/strings/vprintf_variation16.phpt b/ext/standard/tests/strings/vprintf_variation16.phpt index 16139a2e65237..b723c065255b0 100644 --- a/ext/standard/tests/strings/vprintf_variation16.phpt +++ b/ext/standard/tests/strings/vprintf_variation16.phpt @@ -21,7 +21,7 @@ echo "*** Testing vprintf() : unsigned formats and signed & other types of value // defining array of unsigned formats $formats = '%u %+u %-u - %lu %Lu %4u %-4u + %lu %4u %-4u %10.4u %-10.4u %.4u %\'#2u %\'2u %\'$2u %\'_2u %3$u %4$u %1$u %2$u'; @@ -39,21 +39,21 @@ $args_array = array( // array of strings array(" ", ' ', 'hello', - '123hello', "123hello", '-123hello', '+123hello', + '123hello', '-123hello', '+123hello', "\12345678hello", "-\12345678hello", 'h123456ello', "1234hello", "hello\0world", "NULL", "true", "3", "4", '1', '2'), // different arrays array( array(0), array(1, 2), array(-1, -1), - array("123"), array('123'), array('-123'), array("-123"), + array("123"), array('-123'), array("-123"), array(true), array(TRUE), array(FALSE), array("123hello"), array("1", "2"), array('123hello'), array(12=>"12twelve"), array("3"), array("4"), array("1"), array("2") ), // array of boolean data array( true, TRUE, false, - TRUE, 0, FALSE, 1, + TRUE, FALSE, 1, true, TRUE, FALSE, 0, 1, 1, 0, 1, TRUE, 0, FALSE), @@ -76,32 +76,32 @@ foreach($args_array as $args) { -- Iteration 1 -- 2 0 10 - 123456 u 1234 2820130816 - 2840207360 1177509888 12345 - 12 4294967284 4294843840 _3 + 123456 123456 1234 + 2820130816 2840207360 1177509888 + 12345 12 4294967284 4294843840 10 123456 2 0 -int(113) +int(115) -- Iteration 2 -- 0 0 0 - 123 u 4294967173 123 + 123 4294967173 123 0 0 0 1234 0 $0 _0 0 123 0 0 -int(86) +int(84) -- Iteration 3 -- 1 1 1 - 1 u 1 1 + 1 1 1 1 1 1 #1 1 $1 _1 1 1 1 1 -int(74) +int(72) -- Iteration 4 -- 1 1 0 - 1 u 0 1 + 1 0 1 1 1 0 #0 1 $1 _0 0 1 1 1 -int(74) +int(72) diff --git a/ext/standard/tests/strings/vprintf_variation16_64bit.phpt b/ext/standard/tests/strings/vprintf_variation16_64bit.phpt index 735e9c5af169c..1d33f070a5361 100644 --- a/ext/standard/tests/strings/vprintf_variation16_64bit.phpt +++ b/ext/standard/tests/strings/vprintf_variation16_64bit.phpt @@ -21,7 +21,7 @@ echo "*** Testing vprintf() : unsigned formats and signed & other types of value // defining array of unsigned formats $formats = '%u %+u %-u - %lu %Lu %4u %-4u + %lu %4u %-4u %10.4u %-10.4u %.4u %\'#2u %\'2u %\'$2u %\'_2u %3$u %4$u %1$u %2$u'; @@ -39,21 +39,21 @@ $args_array = array( // array of strings array(" ", ' ', 'hello', - '123hello', "123hello", '-123hello', '+123hello', + '123hello', '-123hello', '+123hello', "\12345678hello", "-\12345678hello", 'h123456ello', "1234hello", "hello\0world", "NULL", "true", "3", "4", '1', '2'), // different arrays array( array(0), array(1, 2), array(-1, -1), - array("123"), array('123'), array('-123'), array("-123"), + array("123"), array('-123'), array("-123"), array(true), array(TRUE), array(FALSE), array("123hello"), array("1", "2"), array('123hello'), array(12=>"12twelve"), array("3"), array("4"), array("1"), array("2") ), // array of boolean data array( true, TRUE, false, - TRUE, 0, FALSE, 1, + TRUE, FALSE, 1, true, TRUE, FALSE, 0, 1, 1, 0, 1, TRUE, 0, FALSE), @@ -77,32 +77,32 @@ foreach($args_array as $args) { -- Iteration 1 -- 2 0 10 - 123456 u 1234 20000000000 - 2000000000000 22000000000000 12345 - 12 18446744073709551604 18446744073709428160 _3 + 123456 123456 1234 + 20000000000 2000000000000 22000000000000 + 12345 12 18446744073709551604 18446744073709428160 10 123456 2 0 -int(145) +int(147) -- Iteration 2 -- 0 0 0 - 123 u 18446744073709551493 123 + 123 18446744073709551493 123 0 0 0 1234 0 $0 _0 0 123 0 0 -int(100) +int(98) -- Iteration 3 -- 1 1 1 - 1 u 1 1 + 1 1 1 1 1 1 #1 1 $1 _1 1 1 1 1 -int(78) +int(76) -- Iteration 4 -- 1 1 0 - 1 u 0 1 + 1 0 1 1 1 0 #0 1 $1 _0 0 1 1 1 -int(78) +int(76) diff --git a/ext/standard/tests/strings/vprintf_variation17.phpt b/ext/standard/tests/strings/vprintf_variation17.phpt index d8b69c5b753db..d17b789ca3b1b 100644 --- a/ext/standard/tests/strings/vprintf_variation17.phpt +++ b/ext/standard/tests/strings/vprintf_variation17.phpt @@ -17,7 +17,7 @@ echo "*** Testing vprintf() : scientific formats and scientific values ***\n"; // defining array of scientific formats $formats = array( '%e %+e %-e', - '%le %Le %4e %-4e', + '%le %4e %-4e', '%10.4e %-10.4e %.4e', '%\'#20e %\'20e %\'$20e %\'_20e', '%3$e %4$e %1$e %2$e' @@ -27,7 +27,7 @@ $formats = array( // Each sub array contains scientific values which correspond to each format string in $format $args_array = array( array(0, 1e0, "10e2" ), - array(2.2e2, 10e10, 1000e-2, 1000e7), + array(2.2e2, 1000e-2, 1000e7), array(-22e12, 10e20, 1.2e2), array(1e1, +1e2, -1e3, "1e2_"), array(3e3, 4e3, 1e3, 2e3) @@ -53,8 +53,8 @@ foreach($formats as $format) { int(36) -- Iteration 2 -- -2.200000e+2 e 1.000000e+1 1.000000e+10 -int(38) +2.200000e+2 1.000000e+1 1.000000e+10 +int(36) -- Iteration 3 -- -2.2000e+13 1.0000e+21 1.2000e+2 diff --git a/ext/standard/tests/strings/vprintf_variation18.phpt b/ext/standard/tests/strings/vprintf_variation18.phpt index 98bc65794fcc1..2c9168cc87b52 100644 --- a/ext/standard/tests/strings/vprintf_variation18.phpt +++ b/ext/standard/tests/strings/vprintf_variation18.phpt @@ -17,7 +17,7 @@ echo "*** Testing vprintf() : scientific formats and non-scientific values ***\n // defining array of non-scientific formats $formats = '%e %+e %-e - %le %Le %4e %-4e + %le %4e %-4e %10.4e %-10.4e %04e %04.4e %\'#2e %\'2e %\'$2e %\'_2e %3$e %4$e %1$e %2$e'; @@ -28,28 +28,28 @@ $args_array = array( // array of float values array(2.2, .2, 10.2, - 123456.234, 123456.234, -1234.6789, +1234.6789, + 123456.234, -1234.6789, +1234.6789, 20.00, +212.2, -411000000000, 2212.000000000001, 12345.780, 12.000000011111, -12.00000111111, -123456.234, 3.33, +4.44, 1.11,-2.22 ), // array of strings array(" ", ' ', 'hello', - '123hello', "123hello", '-123hello', '+123hello', + '123hello', '-123hello', '+123hello', "\12345678hello", "-\12345678hello", '0123456hello', 'h123456ello', "1234hello", "hello\0world", "NULL", "true", "3", "4", '1', '2'), // different arrays array( array(0), array(1, 2), array(-1, -1), - array("123"), array('123'), array('-123'), array("-123"), + array("123"), array('-123'), array("-123"), array(true), array(false), array(TRUE), array(FALSE), array("123hello"), array("1", "2"), array('123hello'), array(12=>"12twelve"), array("3"), array("4"), array("1"), array("2") ), // array of boolean data array( true, TRUE, false, - TRUE, 0, FALSE, 1, + TRUE, FALSE, 1, true, false, TRUE, FALSE, 0, 1, 1, 0, 1, TRUE, 0, FALSE), @@ -73,32 +73,32 @@ foreach($args_array as $args) { -- Iteration 1 -- 2.200000e+0 +2.000000e-1 1.020000e+1 - 1.234562e+5 e -1.234679e+3 1.234679e+3 + 1.234562e+5 -1.234679e+3 1.234679e+3 2.0000e+1 2.1220e+2 -4.110000e+11 2.2120e+3 1.234578e+4 1.200000e+1 -1.200000e+1 -1.234562e+5 1.020000e+1 1.234562e+5 2.200000e+0 2.000000e-1 -int(235) +int(233) -- Iteration 2 -- 0.000000e+0 +0.000000e+0 0.000000e+0 - 1.230000e+2 e -1.230000e+2 1.230000e+2 + 1.230000e+2 -1.230000e+2 1.230000e+2 0.0000e+0 0.0000e+0 1.234560e+5 0.0000e+0 1.234000e+3 0.000000e+0 0.000000e+0 0.000000e+0 0.000000e+0 1.230000e+2 0.000000e+0 0.000000e+0 -int(231) +int(229) -- Iteration 3 -- 1.000000e+0 +1.000000e+0 1.000000e+0 - 1.000000e+0 e 1.000000e+0 1.000000e+0 + 1.000000e+0 1.000000e+0 1.000000e+0 1.0000e+0 1.0000e+0 1.000000e+0 1.0000e+0 1.000000e+0 1.000000e+0 1.000000e+0 1.000000e+0 1.000000e+0 1.000000e+0 1.000000e+0 1.000000e+0 -int(230) +int(228) -- Iteration 4 -- 1.000000e+0 +1.000000e+0 0.000000e+0 - 1.000000e+0 e 0.000000e+0 1.000000e+0 + 1.000000e+0 0.000000e+0 1.000000e+0 1.0000e+0 0.0000e+0 1.000000e+0 0.0000e+0 0.000000e+0 1.000000e+0 1.000000e+0 0.000000e+0 0.000000e+0 1.000000e+0 1.000000e+0 1.000000e+0 -int(230) +int(228) diff --git a/ext/standard/tests/strings/vprintf_variation3.phpt b/ext/standard/tests/strings/vprintf_variation3.phpt index 035b81a7992f8..c665eb024d6ca 100644 --- a/ext/standard/tests/strings/vprintf_variation3.phpt +++ b/ext/standard/tests/strings/vprintf_variation3.phpt @@ -18,8 +18,8 @@ echo "*** Testing vprintf() : int formats with int values ***\n"; // defining array of int formats $formats = array( "%d", - "%+d %-d %D", - "%ld %Ld, %4d %-4d", + "%+d %-d", + "%ld %4d %-4d", "%10.4d %-10.4d %04d %04.4d", "%'#2d %'2d %'$2d %'_2d", "%d %d %d %d", @@ -31,8 +31,8 @@ $formats = array( // Each sub array contains int values which correspond to each format string in $format $args_array = array( array(0), - array(-1, 1, +22), - array(2147483647, -2147483648, +2147483640, -2147483640), + array(-1, 1), + array(2147483647, +2147483640, -2147483640), array(123456, 12345678, -1234567, 1234567), array(111, 2222, 333333, 44444444), array(0x123b, 0xfAb, 0123, 012), @@ -61,12 +61,12 @@ foreach($formats as $format) { int(1) -- Iteration 2 -- --1 1 -int(5) +-1 1 +int(4) -- Iteration 3 -- -2147483647 d, 2147483640 -2147483640 -int(36) +2147483647 2147483640 -2147483640 +int(33) -- Iteration 4 -- 123456 12345678 -1234567 1234567 diff --git a/ext/standard/tests/strings/vprintf_variation4.phpt b/ext/standard/tests/strings/vprintf_variation4.phpt index 93adbb79ff262..6df68cfb863da 100644 --- a/ext/standard/tests/strings/vprintf_variation4.phpt +++ b/ext/standard/tests/strings/vprintf_variation4.phpt @@ -21,7 +21,7 @@ echo "*** Testing vprintf() : int formats and non-integer values ***\n"; // defining array of int formats $formats = '%d %+d %-d - %ld %Ld %4d %-4d + %ld %4d %-4d %10.4d %-10.4d %.4d %04.4d %\'#2d %\'2d %\'$2d %\'_2d %3$d %4$d %1$d %2$d'; @@ -32,28 +32,28 @@ $args_array = array( // array of float values array(2.2, .2, 10.2, - 123456.234, 123456.234, -1234.6789, +1234.6789, + 123456.234, -1234.6789, +1234.6789, 2e10, +2e5, 4e3, 22e+6, 12345.780, 12.000000011111, -12.00000111111, -123456.234, 3.33, +4.44, 1.11,-2.22 ), // array of strings array(" ", ' ', 'hello', - '123hello', "123hello", '-123hello', '+123hello', + '123hello', '-123hello', '+123hello', "\12345678hello", "-\12345678hello", '0123456hello', 'h123456ello', "1234hello", "hello\0world", "NULL", "true", "3", "4", '1', '2'), // different arrays array( array(0), array(1, 2), array(-1, -1), - array("123"), array('123'), array('-123'), array("-123"), + array("123"), array('-123'), array("-123"), array(true), array(false), array(TRUE), array(FALSE), array("123hello"), array("1", "2"), array('123hello'), array(12=>"12twelve"), array("3"), array("4"), array("1"), array("2") ), // array of boolean data array( true, TRUE, false, - TRUE, 0, FALSE, 1, + TRUE, FALSE, 1, true, false, TRUE, FALSE, 0, 1, 1, 0, 1, TRUE, 0, FALSE), @@ -77,32 +77,32 @@ foreach($args_array as $args) { -- Iteration 1 -- 2 +0 10 - 123456 d -1234 1234 + 123456 -1234 1234 -1474836480 200000 4000 22000000 12345 12 -12 -123456 10 123456 2 0 -int(111) +int(109) -- Iteration 2 -- 0 +0 0 - 123 d -123 123 + 123 -123 123 0 0 123456 0000 1234 0 $0 _0 0 123 0 0 -int(91) +int(89) -- Iteration 3 -- 1 +1 1 - 1 d 1 1 + 1 1 1 1 1 1 0001 #1 1 $1 _1 1 1 1 1 -int(80) +int(78) -- Iteration 4 -- 1 +1 0 - 1 d 0 1 + 1 0 1 1 0 1 0000 #0 1 $1 _0 0 1 1 1 -int(80) +int(78) diff --git a/ext/standard/tests/strings/vprintf_variation4_64bit.phpt b/ext/standard/tests/strings/vprintf_variation4_64bit.phpt index 35f0663b5224d..3df0a9432d3e7 100644 --- a/ext/standard/tests/strings/vprintf_variation4_64bit.phpt +++ b/ext/standard/tests/strings/vprintf_variation4_64bit.phpt @@ -21,7 +21,7 @@ echo "*** Testing vprintf() : int formats and non-integer values ***\n"; // defining array of int formats $formats = '%d %+d %-d - %ld %Ld %4d %-4d + %ld %4d %-4d %10.4d %-10.4d %.4d %04.4d %\'#2d %\'2d %\'$2d %\'_2d %3$d %4$d %1$d %2$d'; @@ -32,28 +32,28 @@ $args_array = array( // array of float values array(2.2, .2, 10.2, - 123456.234, 123456.234, -1234.6789, +1234.6789, + 123456.234, -1234.6789, +1234.6789, 2e10, +2e5, 4e3, 22e+6, 12345.780, 12.000000011111, -12.00000111111, -123456.234, 3.33, +4.44, 1.11,-2.22 ), // array of strings array(" ", ' ', 'hello', - '123hello', "123hello", '-123hello', '+123hello', + '123hello', '-123hello', '+123hello', "\12345678hello", "-\12345678hello", '0123456hello', 'h123456ello', "1234hello", "hello\0world", "NULL", "true", "3", "4", '1', '2'), // different arrays array( array(0), array(1, 2), array(-1, -1), - array("123"), array('123'), array('-123'), array("-123"), + array("123"), array('-123'), array("-123"), array(true), array(false), array(TRUE), array(FALSE), array("123hello"), array("1", "2"), array('123hello'), array(12=>"12twelve"), array("3"), array("4"), array("1"), array("2") ), // array of boolean data array( true, TRUE, false, - TRUE, 0, FALSE, 1, + TRUE, FALSE, 1, true, false, TRUE, FALSE, 0, 1, 1, 0, 1, TRUE, 0, FALSE), @@ -77,32 +77,32 @@ foreach($args_array as $args) { -- Iteration 1 -- 2 +0 10 - 123456 d -1234 1234 + 123456 -1234 1234 20000000000 200000 4000 22000000 12345 12 -12 -123456 10 123456 2 0 -int(115) +int(113) -- Iteration 2 -- 0 +0 0 - 123 d -123 123 + 123 -123 123 0 0 123456 0000 1234 0 $0 _0 0 123 0 0 -int(95) +int(93) -- Iteration 3 -- 1 +1 1 - 1 d 1 1 + 1 1 1 1 1 1 0001 #1 1 $1 _1 1 1 1 1 -int(84) +int(82) -- Iteration 4 -- 1 +1 0 - 1 d 0 1 + 1 0 1 1 0 1 0000 #0 1 $1 _0 0 1 1 1 -int(84) +int(82) diff --git a/ext/standard/tests/strings/vprintf_variation5.phpt b/ext/standard/tests/strings/vprintf_variation5.phpt index 44e2d23607e1c..52d2424353bd5 100644 --- a/ext/standard/tests/strings/vprintf_variation5.phpt +++ b/ext/standard/tests/strings/vprintf_variation5.phpt @@ -19,7 +19,7 @@ echo "*** Testing vprintf() : int formats with float values ***\n"; $formats = array( "%f", "%+f %-f %F", - "%lf %Lf, %4f %-4f", + "%lf %4f %-4f", "%10.4f %-10.4F %04f %04.4f", "%'#2f %'2f %'$2f %'_2f", "%f %f %f %f", @@ -32,7 +32,7 @@ $formats = array( $args_array = array( array(0.0), array(-0.1, +0.1, +10.0000006), - array(2147483649, -2147483647, +2147483640, -2147483640), + array(2147483649, +2147483640, -2147483640), array(2e5, 2e-5, -2e5, -2e-5), array(0.2E5, -0.2e40, 0.2E-20, 0.2E+20), array(0x123b, 0xfAb, 0123, 012), @@ -65,8 +65,8 @@ int(8) int(28) -- Iteration 3 -- -2147483649.000000 f, 2147483640.000000 -2147483640.000000 -int(57) +2147483649.000000 2147483640.000000 -2147483640.000000 +int(54) -- Iteration 4 -- 200000.0000 0.0000 -200000.000000 -0.0000 diff --git a/ext/standard/tests/strings/vprintf_variation6.phpt b/ext/standard/tests/strings/vprintf_variation6.phpt index 6bae1cdb3354b..869babcb587b2 100644 --- a/ext/standard/tests/strings/vprintf_variation6.phpt +++ b/ext/standard/tests/strings/vprintf_variation6.phpt @@ -17,7 +17,7 @@ echo "*** Testing vprintf() : float formats and non-float values ***\n"; // defining array of float formats $formats = '%f %+f %-f - %lf %Lf %4f %-4f + %lf %4f %-4f %10.4f %-10.4f %04f %04.4f %\'#2f %\'2f %\'$2f %\'_2f %3$f %4$f %1$f %2$f'; @@ -28,28 +28,28 @@ $args_array = array( // array of int values array(2, -2, +2, - 123456, 123456234, -12346789, +12346789, + 123456, -12346789, +12346789, 123200, +20000, -40000, 22212, 12345780, 1211111, -12111111, -12345634, 3, +4, 1,-2 ), // array of strings array(" ", ' ', 'hello', - '123hello', "123hello", '-123hello', '+123hello', + '123hello', '-123hello', '+123hello', "\12345678hello", "-\12345678hello", '0123456hello', 'h123456ello', "1234hello", "hello\0world", "NULL", "true", "3", "4", '1', '2'), // different arrays array( array(0), array(1, 2), array(-1, -1), - array("123"), array('123'), array('-123'), array("-123"), + array("123"), array('-123'), array("-123"), array(true), array(false), array(TRUE), array(FALSE), array("123hello"), array("1", "2"), array('123hello'), array(12=>"12twelve"), array("3"), array("4"), array("1"), array("2") ), // array of boolean data array( true, TRUE, false, - TRUE, 0, FALSE, 1, + TRUE, FALSE, 1, true, false, TRUE, FALSE, 0, 1, 1, 0, 1, TRUE, 0, FALSE), @@ -73,32 +73,32 @@ foreach($args_array as $args) { -- Iteration 1 -- 2.000000 -2.000000 2.000000 - 123456.000000 f -12346789.000000 12346789.000000 + 123456.000000 -12346789.000000 12346789.000000 123200.0000 20000.0000 -40000.000000 22212.0000 12345780.000000 1211111.000000 -12111111.000000 -12345634.000000 2.000000 123456.000000 2.000000 -2.000000 -int(247) +int(245) -- Iteration 2 -- 0.000000 +0.000000 0.000000 - 123.000000 f -123.000000 123.000000 + 123.000000 -123.000000 123.000000 0.0000 0.0000 123456.000000 0.0000 1234.000000 0.000000 0.000000 0.000000 0.000000 123.000000 0.000000 0.000000 -int(199) +int(197) -- Iteration 3 -- 1.000000 +1.000000 1.000000 - 1.000000 f 1.000000 1.000000 + 1.000000 1.000000 1.000000 1.0000 1.0000 1.000000 1.0000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 -int(182) +int(180) -- Iteration 4 -- 1.000000 +1.000000 0.000000 - 1.000000 f 0.000000 1.000000 + 1.000000 0.000000 1.000000 1.0000 0.0000 1.000000 0.0000 0.000000 1.000000 1.000000 0.000000 0.000000 1.000000 1.000000 1.000000 -int(182) +int(180) diff --git a/ext/standard/tests/strings/vprintf_variation7.phpt b/ext/standard/tests/strings/vprintf_variation7.phpt index ef17df59c29729f67d0471aea573b4bbcc4b1677..e2af17feb99d978dd552aedede46ac34e7918b52 100644 GIT binary patch delta 86 zcmbOu_+4Ow3NxpY4wr(0l4?%zWK-tQ$-T^fxHUl{iA6<;l^UB@vYcXK=gQ10(J-`_ hT+J>cpr8=yrogD6pa2mxo4ksBHyfC3Iyr~K001787z+RZ delta 106 zcmew^Fh_8M3bUYsYOsZ`Wzgm diff --git a/ext/standard/tests/strings/vprintf_variation8.phpt b/ext/standard/tests/strings/vprintf_variation8.phpt index 7b03c79441249..a41f53cf02b88 100644 --- a/ext/standard/tests/strings/vprintf_variation8.phpt +++ b/ext/standard/tests/strings/vprintf_variation8.phpt @@ -17,7 +17,7 @@ echo "*** Testing vprintf() : string formats and non-string values ***\n"; // defining array of string formats $formats = '%s %+s %-s - %ls %Ls %4s %-4s + %ls %4s %-4s %10.4s %-10.4s %04s %04.4s %\'#2s %\'2s %\'$2s %\'_2s %3$s %4$s %1$s %2$s'; @@ -28,14 +28,14 @@ $args_array = array( // array of float values array(2.2, .2, 10.2, - 123456.234, 123456.234, -1234.6789, +1234.6789, + 123456.234, -1234.6789, +1234.6789, 2.1234567e10, +2.7654321e10, -2.7654321e10, 12345.780, 12.000000011111, -12.00000111111, -123456.234, 3.33, +4.44, 1.11,-2.22 ), // array of int values array(2, -2, +2, - 123456, 123456234, -12346789, +12346789, + 123456, -12346789, +12346789, 123200, +20000, -40000, 22212, 12345780, 1211111, -12111111, -12345634, 3, +4, 1,-2 ), @@ -43,14 +43,14 @@ $args_array = array( // different arrays array( array(0), array(1, 2), array(-1, -1), - array("123"), array('123'), array('-123'), array("-123"), + array("123"), array('-123'), array("-123"), array(true), array(false), array(TRUE), array(FALSE), array("123hello"), array("1", "2"), array('123hello'), array(12=>"12twelve"), array("3"), array("4"), array("1"), array("2") ), // array of boolean data array( true, TRUE, false, - TRUE, 0, FALSE, 1, + TRUE, FALSE, 1, true, false, TRUE, FALSE, 0, 1, 1, 0, 1, TRUE, 0, FALSE), @@ -74,19 +74,19 @@ foreach($args_array as $args) { -- Iteration 1 -- 2.2 0.2 10.2 - 123456.234 s -1234.6789 1234.6789 + 123456.234 -1234.6789 1234.6789 2123 2765 -27654321000 1234 12.000000011111 -12.00000111111 -123456.234 3.33 10.2 123456.234 2.2 0.2 -int(175) +int(173) -- Iteration 2 -- 2 -2 2 - 123456 s -12346789 12346789 + 123456 -12346789 12346789 1232 2000 -40000 2221 12345780 1211111 -12111111 -12345634 2 123456 2 -2 -int(135) +int(133) -- Iteration 3 -- @@ -126,16 +126,16 @@ Warning: Array to string conversion in %s on line %d Warning: Array to string conversion in %s on line %d Array Array Array - Array s Array Array + Array Array Array Arra Arra Array Arra Array Array Array Array Array Array Array Array -int(134) +int(132) -- Iteration 4 -- 1 1 - 1 s 1 + 1 1 1 0001 0000 #0 1 $1 _0 1 1 1 -int(84) +int(82) diff --git a/ext/standard/tests/strings/vprintf_variation9.phpt b/ext/standard/tests/strings/vprintf_variation9.phpt index a1c99a9098ce18e28cf24ab20464dfc9bc3bc5d8..83b6f21a4dc067de8181116e34b036b6b5340cd5 100644 GIT binary patch delta 85 zcmZqSeb2MuE+eOs4wr(0l4?%!=68%9jC`6PZemeUVx@+&L0O`~hsQ>@~ delta 106 zcmaFQ)55#qE~B7=s9W)_+t@x-E{#7Yfy1$7+- zB?YC;Hq0qZS_)j5c_kVqnp|AEx(c2psYQt;nfZAN#tOQ+Tnq}yItqIgoWV*gCLd#6 F2>_dj8+8Bx From 572b799b52f26ac3ae3ad7dd5dc7eed71d0875b2 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 22 Apr 2020 13:49:54 +0300 Subject: [PATCH 223/338] Fixed register allocation constraints --- ext/opcache/jit/zend_jit_x86.dasc | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 350872488272c..6ba439239b32c 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -11024,10 +11024,7 @@ static zend_bool zend_jit_opline_supports_reg(const zend_op_array *op_array, zen case ZEND_MUL: op1_info = OP1_INFO(); op2_info = OP2_INFO(); - if ((op1_info | op2_info) & MAY_BE_UNDEF) { - return 0; - } - return (op1_info & op2_info & (MAY_BE_LONG|MAY_BE_DOUBLE)) != 0; + return !((op1_info | op2_info) & (MAY_BE_ANY - (MAY_BE_LONG|MAY_BE_DOUBLE))); case ZEND_BW_OR: case ZEND_BW_AND: case ZEND_BW_XOR: @@ -11036,18 +11033,13 @@ static zend_bool zend_jit_opline_supports_reg(const zend_op_array *op_array, zen case ZEND_MOD: op1_info = OP1_INFO(); op2_info = OP2_INFO(); - if ((op1_info | op2_info) & MAY_BE_UNDEF) { - return 0; - } - return (op1_info & op2_info & MAY_BE_LONG) != 0; + return !((op1_info | op2_info) & (MAY_BE_ANY - MAY_BE_LONG)); case ZEND_PRE_INC: case ZEND_PRE_DEC: case ZEND_POST_INC: case ZEND_POST_DEC: op1_info = OP1_INFO(); - return - opline->op1_type == IS_CV && - (op1_info & MAY_BE_LONG); + return opline->op1_type == IS_CV && !(op1_info & (MAY_BE_ANY - MAY_BE_LONG)); case ZEND_BOOL: case ZEND_BOOL_NOT: case ZEND_JMPZ: From 427cc4f496f2fb1007dff8d05fc77adc1dd54dcf Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 22 Apr 2020 12:53:34 +0200 Subject: [PATCH 224/338] Diagnose missing format specifier at end of string --- ext/standard/formatted_print.c | 6 +++--- ext/standard/tests/strings/sprintf_error.phpt | 7 +++++++ .../tests/strings/vprintf_variation11.phpt | 8 ++++---- .../strings/vprintf_variation11_64bit.phpt | 8 ++++---- .../tests/strings/vprintf_variation13.phpt | 8 ++++---- .../strings/vprintf_variation13_64bit.phpt | 10 +++++----- .../tests/strings/vprintf_variation3.phpt | 8 ++++---- .../tests/strings/vprintf_variation5.phpt | 8 ++++---- .../tests/strings/vprintf_variation7.phpt | Bin 2167 -> 2154 bytes .../tests/strings/vprintf_variation9.phpt | Bin 1647 -> 1636 bytes 10 files changed, 35 insertions(+), 28 deletions(-) diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c index 5c67776f5b214..3448b86bc208a 100644 --- a/ext/standard/formatted_print.c +++ b/ext/standard/formatted_print.c @@ -616,9 +616,10 @@ php_formatted_print(char *format, size_t format_len, zval *args, int argc, int n case '\0': if (!format_len) { - goto exit; + zend_value_error("Missing format specifier at end of string"); + goto fail; } - break; + /* break missing intentionally */ default: zend_value_error("Unknown format specifier '%c'", *format); @@ -638,7 +639,6 @@ php_formatted_print(char *format, size_t format_len, zval *args, int argc, int n goto fail; } -exit: /* possibly, we have to make sure we have room for the terminating null? */ ZSTR_VAL(result)[outpos]=0; ZSTR_LEN(result) = outpos; diff --git a/ext/standard/tests/strings/sprintf_error.phpt b/ext/standard/tests/strings/sprintf_error.phpt index bc34b1d0f3dc6..a65bf318d3931 100644 --- a/ext/standard/tests/strings/sprintf_error.phpt +++ b/ext/standard/tests/strings/sprintf_error.phpt @@ -66,6 +66,12 @@ try { echo $e->getMessage(), "\n"; } +try { + var_dump(sprintf("foo %", 42)); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} + echo "Done"; ?> --EXPECTF-- @@ -82,4 +88,5 @@ sprintf() expects at least %d parameter, %d given 4 parameters are required, 2 given 4 parameters are required, 1 given 101 parameters are required, 1 given +Missing format specifier at end of string Done diff --git a/ext/standard/tests/strings/vprintf_variation11.phpt b/ext/standard/tests/strings/vprintf_variation11.phpt index b05d8ac681987..5022b3d5c6f52 100644 --- a/ext/standard/tests/strings/vprintf_variation11.phpt +++ b/ext/standard/tests/strings/vprintf_variation11.phpt @@ -26,7 +26,7 @@ $formats = array( "%10.4o %-10.4o %04o %04.4o", "%'#2o %'2o %'$2o %'_2o", "%o %o %o %o", - "%% %%o %10", + "%% %%o", '%3$o %4$o %1$o %2$o' ); @@ -39,7 +39,7 @@ $args_array = array( array(0123456, 01234567, -01234567, 01234567), array(0111, 02222, -0333333, -044444444), array(0x123b, 0xfAb, 0123, 012), - array(01234, 0567, -01234), + array(01234, 0567), array(03, 04, 01, 02) ); @@ -84,8 +84,8 @@ int(32) int(17) -- Iteration 7 -- -% %o -int(5) +% %o +int(4) -- Iteration 8 -- 1 2 3 4 diff --git a/ext/standard/tests/strings/vprintf_variation11_64bit.phpt b/ext/standard/tests/strings/vprintf_variation11_64bit.phpt index 46800e820a886..e183dcd838e3b 100644 --- a/ext/standard/tests/strings/vprintf_variation11_64bit.phpt +++ b/ext/standard/tests/strings/vprintf_variation11_64bit.phpt @@ -26,7 +26,7 @@ $formats = array( "%10.4o %-10.4o %04o %04.4o", "%'#2o %'2o %'$2o %'_2o", "%o %o %o %o", - "%% %%o %10", + "%% %%o", '%3$o %4$o %1$o %2$o' ); @@ -39,7 +39,7 @@ $args_array = array( array(0123456, 01234567, -01234567, 01234567), array(0111, 02222, -0333333, -044444444), array(0x123b, 0xfAb, 0123, 012), - array(01234, 0567, -01234), + array(01234, 0567), array(03, 04, 01, 02) ); @@ -84,8 +84,8 @@ int(54) int(17) -- Iteration 7 -- -% %o -int(5) +% %o +int(4) -- Iteration 8 -- 1 2 3 4 diff --git a/ext/standard/tests/strings/vprintf_variation13.phpt b/ext/standard/tests/strings/vprintf_variation13.phpt index 25968538c8e6f..39c6963689857 100644 --- a/ext/standard/tests/strings/vprintf_variation13.phpt +++ b/ext/standard/tests/strings/vprintf_variation13.phpt @@ -26,7 +26,7 @@ $formats = array( "%10.4x %-10.4x %04x %04.4x", "%'#2x %'2x %'$2x %'_2x", "%x %x %x %x", - "% %%x x%", + "% %%x", '%3$x %4$x %1$x %2$x' ); @@ -56,7 +56,7 @@ foreach($formats as $format) { } ?> ---EXPECTF-- +--EXPECT-- *** Testing vprintf() : hexa formats with hexa values *** -- Iteration 1 -- @@ -84,8 +84,8 @@ int(22) int(12) -- Iteration 7 -- -%34 x -int(5) +%34 +int(3) -- Iteration 8 -- 1 2 3 4 diff --git a/ext/standard/tests/strings/vprintf_variation13_64bit.phpt b/ext/standard/tests/strings/vprintf_variation13_64bit.phpt index 261d10fe4e285..c9af50fc948e4 100644 --- a/ext/standard/tests/strings/vprintf_variation13_64bit.phpt +++ b/ext/standard/tests/strings/vprintf_variation13_64bit.phpt @@ -26,7 +26,7 @@ $formats = array( "%10.4x %-10.4x %04x %04.4x", "%'#2x %'2x %'$2x %'_2x", "%x %x %x %x", - "% %%x x%", + "% %%x", '%3$x %4$x %1$x %2$x' ); @@ -39,7 +39,7 @@ $args_array = array( array(123456, 12345678, -1234567, 1234567), array(1, 0x2222, 0333333, -0x44444444), array(0x123b, 0xfAb, "0xaxz", 012), - array(0x1234, 0x34, 0x2ff), + array(0x1234, 0x34), array(0x3, 0x4, 0x1, 0x2) ); @@ -56,7 +56,7 @@ foreach($formats as $format) { } ?> ---EXPECTF-- +--EXPECT-- *** Testing vprintf() : hexa formats with hexa values *** -- Iteration 1 -- @@ -84,8 +84,8 @@ int(30) int(12) -- Iteration 7 -- -%34 x -int(5) +%34 +int(3) -- Iteration 8 -- 1 2 3 4 diff --git a/ext/standard/tests/strings/vprintf_variation3.phpt b/ext/standard/tests/strings/vprintf_variation3.phpt index c665eb024d6ca..e3350e70d709a 100644 --- a/ext/standard/tests/strings/vprintf_variation3.phpt +++ b/ext/standard/tests/strings/vprintf_variation3.phpt @@ -23,7 +23,7 @@ $formats = array( "%10.4d %-10.4d %04d %04.4d", "%'#2d %'2d %'$2d %'_2d", "%d %d %d %d", - "% %%d d%", + "% %%d", '%3$d %4$d %1$d %2$d' ); @@ -36,7 +36,7 @@ $args_array = array( array(123456, 12345678, -1234567, 1234567), array(111, 2222, 333333, 44444444), array(0x123b, 0xfAb, 0123, 012), - array(1234, -5678, 2345), + array(1234, -5678), array(3, 4, 1, 2) ); @@ -81,8 +81,8 @@ int(24) int(15) -- Iteration 7 -- -%-5678 d -int(8) +%-5678 +int(6) -- Iteration 8 -- 1 2 3 4 diff --git a/ext/standard/tests/strings/vprintf_variation5.phpt b/ext/standard/tests/strings/vprintf_variation5.phpt index 52d2424353bd5..bdc41718f01e4 100644 --- a/ext/standard/tests/strings/vprintf_variation5.phpt +++ b/ext/standard/tests/strings/vprintf_variation5.phpt @@ -23,7 +23,7 @@ $formats = array( "%10.4f %-10.4F %04f %04.4f", "%'#2f %'2f %'$2f %'_2f", "%f %f %f %f", - "% %%f f%", + "% %%f", '%3$f %4$f %1$f %2$f' ); @@ -36,7 +36,7 @@ $args_array = array( array(2e5, 2e-5, -2e5, -2e-5), array(0.2E5, -0.2e40, 0.2E-20, 0.2E+20), array(0x123b, 0xfAb, 0123, 012), - array(1234.1234, -5678.5678, 2345.2345), + array(1234.1234, -5678.5678), array(3.33, 4.44, 1.11, 2.22) ); @@ -81,8 +81,8 @@ int(98) int(43) -- Iteration 7 -- -%-5678.567800 f -int(15) +%-5678.567800 +int(13) -- Iteration 8 -- 1.110000 2.220000 3.330000 4.440000 diff --git a/ext/standard/tests/strings/vprintf_variation7.phpt b/ext/standard/tests/strings/vprintf_variation7.phpt index e2af17feb99d978dd552aedede46ac34e7918b52..6e66d9b182078bf8161b15c98063718675a1cd22 100644 GIT binary patch delta 28 kcmew^@Je7q9rNZU=97$@gIV7)v2kVQm1vkucIPkv0H!wy_y7O^ delta 42 ycmaDQ@Lga-9W#r9s-eN=I_8s%>^chSY5Ao^o84I7F|jLfW#*M=m`=9hFaQ84V+`E@ diff --git a/ext/standard/tests/strings/vprintf_variation9.phpt b/ext/standard/tests/strings/vprintf_variation9.phpt index 83b6f21a4dc067de8181116e34b036b6b5340cd5..adc35c6b54562d81726dd3c512c091c9a68fea7c 100644 GIT binary patch delta 28 kcmaFQ^Mq%EJJV(_rcB1oJDIzf*tjzDN;Hfnd$Xwk0F-(O1^@s6 delta 41 xcmaFD^PXpeI}@`)vg&4crc6dQ9R(v}6VuHbn7f!b6q30z^GY;KCOfdH008{`3qb$? From 225117af71bea68969dfe99736326092183cb9b7 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 6 Apr 2020 14:21:56 +0200 Subject: [PATCH 225/338] Upgrade to PCRE2 10.34 We backport the slightly modified variant from master. --- NEWS | 3 + ext/pcre/pcre2lib/pcre2.h | 19 +- ext/pcre/pcre2lib/pcre2_auto_possess.c | 7 + ext/pcre/pcre2lib/pcre2_compile.c | 535 +- ext/pcre/pcre2lib/pcre2_context.c | 2 +- ext/pcre/pcre2lib/pcre2_dfa_match.c | 129 +- ext/pcre/pcre2lib/pcre2_error.c | 3 + ext/pcre/pcre2lib/pcre2_internal.h | 105 +- ext/pcre/pcre2lib/pcre2_intmodedep.h | 10 +- ext/pcre/pcre2lib/pcre2_jit_compile.c | 2003 +++--- ext/pcre/pcre2lib/pcre2_jit_match.c | 1 - ext/pcre/pcre2lib/pcre2_jit_neon_inc.h | 343 + ext/pcre/pcre2lib/pcre2_jit_simd_inc.h | 993 +++ ext/pcre/pcre2lib/pcre2_maketables.c | 11 + ext/pcre/pcre2lib/pcre2_match.c | 603 +- ext/pcre/pcre2lib/pcre2_match_data.c | 15 +- ext/pcre/pcre2lib/pcre2_printint.c | 2 + ext/pcre/pcre2lib/pcre2_study.c | 306 +- ext/pcre/pcre2lib/pcre2_tables.c | 316 +- ext/pcre/pcre2lib/pcre2_ucd.c | 5623 +++++++++-------- ext/pcre/pcre2lib/pcre2_ucp.h | 7 +- ext/pcre/pcre2lib/sljit/sljitConfigInternal.h | 4 + ext/pcre/pcre2lib/sljit/sljitExecAllocator.c | 27 +- ext/pcre/pcre2lib/sljit/sljitLir.c | 69 +- ext/pcre/pcre2lib/sljit/sljitLir.h | 22 +- ext/pcre/pcre2lib/sljit/sljitNativeARM_32.c | 126 +- ext/pcre/pcre2lib/sljit/sljitNativeARM_64.c | 111 +- .../pcre2lib/sljit/sljitNativeARM_T2_32.c | 76 +- ext/pcre/pcre2lib/sljit/sljitNativeMIPS_32.c | 2 + .../pcre2lib/sljit/sljitNativeMIPS_common.c | 155 +- ext/pcre/pcre2lib/sljit/sljitNativePPC_32.c | 2 + ext/pcre/pcre2lib/sljit/sljitNativePPC_64.c | 3 - .../pcre2lib/sljit/sljitNativePPC_common.c | 214 +- ext/pcre/pcre2lib/sljit/sljitNativeSPARC_32.c | 2 + .../pcre2lib/sljit/sljitNativeSPARC_common.c | 102 +- ext/pcre/pcre2lib/sljit/sljitNativeX86_32.c | 4 +- ext/pcre/pcre2lib/sljit/sljitNativeX86_64.c | 54 +- .../pcre2lib/sljit/sljitNativeX86_common.c | 125 +- ext/pcre/pcre2lib/sljit/sljitUtils.c | 6 + 39 files changed, 7433 insertions(+), 4707 deletions(-) create mode 100644 ext/pcre/pcre2lib/pcre2_jit_neon_inc.h create mode 100644 ext/pcre/pcre2lib/pcre2_jit_simd_inc.h diff --git a/NEWS b/NEWS index 60781fc2eba68..7b34c515c03ed 100644 --- a/NEWS +++ b/NEWS @@ -26,6 +26,9 @@ PHP NEWS . Fixed bug #79497 (stream_socket_client() throws an unknown error sometimes with <1s timeout). (Joe Cai) +PCRE: + . Upgraded to PCRE2 10.34. (cmb) + - SPL: . Fixed bug #69264 (__debugInfo() ignored while extending SPL classes). (cmb) . Fixed bug #67369 (ArrayObject serialization drops the iterator class). diff --git a/ext/pcre/pcre2lib/pcre2.h b/ext/pcre/pcre2lib/pcre2.h index 102b5d91f1adf..cb9d61a35b14e 100644 --- a/ext/pcre/pcre2lib/pcre2.h +++ b/ext/pcre/pcre2lib/pcre2.h @@ -5,7 +5,7 @@ /* This is the public header file for the PCRE library, second API, to be #included by applications that call PCRE2 functions. - Copyright (c) 2016-2018 University of Cambridge + Copyright (c) 2016-2019 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE. /* The current PCRE version information. */ #define PCRE2_MAJOR 10 -#define PCRE2_MINOR 33 +#define PCRE2_MINOR 34 #define PCRE2_PRERELEASE -#define PCRE2_DATE 2019-04-16 +#define PCRE2_DATE 2019-11-21 /* When an application links to a PCRE DLL in Windows, the symbols that are imported have to be identified as such. When building PCRE2, the appropriate @@ -142,6 +142,7 @@ D is inspected during pcre2_dfa_match() execution #define PCRE2_USE_OFFSET_LIMIT 0x00800000u /* J M D */ #define PCRE2_EXTENDED_MORE 0x01000000u /* C */ #define PCRE2_LITERAL 0x02000000u /* C */ +#define PCRE2_MATCH_INVALID_UTF 0x04000000u /* J M D */ /* An additional compile options word is available in the compile context. */ @@ -305,6 +306,8 @@ pcre2_pattern_convert(). */ #define PCRE2_ERROR_INVALID_HYPHEN_IN_OPTIONS 194 #define PCRE2_ERROR_ALPHA_ASSERTION_UNKNOWN 195 #define PCRE2_ERROR_SCRIPT_RUN_NOT_AVAILABLE 196 +#define PCRE2_ERROR_TOO_MANY_CAPTURES 197 +#define PCRE2_ERROR_CONDITION_ATOMIC_ASSERTION_EXPECTED 198 /* "Expected" matching error codes: no match and partial match. */ @@ -390,6 +393,7 @@ released, the numbers must not be changed. */ #define PCRE2_ERROR_HEAPLIMIT (-63) #define PCRE2_ERROR_CONVERT_SYNTAX (-64) #define PCRE2_ERROR_INTERNAL_DUPMATCH (-65) +#define PCRE2_ERROR_DFA_UINVALID_UTF (-66) /* Request types for pcre2_pattern_info() */ @@ -580,7 +584,7 @@ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_set_bsr(pcre2_compile_context *, uint32_t); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ - pcre2_set_character_tables(pcre2_compile_context *, const unsigned char *); \ + pcre2_set_character_tables(pcre2_compile_context *, const uint8_t *); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_set_compile_extra_options(pcre2_compile_context *, uint32_t); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ @@ -675,6 +679,8 @@ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ pcre2_match_data_free(pcre2_match_data *); \ PCRE2_EXP_DECL PCRE2_SPTR PCRE2_CALL_CONVENTION \ pcre2_get_mark(pcre2_match_data *); \ +PCRE2_EXP_DECL PCRE2_SIZE PCRE2_CALL_CONVENTION \ + pcre2_get_match_data_size(pcre2_match_data *); \ PCRE2_EXP_DECL uint32_t PCRE2_CALL_CONVENTION \ pcre2_get_ovector_count(pcre2_match_data *); \ PCRE2_EXP_DECL PCRE2_SIZE PCRE2_CALL_CONVENTION \ @@ -773,7 +779,8 @@ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_get_error_message(int, PCRE2_UCHAR *, PCRE2_SIZE); \ PCRE2_EXP_DECL const uint8_t PCRE2_CALL_CONVENTION \ *pcre2_maketables(pcre2_general_context *); \ - +PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ + pcre2_maketables_free(pcre2_general_context *, const uint8_t *); /* Define macros that generate width-specific names from generic versions. The three-level macro scheme is necessary to get the macros expanded when we want @@ -838,6 +845,7 @@ pcre2_compile are called by application code. */ #define pcre2_general_context_free PCRE2_SUFFIX(pcre2_general_context_free_) #define pcre2_get_error_message PCRE2_SUFFIX(pcre2_get_error_message_) #define pcre2_get_mark PCRE2_SUFFIX(pcre2_get_mark_) +#define pcre2_get_match_data_size PCRE2_SUFFIX(pcre2_get_match_data_size_) #define pcre2_get_ovector_pointer PCRE2_SUFFIX(pcre2_get_ovector_pointer_) #define pcre2_get_ovector_count PCRE2_SUFFIX(pcre2_get_ovector_count_) #define pcre2_get_startchar PCRE2_SUFFIX(pcre2_get_startchar_) @@ -848,6 +856,7 @@ pcre2_compile are called by application code. */ #define pcre2_jit_stack_create PCRE2_SUFFIX(pcre2_jit_stack_create_) #define pcre2_jit_stack_free PCRE2_SUFFIX(pcre2_jit_stack_free_) #define pcre2_maketables PCRE2_SUFFIX(pcre2_maketables_) +#define pcre2_maketables_free PCRE2_SUFFIX(pcre2_maketables_free_) #define pcre2_match PCRE2_SUFFIX(pcre2_match_) #define pcre2_match_context_copy PCRE2_SUFFIX(pcre2_match_context_copy_) #define pcre2_match_context_create PCRE2_SUFFIX(pcre2_match_context_create_) diff --git a/ext/pcre/pcre2lib/pcre2_auto_possess.c b/ext/pcre/pcre2lib/pcre2_auto_possess.c index 6d7b7c4a4d979..5b95b9b8a8b05 100644 --- a/ext/pcre/pcre2lib/pcre2_auto_possess.c +++ b/ext/pcre/pcre2lib/pcre2_auto_possess.c @@ -624,6 +624,13 @@ for(;;) case OP_ASSERTBACK_NOT: case OP_ONCE: return !entered_a_group; + + /* Non-atomic assertions - don't possessify last iterator. This needs + more thought. */ + + case OP_ASSERT_NA: + case OP_ASSERTBACK_NA: + return FALSE; } /* Skip over the bracket and inspect what comes next. */ diff --git a/ext/pcre/pcre2lib/pcre2_compile.c b/ext/pcre/pcre2lib/pcre2_compile.c index 068735ae8eed6..f2e6b6b5bde42 100644 --- a/ext/pcre/pcre2lib/pcre2_compile.c +++ b/ext/pcre/pcre2lib/pcre2_compile.c @@ -135,6 +135,9 @@ static BOOL set_lookbehind_lengths(uint32_t **, int *, int *, parsed_recurse_check *, compile_block *); +static int + check_lookbehinds(uint32_t *, uint32_t **, parsed_recurse_check *, + compile_block *); /************************************************* @@ -250,36 +253,41 @@ is present where expected in a conditional group. */ #define META_LOOKBEHIND 0x80250000u /* (?<= */ #define META_LOOKBEHINDNOT 0x80260000u /* (? META_END. A macros encapsulates -the storing of literal values in the parsed pattern. */ +/* Only in 32-bit mode can there be literals > META_END. A macro encapsulates +the storing of literal values in the main parsed pattern, where they can always +be quantified. */ #if PCRE2_CODE_UNIT_WIDTH == 32 #define PARSED_LITERAL(c, p) \ @@ -2474,6 +2497,7 @@ uint32_t delimiter; uint32_t namelen; uint32_t class_range_state; uint32_t *verblengthptr = NULL; /* Value avoids compiler warning */ +uint32_t *verbstartptr = NULL; uint32_t *previous_callout = NULL; uint32_t *parsed_pattern = cb->parsed_pattern; uint32_t *parsed_pattern_end = cb->parsed_pattern_end; @@ -2600,10 +2624,20 @@ while (ptr < ptrend) errorcode = ERR28; goto FAILED; } - if (!inverbname && after_manual_callout-- <= 0) - parsed_pattern = manage_callouts(thisptr, &previous_callout, - auto_callout, parsed_pattern, cb); - PARSED_LITERAL(c, parsed_pattern); + if (inverbname) + { /* Don't use PARSED_LITERAL() because it */ +#if PCRE2_CODE_UNIT_WIDTH == 32 /* sets okquantifier. */ + if (c >= META_END) *parsed_pattern++ = META_BIGVALUE; +#endif + *parsed_pattern++ = c; + } + else + { + if (after_manual_callout-- <= 0) + parsed_pattern = manage_callouts(thisptr, &previous_callout, + auto_callout, parsed_pattern, cb); + PARSED_LITERAL(c, parsed_pattern); + } meta_quantifier = 0; } continue; /* Next character */ @@ -2640,13 +2674,15 @@ while (ptr < ptrend) switch(c) { - default: - PARSED_LITERAL(c, parsed_pattern); + default: /* Don't use PARSED_LITERAL() because it */ +#if PCRE2_CODE_UNIT_WIDTH == 32 /* sets okquantifier. */ + if (c >= META_END) *parsed_pattern++ = META_BIGVALUE; +#endif + *parsed_pattern++ = c; break; case CHAR_RIGHT_PARENTHESIS: inverbname = FALSE; - okquantifier = FALSE; /* Was probably set by literals */ /* This is the length in characters */ verbnamelength = (PCRE2_SIZE)(parsed_pattern - verblengthptr - 1); /* But the limit on the length is in code units */ @@ -2680,8 +2716,11 @@ while (ptr < ptrend) switch(escape) { - case 0: - PARSED_LITERAL(c, parsed_pattern); + case 0: /* Don't use PARSED_LITERAL() because it */ +#if PCRE2_CODE_UNIT_WIDTH == 32 /* sets okquantifier. */ + if (c >= META_END) *parsed_pattern++ = META_BIGVALUE; +#endif + *parsed_pattern++ = c; break; case ESC_Q: @@ -3135,6 +3174,21 @@ while (ptr < ptrend) goto FAILED_BACK; } + /* Most (*VERB)s are not allowed to be quantified, but an ungreedy + quantifier can be useful for (*ACCEPT) - meaning "succeed on backtrack", a + sort of negated (*COMMIT). We therefore allow (*ACCEPT) to be quantified by + wrapping it in non-capturing brackets, but we have to allow for a preceding + (*MARK) for when (*ACCEPT) has an argument. */ + + if (parsed_pattern[-1] == META_ACCEPT) + { + uint32_t *p; + for (p = parsed_pattern - 1; p >= verbstartptr; p--) p[1] = p[0]; + *verbstartptr = META_NOCAPTURE; + parsed_pattern[1] = META_KET; + parsed_pattern += 2; + } + /* Now we can put the quantifier into the parsed pattern vector. At this stage, we have only the basic quantifier. The check for a following + or ? modifier happens at the top of the loop, after any intervening comments @@ -3581,6 +3635,8 @@ while (ptr < ptrend) if (c == CHAR_RIGHT_SQUARE_BRACKET && !inescq) break; } /* End of class-processing loop */ + /* -] at the end of a class is a literal '-' */ + if (class_range_state == RANGE_STARTED) { parsed_pattern[-1] = CHAR_MINUS; @@ -3611,6 +3667,11 @@ while (ptr < ptrend) nest_depth++; if ((options & PCRE2_NO_AUTO_CAPTURE) == 0) { + if (cb->bracount >= MAX_GROUP_NUMBER) + { + errorcode = ERR97; + goto FAILED; + } cb->bracount++; *parsed_pattern++ = META_CAPTURE | cb->bracount; } @@ -3658,19 +3719,20 @@ while (ptr < ptrend) goto FAILED; } - /* Check for expecting an assertion condition. If so, only lookaround - assertions are valid. */ + /* Check for expecting an assertion condition. If so, only atomic + lookaround assertions are valid. */ meta = alasmeta[i].meta; if (prev_expect_cond_assert > 0 && (meta < META_LOOKAHEAD || meta > META_LOOKBEHINDNOT)) { - errorcode = ERR28; /* Assertion expected */ + errorcode = (meta == META_LOOKAHEAD_NA || meta == META_LOOKBEHIND_NA)? + ERR98 : ERR28; /* (Atomic) assertion expected */ goto FAILED; } - /* The lookaround alphabetic synonyms can be almost entirely handled by - jumping to the code that handles the traditional symbolic forms. */ + /* The lookaround alphabetic synonyms can mostly be handled by jumping + to the code that handles the traditional symbolic forms. */ switch(meta) { @@ -3684,11 +3746,17 @@ while (ptr < ptrend) case META_LOOKAHEAD: goto POSITIVE_LOOK_AHEAD; + case META_LOOKAHEAD_NA: + *parsed_pattern++ = meta; + ptr++; + goto POST_ASSERTION; + case META_LOOKAHEADNOT: goto NEGATIVE_LOOK_AHEAD; case META_LOOKBEHIND: case META_LOOKBEHINDNOT: + case META_LOOKBEHIND_NA: *parsed_pattern++ = meta; ptr--; goto POST_LOOKBEHIND; @@ -3770,6 +3838,12 @@ while (ptr < ptrend) goto FAILED; } + /* Remember where this verb, possibly with a preceding (*MARK), starts, + for handling quantified (*ACCEPT). */ + + verbstartptr = parsed_pattern; + okquantifier = (verbs[i].meta == META_ACCEPT); + /* It appears that Perl allows any characters whatsoever, other than a closing parenthesis, to appear in arguments ("names"), so we no longer insist on letters, digits, and underscores. Perl does not, however, do @@ -4386,7 +4460,7 @@ while (ptr < ptrend) *parsed_pattern++ = (ptr[1] == CHAR_EQUALS_SIGN)? META_LOOKBEHIND : META_LOOKBEHINDNOT; - POST_LOOKBEHIND: /* Come from (*plb: and (*nlb: */ + POST_LOOKBEHIND: /* Come from (*plb: (*naplb: and (*nlb: */ *has_lookbehind = TRUE; offset = (PCRE2_SIZE)(ptr - cb->start_pattern - 2); PUTOFFSET(offset, parsed_pattern); @@ -4435,6 +4509,11 @@ while (ptr < ptrend) /* We have a name for this capturing group. It is also assigned a number, which is its primary means of identification. */ + if (cb->bracount >= MAX_GROUP_NUMBER) + { + errorcode = ERR97; + goto FAILED; + } cb->bracount++; *parsed_pattern++ = META_CAPTURE | cb->bracount; nest_depth++; @@ -4661,6 +4740,7 @@ for (;;) case OP_ASSERT_NOT: case OP_ASSERTBACK: case OP_ASSERTBACK_NOT: + case OP_ASSERTBACK_NA: if (!skipassert) return code; do code += GET(code, 1); while (*code == OP_ALT); code += PRIV(OP_lengths)[*code]; @@ -5221,8 +5301,10 @@ PCRE2_UCHAR *tempcode; PCRE2_UCHAR *previous = NULL; PCRE2_UCHAR op_previous; BOOL groupsetfirstcu = FALSE; +BOOL had_accept = FALSE; BOOL matched_char = FALSE; BOOL previous_matched_char = FALSE; +BOOL reset_caseful = FALSE; const uint8_t *cbits = cb->cbits; uint8_t classbits[32]; @@ -5355,7 +5437,7 @@ for (;; pptr++) if (meta < META_ASTERISK || meta > META_MINMAX_QUERY) { previous = code; - if (matched_char) okreturn = 1; + if (matched_char && !had_accept) okreturn = 1; } previous_matched_char = matched_char; @@ -5499,7 +5581,45 @@ for (;; pptr++) } /* End of 1-char optimization */ /* Handle character classes that contain more than just one literal - character. */ + character. If there are exactly two characters in a positive class, see if + they are case partners. This can be optimized to generate a caseless single + character match (which also sets first/required code units if relevant). */ + + if (meta == META_CLASS && pptr[1] < META_END && pptr[2] < META_END && + pptr[3] == META_CLASS_END) + { + uint32_t c = pptr[1]; + +#ifdef SUPPORT_UNICODE + if (UCD_CASESET(c) == 0) +#endif + { + uint32_t d; + +#ifdef SUPPORT_UNICODE + if (utf && c > 127) d = UCD_OTHERCASE(c); else +#endif + { +#if PCRE2_CODE_UNIT_WIDTH != 8 + if (c > 255) d = c; else +#endif + d = TABLE_GET(c, cb->fcc, c); + } + + if (c != d && pptr[2] == d) + { + pptr += 3; /* Move on to class end */ + meta = c; + if ((options & PCRE2_CASELESS) == 0) + { + reset_caseful = TRUE; + options |= PCRE2_CASELESS; + req_caseopt = REQ_CASELESS; + } + goto CLASS_CASELESS_CHAR; + } + } + } /* If a non-extended class contains a negative special such as \S, we need to flip the negation flag at the end, so that support for characters > 255 @@ -5994,7 +6114,7 @@ for (;; pptr++) workspace overflow. Do not set firstcu after *ACCEPT. */ case META_ACCEPT: - cb->had_accept = TRUE; + cb->had_accept = had_accept = TRUE; for (oc = cb->open_caps; oc != NULL && oc->assert_depth >= cb->assert_depth; oc = oc->next) @@ -6252,6 +6372,11 @@ for (;; pptr++) cb->assert_depth += 1; goto GROUP_PROCESS; + case META_LOOKAHEAD_NA: + bravalue = OP_ASSERT_NA; + cb->assert_depth += 1; + goto GROUP_PROCESS; + /* Optimize (?!) to (*FAIL) unless it is quantified - which is a weird thing to do, but Perl allows all assertions to be quantified, and when they contain capturing parentheses there may be a potential use for @@ -6283,6 +6408,11 @@ for (;; pptr++) cb->assert_depth += 1; goto GROUP_PROCESS; + case META_LOOKBEHIND_NA: + bravalue = OP_ASSERTBACK_NA; + cb->assert_depth += 1; + goto GROUP_PROCESS; + case META_ATOMIC: bravalue = OP_ONCE; goto GROUP_PROCESS_NOTE_EMPTY; @@ -6341,7 +6471,7 @@ for (;; pptr++) /* If we've just compiled an assertion, pop the assert depth. */ - if (bravalue >= OP_ASSERT && bravalue <= OP_ASSERTBACK_NOT) + if (bravalue >= OP_ASSERT && bravalue <= OP_ASSERTBACK_NA) cb->assert_depth -= 1; /* At the end of compiling, code is still pointing to the start of the @@ -6491,8 +6621,8 @@ for (;; pptr++) we must only take the reqcu when the group also set a firstcu. Otherwise, in that example, 'X' ends up set for both. */ - else if (bravalue == OP_ASSERT && subreqcuflags >= 0 && - subfirstcuflags >= 0) + else if ((bravalue == OP_ASSERT || bravalue == OP_ASSERT_NA) && + subreqcuflags >= 0 && subfirstcuflags >= 0) { reqcu = subreqcu; reqcuflags = subreqcuflags; @@ -6713,10 +6843,6 @@ for (;; pptr++) reqvary = (repeat_min == repeat_max)? 0 : REQ_VARY; op_type = 0; - /* If the repeat is {1} we can ignore it. */ - - if (repeat_max == 1 && repeat_min == 1) goto END_REPEAT; - /* Adjust first and required code units for a zero repeat. */ if (repeat_min == 0) @@ -6759,7 +6885,10 @@ for (;; pptr++) tempcode = previous; op_previous = *previous; - /* Now handle repetition for the different types of item. */ + /* Now handle repetition for the different types of item. If the repeat + minimum and the repeat maximum are both 1, we can ignore the quantifier for + non-parenthesized items, as they have only one alternative. For anything in + parentheses, we must not ignore if {1} is possessive. */ switch (op_previous) { @@ -6773,6 +6902,7 @@ for (;; pptr++) case OP_CHARI: case OP_NOT: case OP_NOTI: + if (repeat_max == 1 && repeat_min == 1) goto END_REPEAT; op_type = chartypeoffset[op_previous - OP_CHAR]; /* Deal with UTF characters that take up more than one code unit. */ @@ -6819,6 +6949,7 @@ for (;; pptr++) code = previous; goto END_REPEAT; } + if (repeat_max == 1 && repeat_min == 1) goto END_REPEAT; if (repeat_min == 0 && repeat_max == REPEAT_UNLIMITED) *code++ = OP_CRSTAR + repeat_type; @@ -6853,6 +6984,8 @@ for (;; pptr++) repetition. */ case OP_RECURSE: + if (repeat_max == 1 && repeat_min == 1 && !possessive_quantifier) + goto END_REPEAT; /* Generate unwrapped repeats for a non-zero minimum, except when the minimum is 1 and the maximum unlimited, because that can be handled with @@ -6923,8 +7056,10 @@ for (;; pptr++) case OP_ASSERT: case OP_ASSERT_NOT: + case OP_ASSERT_NA: case OP_ASSERTBACK: case OP_ASSERTBACK_NOT: + case OP_ASSERTBACK_NA: case OP_ONCE: case OP_SCRIPT_RUN: case OP_BRA: @@ -6935,6 +7070,9 @@ for (;; pptr++) PCRE2_UCHAR *bralink = NULL; PCRE2_UCHAR *brazeroptr = NULL; + if (repeat_max == 1 && repeat_min == 1 && !possessive_quantifier) + goto END_REPEAT; + /* Repeating a DEFINE group (or any group where the condition is always FALSE and there is only one branch) is pointless, but Perl allows the syntax, so we just ignore the repeat. */ @@ -7151,11 +7289,12 @@ for (;; pptr++) and SCRIPT_RUN groups at runtime, but in a different way.] Then, if the quantifier was possessive and the bracket is not a - conditional, we convert the BRA code to the POS form, and the KET code to - KETRPOS. (It turns out to be convenient at runtime to detect this kind of - subpattern at both the start and at the end.) The use of special opcodes - makes it possible to reduce greatly the stack usage in pcre2_match(). If - the group is preceded by OP_BRAZERO, convert this to OP_BRAPOSZERO. + conditional, we convert the BRA code to the POS form, and the KET code + to KETRPOS. (It turns out to be convenient at runtime to detect this + kind of subpattern at both the start and at the end.) The use of + special opcodes makes it possible to reduce greatly the stack usage in + pcre2_match(). If the group is preceded by OP_BRAZERO, convert this to + OP_BRAPOSZERO. Then, if the minimum number of matches is 1 or 0, cancel the possessive flag so that the default action below, of wrapping everything inside @@ -7256,6 +7395,8 @@ for (;; pptr++) int prop_type, prop_value; PCRE2_UCHAR *oldcode; + if (repeat_max == 1 && repeat_min == 1) goto END_REPEAT; + op_type = OP_TYPESTAR - OP_STAR; /* Use type opcodes */ mclength = 0; /* Not a character */ @@ -7718,9 +7859,15 @@ for (;; pptr++) } #endif - /* Caseful matches, or not one of the multicase characters. Get the - character's code units into mcbuffer, with the length in mclength. When not - in UTF mode, the length is always 1. */ + /* Caseful matches, or caseless and not one of the multicase characters. We + come here by goto in the case of a positive class that contains only + case-partners of a character with just two cases; matched_char has already + been set TRUE and options fudged if necessary. */ + + CLASS_CASELESS_CHAR: + + /* Get the character's code units into mcbuffer, with the length in + mclength. When not in UTF mode, the length is always 1. */ #ifdef SUPPORT_UNICODE if (utf) mclength = PRIV(ord2utf)(meta, mcbuffer); else @@ -7752,8 +7899,9 @@ for (;; pptr++) zeroreqcu = reqcu; zeroreqcuflags = reqcuflags; - /* If the character is more than one code unit long, we can set firstcu - only if it is not to be matched caselessly. */ + /* If the character is more than one code unit long, we can set a single + firstcu only if it is not to be matched caselessly. Multiple possible + starting code units may be picked up later in the studying code. */ if (mclength == 1 || req_caseopt == 0) { @@ -7783,7 +7931,17 @@ for (;; pptr++) reqcuflags = req_caseopt | cb->req_varyopt; } } - break; /* End default meta handling */ + + /* If caselessness was temporarily instated, reset it. */ + + if (reset_caseful) + { + options &= ~PCRE2_CASELESS; + req_caseopt = 0; + reset_caseful = FALSE; + } + + break; /* End literal character handling */ } /* End of big switch */ } /* End of big loop */ @@ -7874,7 +8032,10 @@ length = 2 + 2*LINK_SIZE + skipunits; /* Remember if this is a lookbehind assertion, and if it is, save its length and skip over the pattern offset. */ -lookbehind = *code == OP_ASSERTBACK || *code == OP_ASSERTBACK_NOT; +lookbehind = *code == OP_ASSERTBACK || + *code == OP_ASSERTBACK_NOT || + *code == OP_ASSERTBACK_NA; + if (lookbehind) { lookbehindlength = META_DATA(pptr[-1]); @@ -7948,7 +8109,7 @@ for (;;) /* If this is not the first branch, the first char and reqcu have to match the values from all the previous branches, except that if the previous value for reqcu didn't have REQ_VARY set, it can still match, - and we set REQ_VARY for the regex. */ + and we set REQ_VARY for the group from this branch's value. */ else { @@ -7987,7 +8148,7 @@ for (;;) else { reqcu = branchreqcu; - reqcuflags |= branchreqcuflags; /* To "or" REQ_VARY */ + reqcuflags |= branchreqcuflags; /* To "or" REQ_VARY if present */ } } } @@ -8167,7 +8328,7 @@ do { /* Positive forward assertion */ - else if (op == OP_ASSERT) + else if (op == OP_ASSERT || op == OP_ASSERT_NA) { if (!is_anchored(scode, bracket_map, cb, atomcount, TRUE)) return FALSE; } @@ -8305,7 +8466,7 @@ do { /* Positive forward assertions */ - else if (op == OP_ASSERT) + else if (op == OP_ASSERT || op == OP_ASSERT_NA) { if (!is_startline(scode, bracket_map, cb, atomcount, TRUE)) return FALSE; @@ -8547,9 +8708,11 @@ do { case OP_CBRAPOS: case OP_SCBRAPOS: case OP_ASSERT: + case OP_ASSERT_NA: case OP_ONCE: case OP_SCRIPT_RUN: - d = find_firstassertedcu(scode, &dflags, inassert + ((op==OP_ASSERT)?1:0)); + d = find_firstassertedcu(scode, &dflags, inassert + + ((op == OP_ASSERT || op == OP_ASSERT_NA)?1:0)); if (dflags < 0) return 0; if (cflags < 0) { c = d; cflags = dflags; } @@ -8578,6 +8741,19 @@ do { case OP_MINPLUSI: case OP_POSPLUSI: if (inassert == 0) return 0; + + /* If the character is more than one code unit long, we cannot set its + first code unit when matching caselessly. Later scanning may pick up + multiple code units. */ + +#ifdef SUPPORT_UNICODE +#if PCRE2_CODE_UNIT_WIDTH == 8 + if (scode[1] >= 0x80) return 0; +#elif PCRE2_CODE_UNIT_WIDTH == 16 + if (scode[1] >= 0xd800 && scode[1] <= 0xdfff) return 0; +#endif +#endif + if (cflags < 0) { c = scode[1]; cflags = REQ_CASELESS; } else if (c != scode[1]) return 0; break; @@ -8745,8 +8921,10 @@ for (;; pptr++) case META_COND_VERSION: case META_LOOKAHEAD: case META_LOOKAHEADNOT: + case META_LOOKAHEAD_NA: case META_LOOKBEHIND: case META_LOOKBEHINDNOT: + case META_LOOKBEHIND_NA: case META_NOCAPTURE: case META_SCRIPT_RUN: nestlevel++; @@ -8798,7 +8976,7 @@ Returns: the group length or a negative number static int get_grouplength(uint32_t **pptrptr, BOOL isinline, int *errcodeptr, int *lcptr, - int group, parsed_recurse_check *recurses, compile_block *cb) + int group, parsed_recurse_check *recurses, compile_block *cb) { int branchlength; int grouplength = -1; @@ -8847,8 +9025,7 @@ return -1; *************************************************/ /* Return a fixed length for a branch in a lookbehind, giving an error if the -length is not fixed. If any lookbehinds are encountered on the way, they get -their length set. On entry, *pptrptr points to the first element inside the +length is not fixed. On entry, *pptrptr points to the first element inside the branch. On exit it is set to point to the ALT or KET. Arguments: @@ -8978,15 +9155,16 @@ for (;; pptr++) } break; - /* Lookaheads can be ignored, but we must start the skip inside the group - so that it isn't treated as a group within the branch. */ + /* Lookaheads do not contribute to the length of this branch, but they may + contain lookbehinds within them whose lengths need to be set. */ case META_LOOKAHEAD: case META_LOOKAHEADNOT: - pptr = parsed_skip(pptr + 1, PSKIP_KET); - if (pptr == NULL) goto PARSED_SKIP_FAILED; + case META_LOOKAHEAD_NA: + *errcodeptr = check_lookbehinds(pptr + 1, &pptr, recurses, cb); + if (*errcodeptr != 0) return -1; - /* Also ignore any qualifiers that follow a lookahead assertion. */ + /* Ignore any qualifiers that follow a lookahead assertion. */ switch (pptr[1]) { @@ -9013,10 +9191,12 @@ for (;; pptr++) } break; - /* Lookbehinds can be ignored, but must themselves be checked. */ + /* A nested lookbehind does not contribute any length to this lookbehind, + but must itself be checked and have its lengths set. */ case META_LOOKBEHIND: case META_LOOKBEHINDNOT: + case META_LOOKBEHIND_NA: if (!set_lookbehind_lengths(&pptr, errcodeptr, lcptr, recurses, cb)) return -1; break; @@ -9178,8 +9358,26 @@ for (;; pptr++) case META_MINMAX_QUERY: if (pptr[1] == pptr[2]) { - if (pptr[1] == 0) branchlength -= lastitemlength; - else itemlength = (pptr[1] - 1) * lastitemlength; + switch(pptr[1]) + { + case 0: + branchlength -= lastitemlength; + break; + + case 1: + itemlength = 0; + break; + + default: /* Check for integer overflow */ + if (lastitemlength != 0 && /* Should not occur, but just in case */ + INT_MAX/lastitemlength < pptr[1] - 1) + { + *errcodeptr = ERR87; /* Integer overflow; lookbehind too big */ + return -1; + } + itemlength = (pptr[1] - 1) * lastitemlength; + break; + } pptr += 2; break; } @@ -9193,24 +9391,23 @@ for (;; pptr++) return -1; } - /* Add the item length to the branchlength, and save it for use if the next - thing is a quantifier. */ - - branchlength += itemlength; - lastitemlength = itemlength; - - /* Ensure that the length does not overflow the limit. */ + /* Add the item length to the branchlength, checking for integer overflow and + for the branch length exceeding the limit. */ - if (branchlength > LOOKBEHIND_MAX) + if (INT_MAX - branchlength < (int)itemlength || + (branchlength += itemlength) > LOOKBEHIND_MAX) { *errcodeptr = ERR87; return -1; } + + /* Save this item length for use if the next item is a quantifier. */ + + lastitemlength = itemlength; } EXIT: *pptrptr = pptr; -if (branchlength > cb->max_lookbehind) cb->max_lookbehind = branchlength; return branchlength; PARSED_SKIP_FAILED: @@ -9229,6 +9426,11 @@ branches. An error occurs if any branch does not have a fixed length that is less than the maximum (65535). On exit, the pointer must be left on the final ket. +The function also maintains the max_lookbehind value. Any lookbehind branch +that contains a nested lookbehind may actually look further back than the +length of the branch. The additional amount is passed back from +get_branchlength() as an "extra" value. + Arguments: pptrptr pointer to pointer in the parsed pattern errcodeptr pointer to error code @@ -9262,6 +9464,7 @@ do if (cb->erroroffset == PCRE2_UNSET) cb->erroroffset = offset; return FALSE; } + if (branchlength > cb->max_lookbehind) cb->max_lookbehind = branchlength; *bptr |= branchlength; /* branchlength never more than 65535 */ bptr = *pptrptr; } @@ -9282,20 +9485,30 @@ set_lookbehind_lengths() for each one. At the start, the errorcode is zero and the error offset is marked unset. The enables the functions above not to override settings from deeper nestings. -Arguments cb points to the compile block -Returns: 0 on success, or an errorcode (cb->erroroffset will be set) +This function is called recursively from get_branchlength() for lookaheads in +order to process any lookbehinds that they may contain. It stops when it hits a +non-nested closing parenthesis in this case, returning a pointer to it. + +Arguments + pptr points to where to start (start of pattern or start of lookahead) + retptr if not NULL, return the ket pointer here + recurses chain of recurse_check to catch mutual recursion + cb points to the compile block + +Returns: 0 on success, or an errorcode (cb->erroroffset will be set) */ static int -check_lookbehinds(compile_block *cb) +check_lookbehinds(uint32_t *pptr, uint32_t **retptr, + parsed_recurse_check *recurses, compile_block *cb) { -uint32_t *pptr; int errorcode = 0; int loopcount = 0; +int nestlevel = 0; cb->erroroffset = PCRE2_UNSET; -for (pptr = cb->parsed_pattern; *pptr != META_END; pptr++) +for (; *pptr != META_END; pptr++) { if (*pptr < META_END) continue; /* Literal */ @@ -9309,14 +9522,31 @@ for (pptr = cb->parsed_pattern; *pptr != META_END; pptr++) pptr += 1; break; + case META_KET: + if (--nestlevel < 0) + { + if (retptr != NULL) *retptr = pptr; + return 0; + } + break; + + case META_ATOMIC: + case META_CAPTURE: + case META_COND_ASSERT: + case META_LOOKAHEAD: + case META_LOOKAHEADNOT: + case META_LOOKAHEAD_NA: + case META_NOCAPTURE: + case META_SCRIPT_RUN: + nestlevel++; + break; + case META_ACCEPT: case META_ALT: case META_ASTERISK: case META_ASTERISK_PLUS: case META_ASTERISK_QUERY: - case META_ATOMIC: case META_BACKREF: - case META_CAPTURE: case META_CIRCUMFLEX: case META_CLASS: case META_CLASS_EMPTY: @@ -9324,14 +9554,9 @@ for (pptr = cb->parsed_pattern; *pptr != META_END; pptr++) case META_CLASS_END: case META_CLASS_NOT: case META_COMMIT: - case META_COND_ASSERT: case META_DOLLAR: case META_DOT: case META_FAIL: - case META_KET: - case META_LOOKAHEAD: - case META_LOOKAHEADNOT: - case META_NOCAPTURE: case META_PLUS: case META_PLUS_PLUS: case META_PLUS_QUERY: @@ -9341,7 +9566,6 @@ for (pptr = cb->parsed_pattern; *pptr != META_END; pptr++) case META_QUERY_QUERY: case META_RANGE_ESCAPED: case META_RANGE_LITERAL: - case META_SCRIPT_RUN: case META_SKIP: case META_THEN: break; @@ -9351,13 +9575,22 @@ for (pptr = cb->parsed_pattern; *pptr != META_END; pptr++) break; case META_BACKREF_BYNAME: + case META_RECURSE_BYNAME: + pptr += 1 + SIZEOFFSET; + break; + case META_COND_DEFINE: case META_COND_NAME: case META_COND_NUMBER: case META_COND_RNAME: case META_COND_RNUMBER: - case META_RECURSE_BYNAME: pptr += 1 + SIZEOFFSET; + nestlevel++; + break; + + case META_COND_VERSION: + pptr += 3; + nestlevel++; break; case META_CALLOUT_STRING: @@ -9378,7 +9611,6 @@ for (pptr = cb->parsed_pattern; *pptr != META_END; pptr++) break; case META_CALLOUT_NUMBER: - case META_COND_VERSION: pptr += 3; break; @@ -9392,7 +9624,8 @@ for (pptr = cb->parsed_pattern; *pptr != META_END; pptr++) case META_LOOKBEHIND: case META_LOOKBEHINDNOT: - if (!set_lookbehind_lengths(&pptr, &errorcode, &loopcount, NULL, cb)) + case META_LOOKBEHIND_NA: + if (!set_lookbehind_lengths(&pptr, &errorcode, &loopcount, recurses, cb)) return errorcode; break; } @@ -9494,6 +9727,10 @@ if (pattern == NULL) if (ccontext == NULL) ccontext = (pcre2_compile_context *)(&PRIV(default_compile_context)); +/* PCRE2_MATCH_INVALID_UTF implies UTF */ + +if ((options & PCRE2_MATCH_INVALID_UTF) != 0) options |= PCRE2_UTF; + /* Check that all undefined public option bits are zero. */ if ((options & ~PUBLIC_COMPILE_OPTIONS) != 0 || @@ -9672,7 +9909,7 @@ if ((options & PCRE2_LITERAL) == 0) ptr += skipatstart; -/* Can't support UTF or UCP unless PCRE2 has been compiled with UTF support. */ +/* Can't support UTF or UCP if PCRE2 was built without Unicode support. */ #ifndef SUPPORT_UNICODE if ((cb.external_options & (PCRE2_UTF|PCRE2_UCP)) != 0) @@ -9842,7 +10079,7 @@ lengths. */ if (has_lookbehind) { - errorcode = check_lookbehinds(&cb); + errorcode = check_lookbehinds(cb.parsed_pattern, NULL, NULL, &cb); if (errorcode != 0) goto HAD_CB_ERROR; } @@ -9990,8 +10227,9 @@ re->max_lookbehind = cb.max_lookbehind; if (cb.had_accept) { - reqcu = 0; /* Must disable after (*ACCEPT) */ + reqcu = 0; /* Must disable after (*ACCEPT) */ reqcuflags = REQ_NONE; + re->flags |= PCRE2_HASACCEPT; /* Disables minimum length */ } /* Fill in the final opcode and check for disastrous overflow. If no overflow, @@ -10112,6 +10350,8 @@ unit. */ if ((re->overall_options & PCRE2_NO_START_OPTIMIZE) == 0) { + int minminlength = 0; /* For minimal minlength from first/required CU */ + /* If we do not have a first code unit, see if there is one that is asserted (these are not saved during the compile because they can cause conflicts with actual literals that follow). */ @@ -10119,12 +10359,14 @@ if ((re->overall_options & PCRE2_NO_START_OPTIMIZE) == 0) if (firstcuflags < 0) firstcu = find_firstassertedcu(codestart, &firstcuflags, 0); - /* Save the data for a first code unit. */ + /* Save the data for a first code unit. The existence of one means the + minimum length must be at least 1. */ if (firstcuflags >= 0) { re->first_codeunit = firstcu; re->flags |= PCRE2_FIRSTSET; + minminlength++; /* Handle caseless first code units. */ @@ -10158,39 +10400,72 @@ if ((re->overall_options & PCRE2_NO_START_OPTIMIZE) == 0) is_startline(codestart, 0, &cb, 0, FALSE)) re->flags |= PCRE2_STARTLINE; - /* Handle the "required code unit", if one is set. In the case of an anchored - pattern, do this only if it follows a variable length item in the pattern. */ + /* Handle the "required code unit", if one is set. In the UTF case we can + increment the minimum minimum length only if we are sure this really is a + different character and not a non-starting code unit of the first character, + because the minimum length count is in characters, not code units. */ - if (reqcuflags >= 0 && - ((re->overall_options & PCRE2_ANCHORED) == 0 || - (reqcuflags & REQ_VARY) != 0)) + if (reqcuflags >= 0) { - re->last_codeunit = reqcu; - re->flags |= PCRE2_LASTSET; +#if PCRE2_CODE_UNIT_WIDTH == 16 + if ((re->overall_options & PCRE2_UTF) == 0 || /* Not UTF */ + firstcuflags < 0 || /* First not set */ + (firstcu & 0xf800) != 0xd800 || /* First not surrogate */ + (reqcu & 0xfc00) != 0xdc00) /* Req not low surrogate */ +#elif PCRE2_CODE_UNIT_WIDTH == 8 + if ((re->overall_options & PCRE2_UTF) == 0 || /* Not UTF */ + firstcuflags < 0 || /* First not set */ + (firstcu & 0x80) == 0 || /* First is ASCII */ + (reqcu & 0x80) == 0) /* Req is ASCII */ +#endif + { + minminlength++; + } - /* Handle caseless required code units as for first code units (above). */ + /* In the case of an anchored pattern, set up the value only if it follows + a variable length item in the pattern. */ - if ((reqcuflags & REQ_CASELESS) != 0) + if ((re->overall_options & PCRE2_ANCHORED) == 0 || + (reqcuflags & REQ_VARY) != 0) { - if (reqcu < 128 || (!utf && reqcu < 255)) + re->last_codeunit = reqcu; + re->flags |= PCRE2_LASTSET; + + /* Handle caseless required code units as for first code units (above). */ + + if ((reqcuflags & REQ_CASELESS) != 0) { - if (cb.fcc[reqcu] != reqcu) re->flags |= PCRE2_LASTCASELESS; - } + if (reqcu < 128 || (!utf && reqcu < 255)) + { + if (cb.fcc[reqcu] != reqcu) re->flags |= PCRE2_LASTCASELESS; + } #if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 8 - else if (reqcu <= MAX_UTF_CODE_POINT && UCD_OTHERCASE(reqcu) != reqcu) - re->flags |= PCRE2_LASTCASELESS; + else if (reqcu <= MAX_UTF_CODE_POINT && UCD_OTHERCASE(reqcu) != reqcu) + re->flags |= PCRE2_LASTCASELESS; #endif + } } } - /* Finally, study the compiled pattern to set up information such as a bitmap - of starting code units and a minimum matching length. */ + /* Study the compiled pattern to set up information such as a bitmap of + starting code units and a minimum matching length. */ if (PRIV(study)(re) != 0) { errorcode = ERR31; goto HAD_CB_ERROR; } + + /* If study() set a bitmap of starting code units, it implies a minimum + length of at least one. */ + + if ((re->flags & PCRE2_FIRSTMAPSET) != 0 && minminlength == 0) + minminlength = 1; + + /* If the minimum length set (or not set) by study() is less than the minimum + implied by required code units, override it. */ + + if (re->minlength < minminlength) re->minlength = minminlength; } /* End of start-of-match optimizations. */ /* Control ends up here in all cases. When running under valgrind, make a diff --git a/ext/pcre/pcre2lib/pcre2_context.c b/ext/pcre/pcre2lib/pcre2_context.c index 9c2886a6d02ad..f904a494a018b 100644 --- a/ext/pcre/pcre2lib/pcre2_context.c +++ b/ext/pcre/pcre2lib/pcre2_context.c @@ -323,7 +323,7 @@ data. */ PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION pcre2_set_character_tables(pcre2_compile_context *ccontext, - const unsigned char *tables) + const uint8_t *tables) { ccontext->tables = tables; return 0; diff --git a/ext/pcre/pcre2lib/pcre2_dfa_match.c b/ext/pcre/pcre2lib/pcre2_dfa_match.c index bbf3e21064b1e..7d8ffe8a3ec35 100644 --- a/ext/pcre/pcre2lib/pcre2_dfa_match.c +++ b/ext/pcre/pcre2lib/pcre2_dfa_match.c @@ -173,6 +173,8 @@ static const uint8_t coptable[] = { 0, /* Assert not */ 0, /* Assert behind */ 0, /* Assert behind not */ + 0, /* NA assert */ + 0, /* NA assert behind */ 0, /* ONCE */ 0, /* SCRIPT_RUN */ 0, 0, 0, 0, 0, /* BRA, BRAPOS, CBRA, CBRAPOS, COND */ @@ -248,6 +250,8 @@ static const uint8_t poptable[] = { 0, /* Assert not */ 0, /* Assert behind */ 0, /* Assert behind not */ + 0, /* NA assert */ + 0, /* NA assert behind */ 0, /* ONCE */ 0, /* SCRIPT_RUN */ 0, 0, 0, 0, 0, /* BRA, BRAPOS, CBRA, CBRAPOS, COND */ @@ -962,7 +966,7 @@ for (;;) if (ptr >= end_subject) { if ((mb->moptions & PCRE2_PARTIAL_HARD) != 0) - could_continue = TRUE; + return PCRE2_ERROR_PARTIAL; else { ADD_ACTIVE(state_offset + 1, 0); } } break; @@ -1011,10 +1015,12 @@ for (;;) /*-----------------------------------------------------------------*/ case OP_EODN: - if (clen == 0 && (mb->moptions & PCRE2_PARTIAL_HARD) != 0) - could_continue = TRUE; - else if (clen == 0 || (IS_NEWLINE(ptr) && ptr == end_subject - mb->nllen)) - { ADD_ACTIVE(state_offset + 1, 0); } + if (clen == 0 || (IS_NEWLINE(ptr) && ptr == end_subject - mb->nllen)) + { + if ((mb->moptions & PCRE2_PARTIAL_HARD) != 0) + return PCRE2_ERROR_PARTIAL; + ADD_ACTIVE(state_offset + 1, 0); + } break; /*-----------------------------------------------------------------*/ @@ -3152,8 +3158,8 @@ for (;;) /* We have finished the processing at the current subject character. If no new states have been set for the next character, we have found all the - matches that we are going to find. If we are at the top level and partial - matching has been requested, check for appropriate conditions. + matches that we are going to find. If partial matching has been requested, + check for appropriate conditions. The "forced_ fail" variable counts the number of (*F) encountered for the character. If it is equal to the original active_count (saved in @@ -3165,22 +3171,24 @@ for (;;) if (new_count <= 0) { - if (rlevel == 1 && /* Top level, and */ - could_continue && /* Some could go on, and */ + if (could_continue && /* Some could go on, and */ forced_fail != workspace[1] && /* Not all forced fail & */ ( /* either... */ (mb->moptions & PCRE2_PARTIAL_HARD) != 0 /* Hard partial */ || /* or... */ ((mb->moptions & PCRE2_PARTIAL_SOFT) != 0 && /* Soft partial and */ - match_count < 0) /* no matches */ + match_count < 0) /* no matches */ ) && /* And... */ ( - partial_newline || /* Either partial NL */ - ( /* or ... */ - ptr >= end_subject && /* End of subject and */ - ptr > mb->start_used_ptr) /* Inspected non-empty string */ + partial_newline || /* Either partial NL */ + ( /* or ... */ + ptr >= end_subject && /* End of subject and */ + ( /* either */ + ptr > mb->start_used_ptr || /* Inspected non-empty string */ + mb->allowemptypartial /* or pattern has lookbehind */ + ) /* or could match empty */ ) - ) + )) match_count = PCRE2_ERROR_PARTIAL; break; /* Exit from loop along the subject string */ } @@ -3246,6 +3254,11 @@ BOOL utf, anchored, startline, firstline; BOOL has_first_cu = FALSE; BOOL has_req_cu = FALSE; +#if PCRE2_CODE_UNIT_WIDTH == 8 +BOOL memchr_not_found_first_cu = FALSE; +BOOL memchr_not_found_first_cu2 = FALSE; +#endif + PCRE2_UCHAR first_cu = 0; PCRE2_UCHAR first_cu2 = 0; PCRE2_UCHAR req_cu = 0; @@ -3295,6 +3308,11 @@ if ((options & (PCRE2_PARTIAL_HARD|PCRE2_PARTIAL_SOFT)) != 0 && ((re->overall_options | options) & PCRE2_ENDANCHORED) != 0) return PCRE2_ERROR_BADOPTION; +/* Invalid UTF support is not available for DFA matching. */ + +if ((re->overall_options & PCRE2_MATCH_INVALID_UTF) != 0) + return PCRE2_ERROR_DFA_UINVALID_UTF; + /* Check that the first field in the block is the magic number. If it is not, return with PCRE2_ERROR_BADMAGIC. */ @@ -3404,6 +3422,8 @@ mb->tables = re->tables; mb->start_subject = subject; mb->end_subject = end_subject; mb->start_offset = start_offset; +mb->allowemptypartial = (re->max_lookbehind > 0) || + (re->flags & PCRE2_MATCH_EMPTY) != 0; mb->moptions = options; mb->poptions = re->overall_options; mb->match_call_count = 0; @@ -3619,7 +3639,10 @@ for (;;) /* Not anchored. Advance to a unique first code unit if there is one. In 8-bit mode, the use of memchr() gives a big speed up, even though we have to call it twice in caseless mode, in order to find the earliest occurrence - of the character in either of its cases. */ + of the character in either of its cases. If a call to memchr() that + searches the rest of the subject fails to find one case, remember that in + order not to keep on repeating the search. This can make a huge difference + when the strings are very long and only one case is present. */ else { @@ -3633,11 +3656,29 @@ for (;;) (smc = UCHAR21TEST(start_match)) != first_cu && smc != first_cu2) start_match++; + #else /* 8-bit code units */ - PCRE2_SPTR pp1 = - memchr(start_match, first_cu, end_subject-start_match); - PCRE2_SPTR pp2 = - memchr(start_match, first_cu2, end_subject-start_match); + PCRE2_SPTR pp1 = NULL; + PCRE2_SPTR pp2 = NULL; + PCRE2_SIZE cu2size = end_subject - start_match; + + if (!memchr_not_found_first_cu) + { + pp1 = memchr(start_match, first_cu, end_subject - start_match); + if (pp1 == NULL) memchr_not_found_first_cu = TRUE; + else cu2size = pp1 - start_match; + } + + /* If pp1 is not NULL, we have arranged to search only as far as pp1, + to see if the other case is earlier, so we can set "not found" only + when both searches have returned NULL. */ + + if (!memchr_not_found_first_cu2) + { + pp2 = memchr(start_match, first_cu2, cu2size); + memchr_not_found_first_cu2 = (pp2 == NULL && pp1 == NULL); + } + if (pp1 == NULL) start_match = (pp2 == NULL)? end_subject : pp2; else @@ -3653,7 +3694,7 @@ for (;;) while (start_match < end_subject && UCHAR21TEST(start_match) != first_cu) start_match++; -#else +#else /* 8-bit code units */ start_match = memchr(start_match, first_cu, end_subject - start_match); if (start_match == NULL) start_match = end_subject; #endif @@ -3740,6 +3781,8 @@ for (;;) if ((mb->moptions & (PCRE2_PARTIAL_HARD|PCRE2_PARTIAL_SOFT)) == 0) { + PCRE2_SPTR p; + /* The minimum matching length is a lower bound; no actual string of that length may actually match the pattern. Although the value is, strictly, in characters, we treat it as code units to avoid spending too much time @@ -3753,37 +3796,63 @@ for (;;) point. This optimization can save a huge amount of backtracking in patterns with nested unlimited repeats that aren't going to match. Writing separate code for cased/caseless versions makes it go faster, as - does using an autoincrement and backing off on a match. + does using an autoincrement and backing off on a match. As in the case of + the first code unit, using memchr() in the 8-bit library gives a big + speed up. Unlike the first_cu check above, we do not need to call + memchr() twice in the caseless case because we only need to check for the + presence of the character in either case, not find the first occurrence. + + The search can be skipped if the code unit was found later than the + current starting point in a previous iteration of the bumpalong loop. HOWEVER: when the subject string is very, very long, searching to its end can take a long time, and give bad performance on quite ordinary patterns. This showed up when somebody was matching something like /^\d+C/ on a 32-megabyte string... so we don't do this when the string is - sufficiently long. */ + sufficiently long, but it's worth searching a lot more for unanchored + patterns. */ - if (has_req_cu && end_subject - start_match < REQ_CU_MAX) + p = start_match + (has_first_cu? 1:0); + if (has_req_cu && p > req_cu_ptr) { - PCRE2_SPTR p = start_match + (has_first_cu? 1:0); - - /* We don't need to repeat the search if we haven't yet reached the - place we found it at last time. */ + PCRE2_SIZE check_length = end_subject - start_match; - if (p > req_cu_ptr) + if (check_length < REQ_CU_MAX || + (!anchored && check_length < REQ_CU_MAX * 1000)) { - if (req_cu != req_cu2) + if (req_cu != req_cu2) /* Caseless */ { +#if PCRE2_CODE_UNIT_WIDTH != 8 while (p < end_subject) { uint32_t pp = UCHAR21INCTEST(p); if (pp == req_cu || pp == req_cu2) { p--; break; } } +#else /* 8-bit code units */ + PCRE2_SPTR pp = p; + p = memchr(pp, req_cu, end_subject - pp); + if (p == NULL) + { + p = memchr(pp, req_cu2, end_subject - pp); + if (p == NULL) p = end_subject; + } +#endif /* PCRE2_CODE_UNIT_WIDTH != 8 */ } + + /* The caseful case */ + else { +#if PCRE2_CODE_UNIT_WIDTH != 8 while (p < end_subject) { if (UCHAR21INCTEST(p) == req_cu) { p--; break; } } + +#else /* 8-bit code units */ + p = memchr(p, req_cu, end_subject - p); + if (p == NULL) p = end_subject; +#endif } /* If we can't find the required code unit, break the matching loop, diff --git a/ext/pcre/pcre2lib/pcre2_error.c b/ext/pcre/pcre2lib/pcre2_error.c index 1d02cf14a3a2f..c61648cb7f466 100644 --- a/ext/pcre/pcre2lib/pcre2_error.c +++ b/ext/pcre/pcre2lib/pcre2_error.c @@ -184,6 +184,8 @@ static const unsigned char compile_error_texts[] = /* 95 */ "(*alpha_assertion) not recognized\0" "script runs require Unicode support, which this version of PCRE2 does not have\0" + "too many capturing groups (maximum 65535)\0" + "atomic assertion expected after (?( or (?(?C)\0" ; /* Match-time and UTF error texts are in the same format. */ @@ -268,6 +270,7 @@ static const unsigned char match_error_texts[] = "invalid syntax\0" /* 65 */ "internal error - duplicate substitution match\0" + "PCRE2_MATCH_INVALID_UTF is not supported for DFA matching\0" ; diff --git a/ext/pcre/pcre2lib/pcre2_internal.h b/ext/pcre/pcre2lib/pcre2_internal.h index 814d91bddb515..fe8ffe5c80db0 100644 --- a/ext/pcre/pcre2lib/pcre2_internal.h +++ b/ext/pcre/pcre2lib/pcre2_internal.h @@ -517,6 +517,7 @@ bytes in a code unit in that mode. */ #define PCRE2_HASBKPORX 0x00100000 /* contains \P, \p, or \X */ #define PCRE2_DUPCAPUSED 0x00200000 /* contains (?| */ #define PCRE2_HASBKC 0x00400000 /* contains \C */ +#define PCRE2_HASACCEPT 0x00800000 /* contains (*ACCEPT) */ #define PCRE2_MODE_MASK (PCRE2_MODE8 | PCRE2_MODE16 | PCRE2_MODE32) @@ -535,13 +536,14 @@ enum { PCRE2_MATCHEDBY_INTERPRETER, /* pcre2_match() */ #define MAGIC_NUMBER 0x50435245UL /* 'PCRE' */ /* The maximum remaining length of subject we are prepared to search for a -req_unit match. In 8-bit mode, memchr() is used and is much faster than the -search loop that has to be used in 16-bit and 32-bit modes. */ +req_unit match from an anchored pattern. In 8-bit mode, memchr() is used and is +much faster than the search loop that has to be used in 16-bit and 32-bit +modes. */ #if PCRE2_CODE_UNIT_WIDTH == 8 -#define REQ_CU_MAX 2000 +#define REQ_CU_MAX 5000 #else -#define REQ_CU_MAX 1000 +#define REQ_CU_MAX 2000 #endif /* Offsets for the bitmap tables in the cbits set of tables. Each table @@ -881,12 +883,16 @@ a positive value. */ #define STRING_atomic0 "atomic\0" #define STRING_pla0 "pla\0" #define STRING_plb0 "plb\0" +#define STRING_napla0 "napla\0" +#define STRING_naplb0 "naplb\0" #define STRING_nla0 "nla\0" #define STRING_nlb0 "nlb\0" #define STRING_sr0 "sr\0" #define STRING_asr0 "asr\0" #define STRING_positive_lookahead0 "positive_lookahead\0" #define STRING_positive_lookbehind0 "positive_lookbehind\0" +#define STRING_non_atomic_positive_lookahead0 "non_atomic_positive_lookahead\0" +#define STRING_non_atomic_positive_lookbehind0 "non_atomic_positive_lookbehind\0" #define STRING_negative_lookahead0 "negative_lookahead\0" #define STRING_negative_lookbehind0 "negative_lookbehind\0" #define STRING_script_run0 "script_run\0" @@ -1171,12 +1177,16 @@ only. */ #define STRING_atomic0 STR_a STR_t STR_o STR_m STR_i STR_c "\0" #define STRING_pla0 STR_p STR_l STR_a "\0" #define STRING_plb0 STR_p STR_l STR_b "\0" +#define STRING_napla0 STR_n STR_a STR_p STR_l STR_a "\0" +#define STRING_naplb0 STR_n STR_a STR_p STR_l STR_b "\0" #define STRING_nla0 STR_n STR_l STR_a "\0" #define STRING_nlb0 STR_n STR_l STR_b "\0" #define STRING_sr0 STR_s STR_r "\0" #define STRING_asr0 STR_a STR_s STR_r "\0" #define STRING_positive_lookahead0 STR_p STR_o STR_s STR_i STR_t STR_i STR_v STR_e STR_UNDERSCORE STR_l STR_o STR_o STR_k STR_a STR_h STR_e STR_a STR_d "\0" #define STRING_positive_lookbehind0 STR_p STR_o STR_s STR_i STR_t STR_i STR_v STR_e STR_UNDERSCORE STR_l STR_o STR_o STR_k STR_b STR_e STR_h STR_i STR_n STR_d "\0" +#define STRING_non_atomic_positive_lookahead0 STR_n STR_o STR_n STR_UNDERSCORE STR_a STR_t STR_o STR_m STR_i STR_c STR_UNDERSCORE STR_p STR_o STR_s STR_i STR_t STR_i STR_v STR_e STR_UNDERSCORE STR_l STR_o STR_o STR_k STR_a STR_h STR_e STR_a STR_d "\0" +#define STRING_non_atomic_positive_lookbehind0 STR_n STR_o STR_n STR_UNDERSCORE STR_a STR_t STR_o STR_m STR_i STR_c STR_UNDERSCORE STR_p STR_o STR_s STR_i STR_t STR_i STR_v STR_e STR_UNDERSCORE STR_l STR_o STR_o STR_k STR_b STR_e STR_h STR_i STR_n STR_d "\0" #define STRING_negative_lookahead0 STR_n STR_e STR_g STR_a STR_t STR_i STR_v STR_e STR_UNDERSCORE STR_l STR_o STR_o STR_k STR_a STR_h STR_e STR_a STR_d "\0" #define STRING_negative_lookbehind0 STR_n STR_e STR_g STR_a STR_t STR_i STR_v STR_e STR_UNDERSCORE STR_l STR_o STR_o STR_k STR_b STR_e STR_h STR_i STR_n STR_d "\0" #define STRING_script_run0 STR_s STR_c STR_r STR_i STR_p STR_t STR_UNDERSCORE STR_r STR_u STR_n "\0" @@ -1301,7 +1311,7 @@ enum { ESC_A = 1, ESC_G, ESC_K, ESC_B, ESC_b, ESC_D, ESC_d, ESC_S, ESC_s, Starting from 1 (i.e. after OP_END), the values up to OP_EOD must correspond in order to the list of escapes immediately above. Furthermore, values up to OP_DOLLM must not be changed without adjusting the table called autoposstab in -pcre2_auto_possess.c +pcre2_auto_possess.c. Whenever this list is updated, the two macro definitions that follow must be updated to match. The possessification table called "opcode_possessify" in @@ -1499,80 +1509,81 @@ enum { OP_KETRMIN, /* 123 order. They are for groups the repeat for ever. */ OP_KETRPOS, /* 124 Possessive unlimited repeat. */ - /* The assertions must come before BRA, CBRA, ONCE, and COND, and the four - asserts must remain in order. */ + /* The assertions must come before BRA, CBRA, ONCE, and COND. */ OP_REVERSE, /* 125 Move pointer back - used in lookbehind assertions */ OP_ASSERT, /* 126 Positive lookahead */ OP_ASSERT_NOT, /* 127 Negative lookahead */ OP_ASSERTBACK, /* 128 Positive lookbehind */ OP_ASSERTBACK_NOT, /* 129 Negative lookbehind */ + OP_ASSERT_NA, /* 130 Positive non-atomic lookahead */ + OP_ASSERTBACK_NA, /* 131 Positive non-atomic lookbehind */ /* ONCE, SCRIPT_RUN, BRA, BRAPOS, CBRA, CBRAPOS, and COND must come immediately after the assertions, with ONCE first, as there's a test for >= ONCE for a subpattern that isn't an assertion. The POS versions must immediately follow the non-POS versions in each case. */ - OP_ONCE, /* 130 Atomic group, contains captures */ - OP_SCRIPT_RUN, /* 131 Non-capture, but check characters' scripts */ - OP_BRA, /* 132 Start of non-capturing bracket */ - OP_BRAPOS, /* 133 Ditto, with unlimited, possessive repeat */ - OP_CBRA, /* 134 Start of capturing bracket */ - OP_CBRAPOS, /* 135 Ditto, with unlimited, possessive repeat */ - OP_COND, /* 136 Conditional group */ + OP_ONCE, /* 132 Atomic group, contains captures */ + OP_SCRIPT_RUN, /* 133 Non-capture, but check characters' scripts */ + OP_BRA, /* 134 Start of non-capturing bracket */ + OP_BRAPOS, /* 135 Ditto, with unlimited, possessive repeat */ + OP_CBRA, /* 136 Start of capturing bracket */ + OP_CBRAPOS, /* 137 Ditto, with unlimited, possessive repeat */ + OP_COND, /* 138 Conditional group */ /* These five must follow the previous five, in the same order. There's a check for >= SBRA to distinguish the two sets. */ - OP_SBRA, /* 137 Start of non-capturing bracket, check empty */ - OP_SBRAPOS, /* 138 Ditto, with unlimited, possessive repeat */ - OP_SCBRA, /* 139 Start of capturing bracket, check empty */ - OP_SCBRAPOS, /* 140 Ditto, with unlimited, possessive repeat */ - OP_SCOND, /* 141 Conditional group, check empty */ + OP_SBRA, /* 139 Start of non-capturing bracket, check empty */ + OP_SBRAPOS, /* 149 Ditto, with unlimited, possessive repeat */ + OP_SCBRA, /* 141 Start of capturing bracket, check empty */ + OP_SCBRAPOS, /* 142 Ditto, with unlimited, possessive repeat */ + OP_SCOND, /* 143 Conditional group, check empty */ /* The next two pairs must (respectively) be kept together. */ - OP_CREF, /* 142 Used to hold a capture number as condition */ - OP_DNCREF, /* 143 Used to point to duplicate names as a condition */ - OP_RREF, /* 144 Used to hold a recursion number as condition */ - OP_DNRREF, /* 145 Used to point to duplicate names as a condition */ - OP_FALSE, /* 146 Always false (used by DEFINE and VERSION) */ - OP_TRUE, /* 147 Always true (used by VERSION) */ + OP_CREF, /* 144 Used to hold a capture number as condition */ + OP_DNCREF, /* 145 Used to point to duplicate names as a condition */ + OP_RREF, /* 146 Used to hold a recursion number as condition */ + OP_DNRREF, /* 147 Used to point to duplicate names as a condition */ + OP_FALSE, /* 148 Always false (used by DEFINE and VERSION) */ + OP_TRUE, /* 149 Always true (used by VERSION) */ - OP_BRAZERO, /* 148 These two must remain together and in this */ - OP_BRAMINZERO, /* 149 order. */ - OP_BRAPOSZERO, /* 150 */ + OP_BRAZERO, /* 150 These two must remain together and in this */ + OP_BRAMINZERO, /* 151 order. */ + OP_BRAPOSZERO, /* 152 */ /* These are backtracking control verbs */ - OP_MARK, /* 151 always has an argument */ - OP_PRUNE, /* 152 */ - OP_PRUNE_ARG, /* 153 same, but with argument */ - OP_SKIP, /* 154 */ - OP_SKIP_ARG, /* 155 same, but with argument */ - OP_THEN, /* 156 */ - OP_THEN_ARG, /* 157 same, but with argument */ - OP_COMMIT, /* 158 */ - OP_COMMIT_ARG, /* 159 same, but with argument */ + OP_MARK, /* 153 always has an argument */ + OP_PRUNE, /* 154 */ + OP_PRUNE_ARG, /* 155 same, but with argument */ + OP_SKIP, /* 156 */ + OP_SKIP_ARG, /* 157 same, but with argument */ + OP_THEN, /* 158 */ + OP_THEN_ARG, /* 159 same, but with argument */ + OP_COMMIT, /* 160 */ + OP_COMMIT_ARG, /* 161 same, but with argument */ /* These are forced failure and success verbs. FAIL and ACCEPT do accept an argument, but these cases can be compiled as, for example, (*MARK:X)(*FAIL) without the need for a special opcode. */ - OP_FAIL, /* 160 */ - OP_ACCEPT, /* 161 */ - OP_ASSERT_ACCEPT, /* 162 Used inside assertions */ - OP_CLOSE, /* 163 Used before OP_ACCEPT to close open captures */ + OP_FAIL, /* 162 */ + OP_ACCEPT, /* 163 */ + OP_ASSERT_ACCEPT, /* 164 Used inside assertions */ + OP_CLOSE, /* 165 Used before OP_ACCEPT to close open captures */ /* This is used to skip a subpattern with a {0} quantifier */ - OP_SKIPZERO, /* 164 */ + OP_SKIPZERO, /* 166 */ /* This is used to identify a DEFINE group during compilation so that it can be checked for having only one branch. It is changed to OP_FALSE before compilation finishes. */ - OP_DEFINE, /* 165 */ + OP_DEFINE, /* 167 */ /* This is not an opcode, but is used to check that tables indexed by opcode are the correct length, in order to catch updating errors - there have been @@ -1585,7 +1596,7 @@ enum { /* *** NOTE NOTE NOTE *** Whenever the list above is updated, the two macro definitions that follow must also be updated to match. There are also tables called "opcode_possessify" in pcre2_compile.c and "coptable" and "poptable" in -pcre2_dfa_exec.c that must be updated. */ +pcre2_dfa_match.c that must be updated. */ /* This macro defines textual names for all the opcodes. These are used only @@ -1618,7 +1629,9 @@ some cases doesn't actually use these names at all). */ "class", "nclass", "xclass", "Ref", "Refi", "DnRef", "DnRefi", \ "Recurse", "Callout", "CalloutStr", \ "Alt", "Ket", "KetRmax", "KetRmin", "KetRpos", \ - "Reverse", "Assert", "Assert not", "AssertB", "AssertB not", \ + "Reverse", "Assert", "Assert not", \ + "Assert back", "Assert back not", \ + "Non-atomic assert", "Non-atomic assert back", \ "Once", \ "Script run", \ "Bra", "BraPos", "CBra", "CBraPos", \ @@ -1703,6 +1716,8 @@ in UTF-8 mode. The code that uses this table must know about such things. */ 1+LINK_SIZE, /* Assert not */ \ 1+LINK_SIZE, /* Assert behind */ \ 1+LINK_SIZE, /* Assert behind not */ \ + 1+LINK_SIZE, /* NA Assert */ \ + 1+LINK_SIZE, /* NA Assert behind */ \ 1+LINK_SIZE, /* ONCE */ \ 1+LINK_SIZE, /* SCRIPT_RUN */ \ 1+LINK_SIZE, /* BRA */ \ diff --git a/ext/pcre/pcre2lib/pcre2_intmodedep.h b/ext/pcre/pcre2lib/pcre2_intmodedep.h index bf3a235984ded..ea3b3ec698763 100644 --- a/ext/pcre/pcre2lib/pcre2_intmodedep.h +++ b/ext/pcre/pcre2lib/pcre2_intmodedep.h @@ -205,19 +205,19 @@ whether its argument, which is assumed to be one code unit, is less than 256. The CHMAX_255 macro does not assume one code unit. The maximum length of a MARK name must fit in one code unit; currently it is set to 255 or 65535. The TABLE_GET macro is used to access elements of tables containing exactly 256 -items. When code points can be greater than 255, a check is needed before -accessing these tables. */ +items. Its argument is a code unit. When code points can be greater than 255, a +check is needed before accessing these tables. */ #if PCRE2_CODE_UNIT_WIDTH == 8 #define MAX_255(c) TRUE #define MAX_MARK ((1u << 8) - 1) +#define TABLE_GET(c, table, default) ((table)[c]) #ifdef SUPPORT_UNICODE #define SUPPORT_WIDE_CHARS #define CHMAX_255(c) ((c) <= 255u) #else #define CHMAX_255(c) TRUE #endif /* SUPPORT_UNICODE */ -#define TABLE_GET(c, table, default) ((table)[c]) #else /* Code units are 16 or 32 bits */ #define CHMAX_255(c) ((c) <= 255u) @@ -228,7 +228,6 @@ accessing these tables. */ #endif - /* ----------------- Character-handling macros ----------------- */ /* There is a proposed future special "UTF-21" mode, in which only the lowest @@ -854,6 +853,7 @@ typedef struct match_block { uint32_t match_call_count; /* Number of times a new frame is created */ BOOL hitend; /* Hit the end of the subject at some point */ BOOL hasthen; /* Pattern contains (*THEN) */ + BOOL allowemptypartial; /* Allow empty hard partial */ const uint8_t *lcc; /* Points to lower casing table */ const uint8_t *fcc; /* Points to case-flipping table */ const uint8_t *ctypes; /* Points to table of type maps */ @@ -866,6 +866,7 @@ typedef struct match_block { PCRE2_SPTR name_table; /* Table of group names */ PCRE2_SPTR start_code; /* For use when recursing */ PCRE2_SPTR start_subject; /* Start of the subject string */ + PCRE2_SPTR check_subject; /* Where UTF-checked from */ PCRE2_SPTR end_subject; /* End of the subject string */ PCRE2_SPTR end_match_ptr; /* Subject position at end match */ PCRE2_SPTR start_used_ptr; /* Earliest consulted character */ @@ -908,6 +909,7 @@ typedef struct dfa_match_block { uint32_t poptions; /* Pattern options */ uint32_t nltype; /* Newline type */ uint32_t nllen; /* Newline string length */ + BOOL allowemptypartial; /* Allow empty hard partial */ PCRE2_UCHAR nl[4]; /* Newline string when fixed */ uint16_t bsr_convention; /* \R interpretation */ pcre2_callout_block *cb; /* Points to a callout block */ diff --git a/ext/pcre/pcre2lib/pcre2_jit_compile.c b/ext/pcre/pcre2lib/pcre2_jit_compile.c index 8b48cea2c69e4..f564127c2ae24 100644 --- a/ext/pcre/pcre2lib/pcre2_jit_compile.c +++ b/ext/pcre/pcre2lib/pcre2_jit_compile.c @@ -6,8 +6,9 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel + This module by Zoltan Herczeg Original API code Copyright (c) 1997-2012 University of Cambridge - New API code Copyright (c) 2016-2018 University of Cambridge + New API code Copyright (c) 2016-2019 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -212,12 +213,6 @@ typedef struct stub_list { struct stub_list *next; } stub_list; -typedef struct label_addr_list { - struct sljit_label *label; - sljit_uw *update_addr; - struct label_addr_list *next; -} label_addr_list; - enum frame_types { no_frame = -1, no_stack = -2 @@ -271,6 +266,8 @@ typedef struct bracket_backtrack { assert_backtrack *assert; /* For OP_ONCE. Less than 0 if not needed. */ int framesize; + /* For brackets with >3 alternatives. */ + struct sljit_put_label *matching_put_label; } u; /* Points to our private memory word on the stack. */ int private_data_ptr; @@ -416,6 +413,8 @@ typedef struct compiler_common { sljit_sw lcc; /* Mode can be PCRE2_JIT_COMPLETE and others. */ int mode; + /* TRUE, when empty match is accepted for partial matching. */ + BOOL allow_empty_partial; /* TRUE, when minlength is greater than 0. */ BOOL might_be_empty; /* \K is found in the pattern. */ @@ -454,7 +453,6 @@ typedef struct compiler_common { struct sljit_label *accept_label; struct sljit_label *ff_newline_shortcut; stub_list *stubs; - label_addr_list *label_addrs; recurse_entry *entries; recurse_entry *currententry; jump_list *partialmatch; @@ -563,6 +561,12 @@ typedef struct compare_context { #define ARGUMENTS SLJIT_S4 #define RETURN_ADDR SLJIT_R4 +#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) +#define HAS_VIRTUAL_REGISTERS 1 +#else +#define HAS_VIRTUAL_REGISTERS 0 +#endif + /* Local space layout. */ /* These two locals can be used by the current opcode. */ #define LOCALS0 (0 * sizeof(sljit_sw)) @@ -696,11 +700,12 @@ the start pointers when the end of the capturing group has not yet reached. */ #define GETCHARBACK_INVALID(c, ptr, start, invalid_action) \ { \ - if (ptr[-1] <= 0x7f) \ - c = *ptr--; \ + c = ptr[-1]; \ + if (c <= 0x7f) \ + ptr--; \ else if (ptr - 1 > start && ptr[-1] >= 0x80 && ptr[-1] < 0xc0) \ { \ - c = ptr[-1] - 0x80; \ + c -= 0x80; \ \ if (ptr[-2] >= 0xc2 && ptr[-2] <= 0xdf) \ { \ @@ -775,11 +780,12 @@ the start pointers when the end of the capturing group has not yet reached. */ #define GETCHARBACK_INVALID(c, ptr, start, invalid_action) \ { \ - if (ptr[-1] < 0xd800 || ptr[-1] >= 0xe000) \ - c = *ptr--; \ - else if (ptr[-1] >= 0xdc00 && ptr - 1 > start && ptr[-2] >= 0xd800 && ptr[-2] < 0xdc00) \ + c = ptr[-1]; \ + if (c < 0xd800 || c >= 0xe000) \ + ptr--; \ + else if (c >= 0xdc00 && ptr - 1 > start && ptr[-2] >= 0xd800 && ptr[-2] < 0xdc00) \ { \ - c = (((ptr[-2] - 0xd800) << 10) | (ptr[-1] - 0xdc00)) + 0x10000; \ + c = (((ptr[-2] - 0xd800) << 10) | (c - 0xdc00)) + 0x10000; \ ptr -= 2; \ } \ else \ @@ -793,7 +799,7 @@ the start pointers when the end of the capturing group has not yet reached. */ #define GETCHARINC_INVALID(c, ptr, end, invalid_action) \ { \ - if (ptr[0] < 0x110000) \ + if (ptr[0] < 0xd800 || (ptr[0] >= 0xe000 && ptr[0] < 0x110000)) \ c = *ptr++; \ else \ { \ @@ -801,6 +807,17 @@ the start pointers when the end of the capturing group has not yet reached. */ } \ } +#define GETCHARBACK_INVALID(c, ptr, start, invalid_action) \ + { \ + c = ptr[-1]; \ + if (ptr[-1] < 0xd800 || (ptr[-1] >= 0xe000 && ptr[-1] < 0x110000)) \ + ptr--; \ + else \ + { \ + invalid_action; \ + } \ + } + #endif /* PCRE2_CODE_UNIT_WIDTH == [8|16|32] */ #endif /* SUPPORT_UNICODE */ @@ -1033,8 +1050,8 @@ switch(*cc) return cc + 1 + 2 + cc[1]; default: - /* All opcodes are supported now! */ - SLJIT_UNREACHABLE(); + /* Unsupported opcodes: OP_ASSERT_NA and OP_ASSERTBACK_NA */ + /* SLJIT_UNREACHABLE(); */ return NULL; } } @@ -2371,14 +2388,14 @@ if (base_reg != TMP2) else { status.saved_tmp_regs[1] = RETURN_ADDR; - if (sljit_get_register_index(RETURN_ADDR) == -1) + if (HAS_VIRTUAL_REGISTERS) status.tmp_regs[1] = STR_PTR; else status.tmp_regs[1] = RETURN_ADDR; } status.saved_tmp_regs[2] = TMP3; -if (sljit_get_register_index(TMP3) == -1) +if (HAS_VIRTUAL_REGISTERS) status.tmp_regs[2] = STR_END; else status.tmp_regs[2] = TMP3; @@ -2829,20 +2846,6 @@ while (list_item) common->stubs = NULL; } -static void add_label_addr(compiler_common *common, sljit_uw *update_addr) -{ -DEFINE_COMPILER; -label_addr_list *label_addr; - -label_addr = sljit_alloc_memory(compiler, sizeof(label_addr_list)); -if (label_addr == NULL) - return; -label_addr->label = LABEL(); -label_addr->update_addr = update_addr; -label_addr->next = common->label_addrs; -common->label_addrs = label_addr; -} - static SLJIT_INLINE void count_match(compiler_common *common) { DEFINE_COMPILER; @@ -2985,12 +2988,18 @@ else } } -OP1(SLJIT_MOV, STACK_TOP, 0, ARGUMENTS, 0); +if (!HAS_VIRTUAL_REGISTERS) + OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, stack)); +else + OP1(SLJIT_MOV, STACK_TOP, 0, ARGUMENTS, 0); + if (common->mark_ptr != 0) OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->mark_ptr, SLJIT_IMM, 0); if (common->control_head_ptr != 0) OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, SLJIT_IMM, 0); -OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(STACK_TOP), SLJIT_OFFSETOF(jit_arguments, stack)); +if (HAS_VIRTUAL_REGISTERS) + OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(STACK_TOP), SLJIT_OFFSETOF(jit_arguments, stack)); + OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->start_ptr); OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(STACK_TOP), SLJIT_OFFSETOF(struct sljit_stack, end)); } @@ -3029,21 +3038,36 @@ BOOL has_pre; OP1(SLJIT_MOV, SLJIT_S2, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(1)); OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(1), STR_PTR, 0); -OP1(SLJIT_MOV, SLJIT_R0, 0, ARGUMENTS, 0); -OP1(SLJIT_MOV, SLJIT_S0, 0, SLJIT_MEM1(SLJIT_SP), common->start_ptr); -if (common->mark_ptr != 0) - OP1(SLJIT_MOV, SLJIT_R2, 0, SLJIT_MEM1(SLJIT_SP), common->mark_ptr); -OP1(SLJIT_MOV_U32, SLJIT_R1, 0, SLJIT_MEM1(SLJIT_R0), SLJIT_OFFSETOF(jit_arguments, oveccount)); -OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_R0), SLJIT_OFFSETOF(jit_arguments, startchar_ptr), SLJIT_S0, 0); -if (common->mark_ptr != 0) - OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_R0), SLJIT_OFFSETOF(jit_arguments, mark_ptr), SLJIT_R2, 0); -OP2(SLJIT_ADD, SLJIT_R2, 0, SLJIT_MEM1(SLJIT_R0), SLJIT_OFFSETOF(jit_arguments, match_data), - SLJIT_IMM, SLJIT_OFFSETOF(pcre2_match_data, ovector) - sizeof(PCRE2_SIZE)); +if (HAS_VIRTUAL_REGISTERS) + { + OP1(SLJIT_MOV, SLJIT_R0, 0, ARGUMENTS, 0); + OP1(SLJIT_MOV, SLJIT_S0, 0, SLJIT_MEM1(SLJIT_SP), common->start_ptr); + if (common->mark_ptr != 0) + OP1(SLJIT_MOV, SLJIT_R2, 0, SLJIT_MEM1(SLJIT_SP), common->mark_ptr); + OP1(SLJIT_MOV_U32, SLJIT_R1, 0, SLJIT_MEM1(SLJIT_R0), SLJIT_OFFSETOF(jit_arguments, oveccount)); + OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_R0), SLJIT_OFFSETOF(jit_arguments, startchar_ptr), SLJIT_S0, 0); + if (common->mark_ptr != 0) + OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_R0), SLJIT_OFFSETOF(jit_arguments, mark_ptr), SLJIT_R2, 0); + OP2(SLJIT_ADD, SLJIT_R2, 0, SLJIT_MEM1(SLJIT_R0), SLJIT_OFFSETOF(jit_arguments, match_data), + SLJIT_IMM, SLJIT_OFFSETOF(pcre2_match_data, ovector) - sizeof(PCRE2_SIZE)); + } +else + { + OP1(SLJIT_MOV, SLJIT_S0, 0, SLJIT_MEM1(SLJIT_SP), common->start_ptr); + OP1(SLJIT_MOV, SLJIT_R2, 0, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, match_data)); + if (common->mark_ptr != 0) + OP1(SLJIT_MOV, SLJIT_R0, 0, SLJIT_MEM1(SLJIT_SP), common->mark_ptr); + OP1(SLJIT_MOV_U32, SLJIT_R1, 0, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, oveccount)); + OP1(SLJIT_MOV, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, startchar_ptr), SLJIT_S0, 0); + if (common->mark_ptr != 0) + OP1(SLJIT_MOV, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, mark_ptr), SLJIT_R0, 0); + OP2(SLJIT_ADD, SLJIT_R2, 0, SLJIT_R2, 0, SLJIT_IMM, SLJIT_OFFSETOF(pcre2_match_data, ovector) - sizeof(PCRE2_SIZE)); + } has_pre = sljit_emit_mem(compiler, SLJIT_MOV | SLJIT_MEM_SUPP | SLJIT_MEM_PRE, SLJIT_S1, SLJIT_MEM1(SLJIT_S0), sizeof(sljit_sw)) == SLJIT_SUCCESS; GET_LOCAL_BASE(SLJIT_S0, 0, OVECTOR_START - (has_pre ? sizeof(sljit_sw) : 0)); -OP1(SLJIT_MOV, SLJIT_R0, 0, SLJIT_MEM1(SLJIT_R0), SLJIT_OFFSETOF(jit_arguments, begin)); +OP1(SLJIT_MOV, SLJIT_R0, 0, SLJIT_MEM1(HAS_VIRTUAL_REGISTERS ? SLJIT_R0 : ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, begin)); loop = LABEL(); @@ -3105,20 +3129,22 @@ static SLJIT_INLINE void return_with_partial_match(compiler_common *common, stru { DEFINE_COMPILER; sljit_s32 mov_opcode; +sljit_s32 arguments_reg = !HAS_VIRTUAL_REGISTERS ? ARGUMENTS : SLJIT_R1; SLJIT_COMPILE_ASSERT(STR_END == SLJIT_S0, str_end_must_be_saved_reg0); SLJIT_ASSERT(common->start_used_ptr != 0 && common->start_ptr != 0 && (common->mode == PCRE2_JIT_PARTIAL_SOFT ? common->hit_start != 0 : common->hit_start == 0)); -OP1(SLJIT_MOV, SLJIT_R1, 0, ARGUMENTS, 0); +if (arguments_reg != ARGUMENTS) + OP1(SLJIT_MOV, arguments_reg, 0, ARGUMENTS, 0); OP1(SLJIT_MOV, SLJIT_R2, 0, SLJIT_MEM1(SLJIT_SP), common->mode == PCRE2_JIT_PARTIAL_SOFT ? common->hit_start : common->start_ptr); OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE2_ERROR_PARTIAL); /* Store match begin and end. */ -OP1(SLJIT_MOV, SLJIT_S1, 0, SLJIT_MEM1(SLJIT_R1), SLJIT_OFFSETOF(jit_arguments, begin)); -OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_R1), SLJIT_OFFSETOF(jit_arguments, startchar_ptr), SLJIT_R2, 0); -OP1(SLJIT_MOV, SLJIT_R1, 0, SLJIT_MEM1(SLJIT_R1), SLJIT_OFFSETOF(jit_arguments, match_data)); +OP1(SLJIT_MOV, SLJIT_S1, 0, SLJIT_MEM1(arguments_reg), SLJIT_OFFSETOF(jit_arguments, begin)); +OP1(SLJIT_MOV, SLJIT_MEM1(arguments_reg), SLJIT_OFFSETOF(jit_arguments, startchar_ptr), SLJIT_R2, 0); +OP1(SLJIT_MOV, SLJIT_R1, 0, SLJIT_MEM1(arguments_reg), SLJIT_OFFSETOF(jit_arguments, match_data)); mov_opcode = (sizeof(PCRE2_SIZE) == 4) ? SLJIT_MOV_U32 : SLJIT_MOV; @@ -3279,7 +3305,7 @@ SLJIT_ASSERT(!force || common->mode != PCRE2_JIT_COMPLETE); if (common->mode == PCRE2_JIT_COMPLETE) return; -if (!force) +if (!force && !common->allow_empty_partial) jump = CMP(SLJIT_GREATER_EQUAL, SLJIT_MEM1(SLJIT_SP), common->start_used_ptr, STR_PTR, 0); else if (common->mode == PCRE2_JIT_PARTIAL_SOFT) jump = CMP(SLJIT_EQUAL, SLJIT_MEM1(SLJIT_SP), common->start_used_ptr, SLJIT_IMM, -1); @@ -3341,7 +3367,11 @@ if (common->mode == PCRE2_JIT_COMPLETE) /* Partial matching mode. */ jump = CMP(SLJIT_LESS, STR_PTR, 0, STR_END, 0); -add_jump(compiler, backtracks, CMP(SLJIT_GREATER_EQUAL, SLJIT_MEM1(SLJIT_SP), common->start_used_ptr, STR_PTR, 0)); +if (!common->allow_empty_partial) + add_jump(compiler, backtracks, CMP(SLJIT_GREATER_EQUAL, SLJIT_MEM1(SLJIT_SP), common->start_used_ptr, STR_PTR, 0)); +else if (common->mode == PCRE2_JIT_PARTIAL_SOFT) + add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, SLJIT_MEM1(SLJIT_SP), common->start_used_ptr, SLJIT_IMM, -1)); + if (common->mode == PCRE2_JIT_PARTIAL_SOFT) { OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->hit_start, SLJIT_IMM, 0); @@ -3357,6 +3387,35 @@ else JUMPHERE(jump); } +static void process_partial_match(compiler_common *common) +{ +DEFINE_COMPILER; +struct sljit_jump *jump; + +/* Partial matching mode. */ +if (common->mode == PCRE2_JIT_PARTIAL_SOFT) + { + jump = CMP(SLJIT_GREATER_EQUAL, SLJIT_MEM1(SLJIT_SP), common->start_used_ptr, STR_PTR, 0); + OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->hit_start, SLJIT_IMM, 0); + JUMPHERE(jump); + } +else if (common->mode == PCRE2_JIT_PARTIAL_HARD) + { + if (common->partialmatchlabel != NULL) + CMPTO(SLJIT_LESS, SLJIT_MEM1(SLJIT_SP), common->start_used_ptr, STR_PTR, 0, common->partialmatchlabel); + else + add_jump(compiler, &common->partialmatch, CMP(SLJIT_LESS, SLJIT_MEM1(SLJIT_SP), common->start_used_ptr, STR_PTR, 0)); + } +} + +static void detect_partial_match_to(compiler_common *common, struct sljit_label *label) +{ +DEFINE_COMPILER; + +CMPTO(SLJIT_LESS, STR_PTR, 0, STR_END, 0, label); +process_partial_match(common); +} + static void peek_char(compiler_common *common, sljit_u32 max, sljit_s32 dst, sljit_sw dstw, jump_list **backtracks) { /* Reads the character into TMP1, keeps STR_PTR. @@ -3420,12 +3479,21 @@ if (common->utf) #elif PCRE2_CODE_UNIT_WIDTH == 32 if (common->invalid_utf) { + if (max < 0xd800) return; + if (backtracks != NULL) + { + OP2(SLJIT_SUB, TMP2, 0, TMP1, 0, SLJIT_IMM, 0xd800); add_jump(compiler, backtracks, CMP(SLJIT_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, 0x110000)); + add_jump(compiler, backtracks, CMP(SLJIT_LESS, TMP2, 0, SLJIT_IMM, 0xe000 - 0xd800)); + } else { + OP2(SLJIT_SUB, TMP2, 0, TMP1, 0, SLJIT_IMM, 0xd800); OP2(SLJIT_SUB | SLJIT_SET_GREATER_EQUAL, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x110000); CMOV(SLJIT_GREATER_EQUAL, TMP1, SLJIT_IMM, INVALID_UTF_CHAR); + OP2(SLJIT_SUB | SLJIT_SET_LESS, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, 0xe000 - 0xd800); + CMOV(SLJIT_LESS, TMP1, SLJIT_IMM, INVALID_UTF_CHAR); } } #endif /* PCRE2_CODE_UNIT_WIDTH == [8|16|32] */ @@ -3490,8 +3558,12 @@ if (common->utf) JUMPHERE(jump); } #elif PCRE2_CODE_UNIT_WIDTH == 32 - if (common->invalid_utf) - add_jump(compiler, backtracks, CMP(SLJIT_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, 0x110000)); +if (common->invalid_utf) + { + OP2(SLJIT_SUB, TMP2, 0, TMP1, 0, SLJIT_IMM, 0xd800); + add_jump(compiler, backtracks, CMP(SLJIT_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, 0x110000)); + add_jump(compiler, backtracks, CMP(SLJIT_LESS, TMP2, 0, SLJIT_IMM, 0xe000 - 0xd800)); + } #endif /* PCRE2_CODE_UNIT_WIDTH == [8|16|32] */ #endif /* SUPPORT_UNICODE */ } @@ -3653,7 +3725,7 @@ if (common->utf) /* Skip low surrogate if necessary. */ OP2(SLJIT_SUB, TMP2, 0, TMP1, 0, SLJIT_IMM, 0xd800); - if (sljit_has_cpu_feature(SLJIT_HAS_CMOV) && sljit_get_register_index(RETURN_ADDR) >= 0) + if (sljit_has_cpu_feature(SLJIT_HAS_CMOV) && !HAS_VIRTUAL_REGISTERS) { if (options & READ_CHAR_UPDATE_STR_PTR) OP2(SLJIT_ADD, RETURN_ADDR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); @@ -3677,11 +3749,18 @@ if (common->utf) if (common->invalid_utf) { if (backtracks != NULL) + { + OP2(SLJIT_SUB, TMP2, 0, TMP1, 0, SLJIT_IMM, 0xd800); add_jump(compiler, backtracks, CMP(SLJIT_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, 0x110000)); + add_jump(compiler, backtracks, CMP(SLJIT_LESS, TMP2, 0, SLJIT_IMM, 0xe000 - 0xd800)); + } else { + OP2(SLJIT_SUB, TMP2, 0, TMP1, 0, SLJIT_IMM, 0xd800); OP2(SLJIT_SUB | SLJIT_SET_GREATER_EQUAL, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x110000); CMOV(SLJIT_GREATER_EQUAL, TMP1, SLJIT_IMM, INVALID_UTF_CHAR); + OP2(SLJIT_SUB | SLJIT_SET_LESS, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, 0xe000 - 0xd800); + CMOV(SLJIT_LESS, TMP1, SLJIT_IMM, INVALID_UTF_CHAR); } } #endif /* PCRE2_CODE_UNIT_WIDTH == [8|16|32] */ @@ -3832,7 +3911,7 @@ if (common->utf && negated) { OP2(SLJIT_SUB, TMP2, 0, TMP2, 0, SLJIT_IMM, 0xd800); - if (sljit_has_cpu_feature(SLJIT_HAS_CMOV) && sljit_get_register_index(RETURN_ADDR) >= 0) + if (sljit_has_cpu_feature(SLJIT_HAS_CMOV) && !HAS_VIRTUAL_REGISTERS) { OP2(SLJIT_ADD, RETURN_ADDR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); OP2(SLJIT_SUB | SLJIT_SET_LESS, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, 0x400); @@ -3865,9 +3944,9 @@ if (common->utf && negated) static void move_back(compiler_common *common, jump_list **backtracks, BOOL must_be_valid) { -/* Goes one character back. TMP2 must contain the start of -the subject buffer. Affects STR_PTR and TMP1. Does not modify -STR_PTR for invalid character sequences. */ +/* Goes one character back. Affects STR_PTR and TMP1. If must_be_valid is TRUE, +TMP2 is not used. Otherwise TMP2 must contain the start of the subject buffer, +and it is destroyed. Does not modify STR_PTR for invalid character sequences. */ DEFINE_COMPILER; SLJIT_UNUSED_ARG(backtracks); @@ -4407,7 +4486,7 @@ sljit_emit_fast_return(compiler, RETURN_ADDR, 0); static void do_utfpeakcharback(compiler_common *common) { -/* Peak a character back. */ +/* Peak a character back. Does not modify STR_PTR. */ DEFINE_COMPILER; struct sljit_jump *jump[2]; @@ -4444,7 +4523,7 @@ sljit_emit_fast_return(compiler, RETURN_ADDR, 0); static void do_utfpeakcharback_invalid(compiler_common *common) { -/* Peak a character back. */ +/* Peak a character back. Does not modify STR_PTR. */ DEFINE_COMPILER; sljit_s32 i; sljit_s32 has_cmov = sljit_has_cpu_feature(SLJIT_HAS_CMOV); @@ -4672,7 +4751,7 @@ sljit_emit_fast_return(compiler, RETURN_ADDR, 0); static void do_utfpeakcharback_invalid(compiler_common *common) { -/* Peak a character back. */ +/* Peak a character back. Does not modify STR_PTR. */ DEFINE_COMPILER; struct sljit_jump *jump; struct sljit_jump *exit_invalid[3]; @@ -4786,18 +4865,12 @@ OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, TMP2, 0); OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_stage2)); OP1(SLJIT_MOV_U16, TMP2, 0, SLJIT_MEM2(TMP2, TMP1), 1); -// PH hacking -//fprintf(stderr, "~~A\n"); - OP2(SLJIT_SHL, TMP1, 0, TMP2, 0, SLJIT_IMM, 2); - OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 3); - OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP1, 0); - OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, chartype)); - +/* TMP2 is multiplied by 12. Same as (TMP2 << 2) + ((TMP2 << 2) << 1). */ OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, chartype)); +OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 2); +OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, TMP2, 0); +OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM2(TMP1, TMP2), 1); - OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM2(TMP1, TMP2), 0); - -// OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM2(TMP1, TMP2), 3); sljit_emit_fast_return(compiler, RETURN_ADDR, 0); } @@ -4866,15 +4939,27 @@ else if ((overall_options & PCRE2_USE_OFFSET_LIMIT) != 0) /* Check whether offset limit is set and valid. */ SLJIT_ASSERT(common->match_end_ptr != 0); - OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0); - OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, offset_limit)); + if (HAS_VIRTUAL_REGISTERS) + { + OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0); + OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, offset_limit)); + } + else + OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, offset_limit)); + OP1(SLJIT_MOV, TMP2, 0, STR_END, 0); end = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, (sljit_sw) PCRE2_UNSET); - OP1(SLJIT_MOV, TMP2, 0, ARGUMENTS, 0); + if (HAS_VIRTUAL_REGISTERS) + OP1(SLJIT_MOV, TMP2, 0, ARGUMENTS, 0); + else + OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, begin)); + #if PCRE2_CODE_UNIT_WIDTH == 16 || PCRE2_CODE_UNIT_WIDTH == 32 OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, UCHAR_SHIFT); #endif /* PCRE2_CODE_UNIT_WIDTH == [16|32] */ - OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, begin)); + if (HAS_VIRTUAL_REGISTERS) + OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, begin)); + OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP1, 0); end2 = CMP(SLJIT_LESS_EQUAL, TMP2, 0, STR_END, 0); OP1(SLJIT_MOV, TMP2, 0, STR_END, 0); @@ -5434,802 +5519,157 @@ CMPTO(SLJIT_EQUAL, reg, 0, SLJIT_IMM, 0xdc00, label); } #endif -#if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86) && !(defined SUPPORT_VALGRIND) - -#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 -static struct sljit_jump *jump_if_utf_char_start(struct sljit_compiler *compiler, sljit_s32 reg) -{ -#if PCRE2_CODE_UNIT_WIDTH == 8 -OP2(SLJIT_AND, reg, 0, reg, 0, SLJIT_IMM, 0xc0); -return CMP(SLJIT_NOT_EQUAL, reg, 0, SLJIT_IMM, 0x80); -#elif PCRE2_CODE_UNIT_WIDTH == 16 -OP2(SLJIT_AND, reg, 0, reg, 0, SLJIT_IMM, 0xfc00); -return CMP(SLJIT_NOT_EQUAL, reg, 0, SLJIT_IMM, 0xdc00); -#else -#error "Unknown code width" -#endif -} -#endif +#include "pcre2_jit_simd_inc.h" -static sljit_s32 character_to_int32(PCRE2_UCHAR chr) -{ -sljit_u32 value = chr; -#if PCRE2_CODE_UNIT_WIDTH == 8 -#define SSE2_COMPARE_TYPE_INDEX 0 -return (sljit_s32)((value << 24) | (value << 16) | (value << 8) | value); -#elif PCRE2_CODE_UNIT_WIDTH == 16 -#define SSE2_COMPARE_TYPE_INDEX 1 -return (sljit_s32)((value << 16) | value); -#elif PCRE2_CODE_UNIT_WIDTH == 32 -#define SSE2_COMPARE_TYPE_INDEX 2 -return (sljit_s32)(value); -#else -#error "Unsupported unit width" -#endif -} +#ifdef JIT_HAS_FAST_FORWARD_CHAR_PAIR_SIMD -static void load_from_mem_sse2(struct sljit_compiler *compiler, sljit_s32 dst_xmm_reg, sljit_s32 src_general_reg) +static BOOL check_fast_forward_char_pair_simd(compiler_common *common, fast_forward_char_data *chars, int max) { -#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) -sljit_u8 instruction[5]; -#else -sljit_u8 instruction[4]; -#endif + sljit_s32 i, j, max_i = 0, max_j = 0; + sljit_u32 max_pri = 0; + PCRE2_UCHAR a1, a2, a_pri, b1, b2, b_pri; -SLJIT_ASSERT(dst_xmm_reg < 8); + for (i = max - 1; i >= 1; i--) + { + if (chars[i].last_count > 2) + { + a1 = chars[i].chars[0]; + a2 = chars[i].chars[1]; + a_pri = chars[i].last_count; -/* MOVDQA xmm1, xmm2/m128 */ -#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) -if (src_general_reg < 8) - { - instruction[0] = 0x66; - instruction[1] = 0x0f; - instruction[2] = 0x6f; - instruction[3] = (dst_xmm_reg << 3) | src_general_reg; - sljit_emit_op_custom(compiler, instruction, 4); - } -else - { - instruction[0] = 0x66; - instruction[1] = 0x41; - instruction[2] = 0x0f; - instruction[3] = 0x6f; - instruction[4] = (dst_xmm_reg << 3) | (src_general_reg & 0x7); - sljit_emit_op_custom(compiler, instruction, 4); - } -#else -instruction[0] = 0x66; -instruction[1] = 0x0f; -instruction[2] = 0x6f; -instruction[3] = (dst_xmm_reg << 3) | src_general_reg; -sljit_emit_op_custom(compiler, instruction, 4); -#endif -} + j = i - max_fast_forward_char_pair_offset(); + if (j < 0) + j = 0; -static void fast_forward_char_pair_sse2_compare(struct sljit_compiler *compiler, PCRE2_UCHAR char1, PCRE2_UCHAR char2, - sljit_u32 bit, sljit_s32 dst_ind, sljit_s32 cmp1_ind, sljit_s32 cmp2_ind, sljit_s32 tmp_ind) -{ -sljit_u8 instruction[4]; -instruction[0] = 0x66; -instruction[1] = 0x0f; + while (j < i) + { + b_pri = chars[j].last_count; + if (b_pri > 2 && a_pri + b_pri >= max_pri) + { + b1 = chars[j].chars[0]; + b2 = chars[j].chars[1]; -if (char1 == char2 || bit != 0) - { - if (bit != 0) - { - /* POR xmm1, xmm2/m128 */ - /* instruction[0] = 0x66; */ - /* instruction[1] = 0x0f; */ - instruction[2] = 0xeb; - instruction[3] = 0xc0 | (dst_ind << 3) | cmp2_ind; - sljit_emit_op_custom(compiler, instruction, 4); + if (a1 != b1 && a1 != b2 && a2 != b1 && a2 != b2) + { + max_pri = a_pri + b_pri; + max_i = i; + max_j = j; + } + } + j++; + } + } } - /* PCMPEQB/W/D xmm1, xmm2/m128 */ - /* instruction[0] = 0x66; */ - /* instruction[1] = 0x0f; */ - instruction[2] = 0x74 + SSE2_COMPARE_TYPE_INDEX; - instruction[3] = 0xc0 | (dst_ind << 3) | cmp1_ind; - sljit_emit_op_custom(compiler, instruction, 4); - } -else - { - /* MOVDQA xmm1, xmm2/m128 */ - /* instruction[0] = 0x66; */ - /* instruction[1] = 0x0f; */ - instruction[2] = 0x6f; - instruction[3] = 0xc0 | (tmp_ind << 3) | dst_ind; - sljit_emit_op_custom(compiler, instruction, 4); - - /* PCMPEQB/W/D xmm1, xmm2/m128 */ - /* instruction[0] = 0x66; */ - /* instruction[1] = 0x0f; */ - instruction[2] = 0x74 + SSE2_COMPARE_TYPE_INDEX; - instruction[3] = 0xc0 | (dst_ind << 3) | cmp1_ind; - sljit_emit_op_custom(compiler, instruction, 4); - - instruction[3] = 0xc0 | (tmp_ind << 3) | cmp2_ind; - sljit_emit_op_custom(compiler, instruction, 4); +if (max_pri == 0) + return FALSE; - /* POR xmm1, xmm2/m128 */ - /* instruction[0] = 0x66; */ - /* instruction[1] = 0x0f; */ - instruction[2] = 0xeb; - instruction[3] = 0xc0 | (dst_ind << 3) | tmp_ind; - sljit_emit_op_custom(compiler, instruction, 4); - } +fast_forward_char_pair_simd(common, max_i, chars[max_i].chars[0], chars[max_i].chars[1], max_j, chars[max_j].chars[0], chars[max_j].chars[1]); +return TRUE; } -static void fast_forward_first_char2_sse2(compiler_common *common, PCRE2_UCHAR char1, PCRE2_UCHAR char2, sljit_s32 offset) +#endif /* JIT_HAS_FAST_FORWARD_CHAR_PAIR_SIMD */ + +static void fast_forward_first_char2(compiler_common *common, PCRE2_UCHAR char1, PCRE2_UCHAR char2, sljit_s32 offset) { DEFINE_COMPILER; struct sljit_label *start; -#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 -struct sljit_label *restart; -#endif -struct sljit_jump *quit; -struct sljit_jump *partial_quit[2]; -sljit_u8 instruction[8]; -sljit_s32 tmp1_ind = sljit_get_register_index(TMP1); -sljit_s32 str_ptr_ind = sljit_get_register_index(STR_PTR); -sljit_s32 data_ind = 0; -sljit_s32 tmp_ind = 1; -sljit_s32 cmp1_ind = 2; -sljit_s32 cmp2_ind = 3; -sljit_u32 bit = 0; - -SLJIT_UNUSED_ARG(offset); - -if (char1 != char2) - { - bit = char1 ^ char2; - if (!is_powerof2(bit)) - bit = 0; - } - -partial_quit[0] = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0); -if (common->mode == PCRE2_JIT_COMPLETE) - add_jump(compiler, &common->failed_match, partial_quit[0]); - -/* First part (unaligned start) */ +struct sljit_jump *match; +struct sljit_jump *partial_quit; +PCRE2_UCHAR mask; +BOOL has_match_end = (common->match_end_ptr != 0); -OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, character_to_int32(char1 | bit)); +SLJIT_ASSERT(common->mode == PCRE2_JIT_COMPLETE || offset == 0); -SLJIT_ASSERT(tmp1_ind < 8); +if (has_match_end) + OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr); -/* MOVD xmm, r/m32 */ -instruction[0] = 0x66; -instruction[1] = 0x0f; -instruction[2] = 0x6e; -instruction[3] = 0xc0 | (cmp1_ind << 3) | tmp1_ind; -sljit_emit_op_custom(compiler, instruction, 4); +if (offset > 0) + OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(offset)); -if (char1 != char2) +if (has_match_end) { - OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, character_to_int32(bit != 0 ? bit : char2)); + OP1(SLJIT_MOV, TMP3, 0, STR_END, 0); - /* MOVD xmm, r/m32 */ - instruction[3] = 0xc0 | (cmp2_ind << 3) | tmp1_ind; - sljit_emit_op_custom(compiler, instruction, 4); + OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(offset + 1)); + OP2(SLJIT_SUB | SLJIT_SET_GREATER, SLJIT_UNUSED, 0, STR_END, 0, TMP1, 0); + CMOV(SLJIT_GREATER, STR_END, TMP1, 0); } -OP1(SLJIT_MOV, TMP2, 0, STR_PTR, 0); - -/* PSHUFD xmm1, xmm2/m128, imm8 */ -/* instruction[0] = 0x66; */ -/* instruction[1] = 0x0f; */ -instruction[2] = 0x70; -instruction[3] = 0xc0 | (cmp1_ind << 3) | 2; -instruction[4] = 0; -sljit_emit_op_custom(compiler, instruction, 5); +#ifdef JIT_HAS_FAST_FORWARD_CHAR_SIMD -if (char1 != char2) +if (JIT_HAS_FAST_FORWARD_CHAR_SIMD) { - /* PSHUFD xmm1, xmm2/m128, imm8 */ - instruction[3] = 0xc0 | (cmp2_ind << 3) | 3; - sljit_emit_op_custom(compiler, instruction, 5); - } - -#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 -restart = LABEL(); -#endif -OP2(SLJIT_AND, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, ~0xf); -OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0xf); - -load_from_mem_sse2(compiler, data_ind, str_ptr_ind); -fast_forward_char_pair_sse2_compare(compiler, char1, char2, bit, data_ind, cmp1_ind, cmp2_ind, tmp_ind); - -/* PMOVMSKB reg, xmm */ -/* instruction[0] = 0x66; */ -/* instruction[1] = 0x0f; */ -instruction[2] = 0xd7; -instruction[3] = 0xc0 | (tmp1_ind << 3) | 0; -sljit_emit_op_custom(compiler, instruction, 4); - -OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP2, 0); -OP2(SLJIT_LSHR, TMP1, 0, TMP1, 0, TMP2, 0); + fast_forward_char_simd(common, char1, char2, offset); -/* BSF r32, r/m32 */ -instruction[0] = 0x0f; -instruction[1] = 0xbc; -instruction[2] = 0xc0 | (tmp1_ind << 3) | tmp1_ind; -sljit_emit_op_custom(compiler, instruction, 3); -sljit_set_current_flags(compiler, SLJIT_SET_Z); + if (offset > 0) + OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(offset)); -quit = JUMP(SLJIT_NOT_ZERO); + if (has_match_end) + OP1(SLJIT_MOV, STR_END, 0, TMP3, 0); + return; + } -OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, TMP2, 0); +#endif start = LABEL(); -OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, 16); -partial_quit[1] = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0); +partial_quit = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0); if (common->mode == PCRE2_JIT_COMPLETE) - add_jump(compiler, &common->failed_match, partial_quit[1]); - -/* Second part (aligned) */ - -load_from_mem_sse2(compiler, 0, str_ptr_ind); -fast_forward_char_pair_sse2_compare(compiler, char1, char2, bit, data_ind, cmp1_ind, cmp2_ind, tmp_ind); - -/* PMOVMSKB reg, xmm */ -instruction[0] = 0x66; -instruction[1] = 0x0f; -instruction[2] = 0xd7; -instruction[3] = 0xc0 | (tmp1_ind << 3) | 0; -sljit_emit_op_custom(compiler, instruction, 4); - -/* BSF r32, r/m32 */ -instruction[0] = 0x0f; -instruction[1] = 0xbc; -instruction[2] = 0xc0 | (tmp1_ind << 3) | tmp1_ind; -sljit_emit_op_custom(compiler, instruction, 3); -sljit_set_current_flags(compiler, SLJIT_SET_Z); - -JUMPTO(SLJIT_ZERO, start); + add_jump(compiler, &common->failed_match, partial_quit); -JUMPHERE(quit); -OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0); +OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0); +OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); -if (common->mode != PCRE2_JIT_COMPLETE) +if (char1 == char2) + CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, char1, start); +else { - JUMPHERE(partial_quit[0]); - JUMPHERE(partial_quit[1]); - OP2(SLJIT_SUB | SLJIT_SET_GREATER, SLJIT_UNUSED, 0, STR_PTR, 0, STR_END, 0); - CMOV(SLJIT_GREATER, STR_PTR, STR_END, 0); + mask = char1 ^ char2; + if (is_powerof2(mask)) + { + OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, mask); + CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, char1 | mask, start); + } + else + { + match = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, char1); + CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, char2, start); + JUMPHERE(match); + } } -else - add_jump(compiler, &common->failed_match, CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0)); #if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 if (common->utf && offset > 0) { - SLJIT_ASSERT(common->mode == PCRE2_JIT_COMPLETE); - - OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-offset)); - - quit = jump_if_utf_char_start(compiler, TMP1); - - OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); - add_jump(compiler, &common->failed_match, CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0)); - OP1(SLJIT_MOV, TMP2, 0, STR_PTR, 0); - JUMPTO(SLJIT_JUMP, restart); - - JUMPHERE(quit); + OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-(offset + 1))); + jumpto_if_not_utf_char_start(compiler, TMP1, start); } #endif -} -#ifndef _WIN64 +OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(offset + 1)); -static SLJIT_INLINE sljit_u32 max_fast_forward_char_pair_sse2_offset(void) -{ -#if PCRE2_CODE_UNIT_WIDTH == 8 -return 15; -#elif PCRE2_CODE_UNIT_WIDTH == 16 -return 7; -#elif PCRE2_CODE_UNIT_WIDTH == 32 -return 3; -#else -#error "Unsupported unit width" -#endif +if (common->mode != PCRE2_JIT_COMPLETE) + JUMPHERE(partial_quit); + +if (has_match_end) + OP1(SLJIT_MOV, STR_END, 0, TMP3, 0); } -static void fast_forward_char_pair_sse2(compiler_common *common, sljit_s32 offs1, - PCRE2_UCHAR char1a, PCRE2_UCHAR char1b, sljit_s32 offs2, PCRE2_UCHAR char2a, PCRE2_UCHAR char2b) +static SLJIT_INLINE BOOL fast_forward_first_n_chars(compiler_common *common) { DEFINE_COMPILER; -sljit_u32 bit1 = 0; -sljit_u32 bit2 = 0; -sljit_u32 diff = IN_UCHARS(offs1 - offs2); -sljit_s32 tmp1_ind = sljit_get_register_index(TMP1); -sljit_s32 tmp2_ind = sljit_get_register_index(TMP2); -sljit_s32 str_ptr_ind = sljit_get_register_index(STR_PTR); -sljit_s32 data1_ind = 0; -sljit_s32 data2_ind = 1; -sljit_s32 tmp_ind = 2; -sljit_s32 cmp1a_ind = 3; -sljit_s32 cmp1b_ind = 4; -sljit_s32 cmp2a_ind = 5; -sljit_s32 cmp2b_ind = 6; struct sljit_label *start; -#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 -struct sljit_label *restart; -#endif -struct sljit_jump *jump[2]; - -sljit_u8 instruction[8]; - -SLJIT_ASSERT(common->mode == PCRE2_JIT_COMPLETE && offs1 > offs2); -SLJIT_ASSERT(diff <= IN_UCHARS(max_fast_forward_char_pair_sse2_offset())); -SLJIT_ASSERT(tmp1_ind < 8 && tmp2_ind == 1); - -/* Initialize. */ -if (common->match_end_ptr != 0) - { - OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr); - OP1(SLJIT_MOV, TMP3, 0, STR_END, 0); - OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(offs1 + 1)); - - OP2(SLJIT_SUB | SLJIT_SET_LESS, SLJIT_UNUSED, 0, TMP1, 0, STR_END, 0); - CMOV(SLJIT_LESS, STR_END, TMP1, 0); - } - -OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(offs1)); -add_jump(compiler, &common->failed_match, CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0)); - -/* MOVD xmm, r/m32 */ -instruction[0] = 0x66; -instruction[1] = 0x0f; -instruction[2] = 0x6e; - -if (char1a == char1b) - OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, character_to_int32(char1a)); -else - { - bit1 = char1a ^ char1b; - if (is_powerof2(bit1)) - { - OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, character_to_int32(char1a | bit1)); - OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, character_to_int32(bit1)); - } - else - { - bit1 = 0; - OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, character_to_int32(char1a)); - OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, character_to_int32(char1b)); - } - } - -instruction[3] = 0xc0 | (cmp1a_ind << 3) | tmp1_ind; -sljit_emit_op_custom(compiler, instruction, 4); - -if (char1a != char1b) - { - instruction[3] = 0xc0 | (cmp1b_ind << 3) | tmp2_ind; - sljit_emit_op_custom(compiler, instruction, 4); - } - -if (char2a == char2b) - OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, character_to_int32(char2a)); -else - { - bit2 = char2a ^ char2b; - if (is_powerof2(bit2)) - { - OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, character_to_int32(char2a | bit2)); - OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, character_to_int32(bit2)); - } - else - { - bit2 = 0; - OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, character_to_int32(char2a)); - OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, character_to_int32(char2b)); - } - } - -instruction[3] = 0xc0 | (cmp2a_ind << 3) | tmp1_ind; -sljit_emit_op_custom(compiler, instruction, 4); - -if (char2a != char2b) - { - instruction[3] = 0xc0 | (cmp2b_ind << 3) | tmp2_ind; - sljit_emit_op_custom(compiler, instruction, 4); - } - -/* PSHUFD xmm1, xmm2/m128, imm8 */ -/* instruction[0] = 0x66; */ -/* instruction[1] = 0x0f; */ -instruction[2] = 0x70; -instruction[4] = 0; - -instruction[3] = 0xc0 | (cmp1a_ind << 3) | cmp1a_ind; -sljit_emit_op_custom(compiler, instruction, 5); - -if (char1a != char1b) - { - instruction[3] = 0xc0 | (cmp1b_ind << 3) | cmp1b_ind; - sljit_emit_op_custom(compiler, instruction, 5); - } - -instruction[3] = 0xc0 | (cmp2a_ind << 3) | cmp2a_ind; -sljit_emit_op_custom(compiler, instruction, 5); - -if (char2a != char2b) - { - instruction[3] = 0xc0 | (cmp2b_ind << 3) | cmp2b_ind; - sljit_emit_op_custom(compiler, instruction, 5); - } - -#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 -restart = LABEL(); -#endif - -OP2(SLJIT_SUB, TMP1, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(offs1 - offs2)); -OP1(SLJIT_MOV, TMP2, 0, STR_PTR, 0); -OP2(SLJIT_AND, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, ~0xf); -OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, ~0xf); - -load_from_mem_sse2(compiler, data1_ind, str_ptr_ind); - -jump[0] = CMP(SLJIT_EQUAL, STR_PTR, 0, TMP1, 0); - -load_from_mem_sse2(compiler, data2_ind, tmp1_ind); - -/* MOVDQA xmm1, xmm2/m128 */ -/* instruction[0] = 0x66; */ -/* instruction[1] = 0x0f; */ -instruction[2] = 0x6f; -instruction[3] = 0xc0 | (tmp_ind << 3) | data1_ind; -sljit_emit_op_custom(compiler, instruction, 4); - -/* PSLLDQ xmm1, xmm2/m128, imm8 */ -/* instruction[0] = 0x66; */ -/* instruction[1] = 0x0f; */ -instruction[2] = 0x73; -instruction[3] = 0xc0 | (7 << 3) | tmp_ind; -instruction[4] = diff; -sljit_emit_op_custom(compiler, instruction, 5); - -/* PSRLDQ xmm1, xmm2/m128, imm8 */ -/* instruction[0] = 0x66; */ -/* instruction[1] = 0x0f; */ -/* instruction[2] = 0x73; */ -instruction[3] = 0xc0 | (3 << 3) | data2_ind; -instruction[4] = 16 - diff; -sljit_emit_op_custom(compiler, instruction, 5); - -/* POR xmm1, xmm2/m128 */ -/* instruction[0] = 0x66; */ -/* instruction[1] = 0x0f; */ -instruction[2] = 0xeb; -instruction[3] = 0xc0 | (data2_ind << 3) | tmp_ind; -sljit_emit_op_custom(compiler, instruction, 4); - -jump[1] = JUMP(SLJIT_JUMP); - -JUMPHERE(jump[0]); - -/* MOVDQA xmm1, xmm2/m128 */ -/* instruction[0] = 0x66; */ -/* instruction[1] = 0x0f; */ -instruction[2] = 0x6f; -instruction[3] = 0xc0 | (data2_ind << 3) | data1_ind; -sljit_emit_op_custom(compiler, instruction, 4); - -/* PSLLDQ xmm1, xmm2/m128, imm8 */ -/* instruction[0] = 0x66; */ -/* instruction[1] = 0x0f; */ -instruction[2] = 0x73; -instruction[3] = 0xc0 | (7 << 3) | data2_ind; -instruction[4] = diff; -sljit_emit_op_custom(compiler, instruction, 5); - -JUMPHERE(jump[1]); - -OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0xf); - -fast_forward_char_pair_sse2_compare(compiler, char2a, char2b, bit2, data2_ind, cmp2a_ind, cmp2b_ind, tmp_ind); -fast_forward_char_pair_sse2_compare(compiler, char1a, char1b, bit1, data1_ind, cmp1a_ind, cmp1b_ind, tmp_ind); - -/* PAND xmm1, xmm2/m128 */ -/* instruction[0] = 0x66; */ -/* instruction[1] = 0x0f; */ -instruction[2] = 0xdb; -instruction[3] = 0xc0 | (data1_ind << 3) | data2_ind; -sljit_emit_op_custom(compiler, instruction, 4); - -/* PMOVMSKB reg, xmm */ -/* instruction[0] = 0x66; */ -/* instruction[1] = 0x0f; */ -instruction[2] = 0xd7; -instruction[3] = 0xc0 | (tmp1_ind << 3) | 0; -sljit_emit_op_custom(compiler, instruction, 4); - -/* Ignore matches before the first STR_PTR. */ -OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP2, 0); -OP2(SLJIT_LSHR, TMP1, 0, TMP1, 0, TMP2, 0); - -/* BSF r32, r/m32 */ -instruction[0] = 0x0f; -instruction[1] = 0xbc; -instruction[2] = 0xc0 | (tmp1_ind << 3) | tmp1_ind; -sljit_emit_op_custom(compiler, instruction, 3); -sljit_set_current_flags(compiler, SLJIT_SET_Z); - -jump[0] = JUMP(SLJIT_NOT_ZERO); - -OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, TMP2, 0); - -/* Main loop. */ -instruction[0] = 0x66; -instruction[1] = 0x0f; - -start = LABEL(); - -load_from_mem_sse2(compiler, data2_ind, str_ptr_ind); - -OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, 16); -add_jump(compiler, &common->failed_match, CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0)); - -load_from_mem_sse2(compiler, data1_ind, str_ptr_ind); - -/* PSRLDQ xmm1, xmm2/m128, imm8 */ -/* instruction[0] = 0x66; */ -/* instruction[1] = 0x0f; */ -instruction[2] = 0x73; -instruction[3] = 0xc0 | (3 << 3) | data2_ind; -instruction[4] = 16 - diff; -sljit_emit_op_custom(compiler, instruction, 5); - -/* MOVDQA xmm1, xmm2/m128 */ -/* instruction[0] = 0x66; */ -/* instruction[1] = 0x0f; */ -instruction[2] = 0x6f; -instruction[3] = 0xc0 | (tmp_ind << 3) | data1_ind; -sljit_emit_op_custom(compiler, instruction, 4); - -/* PSLLDQ xmm1, xmm2/m128, imm8 */ -/* instruction[0] = 0x66; */ -/* instruction[1] = 0x0f; */ -instruction[2] = 0x73; -instruction[3] = 0xc0 | (7 << 3) | tmp_ind; -instruction[4] = diff; -sljit_emit_op_custom(compiler, instruction, 5); - -/* POR xmm1, xmm2/m128 */ -/* instruction[0] = 0x66; */ -/* instruction[1] = 0x0f; */ -instruction[2] = 0xeb; -instruction[3] = 0xc0 | (data2_ind << 3) | tmp_ind; -sljit_emit_op_custom(compiler, instruction, 4); - -fast_forward_char_pair_sse2_compare(compiler, char1a, char1b, bit1, data1_ind, cmp1a_ind, cmp1b_ind, tmp_ind); -fast_forward_char_pair_sse2_compare(compiler, char2a, char2b, bit2, data2_ind, cmp2a_ind, cmp2b_ind, tmp_ind); - -/* PAND xmm1, xmm2/m128 */ -/* instruction[0] = 0x66; */ -/* instruction[1] = 0x0f; */ -instruction[2] = 0xdb; -instruction[3] = 0xc0 | (data1_ind << 3) | data2_ind; -sljit_emit_op_custom(compiler, instruction, 4); - -/* PMOVMSKB reg, xmm */ -/* instruction[0] = 0x66; */ -/* instruction[1] = 0x0f; */ -instruction[2] = 0xd7; -instruction[3] = 0xc0 | (tmp1_ind << 3) | 0; -sljit_emit_op_custom(compiler, instruction, 4); - -/* BSF r32, r/m32 */ -instruction[0] = 0x0f; -instruction[1] = 0xbc; -instruction[2] = 0xc0 | (tmp1_ind << 3) | tmp1_ind; -sljit_emit_op_custom(compiler, instruction, 3); -sljit_set_current_flags(compiler, SLJIT_SET_Z); - -JUMPTO(SLJIT_ZERO, start); - -JUMPHERE(jump[0]); - -OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0); - -add_jump(compiler, &common->failed_match, CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0)); - -if (common->match_end_ptr != 0) - OP1(SLJIT_MOV, STR_END, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr); - -#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 -if (common->utf) - { - OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-offs1)); - - jump[0] = jump_if_utf_char_start(compiler, TMP1); - - OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); - CMPTO(SLJIT_LESS, STR_PTR, 0, STR_END, 0, restart); - - add_jump(compiler, &common->failed_match, JUMP(SLJIT_JUMP)); - - JUMPHERE(jump[0]); - } -#endif - -OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(offs1)); - -if (common->match_end_ptr != 0) - OP1(SLJIT_MOV, STR_END, 0, TMP3, 0); -} - -static BOOL check_fast_forward_char_pair_sse2(compiler_common *common, fast_forward_char_data *chars, int max) -{ -sljit_s32 i, j, priority, count; -sljit_u32 priorities; -PCRE2_UCHAR a1, a2, b1, b2; - -priorities = 0; - -count = 0; -for (i = 0; i < max; i++) - { - if (chars[i].last_count > 2) - { - SLJIT_ASSERT(chars[i].last_count <= 7); - - priorities |= (1 << chars[i].last_count); - count++; - } - } - -if (count < 2) - return FALSE; - -for (priority = 7; priority > 2; priority--) - { - if ((priorities & (1 << priority)) == 0) - continue; - - for (i = max - 1; i >= 1; i--) - if (chars[i].last_count >= priority) - { - SLJIT_ASSERT(chars[i].count <= 2 && chars[i].count >= 1); - - a1 = chars[i].chars[0]; - a2 = chars[i].chars[1]; - - j = i - max_fast_forward_char_pair_sse2_offset(); - if (j < 0) - j = 0; - - while (j < i) - { - if (chars[j].last_count >= priority) - { - b1 = chars[j].chars[0]; - b2 = chars[j].chars[1]; - - if (a1 != b1 && a1 != b2 && a2 != b1 && a2 != b2) - { - fast_forward_char_pair_sse2(common, i, a1, a2, j, b1, b2); - return TRUE; - } - } - j++; - } - } - } - -return FALSE; -} - -#endif - -#undef SSE2_COMPARE_TYPE_INDEX - -#endif - -static void fast_forward_first_char2(compiler_common *common, PCRE2_UCHAR char1, PCRE2_UCHAR char2, sljit_s32 offset) -{ -DEFINE_COMPILER; -struct sljit_label *start; -struct sljit_jump *match; -struct sljit_jump *partial_quit; -PCRE2_UCHAR mask; -BOOL has_match_end = (common->match_end_ptr != 0); - -SLJIT_ASSERT(common->mode == PCRE2_JIT_COMPLETE || offset == 0); - -if (has_match_end) - OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr); - -if (offset > 0) - OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(offset)); - -if (has_match_end) - { - OP1(SLJIT_MOV, TMP3, 0, STR_END, 0); - - OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(offset + 1)); - OP2(SLJIT_SUB | SLJIT_SET_GREATER, SLJIT_UNUSED, 0, STR_END, 0, TMP1, 0); - CMOV(SLJIT_GREATER, STR_END, TMP1, 0); - } - -#if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86) && !(defined SUPPORT_VALGRIND) - -/* SSE2 accelerated first character search. */ - -if (sljit_has_cpu_feature(SLJIT_HAS_SSE2)) - { - fast_forward_first_char2_sse2(common, char1, char2, offset); - - if (offset > 0) - OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(offset)); - - if (has_match_end) - OP1(SLJIT_MOV, STR_END, 0, TMP3, 0); - return; - } - -#endif - -start = LABEL(); - -partial_quit = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0); -if (common->mode == PCRE2_JIT_COMPLETE) - add_jump(compiler, &common->failed_match, partial_quit); - -OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0); -OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); - -if (char1 == char2) - CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, char1, start); -else - { - mask = char1 ^ char2; - if (is_powerof2(mask)) - { - OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, mask); - CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, char1 | mask, start); - } - else - { - match = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, char1); - CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, char2, start); - JUMPHERE(match); - } - } - -#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 -if (common->utf && offset > 0) - { - OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-(offset + 1))); - jumpto_if_not_utf_char_start(compiler, TMP1, start); - } -#endif - -OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(offset + 1)); - -if (common->mode != PCRE2_JIT_COMPLETE) - JUMPHERE(partial_quit); - -if (has_match_end) - OP1(SLJIT_MOV, STR_END, 0, TMP3, 0); -} - -static SLJIT_INLINE BOOL fast_forward_first_n_chars(compiler_common *common) -{ -DEFINE_COMPILER; -struct sljit_label *start; -struct sljit_jump *match; -fast_forward_char_data chars[MAX_N_CHARS]; -sljit_s32 offset; -PCRE2_UCHAR mask; -PCRE2_UCHAR *char_set, *char_set_end; -int i, max, from; -int range_right = -1, range_len; -sljit_u8 *update_table = NULL; -BOOL in_range; -sljit_u32 rec_count; +struct sljit_jump *match; +fast_forward_char_data chars[MAX_N_CHARS]; +sljit_s32 offset; +PCRE2_UCHAR mask; +PCRE2_UCHAR *char_set, *char_set_end; +int i, max, from; +int range_right = -1, range_len; +sljit_u8 *update_table = NULL; +BOOL in_range; +sljit_u32 rec_count; for (i = 0; i < MAX_N_CHARS; i++) { @@ -6267,8 +5707,8 @@ for (i = 0; i < max; i++) chars[i].last_count = (chars[i].count == 255) ? 0 : 1; } -#if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86) && !(defined SUPPORT_VALGRIND) && !(defined _WIN64) -if (sljit_has_cpu_feature(SLJIT_HAS_SSE2) && check_fast_forward_char_pair_sse2(common, chars, max)) +#ifdef JIT_HAS_FAST_FORWARD_CHAR_PAIR_SIMD +if (JIT_HAS_FAST_FORWARD_CHAR_PAIR_SIMD && check_fast_forward_char_pair_simd(common, chars, max)) return TRUE; #endif @@ -6353,18 +5793,21 @@ if (common->match_end_ptr != 0) { OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr); OP1(SLJIT_MOV, TMP3, 0, STR_END, 0); - OP2(SLJIT_SUB, STR_END, 0, STR_END, 0, SLJIT_IMM, IN_UCHARS(max)); + OP2(SLJIT_SUB | SLJIT_SET_LESS, STR_END, 0, STR_END, 0, SLJIT_IMM, IN_UCHARS(max)); + add_jump(compiler, &common->failed_match, JUMP(SLJIT_LESS)); OP2(SLJIT_SUB | SLJIT_SET_GREATER, SLJIT_UNUSED, 0, STR_END, 0, TMP1, 0); CMOV(SLJIT_GREATER, STR_END, TMP1, 0); } else - OP2(SLJIT_SUB, STR_END, 0, STR_END, 0, SLJIT_IMM, IN_UCHARS(max)); + { + OP2(SLJIT_SUB | SLJIT_SET_LESS, STR_END, 0, STR_END, 0, SLJIT_IMM, IN_UCHARS(max)); + add_jump(compiler, &common->failed_match, JUMP(SLJIT_LESS)); + } SLJIT_ASSERT(range_right >= 0); -#if !(defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) -OP1(SLJIT_MOV, RETURN_ADDR, 0, SLJIT_IMM, (sljit_sw)update_table); -#endif +if (!HAS_VIRTUAL_REGISTERS) + OP1(SLJIT_MOV, RETURN_ADDR, 0, SLJIT_IMM, (sljit_sw)update_table); start = LABEL(); add_jump(compiler, &common->failed_match, CMP(SLJIT_GREATER, STR_PTR, 0, STR_END, 0)); @@ -6375,11 +5818,11 @@ OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(range_right)); OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(range_right + 1) - 1); #endif -#if !(defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) -OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM2(RETURN_ADDR, TMP1), 0); -#else -OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)update_table); -#endif +if (!HAS_VIRTUAL_REGISTERS) + OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM2(RETURN_ADDR, TMP1), 0); +else + OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)update_table); + OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0); CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, 0, start); @@ -6473,9 +5916,17 @@ if (common->match_end_ptr != 0) if (common->nltype == NLTYPE_FIXED && common->newline > 255) { lastchar = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0); - OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0); - OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str)); - OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin)); + if (HAS_VIRTUAL_REGISTERS) + { + OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0); + OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str)); + OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin)); + } + else + { + OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, str)); + OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, begin)); + } firstchar = CMP(SLJIT_LESS_EQUAL, STR_PTR, 0, TMP2, 0); OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(2)); @@ -6503,9 +5954,15 @@ if (common->nltype == NLTYPE_FIXED && common->newline > 255) return; } -OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0); +if (HAS_VIRTUAL_REGISTERS) + { + OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0); + OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str)); + } +else + OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, str)); + /* Example: match /^/ to \r\n from offset 1. */ -OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str)); firstchar = CMP(SLJIT_LESS_EQUAL, STR_PTR, 0, TMP2, 0); move_back(common, NULL, FALSE); @@ -6586,7 +6043,7 @@ if (!optimize_class(common, start_bits, (start_bits[31] & 0x80) != 0, FALSE, &ma OP2(SLJIT_AND, TMP2, 0, TMP1, 0, SLJIT_IMM, 0x7); OP2(SLJIT_LSHR, TMP1, 0, TMP1, 0, SLJIT_IMM, 3); OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)start_bits); - if (sljit_get_register_index(TMP3) >= 0) + if (!HAS_VIRTUAL_REGISTERS) { OP2(SLJIT_SHL, TMP3, 0, SLJIT_IMM, 1, TMP2, 0); OP2(SLJIT_AND | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, TMP3, 0); @@ -6693,7 +6150,7 @@ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), -sizeof(sljit_sw)); jump = CMP(SLJIT_SIG_LESS_EQUAL, TMP2, 0, SLJIT_IMM, 0); OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP1, 0); -if (sljit_get_register_index(TMP3) < 0) +if (HAS_VIRTUAL_REGISTERS) { OP1(SLJIT_MOV, SLJIT_MEM1(TMP2), 0, SLJIT_MEM1(STACK_TOP), -(2 * sizeof(sljit_sw))); OP1(SLJIT_MOV, SLJIT_MEM1(TMP2), sizeof(sljit_sw), SLJIT_MEM1(STACK_TOP), -(3 * sizeof(sljit_sw))); @@ -6718,7 +6175,7 @@ sljit_emit_fast_return(compiler, RETURN_ADDR, 0); JUMPHERE(jump); OP1(SLJIT_NEG, TMP2, 0, TMP2, 0); OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP1, 0); -if (sljit_get_register_index(TMP3) < 0) +if (HAS_VIRTUAL_REGISTERS) { OP1(SLJIT_MOV, SLJIT_MEM1(TMP2), 0, SLJIT_MEM1(STACK_TOP), -(2 * sizeof(sljit_sw))); OP2(SLJIT_SUB, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, 2 * sizeof(sljit_sw)); @@ -6737,7 +6194,11 @@ static void check_wordboundary(compiler_common *common) DEFINE_COMPILER; struct sljit_jump *skipread; jump_list *skipread_list = NULL; -jump_list *invalid_utf = NULL; +#ifdef SUPPORT_UNICODE +struct sljit_label *valid_utf; +jump_list *invalid_utf1 = NULL; +#endif /* SUPPORT_UNICODE */ +jump_list *invalid_utf2 = NULL; #if PCRE2_CODE_UNIT_WIDTH != 8 || defined SUPPORT_UNICODE struct sljit_jump *jump; #endif /* PCRE2_CODE_UNIT_WIDTH != 8 || SUPPORT_UNICODE */ @@ -6751,14 +6212,30 @@ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin)); OP1(SLJIT_MOV, TMP3, 0, SLJIT_IMM, 0); skipread = CMP(SLJIT_LESS_EQUAL, STR_PTR, 0, TMP2, 0); -if (common->mode == PCRE2_JIT_COMPLETE) - peek_char_back(common, READ_CHAR_MAX, &invalid_utf); +#ifdef SUPPORT_UNICODE +if (common->invalid_utf) + { + peek_char_back(common, READ_CHAR_MAX, &invalid_utf1); + + if (common->mode != PCRE2_JIT_COMPLETE) + { + OP1(SLJIT_MOV, TMP2, 0, STR_PTR, 0); + move_back(common, NULL, TRUE); + check_start_used_ptr(common); + OP1(SLJIT_MOV, STR_PTR, 0, TMP2, 0); + } + } else +#endif /* SUPPORT_UNICODE */ { - move_back(common, &invalid_utf, FALSE); - check_start_used_ptr(common); - /* No need precise read since match fails anyway. */ - read_char(common, 0, READ_CHAR_MAX, &invalid_utf, READ_CHAR_UPDATE_STR_PTR); + if (common->mode == PCRE2_JIT_COMPLETE) + peek_char_back(common, READ_CHAR_MAX, NULL); + else + { + move_back(common, NULL, TRUE); + check_start_used_ptr(common); + read_char(common, 0, READ_CHAR_MAX, NULL, READ_CHAR_UPDATE_STR_PTR); + } } /* Testing char type. */ @@ -6802,10 +6279,13 @@ JUMPHERE(skipread); OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, 0); check_str_end(common, &skipread_list); -peek_char(common, READ_CHAR_MAX, SLJIT_MEM1(SLJIT_SP), LOCALS1, &invalid_utf); +peek_char(common, READ_CHAR_MAX, SLJIT_MEM1(SLJIT_SP), LOCALS1, &invalid_utf2); /* Testing char type. This is a code duplication. */ #ifdef SUPPORT_UNICODE + +valid_utf = LABEL(); + if (common->use_ucp) { OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, 1); @@ -6851,13 +6331,19 @@ sljit_emit_fast_return(compiler, TMP1, 0); #ifdef SUPPORT_UNICODE if (common->invalid_utf) { - SLJIT_ASSERT(invalid_utf != NULL); + set_jumps(invalid_utf1, LABEL()); + + peek_char(common, READ_CHAR_MAX, SLJIT_MEM1(SLJIT_SP), LOCALS1, NULL); + CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, INVALID_UTF_CHAR, valid_utf); - set_jumps(invalid_utf, LABEL()); OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), LOCALS0); OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, -1); sljit_emit_fast_return(compiler, TMP1, 0); - return; + + set_jumps(invalid_utf2, LABEL()); + OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), LOCALS0); + OP1(SLJIT_MOV, TMP2, 0, TMP3, 0); + sljit_emit_fast_return(compiler, TMP1, 0); } #endif /* SUPPORT_UNICODE */ } @@ -7225,7 +6711,7 @@ struct sljit_label *label; int char1_reg; int char2_reg; -if (sljit_get_register_index(TMP3) < 0) +if (HAS_VIRTUAL_REGISTERS) { char1_reg = STR_END; char2_reg = STACK_TOP; @@ -7307,7 +6793,7 @@ int char2_reg; int lcc_table; int opt_type = 0; -if (sljit_get_register_index(TMP3) < 0) +if (HAS_VIRTUAL_REGISTERS) { char2_reg = STACK_TOP; lcc_table = STACK_LIMIT; @@ -7790,8 +7276,6 @@ if (needstype || needsscript) if (needsscript) { // PH hacking -//fprintf(stderr, "~~B\n"); - OP2(SLJIT_SHL, TMP1, 0, TMP2, 0, SLJIT_IMM, 2); OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 3); OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP1, 0); @@ -7845,7 +7329,6 @@ if (needstype || needsscript) if (!needschar) { // PH hacking -//fprintf(stderr, "~~C\n"); OP2(SLJIT_SHL, TMP1, 0, TMP2, 0, SLJIT_IMM, 2); OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 3); OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP1, 0); @@ -7860,7 +7343,6 @@ if (needstype || needsscript) else { // PH hacking -//fprintf(stderr, "~~D\n"); OP2(SLJIT_SHL, TMP1, 0, TMP2, 0, SLJIT_IMM, 2); OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 3); @@ -8174,14 +7656,24 @@ struct sljit_label *label; switch(type) { case OP_SOD: - OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0); - OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin)); + if (HAS_VIRTUAL_REGISTERS) + { + OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0); + OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin)); + } + else + OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, begin)); add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, STR_PTR, 0, TMP1, 0)); return cc; case OP_SOM: - OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0); - OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str)); + if (HAS_VIRTUAL_REGISTERS) + { + OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0); + OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str)); + } + else + OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, str)); add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, STR_PTR, 0, TMP1, 0)); return cc; @@ -8191,9 +7683,7 @@ switch(type) #ifdef SUPPORT_UNICODE if (common->invalid_utf) { - OP2(SLJIT_SUB | SLJIT_SET_Z | SLJIT_SET_SIG_LESS, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, 0); - add_jump(compiler, backtracks, JUMP(SLJIT_SIG_LESS)); - add_jump(compiler, backtracks, JUMP(type == OP_NOT_WORD_BOUNDARY ? SLJIT_NOT_ZERO : SLJIT_ZERO)); + add_jump(compiler, backtracks, CMP((type == OP_NOT_WORD_BOUNDARY) ? SLJIT_NOT_EQUAL : SLJIT_SIG_LESS_EQUAL, TMP2, 0, SLJIT_IMM, 0)); return cc; } #endif /* SUPPORT_UNICODE */ @@ -8267,17 +7757,24 @@ switch(type) JUMPHERE(jump[3]); } JUMPHERE(jump[0]); - check_partial(common, FALSE); + if (common->mode != PCRE2_JIT_COMPLETE) + check_partial(common, TRUE); return cc; case OP_EOD: add_jump(compiler, backtracks, CMP(SLJIT_LESS, STR_PTR, 0, STR_END, 0)); - check_partial(common, FALSE); + if (common->mode != PCRE2_JIT_COMPLETE) + check_partial(common, TRUE); return cc; case OP_DOLL: - OP1(SLJIT_MOV, TMP2, 0, ARGUMENTS, 0); - OP2(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_UNUSED, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTEOL); + if (HAS_VIRTUAL_REGISTERS) + { + OP1(SLJIT_MOV, TMP2, 0, ARGUMENTS, 0); + OP2(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_UNUSED, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTEOL); + } + else + OP2(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_UNUSED, 0, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTEOL); add_jump(compiler, backtracks, JUMP(SLJIT_NOT_ZERO32)); if (!common->endonly) @@ -8291,8 +7788,13 @@ switch(type) case OP_DOLLM: jump[1] = CMP(SLJIT_LESS, STR_PTR, 0, STR_END, 0); - OP1(SLJIT_MOV, TMP2, 0, ARGUMENTS, 0); - OP2(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_UNUSED, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTEOL); + if (HAS_VIRTUAL_REGISTERS) + { + OP1(SLJIT_MOV, TMP2, 0, ARGUMENTS, 0); + OP2(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_UNUSED, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTEOL); + } + else + OP2(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_UNUSED, 0, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTEOL); add_jump(compiler, backtracks, JUMP(SLJIT_NOT_ZERO32)); check_partial(common, FALSE); jump[0] = JUMP(SLJIT_JUMP); @@ -8327,18 +7829,38 @@ switch(type) return cc; case OP_CIRC: - OP1(SLJIT_MOV, TMP2, 0, ARGUMENTS, 0); - OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, begin)); - add_jump(compiler, backtracks, CMP(SLJIT_GREATER, STR_PTR, 0, TMP1, 0)); - OP2(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_UNUSED, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTBOL); - add_jump(compiler, backtracks, JUMP(SLJIT_NOT_ZERO32)); + if (HAS_VIRTUAL_REGISTERS) + { + OP1(SLJIT_MOV, TMP2, 0, ARGUMENTS, 0); + OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, begin)); + add_jump(compiler, backtracks, CMP(SLJIT_GREATER, STR_PTR, 0, TMP1, 0)); + OP2(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_UNUSED, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTBOL); + add_jump(compiler, backtracks, JUMP(SLJIT_NOT_ZERO32)); + } + else + { + OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, begin)); + add_jump(compiler, backtracks, CMP(SLJIT_GREATER, STR_PTR, 0, TMP1, 0)); + OP2(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_UNUSED, 0, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTBOL); + add_jump(compiler, backtracks, JUMP(SLJIT_NOT_ZERO32)); + } return cc; case OP_CIRCM: - OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0); - OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin)); - jump[1] = CMP(SLJIT_GREATER, STR_PTR, 0, TMP2, 0); - OP2(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_UNUSED, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTBOL); + /* TMP2 might be used by peek_char_back. */ + if (HAS_VIRTUAL_REGISTERS) + { + OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0); + OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin)); + jump[1] = CMP(SLJIT_GREATER, STR_PTR, 0, TMP2, 0); + OP2(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_UNUSED, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTBOL); + } + else + { + OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, begin)); + jump[1] = CMP(SLJIT_GREATER, STR_PTR, 0, TMP2, 0); + OP2(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_UNUSED, 0, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTBOL); + } add_jump(compiler, backtracks, JUMP(SLJIT_NOT_ZERO32)); jump[0] = JUMP(SLJIT_JUMP); JUMPHERE(jump[1]); @@ -8367,11 +7889,16 @@ switch(type) length = GET(cc, 0); if (length == 0) return cc + LINK_SIZE; - OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0); + if (HAS_VIRTUAL_REGISTERS) + { + OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0); + OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin)); + } + else + OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, begin)); #ifdef SUPPORT_UNICODE if (common->utf) { - OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin)); OP1(SLJIT_MOV, TMP3, 0, SLJIT_IMM, length); label = LABEL(); add_jump(compiler, backtracks, CMP(SLJIT_LESS_EQUAL, STR_PTR, 0, TMP2, 0)); @@ -8382,9 +7909,8 @@ switch(type) else #endif { - OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin)); OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(length)); - add_jump(compiler, backtracks, CMP(SLJIT_LESS, STR_PTR, 0, TMP1, 0)); + add_jump(compiler, backtracks, CMP(SLJIT_LESS, STR_PTR, 0, TMP2, 0)); } check_start_used_ptr(common); return cc + LINK_SIZE; @@ -8402,12 +7928,12 @@ static PCRE2_SPTR SLJIT_FUNC do_extuni_utf(jit_arguments *args, PCRE2_SPTR cc) PCRE2_SPTR start_subject = args->begin; PCRE2_SPTR end_subject = args->end; int lgb, rgb, ricount; -PCRE2_SPTR prevcc, startcc, bptr; +PCRE2_SPTR prevcc, endcc, bptr; BOOL first = TRUE; uint32_t c; prevcc = cc; -startcc = NULL; +endcc = NULL; do { GETCHARINC(c, cc); @@ -8416,7 +7942,7 @@ do if (first) { lgb = rgb; - startcc = cc; + endcc = cc; first = FALSE; continue; } @@ -8455,25 +7981,27 @@ do lgb != ucp_gbExtended_Pictographic) lgb = rgb; - prevcc = startcc; - startcc = cc; + prevcc = endcc; + endcc = cc; } while (cc < end_subject); -return startcc; +return endcc; } +#endif /* PCRE2_CODE_UNIT_WIDTH != 32 */ + static PCRE2_SPTR SLJIT_FUNC do_extuni_utf_invalid(jit_arguments *args, PCRE2_SPTR cc) { PCRE2_SPTR start_subject = args->begin; PCRE2_SPTR end_subject = args->end; int lgb, rgb, ricount; -PCRE2_SPTR prevcc, startcc, bptr; +PCRE2_SPTR prevcc, endcc, bptr; BOOL first = TRUE; uint32_t c; prevcc = cc; -startcc = NULL; +endcc = NULL; do { GETCHARINC_INVALID(c, cc, end_subject, break); @@ -8482,7 +8010,7 @@ do if (first) { lgb = rgb; - startcc = cc; + endcc = cc; first = FALSE; continue; } @@ -8520,16 +8048,14 @@ do lgb != ucp_gbExtended_Pictographic) lgb = rgb; - prevcc = startcc; - startcc = cc; + prevcc = endcc; + endcc = cc; } while (cc < end_subject); -return startcc; +return endcc; } -#endif /* PCRE2_CODE_UNIT_WIDTH != 32 */ - static PCRE2_SPTR SLJIT_FUNC do_extuni_no_utf(jit_arguments *args, PCRE2_SPTR cc) { PCRE2_SPTR start_subject = args->begin; @@ -8538,7 +8064,10 @@ int lgb, rgb, ricount; PCRE2_SPTR bptr; uint32_t c; +/* Patch by PH */ +/* GETCHARINC(c, cc); */ c = *cc++; + #if PCRE2_CODE_UNIT_WIDTH == 32 if (c >= 0x110000) return NULL; @@ -8800,8 +8329,10 @@ switch(type) if (common->invalid_utf) add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0)); #else - sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW), SLJIT_IMM, SLJIT_FUNC_OFFSET(do_extuni_no_utf)); - add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0)); + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW), SLJIT_IMM, + common->invalid_utf ? SLJIT_FUNC_OFFSET(do_extuni_utf_invalid) : SLJIT_FUNC_OFFSET(do_extuni_no_utf)); + if (!common->utf || common->invalid_utf) + add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0)); #endif OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_RETURN_REG, 0); @@ -9198,8 +8729,6 @@ if (common->utf && *cc == OP_REFI) CMPTO(SLJIT_EQUAL, TMP1, 0, char1_reg, 0, loop); // PH hacking -//fprintf(stderr, "~~E\n"); - OP1(SLJIT_MOV, TMP3, 0, TMP1, 0); add_jump(compiler, &common->getucd, JUMP(SLJIT_FAST_CALL)); @@ -10759,10 +10288,23 @@ if (ket != OP_KET || bra != OP_BRA) if (offset != 0) stacksize = match_capture_common(common, stacksize, offset, private_data_ptr); +/* Skip and count the other alternatives. */ +i = 1; +while (*cc == OP_ALT) + { + cc += GET(cc, 1); + i++; + } + if (has_alternatives) { if (opcode != OP_ONCE) - OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), SLJIT_IMM, 0); + { + if (i <= 3) + OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), SLJIT_IMM, 0); + else + BACKTRACK_AS(bracket_backtrack)->u.matching_put_label = sljit_emit_put_label(compiler, SLJIT_MEM1(STACK_TOP), STACK(stacksize)); + } if (ket != OP_KETRMAX) BACKTRACK_AS(bracket_backtrack)->alternative_matchingpath = LABEL(); } @@ -10851,9 +10393,6 @@ if (bra == OP_BRAMINZERO) if ((ket != OP_KET && bra != OP_BRAMINZERO) || bra == OP_BRAZERO) count_match(common); -/* Skip the other alternatives. */ -while (*cc == OP_ALT) - cc += GET(cc, 1); cc += 1 + LINK_SIZE; if (opcode == OP_ONCE) @@ -11412,174 +10951,232 @@ switch(opcode) JUMPTO(SLJIT_JUMP, label); if (jump != NULL) JUMPHERE(jump); + BACKTRACK_AS(char_iterator_backtrack)->matchingpath = LABEL(); + break; } - else +#ifdef SUPPORT_UNICODE + else if (type == OP_ALLANY && !common->invalid_utf) +#else + else if (type == OP_ALLANY) +#endif { - charpos_enabled = FALSE; - charpos_char = 0; - charpos_othercasebit = 0; + if (opcode == OP_STAR) + { + if (private_data_ptr == 0) + allocate_stack(common, 2); + + OP1(SLJIT_MOV, base, offset0, STR_END, 0); + OP1(SLJIT_MOV, base, offset1, STR_PTR, 0); + + OP1(SLJIT_MOV, STR_PTR, 0, STR_END, 0); + process_partial_match(common); - if ((type != OP_CHAR && type != OP_CHARI) && (*end == OP_CHAR || *end == OP_CHARI)) + if (fast_str_ptr != 0) + OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_END, 0); + BACKTRACK_AS(char_iterator_backtrack)->matchingpath = LABEL(); + break; + } +#ifdef SUPPORT_UNICODE + else if (!common->utf) +#else + else +#endif { - charpos_enabled = TRUE; + if (private_data_ptr == 0) + allocate_stack(common, 2); + + OP1(SLJIT_MOV, base, offset1, STR_PTR, 0); + OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(max)); + + if (common->mode == PCRE2_JIT_COMPLETE) + { + OP2(SLJIT_SUB | SLJIT_SET_GREATER, SLJIT_UNUSED, 0, STR_PTR, 0, STR_END, 0); + CMOV(SLJIT_GREATER, STR_PTR, STR_END, 0); + } + else + { + jump = CMP(SLJIT_LESS_EQUAL, STR_PTR, 0, STR_END, 0); + process_partial_match(common); + JUMPHERE(jump); + } + + OP1(SLJIT_MOV, base, offset0, STR_PTR, 0); + + if (fast_str_ptr != 0) + OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0); + BACKTRACK_AS(char_iterator_backtrack)->matchingpath = LABEL(); + break; + } + } + + charpos_enabled = FALSE; + charpos_char = 0; + charpos_othercasebit = 0; + + if ((type != OP_CHAR && type != OP_CHARI) && (*end == OP_CHAR || *end == OP_CHARI)) + { #ifdef SUPPORT_UNICODE - charpos_enabled = !common->utf || !HAS_EXTRALEN(end[1]); + charpos_enabled = !common->utf || !HAS_EXTRALEN(end[1]); +#else + charpos_enabled = TRUE; #endif - if (charpos_enabled && *end == OP_CHARI && char_has_othercase(common, end + 1)) - { - charpos_othercasebit = char_get_othercase_bit(common, end + 1); - if (charpos_othercasebit == 0) - charpos_enabled = FALSE; - } + if (charpos_enabled && *end == OP_CHARI && char_has_othercase(common, end + 1)) + { + charpos_othercasebit = char_get_othercase_bit(common, end + 1); + if (charpos_othercasebit == 0) + charpos_enabled = FALSE; + } - if (charpos_enabled) - { - charpos_char = end[1]; - /* Consumpe the OP_CHAR opcode. */ - end += 2; + if (charpos_enabled) + { + charpos_char = end[1]; + /* Consumpe the OP_CHAR opcode. */ + end += 2; #if PCRE2_CODE_UNIT_WIDTH == 8 - SLJIT_ASSERT((charpos_othercasebit >> 8) == 0); + SLJIT_ASSERT((charpos_othercasebit >> 8) == 0); #elif PCRE2_CODE_UNIT_WIDTH == 16 || PCRE2_CODE_UNIT_WIDTH == 32 - SLJIT_ASSERT((charpos_othercasebit >> 9) == 0); - if ((charpos_othercasebit & 0x100) != 0) - charpos_othercasebit = (charpos_othercasebit & 0xff) << 8; + SLJIT_ASSERT((charpos_othercasebit >> 9) == 0); + if ((charpos_othercasebit & 0x100) != 0) + charpos_othercasebit = (charpos_othercasebit & 0xff) << 8; #endif - if (charpos_othercasebit != 0) - charpos_char |= charpos_othercasebit; + if (charpos_othercasebit != 0) + charpos_char |= charpos_othercasebit; - BACKTRACK_AS(char_iterator_backtrack)->u.charpos.enabled = TRUE; - BACKTRACK_AS(char_iterator_backtrack)->u.charpos.chr = charpos_char; - BACKTRACK_AS(char_iterator_backtrack)->u.charpos.othercasebit = charpos_othercasebit; - } + BACKTRACK_AS(char_iterator_backtrack)->u.charpos.enabled = TRUE; + BACKTRACK_AS(char_iterator_backtrack)->u.charpos.chr = charpos_char; + BACKTRACK_AS(char_iterator_backtrack)->u.charpos.othercasebit = charpos_othercasebit; } + } - if (charpos_enabled) + if (charpos_enabled) + { + if (opcode == OP_UPTO) + OP1(SLJIT_MOV, tmp_base, tmp_offset, SLJIT_IMM, max + 1); + + /* Search the first instance of charpos_char. */ + jump = JUMP(SLJIT_JUMP); + label = LABEL(); + if (opcode == OP_UPTO) { - if (opcode == OP_UPTO) - OP1(SLJIT_MOV, tmp_base, tmp_offset, SLJIT_IMM, max + 1); + OP2(SLJIT_SUB | SLJIT_SET_Z, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1); + add_jump(compiler, &backtrack->topbacktracks, JUMP(SLJIT_ZERO)); + } + compile_char1_matchingpath(common, type, cc, &backtrack->topbacktracks, FALSE); + if (fast_str_ptr != 0) + OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0); + JUMPHERE(jump); - /* Search the first instance of charpos_char. */ - jump = JUMP(SLJIT_JUMP); - label = LABEL(); - if (opcode == OP_UPTO) - { - OP2(SLJIT_SUB | SLJIT_SET_Z, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1); - add_jump(compiler, &backtrack->topbacktracks, JUMP(SLJIT_ZERO)); - } - compile_char1_matchingpath(common, type, cc, &backtrack->topbacktracks, FALSE); - if (fast_str_ptr != 0) - OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0); - JUMPHERE(jump); + detect_partial_match(common, &backtrack->topbacktracks); + OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0)); + if (charpos_othercasebit != 0) + OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, charpos_othercasebit); + CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, charpos_char, label); - detect_partial_match(common, &backtrack->topbacktracks); - OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0)); - if (charpos_othercasebit != 0) - OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, charpos_othercasebit); - CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, charpos_char, label); + if (private_data_ptr == 0) + allocate_stack(common, 2); + OP1(SLJIT_MOV, base, offset0, STR_PTR, 0); + OP1(SLJIT_MOV, base, offset1, STR_PTR, 0); + if (opcode == OP_UPTO) + { + OP2(SLJIT_SUB | SLJIT_SET_Z, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1); + add_jump(compiler, &no_match, JUMP(SLJIT_ZERO)); + } - if (private_data_ptr == 0) - allocate_stack(common, 2); + /* Search the last instance of charpos_char. */ + label = LABEL(); + compile_char1_matchingpath(common, type, cc, &no_match, FALSE); + if (fast_str_ptr != 0) + OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0); + detect_partial_match(common, &no_match); + OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0)); + if (charpos_othercasebit != 0) + OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, charpos_othercasebit); + if (opcode == OP_STAR) + { + CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, charpos_char, label); OP1(SLJIT_MOV, base, offset0, STR_PTR, 0); - OP1(SLJIT_MOV, base, offset1, STR_PTR, 0); - if (opcode == OP_UPTO) - { - OP2(SLJIT_SUB | SLJIT_SET_Z, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1); - add_jump(compiler, &no_match, JUMP(SLJIT_ZERO)); - } - - /* Search the last instance of charpos_char. */ - label = LABEL(); - compile_char1_matchingpath(common, type, cc, &no_match, FALSE); - if (fast_str_ptr != 0) - OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0); - detect_partial_match(common, &no_match); - OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0)); - if (charpos_othercasebit != 0) - OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, charpos_othercasebit); - if (opcode == OP_STAR) - { - CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, charpos_char, label); - OP1(SLJIT_MOV, base, offset0, STR_PTR, 0); - } - else - { - jump = CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, charpos_char); - OP1(SLJIT_MOV, base, offset0, STR_PTR, 0); - JUMPHERE(jump); - } - - if (opcode == OP_UPTO) - { - OP2(SLJIT_SUB | SLJIT_SET_Z, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1); - JUMPTO(SLJIT_NOT_ZERO, label); - } - else - JUMPTO(SLJIT_JUMP, label); - - set_jumps(no_match, LABEL()); - OP1(SLJIT_MOV, STR_PTR, 0, base, offset0); - OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); + } + else + { + jump = CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, charpos_char); OP1(SLJIT_MOV, base, offset0, STR_PTR, 0); + JUMPHERE(jump); } -#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 - else if (common->utf) + + if (opcode == OP_UPTO) { - if (private_data_ptr == 0) - allocate_stack(common, 2); + OP2(SLJIT_SUB | SLJIT_SET_Z, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1); + JUMPTO(SLJIT_NOT_ZERO, label); + } + else + JUMPTO(SLJIT_JUMP, label); - OP1(SLJIT_MOV, base, offset0, STR_PTR, 0); - OP1(SLJIT_MOV, base, offset1, STR_PTR, 0); + set_jumps(no_match, LABEL()); + OP1(SLJIT_MOV, STR_PTR, 0, base, offset0); + OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); + OP1(SLJIT_MOV, base, offset0, STR_PTR, 0); + } +#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 + else if (common->utf) + { + if (private_data_ptr == 0) + allocate_stack(common, 2); - if (opcode == OP_UPTO) - OP1(SLJIT_MOV, tmp_base, tmp_offset, SLJIT_IMM, max); + OP1(SLJIT_MOV, base, offset0, STR_PTR, 0); + OP1(SLJIT_MOV, base, offset1, STR_PTR, 0); - label = LABEL(); - compile_char1_matchingpath(common, type, cc, &no_match, TRUE); - OP1(SLJIT_MOV, base, offset0, STR_PTR, 0); + if (opcode == OP_UPTO) + OP1(SLJIT_MOV, tmp_base, tmp_offset, SLJIT_IMM, max); - if (opcode == OP_UPTO) - { - OP2(SLJIT_SUB | SLJIT_SET_Z, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1); - JUMPTO(SLJIT_NOT_ZERO, label); - } - else - JUMPTO(SLJIT_JUMP, label); + detect_partial_match(common, &no_match); + label = LABEL(); + compile_char1_matchingpath(common, type, cc, &no_match, FALSE); + OP1(SLJIT_MOV, base, offset0, STR_PTR, 0); - set_jumps(no_match, LABEL()); - OP1(SLJIT_MOV, STR_PTR, 0, base, offset0); - if (fast_str_ptr != 0) - OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0); - } -#endif - else + if (opcode == OP_UPTO) { - if (private_data_ptr == 0) - allocate_stack(common, 2); + OP2(SLJIT_SUB | SLJIT_SET_Z, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1); + add_jump(compiler, &no_match, JUMP(SLJIT_ZERO)); + } - OP1(SLJIT_MOV, base, offset1, STR_PTR, 0); - if (opcode == OP_UPTO) - OP1(SLJIT_MOV, tmp_base, tmp_offset, SLJIT_IMM, max); + detect_partial_match_to(common, label); + OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); - label = LABEL(); - detect_partial_match(common, &no_match); - compile_char1_matchingpath(common, type, cc, &no_char1_match, FALSE); - if (opcode == OP_UPTO) - { - OP2(SLJIT_SUB | SLJIT_SET_Z, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1); - JUMPTO(SLJIT_NOT_ZERO, label); - OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); - } - else - JUMPTO(SLJIT_JUMP, label); + set_jumps(no_match, LABEL()); + OP1(SLJIT_MOV, STR_PTR, 0, base, offset0); + if (fast_str_ptr != 0) + OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0); + } +#endif + else + { + if (private_data_ptr == 0) + allocate_stack(common, 2); - set_jumps(no_char1_match, LABEL()); - OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); - set_jumps(no_match, LABEL()); - OP1(SLJIT_MOV, base, offset0, STR_PTR, 0); - if (fast_str_ptr != 0) - OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0); + OP1(SLJIT_MOV, base, offset1, STR_PTR, 0); + if (opcode == OP_UPTO) + OP1(SLJIT_MOV, tmp_base, tmp_offset, SLJIT_IMM, max); + + detect_partial_match(common, &no_match); + label = LABEL(); + compile_char1_matchingpath(common, type, cc, &no_char1_match, FALSE); + if (opcode == OP_UPTO) + { + OP2(SLJIT_SUB | SLJIT_SET_Z, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1); + add_jump(compiler, &no_match, JUMP(SLJIT_ZERO)); } + + detect_partial_match_to(common, label); + OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); + + set_jumps(no_char1_match, LABEL()); + OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); + set_jumps(no_match, LABEL()); + OP1(SLJIT_MOV, base, offset0, STR_PTR, 0); + if (fast_str_ptr != 0) + OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0); } + BACKTRACK_AS(char_iterator_backtrack)->matchingpath = LABEL(); break; @@ -11616,25 +11213,47 @@ switch(opcode) break; case OP_POSSTAR: +#if defined SUPPORT_UNICODE + if (type == OP_ALLANY && !common->invalid_utf) +#else + if (type == OP_ALLANY) +#endif + { + OP1(SLJIT_MOV, STR_PTR, 0, STR_END, 0); + process_partial_match(common); + if (fast_str_ptr != 0) + OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_END, 0); + break; + } + #if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 if (common->utf) { OP1(SLJIT_MOV, tmp_base, tmp_offset, STR_PTR, 0); + detect_partial_match(common, &no_match); label = LABEL(); - compile_char1_matchingpath(common, type, cc, &no_match, TRUE); + compile_char1_matchingpath(common, type, cc, &no_match, FALSE); OP1(SLJIT_MOV, tmp_base, tmp_offset, STR_PTR, 0); - JUMPTO(SLJIT_JUMP, label); + detect_partial_match_to(common, label); + set_jumps(no_match, LABEL()); OP1(SLJIT_MOV, STR_PTR, 0, tmp_base, tmp_offset); if (fast_str_ptr != 0) - OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0); + { + if (tmp_base == TMP3) + OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, TMP3, 0); + else + OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0); + } break; } #endif - label = LABEL(); detect_partial_match(common, &no_match); + label = LABEL(); compile_char1_matchingpath(common, type, cc, &no_char1_match, FALSE); - JUMPTO(SLJIT_JUMP, label); + detect_partial_match_to(common, label); + OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); + set_jumps(no_char1_match, LABEL()); OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); set_jumps(no_match, LABEL()); @@ -11649,23 +11268,52 @@ switch(opcode) { OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), POSSESSIVE1, STR_PTR, 0); OP1(SLJIT_MOV, tmp_base, tmp_offset, SLJIT_IMM, max); + + detect_partial_match(common, &no_match); label = LABEL(); - compile_char1_matchingpath(common, type, cc, &no_match, TRUE); + compile_char1_matchingpath(common, type, cc, &no_match, FALSE); OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), POSSESSIVE1, STR_PTR, 0); OP2(SLJIT_SUB | SLJIT_SET_Z, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1); - JUMPTO(SLJIT_NOT_ZERO, label); + add_jump(compiler, &no_match, JUMP(SLJIT_ZERO)); + detect_partial_match_to(common, label); + set_jumps(no_match, LABEL()); OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), POSSESSIVE1); break; } #endif + + if (type == OP_ALLANY) + { + OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(max)); + + if (common->mode == PCRE2_JIT_COMPLETE) + { + OP2(SLJIT_SUB | SLJIT_SET_GREATER, SLJIT_UNUSED, 0, STR_PTR, 0, STR_END, 0); + CMOV(SLJIT_GREATER, STR_PTR, STR_END, 0); + } + else + { + jump = CMP(SLJIT_LESS_EQUAL, STR_PTR, 0, STR_END, 0); + process_partial_match(common); + JUMPHERE(jump); + } + + if (fast_str_ptr != 0) + OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0); + break; + } + OP1(SLJIT_MOV, tmp_base, tmp_offset, SLJIT_IMM, max); - label = LABEL(); + detect_partial_match(common, &no_match); + label = LABEL(); compile_char1_matchingpath(common, type, cc, &no_char1_match, FALSE); OP2(SLJIT_SUB | SLJIT_SET_Z, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1); - JUMPTO(SLJIT_NOT_ZERO, label); + add_jump(compiler, &no_match, JUMP(SLJIT_ZERO)); + detect_partial_match_to(common, label); OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); + set_jumps(no_char1_match, LABEL()); OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); set_jumps(no_match, LABEL()); @@ -11719,8 +11367,15 @@ if (common->accept_label == NULL) add_jump(compiler, &common->accept, CMP(SLJIT_NOT_EQUAL, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(0))); else CMPTO(SLJIT_NOT_EQUAL, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(0), common->accept_label); -OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0); -OP1(SLJIT_MOV_U32, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, options)); + +if (HAS_VIRTUAL_REGISTERS) + { + OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0); + OP1(SLJIT_MOV_U32, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, options)); + } +else + OP1(SLJIT_MOV_U32, TMP2, 0, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, options)); + OP2(SLJIT_AND | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, PCRE2_NOTEMPTY); add_jump(compiler, &backtrack->topbacktracks, JUMP(SLJIT_NOT_ZERO)); OP2(SLJIT_AND | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, PCRE2_NOTEMPTY_ATSTART); @@ -11728,7 +11383,8 @@ if (common->accept_label == NULL) add_jump(compiler, &common->accept, JUMP(SLJIT_ZERO)); else JUMPTO(SLJIT_ZERO, common->accept_label); -OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str)); + +OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(HAS_VIRTUAL_REGISTERS ? TMP1 : ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, str)); if (common->accept_label == NULL) add_jump(compiler, &common->accept, CMP(SLJIT_NOT_EQUAL, TMP2, 0, STR_PTR, 0)); else @@ -11778,10 +11434,11 @@ if (opcode == OP_SKIP) if (opcode == OP_COMMIT_ARG || opcode == OP_PRUNE_ARG || opcode == OP_THEN_ARG) { - OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0); + if (HAS_VIRTUAL_REGISTERS) + OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0); OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, (sljit_sw)(cc + 2)); OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->mark_ptr, TMP2, 0); - OP1(SLJIT_MOV, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, mark_ptr), TMP2, 0); + OP1(SLJIT_MOV, SLJIT_MEM1(HAS_VIRTUAL_REGISTERS ? TMP1 : ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, mark_ptr), TMP2, 0); } return ccend; @@ -12072,11 +11729,12 @@ while (cc < ccend) SLJIT_ASSERT(common->mark_ptr != 0); OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), common->mark_ptr); allocate_stack(common, common->has_skip_arg ? 5 : 1); - OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0); + if (HAS_VIRTUAL_REGISTERS) + OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0); OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(common->has_skip_arg ? 4 : 0), TMP2, 0); OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, (sljit_sw)(cc + 2)); OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->mark_ptr, TMP2, 0); - OP1(SLJIT_MOV, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, mark_ptr), TMP2, 0); + OP1(SLJIT_MOV, SLJIT_MEM1(HAS_VIRTUAL_REGISTERS ? TMP1 : ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, mark_ptr), TMP2, 0); if (common->has_skip_arg) { OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr); @@ -12403,16 +12061,15 @@ PCRE2_SPTR ccprev; PCRE2_UCHAR bra = OP_BRA; PCRE2_UCHAR ket; assert_backtrack *assert; -sljit_uw *next_update_addr = NULL; BOOL has_alternatives; BOOL needs_control_head = FALSE; struct sljit_jump *brazero = NULL; -struct sljit_jump *alt1 = NULL; -struct sljit_jump *alt2 = NULL; +struct sljit_jump *next_alt = NULL; struct sljit_jump *once = NULL; struct sljit_jump *cond = NULL; struct sljit_label *rmin_label = NULL; struct sljit_label *exact_label = NULL; +struct sljit_put_label *put_label = NULL; if (*cc == OP_BRAZERO || *cc == OP_BRAMINZERO) { @@ -12561,7 +12218,7 @@ else if (SLJIT_UNLIKELY(opcode == OP_COND) || SLJIT_UNLIKELY(opcode == OP_SCOND) free_stack(common, 1); alt_max = 2; - alt1 = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, sizeof(sljit_uw)); + next_alt = CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, 0); } } else if (has_alternatives) @@ -12569,21 +12226,15 @@ else if (has_alternatives) OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0)); free_stack(common, 1); - if (alt_max > 4) + if (alt_max > 3) { - /* Table jump if alt_max is greater than 4. */ - next_update_addr = allocate_read_only_data(common, alt_max * sizeof(sljit_uw)); - if (SLJIT_UNLIKELY(next_update_addr == NULL)) - return; - sljit_emit_ijump(compiler, SLJIT_JUMP, SLJIT_MEM1(TMP1), (sljit_sw)next_update_addr); - add_label_addr(common, next_update_addr++); + sljit_emit_ijump(compiler, SLJIT_JUMP, TMP1, 0); + + SLJIT_ASSERT(CURRENT_AS(bracket_backtrack)->u.matching_put_label); + sljit_set_put_label(CURRENT_AS(bracket_backtrack)->u.matching_put_label, LABEL()); } else - { - if (alt_max == 4) - alt2 = CMP(SLJIT_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, 2 * sizeof(sljit_uw)); - alt1 = CMP(SLJIT_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, sizeof(sljit_uw)); - } + next_alt = CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, 0); } COMPILE_BACKTRACKINGPATH(current->top); @@ -12620,7 +12271,7 @@ if (SLJIT_UNLIKELY(opcode == OP_COND) || SLJIT_UNLIKELY(opcode == OP_SCOND)) if (has_alternatives) { - alt_count = sizeof(sljit_uw); + alt_count = 1; do { current->top = NULL; @@ -12699,7 +12350,12 @@ if (has_alternatives) stacksize = match_capture_common(common, stacksize, offset, private_data_ptr); if (opcode != OP_ONCE) - OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), SLJIT_IMM, alt_count); + { + if (alt_max <= 3) + OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), SLJIT_IMM, alt_count); + else + put_label = sljit_emit_put_label(compiler, SLJIT_MEM1(STACK_TOP), STACK(stacksize)); + } if (offset != 0 && ket == OP_KETRMAX && common->optimized_cbracket[offset >> 1] != 0) { @@ -12712,24 +12368,18 @@ if (has_alternatives) if (opcode != OP_ONCE) { - if (alt_max > 4) - add_label_addr(common, next_update_addr++); - else + if (alt_max <= 3) { - if (alt_count != 2 * sizeof(sljit_uw)) - { - JUMPHERE(alt1); - if (alt_max == 3 && alt_count == sizeof(sljit_uw)) - alt2 = CMP(SLJIT_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, 2 * sizeof(sljit_uw)); - } - else + JUMPHERE(next_alt); + alt_count++; + if (alt_count < alt_max) { - JUMPHERE(alt2); - if (alt_max == 4) - alt1 = CMP(SLJIT_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, 3 * sizeof(sljit_uw)); + SLJIT_ASSERT(alt_count == 2 && alt_max == 3); + next_alt = CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, 1); } } - alt_count += sizeof(sljit_uw); + else + sljit_set_put_label(put_label, LABEL()); } COMPILE_BACKTRACKINGPATH(current->top); @@ -13219,11 +12869,10 @@ int private_data_size = get_recurse_data_length(common, ccbegin, ccend, &needs_c int alt_count, alt_max, local_size; backtrack_common altbacktrack; jump_list *match = NULL; -sljit_uw *next_update_addr = NULL; -struct sljit_jump *alt1 = NULL; -struct sljit_jump *alt2 = NULL; +struct sljit_jump *next_alt = NULL; struct sljit_jump *accept_exit = NULL; struct sljit_label *quit; +struct sljit_put_label *put_label; /* Recurse captures then. */ common->then_trap = NULL; @@ -13284,7 +12933,12 @@ while (1) OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), common->recursive_head_ptr); if (alt_max > 1 || has_accept) - OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, alt_count); + { + if (alt_max > 3) + put_label = sljit_emit_put_label(compiler, SLJIT_MEM1(STACK_TOP), STACK(1)); + else + OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, alt_count); + } add_jump(compiler, &match, JUMP(SLJIT_JUMP)); @@ -13298,7 +12952,7 @@ while (1) sljit_emit_fast_enter(compiler, TMP1, 0); if (has_accept) - accept_exit = CMP(SLJIT_EQUAL, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, alt_max * sizeof (sljit_sw)); + accept_exit = CMP(SLJIT_EQUAL, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, -1); OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(0)); /* Save return address. */ @@ -13311,44 +12965,30 @@ while (1) OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(1)); free_stack(common, 2); - if (alt_max > 4) + if (alt_max > 3) { - /* Table jump if alt_max is greater than 4. */ - next_update_addr = allocate_read_only_data(common, alt_max * sizeof(sljit_uw)); - if (SLJIT_UNLIKELY(next_update_addr == NULL)) - return; - sljit_emit_ijump(compiler, SLJIT_JUMP, SLJIT_MEM1(TMP1), (sljit_sw)next_update_addr); - add_label_addr(common, next_update_addr++); + sljit_emit_ijump(compiler, SLJIT_JUMP, TMP1, 0); + sljit_set_put_label(put_label, LABEL()); } else - { - if (alt_max == 4) - alt2 = CMP(SLJIT_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, 2 * sizeof(sljit_uw)); - alt1 = CMP(SLJIT_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, sizeof(sljit_uw)); - } + next_alt = CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, 0); } else free_stack(common, has_accept ? 2 : 1); } - else if (alt_max > 4) - add_label_addr(common, next_update_addr++); + else if (alt_max > 3) + sljit_set_put_label(put_label, LABEL()); else { - if (alt_count != 2 * sizeof(sljit_uw)) + JUMPHERE(next_alt); + if (alt_count + 1 < alt_max) { - JUMPHERE(alt1); - if (alt_max == 3 && alt_count == sizeof(sljit_uw)) - alt2 = CMP(SLJIT_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, 2 * sizeof(sljit_uw)); - } - else - { - JUMPHERE(alt2); - if (alt_max == 4) - alt1 = CMP(SLJIT_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, 3 * sizeof(sljit_uw)); + SLJIT_ASSERT(alt_count == 1 && alt_max == 3); + next_alt = CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, 1); } } - alt_count += sizeof(sljit_uw); + alt_count++; compile_backtrackingpath(common, altbacktrack.top); if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler))) @@ -13409,7 +13049,7 @@ if (common->accept != NULL) OP1(SLJIT_MOV, TMP2, 0, STACK_TOP, 0); allocate_stack(common, 2); - OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, alt_count); + OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, -1); } set_jumps(match, LABEL()); @@ -13444,7 +13084,6 @@ executable_functions *functions; void *executable_func; sljit_uw executable_size; sljit_uw total_length; -label_addr_list *label_addr; struct sljit_label *mainloop_label = NULL; struct sljit_label *continue_match_label; struct sljit_label *empty_match_found_label = NULL; @@ -13459,6 +13098,14 @@ struct sljit_jump *end_anchor_failed = NULL; SLJIT_ASSERT(tables); +#if HAS_VIRTUAL_REGISTERS == 1 +SLJIT_ASSERT(sljit_get_register_index(TMP3) < 0 && sljit_get_register_index(ARGUMENTS) < 0 && sljit_get_register_index(RETURN_ADDR) < 0); +#elif HAS_VIRTUAL_REGISTERS == 0 +SLJIT_ASSERT(sljit_get_register_index(TMP3) >= 0 && sljit_get_register_index(ARGUMENTS) >= 0 && sljit_get_register_index(RETURN_ADDR) >= 0); +#else +#error "Invalid value for HAS_VIRTUAL_REGISTERS" +#endif + memset(&rootbacktrack, 0, sizeof(backtrack_common)); memset(common, 0, sizeof(compiler_common)); common->re = re; @@ -13476,6 +13123,7 @@ common->fcc = tables + fcc_offset; common->lcc = (sljit_sw)(tables + lcc_offset); common->mode = mode; common->might_be_empty = re->minlength == 0; +common->allow_empty_partial = (re->max_lookbehind > 0) || (re->flags & PCRE2_MATCH_EMPTY) != 0; common->nltype = NLTYPE_FIXED; switch(re->newline_convention) { @@ -14028,13 +13676,8 @@ SLJIT_FREE(common->private_data_ptrs, allocator_data); executable_func = sljit_generate_code(compiler); executable_size = sljit_get_generated_code_size(compiler); -label_addr = common->label_addrs; -while (label_addr != NULL) - { - *label_addr->update_addr = sljit_get_label_addr(label_addr->label); - label_addr = label_addr->next; - } sljit_free_compiler(compiler); + if (executable_func == NULL) { PRIV(jit_free_rodata)(common->read_only_data_head, allocator_data); @@ -14097,18 +13740,12 @@ Returns: 0: success or (*NOJIT) was used PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION pcre2_jit_compile(pcre2_code *code, uint32_t options) { -#ifndef SUPPORT_JIT - -(void)code; -(void)options; -return PCRE2_ERROR_JIT_BADOPTION; - -#else /* SUPPORT_JIT */ - pcre2_real_code *re = (pcre2_real_code *)code; -executable_functions *functions; -uint32_t excluded_options; -int result; + +#ifdef SUPPORT_JIT +executable_functions *functions = (executable_functions *)re->executable_jit; +static int executable_allocator_is_working = 0; +#endif if (code == NULL) return PCRE2_ERROR_NULL; @@ -14116,30 +13753,98 @@ if (code == NULL) if ((options & ~PUBLIC_JIT_COMPILE_OPTIONS) != 0) return PCRE2_ERROR_JIT_BADOPTION; +/* Support for invalid UTF was first introduced in JIT, with the option +PCRE2_JIT_INVALID_UTF. Later, support was added to the interpreter, and the +compile-time option PCRE2_MATCH_INVALID_UTF was created. This is now the +preferred feature, with the earlier option deprecated. However, for backward +compatibility, if the earlier option is set, it forces the new option so that +if JIT matching falls back to the interpreter, there is still support for +invalid UTF. However, if this function has already been successfully called +without PCRE2_JIT_INVALID_UTF and without PCRE2_MATCH_INVALID_UTF (meaning that +non-invalid-supporting JIT code was compiled), give an error. + +If in the future support for PCRE2_JIT_INVALID_UTF is withdrawn, the following +actions are needed: + + 1. Remove the definition from pcre2.h.in and from the list in + PUBLIC_JIT_COMPILE_OPTIONS above. + + 2. Replace PCRE2_JIT_INVALID_UTF with a local flag in this module. + + 3. Replace PCRE2_JIT_INVALID_UTF in pcre2_jit_test.c. + + 4. Delete the following short block of code. The setting of "re" and + "functions" can be moved into the JIT-only block below, but if that is + done, (void)re and (void)functions will be needed in the non-JIT case, to + avoid compiler warnings. +*/ + +if ((options & PCRE2_JIT_INVALID_UTF) != 0) + { + if ((re->overall_options & PCRE2_MATCH_INVALID_UTF) == 0) + { +#ifdef SUPPORT_JIT + if (functions != NULL) return PCRE2_ERROR_JIT_BADOPTION; +#endif + re->overall_options |= PCRE2_MATCH_INVALID_UTF; + } + } + +/* The above tests are run with and without JIT support. This means that +PCRE2_JIT_INVALID_UTF propagates back into the regex options (ensuring +interpreter support) even in the absence of JIT. But now, if there is no JIT +support, give an error return. */ + +#ifndef SUPPORT_JIT +return PCRE2_ERROR_JIT_BADOPTION; +#else /* SUPPORT_JIT */ + +/* There is JIT support. Do the necessary. */ + if ((re->flags & PCRE2_NOJIT) != 0) return 0; -functions = (executable_functions *)re->executable_jit; +if (executable_allocator_is_working == 0) + { + /* Checks whether the executable allocator is working. This check + might run multiple times in multi-threaded environments, but the + result should not be affected by it. */ + void *ptr = SLJIT_MALLOC_EXEC(32); + + executable_allocator_is_working = -1; + + if (ptr != NULL) + { + SLJIT_FREE_EXEC(((sljit_u8*)(ptr)) + SLJIT_EXEC_OFFSET(ptr)); + executable_allocator_is_working = 1; + } + } + +if (executable_allocator_is_working < 0) + return PCRE2_ERROR_NOMEMORY; + +if ((re->overall_options & PCRE2_MATCH_INVALID_UTF) != 0) + options |= PCRE2_JIT_INVALID_UTF; if ((options & PCRE2_JIT_COMPLETE) != 0 && (functions == NULL || functions->executable_funcs[0] == NULL)) { - excluded_options = (PCRE2_JIT_PARTIAL_SOFT | PCRE2_JIT_PARTIAL_HARD); - result = jit_compile(code, options & ~excluded_options); + uint32_t excluded_options = (PCRE2_JIT_PARTIAL_SOFT | PCRE2_JIT_PARTIAL_HARD); + int result = jit_compile(code, options & ~excluded_options); if (result != 0) return result; } if ((options & PCRE2_JIT_PARTIAL_SOFT) != 0 && (functions == NULL || functions->executable_funcs[1] == NULL)) { - excluded_options = (PCRE2_JIT_COMPLETE | PCRE2_JIT_PARTIAL_HARD); - result = jit_compile(code, options & ~excluded_options); + uint32_t excluded_options = (PCRE2_JIT_COMPLETE | PCRE2_JIT_PARTIAL_HARD); + int result = jit_compile(code, options & ~excluded_options); if (result != 0) return result; } if ((options & PCRE2_JIT_PARTIAL_HARD) != 0 && (functions == NULL || functions->executable_funcs[2] == NULL)) { - excluded_options = (PCRE2_JIT_COMPLETE | PCRE2_JIT_PARTIAL_SOFT); - result = jit_compile(code, options & ~excluded_options); + uint32_t excluded_options = (PCRE2_JIT_COMPLETE | PCRE2_JIT_PARTIAL_SOFT); + int result = jit_compile(code, options & ~excluded_options); if (result != 0) return result; } diff --git a/ext/pcre/pcre2lib/pcre2_jit_match.c b/ext/pcre/pcre2lib/pcre2_jit_match.c index eee038644dd0d..7e13b8cfeedca 100644 --- a/ext/pcre/pcre2lib/pcre2_jit_match.c +++ b/ext/pcre/pcre2lib/pcre2_jit_match.c @@ -74,7 +74,6 @@ return executable_func(arguments); options option bits match_data points to a match_data block mcontext points to a match context - jit_stack points to a JIT stack Returns: > 0 => success; value is the number of ovector pairs filled = 0 => success, but ovector is not big enough diff --git a/ext/pcre/pcre2lib/pcre2_jit_neon_inc.h b/ext/pcre/pcre2lib/pcre2_jit_neon_inc.h new file mode 100644 index 0000000000000..0265f36a0b309 --- /dev/null +++ b/ext/pcre/pcre2lib/pcre2_jit_neon_inc.h @@ -0,0 +1,343 @@ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + This module by Zoltan Herczeg and Sebastian Pop + Original API code Copyright (c) 1997-2012 University of Cambridge + New API code Copyright (c) 2016-2019 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR 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. +----------------------------------------------------------------------------- +*/ + +# if defined(FFCS) +# if defined(FF_UTF) +# define FF_FUN ffcs_utf +# else +# define FF_FUN ffcs +# endif + +# elif defined(FFCS_2) +# if defined(FF_UTF) +# define FF_FUN ffcs_2_utf +# else +# define FF_FUN ffcs_2 +# endif + +# elif defined(FFCS_MASK) +# if defined(FF_UTF) +# define FF_FUN ffcs_mask_utf +# else +# define FF_FUN ffcs_mask +# endif + +# elif defined(FFCPS_0) +# if defined (FF_UTF) +# define FF_FUN ffcps_0_utf +# else +# define FF_FUN ffcps_0 +# endif + +# elif defined (FFCPS_1) +# if defined (FF_UTF) +# define FF_FUN ffcps_1_utf +# else +# define FF_FUN ffcps_1 +# endif + +# elif defined (FFCPS_DEFAULT) +# if defined (FF_UTF) +# define FF_FUN ffcps_default_utf +# else +# define FF_FUN ffcps_default +# endif +# endif + +static sljit_u8* SLJIT_FUNC FF_FUN(sljit_u8 *str_end, sljit_u8 *str_ptr, sljit_uw offs1, sljit_uw offs2, sljit_uw chars) +#undef FF_FUN +{ +quad_word qw; +int_char ic; +ic.x = chars; + +#if defined(FFCS) +sljit_u8 c1 = ic.c.c1; +vect_t vc1 = VDUPQ(c1); + +#elif defined(FFCS_2) +sljit_u8 c1 = ic.c.c1; +vect_t vc1 = VDUPQ(c1); +sljit_u8 c2 = ic.c.c2; +vect_t vc2 = VDUPQ(c2); + +#elif defined(FFCS_MASK) +sljit_u8 c1 = ic.c.c1; +vect_t vc1 = VDUPQ(c1); +sljit_u8 mask = ic.c.c2; +vect_t vmask = VDUPQ(mask); +#endif + +#if defined(FFCPS) +compare_type compare1_type = compare_match1; +compare_type compare2_type = compare_match1; +vect_t cmp1a, cmp1b, cmp2a, cmp2b; +const sljit_u32 diff = IN_UCHARS(offs1 - offs2); +PCRE2_UCHAR char1a = ic.c.c1; +PCRE2_UCHAR char2a = ic.c.c3; + +# ifdef FFCPS_CHAR1A2A +cmp1a = VDUPQ(char1a); +cmp2a = VDUPQ(char2a); +cmp1b = VDUPQ(0); /* to avoid errors on older compilers -Werror=maybe-uninitialized */ +cmp2b = VDUPQ(0); /* to avoid errors on older compilers -Werror=maybe-uninitialized */ +# else +PCRE2_UCHAR char1b = ic.c.c2; +PCRE2_UCHAR char2b = ic.c.c4; +if (char1a == char1b) + { + cmp1a = VDUPQ(char1a); + cmp1b = VDUPQ(0); /* to avoid errors on older compilers -Werror=maybe-uninitialized */ + } +else + { + sljit_u32 bit1 = char1a ^ char1b; + if (is_powerof2(bit1)) + { + compare1_type = compare_match1i; + cmp1a = VDUPQ(char1a | bit1); + cmp1b = VDUPQ(bit1); + } + else + { + compare1_type = compare_match2; + cmp1a = VDUPQ(char1a); + cmp1b = VDUPQ(char1b); + } + } + +if (char2a == char2b) + { + cmp2a = VDUPQ(char2a); + cmp2b = VDUPQ(0); /* to avoid errors on older compilers -Werror=maybe-uninitialized */ + } +else + { + sljit_u32 bit2 = char2a ^ char2b; + if (is_powerof2(bit2)) + { + compare2_type = compare_match1i; + cmp2a = VDUPQ(char2a | bit2); + cmp2b = VDUPQ(bit2); + } + else + { + compare2_type = compare_match2; + cmp2a = VDUPQ(char2a); + cmp2b = VDUPQ(char2b); + } + } +# endif + +str_ptr += IN_UCHARS(offs1); +#endif + +#if PCRE2_CODE_UNIT_WIDTH != 8 +vect_t char_mask = VDUPQ(0xff); +#endif + +#if defined(FF_UTF) +restart:; +#endif + +#if defined(FFCPS) +sljit_u8 *p1 = str_ptr - diff; +#endif +sljit_s32 align_offset = ((uint64_t)str_ptr & 0xf); +str_ptr = (sljit_u8 *) ((uint64_t)str_ptr & ~0xf); +vect_t data = VLD1Q(str_ptr); +#if PCRE2_CODE_UNIT_WIDTH != 8 +data = VANDQ(data, char_mask); +#endif + +#if defined(FFCS) +vect_t eq = VCEQQ(data, vc1); + +#elif defined(FFCS_2) +vect_t eq1 = VCEQQ(data, vc1); +vect_t eq2 = VCEQQ(data, vc2); +vect_t eq = VORRQ(eq1, eq2); + +#elif defined(FFCS_MASK) +vect_t eq = VORRQ(data, vmask); +eq = VCEQQ(eq, vc1); + +#elif defined(FFCPS) +# if defined(FFCPS_DIFF1) +vect_t prev_data = data; +# endif + +vect_t data2; +if (p1 < str_ptr) + { + data2 = VLD1Q(str_ptr - diff); +#if PCRE2_CODE_UNIT_WIDTH != 8 + data2 = VANDQ(data2, char_mask); +#endif + } +else + data2 = shift_left_n_lanes(data, offs1 - offs2); + +if (compare1_type == compare_match1) + data = VCEQQ(data, cmp1a); +else + data = fast_forward_char_pair_compare(compare1_type, data, cmp1a, cmp1b); + +if (compare2_type == compare_match1) + data2 = VCEQQ(data2, cmp2a); +else + data2 = fast_forward_char_pair_compare(compare2_type, data2, cmp2a, cmp2b); + +vect_t eq = VANDQ(data, data2); +#endif + +VST1Q(qw.mem, eq); +/* Ignore matches before the first STR_PTR. */ +if (align_offset < 8) + { + qw.dw[0] >>= align_offset * 8; + if (qw.dw[0]) + { + str_ptr += align_offset + __builtin_ctzll(qw.dw[0]) / 8; + goto match; + } + if (qw.dw[1]) + { + str_ptr += 8 + __builtin_ctzll(qw.dw[1]) / 8; + goto match; + } + } +else + { + qw.dw[1] >>= (align_offset - 8) * 8; + if (qw.dw[1]) + { + str_ptr += align_offset + __builtin_ctzll(qw.dw[1]) / 8; + goto match; + } + } +str_ptr += 16; + +while (str_ptr < str_end) + { + vect_t orig_data = VLD1Q(str_ptr); +#if PCRE2_CODE_UNIT_WIDTH != 8 + orig_data = VANDQ(orig_data, char_mask); +#endif + data = orig_data; + +#if defined(FFCS) + eq = VCEQQ(data, vc1); + +#elif defined(FFCS_2) + eq1 = VCEQQ(data, vc1); + eq2 = VCEQQ(data, vc2); + eq = VORRQ(eq1, eq2); + +#elif defined(FFCS_MASK) + eq = VORRQ(data, vmask); + eq = VCEQQ(eq, vc1); +#endif + +#if defined(FFCPS) +# if defined (FFCPS_DIFF1) + data2 = VEXTQ(prev_data, data, VECTOR_FACTOR - 1); +# else + data2 = VLD1Q(str_ptr - diff); +# if PCRE2_CODE_UNIT_WIDTH != 8 + data2 = VANDQ(data2, char_mask); +# endif +# endif + +# ifdef FFCPS_CHAR1A2A + data = VCEQQ(data, cmp1a); + data2 = VCEQQ(data2, cmp2a); +# else + if (compare1_type == compare_match1) + data = VCEQQ(data, cmp1a); + else + data = fast_forward_char_pair_compare(compare1_type, data, cmp1a, cmp1b); + if (compare2_type == compare_match1) + data2 = VCEQQ(data2, cmp2a); + else + data2 = fast_forward_char_pair_compare(compare2_type, data2, cmp2a, cmp2b); +# endif + + eq = VANDQ(data, data2); +#endif + + VST1Q(qw.mem, eq); + if (qw.dw[0]) + str_ptr += __builtin_ctzll(qw.dw[0]) / 8; + else if (qw.dw[1]) + str_ptr += 8 + __builtin_ctzll(qw.dw[1]) / 8; + else { + str_ptr += 16; +#if defined (FFCPS_DIFF1) + prev_data = orig_data; +#endif + continue; + } + +match:; + if (str_ptr >= str_end) + /* Failed match. */ + return NULL; + +#if defined(FF_UTF) + if (utf_continue(str_ptr + IN_UCHARS(-offs1))) + { + /* Not a match. */ + str_ptr += IN_UCHARS(1); + goto restart; + } +#endif + + /* Match. */ +#if defined (FFCPS) + str_ptr -= IN_UCHARS(offs1); +#endif + return str_ptr; + } + +/* Failed match. */ +return NULL; +} diff --git a/ext/pcre/pcre2lib/pcre2_jit_simd_inc.h b/ext/pcre/pcre2lib/pcre2_jit_simd_inc.h new file mode 100644 index 0000000000000..f7d56b29f8d07 --- /dev/null +++ b/ext/pcre/pcre2lib/pcre2_jit_simd_inc.h @@ -0,0 +1,993 @@ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + This module by Zoltan Herczeg + Original API code Copyright (c) 1997-2012 University of Cambridge + New API code Copyright (c) 2016-2019 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR 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. +----------------------------------------------------------------------------- +*/ + +#if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86) && !(defined SUPPORT_VALGRIND) + +#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 +static struct sljit_jump *jump_if_utf_char_start(struct sljit_compiler *compiler, sljit_s32 reg) +{ +#if PCRE2_CODE_UNIT_WIDTH == 8 +OP2(SLJIT_AND, reg, 0, reg, 0, SLJIT_IMM, 0xc0); +return CMP(SLJIT_NOT_EQUAL, reg, 0, SLJIT_IMM, 0x80); +#elif PCRE2_CODE_UNIT_WIDTH == 16 +OP2(SLJIT_AND, reg, 0, reg, 0, SLJIT_IMM, 0xfc00); +return CMP(SLJIT_NOT_EQUAL, reg, 0, SLJIT_IMM, 0xdc00); +#else +#error "Unknown code width" +#endif +} +#endif + +static sljit_s32 character_to_int32(PCRE2_UCHAR chr) +{ +sljit_u32 value = chr; +#if PCRE2_CODE_UNIT_WIDTH == 8 +#define SSE2_COMPARE_TYPE_INDEX 0 +return (sljit_s32)((value << 24) | (value << 16) | (value << 8) | value); +#elif PCRE2_CODE_UNIT_WIDTH == 16 +#define SSE2_COMPARE_TYPE_INDEX 1 +return (sljit_s32)((value << 16) | value); +#elif PCRE2_CODE_UNIT_WIDTH == 32 +#define SSE2_COMPARE_TYPE_INDEX 2 +return (sljit_s32)(value); +#else +#error "Unsupported unit width" +#endif +} + +static void load_from_mem_sse2(struct sljit_compiler *compiler, sljit_s32 dst_xmm_reg, sljit_s32 src_general_reg, sljit_s8 offset) +{ +sljit_u8 instruction[5]; + +SLJIT_ASSERT(dst_xmm_reg < 8); +SLJIT_ASSERT(src_general_reg < 8); + +/* MOVDQA xmm1, xmm2/m128 */ +instruction[0] = ((sljit_u8)offset & 0xf) == 0 ? 0x66 : 0xf3; +instruction[1] = 0x0f; +instruction[2] = 0x6f; + +if (offset == 0) + { + instruction[3] = (dst_xmm_reg << 3) | src_general_reg; + sljit_emit_op_custom(compiler, instruction, 4); + return; + } + +instruction[3] = 0x40 | (dst_xmm_reg << 3) | src_general_reg; +instruction[4] = (sljit_u8)offset; +sljit_emit_op_custom(compiler, instruction, 5); +} + +typedef enum { + sse2_compare_match1, + sse2_compare_match1i, + sse2_compare_match2, +} sse2_compare_type; + +static void fast_forward_char_pair_sse2_compare(struct sljit_compiler *compiler, sse2_compare_type compare_type, + int step, sljit_s32 dst_ind, sljit_s32 cmp1_ind, sljit_s32 cmp2_ind, sljit_s32 tmp_ind) +{ +sljit_u8 instruction[4]; +instruction[0] = 0x66; +instruction[1] = 0x0f; + +SLJIT_ASSERT(step >= 0 && step <= 3); + +if (compare_type != sse2_compare_match2) + { + if (step == 0) + { + if (compare_type == sse2_compare_match1i) + { + /* POR xmm1, xmm2/m128 */ + /* instruction[0] = 0x66; */ + /* instruction[1] = 0x0f; */ + instruction[2] = 0xeb; + instruction[3] = 0xc0 | (dst_ind << 3) | cmp2_ind; + sljit_emit_op_custom(compiler, instruction, 4); + } + return; + } + + if (step != 2) + return; + + /* PCMPEQB/W/D xmm1, xmm2/m128 */ + /* instruction[0] = 0x66; */ + /* instruction[1] = 0x0f; */ + instruction[2] = 0x74 + SSE2_COMPARE_TYPE_INDEX; + instruction[3] = 0xc0 | (dst_ind << 3) | cmp1_ind; + sljit_emit_op_custom(compiler, instruction, 4); + return; + } + +switch (step) + { + case 0: + /* MOVDQA xmm1, xmm2/m128 */ + /* instruction[0] = 0x66; */ + /* instruction[1] = 0x0f; */ + instruction[2] = 0x6f; + instruction[3] = 0xc0 | (tmp_ind << 3) | dst_ind; + sljit_emit_op_custom(compiler, instruction, 4); + return; + + case 1: + /* PCMPEQB/W/D xmm1, xmm2/m128 */ + /* instruction[0] = 0x66; */ + /* instruction[1] = 0x0f; */ + instruction[2] = 0x74 + SSE2_COMPARE_TYPE_INDEX; + instruction[3] = 0xc0 | (dst_ind << 3) | cmp1_ind; + sljit_emit_op_custom(compiler, instruction, 4); + return; + + case 2: + /* PCMPEQB/W/D xmm1, xmm2/m128 */ + /* instruction[0] = 0x66; */ + /* instruction[1] = 0x0f; */ + instruction[2] = 0x74 + SSE2_COMPARE_TYPE_INDEX; + instruction[3] = 0xc0 | (tmp_ind << 3) | cmp2_ind; + sljit_emit_op_custom(compiler, instruction, 4); + return; + + case 3: + /* POR xmm1, xmm2/m128 */ + /* instruction[0] = 0x66; */ + /* instruction[1] = 0x0f; */ + instruction[2] = 0xeb; + instruction[3] = 0xc0 | (dst_ind << 3) | tmp_ind; + sljit_emit_op_custom(compiler, instruction, 4); + return; + } +} + +#define JIT_HAS_FAST_FORWARD_CHAR_SIMD (sljit_has_cpu_feature(SLJIT_HAS_SSE2)) + +static void fast_forward_char_simd(compiler_common *common, PCRE2_UCHAR char1, PCRE2_UCHAR char2, sljit_s32 offset) +{ +DEFINE_COMPILER; +struct sljit_label *start; +#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 +struct sljit_label *restart; +#endif +struct sljit_jump *quit; +struct sljit_jump *partial_quit[2]; +sse2_compare_type compare_type = sse2_compare_match1; +sljit_u8 instruction[8]; +sljit_s32 tmp1_reg_ind = sljit_get_register_index(TMP1); +sljit_s32 str_ptr_reg_ind = sljit_get_register_index(STR_PTR); +sljit_s32 data_ind = 0; +sljit_s32 tmp_ind = 1; +sljit_s32 cmp1_ind = 2; +sljit_s32 cmp2_ind = 3; +sljit_u32 bit = 0; +int i; + +SLJIT_UNUSED_ARG(offset); + +if (char1 != char2) + { + bit = char1 ^ char2; + compare_type = sse2_compare_match1i; + + if (!is_powerof2(bit)) + { + bit = 0; + compare_type = sse2_compare_match2; + } + } + +partial_quit[0] = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0); +if (common->mode == PCRE2_JIT_COMPLETE) + add_jump(compiler, &common->failed_match, partial_quit[0]); + +/* First part (unaligned start) */ + +OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, character_to_int32(char1 | bit)); + +SLJIT_ASSERT(tmp1_reg_ind < 8); + +/* MOVD xmm, r/m32 */ +instruction[0] = 0x66; +instruction[1] = 0x0f; +instruction[2] = 0x6e; +instruction[3] = 0xc0 | (cmp1_ind << 3) | tmp1_reg_ind; +sljit_emit_op_custom(compiler, instruction, 4); + +if (char1 != char2) + { + OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, character_to_int32(bit != 0 ? bit : char2)); + + /* MOVD xmm, r/m32 */ + instruction[3] = 0xc0 | (cmp2_ind << 3) | tmp1_reg_ind; + sljit_emit_op_custom(compiler, instruction, 4); + } + +OP1(SLJIT_MOV, TMP2, 0, STR_PTR, 0); + +/* PSHUFD xmm1, xmm2/m128, imm8 */ +/* instruction[0] = 0x66; */ +/* instruction[1] = 0x0f; */ +instruction[2] = 0x70; +instruction[3] = 0xc0 | (cmp1_ind << 3) | cmp1_ind; +instruction[4] = 0; +sljit_emit_op_custom(compiler, instruction, 5); + +if (char1 != char2) + { + /* PSHUFD xmm1, xmm2/m128, imm8 */ + instruction[3] = 0xc0 | (cmp2_ind << 3) | cmp2_ind; + sljit_emit_op_custom(compiler, instruction, 5); + } + +#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 +restart = LABEL(); +#endif +OP2(SLJIT_AND, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, ~0xf); +OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0xf); + +load_from_mem_sse2(compiler, data_ind, str_ptr_reg_ind, 0); +for (i = 0; i < 4; i++) + fast_forward_char_pair_sse2_compare(compiler, compare_type, i, data_ind, cmp1_ind, cmp2_ind, tmp_ind); + +/* PMOVMSKB reg, xmm */ +/* instruction[0] = 0x66; */ +/* instruction[1] = 0x0f; */ +instruction[2] = 0xd7; +instruction[3] = 0xc0 | (tmp1_reg_ind << 3) | data_ind; +sljit_emit_op_custom(compiler, instruction, 4); + +OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP2, 0); +OP2(SLJIT_LSHR, TMP1, 0, TMP1, 0, TMP2, 0); + +quit = CMP(SLJIT_NOT_ZERO, TMP1, 0, SLJIT_IMM, 0); + +OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, TMP2, 0); + +/* Second part (aligned) */ +start = LABEL(); + +OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, 16); + +partial_quit[1] = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0); +if (common->mode == PCRE2_JIT_COMPLETE) + add_jump(compiler, &common->failed_match, partial_quit[1]); + +load_from_mem_sse2(compiler, data_ind, str_ptr_reg_ind, 0); +for (i = 0; i < 4; i++) + fast_forward_char_pair_sse2_compare(compiler, compare_type, i, data_ind, cmp1_ind, cmp2_ind, tmp_ind); + +/* PMOVMSKB reg, xmm */ +/* instruction[0] = 0x66; */ +/* instruction[1] = 0x0f; */ +instruction[2] = 0xd7; +instruction[3] = 0xc0 | (tmp1_reg_ind << 3) | data_ind; +sljit_emit_op_custom(compiler, instruction, 4); + +CMPTO(SLJIT_ZERO, TMP1, 0, SLJIT_IMM, 0, start); + +JUMPHERE(quit); + +/* BSF r32, r/m32 */ +instruction[0] = 0x0f; +instruction[1] = 0xbc; +instruction[2] = 0xc0 | (tmp1_reg_ind << 3) | tmp1_reg_ind; +sljit_emit_op_custom(compiler, instruction, 3); + +OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0); + +if (common->mode != PCRE2_JIT_COMPLETE) + { + JUMPHERE(partial_quit[0]); + JUMPHERE(partial_quit[1]); + OP2(SLJIT_SUB | SLJIT_SET_GREATER, SLJIT_UNUSED, 0, STR_PTR, 0, STR_END, 0); + CMOV(SLJIT_GREATER, STR_PTR, STR_END, 0); + } +else + add_jump(compiler, &common->failed_match, CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0)); + +#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 +if (common->utf && offset > 0) + { + SLJIT_ASSERT(common->mode == PCRE2_JIT_COMPLETE); + + OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-offset)); + + quit = jump_if_utf_char_start(compiler, TMP1); + + OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); + add_jump(compiler, &common->failed_match, CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0)); + OP1(SLJIT_MOV, TMP2, 0, STR_PTR, 0); + JUMPTO(SLJIT_JUMP, restart); + + JUMPHERE(quit); + } +#endif +} + +#ifndef _WIN64 + +static SLJIT_INLINE sljit_u32 max_fast_forward_char_pair_offset(void) +{ +#if PCRE2_CODE_UNIT_WIDTH == 8 +return 15; +#elif PCRE2_CODE_UNIT_WIDTH == 16 +return 7; +#elif PCRE2_CODE_UNIT_WIDTH == 32 +return 3; +#else +#error "Unsupported unit width" +#endif +} + +#define JIT_HAS_FAST_FORWARD_CHAR_PAIR_SIMD (sljit_has_cpu_feature(SLJIT_HAS_SSE2)) + +static void fast_forward_char_pair_simd(compiler_common *common, sljit_s32 offs1, + PCRE2_UCHAR char1a, PCRE2_UCHAR char1b, sljit_s32 offs2, PCRE2_UCHAR char2a, PCRE2_UCHAR char2b) +{ +DEFINE_COMPILER; +sse2_compare_type compare1_type = sse2_compare_match1; +sse2_compare_type compare2_type = sse2_compare_match1; +sljit_u32 bit1 = 0; +sljit_u32 bit2 = 0; +sljit_u32 diff = IN_UCHARS(offs1 - offs2); +sljit_s32 tmp1_reg_ind = sljit_get_register_index(TMP1); +sljit_s32 tmp2_reg_ind = sljit_get_register_index(TMP2); +sljit_s32 str_ptr_reg_ind = sljit_get_register_index(STR_PTR); +sljit_s32 data1_ind = 0; +sljit_s32 data2_ind = 1; +sljit_s32 tmp1_ind = 2; +sljit_s32 tmp2_ind = 3; +sljit_s32 cmp1a_ind = 4; +sljit_s32 cmp1b_ind = 5; +sljit_s32 cmp2a_ind = 6; +sljit_s32 cmp2b_ind = 7; +struct sljit_label *start; +#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 +struct sljit_label *restart; +#endif +struct sljit_jump *jump[2]; +sljit_u8 instruction[8]; +int i; + +SLJIT_ASSERT(common->mode == PCRE2_JIT_COMPLETE && offs1 > offs2); +SLJIT_ASSERT(diff <= IN_UCHARS(max_fast_forward_char_pair_offset())); +SLJIT_ASSERT(tmp1_reg_ind < 8 && tmp2_reg_ind == 1); + +/* Initialize. */ +if (common->match_end_ptr != 0) + { + OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr); + OP1(SLJIT_MOV, TMP3, 0, STR_END, 0); + OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(offs1 + 1)); + + OP2(SLJIT_SUB | SLJIT_SET_LESS, SLJIT_UNUSED, 0, TMP1, 0, STR_END, 0); + CMOV(SLJIT_LESS, STR_END, TMP1, 0); + } + +OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(offs1)); +add_jump(compiler, &common->failed_match, CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0)); + +/* MOVD xmm, r/m32 */ +instruction[0] = 0x66; +instruction[1] = 0x0f; +instruction[2] = 0x6e; + +if (char1a == char1b) + OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, character_to_int32(char1a)); +else + { + bit1 = char1a ^ char1b; + if (is_powerof2(bit1)) + { + compare1_type = sse2_compare_match1i; + OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, character_to_int32(char1a | bit1)); + OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, character_to_int32(bit1)); + } + else + { + compare1_type = sse2_compare_match2; + bit1 = 0; + OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, character_to_int32(char1a)); + OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, character_to_int32(char1b)); + } + } + +instruction[3] = 0xc0 | (cmp1a_ind << 3) | tmp1_reg_ind; +sljit_emit_op_custom(compiler, instruction, 4); + +if (char1a != char1b) + { + instruction[3] = 0xc0 | (cmp1b_ind << 3) | tmp2_reg_ind; + sljit_emit_op_custom(compiler, instruction, 4); + } + +if (char2a == char2b) + OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, character_to_int32(char2a)); +else + { + bit2 = char2a ^ char2b; + if (is_powerof2(bit2)) + { + compare2_type = sse2_compare_match1i; + OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, character_to_int32(char2a | bit2)); + OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, character_to_int32(bit2)); + } + else + { + compare2_type = sse2_compare_match2; + bit2 = 0; + OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, character_to_int32(char2a)); + OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, character_to_int32(char2b)); + } + } + +instruction[3] = 0xc0 | (cmp2a_ind << 3) | tmp1_reg_ind; +sljit_emit_op_custom(compiler, instruction, 4); + +if (char2a != char2b) + { + instruction[3] = 0xc0 | (cmp2b_ind << 3) | tmp2_reg_ind; + sljit_emit_op_custom(compiler, instruction, 4); + } + +/* PSHUFD xmm1, xmm2/m128, imm8 */ +/* instruction[0] = 0x66; */ +/* instruction[1] = 0x0f; */ +instruction[2] = 0x70; +instruction[4] = 0; + +instruction[3] = 0xc0 | (cmp1a_ind << 3) | cmp1a_ind; +sljit_emit_op_custom(compiler, instruction, 5); + +if (char1a != char1b) + { + instruction[3] = 0xc0 | (cmp1b_ind << 3) | cmp1b_ind; + sljit_emit_op_custom(compiler, instruction, 5); + } + +instruction[3] = 0xc0 | (cmp2a_ind << 3) | cmp2a_ind; +sljit_emit_op_custom(compiler, instruction, 5); + +if (char2a != char2b) + { + instruction[3] = 0xc0 | (cmp2b_ind << 3) | cmp2b_ind; + sljit_emit_op_custom(compiler, instruction, 5); + } + +#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 +restart = LABEL(); +#endif + +OP2(SLJIT_SUB, TMP1, 0, STR_PTR, 0, SLJIT_IMM, diff); +OP1(SLJIT_MOV, TMP2, 0, STR_PTR, 0); +OP2(SLJIT_AND, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, ~0xf); + +load_from_mem_sse2(compiler, data1_ind, str_ptr_reg_ind, 0); + +jump[0] = CMP(SLJIT_GREATER_EQUAL, TMP1, 0, STR_PTR, 0); + +load_from_mem_sse2(compiler, data2_ind, str_ptr_reg_ind, -(sljit_s8)diff); +jump[1] = JUMP(SLJIT_JUMP); + +JUMPHERE(jump[0]); + +/* MOVDQA xmm1, xmm2/m128 */ +/* instruction[0] = 0x66; */ +/* instruction[1] = 0x0f; */ +instruction[2] = 0x6f; +instruction[3] = 0xc0 | (data2_ind << 3) | data1_ind; +sljit_emit_op_custom(compiler, instruction, 4); + +/* PSLLDQ xmm1, imm8 */ +/* instruction[0] = 0x66; */ +/* instruction[1] = 0x0f; */ +instruction[2] = 0x73; +instruction[3] = 0xc0 | (7 << 3) | data2_ind; +instruction[4] = diff; +sljit_emit_op_custom(compiler, instruction, 5); + +JUMPHERE(jump[1]); + +OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0xf); + +for (i = 0; i < 4; i++) + { + fast_forward_char_pair_sse2_compare(compiler, compare2_type, i, data2_ind, cmp2a_ind, cmp2b_ind, tmp2_ind); + fast_forward_char_pair_sse2_compare(compiler, compare1_type, i, data1_ind, cmp1a_ind, cmp1b_ind, tmp1_ind); + } + +/* PAND xmm1, xmm2/m128 */ +/* instruction[0] = 0x66; */ +/* instruction[1] = 0x0f; */ +instruction[2] = 0xdb; +instruction[3] = 0xc0 | (data1_ind << 3) | data2_ind; +sljit_emit_op_custom(compiler, instruction, 4); + +/* PMOVMSKB reg, xmm */ +/* instruction[0] = 0x66; */ +/* instruction[1] = 0x0f; */ +instruction[2] = 0xd7; +instruction[3] = 0xc0 | (tmp1_reg_ind << 3) | 0; +sljit_emit_op_custom(compiler, instruction, 4); + +/* Ignore matches before the first STR_PTR. */ +OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP2, 0); +OP2(SLJIT_LSHR, TMP1, 0, TMP1, 0, TMP2, 0); + +jump[0] = CMP(SLJIT_NOT_ZERO, TMP1, 0, SLJIT_IMM, 0); + +OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, TMP2, 0); + +/* Main loop. */ +start = LABEL(); + +OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, 16); +add_jump(compiler, &common->failed_match, CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0)); + +load_from_mem_sse2(compiler, data1_ind, str_ptr_reg_ind, 0); +load_from_mem_sse2(compiler, data2_ind, str_ptr_reg_ind, -(sljit_s8)diff); + +for (i = 0; i < 4; i++) + { + fast_forward_char_pair_sse2_compare(compiler, compare1_type, i, data1_ind, cmp1a_ind, cmp1b_ind, tmp2_ind); + fast_forward_char_pair_sse2_compare(compiler, compare2_type, i, data2_ind, cmp2a_ind, cmp2b_ind, tmp1_ind); + } + +/* PAND xmm1, xmm2/m128 */ +/* instruction[0] = 0x66; */ +/* instruction[1] = 0x0f; */ +instruction[2] = 0xdb; +instruction[3] = 0xc0 | (data1_ind << 3) | data2_ind; +sljit_emit_op_custom(compiler, instruction, 4); + +/* PMOVMSKB reg, xmm */ +/* instruction[0] = 0x66; */ +/* instruction[1] = 0x0f; */ +instruction[2] = 0xd7; +instruction[3] = 0xc0 | (tmp1_reg_ind << 3) | 0; +sljit_emit_op_custom(compiler, instruction, 4); + +CMPTO(SLJIT_ZERO, TMP1, 0, SLJIT_IMM, 0, start); + +JUMPHERE(jump[0]); + +/* BSF r32, r/m32 */ +instruction[0] = 0x0f; +instruction[1] = 0xbc; +instruction[2] = 0xc0 | (tmp1_reg_ind << 3) | tmp1_reg_ind; +sljit_emit_op_custom(compiler, instruction, 3); + +OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0); + +add_jump(compiler, &common->failed_match, CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0)); + +if (common->match_end_ptr != 0) + OP1(SLJIT_MOV, STR_END, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr); + +#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 +if (common->utf) + { + OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-offs1)); + + jump[0] = jump_if_utf_char_start(compiler, TMP1); + + OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); + CMPTO(SLJIT_LESS, STR_PTR, 0, STR_END, 0, restart); + + add_jump(compiler, &common->failed_match, JUMP(SLJIT_JUMP)); + + JUMPHERE(jump[0]); + } +#endif + +OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(offs1)); + +if (common->match_end_ptr != 0) + OP1(SLJIT_MOV, STR_END, 0, TMP3, 0); +} + +#endif /* !_WIN64 */ + +#undef SSE2_COMPARE_TYPE_INDEX + +#endif /* SLJIT_CONFIG_X86 && !SUPPORT_VALGRIND */ + +#if (defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64 && (defined __ARM_NEON || defined __ARM_NEON__)) + +#include + +typedef union { + unsigned int x; + struct { unsigned char c1, c2, c3, c4; } c; +} int_char; + +#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 +static SLJIT_INLINE int utf_continue(sljit_u8 *s) +{ +#if PCRE2_CODE_UNIT_WIDTH == 8 +return (*s & 0xc0) == 0x80; +#elif PCRE2_CODE_UNIT_WIDTH == 16 +return (*s & 0xfc00) == 0xdc00; +#else +#error "Unknown code width" +#endif +} +#endif /* SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 */ + +#if PCRE2_CODE_UNIT_WIDTH == 8 +# define VECTOR_FACTOR 16 +# define vect_t uint8x16_t +# define VLD1Q(X) vld1q_u8((sljit_u8 *)(X)) +# define VCEQQ vceqq_u8 +# define VORRQ vorrq_u8 +# define VST1Q vst1q_u8 +# define VDUPQ vdupq_n_u8 +# define VEXTQ vextq_u8 +# define VANDQ vandq_u8 +typedef union { + uint8_t mem[16]; + uint64_t dw[2]; +} quad_word; +#elif PCRE2_CODE_UNIT_WIDTH == 16 +# define VECTOR_FACTOR 8 +# define vect_t uint16x8_t +# define VLD1Q(X) vld1q_u16((sljit_u16 *)(X)) +# define VCEQQ vceqq_u16 +# define VORRQ vorrq_u16 +# define VST1Q vst1q_u16 +# define VDUPQ vdupq_n_u16 +# define VEXTQ vextq_u16 +# define VANDQ vandq_u16 +typedef union { + uint16_t mem[8]; + uint64_t dw[2]; +} quad_word; +#else +# define VECTOR_FACTOR 4 +# define vect_t uint32x4_t +# define VLD1Q(X) vld1q_u32((sljit_u32 *)(X)) +# define VCEQQ vceqq_u32 +# define VORRQ vorrq_u32 +# define VST1Q vst1q_u32 +# define VDUPQ vdupq_n_u32 +# define VEXTQ vextq_u32 +# define VANDQ vandq_u32 +typedef union { + uint32_t mem[4]; + uint64_t dw[2]; +} quad_word; +#endif + +#define FFCS +#include "pcre2_jit_neon_inc.h" +#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 +# define FF_UTF +# include "pcre2_jit_neon_inc.h" +# undef FF_UTF +#endif +#undef FFCS + +#define FFCS_2 +#include "pcre2_jit_neon_inc.h" +#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 +# define FF_UTF +# include "pcre2_jit_neon_inc.h" +# undef FF_UTF +#endif +#undef FFCS_2 + +#define FFCS_MASK +#include "pcre2_jit_neon_inc.h" +#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 +# define FF_UTF +# include "pcre2_jit_neon_inc.h" +# undef FF_UTF +#endif +#undef FFCS_MASK + +#define JIT_HAS_FAST_FORWARD_CHAR_SIMD 1 + +static void fast_forward_char_simd(compiler_common *common, PCRE2_UCHAR char1, PCRE2_UCHAR char2, sljit_s32 offset) +{ +DEFINE_COMPILER; +int_char ic; +struct sljit_jump *partial_quit; +/* Save temporary registers. */ +OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS0, STR_PTR, 0); +OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS1, TMP3, 0); + +/* Prepare function arguments */ +OP1(SLJIT_MOV, SLJIT_R0, 0, STR_END, 0); +OP1(SLJIT_MOV, SLJIT_R1, 0, STR_PTR, 0); +OP1(SLJIT_MOV, SLJIT_R2, 0, SLJIT_IMM, offset); + +if (char1 == char2) + { + ic.c.c1 = char1; + ic.c.c2 = char2; + OP1(SLJIT_MOV, SLJIT_R4, 0, SLJIT_IMM, ic.x); + +#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 + if (common->utf && offset > 0) + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), + SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs_utf)); + else + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), + SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs)); +#else + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), + SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs)); +#endif + } +else + { + PCRE2_UCHAR mask = char1 ^ char2; + if (is_powerof2(mask)) + { + ic.c.c1 = char1 | mask; + ic.c.c2 = mask; + OP1(SLJIT_MOV, SLJIT_R4, 0, SLJIT_IMM, ic.x); + +#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 + if (common->utf && offset > 0) + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), + SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs_mask_utf)); + else + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), + SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs_mask)); +#else + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), + SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs_mask)); +#endif + } + else + { + ic.c.c1 = char1; + ic.c.c2 = char2; + OP1(SLJIT_MOV, SLJIT_R4, 0, SLJIT_IMM, ic.x); + +#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 + if (common->utf && offset > 0) + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), + SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs_2_utf)); + else + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), + SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs_2)); +#else + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), + SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs_2)); +#endif + } + } +/* Restore registers. */ +OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), LOCALS0); +OP1(SLJIT_MOV, TMP3, 0, SLJIT_MEM1(SLJIT_SP), LOCALS1); + +/* Check return value. */ +partial_quit = CMP(SLJIT_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0); +if (common->mode == PCRE2_JIT_COMPLETE) + add_jump(compiler, &common->failed_match, partial_quit); + +/* Fast forward STR_PTR to the result of memchr. */ +OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_RETURN_REG, 0); + +if (common->mode != PCRE2_JIT_COMPLETE) + JUMPHERE(partial_quit); +} + +typedef enum { + compare_match1, + compare_match1i, + compare_match2, +} compare_type; + +static inline vect_t fast_forward_char_pair_compare(compare_type ctype, vect_t dst, vect_t cmp1, vect_t cmp2) +{ +if (ctype == compare_match2) + { + vect_t tmp = dst; + dst = VCEQQ(dst, cmp1); + tmp = VCEQQ(tmp, cmp2); + dst = VORRQ(dst, tmp); + return dst; + } + +if (ctype == compare_match1i) + dst = VORRQ(dst, cmp2); +dst = VCEQQ(dst, cmp1); +return dst; +} + +static SLJIT_INLINE sljit_u32 max_fast_forward_char_pair_offset(void) +{ +#if PCRE2_CODE_UNIT_WIDTH == 8 +return 15; +#elif PCRE2_CODE_UNIT_WIDTH == 16 +return 7; +#elif PCRE2_CODE_UNIT_WIDTH == 32 +return 3; +#else +#error "Unsupported unit width" +#endif +} + +/* ARM doesn't have a shift left across lanes. */ +static SLJIT_INLINE vect_t shift_left_n_lanes(vect_t a, sljit_u8 n) +{ +vect_t zero = VDUPQ(0); +SLJIT_ASSERT(0 < n && n < VECTOR_FACTOR); +/* VEXTQ takes an immediate as last argument. */ +#define C(X) case X: return VEXTQ(zero, a, VECTOR_FACTOR - X); +switch (n) + { + C(1); C(2); C(3); +#if PCRE2_CODE_UNIT_WIDTH != 32 + C(4); C(5); C(6); C(7); +# if PCRE2_CODE_UNIT_WIDTH != 16 + C(8); C(9); C(10); C(11); C(12); C(13); C(14); C(15); +# endif +#endif + default: + /* Based on the ASSERT(0 < n && n < VECTOR_FACTOR) above, this won't + happen. The return is still here for compilers to not warn. */ + return a; + } +} + +#define FFCPS +#define FFCPS_DIFF1 +#define FFCPS_CHAR1A2A + +#define FFCPS_0 +#include "pcre2_jit_neon_inc.h" +#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 +# define FF_UTF +# include "pcre2_jit_neon_inc.h" +# undef FF_UTF +#endif +#undef FFCPS_0 + +#undef FFCPS_CHAR1A2A + +#define FFCPS_1 +#include "pcre2_jit_neon_inc.h" +#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 +# define FF_UTF +# include "pcre2_jit_neon_inc.h" +# undef FF_UTF +#endif +#undef FFCPS_1 + +#undef FFCPS_DIFF1 + +#define FFCPS_DEFAULT +#include "pcre2_jit_neon_inc.h" +#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 +# define FF_UTF +# include "pcre2_jit_neon_inc.h" +# undef FF_UTF +#endif +#undef FFCPS + +#define JIT_HAS_FAST_FORWARD_CHAR_PAIR_SIMD 1 + +static void fast_forward_char_pair_simd(compiler_common *common, sljit_s32 offs1, + PCRE2_UCHAR char1a, PCRE2_UCHAR char1b, sljit_s32 offs2, PCRE2_UCHAR char2a, PCRE2_UCHAR char2b) +{ +DEFINE_COMPILER; +sljit_u32 diff = IN_UCHARS(offs1 - offs2); +struct sljit_jump *partial_quit; +int_char ic; +SLJIT_ASSERT(common->mode == PCRE2_JIT_COMPLETE && offs1 > offs2); +SLJIT_ASSERT(diff <= IN_UCHARS(max_fast_forward_char_pair_offset())); +SLJIT_ASSERT(compiler->scratches == 5); + +/* Save temporary register STR_PTR. */ +OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS0, STR_PTR, 0); + +/* Prepare arguments for the function call. */ +if (common->match_end_ptr == 0) + OP1(SLJIT_MOV, SLJIT_R0, 0, STR_END, 0); +else + { + OP1(SLJIT_MOV, SLJIT_R0, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr); + OP2(SLJIT_ADD, SLJIT_R0, 0, SLJIT_R0, 0, SLJIT_IMM, IN_UCHARS(offs1 + 1)); + + OP2(SLJIT_SUB | SLJIT_SET_LESS, SLJIT_UNUSED, 0, STR_END, 0, SLJIT_R0, 0); + CMOV(SLJIT_LESS, SLJIT_R0, STR_END, 0); + } + +OP1(SLJIT_MOV, SLJIT_R1, 0, STR_PTR, 0); +OP1(SLJIT_MOV_S32, SLJIT_R2, 0, SLJIT_IMM, offs1); +OP1(SLJIT_MOV_S32, SLJIT_R3, 0, SLJIT_IMM, offs2); +ic.c.c1 = char1a; +ic.c.c2 = char1b; +ic.c.c3 = char2a; +ic.c.c4 = char2b; +OP1(SLJIT_MOV_U32, SLJIT_R4, 0, SLJIT_IMM, ic.x); + +if (diff == 1) { + if (char1a == char1b && char2a == char2b) { +#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 + if (common->utf) + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW) | SLJIT_ARG3(SW) | SLJIT_ARG4(SW), + SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcps_0_utf)); + else +#endif + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW) | SLJIT_ARG3(SW) | SLJIT_ARG4(SW), + SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcps_0)); + } else { +#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 + if (common->utf) + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW) | SLJIT_ARG3(SW) | SLJIT_ARG4(SW), + SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcps_1_utf)); + else +#endif + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW) | SLJIT_ARG3(SW) | SLJIT_ARG4(SW), + SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcps_1)); + } +} else { +#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 + if (common->utf) + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW) | SLJIT_ARG3(SW) | SLJIT_ARG4(SW), + SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcps_default_utf)); + else +#endif + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW) | SLJIT_ARG3(SW) | SLJIT_ARG4(SW), + SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcps_default)); +} + +/* Restore STR_PTR register. */ +OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), LOCALS0); + +/* Check return value. */ +partial_quit = CMP(SLJIT_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0); +add_jump(compiler, &common->failed_match, partial_quit); + +/* Fast forward STR_PTR to the result of memchr. */ +OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_RETURN_REG, 0); + +JUMPHERE(partial_quit); +} + +#endif /* SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64 */ diff --git a/ext/pcre/pcre2lib/pcre2_maketables.c b/ext/pcre/pcre2lib/pcre2_maketables.c index 5921e9079308f..8c93b4b57373e 100644 --- a/ext/pcre/pcre2lib/pcre2_maketables.c +++ b/ext/pcre/pcre2lib/pcre2_maketables.c @@ -147,4 +147,15 @@ for (i = 0; i < 256; i++) return yield; } +#ifndef DFTABLES +PCRE2_EXP_DEFN void PCRE2_CALL_CONVENTION +pcre2_maketables_free(pcre2_general_context *gcontext, const uint8_t *tables) +{ + if (gcontext) + gcontext->memctl.free((void *)tables, gcontext->memctl.memory_data); + else + free((void *)tables); +} +#endif + /* End of pcre2_maketables.c */ diff --git a/ext/pcre/pcre2lib/pcre2_match.c b/ext/pcre/pcre2lib/pcre2_match.c index 419561fd6457b..48e7b9dbb2c40 100644 --- a/ext/pcre/pcre2lib/pcre2_match.c +++ b/ext/pcre/pcre2lib/pcre2_match.c @@ -415,8 +415,7 @@ if (caseless) else #endif - /* Not in UTF mode */ - + /* Not in UTF mode */ { for (; length > 0; length--) { @@ -491,27 +490,32 @@ heap is used for a larger vector. *************************************************/ /* These macros pack up tests that are used for partial matching several times -in the code. We set the "hit end" flag if the pointer is at the end of the -subject and also past the earliest inspected character (i.e. something has been -matched, even if not part of the actual matched string). For hard partial -matching, we then return immediately. The second one is used when we already -know we are past the end of the subject. */ +in the code. The second one is used when we already know we are past the end of +the subject. We set the "hit end" flag if the pointer is at the end of the +subject and either (a) the pointer is past the earliest inspected character +(i.e. something has been matched, even if not part of the actual matched +string), or (b) the pattern contains a lookbehind. These are the conditions for +which adding more characters may allow the current match to continue. + +For hard partial matching, we immediately return a partial match. Otherwise, +carrying on means that a complete match on the current subject will be sought. +A partial match is returned only if no complete match can be found. */ #define CHECK_PARTIAL()\ - if (mb->partial != 0 && Feptr >= mb->end_subject && \ - Feptr > mb->start_used_ptr) \ + if (Feptr >= mb->end_subject) \ { \ - mb->hitend = TRUE; \ - if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; \ + SCHECK_PARTIAL(); \ } #define SCHECK_PARTIAL()\ - if (mb->partial != 0 && Feptr > mb->start_used_ptr) \ + if (mb->partial != 0 && \ + (Feptr > mb->start_used_ptr || mb->allowemptypartial)) \ { \ mb->hitend = TRUE; \ if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; \ } + /* These macros are used to implement backtracking. They simulate a recursive call to the match() function by means of a local vector of frames which remember the backtracking points. */ @@ -5127,6 +5131,8 @@ fprintf(stderr, "++ op=%d\n", *Fecode); case OP_ASSERT: case OP_ASSERTBACK: + case OP_ASSERT_NA: + case OP_ASSERTBACK_NA: Lframe_type = GF_NOCAPTURE | Fop; for (;;) { @@ -5412,7 +5418,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode); { while (number-- > 0) { - if (Feptr <= mb->start_subject) RRETURN(MATCH_NOMATCH); + if (Feptr <= mb->check_subject) RRETURN(MATCH_NOMATCH); Feptr--; BACKCHAR(Feptr); } @@ -5420,7 +5426,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode); else #endif - /* No UTF-8 support, or not in UTF-8 mode: count is byte count */ + /* No UTF-8 support, or not in UTF-8 mode: count is code unit count */ { if ((ptrdiff_t)number > Feptr - mb->start_subject) RRETURN(MATCH_NOMATCH); @@ -5472,15 +5478,16 @@ fprintf(stderr, "++ op=%d\n", *Fecode); /* If we are at the end of an assertion that is a condition, return a match, discarding any intermediate backtracking points. Copy back the - captures into the frame before N so that they are set on return. Doing - this for all assertions, both positive and negative, seems to match what - Perl does. */ + mark setting and the captures into the frame before N so that they are + set on return. Doing this for all assertions, both positive and negative, + seems to match what Perl does. */ if (GF_IDMASK(N->group_frame_type) == GF_CONDASSERT) { memcpy((char *)P + offsetof(heapframe, ovector), Fovector, Foffset_top * sizeof(PCRE2_SIZE)); P->offset_top = Foffset_top; + P->mark = Fmark; Fback_frame = (char *)F - (char *)P; RRETURN(MATCH_MATCH); } @@ -5496,10 +5503,20 @@ fprintf(stderr, "++ op=%d\n", *Fecode); case OP_SCOND: break; - /* Positive assertions are like OP_ONCE, except that in addition the + /* Non-atomic positive assertions are like OP_BRA, except that the subject pointer must be put back to where it was at the start of the assertion. */ + case OP_ASSERT_NA: + case OP_ASSERTBACK_NA: + if (Feptr > mb->last_used_ptr) mb->last_used_ptr = Feptr; + Feptr = P->eptr; + break; + + /* Atomic positive assertions are like OP_ONCE, except that in addition + the subject pointer must be put back to where it was at the start of the + assertion. */ + case OP_ASSERT: case OP_ASSERTBACK: if (Feptr > mb->last_used_ptr) mb->last_used_ptr = Feptr; @@ -5640,7 +5657,11 @@ fprintf(stderr, "++ op=%d\n", *Fecode); case OP_EOD: if (Feptr < mb->end_subject) RRETURN(MATCH_NOMATCH); - SCHECK_PARTIAL(); + if (mb->partial != 0) + { + mb->hitend = TRUE; + if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; + } Fecode++; break; @@ -5665,7 +5686,11 @@ fprintf(stderr, "++ op=%d\n", *Fecode); /* Either at end of string or \n before end. */ - SCHECK_PARTIAL(); + if (mb->partial != 0) + { + mb->hitend = TRUE; + if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; + } Fecode++; break; @@ -5743,7 +5768,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode); case OP_NOT_WORD_BOUNDARY: case OP_WORD_BOUNDARY: - if (Feptr == mb->start_subject) prev_is_word = FALSE; else + if (Feptr == mb->check_subject) prev_is_word = FALSE; else { PCRE2_SPTR lastptr = Feptr - 1; #ifdef SUPPORT_UNICODE @@ -5946,6 +5971,7 @@ in rrc. */ #define LBL(val) case val: goto L_RM##val; RETURN_SWITCH: +if (Feptr > mb->last_used_ptr) mb->last_used_ptr = Feptr; if (Frdepth == 0) return rrc; /* Exit from the top level */ F = (heapframe *)((char *)F - Fback_frame); /* Backtrack */ mb->cb->callout_flags |= PCRE2_CALLOUT_BACKTRACK; /* Note for callouts */ @@ -5999,9 +6025,9 @@ each substring: the offsets to the start and end of the substring. Returns: > 0 => success; value is the number of ovector pairs filled = 0 => success, but ovector is not big enough - -1 => failed to match (PCRE2_ERROR_NOMATCH) - -2 => partial match (PCRE2_ERROR_PARTIAL) - < -2 => some kind of unexpected problem + = -1 => failed to match (PCRE2_ERROR_NOMATCH) + = -2 => partial match (PCRE2_ERROR_PARTIAL) + < -2 => some kind of unexpected problem */ PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION @@ -6014,7 +6040,6 @@ int was_zero_terminated = 0; const uint8_t *start_bits = NULL; const pcre2_real_code *re = (const pcre2_real_code *)code; - BOOL anchored; BOOL firstline; BOOL has_first_cu = FALSE; @@ -6022,6 +6047,11 @@ BOOL has_req_cu = FALSE; BOOL startline; BOOL utf; +#if PCRE2_CODE_UNIT_WIDTH == 8 +BOOL memchr_not_found_first_cu = FALSE; +BOOL memchr_not_found_first_cu2 = FALSE; +#endif + PCRE2_UCHAR first_cu = 0; PCRE2_UCHAR first_cu2 = 0; PCRE2_UCHAR req_cu = 0; @@ -6029,10 +6059,23 @@ PCRE2_UCHAR req_cu2 = 0; PCRE2_SPTR bumpalong_limit; PCRE2_SPTR end_subject; +PCRE2_SPTR true_end_subject; PCRE2_SPTR start_match = subject + start_offset; PCRE2_SPTR req_cu_ptr = start_match - 1; -PCRE2_SPTR start_partial = NULL; -PCRE2_SPTR match_partial = NULL; +PCRE2_SPTR start_partial; +PCRE2_SPTR match_partial; + +#ifdef SUPPORT_JIT +BOOL use_jit; +#endif + +#ifdef SUPPORT_UNICODE +BOOL allow_invalid; +uint32_t fragment_options = 0; +#ifdef SUPPORT_JIT +BOOL jit_checked_utf = FALSE; +#endif +#endif PCRE2_SIZE frame_size; @@ -6059,7 +6102,7 @@ if (length == PCRE2_ZERO_TERMINATED) length = PRIV(strlen)(subject); was_zero_terminated = 1; } -end_subject = subject + length; +true_end_subject = end_subject = subject + length; /* Plausibility checks */ @@ -6095,12 +6138,24 @@ options |= (re->flags & FF) / ((FF & (~FF+1)) / (OO & (~OO+1))); #undef FF #undef OO -/* These two settings are used in the code for checking a UTF string that -follows immediately afterwards. Other values in the mb block are used only -during interpretive processing, not when the JIT support is in use, so they are -set up later. */ +/* If the pattern was successfully studied with JIT support, we will run the +JIT executable instead of the rest of this function. Most options must be set +at compile time for the JIT code to be usable. */ + +#ifdef SUPPORT_JIT +use_jit = (re->executable_jit != NULL && + (options & ~PUBLIC_JIT_MATCH_OPTIONS) == 0); +#endif + +/* Initialize UTF parameters. */ utf = (re->overall_options & PCRE2_UTF) != 0; +#ifdef SUPPORT_UNICODE +allow_invalid = (re->overall_options & PCRE2_MATCH_INVALID_UTF) != 0; +#endif + +/* Convert the partial matching flags into an integer. */ + mb->partial = ((options & PCRE2_PARTIAL_HARD) != 0)? 2 : ((options & PCRE2_PARTIAL_SOFT) != 0)? 1 : 0; @@ -6111,88 +6166,107 @@ if (mb->partial != 0 && ((re->overall_options | options) & PCRE2_ENDANCHORED) != 0) return PCRE2_ERROR_BADOPTION; -/* Check a UTF string for validity if required. For 8-bit and 16-bit strings, -we must also check that a starting offset does not point into the middle of a -multiunit character. We check only the portion of the subject that is going to -be inspected during matching - from the offset minus the maximum back reference -to the given length. This saves time when a small part of a large subject is -being matched by the use of a starting offset. Note that the maximum lookbehind -is a number of characters, not code units. */ +/* It is an error to set an offset limit without setting the flag at compile +time. */ -#ifdef SUPPORT_UNICODE -if (utf && (options & PCRE2_NO_UTF_CHECK) == 0) +if (mcontext != NULL && mcontext->offset_limit != PCRE2_UNSET && + (re->overall_options & PCRE2_USE_OFFSET_LIMIT) == 0) + return PCRE2_ERROR_BADOFFSETLIMIT; + +/* If the match data block was previously used with PCRE2_COPY_MATCHED_SUBJECT, +free the memory that was obtained. Set the field to NULL for no match cases. */ + +if ((match_data->flags & PCRE2_MD_COPIED_SUBJECT) != 0) { - PCRE2_SPTR check_subject = start_match; /* start_match includes offset */ + match_data->memctl.free((void *)match_data->subject, + match_data->memctl.memory_data); + match_data->flags &= ~PCRE2_MD_COPIED_SUBJECT; + } +match_data->subject = NULL; + +/* Zero the error offset in case the first code unit is invalid UTF. */ + +match_data->startchar = 0; + + +/* ============================= JIT matching ============================== */ + +/* Prepare for JIT matching. Check a UTF string for validity unless no check is +requested or invalid UTF can be handled. We check only the portion of the +subject that might be be inspected during matching - from the offset minus the +maximum lookbehind to the given length. This saves time when a small part of a +large subject is being matched by the use of a starting offset. Note that the +maximum lookbehind is a number of characters, not code units. */ - if (start_offset > 0) +#ifdef SUPPORT_JIT +if (use_jit) + { +#ifdef SUPPORT_UNICODE + if (utf && (options & PCRE2_NO_UTF_CHECK) == 0 && !allow_invalid) { #if PCRE2_CODE_UNIT_WIDTH != 32 unsigned int i; +#endif + + /* For 8-bit and 16-bit UTF, check that the first code unit is a valid + character start. */ + +#if PCRE2_CODE_UNIT_WIDTH != 32 if (start_match < end_subject && NOT_FIRSTCU(*start_match)) - return PCRE2_ERROR_BADUTFOFFSET; - for (i = re->max_lookbehind; i > 0 && check_subject > subject; i--) { - check_subject--; - while (check_subject > subject && + if (start_offset > 0) return PCRE2_ERROR_BADUTFOFFSET; +#if PCRE2_CODE_UNIT_WIDTH == 8 + return PCRE2_ERROR_UTF8_ERR20; /* Isolated 0x80 byte */ +#else + return PCRE2_ERROR_UTF16_ERR3; /* Isolated low surrogate */ +#endif + } +#endif /* WIDTH != 32 */ + + /* Move back by the maximum lookbehind, just in case it happens at the very + start of matching. */ + +#if PCRE2_CODE_UNIT_WIDTH != 32 + for (i = re->max_lookbehind; i > 0 && start_match > subject; i--) + { + start_match--; + while (start_match > subject && #if PCRE2_CODE_UNIT_WIDTH == 8 - (*check_subject & 0xc0) == 0x80) + (*start_match & 0xc0) == 0x80) #else /* 16-bit */ - (*check_subject & 0xfc00) == 0xdc00) -#endif /* PCRE2_CODE_UNIT_WIDTH == 8 */ - check_subject--; + (*start_match & 0xfc00) == 0xdc00) +#endif + start_match--; } -#else +#else /* PCRE2_CODE_UNIT_WIDTH != 32 */ + /* In the 32-bit library, one code unit equals one character. However, we cannot just subtract the lookbehind and then compare pointers, because a very large lookbehind could create an invalid pointer. */ if (start_offset >= re->max_lookbehind) - check_subject -= re->max_lookbehind; + start_match -= re->max_lookbehind; else - check_subject = subject; + start_match = subject; #endif /* PCRE2_CODE_UNIT_WIDTH != 32 */ - } - /* Validate the relevant portion of the subject. After an error, adjust the - offset to be an absolute offset in the whole string. */ + /* Validate the relevant portion of the subject. Adjust the offset of an + invalid code point to be an absolute offset in the whole string. */ - match_data->rc = PRIV(valid_utf)(check_subject, - length - (check_subject - subject), &(match_data->startchar)); - if (match_data->rc != 0) - { - match_data->startchar += check_subject - subject; - return match_data->rc; + match_data->rc = PRIV(valid_utf)(start_match, + length - (start_match - subject), &(match_data->startchar)); + if (match_data->rc != 0) + { + match_data->startchar += start_match - subject; + return match_data->rc; + } + jit_checked_utf = TRUE; } - } #endif /* SUPPORT_UNICODE */ -/* It is an error to set an offset limit without setting the flag at compile -time. */ - -if (mcontext != NULL && mcontext->offset_limit != PCRE2_UNSET && - (re->overall_options & PCRE2_USE_OFFSET_LIMIT) == 0) - return PCRE2_ERROR_BADOFFSETLIMIT; - -/* If the match data block was previously used with PCRE2_COPY_MATCHED_SUBJECT, -free the memory that was obtained. Set the field to NULL for no match cases. */ + /* If JIT returns BADOPTION, which means that the selected complete or + partial matching mode was not compiled, fall through to the interpreter. */ -if ((match_data->flags & PCRE2_MD_COPIED_SUBJECT) != 0) - { - match_data->memctl.free((void *)match_data->subject, - match_data->memctl.memory_data); - match_data->flags &= ~PCRE2_MD_COPIED_SUBJECT; - } -match_data->subject = NULL; - -/* If the pattern was successfully studied with JIT support, run the JIT -executable instead of the rest of this function. Most options must be set at -compile time for the JIT code to be usable. Fallback to the normal code path if -an unsupported option is set or if JIT returns BADOPTION (which means that the -selected normal or partial matching mode was not compiled). */ - -#ifdef SUPPORT_JIT -if (re->executable_jit != NULL && (options & ~PUBLIC_JIT_MATCH_OPTIONS) == 0) - { rc = pcre2_jit_match(code, subject, length, start_offset, options, match_data, mcontext); if (rc != PCRE2_ERROR_JIT_BADOPTION) @@ -6209,10 +6283,152 @@ if (re->executable_jit != NULL && (options & ~PUBLIC_JIT_MATCH_OPTIONS) == 0) return rc; } } +#endif /* SUPPORT_JIT */ + +/* ========================= End of JIT matching ========================== */ + + +/* Proceed with non-JIT matching. The default is to allow lookbehinds to the +start of the subject. A UTF check when there is a non-zero offset may change +this. */ + +mb->check_subject = subject; + +/* If a UTF subject string was not checked for validity in the JIT code above, +check it here, and handle support for invalid UTF strings. The check above +happens only when invalid UTF is not supported and PCRE2_NO_CHECK_UTF is unset. +If we get here in those circumstances, it means the subject string is valid, +but for some reason JIT matching was not successful. There is no need to check +the subject again. + +We check only the portion of the subject that might be be inspected during +matching - from the offset minus the maximum lookbehind to the given length. +This saves time when a small part of a large subject is being matched by the +use of a starting offset. Note that the maximum lookbehind is a number of +characters, not code units. + +Note also that support for invalid UTF forces a check, overriding the setting +of PCRE2_NO_CHECK_UTF. */ + +#ifdef SUPPORT_UNICODE +if (utf && +#ifdef SUPPORT_JIT + !jit_checked_utf && +#endif + ((options & PCRE2_NO_UTF_CHECK) == 0 || allow_invalid)) + { +#if PCRE2_CODE_UNIT_WIDTH != 32 + BOOL skipped_bad_start = FALSE; +#endif + + /* For 8-bit and 16-bit UTF, check that the first code unit is a valid + character start. If we are handling invalid UTF, just skip over such code + units. Otherwise, give an appropriate error. */ + +#if PCRE2_CODE_UNIT_WIDTH != 32 + if (allow_invalid) + { + while (start_match < end_subject && NOT_FIRSTCU(*start_match)) + { + start_match++; + skipped_bad_start = TRUE; + } + } + else if (start_match < end_subject && NOT_FIRSTCU(*start_match)) + { + if (start_offset > 0) return PCRE2_ERROR_BADUTFOFFSET; +#if PCRE2_CODE_UNIT_WIDTH == 8 + return PCRE2_ERROR_UTF8_ERR20; /* Isolated 0x80 byte */ +#else + return PCRE2_ERROR_UTF16_ERR3; /* Isolated low surrogate */ +#endif + } +#endif /* WIDTH != 32 */ + + /* The mb->check_subject field points to the start of UTF checking; + lookbehinds can go back no further than this. */ + + mb->check_subject = start_match; + + /* Move back by the maximum lookbehind, just in case it happens at the very + start of matching, but don't do this if we skipped bad 8-bit or 16-bit code + units above. */ + +#if PCRE2_CODE_UNIT_WIDTH != 32 + if (!skipped_bad_start) + { + unsigned int i; + for (i = re->max_lookbehind; i > 0 && mb->check_subject > subject; i--) + { + mb->check_subject--; + while (mb->check_subject > subject && +#if PCRE2_CODE_UNIT_WIDTH == 8 + (*mb->check_subject & 0xc0) == 0x80) +#else /* 16-bit */ + (*mb->check_subject & 0xfc00) == 0xdc00) +#endif + mb->check_subject--; + } + } +#else /* PCRE2_CODE_UNIT_WIDTH != 32 */ + + /* In the 32-bit library, one code unit equals one character. However, + we cannot just subtract the lookbehind and then compare pointers, because + a very large lookbehind could create an invalid pointer. */ + + if (start_offset >= re->max_lookbehind) + mb->check_subject -= re->max_lookbehind; + else + mb->check_subject = subject; +#endif /* PCRE2_CODE_UNIT_WIDTH != 32 */ + + /* Validate the relevant portion of the subject. There's a loop in case we + encounter bad UTF in the characters preceding start_match which we are + scanning because of a lookbehind. */ + + for (;;) + { + match_data->rc = PRIV(valid_utf)(mb->check_subject, + length - (mb->check_subject - subject), &(match_data->startchar)); + + if (match_data->rc == 0) break; /* Valid UTF string */ + + /* Invalid UTF string. Adjust the offset to be an absolute offset in the + whole string. If we are handling invalid UTF strings, set end_subject to + stop before the bad code unit, and set the options to "not end of line". + Otherwise return the error. */ + + match_data->startchar += mb->check_subject - subject; + if (!allow_invalid || match_data->rc > 0) return match_data->rc; + end_subject = subject + match_data->startchar; + + /* If the end precedes start_match, it means there is invalid UTF in the + extra code units we reversed over because of a lookbehind. Advance past the + first bad code unit, and then skip invalid character starting code units in + 8-bit and 16-bit modes, and try again. */ + + if (end_subject < start_match) + { + mb->check_subject = end_subject + 1; +#if PCRE2_CODE_UNIT_WIDTH != 32 + while (mb->check_subject < start_match && NOT_FIRSTCU(*mb->check_subject)) + mb->check_subject++; #endif + } + + /* Otherwise, set the not end of line option, and do the match. */ + + else + { + fragment_options = PCRE2_NOTEOL; + break; + } + } + } +#endif /* SUPPORT_UNICODE */ -/* Carry on with non-JIT matching. A NULL match context means "use a default -context", but we take the memory control functions from the pattern. */ +/* A NULL match context means "use a default context", but we take the memory +control functions from the pattern. */ if (mcontext == NULL) { @@ -6224,8 +6440,8 @@ else mb->memctl = mcontext->memctl; anchored = ((re->overall_options | options) & PCRE2_ANCHORED) != 0; firstline = (re->overall_options & PCRE2_FIRSTLINE) != 0; startline = (re->flags & PCRE2_STARTLINE) != 0; -bumpalong_limit = (mcontext->offset_limit == PCRE2_UNSET)? - end_subject : subject + mcontext->offset_limit; +bumpalong_limit = (mcontext->offset_limit == PCRE2_UNSET)? + true_end_subject : subject + mcontext->offset_limit; /* Initialize and set up the fixed fields in the callout block, with a pointer in the match block. */ @@ -6236,7 +6452,8 @@ cb.subject = subject; cb.subject_length = (PCRE2_SIZE)(end_subject - subject); cb.callout_flags = 0; -/* Fill in the remaining fields in the match block. */ +/* Fill in the remaining fields in the match block, except for moptions, which +gets set later. */ mb->callout = mcontext->callout; mb->callout_data = mcontext->callout_data; @@ -6245,13 +6462,11 @@ mb->start_subject = subject; mb->start_offset = start_offset; mb->end_subject = end_subject; mb->hasthen = (re->flags & PCRE2_HASTHEN) != 0; - -mb->moptions = options; /* Match options */ -mb->poptions = re->overall_options; /* Pattern options */ - +mb->allowemptypartial = (re->max_lookbehind > 0) || + (re->flags & PCRE2_MATCH_EMPTY) != 0; +mb->poptions = re->overall_options; /* Pattern options */ mb->ignore_skip_arg = 0; -mb->mark = mb->nomatch_mark = NULL; /* In case never set */ -mb->hitend = FALSE; +mb->mark = mb->nomatch_mark = NULL; /* In case never set */ /* The name table is needed for finding all the numbers associated with a given name, for condition testing. The code follows the name table. */ @@ -6404,6 +6619,13 @@ if ((re->flags & PCRE2_LASTSET) != 0) /* Loop for handling unanchored repeated matching attempts; for anchored regexs the loop runs just once. */ +#ifdef SUPPORT_UNICODE +FRAGMENT_RESTART: +#endif + +start_partial = match_partial = NULL; +mb->hitend = FALSE; + for(;;) { PCRE2_SPTR new_start_match; @@ -6473,7 +6695,10 @@ for(;;) /* Not anchored. Advance to a unique first code unit if there is one. In 8-bit mode, the use of memchr() gives a big speed up, even though we have to call it twice in caseless mode, in order to find the earliest occurrence - of the character in either of its cases. */ + of the character in either of its cases. If a call to memchr() that + searches the rest of the subject fails to find one case, remember that in + order not to keep on repeating the search. This can make a huge difference + when the strings are very long and only one case is present. */ else { @@ -6487,11 +6712,29 @@ for(;;) (smc = UCHAR21TEST(start_match)) != first_cu && smc != first_cu2) start_match++; + #else /* 8-bit code units */ - PCRE2_SPTR pp1 = - memchr(start_match, first_cu, end_subject-start_match); - PCRE2_SPTR pp2 = - memchr(start_match, first_cu2, end_subject-start_match); + PCRE2_SPTR pp1 = NULL; + PCRE2_SPTR pp2 = NULL; + PCRE2_SIZE cu2size = end_subject - start_match; + + if (!memchr_not_found_first_cu) + { + pp1 = memchr(start_match, first_cu, end_subject - start_match); + if (pp1 == NULL) memchr_not_found_first_cu = TRUE; + else cu2size = pp1 - start_match; + } + + /* If pp1 is not NULL, we have arranged to search only as far as pp1, + to see if the other case is earlier, so we can set "not found" only + when both searches have returned NULL. */ + + if (!memchr_not_found_first_cu2) + { + pp2 = memchr(start_match, first_cu2, cu2size); + memchr_not_found_first_cu2 = (pp2 == NULL && pp1 == NULL); + } + if (pp1 == NULL) start_match = (pp2 == NULL)? end_subject : pp2; else @@ -6523,7 +6766,7 @@ for(;;) we also let the cycle run, because the matching string is legitimately allowed to start with the first code unit of a newline. */ - if (!mb->partial && start_match >= mb->end_subject) + if (mb->partial == 0 && start_match >= mb->end_subject) { rc = MATCH_NOMATCH; break; @@ -6582,7 +6825,7 @@ for(;;) /* See comment above in first_cu checking about the next few lines. */ - if (!mb->partial && start_match >= mb->end_subject) + if (mb->partial == 0 && start_match >= mb->end_subject) { rc = MATCH_NOMATCH; break; @@ -6596,8 +6839,10 @@ for(;;) /* The following two optimizations must be disabled for partial matching. */ - if (!mb->partial) + if (mb->partial == 0) { + PCRE2_SPTR p; + /* The minimum matching length is a lower bound; no string of that length may actually match the pattern. Although the value is, strictly, in characters, we treat it as code units to avoid spending too much time in @@ -6621,60 +6866,57 @@ for(;;) memchr() twice in the caseless case because we only need to check for the presence of the character in either case, not find the first occurrence. + The search can be skipped if the code unit was found later than the + current starting point in a previous iteration of the bumpalong loop. + HOWEVER: when the subject string is very, very long, searching to its end can take a long time, and give bad performance on quite ordinary - patterns. This showed up when somebody was matching something like - /^\d+C/ on a 32-megabyte string... so we don't do this when the string is - sufficiently long. */ + anchored patterns. This showed up when somebody was matching something + like /^\d+C/ on a 32-megabyte string... so we don't do this when the + string is sufficiently long, but it's worth searching a lot more for + unanchored patterns. */ - if (has_req_cu && end_subject - start_match < REQ_CU_MAX) + p = start_match + (has_first_cu? 1:0); + if (has_req_cu && p > req_cu_ptr) { - PCRE2_SPTR p = start_match + (has_first_cu? 1:0); - - /* We don't need to repeat the search if we haven't yet reached the - place we found it last time round the bumpalong loop. */ + PCRE2_SIZE check_length = end_subject - start_match; - if (p > req_cu_ptr) + if (check_length < REQ_CU_MAX || + (!anchored && check_length < REQ_CU_MAX * 1000)) { - if (p < end_subject) + if (req_cu != req_cu2) /* Caseless */ { - if (req_cu != req_cu2) /* Caseless */ - { #if PCRE2_CODE_UNIT_WIDTH != 8 - do - { - uint32_t pp = UCHAR21INCTEST(p); - if (pp == req_cu || pp == req_cu2) { p--; break; } - } - while (p < end_subject); - + while (p < end_subject) + { + uint32_t pp = UCHAR21INCTEST(p); + if (pp == req_cu || pp == req_cu2) { p--; break; } + } #else /* 8-bit code units */ - PCRE2_SPTR pp = p; - p = memchr(pp, req_cu, end_subject - pp); - if (p == NULL) - { - p = memchr(pp, req_cu2, end_subject - pp); - if (p == NULL) p = end_subject; - } -#endif /* PCRE2_CODE_UNIT_WIDTH != 8 */ + PCRE2_SPTR pp = p; + p = memchr(pp, req_cu, end_subject - pp); + if (p == NULL) + { + p = memchr(pp, req_cu2, end_subject - pp); + if (p == NULL) p = end_subject; } +#endif /* PCRE2_CODE_UNIT_WIDTH != 8 */ + } - /* The caseful case */ + /* The caseful case */ - else - { + else + { #if PCRE2_CODE_UNIT_WIDTH != 8 - do - { - if (UCHAR21INCTEST(p) == req_cu) { p--; break; } - } - while (p < end_subject); + while (p < end_subject) + { + if (UCHAR21INCTEST(p) == req_cu) { p--; break; } + } #else /* 8-bit code units */ - p = memchr(p, req_cu, end_subject - p); - if (p == NULL) p = end_subject; + p = memchr(p, req_cu, end_subject - p); + if (p == NULL) p = end_subject; #endif - } } /* If we can't find the required code unit, break the bumpalong loop, @@ -6714,6 +6956,11 @@ for(;;) mb->start_used_ptr = start_match; mb->last_used_ptr = start_match; +#ifdef SUPPORT_UNICODE + mb->moptions = options | fragment_options; +#else + mb->moptions = options; +#endif mb->match_call_count = 0; mb->end_offset_top = 0; mb->skip_arg_count = 0; @@ -6839,6 +7086,68 @@ for(;;) ENDLOOP: +/* If end_subject != true_end_subject, it means we are handling invalid UTF, +and have just processed a non-terminal fragment. If this resulted in no match +or a partial match we must carry on to the next fragment (a partial match is +returned to the caller only at the very end of the subject). A loop is used to +avoid trying to match against empty fragments; if the pattern can match an +empty string it would have done so already. */ + +#ifdef SUPPORT_UNICODE +if (utf && end_subject != true_end_subject && + (rc == MATCH_NOMATCH || rc == PCRE2_ERROR_PARTIAL)) + { + for (;;) + { + /* Advance past the first bad code unit, and then skip invalid character + starting code units in 8-bit and 16-bit modes. */ + + start_match = end_subject + 1; +#if PCRE2_CODE_UNIT_WIDTH != 32 + while (start_match < true_end_subject && NOT_FIRSTCU(*start_match)) + start_match++; +#endif + + /* If we have hit the end of the subject, there isn't another non-empty + fragment, so give up. */ + + if (start_match >= true_end_subject) + { + rc = MATCH_NOMATCH; /* In case it was partial */ + break; + } + + /* Check the rest of the subject */ + + mb->check_subject = start_match; + rc = PRIV(valid_utf)(start_match, length - (start_match - subject), + &(match_data->startchar)); + + /* The rest of the subject is valid UTF. */ + + if (rc == 0) + { + mb->end_subject = end_subject = true_end_subject; + fragment_options = PCRE2_NOTBOL; + goto FRAGMENT_RESTART; + } + + /* A subsequent UTF error has been found; if the next fragment is + non-empty, set up to process it. Otherwise, let the loop advance. */ + + else if (rc < 0) + { + mb->end_subject = end_subject = start_match + match_data->startchar; + if (end_subject > start_match) + { + fragment_options = PCRE2_NOTBOL|PCRE2_NOTEOL; + goto FRAGMENT_RESTART; + } + } + } + } +#endif /* SUPPORT_UNICODE */ + /* Release an enlarged frame vector that is on the heap. */ if (mb->match_frames != mb->stack_frames) diff --git a/ext/pcre/pcre2lib/pcre2_match_data.c b/ext/pcre/pcre2lib/pcre2_match_data.c index ccc5f6740e003..53e4698707964 100644 --- a/ext/pcre/pcre2lib/pcre2_match_data.c +++ b/ext/pcre/pcre2lib/pcre2_match_data.c @@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Original API code Copyright (c) 1997-2012 University of Cambridge - New API code Copyright (c) 2016-2018 University of Cambridge + New API code Copyright (c) 2016-2019 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -150,4 +150,17 @@ pcre2_get_startchar(pcre2_match_data *match_data) return match_data->startchar; } + + +/************************************************* +* Get size of match data block * +*************************************************/ + +PCRE2_EXP_DEFN PCRE2_SIZE PCRE2_CALL_CONVENTION +pcre2_get_match_data_size(pcre2_match_data *match_data) +{ +return offsetof(pcre2_match_data, ovector) + + 2 * (match_data->oveccount) * sizeof(PCRE2_SIZE); +} + /* End of pcre2_match_data.c */ diff --git a/ext/pcre/pcre2lib/pcre2_printint.c b/ext/pcre/pcre2lib/pcre2_printint.c index b132d44f8c262..b9bab025ab38f 100644 --- a/ext/pcre/pcre2lib/pcre2_printint.c +++ b/ext/pcre/pcre2lib/pcre2_printint.c @@ -392,6 +392,8 @@ for(;;) case OP_ASSERT_NOT: case OP_ASSERTBACK: case OP_ASSERTBACK_NOT: + case OP_ASSERT_NA: + case OP_ASSERTBACK_NA: case OP_ONCE: case OP_SCRIPT_RUN: case OP_COND: diff --git a/ext/pcre/pcre2lib/pcre2_study.c b/ext/pcre/pcre2lib/pcre2_study.c index e883c2eb4c229..2883868618d9c 100644 --- a/ext/pcre/pcre2lib/pcre2_study.c +++ b/ext/pcre/pcre2lib/pcre2_study.c @@ -88,11 +88,13 @@ value. countptr pointer to call count (to catch over complexity) backref_cache vector for caching back references. +This function is no longer called when the pattern contains (*ACCEPT); however, +the old code for returning -1 is retained, just in case. + Returns: the minimum length -1 \C in UTF-8 mode or (*ACCEPT) or pattern too complicated - or back reference to duplicate name/number -2 internal error (missing capturing bracket) -3 internal error (opcode not listed) */ @@ -103,6 +105,7 @@ find_minlength(const pcre2_real_code *re, PCRE2_SPTR code, int *backref_cache) { int length = -1; +int branchlength = 0; int prev_cap_recno = -1; int prev_cap_d = 0; int prev_recurse_recno = -1; @@ -110,9 +113,9 @@ int prev_recurse_d = 0; uint32_t once_fudge = 0; BOOL had_recurse = FALSE; BOOL dupcapused = (re->flags & PCRE2_DUPCAPUSED) != 0; -recurse_check this_recurse; -int branchlength = 0; +PCRE2_SPTR nextbranch = code + GET(code, 1); PCRE2_UCHAR *cc = (PCRE2_UCHAR *)code + 1 + LINK_SIZE; +recurse_check this_recurse; /* If this is a "could be empty" group, its minimum length is 0. */ @@ -128,16 +131,20 @@ if ((*countptr)++ > 1000) return -1; /* Scan along the opcodes for this branch. If we get to the end of the branch, check the length against that of the other branches. If the accumulated length -passes 16-bits, stop. */ +passes 16-bits, reset to that value and skip the rest of the branch. */ for (;;) { int d, min, recno; - PCRE2_UCHAR *cs, *ce; - PCRE2_UCHAR op = *cc; + PCRE2_UCHAR op, *cs, *ce; - if (branchlength >= UINT16_MAX) return UINT16_MAX; + if (branchlength >= UINT16_MAX) + { + branchlength = UINT16_MAX; + cc = (PCRE2_UCHAR *)nextbranch; + } + op = *cc; switch (op) { case OP_COND: @@ -206,7 +213,9 @@ for (;;) cc += 1 + LINK_SIZE; break; - /* ACCEPT makes things far too complicated; we have to give up. */ + /* ACCEPT makes things far too complicated; we have to give up. In fact, + from 10.34 onwards, if a pattern contains (*ACCEPT), this function is not + used. However, leave the code in place, just in case. */ case OP_ACCEPT: case OP_ASSERT_ACCEPT: @@ -214,9 +223,9 @@ for (;;) /* Reached end of a branch; if it's a ket it is the end of a nested call. If it's ALT it is an alternation in a nested call. If it is END it's - the end of the outer call. All can be handled by the same code. If an - ACCEPT was previously encountered, use the length that was in force at that - time, and pass back the shortest ACCEPT length. */ + the end of the outer call. All can be handled by the same code. If the + length of any branch is zero, there is no need to scan any subsequent + branches. */ case OP_ALT: case OP_KET: @@ -226,7 +235,8 @@ for (;;) case OP_END: if (length < 0 || (!had_recurse && branchlength < length)) length = branchlength; - if (op != OP_ALT) return length; + if (op != OP_ALT || length == 0) return length; + nextbranch = cc + GET(cc, 1); cc += 1 + LINK_SIZE; branchlength = 0; had_recurse = FALSE; @@ -238,6 +248,8 @@ for (;;) case OP_ASSERT_NOT: case OP_ASSERTBACK: case OP_ASSERTBACK_NOT: + case OP_ASSERT_NA: + case OP_ASSERTBACK_NA: do cc += GET(cc, 1); while (*cc == OP_ALT); /* Fall through */ @@ -451,15 +463,17 @@ for (;;) If PCRE2_MATCH_UNSET_BACKREF is set, a backreference to an unset bracket matches an empty string (by default it causes a matching failure), so in - that case we must set the minimum length to zero. */ + that case we must set the minimum length to zero. + + For backreferenes, if duplicate numbers are present in the pattern we check + for a reference to a duplicate. If it is, we don't know which version will + be referenced, so we have to set the minimum length to zero. */ - /* Duplicate named pattern back reference. We cannot reliably find a length - for this if duplicate numbers are present in the pattern. */ + /* Duplicate named pattern back reference. */ case OP_DNREF: case OP_DNREFI: - if (dupcapused) return -1; - if ((re->overall_options & PCRE2_MATCH_UNSET_BACKREF) == 0) + if (!dupcapused && (re->overall_options & PCRE2_MATCH_UNSET_BACKREF) == 0) { int count = GET2(cc, 1+IMM2_SIZE); PCRE2_UCHAR *slot = @@ -482,28 +496,32 @@ for (;;) ce = cs = (PCRE2_UCHAR *)PRIV(find_bracket)(startcode, utf, recno); if (cs == NULL) return -2; do ce += GET(ce, 1); while (*ce == OP_ALT); - if (cc > cs && cc < ce) /* Simple recursion */ - { - dd = 0; - had_recurse = TRUE; - } - else + + dd = 0; + if (!dupcapused || + (PCRE2_UCHAR *)PRIV(find_bracket)(ce, utf, recno) == NULL) { - recurse_check *r = recurses; - for (r = recurses; r != NULL; r = r->prev) - if (r->group == cs) break; - if (r != NULL) /* Mutual recursion */ + if (cc > cs && cc < ce) /* Simple recursion */ { - dd = 0; had_recurse = TRUE; } else { - this_recurse.prev = recurses; - this_recurse.group = cs; - dd = find_minlength(re, cs, startcode, utf, &this_recurse, - countptr, backref_cache); - if (dd < 0) return dd; + recurse_check *r = recurses; + for (r = recurses; r != NULL; r = r->prev) + if (r->group == cs) break; + if (r != NULL) /* Mutual recursion */ + { + had_recurse = TRUE; + } + else + { + this_recurse.prev = recurses; /* No recursion */ + this_recurse.group = cs; + dd = find_minlength(re, cs, startcode, utf, &this_recurse, + countptr, backref_cache); + if (dd < 0) return dd; + } } } @@ -521,48 +539,51 @@ for (;;) cc += 1 + 2*IMM2_SIZE; goto REPEAT_BACK_REFERENCE; - /* Single back reference. We cannot find a length for this if duplicate - numbers are present in the pattern. */ + /* Single back reference by number. References by name are converted to by + number when there is no duplication. */ case OP_REF: case OP_REFI: - if (dupcapused) return -1; recno = GET2(cc, 1); if (recno <= backref_cache[0] && backref_cache[recno] >= 0) d = backref_cache[recno]; else { int i; + d = 0; + if ((re->overall_options & PCRE2_MATCH_UNSET_BACKREF) == 0) { ce = cs = (PCRE2_UCHAR *)PRIV(find_bracket)(startcode, utf, recno); if (cs == NULL) return -2; do ce += GET(ce, 1); while (*ce == OP_ALT); - if (cc > cs && cc < ce) /* Simple recursion */ - { - d = 0; - had_recurse = TRUE; - } - else + + if (!dupcapused || + (PCRE2_UCHAR *)PRIV(find_bracket)(ce, utf, recno) == NULL) { - recurse_check *r = recurses; - for (r = recurses; r != NULL; r = r->prev) if (r->group == cs) break; - if (r != NULL) /* Mutual recursion */ + if (cc > cs && cc < ce) /* Simple recursion */ { - d = 0; had_recurse = TRUE; } else { - this_recurse.prev = recurses; - this_recurse.group = cs; - d = find_minlength(re, cs, startcode, utf, &this_recurse, countptr, - backref_cache); - if (d < 0) return d; + recurse_check *r = recurses; + for (r = recurses; r != NULL; r = r->prev) if (r->group == cs) break; + if (r != NULL) /* Mutual recursion */ + { + had_recurse = TRUE; + } + else /* No recursion */ + { + this_recurse.prev = recurses; + this_recurse.group = cs; + d = find_minlength(re, cs, startcode, utf, &this_recurse, countptr, + backref_cache); + if (d < 0) return d; + } } } } - else d = 0; backref_cache[recno] = d; for (i = backref_cache[0] + 1; i < recno; i++) backref_cache[i] = -1; @@ -888,7 +909,7 @@ if (table_limit != 32) for (c = 24; c < 32; c++) re->start_bitmap[c] = 0xff; /************************************************* -* Create bitmap of starting bytes * +* Create bitmap of starting code units * *************************************************/ /* This function scans a compiled unanchored expression recursively and @@ -938,6 +959,9 @@ do { int rc; uint8_t *classmap = NULL; +#ifdef SUPPORT_WIDE_CHARS + PCRE2_UCHAR xclassflags; +#endif switch(*tcode) { @@ -1078,6 +1102,7 @@ do case OP_ONCE: case OP_SCRIPT_RUN: case OP_ASSERT: + case OP_ASSERT_NA: rc = set_start_bits(re, tcode, utf); if (rc == SSB_FAIL || rc == SSB_UNKNOWN) return rc; if (rc == SSB_DONE) try_next = FALSE; else @@ -1120,6 +1145,7 @@ do case OP_ASSERT_NOT: case OP_ASSERTBACK: case OP_ASSERTBACK_NOT: + case OP_ASSERTBACK_NA: do tcode += GET(tcode, 1); while (*tcode == OP_ALT); tcode += 1 + LINK_SIZE; break; @@ -1444,20 +1470,59 @@ do negative XCLASS without a map, give up. If there are no property checks, there must be wide characters on the XCLASS list, because otherwise an XCLASS would not have been created. This means that code points >= 255 - are always potential starters. */ + are potential starters. In the UTF-8 case we can scan them and set bits + for the relevant leading bytes. */ #ifdef SUPPORT_WIDE_CHARS case OP_XCLASS: - if ((tcode[1 + LINK_SIZE] & XCL_HASPROP) != 0 || - (tcode[1 + LINK_SIZE] & (XCL_MAP|XCL_NOT)) == XCL_NOT) + xclassflags = tcode[1 + LINK_SIZE]; + if ((xclassflags & XCL_HASPROP) != 0 || + (xclassflags & (XCL_MAP|XCL_NOT)) == XCL_NOT) return SSB_FAIL; /* We have a positive XCLASS or a negative one without a map. Set up the map pointer if there is one, and fall through. */ - classmap = ((tcode[1 + LINK_SIZE] & XCL_MAP) == 0)? NULL : + classmap = ((xclassflags & XCL_MAP) == 0)? NULL : (uint8_t *)(tcode + 1 + LINK_SIZE + 1); -#endif + + /* In UTF-8 mode, scan the character list and set bits for leading bytes, + then jump to handle the map. */ + +#if PCRE2_CODE_UNIT_WIDTH == 8 + if (utf && (xclassflags & XCL_NOT) == 0) + { + PCRE2_UCHAR b, e; + PCRE2_SPTR p = tcode + 1 + LINK_SIZE + 1 + ((classmap == NULL)? 0:32); + tcode += GET(tcode, 1); + + for (;;) switch (*p++) + { + case XCL_SINGLE: + b = *p++; + while ((*p & 0xc0) == 0x80) p++; + re->start_bitmap[b/8] |= (1u << (b&7)); + break; + + case XCL_RANGE: + b = *p++; + while ((*p & 0xc0) == 0x80) p++; + e = *p++; + while ((*p & 0xc0) == 0x80) p++; + for (; b <= e; b++) + re->start_bitmap[b/8] |= (1u << (b&7)); + break; + + case XCL_END: + goto HANDLE_CLASSMAP; + + default: + return SSB_UNKNOWN; /* Internal error, should not occur */ + } + } +#endif /* SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8 */ +#endif /* SUPPORT_WIDE_CHARS */ + /* It seems that the fall through comment must be outside the #ifdef if it is to avoid the gcc compiler warning. */ @@ -1499,6 +1564,9 @@ do greater than 127. In fact, there are only two possible starting bytes for characters in the range 128 - 255. */ +#if defined SUPPORT_WIDE_CHARS && PCRE2_CODE_UNIT_WIDTH == 8 + HANDLE_CLASSMAP: +#endif if (classmap != NULL) { #if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8 @@ -1569,7 +1637,9 @@ return yield; /* This function is handed a compiled expression that it must study to produce information that will speed up the matching. -Argument: points to the compiled expression +Argument: + re points to the compiled expression + Returns: 0 normally; non-zero should never normally occur 1 unknown opcode in set_start_bits 2 missing capturing bracket @@ -1579,7 +1649,6 @@ Returns: 0 normally; non-zero should never normally occur int PRIV(study)(pcre2_real_code *re) { -int min; int count = 0; PCRE2_UCHAR *code; BOOL utf = (re->overall_options & PCRE2_UTF) != 0; @@ -1597,25 +1666,121 @@ if ((re->flags & (PCRE2_FIRSTSET|PCRE2_STARTLINE)) == 0) { int rc = set_start_bits(re, code, utf); if (rc == SSB_UNKNOWN) return 1; - if (rc == SSB_DONE) re->flags |= PCRE2_FIRSTMAPSET; + + /* If a list of starting code units was set up, scan the list to see if only + one or two were listed. Having only one listed is rare because usually a + single starting code unit will have been recognized and PCRE2_FIRSTSET set. + If two are listed, see if they are caseless versions of the same character; + if so we can replace the list with a caseless first code unit. This gives + better performance and is plausibly worth doing for patterns such as [Ww]ord + or (word|WORD). */ + + if (rc == SSB_DONE) + { + int i; + int a = -1; + int b = -1; + uint8_t *p = re->start_bitmap; + uint32_t flags = PCRE2_FIRSTMAPSET; + + for (i = 0; i < 256; p++, i += 8) + { + uint8_t x = *p; + if (x != 0) + { + int c; + uint8_t y = x & (~x + 1); /* Least significant bit */ + if (y != x) goto DONE; /* More than one bit set */ + + /* In the 16-bit and 32-bit libraries, the bit for 0xff means "0xff and + all wide characters", so we cannot use it here. */ + +#if PCRE2_CODE_UNIT_WIDTH != 8 + if (i == 248 && x == 0x80) goto DONE; +#endif + + /* Compute the character value */ + + c = i; + switch (x) + { + case 1: break; + case 2: c += 1; break; case 4: c += 2; break; + case 8: c += 3; break; case 16: c += 4; break; + case 32: c += 5; break; case 64: c += 6; break; + case 128: c += 7; break; + } + + /* c contains the code unit value, in the range 0-255. In 8-bit UTF + mode, only values < 128 can be used. */ + +#if PCRE2_CODE_UNIT_WIDTH == 8 + if (c > 127) goto DONE; +#endif + if (a < 0) a = c; /* First one found */ + else if (b < 0) /* Second one found */ + { + int d = TABLE_GET((unsigned int)c, re->tables + fcc_offset, c); + +#ifdef SUPPORT_UNICODE +#if PCRE2_CODE_UNIT_WIDTH == 8 + if (utf && UCD_CASESET(c) != 0) goto DONE; /* Multiple case set */ +#else /* 16-bit or 32-bit */ + if (UCD_CASESET(c) != 0) goto DONE; /* Multiple case set */ + if (utf && c > 127) d = UCD_OTHERCASE(c); +#endif /* Code width */ +#endif /* SUPPORT_UNICODE */ + + if (d != a) goto DONE; /* Not other case of a */ + b = c; + } + else goto DONE; /* More than two characters found */ + } + } + + /* Replace the start code unit bits with a first code unit, but only if it + is not the same as a required later code unit. This is because a search for + a required code unit starts after an explicit first code unit, but at a + code unit found from the bitmap. Patterns such as /a*a/ don't work + if both the start unit and required unit are the same. */ + + if (a >= 0 && + ( + (re->flags & PCRE2_LASTSET) == 0 || + ( + re->last_codeunit != (uint32_t)a && + (b < 0 || re->last_codeunit != (uint32_t)b) + ) + )) + { + re->first_codeunit = a; + flags = PCRE2_FIRSTSET; + if (b >= 0) flags |= PCRE2_FIRSTCASELESS; + } + + DONE: + re->flags |= flags; + } } /* Find the minimum length of subject string. If the pattern can match an empty -string, the minimum length is already known. If there are more back references -than the size of the vector we are going to cache them in, do nothing. A -pattern that complicated will probably take a long time to analyze and may in -any case turn out to be too complicated. Note that back reference minima are -held as 16-bit numbers. */ - -if ((re->flags & PCRE2_MATCH_EMPTY) == 0 && +string, the minimum length is already known. If the pattern contains (*ACCEPT) +all bets are off, and we don't even try to find a minimum length. If there are +more back references than the size of the vector we are going to cache them in, +do nothing. A pattern that complicated will probably take a long time to +analyze and may in any case turn out to be too complicated. Note that back +reference minima are held as 16-bit numbers. */ + +if ((re->flags & (PCRE2_MATCH_EMPTY|PCRE2_HASACCEPT)) == 0 && re->top_backref <= MAX_CACHE_BACKREF) { + int min; int backref_cache[MAX_CACHE_BACKREF+1]; backref_cache[0] = 0; /* Highest one that is set */ min = find_minlength(re, code, code, utf, NULL, &count, backref_cache); switch(min) { - case -1: /* \C in UTF mode or (*ACCEPT) or over-complex regex */ + case -1: /* \C in UTF mode or over-complex regex */ break; /* Leave minlength unchanged (will be zero) */ case -2: @@ -1625,8 +1790,7 @@ if ((re->flags & PCRE2_MATCH_EMPTY) == 0 && return 3; /* unrecognized opcode */ default: - if (min > UINT16_MAX) min = UINT16_MAX; - re->minlength = min; + re->minlength = (min > UINT16_MAX)? UINT16_MAX : min; break; } } diff --git a/ext/pcre/pcre2lib/pcre2_tables.c b/ext/pcre/pcre2lib/pcre2_tables.c index 84019361fce34..25531d98c6890 100644 --- a/ext/pcre/pcre2lib/pcre2_tables.c +++ b/ext/pcre/pcre2lib/pcre2_tables.c @@ -279,6 +279,7 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */ #define STRING_Duployan0 STR_D STR_u STR_p STR_l STR_o STR_y STR_a STR_n "\0" #define STRING_Egyptian_Hieroglyphs0 STR_E STR_g STR_y STR_p STR_t STR_i STR_a STR_n STR_UNDERSCORE STR_H STR_i STR_e STR_r STR_o STR_g STR_l STR_y STR_p STR_h STR_s "\0" #define STRING_Elbasan0 STR_E STR_l STR_b STR_a STR_s STR_a STR_n "\0" +#define STRING_Elymaic0 STR_E STR_l STR_y STR_m STR_a STR_i STR_c "\0" #define STRING_Ethiopic0 STR_E STR_t STR_h STR_i STR_o STR_p STR_i STR_c "\0" #define STRING_Georgian0 STR_G STR_e STR_o STR_r STR_g STR_i STR_a STR_n "\0" #define STRING_Glagolitic0 STR_G STR_l STR_a STR_g STR_o STR_l STR_i STR_t STR_i STR_c "\0" @@ -348,6 +349,7 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */ #define STRING_Myanmar0 STR_M STR_y STR_a STR_n STR_m STR_a STR_r "\0" #define STRING_N0 STR_N "\0" #define STRING_Nabataean0 STR_N STR_a STR_b STR_a STR_t STR_a STR_e STR_a STR_n "\0" +#define STRING_Nandinagari0 STR_N STR_a STR_n STR_d STR_i STR_n STR_a STR_g STR_a STR_r STR_i "\0" #define STRING_Nd0 STR_N STR_d "\0" #define STRING_New_Tai_Lue0 STR_N STR_e STR_w STR_UNDERSCORE STR_T STR_a STR_i STR_UNDERSCORE STR_L STR_u STR_e "\0" #define STRING_Newa0 STR_N STR_e STR_w STR_a "\0" @@ -355,6 +357,7 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */ #define STRING_Nl0 STR_N STR_l "\0" #define STRING_No0 STR_N STR_o "\0" #define STRING_Nushu0 STR_N STR_u STR_s STR_h STR_u "\0" +#define STRING_Nyiakeng_Puachue_Hmong0 STR_N STR_y STR_i STR_a STR_k STR_e STR_n STR_g STR_UNDERSCORE STR_P STR_u STR_a STR_c STR_h STR_u STR_e STR_UNDERSCORE STR_H STR_m STR_o STR_n STR_g "\0" #define STRING_Ogham0 STR_O STR_g STR_h STR_a STR_m "\0" #define STRING_Ol_Chiki0 STR_O STR_l STR_UNDERSCORE STR_C STR_h STR_i STR_k STR_i "\0" #define STRING_Old_Hungarian0 STR_O STR_l STR_d STR_UNDERSCORE STR_H STR_u STR_n STR_g STR_a STR_r STR_i STR_a STR_n "\0" @@ -419,6 +422,7 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */ #define STRING_Ugaritic0 STR_U STR_g STR_a STR_r STR_i STR_t STR_i STR_c "\0" #define STRING_Unknown0 STR_U STR_n STR_k STR_n STR_o STR_w STR_n "\0" #define STRING_Vai0 STR_V STR_a STR_i "\0" +#define STRING_Wancho0 STR_W STR_a STR_n STR_c STR_h STR_o "\0" #define STRING_Warang_Citi0 STR_W STR_a STR_r STR_a STR_n STR_g STR_UNDERSCORE STR_C STR_i STR_t STR_i "\0" #define STRING_Xan0 STR_X STR_a STR_n "\0" #define STRING_Xps0 STR_X STR_p STR_s "\0" @@ -474,6 +478,7 @@ const char PRIV(utt_names)[] = STRING_Duployan0 STRING_Egyptian_Hieroglyphs0 STRING_Elbasan0 + STRING_Elymaic0 STRING_Ethiopic0 STRING_Georgian0 STRING_Glagolitic0 @@ -543,6 +548,7 @@ const char PRIV(utt_names)[] = STRING_Myanmar0 STRING_N0 STRING_Nabataean0 + STRING_Nandinagari0 STRING_Nd0 STRING_New_Tai_Lue0 STRING_Newa0 @@ -550,6 +556,7 @@ const char PRIV(utt_names)[] = STRING_Nl0 STRING_No0 STRING_Nushu0 + STRING_Nyiakeng_Puachue_Hmong0 STRING_Ogham0 STRING_Ol_Chiki0 STRING_Old_Hungarian0 @@ -614,6 +621,7 @@ const char PRIV(utt_names)[] = STRING_Ugaritic0 STRING_Unknown0 STRING_Vai0 + STRING_Wancho0 STRING_Warang_Citi0 STRING_Xan0 STRING_Xps0 @@ -669,158 +677,162 @@ const ucp_type_table PRIV(utt)[] = { { 299, PT_SC, ucp_Duployan }, { 308, PT_SC, ucp_Egyptian_Hieroglyphs }, { 329, PT_SC, ucp_Elbasan }, - { 337, PT_SC, ucp_Ethiopic }, - { 346, PT_SC, ucp_Georgian }, - { 355, PT_SC, ucp_Glagolitic }, - { 366, PT_SC, ucp_Gothic }, - { 373, PT_SC, ucp_Grantha }, - { 381, PT_SC, ucp_Greek }, - { 387, PT_SC, ucp_Gujarati }, - { 396, PT_SC, ucp_Gunjala_Gondi }, - { 410, PT_SC, ucp_Gurmukhi }, - { 419, PT_SC, ucp_Han }, - { 423, PT_SC, ucp_Hangul }, - { 430, PT_SC, ucp_Hanifi_Rohingya }, - { 446, PT_SC, ucp_Hanunoo }, - { 454, PT_SC, ucp_Hatran }, - { 461, PT_SC, ucp_Hebrew }, - { 468, PT_SC, ucp_Hiragana }, - { 477, PT_SC, ucp_Imperial_Aramaic }, - { 494, PT_SC, ucp_Inherited }, - { 504, PT_SC, ucp_Inscriptional_Pahlavi }, - { 526, PT_SC, ucp_Inscriptional_Parthian }, - { 549, PT_SC, ucp_Javanese }, - { 558, PT_SC, ucp_Kaithi }, - { 565, PT_SC, ucp_Kannada }, - { 573, PT_SC, ucp_Katakana }, - { 582, PT_SC, ucp_Kayah_Li }, - { 591, PT_SC, ucp_Kharoshthi }, - { 602, PT_SC, ucp_Khmer }, - { 608, PT_SC, ucp_Khojki }, - { 615, PT_SC, ucp_Khudawadi }, - { 625, PT_GC, ucp_L }, - { 627, PT_LAMP, 0 }, - { 630, PT_SC, ucp_Lao }, - { 634, PT_SC, ucp_Latin }, - { 640, PT_SC, ucp_Lepcha }, - { 647, PT_SC, ucp_Limbu }, - { 653, PT_SC, ucp_Linear_A }, - { 662, PT_SC, ucp_Linear_B }, - { 671, PT_SC, ucp_Lisu }, - { 676, PT_PC, ucp_Ll }, - { 679, PT_PC, ucp_Lm }, - { 682, PT_PC, ucp_Lo }, - { 685, PT_PC, ucp_Lt }, - { 688, PT_PC, ucp_Lu }, - { 691, PT_SC, ucp_Lycian }, - { 698, PT_SC, ucp_Lydian }, - { 705, PT_GC, ucp_M }, - { 707, PT_SC, ucp_Mahajani }, - { 716, PT_SC, ucp_Makasar }, - { 724, PT_SC, ucp_Malayalam }, - { 734, PT_SC, ucp_Mandaic }, - { 742, PT_SC, ucp_Manichaean }, - { 753, PT_SC, ucp_Marchen }, - { 761, PT_SC, ucp_Masaram_Gondi }, - { 775, PT_PC, ucp_Mc }, - { 778, PT_PC, ucp_Me }, - { 781, PT_SC, ucp_Medefaidrin }, - { 793, PT_SC, ucp_Meetei_Mayek }, - { 806, PT_SC, ucp_Mende_Kikakui }, - { 820, PT_SC, ucp_Meroitic_Cursive }, - { 837, PT_SC, ucp_Meroitic_Hieroglyphs }, - { 858, PT_SC, ucp_Miao }, - { 863, PT_PC, ucp_Mn }, - { 866, PT_SC, ucp_Modi }, - { 871, PT_SC, ucp_Mongolian }, - { 881, PT_SC, ucp_Mro }, - { 885, PT_SC, ucp_Multani }, - { 893, PT_SC, ucp_Myanmar }, - { 901, PT_GC, ucp_N }, - { 903, PT_SC, ucp_Nabataean }, - { 913, PT_PC, ucp_Nd }, - { 916, PT_SC, ucp_New_Tai_Lue }, - { 928, PT_SC, ucp_Newa }, - { 933, PT_SC, ucp_Nko }, - { 937, PT_PC, ucp_Nl }, - { 940, PT_PC, ucp_No }, - { 943, PT_SC, ucp_Nushu }, - { 949, PT_SC, ucp_Ogham }, - { 955, PT_SC, ucp_Ol_Chiki }, - { 964, PT_SC, ucp_Old_Hungarian }, - { 978, PT_SC, ucp_Old_Italic }, - { 989, PT_SC, ucp_Old_North_Arabian }, - { 1007, PT_SC, ucp_Old_Permic }, - { 1018, PT_SC, ucp_Old_Persian }, - { 1030, PT_SC, ucp_Old_Sogdian }, - { 1042, PT_SC, ucp_Old_South_Arabian }, - { 1060, PT_SC, ucp_Old_Turkic }, - { 1071, PT_SC, ucp_Oriya }, - { 1077, PT_SC, ucp_Osage }, - { 1083, PT_SC, ucp_Osmanya }, - { 1091, PT_GC, ucp_P }, - { 1093, PT_SC, ucp_Pahawh_Hmong }, - { 1106, PT_SC, ucp_Palmyrene }, - { 1116, PT_SC, ucp_Pau_Cin_Hau }, - { 1128, PT_PC, ucp_Pc }, - { 1131, PT_PC, ucp_Pd }, - { 1134, PT_PC, ucp_Pe }, - { 1137, PT_PC, ucp_Pf }, - { 1140, PT_SC, ucp_Phags_Pa }, - { 1149, PT_SC, ucp_Phoenician }, - { 1160, PT_PC, ucp_Pi }, - { 1163, PT_PC, ucp_Po }, - { 1166, PT_PC, ucp_Ps }, - { 1169, PT_SC, ucp_Psalter_Pahlavi }, - { 1185, PT_SC, ucp_Rejang }, - { 1192, PT_SC, ucp_Runic }, - { 1198, PT_GC, ucp_S }, - { 1200, PT_SC, ucp_Samaritan }, - { 1210, PT_SC, ucp_Saurashtra }, - { 1221, PT_PC, ucp_Sc }, - { 1224, PT_SC, ucp_Sharada }, - { 1232, PT_SC, ucp_Shavian }, - { 1240, PT_SC, ucp_Siddham }, - { 1248, PT_SC, ucp_SignWriting }, - { 1260, PT_SC, ucp_Sinhala }, - { 1268, PT_PC, ucp_Sk }, - { 1271, PT_PC, ucp_Sm }, - { 1274, PT_PC, ucp_So }, - { 1277, PT_SC, ucp_Sogdian }, - { 1285, PT_SC, ucp_Sora_Sompeng }, - { 1298, PT_SC, ucp_Soyombo }, - { 1306, PT_SC, ucp_Sundanese }, - { 1316, PT_SC, ucp_Syloti_Nagri }, - { 1329, PT_SC, ucp_Syriac }, - { 1336, PT_SC, ucp_Tagalog }, - { 1344, PT_SC, ucp_Tagbanwa }, - { 1353, PT_SC, ucp_Tai_Le }, - { 1360, PT_SC, ucp_Tai_Tham }, - { 1369, PT_SC, ucp_Tai_Viet }, - { 1378, PT_SC, ucp_Takri }, - { 1384, PT_SC, ucp_Tamil }, - { 1390, PT_SC, ucp_Tangut }, - { 1397, PT_SC, ucp_Telugu }, - { 1404, PT_SC, ucp_Thaana }, - { 1411, PT_SC, ucp_Thai }, - { 1416, PT_SC, ucp_Tibetan }, - { 1424, PT_SC, ucp_Tifinagh }, - { 1433, PT_SC, ucp_Tirhuta }, - { 1441, PT_SC, ucp_Ugaritic }, - { 1450, PT_SC, ucp_Unknown }, - { 1458, PT_SC, ucp_Vai }, - { 1462, PT_SC, ucp_Warang_Citi }, - { 1474, PT_ALNUM, 0 }, - { 1478, PT_PXSPACE, 0 }, - { 1482, PT_SPACE, 0 }, - { 1486, PT_UCNC, 0 }, - { 1490, PT_WORD, 0 }, - { 1494, PT_SC, ucp_Yi }, - { 1497, PT_GC, ucp_Z }, - { 1499, PT_SC, ucp_Zanabazar_Square }, - { 1516, PT_PC, ucp_Zl }, - { 1519, PT_PC, ucp_Zp }, - { 1522, PT_PC, ucp_Zs } + { 337, PT_SC, ucp_Elymaic }, + { 345, PT_SC, ucp_Ethiopic }, + { 354, PT_SC, ucp_Georgian }, + { 363, PT_SC, ucp_Glagolitic }, + { 374, PT_SC, ucp_Gothic }, + { 381, PT_SC, ucp_Grantha }, + { 389, PT_SC, ucp_Greek }, + { 395, PT_SC, ucp_Gujarati }, + { 404, PT_SC, ucp_Gunjala_Gondi }, + { 418, PT_SC, ucp_Gurmukhi }, + { 427, PT_SC, ucp_Han }, + { 431, PT_SC, ucp_Hangul }, + { 438, PT_SC, ucp_Hanifi_Rohingya }, + { 454, PT_SC, ucp_Hanunoo }, + { 462, PT_SC, ucp_Hatran }, + { 469, PT_SC, ucp_Hebrew }, + { 476, PT_SC, ucp_Hiragana }, + { 485, PT_SC, ucp_Imperial_Aramaic }, + { 502, PT_SC, ucp_Inherited }, + { 512, PT_SC, ucp_Inscriptional_Pahlavi }, + { 534, PT_SC, ucp_Inscriptional_Parthian }, + { 557, PT_SC, ucp_Javanese }, + { 566, PT_SC, ucp_Kaithi }, + { 573, PT_SC, ucp_Kannada }, + { 581, PT_SC, ucp_Katakana }, + { 590, PT_SC, ucp_Kayah_Li }, + { 599, PT_SC, ucp_Kharoshthi }, + { 610, PT_SC, ucp_Khmer }, + { 616, PT_SC, ucp_Khojki }, + { 623, PT_SC, ucp_Khudawadi }, + { 633, PT_GC, ucp_L }, + { 635, PT_LAMP, 0 }, + { 638, PT_SC, ucp_Lao }, + { 642, PT_SC, ucp_Latin }, + { 648, PT_SC, ucp_Lepcha }, + { 655, PT_SC, ucp_Limbu }, + { 661, PT_SC, ucp_Linear_A }, + { 670, PT_SC, ucp_Linear_B }, + { 679, PT_SC, ucp_Lisu }, + { 684, PT_PC, ucp_Ll }, + { 687, PT_PC, ucp_Lm }, + { 690, PT_PC, ucp_Lo }, + { 693, PT_PC, ucp_Lt }, + { 696, PT_PC, ucp_Lu }, + { 699, PT_SC, ucp_Lycian }, + { 706, PT_SC, ucp_Lydian }, + { 713, PT_GC, ucp_M }, + { 715, PT_SC, ucp_Mahajani }, + { 724, PT_SC, ucp_Makasar }, + { 732, PT_SC, ucp_Malayalam }, + { 742, PT_SC, ucp_Mandaic }, + { 750, PT_SC, ucp_Manichaean }, + { 761, PT_SC, ucp_Marchen }, + { 769, PT_SC, ucp_Masaram_Gondi }, + { 783, PT_PC, ucp_Mc }, + { 786, PT_PC, ucp_Me }, + { 789, PT_SC, ucp_Medefaidrin }, + { 801, PT_SC, ucp_Meetei_Mayek }, + { 814, PT_SC, ucp_Mende_Kikakui }, + { 828, PT_SC, ucp_Meroitic_Cursive }, + { 845, PT_SC, ucp_Meroitic_Hieroglyphs }, + { 866, PT_SC, ucp_Miao }, + { 871, PT_PC, ucp_Mn }, + { 874, PT_SC, ucp_Modi }, + { 879, PT_SC, ucp_Mongolian }, + { 889, PT_SC, ucp_Mro }, + { 893, PT_SC, ucp_Multani }, + { 901, PT_SC, ucp_Myanmar }, + { 909, PT_GC, ucp_N }, + { 911, PT_SC, ucp_Nabataean }, + { 921, PT_SC, ucp_Nandinagari }, + { 933, PT_PC, ucp_Nd }, + { 936, PT_SC, ucp_New_Tai_Lue }, + { 948, PT_SC, ucp_Newa }, + { 953, PT_SC, ucp_Nko }, + { 957, PT_PC, ucp_Nl }, + { 960, PT_PC, ucp_No }, + { 963, PT_SC, ucp_Nushu }, + { 969, PT_SC, ucp_Nyiakeng_Puachue_Hmong }, + { 992, PT_SC, ucp_Ogham }, + { 998, PT_SC, ucp_Ol_Chiki }, + { 1007, PT_SC, ucp_Old_Hungarian }, + { 1021, PT_SC, ucp_Old_Italic }, + { 1032, PT_SC, ucp_Old_North_Arabian }, + { 1050, PT_SC, ucp_Old_Permic }, + { 1061, PT_SC, ucp_Old_Persian }, + { 1073, PT_SC, ucp_Old_Sogdian }, + { 1085, PT_SC, ucp_Old_South_Arabian }, + { 1103, PT_SC, ucp_Old_Turkic }, + { 1114, PT_SC, ucp_Oriya }, + { 1120, PT_SC, ucp_Osage }, + { 1126, PT_SC, ucp_Osmanya }, + { 1134, PT_GC, ucp_P }, + { 1136, PT_SC, ucp_Pahawh_Hmong }, + { 1149, PT_SC, ucp_Palmyrene }, + { 1159, PT_SC, ucp_Pau_Cin_Hau }, + { 1171, PT_PC, ucp_Pc }, + { 1174, PT_PC, ucp_Pd }, + { 1177, PT_PC, ucp_Pe }, + { 1180, PT_PC, ucp_Pf }, + { 1183, PT_SC, ucp_Phags_Pa }, + { 1192, PT_SC, ucp_Phoenician }, + { 1203, PT_PC, ucp_Pi }, + { 1206, PT_PC, ucp_Po }, + { 1209, PT_PC, ucp_Ps }, + { 1212, PT_SC, ucp_Psalter_Pahlavi }, + { 1228, PT_SC, ucp_Rejang }, + { 1235, PT_SC, ucp_Runic }, + { 1241, PT_GC, ucp_S }, + { 1243, PT_SC, ucp_Samaritan }, + { 1253, PT_SC, ucp_Saurashtra }, + { 1264, PT_PC, ucp_Sc }, + { 1267, PT_SC, ucp_Sharada }, + { 1275, PT_SC, ucp_Shavian }, + { 1283, PT_SC, ucp_Siddham }, + { 1291, PT_SC, ucp_SignWriting }, + { 1303, PT_SC, ucp_Sinhala }, + { 1311, PT_PC, ucp_Sk }, + { 1314, PT_PC, ucp_Sm }, + { 1317, PT_PC, ucp_So }, + { 1320, PT_SC, ucp_Sogdian }, + { 1328, PT_SC, ucp_Sora_Sompeng }, + { 1341, PT_SC, ucp_Soyombo }, + { 1349, PT_SC, ucp_Sundanese }, + { 1359, PT_SC, ucp_Syloti_Nagri }, + { 1372, PT_SC, ucp_Syriac }, + { 1379, PT_SC, ucp_Tagalog }, + { 1387, PT_SC, ucp_Tagbanwa }, + { 1396, PT_SC, ucp_Tai_Le }, + { 1403, PT_SC, ucp_Tai_Tham }, + { 1412, PT_SC, ucp_Tai_Viet }, + { 1421, PT_SC, ucp_Takri }, + { 1427, PT_SC, ucp_Tamil }, + { 1433, PT_SC, ucp_Tangut }, + { 1440, PT_SC, ucp_Telugu }, + { 1447, PT_SC, ucp_Thaana }, + { 1454, PT_SC, ucp_Thai }, + { 1459, PT_SC, ucp_Tibetan }, + { 1467, PT_SC, ucp_Tifinagh }, + { 1476, PT_SC, ucp_Tirhuta }, + { 1484, PT_SC, ucp_Ugaritic }, + { 1493, PT_SC, ucp_Unknown }, + { 1501, PT_SC, ucp_Vai }, + { 1505, PT_SC, ucp_Wancho }, + { 1512, PT_SC, ucp_Warang_Citi }, + { 1524, PT_ALNUM, 0 }, + { 1528, PT_PXSPACE, 0 }, + { 1532, PT_SPACE, 0 }, + { 1536, PT_UCNC, 0 }, + { 1540, PT_WORD, 0 }, + { 1544, PT_SC, ucp_Yi }, + { 1547, PT_GC, ucp_Z }, + { 1549, PT_SC, ucp_Zanabazar_Square }, + { 1566, PT_PC, ucp_Zl }, + { 1569, PT_PC, ucp_Zp }, + { 1572, PT_PC, ucp_Zs } }; const size_t PRIV(utt_size) = sizeof(PRIV(utt)) / sizeof(ucp_type_table); diff --git a/ext/pcre/pcre2lib/pcre2_ucd.c b/ext/pcre/pcre2lib/pcre2_ucd.c index cc53c24001825..55ba03bd43304 100644 --- a/ext/pcre/pcre2lib/pcre2_ucd.c +++ b/ext/pcre/pcre2lib/pcre2_ucd.c @@ -20,7 +20,7 @@ needed. */ /* Unicode character database. */ /* This file was autogenerated by the MultiStage2.py script. */ -/* Total size: 97152 bytes, block size: 128. */ +/* Total size: 99316 bytes, block size: 128. */ /* The tables herein are needed only when UCP support is built, and in PCRE2 that happens automatically with UTF support. @@ -39,7 +39,7 @@ const uint16_t PRIV(ucd_stage2)[] = {0}; const uint32_t PRIV(ucd_caseless_sets)[] = {0}; #else -const char *PRIV(unicode_version) = "11.0.0"; +const char *PRIV(unicode_version) = "12.1.0"; /* If the 32-bit library is run in non-32-bit mode, character values greater than 0x10ffff may be encountered. For these we set up a @@ -116,7 +116,7 @@ set of decimal digits. It is used to ensure that all the digits in a script run come from the same set. */ const uint32_t PRIV(ucd_digit_sets)[] = { - 61, /* Number of subsequent values */ + 63, /* Number of subsequent values */ 0x00039, 0x00669, 0x006f9, 0x007c9, 0x0096f, 0x009ef, 0x00a6f, 0x00aef, 0x00b6f, 0x00bef, 0x00c6f, 0x00cef, 0x00d6f, 0x00def, 0x00e59, 0x00ed9, 0x00f29, 0x01049, 0x01099, 0x017e9, 0x01819, 0x0194f, 0x019d9, 0x01a89, @@ -124,7 +124,7 @@ const uint32_t PRIV(ucd_digit_sets)[] = { 0x0a9d9, 0x0a9f9, 0x0aa59, 0x0abf9, 0x0ff19, 0x104a9, 0x10d39, 0x1106f, 0x110f9, 0x1113f, 0x111d9, 0x112f9, 0x11459, 0x114d9, 0x11659, 0x116c9, 0x11739, 0x118e9, 0x11c59, 0x11d59, 0x11da9, 0x16a69, 0x16b59, 0x1d7d7, - 0x1d7e1, 0x1d7eb, 0x1d7f5, 0x1d7ff, 0x1e959, + 0x1d7e1, 0x1d7eb, 0x1d7f5, 0x1d7ff, 0x1e149, 0x1e2f9, 0x1e959, }; /* This vector is a list of lists of scripts for the Script Extension @@ -145,38 +145,42 @@ const uint8_t PRIV(ucd_script_sets)[] = { /* 31 */ 13, 34, 0, /* 34 */ 13, 118, 0, /* 37 */ 15, 107, 0, - /* 40 */ 15, 100, 0, - /* 43 */ 15, 54, 0, - /* 46 */ 17, 34, 0, - /* 49 */ 107, 54, 0, - /* 52 */ 21, 108, 0, - /* 55 */ 22, 129, 0, - /* 58 */ 27, 30, 0, - /* 61 */ 38, 65, 0, - /* 64 */ 1, 50, 56, 0, - /* 68 */ 3, 96, 49, 0, - /* 72 */ 96, 39, 53, 0, - /* 76 */ 12, 110, 36, 0, - /* 80 */ 15, 107, 29, 0, - /* 84 */ 15, 107, 34, 0, - /* 88 */ 23, 27, 30, 0, - /* 92 */ 69, 34, 39, 0, - /* 96 */ 1, 144, 50, 56, 0, - /* 101 */ 3, 15, 107, 29, 0, - /* 106 */ 7, 25, 52, 51, 0, - /* 111 */ 15, 142, 85, 111, 0, - /* 116 */ 4, 24, 23, 27, 30, 0, - /* 122 */ 4, 24, 23, 27, 30, 61, 0, - /* 129 */ 15, 29, 37, 44, 54, 55, 0, - /* 136 */ 132, 1, 95, 112, 121, 144, 148, 50, 0, - /* 145 */ 15, 142, 21, 22, 108, 85, 111, 114, 109, 102, 124, 0, - /* 157 */ 3, 15, 107, 21, 22, 29, 34, 37, 44, 54, 55, 124, 0, - /* 170 */ 15, 142, 21, 22, 108, 29, 85, 111, 114, 109, 102, 124, 0, - /* 183 */ 3, 15, 107, 21, 22, 29, 34, 37, 44, 100, 54, 55, 124, 0, - /* 197 */ 15, 142, 21, 22, 108, 29, 85, 111, 37, 114, 109, 102, 124, 0, - /* 211 */ 3, 15, 142, 143, 107, 21, 22, 29, 111, 37, 44, 109, 48, 49, 102, 54, 55, 124, 0, - /* 230 */ 3, 15, 142, 143, 107, 21, 22, 29, 35, 111, 37, 44, 109, 48, 49, 102, 54, 55, 124, 0, - /* 250 */ + /* 40 */ 15, 150, 0, + /* 43 */ 15, 100, 0, + /* 46 */ 15, 54, 0, + /* 49 */ 17, 34, 0, + /* 52 */ 107, 54, 0, + /* 55 */ 21, 108, 0, + /* 58 */ 22, 129, 0, + /* 61 */ 27, 30, 0, + /* 64 */ 29, 150, 0, + /* 67 */ 34, 38, 0, + /* 70 */ 38, 65, 0, + /* 73 */ 1, 50, 56, 0, + /* 77 */ 3, 96, 49, 0, + /* 81 */ 96, 39, 53, 0, + /* 85 */ 12, 110, 36, 0, + /* 89 */ 15, 107, 29, 0, + /* 93 */ 15, 107, 34, 0, + /* 97 */ 23, 27, 30, 0, + /* 101 */ 69, 34, 39, 0, + /* 105 */ 1, 144, 50, 56, 0, + /* 110 */ 3, 15, 107, 29, 0, + /* 115 */ 7, 25, 52, 51, 0, + /* 120 */ 15, 142, 85, 111, 0, + /* 125 */ 4, 24, 23, 27, 30, 0, + /* 131 */ 4, 24, 23, 27, 30, 61, 0, + /* 138 */ 15, 29, 37, 44, 54, 55, 0, + /* 145 */ 132, 1, 95, 112, 121, 144, 148, 50, 0, + /* 154 */ 3, 15, 107, 29, 150, 44, 55, 124, 0, + /* 163 */ 15, 142, 21, 22, 108, 85, 111, 114, 109, 102, 124, 0, + /* 175 */ 3, 15, 107, 21, 22, 29, 34, 37, 44, 54, 55, 124, 0, + /* 188 */ 3, 15, 107, 21, 22, 29, 34, 37, 44, 100, 54, 55, 124, 0, + /* 202 */ 15, 142, 21, 22, 108, 29, 85, 111, 114, 150, 109, 102, 124, 0, + /* 216 */ 15, 142, 21, 22, 108, 29, 85, 111, 37, 114, 150, 109, 102, 124, 0, + /* 231 */ 3, 15, 142, 143, 138, 107, 21, 22, 29, 111, 37, 150, 44, 109, 48, 49, 102, 54, 55, 124, 0, + /* 252 */ 3, 15, 142, 143, 138, 107, 21, 22, 29, 35, 111, 37, 150, 44, 109, 48, 49, 102, 54, 55, 124, 0, + /* 274 */ }; /* These are the main two-stage UCD tables. The fields in each record are: @@ -185,7 +189,7 @@ offset to multichar other cases or zero (8 bits), offset to other case or zero (32 bits, signed), script extension (16 bits, signed), and a dummy 16-bit field to make the whole thing a multiple of 4 bytes. */ -const ucd_record PRIV(ucd_records)[] = { /* 11136 bytes, record size 12 */ +const ucd_record PRIV(ucd_records)[] = { /* 11508 bytes, record size 12 */ { 10, 0, 2, 0, 0, 10, 256, }, /* 0 */ { 10, 0, 2, 0, 0, 10, 0, }, /* 1 */ { 10, 0, 1, 0, 0, 10, 0, }, /* 2 */ @@ -288,832 +292,863 @@ const ucd_record PRIV(ucd_records)[] = { /* 11136 bytes, record size 12 */ { 34, 5, 12, 0, -214, 34, 0, }, /* 99 */ { 34, 5, 12, 0, 10727, 34, 0, }, /* 100 */ { 34, 5, 12, 0, -218, 34, 0, }, /* 101 */ - { 34, 5, 12, 0, 42282, 34, 0, }, /* 102 */ - { 34, 5, 12, 0, -69, 34, 0, }, /* 103 */ - { 34, 5, 12, 0, -217, 34, 0, }, /* 104 */ - { 34, 5, 12, 0, -71, 34, 0, }, /* 105 */ - { 34, 5, 12, 0, -219, 34, 0, }, /* 106 */ - { 34, 5, 12, 0, 42261, 34, 0, }, /* 107 */ - { 34, 5, 12, 0, 42258, 34, 0, }, /* 108 */ - { 34, 6, 12, 0, 0, 34, 0, }, /* 109 */ - { 10, 6, 12, 0, 0, 10, 0, }, /* 110 */ - { 4, 24, 12, 0, 0, 4, 0, }, /* 111 */ - { 28, 12, 3, 0, 0, 28, 0, }, /* 112 */ - { 28, 12, 3, 0, 0, 20, 0, }, /* 113 */ - { 28, 12, 3, 21, 116, 20, 0, }, /* 114 */ - { 28, 12, 3, 0, 0, 34, 0, }, /* 115 */ - { 20, 9, 12, 0, 1, 20, 0, }, /* 116 */ - { 20, 5, 12, 0, -1, 20, 0, }, /* 117 */ - { 20, 24, 12, 0, 0, 20, 0, }, /* 118 */ - { 0, 2, 12, 0, 0, 0, 0, }, /* 119 */ - { 20, 6, 12, 0, 0, 20, 0, }, /* 120 */ - { 20, 5, 12, 0, 130, 20, 0, }, /* 121 */ - { 20, 9, 12, 0, 116, 20, 0, }, /* 122 */ - { 20, 9, 12, 0, 38, 20, 0, }, /* 123 */ - { 20, 9, 12, 0, 37, 20, 0, }, /* 124 */ - { 20, 9, 12, 0, 64, 20, 0, }, /* 125 */ - { 20, 9, 12, 0, 63, 20, 0, }, /* 126 */ - { 20, 5, 12, 0, 0, 20, 0, }, /* 127 */ - { 20, 9, 12, 0, 32, 20, 0, }, /* 128 */ - { 20, 9, 12, 34, 32, 20, 0, }, /* 129 */ - { 20, 9, 12, 59, 32, 20, 0, }, /* 130 */ - { 20, 9, 12, 38, 32, 20, 0, }, /* 131 */ - { 20, 9, 12, 21, 32, 20, 0, }, /* 132 */ - { 20, 9, 12, 51, 32, 20, 0, }, /* 133 */ - { 20, 9, 12, 26, 32, 20, 0, }, /* 134 */ - { 20, 9, 12, 47, 32, 20, 0, }, /* 135 */ - { 20, 9, 12, 55, 32, 20, 0, }, /* 136 */ - { 20, 9, 12, 30, 32, 20, 0, }, /* 137 */ - { 20, 9, 12, 43, 32, 20, 0, }, /* 138 */ - { 20, 9, 12, 96, 32, 20, 0, }, /* 139 */ - { 20, 5, 12, 0, -38, 20, 0, }, /* 140 */ - { 20, 5, 12, 0, -37, 20, 0, }, /* 141 */ - { 20, 5, 12, 0, -32, 20, 0, }, /* 142 */ - { 20, 5, 12, 34, -32, 20, 0, }, /* 143 */ - { 20, 5, 12, 59, -32, 20, 0, }, /* 144 */ - { 20, 5, 12, 38, -32, 20, 0, }, /* 145 */ - { 20, 5, 12, 21, -116, 20, 0, }, /* 146 */ - { 20, 5, 12, 51, -32, 20, 0, }, /* 147 */ - { 20, 5, 12, 26, -775, 20, 0, }, /* 148 */ - { 20, 5, 12, 47, -32, 20, 0, }, /* 149 */ - { 20, 5, 12, 55, -32, 20, 0, }, /* 150 */ - { 20, 5, 12, 30, 1, 20, 0, }, /* 151 */ - { 20, 5, 12, 30, -32, 20, 0, }, /* 152 */ - { 20, 5, 12, 43, -32, 20, 0, }, /* 153 */ - { 20, 5, 12, 96, -32, 20, 0, }, /* 154 */ - { 20, 5, 12, 0, -64, 20, 0, }, /* 155 */ - { 20, 5, 12, 0, -63, 20, 0, }, /* 156 */ - { 20, 9, 12, 0, 8, 20, 0, }, /* 157 */ - { 20, 5, 12, 34, -30, 20, 0, }, /* 158 */ - { 20, 5, 12, 38, -25, 20, 0, }, /* 159 */ - { 20, 9, 12, 0, 0, 20, 0, }, /* 160 */ - { 20, 5, 12, 43, -15, 20, 0, }, /* 161 */ - { 20, 5, 12, 47, -22, 20, 0, }, /* 162 */ - { 20, 5, 12, 0, -8, 20, 0, }, /* 163 */ - { 11, 9, 12, 0, 1, 11, 0, }, /* 164 */ - { 11, 5, 12, 0, -1, 11, 0, }, /* 165 */ - { 20, 5, 12, 51, -54, 20, 0, }, /* 166 */ - { 20, 5, 12, 55, -48, 20, 0, }, /* 167 */ - { 20, 5, 12, 0, 7, 20, 0, }, /* 168 */ - { 20, 5, 12, 0, -116, 20, 0, }, /* 169 */ - { 20, 9, 12, 38, -60, 20, 0, }, /* 170 */ - { 20, 5, 12, 59, -64, 20, 0, }, /* 171 */ - { 20, 25, 12, 0, 0, 20, 0, }, /* 172 */ - { 20, 9, 12, 0, -7, 20, 0, }, /* 173 */ - { 20, 9, 12, 0, -130, 20, 0, }, /* 174 */ - { 13, 9, 12, 0, 80, 13, 0, }, /* 175 */ - { 13, 9, 12, 0, 32, 13, 0, }, /* 176 */ - { 13, 9, 12, 63, 32, 13, 0, }, /* 177 */ - { 13, 9, 12, 67, 32, 13, 0, }, /* 178 */ - { 13, 9, 12, 71, 32, 13, 0, }, /* 179 */ - { 13, 9, 12, 75, 32, 13, 0, }, /* 180 */ - { 13, 9, 12, 79, 32, 13, 0, }, /* 181 */ - { 13, 9, 12, 84, 32, 13, 0, }, /* 182 */ - { 13, 5, 12, 0, -32, 13, 0, }, /* 183 */ - { 13, 5, 12, 63, -32, 13, 0, }, /* 184 */ - { 13, 5, 12, 67, -32, 13, 0, }, /* 185 */ - { 13, 5, 12, 71, -32, 13, 0, }, /* 186 */ - { 13, 5, 12, 75, -32, 13, 0, }, /* 187 */ - { 13, 5, 12, 79, -32, 13, 0, }, /* 188 */ - { 13, 5, 12, 84, -32, 13, 0, }, /* 189 */ - { 13, 5, 12, 0, -80, 13, 0, }, /* 190 */ - { 13, 9, 12, 0, 1, 13, 0, }, /* 191 */ - { 13, 5, 12, 0, -1, 13, 0, }, /* 192 */ - { 13, 9, 12, 88, 1, 13, 0, }, /* 193 */ - { 13, 5, 12, 88, -1, 13, 0, }, /* 194 */ - { 13, 26, 12, 0, 0, 13, 0, }, /* 195 */ - { 13, 12, 3, 0, 0, -34, 0, }, /* 196 */ - { 13, 12, 3, 0, 0, -28, 0, }, /* 197 */ - { 28, 12, 3, 0, 0, -31, 0, }, /* 198 */ - { 13, 11, 3, 0, 0, 13, 0, }, /* 199 */ - { 13, 9, 12, 0, 15, 13, 0, }, /* 200 */ - { 13, 5, 12, 0, -15, 13, 0, }, /* 201 */ - { 2, 9, 12, 0, 48, 2, 0, }, /* 202 */ - { 2, 6, 12, 0, 0, 2, 0, }, /* 203 */ - { 2, 21, 12, 0, 0, 2, 0, }, /* 204 */ - { 2, 5, 12, 0, 0, 2, 0, }, /* 205 */ - { 2, 5, 12, 0, -48, 2, 0, }, /* 206 */ - { 10, 21, 12, 0, 0, -13, 0, }, /* 207 */ - { 2, 17, 12, 0, 0, 2, 0, }, /* 208 */ - { 2, 26, 12, 0, 0, 2, 0, }, /* 209 */ - { 2, 23, 12, 0, 0, 2, 0, }, /* 210 */ - { 26, 12, 3, 0, 0, 26, 0, }, /* 211 */ - { 26, 17, 12, 0, 0, 26, 0, }, /* 212 */ - { 26, 21, 12, 0, 0, 26, 0, }, /* 213 */ - { 26, 7, 12, 0, 0, 26, 0, }, /* 214 */ - { 1, 1, 4, 0, 0, 1, 0, }, /* 215 */ - { 10, 1, 4, 0, 0, 10, 0, }, /* 216 */ - { 1, 25, 12, 0, 0, 1, 0, }, /* 217 */ - { 1, 21, 12, 0, 0, 1, 0, }, /* 218 */ - { 1, 23, 12, 0, 0, 1, 0, }, /* 219 */ - { 10, 21, 12, 0, 0, -96, 0, }, /* 220 */ - { 1, 26, 12, 0, 0, 1, 0, }, /* 221 */ - { 1, 12, 3, 0, 0, 1, 0, }, /* 222 */ - { 1, 1, 2, 0, 0, -64, 0, }, /* 223 */ - { 1, 7, 12, 0, 0, 1, 0, }, /* 224 */ - { 10, 6, 12, 0, 0, -136, 0, }, /* 225 */ - { 28, 12, 3, 0, 0, -7, 0, }, /* 226 */ - { 1, 13, 12, 0, 0, -10, 0, }, /* 227 */ - { 1, 21, 12, 0, 0, -4, 0, }, /* 228 */ - { 1, 6, 12, 0, 0, 1, 0, }, /* 229 */ - { 1, 13, 12, 0, 0, 1, 0, }, /* 230 */ - { 50, 21, 12, 0, 0, 50, 0, }, /* 231 */ - { 50, 1, 4, 0, 0, 50, 0, }, /* 232 */ - { 50, 7, 12, 0, 0, 50, 0, }, /* 233 */ - { 50, 12, 3, 0, 0, 50, 0, }, /* 234 */ - { 56, 7, 12, 0, 0, 56, 0, }, /* 235 */ - { 56, 12, 3, 0, 0, 56, 0, }, /* 236 */ - { 64, 13, 12, 0, 0, 64, 0, }, /* 237 */ - { 64, 7, 12, 0, 0, 64, 0, }, /* 238 */ - { 64, 12, 3, 0, 0, 64, 0, }, /* 239 */ - { 64, 6, 12, 0, 0, 64, 0, }, /* 240 */ - { 64, 26, 12, 0, 0, 64, 0, }, /* 241 */ - { 64, 21, 12, 0, 0, 64, 0, }, /* 242 */ - { 64, 23, 12, 0, 0, 64, 0, }, /* 243 */ - { 90, 7, 12, 0, 0, 90, 0, }, /* 244 */ - { 90, 12, 3, 0, 0, 90, 0, }, /* 245 */ - { 90, 6, 12, 0, 0, 90, 0, }, /* 246 */ - { 90, 21, 12, 0, 0, 90, 0, }, /* 247 */ - { 95, 7, 12, 0, 0, 95, 0, }, /* 248 */ - { 95, 12, 3, 0, 0, 95, 0, }, /* 249 */ - { 95, 21, 12, 0, 0, 95, 0, }, /* 250 */ - { 15, 12, 3, 0, 0, 15, 0, }, /* 251 */ - { 15, 10, 5, 0, 0, 15, 0, }, /* 252 */ - { 15, 7, 12, 0, 0, 15, 0, }, /* 253 */ - { 28, 12, 3, 0, 0, -183, 0, }, /* 254 */ - { 28, 12, 3, 0, 0, -157, 0, }, /* 255 */ - { 10, 21, 12, 0, 0, -211, 0, }, /* 256 */ - { 10, 21, 12, 0, 0, -230, 0, }, /* 257 */ - { 15, 13, 12, 0, 0, -111, 0, }, /* 258 */ - { 15, 21, 12, 0, 0, 15, 0, }, /* 259 */ - { 15, 6, 12, 0, 0, 15, 0, }, /* 260 */ - { 3, 7, 12, 0, 0, 3, 0, }, /* 261 */ - { 3, 12, 3, 0, 0, 3, 0, }, /* 262 */ - { 3, 10, 5, 0, 0, 3, 0, }, /* 263 */ - { 3, 10, 3, 0, 0, 3, 0, }, /* 264 */ - { 3, 13, 12, 0, 0, -68, 0, }, /* 265 */ - { 3, 23, 12, 0, 0, 3, 0, }, /* 266 */ - { 3, 15, 12, 0, 0, 3, 0, }, /* 267 */ - { 3, 26, 12, 0, 0, 3, 0, }, /* 268 */ - { 3, 21, 12, 0, 0, 3, 0, }, /* 269 */ - { 22, 12, 3, 0, 0, 22, 0, }, /* 270 */ - { 22, 10, 5, 0, 0, 22, 0, }, /* 271 */ - { 22, 7, 12, 0, 0, 22, 0, }, /* 272 */ - { 22, 13, 12, 0, 0, -55, 0, }, /* 273 */ - { 22, 21, 12, 0, 0, 22, 0, }, /* 274 */ - { 21, 12, 3, 0, 0, 21, 0, }, /* 275 */ - { 21, 10, 5, 0, 0, 21, 0, }, /* 276 */ - { 21, 7, 12, 0, 0, 21, 0, }, /* 277 */ - { 21, 13, 12, 0, 0, -52, 0, }, /* 278 */ - { 21, 21, 12, 0, 0, 21, 0, }, /* 279 */ - { 21, 23, 12, 0, 0, 21, 0, }, /* 280 */ - { 44, 12, 3, 0, 0, 44, 0, }, /* 281 */ - { 44, 10, 5, 0, 0, 44, 0, }, /* 282 */ - { 44, 7, 12, 0, 0, 44, 0, }, /* 283 */ - { 44, 10, 3, 0, 0, 44, 0, }, /* 284 */ - { 44, 13, 12, 0, 0, 44, 0, }, /* 285 */ - { 44, 26, 12, 0, 0, 44, 0, }, /* 286 */ - { 44, 15, 12, 0, 0, 44, 0, }, /* 287 */ - { 54, 12, 3, 0, 0, 54, 0, }, /* 288 */ - { 54, 7, 12, 0, 0, 54, 0, }, /* 289 */ - { 54, 10, 3, 0, 0, 54, 0, }, /* 290 */ - { 54, 10, 5, 0, 0, 54, 0, }, /* 291 */ - { 54, 13, 12, 0, 0, -49, 0, }, /* 292 */ - { 54, 15, 12, 0, 0, -49, 0, }, /* 293 */ - { 54, 26, 12, 0, 0, -49, 0, }, /* 294 */ - { 54, 26, 12, 0, 0, 54, 0, }, /* 295 */ - { 54, 23, 12, 0, 0, 54, 0, }, /* 296 */ - { 55, 12, 3, 0, 0, 55, 0, }, /* 297 */ - { 55, 10, 5, 0, 0, 55, 0, }, /* 298 */ - { 55, 7, 12, 0, 0, 55, 0, }, /* 299 */ - { 55, 13, 12, 0, 0, 55, 0, }, /* 300 */ - { 55, 15, 12, 0, 0, 55, 0, }, /* 301 */ - { 55, 26, 12, 0, 0, 55, 0, }, /* 302 */ - { 29, 7, 12, 0, 0, 29, 0, }, /* 303 */ - { 29, 12, 3, 0, 0, 29, 0, }, /* 304 */ - { 29, 10, 5, 0, 0, 29, 0, }, /* 305 */ - { 29, 21, 12, 0, 0, 29, 0, }, /* 306 */ - { 29, 10, 3, 0, 0, 29, 0, }, /* 307 */ - { 29, 13, 12, 0, 0, 29, 0, }, /* 308 */ - { 37, 12, 3, 0, 0, 37, 0, }, /* 309 */ - { 37, 10, 5, 0, 0, 37, 0, }, /* 310 */ - { 37, 7, 12, 0, 0, 37, 0, }, /* 311 */ - { 37, 10, 3, 0, 0, 37, 0, }, /* 312 */ - { 37, 7, 4, 0, 0, 37, 0, }, /* 313 */ - { 37, 26, 12, 0, 0, 37, 0, }, /* 314 */ - { 37, 15, 12, 0, 0, 37, 0, }, /* 315 */ - { 37, 13, 12, 0, 0, 37, 0, }, /* 316 */ - { 48, 10, 5, 0, 0, 48, 0, }, /* 317 */ - { 48, 7, 12, 0, 0, 48, 0, }, /* 318 */ - { 48, 12, 3, 0, 0, 48, 0, }, /* 319 */ - { 48, 10, 3, 0, 0, 48, 0, }, /* 320 */ - { 48, 13, 12, 0, 0, 48, 0, }, /* 321 */ - { 48, 21, 12, 0, 0, 48, 0, }, /* 322 */ - { 57, 7, 12, 0, 0, 57, 0, }, /* 323 */ - { 57, 12, 3, 0, 0, 57, 0, }, /* 324 */ - { 57, 7, 5, 0, 0, 57, 0, }, /* 325 */ - { 57, 6, 12, 0, 0, 57, 0, }, /* 326 */ - { 57, 21, 12, 0, 0, 57, 0, }, /* 327 */ - { 57, 13, 12, 0, 0, 57, 0, }, /* 328 */ - { 33, 7, 12, 0, 0, 33, 0, }, /* 329 */ - { 33, 12, 3, 0, 0, 33, 0, }, /* 330 */ - { 33, 7, 5, 0, 0, 33, 0, }, /* 331 */ - { 33, 6, 12, 0, 0, 33, 0, }, /* 332 */ - { 33, 13, 12, 0, 0, 33, 0, }, /* 333 */ - { 58, 7, 12, 0, 0, 58, 0, }, /* 334 */ - { 58, 26, 12, 0, 0, 58, 0, }, /* 335 */ - { 58, 21, 12, 0, 0, 58, 0, }, /* 336 */ - { 58, 12, 3, 0, 0, 58, 0, }, /* 337 */ - { 58, 13, 12, 0, 0, 58, 0, }, /* 338 */ - { 58, 15, 12, 0, 0, 58, 0, }, /* 339 */ - { 58, 22, 12, 0, 0, 58, 0, }, /* 340 */ - { 58, 18, 12, 0, 0, 58, 0, }, /* 341 */ - { 58, 10, 5, 0, 0, 58, 0, }, /* 342 */ - { 39, 7, 12, 0, 0, 39, 0, }, /* 343 */ - { 39, 10, 12, 0, 0, 39, 0, }, /* 344 */ - { 39, 12, 3, 0, 0, 39, 0, }, /* 345 */ - { 39, 10, 5, 0, 0, 39, 0, }, /* 346 */ - { 39, 13, 12, 0, 0, -72, 0, }, /* 347 */ - { 39, 21, 12, 0, 0, 39, 0, }, /* 348 */ - { 39, 13, 12, 0, 0, 39, 0, }, /* 349 */ - { 39, 26, 12, 0, 0, 39, 0, }, /* 350 */ - { 17, 9, 12, 0, 7264, 17, 0, }, /* 351 */ - { 17, 5, 12, 0, 3008, 17, 0, }, /* 352 */ - { 10, 21, 12, 0, 0, -46, 0, }, /* 353 */ - { 17, 6, 12, 0, 0, 17, 0, }, /* 354 */ - { 24, 7, 6, 0, 0, 24, 0, }, /* 355 */ - { 24, 7, 7, 0, 0, 24, 0, }, /* 356 */ - { 24, 7, 8, 0, 0, 24, 0, }, /* 357 */ - { 16, 7, 12, 0, 0, 16, 0, }, /* 358 */ - { 16, 12, 3, 0, 0, 16, 0, }, /* 359 */ - { 16, 21, 12, 0, 0, 16, 0, }, /* 360 */ - { 16, 15, 12, 0, 0, 16, 0, }, /* 361 */ - { 16, 26, 12, 0, 0, 16, 0, }, /* 362 */ - { 9, 9, 12, 0, 38864, 9, 0, }, /* 363 */ - { 9, 9, 12, 0, 8, 9, 0, }, /* 364 */ - { 9, 5, 12, 0, -8, 9, 0, }, /* 365 */ - { 8, 17, 12, 0, 0, 8, 0, }, /* 366 */ - { 8, 7, 12, 0, 0, 8, 0, }, /* 367 */ - { 8, 21, 12, 0, 0, 8, 0, }, /* 368 */ - { 41, 29, 12, 0, 0, 41, 0, }, /* 369 */ - { 41, 7, 12, 0, 0, 41, 0, }, /* 370 */ - { 41, 22, 12, 0, 0, 41, 0, }, /* 371 */ - { 41, 18, 12, 0, 0, 41, 0, }, /* 372 */ - { 46, 7, 12, 0, 0, 46, 0, }, /* 373 */ - { 46, 14, 12, 0, 0, 46, 0, }, /* 374 */ - { 51, 7, 12, 0, 0, 51, 0, }, /* 375 */ - { 51, 12, 3, 0, 0, 51, 0, }, /* 376 */ - { 25, 7, 12, 0, 0, 25, 0, }, /* 377 */ - { 25, 12, 3, 0, 0, 25, 0, }, /* 378 */ - { 10, 21, 12, 0, 0, -106, 0, }, /* 379 */ - { 7, 7, 12, 0, 0, 7, 0, }, /* 380 */ - { 7, 12, 3, 0, 0, 7, 0, }, /* 381 */ - { 52, 7, 12, 0, 0, 52, 0, }, /* 382 */ - { 52, 12, 3, 0, 0, 52, 0, }, /* 383 */ - { 32, 7, 12, 0, 0, 32, 0, }, /* 384 */ - { 32, 12, 3, 0, 0, 32, 0, }, /* 385 */ - { 32, 10, 5, 0, 0, 32, 0, }, /* 386 */ - { 32, 21, 12, 0, 0, 32, 0, }, /* 387 */ - { 32, 6, 12, 0, 0, 32, 0, }, /* 388 */ - { 32, 23, 12, 0, 0, 32, 0, }, /* 389 */ - { 32, 13, 12, 0, 0, 32, 0, }, /* 390 */ - { 32, 15, 12, 0, 0, 32, 0, }, /* 391 */ - { 38, 21, 12, 0, 0, 38, 0, }, /* 392 */ - { 10, 21, 12, 0, 0, -61, 0, }, /* 393 */ - { 38, 17, 12, 0, 0, 38, 0, }, /* 394 */ - { 38, 12, 3, 0, 0, 38, 0, }, /* 395 */ - { 38, 1, 2, 0, 0, 38, 0, }, /* 396 */ - { 38, 13, 12, 0, 0, 38, 0, }, /* 397 */ - { 38, 7, 12, 0, 0, 38, 0, }, /* 398 */ - { 38, 6, 12, 0, 0, 38, 0, }, /* 399 */ - { 35, 7, 12, 0, 0, 35, 0, }, /* 400 */ - { 35, 12, 3, 0, 0, 35, 0, }, /* 401 */ - { 35, 10, 5, 0, 0, 35, 0, }, /* 402 */ - { 35, 26, 12, 0, 0, 35, 0, }, /* 403 */ - { 35, 21, 12, 0, 0, 35, 0, }, /* 404 */ - { 35, 13, 12, 0, 0, 35, 0, }, /* 405 */ - { 53, 7, 12, 0, 0, 53, 0, }, /* 406 */ - { 40, 7, 12, 0, 0, 40, 0, }, /* 407 */ - { 40, 13, 12, 0, 0, 40, 0, }, /* 408 */ - { 40, 15, 12, 0, 0, 40, 0, }, /* 409 */ - { 40, 26, 12, 0, 0, 40, 0, }, /* 410 */ - { 32, 26, 12, 0, 0, 32, 0, }, /* 411 */ - { 6, 7, 12, 0, 0, 6, 0, }, /* 412 */ - { 6, 12, 3, 0, 0, 6, 0, }, /* 413 */ - { 6, 10, 5, 0, 0, 6, 0, }, /* 414 */ - { 6, 21, 12, 0, 0, 6, 0, }, /* 415 */ - { 91, 7, 12, 0, 0, 91, 0, }, /* 416 */ - { 91, 10, 5, 0, 0, 91, 0, }, /* 417 */ - { 91, 12, 3, 0, 0, 91, 0, }, /* 418 */ - { 91, 10, 12, 0, 0, 91, 0, }, /* 419 */ - { 91, 13, 12, 0, 0, 91, 0, }, /* 420 */ - { 91, 21, 12, 0, 0, 91, 0, }, /* 421 */ - { 91, 6, 12, 0, 0, 91, 0, }, /* 422 */ - { 28, 11, 3, 0, 0, 28, 0, }, /* 423 */ - { 62, 12, 3, 0, 0, 62, 0, }, /* 424 */ - { 62, 10, 5, 0, 0, 62, 0, }, /* 425 */ - { 62, 7, 12, 0, 0, 62, 0, }, /* 426 */ - { 62, 13, 12, 0, 0, 62, 0, }, /* 427 */ - { 62, 21, 12, 0, 0, 62, 0, }, /* 428 */ - { 62, 26, 12, 0, 0, 62, 0, }, /* 429 */ - { 76, 12, 3, 0, 0, 76, 0, }, /* 430 */ - { 76, 10, 5, 0, 0, 76, 0, }, /* 431 */ - { 76, 7, 12, 0, 0, 76, 0, }, /* 432 */ - { 76, 13, 12, 0, 0, 76, 0, }, /* 433 */ - { 93, 7, 12, 0, 0, 93, 0, }, /* 434 */ - { 93, 12, 3, 0, 0, 93, 0, }, /* 435 */ - { 93, 10, 5, 0, 0, 93, 0, }, /* 436 */ - { 93, 21, 12, 0, 0, 93, 0, }, /* 437 */ - { 70, 7, 12, 0, 0, 70, 0, }, /* 438 */ - { 70, 10, 5, 0, 0, 70, 0, }, /* 439 */ - { 70, 12, 3, 0, 0, 70, 0, }, /* 440 */ - { 70, 21, 12, 0, 0, 70, 0, }, /* 441 */ - { 70, 13, 12, 0, 0, 70, 0, }, /* 442 */ - { 73, 13, 12, 0, 0, 73, 0, }, /* 443 */ - { 73, 7, 12, 0, 0, 73, 0, }, /* 444 */ - { 73, 6, 12, 0, 0, 73, 0, }, /* 445 */ - { 73, 21, 12, 0, 0, 73, 0, }, /* 446 */ - { 13, 5, 12, 63, -6222, 13, 0, }, /* 447 */ - { 13, 5, 12, 67, -6221, 13, 0, }, /* 448 */ - { 13, 5, 12, 71, -6212, 13, 0, }, /* 449 */ - { 13, 5, 12, 75, -6210, 13, 0, }, /* 450 */ - { 13, 5, 12, 79, -6210, 13, 0, }, /* 451 */ - { 13, 5, 12, 79, -6211, 13, 0, }, /* 452 */ - { 13, 5, 12, 84, -6204, 13, 0, }, /* 453 */ - { 13, 5, 12, 88, -6180, 13, 0, }, /* 454 */ - { 13, 5, 12, 108, 35267, 13, 0, }, /* 455 */ - { 17, 9, 12, 0, -3008, 17, 0, }, /* 456 */ - { 76, 21, 12, 0, 0, 76, 0, }, /* 457 */ - { 28, 12, 3, 0, 0, -101, 0, }, /* 458 */ - { 28, 12, 3, 0, 0, 15, 0, }, /* 459 */ - { 10, 21, 12, 0, 0, -37, 0, }, /* 460 */ - { 28, 12, 3, 0, 0, -16, 0, }, /* 461 */ - { 28, 12, 3, 0, 0, -40, 0, }, /* 462 */ - { 28, 12, 3, 0, 0, -129, 0, }, /* 463 */ - { 10, 10, 5, 0, 0, -16, 0, }, /* 464 */ - { 10, 7, 12, 0, 0, 15, 0, }, /* 465 */ - { 10, 7, 12, 0, 0, -16, 0, }, /* 466 */ - { 10, 10, 5, 0, 0, -37, 0, }, /* 467 */ - { 28, 12, 3, 0, 0, -80, 0, }, /* 468 */ - { 10, 10, 5, 0, 0, 3, 0, }, /* 469 */ - { 28, 12, 3, 0, 0, -37, 0, }, /* 470 */ - { 13, 5, 12, 0, 0, 13, 0, }, /* 471 */ - { 13, 6, 12, 0, 0, 13, 0, }, /* 472 */ - { 34, 5, 12, 0, 35332, 34, 0, }, /* 473 */ - { 34, 5, 12, 0, 3814, 34, 0, }, /* 474 */ - { 34, 9, 12, 92, 1, 34, 0, }, /* 475 */ - { 34, 5, 12, 92, -1, 34, 0, }, /* 476 */ - { 34, 5, 12, 92, -58, 34, 0, }, /* 477 */ - { 34, 9, 12, 0, -7615, 34, 0, }, /* 478 */ - { 20, 5, 12, 0, 8, 20, 0, }, /* 479 */ - { 20, 9, 12, 0, -8, 20, 0, }, /* 480 */ - { 20, 5, 12, 0, 74, 20, 0, }, /* 481 */ - { 20, 5, 12, 0, 86, 20, 0, }, /* 482 */ - { 20, 5, 12, 0, 100, 20, 0, }, /* 483 */ - { 20, 5, 12, 0, 128, 20, 0, }, /* 484 */ - { 20, 5, 12, 0, 112, 20, 0, }, /* 485 */ - { 20, 5, 12, 0, 126, 20, 0, }, /* 486 */ - { 20, 8, 12, 0, -8, 20, 0, }, /* 487 */ - { 20, 5, 12, 0, 9, 20, 0, }, /* 488 */ - { 20, 9, 12, 0, -74, 20, 0, }, /* 489 */ - { 20, 8, 12, 0, -9, 20, 0, }, /* 490 */ - { 20, 5, 12, 21, -7173, 20, 0, }, /* 491 */ - { 20, 9, 12, 0, -86, 20, 0, }, /* 492 */ - { 20, 9, 12, 0, -100, 20, 0, }, /* 493 */ - { 20, 9, 12, 0, -112, 20, 0, }, /* 494 */ - { 20, 9, 12, 0, -128, 20, 0, }, /* 495 */ - { 20, 9, 12, 0, -126, 20, 0, }, /* 496 */ - { 28, 1, 3, 0, 0, 28, 0, }, /* 497 */ - { 28, 1, 13, 0, 0, 28, 0, }, /* 498 */ - { 10, 27, 2, 0, 0, 10, 0, }, /* 499 */ - { 10, 28, 2, 0, 0, 10, 0, }, /* 500 */ - { 10, 21, 14, 0, 0, 10, 0, }, /* 501 */ - { 0, 2, 2, 0, 0, 0, 0, }, /* 502 */ - { 28, 12, 3, 0, 0, -84, 0, }, /* 503 */ - { 10, 9, 12, 0, 0, 10, 0, }, /* 504 */ - { 10, 5, 12, 0, 0, 10, 0, }, /* 505 */ - { 20, 9, 12, 96, -7517, 20, 0, }, /* 506 */ - { 34, 9, 12, 100, -8383, 34, 0, }, /* 507 */ - { 34, 9, 12, 104, -8262, 34, 0, }, /* 508 */ - { 34, 9, 12, 0, 28, 34, 0, }, /* 509 */ - { 10, 7, 12, 0, 0, 10, 0, }, /* 510 */ - { 10, 5, 14, 0, 0, 10, 0, }, /* 511 */ - { 34, 5, 12, 0, -28, 34, 0, }, /* 512 */ - { 34, 14, 12, 0, 16, 34, 0, }, /* 513 */ - { 34, 14, 12, 0, -16, 34, 0, }, /* 514 */ - { 34, 14, 12, 0, 0, 34, 0, }, /* 515 */ - { 10, 25, 14, 0, 0, 10, 0, }, /* 516 */ - { 10, 26, 12, 0, 26, 10, 0, }, /* 517 */ - { 10, 26, 14, 0, 26, 10, 0, }, /* 518 */ - { 10, 26, 12, 0, -26, 10, 0, }, /* 519 */ - { 5, 26, 12, 0, 0, 5, 0, }, /* 520 */ - { 18, 9, 12, 0, 48, 18, 0, }, /* 521 */ - { 18, 5, 12, 0, -48, 18, 0, }, /* 522 */ - { 34, 9, 12, 0, -10743, 34, 0, }, /* 523 */ - { 34, 9, 12, 0, -3814, 34, 0, }, /* 524 */ - { 34, 9, 12, 0, -10727, 34, 0, }, /* 525 */ - { 34, 5, 12, 0, -10795, 34, 0, }, /* 526 */ - { 34, 5, 12, 0, -10792, 34, 0, }, /* 527 */ - { 34, 9, 12, 0, -10780, 34, 0, }, /* 528 */ - { 34, 9, 12, 0, -10749, 34, 0, }, /* 529 */ - { 34, 9, 12, 0, -10783, 34, 0, }, /* 530 */ - { 34, 9, 12, 0, -10782, 34, 0, }, /* 531 */ - { 34, 9, 12, 0, -10815, 34, 0, }, /* 532 */ - { 11, 5, 12, 0, 0, 11, 0, }, /* 533 */ - { 11, 26, 12, 0, 0, 11, 0, }, /* 534 */ - { 11, 12, 3, 0, 0, 11, 0, }, /* 535 */ - { 11, 21, 12, 0, 0, 11, 0, }, /* 536 */ - { 11, 15, 12, 0, 0, 11, 0, }, /* 537 */ - { 17, 5, 12, 0, -7264, 17, 0, }, /* 538 */ - { 59, 7, 12, 0, 0, 59, 0, }, /* 539 */ - { 59, 6, 12, 0, 0, 59, 0, }, /* 540 */ - { 59, 21, 12, 0, 0, 59, 0, }, /* 541 */ - { 59, 12, 3, 0, 0, 59, 0, }, /* 542 */ - { 13, 12, 3, 0, 0, 13, 0, }, /* 543 */ - { 10, 21, 12, 0, 0, -28, 0, }, /* 544 */ - { 23, 26, 12, 0, 0, 23, 0, }, /* 545 */ - { 10, 21, 12, 0, 0, -122, 0, }, /* 546 */ - { 10, 21, 12, 0, 0, -116, 0, }, /* 547 */ - { 23, 6, 12, 0, 0, 23, 0, }, /* 548 */ - { 10, 7, 12, 0, 0, 23, 0, }, /* 549 */ - { 23, 14, 12, 0, 0, 23, 0, }, /* 550 */ - { 10, 22, 12, 0, 0, -122, 0, }, /* 551 */ - { 10, 18, 12, 0, 0, -122, 0, }, /* 552 */ - { 10, 26, 12, 0, 0, -116, 0, }, /* 553 */ - { 10, 17, 12, 0, 0, -116, 0, }, /* 554 */ - { 10, 22, 12, 0, 0, -116, 0, }, /* 555 */ - { 10, 18, 12, 0, 0, -116, 0, }, /* 556 */ - { 28, 12, 3, 0, 0, -19, 0, }, /* 557 */ - { 24, 10, 3, 0, 0, 24, 0, }, /* 558 */ - { 10, 17, 14, 0, 0, -116, 0, }, /* 559 */ - { 10, 6, 12, 0, 0, -58, 0, }, /* 560 */ - { 10, 7, 12, 0, 0, -88, 0, }, /* 561 */ - { 10, 21, 14, 0, 0, -88, 0, }, /* 562 */ - { 10, 26, 12, 0, 0, 23, 0, }, /* 563 */ - { 27, 7, 12, 0, 0, 27, 0, }, /* 564 */ - { 28, 12, 3, 0, 0, -58, 0, }, /* 565 */ - { 10, 24, 12, 0, 0, -58, 0, }, /* 566 */ - { 27, 6, 12, 0, 0, 27, 0, }, /* 567 */ - { 10, 17, 12, 0, 0, -58, 0, }, /* 568 */ - { 30, 7, 12, 0, 0, 30, 0, }, /* 569 */ - { 30, 6, 12, 0, 0, 30, 0, }, /* 570 */ - { 4, 7, 12, 0, 0, 4, 0, }, /* 571 */ - { 24, 7, 12, 0, 0, 24, 0, }, /* 572 */ - { 10, 15, 12, 0, 0, 23, 0, }, /* 573 */ - { 24, 26, 12, 0, 0, 24, 0, }, /* 574 */ - { 10, 26, 14, 0, 0, 23, 0, }, /* 575 */ - { 30, 26, 12, 0, 0, 30, 0, }, /* 576 */ - { 23, 7, 12, 0, 0, 23, 0, }, /* 577 */ - { 61, 7, 12, 0, 0, 61, 0, }, /* 578 */ - { 61, 6, 12, 0, 0, 61, 0, }, /* 579 */ - { 61, 26, 12, 0, 0, 61, 0, }, /* 580 */ - { 86, 7, 12, 0, 0, 86, 0, }, /* 581 */ - { 86, 6, 12, 0, 0, 86, 0, }, /* 582 */ - { 86, 21, 12, 0, 0, 86, 0, }, /* 583 */ - { 77, 7, 12, 0, 0, 77, 0, }, /* 584 */ - { 77, 6, 12, 0, 0, 77, 0, }, /* 585 */ - { 77, 21, 12, 0, 0, 77, 0, }, /* 586 */ - { 77, 13, 12, 0, 0, 77, 0, }, /* 587 */ - { 13, 9, 12, 108, 1, 13, 0, }, /* 588 */ - { 13, 5, 12, 108, -35267, 13, 0, }, /* 589 */ - { 13, 7, 12, 0, 0, 13, 0, }, /* 590 */ - { 13, 21, 12, 0, 0, 13, 0, }, /* 591 */ - { 79, 7, 12, 0, 0, 79, 0, }, /* 592 */ - { 79, 14, 12, 0, 0, 79, 0, }, /* 593 */ - { 79, 12, 3, 0, 0, 79, 0, }, /* 594 */ - { 79, 21, 12, 0, 0, 79, 0, }, /* 595 */ - { 34, 9, 12, 0, -35332, 34, 0, }, /* 596 */ - { 34, 9, 12, 0, -42280, 34, 0, }, /* 597 */ - { 34, 9, 12, 0, -42308, 34, 0, }, /* 598 */ - { 34, 9, 12, 0, -42319, 34, 0, }, /* 599 */ - { 34, 9, 12, 0, -42315, 34, 0, }, /* 600 */ - { 34, 9, 12, 0, -42305, 34, 0, }, /* 601 */ - { 34, 9, 12, 0, -42258, 34, 0, }, /* 602 */ - { 34, 9, 12, 0, -42282, 34, 0, }, /* 603 */ - { 34, 9, 12, 0, -42261, 34, 0, }, /* 604 */ - { 34, 9, 12, 0, 928, 34, 0, }, /* 605 */ - { 49, 7, 12, 0, 0, 49, 0, }, /* 606 */ - { 49, 12, 3, 0, 0, 49, 0, }, /* 607 */ - { 49, 10, 5, 0, 0, 49, 0, }, /* 608 */ - { 49, 26, 12, 0, 0, 49, 0, }, /* 609 */ - { 10, 15, 12, 0, 0, -197, 0, }, /* 610 */ - { 10, 15, 12, 0, 0, -170, 0, }, /* 611 */ - { 10, 26, 12, 0, 0, -145, 0, }, /* 612 */ - { 10, 23, 12, 0, 0, -145, 0, }, /* 613 */ - { 65, 7, 12, 0, 0, 65, 0, }, /* 614 */ - { 65, 21, 12, 0, 0, 65, 0, }, /* 615 */ - { 75, 10, 5, 0, 0, 75, 0, }, /* 616 */ - { 75, 7, 12, 0, 0, 75, 0, }, /* 617 */ - { 75, 12, 3, 0, 0, 75, 0, }, /* 618 */ - { 75, 21, 12, 0, 0, 75, 0, }, /* 619 */ - { 75, 13, 12, 0, 0, 75, 0, }, /* 620 */ - { 15, 12, 3, 0, 0, -16, 0, }, /* 621 */ - { 15, 7, 12, 0, 0, -43, 0, }, /* 622 */ - { 69, 13, 12, 0, 0, 69, 0, }, /* 623 */ - { 69, 7, 12, 0, 0, 69, 0, }, /* 624 */ - { 69, 12, 3, 0, 0, 69, 0, }, /* 625 */ - { 10, 21, 12, 0, 0, -92, 0, }, /* 626 */ - { 69, 21, 12, 0, 0, 69, 0, }, /* 627 */ - { 74, 7, 12, 0, 0, 74, 0, }, /* 628 */ - { 74, 12, 3, 0, 0, 74, 0, }, /* 629 */ - { 74, 10, 5, 0, 0, 74, 0, }, /* 630 */ - { 74, 21, 12, 0, 0, 74, 0, }, /* 631 */ - { 84, 12, 3, 0, 0, 84, 0, }, /* 632 */ - { 84, 10, 5, 0, 0, 84, 0, }, /* 633 */ - { 84, 7, 12, 0, 0, 84, 0, }, /* 634 */ - { 84, 21, 12, 0, 0, 84, 0, }, /* 635 */ - { 10, 6, 12, 0, 0, -22, 0, }, /* 636 */ - { 84, 13, 12, 0, 0, 84, 0, }, /* 637 */ - { 39, 6, 12, 0, 0, 39, 0, }, /* 638 */ - { 68, 7, 12, 0, 0, 68, 0, }, /* 639 */ - { 68, 12, 3, 0, 0, 68, 0, }, /* 640 */ - { 68, 10, 5, 0, 0, 68, 0, }, /* 641 */ - { 68, 13, 12, 0, 0, 68, 0, }, /* 642 */ - { 68, 21, 12, 0, 0, 68, 0, }, /* 643 */ - { 92, 7, 12, 0, 0, 92, 0, }, /* 644 */ - { 92, 12, 3, 0, 0, 92, 0, }, /* 645 */ - { 92, 6, 12, 0, 0, 92, 0, }, /* 646 */ - { 92, 21, 12, 0, 0, 92, 0, }, /* 647 */ - { 87, 7, 12, 0, 0, 87, 0, }, /* 648 */ - { 87, 10, 5, 0, 0, 87, 0, }, /* 649 */ - { 87, 12, 3, 0, 0, 87, 0, }, /* 650 */ - { 87, 21, 12, 0, 0, 87, 0, }, /* 651 */ - { 87, 6, 12, 0, 0, 87, 0, }, /* 652 */ - { 34, 5, 12, 0, -928, 34, 0, }, /* 653 */ - { 9, 5, 12, 0, -38864, 9, 0, }, /* 654 */ - { 87, 13, 12, 0, 0, 87, 0, }, /* 655 */ - { 24, 7, 9, 0, 0, 24, 0, }, /* 656 */ - { 24, 7, 10, 0, 0, 24, 0, }, /* 657 */ - { 0, 4, 2, 0, 0, 0, 0, }, /* 658 */ - { 0, 3, 12, 0, 0, 0, 0, }, /* 659 */ - { 26, 25, 12, 0, 0, 26, 0, }, /* 660 */ - { 1, 24, 12, 0, 0, 1, 0, }, /* 661 */ - { 1, 7, 12, 0, 0, -10, 0, }, /* 662 */ - { 1, 26, 12, 0, 0, -10, 0, }, /* 663 */ - { 10, 6, 3, 0, 0, -58, 0, }, /* 664 */ - { 36, 7, 12, 0, 0, 36, 0, }, /* 665 */ - { 10, 21, 12, 0, 0, -25, 0, }, /* 666 */ - { 10, 15, 12, 0, 0, -76, 0, }, /* 667 */ - { 10, 26, 12, 0, 0, -25, 0, }, /* 668 */ - { 20, 14, 12, 0, 0, 20, 0, }, /* 669 */ - { 20, 15, 12, 0, 0, 20, 0, }, /* 670 */ - { 20, 26, 12, 0, 0, 20, 0, }, /* 671 */ - { 71, 7, 12, 0, 0, 71, 0, }, /* 672 */ - { 67, 7, 12, 0, 0, 67, 0, }, /* 673 */ - { 28, 12, 3, 0, 0, -1, 0, }, /* 674 */ - { 10, 15, 12, 0, 0, -1, 0, }, /* 675 */ - { 42, 7, 12, 0, 0, 42, 0, }, /* 676 */ - { 42, 15, 12, 0, 0, 42, 0, }, /* 677 */ - { 19, 7, 12, 0, 0, 19, 0, }, /* 678 */ - { 19, 14, 12, 0, 0, 19, 0, }, /* 679 */ - { 118, 7, 12, 0, 0, 118, 0, }, /* 680 */ - { 118, 12, 3, 0, 0, 118, 0, }, /* 681 */ - { 60, 7, 12, 0, 0, 60, 0, }, /* 682 */ - { 60, 21, 12, 0, 0, 60, 0, }, /* 683 */ - { 43, 7, 12, 0, 0, 43, 0, }, /* 684 */ - { 43, 21, 12, 0, 0, 43, 0, }, /* 685 */ - { 43, 14, 12, 0, 0, 43, 0, }, /* 686 */ - { 14, 9, 12, 0, 40, 14, 0, }, /* 687 */ - { 14, 5, 12, 0, -40, 14, 0, }, /* 688 */ - { 47, 7, 12, 0, 0, 47, 0, }, /* 689 */ - { 45, 7, 12, 0, 0, 45, 0, }, /* 690 */ - { 45, 13, 12, 0, 0, 45, 0, }, /* 691 */ - { 136, 9, 12, 0, 40, 136, 0, }, /* 692 */ - { 136, 5, 12, 0, -40, 136, 0, }, /* 693 */ - { 106, 7, 12, 0, 0, 106, 0, }, /* 694 */ - { 104, 7, 12, 0, 0, 104, 0, }, /* 695 */ - { 104, 21, 12, 0, 0, 104, 0, }, /* 696 */ - { 110, 7, 12, 0, 0, 110, 0, }, /* 697 */ - { 12, 7, 12, 0, 0, 12, 0, }, /* 698 */ - { 81, 7, 12, 0, 0, 81, 0, }, /* 699 */ - { 81, 21, 12, 0, 0, 81, 0, }, /* 700 */ - { 81, 15, 12, 0, 0, 81, 0, }, /* 701 */ - { 120, 7, 12, 0, 0, 120, 0, }, /* 702 */ - { 120, 26, 12, 0, 0, 120, 0, }, /* 703 */ - { 120, 15, 12, 0, 0, 120, 0, }, /* 704 */ - { 116, 7, 12, 0, 0, 116, 0, }, /* 705 */ - { 116, 15, 12, 0, 0, 116, 0, }, /* 706 */ - { 128, 7, 12, 0, 0, 128, 0, }, /* 707 */ - { 128, 15, 12, 0, 0, 128, 0, }, /* 708 */ - { 66, 7, 12, 0, 0, 66, 0, }, /* 709 */ - { 66, 15, 12, 0, 0, 66, 0, }, /* 710 */ - { 66, 21, 12, 0, 0, 66, 0, }, /* 711 */ - { 72, 7, 12, 0, 0, 72, 0, }, /* 712 */ - { 72, 21, 12, 0, 0, 72, 0, }, /* 713 */ - { 98, 7, 12, 0, 0, 98, 0, }, /* 714 */ - { 97, 7, 12, 0, 0, 97, 0, }, /* 715 */ - { 97, 15, 12, 0, 0, 97, 0, }, /* 716 */ - { 31, 7, 12, 0, 0, 31, 0, }, /* 717 */ - { 31, 12, 3, 0, 0, 31, 0, }, /* 718 */ - { 31, 15, 12, 0, 0, 31, 0, }, /* 719 */ - { 31, 21, 12, 0, 0, 31, 0, }, /* 720 */ - { 88, 7, 12, 0, 0, 88, 0, }, /* 721 */ - { 88, 15, 12, 0, 0, 88, 0, }, /* 722 */ - { 88, 21, 12, 0, 0, 88, 0, }, /* 723 */ - { 117, 7, 12, 0, 0, 117, 0, }, /* 724 */ - { 117, 15, 12, 0, 0, 117, 0, }, /* 725 */ - { 112, 7, 12, 0, 0, 112, 0, }, /* 726 */ - { 112, 26, 12, 0, 0, 112, 0, }, /* 727 */ - { 112, 12, 3, 0, 0, 112, 0, }, /* 728 */ - { 112, 15, 12, 0, 0, 112, 0, }, /* 729 */ - { 112, 21, 12, 0, 0, 112, 0, }, /* 730 */ - { 78, 7, 12, 0, 0, 78, 0, }, /* 731 */ - { 78, 21, 12, 0, 0, 78, 0, }, /* 732 */ - { 83, 7, 12, 0, 0, 83, 0, }, /* 733 */ - { 83, 15, 12, 0, 0, 83, 0, }, /* 734 */ - { 82, 7, 12, 0, 0, 82, 0, }, /* 735 */ - { 82, 15, 12, 0, 0, 82, 0, }, /* 736 */ - { 121, 7, 12, 0, 0, 121, 0, }, /* 737 */ - { 121, 21, 12, 0, 0, 121, 0, }, /* 738 */ - { 121, 15, 12, 0, 0, 121, 0, }, /* 739 */ - { 89, 7, 12, 0, 0, 89, 0, }, /* 740 */ - { 130, 9, 12, 0, 64, 130, 0, }, /* 741 */ - { 130, 5, 12, 0, -64, 130, 0, }, /* 742 */ - { 130, 15, 12, 0, 0, 130, 0, }, /* 743 */ - { 144, 7, 12, 0, 0, 144, 0, }, /* 744 */ - { 144, 12, 3, 0, 0, 144, 0, }, /* 745 */ - { 144, 13, 12, 0, 0, 144, 0, }, /* 746 */ - { 1, 15, 12, 0, 0, 1, 0, }, /* 747 */ - { 147, 7, 12, 0, 0, 147, 0, }, /* 748 */ - { 147, 15, 12, 0, 0, 147, 0, }, /* 749 */ - { 148, 7, 12, 0, 0, 148, 0, }, /* 750 */ - { 148, 12, 3, 0, 0, 148, 0, }, /* 751 */ - { 148, 15, 12, 0, 0, 148, 0, }, /* 752 */ - { 148, 21, 12, 0, 0, 148, 0, }, /* 753 */ - { 94, 10, 5, 0, 0, 94, 0, }, /* 754 */ - { 94, 12, 3, 0, 0, 94, 0, }, /* 755 */ - { 94, 7, 12, 0, 0, 94, 0, }, /* 756 */ - { 94, 21, 12, 0, 0, 94, 0, }, /* 757 */ - { 94, 15, 12, 0, 0, 94, 0, }, /* 758 */ - { 94, 13, 12, 0, 0, 94, 0, }, /* 759 */ - { 85, 12, 3, 0, 0, 85, 0, }, /* 760 */ - { 85, 10, 5, 0, 0, 85, 0, }, /* 761 */ - { 85, 7, 12, 0, 0, 85, 0, }, /* 762 */ - { 85, 21, 12, 0, 0, 85, 0, }, /* 763 */ - { 85, 1, 4, 0, 0, 85, 0, }, /* 764 */ - { 101, 7, 12, 0, 0, 101, 0, }, /* 765 */ - { 101, 13, 12, 0, 0, 101, 0, }, /* 766 */ - { 96, 12, 3, 0, 0, 96, 0, }, /* 767 */ - { 96, 7, 12, 0, 0, 96, 0, }, /* 768 */ - { 96, 10, 5, 0, 0, 96, 0, }, /* 769 */ - { 96, 13, 12, 0, 0, 96, 0, }, /* 770 */ - { 96, 21, 12, 0, 0, 96, 0, }, /* 771 */ - { 111, 7, 12, 0, 0, 111, 0, }, /* 772 */ - { 111, 12, 3, 0, 0, 111, 0, }, /* 773 */ - { 111, 21, 12, 0, 0, 111, 0, }, /* 774 */ - { 100, 12, 3, 0, 0, 100, 0, }, /* 775 */ - { 100, 10, 5, 0, 0, 100, 0, }, /* 776 */ - { 100, 7, 12, 0, 0, 100, 0, }, /* 777 */ - { 100, 7, 4, 0, 0, 100, 0, }, /* 778 */ - { 100, 21, 12, 0, 0, 100, 0, }, /* 779 */ - { 100, 13, 12, 0, 0, 100, 0, }, /* 780 */ - { 48, 15, 12, 0, 0, 48, 0, }, /* 781 */ - { 108, 7, 12, 0, 0, 108, 0, }, /* 782 */ - { 108, 10, 5, 0, 0, 108, 0, }, /* 783 */ - { 108, 12, 3, 0, 0, 108, 0, }, /* 784 */ - { 108, 21, 12, 0, 0, 108, 0, }, /* 785 */ - { 129, 7, 12, 0, 0, 129, 0, }, /* 786 */ - { 129, 21, 12, 0, 0, 129, 0, }, /* 787 */ - { 109, 7, 12, 0, 0, 109, 0, }, /* 788 */ - { 109, 12, 3, 0, 0, 109, 0, }, /* 789 */ - { 109, 10, 5, 0, 0, 109, 0, }, /* 790 */ - { 109, 13, 12, 0, 0, 109, 0, }, /* 791 */ - { 107, 12, 3, 0, 0, 107, 0, }, /* 792 */ - { 107, 12, 3, 0, 0, -49, 0, }, /* 793 */ - { 107, 10, 5, 0, 0, 107, 0, }, /* 794 */ - { 107, 10, 5, 0, 0, -49, 0, }, /* 795 */ - { 107, 7, 12, 0, 0, 107, 0, }, /* 796 */ - { 28, 12, 3, 0, 0, -49, 0, }, /* 797 */ - { 107, 10, 3, 0, 0, 107, 0, }, /* 798 */ - { 135, 7, 12, 0, 0, 135, 0, }, /* 799 */ - { 135, 10, 5, 0, 0, 135, 0, }, /* 800 */ - { 135, 12, 3, 0, 0, 135, 0, }, /* 801 */ - { 135, 21, 12, 0, 0, 135, 0, }, /* 802 */ - { 135, 13, 12, 0, 0, 135, 0, }, /* 803 */ - { 124, 7, 12, 0, 0, 124, 0, }, /* 804 */ - { 124, 10, 3, 0, 0, 124, 0, }, /* 805 */ - { 124, 10, 5, 0, 0, 124, 0, }, /* 806 */ - { 124, 12, 3, 0, 0, 124, 0, }, /* 807 */ - { 124, 21, 12, 0, 0, 124, 0, }, /* 808 */ - { 124, 13, 12, 0, 0, 124, 0, }, /* 809 */ - { 123, 7, 12, 0, 0, 123, 0, }, /* 810 */ - { 123, 10, 3, 0, 0, 123, 0, }, /* 811 */ - { 123, 10, 5, 0, 0, 123, 0, }, /* 812 */ - { 123, 12, 3, 0, 0, 123, 0, }, /* 813 */ - { 123, 21, 12, 0, 0, 123, 0, }, /* 814 */ - { 114, 7, 12, 0, 0, 114, 0, }, /* 815 */ - { 114, 10, 5, 0, 0, 114, 0, }, /* 816 */ - { 114, 12, 3, 0, 0, 114, 0, }, /* 817 */ - { 114, 21, 12, 0, 0, 114, 0, }, /* 818 */ - { 114, 13, 12, 0, 0, 114, 0, }, /* 819 */ - { 102, 7, 12, 0, 0, 102, 0, }, /* 820 */ - { 102, 12, 3, 0, 0, 102, 0, }, /* 821 */ - { 102, 10, 5, 0, 0, 102, 0, }, /* 822 */ - { 102, 13, 12, 0, 0, 102, 0, }, /* 823 */ - { 126, 7, 12, 0, 0, 126, 0, }, /* 824 */ - { 126, 12, 3, 0, 0, 126, 0, }, /* 825 */ - { 126, 10, 5, 0, 0, 126, 0, }, /* 826 */ - { 126, 13, 12, 0, 0, 126, 0, }, /* 827 */ - { 126, 15, 12, 0, 0, 126, 0, }, /* 828 */ - { 126, 21, 12, 0, 0, 126, 0, }, /* 829 */ - { 126, 26, 12, 0, 0, 126, 0, }, /* 830 */ - { 142, 7, 12, 0, 0, 142, 0, }, /* 831 */ - { 142, 10, 5, 0, 0, 142, 0, }, /* 832 */ - { 142, 12, 3, 0, 0, 142, 0, }, /* 833 */ - { 142, 21, 12, 0, 0, 142, 0, }, /* 834 */ - { 125, 9, 12, 0, 32, 125, 0, }, /* 835 */ - { 125, 5, 12, 0, -32, 125, 0, }, /* 836 */ - { 125, 13, 12, 0, 0, 125, 0, }, /* 837 */ - { 125, 15, 12, 0, 0, 125, 0, }, /* 838 */ - { 125, 7, 12, 0, 0, 125, 0, }, /* 839 */ - { 141, 7, 12, 0, 0, 141, 0, }, /* 840 */ - { 141, 12, 3, 0, 0, 141, 0, }, /* 841 */ - { 141, 10, 5, 0, 0, 141, 0, }, /* 842 */ - { 141, 7, 4, 0, 0, 141, 0, }, /* 843 */ - { 141, 21, 12, 0, 0, 141, 0, }, /* 844 */ - { 140, 7, 12, 0, 0, 140, 0, }, /* 845 */ - { 140, 12, 3, 0, 0, 140, 0, }, /* 846 */ - { 140, 10, 5, 0, 0, 140, 0, }, /* 847 */ - { 140, 7, 4, 0, 0, 140, 0, }, /* 848 */ - { 140, 21, 12, 0, 0, 140, 0, }, /* 849 */ - { 122, 7, 12, 0, 0, 122, 0, }, /* 850 */ - { 133, 7, 12, 0, 0, 133, 0, }, /* 851 */ - { 133, 10, 5, 0, 0, 133, 0, }, /* 852 */ - { 133, 12, 3, 0, 0, 133, 0, }, /* 853 */ - { 133, 21, 12, 0, 0, 133, 0, }, /* 854 */ - { 133, 13, 12, 0, 0, 133, 0, }, /* 855 */ - { 133, 15, 12, 0, 0, 133, 0, }, /* 856 */ - { 134, 21, 12, 0, 0, 134, 0, }, /* 857 */ - { 134, 7, 12, 0, 0, 134, 0, }, /* 858 */ - { 134, 12, 3, 0, 0, 134, 0, }, /* 859 */ - { 134, 10, 5, 0, 0, 134, 0, }, /* 860 */ - { 138, 7, 12, 0, 0, 138, 0, }, /* 861 */ - { 138, 12, 3, 0, 0, 138, 0, }, /* 862 */ - { 138, 7, 4, 0, 0, 138, 0, }, /* 863 */ - { 138, 13, 12, 0, 0, 138, 0, }, /* 864 */ - { 143, 7, 12, 0, 0, 143, 0, }, /* 865 */ - { 143, 10, 5, 0, 0, 143, 0, }, /* 866 */ - { 143, 12, 3, 0, 0, 143, 0, }, /* 867 */ - { 143, 13, 12, 0, 0, 143, 0, }, /* 868 */ - { 145, 7, 12, 0, 0, 145, 0, }, /* 869 */ - { 145, 12, 3, 0, 0, 145, 0, }, /* 870 */ - { 145, 10, 5, 0, 0, 145, 0, }, /* 871 */ - { 145, 21, 12, 0, 0, 145, 0, }, /* 872 */ - { 63, 7, 12, 0, 0, 63, 0, }, /* 873 */ - { 63, 14, 12, 0, 0, 63, 0, }, /* 874 */ - { 63, 21, 12, 0, 0, 63, 0, }, /* 875 */ - { 80, 7, 12, 0, 0, 80, 0, }, /* 876 */ - { 127, 7, 12, 0, 0, 127, 0, }, /* 877 */ - { 115, 7, 12, 0, 0, 115, 0, }, /* 878 */ - { 115, 13, 12, 0, 0, 115, 0, }, /* 879 */ - { 115, 21, 12, 0, 0, 115, 0, }, /* 880 */ - { 103, 7, 12, 0, 0, 103, 0, }, /* 881 */ - { 103, 12, 3, 0, 0, 103, 0, }, /* 882 */ - { 103, 21, 12, 0, 0, 103, 0, }, /* 883 */ - { 119, 7, 12, 0, 0, 119, 0, }, /* 884 */ - { 119, 12, 3, 0, 0, 119, 0, }, /* 885 */ - { 119, 21, 12, 0, 0, 119, 0, }, /* 886 */ - { 119, 26, 12, 0, 0, 119, 0, }, /* 887 */ - { 119, 6, 12, 0, 0, 119, 0, }, /* 888 */ - { 119, 13, 12, 0, 0, 119, 0, }, /* 889 */ - { 119, 15, 12, 0, 0, 119, 0, }, /* 890 */ - { 146, 9, 12, 0, 32, 146, 0, }, /* 891 */ - { 146, 5, 12, 0, -32, 146, 0, }, /* 892 */ - { 146, 15, 12, 0, 0, 146, 0, }, /* 893 */ - { 146, 21, 12, 0, 0, 146, 0, }, /* 894 */ - { 99, 7, 12, 0, 0, 99, 0, }, /* 895 */ - { 99, 10, 5, 0, 0, 99, 0, }, /* 896 */ - { 99, 12, 3, 0, 0, 99, 0, }, /* 897 */ - { 99, 6, 12, 0, 0, 99, 0, }, /* 898 */ - { 137, 6, 12, 0, 0, 137, 0, }, /* 899 */ - { 139, 6, 12, 0, 0, 139, 0, }, /* 900 */ - { 137, 7, 12, 0, 0, 137, 0, }, /* 901 */ - { 139, 7, 12, 0, 0, 139, 0, }, /* 902 */ - { 105, 7, 12, 0, 0, 105, 0, }, /* 903 */ - { 105, 26, 12, 0, 0, 105, 0, }, /* 904 */ - { 105, 12, 3, 0, 0, 105, 0, }, /* 905 */ - { 105, 21, 12, 0, 0, 105, 0, }, /* 906 */ - { 10, 1, 2, 0, 0, 105, 0, }, /* 907 */ - { 10, 10, 3, 0, 0, 10, 0, }, /* 908 */ - { 10, 10, 5, 0, 0, 10, 0, }, /* 909 */ - { 20, 12, 3, 0, 0, 20, 0, }, /* 910 */ - { 131, 26, 12, 0, 0, 131, 0, }, /* 911 */ - { 131, 12, 3, 0, 0, 131, 0, }, /* 912 */ - { 131, 21, 12, 0, 0, 131, 0, }, /* 913 */ - { 18, 12, 3, 0, 0, 18, 0, }, /* 914 */ - { 113, 7, 12, 0, 0, 113, 0, }, /* 915 */ - { 113, 15, 12, 0, 0, 113, 0, }, /* 916 */ - { 113, 12, 3, 0, 0, 113, 0, }, /* 917 */ - { 132, 9, 12, 0, 34, 132, 0, }, /* 918 */ - { 132, 5, 12, 0, -34, 132, 0, }, /* 919 */ - { 132, 12, 3, 0, 0, 132, 0, }, /* 920 */ - { 132, 13, 12, 0, 0, 132, 0, }, /* 921 */ - { 132, 21, 12, 0, 0, 132, 0, }, /* 922 */ - { 0, 2, 14, 0, 0, 0, 0, }, /* 923 */ - { 10, 26, 11, 0, 0, 10, 0, }, /* 924 */ - { 27, 26, 12, 0, 0, 27, 0, }, /* 925 */ - { 10, 24, 3, 0, 0, 10, 0, }, /* 926 */ - { 10, 1, 3, 0, 0, 10, 0, }, /* 927 */ + { 34, 5, 12, 0, 42307, 34, 0, }, /* 102 */ + { 34, 5, 12, 0, 42282, 34, 0, }, /* 103 */ + { 34, 5, 12, 0, -69, 34, 0, }, /* 104 */ + { 34, 5, 12, 0, -217, 34, 0, }, /* 105 */ + { 34, 5, 12, 0, -71, 34, 0, }, /* 106 */ + { 34, 5, 12, 0, -219, 34, 0, }, /* 107 */ + { 34, 5, 12, 0, 42261, 34, 0, }, /* 108 */ + { 34, 5, 12, 0, 42258, 34, 0, }, /* 109 */ + { 34, 6, 12, 0, 0, 34, 0, }, /* 110 */ + { 10, 6, 12, 0, 0, 10, 0, }, /* 111 */ + { 4, 24, 12, 0, 0, 4, 0, }, /* 112 */ + { 28, 12, 3, 0, 0, 28, 0, }, /* 113 */ + { 28, 12, 3, 0, 0, 20, 0, }, /* 114 */ + { 28, 12, 3, 21, 116, 20, 0, }, /* 115 */ + { 28, 12, 3, 0, 0, 34, 0, }, /* 116 */ + { 20, 9, 12, 0, 1, 20, 0, }, /* 117 */ + { 20, 5, 12, 0, -1, 20, 0, }, /* 118 */ + { 20, 24, 12, 0, 0, 20, 0, }, /* 119 */ + { 0, 2, 12, 0, 0, 0, 0, }, /* 120 */ + { 20, 6, 12, 0, 0, 20, 0, }, /* 121 */ + { 20, 5, 12, 0, 130, 20, 0, }, /* 122 */ + { 20, 9, 12, 0, 116, 20, 0, }, /* 123 */ + { 20, 9, 12, 0, 38, 20, 0, }, /* 124 */ + { 20, 9, 12, 0, 37, 20, 0, }, /* 125 */ + { 20, 9, 12, 0, 64, 20, 0, }, /* 126 */ + { 20, 9, 12, 0, 63, 20, 0, }, /* 127 */ + { 20, 5, 12, 0, 0, 20, 0, }, /* 128 */ + { 20, 9, 12, 0, 32, 20, 0, }, /* 129 */ + { 20, 9, 12, 34, 32, 20, 0, }, /* 130 */ + { 20, 9, 12, 59, 32, 20, 0, }, /* 131 */ + { 20, 9, 12, 38, 32, 20, 0, }, /* 132 */ + { 20, 9, 12, 21, 32, 20, 0, }, /* 133 */ + { 20, 9, 12, 51, 32, 20, 0, }, /* 134 */ + { 20, 9, 12, 26, 32, 20, 0, }, /* 135 */ + { 20, 9, 12, 47, 32, 20, 0, }, /* 136 */ + { 20, 9, 12, 55, 32, 20, 0, }, /* 137 */ + { 20, 9, 12, 30, 32, 20, 0, }, /* 138 */ + { 20, 9, 12, 43, 32, 20, 0, }, /* 139 */ + { 20, 9, 12, 96, 32, 20, 0, }, /* 140 */ + { 20, 5, 12, 0, -38, 20, 0, }, /* 141 */ + { 20, 5, 12, 0, -37, 20, 0, }, /* 142 */ + { 20, 5, 12, 0, -32, 20, 0, }, /* 143 */ + { 20, 5, 12, 34, -32, 20, 0, }, /* 144 */ + { 20, 5, 12, 59, -32, 20, 0, }, /* 145 */ + { 20, 5, 12, 38, -32, 20, 0, }, /* 146 */ + { 20, 5, 12, 21, -116, 20, 0, }, /* 147 */ + { 20, 5, 12, 51, -32, 20, 0, }, /* 148 */ + { 20, 5, 12, 26, -775, 20, 0, }, /* 149 */ + { 20, 5, 12, 47, -32, 20, 0, }, /* 150 */ + { 20, 5, 12, 55, -32, 20, 0, }, /* 151 */ + { 20, 5, 12, 30, 1, 20, 0, }, /* 152 */ + { 20, 5, 12, 30, -32, 20, 0, }, /* 153 */ + { 20, 5, 12, 43, -32, 20, 0, }, /* 154 */ + { 20, 5, 12, 96, -32, 20, 0, }, /* 155 */ + { 20, 5, 12, 0, -64, 20, 0, }, /* 156 */ + { 20, 5, 12, 0, -63, 20, 0, }, /* 157 */ + { 20, 9, 12, 0, 8, 20, 0, }, /* 158 */ + { 20, 5, 12, 34, -30, 20, 0, }, /* 159 */ + { 20, 5, 12, 38, -25, 20, 0, }, /* 160 */ + { 20, 9, 12, 0, 0, 20, 0, }, /* 161 */ + { 20, 5, 12, 43, -15, 20, 0, }, /* 162 */ + { 20, 5, 12, 47, -22, 20, 0, }, /* 163 */ + { 20, 5, 12, 0, -8, 20, 0, }, /* 164 */ + { 11, 9, 12, 0, 1, 11, 0, }, /* 165 */ + { 11, 5, 12, 0, -1, 11, 0, }, /* 166 */ + { 20, 5, 12, 51, -54, 20, 0, }, /* 167 */ + { 20, 5, 12, 55, -48, 20, 0, }, /* 168 */ + { 20, 5, 12, 0, 7, 20, 0, }, /* 169 */ + { 20, 5, 12, 0, -116, 20, 0, }, /* 170 */ + { 20, 9, 12, 38, -60, 20, 0, }, /* 171 */ + { 20, 5, 12, 59, -64, 20, 0, }, /* 172 */ + { 20, 25, 12, 0, 0, 20, 0, }, /* 173 */ + { 20, 9, 12, 0, -7, 20, 0, }, /* 174 */ + { 20, 9, 12, 0, -130, 20, 0, }, /* 175 */ + { 13, 9, 12, 0, 80, 13, 0, }, /* 176 */ + { 13, 9, 12, 0, 32, 13, 0, }, /* 177 */ + { 13, 9, 12, 63, 32, 13, 0, }, /* 178 */ + { 13, 9, 12, 67, 32, 13, 0, }, /* 179 */ + { 13, 9, 12, 71, 32, 13, 0, }, /* 180 */ + { 13, 9, 12, 75, 32, 13, 0, }, /* 181 */ + { 13, 9, 12, 79, 32, 13, 0, }, /* 182 */ + { 13, 9, 12, 84, 32, 13, 0, }, /* 183 */ + { 13, 5, 12, 0, -32, 13, 0, }, /* 184 */ + { 13, 5, 12, 63, -32, 13, 0, }, /* 185 */ + { 13, 5, 12, 67, -32, 13, 0, }, /* 186 */ + { 13, 5, 12, 71, -32, 13, 0, }, /* 187 */ + { 13, 5, 12, 75, -32, 13, 0, }, /* 188 */ + { 13, 5, 12, 79, -32, 13, 0, }, /* 189 */ + { 13, 5, 12, 84, -32, 13, 0, }, /* 190 */ + { 13, 5, 12, 0, -80, 13, 0, }, /* 191 */ + { 13, 9, 12, 0, 1, 13, 0, }, /* 192 */ + { 13, 5, 12, 0, -1, 13, 0, }, /* 193 */ + { 13, 9, 12, 88, 1, 13, 0, }, /* 194 */ + { 13, 5, 12, 88, -1, 13, 0, }, /* 195 */ + { 13, 26, 12, 0, 0, 13, 0, }, /* 196 */ + { 13, 12, 3, 0, 0, -34, 0, }, /* 197 */ + { 13, 12, 3, 0, 0, -28, 0, }, /* 198 */ + { 28, 12, 3, 0, 0, -31, 0, }, /* 199 */ + { 13, 11, 3, 0, 0, 13, 0, }, /* 200 */ + { 13, 9, 12, 0, 15, 13, 0, }, /* 201 */ + { 13, 5, 12, 0, -15, 13, 0, }, /* 202 */ + { 2, 9, 12, 0, 48, 2, 0, }, /* 203 */ + { 2, 6, 12, 0, 0, 2, 0, }, /* 204 */ + { 2, 21, 12, 0, 0, 2, 0, }, /* 205 */ + { 2, 5, 12, 0, 0, 2, 0, }, /* 206 */ + { 2, 5, 12, 0, -48, 2, 0, }, /* 207 */ + { 10, 21, 12, 0, 0, -13, 0, }, /* 208 */ + { 2, 17, 12, 0, 0, 2, 0, }, /* 209 */ + { 2, 26, 12, 0, 0, 2, 0, }, /* 210 */ + { 2, 23, 12, 0, 0, 2, 0, }, /* 211 */ + { 26, 12, 3, 0, 0, 26, 0, }, /* 212 */ + { 26, 17, 12, 0, 0, 26, 0, }, /* 213 */ + { 26, 21, 12, 0, 0, 26, 0, }, /* 214 */ + { 26, 7, 12, 0, 0, 26, 0, }, /* 215 */ + { 1, 1, 4, 0, 0, 1, 0, }, /* 216 */ + { 10, 1, 4, 0, 0, 10, 0, }, /* 217 */ + { 1, 25, 12, 0, 0, 1, 0, }, /* 218 */ + { 1, 21, 12, 0, 0, 1, 0, }, /* 219 */ + { 1, 23, 12, 0, 0, 1, 0, }, /* 220 */ + { 10, 21, 12, 0, 0, -105, 0, }, /* 221 */ + { 1, 26, 12, 0, 0, 1, 0, }, /* 222 */ + { 1, 12, 3, 0, 0, 1, 0, }, /* 223 */ + { 1, 1, 2, 0, 0, -73, 0, }, /* 224 */ + { 1, 7, 12, 0, 0, 1, 0, }, /* 225 */ + { 10, 6, 12, 0, 0, -145, 0, }, /* 226 */ + { 28, 12, 3, 0, 0, -7, 0, }, /* 227 */ + { 1, 13, 12, 0, 0, -10, 0, }, /* 228 */ + { 1, 21, 12, 0, 0, -4, 0, }, /* 229 */ + { 1, 6, 12, 0, 0, 1, 0, }, /* 230 */ + { 1, 13, 12, 0, 0, 1, 0, }, /* 231 */ + { 50, 21, 12, 0, 0, 50, 0, }, /* 232 */ + { 50, 1, 4, 0, 0, 50, 0, }, /* 233 */ + { 50, 7, 12, 0, 0, 50, 0, }, /* 234 */ + { 50, 12, 3, 0, 0, 50, 0, }, /* 235 */ + { 56, 7, 12, 0, 0, 56, 0, }, /* 236 */ + { 56, 12, 3, 0, 0, 56, 0, }, /* 237 */ + { 64, 13, 12, 0, 0, 64, 0, }, /* 238 */ + { 64, 7, 12, 0, 0, 64, 0, }, /* 239 */ + { 64, 12, 3, 0, 0, 64, 0, }, /* 240 */ + { 64, 6, 12, 0, 0, 64, 0, }, /* 241 */ + { 64, 26, 12, 0, 0, 64, 0, }, /* 242 */ + { 64, 21, 12, 0, 0, 64, 0, }, /* 243 */ + { 64, 23, 12, 0, 0, 64, 0, }, /* 244 */ + { 90, 7, 12, 0, 0, 90, 0, }, /* 245 */ + { 90, 12, 3, 0, 0, 90, 0, }, /* 246 */ + { 90, 6, 12, 0, 0, 90, 0, }, /* 247 */ + { 90, 21, 12, 0, 0, 90, 0, }, /* 248 */ + { 95, 7, 12, 0, 0, 95, 0, }, /* 249 */ + { 95, 12, 3, 0, 0, 95, 0, }, /* 250 */ + { 95, 21, 12, 0, 0, 95, 0, }, /* 251 */ + { 15, 12, 3, 0, 0, 15, 0, }, /* 252 */ + { 15, 10, 5, 0, 0, 15, 0, }, /* 253 */ + { 15, 7, 12, 0, 0, 15, 0, }, /* 254 */ + { 28, 12, 3, 0, 0, -188, 0, }, /* 255 */ + { 28, 12, 3, 0, 0, -175, 0, }, /* 256 */ + { 10, 21, 12, 0, 0, -231, 0, }, /* 257 */ + { 10, 21, 12, 0, 0, -252, 0, }, /* 258 */ + { 15, 13, 12, 0, 0, -120, 0, }, /* 259 */ + { 15, 21, 12, 0, 0, 15, 0, }, /* 260 */ + { 15, 6, 12, 0, 0, 15, 0, }, /* 261 */ + { 3, 7, 12, 0, 0, 3, 0, }, /* 262 */ + { 3, 12, 3, 0, 0, 3, 0, }, /* 263 */ + { 3, 10, 5, 0, 0, 3, 0, }, /* 264 */ + { 3, 10, 3, 0, 0, 3, 0, }, /* 265 */ + { 3, 13, 12, 0, 0, -77, 0, }, /* 266 */ + { 3, 23, 12, 0, 0, 3, 0, }, /* 267 */ + { 3, 15, 12, 0, 0, 3, 0, }, /* 268 */ + { 3, 26, 12, 0, 0, 3, 0, }, /* 269 */ + { 3, 21, 12, 0, 0, 3, 0, }, /* 270 */ + { 22, 12, 3, 0, 0, 22, 0, }, /* 271 */ + { 22, 10, 5, 0, 0, 22, 0, }, /* 272 */ + { 22, 7, 12, 0, 0, 22, 0, }, /* 273 */ + { 22, 13, 12, 0, 0, -58, 0, }, /* 274 */ + { 22, 21, 12, 0, 0, 22, 0, }, /* 275 */ + { 21, 12, 3, 0, 0, 21, 0, }, /* 276 */ + { 21, 10, 5, 0, 0, 21, 0, }, /* 277 */ + { 21, 7, 12, 0, 0, 21, 0, }, /* 278 */ + { 21, 13, 12, 0, 0, -55, 0, }, /* 279 */ + { 21, 21, 12, 0, 0, 21, 0, }, /* 280 */ + { 21, 23, 12, 0, 0, 21, 0, }, /* 281 */ + { 44, 12, 3, 0, 0, 44, 0, }, /* 282 */ + { 44, 10, 5, 0, 0, 44, 0, }, /* 283 */ + { 44, 7, 12, 0, 0, 44, 0, }, /* 284 */ + { 44, 10, 3, 0, 0, 44, 0, }, /* 285 */ + { 44, 13, 12, 0, 0, 44, 0, }, /* 286 */ + { 44, 26, 12, 0, 0, 44, 0, }, /* 287 */ + { 44, 15, 12, 0, 0, 44, 0, }, /* 288 */ + { 54, 12, 3, 0, 0, 54, 0, }, /* 289 */ + { 54, 7, 12, 0, 0, 54, 0, }, /* 290 */ + { 54, 10, 3, 0, 0, 54, 0, }, /* 291 */ + { 54, 10, 5, 0, 0, 54, 0, }, /* 292 */ + { 54, 13, 12, 0, 0, -52, 0, }, /* 293 */ + { 54, 15, 12, 0, 0, -52, 0, }, /* 294 */ + { 54, 26, 12, 0, 0, -52, 0, }, /* 295 */ + { 54, 26, 12, 0, 0, 54, 0, }, /* 296 */ + { 54, 23, 12, 0, 0, 54, 0, }, /* 297 */ + { 55, 12, 3, 0, 0, 55, 0, }, /* 298 */ + { 55, 10, 5, 0, 0, 55, 0, }, /* 299 */ + { 55, 7, 12, 0, 0, 55, 0, }, /* 300 */ + { 55, 13, 12, 0, 0, 55, 0, }, /* 301 */ + { 55, 21, 12, 0, 0, 55, 0, }, /* 302 */ + { 55, 15, 12, 0, 0, 55, 0, }, /* 303 */ + { 55, 26, 12, 0, 0, 55, 0, }, /* 304 */ + { 29, 7, 12, 0, 0, 29, 0, }, /* 305 */ + { 29, 12, 3, 0, 0, 29, 0, }, /* 306 */ + { 29, 10, 5, 0, 0, 29, 0, }, /* 307 */ + { 29, 21, 12, 0, 0, 29, 0, }, /* 308 */ + { 29, 10, 3, 0, 0, 29, 0, }, /* 309 */ + { 29, 13, 12, 0, 0, -64, 0, }, /* 310 */ + { 37, 12, 3, 0, 0, 37, 0, }, /* 311 */ + { 37, 10, 5, 0, 0, 37, 0, }, /* 312 */ + { 37, 7, 12, 0, 0, 37, 0, }, /* 313 */ + { 37, 10, 3, 0, 0, 37, 0, }, /* 314 */ + { 37, 7, 4, 0, 0, 37, 0, }, /* 315 */ + { 37, 26, 12, 0, 0, 37, 0, }, /* 316 */ + { 37, 15, 12, 0, 0, 37, 0, }, /* 317 */ + { 37, 13, 12, 0, 0, 37, 0, }, /* 318 */ + { 48, 10, 5, 0, 0, 48, 0, }, /* 319 */ + { 48, 7, 12, 0, 0, 48, 0, }, /* 320 */ + { 48, 12, 3, 0, 0, 48, 0, }, /* 321 */ + { 48, 10, 3, 0, 0, 48, 0, }, /* 322 */ + { 48, 13, 12, 0, 0, 48, 0, }, /* 323 */ + { 48, 21, 12, 0, 0, 48, 0, }, /* 324 */ + { 57, 7, 12, 0, 0, 57, 0, }, /* 325 */ + { 57, 12, 3, 0, 0, 57, 0, }, /* 326 */ + { 57, 7, 5, 0, 0, 57, 0, }, /* 327 */ + { 57, 6, 12, 0, 0, 57, 0, }, /* 328 */ + { 57, 21, 12, 0, 0, 57, 0, }, /* 329 */ + { 57, 13, 12, 0, 0, 57, 0, }, /* 330 */ + { 33, 7, 12, 0, 0, 33, 0, }, /* 331 */ + { 33, 12, 3, 0, 0, 33, 0, }, /* 332 */ + { 33, 7, 5, 0, 0, 33, 0, }, /* 333 */ + { 33, 6, 12, 0, 0, 33, 0, }, /* 334 */ + { 33, 13, 12, 0, 0, 33, 0, }, /* 335 */ + { 58, 7, 12, 0, 0, 58, 0, }, /* 336 */ + { 58, 26, 12, 0, 0, 58, 0, }, /* 337 */ + { 58, 21, 12, 0, 0, 58, 0, }, /* 338 */ + { 58, 12, 3, 0, 0, 58, 0, }, /* 339 */ + { 58, 13, 12, 0, 0, 58, 0, }, /* 340 */ + { 58, 15, 12, 0, 0, 58, 0, }, /* 341 */ + { 58, 22, 12, 0, 0, 58, 0, }, /* 342 */ + { 58, 18, 12, 0, 0, 58, 0, }, /* 343 */ + { 58, 10, 5, 0, 0, 58, 0, }, /* 344 */ + { 39, 7, 12, 0, 0, 39, 0, }, /* 345 */ + { 39, 10, 12, 0, 0, 39, 0, }, /* 346 */ + { 39, 12, 3, 0, 0, 39, 0, }, /* 347 */ + { 39, 10, 5, 0, 0, 39, 0, }, /* 348 */ + { 39, 13, 12, 0, 0, -81, 0, }, /* 349 */ + { 39, 21, 12, 0, 0, 39, 0, }, /* 350 */ + { 39, 13, 12, 0, 0, 39, 0, }, /* 351 */ + { 39, 26, 12, 0, 0, 39, 0, }, /* 352 */ + { 17, 9, 12, 0, 7264, 17, 0, }, /* 353 */ + { 17, 5, 12, 0, 3008, 17, 0, }, /* 354 */ + { 10, 21, 12, 0, 0, -49, 0, }, /* 355 */ + { 17, 6, 12, 0, 0, 17, 0, }, /* 356 */ + { 24, 7, 6, 0, 0, 24, 0, }, /* 357 */ + { 24, 7, 7, 0, 0, 24, 0, }, /* 358 */ + { 24, 7, 8, 0, 0, 24, 0, }, /* 359 */ + { 16, 7, 12, 0, 0, 16, 0, }, /* 360 */ + { 16, 12, 3, 0, 0, 16, 0, }, /* 361 */ + { 16, 21, 12, 0, 0, 16, 0, }, /* 362 */ + { 16, 15, 12, 0, 0, 16, 0, }, /* 363 */ + { 16, 26, 12, 0, 0, 16, 0, }, /* 364 */ + { 9, 9, 12, 0, 38864, 9, 0, }, /* 365 */ + { 9, 9, 12, 0, 8, 9, 0, }, /* 366 */ + { 9, 5, 12, 0, -8, 9, 0, }, /* 367 */ + { 8, 17, 12, 0, 0, 8, 0, }, /* 368 */ + { 8, 7, 12, 0, 0, 8, 0, }, /* 369 */ + { 8, 26, 12, 0, 0, 8, 0, }, /* 370 */ + { 8, 21, 12, 0, 0, 8, 0, }, /* 371 */ + { 41, 29, 12, 0, 0, 41, 0, }, /* 372 */ + { 41, 7, 12, 0, 0, 41, 0, }, /* 373 */ + { 41, 22, 12, 0, 0, 41, 0, }, /* 374 */ + { 41, 18, 12, 0, 0, 41, 0, }, /* 375 */ + { 46, 7, 12, 0, 0, 46, 0, }, /* 376 */ + { 46, 14, 12, 0, 0, 46, 0, }, /* 377 */ + { 51, 7, 12, 0, 0, 51, 0, }, /* 378 */ + { 51, 12, 3, 0, 0, 51, 0, }, /* 379 */ + { 25, 7, 12, 0, 0, 25, 0, }, /* 380 */ + { 25, 12, 3, 0, 0, 25, 0, }, /* 381 */ + { 10, 21, 12, 0, 0, -115, 0, }, /* 382 */ + { 7, 7, 12, 0, 0, 7, 0, }, /* 383 */ + { 7, 12, 3, 0, 0, 7, 0, }, /* 384 */ + { 52, 7, 12, 0, 0, 52, 0, }, /* 385 */ + { 52, 12, 3, 0, 0, 52, 0, }, /* 386 */ + { 32, 7, 12, 0, 0, 32, 0, }, /* 387 */ + { 32, 12, 3, 0, 0, 32, 0, }, /* 388 */ + { 32, 10, 5, 0, 0, 32, 0, }, /* 389 */ + { 32, 21, 12, 0, 0, 32, 0, }, /* 390 */ + { 32, 6, 12, 0, 0, 32, 0, }, /* 391 */ + { 32, 23, 12, 0, 0, 32, 0, }, /* 392 */ + { 32, 13, 12, 0, 0, 32, 0, }, /* 393 */ + { 32, 15, 12, 0, 0, 32, 0, }, /* 394 */ + { 38, 21, 12, 0, 0, 38, 0, }, /* 395 */ + { 10, 21, 12, 0, 0, -70, 0, }, /* 396 */ + { 38, 17, 12, 0, 0, 38, 0, }, /* 397 */ + { 38, 12, 3, 0, 0, 38, 0, }, /* 398 */ + { 38, 1, 2, 0, 0, 38, 0, }, /* 399 */ + { 38, 13, 12, 0, 0, 38, 0, }, /* 400 */ + { 38, 7, 12, 0, 0, 38, 0, }, /* 401 */ + { 38, 6, 12, 0, 0, 38, 0, }, /* 402 */ + { 35, 7, 12, 0, 0, 35, 0, }, /* 403 */ + { 35, 12, 3, 0, 0, 35, 0, }, /* 404 */ + { 35, 10, 5, 0, 0, 35, 0, }, /* 405 */ + { 35, 26, 12, 0, 0, 35, 0, }, /* 406 */ + { 35, 21, 12, 0, 0, 35, 0, }, /* 407 */ + { 35, 13, 12, 0, 0, 35, 0, }, /* 408 */ + { 53, 7, 12, 0, 0, 53, 0, }, /* 409 */ + { 40, 7, 12, 0, 0, 40, 0, }, /* 410 */ + { 40, 13, 12, 0, 0, 40, 0, }, /* 411 */ + { 40, 15, 12, 0, 0, 40, 0, }, /* 412 */ + { 40, 26, 12, 0, 0, 40, 0, }, /* 413 */ + { 32, 26, 12, 0, 0, 32, 0, }, /* 414 */ + { 6, 7, 12, 0, 0, 6, 0, }, /* 415 */ + { 6, 12, 3, 0, 0, 6, 0, }, /* 416 */ + { 6, 10, 5, 0, 0, 6, 0, }, /* 417 */ + { 6, 21, 12, 0, 0, 6, 0, }, /* 418 */ + { 91, 7, 12, 0, 0, 91, 0, }, /* 419 */ + { 91, 10, 5, 0, 0, 91, 0, }, /* 420 */ + { 91, 12, 3, 0, 0, 91, 0, }, /* 421 */ + { 91, 10, 12, 0, 0, 91, 0, }, /* 422 */ + { 91, 13, 12, 0, 0, 91, 0, }, /* 423 */ + { 91, 21, 12, 0, 0, 91, 0, }, /* 424 */ + { 91, 6, 12, 0, 0, 91, 0, }, /* 425 */ + { 28, 11, 3, 0, 0, 28, 0, }, /* 426 */ + { 62, 12, 3, 0, 0, 62, 0, }, /* 427 */ + { 62, 10, 5, 0, 0, 62, 0, }, /* 428 */ + { 62, 7, 12, 0, 0, 62, 0, }, /* 429 */ + { 62, 10, 3, 0, 0, 62, 0, }, /* 430 */ + { 62, 13, 12, 0, 0, 62, 0, }, /* 431 */ + { 62, 21, 12, 0, 0, 62, 0, }, /* 432 */ + { 62, 26, 12, 0, 0, 62, 0, }, /* 433 */ + { 76, 12, 3, 0, 0, 76, 0, }, /* 434 */ + { 76, 10, 5, 0, 0, 76, 0, }, /* 435 */ + { 76, 7, 12, 0, 0, 76, 0, }, /* 436 */ + { 76, 13, 12, 0, 0, 76, 0, }, /* 437 */ + { 93, 7, 12, 0, 0, 93, 0, }, /* 438 */ + { 93, 12, 3, 0, 0, 93, 0, }, /* 439 */ + { 93, 10, 5, 0, 0, 93, 0, }, /* 440 */ + { 93, 21, 12, 0, 0, 93, 0, }, /* 441 */ + { 70, 7, 12, 0, 0, 70, 0, }, /* 442 */ + { 70, 10, 5, 0, 0, 70, 0, }, /* 443 */ + { 70, 12, 3, 0, 0, 70, 0, }, /* 444 */ + { 70, 21, 12, 0, 0, 70, 0, }, /* 445 */ + { 70, 13, 12, 0, 0, 70, 0, }, /* 446 */ + { 73, 13, 12, 0, 0, 73, 0, }, /* 447 */ + { 73, 7, 12, 0, 0, 73, 0, }, /* 448 */ + { 73, 6, 12, 0, 0, 73, 0, }, /* 449 */ + { 73, 21, 12, 0, 0, 73, 0, }, /* 450 */ + { 13, 5, 12, 63, -6222, 13, 0, }, /* 451 */ + { 13, 5, 12, 67, -6221, 13, 0, }, /* 452 */ + { 13, 5, 12, 71, -6212, 13, 0, }, /* 453 */ + { 13, 5, 12, 75, -6210, 13, 0, }, /* 454 */ + { 13, 5, 12, 79, -6210, 13, 0, }, /* 455 */ + { 13, 5, 12, 79, -6211, 13, 0, }, /* 456 */ + { 13, 5, 12, 84, -6204, 13, 0, }, /* 457 */ + { 13, 5, 12, 88, -6180, 13, 0, }, /* 458 */ + { 13, 5, 12, 108, 35267, 13, 0, }, /* 459 */ + { 17, 9, 12, 0, -3008, 17, 0, }, /* 460 */ + { 76, 21, 12, 0, 0, 76, 0, }, /* 461 */ + { 28, 12, 3, 0, 0, -110, 0, }, /* 462 */ + { 28, 12, 3, 0, 0, 15, 0, }, /* 463 */ + { 10, 21, 12, 0, 0, -37, 0, }, /* 464 */ + { 28, 12, 3, 0, 0, -16, 0, }, /* 465 */ + { 28, 12, 3, 0, 0, -43, 0, }, /* 466 */ + { 28, 12, 3, 0, 0, -138, 0, }, /* 467 */ + { 10, 10, 5, 0, 0, -16, 0, }, /* 468 */ + { 10, 7, 12, 0, 0, -40, 0, }, /* 469 */ + { 10, 7, 12, 0, 0, -16, 0, }, /* 470 */ + { 10, 7, 12, 0, 0, 15, 0, }, /* 471 */ + { 10, 7, 12, 0, 0, -154, 0, }, /* 472 */ + { 10, 7, 12, 0, 0, -37, 0, }, /* 473 */ + { 28, 12, 3, 0, 0, -89, 0, }, /* 474 */ + { 10, 10, 5, 0, 0, 3, 0, }, /* 475 */ + { 28, 12, 3, 0, 0, -37, 0, }, /* 476 */ + { 10, 7, 12, 0, 0, 150, 0, }, /* 477 */ + { 13, 5, 12, 0, 0, 13, 0, }, /* 478 */ + { 13, 6, 12, 0, 0, 13, 0, }, /* 479 */ + { 34, 5, 12, 0, 35332, 34, 0, }, /* 480 */ + { 34, 5, 12, 0, 3814, 34, 0, }, /* 481 */ + { 34, 5, 12, 0, 35384, 34, 0, }, /* 482 */ + { 34, 9, 12, 92, 1, 34, 0, }, /* 483 */ + { 34, 5, 12, 92, -1, 34, 0, }, /* 484 */ + { 34, 5, 12, 92, -58, 34, 0, }, /* 485 */ + { 34, 9, 12, 0, -7615, 34, 0, }, /* 486 */ + { 20, 5, 12, 0, 8, 20, 0, }, /* 487 */ + { 20, 9, 12, 0, -8, 20, 0, }, /* 488 */ + { 20, 5, 12, 0, 74, 20, 0, }, /* 489 */ + { 20, 5, 12, 0, 86, 20, 0, }, /* 490 */ + { 20, 5, 12, 0, 100, 20, 0, }, /* 491 */ + { 20, 5, 12, 0, 128, 20, 0, }, /* 492 */ + { 20, 5, 12, 0, 112, 20, 0, }, /* 493 */ + { 20, 5, 12, 0, 126, 20, 0, }, /* 494 */ + { 20, 8, 12, 0, -8, 20, 0, }, /* 495 */ + { 20, 5, 12, 0, 9, 20, 0, }, /* 496 */ + { 20, 9, 12, 0, -74, 20, 0, }, /* 497 */ + { 20, 8, 12, 0, -9, 20, 0, }, /* 498 */ + { 20, 5, 12, 21, -7173, 20, 0, }, /* 499 */ + { 20, 9, 12, 0, -86, 20, 0, }, /* 500 */ + { 20, 9, 12, 0, -100, 20, 0, }, /* 501 */ + { 20, 9, 12, 0, -112, 20, 0, }, /* 502 */ + { 20, 9, 12, 0, -128, 20, 0, }, /* 503 */ + { 20, 9, 12, 0, -126, 20, 0, }, /* 504 */ + { 28, 1, 3, 0, 0, 28, 0, }, /* 505 */ + { 28, 1, 13, 0, 0, 28, 0, }, /* 506 */ + { 10, 27, 2, 0, 0, 10, 0, }, /* 507 */ + { 10, 28, 2, 0, 0, 10, 0, }, /* 508 */ + { 10, 29, 12, 0, 0, -67, 0, }, /* 509 */ + { 10, 21, 14, 0, 0, 10, 0, }, /* 510 */ + { 0, 2, 2, 0, 0, 0, 0, }, /* 511 */ + { 28, 12, 3, 0, 0, -93, 0, }, /* 512 */ + { 10, 9, 12, 0, 0, 10, 0, }, /* 513 */ + { 10, 5, 12, 0, 0, 10, 0, }, /* 514 */ + { 20, 9, 12, 96, -7517, 20, 0, }, /* 515 */ + { 34, 9, 12, 100, -8383, 34, 0, }, /* 516 */ + { 34, 9, 12, 104, -8262, 34, 0, }, /* 517 */ + { 34, 9, 12, 0, 28, 34, 0, }, /* 518 */ + { 10, 7, 12, 0, 0, 10, 0, }, /* 519 */ + { 10, 5, 14, 0, 0, 10, 0, }, /* 520 */ + { 34, 5, 12, 0, -28, 34, 0, }, /* 521 */ + { 34, 14, 12, 0, 16, 34, 0, }, /* 522 */ + { 34, 14, 12, 0, -16, 34, 0, }, /* 523 */ + { 34, 14, 12, 0, 0, 34, 0, }, /* 524 */ + { 10, 25, 14, 0, 0, 10, 0, }, /* 525 */ + { 10, 26, 12, 0, 26, 10, 0, }, /* 526 */ + { 10, 26, 14, 0, 26, 10, 0, }, /* 527 */ + { 10, 26, 12, 0, -26, 10, 0, }, /* 528 */ + { 5, 26, 12, 0, 0, 5, 0, }, /* 529 */ + { 18, 9, 12, 0, 48, 18, 0, }, /* 530 */ + { 18, 5, 12, 0, -48, 18, 0, }, /* 531 */ + { 34, 9, 12, 0, -10743, 34, 0, }, /* 532 */ + { 34, 9, 12, 0, -3814, 34, 0, }, /* 533 */ + { 34, 9, 12, 0, -10727, 34, 0, }, /* 534 */ + { 34, 5, 12, 0, -10795, 34, 0, }, /* 535 */ + { 34, 5, 12, 0, -10792, 34, 0, }, /* 536 */ + { 34, 9, 12, 0, -10780, 34, 0, }, /* 537 */ + { 34, 9, 12, 0, -10749, 34, 0, }, /* 538 */ + { 34, 9, 12, 0, -10783, 34, 0, }, /* 539 */ + { 34, 9, 12, 0, -10782, 34, 0, }, /* 540 */ + { 34, 9, 12, 0, -10815, 34, 0, }, /* 541 */ + { 11, 5, 12, 0, 0, 11, 0, }, /* 542 */ + { 11, 26, 12, 0, 0, 11, 0, }, /* 543 */ + { 11, 12, 3, 0, 0, 11, 0, }, /* 544 */ + { 11, 21, 12, 0, 0, 11, 0, }, /* 545 */ + { 11, 15, 12, 0, 0, 11, 0, }, /* 546 */ + { 17, 5, 12, 0, -7264, 17, 0, }, /* 547 */ + { 59, 7, 12, 0, 0, 59, 0, }, /* 548 */ + { 59, 6, 12, 0, 0, 59, 0, }, /* 549 */ + { 59, 21, 12, 0, 0, 59, 0, }, /* 550 */ + { 59, 12, 3, 0, 0, 59, 0, }, /* 551 */ + { 13, 12, 3, 0, 0, 13, 0, }, /* 552 */ + { 10, 21, 12, 0, 0, -28, 0, }, /* 553 */ + { 23, 26, 12, 0, 0, 23, 0, }, /* 554 */ + { 10, 21, 12, 0, 0, -131, 0, }, /* 555 */ + { 10, 21, 12, 0, 0, -125, 0, }, /* 556 */ + { 23, 6, 12, 0, 0, 23, 0, }, /* 557 */ + { 10, 7, 12, 0, 0, 23, 0, }, /* 558 */ + { 23, 14, 12, 0, 0, 23, 0, }, /* 559 */ + { 10, 22, 12, 0, 0, -131, 0, }, /* 560 */ + { 10, 18, 12, 0, 0, -131, 0, }, /* 561 */ + { 10, 26, 12, 0, 0, -125, 0, }, /* 562 */ + { 10, 17, 12, 0, 0, -125, 0, }, /* 563 */ + { 10, 22, 12, 0, 0, -125, 0, }, /* 564 */ + { 10, 18, 12, 0, 0, -125, 0, }, /* 565 */ + { 28, 12, 3, 0, 0, -19, 0, }, /* 566 */ + { 24, 10, 3, 0, 0, 24, 0, }, /* 567 */ + { 10, 17, 14, 0, 0, -125, 0, }, /* 568 */ + { 10, 6, 12, 0, 0, -61, 0, }, /* 569 */ + { 10, 7, 12, 0, 0, -97, 0, }, /* 570 */ + { 10, 21, 14, 0, 0, -97, 0, }, /* 571 */ + { 10, 26, 12, 0, 0, 23, 0, }, /* 572 */ + { 27, 7, 12, 0, 0, 27, 0, }, /* 573 */ + { 28, 12, 3, 0, 0, -61, 0, }, /* 574 */ + { 10, 24, 12, 0, 0, -61, 0, }, /* 575 */ + { 27, 6, 12, 0, 0, 27, 0, }, /* 576 */ + { 10, 17, 12, 0, 0, -61, 0, }, /* 577 */ + { 30, 7, 12, 0, 0, 30, 0, }, /* 578 */ + { 30, 6, 12, 0, 0, 30, 0, }, /* 579 */ + { 4, 7, 12, 0, 0, 4, 0, }, /* 580 */ + { 24, 7, 12, 0, 0, 24, 0, }, /* 581 */ + { 10, 15, 12, 0, 0, 23, 0, }, /* 582 */ + { 24, 26, 12, 0, 0, 24, 0, }, /* 583 */ + { 10, 26, 14, 0, 0, 23, 0, }, /* 584 */ + { 30, 26, 12, 0, 0, 30, 0, }, /* 585 */ + { 23, 7, 12, 0, 0, 23, 0, }, /* 586 */ + { 61, 7, 12, 0, 0, 61, 0, }, /* 587 */ + { 61, 6, 12, 0, 0, 61, 0, }, /* 588 */ + { 61, 26, 12, 0, 0, 61, 0, }, /* 589 */ + { 86, 7, 12, 0, 0, 86, 0, }, /* 590 */ + { 86, 6, 12, 0, 0, 86, 0, }, /* 591 */ + { 86, 21, 12, 0, 0, 86, 0, }, /* 592 */ + { 77, 7, 12, 0, 0, 77, 0, }, /* 593 */ + { 77, 6, 12, 0, 0, 77, 0, }, /* 594 */ + { 77, 21, 12, 0, 0, 77, 0, }, /* 595 */ + { 77, 13, 12, 0, 0, 77, 0, }, /* 596 */ + { 13, 9, 12, 108, 1, 13, 0, }, /* 597 */ + { 13, 5, 12, 108, -35267, 13, 0, }, /* 598 */ + { 13, 7, 12, 0, 0, 13, 0, }, /* 599 */ + { 13, 21, 12, 0, 0, 13, 0, }, /* 600 */ + { 79, 7, 12, 0, 0, 79, 0, }, /* 601 */ + { 79, 14, 12, 0, 0, 79, 0, }, /* 602 */ + { 79, 12, 3, 0, 0, 79, 0, }, /* 603 */ + { 79, 21, 12, 0, 0, 79, 0, }, /* 604 */ + { 34, 9, 12, 0, -35332, 34, 0, }, /* 605 */ + { 34, 9, 12, 0, -42280, 34, 0, }, /* 606 */ + { 34, 5, 12, 0, 48, 34, 0, }, /* 607 */ + { 34, 9, 12, 0, -42308, 34, 0, }, /* 608 */ + { 34, 9, 12, 0, -42319, 34, 0, }, /* 609 */ + { 34, 9, 12, 0, -42315, 34, 0, }, /* 610 */ + { 34, 9, 12, 0, -42305, 34, 0, }, /* 611 */ + { 34, 9, 12, 0, -42258, 34, 0, }, /* 612 */ + { 34, 9, 12, 0, -42282, 34, 0, }, /* 613 */ + { 34, 9, 12, 0, -42261, 34, 0, }, /* 614 */ + { 34, 9, 12, 0, 928, 34, 0, }, /* 615 */ + { 34, 9, 12, 0, -48, 34, 0, }, /* 616 */ + { 34, 9, 12, 0, -42307, 34, 0, }, /* 617 */ + { 34, 9, 12, 0, -35384, 34, 0, }, /* 618 */ + { 49, 7, 12, 0, 0, 49, 0, }, /* 619 */ + { 49, 12, 3, 0, 0, 49, 0, }, /* 620 */ + { 49, 10, 5, 0, 0, 49, 0, }, /* 621 */ + { 49, 26, 12, 0, 0, 49, 0, }, /* 622 */ + { 10, 15, 12, 0, 0, -216, 0, }, /* 623 */ + { 10, 15, 12, 0, 0, -202, 0, }, /* 624 */ + { 10, 26, 12, 0, 0, -163, 0, }, /* 625 */ + { 10, 23, 12, 0, 0, -163, 0, }, /* 626 */ + { 65, 7, 12, 0, 0, 65, 0, }, /* 627 */ + { 65, 21, 12, 0, 0, 65, 0, }, /* 628 */ + { 75, 10, 5, 0, 0, 75, 0, }, /* 629 */ + { 75, 7, 12, 0, 0, 75, 0, }, /* 630 */ + { 75, 12, 3, 0, 0, 75, 0, }, /* 631 */ + { 75, 21, 12, 0, 0, 75, 0, }, /* 632 */ + { 75, 13, 12, 0, 0, 75, 0, }, /* 633 */ + { 15, 12, 3, 0, 0, -16, 0, }, /* 634 */ + { 15, 7, 12, 0, 0, -46, 0, }, /* 635 */ + { 69, 13, 12, 0, 0, 69, 0, }, /* 636 */ + { 69, 7, 12, 0, 0, 69, 0, }, /* 637 */ + { 69, 12, 3, 0, 0, 69, 0, }, /* 638 */ + { 10, 21, 12, 0, 0, -101, 0, }, /* 639 */ + { 69, 21, 12, 0, 0, 69, 0, }, /* 640 */ + { 74, 7, 12, 0, 0, 74, 0, }, /* 641 */ + { 74, 12, 3, 0, 0, 74, 0, }, /* 642 */ + { 74, 10, 5, 0, 0, 74, 0, }, /* 643 */ + { 74, 21, 12, 0, 0, 74, 0, }, /* 644 */ + { 84, 12, 3, 0, 0, 84, 0, }, /* 645 */ + { 84, 10, 5, 0, 0, 84, 0, }, /* 646 */ + { 84, 7, 12, 0, 0, 84, 0, }, /* 647 */ + { 84, 21, 12, 0, 0, 84, 0, }, /* 648 */ + { 10, 6, 12, 0, 0, -22, 0, }, /* 649 */ + { 84, 13, 12, 0, 0, 84, 0, }, /* 650 */ + { 39, 6, 12, 0, 0, 39, 0, }, /* 651 */ + { 68, 7, 12, 0, 0, 68, 0, }, /* 652 */ + { 68, 12, 3, 0, 0, 68, 0, }, /* 653 */ + { 68, 10, 5, 0, 0, 68, 0, }, /* 654 */ + { 68, 13, 12, 0, 0, 68, 0, }, /* 655 */ + { 68, 21, 12, 0, 0, 68, 0, }, /* 656 */ + { 92, 7, 12, 0, 0, 92, 0, }, /* 657 */ + { 92, 12, 3, 0, 0, 92, 0, }, /* 658 */ + { 92, 6, 12, 0, 0, 92, 0, }, /* 659 */ + { 92, 21, 12, 0, 0, 92, 0, }, /* 660 */ + { 87, 7, 12, 0, 0, 87, 0, }, /* 661 */ + { 87, 10, 5, 0, 0, 87, 0, }, /* 662 */ + { 87, 12, 3, 0, 0, 87, 0, }, /* 663 */ + { 87, 21, 12, 0, 0, 87, 0, }, /* 664 */ + { 87, 6, 12, 0, 0, 87, 0, }, /* 665 */ + { 34, 5, 12, 0, -928, 34, 0, }, /* 666 */ + { 9, 5, 12, 0, -38864, 9, 0, }, /* 667 */ + { 87, 13, 12, 0, 0, 87, 0, }, /* 668 */ + { 24, 7, 9, 0, 0, 24, 0, }, /* 669 */ + { 24, 7, 10, 0, 0, 24, 0, }, /* 670 */ + { 0, 4, 12, 0, 0, 0, 0, }, /* 671 */ + { 0, 3, 12, 0, 0, 0, 0, }, /* 672 */ + { 26, 25, 12, 0, 0, 26, 0, }, /* 673 */ + { 1, 24, 12, 0, 0, 1, 0, }, /* 674 */ + { 1, 7, 12, 0, 0, -10, 0, }, /* 675 */ + { 1, 26, 12, 0, 0, -10, 0, }, /* 676 */ + { 10, 6, 3, 0, 0, -61, 0, }, /* 677 */ + { 36, 7, 12, 0, 0, 36, 0, }, /* 678 */ + { 10, 21, 12, 0, 0, -25, 0, }, /* 679 */ + { 10, 15, 12, 0, 0, -85, 0, }, /* 680 */ + { 10, 26, 12, 0, 0, -25, 0, }, /* 681 */ + { 20, 14, 12, 0, 0, 20, 0, }, /* 682 */ + { 20, 15, 12, 0, 0, 20, 0, }, /* 683 */ + { 20, 26, 12, 0, 0, 20, 0, }, /* 684 */ + { 71, 7, 12, 0, 0, 71, 0, }, /* 685 */ + { 67, 7, 12, 0, 0, 67, 0, }, /* 686 */ + { 28, 12, 3, 0, 0, -1, 0, }, /* 687 */ + { 10, 15, 12, 0, 0, -1, 0, }, /* 688 */ + { 42, 7, 12, 0, 0, 42, 0, }, /* 689 */ + { 42, 15, 12, 0, 0, 42, 0, }, /* 690 */ + { 19, 7, 12, 0, 0, 19, 0, }, /* 691 */ + { 19, 14, 12, 0, 0, 19, 0, }, /* 692 */ + { 118, 7, 12, 0, 0, 118, 0, }, /* 693 */ + { 118, 12, 3, 0, 0, 118, 0, }, /* 694 */ + { 60, 7, 12, 0, 0, 60, 0, }, /* 695 */ + { 60, 21, 12, 0, 0, 60, 0, }, /* 696 */ + { 43, 7, 12, 0, 0, 43, 0, }, /* 697 */ + { 43, 21, 12, 0, 0, 43, 0, }, /* 698 */ + { 43, 14, 12, 0, 0, 43, 0, }, /* 699 */ + { 14, 9, 12, 0, 40, 14, 0, }, /* 700 */ + { 14, 5, 12, 0, -40, 14, 0, }, /* 701 */ + { 47, 7, 12, 0, 0, 47, 0, }, /* 702 */ + { 45, 7, 12, 0, 0, 45, 0, }, /* 703 */ + { 45, 13, 12, 0, 0, 45, 0, }, /* 704 */ + { 136, 9, 12, 0, 40, 136, 0, }, /* 705 */ + { 136, 5, 12, 0, -40, 136, 0, }, /* 706 */ + { 106, 7, 12, 0, 0, 106, 0, }, /* 707 */ + { 104, 7, 12, 0, 0, 104, 0, }, /* 708 */ + { 104, 21, 12, 0, 0, 104, 0, }, /* 709 */ + { 110, 7, 12, 0, 0, 110, 0, }, /* 710 */ + { 12, 7, 12, 0, 0, 12, 0, }, /* 711 */ + { 81, 7, 12, 0, 0, 81, 0, }, /* 712 */ + { 81, 21, 12, 0, 0, 81, 0, }, /* 713 */ + { 81, 15, 12, 0, 0, 81, 0, }, /* 714 */ + { 120, 7, 12, 0, 0, 120, 0, }, /* 715 */ + { 120, 26, 12, 0, 0, 120, 0, }, /* 716 */ + { 120, 15, 12, 0, 0, 120, 0, }, /* 717 */ + { 116, 7, 12, 0, 0, 116, 0, }, /* 718 */ + { 116, 15, 12, 0, 0, 116, 0, }, /* 719 */ + { 128, 7, 12, 0, 0, 128, 0, }, /* 720 */ + { 128, 15, 12, 0, 0, 128, 0, }, /* 721 */ + { 66, 7, 12, 0, 0, 66, 0, }, /* 722 */ + { 66, 15, 12, 0, 0, 66, 0, }, /* 723 */ + { 66, 21, 12, 0, 0, 66, 0, }, /* 724 */ + { 72, 7, 12, 0, 0, 72, 0, }, /* 725 */ + { 72, 21, 12, 0, 0, 72, 0, }, /* 726 */ + { 98, 7, 12, 0, 0, 98, 0, }, /* 727 */ + { 97, 7, 12, 0, 0, 97, 0, }, /* 728 */ + { 97, 15, 12, 0, 0, 97, 0, }, /* 729 */ + { 31, 7, 12, 0, 0, 31, 0, }, /* 730 */ + { 31, 12, 3, 0, 0, 31, 0, }, /* 731 */ + { 31, 15, 12, 0, 0, 31, 0, }, /* 732 */ + { 31, 21, 12, 0, 0, 31, 0, }, /* 733 */ + { 88, 7, 12, 0, 0, 88, 0, }, /* 734 */ + { 88, 15, 12, 0, 0, 88, 0, }, /* 735 */ + { 88, 21, 12, 0, 0, 88, 0, }, /* 736 */ + { 117, 7, 12, 0, 0, 117, 0, }, /* 737 */ + { 117, 15, 12, 0, 0, 117, 0, }, /* 738 */ + { 112, 7, 12, 0, 0, 112, 0, }, /* 739 */ + { 112, 26, 12, 0, 0, 112, 0, }, /* 740 */ + { 112, 12, 3, 0, 0, 112, 0, }, /* 741 */ + { 112, 15, 12, 0, 0, 112, 0, }, /* 742 */ + { 112, 21, 12, 0, 0, 112, 0, }, /* 743 */ + { 78, 7, 12, 0, 0, 78, 0, }, /* 744 */ + { 78, 21, 12, 0, 0, 78, 0, }, /* 745 */ + { 83, 7, 12, 0, 0, 83, 0, }, /* 746 */ + { 83, 15, 12, 0, 0, 83, 0, }, /* 747 */ + { 82, 7, 12, 0, 0, 82, 0, }, /* 748 */ + { 82, 15, 12, 0, 0, 82, 0, }, /* 749 */ + { 121, 7, 12, 0, 0, 121, 0, }, /* 750 */ + { 121, 21, 12, 0, 0, 121, 0, }, /* 751 */ + { 121, 15, 12, 0, 0, 121, 0, }, /* 752 */ + { 89, 7, 12, 0, 0, 89, 0, }, /* 753 */ + { 130, 9, 12, 0, 64, 130, 0, }, /* 754 */ + { 130, 5, 12, 0, -64, 130, 0, }, /* 755 */ + { 130, 15, 12, 0, 0, 130, 0, }, /* 756 */ + { 144, 7, 12, 0, 0, 144, 0, }, /* 757 */ + { 144, 12, 3, 0, 0, 144, 0, }, /* 758 */ + { 144, 13, 12, 0, 0, 144, 0, }, /* 759 */ + { 1, 15, 12, 0, 0, 1, 0, }, /* 760 */ + { 147, 7, 12, 0, 0, 147, 0, }, /* 761 */ + { 147, 15, 12, 0, 0, 147, 0, }, /* 762 */ + { 148, 7, 12, 0, 0, 148, 0, }, /* 763 */ + { 148, 12, 3, 0, 0, 148, 0, }, /* 764 */ + { 148, 15, 12, 0, 0, 148, 0, }, /* 765 */ + { 148, 21, 12, 0, 0, 148, 0, }, /* 766 */ + { 149, 7, 12, 0, 0, 149, 0, }, /* 767 */ + { 94, 10, 5, 0, 0, 94, 0, }, /* 768 */ + { 94, 12, 3, 0, 0, 94, 0, }, /* 769 */ + { 94, 7, 12, 0, 0, 94, 0, }, /* 770 */ + { 94, 21, 12, 0, 0, 94, 0, }, /* 771 */ + { 94, 15, 12, 0, 0, 94, 0, }, /* 772 */ + { 94, 13, 12, 0, 0, 94, 0, }, /* 773 */ + { 85, 12, 3, 0, 0, 85, 0, }, /* 774 */ + { 85, 10, 5, 0, 0, 85, 0, }, /* 775 */ + { 85, 7, 12, 0, 0, 85, 0, }, /* 776 */ + { 85, 21, 12, 0, 0, 85, 0, }, /* 777 */ + { 85, 1, 4, 0, 0, 85, 0, }, /* 778 */ + { 101, 7, 12, 0, 0, 101, 0, }, /* 779 */ + { 101, 13, 12, 0, 0, 101, 0, }, /* 780 */ + { 96, 12, 3, 0, 0, 96, 0, }, /* 781 */ + { 96, 7, 12, 0, 0, 96, 0, }, /* 782 */ + { 96, 10, 5, 0, 0, 96, 0, }, /* 783 */ + { 96, 13, 12, 0, 0, 96, 0, }, /* 784 */ + { 96, 21, 12, 0, 0, 96, 0, }, /* 785 */ + { 111, 7, 12, 0, 0, 111, 0, }, /* 786 */ + { 111, 12, 3, 0, 0, 111, 0, }, /* 787 */ + { 111, 21, 12, 0, 0, 111, 0, }, /* 788 */ + { 100, 12, 3, 0, 0, 100, 0, }, /* 789 */ + { 100, 10, 5, 0, 0, 100, 0, }, /* 790 */ + { 100, 7, 12, 0, 0, 100, 0, }, /* 791 */ + { 100, 7, 4, 0, 0, 100, 0, }, /* 792 */ + { 100, 21, 12, 0, 0, 100, 0, }, /* 793 */ + { 100, 13, 12, 0, 0, 100, 0, }, /* 794 */ + { 48, 15, 12, 0, 0, 48, 0, }, /* 795 */ + { 108, 7, 12, 0, 0, 108, 0, }, /* 796 */ + { 108, 10, 5, 0, 0, 108, 0, }, /* 797 */ + { 108, 12, 3, 0, 0, 108, 0, }, /* 798 */ + { 108, 21, 12, 0, 0, 108, 0, }, /* 799 */ + { 129, 7, 12, 0, 0, 129, 0, }, /* 800 */ + { 129, 21, 12, 0, 0, 129, 0, }, /* 801 */ + { 109, 7, 12, 0, 0, 109, 0, }, /* 802 */ + { 109, 12, 3, 0, 0, 109, 0, }, /* 803 */ + { 109, 10, 5, 0, 0, 109, 0, }, /* 804 */ + { 109, 13, 12, 0, 0, 109, 0, }, /* 805 */ + { 107, 12, 3, 0, 0, 107, 0, }, /* 806 */ + { 107, 12, 3, 0, 0, -52, 0, }, /* 807 */ + { 107, 10, 5, 0, 0, 107, 0, }, /* 808 */ + { 107, 10, 5, 0, 0, -52, 0, }, /* 809 */ + { 107, 7, 12, 0, 0, 107, 0, }, /* 810 */ + { 28, 12, 3, 0, 0, -52, 0, }, /* 811 */ + { 107, 10, 3, 0, 0, 107, 0, }, /* 812 */ + { 135, 7, 12, 0, 0, 135, 0, }, /* 813 */ + { 135, 10, 5, 0, 0, 135, 0, }, /* 814 */ + { 135, 12, 3, 0, 0, 135, 0, }, /* 815 */ + { 135, 21, 12, 0, 0, 135, 0, }, /* 816 */ + { 135, 13, 12, 0, 0, 135, 0, }, /* 817 */ + { 124, 7, 12, 0, 0, 124, 0, }, /* 818 */ + { 124, 10, 3, 0, 0, 124, 0, }, /* 819 */ + { 124, 10, 5, 0, 0, 124, 0, }, /* 820 */ + { 124, 12, 3, 0, 0, 124, 0, }, /* 821 */ + { 124, 21, 12, 0, 0, 124, 0, }, /* 822 */ + { 124, 13, 12, 0, 0, 124, 0, }, /* 823 */ + { 123, 7, 12, 0, 0, 123, 0, }, /* 824 */ + { 123, 10, 3, 0, 0, 123, 0, }, /* 825 */ + { 123, 10, 5, 0, 0, 123, 0, }, /* 826 */ + { 123, 12, 3, 0, 0, 123, 0, }, /* 827 */ + { 123, 21, 12, 0, 0, 123, 0, }, /* 828 */ + { 114, 7, 12, 0, 0, 114, 0, }, /* 829 */ + { 114, 10, 5, 0, 0, 114, 0, }, /* 830 */ + { 114, 12, 3, 0, 0, 114, 0, }, /* 831 */ + { 114, 21, 12, 0, 0, 114, 0, }, /* 832 */ + { 114, 13, 12, 0, 0, 114, 0, }, /* 833 */ + { 102, 7, 12, 0, 0, 102, 0, }, /* 834 */ + { 102, 12, 3, 0, 0, 102, 0, }, /* 835 */ + { 102, 10, 5, 0, 0, 102, 0, }, /* 836 */ + { 102, 13, 12, 0, 0, 102, 0, }, /* 837 */ + { 126, 7, 12, 0, 0, 126, 0, }, /* 838 */ + { 126, 12, 3, 0, 0, 126, 0, }, /* 839 */ + { 126, 10, 5, 0, 0, 126, 0, }, /* 840 */ + { 126, 13, 12, 0, 0, 126, 0, }, /* 841 */ + { 126, 15, 12, 0, 0, 126, 0, }, /* 842 */ + { 126, 21, 12, 0, 0, 126, 0, }, /* 843 */ + { 126, 26, 12, 0, 0, 126, 0, }, /* 844 */ + { 142, 7, 12, 0, 0, 142, 0, }, /* 845 */ + { 142, 10, 5, 0, 0, 142, 0, }, /* 846 */ + { 142, 12, 3, 0, 0, 142, 0, }, /* 847 */ + { 142, 21, 12, 0, 0, 142, 0, }, /* 848 */ + { 125, 9, 12, 0, 32, 125, 0, }, /* 849 */ + { 125, 5, 12, 0, -32, 125, 0, }, /* 850 */ + { 125, 13, 12, 0, 0, 125, 0, }, /* 851 */ + { 125, 15, 12, 0, 0, 125, 0, }, /* 852 */ + { 125, 7, 12, 0, 0, 125, 0, }, /* 853 */ + { 150, 7, 12, 0, 0, 150, 0, }, /* 854 */ + { 150, 10, 5, 0, 0, 150, 0, }, /* 855 */ + { 150, 12, 3, 0, 0, 150, 0, }, /* 856 */ + { 150, 21, 12, 0, 0, 150, 0, }, /* 857 */ + { 141, 7, 12, 0, 0, 141, 0, }, /* 858 */ + { 141, 12, 3, 0, 0, 141, 0, }, /* 859 */ + { 141, 10, 5, 0, 0, 141, 0, }, /* 860 */ + { 141, 7, 4, 0, 0, 141, 0, }, /* 861 */ + { 141, 21, 12, 0, 0, 141, 0, }, /* 862 */ + { 140, 7, 12, 0, 0, 140, 0, }, /* 863 */ + { 140, 12, 3, 0, 0, 140, 0, }, /* 864 */ + { 140, 10, 5, 0, 0, 140, 0, }, /* 865 */ + { 140, 7, 4, 0, 0, 140, 0, }, /* 866 */ + { 140, 21, 12, 0, 0, 140, 0, }, /* 867 */ + { 122, 7, 12, 0, 0, 122, 0, }, /* 868 */ + { 133, 7, 12, 0, 0, 133, 0, }, /* 869 */ + { 133, 10, 5, 0, 0, 133, 0, }, /* 870 */ + { 133, 12, 3, 0, 0, 133, 0, }, /* 871 */ + { 133, 21, 12, 0, 0, 133, 0, }, /* 872 */ + { 133, 13, 12, 0, 0, 133, 0, }, /* 873 */ + { 133, 15, 12, 0, 0, 133, 0, }, /* 874 */ + { 134, 21, 12, 0, 0, 134, 0, }, /* 875 */ + { 134, 7, 12, 0, 0, 134, 0, }, /* 876 */ + { 134, 12, 3, 0, 0, 134, 0, }, /* 877 */ + { 134, 10, 5, 0, 0, 134, 0, }, /* 878 */ + { 138, 7, 12, 0, 0, 138, 0, }, /* 879 */ + { 138, 12, 3, 0, 0, 138, 0, }, /* 880 */ + { 138, 7, 4, 0, 0, 138, 0, }, /* 881 */ + { 138, 13, 12, 0, 0, 138, 0, }, /* 882 */ + { 143, 7, 12, 0, 0, 143, 0, }, /* 883 */ + { 143, 10, 5, 0, 0, 143, 0, }, /* 884 */ + { 143, 12, 3, 0, 0, 143, 0, }, /* 885 */ + { 143, 13, 12, 0, 0, 143, 0, }, /* 886 */ + { 145, 7, 12, 0, 0, 145, 0, }, /* 887 */ + { 145, 12, 3, 0, 0, 145, 0, }, /* 888 */ + { 145, 10, 5, 0, 0, 145, 0, }, /* 889 */ + { 145, 21, 12, 0, 0, 145, 0, }, /* 890 */ + { 54, 15, 12, 0, 0, 54, 0, }, /* 891 */ + { 54, 21, 12, 0, 0, 54, 0, }, /* 892 */ + { 63, 7, 12, 0, 0, 63, 0, }, /* 893 */ + { 63, 14, 12, 0, 0, 63, 0, }, /* 894 */ + { 63, 21, 12, 0, 0, 63, 0, }, /* 895 */ + { 80, 7, 12, 0, 0, 80, 0, }, /* 896 */ + { 80, 1, 2, 0, 0, 80, 0, }, /* 897 */ + { 127, 7, 12, 0, 0, 127, 0, }, /* 898 */ + { 115, 7, 12, 0, 0, 115, 0, }, /* 899 */ + { 115, 13, 12, 0, 0, 115, 0, }, /* 900 */ + { 115, 21, 12, 0, 0, 115, 0, }, /* 901 */ + { 103, 7, 12, 0, 0, 103, 0, }, /* 902 */ + { 103, 12, 3, 0, 0, 103, 0, }, /* 903 */ + { 103, 21, 12, 0, 0, 103, 0, }, /* 904 */ + { 119, 7, 12, 0, 0, 119, 0, }, /* 905 */ + { 119, 12, 3, 0, 0, 119, 0, }, /* 906 */ + { 119, 21, 12, 0, 0, 119, 0, }, /* 907 */ + { 119, 26, 12, 0, 0, 119, 0, }, /* 908 */ + { 119, 6, 12, 0, 0, 119, 0, }, /* 909 */ + { 119, 13, 12, 0, 0, 119, 0, }, /* 910 */ + { 119, 15, 12, 0, 0, 119, 0, }, /* 911 */ + { 146, 9, 12, 0, 32, 146, 0, }, /* 912 */ + { 146, 5, 12, 0, -32, 146, 0, }, /* 913 */ + { 146, 15, 12, 0, 0, 146, 0, }, /* 914 */ + { 146, 21, 12, 0, 0, 146, 0, }, /* 915 */ + { 99, 7, 12, 0, 0, 99, 0, }, /* 916 */ + { 99, 12, 3, 0, 0, 99, 0, }, /* 917 */ + { 99, 10, 5, 0, 0, 99, 0, }, /* 918 */ + { 99, 6, 12, 0, 0, 99, 0, }, /* 919 */ + { 137, 6, 12, 0, 0, 137, 0, }, /* 920 */ + { 139, 6, 12, 0, 0, 139, 0, }, /* 921 */ + { 137, 7, 12, 0, 0, 137, 0, }, /* 922 */ + { 139, 7, 12, 0, 0, 139, 0, }, /* 923 */ + { 105, 7, 12, 0, 0, 105, 0, }, /* 924 */ + { 105, 26, 12, 0, 0, 105, 0, }, /* 925 */ + { 105, 12, 3, 0, 0, 105, 0, }, /* 926 */ + { 105, 21, 12, 0, 0, 105, 0, }, /* 927 */ + { 10, 1, 2, 0, 0, 105, 0, }, /* 928 */ + { 10, 10, 3, 0, 0, 10, 0, }, /* 929 */ + { 10, 10, 5, 0, 0, 10, 0, }, /* 930 */ + { 20, 12, 3, 0, 0, 20, 0, }, /* 931 */ + { 131, 26, 12, 0, 0, 131, 0, }, /* 932 */ + { 131, 12, 3, 0, 0, 131, 0, }, /* 933 */ + { 131, 21, 12, 0, 0, 131, 0, }, /* 934 */ + { 18, 12, 3, 0, 0, 18, 0, }, /* 935 */ + { 151, 7, 12, 0, 0, 151, 0, }, /* 936 */ + { 151, 12, 3, 0, 0, 151, 0, }, /* 937 */ + { 151, 6, 12, 0, 0, 151, 0, }, /* 938 */ + { 151, 13, 12, 0, 0, 151, 0, }, /* 939 */ + { 151, 26, 12, 0, 0, 151, 0, }, /* 940 */ + { 152, 7, 12, 0, 0, 152, 0, }, /* 941 */ + { 152, 12, 3, 0, 0, 152, 0, }, /* 942 */ + { 152, 13, 12, 0, 0, 152, 0, }, /* 943 */ + { 152, 23, 12, 0, 0, 152, 0, }, /* 944 */ + { 113, 7, 12, 0, 0, 113, 0, }, /* 945 */ + { 113, 15, 12, 0, 0, 113, 0, }, /* 946 */ + { 113, 12, 3, 0, 0, 113, 0, }, /* 947 */ + { 132, 9, 12, 0, 34, 132, 0, }, /* 948 */ + { 132, 5, 12, 0, -34, 132, 0, }, /* 949 */ + { 132, 12, 3, 0, 0, 132, 0, }, /* 950 */ + { 132, 6, 12, 0, 0, 132, 0, }, /* 951 */ + { 132, 13, 12, 0, 0, 132, 0, }, /* 952 */ + { 132, 21, 12, 0, 0, 132, 0, }, /* 953 */ + { 0, 2, 14, 0, 0, 0, 0, }, /* 954 */ + { 10, 26, 11, 0, 0, 10, 0, }, /* 955 */ + { 27, 26, 12, 0, 0, 27, 0, }, /* 956 */ + { 10, 24, 3, 0, 0, 10, 0, }, /* 957 */ + { 10, 1, 3, 0, 0, 10, 0, }, /* 958 */ }; const uint16_t PRIV(ucd_stage1)[] = { /* 17408 bytes */ @@ -1150,37 +1185,37 @@ const uint16_t PRIV(ucd_stage1)[] = { /* 17408 bytes */ 126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126, /* U+F000 */ 126,126, 98, 98,127,128,129,130,131,131,132,133,134,135,136,137, /* U+F800 */ 138,139,140,141,142,143,144,145,146,147,148,142,149,149,150,142, /* U+10000 */ -151,152,153,154,155,156,157,158,159,160,161,142,162,142,163,142, /* U+10800 */ -164,165,166,167,168,169,170,142,171,172,142,173,174,175,176,142, /* U+11000 */ -177,178,142,142,179,180,142,142,181,182,183,184,142,185,142,142, /* U+11800 */ -186,186,186,186,186,186,186,187,188,186,189,142,142,142,142,142, /* U+12000 */ +151,152,153,154,155,156,157,158,159,160,161,142,162,142,163,164, /* U+10800 */ +165,166,167,168,169,170,171,142,172,173,142,174,175,176,177,142, /* U+11000 */ +178,179,142,180,181,182,142,142,183,184,185,186,142,187,142,188, /* U+11800 */ +189,189,189,189,189,189,189,190,191,189,192,142,142,142,142,142, /* U+12000 */ 142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142, /* U+12800 */ -190,190,190,190,190,190,190,190,191,142,142,142,142,142,142,142, /* U+13000 */ +193,193,193,193,193,193,193,193,194,142,142,142,142,142,142,142, /* U+13000 */ 142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142, /* U+13800 */ -142,142,142,142,142,142,142,142,192,192,192,192,193,142,142,142, /* U+14000 */ +142,142,142,142,142,142,142,142,195,195,195,195,196,142,142,142, /* U+14000 */ 142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142, /* U+14800 */ 142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142, /* U+15000 */ 142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142, /* U+15800 */ 142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142, /* U+16000 */ -194,194,194,194,195,196,197,198,142,142,142,142,199,200,201,202, /* U+16800 */ -203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203, /* U+17000 */ -203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203, /* U+17800 */ -203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,204, /* U+18000 */ -203,203,203,203,203,205,142,142,142,142,142,142,142,142,142,142, /* U+18800 */ +197,197,197,197,198,199,200,201,142,142,142,142,202,203,204,205, /* U+16800 */ +206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206, /* U+17000 */ +206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206, /* U+17800 */ +206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,207, /* U+18000 */ +206,206,206,206,206,208,142,142,142,142,142,142,142,142,142,142, /* U+18800 */ 142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142, /* U+19000 */ 142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142, /* U+19800 */ 142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142, /* U+1A000 */ 142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142, /* U+1A800 */ -206,207,208,209,209,210,142,142,142,142,142,142,142,142,142,142, /* U+1B000 */ -142,142,142,142,142,142,142,142,211,212,142,142,142,142,142,142, /* U+1B800 */ +209,210,211,212,212,213,142,142,142,142,142,142,142,142,142,142, /* U+1B000 */ +142,142,142,142,142,142,142,142,214,215,142,142,142,142,142,142, /* U+1B800 */ 142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142, /* U+1C000 */ 142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142, /* U+1C800 */ - 71,213,214,215,216,217,218,142,219,220,221,222,223,224,225,226, /* U+1D000 */ -227,227,227,227,228,229,142,142,142,142,142,142,142,142,142,142, /* U+1D800 */ -230,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142, /* U+1E000 */ -231,232,233,142,142,142,142,142,234,235,142,142,236,237,142,142, /* U+1E800 */ -238,239,240,241,242,243,244,245,244,244,246,244,247,248,249,250, /* U+1F000 */ -251,252,253,254,255,243,243,243,243,243,243,243,243,243,243,256, /* U+1F800 */ + 71,216,217,218,219,220,221,142,222,223,224,225,226,227,228,229, /* U+1D000 */ +230,230,230,230,231,232,142,142,142,142,142,142,142,142,142,142, /* U+1D800 */ +233,142,234,142,142,235,142,142,142,142,142,142,142,142,142,142, /* U+1E000 */ +236,237,238,142,142,142,142,142,239,240,241,142,242,243,142,142, /* U+1E800 */ +244,245,246,247,248,249,250,251,250,250,252,250,253,254,255,256, /* U+1F000 */ +257,258,259,260,261,262,249,249,249,249,249,249,249,249,249,263, /* U+1F800 */ 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+20000 */ 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+20800 */ 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+21000 */ @@ -1201,18 +1236,18 @@ const uint16_t PRIV(ucd_stage1)[] = { /* 17408 bytes */ 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+28800 */ 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+29000 */ 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+29800 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,257, 98, 98, /* U+2A000 */ + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,264, 98, 98, /* U+2A000 */ 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+2A800 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,258, 98, /* U+2B000 */ -259, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+2B800 */ + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,265, 98, /* U+2B000 */ +266, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+2B800 */ 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+2C000 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,260, 98, 98, /* U+2C800 */ + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,267, 98, 98, /* U+2C800 */ 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+2D000 */ 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+2D800 */ 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+2E000 */ - 98, 98, 98, 98, 98, 98, 98,261,142,142,142,142,142,142,142,142, /* U+2E800 */ + 98, 98, 98, 98, 98, 98, 98,268,142,142,142,142,142,142,142,142, /* U+2E800 */ 142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142, /* U+2F000 */ - 98, 98, 98, 98,262,142,142,142,142,142,142,142,142,142,142,142, /* U+2F800 */ + 98, 98, 98, 98,269,142,142,142,142,142,142,142,142,142,142,142, /* U+2F800 */ 142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142, /* U+30000 */ 142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142, /* U+30800 */ 142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142, /* U+31000 */ @@ -1565,8 +1600,8 @@ const uint16_t PRIV(ucd_stage1)[] = { /* 17408 bytes */ 142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142, /* U+DE800 */ 142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142, /* U+DF000 */ 142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142, /* U+DF800 */ -263,264,265,266,264,264,264,264,264,264,264,264,264,264,264,264, /* U+E0000 */ -264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264, /* U+E0800 */ +270,271,272,273,271,271,271,271,271,271,271,271,271,271,271,271, /* U+E0000 */ +271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271, /* U+E0800 */ 142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142, /* U+E1000 */ 142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142, /* U+E1800 */ 142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142, /* U+E2000 */ @@ -1628,7 +1663,7 @@ const uint16_t PRIV(ucd_stage1)[] = { /* 17408 bytes */ 126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126, /* U+FE000 */ 126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126, /* U+FE800 */ 126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126, /* U+FF000 */ -126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,267, /* U+FF800 */ +126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,274, /* U+FF800 */ 126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126, /* U+100000 */ 126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126, /* U+100800 */ 126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126, /* U+101000 */ @@ -1660,10 +1695,10 @@ const uint16_t PRIV(ucd_stage1)[] = { /* 17408 bytes */ 126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126, /* U+10E000 */ 126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126, /* U+10E800 */ 126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126, /* U+10F000 */ -126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,267, /* U+10F800 */ +126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,274, /* U+10F800 */ }; -const uint16_t PRIV(ucd_stage2)[] = { /* 68608 bytes, block = 128 */ +const uint16_t PRIV(ucd_stage2)[] = { /* 70400 bytes, block = 128 */ /* block 0 */ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -1715,534 +1750,534 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 68608 bytes, block = 128 */ 35, 97, 98, 35, 35, 99, 35, 35, 35, 35, 35, 35, 35,100, 35, 35, /* block 5 */ -101, 35, 35,101, 35, 35, 35,102,101,103,104,104,105, 35, 35, 35, - 35, 35,106, 35, 22, 35, 35, 35, 35, 35, 35, 35, 35,107,108, 35, +101, 35,102,101, 35, 35, 35,103,101,104,105,105,106, 35, 35, 35, + 35, 35,107, 35, 22, 35, 35, 35, 35, 35, 35, 35, 35,108,109, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, -109,109,109,109,109,109,109,109,109,110,110,110,110,110,110,110, -110,110, 15, 15, 15, 15,110,110,110,110,110,110,110,110,110,110, -110,110, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, -109,109,109,109,109, 15, 15, 15, 15, 15,111,111,110, 15,110, 15, +110,110,110,110,110,110,110,110,110,111,111,111,111,111,111,111, +111,111, 15, 15, 15, 15,111,111,111,111,111,111,111,111,111,111, +111,111, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, +110,110,110,110,110, 15, 15, 15, 15, 15,112,112,111, 15,111, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, /* block 6 */ -112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112, -112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112, -112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112, -112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112, -112,112,113,112,112,114,112,112,112,112,112,112,112,112,112,112, -112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112, -112,112,112,115,115,115,115,115,115,115,115,115,115,115,115,115, -116,117,116,117,110,118,116,117,119,119,120,121,121,121, 5,122, +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, +113,113,114,113,113,115,113,113,113,113,113,113,113,113,113,113, +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, +113,113,113,116,116,116,116,116,116,116,116,116,116,116,116,116, +117,118,117,118,111,119,117,118,120,120,121,122,122,122, 5,123, /* block 7 */ -119,119,119,119,118, 15,123, 5,124,124,124,119,125,119,126,126, -127,128,129,128,128,130,128,128,131,132,133,128,134,128,128,128, -135,136,119,137,128,128,138,128,128,139,128,128,140,141,141,141, -127,142,143,142,142,144,142,142,145,146,147,142,148,142,142,142, -149,150,151,152,142,142,153,142,142,154,142,142,155,156,156,157, -158,159,160,160,160,161,162,163,116,117,116,117,116,117,116,117, -116,117,164,165,164,165,164,165,164,165,164,165,164,165,164,165, -166,167,168,169,170,171,172,116,117,173,116,117,127,174,174,174, +120,120,120,120,119, 15,124, 5,125,125,125,120,126,120,127,127, +128,129,130,129,129,131,129,129,132,133,134,129,135,129,129,129, +136,137,120,138,129,129,139,129,129,140,129,129,141,142,142,142, +128,143,144,143,143,145,143,143,146,147,148,143,149,143,143,143, +150,151,152,153,143,143,154,143,143,155,143,143,156,157,157,158, +159,160,161,161,161,162,163,164,117,118,117,118,117,118,117,118, +117,118,165,166,165,166,165,166,165,166,165,166,165,166,165,166, +167,168,169,170,171,172,173,117,118,174,117,118,128,175,175,175, /* block 8 */ -175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175, -176,176,177,176,178,176,176,176,176,176,176,176,176,176,179,176, -176,180,181,176,176,176,176,176,176,176,182,176,176,176,176,176, -183,183,184,183,185,183,183,183,183,183,183,183,183,183,186,183, -183,187,188,183,183,183,183,183,183,183,189,183,183,183,183,183, -190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190, -191,192,193,194,191,192,191,192,191,192,191,192,191,192,191,192, -191,192,191,192,191,192,191,192,191,192,191,192,191,192,191,192, +176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176, +177,177,178,177,179,177,177,177,177,177,177,177,177,177,180,177, +177,181,182,177,177,177,177,177,177,177,183,177,177,177,177,177, +184,184,185,184,186,184,184,184,184,184,184,184,184,184,187,184, +184,188,189,184,184,184,184,184,184,184,190,184,184,184,184,184, +191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191, +192,193,194,195,192,193,192,193,192,193,192,193,192,193,192,193, +192,193,192,193,192,193,192,193,192,193,192,193,192,193,192,193, /* block 9 */ -191,192,195,196,197,198,198,197,199,199,191,192,191,192,191,192, -191,192,191,192,191,192,191,192,191,192,191,192,191,192,191,192, -191,192,191,192,191,192,191,192,191,192,191,192,191,192,191,192, -191,192,191,192,191,192,191,192,191,192,191,192,191,192,191,192, -200,191,192,191,192,191,192,191,192,191,192,191,192,191,192,201, -191,192,191,192,191,192,191,192,191,192,191,192,191,192,191,192, -191,192,191,192,191,192,191,192,191,192,191,192,191,192,191,192, -191,192,191,192,191,192,191,192,191,192,191,192,191,192,191,192, +192,193,196,197,198,199,199,198,200,200,192,193,192,193,192,193, +192,193,192,193,192,193,192,193,192,193,192,193,192,193,192,193, +192,193,192,193,192,193,192,193,192,193,192,193,192,193,192,193, +192,193,192,193,192,193,192,193,192,193,192,193,192,193,192,193, +201,192,193,192,193,192,193,192,193,192,193,192,193,192,193,202, +192,193,192,193,192,193,192,193,192,193,192,193,192,193,192,193, +192,193,192,193,192,193,192,193,192,193,192,193,192,193,192,193, +192,193,192,193,192,193,192,193,192,193,192,193,192,193,192,193, /* block 10 */ -191,192,191,192,191,192,191,192,191,192,191,192,191,192,191,192, -191,192,191,192,191,192,191,192,191,192,191,192,191,192,191,192, -191,192,191,192,191,192,191,192,191,192,191,192,191,192,191,192, -119,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202, -202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202, -202,202,202,202,202,202,202,119,119,203,204,204,204,204,204,204, -205,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206, -206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206, +192,193,192,193,192,193,192,193,192,193,192,193,192,193,192,193, +192,193,192,193,192,193,192,193,192,193,192,193,192,193,192,193, +192,193,192,193,192,193,192,193,192,193,192,193,192,193,192,193, +120,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203, +203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203, +203,203,203,203,203,203,203,120,120,204,205,205,205,205,205,205, +206,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207, +207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207, /* block 11 */ -206,206,206,206,206,206,206,205,205,207,208,119,119,209,209,210, -119,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211, -211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211, -211,211,211,211,211,211,211,211,211,211,211,211,211,211,212,211, -213,211,211,213,211,211,213,211,119,119,119,119,119,119,119,119, -214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214, -214,214,214,214,214,214,214,214,214,214,214,119,119,119,119,214, -214,214,214,213,213,119,119,119,119,119,119,119,119,119,119,119, +207,207,207,207,207,207,207,206,206,208,209,120,120,210,210,211, +120,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212, +212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212, +212,212,212,212,212,212,212,212,212,212,212,212,212,212,213,212, +214,212,212,214,212,212,214,212,120,120,120,120,120,120,120,120, +215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215, +215,215,215,215,215,215,215,215,215,215,215,120,120,120,120,215, +215,215,215,214,214,120,120,120,120,120,120,120,120,120,120,120, /* block 12 */ -215,215,215,215,215,216,217,217,217,218,218,219,220,218,221,221, -222,222,222,222,222,222,222,222,222,222,222,220,223,119,218,220, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -225,224,224,224,224,224,224,224,224,224,224,226,226,226,226,226, -226,226,226,226,226,226,222,222,222,222,222,222,222,222,222,222, -227,227,227,227,227,227,227,227,227,227,218,218,218,218,224,224, -226,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, +216,216,216,216,216,217,218,218,218,219,219,220,221,219,222,222, +223,223,223,223,223,223,223,223,223,223,223,221,224,120,219,221, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +226,225,225,225,225,225,225,225,225,225,225,227,227,227,227,227, +227,227,227,227,227,227,223,223,223,223,223,223,223,223,223,223, +228,228,228,228,228,228,228,228,228,228,219,219,219,219,225,225, +227,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, /* block 13 */ -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,228,224,222,222,222,222,222,222,222,216,221,222, -222,222,222,222,222,229,229,222,222,221,222,222,222,222,224,224, -230,230,230,230,230,230,230,230,230,230,224,224,224,221,221,224, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,229,225,223,223,223,223,223,223,223,217,222,223, +223,223,223,223,223,230,230,223,223,222,223,223,223,223,225,225, +231,231,231,231,231,231,231,231,231,231,225,225,225,222,222,225, /* block 14 */ -231,231,231,231,231,231,231,231,231,231,231,231,231,231,119,232, -233,234,233,233,233,233,233,233,233,233,233,233,233,233,233,233, -233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233, +232,232,232,232,232,232,232,232,232,232,232,232,232,232,120,233, +234,235,234,234,234,234,234,234,234,234,234,234,234,234,234,234, 234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234, -234,234,234,234,234,234,234,234,234,234,234,119,119,233,233,233, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, +235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235, +235,235,235,235,235,235,235,235,235,235,235,120,120,234,234,234, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, /* block 15 */ -235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235, -235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235, -235,235,235,235,235,235,236,236,236,236,236,236,236,236,236,236, -236,235,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -237,237,237,237,237,237,237,237,237,237,238,238,238,238,238,238, -238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238, -238,238,238,238,238,238,238,238,238,238,238,239,239,239,239,239, -239,239,239,239,240,240,241,242,242,242,240,119,119,239,243,243, +236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,236, +236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,236, +236,236,236,236,236,236,237,237,237,237,237,237,237,237,237,237, +237,236,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +238,238,238,238,238,238,238,238,238,238,239,239,239,239,239,239, +239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239, +239,239,239,239,239,239,239,239,239,239,239,240,240,240,240,240, +240,240,240,240,241,241,242,243,243,243,241,120,120,240,244,244, /* block 16 */ -244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244, -244,244,244,244,244,244,245,245,245,245,246,245,245,245,245,245, -245,245,245,245,246,245,245,245,246,245,245,245,245,245,119,119, -247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,119, -248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, -248,248,248,248,248,248,248,248,248,249,249,249,119,119,250,119, -233,233,233,233,233,233,233,233,233,233,233,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245, +245,245,245,245,245,245,246,246,246,246,247,246,246,246,246,246, +246,246,246,246,247,246,246,246,247,246,246,246,246,246,120,120, +248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,120, +249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249, +249,249,249,249,249,249,249,249,249,250,250,250,120,120,251,120, +234,234,234,234,234,234,234,234,234,234,234,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 17 */ -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,119,224,224,224,224,224,224,224,224,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,222,222,222,222,222,222,222,222,222,222,222,222,222, -222,222,216,222,222,222,222,222,222,222,222,222,222,222,222,222, -222,222,222,222,222,222,222,222,222,222,222,222,222,222,222,222, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,120,225,225,225,225,225,225,225,225,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,223,223,223,223,223,223,223,223,223,223,223,223,223, +223,223,217,223,223,223,223,223,223,223,223,223,223,223,223,223, +223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,223, /* block 18 */ -251,251,251,252,253,253,253,253,253,253,253,253,253,253,253,253, -253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, -253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, -253,253,253,253,253,253,253,253,253,253,251,252,251,253,252,252, -252,251,251,251,251,251,251,251,251,252,252,252,252,251,252,252, -253,254,255,251,251,251,251,251,253,253,253,253,253,253,253,253, -253,253,251,251,256,257,258,258,258,258,258,258,258,258,258,258, -259,260,253,253,253,253,253,253,253,253,253,253,253,253,253,253, +252,252,252,253,254,254,254,254,254,254,254,254,254,254,254,254, +254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254, +254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254, +254,254,254,254,254,254,254,254,254,254,252,253,252,254,253,253, +253,252,252,252,252,252,252,252,252,253,253,253,253,252,253,253, +254,255,256,113,113,252,252,252,254,254,254,254,254,254,254,254, +254,254,252,252,257,258,259,259,259,259,259,259,259,259,259,259, +260,261,254,254,254,254,254,254,254,254,254,254,254,254,254,254, /* block 19 */ -261,262,263,263,119,261,261,261,261,261,261,261,261,119,119,261, -261,119,119,261,261,261,261,261,261,261,261,261,261,261,261,261, -261,261,261,261,261,261,261,261,261,119,261,261,261,261,261,261, -261,119,261,119,119,119,261,261,261,261,119,119,262,261,264,263, -263,262,262,262,262,119,119,263,263,119,119,263,263,262,261,119, -119,119,119,119,119,119,119,264,119,119,119,119,261,261,119,261, -261,261,262,262,119,119,265,265,265,265,265,265,265,265,265,265, -261,261,266,266,267,267,267,267,267,267,268,266,261,269,262,119, +262,263,264,264,120,262,262,262,262,262,262,262,262,120,120,262, +262,120,120,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,120,262,262,262,262,262,262, +262,120,262,120,120,120,262,262,262,262,120,120,263,262,265,264, +264,263,263,263,263,120,120,264,264,120,120,264,264,263,262,120, +120,120,120,120,120,120,120,265,120,120,120,120,262,262,120,262, +262,262,263,263,120,120,266,266,266,266,266,266,266,266,266,266, +262,262,267,267,268,268,268,268,268,268,269,267,262,270,263,120, /* block 20 */ -119,270,270,271,119,272,272,272,272,272,272,119,119,119,119,272, -272,119,119,272,272,272,272,272,272,272,272,272,272,272,272,272, -272,272,272,272,272,272,272,272,272,119,272,272,272,272,272,272, -272,119,272,272,119,272,272,119,272,272,119,119,270,119,271,271, -271,270,270,119,119,119,119,270,270,119,119,270,270,270,119,119, -119,270,119,119,119,119,119,119,119,272,272,272,272,119,272,119, -119,119,119,119,119,119,273,273,273,273,273,273,273,273,273,273, -270,270,272,272,272,270,274,119,119,119,119,119,119,119,119,119, +120,271,271,272,120,273,273,273,273,273,273,120,120,120,120,273, +273,120,120,273,273,273,273,273,273,273,273,273,273,273,273,273, +273,273,273,273,273,273,273,273,273,120,273,273,273,273,273,273, +273,120,273,273,120,273,273,120,273,273,120,120,271,120,272,272, +272,271,271,120,120,120,120,271,271,120,120,271,271,271,120,120, +120,271,120,120,120,120,120,120,120,273,273,273,273,120,273,120, +120,120,120,120,120,120,274,274,274,274,274,274,274,274,274,274, +271,271,273,273,273,271,275,120,120,120,120,120,120,120,120,120, /* block 21 */ -119,275,275,276,119,277,277,277,277,277,277,277,277,277,119,277, -277,277,119,277,277,277,277,277,277,277,277,277,277,277,277,277, -277,277,277,277,277,277,277,277,277,119,277,277,277,277,277,277, -277,119,277,277,119,277,277,277,277,277,119,119,275,277,276,276, -276,275,275,275,275,275,119,275,275,276,119,276,276,275,119,119, -277,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -277,277,275,275,119,119,278,278,278,278,278,278,278,278,278,278, -279,280,119,119,119,119,119,119,119,277,275,275,275,275,275,275, +120,276,276,277,120,278,278,278,278,278,278,278,278,278,120,278, +278,278,120,278,278,278,278,278,278,278,278,278,278,278,278,278, +278,278,278,278,278,278,278,278,278,120,278,278,278,278,278,278, +278,120,278,278,120,278,278,278,278,278,120,120,276,278,277,277, +277,276,276,276,276,276,120,276,276,277,120,277,277,276,120,120, +278,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +278,278,276,276,120,120,279,279,279,279,279,279,279,279,279,279, +280,281,120,120,120,120,120,120,120,278,276,276,276,276,276,276, /* block 22 */ -119,281,282,282,119,283,283,283,283,283,283,283,283,119,119,283, -283,119,119,283,283,283,283,283,283,283,283,283,283,283,283,283, -283,283,283,283,283,283,283,283,283,119,283,283,283,283,283,283, -283,119,283,283,119,283,283,283,283,283,119,119,281,283,284,281, -282,281,281,281,281,119,119,282,282,119,119,282,282,281,119,119, -119,119,119,119,119,119,281,284,119,119,119,119,283,283,119,283, -283,283,281,281,119,119,285,285,285,285,285,285,285,285,285,285, -286,283,287,287,287,287,287,287,119,119,119,119,119,119,119,119, +120,282,283,283,120,284,284,284,284,284,284,284,284,120,120,284, +284,120,120,284,284,284,284,284,284,284,284,284,284,284,284,284, +284,284,284,284,284,284,284,284,284,120,284,284,284,284,284,284, +284,120,284,284,120,284,284,284,284,284,120,120,282,284,285,282, +283,282,282,282,282,120,120,283,283,120,120,283,283,282,120,120, +120,120,120,120,120,120,282,285,120,120,120,120,284,284,120,284, +284,284,282,282,120,120,286,286,286,286,286,286,286,286,286,286, +287,284,288,288,288,288,288,288,120,120,120,120,120,120,120,120, /* block 23 */ -119,119,288,289,119,289,289,289,289,289,289,119,119,119,289,289, -289,119,289,289,289,289,119,119,119,289,289,119,289,119,289,289, -119,119,119,289,289,119,119,119,289,289,289,119,119,119,289,289, -289,289,289,289,289,289,289,289,289,289,119,119,119,119,290,291, -288,291,291,119,119,119,291,291,291,119,291,291,291,288,119,119, -289,119,119,119,119,119,119,290,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,292,292,292,292,292,292,292,292,292,292, -293,293,293,294,295,295,295,295,295,296,295,119,119,119,119,119, +120,120,289,290,120,290,290,290,290,290,290,120,120,120,290,290, +290,120,290,290,290,290,120,120,120,290,290,120,290,120,290,290, +120,120,120,290,290,120,120,120,290,290,290,120,120,120,290,290, +290,290,290,290,290,290,290,290,290,290,120,120,120,120,291,292, +289,292,292,120,120,120,292,292,292,120,292,292,292,289,120,120, +290,120,120,120,120,120,120,291,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,293,293,293,293,293,293,293,293,293,293, +294,294,294,295,296,296,296,296,296,297,296,120,120,120,120,120, /* block 24 */ -297,298,298,298,297,299,299,299,299,299,299,299,299,119,299,299, -299,119,299,299,299,299,299,299,299,299,299,299,299,299,299,299, -299,299,299,299,299,299,299,299,299,119,299,299,299,299,299,299, -299,299,299,299,299,299,299,299,299,299,119,119,119,299,297,297, -297,298,298,298,298,119,297,297,297,119,297,297,297,297,119,119, -119,119,119,119,119,297,297,119,299,299,299,119,119,119,119,119, -299,299,297,297,119,119,300,300,300,300,300,300,300,300,300,300, -119,119,119,119,119,119,119,119,301,301,301,301,301,301,301,302, +298,299,299,299,298,300,300,300,300,300,300,300,300,120,300,300, +300,120,300,300,300,300,300,300,300,300,300,300,300,300,300,300, +300,300,300,300,300,300,300,300,300,120,300,300,300,300,300,300, +300,300,300,300,300,300,300,300,300,300,120,120,120,300,298,298, +298,299,299,299,299,120,298,298,298,120,298,298,298,298,120,120, +120,120,120,120,120,298,298,120,300,300,300,120,120,120,120,120, +300,300,298,298,120,120,301,301,301,301,301,301,301,301,301,301, +120,120,120,120,120,120,120,302,303,303,303,303,303,303,303,304, /* block 25 */ -303,304,305,305,306,303,303,303,303,303,303,303,303,119,303,303, -303,119,303,303,303,303,303,303,303,303,303,303,303,303,303,303, -303,303,303,303,303,303,303,303,303,119,303,303,303,303,303,303, -303,303,303,303,119,303,303,303,303,303,119,119,304,303,305,304, -305,305,307,305,305,119,304,305,305,119,305,305,304,304,119,119, -119,119,119,119,119,307,307,119,119,119,119,119,119,119,303,119, -303,303,304,304,119,119,308,308,308,308,308,308,308,308,308,308, -119,303,303,119,119,119,119,119,119,119,119,119,119,119,119,119, +305,306,307,307,308,305,305,305,305,305,305,305,305,120,305,305, +305,120,305,305,305,305,305,305,305,305,305,305,305,305,305,305, +305,305,305,305,305,305,305,305,305,120,305,305,305,305,305,305, +305,305,305,305,120,305,305,305,305,305,120,120,306,305,307,306, +307,307,309,307,307,120,306,307,307,120,307,307,306,306,120,120, +120,120,120,120,120,309,309,120,120,120,120,120,120,120,305,120, +305,305,306,306,120,120,310,310,310,310,310,310,310,310,310,310, +120,305,305,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 26 */ -309,309,310,310,119,311,311,311,311,311,311,311,311,119,311,311, -311,119,311,311,311,311,311,311,311,311,311,311,311,311,311,311, -311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311, -311,311,311,311,311,311,311,311,311,311,311,309,309,311,312,310, -310,309,309,309,309,119,310,310,310,119,310,310,310,309,313,314, -119,119,119,119,311,311,311,312,315,315,315,315,315,315,315,311, -311,311,309,309,119,119,316,316,316,316,316,316,316,316,316,316, -315,315,315,315,315,315,315,315,315,314,311,311,311,311,311,311, +311,311,312,312,120,313,313,313,313,313,313,313,313,120,313,313, +313,120,313,313,313,313,313,313,313,313,313,313,313,313,313,313, +313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313, +313,313,313,313,313,313,313,313,313,313,313,311,311,313,314,312, +312,311,311,311,311,120,312,312,312,120,312,312,312,311,315,316, +120,120,120,120,313,313,313,314,317,317,317,317,317,317,317,313, +313,313,311,311,120,120,318,318,318,318,318,318,318,318,318,318, +317,317,317,317,317,317,317,317,317,316,313,313,313,313,313,313, /* block 27 */ -119,119,317,317,119,318,318,318,318,318,318,318,318,318,318,318, -318,318,318,318,318,318,318,119,119,119,318,318,318,318,318,318, -318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318, -318,318,119,318,318,318,318,318,318,318,318,318,119,318,119,119, -318,318,318,318,318,318,318,119,119,119,319,119,119,119,119,320, -317,317,319,319,319,119,319,119,317,317,317,317,317,317,317,320, -119,119,119,119,119,119,321,321,321,321,321,321,321,321,321,321, -119,119,317,317,322,119,119,119,119,119,119,119,119,119,119,119, +120,120,319,319,120,320,320,320,320,320,320,320,320,320,320,320, +320,320,320,320,320,320,320,120,120,120,320,320,320,320,320,320, +320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320, +320,320,120,320,320,320,320,320,320,320,320,320,120,320,120,120, +320,320,320,320,320,320,320,120,120,120,321,120,120,120,120,322, +319,319,321,321,321,120,321,120,319,319,319,319,319,319,319,322, +120,120,120,120,120,120,323,323,323,323,323,323,323,323,323,323, +120,120,319,319,324,120,120,120,120,120,120,120,120,120,120,120, /* block 28 */ -119,323,323,323,323,323,323,323,323,323,323,323,323,323,323,323, -323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,323, -323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,323, -323,324,323,325,324,324,324,324,324,324,324,119,119,119,119, 6, -323,323,323,323,323,323,326,324,324,324,324,324,324,324,324,327, -328,328,328,328,328,328,328,328,328,328,327,327,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +120,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325, +325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325, +325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325, +325,326,325,327,326,326,326,326,326,326,326,120,120,120,120, 6, +325,325,325,325,325,325,328,326,326,326,326,326,326,326,326,329, +330,330,330,330,330,330,330,330,330,330,329,329,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 29 */ -119,329,329,119,329,119,119,329,329,119,329,119,119,329,119,119, -119,119,119,119,329,329,329,329,119,329,329,329,329,329,329,329, -119,329,329,329,119,329,119,329,119,119,329,329,119,329,329,329, -329,330,329,331,330,330,330,330,330,330,119,330,330,329,119,119, -329,329,329,329,329,119,332,119,330,330,330,330,330,330,119,119, -333,333,333,333,333,333,333,333,333,333,119,119,329,329,329,329, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +120,331,331,120,331,120,331,331,331,331,331,120,331,331,331,331, +331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331, +331,331,331,331,120,331,120,331,331,331,331,331,331,331,331,331, +331,332,331,333,332,332,332,332,332,332,332,332,332,331,120,120, +331,331,331,331,331,120,334,120,332,332,332,332,332,332,120,120, +335,335,335,335,335,335,335,335,335,335,120,120,331,331,331,331, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 30 */ -334,335,335,335,336,336,336,336,336,336,336,336,336,336,336,336, -336,336,336,335,336,335,335,335,337,337,335,335,335,335,335,335, -338,338,338,338,338,338,338,338,338,338,339,339,339,339,339,339, -339,339,339,339,335,337,335,337,335,337,340,341,340,341,342,342, -334,334,334,334,334,334,334,334,119,334,334,334,334,334,334,334, -334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,334, -334,334,334,334,334,334,334,334,334,334,334,334,334,119,119,119, -119,337,337,337,337,337,337,337,337,337,337,337,337,337,337,342, +336,337,337,337,338,338,338,338,338,338,338,338,338,338,338,338, +338,338,338,337,338,337,337,337,339,339,337,337,337,337,337,337, +340,340,340,340,340,340,340,340,340,340,341,341,341,341,341,341, +341,341,341,341,337,339,337,339,337,339,342,343,342,343,344,344, +336,336,336,336,336,336,336,336,120,336,336,336,336,336,336,336, +336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336, +336,336,336,336,336,336,336,336,336,336,336,336,336,120,120,120, +120,339,339,339,339,339,339,339,339,339,339,339,339,339,339,344, /* block 31 */ -337,337,337,337,337,336,337,337,334,334,334,334,334,337,337,337, -337,337,337,337,337,337,337,337,119,337,337,337,337,337,337,337, -337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,337, -337,337,337,337,337,337,337,337,337,337,337,337,337,119,335,335, -335,335,335,335,335,335,337,335,335,335,335,335,335,119,335,335, -336,336,336,336,336, 20, 20, 20, 20,336,336,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +339,339,339,339,339,338,339,339,336,336,336,336,336,339,339,339, +339,339,339,339,339,339,339,339,120,339,339,339,339,339,339,339, +339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339, +339,339,339,339,339,339,339,339,339,339,339,339,339,120,337,337, +337,337,337,337,337,337,339,337,337,337,337,337,337,120,337,337, +338,338,338,338,338, 20, 20, 20, 20,338,338,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 32 */ -343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343, -343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343, -343,343,343,343,343,343,343,343,343,343,343,344,344,345,345,345, -345,346,345,345,345,345,345,345,344,345,345,346,346,345,345,343, -347,347,347,347,347,347,347,347,347,347,348,348,348,348,348,348, -343,343,343,343,343,343,346,346,345,345,343,343,343,343,345,345, -345,343,344,344,344,343,343,344,344,344,344,344,344,344,343,343, -343,345,345,345,345,343,343,343,343,343,343,343,343,343,343,343, +345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345, +345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345, +345,345,345,345,345,345,345,345,345,345,345,346,346,347,347,347, +347,348,347,347,347,347,347,347,346,347,347,348,348,347,347,345, +349,349,349,349,349,349,349,349,349,349,350,350,350,350,350,350, +345,345,345,345,345,345,348,348,347,347,345,345,345,345,347,347, +347,345,346,346,346,345,345,346,346,346,346,346,346,346,345,345, +345,347,347,347,347,345,345,345,345,345,345,345,345,345,345,345, /* block 33 */ -343,343,345,344,346,345,345,344,344,344,344,344,344,345,343,344, -349,349,349,349,349,349,349,349,349,349,344,344,344,345,350,350, -351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351, -351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351, -351,351,351,351,351,351,119,351,119,119,119,119,119,351,119,119, -352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352, -352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352, -352,352,352,352,352,352,352,352,352,352,352,353,354,352,352,352, +345,345,347,346,348,347,347,346,346,346,346,346,346,347,345,346, +351,351,351,351,351,351,351,351,351,351,346,346,346,347,352,352, +353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,353, +353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,353, +353,353,353,353,353,353,120,353,120,120,120,120,120,353,120,120, +354,354,354,354,354,354,354,354,354,354,354,354,354,354,354,354, +354,354,354,354,354,354,354,354,354,354,354,354,354,354,354,354, +354,354,354,354,354,354,354,354,354,354,354,355,356,354,354,354, /* block 34 */ -355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355, -355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355, -355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355, -355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355, -355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355, -355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355, -356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356, -356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356, - -/* block 35 */ -356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356, -356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356, -356,356,356,356,356,356,356,356,357,357,357,357,357,357,357,357, 357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357, 357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357, 357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357, 357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357, 357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357, - -/* block 36 */ -358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, -358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, +357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357, 358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, 358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, -358,358,358,358,358,358,358,358,358,119,358,358,358,358,119,119, -358,358,358,358,358,358,358,119,358,119,358,358,358,358,119,119, + +/* block 35 */ 358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, 358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, +358,358,358,358,358,358,358,358,359,359,359,359,359,359,359,359, +359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359, +359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359, +359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359, +359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359, +359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359, + +/* block 36 */ +360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360, +360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360, +360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360, +360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360, +360,360,360,360,360,360,360,360,360,120,360,360,360,360,120,120, +360,360,360,360,360,360,360,120,360,120,360,360,360,360,120,120, +360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360, +360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360, /* block 37 */ -358,358,358,358,358,358,358,358,358,119,358,358,358,358,119,119, -358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, -358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, -358,119,358,358,358,358,119,119,358,358,358,358,358,358,358,119, -358,119,358,358,358,358,119,119,358,358,358,358,358,358,358,358, -358,358,358,358,358,358,358,119,358,358,358,358,358,358,358,358, -358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, -358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, +360,360,360,360,360,360,360,360,360,120,360,360,360,360,120,120, +360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360, +360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360, +360,120,360,360,360,360,120,120,360,360,360,360,360,360,360,120, +360,120,360,360,360,360,120,120,360,360,360,360,360,360,360,360, +360,360,360,360,360,360,360,120,360,360,360,360,360,360,360,360, +360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360, +360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360, /* block 38 */ -358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, -358,119,358,358,358,358,119,119,358,358,358,358,358,358,358,358, -358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, -358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, -358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, -358,358,358,358,358,358,358,358,358,358,358,119,119,359,359,359, -360,360,360,360,360,360,360,360,360,361,361,361,361,361,361,361, -361,361,361,361,361,361,361,361,361,361,361,361,361,119,119,119, +360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360, +360,120,360,360,360,360,120,120,360,360,360,360,360,360,360,360, +360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360, +360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360, +360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360, +360,360,360,360,360,360,360,360,360,360,360,120,120,361,361,361, +362,362,362,362,362,362,362,362,362,363,363,363,363,363,363,363, +363,363,363,363,363,363,363,363,363,363,363,363,363,120,120,120, /* block 39 */ -358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, -362,362,362,362,362,362,362,362,362,362,119,119,119,119,119,119, -363,363,363,363,363,363,363,363,363,363,363,363,363,363,363,363, -363,363,363,363,363,363,363,363,363,363,363,363,363,363,363,363, -363,363,363,363,363,363,363,363,363,363,363,363,363,363,363,363, -363,363,363,363,363,363,363,363,363,363,363,363,363,363,363,363, -363,363,363,363,363,363,363,363,363,363,363,363,363,363,363,363, -364,364,364,364,364,364,119,119,365,365,365,365,365,365,119,119, +360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360, +364,364,364,364,364,364,364,364,364,364,120,120,120,120,120,120, +365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365, +365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365, +365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365, +365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365, +365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365, +366,366,366,366,366,366,120,120,367,367,367,367,367,367,120,120, /* block 40 */ -366,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, +368,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, /* block 41 */ -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, /* block 42 */ -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, -367,367,367,367,367,367,367,367,367,367,367,367,367,368,368,367, -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,369,369,369,369,369,369,369,370,371,369, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, /* block 43 */ -369,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -370,370,370,370,370,370,370,370,370,370,370,371,372,119,119,119, -373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373, -373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373, -373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373, -373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373, -373,373,373,373,373,373,373,373,373,373,373, 5, 5, 5,374,374, -374,373,373,373,373,373,373,373,373,119,119,119,119,119,119,119, +372,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373, +373,373,373,373,373,373,373,373,373,373,373,374,375,120,120,120, +376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376, +376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376, +376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376, +376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376, +376,376,376,376,376,376,376,376,376,376,376, 5, 5, 5,377,377, +377,376,376,376,376,376,376,376,376,120,120,120,120,120,120,120, /* block 44 */ -375,375,375,375,375,375,375,375,375,375,375,375,375,119,375,375, -375,375,376,376,376,119,119,119,119,119,119,119,119,119,119,119, -377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377, -377,377,378,378,378,379,379,119,119,119,119,119,119,119,119,119, +378,378,378,378,378,378,378,378,378,378,378,378,378,120,378,378, +378,378,379,379,379,120,120,120,120,120,120,120,120,120,120,120, 380,380,380,380,380,380,380,380,380,380,380,380,380,380,380,380, -380,380,381,381,119,119,119,119,119,119,119,119,119,119,119,119, -382,382,382,382,382,382,382,382,382,382,382,382,382,119,382,382, -382,119,383,383,119,119,119,119,119,119,119,119,119,119,119,119, +380,380,381,381,381,382,382,120,120,120,120,120,120,120,120,120, +383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383, +383,383,384,384,120,120,120,120,120,120,120,120,120,120,120,120, +385,385,385,385,385,385,385,385,385,385,385,385,385,120,385,385, +385,120,386,386,120,120,120,120,120,120,120,120,120,120,120,120, /* block 45 */ -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,385,385,386,385,385,385,385,385,385,385,386,386, -386,386,386,386,386,386,385,386,386,385,385,385,385,385,385,385, -385,385,385,385,387,387,387,388,387,387,387,389,384,385,119,119, -390,390,390,390,390,390,390,390,390,390,119,119,119,119,119,119, -391,391,391,391,391,391,391,391,391,391,119,119,119,119,119,119, +387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387, +387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387, +387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387, +387,387,387,387,388,388,389,388,388,388,388,388,388,388,389,389, +389,389,389,389,389,389,388,389,389,388,388,388,388,388,388,388, +388,388,388,388,390,390,390,391,390,390,390,392,387,388,120,120, +393,393,393,393,393,393,393,393,393,393,120,120,120,120,120,120, +394,394,394,394,394,394,394,394,394,394,120,120,120,120,120,120, /* block 46 */ -392,392,393,393,392,393,394,392,392,392,392,395,395,395,396,119, -397,397,397,397,397,397,397,397,397,397,119,119,119,119,119,119, -398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398, -398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398, -398,398,398,399,398,398,398,398,398,398,398,398,398,398,398,398, -398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398, -398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398, -398,398,398,398,398,398,398,398,398,119,119,119,119,119,119,119, +395,395,396,396,395,396,397,395,395,395,395,398,398,398,399,120, +400,400,400,400,400,400,400,400,400,400,120,120,120,120,120,120, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,402,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,120,120,120,120,120,120,120, /* block 47 */ -398,398,398,398,398,395,395,398,398,398,398,398,398,398,398,398, -398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398, -398,398,398,398,398,398,398,398,398,395,398,119,119,119,119,119, -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, -367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367, -367,367,367,367,367,367,119,119,119,119,119,119,119,119,119,119, +401,401,401,401,401,398,398,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,398,401,120,120,120,120,120, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,120,120,120,120,120,120,120,120,120,120, /* block 48 */ -400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400, -400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,119, -401,401,401,402,402,402,402,401,401,402,402,402,119,119,119,119, -402,402,401,402,402,402,402,402,402,401,401,401,119,119,119,119, -403,119,119,119,404,404,405,405,405,405,405,405,405,405,405,405, -406,406,406,406,406,406,406,406,406,406,406,406,406,406,406,406, -406,406,406,406,406,406,406,406,406,406,406,406,406,406,119,119, -406,406,406,406,406,119,119,119,119,119,119,119,119,119,119,119, +403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403, +403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,120, +404,404,404,405,405,405,405,404,404,405,405,405,120,120,120,120, +405,405,404,405,405,405,405,405,405,404,404,404,120,120,120,120, +406,120,120,120,407,407,408,408,408,408,408,408,408,408,408,408, +409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409, +409,409,409,409,409,409,409,409,409,409,409,409,409,409,120,120, +409,409,409,409,409,120,120,120,120,120,120,120,120,120,120,120, /* block 49 */ -407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407, -407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407, -407,407,407,407,407,407,407,407,407,407,407,407,119,119,119,119, -407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407, -407,407,407,407,407,407,407,407,407,407,119,119,119,119,119,119, -408,408,408,408,408,408,408,408,408,408,409,119,119,119,410,410, -411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411, -411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411, +410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410, +410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410, +410,410,410,410,410,410,410,410,410,410,410,410,120,120,120,120, +410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410, +410,410,410,410,410,410,410,410,410,410,120,120,120,120,120,120, +411,411,411,411,411,411,411,411,411,411,412,120,120,120,413,413, +414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414, +414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414, /* block 50 */ -412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412, -412,412,412,412,412,412,412,413,413,414,414,413,119,119,415,415, -416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416, -416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416, -416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416, -416,416,416,416,416,417,418,417,418,418,418,418,418,418,418,119, -418,419,418,419,419,418,418,418,418,418,418,418,418,417,417,417, -417,417,417,418,418,418,418,418,418,418,418,418,418,119,119,418, +415,415,415,415,415,415,415,415,415,415,415,415,415,415,415,415, +415,415,415,415,415,415,415,416,416,417,417,416,120,120,418,418, +419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419, +419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419, +419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419, +419,419,419,419,419,420,421,420,421,421,421,421,421,421,421,120, +421,422,421,422,422,421,421,421,421,421,421,421,421,420,420,420, +420,420,420,421,421,421,421,421,421,421,421,421,421,120,120,421, /* block 51 */ -420,420,420,420,420,420,420,420,420,420,119,119,119,119,119,119, -420,420,420,420,420,420,420,420,420,420,119,119,119,119,119,119, -421,421,421,421,421,421,421,422,421,421,421,421,421,421,119,119, -112,112,112,112,112,112,112,112,112,112,112,112,112,112,423,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +423,423,423,423,423,423,423,423,423,423,120,120,120,120,120,120, +423,423,423,423,423,423,423,423,423,423,120,120,120,120,120,120, +424,424,424,424,424,424,424,425,424,424,424,424,424,424,120,120, +113,113,113,113,113,113,113,113,113,113,113,113,113,113,426,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 52 */ -424,424,424,424,425,426,426,426,426,426,426,426,426,426,426,426, -426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426, -426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426, -426,426,426,426,424,425,424,424,424,424,424,425,424,425,425,425, -425,425,424,425,425,426,426,426,426,426,426,426,119,119,119,119, -427,427,427,427,427,427,427,427,427,427,428,428,428,428,428,428, -428,429,429,429,429,429,429,429,429,429,429,424,424,424,424,424, -424,424,424,424,429,429,429,429,429,429,429,429,429,119,119,119, +427,427,427,427,428,429,429,429,429,429,429,429,429,429,429,429, +429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429, +429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429, +429,429,429,429,427,430,427,427,427,427,427,428,427,428,428,428, +428,428,427,428,428,429,429,429,429,429,429,429,120,120,120,120, +431,431,431,431,431,431,431,431,431,431,432,432,432,432,432,432, +432,433,433,433,433,433,433,433,433,433,433,427,427,427,427,427, +427,427,427,427,433,433,433,433,433,433,433,433,433,120,120,120, /* block 53 */ -430,430,431,432,432,432,432,432,432,432,432,432,432,432,432,432, -432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432, -432,431,430,430,430,430,431,431,430,430,431,430,430,430,432,432, -433,433,433,433,433,433,433,433,433,433,432,432,432,432,432,432, -434,434,434,434,434,434,434,434,434,434,434,434,434,434,434,434, -434,434,434,434,434,434,434,434,434,434,434,434,434,434,434,434, -434,434,434,434,434,434,435,436,435,435,436,436,436,435,436,435, -435,435,436,436,119,119,119,119,119,119,119,119,437,437,437,437, - -/* block 54 */ +434,434,435,436,436,436,436,436,436,436,436,436,436,436,436,436, +436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436, +436,435,434,434,434,434,435,435,434,434,435,434,434,434,436,436, +437,437,437,437,437,437,437,437,437,437,436,436,436,436,436,436, 438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438, 438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438, -438,438,438,438,439,439,439,439,439,439,439,439,440,440,440,440, -440,440,440,440,439,439,440,440,119,119,119,441,441,441,441,441, -442,442,442,442,442,442,442,442,442,442,119,119,119,438,438,438, -443,443,443,443,443,443,443,443,443,443,444,444,444,444,444,444, -444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444, -444,444,444,444,444,444,444,444,445,445,445,445,445,445,446,446, +438,438,438,438,438,438,439,440,439,439,440,440,440,439,440,439, +439,439,440,440,120,120,120,120,120,120,120,120,441,441,441,441, + +/* block 54 */ +442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,442, +442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,442, +442,442,442,442,443,443,443,443,443,443,443,443,444,444,444,444, +444,444,444,444,443,443,444,444,120,120,120,445,445,445,445,445, +446,446,446,446,446,446,446,446,446,446,120,120,120,442,442,442, +447,447,447,447,447,447,447,447,447,447,448,448,448,448,448,448, +448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448, +448,448,448,448,448,448,448,448,449,449,449,449,449,449,450,450, /* block 55 */ -447,448,449,450,451,452,453,454,455,119,119,119,119,119,119,119, -456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456, -456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456, -456,456,456,456,456,456,456,456,456,456,456,119,119,456,456,456, -457,457,457,457,457,457,457,457,119,119,119,119,119,119,119,119, -458,459,458,460,459,461,461,462,461,462,463,459,462,462,459,459, -462,464,459,459,459,459,459,459,459,465,466,465,465,461,465,465, -465,465,467,467,468,466,466,469,470,470,119,119,119,119,119,119, +451,452,453,454,455,456,457,458,459,120,120,120,120,120,120,120, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,120,120,460,460,460, +461,461,461,461,461,461,461,461,120,120,120,120,120,120,120,120, +462,463,462,464,463,465,465,466,465,466,467,463,466,466,463,463, +466,468,463,463,463,463,463,463,463,469,470,471,471,465,471,471, +471,471,472,473,474,470,470,475,476,476,477,120,120,120,120,120, /* block 56 */ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35,127,127,127,127,127,471,109,109,109,109, -109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, -109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, -109,109,109,109,109,109,109,109,109,109,109,109,109,120,120,120, -120,120,109,109,109,109,120,120,120,120,120, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35,472,473, 35, 35, 35,474, 35, 35, + 35, 35, 35, 35, 35, 35,128,128,128,128,128,478,110,110,110,110, +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, +110,110,110,110,110,110,110,110,110,110,110,110,110,121,121,121, +121,121,110,110,110,110,121,121,121,121,121, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35,479,480, 35, 35, 35,481, 35, 35, /* block 57 */ - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,109,109,109,109,109, -109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, -109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,120, -113,113,112,112,112,112,112,112,112,112,112,112,112,112,112,112, -112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112, -112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112, -112,112,112,112,112,112,112,112,112,112,119,112,112,112,112,112, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,482, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,110,110,110,110,110, +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,121, +114,114,113,113,113,113,113,113,113,113,113,113,113,113,113,113, +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, +113,113,113,113,113,113,113,113,113,113,120,113,113,113,113,113, /* block 58 */ 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, @@ -2251,12 +2286,12 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 68608 bytes, block = 128 */ 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, -475,476, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, +483,484, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, /* block 59 */ 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33, 32, 33, 35, 35, 35, 35, 35,477, 35, 35,478, 35, + 32, 33, 32, 33, 32, 33, 35, 35, 35, 35, 35,485, 35, 35,486, 35, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, @@ -2265,58 +2300,58 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 68608 bytes, block = 128 */ 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, /* block 60 */ -479,479,479,479,479,479,479,479,480,480,480,480,480,480,480,480, -479,479,479,479,479,479,119,119,480,480,480,480,480,480,119,119, -479,479,479,479,479,479,479,479,480,480,480,480,480,480,480,480, -479,479,479,479,479,479,479,479,480,480,480,480,480,480,480,480, -479,479,479,479,479,479,119,119,480,480,480,480,480,480,119,119, -127,479,127,479,127,479,127,479,119,480,119,480,119,480,119,480, -479,479,479,479,479,479,479,479,480,480,480,480,480,480,480,480, -481,481,482,482,482,482,483,483,484,484,485,485,486,486,119,119, +487,487,487,487,487,487,487,487,488,488,488,488,488,488,488,488, +487,487,487,487,487,487,120,120,488,488,488,488,488,488,120,120, +487,487,487,487,487,487,487,487,488,488,488,488,488,488,488,488, +487,487,487,487,487,487,487,487,488,488,488,488,488,488,488,488, +487,487,487,487,487,487,120,120,488,488,488,488,488,488,120,120, +128,487,128,487,128,487,128,487,120,488,120,488,120,488,120,488, +487,487,487,487,487,487,487,487,488,488,488,488,488,488,488,488, +489,489,490,490,490,490,491,491,492,492,493,493,494,494,120,120, /* block 61 */ -479,479,479,479,479,479,479,479,487,487,487,487,487,487,487,487, -479,479,479,479,479,479,479,479,487,487,487,487,487,487,487,487, -479,479,479,479,479,479,479,479,487,487,487,487,487,487,487,487, -479,479,127,488,127,119,127,127,480,480,489,489,490,118,491,118, -118,118,127,488,127,119,127,127,492,492,492,492,490,118,118,118, -479,479,127,127,119,119,127,127,480,480,493,493,119,118,118,118, -479,479,127,127,127,168,127,127,480,480,494,494,173,118,118,118, -119,119,127,488,127,119,127,127,495,495,496,496,490,118,118,119, +487,487,487,487,487,487,487,487,495,495,495,495,495,495,495,495, +487,487,487,487,487,487,487,487,495,495,495,495,495,495,495,495, +487,487,487,487,487,487,487,487,495,495,495,495,495,495,495,495, +487,487,128,496,128,120,128,128,488,488,497,497,498,119,499,119, +119,119,128,496,128,120,128,128,500,500,500,500,498,119,119,119, +487,487,128,128,120,120,128,128,488,488,501,501,120,119,119,119, +487,487,128,128,128,169,128,128,488,488,502,502,174,119,119,119, +120,120,128,496,128,120,128,128,503,503,504,504,498,119,119,120, /* block 62 */ - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 24,497,498, 24, 24, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 24,505,506, 24, 24, 10, 10, 10, 10, 10, 10, 5, 5, 23, 27, 7, 23, 23, 27, 7, 23, - 5, 5, 5, 5, 5, 5, 5, 5,499,500, 24, 24, 24, 24, 24, 4, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 23, 27, 5,501, 5, 5, 16, - 16, 5, 5, 5, 9, 7, 8, 5, 5,501, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5,507,508, 24, 24, 24, 24, 24,509, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 23, 27, 5,510, 5, 5, 16, + 16, 5, 5, 5, 9, 7, 8, 5, 5,510, 5, 5, 5, 5, 5, 5, 5, 5, 9, 5, 16, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, - 24, 24, 24, 24, 24,502, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, - 25,109,119,119, 25, 25, 25, 25, 25, 25, 9, 9, 9, 7, 8,109, + 24, 24, 24, 24, 24,511, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, + 25,110,120,120, 25, 25, 25, 25, 25, 25, 9, 9, 9, 7, 8,110, /* block 63 */ - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 9, 9, 9, 7, 8,119, -109,109,109,109,109,109,109,109,109,109,109,109,109,119,119,119, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 9, 9, 9, 7, 8,120, +110,110,110,110,110,110,110,110,110,110,110,110,110,120,120,120, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -112,112,112,112,112,112,112,112,112,112,112,112,112,423,423,423, -423,112,423,423,423,112,112,112,112,112,112,112,112,112,112,112, -503,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +113,113,113,113,113,113,113,113,113,113,113,113,113,426,426,426, +426,113,426,426,426,113,113,113,113,113,113,113,113,113,113,113, +512,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 64 */ - 20, 20,504, 20, 20, 20, 20,504, 20, 20,505,504,504,504,505,505, -504,504,504,505, 20,504, 20, 20, 9,504,504,504,504,504, 20, 20, - 20, 20, 21, 20,504, 20,506, 20,504, 20,507,508,504,504, 20,505, -504,504,509,504,505,510,510,510,510,511, 20, 20,505,505,504,504, - 9, 9, 9, 9, 9,504,505,505,505,505, 20, 9, 20, 20,512, 20, + 20, 20,513, 20, 20, 20, 20,513, 20, 20,514,513,513,513,514,514, +513,513,513,514, 20,513, 20, 20, 9,513,513,513,513,513, 20, 20, + 20, 20, 21, 20,513, 20,515, 20,513, 20,516,517,513,513, 20,514, +513,513,518,513,514,519,519,519,519,520, 20, 20,514,514,513,513, + 9, 9, 9, 9, 9,513,514,514,514,514, 20, 9, 20, 20,521, 20, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, -513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513, -514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514, +522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522, +523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523, /* block 65 */ -515,515,515, 32, 33,515,515,515,515, 25, 20, 20,119,119,119,119, - 9, 9, 9, 9,516, 21, 21, 21, 21, 21, 9, 9, 20, 20, 20, 20, +524,524,524, 32, 33,524,524,524,524, 25, 20, 20,120,120,120,120, + 9, 9, 9, 9,525, 21, 21, 21, 21, 21, 9, 9, 20, 20, 20, 20, 9, 20, 20, 9, 20, 20, 9, 20, 20, 21, 21, 20, 20, 20, 9, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 9, 9, @@ -2357,10 +2392,10 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 68608 bytes, block = 128 */ /* block 69 */ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, + 20, 20, 20, 20, 20, 20, 20,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, @@ -2368,10 +2403,10 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 68608 bytes, block = 128 */ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20,517,517,517,517,517,517,517,517,517,517, -517,517,518,517,517,517,517,517,517,517,517,517,517,517,517,517, -519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519, -519,519,519,519,519,519,519,519,519,519, 25, 25, 25, 25, 25, 25, + 20, 20, 20, 20, 20, 20,526,526,526,526,526,526,526,526,526,526, +526,526,527,526,526,526,526,526,526,526,526,526,526,526,526,526, +528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,528, +528,528,528,528,528,528,528,528,528,528, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, /* block 71 */ @@ -2392,7 +2427,7 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 68608 bytes, block = 128 */ 21, 9, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 9, 9, 9,516,516,516,516, 9, + 20, 20, 20, 20, 20, 20, 20, 20, 9, 9, 9,525,525,525,525, 9, /* block 73 */ 21, 21, 21, 21, 21, 21, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, @@ -2401,7 +2436,7 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 68608 bytes, block = 128 */ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,516, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,525, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, /* block 74 */ @@ -2435,20 +2470,20 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 68608 bytes, block = 128 */ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, /* block 77 */ -520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520, -520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520, -520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520, -520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520, -520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520, -520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520, -520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520, -520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520, +529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529, +529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529, +529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529, +529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529, +529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529, +529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529, +529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529, +529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529, /* block 78 */ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9,516,516, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9,525,525, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, @@ -2472,167 +2507,167 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 68608 bytes, block = 128 */ 9, 9, 9, 9, 9, 20, 20, 9, 9, 9, 9, 9, 9, 20, 20, 20, 21, 20, 20, 20, 20, 21, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20,119,119, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20,120,120, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, /* block 81 */ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20,119,119, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20,120,120, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20,119, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,119, /* block 82 */ -521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,521, -521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,521, -521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,119, -522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522, -522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522, -522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,119, - 32, 33,523,524,525,526,527, 32, 33, 32, 33, 32, 33,528,529,530, -531, 35, 32, 33, 35, 32, 33, 35, 35, 35, 35, 35,109,109,532,532, +530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530, +530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530, +530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,120, +531,531,531,531,531,531,531,531,531,531,531,531,531,531,531,531, +531,531,531,531,531,531,531,531,531,531,531,531,531,531,531,531, +531,531,531,531,531,531,531,531,531,531,531,531,531,531,531,120, + 32, 33,532,533,534,535,536, 32, 33, 32, 33, 32, 33,537,538,539, +540, 35, 32, 33, 35, 32, 33, 35, 35, 35, 35, 35,110,110,541,541, /* block 83 */ -164,165,164,165,164,165,164,165,164,165,164,165,164,165,164,165, -164,165,164,165,164,165,164,165,164,165,164,165,164,165,164,165, -164,165,164,165,164,165,164,165,164,165,164,165,164,165,164,165, -164,165,164,165,164,165,164,165,164,165,164,165,164,165,164,165, -164,165,164,165,164,165,164,165,164,165,164,165,164,165,164,165, -164,165,164,165,164,165,164,165,164,165,164,165,164,165,164,165, -164,165,164,165,533,534,534,534,534,534,534,164,165,164,165,535, -535,535,164,165,119,119,119,119,119,536,536,536,536,537,536,536, +165,166,165,166,165,166,165,166,165,166,165,166,165,166,165,166, +165,166,165,166,165,166,165,166,165,166,165,166,165,166,165,166, +165,166,165,166,165,166,165,166,165,166,165,166,165,166,165,166, +165,166,165,166,165,166,165,166,165,166,165,166,165,166,165,166, +165,166,165,166,165,166,165,166,165,166,165,166,165,166,165,166, +165,166,165,166,165,166,165,166,165,166,165,166,165,166,165,166, +165,166,165,166,542,543,543,543,543,543,543,165,166,165,166,544, +544,544,165,166,120,120,120,120,120,545,545,545,545,546,545,545, /* block 84 */ -538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538, -538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538, -538,538,538,538,538,538,119,538,119,119,119,119,119,538,119,119, -539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539, -539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539, -539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539, -539,539,539,539,539,539,539,539,119,119,119,119,119,119,119,540, -541,119,119,119,119,119,119,119,119,119,119,119,119,119,119,542, +547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547, +547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547, +547,547,547,547,547,547,120,547,120,120,120,120,120,547,120,120, +548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548, +548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548, +548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548, +548,548,548,548,548,548,548,548,120,120,120,120,120,120,120,549, +550,120,120,120,120,120,120,120,120,120,120,120,120,120,120,551, /* block 85 */ -358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, -358,358,358,358,358,358,358,119,119,119,119,119,119,119,119,119, -358,358,358,358,358,358,358,119,358,358,358,358,358,358,358,119, -358,358,358,358,358,358,358,119,358,358,358,358,358,358,358,119, -358,358,358,358,358,358,358,119,358,358,358,358,358,358,358,119, -358,358,358,358,358,358,358,119,358,358,358,358,358,358,358,119, -543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543, -543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543, +360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360, +360,360,360,360,360,360,360,120,120,120,120,120,120,120,120,120, +360,360,360,360,360,360,360,120,360,360,360,360,360,360,360,120, +360,360,360,360,360,360,360,120,360,360,360,360,360,360,360,120, +360,360,360,360,360,360,360,120,360,360,360,360,360,360,360,120, +360,360,360,360,360,360,360,120,360,360,360,360,360,360,360,120, +552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552, +552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552, /* block 86 */ 5, 5, 23, 27, 23, 27, 5, 5, 5, 23, 27, 5, 23, 27, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 5, 5, 10, 5, 23, 27, 5, 5, - 23, 27, 7, 8, 7, 8, 7, 8, 7, 8, 5, 5, 5, 5, 5,110, + 23, 27, 7, 8, 7, 8, 7, 8, 7, 8, 5, 5, 5, 5, 5,111, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 5, 5, 5, 5, - 10, 5, 7,544, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, + 10, 5, 7,553, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 87 */ -545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545, -545,545,545,545,545,545,545,545,545,545,119,545,545,545,545,545, -545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545, -545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545, -545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545, -545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545, -545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545, -545,545,545,545,119,119,119,119,119,119,119,119,119,119,119,119, +554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554, +554,554,554,554,554,554,554,554,554,554,120,554,554,554,554,554, +554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554, +554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554, +554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554, +554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554, +554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554, +554,554,554,554,120,120,120,120,120,120,120,120,120,120,120,120, /* block 88 */ -545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545, -545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545, -545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545, -545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545, -545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545, -545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545, -545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545, -545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545, +554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554, +554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554, +554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554, +554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554, +554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554, +554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554, +554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554, +554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554, /* block 89 */ -545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545, -545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545, -545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545, -545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545, -545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545, -545,545,545,545,545,545,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,119,119,119,119, +554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554, +554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554, +554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554, +554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554, +554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554, +554,554,554,554,554,554,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,120,120,120,120, /* block 90 */ - 4,546,546,547, 20,548,549,550,551,552,551,552,551,552,551,552, -551,552, 20,553,551,552,551,552,551,552,551,552,554,555,556,556, - 20,550,550,550,550,550,550,550,550,550,557,557,557,557,558,558, -559,560,560,560,560,560, 20,553,550,550,550,548,561,562,563,563, -119,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564, -564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564, -564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564, -564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564, + 4,555,555,556, 20,557,558,559,560,561,560,561,560,561,560,561, +560,561, 20,562,560,561,560,561,560,561,560,561,563,564,565,565, + 20,559,559,559,559,559,559,559,559,559,566,566,566,566,567,567, +568,569,569,569,569,569, 20,562,559,559,559,557,570,571,572,572, +120,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573, +573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573, +573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573, +573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573, /* block 91 */ -564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564, -564,564,564,564,564,564,564,119,119,565,565,566,566,567,567,564, -568,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569, -569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569, -569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569, -569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569, -569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569, -569,569,569,569,569,569,569,569,569,569,569,546,560,570,570,569, +573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573, +573,573,573,573,573,573,573,120,120,574,574,575,575,576,576,573, +577,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, +578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, +578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, +578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, +578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, +578,578,578,578,578,578,578,578,578,578,578,555,569,579,579,578, /* block 92 */ -119,119,119,119,119,571,571,571,571,571,571,571,571,571,571,571, -571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571, -571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571, -119,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572, -572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572, -572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572, -572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572, -572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572, +120,120,120,120,120,580,580,580,580,580,580,580,580,580,580,580, +580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580, +580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580, +120,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581, +581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581, +581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581, +581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581, +581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581, /* block 93 */ -572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,119, -563,563,573,573,573,573,563,563,563,563,563,563,563,563,563,563, -571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571, -571,571,571,571,571,571,571,571,571,571,571,119,119,119,119,119, -563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563, -563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563, -563,563,563,563,119,119,119,119,119,119,119,119,119,119,119,119, -569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569, +581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,120, +572,572,582,582,582,582,572,572,572,572,572,572,572,572,572,572, +580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580, +580,580,580,580,580,580,580,580,580,580,580,120,120,120,120,120, +572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572, +572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572, +572,572,572,572,120,120,120,120,120,120,120,120,120,120,120,120, +578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, /* block 94 */ -574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574, -574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,119, -573,573,573,573,573,573,573,573,573,573,563,563,563,563,563,563, -563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563, -563,563,563,563,563,563,563,563, 25, 25, 25, 25, 25, 25, 25, 25, +583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583, +583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,120, +582,582,582,582,582,582,582,582,582,582,572,572,572,572,572,572, +572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572, +572,572,572,572,572,572,572,572, 25, 25, 25, 25, 25, 25, 25, 25, 20, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, -574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574, -574,574,574,574,574,574,574,574,574,574,574,574,574,574,574, 20, +583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583, +583,583,583,583,583,583,583,583,583,583,583,583,583,583,583, 20, /* block 95 */ -573,573,573,573,573,573,573,573,573,573,563,563,563,563,563,563, -563,563,563,563,563,563,563,575,563,575,563,563,563,563,563,563, -563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563, -563, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, -563,563,563,563,563,563,563,563,563,563,563,563, 20, 20, 20, 20, -576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576, -576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576, -576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,119, +582,582,582,582,582,582,582,582,582,582,572,572,572,572,572,572, +572,572,572,572,572,572,572,584,572,584,572,572,572,572,572,572, +572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572, +572, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, +572,572,572,572,572,572,572,572,572,572,572,572, 20, 20, 20, 20, +585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585, +585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585, +585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,572, /* block 96 */ -576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576, -576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576, -576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576, -576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576, -576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576, -576,576,576,576,576,576,576,576,563,563,563,563,563,563,563,563, -563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563, -563, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,563,563,563,563,563, +585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585, +585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585, +585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585, +585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585, +585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585, +585,585,585,585,585,585,585,585,572,572,572,572,572,572,572,572, +572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572, +572, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,572,572,572,572,572, /* block 97 */ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, @@ -2641,1160 +2676,1190 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 68608 bytes, block = 128 */ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, -563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563, -563,563,563,563,563,563,563,563,563,563,563,563,563,563,563, 20, +572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572, +572,572,572,572,572,572,572,572,572,572,572,572,572,572,572, 20, /* block 98 */ -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, /* block 99 */ -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,119,119,119,119,119,119,119,119,119,119, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,120,120,120,120,120,120,120,120,120,120, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, /* block 100 */ -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 101 */ -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,579,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, +587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587, +587,587,587,587,587,588,587,587,587,587,587,587,587,587,587,587, +587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587, +587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587, +587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587, +587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587, +587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587, +587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587, /* block 102 */ -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, +587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587, +587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587, +587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587, +587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587, +587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587, +587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587, +587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587, +587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587, /* block 103 */ -578,578,578,578,578,578,578,578,578,578,578,578,578,119,119,119, -580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580, -580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580, -580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580, -580,580,580,580,580,580,580,119,119,119,119,119,119,119,119,119, -581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581, -581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581, -581,581,581,581,581,581,581,581,582,582,582,582,582,582,583,583, +587,587,587,587,587,587,587,587,587,587,587,587,587,120,120,120, +589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589, +589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589, +589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589, +589,589,589,589,589,589,589,120,120,120,120,120,120,120,120,120, +590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590, +590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590, +590,590,590,590,590,590,590,590,591,591,591,591,591,591,592,592, /* block 104 */ -584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584, -584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584, -584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584, -584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584, -584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584, -584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584, -584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584, -584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584, +593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593, +593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593, +593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593, +593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593, +593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593, +593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593, +593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593, +593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593, /* block 105 */ -584,584,584,584,584,584,584,584,584,584,584,584,585,586,586,586, -584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584, -587,587,587,587,587,587,587,587,587,587,584,584,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -191,192,191,192,191,192,191,192,191,192,588,589,191,192,191,192, -191,192,191,192,191,192,191,192,191,192,191,192,191,192,191,192, -191,192,191,192,191,192,191,192,191,192,191,192,191,192,590,197, -199,199,199,591,543,543,543,543,543,543,543,543,543,543,591,472, +593,593,593,593,593,593,593,593,593,593,593,593,594,595,595,595, +593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593, +596,596,596,596,596,596,596,596,596,596,593,593,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +192,193,192,193,192,193,192,193,192,193,597,598,192,193,192,193, +192,193,192,193,192,193,192,193,192,193,192,193,192,193,192,193, +192,193,192,193,192,193,192,193,192,193,192,193,192,193,599,198, +200,200,200,600,552,552,552,552,552,552,552,552,552,552,600,479, /* block 106 */ -191,192,191,192,191,192,191,192,191,192,191,192,191,192,191,192, -191,192,191,192,191,192,191,192,191,192,191,192,472,472,543,543, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,593,593,593,593,593,593,593,593,593,593, -594,594,595,595,595,595,595,595,119,119,119,119,119,119,119,119, +192,193,192,193,192,193,192,193,192,193,192,193,192,193,192,193, +192,193,192,193,192,193,192,193,192,193,192,193,479,479,552,552, +601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601, +601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601, +601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601, +601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601, +601,601,601,601,601,601,602,602,602,602,602,602,602,602,602,602, +603,603,604,604,604,604,604,604,120,120,120,120,120,120,120,120, /* block 107 */ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15,110,110,110,110,110,110,110,110,110, + 15, 15, 15, 15, 15, 15, 15,111,111,111,111,111,111,111,111,111, 15, 15, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 35, 35, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, -109, 35, 35, 35, 35, 35, 35, 35, 35, 32, 33, 32, 33,596, 32, 33, +110, 35, 35, 35, 35, 35, 35, 35, 35, 32, 33, 32, 33,605, 32, 33, /* block 108 */ - 32, 33, 32, 33, 32, 33, 32, 33,110, 15, 15, 32, 33,597, 35, 22, - 32, 33, 32, 33, 35, 35, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33,598,599,600,601,598, 35, -602,603,604,605, 32, 33, 32, 33, 32, 33,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119, 22,109,109, 35, 22, 22, 22, 22, 22, + 32, 33, 32, 33, 32, 33, 32, 33,111, 15, 15, 32, 33,606, 35, 22, + 32, 33, 32, 33,607, 35, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, + 32, 33, 32, 33, 32, 33, 32, 33, 32, 33,608,609,610,611,608, 35, +612,613,614,615, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, +120,120, 32, 33,616,617,618,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120, 22,110,110, 35, 22, 22, 22, 22, 22, /* block 109 */ -606,606,607,606,606,606,607,606,606,606,606,607,606,606,606,606, -606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606, -606,606,606,608,608,607,607,608,609,609,609,609,119,119,119,119, -610,610,610,611,611,611,612,612,613,612,119,119,119,119,119,119, -614,614,614,614,614,614,614,614,614,614,614,614,614,614,614,614, -614,614,614,614,614,614,614,614,614,614,614,614,614,614,614,614, -614,614,614,614,614,614,614,614,614,614,614,614,614,614,614,614, -614,614,614,614,615,615,615,615,119,119,119,119,119,119,119,119, +619,619,620,619,619,619,620,619,619,619,619,620,619,619,619,619, +619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619, +619,619,619,621,621,620,620,621,622,622,622,622,120,120,120,120, +623,623,623,624,624,624,625,625,626,625,120,120,120,120,120,120, +627,627,627,627,627,627,627,627,627,627,627,627,627,627,627,627, +627,627,627,627,627,627,627,627,627,627,627,627,627,627,627,627, +627,627,627,627,627,627,627,627,627,627,627,627,627,627,627,627, +627,627,627,627,628,628,628,628,120,120,120,120,120,120,120,120, /* block 110 */ -616,616,617,617,617,617,617,617,617,617,617,617,617,617,617,617, -617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617, -617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617, -617,617,617,617,616,616,616,616,616,616,616,616,616,616,616,616, -616,616,616,616,618,618,119,119,119,119,119,119,119,119,619,619, -620,620,620,620,620,620,620,620,620,620,119,119,119,119,119,119, -251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251, -251,621,253,622,253,253,253,253,259,259,259,253,259,253,253,251, +629,629,630,630,630,630,630,630,630,630,630,630,630,630,630,630, +630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630, +630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630, +630,630,630,630,629,629,629,629,629,629,629,629,629,629,629,629, +629,629,629,629,631,631,120,120,120,120,120,120,120,120,632,632, +633,633,633,633,633,633,633,633,633,633,120,120,120,120,120,120, +252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252, +252,634,254,635,254,254,254,254,260,260,260,254,260,254,254,252, /* block 111 */ -623,623,623,623,623,623,623,623,623,623,624,624,624,624,624,624, -624,624,624,624,624,624,624,624,624,624,624,624,624,624,624,624, -624,624,624,624,624,624,625,625,625,625,625,625,625,625,626,627, -628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628, -628,628,628,628,628,628,628,629,629,629,629,629,629,629,629,629, -629,629,630,630,119,119,119,119,119,119,119,119,119,119,119,631, -355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355, -355,355,355,355,355,355,355,355,355,355,355,355,355,119,119,119, +636,636,636,636,636,636,636,636,636,636,637,637,637,637,637,637, +637,637,637,637,637,637,637,637,637,637,637,637,637,637,637,637, +637,637,637,637,637,637,638,638,638,638,638,638,638,638,639,640, +641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641, +641,641,641,641,641,641,641,642,642,642,642,642,642,642,642,642, +642,642,643,643,120,120,120,120,120,120,120,120,120,120,120,644, +357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357, +357,357,357,357,357,357,357,357,357,357,357,357,357,120,120,120, /* block 112 */ -632,632,632,633,634,634,634,634,634,634,634,634,634,634,634,634, -634,634,634,634,634,634,634,634,634,634,634,634,634,634,634,634, -634,634,634,634,634,634,634,634,634,634,634,634,634,634,634,634, -634,634,634,632,633,633,632,632,632,632,633,633,632,633,633,633, -633,635,635,635,635,635,635,635,635,635,635,635,635,635,119,636, -637,637,637,637,637,637,637,637,637,637,119,119,119,119,635,635, -343,343,343,343,343,345,638,343,343,343,343,343,343,343,343,343, -349,349,349,349,349,349,349,349,349,349,343,343,343,343,343,119, +645,645,645,646,647,647,647,647,647,647,647,647,647,647,647,647, +647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647, +647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647, +647,647,647,645,646,646,645,645,645,645,646,646,645,645,646,646, +646,648,648,648,648,648,648,648,648,648,648,648,648,648,120,649, +650,650,650,650,650,650,650,650,650,650,120,120,120,120,648,648, +345,345,345,345,345,347,651,345,345,345,345,345,345,345,345,345, +351,351,351,351,351,351,351,351,351,351,345,345,345,345,345,120, /* block 113 */ -639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,639, -639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,639, -639,639,639,639,639,639,639,639,639,640,640,640,640,640,640,641, -641,640,640,641,641,640,640,119,119,119,119,119,119,119,119,119, -639,639,639,640,639,639,639,639,639,639,639,639,640,641,119,119, -642,642,642,642,642,642,642,642,642,642,119,119,643,643,643,643, -343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343, -638,343,343,343,343,343,343,350,350,350,343,344,345,344,343,343, +652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,652, +652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,652, +652,652,652,652,652,652,652,652,652,653,653,653,653,653,653,654, +654,653,653,654,654,653,653,120,120,120,120,120,120,120,120,120, +652,652,652,653,652,652,652,652,652,652,652,652,653,654,120,120, +655,655,655,655,655,655,655,655,655,655,120,120,656,656,656,656, +345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345, +651,345,345,345,345,345,345,352,352,352,345,346,347,346,345,345, /* block 114 */ -644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644, -644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644, -644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644, -645,644,645,645,645,644,644,645,645,644,644,644,644,644,645,645, -644,645,644,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,644,644,646,647,647, -648,648,648,648,648,648,648,648,648,648,648,649,650,650,649,649, -651,651,648,652,652,649,650,119,119,119,119,119,119,119,119,119, +657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, +657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, +657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, +658,657,658,658,658,657,657,658,658,657,657,657,657,657,658,658, +657,658,657,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,657,657,659,660,660, +661,661,661,661,661,661,661,661,661,661,661,662,663,663,662,662, +664,664,661,665,665,662,663,120,120,120,120,120,120,120,120,120, /* block 115 */ -119,358,358,358,358,358,358,119,119,358,358,358,358,358,358,119, -119,358,358,358,358,358,358,119,119,119,119,119,119,119,119,119, -358,358,358,358,358,358,358,119,358,358,358,358,358,358,358,119, +120,360,360,360,360,360,360,120,120,360,360,360,360,360,360,120, +120,360,360,360,360,360,360,120,120,120,120,120,120,120,120,120, +360,360,360,360,360,360,360,120,360,360,360,360,360,360,360,120, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35,653, 35, 35, 35, 35, 35, 35, 35, 15,109,109,109,109, - 35, 35, 35, 35, 35,127,119,119,119,119,119,119,119,119,119,119, -654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654, + 35, 35, 35,666, 35, 35, 35, 35, 35, 35, 35, 15,110,110,110,110, + 35, 35, 35, 35, 35,128, 35, 35,120,120,120,120,120,120,120,120, +667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667, /* block 116 */ -654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654, -654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654, -654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654, -654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654, -648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,648, -648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,648, -648,648,648,649,649,650,649,649,650,649,649,651,649,650,119,119, -655,655,655,655,655,655,655,655,655,655,119,119,119,119,119,119, +667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667, +667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667, +667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667, +667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667, +661,661,661,661,661,661,661,661,661,661,661,661,661,661,661,661, +661,661,661,661,661,661,661,661,661,661,661,661,661,661,661,661, +661,661,661,662,662,663,662,662,663,662,662,664,662,663,120,120, +668,668,668,668,668,668,668,668,668,668,120,120,120,120,120,120, /* block 117 */ -656,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,656,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,656,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,656,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -656,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, +669,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,669,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,669,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,669,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +669,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, /* block 118 */ -657,657,657,657,657,657,657,657,657,657,657,657,656,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,656,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,656,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -656,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,656,657,657,657, +670,670,670,670,670,670,670,670,670,670,670,670,669,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,669,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,669,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +669,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,669,670,670,670, /* block 119 */ -657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,656,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,656,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -656,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,656,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, +670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,669,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,669,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +669,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,669,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, /* block 120 */ -657,657,657,657,657,657,657,657,656,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,656,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -656,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,656,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,656,657,657,657,657,657,657,657, +670,670,670,670,670,670,670,670,669,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,669,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +669,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,669,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,669,670,670,670,670,670,670,670, /* block 121 */ -657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,656,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -656,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,656,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,656,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, +670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,669,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +669,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,669,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,669,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, /* block 122 */ -657,657,657,657,656,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -656,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,656,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,656,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,656,657,657,657,657,657,657,657,657,657,657,657, +670,670,670,670,669,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +669,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,669,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,669,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,669,670,670,670,670,670,670,670,670,670,670,670, /* block 123 */ -657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -656,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,656,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,656,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,656,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, +670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +669,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,669,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,669,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,669,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, /* block 124 */ -657,657,657,657,657,657,657,657,656,657,657,657,657,657,657,657, -657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657, -657,657,657,657,119,119,119,119,119,119,119,119,119,119,119,119, -356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356, -356,356,356,356,356,356,356,119,119,119,119,357,357,357,357,357, -357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357, -357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357, -357,357,357,357,357,357,357,357,357,357,357,357,119,119,119,119, +670,670,670,670,670,670,670,670,669,670,670,670,670,670,670,670, +670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670, +670,670,670,670,120,120,120,120,120,120,120,120,120,120,120,120, +358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, +358,358,358,358,358,358,358,120,120,120,120,359,359,359,359,359, +359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359, +359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359, +359,359,359,359,359,359,359,359,359,359,359,359,120,120,120,120, /* block 125 */ -658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658, -658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658, -658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658, -658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658, -658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658, -658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658, -658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658, -658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658, +671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671, +671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671, +671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671, +671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671, +671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671, +671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671, +671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671, +671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671, /* block 126 */ -659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659, -659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659, -659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659, -659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659, -659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659, -659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659, -659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659, -659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659, +672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672, +672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672, +672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672, +672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672, +672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672, +672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672, +672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672, +672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672, /* block 127 */ -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,119,119, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,120,120, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, /* block 128 */ -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 129 */ - 35, 35, 35, 35, 35, 35, 35,119,119,119,119,119,119,119,119,119, -119,119,119,205,205,205,205,205,119,119,119,119,119,214,211,214, -214,214,214,214,214,214,214,214,214,660,214,214,214,214,214,214, -214,214,214,214,214,214,214,119,214,214,214,214,214,119,214,119, -214,214,119,214,214,119,214,214,214,214,214,214,214,214,214,214, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, + 35, 35, 35, 35, 35, 35, 35,120,120,120,120,120,120,120,120,120, +120,120,120,206,206,206,206,206,120,120,120,120,120,215,212,215, +215,215,215,215,215,215,215,215,215,673,215,215,215,215,215,215, +215,215,215,215,215,215,215,120,215,215,215,215,215,120,215,120, +215,215,120,215,215,120,215,215,215,215,215,215,215,215,215,215, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, /* block 130 */ -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,661,661,661,661,661,661,661,661,661,661,661,661,661,661, -661,661,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,674,674,674,674,674,674,674,674,674,674,674,674,674,674, +674,674,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, /* block 131 */ -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, /* block 132 */ -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224, 8, 7, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225, 8, 7, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, /* block 133 */ -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -119,119,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -224,224,662,224,224,224,224,224,224,224,224,224,219,663,119,119, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +120,120,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +225,225,675,225,225,225,225,225,225,225,225,225,220,676,120,120, /* block 134 */ -112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112, - 5, 5, 5, 5, 5, 5, 5, 7, 8, 5,119,119,119,119,119,119, -112,112,112,112,112,112,112,112,112,112,112,112,112,112,543,543, +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, + 5, 5, 5, 5, 5, 5, 5, 7, 8, 5,120,120,120,120,120,120, +113,113,113,113,113,113,113,113,113,113,113,113,113,113,552,552, 5, 10, 10, 16, 16, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, - 8, 7, 8, 7, 8,547,547, 7, 8, 5, 5, 5, 5, 16, 16, 16, - 5, 5, 5,119, 5, 5, 5, 5, 10, 7, 8, 7, 8, 7, 8, 5, - 5, 5, 9, 10, 9, 9, 9,119, 5, 6, 5, 5,119,119,119,119, -224,224,224,224,224,119,224,224,224,224,224,224,224,224,224,224, + 8, 7, 8, 7, 8,556,556, 7, 8, 5, 5, 5, 5, 16, 16, 16, + 5, 5, 5,120, 5, 5, 5, 5, 10, 7, 8, 7, 8, 7, 8, 5, + 5, 5, 9, 10, 9, 9, 9,120, 5, 6, 5, 5,120,120,120,120, +225,225,225,225,225,120,225,225,225,225,225,225,225,225,225,225, /* block 135 */ -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,119,119, 24, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,120,120, 24, /* block 136 */ -119, 5, 5, 5, 6, 5, 5, 5, 7, 8, 5, 9, 5, 10, 5, 5, +120, 5, 5, 5, 6, 5, 5, 5, 7, 8, 5, 9, 5, 10, 5, 5, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 5, 5, 9, 9, 9, 5, 5, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 7, 5, 8, 15, 16, 15, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 7, 9, 8, 9, 7, - 8,546,551,552,546,546,569,569,569,569,569,569,569,569,569,569, -560,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569, + 8,555,560,561,555,555,578,578,578,578,578,578,578,578,578,578, +569,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, /* block 137 */ -569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569, -569,569,569,569,569,569,569,569,569,569,569,569,569,569,664,664, -572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572, -572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,119, -119,119,572,572,572,572,572,572,119,119,572,572,572,572,572,572, -119,119,572,572,572,572,572,572,119,119,572,572,572,119,119,119, - 6, 6, 9, 15, 20, 6, 6,119, 20, 9, 9, 9, 9, 20, 20,119, -502,502,502,502,502,502,502,502,502, 24, 24, 24, 20, 20,119,119, +578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, +578,578,578,578,578,578,578,578,578,578,578,578,578,578,677,677, +581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581, +581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,120, +120,120,581,581,581,581,581,581,120,120,581,581,581,581,581,581, +120,120,581,581,581,581,581,581,120,120,581,581,581,120,120,120, + 6, 6, 9, 15, 20, 6, 6,120, 20, 9, 9, 9, 9, 20, 20,120, +511,511,511,511,511,511,511,511,511, 24, 24, 24, 20, 20,120,120, /* block 138 */ -665,665,665,665,665,665,665,665,665,665,665,665,119,665,665,665, -665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665, -665,665,665,665,665,665,665,119,665,665,665,665,665,665,665,665, -665,665,665,665,665,665,665,665,665,665,665,119,665,665,119,665, -665,665,665,665,665,665,665,665,665,665,665,665,665,665,119,119, -665,665,665,665,665,665,665,665,665,665,665,665,665,665,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +678,678,678,678,678,678,678,678,678,678,678,678,120,678,678,678, +678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678, +678,678,678,678,678,678,678,120,678,678,678,678,678,678,678,678, +678,678,678,678,678,678,678,678,678,678,678,120,678,678,120,678, +678,678,678,678,678,678,678,678,678,678,678,678,678,678,120,120, +678,678,678,678,678,678,678,678,678,678,678,678,678,678,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 139 */ -665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665, -665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665, -665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665, -665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665, -665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665, -665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665, -665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665, -665,665,665,665,665,665,665,665,665,665,665,119,119,119,119,119, +678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678, +678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678, +678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678, +678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678, +678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678, +678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678, +678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678, +678,678,678,678,678,678,678,678,678,678,678,120,120,120,120,120, /* block 140 */ -666,666,666,119,119,119,119,667,667,667,667,667,667,667,667,667, -667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667, -667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667, -667,667,667,667,119,119,119,668,668,668,668,668,668,668,668,668, -669,669,669,669,669,669,669,669,669,669,669,669,669,669,669,669, -669,669,669,669,669,669,669,669,669,669,669,669,669,669,669,669, -669,669,669,669,669,669,669,669,669,669,669,669,669,669,669,669, -669,669,669,669,669,670,670,670,670,671,671,671,671,671,671,671, +679,679,679,120,120,120,120,680,680,680,680,680,680,680,680,680, +680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680, +680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680, +680,680,680,680,120,120,120,681,681,681,681,681,681,681,681,681, +682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682, +682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682, +682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682, +682,682,682,682,682,683,683,683,683,684,684,684,684,684,684,684, /* block 141 */ -671,671,671,671,671,671,671,671,671,671,670,670,671,671,671,119, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,119,119,119,119, -671,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +684,684,684,684,684,684,684,684,684,684,683,683,684,684,684,120, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,120,120,120,120, +684,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,112,119,119, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,113,120,120, /* block 142 */ -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 143 */ -672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672, -672,672,672,672,672,672,672,672,672,672,672,672,672,119,119,119, -673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673, -673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673, -673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673, -673,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -674,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675, -675,675,675,675,675,675,675,675,675,675,675,675,119,119,119,119, +685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685, +685,685,685,685,685,685,685,685,685,685,685,685,685,120,120,120, +686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686, +686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686, +686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686, +686,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +687,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688, +688,688,688,688,688,688,688,688,688,688,688,688,120,120,120,120, /* block 144 */ -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -677,677,677,677,119,119,119,119,119,119,119,119,119,676,676,676, -678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678, -678,679,678,678,678,678,678,678,678,678,679,119,119,119,119,119, -680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680, -680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680, -680,680,680,680,680,680,681,681,681,681,681,119,119,119,119,119, +689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689, +689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689, +690,690,690,690,120,120,120,120,120,120,120,120,120,689,689,689, +691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691, +691,692,691,691,691,691,691,691,691,691,692,120,120,120,120,120, +693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693, +693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693, +693,693,693,693,693,693,694,694,694,694,694,120,120,120,120,120, /* block 145 */ -682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682, -682,682,682,682,682,682,682,682,682,682,682,682,682,682,119,683, -684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684, -684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684, -684,684,684,684,119,119,119,119,684,684,684,684,684,684,684,684, -685,686,686,686,686,686,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695, +695,695,695,695,695,695,695,695,695,695,695,695,695,695,120,696, +697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697, +697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697, +697,697,697,697,120,120,120,120,697,697,697,697,697,697,697,697, +698,699,699,699,699,699,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 146 */ -687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687, -687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687, -687,687,687,687,687,687,687,687,688,688,688,688,688,688,688,688, -688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688, -688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688, -689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689, -689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689, -689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689, +700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700, +700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700, +700,700,700,700,700,700,700,700,701,701,701,701,701,701,701,701, +701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701, +701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701, +702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702, +702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702, +702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702, /* block 147 */ -690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690, -690,690,690,690,690,690,690,690,690,690,690,690,690,690,119,119, -691,691,691,691,691,691,691,691,691,691,119,119,119,119,119,119, -692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,692, -692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,692, -692,692,692,692,119,119,119,119,693,693,693,693,693,693,693,693, -693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693, -693,693,693,693,693,693,693,693,693,693,693,693,119,119,119,119, +703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,703, +703,703,703,703,703,703,703,703,703,703,703,703,703,703,120,120, +704,704,704,704,704,704,704,704,704,704,120,120,120,120,120,120, +705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705, +705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705, +705,705,705,705,120,120,120,120,706,706,706,706,706,706,706,706, +706,706,706,706,706,706,706,706,706,706,706,706,706,706,706,706, +706,706,706,706,706,706,706,706,706,706,706,706,120,120,120,120, /* block 148 */ -694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694, -694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694, -694,694,694,694,694,694,694,694,119,119,119,119,119,119,119,119, -695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695, -695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695, -695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695, -695,695,695,695,119,119,119,119,119,119,119,119,119,119,119,696, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707, +707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707, +707,707,707,707,707,707,707,707,120,120,120,120,120,120,120,120, +708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708, +708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708, +708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708, +708,708,708,708,120,120,120,120,120,120,120,120,120,120,120,709, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 149 */ -697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697, -697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697, -697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697, -697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697, -697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697, -697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697, -697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697, -697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697, +710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710, +710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710, +710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710, +710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710, +710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710, +710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710, +710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710, +710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710, /* block 150 */ -697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697, -697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697, -697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697, -697,697,697,697,697,697,697,119,119,119,119,119,119,119,119,119, -697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697, -697,697,697,697,697,697,119,119,119,119,119,119,119,119,119,119, -697,697,697,697,697,697,697,697,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710, +710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710, +710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710, +710,710,710,710,710,710,710,120,120,120,120,120,120,120,120,120, +710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710, +710,710,710,710,710,710,120,120,120,120,120,120,120,120,120,120, +710,710,710,710,710,710,710,710,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 151 */ -698,698,698,698,698,698,119,119,698,119,698,698,698,698,698,698, -698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698, -698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698, -698,698,698,698,698,698,119,698,698,119,119,119,698,119,119,698, -699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699, -699,699,699,699,699,699,119,700,701,701,701,701,701,701,701,701, -702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702, -702,702,702,702,702,702,702,703,703,704,704,704,704,704,704,704, +711,711,711,711,711,711,120,120,711,120,711,711,711,711,711,711, +711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711, +711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711, +711,711,711,711,711,711,120,711,711,120,120,120,711,120,120,711, +712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712, +712,712,712,712,712,712,120,713,714,714,714,714,714,714,714,714, +715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715, +715,715,715,715,715,715,715,716,716,717,717,717,717,717,717,717, /* block 152 */ -705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705, -705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,119, -119,119,119,119,119,119,119,706,706,706,706,706,706,706,706,706, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707, -707,707,707,119,707,707,119,119,119,119,119,708,708,708,708,708, +718,718,718,718,718,718,718,718,718,718,718,718,718,718,718,718, +718,718,718,718,718,718,718,718,718,718,718,718,718,718,718,120, +120,120,120,120,120,120,120,719,719,719,719,719,719,719,719,719, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720, +720,720,720,120,720,720,120,120,120,120,120,721,721,721,721,721, /* block 153 */ -709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709, -709,709,709,709,709,709,710,710,710,710,710,710,119,119,119,711, -712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712, -712,712,712,712,712,712,712,712,712,712,119,119,119,119,119,713, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +722,722,722,722,722,722,722,722,722,722,722,722,722,722,722,722, +722,722,722,722,722,722,723,723,723,723,723,723,120,120,120,724, +725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725, +725,725,725,725,725,725,725,725,725,725,120,120,120,120,120,726, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 154 */ -714,714,714,714,714,714,714,714,714,714,714,714,714,714,714,714, -714,714,714,714,714,714,714,714,714,714,714,714,714,714,714,714, -715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715, -715,715,715,715,715,715,715,715,119,119,119,119,716,716,715,715, -716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716, -119,119,716,716,716,716,716,716,716,716,716,716,716,716,716,716, -716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716, -716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716, +727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727, +727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727, +728,728,728,728,728,728,728,728,728,728,728,728,728,728,728,728, +728,728,728,728,728,728,728,728,120,120,120,120,729,729,728,728, +729,729,729,729,729,729,729,729,729,729,729,729,729,729,729,729, +120,120,729,729,729,729,729,729,729,729,729,729,729,729,729,729, +729,729,729,729,729,729,729,729,729,729,729,729,729,729,729,729, +729,729,729,729,729,729,729,729,729,729,729,729,729,729,729,729, /* block 155 */ -717,718,718,718,119,718,718,119,119,119,119,119,718,718,718,718, -717,717,717,717,119,717,717,717,119,717,717,717,717,717,717,717, -717,717,717,717,717,717,717,717,717,717,717,717,717,717,717,717, -717,717,717,717,717,717,119,119,718,718,718,119,119,119,119,718, -719,719,719,719,719,719,719,719,719,119,119,119,119,119,119,119, -720,720,720,720,720,720,720,720,720,119,119,119,119,119,119,119, -721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,721, -721,721,721,721,721,721,721,721,721,721,721,721,721,722,722,723, +730,731,731,731,120,731,731,120,120,120,120,120,731,731,731,731, +730,730,730,730,120,730,730,730,120,730,730,730,730,730,730,730, +730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730, +730,730,730,730,730,730,120,120,731,731,731,120,120,120,120,731, +732,732,732,732,732,732,732,732,732,120,120,120,120,120,120,120, +733,733,733,733,733,733,733,733,733,120,120,120,120,120,120,120, +734,734,734,734,734,734,734,734,734,734,734,734,734,734,734,734, +734,734,734,734,734,734,734,734,734,734,734,734,734,735,735,736, /* block 156 */ -724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724, -724,724,724,724,724,724,724,724,724,724,724,724,724,725,725,725, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -726,726,726,726,726,726,726,726,727,726,726,726,726,726,726,726, -726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726, -726,726,726,726,726,728,728,119,119,119,119,729,729,729,729,729, -730,730,730,730,730,730,730,119,119,119,119,119,119,119,119,119, +737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737, +737,737,737,737,737,737,737,737,737,737,737,737,737,738,738,738, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +739,739,739,739,739,739,739,739,740,739,739,739,739,739,739,739, +739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739, +739,739,739,739,739,741,741,120,120,120,120,742,742,742,742,742, +743,743,743,743,743,743,743,120,120,120,120,120,120,120,120,120, /* block 157 */ -731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,731, -731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,731, -731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,731, -731,731,731,731,731,731,119,119,119,732,732,732,732,732,732,732, -733,733,733,733,733,733,733,733,733,733,733,733,733,733,733,733, -733,733,733,733,733,733,119,119,734,734,734,734,734,734,734,734, -735,735,735,735,735,735,735,735,735,735,735,735,735,735,735,735, -735,735,735,119,119,119,119,119,736,736,736,736,736,736,736,736, +744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744, +744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744, +744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744, +744,744,744,744,744,744,120,120,120,745,745,745,745,745,745,745, +746,746,746,746,746,746,746,746,746,746,746,746,746,746,746,746, +746,746,746,746,746,746,120,120,747,747,747,747,747,747,747,747, +748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,748, +748,748,748,120,120,120,120,120,749,749,749,749,749,749,749,749, /* block 158 */ -737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737, -737,737,119,119,119,119,119,119,119,738,738,738,738,119,119,119, -119,119,119,119,119,119,119,119,119,739,739,739,739,739,739,739, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750, +750,750,120,120,120,120,120,120,120,751,751,751,751,120,120,120, +120,120,120,120,120,120,120,120,120,752,752,752,752,752,752,752, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 159 */ -740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, -740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, -740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, -740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, -740,740,740,740,740,740,740,740,740,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,753, +753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,753, +753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,753, +753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,753, +753,753,753,753,753,753,753,753,753,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 160 */ -741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741, -741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741, -741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741, -741,741,741,119,119,119,119,119,119,119,119,119,119,119,119,119, -742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742, -742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742, -742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742, -742,742,742,119,119,119,119,119,119,119,743,743,743,743,743,743, +754,754,754,754,754,754,754,754,754,754,754,754,754,754,754,754, +754,754,754,754,754,754,754,754,754,754,754,754,754,754,754,754, +754,754,754,754,754,754,754,754,754,754,754,754,754,754,754,754, +754,754,754,120,120,120,120,120,120,120,120,120,120,120,120,120, +755,755,755,755,755,755,755,755,755,755,755,755,755,755,755,755, +755,755,755,755,755,755,755,755,755,755,755,755,755,755,755,755, +755,755,755,755,755,755,755,755,755,755,755,755,755,755,755,755, +755,755,755,120,120,120,120,120,120,120,756,756,756,756,756,756, /* block 161 */ -744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744, -744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744, -744,744,744,744,745,745,745,745,119,119,119,119,119,119,119,119, -746,746,746,746,746,746,746,746,746,746,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,757, +757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,757, +757,757,757,757,758,758,758,758,120,120,120,120,120,120,120,120, +759,759,759,759,759,759,759,759,759,759,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 162 */ -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747, -747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,119, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +760,760,760,760,760,760,760,760,760,760,760,760,760,760,760,760, +760,760,760,760,760,760,760,760,760,760,760,760,760,760,760,120, /* block 163 */ -748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,748, -748,748,748,748,748,748,748,748,748,748,748,748,748,749,749,749, -749,749,749,749,749,749,749,748,119,119,119,119,119,119,119,119, -750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750, -750,750,750,750,750,750,751,751,751,751,751,751,751,751,751,751, -751,752,752,752,752,753,753,753,753,753,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +761,761,761,761,761,761,761,761,761,761,761,761,761,761,761,761, +761,761,761,761,761,761,761,761,761,761,761,761,761,762,762,762, +762,762,762,762,762,762,762,761,120,120,120,120,120,120,120,120, +763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763, +763,763,763,763,763,763,764,764,764,764,764,764,764,764,764,764, +764,765,765,765,765,766,766,766,766,766,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 164 */ -754,755,754,756,756,756,756,756,756,756,756,756,756,756,756,756, -756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756, -756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756, -756,756,756,756,756,756,756,756,755,755,755,755,755,755,755,755, -755,755,755,755,755,755,755,757,757,757,757,757,757,757,119,119, -119,119,758,758,758,758,758,758,758,758,758,758,758,758,758,758, -758,758,758,758,758,758,759,759,759,759,759,759,759,759,759,759, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,755, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +767,767,767,767,767,767,767,767,767,767,767,767,767,767,767,767, +767,767,767,767,767,767,767,120,120,120,120,120,120,120,120,120, /* block 165 */ -760,760,761,762,762,762,762,762,762,762,762,762,762,762,762,762, -762,762,762,762,762,762,762,762,762,762,762,762,762,762,762,762, -762,762,762,762,762,762,762,762,762,762,762,762,762,762,762,762, -761,761,761,760,760,760,760,761,761,760,760,763,763,764,763,763, -763,763,119,119,119,119,119,119,119,119,119,119,119,764,119,119, -765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,765, -765,765,765,765,765,765,765,765,765,119,119,119,119,119,119,119, -766,766,766,766,766,766,766,766,766,766,119,119,119,119,119,119, +768,769,768,770,770,770,770,770,770,770,770,770,770,770,770,770, +770,770,770,770,770,770,770,770,770,770,770,770,770,770,770,770, +770,770,770,770,770,770,770,770,770,770,770,770,770,770,770,770, +770,770,770,770,770,770,770,770,769,769,769,769,769,769,769,769, +769,769,769,769,769,769,769,771,771,771,771,771,771,771,120,120, +120,120,772,772,772,772,772,772,772,772,772,772,772,772,772,772, +772,772,772,772,772,772,773,773,773,773,773,773,773,773,773,773, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,769, /* block 166 */ -767,767,767,768,768,768,768,768,768,768,768,768,768,768,768,768, -768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,768, -768,768,768,768,768,768,768,767,767,767,767,767,769,767,767,767, -767,767,767,767,767,119,770,770,770,770,770,770,770,770,770,770, -771,771,771,771,768,769,769,119,119,119,119,119,119,119,119,119, -772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772, -772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772, -772,772,772,773,774,774,772,119,119,119,119,119,119,119,119,119, +774,774,775,776,776,776,776,776,776,776,776,776,776,776,776,776, +776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776, +776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776, +775,775,775,774,774,774,774,775,775,774,774,777,777,778,777,777, +777,777,120,120,120,120,120,120,120,120,120,120,120,778,120,120, +779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779, +779,779,779,779,779,779,779,779,779,120,120,120,120,120,120,120, +780,780,780,780,780,780,780,780,780,780,120,120,120,120,120,120, /* block 167 */ -775,775,776,777,777,777,777,777,777,777,777,777,777,777,777,777, -777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,777, -777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,777, -777,777,777,776,776,776,775,775,775,775,775,775,775,775,775,776, -776,777,778,778,777,779,779,779,779,775,775,775,775,779,119,119, -780,780,780,780,780,780,780,780,780,780,777,779,777,779,779,779, -119,781,781,781,781,781,781,781,781,781,781,781,781,781,781,781, -781,781,781,781,781,119,119,119,119,119,119,119,119,119,119,119, +781,781,781,782,782,782,782,782,782,782,782,782,782,782,782,782, +782,782,782,782,782,782,782,782,782,782,782,782,782,782,782,782, +782,782,782,782,782,782,782,781,781,781,781,781,783,781,781,781, +781,781,781,781,781,120,784,784,784,784,784,784,784,784,784,784, +785,785,785,785,782,783,783,120,120,120,120,120,120,120,120,120, +786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,786, +786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,786, +786,786,786,787,788,788,786,120,120,120,120,120,120,120,120,120, /* block 168 */ -782,782,782,782,782,782,782,782,782,782,782,782,782,782,782,782, -782,782,119,782,782,782,782,782,782,782,782,782,782,782,782,782, -782,782,782,782,782,782,782,782,782,782,782,782,783,783,783,784, -784,784,783,783,784,783,784,784,785,785,785,785,785,785,784,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +789,789,790,791,791,791,791,791,791,791,791,791,791,791,791,791, +791,791,791,791,791,791,791,791,791,791,791,791,791,791,791,791, +791,791,791,791,791,791,791,791,791,791,791,791,791,791,791,791, +791,791,791,790,790,790,789,789,789,789,789,789,789,789,789,790, +790,791,792,792,791,793,793,793,793,789,789,789,789,793,120,120, +794,794,794,794,794,794,794,794,794,794,791,793,791,793,793,793, +120,795,795,795,795,795,795,795,795,795,795,795,795,795,795,795, +795,795,795,795,795,120,120,120,120,120,120,120,120,120,120,120, /* block 169 */ -786,786,786,786,786,786,786,119,786,119,786,786,786,786,119,786, -786,786,786,786,786,786,786,786,786,786,786,786,786,786,119,786, -786,786,786,786,786,786,786,786,786,787,119,119,119,119,119,119, -788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788, -788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788, -788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,789, -790,790,790,789,789,789,789,789,789,789,789,119,119,119,119,119, -791,791,791,791,791,791,791,791,791,791,119,119,119,119,119,119, +796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796, +796,796,120,796,796,796,796,796,796,796,796,796,796,796,796,796, +796,796,796,796,796,796,796,796,796,796,796,796,797,797,797,798, +798,798,797,797,798,797,798,798,799,799,799,799,799,799,798,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 170 */ -792,793,794,795,119,796,796,796,796,796,796,796,796,119,119,796, -796,119,119,796,796,796,796,796,796,796,796,796,796,796,796,796, -796,796,796,796,796,796,796,796,796,119,796,796,796,796,796,796, -796,119,796,796,119,796,796,796,796,796,119,797,793,796,798,794, -792,794,794,794,794,119,119,794,794,119,119,794,794,794,119,119, -796,119,119,119,119,119,119,798,119,119,119,119,119,796,796,796, -796,796,794,794,119,119,792,792,792,792,792,792,792,119,119,119, -792,792,792,792,792,119,119,119,119,119,119,119,119,119,119,119, +800,800,800,800,800,800,800,120,800,120,800,800,800,800,120,800, +800,800,800,800,800,800,800,800,800,800,800,800,800,800,120,800, +800,800,800,800,800,800,800,800,800,801,120,120,120,120,120,120, +802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,802, +802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,802, +802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,803, +804,804,804,803,803,803,803,803,803,803,803,120,120,120,120,120, +805,805,805,805,805,805,805,805,805,805,120,120,120,120,120,120, /* block 171 */ -799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799, -799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799, -799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799, -799,799,799,799,799,800,800,800,801,801,801,801,801,801,801,801, -800,800,801,801,801,800,801,799,799,799,799,802,802,802,802,802, -803,803,803,803,803,803,803,803,803,803,119,802,119,802,801,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +806,807,808,809,120,810,810,810,810,810,810,810,810,120,120,810, +810,120,120,810,810,810,810,810,810,810,810,810,810,810,810,810, +810,810,810,810,810,810,810,810,810,120,810,810,810,810,810,810, +810,120,810,810,120,810,810,810,810,810,120,811,807,810,812,808, +806,808,808,808,808,120,120,808,808,120,120,808,808,808,120,120, +810,120,120,120,120,120,120,812,120,120,120,120,120,810,810,810, +810,810,808,808,120,120,806,806,806,806,806,806,806,120,120,120, +806,806,806,806,806,120,120,120,120,120,120,120,120,120,120,120, /* block 172 */ -804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804, -804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804, -804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804, -805,806,806,807,807,807,807,807,807,806,807,806,806,805,806,807, -807,806,807,807,804,804,808,804,119,119,119,119,119,119,119,119, -809,809,809,809,809,809,809,809,809,809,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +813,813,813,813,813,813,813,813,813,813,813,813,813,813,813,813, +813,813,813,813,813,813,813,813,813,813,813,813,813,813,813,813, +813,813,813,813,813,813,813,813,813,813,813,813,813,813,813,813, +813,813,813,813,813,814,814,814,815,815,815,815,815,815,815,815, +814,814,815,815,815,814,815,813,813,813,813,816,816,816,816,816, +817,817,817,817,817,817,817,817,817,817,120,816,120,816,815,813, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 173 */ -810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,810, -810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,810, -810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,811, -812,812,813,813,813,813,119,119,812,812,812,812,813,813,812,813, -813,814,814,814,814,814,814,814,814,814,814,814,814,814,814,814, -814,814,814,814,814,814,814,814,810,810,810,810,813,813,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +818,818,818,818,818,818,818,818,818,818,818,818,818,818,818,818, +818,818,818,818,818,818,818,818,818,818,818,818,818,818,818,818, +818,818,818,818,818,818,818,818,818,818,818,818,818,818,818,818, +819,820,820,821,821,821,821,821,821,820,821,820,820,819,820,821, +821,820,821,821,818,818,822,818,120,120,120,120,120,120,120,120, +823,823,823,823,823,823,823,823,823,823,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 174 */ -815,815,815,815,815,815,815,815,815,815,815,815,815,815,815,815, -815,815,815,815,815,815,815,815,815,815,815,815,815,815,815,815, -815,815,815,815,815,815,815,815,815,815,815,815,815,815,815,815, -816,816,816,817,817,817,817,817,817,817,817,816,816,817,816,817, -817,818,818,818,815,119,119,119,119,119,119,119,119,119,119,119, -819,819,819,819,819,819,819,819,819,819,119,119,119,119,119,119, -392,392,392,392,392,392,392,392,392,392,392,392,392,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824, +824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824, +824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,825, +826,826,827,827,827,827,120,120,826,826,826,826,827,827,826,827, +827,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828, +828,828,828,828,828,828,828,828,824,824,824,824,827,827,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 175 */ -820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820, -820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820, -820,820,820,820,820,820,820,820,820,820,820,821,822,821,822,822, -821,821,821,821,821,821,822,821,119,119,119,119,119,119,119,119, -823,823,823,823,823,823,823,823,823,823,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829, +829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829, +829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829, +830,830,830,831,831,831,831,831,831,831,831,830,830,831,830,831, +831,832,832,832,829,120,120,120,120,120,120,120,120,120,120,120, +833,833,833,833,833,833,833,833,833,833,120,120,120,120,120,120, +395,395,395,395,395,395,395,395,395,395,395,395,395,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 176 */ -824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824, -824,824,824,824,824,824,824,824,824,824,824,119,119,825,825,825, -826,826,825,825,825,825,826,825,825,825,825,825,119,119,119,119, -827,827,827,827,827,827,827,827,827,827,828,828,829,829,829,830, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +834,834,834,834,834,834,834,834,834,834,834,834,834,834,834,834, +834,834,834,834,834,834,834,834,834,834,834,834,834,834,834,834, +834,834,834,834,834,834,834,834,834,834,834,835,836,835,836,836, +835,835,835,835,835,835,836,835,834,120,120,120,120,120,120,120, +837,837,837,837,837,837,837,837,837,837,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 177 */ -831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831, -831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831, -831,831,831,831,831,831,831,831,831,831,831,831,832,832,832,833, -833,833,833,833,833,833,833,833,832,833,833,834,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,120,120,839,839,839, +840,840,839,839,839,839,840,839,839,839,839,839,120,120,120,120, +841,841,841,841,841,841,841,841,841,841,842,842,843,843,843,844, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 178 */ -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -835,835,835,835,835,835,835,835,835,835,835,835,835,835,835,835, -835,835,835,835,835,835,835,835,835,835,835,835,835,835,835,835, -836,836,836,836,836,836,836,836,836,836,836,836,836,836,836,836, -836,836,836,836,836,836,836,836,836,836,836,836,836,836,836,836, -837,837,837,837,837,837,837,837,837,837,838,838,838,838,838,838, -838,838,838,119,119,119,119,119,119,119,119,119,119,119,119,839, - -/* block 179 */ -840,841,841,841,841,841,841,841,841,841,841,840,840,840,840,840, -840,840,840,840,840,840,840,840,840,840,840,840,840,840,840,840, -840,840,840,840,840,840,840,840,840,840,840,840,840,840,840,840, -840,840,840,841,841,841,841,841,841,842,843,841,841,841,841,844, -844,844,844,844,844,844,844,841,119,119,119,119,119,119,119,119, -845,846,846,846,846,846,846,847,847,846,846,846,845,845,845,845, 845,845,845,845,845,845,845,845,845,845,845,845,845,845,845,845, 845,845,845,845,845,845,845,845,845,845,845,845,845,845,845,845, +845,845,845,845,845,845,845,845,845,845,845,845,846,846,846,847, +847,847,847,847,847,847,847,847,846,847,847,848,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -/* block 180 */ -845,845,845,845,119,119,848,848,848,848,846,846,846,846,846,846, -846,846,846,846,846,846,846,847,846,846,849,849,849,845,849,849, -849,849,849,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850, +/* block 179 */ +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849, +849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849, 850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850, 850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850, -850,850,850,850,850,850,850,850,850,119,119,119,119,119,119,119, +851,851,851,851,851,851,851,851,851,851,852,852,852,852,852,852, +852,852,852,120,120,120,120,120,120,120,120,120,120,120,120,853, + +/* block 180 */ +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +854,854,854,854,854,854,854,854,120,120,854,854,854,854,854,854, +854,854,854,854,854,854,854,854,854,854,854,854,854,854,854,854, +854,854,854,854,854,854,854,854,854,854,854,854,854,854,854,854, +854,855,855,855,856,856,856,856,120,120,856,856,855,855,855,855, +856,854,857,854,855,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 181 */ -851,851,851,851,851,851,851,851,851,119,851,851,851,851,851,851, -851,851,851,851,851,851,851,851,851,851,851,851,851,851,851,851, -851,851,851,851,851,851,851,851,851,851,851,851,851,851,851,852, -853,853,853,853,853,853,853,119,853,853,853,853,853,853,852,853, -851,854,854,854,854,854,119,119,119,119,119,119,119,119,119,119, -855,855,855,855,855,855,855,855,855,855,856,856,856,856,856,856, -856,856,856,856,856,856,856,856,856,856,856,856,856,119,119,119, -857,857,858,858,858,858,858,858,858,858,858,858,858,858,858,858, +858,859,859,859,859,859,859,859,859,859,859,858,858,858,858,858, +858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858, +858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858, +858,858,858,859,859,859,859,859,859,860,861,859,859,859,859,862, +862,862,862,862,862,862,862,859,120,120,120,120,120,120,120,120, +863,864,864,864,864,864,864,865,865,864,864,864,863,863,863,863, +863,863,863,863,863,863,863,863,863,863,863,863,863,863,863,863, +863,863,863,863,863,863,863,863,863,863,863,863,863,863,863,863, /* block 182 */ -858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858, -119,119,859,859,859,859,859,859,859,859,859,859,859,859,859,859, -859,859,859,859,859,859,859,859,119,860,859,859,859,859,859,859, -859,860,859,859,860,859,859,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +863,863,863,863,866,866,866,866,866,866,864,864,864,864,864,864, +864,864,864,864,864,864,864,865,864,864,867,867,867,863,867,867, +867,867,867,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +868,868,868,868,868,868,868,868,868,868,868,868,868,868,868,868, +868,868,868,868,868,868,868,868,868,868,868,868,868,868,868,868, +868,868,868,868,868,868,868,868,868,868,868,868,868,868,868,868, +868,868,868,868,868,868,868,868,868,120,120,120,120,120,120,120, /* block 183 */ -861,861,861,861,861,861,861,119,861,861,119,861,861,861,861,861, -861,861,861,861,861,861,861,861,861,861,861,861,861,861,861,861, -861,861,861,861,861,861,861,861,861,861,861,861,861,861,861,861, -861,862,862,862,862,862,862,119,119,119,862,119,862,862,119,862, -862,862,862,862,862,862,863,862,119,119,119,119,119,119,119,119, -864,864,864,864,864,864,864,864,864,864,119,119,119,119,119,119, -865,865,865,865,865,865,119,865,865,119,865,865,865,865,865,865, -865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865, +869,869,869,869,869,869,869,869,869,120,869,869,869,869,869,869, +869,869,869,869,869,869,869,869,869,869,869,869,869,869,869,869, +869,869,869,869,869,869,869,869,869,869,869,869,869,869,869,870, +871,871,871,871,871,871,871,120,871,871,871,871,871,871,870,871, +869,872,872,872,872,872,120,120,120,120,120,120,120,120,120,120, +873,873,873,873,873,873,873,873,873,873,874,874,874,874,874,874, +874,874,874,874,874,874,874,874,874,874,874,874,874,120,120,120, +875,875,876,876,876,876,876,876,876,876,876,876,876,876,876,876, /* block 184 */ -865,865,865,865,865,865,865,865,865,865,866,866,866,866,866,119, -867,867,119,866,866,867,866,867,865,119,119,119,119,119,119,119, -868,868,868,868,868,868,868,868,868,868,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +876,876,876,876,876,876,876,876,876,876,876,876,876,876,876,876, +120,120,877,877,877,877,877,877,877,877,877,877,877,877,877,877, +877,877,877,877,877,877,877,877,120,878,877,877,877,877,877,877, +877,878,877,877,878,877,877,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 185 */ -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -869,869,869,869,869,869,869,869,869,869,869,869,869,869,869,869, -869,869,869,870,870,871,871,872,872,119,119,119,119,119,119,119, +879,879,879,879,879,879,879,120,879,879,120,879,879,879,879,879, +879,879,879,879,879,879,879,879,879,879,879,879,879,879,879,879, +879,879,879,879,879,879,879,879,879,879,879,879,879,879,879,879, +879,880,880,880,880,880,880,120,120,120,880,120,880,880,120,880, +880,880,880,880,880,880,881,880,120,120,120,120,120,120,120,120, +882,882,882,882,882,882,882,882,882,882,120,120,120,120,120,120, +883,883,883,883,883,883,120,883,883,120,883,883,883,883,883,883, +883,883,883,883,883,883,883,883,883,883,883,883,883,883,883,883, /* block 186 */ -873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873, -873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873, -873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873, -873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873, -873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873, -873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873, -873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873, -873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873, +883,883,883,883,883,883,883,883,883,883,884,884,884,884,884,120, +885,885,120,884,884,885,884,885,883,120,120,120,120,120,120,120, +886,886,886,886,886,886,886,886,886,886,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 187 */ -873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873, -873,873,873,873,873,873,873,873,873,873,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +887,887,887,887,887,887,887,887,887,887,887,887,887,887,887,887, +887,887,887,888,888,889,889,890,890,120,120,120,120,120,120,120, /* block 188 */ -874,874,874,874,874,874,874,874,874,874,874,874,874,874,874,874, -874,874,874,874,874,874,874,874,874,874,874,874,874,874,874,874, -874,874,874,874,874,874,874,874,874,874,874,874,874,874,874,874, -874,874,874,874,874,874,874,874,874,874,874,874,874,874,874,874, -874,874,874,874,874,874,874,874,874,874,874,874,874,874,874,874, -874,874,874,874,874,874,874,874,874,874,874,874,874,874,874,874, -874,874,874,874,874,874,874,874,874,874,874,874,874,874,874,119, -875,875,875,875,875,119,119,119,119,119,119,119,119,119,119,119, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +891,891,891,891,891,891,891,891,891,891,891,891,891,891,891,891, +294,294,891,294,891,296,296,296,296,296,296,296,296,297,297,297, +297,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296, +296,296,120,120,120,120,120,120,120,120,120,120,120,120,120,892, /* block 189 */ -873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873, -873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873, -873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873, -873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873, -873,873,873,873,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +893,893,893,893,893,893,893,893,893,893,893,893,893,893,893,893, +893,893,893,893,893,893,893,893,893,893,893,893,893,893,893,893, +893,893,893,893,893,893,893,893,893,893,893,893,893,893,893,893, +893,893,893,893,893,893,893,893,893,893,893,893,893,893,893,893, +893,893,893,893,893,893,893,893,893,893,893,893,893,893,893,893, +893,893,893,893,893,893,893,893,893,893,893,893,893,893,893,893, +893,893,893,893,893,893,893,893,893,893,893,893,893,893,893,893, +893,893,893,893,893,893,893,893,893,893,893,893,893,893,893,893, /* block 190 */ -876,876,876,876,876,876,876,876,876,876,876,876,876,876,876,876, -876,876,876,876,876,876,876,876,876,876,876,876,876,876,876,876, -876,876,876,876,876,876,876,876,876,876,876,876,876,876,876,876, -876,876,876,876,876,876,876,876,876,876,876,876,876,876,876,876, -876,876,876,876,876,876,876,876,876,876,876,876,876,876,876,876, -876,876,876,876,876,876,876,876,876,876,876,876,876,876,876,876, -876,876,876,876,876,876,876,876,876,876,876,876,876,876,876,876, -876,876,876,876,876,876,876,876,876,876,876,876,876,876,876,876, +893,893,893,893,893,893,893,893,893,893,893,893,893,893,893,893, +893,893,893,893,893,893,893,893,893,893,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 191 */ -876,876,876,876,876,876,876,876,876,876,876,876,876,876,876,876, -876,876,876,876,876,876,876,876,876,876,876,876,876,876,876,876, -876,876,876,876,876,876,876,876,876,876,876,876,876,876,876,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +894,894,894,894,894,894,894,894,894,894,894,894,894,894,894,894, +894,894,894,894,894,894,894,894,894,894,894,894,894,894,894,894, +894,894,894,894,894,894,894,894,894,894,894,894,894,894,894,894, +894,894,894,894,894,894,894,894,894,894,894,894,894,894,894,894, +894,894,894,894,894,894,894,894,894,894,894,894,894,894,894,894, +894,894,894,894,894,894,894,894,894,894,894,894,894,894,894,894, +894,894,894,894,894,894,894,894,894,894,894,894,894,894,894,120, +895,895,895,895,895,120,120,120,120,120,120,120,120,120,120,120, /* block 192 */ -877,877,877,877,877,877,877,877,877,877,877,877,877,877,877,877, -877,877,877,877,877,877,877,877,877,877,877,877,877,877,877,877, -877,877,877,877,877,877,877,877,877,877,877,877,877,877,877,877, -877,877,877,877,877,877,877,877,877,877,877,877,877,877,877,877, -877,877,877,877,877,877,877,877,877,877,877,877,877,877,877,877, -877,877,877,877,877,877,877,877,877,877,877,877,877,877,877,877, -877,877,877,877,877,877,877,877,877,877,877,877,877,877,877,877, -877,877,877,877,877,877,877,877,877,877,877,877,877,877,877,877, +893,893,893,893,893,893,893,893,893,893,893,893,893,893,893,893, +893,893,893,893,893,893,893,893,893,893,893,893,893,893,893,893, +893,893,893,893,893,893,893,893,893,893,893,893,893,893,893,893, +893,893,893,893,893,893,893,893,893,893,893,893,893,893,893,893, +893,893,893,893,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 193 */ -877,877,877,877,877,877,877,877,877,877,877,877,877,877,877,877, -877,877,877,877,877,877,877,877,877,877,877,877,877,877,877,877, -877,877,877,877,877,877,877,877,877,877,877,877,877,877,877,877, -877,877,877,877,877,877,877,877,877,877,877,877,877,877,877,877, -877,877,877,877,877,877,877,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +896,896,896,896,896,896,896,896,896,896,896,896,896,896,896,896, +896,896,896,896,896,896,896,896,896,896,896,896,896,896,896,896, +896,896,896,896,896,896,896,896,896,896,896,896,896,896,896,896, +896,896,896,896,896,896,896,896,896,896,896,896,896,896,896,896, +896,896,896,896,896,896,896,896,896,896,896,896,896,896,896,896, +896,896,896,896,896,896,896,896,896,896,896,896,896,896,896,896, +896,896,896,896,896,896,896,896,896,896,896,896,896,896,896,896, +896,896,896,896,896,896,896,896,896,896,896,896,896,896,896,896, /* block 194 */ -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, +896,896,896,896,896,896,896,896,896,896,896,896,896,896,896,896, +896,896,896,896,896,896,896,896,896,896,896,896,896,896,896,896, +896,896,896,896,896,896,896,896,896,896,896,896,896,896,896,120, +897,897,897,897,897,897,897,897,897,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 195 */ -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,119,119,119,119,119,119,119, -878,878,878,878,878,878,878,878,878,878,878,878,878,878,878,878, -878,878,878,878,878,878,878,878,878,878,878,878,878,878,878,119, -879,879,879,879,879,879,879,879,879,879,119,119,119,119,880,880, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +898,898,898,898,898,898,898,898,898,898,898,898,898,898,898,898, +898,898,898,898,898,898,898,898,898,898,898,898,898,898,898,898, +898,898,898,898,898,898,898,898,898,898,898,898,898,898,898,898, +898,898,898,898,898,898,898,898,898,898,898,898,898,898,898,898, +898,898,898,898,898,898,898,898,898,898,898,898,898,898,898,898, +898,898,898,898,898,898,898,898,898,898,898,898,898,898,898,898, +898,898,898,898,898,898,898,898,898,898,898,898,898,898,898,898, +898,898,898,898,898,898,898,898,898,898,898,898,898,898,898,898, /* block 196 */ -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -881,881,881,881,881,881,881,881,881,881,881,881,881,881,881,881, -881,881,881,881,881,881,881,881,881,881,881,881,881,881,119,119, -882,882,882,882,882,883,119,119,119,119,119,119,119,119,119,119, +898,898,898,898,898,898,898,898,898,898,898,898,898,898,898,898, +898,898,898,898,898,898,898,898,898,898,898,898,898,898,898,898, +898,898,898,898,898,898,898,898,898,898,898,898,898,898,898,898, +898,898,898,898,898,898,898,898,898,898,898,898,898,898,898,898, +898,898,898,898,898,898,898,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 197 */ -884,884,884,884,884,884,884,884,884,884,884,884,884,884,884,884, -884,884,884,884,884,884,884,884,884,884,884,884,884,884,884,884, -884,884,884,884,884,884,884,884,884,884,884,884,884,884,884,884, -885,885,885,885,885,885,885,886,886,886,886,886,887,887,887,887, -888,888,888,888,886,887,119,119,119,119,119,119,119,119,119,119, -889,889,889,889,889,889,889,889,889,889,119,890,890,890,890,890, -890,890,119,884,884,884,884,884,884,884,884,884,884,884,884,884, -884,884,884,884,884,884,884,884,119,119,119,119,119,884,884,884, +601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601, +601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601, +601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601, +601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601, +601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601, +601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601, +601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601, +601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601, /* block 198 */ -884,884,884,884,884,884,884,884,884,884,884,884,884,884,884,884, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601, +601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601, +601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601, +601,601,601,601,601,601,601,601,601,120,120,120,120,120,120,120, +899,899,899,899,899,899,899,899,899,899,899,899,899,899,899,899, +899,899,899,899,899,899,899,899,899,899,899,899,899,899,899,120, +900,900,900,900,900,900,900,900,900,900,120,120,120,120,901,901, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 199 */ -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -891,891,891,891,891,891,891,891,891,891,891,891,891,891,891,891, -891,891,891,891,891,891,891,891,891,891,891,891,891,891,891,891, -892,892,892,892,892,892,892,892,892,892,892,892,892,892,892,892, -892,892,892,892,892,892,892,892,892,892,892,892,892,892,892,892, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +902,902,902,902,902,902,902,902,902,902,902,902,902,902,902,902, +902,902,902,902,902,902,902,902,902,902,902,902,902,902,120,120, +903,903,903,903,903,904,120,120,120,120,120,120,120,120,120,120, /* block 200 */ -893,893,893,893,893,893,893,893,893,893,893,893,893,893,893,893, -893,893,893,893,893,893,893,894,894,894,894,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +905,905,905,905,905,905,905,905,905,905,905,905,905,905,905,905, +905,905,905,905,905,905,905,905,905,905,905,905,905,905,905,905, +905,905,905,905,905,905,905,905,905,905,905,905,905,905,905,905, +906,906,906,906,906,906,906,907,907,907,907,907,908,908,908,908, +909,909,909,909,907,908,120,120,120,120,120,120,120,120,120,120, +910,910,910,910,910,910,910,910,910,910,120,911,911,911,911,911, +911,911,120,905,905,905,905,905,905,905,905,905,905,905,905,905, +905,905,905,905,905,905,905,905,120,120,120,120,120,905,905,905, /* block 201 */ -895,895,895,895,895,895,895,895,895,895,895,895,895,895,895,895, -895,895,895,895,895,895,895,895,895,895,895,895,895,895,895,895, -895,895,895,895,895,895,895,895,895,895,895,895,895,895,895,895, -895,895,895,895,895,895,895,895,895,895,895,895,895,895,895,895, -895,895,895,895,895,119,119,119,119,119,119,119,119,119,119,119, -895,896,896,896,896,896,896,896,896,896,896,896,896,896,896,896, -896,896,896,896,896,896,896,896,896,896,896,896,896,896,896,896, -896,896,896,896,896,896,896,896,896,896,896,896,896,896,896,119, +905,905,905,905,905,905,905,905,905,905,905,905,905,905,905,905, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 202 */ -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,897, -897,897,897,898,898,898,898,898,898,898,898,898,898,898,898,898, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -899,900,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +912,912,912,912,912,912,912,912,912,912,912,912,912,912,912,912, +912,912,912,912,912,912,912,912,912,912,912,912,912,912,912,912, +913,913,913,913,913,913,913,913,913,913,913,913,913,913,913,913, +913,913,913,913,913,913,913,913,913,913,913,913,913,913,913,913, /* block 203 */ -901,901,901,901,901,901,901,901,901,901,901,901,901,901,901,901, -901,901,901,901,901,901,901,901,901,901,901,901,901,901,901,901, -901,901,901,901,901,901,901,901,901,901,901,901,901,901,901,901, -901,901,901,901,901,901,901,901,901,901,901,901,901,901,901,901, -901,901,901,901,901,901,901,901,901,901,901,901,901,901,901,901, -901,901,901,901,901,901,901,901,901,901,901,901,901,901,901,901, -901,901,901,901,901,901,901,901,901,901,901,901,901,901,901,901, -901,901,901,901,901,901,901,901,901,901,901,901,901,901,901,901, +914,914,914,914,914,914,914,914,914,914,914,914,914,914,914,914, +914,914,914,914,914,914,914,915,915,915,915,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 204 */ -901,901,901,901,901,901,901,901,901,901,901,901,901,901,901,901, -901,901,901,901,901,901,901,901,901,901,901,901,901,901,901,901, -901,901,901,901,901,901,901,901,901,901,901,901,901,901,901,901, -901,901,901,901,901,901,901,901,901,901,901,901,901,901,901,901, -901,901,901,901,901,901,901,901,901,901,901,901,901,901,901,901, -901,901,901,901,901,901,901,901,901,901,901,901,901,901,901,901, -901,901,901,901,901,901,901,901,901,901,901,901,901,901,901,901, -901,901,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +916,916,916,916,916,916,916,916,916,916,916,916,916,916,916,916, +916,916,916,916,916,916,916,916,916,916,916,916,916,916,916,916, +916,916,916,916,916,916,916,916,916,916,916,916,916,916,916,916, +916,916,916,916,916,916,916,916,916,916,916,916,916,916,916,916, +916,916,916,916,916,916,916,916,916,916,916,120,120,120,120,917, +916,918,918,918,918,918,918,918,918,918,918,918,918,918,918,918, +918,918,918,918,918,918,918,918,918,918,918,918,918,918,918,918, +918,918,918,918,918,918,918,918,918,918,918,918,918,918,918,918, /* block 205 */ -901,901,901,901,901,901,901,901,901,901,901,901,901,901,901,901, -901,901,901,901,901,901,901,901,901,901,901,901,901,901,901,901, -901,901,901,901,901,901,901,901,901,901,901,901,901,901,901,901, -901,901,901,901,901,901,901,901,901,901,901,901,901,901,901,901, -901,901,901,901,901,901,901,901,901,901,901,901,901,901,901,901, -901,901,901,901,901,901,901,901,901,901,901,901,901,901,901,901, -901,901,901,901,901,901,901,901,901,901,901,901,901,901,901,901, -901,901,901,119,119,119,119,119,119,119,119,119,119,119,119,119, +918,918,918,918,918,918,918,918,120,120,120,120,120,120,120,917, +917,917,917,919,919,919,919,919,919,919,919,919,919,919,919,919, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +920,921, 5,111,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 206 */ -569,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564, -564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564, -564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564, -564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564, -564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564, -564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564, -564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564, -564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564, +922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, +922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, +922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, +922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, +922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, +922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, +922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, +922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, /* block 207 */ -564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564, -564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564, -564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564, -564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564, -564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564, -564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564, -564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564, -564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564, +922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, +922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, +922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, +922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, +922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, +922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, +922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, +922,922,922,922,922,922,922,922,120,120,120,120,120,120,120,120, /* block 208 */ -564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564, -564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -902,902,902,902,902,902,902,902,902,902,902,902,902,902,902,902, +922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, +922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, +922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, +922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, +922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, +922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, +922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, +922,922,922,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 209 */ -902,902,902,902,902,902,902,902,902,902,902,902,902,902,902,902, -902,902,902,902,902,902,902,902,902,902,902,902,902,902,902,902, -902,902,902,902,902,902,902,902,902,902,902,902,902,902,902,902, -902,902,902,902,902,902,902,902,902,902,902,902,902,902,902,902, -902,902,902,902,902,902,902,902,902,902,902,902,902,902,902,902, -902,902,902,902,902,902,902,902,902,902,902,902,902,902,902,902, -902,902,902,902,902,902,902,902,902,902,902,902,902,902,902,902, -902,902,902,902,902,902,902,902,902,902,902,902,902,902,902,902, +578,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573, +573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573, +573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573, +573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573, +573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573, +573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573, +573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573, +573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573, /* block 210 */ -902,902,902,902,902,902,902,902,902,902,902,902,902,902,902,902, -902,902,902,902,902,902,902,902,902,902,902,902,902,902,902,902, -902,902,902,902,902,902,902,902,902,902,902,902,902,902,902,902, -902,902,902,902,902,902,902,902,902,902,902,902,902,902,902,902, -902,902,902,902,902,902,902,902,902,902,902,902,902,902,902,902, -902,902,902,902,902,902,902,902,902,902,902,902,902,902,902,902, -902,902,902,902,902,902,902,902,902,902,902,902,902,902,902,902, -902,902,902,902,902,902,902,902,902,902,902,902,119,119,119,119, +573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573, +573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573, +573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573, +573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573, +573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573, +573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573, +573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573, +573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573, /* block 211 */ -903,903,903,903,903,903,903,903,903,903,903,903,903,903,903,903, -903,903,903,903,903,903,903,903,903,903,903,903,903,903,903,903, -903,903,903,903,903,903,903,903,903,903,903,903,903,903,903,903, -903,903,903,903,903,903,903,903,903,903,903,903,903,903,903,903, -903,903,903,903,903,903,903,903,903,903,903,903,903,903,903,903, -903,903,903,903,903,903,903,903,903,903,903,903,903,903,903,903, -903,903,903,903,903,903,903,903,903,903,903,119,119,119,119,119, -903,903,903,903,903,903,903,903,903,903,903,903,903,119,119,119, +573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573, +573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +573,573,573,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,578,578,578,578,120,120,120,120,120,120,120,120, +923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, /* block 212 */ -903,903,903,903,903,903,903,903,903,119,119,119,119,119,119,119, -903,903,903,903,903,903,903,903,903,903,119,119,904,905,905,906, -907,907,907,907,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, +923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, +923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, +923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, +923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, +923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, +923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, +923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, /* block 213 */ +923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, +923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, +923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, +923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, +923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, +923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, +923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, +923,923,923,923,923,923,923,923,923,923,923,923,120,120,120,120, + +/* block 214 */ +924,924,924,924,924,924,924,924,924,924,924,924,924,924,924,924, +924,924,924,924,924,924,924,924,924,924,924,924,924,924,924,924, +924,924,924,924,924,924,924,924,924,924,924,924,924,924,924,924, +924,924,924,924,924,924,924,924,924,924,924,924,924,924,924,924, +924,924,924,924,924,924,924,924,924,924,924,924,924,924,924,924, +924,924,924,924,924,924,924,924,924,924,924,924,924,924,924,924, +924,924,924,924,924,924,924,924,924,924,924,120,120,120,120,120, +924,924,924,924,924,924,924,924,924,924,924,924,924,120,120,120, + +/* block 215 */ +924,924,924,924,924,924,924,924,924,120,120,120,120,120,120,120, +924,924,924,924,924,924,924,924,924,924,120,120,925,926,926,927, +928,928,928,928,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, + +/* block 216 */ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, @@ -3802,309 +3867,339 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 68608 bytes, block = 128 */ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20,119,119,119,119,119,119,119,119,119,119, + 20, 20, 20, 20, 20, 20,120,120,120,120,120,120,120,120,120,120, -/* block 214 */ +/* block 217 */ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20,119,119, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20,120,120, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20,908,909,112,112,112, 20, 20, 20,909,908,908, -908,908,908, 24, 24, 24, 24, 24, 24, 24, 24,112,112,112,112,112, + 20, 20, 20, 20, 20,929,930,113,113,113, 20, 20, 20,930,929,929, +929,929,929, 24, 24, 24, 24, 24, 24, 24, 24,113,113,113,113,113, -/* block 215 */ -112,112,112, 20, 20,112,112,112,112,112,112,112, 20, 20, 20, 20, +/* block 218 */ +113,113,113, 20, 20,113,113,113,113,113,113,113, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,112,112,112,112, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,113,113,113,113, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, + 20, 20, 20, 20, 20, 20, 20, 20, 20,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -/* block 216 */ -671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671, -671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671, -671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671, -671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671, -671,671,910,910,910,671,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +/* block 219 */ +684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684, +684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684, +684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684, +684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684, +684,684,931,931,931,684,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -/* block 217 */ -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +/* block 220 */ +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25,119,119,119,119,119,119,119,119,119,119,119,119, + 25, 25, 25, 25,120,120,120,120,120,120,120,120,120,120,120,120, -/* block 218 */ +/* block 221 */ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20,119,119,119,119,119,119,119,119,119, -573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573, -573,573, 25, 25, 25, 25, 25, 25, 25,119,119,119,119,119,119,119, - -/* block 219 */ -504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504, -504,504,504,504,504,504,504,504,504,504,505,505,505,505,505,505, -505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505, -505,505,505,505,504,504,504,504,504,504,504,504,504,504,504,504, -504,504,504,504,504,504,504,504,504,504,504,504,504,504,505,505, -505,505,505,505,505,119,505,505,505,505,505,505,505,505,505,505, -505,505,505,505,505,505,505,505,504,504,504,504,504,504,504,504, -504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504, - -/* block 220 */ -504,504,505,505,505,505,505,505,505,505,505,505,505,505,505,505, -505,505,505,505,505,505,505,505,505,505,505,505,504,119,504,504, -119,119,504,119,119,504,504,119,119,504,504,504,504,119,504,504, -504,504,504,504,504,504,505,505,505,505,119,505,119,505,505,505, -505,505,505,505,119,505,505,505,505,505,505,505,505,505,505,505, -504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504, -504,504,504,504,504,504,504,504,504,504,505,505,505,505,505,505, -505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505, - -/* block 221 */ -505,505,505,505,504,504,119,504,504,504,504,119,119,504,504,504, -504,504,504,504,504,119,504,504,504,504,504,504,504,119,505,505, -505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505, -505,505,505,505,505,505,505,505,504,504,119,504,504,504,504,119, -504,504,504,504,504,119,504,119,119,119,504,504,504,504,504,504, -504,119,505,505,505,505,505,505,505,505,505,505,505,505,505,505, -505,505,505,505,505,505,505,505,505,505,505,505,504,504,504,504, -504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504, + 20, 20, 20, 20, 20, 20, 20,120,120,120,120,120,120,120,120,120, +582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582, +582,582, 25, 25, 25, 25, 25, 25, 25,120,120,120,120,120,120,120, /* block 222 */ -504,504,504,504,504,504,505,505,505,505,505,505,505,505,505,505, -505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505, -504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504, -504,504,504,504,504,504,504,504,504,504,505,505,505,505,505,505, -505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505, -505,505,505,505,504,504,504,504,504,504,504,504,504,504,504,504, -504,504,504,504,504,504,504,504,504,504,504,504,504,504,505,505, -505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505, +513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513, +513,513,513,513,513,513,513,513,513,513,514,514,514,514,514,514, +514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514, +514,514,514,514,513,513,513,513,513,513,513,513,513,513,513,513, +513,513,513,513,513,513,513,513,513,513,513,513,513,513,514,514, +514,514,514,514,514,120,514,514,514,514,514,514,514,514,514,514, +514,514,514,514,514,514,514,514,513,513,513,513,513,513,513,513, +513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513, /* block 223 */ -505,505,505,505,505,505,505,505,504,504,504,504,504,504,504,504, -504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504, -504,504,505,505,505,505,505,505,505,505,505,505,505,505,505,505, -505,505,505,505,505,505,505,505,505,505,505,505,504,504,504,504, -504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504, -504,504,504,504,504,504,505,505,505,505,505,505,505,505,505,505, -505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505, -504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504, +513,513,514,514,514,514,514,514,514,514,514,514,514,514,514,514, +514,514,514,514,514,514,514,514,514,514,514,514,513,120,513,513, +120,120,513,120,120,513,513,120,120,513,513,513,513,120,513,513, +513,513,513,513,513,513,514,514,514,514,120,514,120,514,514,514, +514,514,514,514,120,514,514,514,514,514,514,514,514,514,514,514, +513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513, +513,513,513,513,513,513,513,513,513,513,514,514,514,514,514,514, +514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514, /* block 224 */ -504,504,504,504,504,504,504,504,504,504,505,505,505,505,505,505, -505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505, -505,505,505,505,505,505,119,119,504,504,504,504,504,504,504,504, -504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504, -504, 9,505,505,505,505,505,505,505,505,505,505,505,505,505,505, -505,505,505,505,505,505,505,505,505,505,505, 9,505,505,505,505, -505,505,504,504,504,504,504,504,504,504,504,504,504,504,504,504, -504,504,504,504,504,504,504,504,504,504,504, 9,505,505,505,505, +514,514,514,514,513,513,120,513,513,513,513,120,120,513,513,513, +513,513,513,513,513,120,513,513,513,513,513,513,513,120,514,514, +514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514, +514,514,514,514,514,514,514,514,513,513,120,513,513,513,513,120, +513,513,513,513,513,120,513,120,120,120,513,513,513,513,513,513, +513,120,514,514,514,514,514,514,514,514,514,514,514,514,514,514, +514,514,514,514,514,514,514,514,514,514,514,514,513,513,513,513, +513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513, /* block 225 */ -505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505, -505,505,505,505,505, 9,505,505,505,505,505,505,504,504,504,504, -504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504, -504,504,504,504,504, 9,505,505,505,505,505,505,505,505,505,505, -505,505,505,505,505,505,505,505,505,505,505,505,505,505,505, 9, -505,505,505,505,505,505,504,504,504,504,504,504,504,504,504,504, -504,504,504,504,504,504,504,504,504,504,504,504,504,504,504, 9, -505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505, +513,513,513,513,513,513,514,514,514,514,514,514,514,514,514,514, +514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514, +513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513, +513,513,513,513,513,513,513,513,513,513,514,514,514,514,514,514, +514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514, +514,514,514,514,513,513,513,513,513,513,513,513,513,513,513,513, +513,513,513,513,513,513,513,513,513,513,513,513,513,513,514,514, +514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514, /* block 226 */ -505,505,505,505,505,505,505,505,505, 9,505,505,505,505,505,505, -504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504, -504,504,504,504,504,504,504,504,504, 9,505,505,505,505,505,505, -505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505, -505,505,505, 9,505,505,505,505,505,505,504,505,119,119, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, +514,514,514,514,514,514,514,514,513,513,513,513,513,513,513,513, +513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513, +513,513,514,514,514,514,514,514,514,514,514,514,514,514,514,514, +514,514,514,514,514,514,514,514,514,514,514,514,513,513,513,513, +513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513, +513,513,513,513,513,513,514,514,514,514,514,514,514,514,514,514, +514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514, +513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513, /* block 227 */ -911,911,911,911,911,911,911,911,911,911,911,911,911,911,911,911, -911,911,911,911,911,911,911,911,911,911,911,911,911,911,911,911, -911,911,911,911,911,911,911,911,911,911,911,911,911,911,911,911, -911,911,911,911,911,911,911,911,911,911,911,911,911,911,911,911, -911,911,911,911,911,911,911,911,911,911,911,911,911,911,911,911, -911,911,911,911,911,911,911,911,911,911,911,911,911,911,911,911, -911,911,911,911,911,911,911,911,911,911,911,911,911,911,911,911, -911,911,911,911,911,911,911,911,911,911,911,911,911,911,911,911, +513,513,513,513,513,513,513,513,513,513,514,514,514,514,514,514, +514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514, +514,514,514,514,514,514,120,120,513,513,513,513,513,513,513,513, +513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513, +513, 9,514,514,514,514,514,514,514,514,514,514,514,514,514,514, +514,514,514,514,514,514,514,514,514,514,514, 9,514,514,514,514, +514,514,513,513,513,513,513,513,513,513,513,513,513,513,513,513, +513,513,513,513,513,513,513,513,513,513,513, 9,514,514,514,514, /* block 228 */ -912,912,912,912,912,912,912,912,912,912,912,912,912,912,912,912, -912,912,912,912,912,912,912,912,912,912,912,912,912,912,912,912, -912,912,912,912,912,912,912,912,912,912,912,912,912,912,912,912, -912,912,912,912,912,912,912,911,911,911,911,912,912,912,912,912, -912,912,912,912,912,912,912,912,912,912,912,912,912,912,912,912, -912,912,912,912,912,912,912,912,912,912,912,912,912,912,912,912, -912,912,912,912,912,912,912,912,912,912,912,912,912,911,911,911, -911,911,911,911,911,912,911,911,911,911,911,911,911,911,911,911, +514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514, +514,514,514,514,514, 9,514,514,514,514,514,514,513,513,513,513, +513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513, +513,513,513,513,513, 9,514,514,514,514,514,514,514,514,514,514, +514,514,514,514,514,514,514,514,514,514,514,514,514,514,514, 9, +514,514,514,514,514,514,513,513,513,513,513,513,513,513,513,513, +513,513,513,513,513,513,513,513,513,513,513,513,513,513,513, 9, +514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514, /* block 229 */ -911,911,911,911,912,911,911,913,913,913,913,913,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,912,912,912,912,912, -119,912,912,912,912,912,912,912,912,912,912,912,912,912,912,912, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +514,514,514,514,514,514,514,514,514, 9,514,514,514,514,514,514, +513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513, +513,513,513,513,513,513,513,513,513, 9,514,514,514,514,514,514, +514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514, +514,514,514, 9,514,514,514,514,514,514,513,514,120,120, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, /* block 230 */ -914,914,914,914,914,914,914,119,914,914,914,914,914,914,914,914, -914,914,914,914,914,914,914,914,914,119,119,914,914,914,914,914, -914,914,119,914,914,119,914,914,914,914,914,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +932,932,932,932,932,932,932,932,932,932,932,932,932,932,932,932, +932,932,932,932,932,932,932,932,932,932,932,932,932,932,932,932, +932,932,932,932,932,932,932,932,932,932,932,932,932,932,932,932, +932,932,932,932,932,932,932,932,932,932,932,932,932,932,932,932, +932,932,932,932,932,932,932,932,932,932,932,932,932,932,932,932, +932,932,932,932,932,932,932,932,932,932,932,932,932,932,932,932, +932,932,932,932,932,932,932,932,932,932,932,932,932,932,932,932, +932,932,932,932,932,932,932,932,932,932,932,932,932,932,932,932, /* block 231 */ -915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915, -915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915, -915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915, -915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915, -915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915, -915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915, -915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915, -915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915, +933,933,933,933,933,933,933,933,933,933,933,933,933,933,933,933, +933,933,933,933,933,933,933,933,933,933,933,933,933,933,933,933, +933,933,933,933,933,933,933,933,933,933,933,933,933,933,933,933, +933,933,933,933,933,933,933,932,932,932,932,933,933,933,933,933, +933,933,933,933,933,933,933,933,933,933,933,933,933,933,933,933, +933,933,933,933,933,933,933,933,933,933,933,933,933,933,933,933, +933,933,933,933,933,933,933,933,933,933,933,933,933,932,932,932, +932,932,932,932,932,933,932,932,932,932,932,932,932,932,932,932, /* block 232 */ -915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915, -915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915, -915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915, -915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915, -915,915,915,915,915,119,119,916,916,916,916,916,916,916,916,916, -917,917,917,917,917,917,917,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +932,932,932,932,933,932,932,934,934,934,934,934,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,933,933,933,933,933, +120,933,933,933,933,933,933,933,933,933,933,933,933,933,933,933, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 233 */ -918,918,918,918,918,918,918,918,918,918,918,918,918,918,918,918, -918,918,918,918,918,918,918,918,918,918,918,918,918,918,918,918, -918,918,919,919,919,919,919,919,919,919,919,919,919,919,919,919, -919,919,919,919,919,919,919,919,919,919,919,919,919,919,919,919, -919,919,919,919,920,920,920,920,920,920,920,119,119,119,119,119, -921,921,921,921,921,921,921,921,921,921,119,119,119,119,922,922, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +935,935,935,935,935,935,935,120,935,935,935,935,935,935,935,935, +935,935,935,935,935,935,935,935,935,120,120,935,935,935,935,935, +935,935,120,935,935,120,935,935,935,935,935,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 234 */ -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, +936,936,936,936,936,936,936,936,936,936,936,936,936,936,936,936, +936,936,936,936,936,936,936,936,936,936,936,936,936,936,936,936, +936,936,936,936,936,936,936,936,936,936,936,936,936,120,120,120, +937,937,937,937,937,937,937,938,938,938,938,938,938,938,120,120, +939,939,939,939,939,939,939,939,939,939,120,120,120,120,936,940, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 235 */ - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 20, 25, 25, 25, - 6, 25, 25, 25, 25,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +941,941,941,941,941,941,941,941,941,941,941,941,941,941,941,941, +941,941,941,941,941,941,941,941,941,941,941,941,941,941,941,941, +941,941,941,941,941,941,941,941,941,941,941,941,942,942,942,942, +943,943,943,943,943,943,943,943,943,943,120,120,120,120,120,944, /* block 236 */ -224,224,224,224,119,224,224,224,224,224,224,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224, -119,224,224,119,224,119,119,224,119,224,224,224,224,224,224,224, -224,224,224,119,224,224,224,224,119,224,119,224,119,119,119,119, -119,119,224,119,119,119,119,224,119,224,119,224,119,224,224,224, -119,224,224,119,224,119,119,224,119,224,119,224,119,224,119,224, -119,224,224,119,224,119,119,224,224,224,224,119,224,224,224,224, -224,224,224,119,224,224,224,224,119,224,224,224,224,119,224,119, +945,945,945,945,945,945,945,945,945,945,945,945,945,945,945,945, +945,945,945,945,945,945,945,945,945,945,945,945,945,945,945,945, +945,945,945,945,945,945,945,945,945,945,945,945,945,945,945,945, +945,945,945,945,945,945,945,945,945,945,945,945,945,945,945,945, +945,945,945,945,945,945,945,945,945,945,945,945,945,945,945,945, +945,945,945,945,945,945,945,945,945,945,945,945,945,945,945,945, +945,945,945,945,945,945,945,945,945,945,945,945,945,945,945,945, +945,945,945,945,945,945,945,945,945,945,945,945,945,945,945,945, /* block 237 */ -224,224,224,224,224,224,224,224,224,224,119,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,119,119,119,119, -119,224,224,224,119,224,224,224,224,224,119,224,224,224,224,224, -224,224,224,224,224,224,224,224,224,224,224,224,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -217,217,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +945,945,945,945,945,945,945,945,945,945,945,945,945,945,945,945, +945,945,945,945,945,945,945,945,945,945,945,945,945,945,945,945, +945,945,945,945,945,945,945,945,945,945,945,945,945,945,945,945, +945,945,945,945,945,945,945,945,945,945,945,945,945,945,945,945, +945,945,945,945,945,120,120,946,946,946,946,946,946,946,946,946, +947,947,947,947,947,947,947,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 238 */ +948,948,948,948,948,948,948,948,948,948,948,948,948,948,948,948, +948,948,948,948,948,948,948,948,948,948,948,948,948,948,948,948, +948,948,949,949,949,949,949,949,949,949,949,949,949,949,949,949, +949,949,949,949,949,949,949,949,949,949,949,949,949,949,949,949, +949,949,949,949,950,950,950,950,950,950,950,951,120,120,120,120, +952,952,952,952,952,952,952,952,952,952,120,120,120,120,953,953, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, + +/* block 239 */ +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + +/* block 240 */ + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 20, 25, 25, 25, + 6, 25, 25, 25, 25,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, + +/* block 241 */ +120, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 20, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, + +/* block 242 */ +225,225,225,225,120,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +120,225,225,120,225,120,120,225,120,225,225,225,225,225,225,225, +225,225,225,120,225,225,225,225,120,225,120,225,120,120,120,120, +120,120,225,120,120,120,120,225,120,225,120,225,120,225,225,225, +120,225,225,120,225,120,120,225,120,225,120,225,120,225,120,225, +120,225,225,120,225,120,120,225,225,225,225,120,225,225,225,225, +225,225,225,120,225,225,225,225,120,225,225,225,225,120,225,120, + +/* block 243 */ +225,225,225,225,225,225,225,225,225,225,120,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,120,120,120,120, +120,225,225,225,120,225,225,225,225,225,120,225,225,225,225,225, +225,225,225,225,225,225,225,225,225,225,225,225,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +218,218,120,120,120,120,120,120,120,120,120,120,120,120,120,120, + +/* block 244 */ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,923,923,923,923, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,954,954,954,954, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, -/* block 239 */ +/* block 245 */ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21,923,923,923,923,923,923,923,923,923,923,923,923, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,923, -923, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, -923, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, -923, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21,954,954,954,954,954,954,954,954,954,954,954,954, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,954, +954, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, +954, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, +954, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21,923,923,923,923,923,923,923,923,923,923, + 21, 21, 21, 21, 21, 21,954,954,954,954,954,954,954,954,954,954, -/* block 240 */ - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,923,923,923, +/* block 246 */ + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,954,954,954, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,923,923,923,923, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21,954,954,954, 21, 21, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, -/* block 241 */ +/* block 247 */ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,924,924,924,924,924,924,924,924,924,924, -924,924,924,924,924,924,924,924,924,924,924,924,924,924,924,924, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,955,955,955,955,955,955,955,955,955,955, +955,955,955,955,955,955,955,955,955,955,955,955,955,955,955,955, -/* block 242 */ -925, 21, 21,923,923,923,923,923,923,923,923,923,923,923,923,923, +/* block 248 */ +956, 21, 21,954,954,954,954,954,954,954,954,954,954,954,954,954, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, - 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 20,923,923,923,923, - 20, 20, 20, 20, 20, 20, 20, 20, 20,923,923,923,923,923,923,923, -575,575,923,923,923,923,923,923,923,923,923,923,923,923,923,923, - 21, 21, 21, 21, 21, 21,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, + 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 20,954,954,954,954, + 20, 20, 20, 20, 20, 20, 20, 20, 20,954,954,954,954,954,954,954, +584,584,954,954,954,954,954,954,954,954,954,954,954,954,954,954, + 21, 21, 21, 21, 21, 21,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, -/* block 243 */ -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, +/* block 249 */ +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, -/* block 244 */ +/* block 250 */ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, @@ -4114,7 +4209,7 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 68608 bytes, block = 128 */ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, -/* block 245 */ +/* block 251 */ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, @@ -4122,9 +4217,9 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 68608 bytes, block = 128 */ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,926,926,926,926,926, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,957,957,957,957,957, -/* block 246 */ +/* block 252 */ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, @@ -4134,7 +4229,7 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 68608 bytes, block = 128 */ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, -/* block 247 */ +/* block 253 */ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, @@ -4144,17 +4239,17 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 68608 bytes, block = 128 */ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, -/* block 248 */ +/* block 254 */ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21,923,923,923,923,923,923,923,923,923,923,923, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,923,923,923, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,923,923,923,923,923,923, + 21, 21, 21, 21, 21, 21,954,954,954,954,954,954,954,954,954,954, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,954,954,954, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,954,954,954,954,954, -/* block 249 */ +/* block 255 */ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, @@ -4162,187 +4257,197 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 68608 bytes, block = 128 */ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20,923,923,923,923,923,923,923,923,923,923,923,923, + 20, 20, 20, 20,954,954,954,954,954,954,954,954,954,954,954,954, -/* block 250 */ +/* block 256 */ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 21, 21, 21, 21,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, + 20, 20, 20, 20, 20, 21, 21, 21, 21,954,954,954,954,954,954,954, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, -/* block 251 */ - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,923,923,923,923, +/* block 257 */ + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,954,954,954,954, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20,923,923,923,923,923,923,923,923, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,923,923,923,923,923,923, + 20, 20, 20, 20, 20, 20, 20, 20,954,954,954,954,954,954,954,954, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,954,954,954,954,954,954, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, -/* block 252 */ - 20, 20, 20, 20, 20, 20, 20, 20,923,923,923,923,923,923,923,923, +/* block 258 */ + 20, 20, 20, 20, 20, 20, 20, 20,954,954,954,954,954,954,954,954, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, -/* block 253 */ - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,923,923,923,923, +/* block 259 */ + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,954, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 20, 21, 21, 21,923, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21,923,923, 21, 21, 21, 21,923,923,923, 21,923, 21, 21, 21, 21, + 21, 21,954, 21, 21, 21, 21,954,954,954, 21, 21, 21, 21, 21, 21, -/* block 254 */ +/* block 260 */ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21,923,923,923,923,923,923,923,923,923,923,923,923,923, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,923,923,923,923,923,923, - 21, 21, 21,923,923,923,923,923,923,923,923,923,923,923,923,923, + 21, 21, 21,954,954, 21, 21, 21, 21, 21, 21,954,954,954, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,954,954, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - -/* block 255 */ -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, - -/* block 256 */ -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,923,923, -923,923,923,923,923,923,923,923,923,923,923,923,923,923,119,119, - -/* block 257 */ -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, - -/* block 258 */ -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,119,119,119,119,119,119,119,119,119,119,119, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, - -/* block 259 */ -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,119,119, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, - -/* block 260 */ -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, /* block 261 */ -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21,954,954,954,954,954,954,954,954,954,954,954,954, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,954,954, + 21, 21, 21, 21,954,954,954,954, 21, 21, 21,954,954,954,954,954, /* block 262 */ -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, + 21, 21, 21,954,954,954,954,954,954,954,954,954,954,954,954,954, + 21, 21, 21, 21, 21, 21,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, /* block 263 */ -502, 24,502,502,502,502,502,502,502,502,502,502,502,502,502,502, -502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502, -927,927,927,927,927,927,927,927,927,927,927,927,927,927,927,927, -927,927,927,927,927,927,927,927,927,927,927,927,927,927,927,927, -927,927,927,927,927,927,927,927,927,927,927,927,927,927,927,927, -927,927,927,927,927,927,927,927,927,927,927,927,927,927,927,927, -927,927,927,927,927,927,927,927,927,927,927,927,927,927,927,927, -927,927,927,927,927,927,927,927,927,927,927,927,927,927,927,927, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,954,954, +954,954,954,954,954,954,954,954,954,954,954,954,954,954,120,120, /* block 264 */ -502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502, -502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502, -502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502, -502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502, -502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502, -502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502, -502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502, -502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, /* block 265 */ -112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112, -112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112, -112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112, -112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112, -112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112, -112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112, -112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112, -112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,120,120,120,120,120,120,120,120,120,120,120, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, /* block 266 */ -112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112, -112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112, -112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112, -112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112, -112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112, -112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112, -112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112, -502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,120,120, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, /* block 267 */ -659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659, -659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659, -659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659, -659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659, -659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659, -659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659, -659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659, -659,659,659,659,659,659,659,659,659,659,659,659,659,659,119,119, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, + +/* block 268 */ +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, + +/* block 269 */ +586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +586,586,586,586,586,586,586,586,586,586,586,586,586,586,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, + +/* block 270 */ +511, 24,511,511,511,511,511,511,511,511,511,511,511,511,511,511, +511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511, +958,958,958,958,958,958,958,958,958,958,958,958,958,958,958,958, +958,958,958,958,958,958,958,958,958,958,958,958,958,958,958,958, +958,958,958,958,958,958,958,958,958,958,958,958,958,958,958,958, +958,958,958,958,958,958,958,958,958,958,958,958,958,958,958,958, +958,958,958,958,958,958,958,958,958,958,958,958,958,958,958,958, +958,958,958,958,958,958,958,958,958,958,958,958,958,958,958,958, + +/* block 271 */ +511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511, +511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511, +511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511, +511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511, +511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511, +511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511, +511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511, +511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511, + +/* block 272 */ +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, + +/* block 273 */ +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, +511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511, + +/* block 274 */ +672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672, +672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672, +672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672, +672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672, +672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672, +672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672, +672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672, +672,672,672,672,672,672,672,672,672,672,672,672,672,672,120,120, }; diff --git a/ext/pcre/pcre2lib/pcre2_ucp.h b/ext/pcre/pcre2lib/pcre2_ucp.h index 483abd18fc29e..84b22fb06494c 100644 --- a/ext/pcre/pcre2lib/pcre2_ucp.h +++ b/ext/pcre/pcre2lib/pcre2_ucp.h @@ -281,7 +281,12 @@ enum { ucp_Makasar, ucp_Medefaidrin, ucp_Old_Sogdian, - ucp_Sogdian + ucp_Sogdian, + /* New for Unicode 12.0.0 */ + ucp_Elymaic, + ucp_Nandinagari, + ucp_Nyiakeng_Puachue_Hmong, + ucp_Wancho }; #endif /* PCRE2_UCP_H_IDEMPOTENT_GUARD */ diff --git a/ext/pcre/pcre2lib/sljit/sljitConfigInternal.h b/ext/pcre/pcre2lib/sljit/sljitConfigInternal.h index ba60311e45423..acba9da4be4d8 100644 --- a/ext/pcre/pcre2lib/sljit/sljitConfigInternal.h +++ b/ext/pcre/pcre2lib/sljit/sljitConfigInternal.h @@ -214,6 +214,10 @@ #define SLJIT_MEMCPY(dest, src, len) memcpy(dest, src, len) #endif +#ifndef SLJIT_MEMMOVE +#define SLJIT_MEMMOVE(dest, src, len) memmove(dest, src, len) +#endif + #ifndef SLJIT_ZEROMEM #define SLJIT_ZEROMEM(dest, len) memset(dest, 0, len) #endif diff --git a/ext/pcre/pcre2lib/sljit/sljitExecAllocator.c b/ext/pcre/pcre2lib/sljit/sljitExecAllocator.c index caaf438578399..92ddb94914382 100644 --- a/ext/pcre/pcre2lib/sljit/sljitExecAllocator.c +++ b/ext/pcre/pcre2lib/sljit/sljitExecAllocator.c @@ -118,22 +118,19 @@ static SLJIT_INLINE int get_map_jit_flag() if (map_jit_flag == -1) { struct utsname name; + map_jit_flag = 0; uname(&name); /* Kernel version for 10.14.0 (Mojave) */ if (atoi(name.release) >= 18) { - /* Only use MAP_JIT if a hardened runtime is used, because MAP_JIT is incompatible - with fork(). */ - void *ptr = mmap( - NULL, getpagesize(), PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); + /* Only use MAP_JIT if a hardened runtime is used, because MAP_JIT is incompatible with fork(). */ + void *ptr = mmap(NULL, getpagesize(), PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); + if (ptr == MAP_FAILED) { map_jit_flag = MAP_JIT; } else { - map_jit_flag = 0; munmap(ptr, getpagesize()); } - } else { - map_jit_flag = 0; } } @@ -150,6 +147,7 @@ static SLJIT_INLINE int get_map_jit_flag() static SLJIT_INLINE void* alloc_chunk(sljit_uw size) { void *retval; + const int prot = PROT_READ | PROT_WRITE | PROT_EXEC; #ifdef MAP_ANON @@ -159,16 +157,25 @@ static SLJIT_INLINE void* alloc_chunk(sljit_uw size) flags |= get_map_jit_flag(); #endif - retval = mmap(NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC, flags, -1, 0); + retval = mmap(NULL, size, prot, flags, -1, 0); #else /* !MAP_ANON */ if (dev_zero < 0) { if (open_dev_zero()) return NULL; } - retval = mmap(NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE, dev_zero, 0); + retval = mmap(NULL, size, prot, MAP_PRIVATE, dev_zero, 0); #endif /* MAP_ANON */ - return (retval != MAP_FAILED) ? retval : NULL; + if (retval == MAP_FAILED) + retval = NULL; + else { + if (mprotect(retval, size, prot) < 0) { + munmap(retval, size); + retval = NULL; + } + } + + return retval; } static SLJIT_INLINE void free_chunk(void *chunk, sljit_uw size) diff --git a/ext/pcre/pcre2lib/sljit/sljitLir.c b/ext/pcre/pcre2lib/sljit/sljitLir.c index ded9541b31b76..9bab0c3ec66ba 100644 --- a/ext/pcre/pcre2lib/sljit/sljitLir.c +++ b/ext/pcre/pcre2lib/sljit/sljitLir.c @@ -144,6 +144,7 @@ #if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) # define PATCH_MD 0x10 #endif +# define TYPE_SHIFT 13 #endif #if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) || (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7) @@ -521,6 +522,12 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_target(struct sljit_jump *jump, sljit_uw } } +SLJIT_API_FUNC_ATTRIBUTE void sljit_set_put_label(struct sljit_put_label *put_label, struct sljit_label *label) +{ + if (SLJIT_LIKELY(!!put_label)) + put_label->label = label; +} + SLJIT_API_FUNC_ATTRIBUTE void sljit_set_current_flags(struct sljit_compiler *compiler, sljit_s32 current_flags) { SLJIT_UNUSED_ARG(compiler); @@ -620,6 +627,30 @@ static SLJIT_INLINE sljit_s32 get_arg_count(sljit_s32 arg_types) return arg_count; } +#if !(defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86) + +static SLJIT_INLINE sljit_uw compute_next_addr(struct sljit_label *label, struct sljit_jump *jump, + struct sljit_const *const_, struct sljit_put_label *put_label) +{ + sljit_uw result = ~(sljit_uw)0; + + if (label) + result = label->size; + + if (jump && jump->addr < result) + result = jump->addr; + + if (const_ && const_->addr < result) + result = const_->addr; + + if (put_label && put_label->addr < result) + result = put_label->addr; + + return result; +} + +#endif /* !SLJIT_CONFIG_X86 */ + static SLJIT_INLINE void set_emit_enter(struct sljit_compiler *compiler, sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds, sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size) @@ -687,6 +718,19 @@ static SLJIT_INLINE void set_const(struct sljit_const *const_, struct sljit_comp compiler->last_const = const_; } +static SLJIT_INLINE void set_put_label(struct sljit_put_label *put_label, struct sljit_compiler *compiler, sljit_uw offset) +{ + put_label->next = NULL; + put_label->label = NULL; + put_label->addr = compiler->size - offset; + put_label->flags = 0; + if (compiler->last_put_label) + compiler->last_put_label->next = put_label; + else + compiler->put_labels = put_label; + compiler->last_put_label = put_label; +} + #define ADDRESSING_DEPENDS_ON(exp, reg) \ (((exp) & SLJIT_MEM) && (((exp) & REG_MASK) == reg || OFFS_REG(exp) == reg)) @@ -1905,6 +1949,21 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_const(struct sljit_compil CHECK_RETURN_OK; } +static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_put_label(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw) +{ +#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) + FUNCTION_CHECK_DST(dst, dstw, 0); +#endif +#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) + if (SLJIT_UNLIKELY(!!compiler->verbose)) { + fprintf(compiler->verbose, " put_label "); + sljit_verbose_param(compiler, dst, dstw); + fprintf(compiler->verbose, "\n"); + } +#endif + CHECK_RETURN_OK; +} + #endif /* SLJIT_ARGUMENT_CHECKS || SLJIT_VERBOSE */ #define SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw) \ @@ -2581,6 +2640,14 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compi return NULL; } +SLJIT_API_FUNC_ATTRIBUTE struct sljit_put_label* sljit_emit_put_label(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw) +{ + SLJIT_UNUSED_ARG(compiler); + SLJIT_UNUSED_ARG(dst); + SLJIT_UNUSED_ARG(dstw); + return NULL; +} + SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_target, sljit_sw executable_offset) { SLJIT_UNUSED_ARG(addr); @@ -2597,4 +2664,4 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_consta SLJIT_UNREACHABLE(); } -#endif +#endif /* !SLJIT_CONFIG_UNSUPPORTED */ diff --git a/ext/pcre/pcre2lib/sljit/sljitLir.h b/ext/pcre/pcre2lib/sljit/sljitLir.h index e71890cf7bcc9..836d25cf71a53 100644 --- a/ext/pcre/pcre2lib/sljit/sljitLir.h +++ b/ext/pcre/pcre2lib/sljit/sljitLir.h @@ -348,13 +348,20 @@ struct sljit_label { struct sljit_jump { struct sljit_jump *next; sljit_uw addr; - sljit_sw flags; + sljit_uw flags; union { sljit_uw target; - struct sljit_label* label; + struct sljit_label *label; } u; }; +struct sljit_put_label { + struct sljit_put_label *next; + struct sljit_label *label; + sljit_uw addr; + sljit_uw flags; +}; + struct sljit_const { struct sljit_const *next; sljit_uw addr; @@ -366,10 +373,12 @@ struct sljit_compiler { struct sljit_label *labels; struct sljit_jump *jumps; + struct sljit_put_label *put_labels; struct sljit_const *consts; struct sljit_label *last_label; struct sljit_jump *last_jump; struct sljit_const *last_const; + struct sljit_put_label *last_put_label; void *allocator_data; struct sljit_memory_fragment *buf; @@ -1314,10 +1323,17 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fmem(struct sljit_compiler *compil Flags: - (may destroy flags) */ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_local_base(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw offset); -/* The constant can be changed runtime (see: sljit_set_const) +/* Store a value that can be changed runtime (see: sljit_get_const_addr / sljit_set_const) Flags: - (does not modify flags) */ SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw init_value); +/* Store the value of a label (see: sljit_set_put_label) + Flags: - (does not modify flags) */ +SLJIT_API_FUNC_ATTRIBUTE struct sljit_put_label* sljit_emit_put_label(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw); + +/* Set the value stored by put_label to this label. */ +SLJIT_API_FUNC_ATTRIBUTE void sljit_set_put_label(struct sljit_put_label *put_label, struct sljit_label *label); + /* After the code generation the address for label, jump and const instructions are computed. Since these structures are freed by sljit_free_compiler, the addresses must be preserved by the user program elsewere. */ diff --git a/ext/pcre/pcre2lib/sljit/sljitNativeARM_32.c b/ext/pcre/pcre2lib/sljit/sljitNativeARM_32.c index 6d61eed9a7db0..71f7bcdadbef8 100644 --- a/ext/pcre/pcre2lib/sljit/sljitNativeARM_32.c +++ b/ext/pcre/pcre2lib/sljit/sljitNativeARM_32.c @@ -583,8 +583,9 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil sljit_uw *buf_end; sljit_uw size; sljit_uw word_count; + sljit_uw next_addr; sljit_sw executable_offset; - sljit_sw jump_addr; + sljit_sw addr; #if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) sljit_uw cpool_size; sljit_uw cpool_skip_alignment; @@ -597,6 +598,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil struct sljit_label *label; struct sljit_jump *jump; struct sljit_const *const_; + struct sljit_put_label *put_label; CHECK_ERROR_PTR(); CHECK_PTR(check_sljit_generate_code(compiler)); @@ -625,11 +627,13 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil code_ptr = code; word_count = 0; + next_addr = 1; executable_offset = SLJIT_EXEC_OFFSET(code); label = compiler->labels; jump = compiler->jumps; const_ = compiler->consts; + put_label = compiler->put_labels; if (label && label->size == 0) { label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code, executable_offset); @@ -669,35 +673,45 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil else if ((*buf_ptr & 0xff000000) != PUSH_POOL) { #endif *code_ptr = *buf_ptr++; + if (next_addr == word_count) { + SLJIT_ASSERT(!label || label->size >= word_count); + SLJIT_ASSERT(!jump || jump->addr >= word_count); + SLJIT_ASSERT(!const_ || const_->addr >= word_count); + SLJIT_ASSERT(!put_label || put_label->addr >= word_count); + /* These structures are ordered by their address. */ - SLJIT_ASSERT(!label || label->size >= word_count); - SLJIT_ASSERT(!jump || jump->addr >= word_count); - SLJIT_ASSERT(!const_ || const_->addr >= word_count); - if (jump && jump->addr == word_count) { + if (jump && jump->addr == word_count) { #if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) - if (detect_jump_type(jump, code_ptr, code, executable_offset)) - code_ptr--; - jump->addr = (sljit_uw)code_ptr; + if (detect_jump_type(jump, code_ptr, code, executable_offset)) + code_ptr--; + jump->addr = (sljit_uw)code_ptr; #else - jump->addr = (sljit_uw)(code_ptr - 2); - if (detect_jump_type(jump, code_ptr, code, executable_offset)) - code_ptr -= 2; + jump->addr = (sljit_uw)(code_ptr - 2); + if (detect_jump_type(jump, code_ptr, code, executable_offset)) + code_ptr -= 2; #endif - jump = jump->next; - } - if (label && label->size == word_count) { - /* code_ptr can be affected above. */ - label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr + 1, executable_offset); - label->size = (code_ptr + 1) - code; - label = label->next; - } - if (const_ && const_->addr == word_count) { + jump = jump->next; + } + if (label && label->size == word_count) { + /* code_ptr can be affected above. */ + label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr + 1, executable_offset); + label->size = (code_ptr + 1) - code; + label = label->next; + } + if (const_ && const_->addr == word_count) { #if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) - const_->addr = (sljit_uw)code_ptr; + const_->addr = (sljit_uw)code_ptr; #else - const_->addr = (sljit_uw)(code_ptr - 1); + const_->addr = (sljit_uw)(code_ptr - 1); #endif - const_ = const_->next; + const_ = const_->next; + } + if (put_label && put_label->addr == word_count) { + SLJIT_ASSERT(put_label->label); + put_label->addr = (sljit_uw)code_ptr; + put_label = put_label->next; + } + next_addr = compute_next_addr(label, jump, const_, put_label); } code_ptr++; #if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) @@ -725,6 +739,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil SLJIT_ASSERT(!label); SLJIT_ASSERT(!jump); SLJIT_ASSERT(!const_); + SLJIT_ASSERT(!put_label); #if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) SLJIT_ASSERT(cpool_size == 0); @@ -755,15 +770,15 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil buf_ptr = (sljit_uw *)jump->addr; if (jump->flags & PATCH_B) { - jump_addr = (sljit_sw)SLJIT_ADD_EXEC_OFFSET(buf_ptr + 2, executable_offset); + addr = (sljit_sw)SLJIT_ADD_EXEC_OFFSET(buf_ptr + 2, executable_offset); if (!(jump->flags & JUMP_ADDR)) { SLJIT_ASSERT(jump->flags & JUMP_LABEL); - SLJIT_ASSERT(((sljit_sw)jump->u.label->addr - jump_addr) <= 0x01ffffff && ((sljit_sw)jump->u.label->addr - jump_addr) >= -0x02000000); - *buf_ptr |= (((sljit_sw)jump->u.label->addr - jump_addr) >> 2) & 0x00ffffff; + SLJIT_ASSERT(((sljit_sw)jump->u.label->addr - addr) <= 0x01ffffff && ((sljit_sw)jump->u.label->addr - addr) >= -0x02000000); + *buf_ptr |= (((sljit_sw)jump->u.label->addr - addr) >> 2) & 0x00ffffff; } else { - SLJIT_ASSERT(((sljit_sw)jump->u.target - jump_addr) <= 0x01ffffff && ((sljit_sw)jump->u.target - jump_addr) >= -0x02000000); - *buf_ptr |= (((sljit_sw)jump->u.target - jump_addr) >> 2) & 0x00ffffff; + SLJIT_ASSERT(((sljit_sw)jump->u.target - addr) <= 0x01ffffff && ((sljit_sw)jump->u.target - addr) >= -0x02000000); + *buf_ptr |= (((sljit_sw)jump->u.target - addr) >> 2) & 0x00ffffff; } } else if (jump->flags & SLJIT_REWRITABLE_JUMP) { @@ -813,6 +828,22 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil } #endif + put_label = compiler->put_labels; + while (put_label) { + addr = put_label->label->addr; + buf_ptr = (sljit_uw*)put_label->addr; + +#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) + SLJIT_ASSERT((buf_ptr[0] & 0xffff0000) == 0xe59f0000); + buf_ptr[((buf_ptr[0] & 0xfff) >> 2) + 2] = addr; +#else + SLJIT_ASSERT((buf_ptr[-1] & 0xfff00000) == MOVW && (buf_ptr[0] & 0xfff00000) == MOVT); + buf_ptr[-1] |= ((addr << 4) & 0xf0000) | (addr & 0xfff); + buf_ptr[0] |= ((addr >> 12) & 0xf0000) | ((addr >> 16) & 0xfff); +#endif + put_label = put_label->next; + } + SLJIT_ASSERT(code_ptr - code <= (sljit_s32)size); compiler->error = SLJIT_ERR_COMPILED; @@ -2639,28 +2670,55 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_mem(struct sljit_compiler *compile SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw init_value) { struct sljit_const *const_; - sljit_s32 reg; + sljit_s32 dst_r; CHECK_ERROR_PTR(); CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value)); ADJUST_LOCAL_OFFSET(dst, dstw); + dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG2; + +#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) + PTR_FAIL_IF(push_inst_with_unique_literal(compiler, EMIT_DATA_TRANSFER(WORD_SIZE | LOAD_DATA, 1, dst_r, TMP_PC, 0), init_value)); + compiler->patches++; +#else + PTR_FAIL_IF(emit_imm(compiler, dst_r, init_value)); +#endif + const_ = (struct sljit_const*)ensure_abuf(compiler, sizeof(struct sljit_const)); PTR_FAIL_IF(!const_); + set_const(const_, compiler); - reg = SLOW_IS_REG(dst) ? dst : TMP_REG2; + if (dst & SLJIT_MEM) + PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE, TMP_REG2, dst, dstw, TMP_REG1)); + return const_; +} + +SLJIT_API_FUNC_ATTRIBUTE struct sljit_put_label* sljit_emit_put_label(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw) +{ + struct sljit_put_label *put_label; + sljit_s32 dst_r; + + CHECK_ERROR_PTR(); + CHECK_PTR(check_sljit_emit_put_label(compiler, dst, dstw)); + ADJUST_LOCAL_OFFSET(dst, dstw); + + dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG2; #if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) - PTR_FAIL_IF(push_inst_with_unique_literal(compiler, EMIT_DATA_TRANSFER(WORD_SIZE | LOAD_DATA, 1, reg, TMP_PC, 0), init_value)); + PTR_FAIL_IF(push_inst_with_unique_literal(compiler, EMIT_DATA_TRANSFER(WORD_SIZE | LOAD_DATA, 1, dst_r, TMP_PC, 0), 0)); compiler->patches++; #else - PTR_FAIL_IF(emit_imm(compiler, reg, init_value)); + PTR_FAIL_IF(emit_imm(compiler, dst_r, 0)); #endif - set_const(const_, compiler); + + put_label = (struct sljit_put_label*)ensure_abuf(compiler, sizeof(struct sljit_put_label)); + PTR_FAIL_IF(!put_label); + set_put_label(put_label, compiler, 0); if (dst & SLJIT_MEM) PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE, TMP_REG2, dst, dstw, TMP_REG1)); - return const_; + return put_label; } SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_target, sljit_sw executable_offset) diff --git a/ext/pcre/pcre2lib/sljit/sljitNativeARM_64.c b/ext/pcre/pcre2lib/sljit/sljitNativeARM_64.c index b015695c52477..e15b3451e8022 100644 --- a/ext/pcre/pcre2lib/sljit/sljitNativeARM_64.c +++ b/ext/pcre/pcre2lib/sljit/sljitNativeARM_64.c @@ -161,7 +161,7 @@ static SLJIT_INLINE void modify_imm64_const(sljit_ins* inst, sljit_uw new_imm) inst[3] = MOVK | dst | ((new_imm >> 48) << 5) | (3 << 21); } -static SLJIT_INLINE sljit_s32 detect_jump_type(struct sljit_jump *jump, sljit_ins *code_ptr, sljit_ins *code, sljit_sw executable_offset) +static SLJIT_INLINE sljit_sw detect_jump_type(struct sljit_jump *jump, sljit_ins *code_ptr, sljit_ins *code, sljit_sw executable_offset) { sljit_sw diff; sljit_uw target_addr; @@ -196,14 +196,14 @@ static SLJIT_INLINE sljit_s32 detect_jump_type(struct sljit_jump *jump, sljit_in return 4; } - if (target_addr <= 0xffffffffl) { + if (target_addr < 0x100000000l) { if (jump->flags & IS_COND) code_ptr[-5] -= (2 << 5); code_ptr[-2] = code_ptr[0]; return 2; } - if (target_addr <= 0xffffffffffffl) { + if (target_addr < 0x1000000000000l) { if (jump->flags & IS_COND) code_ptr[-5] -= (1 << 5); jump->flags |= PATCH_ABS48; @@ -215,6 +215,22 @@ static SLJIT_INLINE sljit_s32 detect_jump_type(struct sljit_jump *jump, sljit_in return 0; } +static SLJIT_INLINE sljit_sw put_label_get_length(struct sljit_put_label *put_label, sljit_uw max_label) +{ + if (max_label < 0x100000000l) { + put_label->flags = 0; + return 2; + } + + if (max_label < 0x1000000000000l) { + put_label->flags = 1; + return 1; + } + + put_label->flags = 2; + return 0; +} + SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler) { struct sljit_memory_fragment *buf; @@ -223,6 +239,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil sljit_ins *buf_ptr; sljit_ins *buf_end; sljit_uw word_count; + sljit_uw next_addr; sljit_sw executable_offset; sljit_uw addr; sljit_s32 dst; @@ -230,6 +247,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil struct sljit_label *label; struct sljit_jump *jump; struct sljit_const *const_; + struct sljit_put_label *put_label; CHECK_ERROR_PTR(); CHECK_PTR(check_sljit_generate_code(compiler)); @@ -241,34 +259,47 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil code_ptr = code; word_count = 0; + next_addr = 0; executable_offset = SLJIT_EXEC_OFFSET(code); label = compiler->labels; jump = compiler->jumps; const_ = compiler->consts; + put_label = compiler->put_labels; do { buf_ptr = (sljit_ins*)buf->memory; buf_end = buf_ptr + (buf->used_size >> 2); do { *code_ptr = *buf_ptr++; - /* These structures are ordered by their address. */ - SLJIT_ASSERT(!label || label->size >= word_count); - SLJIT_ASSERT(!jump || jump->addr >= word_count); - SLJIT_ASSERT(!const_ || const_->addr >= word_count); - if (label && label->size == word_count) { - label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); - label->size = code_ptr - code; - label = label->next; - } - if (jump && jump->addr == word_count) { - jump->addr = (sljit_uw)(code_ptr - 4); - code_ptr -= detect_jump_type(jump, code_ptr, code, executable_offset); - jump = jump->next; - } - if (const_ && const_->addr == word_count) { - const_->addr = (sljit_uw)code_ptr; - const_ = const_->next; + if (next_addr == word_count) { + SLJIT_ASSERT(!label || label->size >= word_count); + SLJIT_ASSERT(!jump || jump->addr >= word_count); + SLJIT_ASSERT(!const_ || const_->addr >= word_count); + SLJIT_ASSERT(!put_label || put_label->addr >= word_count); + + /* These structures are ordered by their address. */ + if (label && label->size == word_count) { + label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); + label->size = code_ptr - code; + label = label->next; + } + if (jump && jump->addr == word_count) { + jump->addr = (sljit_uw)(code_ptr - 4); + code_ptr -= detect_jump_type(jump, code_ptr, code, executable_offset); + jump = jump->next; + } + if (const_ && const_->addr == word_count) { + const_->addr = (sljit_uw)code_ptr; + const_ = const_->next; + } + if (put_label && put_label->addr == word_count) { + SLJIT_ASSERT(put_label->label); + put_label->addr = (sljit_uw)(code_ptr - 3); + code_ptr -= put_label_get_length(put_label, (sljit_uw)(SLJIT_ADD_EXEC_OFFSET(code, executable_offset) + put_label->label->size)); + put_label = put_label->next; + } + next_addr = compute_next_addr(label, jump, const_, put_label); } code_ptr ++; word_count ++; @@ -286,6 +317,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil SLJIT_ASSERT(!label); SLJIT_ASSERT(!jump); SLJIT_ASSERT(!const_); + SLJIT_ASSERT(!put_label); SLJIT_ASSERT(code_ptr - code <= (sljit_sw)compiler->size); jump = compiler->jumps; @@ -323,6 +355,23 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil jump = jump->next; } + put_label = compiler->put_labels; + while (put_label) { + addr = put_label->label->addr; + buf_ptr = (sljit_ins *)put_label->addr; + + buf_ptr[0] |= (addr & 0xffff) << 5; + buf_ptr[1] |= ((addr >> 16) & 0xffff) << 5; + + if (put_label->flags >= 1) + buf_ptr[2] |= ((addr >> 32) & 0xffff) << 5; + + if (put_label->flags >= 2) + buf_ptr[3] |= ((addr >> 48) & 0xffff) << 5; + + put_label = put_label->next; + } + compiler->error = SLJIT_ERR_COMPILED; compiler->executable_offset = executable_offset; compiler->executable_size = (code_ptr - code) * sizeof(sljit_ins); @@ -1947,6 +1996,28 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compi return const_; } +SLJIT_API_FUNC_ATTRIBUTE struct sljit_put_label* sljit_emit_put_label(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw) +{ + struct sljit_put_label *put_label; + sljit_s32 dst_r; + + CHECK_ERROR_PTR(); + CHECK_PTR(check_sljit_emit_put_label(compiler, dst, dstw)); + ADJUST_LOCAL_OFFSET(dst, dstw); + + dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; + PTR_FAIL_IF(emit_imm64_const(compiler, dst_r, 0)); + + put_label = (struct sljit_put_label*)ensure_abuf(compiler, sizeof(struct sljit_put_label)); + PTR_FAIL_IF(!put_label); + set_put_label(put_label, compiler, 1); + + if (dst & SLJIT_MEM) + PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw, TMP_REG2)); + + return put_label; +} + SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_target, sljit_sw executable_offset) { sljit_ins* inst = (sljit_ins*)addr; diff --git a/ext/pcre/pcre2lib/sljit/sljitNativeARM_T2_32.c b/ext/pcre/pcre2lib/sljit/sljitNativeARM_T2_32.c index d7024b6d7d417..cdfe4a4d24a93 100644 --- a/ext/pcre/pcre2lib/sljit/sljitNativeARM_T2_32.c +++ b/ext/pcre/pcre2lib/sljit/sljitNativeARM_T2_32.c @@ -365,11 +365,13 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil sljit_u16 *buf_ptr; sljit_u16 *buf_end; sljit_uw half_count; + sljit_uw next_addr; sljit_sw executable_offset; struct sljit_label *label; struct sljit_jump *jump; struct sljit_const *const_; + struct sljit_put_label *put_label; CHECK_ERROR_PTR(); CHECK_PTR(check_sljit_generate_code(compiler)); @@ -381,34 +383,46 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil code_ptr = code; half_count = 0; + next_addr = 0; executable_offset = SLJIT_EXEC_OFFSET(code); label = compiler->labels; jump = compiler->jumps; const_ = compiler->consts; + put_label = compiler->put_labels; do { buf_ptr = (sljit_u16*)buf->memory; buf_end = buf_ptr + (buf->used_size >> 1); do { *code_ptr = *buf_ptr++; - /* These structures are ordered by their address. */ - SLJIT_ASSERT(!label || label->size >= half_count); - SLJIT_ASSERT(!jump || jump->addr >= half_count); - SLJIT_ASSERT(!const_ || const_->addr >= half_count); - if (label && label->size == half_count) { - label->addr = ((sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset)) | 0x1; - label->size = code_ptr - code; - label = label->next; - } - if (jump && jump->addr == half_count) { - jump->addr = (sljit_uw)code_ptr - ((jump->flags & IS_COND) ? 10 : 8); - code_ptr -= detect_jump_type(jump, code_ptr, code, executable_offset); - jump = jump->next; - } - if (const_ && const_->addr == half_count) { - const_->addr = (sljit_uw)code_ptr; - const_ = const_->next; + if (next_addr == half_count) { + SLJIT_ASSERT(!label || label->size >= half_count); + SLJIT_ASSERT(!jump || jump->addr >= half_count); + SLJIT_ASSERT(!const_ || const_->addr >= half_count); + SLJIT_ASSERT(!put_label || put_label->addr >= half_count); + + /* These structures are ordered by their address. */ + if (label && label->size == half_count) { + label->addr = ((sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset)) | 0x1; + label->size = code_ptr - code; + label = label->next; + } + if (jump && jump->addr == half_count) { + jump->addr = (sljit_uw)code_ptr - ((jump->flags & IS_COND) ? 10 : 8); + code_ptr -= detect_jump_type(jump, code_ptr, code, executable_offset); + jump = jump->next; + } + if (const_ && const_->addr == half_count) { + const_->addr = (sljit_uw)code_ptr; + const_ = const_->next; + } + if (put_label && put_label->addr == half_count) { + SLJIT_ASSERT(put_label->label); + put_label->addr = (sljit_uw)code_ptr; + put_label = put_label->next; + } + next_addr = compute_next_addr(label, jump, const_, put_label); } code_ptr ++; half_count ++; @@ -426,6 +440,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil SLJIT_ASSERT(!label); SLJIT_ASSERT(!jump); SLJIT_ASSERT(!const_); + SLJIT_ASSERT(!put_label); SLJIT_ASSERT(code_ptr - code <= (sljit_sw)compiler->size); jump = compiler->jumps; @@ -434,6 +449,12 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil jump = jump->next; } + put_label = compiler->put_labels; + while (put_label) { + modify_imm32_const((sljit_u16 *)put_label->addr, put_label->label->addr); + put_label = put_label->next; + } + compiler->error = SLJIT_ERR_COMPILED; compiler->executable_offset = executable_offset; compiler->executable_size = (code_ptr - code) * sizeof(sljit_u16); @@ -2311,6 +2332,27 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compi return const_; } +SLJIT_API_FUNC_ATTRIBUTE struct sljit_put_label* sljit_emit_put_label(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw) +{ + struct sljit_put_label *put_label; + sljit_s32 dst_r; + + CHECK_ERROR_PTR(); + CHECK_PTR(check_sljit_emit_put_label(compiler, dst, dstw)); + ADJUST_LOCAL_OFFSET(dst, dstw); + + put_label = (struct sljit_put_label*)ensure_abuf(compiler, sizeof(struct sljit_put_label)); + PTR_FAIL_IF(!put_label); + set_put_label(put_label, compiler, 0); + + dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; + PTR_FAIL_IF(emit_imm32_const(compiler, dst_r, 0)); + + if (dst & SLJIT_MEM) + PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw, TMP_REG2)); + return put_label; +} + SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_target, sljit_sw executable_offset) { sljit_u16 *inst = (sljit_u16*)addr; diff --git a/ext/pcre/pcre2lib/sljit/sljitNativeMIPS_32.c b/ext/pcre/pcre2lib/sljit/sljitNativeMIPS_32.c index ad970bf25a861..16dec052fe75f 100644 --- a/ext/pcre/pcre2lib/sljit/sljitNativeMIPS_32.c +++ b/ext/pcre/pcre2lib/sljit/sljitNativeMIPS_32.c @@ -425,6 +425,7 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_ta { sljit_ins *inst = (sljit_ins *)addr; + SLJIT_ASSERT((inst[0] & 0xffe00000) == LUI && (inst[1] & 0xfc000000) == ORI); inst[0] = (inst[0] & 0xffff0000) | ((new_target >> 16) & 0xffff); inst[1] = (inst[1] & 0xffff0000) | (new_target & 0xffff); inst = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset); @@ -435,6 +436,7 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_consta { sljit_ins *inst = (sljit_ins *)addr; + SLJIT_ASSERT((inst[0] & 0xffe00000) == LUI && (inst[1] & 0xfc000000) == ORI); inst[0] = (inst[0] & 0xffff0000) | ((new_constant >> 16) & 0xffff); inst[1] = (inst[1] & 0xffff0000) | (new_constant & 0xffff); inst = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset); diff --git a/ext/pcre/pcre2lib/sljit/sljitNativeMIPS_common.c b/ext/pcre/pcre2lib/sljit/sljitNativeMIPS_common.c index e0d6a3f085432..7d1d08749693c 100644 --- a/ext/pcre/pcre2lib/sljit/sljitNativeMIPS_common.c +++ b/ext/pcre/pcre2lib/sljit/sljitNativeMIPS_common.c @@ -449,6 +449,55 @@ static __attribute__ ((noinline)) void sljit_cache_flush(void* code, void* code_ } #endif +#if (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64) + +static SLJIT_INLINE sljit_sw put_label_get_length(struct sljit_put_label *put_label, sljit_uw max_label) +{ + if (max_label < 0x80000000l) { + put_label->flags = 0; + return 1; + } + + if (max_label < 0x800000000000l) { + put_label->flags = 1; + return 3; + } + + put_label->flags = 2; + return 5; +} + +static SLJIT_INLINE void put_label_set(struct sljit_put_label *put_label) +{ + sljit_uw addr = put_label->label->addr; + sljit_ins *inst = (sljit_ins *)put_label->addr; + sljit_s32 reg = *inst; + + if (put_label->flags == 0) { + SLJIT_ASSERT(addr < 0x80000000l); + inst[0] = LUI | T(reg) | IMM(addr >> 16); + } + else if (put_label->flags == 1) { + SLJIT_ASSERT(addr < 0x800000000000l); + inst[0] = LUI | T(reg) | IMM(addr >> 32); + inst[1] = ORI | S(reg) | T(reg) | IMM((addr >> 16) & 0xffff); + inst[2] = DSLL | T(reg) | D(reg) | SH_IMM(16); + inst += 2; + } + else { + inst[0] = LUI | T(reg) | IMM(addr >> 48); + inst[1] = ORI | S(reg) | T(reg) | IMM((addr >> 32) & 0xffff); + inst[2] = DSLL | T(reg) | D(reg) | SH_IMM(16); + inst[3] = ORI | S(reg) | T(reg) | IMM((addr >> 16) & 0xffff); + inst[4] = DSLL | T(reg) | D(reg) | SH_IMM(16); + inst += 4; + } + + inst[1] = ORI | S(reg) | T(reg) | IMM(addr & 0xffff); +} + +#endif + SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler) { struct sljit_memory_fragment *buf; @@ -457,12 +506,14 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil sljit_ins *buf_ptr; sljit_ins *buf_end; sljit_uw word_count; + sljit_uw next_addr; sljit_sw executable_offset; sljit_uw addr; struct sljit_label *label; struct sljit_jump *jump; struct sljit_const *const_; + struct sljit_put_label *put_label; CHECK_ERROR_PTR(); CHECK_PTR(check_sljit_generate_code(compiler)); @@ -474,39 +525,54 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil code_ptr = code; word_count = 0; + next_addr = 0; executable_offset = SLJIT_EXEC_OFFSET(code); label = compiler->labels; jump = compiler->jumps; const_ = compiler->consts; + put_label = compiler->put_labels; do { buf_ptr = (sljit_ins*)buf->memory; buf_end = buf_ptr + (buf->used_size >> 2); do { *code_ptr = *buf_ptr++; - SLJIT_ASSERT(!label || label->size >= word_count); - SLJIT_ASSERT(!jump || jump->addr >= word_count); - SLJIT_ASSERT(!const_ || const_->addr >= word_count); - /* These structures are ordered by their address. */ - if (label && label->size == word_count) { - label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); - label->size = code_ptr - code; - label = label->next; - } - if (jump && jump->addr == word_count) { + if (next_addr == word_count) { + SLJIT_ASSERT(!label || label->size >= word_count); + SLJIT_ASSERT(!jump || jump->addr >= word_count); + SLJIT_ASSERT(!const_ || const_->addr >= word_count); + SLJIT_ASSERT(!put_label || put_label->addr >= word_count); + + /* These structures are ordered by their address. */ + if (label && label->size == word_count) { + label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); + label->size = code_ptr - code; + label = label->next; + } + if (jump && jump->addr == word_count) { #if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) - jump->addr = (sljit_uw)(code_ptr - 3); + jump->addr = (sljit_uw)(code_ptr - 3); #else - jump->addr = (sljit_uw)(code_ptr - 7); + jump->addr = (sljit_uw)(code_ptr - 7); #endif - code_ptr = detect_jump_type(jump, code_ptr, code, executable_offset); - jump = jump->next; - } - if (const_ && const_->addr == word_count) { - /* Just recording the address. */ - const_->addr = (sljit_uw)code_ptr; - const_ = const_->next; + code_ptr = detect_jump_type(jump, code_ptr, code, executable_offset); + jump = jump->next; + } + if (const_ && const_->addr == word_count) { + const_->addr = (sljit_uw)code_ptr; + const_ = const_->next; + } + if (put_label && put_label->addr == word_count) { + SLJIT_ASSERT(put_label->label); + put_label->addr = (sljit_uw)code_ptr; +#if (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64) + code_ptr += put_label_get_length(put_label, (sljit_uw)(SLJIT_ADD_EXEC_OFFSET(code, executable_offset) + put_label->label->size)); + word_count += 5; +#endif + put_label = put_label->next; + } + next_addr = compute_next_addr(label, jump, const_, put_label); } code_ptr ++; word_count ++; @@ -524,6 +590,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil SLJIT_ASSERT(!label); SLJIT_ASSERT(!jump); SLJIT_ASSERT(!const_); + SLJIT_ASSERT(!put_label); SLJIT_ASSERT(code_ptr - code <= (sljit_sw)compiler->size); jump = compiler->jumps; @@ -571,6 +638,21 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil jump = jump->next; } + put_label = compiler->put_labels; + while (put_label) { +#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) + addr = put_label->label->addr; + buf_ptr = (sljit_ins *)put_label->addr; + + SLJIT_ASSERT((buf_ptr[0] & 0xffe00000) == LUI && (buf_ptr[1] & 0xfc000000) == ORI); + buf_ptr[0] |= (addr >> 16) & 0xffff; + buf_ptr[1] |= addr & 0xffff; +#else + put_label_set(put_label); +#endif + put_label = put_label->next; + } + compiler->error = SLJIT_ERR_COMPILED; compiler->executable_offset = executable_offset; compiler->executable_size = (code_ptr - code) * sizeof(sljit_ins); @@ -2157,7 +2239,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_cmov(struct sljit_compiler *compil SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw init_value) { struct sljit_const *const_; - sljit_s32 reg; + sljit_s32 dst_r; CHECK_ERROR_PTR(); CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value)); @@ -2167,11 +2249,38 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compi PTR_FAIL_IF(!const_); set_const(const_, compiler); - reg = FAST_IS_REG(dst) ? dst : TMP_REG2; - - PTR_FAIL_IF(emit_const(compiler, reg, init_value)); + dst_r = FAST_IS_REG(dst) ? dst : TMP_REG2; + PTR_FAIL_IF(emit_const(compiler, dst_r, init_value)); if (dst & SLJIT_MEM) PTR_FAIL_IF(emit_op(compiler, SLJIT_MOV, WORD_DATA, dst, dstw, TMP_REG1, 0, TMP_REG2, 0)); + return const_; } + +SLJIT_API_FUNC_ATTRIBUTE struct sljit_put_label* sljit_emit_put_label(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw) +{ + struct sljit_put_label *put_label; + sljit_s32 dst_r; + + CHECK_ERROR_PTR(); + CHECK_PTR(check_sljit_emit_put_label(compiler, dst, dstw)); + ADJUST_LOCAL_OFFSET(dst, dstw); + + put_label = (struct sljit_put_label*)ensure_abuf(compiler, sizeof(struct sljit_put_label)); + PTR_FAIL_IF(!put_label); + set_put_label(put_label, compiler, 0); + + dst_r = FAST_IS_REG(dst) ? dst : TMP_REG2; +#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) + PTR_FAIL_IF(emit_const(compiler, dst_r, 0)); +#else + PTR_FAIL_IF(push_inst(compiler, dst_r, UNMOVABLE_INS)); + compiler->size += 5; +#endif + + if (dst & SLJIT_MEM) + PTR_FAIL_IF(emit_op(compiler, SLJIT_MOV, WORD_DATA, dst, dstw, TMP_REG1, 0, TMP_REG2, 0)); + + return put_label; +} diff --git a/ext/pcre/pcre2lib/sljit/sljitNativePPC_32.c b/ext/pcre/pcre2lib/sljit/sljitNativePPC_32.c index fc185f784754c..3ce741153f850 100644 --- a/ext/pcre/pcre2lib/sljit/sljitNativePPC_32.c +++ b/ext/pcre/pcre2lib/sljit/sljitNativePPC_32.c @@ -259,6 +259,7 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_ta { sljit_ins *inst = (sljit_ins *)addr; + SLJIT_ASSERT((inst[0] & 0xfc1f0000) == ADDIS && (inst[1] & 0xfc000000) == ORI); inst[0] = (inst[0] & 0xffff0000) | ((new_target >> 16) & 0xffff); inst[1] = (inst[1] & 0xffff0000) | (new_target & 0xffff); inst = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset); @@ -269,6 +270,7 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_consta { sljit_ins *inst = (sljit_ins *)addr; + SLJIT_ASSERT((inst[0] & 0xfc1f0000) == ADDIS && (inst[1] & 0xfc000000) == ORI); inst[0] = (inst[0] & 0xffff0000) | ((new_constant >> 16) & 0xffff); inst[1] = (inst[1] & 0xffff0000) | (new_constant & 0xffff); inst = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset); diff --git a/ext/pcre/pcre2lib/sljit/sljitNativePPC_64.c b/ext/pcre/pcre2lib/sljit/sljitNativePPC_64.c index 706b2ba20b59e..3b73021cc8c6b 100644 --- a/ext/pcre/pcre2lib/sljit/sljitNativePPC_64.c +++ b/ext/pcre/pcre2lib/sljit/sljitNativePPC_64.c @@ -35,9 +35,6 @@ #error "Must implement count leading zeroes" #endif -#define RLDI(dst, src, sh, mb, type) \ - (HI(30) | S(src) | A(dst) | ((type) << 2) | (((sh) & 0x1f) << 11) | (((sh) & 0x20) >> 4) | (((mb) & 0x1f) << 6) | ((mb) & 0x20)) - #define PUSH_RLDICR(reg, shift) \ push_inst(compiler, RLDI(reg, reg, 63 - shift, shift, 1)) diff --git a/ext/pcre/pcre2lib/sljit/sljitNativePPC_common.c b/ext/pcre/pcre2lib/sljit/sljitNativePPC_common.c index b34e3965ed23d..e8275143153d0 100644 --- a/ext/pcre/pcre2lib/sljit/sljitNativePPC_common.c +++ b/ext/pcre/pcre2lib/sljit/sljitNativePPC_common.c @@ -231,6 +231,9 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = { #define SIMM_MIN (-0x8000) #define UIMM_MAX (0xffff) +#define RLDI(dst, src, sh, mb, type) \ + (HI(30) | S(src) | A(dst) | ((type) << 2) | (((sh) & 0x1f) << 11) | (((sh) & 0x20) >> 4) | (((mb) & 0x1f) << 6) | ((mb) & 0x20)) + #if (defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL) SLJIT_API_FUNC_ATTRIBUTE void sljit_set_function_context(void** func_ptr, struct sljit_function_context* context, sljit_sw addr, void* func) { @@ -324,6 +327,55 @@ static SLJIT_INLINE sljit_s32 detect_jump_type(struct sljit_jump *jump, sljit_in return 0; } +#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) + +static SLJIT_INLINE sljit_sw put_label_get_length(struct sljit_put_label *put_label, sljit_uw max_label) +{ + if (max_label < 0x100000000l) { + put_label->flags = 0; + return 1; + } + + if (max_label < 0x1000000000000l) { + put_label->flags = 1; + return 3; + } + + put_label->flags = 2; + return 4; +} + +static SLJIT_INLINE void put_label_set(struct sljit_put_label *put_label) +{ + sljit_uw addr = put_label->label->addr; + sljit_ins *inst = (sljit_ins *)put_label->addr; + sljit_s32 reg = *inst; + + if (put_label->flags == 0) { + SLJIT_ASSERT(addr < 0x100000000l); + inst[0] = ORIS | S(TMP_ZERO) | A(reg) | IMM(addr >> 16); + } + else { + if (put_label->flags == 1) { + SLJIT_ASSERT(addr < 0x1000000000000l); + inst[0] = ORI | S(TMP_ZERO) | A(reg) | IMM(addr >> 32); + } + else { + inst[0] = ORIS | S(TMP_ZERO) | A(reg) | IMM(addr >> 48); + inst[1] = ORI | S(reg) | A(reg) | IMM((addr >> 32) & 0xffff); + inst ++; + } + + inst[1] = RLDI(reg, reg, 32, 31, 1); + inst[2] = ORIS | S(reg) | A(reg) | IMM((addr >> 16) & 0xffff); + inst += 2; + } + + inst[1] = ORI | S(reg) | A(reg) | IMM(addr & 0xffff); +} + +#endif + SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler) { struct sljit_memory_fragment *buf; @@ -332,12 +384,14 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil sljit_ins *buf_ptr; sljit_ins *buf_end; sljit_uw word_count; + sljit_uw next_addr; sljit_sw executable_offset; sljit_uw addr; struct sljit_label *label; struct sljit_jump *jump; struct sljit_const *const_; + struct sljit_put_label *put_label; CHECK_ERROR_PTR(); CHECK_PTR(check_sljit_generate_code(compiler)); @@ -356,71 +410,87 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil code_ptr = code; word_count = 0; + next_addr = 0; executable_offset = SLJIT_EXEC_OFFSET(code); label = compiler->labels; jump = compiler->jumps; const_ = compiler->consts; + put_label = compiler->put_labels; do { buf_ptr = (sljit_ins*)buf->memory; buf_end = buf_ptr + (buf->used_size >> 2); do { *code_ptr = *buf_ptr++; - SLJIT_ASSERT(!label || label->size >= word_count); - SLJIT_ASSERT(!jump || jump->addr >= word_count); - SLJIT_ASSERT(!const_ || const_->addr >= word_count); - /* These structures are ordered by their address. */ - if (label && label->size == word_count) { - /* Just recording the address. */ - label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); - label->size = code_ptr - code; - label = label->next; - } - if (jump && jump->addr == word_count) { + if (next_addr == word_count) { + SLJIT_ASSERT(!label || label->size >= word_count); + SLJIT_ASSERT(!jump || jump->addr >= word_count); + SLJIT_ASSERT(!const_ || const_->addr >= word_count); + SLJIT_ASSERT(!put_label || put_label->addr >= word_count); + + /* These structures are ordered by their address. */ + if (label && label->size == word_count) { + /* Just recording the address. */ + label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); + label->size = code_ptr - code; + label = label->next; + } + if (jump && jump->addr == word_count) { #if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) - jump->addr = (sljit_uw)(code_ptr - 3); + jump->addr = (sljit_uw)(code_ptr - 3); #else - jump->addr = (sljit_uw)(code_ptr - 6); + jump->addr = (sljit_uw)(code_ptr - 6); #endif - if (detect_jump_type(jump, code_ptr, code, executable_offset)) { + if (detect_jump_type(jump, code_ptr, code, executable_offset)) { #if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) - code_ptr[-3] = code_ptr[0]; - code_ptr -= 3; -#else - if (jump->flags & PATCH_ABS32) { + code_ptr[-3] = code_ptr[0]; code_ptr -= 3; - code_ptr[-1] = code_ptr[2]; - code_ptr[0] = code_ptr[3]; - } - else if (jump->flags & PATCH_ABS48) { - code_ptr--; - code_ptr[-1] = code_ptr[0]; - code_ptr[0] = code_ptr[1]; - /* rldicr rX,rX,32,31 -> rX,rX,16,47 */ - SLJIT_ASSERT((code_ptr[-3] & 0xfc00ffff) == 0x780007c6); - code_ptr[-3] ^= 0x8422; - /* oris -> ori */ - code_ptr[-2] ^= 0x4000000; - } - else { - code_ptr[-6] = code_ptr[0]; - code_ptr -= 6; - } +#else + if (jump->flags & PATCH_ABS32) { + code_ptr -= 3; + code_ptr[-1] = code_ptr[2]; + code_ptr[0] = code_ptr[3]; + } + else if (jump->flags & PATCH_ABS48) { + code_ptr--; + code_ptr[-1] = code_ptr[0]; + code_ptr[0] = code_ptr[1]; + /* rldicr rX,rX,32,31 -> rX,rX,16,47 */ + SLJIT_ASSERT((code_ptr[-3] & 0xfc00ffff) == 0x780007c6); + code_ptr[-3] ^= 0x8422; + /* oris -> ori */ + code_ptr[-2] ^= 0x4000000; + } + else { + code_ptr[-6] = code_ptr[0]; + code_ptr -= 6; + } #endif - if (jump->flags & REMOVE_COND) { - code_ptr[0] = BCx | (2 << 2) | ((code_ptr[0] ^ (8 << 21)) & 0x03ff0001); - code_ptr++; - jump->addr += sizeof(sljit_ins); - code_ptr[0] = Bx; - jump->flags -= IS_COND; + if (jump->flags & REMOVE_COND) { + code_ptr[0] = BCx | (2 << 2) | ((code_ptr[0] ^ (8 << 21)) & 0x03ff0001); + code_ptr++; + jump->addr += sizeof(sljit_ins); + code_ptr[0] = Bx; + jump->flags -= IS_COND; + } } + jump = jump->next; } - jump = jump->next; - } - if (const_ && const_->addr == word_count) { - const_->addr = (sljit_uw)code_ptr; - const_ = const_->next; + if (const_ && const_->addr == word_count) { + const_->addr = (sljit_uw)code_ptr; + const_ = const_->next; + } + if (put_label && put_label->addr == word_count) { + SLJIT_ASSERT(put_label->label); + put_label->addr = (sljit_uw)code_ptr; +#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) + code_ptr += put_label_get_length(put_label, (sljit_uw)(SLJIT_ADD_EXEC_OFFSET(code, executable_offset) + put_label->label->size)); + word_count += 4; +#endif + put_label = put_label->next; + } + next_addr = compute_next_addr(label, jump, const_, put_label); } code_ptr ++; word_count ++; @@ -438,6 +508,8 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil SLJIT_ASSERT(!label); SLJIT_ASSERT(!jump); SLJIT_ASSERT(!const_); + SLJIT_ASSERT(!put_label); + #if (defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL) SLJIT_ASSERT(code_ptr - code <= (sljit_sw)compiler->size - (sizeof(struct sljit_function_context) / sizeof(sljit_ins))); #else @@ -503,6 +575,21 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil jump = jump->next; } + put_label = compiler->put_labels; + while (put_label) { +#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) + addr = put_label->label->addr; + buf_ptr = (sljit_ins *)put_label->addr; + + SLJIT_ASSERT((buf_ptr[0] & 0xfc1f0000) == ADDIS && (buf_ptr[1] & 0xfc000000) == ORI); + buf_ptr[0] |= (addr >> 16) & 0xffff; + buf_ptr[1] |= addr & 0xffff; +#else + put_label_set(put_label); +#endif + put_label = put_label->next; + } + compiler->error = SLJIT_ERR_COMPILED; compiler->executable_offset = executable_offset; compiler->executable_size = (code_ptr - code) * sizeof(sljit_ins); @@ -2261,7 +2348,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fmem(struct sljit_compiler *compil SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw init_value) { struct sljit_const *const_; - sljit_s32 reg; + sljit_s32 dst_r; CHECK_ERROR_PTR(); CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value)); @@ -2271,11 +2358,38 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compi PTR_FAIL_IF(!const_); set_const(const_, compiler); - reg = FAST_IS_REG(dst) ? dst : TMP_REG2; - - PTR_FAIL_IF(emit_const(compiler, reg, init_value)); + dst_r = FAST_IS_REG(dst) ? dst : TMP_REG2; + PTR_FAIL_IF(emit_const(compiler, dst_r, init_value)); if (dst & SLJIT_MEM) PTR_FAIL_IF(emit_op(compiler, SLJIT_MOV, WORD_DATA, dst, dstw, TMP_REG1, 0, TMP_REG2, 0)); + return const_; } + +SLJIT_API_FUNC_ATTRIBUTE struct sljit_put_label* sljit_emit_put_label(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw) +{ + struct sljit_put_label *put_label; + sljit_s32 dst_r; + + CHECK_ERROR_PTR(); + CHECK_PTR(check_sljit_emit_put_label(compiler, dst, dstw)); + ADJUST_LOCAL_OFFSET(dst, dstw); + + put_label = (struct sljit_put_label*)ensure_abuf(compiler, sizeof(struct sljit_put_label)); + PTR_FAIL_IF(!put_label); + set_put_label(put_label, compiler, 0); + + dst_r = FAST_IS_REG(dst) ? dst : TMP_REG2; +#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) + PTR_FAIL_IF(emit_const(compiler, dst_r, 0)); +#else + PTR_FAIL_IF(push_inst(compiler, dst_r)); + compiler->size += 4; +#endif + + if (dst & SLJIT_MEM) + PTR_FAIL_IF(emit_op(compiler, SLJIT_MOV, WORD_DATA, dst, dstw, TMP_REG1, 0, TMP_REG2, 0)); + + return put_label; +} diff --git a/ext/pcre/pcre2lib/sljit/sljitNativeSPARC_32.c b/ext/pcre/pcre2lib/sljit/sljitNativeSPARC_32.c index 0671b130cc6d9..8079fad8df84b 100644 --- a/ext/pcre/pcre2lib/sljit/sljitNativeSPARC_32.c +++ b/ext/pcre/pcre2lib/sljit/sljitNativeSPARC_32.c @@ -267,6 +267,7 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_ta { sljit_ins *inst = (sljit_ins *)addr; + SLJIT_ASSERT(((inst[0] & 0xc1c00000) == 0x01000000) && ((inst[1] & 0xc1f82000) == 0x80102000)); inst[0] = (inst[0] & 0xffc00000) | ((new_target >> 10) & 0x3fffff); inst[1] = (inst[1] & 0xfffffc00) | (new_target & 0x3ff); inst = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset); @@ -277,6 +278,7 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_consta { sljit_ins *inst = (sljit_ins *)addr; + SLJIT_ASSERT(((inst[0] & 0xc1c00000) == 0x01000000) && ((inst[1] & 0xc1f82000) == 0x80102000)); inst[0] = (inst[0] & 0xffc00000) | ((new_constant >> 10) & 0x3fffff); inst[1] = (inst[1] & 0xfffffc00) | (new_constant & 0x3ff); inst = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset); diff --git a/ext/pcre/pcre2lib/sljit/sljitNativeSPARC_common.c b/ext/pcre/pcre2lib/sljit/sljitNativeSPARC_common.c index 669ecd8152849..bfa4ecede2f84 100644 --- a/ext/pcre/pcre2lib/sljit/sljitNativeSPARC_common.c +++ b/ext/pcre/pcre2lib/sljit/sljitNativeSPARC_common.c @@ -298,12 +298,14 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil sljit_ins *buf_ptr; sljit_ins *buf_end; sljit_uw word_count; + sljit_uw next_addr; sljit_sw executable_offset; sljit_uw addr; struct sljit_label *label; struct sljit_jump *jump; struct sljit_const *const_; + struct sljit_put_label *put_label; CHECK_ERROR_PTR(); CHECK_PTR(check_sljit_generate_code(compiler)); @@ -315,40 +317,52 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil code_ptr = code; word_count = 0; + next_addr = 0; executable_offset = SLJIT_EXEC_OFFSET(code); label = compiler->labels; jump = compiler->jumps; const_ = compiler->consts; + put_label = compiler->put_labels; do { buf_ptr = (sljit_ins*)buf->memory; buf_end = buf_ptr + (buf->used_size >> 2); do { *code_ptr = *buf_ptr++; - SLJIT_ASSERT(!label || label->size >= word_count); - SLJIT_ASSERT(!jump || jump->addr >= word_count); - SLJIT_ASSERT(!const_ || const_->addr >= word_count); - /* These structures are ordered by their address. */ - if (label && label->size == word_count) { - /* Just recording the address. */ - label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); - label->size = code_ptr - code; - label = label->next; - } - if (jump && jump->addr == word_count) { + if (next_addr == word_count) { + SLJIT_ASSERT(!label || label->size >= word_count); + SLJIT_ASSERT(!jump || jump->addr >= word_count); + SLJIT_ASSERT(!const_ || const_->addr >= word_count); + SLJIT_ASSERT(!put_label || put_label->addr >= word_count); + + /* These structures are ordered by their address. */ + if (label && label->size == word_count) { + /* Just recording the address. */ + label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); + label->size = code_ptr - code; + label = label->next; + } + if (jump && jump->addr == word_count) { #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32) - jump->addr = (sljit_uw)(code_ptr - 3); + jump->addr = (sljit_uw)(code_ptr - 3); #else - jump->addr = (sljit_uw)(code_ptr - 6); + jump->addr = (sljit_uw)(code_ptr - 6); #endif - code_ptr = detect_jump_type(jump, code_ptr, code, executable_offset); - jump = jump->next; - } - if (const_ && const_->addr == word_count) { - /* Just recording the address. */ - const_->addr = (sljit_uw)code_ptr; - const_ = const_->next; + code_ptr = detect_jump_type(jump, code_ptr, code, executable_offset); + jump = jump->next; + } + if (const_ && const_->addr == word_count) { + /* Just recording the address. */ + const_->addr = (sljit_uw)code_ptr; + const_ = const_->next; + } + if (put_label && put_label->addr == word_count) { + SLJIT_ASSERT(put_label->label); + put_label->addr = (sljit_uw)code_ptr; + put_label = put_label->next; + } + next_addr = compute_next_addr(label, jump, const_, put_label); } code_ptr ++; word_count ++; @@ -366,6 +380,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil SLJIT_ASSERT(!label); SLJIT_ASSERT(!jump); SLJIT_ASSERT(!const_); + SLJIT_ASSERT(!put_label); SLJIT_ASSERT(code_ptr - code <= (sljit_s32)compiler->size); jump = compiler->jumps; @@ -389,8 +404,9 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil /* Set the fields of immediate loads. */ #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32) - buf_ptr[0] = (buf_ptr[0] & 0xffc00000) | ((addr >> 10) & 0x3fffff); - buf_ptr[1] = (buf_ptr[1] & 0xfffffc00) | (addr & 0x3ff); + SLJIT_ASSERT(((buf_ptr[0] & 0xc1cfffff) == 0x01000000) && ((buf_ptr[1] & 0xc1f83fff) == 0x80102000)); + buf_ptr[0] |= (addr >> 10) & 0x3fffff; + buf_ptr[1] |= addr & 0x3ff; #else #error "Implementation required" #endif @@ -398,6 +414,20 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil jump = jump->next; } + put_label = compiler->put_labels; + while (put_label) { + addr = put_label->label->addr; + buf_ptr = (sljit_ins *)put_label->addr; + +#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32) + SLJIT_ASSERT(((buf_ptr[0] & 0xc1cfffff) == 0x01000000) && ((buf_ptr[1] & 0xc1f83fff) == 0x80102000)); + buf_ptr[0] |= (addr >> 10) & 0x3fffff; + buf_ptr[1] |= addr & 0x3ff; +#else +#error "Implementation required" +#endif + put_label = put_label->next; + } compiler->error = SLJIT_ERR_COMPILED; compiler->executable_offset = executable_offset; @@ -1465,8 +1495,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_cmov(struct sljit_compiler *compil SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw init_value) { - sljit_s32 reg; struct sljit_const *const_; + sljit_s32 dst_r; CHECK_ERROR_PTR(); CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value)); @@ -1476,11 +1506,31 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compi PTR_FAIL_IF(!const_); set_const(const_, compiler); - reg = FAST_IS_REG(dst) ? dst : TMP_REG2; - - PTR_FAIL_IF(emit_const(compiler, reg, init_value)); + dst_r = FAST_IS_REG(dst) ? dst : TMP_REG2; + PTR_FAIL_IF(emit_const(compiler, dst_r, init_value)); if (dst & SLJIT_MEM) PTR_FAIL_IF(emit_op_mem(compiler, WORD_DATA, TMP_REG2, dst, dstw)); return const_; } + +SLJIT_API_FUNC_ATTRIBUTE struct sljit_put_label* sljit_emit_put_label(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw) +{ + struct sljit_put_label *put_label; + sljit_s32 dst_r; + + CHECK_ERROR_PTR(); + CHECK_PTR(check_sljit_emit_put_label(compiler, dst, dstw)); + ADJUST_LOCAL_OFFSET(dst, dstw); + + put_label = (struct sljit_put_label*)ensure_abuf(compiler, sizeof(struct sljit_put_label)); + PTR_FAIL_IF(!put_label); + set_put_label(put_label, compiler, 0); + + dst_r = FAST_IS_REG(dst) ? dst : TMP_REG2; + PTR_FAIL_IF(emit_const(compiler, dst_r, 0)); + + if (dst & SLJIT_MEM) + PTR_FAIL_IF(emit_op_mem(compiler, WORD_DATA, TMP_REG2, dst, dstw)); + return put_label; +} diff --git a/ext/pcre/pcre2lib/sljit/sljitNativeX86_32.c b/ext/pcre/pcre2lib/sljit/sljitNativeX86_32.c index 074e64b9f2bb6..34a3a3d940247 100644 --- a/ext/pcre/pcre2lib/sljit/sljitNativeX86_32.c +++ b/ext/pcre/pcre2lib/sljit/sljitNativeX86_32.c @@ -38,8 +38,10 @@ static sljit_s32 emit_do_imm(struct sljit_compiler *compiler, sljit_u8 opcode, s return SLJIT_SUCCESS; } -static sljit_u8* generate_far_jump_code(struct sljit_jump *jump, sljit_u8 *code_ptr, sljit_s32 type, sljit_sw executable_offset) +static sljit_u8* generate_far_jump_code(struct sljit_jump *jump, sljit_u8 *code_ptr, sljit_sw executable_offset) { + sljit_s32 type = jump->flags >> TYPE_SHIFT; + if (type == SLJIT_JUMP) { *code_ptr++ = JMP_i32; jump->addr++; diff --git a/ext/pcre/pcre2lib/sljit/sljitNativeX86_64.c b/ext/pcre/pcre2lib/sljit/sljitNativeX86_64.c index 8506565614422..5758711954047 100644 --- a/ext/pcre/pcre2lib/sljit/sljitNativeX86_64.c +++ b/ext/pcre/pcre2lib/sljit/sljitNativeX86_64.c @@ -39,8 +39,10 @@ static sljit_s32 emit_load_imm64(struct sljit_compiler *compiler, sljit_s32 reg, return SLJIT_SUCCESS; } -static sljit_u8* generate_far_jump_code(struct sljit_jump *jump, sljit_u8 *code_ptr, sljit_s32 type) +static sljit_u8* generate_far_jump_code(struct sljit_jump *jump, sljit_u8 *code_ptr) { + sljit_s32 type = jump->flags >> TYPE_SHIFT; + int short_addr = !(jump->flags & SLJIT_REWRITABLE_JUMP) && !(jump->flags & JUMP_LABEL) && (jump->u.target <= 0xffffffff); /* The relative jump below specialized for this case. */ @@ -72,6 +74,56 @@ static sljit_u8* generate_far_jump_code(struct sljit_jump *jump, sljit_u8 *code_ return code_ptr; } +static sljit_u8* generate_put_label_code(struct sljit_put_label *put_label, sljit_u8 *code_ptr, sljit_uw max_label) +{ + if (max_label > HALFWORD_MAX) { + put_label->addr -= put_label->flags; + put_label->flags = PATCH_MD; + return code_ptr; + } + + if (put_label->flags == 0) { + /* Destination is register. */ + code_ptr = (sljit_u8*)put_label->addr - 2 - sizeof(sljit_uw); + + SLJIT_ASSERT((code_ptr[0] & 0xf8) == REX_W); + SLJIT_ASSERT((code_ptr[1] & 0xf8) == MOV_r_i32); + + if ((code_ptr[0] & 0x07) != 0) { + code_ptr[0] = (sljit_u8)(code_ptr[0] & ~0x08); + code_ptr += 2 + sizeof(sljit_s32); + } + else { + code_ptr[0] = code_ptr[1]; + code_ptr += 1 + sizeof(sljit_s32); + } + + put_label->addr = (sljit_uw)code_ptr; + return code_ptr; + } + + code_ptr -= put_label->flags + (2 + sizeof(sljit_uw)); + SLJIT_MEMMOVE(code_ptr, code_ptr + (2 + sizeof(sljit_uw)), put_label->flags); + + SLJIT_ASSERT((code_ptr[0] & 0xf8) == REX_W); + + if ((code_ptr[1] & 0xf8) == MOV_r_i32) { + code_ptr += 2 + sizeof(sljit_uw); + SLJIT_ASSERT((code_ptr[0] & 0xf8) == REX_W); + } + + SLJIT_ASSERT(code_ptr[1] == MOV_rm_r); + + code_ptr[0] = (sljit_u8)(code_ptr[0] & ~0x4); + code_ptr[1] = MOV_rm_i32; + code_ptr[2] = (sljit_u8)(code_ptr[2] & ~(0x7 << 3)); + + code_ptr = (sljit_u8*)(put_label->addr - (2 + sizeof(sljit_uw)) + sizeof(sljit_s32)); + put_label->addr = (sljit_uw)code_ptr; + put_label->flags = 0; + return code_ptr; +} + SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compiler, sljit_s32 options, sljit_s32 arg_types, sljit_s32 scratches, sljit_s32 saveds, sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size) diff --git a/ext/pcre/pcre2lib/sljit/sljitNativeX86_common.c b/ext/pcre/pcre2lib/sljit/sljitNativeX86_common.c index 6f02ee3e8b4e6..6296da5382251 100644 --- a/ext/pcre/pcre2lib/sljit/sljitNativeX86_common.c +++ b/ext/pcre/pcre2lib/sljit/sljitNativeX86_common.c @@ -428,13 +428,15 @@ static sljit_u8 get_jump_code(sljit_s32 type) } #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) -static sljit_u8* generate_far_jump_code(struct sljit_jump *jump, sljit_u8 *code_ptr, sljit_s32 type, sljit_sw executable_offset); +static sljit_u8* generate_far_jump_code(struct sljit_jump *jump, sljit_u8 *code_ptr, sljit_sw executable_offset); #else -static sljit_u8* generate_far_jump_code(struct sljit_jump *jump, sljit_u8 *code_ptr, sljit_s32 type); +static sljit_u8* generate_far_jump_code(struct sljit_jump *jump, sljit_u8 *code_ptr); +static sljit_u8* generate_put_label_code(struct sljit_put_label *put_label, sljit_u8 *code_ptr, sljit_uw max_label); #endif -static sljit_u8* generate_near_jump_code(struct sljit_jump *jump, sljit_u8 *code_ptr, sljit_u8 *code, sljit_s32 type, sljit_sw executable_offset) +static sljit_u8* generate_near_jump_code(struct sljit_jump *jump, sljit_u8 *code_ptr, sljit_u8 *code, sljit_sw executable_offset) { + sljit_s32 type = jump->flags >> TYPE_SHIFT; sljit_s32 short_jump; sljit_uw label_addr; @@ -447,7 +449,7 @@ static sljit_u8* generate_near_jump_code(struct sljit_jump *jump, sljit_u8 *code #if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) if ((sljit_sw)(label_addr - (jump->addr + 1)) > HALFWORD_MAX || (sljit_sw)(label_addr - (jump->addr + 1)) < HALFWORD_MIN) - return generate_far_jump_code(jump, code_ptr, type); + return generate_far_jump_code(jump, code_ptr); #endif if (type == SLJIT_JUMP) { @@ -497,6 +499,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil struct sljit_label *label; struct sljit_jump *jump; struct sljit_const *const_; + struct sljit_put_label *put_label; CHECK_ERROR_PTR(); CHECK_PTR(check_sljit_generate_code(compiler)); @@ -511,6 +514,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil label = compiler->labels; jump = compiler->jumps; const_ = compiler->consts; + put_label = compiler->put_labels; executable_offset = SLJIT_EXEC_OFFSET(code); do { @@ -525,27 +529,38 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil buf_ptr += len; } else { - if (*buf_ptr >= 2) { + switch (*buf_ptr) { + case 0: + label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); + label->size = code_ptr - code; + label = label->next; + break; + case 1: jump->addr = (sljit_uw)code_ptr; if (!(jump->flags & SLJIT_REWRITABLE_JUMP)) - code_ptr = generate_near_jump_code(jump, code_ptr, code, *buf_ptr - 2, executable_offset); + code_ptr = generate_near_jump_code(jump, code_ptr, code, executable_offset); else { #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) - code_ptr = generate_far_jump_code(jump, code_ptr, *buf_ptr - 2, executable_offset); + code_ptr = generate_far_jump_code(jump, code_ptr, executable_offset); #else - code_ptr = generate_far_jump_code(jump, code_ptr, *buf_ptr - 2); + code_ptr = generate_far_jump_code(jump, code_ptr); #endif } jump = jump->next; - } - else if (*buf_ptr == 0) { - label->addr = ((sljit_uw)code_ptr) + executable_offset; - label->size = code_ptr - code; - label = label->next; - } - else { /* *buf_ptr is 1 */ + break; + case 2: const_->addr = ((sljit_uw)code_ptr) - sizeof(sljit_sw); const_ = const_->next; + break; + default: + SLJIT_ASSERT(*buf_ptr == 3); + SLJIT_ASSERT(put_label->label); + put_label->addr = (sljit_uw)code_ptr; +#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) + code_ptr = generate_put_label_code(put_label, code_ptr, (sljit_uw)(SLJIT_ADD_EXEC_OFFSET(code, executable_offset) + put_label->label->size)); +#endif + put_label = put_label->next; + break; } buf_ptr++; } @@ -557,6 +572,8 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil SLJIT_ASSERT(!label); SLJIT_ASSERT(!jump); SLJIT_ASSERT(!const_); + SLJIT_ASSERT(!put_label); + SLJIT_ASSERT(code_ptr <= code + compiler->size); jump = compiler->jumps; while (jump) { @@ -591,8 +608,24 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil jump = jump->next; } - /* Some space may be wasted because of short jumps. */ - SLJIT_ASSERT(code_ptr <= code + compiler->size); + put_label = compiler->put_labels; + while (put_label) { +#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) + sljit_unaligned_store_sw((void*)(put_label->addr - sizeof(sljit_sw)), (sljit_sw)put_label->label->addr); +#else + if (put_label->flags & PATCH_MD) { + SLJIT_ASSERT(put_label->label->addr > HALFWORD_MAX); + sljit_unaligned_store_sw((void*)(put_label->addr - sizeof(sljit_sw)), (sljit_sw)put_label->label->addr); + } + else { + SLJIT_ASSERT(put_label->label->addr <= HALFWORD_MAX); + sljit_unaligned_store_s32((void*)(put_label->addr - sizeof(sljit_s32)), (sljit_s32)put_label->label->addr); + } +#endif + + put_label = put_label->next; + } + compiler->error = SLJIT_ERR_COMPILED; compiler->executable_offset = executable_offset; compiler->executable_size = code_ptr - code; @@ -2481,7 +2514,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compile jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); PTR_FAIL_IF_NULL(jump); - set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP); + set_jump(jump, compiler, (type & SLJIT_REWRITABLE_JUMP) | ((type & 0xff) << TYPE_SHIFT)); type &= 0xff; /* Worst case size. */ @@ -2495,7 +2528,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compile PTR_FAIL_IF_NULL(inst); *inst++ = 0; - *inst++ = type + 2; + *inst++ = 1; return jump; } @@ -2513,7 +2546,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compi if (src == SLJIT_IMM) { jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); FAIL_IF_NULL(jump); - set_jump(jump, compiler, JUMP_ADDR); + set_jump(jump, compiler, JUMP_ADDR | (type << TYPE_SHIFT)); jump->u.target = srcw; /* Worst case size. */ @@ -2527,7 +2560,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compi FAIL_IF_NULL(inst); *inst++ = 0; - *inst++ = type + 2; + *inst++ = 1; } else { #if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) @@ -2831,7 +2864,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compi PTR_FAIL_IF(!inst); *inst++ = 0; - *inst++ = 1; + *inst++ = 2; #if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) if (dst & SLJIT_MEM) @@ -2842,6 +2875,54 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compi return const_; } +SLJIT_API_FUNC_ATTRIBUTE struct sljit_put_label* sljit_emit_put_label(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw) +{ + struct sljit_put_label *put_label; + sljit_u8 *inst; +#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) + sljit_s32 reg; + sljit_uw start_size; +#endif + + CHECK_ERROR_PTR(); + CHECK_PTR(check_sljit_emit_put_label(compiler, dst, dstw)); + ADJUST_LOCAL_OFFSET(dst, dstw); + + CHECK_EXTRA_REGS(dst, dstw, (void)0); + + put_label = (struct sljit_put_label*)ensure_abuf(compiler, sizeof(struct sljit_put_label)); + PTR_FAIL_IF(!put_label); + set_put_label(put_label, compiler, 0); + +#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) + compiler->mode32 = 0; + reg = FAST_IS_REG(dst) ? dst : TMP_REG1; + + if (emit_load_imm64(compiler, reg, 0)) + return NULL; +#else + if (emit_mov(compiler, dst, dstw, SLJIT_IMM, 0)) + return NULL; +#endif + +#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) + if (dst & SLJIT_MEM) { + start_size = compiler->size; + if (emit_mov(compiler, dst, dstw, TMP_REG1, 0)) + return NULL; + put_label->flags = compiler->size - start_size; + } +#endif + + inst = (sljit_u8*)ensure_buf(compiler, 2); + PTR_FAIL_IF(!inst); + + *inst++ = 0; + *inst++ = 3; + + return put_label; +} + SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_target, sljit_sw executable_offset) { SLJIT_UNUSED_ARG(executable_offset); diff --git a/ext/pcre/pcre2lib/sljit/sljitUtils.c b/ext/pcre/pcre2lib/sljit/sljitUtils.c index 5c2a83893281a..857492a174811 100644 --- a/ext/pcre/pcre2lib/sljit/sljitUtils.c +++ b/ext/pcre/pcre2lib/sljit/sljitUtils.c @@ -154,7 +154,13 @@ SLJIT_API_FUNC_ATTRIBUTE void SLJIT_FUNC sljit_release_lock(void) #include "windows.h" #else /* Provides mmap function. */ +#include #include +#ifndef MAP_ANON +#ifdef MAP_ANONYMOUS +#define MAP_ANON MAP_ANONYMOUS +#endif +#endif /* For detecting the page size. */ #include From 11c698f1f3da6aa85cedef877a18b19e6b893947 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 22 Apr 2020 15:56:54 +0300 Subject: [PATCH 226/338] Reorder conditions --- ext/opcache/jit/zend_jit_trace.c | 62 +++++++++++++------------------- 1 file changed, 25 insertions(+), 37 deletions(-) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 394554500df5e..2f19ddd6f3985 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -1840,40 +1840,34 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace support_opline = zend_jit_opline_supports_reg(op_array, ssa, opline, ssa_op); - if (support_opline) { - if (ssa_op->op1_use >= 0 - && start[ssa_op->op1_use] >= 0 - && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op1_use)) { + if (ssa_op->op1_use >= 0 + && start[ssa_op->op1_use] >= 0 + && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op1_use)) { + if (support_opline) { end[ssa_op->op1_use] = idx; - } - if (ssa_op->op2_use >= 0 - && start[ssa_op->op2_use] >= 0 - && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op2_use)) { - end[ssa_op->op2_use] = idx; - } - if (ssa_op->result_use >= 0 - && start[ssa_op->result_use] >= 0 - && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->result_use)) { - end[ssa_op->result_use] = idx; - } - } else { - if (ssa_op->op1_use >= 0 - && start[ssa_op->op1_use] >= 0 - && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op1_use)) { + } else { start[ssa_op->op1_use] = -1; end[ssa_op->op1_use] = -1; count--; } - if (ssa_op->op2_use >= 0 - && start[ssa_op->op2_use] >= 0 - && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op2_use)) { + } + if (ssa_op->op2_use >= 0 + && start[ssa_op->op2_use] >= 0 + && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op2_use)) { + if (support_opline) { + end[ssa_op->op2_use] = idx; + } else { start[ssa_op->op2_use] = -1; end[ssa_op->op2_use] = -1; count--; } - if (ssa_op->result_use >= 0 - && start[ssa_op->result_use] >= 0 - && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->result_use)) { + } + if (ssa_op->result_use >= 0 + && start[ssa_op->result_use] >= 0 + && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->result_use)) { + if (support_opline) { + end[ssa_op->result_use] = idx; + } else { start[ssa_op->result_use] = -1; end[ssa_op->result_use] = -1; count--; @@ -1933,16 +1927,12 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace /* OP_DATA */ ssa_op++; opline++; - if (support_opline) { - if (ssa_op->op1_use >= 0 - && start[ssa_op->op1_use] >= 0 - && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op1_use)) { + if (ssa_op->op1_use >= 0 + && start[ssa_op->op1_use] >= 0 + && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op1_use)) { + if (support_opline) { end[ssa_op->op1_use] = idx; - } - } else { - if (ssa_op->op1_use >= 0 - && start[ssa_op->op1_use] >= 0 - && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op1_use)) { + } else { start[ssa_op->op1_use] = -1; end[ssa_op->op1_use] = -1; count--; @@ -1951,9 +1941,7 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace if (ssa_op->op1_def >= 0) { zend_jit_close_var(stack, EX_VAR_TO_NUM(opline->op1.var), ssa, ssa_opcodes, op_array, op_array_ssa, start, end, flags, idx); SET_STACK_VAR(stack, EX_VAR_TO_NUM(opline->op1.var), ssa_op->op1_def); - } - if (support_opline) { - if (ssa_op->op1_def >= 0 + if (support_opline && (ssa->vars[ssa_op->op1_def].use_chain >= 0 || ssa->vars[ssa_op->op1_def].phi_use_chain) && zend_jit_var_supports_reg(ssa, ssa_op->op1_def)) { From a1a044dcc74379fafb2b63db5ab033aa062aada7 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Tue, 7 Apr 2020 15:41:06 +0200 Subject: [PATCH 227/338] Add additional preg_match test case --- ext/pcre/tests/preg_match_latin.phpt | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 ext/pcre/tests/preg_match_latin.phpt diff --git a/ext/pcre/tests/preg_match_latin.phpt b/ext/pcre/tests/preg_match_latin.phpt new file mode 100644 index 0000000000000..8f1d1899cb1c0 --- /dev/null +++ b/ext/pcre/tests/preg_match_latin.phpt @@ -0,0 +1,35 @@ +--TEST-- +preg_match() single line match with latin input +--FILE-- + +===Done=== +--EXPECT-- +array(3) { + [0]=> + array(1) { + [0]=> + string(5) "latin" + } + [1]=> + array(1) { + [0]=> + string(18) "кириллица" + } + [2]=> + array(1) { + [0]=> + string(5) "latin" + } +} +===Done=== From ccca2c448df35ac457eeef11fb7f0d604de3e5f9 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 22 Apr 2020 14:11:13 +0200 Subject: [PATCH 228/338] Fix #79503: Memory leak on duplicate metadata Duplicate metadata can only happen if someone tampers with the phar, so we can and should treat that as error. --- NEWS | 3 +++ ext/phar/tar.c | 8 ++++++++ ext/phar/tests/bug79503.phar | Bin 0 -> 4001 bytes ext/phar/tests/bug79503.phpt | 16 ++++++++++++++++ 4 files changed, 27 insertions(+) create mode 100644 ext/phar/tests/bug79503.phar create mode 100644 ext/phar/tests/bug79503.phpt diff --git a/NEWS b/NEWS index 84b0a46b1a115..1831014f2417e 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,9 @@ PHP NEWS . Fixed bug #79497 (stream_socket_client() throws an unknown error sometimes with <1s timeout). (Joe Cai) +- Phar: + . Fix bug #79503 (Memory leak on duplicate metadata). (cmb) + - Standard: . Fixed bug #79468 (SIGSEGV when closing stream handle with a stream filter appended). (dinosaur) diff --git a/ext/phar/tar.c b/ext/phar/tar.c index 7004676e0baf8..5df5bfec7334f 100644 --- a/ext/phar/tar.c +++ b/ext/phar/tar.c @@ -181,9 +181,17 @@ static int phar_tar_process_metadata(phar_entry_info *entry, php_stream *fp) /* } if (entry->filename_len == sizeof(".phar/.metadata.bin")-1 && !memcmp(entry->filename, ".phar/.metadata.bin", sizeof(".phar/.metadata.bin")-1)) { + if (Z_TYPE(entry->phar->metadata) != IS_UNDEF) { + efree(metadata); + return FAILURE; + } entry->phar->metadata = entry->metadata; ZVAL_UNDEF(&entry->metadata); } else if (entry->filename_len >= sizeof(".phar/.metadata/") + sizeof("/.metadata.bin") - 1 && NULL != (mentry = zend_hash_str_find_ptr(&(entry->phar->manifest), entry->filename + sizeof(".phar/.metadata/") - 1, entry->filename_len - (sizeof("/.metadata.bin") - 1 + sizeof(".phar/.metadata/") - 1)))) { + if (Z_TYPE(mentry->metadata) != IS_UNDEF) { + efree(metadata); + return FAILURE; + } /* transfer this metadata to the entry it refers */ mentry->metadata = entry->metadata; ZVAL_UNDEF(&entry->metadata); diff --git a/ext/phar/tests/bug79503.phar b/ext/phar/tests/bug79503.phar new file mode 100644 index 0000000000000000000000000000000000000000..d378c6f3dfff1eb7b8ba8d9fdbbd1a326aa6ecaa GIT binary patch literal 4001 zcmdNZ$Ve>GFD@xf(ksX)V4w*w00J{JGYqpq;$UEA%wT9_3RGiaXk=*402DJfGBs2% zz|cVhfzslV#3G=TG%$K77-?e81_~4LGCq;E@h4^?6N1u>* zXMf)SPaoGH4NYqWdplmPq2R4iHxd~Fz+4Z^|9ZKpC5b7CC5d`TnR!I&BwiUbmt$yv ziW?XhnSk;<3;@}NKr!Rd{Erc0)E6kWGBmPM@{Nr5bq#TJaSU;cSF*-w%V_?`88kyx zVl@Ac?E0Ui{7*z8|B42P&@#YEe*cGn0d@wpt^YxufhDQMCA8}aK->hX=<)Uk3^Dox fX2!twfRQnIej-WN2=5P&6jl@{W}-mvh|&rGAa`$= literal 0 HcmV?d00001 diff --git a/ext/phar/tests/bug79503.phpt b/ext/phar/tests/bug79503.phpt new file mode 100644 index 0000000000000..874330fac743c --- /dev/null +++ b/ext/phar/tests/bug79503.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #79503 (Memory leak on duplicate metadata) +--SKIPIF-- + +--FILE-- +getMessage(); +} +?> +--EXPECTF-- +phar error: tar-based phar "%s%ebug79503.phar" has invalid metadata in magic file ".phar/.metadata.bin" From 630897f9962e734f027e2e277b00f8b4db89ef5c Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Tue, 21 Apr 2020 19:19:53 -0400 Subject: [PATCH 229/338] Document change to ReflectionMethod->isConstructor/isDestructor See https://externals.io/message/109377 This prevented PHPUnit's test doubles from being created for interfaces. The reason this changed is https://github.com/php/php-src/pull/3846/files#diff-3a8139128d4026ce0cb0c86beba4e6b9L5549-R5605 (ReflectionMethod::isConstruct checks if the method is the zend_class_entry's constructor, etc.) --- UPGRADING | 5 +- .../tests/ReflectionMethod_basic1.phpt | 128 ++++++++++++++++++ 2 files changed, 132 insertions(+), 1 deletion(-) diff --git a/UPGRADING b/UPGRADING index b6cc20547143f..000e5866777d1 100644 --- a/UPGRADING +++ b/UPGRADING @@ -192,7 +192,7 @@ PHP 8.0 UPGRADE NOTES - dom: . Remove unimplemented classes from ext/dom that had no behavior and contained test data. These classes have also been removed in the latest version of DOM - standard: + standard: * DOMNameList * DomImplementationList @@ -325,6 +325,9 @@ PHP 8.0 UPGRADE NOTES ReflectionParameter::getDefaultValue() ReflectionParameter::isDefaultValueConstant() ReflectionParameter::getDefaultValueConstantName() + . ReflectionMethod::isConstructor() and ReflectionMethod::isDestructor() now + also return true for `__construct` and `__destruct` in methods of interfaces. + Previously, this would only be true in methods of classes and traits. - Socket: . The deprecated AI_IDN_ALLOW_UNASSIGNED and AI_IDN_USE_STD3_ASCII_RULES diff --git a/ext/reflection/tests/ReflectionMethod_basic1.phpt b/ext/reflection/tests/ReflectionMethod_basic1.phpt index 8eb970babb8bc..e065d28ec62ff 100644 --- a/ext/reflection/tests/ReflectionMethod_basic1.phpt +++ b/ext/reflection/tests/ReflectionMethod_basic1.phpt @@ -49,6 +49,14 @@ class DerivedClass extends TestClass {} interface TestInterface { public function int(); + public function __construct($arg); + public function __destruct(); +} + +trait TestTrait { + public abstract function __construct(); + public function __destruct() { + } } reflectMethod("DerivedClass", "foo"); @@ -59,6 +67,10 @@ reflectMethod("DerivedClass", "prot"); reflectMethod("TestInterface", "int"); reflectMethod("ReflectionProperty", "__construct"); reflectMethod("TestClass", "__destruct"); +reflectMethod("TestInterface", "__construct"); +reflectMethod("TestInterface", "__destruct"); +reflectMethod("TestTrait", "__construct"); +reflectMethod("TestTrait", "__destruct"); ?> --EXPECT-- @@ -269,6 +281,122 @@ bool(false) Reflecting on method TestClass::__destruct() +isFinal(): +bool(false) + +isAbstract(): +bool(false) + +isPublic(): +bool(true) + +isPrivate(): +bool(false) + +isProtected(): +bool(false) + +isStatic(): +bool(false) + +isConstructor(): +bool(false) + +isDestructor(): +bool(true) + +********************************** +********************************** +Reflecting on method TestInterface::__construct() + + +isFinal(): +bool(false) + +isAbstract(): +bool(true) + +isPublic(): +bool(true) + +isPrivate(): +bool(false) + +isProtected(): +bool(false) + +isStatic(): +bool(false) + +isConstructor(): +bool(true) + +isDestructor(): +bool(false) + +********************************** +********************************** +Reflecting on method TestInterface::__destruct() + + +isFinal(): +bool(false) + +isAbstract(): +bool(true) + +isPublic(): +bool(true) + +isPrivate(): +bool(false) + +isProtected(): +bool(false) + +isStatic(): +bool(false) + +isConstructor(): +bool(false) + +isDestructor(): +bool(true) + +********************************** +********************************** +Reflecting on method TestTrait::__construct() + + +isFinal(): +bool(false) + +isAbstract(): +bool(true) + +isPublic(): +bool(true) + +isPrivate(): +bool(false) + +isProtected(): +bool(false) + +isStatic(): +bool(false) + +isConstructor(): +bool(true) + +isDestructor(): +bool(false) + +********************************** +********************************** +Reflecting on method TestTrait::__destruct() + + isFinal(): bool(false) From d9a96629fe33d7b058bb8324ed374cd405be5d4a Mon Sep 17 00:00:00 2001 From: Symeon Charalabides Date: Wed, 22 Apr 2020 15:33:22 +0200 Subject: [PATCH 230/338] Tests for the default case of the parameter of xml_parser_get_option() and xml_parser_set_option(). These cases are, as of now, not being tested. --- .../xml_parser_get_option_variation4.phpt | 19 +++++++++++++++++++ .../xml_parser_set_option_variation5.phpt | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 ext/xml/tests/xml_parser_get_option_variation4.phpt create mode 100644 ext/xml/tests/xml_parser_set_option_variation5.phpt diff --git a/ext/xml/tests/xml_parser_get_option_variation4.phpt b/ext/xml/tests/xml_parser_get_option_variation4.phpt new file mode 100644 index 0000000000000..9b3c7736279d0 --- /dev/null +++ b/ext/xml/tests/xml_parser_get_option_variation4.phpt @@ -0,0 +1,19 @@ +--TEST-- +xml_parser_get_option() - Test parameter not set +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: xml_parser_get_option(): Unknown option in %s on line %d +bool(false) diff --git a/ext/xml/tests/xml_parser_set_option_variation5.phpt b/ext/xml/tests/xml_parser_set_option_variation5.phpt new file mode 100644 index 0000000000000..0ef45d50c6dc5 --- /dev/null +++ b/ext/xml/tests/xml_parser_set_option_variation5.phpt @@ -0,0 +1,19 @@ +--TEST-- +xml_parser_set_option() - Test invalid parameter +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: xml_parser_set_option(): Unknown option in %s on line %d +bool(false) From 657f756ccd79b0fd1268eb9796e371aa3f76c2a8 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sat, 18 Apr 2020 12:22:00 +0200 Subject: [PATCH 231/338] Skip non-existing properties returned by __sleep() --- UPGRADING | 3 +++ ext/standard/tests/serialize/bug14293.phpt | 6 ++---- ext/standard/tests/serialize/bug69210.phpt | 12 ++++-------- .../sleep_undefined_declared_properties.phpt | 2 +- ext/standard/var.c | 1 - tests/classes/bug26737.phpt | 2 +- 6 files changed, 11 insertions(+), 15 deletions(-) diff --git a/UPGRADING b/UPGRADING index 000e5866777d1..568bdf584a448 100644 --- a/UPGRADING +++ b/UPGRADING @@ -391,6 +391,9 @@ PHP 8.0 UPGRADE NOTES using serialize_precision rather than precision. In a default configuration, this means that floating-point numbers are now printed with full accuracy by these debugging functions. + . If the array returned by __sleep() contains non-existing properties, these + are now silently ignored. Previously, such properties would have been + serialized as if they had the value NULL. - tidy: . The $use_include_path parameter, which was not used internally, has been diff --git a/ext/standard/tests/serialize/bug14293.phpt b/ext/standard/tests/serialize/bug14293.phpt index 875f8b2bc81e2..ae108ba53a740 100644 --- a/ext/standard/tests/serialize/bug14293.phpt +++ b/ext/standard/tests/serialize/bug14293.phpt @@ -27,10 +27,8 @@ var_dump($t); __sleep called Notice: serialize(): "b" returned as member variable from __sleep() but does not exist in %sbug14293.php on line %d -O:1:"t":2:{s:1:"a";s:5:"hello";s:1:"b";N;} -object(t)#%d (2) { +O:1:"t":1:{s:1:"a";s:5:"hello";} +object(t)#%d (1) { ["a"]=> string(5) "hello" - ["b"]=> - NULL } diff --git a/ext/standard/tests/serialize/bug69210.phpt b/ext/standard/tests/serialize/bug69210.phpt index 610c88f879bfa..41cc8f55f9a5d 100644 --- a/ext/standard/tests/serialize/bug69210.phpt +++ b/ext/standard/tests/serialize/bug69210.phpt @@ -35,17 +35,13 @@ var_dump(unserialize($ss)); var_dump(unserialize($si)); ?> --EXPECT-- -O:10:"testString":2:{s:1:"a";b:1;s:1:"1";N;} -O:11:"testInteger":2:{s:1:"a";b:1;s:1:"1";N;} -object(testString)#3 (2) { +O:10:"testString":1:{s:1:"a";b:1;} +O:11:"testInteger":1:{s:1:"a";b:1;} +object(testString)#3 (1) { ["a"]=> bool(true) - ["1"]=> - NULL } -object(testInteger)#3 (2) { +object(testInteger)#3 (1) { ["a"]=> bool(true) - ["1"]=> - NULL } diff --git a/ext/standard/tests/serialize/sleep_undefined_declared_properties.phpt b/ext/standard/tests/serialize/sleep_undefined_declared_properties.phpt index ac33f4388cfbf..05a638cfba8d7 100644 --- a/ext/standard/tests/serialize/sleep_undefined_declared_properties.phpt +++ b/ext/standard/tests/serialize/sleep_undefined_declared_properties.phpt @@ -26,4 +26,4 @@ Notice: serialize(): "pub" returned as member variable from __sleep() but does n Notice: serialize(): "prot" returned as member variable from __sleep() but does not exist in %s on line %d Notice: serialize(): "priv" returned as member variable from __sleep() but does not exist in %s on line %d -string(53) "O:4:"Test":3:{s:3:"pub";N;s:4:"prot";N;s:4:"priv";N;}" +string(15) "O:4:"Test":0:{}" diff --git a/ext/standard/var.c b/ext/standard/var.c index e1bc4c5597f40..9f15fc9e35b4a 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -861,7 +861,6 @@ static int php_var_serialize_get_sleep_props( php_error_docref(NULL, E_NOTICE, "\"%s\" returned as member variable from __sleep() but does not exist", ZSTR_VAL(name)); - zend_hash_add(ht, name, &EG(uninitialized_zval)); zend_tmp_string_release(tmp_name); } ZEND_HASH_FOREACH_END(); diff --git a/tests/classes/bug26737.phpt b/tests/classes/bug26737.phpt index ac7b67f5c777f..f6f33fbf805f8 100644 --- a/tests/classes/bug26737.phpt +++ b/tests/classes/bug26737.phpt @@ -19,4 +19,4 @@ var_dump(str_replace("\0", '\0', $data)); ?> --EXPECTF-- Notice: serialize(): "no_such" returned as member variable from __sleep() but does not exist in %s on line %d -string(130) "O:3:"foo":4:{s:12:"\0foo\0private";s:7:"private";s:12:"\0*\0protected";s:9:"protected";s:6:"public";s:6:"public";s:7:"no_such";N;}" +string(114) "O:3:"foo":3:{s:12:"\0foo\0private";s:7:"private";s:12:"\0*\0protected";s:9:"protected";s:6:"public";s:6:"public";}" From f91f72607b8101bfe9df3bf8327c99e9a1f21a00 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 22 Apr 2020 20:18:19 +0200 Subject: [PATCH 232/338] Drop unnecessary stdint and inttypes header checks These are always available as of C99. Closes GH-5323 Co-authored-by: "Christoph M. Becker" --- Zend/zend_strtod_int.h | 4 - build/php.m4 | 6 +- ext/fileinfo/libmagic.patch | 84 +++++---- ext/fileinfo/libmagic/file.h | 12 +- ext/mysqlnd/config-win.h | 2 +- ext/sockets/conversions.c | 2 +- ext/standard/image.c | 3 - ext/standard/iptc.c | 11 +- main/SAPI.h | 3 - main/php_stdint.h | 29 +-- main/php_variables.c | 3 - main/snprintf.c | 3 - main/spprintf.c | 2 - sapi/fpm/fpm/fpm_atomic.h | 6 +- sapi/fpm/fpm/fpm_conf.c | 6 +- sapi/fpm/fpm/fpm_php_trace.c | 6 +- sapi/fpm/fpm/fpm_trace_pread.c | 6 +- win32/php_inttypes.h | 313 --------------------------------- win32/php_stdint.h | 265 ---------------------------- 19 files changed, 57 insertions(+), 709 deletions(-) delete mode 100644 win32/php_inttypes.h delete mode 100644 win32/php_stdint.h diff --git a/Zend/zend_strtod_int.h b/Zend/zend_strtod_int.h index 5fe31f940d38d..e1cf562d64af6 100644 --- a/Zend/zend_strtod_int.h +++ b/Zend/zend_strtod_int.h @@ -42,11 +42,7 @@ https://wiki.php.net/rfc/remove_hex_support_in_numeric_strings */ #define NO_HEX_FP 1 -#if defined(HAVE_INTTYPES_H) #include -#elif defined(HAVE_STDINT_H) -#include -#endif #ifndef HAVE_INT32_T # if SIZEOF_INT == 4 diff --git a/build/php.m4 b/build/php.m4 index c43340315fa4a..1b9940147e162 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -1044,9 +1044,7 @@ AC_DEFUN([_PHP_CHECK_SIZEOF], [ AC_RUN_IFELSE([AC_LANG_SOURCE([[#include #include #include -#ifdef HAVE_INTTYPES_H #include -#endif #ifdef HAVE_UNISTD_H #include #endif @@ -2421,9 +2419,7 @@ AC_DEFUN([PHP_CHECK_STDINT_TYPES], [ AC_CHECK_SIZEOF([long long]) AC_CHECK_SIZEOF([size_t]) AC_CHECK_TYPES([int8, int16, int32, int64, int8_t, int16_t, int32_t, int64_t, uint8, uint16, uint32, uint64, uint8_t, uint16_t, uint32_t, uint64_t, u_int8_t, u_int16_t, u_int32_t, u_int64_t], [], [], [ -#if HAVE_STDINT_H -# include -#endif +#include #if HAVE_SYS_TYPES_H # include #endif diff --git a/ext/fileinfo/libmagic.patch b/ext/fileinfo/libmagic.patch index 80a38a0728f36..19a3fd9cd7f65 100644 --- a/ext/fileinfo/libmagic.patch +++ b/ext/fileinfo/libmagic.patch @@ -1,6 +1,6 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c --- libmagic.orig/apprentice.c 2019-02-20 03:35:27.000000000 +0100 -+++ libmagic/apprentice.c 2019-12-19 20:37:54.476535900 +0100 ++++ libmagic/apprentice.c 2020-04-07 22:25:10.486120900 +0200 @@ -29,6 +29,8 @@ * apprentice - make one pass through /etc/magic, learning its secrets. */ @@ -974,7 +974,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c } diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c --- libmagic.orig/ascmagic.c 2019-05-07 04:27:11.000000000 +0200 -+++ libmagic/ascmagic.c 2019-12-19 20:37:54.628894400 +0100 ++++ libmagic/ascmagic.c 2020-04-07 22:25:10.501740300 +0200 @@ -96,7 +96,7 @@ rv = file_ascmagic_with_encoding(ms, &bb, ubuf, ulen, code, type, text); @@ -1005,7 +1005,7 @@ diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c } diff -u libmagic.orig/buffer.c libmagic/buffer.c --- libmagic.orig/buffer.c 2019-05-07 04:27:11.000000000 +0200 -+++ libmagic/buffer.c 2019-12-19 20:37:54.639865800 +0100 ++++ libmagic/buffer.c 2020-04-07 22:25:10.501740300 +0200 @@ -31,19 +31,23 @@ #endif /* lint */ @@ -1062,7 +1062,7 @@ diff -u libmagic.orig/buffer.c libmagic/buffer.c diff -u libmagic.orig/cdf.c libmagic/cdf.c --- libmagic.orig/cdf.c 2019-02-20 03:35:27.000000000 +0100 -+++ libmagic/cdf.c 2019-12-19 20:37:55.233790900 +0100 ++++ libmagic/cdf.c 2020-04-07 22:25:10.517321000 +0200 @@ -43,7 +43,17 @@ #include #endif @@ -1341,7 +1341,7 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c #endif diff -u libmagic.orig/cdf.h libmagic/cdf.h --- libmagic.orig/cdf.h 2019-02-20 02:24:19.000000000 +0100 -+++ libmagic/cdf.h 2019-12-19 20:37:55.431591900 +0100 ++++ libmagic/cdf.h 2020-04-07 22:25:10.517321000 +0200 @@ -35,10 +35,10 @@ #ifndef _H_CDF_ #define _H_CDF_ @@ -1366,7 +1366,7 @@ diff -u libmagic.orig/cdf.h libmagic/cdf.h #define CDF_SECID_FREE -1 diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c --- libmagic.orig/cdf_time.c 2019-03-12 21:43:05.000000000 +0100 -+++ libmagic/cdf_time.c 2019-12-19 20:37:55.483459500 +0100 ++++ libmagic/cdf_time.c 2020-04-07 22:25:10.517321000 +0200 @@ -23,6 +23,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. @@ -1395,7 +1395,7 @@ diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c (void)snprintf(buf, 26, "*Bad* %#16.16" INT64_T_FORMAT "x\n", diff -u libmagic.orig/compress.c libmagic/compress.c --- libmagic.orig/compress.c 2019-05-07 04:27:11.000000000 +0200 -+++ libmagic/compress.c 2019-12-19 20:37:55.501422500 +0100 ++++ libmagic/compress.c 2020-04-07 22:25:10.517321000 +0200 @@ -45,13 +45,11 @@ #endif #include @@ -1545,7 +1545,7 @@ diff -u libmagic.orig/compress.c libmagic/compress.c +#endif diff -u libmagic.orig/der.c libmagic/der.c --- libmagic.orig/der.c 2019-02-20 03:35:27.000000000 +0100 -+++ libmagic/der.c 2019-12-19 20:37:55.522331900 +0100 ++++ libmagic/der.c 2020-04-07 22:25:10.517321000 +0200 @@ -51,7 +51,9 @@ #include "magic.h" #include "der.h" @@ -1575,7 +1575,7 @@ diff -u libmagic.orig/der.c libmagic/der.c snprintf(buf + z, blen - z, "%.2x", d[i]); diff -u libmagic.orig/elfclass.h libmagic/elfclass.h --- libmagic.orig/elfclass.h 2019-02-20 02:30:19.000000000 +0100 -+++ libmagic/elfclass.h 2019-12-19 20:37:55.539285200 +0100 ++++ libmagic/elfclass.h 2020-04-07 22:25:10.517321000 +0200 @@ -41,7 +41,7 @@ return toomany(ms, "program headers", phnum); flags |= FLAGS_IS_CORE; @@ -1605,7 +1605,7 @@ diff -u libmagic.orig/elfclass.h libmagic/elfclass.h CAST(int, elf_getu16(swap, elfhdr.e_shstrndx)), diff -u libmagic.orig/encoding.c libmagic/encoding.c --- libmagic.orig/encoding.c 2019-04-15 18:48:41.000000000 +0200 -+++ libmagic/encoding.c 2019-12-19 20:37:55.547264800 +0100 ++++ libmagic/encoding.c 2020-04-07 22:25:10.517321000 +0200 @@ -89,13 +89,13 @@ *code_mime = "binary"; @@ -1636,7 +1636,7 @@ diff -u libmagic.orig/encoding.c libmagic/encoding.c } diff -u libmagic.orig/file.h libmagic/file.h --- libmagic.orig/file.h 2019-05-07 04:27:11.000000000 +0200 -+++ libmagic/file.h 2020-03-29 18:05:08.870164300 +0200 ++++ libmagic/file.h 2020-04-22 20:15:46.790840100 +0200 @@ -33,18 +33,9 @@ #ifndef __file_h__ #define __file_h__ @@ -1658,7 +1658,7 @@ diff -u libmagic.orig/file.h libmagic/file.h #ifdef _WIN64 #define SIZE_T_FORMAT "I64" #else -@@ -57,19 +48,34 @@ +@@ -57,19 +48,28 @@ #define INT64_T_FORMAT "ll" #define INTMAX_T_FORMAT "j" #endif @@ -1668,23 +1668,19 @@ diff -u libmagic.orig/file.h libmagic/file.h #include /* Include that here, to make sure __P gets defined */ #include #include /* For open and flags */ -+#ifdef HAVE_STDINT_H +-#ifdef HAVE_INTTYPES_H +-#include ++ +#ifndef __STDC_LIMIT_MACROS -+#define __STDC_LIMIT_MACROS -+#endif -+#ifndef __STDC_FORMAT_MACROS -+#define __STDC_FORMAT_MACROS -+#endif -+#include -+#endif - #ifdef HAVE_INTTYPES_H - #include ++# define __STDC_LIMIT_MACROS #endif -#include -#include -+#ifdef PHP_WIN32 -+#include "win32/php_stdint.h" ++#ifndef __STDC_FORMAT_MACROS ++# define __STDC_FORMAT_MACROS +#endif ++#include ++#include + +#include "php.h" +#include "ext/standard/php_string.h" @@ -1698,7 +1694,7 @@ diff -u libmagic.orig/file.h libmagic/file.h #include #endif /* Do this here and now, because struct stat gets re-defined on solaris */ -@@ -82,7 +88,7 @@ +@@ -82,7 +82,7 @@ #define MAGIC "/etc/magic" #endif @@ -1707,7 +1703,7 @@ diff -u libmagic.orig/file.h libmagic/file.h #define PATHSEP ';' #else #define PATHSEP ':' -@@ -116,12 +122,6 @@ +@@ -116,12 +116,6 @@ #endif #endif @@ -1720,7 +1716,7 @@ diff -u libmagic.orig/file.h libmagic/file.h #ifndef MIN #define MIN(a,b) (((a) < (b)) ? (a) : (b)) #endif -@@ -150,10 +150,10 @@ +@@ -150,10 +144,10 @@ struct buffer { int fd; @@ -1733,7 +1729,7 @@ diff -u libmagic.orig/file.h libmagic/file.h void *ebuf; size_t elen; }; -@@ -243,7 +243,7 @@ +@@ -243,7 +237,7 @@ #define FILE_DER 48 #define FILE_NAMES_SIZE 49 /* size of array to contain all names */ @@ -1742,7 +1738,7 @@ diff -u libmagic.orig/file.h libmagic/file.h ((t) == FILE_STRING || \ (t) == FILE_PSTRING || \ (t) == FILE_BESTRING16 || \ -@@ -447,28 +447,23 @@ +@@ -447,28 +441,23 @@ /* Type for Unicode characters */ typedef unsigned long unichar; @@ -1776,7 +1772,7 @@ diff -u libmagic.orig/file.h libmagic/file.h protected int file_zmagic(struct magic_set *, const struct buffer *, const char *); #endif -@@ -491,13 +486,9 @@ +@@ -491,13 +480,9 @@ protected void file_badread(struct magic_set *); protected void file_badseek(struct magic_set *); protected void file_oomem(struct magic_set *, size_t); @@ -1793,7 +1789,7 @@ diff -u libmagic.orig/file.h libmagic/file.h protected void file_showstr(FILE *, const char *, size_t); protected size_t file_mbswidth(const char *); protected const char *file_getbuffer(struct magic_set *); -@@ -513,34 +504,13 @@ +@@ -513,34 +498,13 @@ size_t); #endif /* __EMX__ */ @@ -1831,7 +1827,7 @@ diff -u libmagic.orig/file.h libmagic/file.h typedef struct { char *buf; -@@ -550,28 +520,13 @@ +@@ -550,28 +514,13 @@ protected file_pushbuf_t *file_push_buffer(struct magic_set *); protected char *file_pop_buffer(struct magic_set *, file_pushbuf_t *); @@ -1839,7 +1835,7 @@ diff -u libmagic.orig/file.h libmagic/file.h extern const char *file_names[]; extern const size_t file_nnames; -#endif - +- -#ifndef HAVE_PREAD -ssize_t pread(int, void *, size_t, off_t); -#endif @@ -1852,7 +1848,7 @@ diff -u libmagic.orig/file.h libmagic/file.h -#ifndef HAVE_DPRINTF -int dprintf(int, const char *, ...); -#endif -- + -#ifndef HAVE_STRLCPY +#ifndef strlcpy size_t strlcpy(char *, const char *, size_t); @@ -1862,7 +1858,7 @@ diff -u libmagic.orig/file.h libmagic/file.h size_t strlcat(char *, const char *, size_t); #endif #ifndef HAVE_STRCASESTR -@@ -587,39 +542,6 @@ +@@ -587,39 +536,6 @@ #ifndef HAVE_ASCTIME_R char *asctime_r(const struct tm *, char *); #endif @@ -1902,7 +1898,7 @@ diff -u libmagic.orig/file.h libmagic/file.h #if defined(HAVE_MMAP) && defined(HAVE_SYS_MMAN_H) && !defined(QUICK) #define QUICK -@@ -645,6 +567,18 @@ +@@ -645,6 +561,18 @@ #else #define FILE_RCSID(id) #endif @@ -1923,7 +1919,7 @@ diff -u libmagic.orig/file.h libmagic/file.h #endif diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c --- libmagic.orig/fsmagic.c 2019-05-07 04:26:48.000000000 +0200 -+++ libmagic/fsmagic.c 2019-12-19 20:37:55.740986600 +0100 ++++ libmagic/fsmagic.c 2020-04-07 22:25:10.532971400 +0200 @@ -66,26 +66,10 @@ # define minor(dev) ((dev) & 0xff) #endif @@ -2216,7 +2212,7 @@ diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c case S_IFSOCK: diff -u libmagic.orig/funcs.c libmagic/funcs.c --- libmagic.orig/funcs.c 2019-05-07 04:27:11.000000000 +0200 -+++ libmagic/funcs.c 2020-03-30 15:56:57.404908500 +0200 ++++ libmagic/funcs.c 2020-04-14 17:15:50.737587100 +0200 @@ -31,87 +31,80 @@ #endif /* lint */ @@ -2588,7 +2584,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c diff -u libmagic.orig/magic.c libmagic/magic.c --- libmagic.orig/magic.c 2019-05-07 04:27:11.000000000 +0200 -+++ libmagic/magic.c 2019-12-19 20:37:55.783491600 +0100 ++++ libmagic/magic.c 2020-04-07 22:25:10.532971400 +0200 @@ -25,11 +25,6 @@ * SUCH DAMAGE. */ @@ -3052,8 +3048,8 @@ diff -u libmagic.orig/magic.c libmagic/magic.c public const char * magic_error(struct magic_set *ms) diff -u libmagic.orig/magic.h libmagic/magic.h ---- libmagic.orig/magic.h 2020-03-30 16:09:56.288564100 +0200 -+++ libmagic/magic.h 2019-12-19 20:37:55.792489700 +0100 +--- libmagic.orig/magic.h 2020-04-22 20:17:15.432186600 +0200 ++++ libmagic/magic.h 2020-04-07 22:25:10.548560600 +0200 @@ -124,6 +124,7 @@ const char *magic_getpath(const char *, int); @@ -3064,7 +3060,7 @@ diff -u libmagic.orig/magic.h libmagic/magic.h diff -u libmagic.orig/print.c libmagic/print.c --- libmagic.orig/print.c 2019-03-12 21:43:05.000000000 +0100 -+++ libmagic/print.c 2019-12-19 20:37:55.808452700 +0100 ++++ libmagic/print.c 2020-04-07 22:25:10.548560600 +0200 @@ -28,6 +28,7 @@ /* * print.c - debugging printout routines @@ -3138,7 +3134,7 @@ diff -u libmagic.orig/print.c libmagic/print.c goto out; diff -u libmagic.orig/readcdf.c libmagic/readcdf.c --- libmagic.orig/readcdf.c 2019-03-12 21:43:05.000000000 +0100 -+++ libmagic/readcdf.c 2020-03-21 14:20:14.170673900 +0100 ++++ libmagic/readcdf.c 2020-04-07 22:25:10.548560600 +0200 @@ -31,7 +31,11 @@ #include @@ -3257,7 +3253,7 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c if (i != -1) diff -u libmagic.orig/softmagic.c libmagic/softmagic.c --- libmagic.orig/softmagic.c 2019-05-17 04:24:59.000000000 +0200 -+++ libmagic/softmagic.c 2020-03-25 17:15:23.794665300 +0100 ++++ libmagic/softmagic.c 2020-04-07 22:25:10.548560600 +0200 @@ -43,6 +43,10 @@ #include #include "der.h" diff --git a/ext/fileinfo/libmagic/file.h b/ext/fileinfo/libmagic/file.h index 698a307debc5e..3450f745bd36f 100644 --- a/ext/fileinfo/libmagic/file.h +++ b/ext/fileinfo/libmagic/file.h @@ -52,21 +52,15 @@ #include /* Include that here, to make sure __P gets defined */ #include #include /* For open and flags */ -#ifdef HAVE_STDINT_H + #ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS +# define __STDC_LIMIT_MACROS #endif #ifndef __STDC_FORMAT_MACROS -#define __STDC_FORMAT_MACROS +# define __STDC_FORMAT_MACROS #endif #include -#endif -#ifdef HAVE_INTTYPES_H #include -#endif -#ifdef PHP_WIN32 -#include "win32/php_stdint.h" -#endif #include "php.h" #include "ext/standard/php_string.h" diff --git a/ext/mysqlnd/config-win.h b/ext/mysqlnd/config-win.h index 1047664f64df2..69801bf60e415 100644 --- a/ext/mysqlnd/config-win.h +++ b/ext/mysqlnd/config-win.h @@ -13,7 +13,7 @@ This file is public domain and comes with NO WARRANTY of any kind */ #include #include -#include +#include #ifndef HAVE_INT8_T #define HAVE_INT8_T diff --git a/ext/sockets/conversions.c b/ext/sockets/conversions.c index c23b04c591598..f2c66758cbfa5 100644 --- a/ext/sockets/conversions.c +++ b/ext/sockets/conversions.c @@ -17,7 +17,7 @@ # include # include #else -# include +# include #endif #include diff --git a/ext/standard/image.c b/ext/standard/image.c index e7bc509e91230..e967aaeee0de8 100644 --- a/ext/standard/image.c +++ b/ext/standard/image.c @@ -26,9 +26,6 @@ #include #endif #include "php_image.h" -#ifdef PHP_WIN32 -#include "win32/php_stdint.h" -#endif #if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB) #include "zlib.h" diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c index 8b327c1929183..ea86795555e02 100644 --- a/ext/standard/iptc.c +++ b/ext/standard/iptc.c @@ -33,14 +33,9 @@ #include -#ifdef PHP_WIN32 -# include "win32/php_stdint.h" -#else -# if HAVE_INTTYPES_H -# include -# elif HAVE_STDINT_H -# include -# endif +#include +#ifndef PHP_WIN32 +# include #endif /* some defines for the different JPEG block types */ diff --git a/main/SAPI.h b/main/SAPI.h index dcb4c138456d0..d1ef8a40b08c6 100644 --- a/main/SAPI.h +++ b/main/SAPI.h @@ -22,9 +22,6 @@ #include "zend_API.h" #include "zend_llist.h" #include "zend_operators.h" -#ifdef PHP_WIN32 -#include "win32/php_stdint.h" -#endif #include #define SAPI_OPTION_NO_CHDIR 1 diff --git a/main/php_stdint.h b/main/php_stdint.h index f439b9f308abe..42bf9aa316cf0 100644 --- a/main/php_stdint.h +++ b/main/php_stdint.h @@ -39,25 +39,12 @@ # endif #endif +#include +#include #if defined(_MSC_VER) -/* Make sure the regular stdint.h wasn't included already and prevent it to be - included afterwards. Though if some other library needs some stuff from - stdint.h included afterwards and misses it, we'd have to extend ours. On - the other hand, if stdint.h was included before, some conflicts might - happen so we'd likewise have to fix ours. */ -# if !defined(_STDINT) -# define _STDINT -# include "win32/php_stdint.h" -# include "win32/php_inttypes.h" +# ifndef u_char +typedef unsigned __int8 u_char; # endif -# define HAVE_INT8_T 1 -# define HAVE_UINT8_T 1 -# define HAVE_INT16_T 1 -# define HAVE_UINT16_T 1 -# define HAVE_INT32_T 1 -# define HAVE_UINT32_T 1 -# define HAVE_INT64_T 1 -# define HAVE_UINT64_T 1 #else #include "php_config.h" @@ -66,14 +53,6 @@ # include #endif -#if HAVE_INTTYPES_H -# include -#endif - -#if HAVE_STDINT_H -# include -#endif - #ifndef HAVE_INT8_T # ifdef HAVE_INT8 typedef int8 int8_t; diff --git a/main/php_variables.c b/main/php_variables.c index 6fb6ca000d8ac..b41286312dcf5 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -25,9 +25,6 @@ #include "php_content_types.h" #include "SAPI.h" #include "zend_globals.h" -#ifdef PHP_WIN32 -# include "win32/php_inttypes.h" -#endif /* for systems that need to override reading of environment variables */ void _php_import_environment_variables(zval *array_ptr); diff --git a/main/snprintf.c b/main/snprintf.c index 4c20367ea3089..581cac1d3bdf9 100644 --- a/main/snprintf.c +++ b/main/snprintf.c @@ -27,10 +27,7 @@ #include #include #include - -#ifdef HAVE_INTTYPES_H #include -#endif #include #ifdef ZTS diff --git a/main/spprintf.c b/main/spprintf.c index cae2e12c5e44a..768a27470ce1d 100644 --- a/main/spprintf.c +++ b/main/spprintf.c @@ -83,9 +83,7 @@ #include #include #include -#ifdef HAVE_INTTYPES_H #include -#endif #include #ifdef ZTS diff --git a/sapi/fpm/fpm/fpm_atomic.h b/sapi/fpm/fpm/fpm_atomic.h index ec9e4f197d53c..1bb6106e45468 100644 --- a/sapi/fpm/fpm/fpm_atomic.h +++ b/sapi/fpm/fpm/fpm_atomic.h @@ -3,11 +3,7 @@ #ifndef FPM_ATOMIC_H #define FPM_ATOMIC_H 1 -#if HAVE_INTTYPES_H -# include -#else -# include -#endif +#include #include #ifdef HAVE_BUILTIN_ATOMIC diff --git a/sapi/fpm/fpm/fpm_conf.c b/sapi/fpm/fpm/fpm_conf.c index 116b07fdff9ac..cc451c9662753 100644 --- a/sapi/fpm/fpm/fpm_conf.c +++ b/sapi/fpm/fpm/fpm_conf.c @@ -9,11 +9,7 @@ #include #include #include -#if HAVE_INTTYPES_H -# include -#else -# include -#endif +#include #ifdef HAVE_GLOB # include #endif diff --git a/sapi/fpm/fpm/fpm_php_trace.c b/sapi/fpm/fpm/fpm_php_trace.c index cfdcf6509457b..0437026a0618e 100644 --- a/sapi/fpm/fpm/fpm_php_trace.c +++ b/sapi/fpm/fpm/fpm_php_trace.c @@ -9,11 +9,7 @@ #include #include -#if HAVE_INTTYPES_H -# include -#else -# include -#endif +#include #include #include #include diff --git a/sapi/fpm/fpm/fpm_trace_pread.c b/sapi/fpm/fpm/fpm_trace_pread.c index 604882eff3ab3..22b476f778d99 100644 --- a/sapi/fpm/fpm/fpm_trace_pread.c +++ b/sapi/fpm/fpm/fpm_trace_pread.c @@ -9,11 +9,7 @@ #include #include -#if HAVE_INTTYPES_H -# include -#else -# include -#endif +#include #include "fpm_trace.h" #include "fpm_process_ctl.h" diff --git a/win32/php_inttypes.h b/win32/php_inttypes.h deleted file mode 100644 index 20e9c9b7753db..0000000000000 --- a/win32/php_inttypes.h +++ /dev/null @@ -1,313 +0,0 @@ -// ISO C9x compliant inttypes.h for Microsoft Visual Studio -// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 -// -// Copyright (c) 2006 Alexander Chemeris -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. The name of the author may be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR 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. -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _MSC_VER // [ -#error "Use this header only with Microsoft Visual C++ compilers!" -#endif // _MSC_VER ] - -// Starting with vc14, many of the C11 features are now included, so we only -// need many of these typedefs and defines for older VS suites -#if _MSC_VER < 1900 - -#ifndef _MSC_INTTYPES_H_ // [ -#define _MSC_INTTYPES_H_ - -#if _MSC_VER > 1000 -#pragma once -#endif - -#include "stdint.h" - -// 7.8 Format conversion of integer types - -typedef struct { - intmax_t quot; - intmax_t rem; -} imaxdiv_t; - -// 7.8.1 Macros for format specifiers - -#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) // [ See footnote 185 at page 198 - -// The fprintf macros for signed integers are: -#define PRId8 "d" -#define PRIi8 "i" -#define PRIdLEAST8 "d" -#define PRIiLEAST8 "i" -#define PRIdFAST8 "d" -#define PRIiFAST8 "i" - -#define PRId16 "hd" -#define PRIi16 "hi" -#define PRIdLEAST16 "hd" -#define PRIiLEAST16 "hi" -#define PRIdFAST16 "hd" -#define PRIiFAST16 "hi" - -#define PRId32 "I32d" -#define PRIi32 "I32i" -#define PRIdLEAST32 "I32d" -#define PRIiLEAST32 "I32i" -#define PRIdFAST32 "I32d" -#define PRIiFAST32 "I32i" - -#define PRId64 "I64d" -#define PRIi64 "I64i" -#define PRIdLEAST64 "I64d" -#define PRIiLEAST64 "I64i" -#define PRIdFAST64 "I64d" -#define PRIiFAST64 "I64i" - -#define PRIdMAX "I64d" -#define PRIiMAX "I64i" - -#define PRIdPTR "Id" -#define PRIiPTR "Ii" - -// The fprintf macros for unsigned integers are: -#define PRIo8 "o" -#define PRIu8 "u" -#define PRIx8 "x" -#define PRIX8 "X" -#define PRIoLEAST8 "o" -#define PRIuLEAST8 "u" -#define PRIxLEAST8 "x" -#define PRIXLEAST8 "X" -#define PRIoFAST8 "o" -#define PRIuFAST8 "u" -#define PRIxFAST8 "x" -#define PRIXFAST8 "X" - -#define PRIo16 "ho" -#define PRIu16 "hu" -#define PRIx16 "hx" -#define PRIX16 "hX" -#define PRIoLEAST16 "ho" -#define PRIuLEAST16 "hu" -#define PRIxLEAST16 "hx" -#define PRIXLEAST16 "hX" -#define PRIoFAST16 "ho" -#define PRIuFAST16 "hu" -#define PRIxFAST16 "hx" -#define PRIXFAST16 "hX" - -#define PRIo32 "I32o" -#define PRIu32 "I32u" -#define PRIx32 "I32x" -#define PRIX32 "I32X" -#define PRIoLEAST32 "I32o" -#define PRIuLEAST32 "I32u" -#define PRIxLEAST32 "I32x" -#define PRIXLEAST32 "I32X" -#define PRIoFAST32 "I32o" -#define PRIuFAST32 "I32u" -#define PRIxFAST32 "I32x" -#define PRIXFAST32 "I32X" - -#define PRIo64 "I64o" -#define PRIu64 "I64u" -#define PRIx64 "I64x" -#define PRIX64 "I64X" -#define PRIoLEAST64 "I64o" -#define PRIuLEAST64 "I64u" -#define PRIxLEAST64 "I64x" -#define PRIXLEAST64 "I64X" -#define PRIoFAST64 "I64o" -#define PRIuFAST64 "I64u" -#define PRIxFAST64 "I64x" -#define PRIXFAST64 "I64X" - -#define PRIoMAX "I64o" -#define PRIuMAX "I64u" -#define PRIxMAX "I64x" -#define PRIXMAX "I64X" - -#define PRIoPTR "Io" -#define PRIuPTR "Iu" -#define PRIxPTR "Ix" -#define PRIXPTR "IX" - -// The fscanf macros for signed integers are: -#define SCNd8 "d" -#define SCNi8 "i" -#define SCNdLEAST8 "d" -#define SCNiLEAST8 "i" -#define SCNdFAST8 "d" -#define SCNiFAST8 "i" - -#define SCNd16 "hd" -#define SCNi16 "hi" -#define SCNdLEAST16 "hd" -#define SCNiLEAST16 "hi" -#define SCNdFAST16 "hd" -#define SCNiFAST16 "hi" - -#define SCNd32 "ld" -#define SCNi32 "li" -#define SCNdLEAST32 "ld" -#define SCNiLEAST32 "li" -#define SCNdFAST32 "ld" -#define SCNiFAST32 "li" - -#define SCNd64 "I64d" -#define SCNi64 "I64i" -#define SCNdLEAST64 "I64d" -#define SCNiLEAST64 "I64i" -#define SCNdFAST64 "I64d" -#define SCNiFAST64 "I64i" - -#define SCNdMAX "I64d" -#define SCNiMAX "I64i" - -#ifdef _WIN64 // [ -# define SCNdPTR "I64d" -# define SCNiPTR "I64i" -#else // _WIN64 ][ -# define SCNdPTR "ld" -# define SCNiPTR "li" -#endif // _WIN64 ] - -// The fscanf macros for unsigned integers are: -#define SCNo8 "o" -#define SCNu8 "u" -#define SCNx8 "x" -#define SCNX8 "X" -#define SCNoLEAST8 "o" -#define SCNuLEAST8 "u" -#define SCNxLEAST8 "x" -#define SCNXLEAST8 "X" -#define SCNoFAST8 "o" -#define SCNuFAST8 "u" -#define SCNxFAST8 "x" -#define SCNXFAST8 "X" - -#define SCNo16 "ho" -#define SCNu16 "hu" -#define SCNx16 "hx" -#define SCNX16 "hX" -#define SCNoLEAST16 "ho" -#define SCNuLEAST16 "hu" -#define SCNxLEAST16 "hx" -#define SCNXLEAST16 "hX" -#define SCNoFAST16 "ho" -#define SCNuFAST16 "hu" -#define SCNxFAST16 "hx" -#define SCNXFAST16 "hX" - -#define SCNo32 "lo" -#define SCNu32 "lu" -#define SCNx32 "lx" -#define SCNX32 "lX" -#define SCNoLEAST32 "lo" -#define SCNuLEAST32 "lu" -#define SCNxLEAST32 "lx" -#define SCNXLEAST32 "lX" -#define SCNoFAST32 "lo" -#define SCNuFAST32 "lu" -#define SCNxFAST32 "lx" -#define SCNXFAST32 "lX" - -#define SCNo64 "I64o" -#define SCNu64 "I64u" -#define SCNx64 "I64x" -#define SCNX64 "I64X" -#define SCNoLEAST64 "I64o" -#define SCNuLEAST64 "I64u" -#define SCNxLEAST64 "I64x" -#define SCNXLEAST64 "I64X" -#define SCNoFAST64 "I64o" -#define SCNuFAST64 "I64u" -#define SCNxFAST64 "I64x" -#define SCNXFAST64 "I64X" - -#define SCNoMAX "I64o" -#define SCNuMAX "I64u" -#define SCNxMAX "I64x" -#define SCNXMAX "I64X" - -#ifdef _WIN64 // [ -# define SCNoPTR "I64o" -# define SCNuPTR "I64u" -# define SCNxPTR "I64x" -# define SCNXPTR "I64X" -#else // _WIN64 ][ -# define SCNoPTR "lo" -# define SCNuPTR "lu" -# define SCNxPTR "lx" -# define SCNXPTR "lX" -#endif // _WIN64 ] - -#endif // __STDC_FORMAT_MACROS ] - -// 7.8.2 Functions for greatest-width integer types - -// 7.8.2.1 The imaxabs function -#define imaxabs _abs64 - -// 7.8.2.2 The imaxdiv function - -// This is modified version of div() function from Microsoft's div.c found -// in %MSVC.NET%\crt\src\div.c -#ifdef STATIC_IMAXDIV // [ -static -#else // STATIC_IMAXDIV ][ -_inline -#endif // STATIC_IMAXDIV ] -imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom) -{ - imaxdiv_t result; - - result.quot = numer / denom; - result.rem = numer % denom; - - if (numer < 0 && result.rem > 0) { - // did division wrong; must fix up - ++result.quot; - result.rem -= denom; - } - - return result; -} - -// 7.8.2.3 The strtoimax and strtoumax functions -#define strtoimax _strtoi64 -#define strtoumax _strtoui64 - -// 7.8.2.4 The wcstoimax and wcstoumax functions -#define wcstoimax _wcstoi64 -#define wcstoumax _wcstoui64 - - -#endif // _MSC_INTTYPES_H_ ] - -#else -#include -#endif diff --git a/win32/php_stdint.h b/win32/php_stdint.h deleted file mode 100644 index e7615f1479481..0000000000000 --- a/win32/php_stdint.h +++ /dev/null @@ -1,265 +0,0 @@ -// ISO C9x compliant stdint.h for Microsoft Visual Studio -// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 -// -// Copyright (c) 2006-2009 Alexander Chemeris -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. The name of the author may be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR 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. -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _MSC_VER // [ -#error "Use this header only with Microsoft Visual C++ compilers!" -#endif // _MSC_VER ] - -// Starting with vc14, many of the C11 features are now included, so we only -// need many of these typedefs and defines for older VS suites -#if _MSC_VER < 1900 - -#ifndef _MSC_STDINT_H_ // [ -#define _MSC_STDINT_H_ - -#ifndef _STDINT -# define _STDINT -#endif - -#if _MSC_VER > 1000 -#pragma once -#endif - -#include - -// For Visual Studio 6 in C++ mode wrap include with 'extern "C++" {}' -// or compiler give many errors like this: -// error C2733: second C linkage of overloaded function 'wmemchr' not allowed -#if (_MSC_VER < 1300) && defined(__cplusplus) - extern "C++" { -#endif -# include -#if (_MSC_VER < 1300) && defined(__cplusplus) - } -#endif - -// Define _W64 macros to mark types changing their size, like intptr_t. -#ifndef _W64 -# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 -# define _W64 __w64 -# else -# define _W64 -# endif -#endif - - -// 7.18.1 Integer types - -// 7.18.1.1 Exact-width integer types -#ifndef int8_t -typedef __int8 int8_t; -#endif -#ifndef int16_t -typedef __int16 int16_t; -#endif -#ifndef int32_t -typedef __int32 int32_t; -#endif -#ifndef int64_t -typedef __int64 int64_t; -#endif -#ifndef uint8_t -typedef unsigned __int8 uint8_t; -#endif -typedef unsigned __int16 uint16_t; -#ifndef uint32_t -typedef unsigned __int32 uint32_t; -#endif -typedef unsigned __int64 uint64_t; - -// 7.18.1.2 Minimum-width integer types -typedef int8_t int_least8_t; -typedef int16_t int_least16_t; -typedef int32_t int_least32_t; -typedef int64_t int_least64_t; -typedef uint8_t uint_least8_t; -typedef uint16_t uint_least16_t; -typedef uint32_t uint_least32_t; -typedef uint64_t uint_least64_t; - -// 7.18.1.3 Fastest minimum-width integer types -typedef int8_t int_fast8_t; -typedef int16_t int_fast16_t; -typedef int32_t int_fast32_t; -typedef int64_t int_fast64_t; -typedef uint8_t uint_fast8_t; -typedef uint16_t uint_fast16_t; -typedef uint32_t uint_fast32_t; -typedef uint32_t u_int32_t; -typedef uint64_t uint_fast64_t; - -// 7.18.1.4 Integer types capable of holding object pointers -/* intptr_t and uintptr_t are available from stddef.h */ -#include - -// 7.18.1.5 Greatest-width integer types -typedef int64_t intmax_t; -typedef uint64_t uintmax_t; - - -// 7.18.2 Limits of specified-width integer types - -#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259 - -// 7.18.2.1 Limits of exact-width integer types -#if _MSC_VER >= 1700 && !defined(_INTSAFE_H_INCLUDED_) -#define INT8_MIN ((int8_t)_I8_MIN) -#define INT8_MAX _I8_MAX -#define INT16_MIN ((int16_t)_I16_MIN) -#define INT16_MAX _I16_MAX -#define INT32_MIN ((int32_t)_I32_MIN) -#define INT32_MAX _I32_MAX -#define INT64_MIN ((int64_t)_I64_MIN) -#define INT64_MAX _I64_MAX -#define UINT8_MAX _UI8_MAX -#define UINT16_MAX _UI16_MAX -#define UINT32_MAX _UI32_MAX -#define UINT64_MAX _UI64_MAX -#endif - -// 7.18.2.2 Limits of minimum-width integer types -#define INT_LEAST8_MIN INT8_MIN -#define INT_LEAST8_MAX INT8_MAX -#define INT_LEAST16_MIN INT16_MIN -#define INT_LEAST16_MAX INT16_MAX -#define INT_LEAST32_MIN INT32_MIN -#define INT_LEAST32_MAX INT32_MAX -#define INT_LEAST64_MIN INT64_MIN -#define INT_LEAST64_MAX INT64_MAX -#define UINT_LEAST8_MAX UINT8_MAX -#define UINT_LEAST16_MAX UINT16_MAX -#define UINT_LEAST32_MAX UINT32_MAX -#define UINT_LEAST64_MAX UINT64_MAX - -// 7.18.2.3 Limits of fastest minimum-width integer types -#define INT_FAST8_MIN INT8_MIN -#define INT_FAST8_MAX INT8_MAX -#define INT_FAST16_MIN INT16_MIN -#define INT_FAST16_MAX INT16_MAX -#define INT_FAST32_MIN INT32_MIN -#define INT_FAST32_MAX INT32_MAX -#define INT_FAST64_MIN INT64_MIN -#define INT_FAST64_MAX INT64_MAX -#define UINT_FAST8_MAX UINT8_MAX -#define UINT_FAST16_MAX UINT16_MAX -#define UINT_FAST32_MAX UINT32_MAX -#define UINT_FAST64_MAX UINT64_MAX - -// 7.18.2.4 Limits of integer types capable of holding object pointers -#ifdef _WIN64 // [ -# define INTPTR_MIN INT64_MIN -# define INTPTR_MAX INT64_MAX -# define UINTPTR_MAX UINT64_MAX -#else // _WIN64 ][ -# define INTPTR_MIN INT32_MIN -# define INTPTR_MAX INT32_MAX -# define UINTPTR_MAX UINT32_MAX -#endif // _WIN64 ] - -// 7.18.2.5 Limits of greatest-width integer types -#define INTMAX_MIN INT64_MIN -#define INTMAX_MAX INT64_MAX -#define UINTMAX_MAX UINT64_MAX - -// 7.18.3 Limits of other integer types - -#ifdef _WIN64 // [ -# define PTRDIFF_MIN _I64_MIN -# define PTRDIFF_MAX _I64_MAX -#else // _WIN64 ][ -# define PTRDIFF_MIN _I32_MIN -# define PTRDIFF_MAX _I32_MAX -#endif // _WIN64 ] - -#define SIG_ATOMIC_MIN INT_MIN -#define SIG_ATOMIC_MAX INT_MAX - -#ifndef SIZE_MAX // [ -# ifdef _WIN64 // [ -# define SIZE_MAX _UI64_MAX -# else // _WIN64 ][ -# define SIZE_MAX _UI32_MAX -# endif // _WIN64 ] -#endif // SIZE_MAX ] - -// WCHAR_MIN and WCHAR_MAX are also defined in -#ifndef WCHAR_MIN // [ -# define WCHAR_MIN 0 -#endif // WCHAR_MIN ] -#ifndef WCHAR_MAX // [ -# define WCHAR_MAX _UI16_MAX -#endif // WCHAR_MAX ] - -#define WINT_MIN 0 -#define WINT_MAX _UI16_MAX - -#endif // __STDC_LIMIT_MACROS ] - - -// 7.18.4 Limits of other integer types - -#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260 - -// 7.18.4.1 Macros for minimum-width integer constants - -#define INT8_C(val) val##i8 -#define INT16_C(val) val##i16 -#define INT32_C(val) val##i32 -#define INT64_C(val) val##i64 - -#define UINT8_C(val) val##ui8 -#define UINT16_C(val) val##ui16 -#define UINT32_C(val) val##ui32 -#define UINT64_C(val) val##ui64 - -// 7.18.4.2 Macros for greatest-width integer constants -#define INTMAX_C INT64_C -#define UINTMAX_C UINT64_C - -#if _MSC_VER < 1600 -static __inline int64_t llabs(int64_t i) -{ - return i >= 0 ? i: -i; -} -#endif - -#endif // __STDC_CONSTANT_MACROS ] - - -#endif // _MSC_STDINT_H_ ] - -#else -#include -#endif - -#ifndef u_char -typedef unsigned __int8 u_char; -#endif From 258bffca91576f75b1c3b69ecde38b7f30ab7774 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 21 Apr 2020 15:20:01 +0200 Subject: [PATCH 233/338] Remove unused 'ce_get_iterator' field from spl_heap_object --- ext/spl/spl_heap.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/ext/spl/spl_heap.c b/ext/spl/spl_heap.c index dcef01b5eb560..2b3b681f97fa9 100644 --- a/ext/spl/spl_heap.c +++ b/ext/spl/spl_heap.c @@ -68,7 +68,6 @@ typedef struct _spl_heap_it spl_heap_it; struct _spl_heap_object { spl_ptr_heap *heap; int flags; - zend_class_entry *ce_get_iterator; zend_function *fptr_cmp; zend_function *fptr_count; zend_object std; @@ -398,7 +397,6 @@ static zend_object *spl_heap_object_new_ex(zend_class_entry *class_type, zend_ob if (orig) { spl_heap_object *other = spl_heap_from_obj(orig); intern->std.handlers = other->std.handlers; - intern->ce_get_iterator = other->ce_get_iterator; if (clone_orig) { intern->heap = spl_ptr_heap_clone(other->heap); From 03ad54af96e50eae5520a4b6553170016a4b54bb Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 21 Apr 2020 15:20:38 +0200 Subject: [PATCH 234/338] Remove unused 'ce_get_iterator' field from spl_fixedarray_object --- ext/spl/spl_fixedarray.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c index ce3cd2635e420..ec037d9da60bb 100644 --- a/ext/spl/spl_fixedarray.c +++ b/ext/spl/spl_fixedarray.c @@ -54,7 +54,6 @@ typedef struct _spl_fixedarray_object { /* {{{ */ zend_function *fptr_count; int current; int flags; - zend_class_entry *ce_get_iterator; zend_object std; } spl_fixedarray_object; /* }}} */ @@ -221,7 +220,6 @@ static zend_object *spl_fixedarray_object_new_ex(zend_class_entry *class_type, z if (orig && clone_orig) { spl_fixedarray_object *other = spl_fixed_array_from_obj(orig); - intern->ce_get_iterator = other->ce_get_iterator; spl_fixedarray_init(&intern->array, other->array.size); spl_fixedarray_copy(&intern->array, &other->array); } From c36b9e93fa06e48fdedb0260a8e5817902da0545 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 22 Apr 2020 08:38:42 +0200 Subject: [PATCH 235/338] Remove unneeded prototype for spl_array_get_iterator --- ext/spl/spl_array.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index 40d74d9671a6b..7b86de804e9da 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -161,8 +161,6 @@ static void spl_array_object_free_storage(zend_object *object) } /* }}} */ -zend_object_iterator *spl_array_get_iterator(zend_class_entry *ce, zval *object, int by_ref); - /* {{{ spl_array_object_new_ex */ static zend_object *spl_array_object_new_ex(zend_class_entry *class_type, zend_object *orig, int clone_orig) { From 73d02c3b3eb8b828a1cc7ae04a4cc4f4875c3ddd Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 16 Apr 2020 00:11:38 +0200 Subject: [PATCH 236/338] Fix bug #79447 Partially reverts 846b6479537a112d1ded725e6484e46462048b35: instead of throwing, this skips uninitialized typed properties when serializing objects. This makes serialize with __sleep() behave the same as serialize() without __sleep(). As in the non-__sleep() case, unserialize(serialize($x)) identity may not be preserved due to replacement of uninitialized/unset properties with default values. Fixing this will require changes to the serialization format. Closes GH-5396. --- NEWS | 2 + .../sleep_uninitialized_typed_prop.phpt | 38 +++++++------------ ext/standard/var.c | 4 +- 3 files changed, 16 insertions(+), 28 deletions(-) diff --git a/NEWS b/NEWS index b6f8f162b7e39..88185d170f788 100644 --- a/NEWS +++ b/NEWS @@ -40,6 +40,8 @@ PHP NEWS - Standard: . Fixed bug #79468 (SIGSEGV when closing stream handle with a stream filter appended). (dinosaur) + . Fixed bug #79447 (Serializing uninitialized typed properties with __sleep + should not throw). (nicolas-grekas) ?? ??? ????, PHP 7.4.5 diff --git a/ext/standard/tests/serialize/sleep_uninitialized_typed_prop.phpt b/ext/standard/tests/serialize/sleep_uninitialized_typed_prop.phpt index 3d78e11f283e3..ebef92ca188ae 100644 --- a/ext/standard/tests/serialize/sleep_uninitialized_typed_prop.phpt +++ b/ext/standard/tests/serialize/sleep_uninitialized_typed_prop.phpt @@ -1,5 +1,5 @@ --TEST-- -Referencing an uninitialized typed property in __sleep() should result in Error +Referencing an uninitialized typed property in __sleep() should be skipped --FILE-- getMessage(), "\n"; -} +var_dump(serialize($t)); +var_dump(unserialize(serialize($t)) == $t); $t->x = 1; -try { - serialize($t); -} catch (Error $e) { - echo $e->getMessage(), "\n"; -} +var_dump(unserialize(serialize($t)) == $t); $t->y = 2; -try { - serialize($t); -} catch (Error $e) { - echo $e->getMessage(), "\n"; -} +var_dump(unserialize(serialize($t)) == $t); $t->z = 3; -try { - var_dump(unserialize(serialize($t))); -} catch (Error $e) { - echo $e->getMessage(), "\n"; -} +var_dump(unserialize(serialize($t)) == $t); +var_dump($t); ?> --EXPECT-- -Typed property Test::$x must not be accessed before initialization (in __sleep) -Typed property Test::$y must not be accessed before initialization (in __sleep) -Typed property Test::$z must not be accessed before initialization (in __sleep) -object(Test)#3 (3) { +string(15) "O:4:"Test":0:{}" +bool(true) +bool(true) +bool(true) +bool(true) +object(Test)#1 (3) { ["x"]=> int(1) ["y":protected]=> diff --git a/ext/standard/var.c b/ext/standard/var.c index 3fa1afcb72aa8..6e59eab419880 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -784,9 +784,7 @@ static int php_var_serialize_try_add_sleep_prop( if (Z_TYPE_P(val) == IS_UNDEF) { zend_property_info *info = zend_get_typed_property_info_for_slot(Z_OBJ_P(struc), val); if (info) { - zend_throw_error(NULL, - "Typed property %s::$%s must not be accessed before initialization (in __sleep)", - ZSTR_VAL(Z_OBJCE_P(struc)->name), ZSTR_VAL(error_name)); + return SUCCESS; } return FAILURE; } From 8597ec00d4c60bc6be625dfe5cdd9e398162f3de Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 15 Apr 2020 12:04:15 +0200 Subject: [PATCH 237/338] Remove support for libmysqlclient 5.0 Closes GH-5391. --- UPGRADING | 4 ++++ ext/mysqli/mysqli.c | 14 +------------- ext/mysqli/mysqli.stub.php | 4 ---- ext/mysqli/mysqli_api.c | 19 ++++--------------- ext/mysqli/mysqli_arginfo.h | 17 +---------------- ext/mysqli/mysqli_nonapi.c | 4 ---- ext/mysqli/mysqli_priv.h | 10 ---------- ext/pdo_mysql/mysql_driver.c | 2 -- ext/pdo_mysql/php_pdo_mysql_int.h | 4 ---- 9 files changed, 10 insertions(+), 68 deletions(-) diff --git a/UPGRADING b/UPGRADING index 568bdf584a448..21c58954fb9d1 100644 --- a/UPGRADING +++ b/UPGRADING @@ -578,6 +578,10 @@ PHP 8.0 UPGRADE NOTES - MBString: . The Unicode data tables have been updated to version 13.0.0. +- MySQLi / PDO MySQL: + . When mysqlnd is not used (which is the default and recommended option), + the minimum supported libmysqlclient version is now 5.1. + ======================================== 10. New Global Constants ======================================== diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index 85ed67627f88c..7509b04c88191 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -711,17 +711,13 @@ PHP_MINIT_FUNCTION(mysqli) /* for mysqli_stmt_set_attr */ REGISTER_LONG_CONSTANT("MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH", STMT_ATTR_UPDATE_MAX_LENGTH, CONST_CS | CONST_PERSISTENT); -#if MYSQL_VERSION_ID > 50003 || defined(MYSQLI_USE_MYSQLND) REGISTER_LONG_CONSTANT("MYSQLI_STMT_ATTR_CURSOR_TYPE", STMT_ATTR_CURSOR_TYPE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("MYSQLI_CURSOR_TYPE_NO_CURSOR", CURSOR_TYPE_NO_CURSOR, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("MYSQLI_CURSOR_TYPE_READ_ONLY", CURSOR_TYPE_READ_ONLY, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("MYSQLI_CURSOR_TYPE_FOR_UPDATE", CURSOR_TYPE_FOR_UPDATE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("MYSQLI_CURSOR_TYPE_SCROLLABLE", CURSOR_TYPE_SCROLLABLE, CONST_CS | CONST_PERSISTENT); -#endif -#if MYSQL_VERSION_ID > 50007 || defined(MYSQLI_USE_MYSQLND) REGISTER_LONG_CONSTANT("MYSQLI_STMT_ATTR_PREFETCH_ROWS", STMT_ATTR_PREFETCH_ROWS, CONST_CS | CONST_PERSISTENT); -#endif /* column information */ REGISTER_LONG_CONSTANT("MYSQLI_NOT_NULL_FLAG", NOT_NULL_FLAG, CONST_CS | CONST_PERSISTENT); @@ -739,9 +735,7 @@ PHP_MINIT_FUNCTION(mysqli) REGISTER_LONG_CONSTANT("MYSQLI_GROUP_FLAG", GROUP_FLAG, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("MYSQLI_ENUM_FLAG", ENUM_FLAG, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("MYSQLI_BINARY_FLAG", BINARY_FLAG, CONST_CS | CONST_PERSISTENT); -#if MYSQL_VERSION_ID > 50001 || defined(MYSQLI_USE_MYSQLND) REGISTER_LONG_CONSTANT("MYSQLI_NO_DEFAULT_VALUE_FLAG", NO_DEFAULT_VALUE_FLAG, CONST_CS | CONST_PERSISTENT); -#endif #if (MYSQL_VERSION_ID > 51122 && MYSQL_VERSION_ID < 60000) || (MYSQL_VERSION_ID > 60003) || defined(MYSQLI_USE_MYSQLND) REGISTER_LONG_CONSTANT("MYSQLI_ON_UPDATE_NOW_FLAG", ON_UPDATE_NOW_FLAG, CONST_CS | CONST_PERSISTENT); @@ -776,10 +770,8 @@ PHP_MINIT_FUNCTION(mysqli) #ifdef FIELD_TYPE_JSON REGISTER_LONG_CONSTANT("MYSQLI_TYPE_JSON", FIELD_TYPE_JSON, CONST_CS | CONST_PERSISTENT); #endif -#if MYSQL_VERSION_ID > 50002 || defined(MYSQLI_USE_MYSQLND) REGISTER_LONG_CONSTANT("MYSQLI_TYPE_NEWDECIMAL", FIELD_TYPE_NEWDECIMAL, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("MYSQLI_TYPE_BIT", FIELD_TYPE_BIT, CONST_CS | CONST_PERSISTENT); -#endif REGISTER_LONG_CONSTANT("MYSQLI_SET_CHARSET_NAME", MYSQL_SET_CHARSET_NAME, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("MYSQLI_SET_CHARSET_DIR", MYSQL_SET_CHARSET_DIR, CONST_CS | CONST_PERSISTENT); @@ -1138,7 +1130,6 @@ void php_mysqli_fetch_into_hash_aux(zval *return_value, MYSQL_RES * result, zend if (row[i]) { zval res; -#if MYSQL_VERSION_ID > 50002 if (mysql_fetch_field_direct(result, i)->type == MYSQL_TYPE_BIT) { my_ulonglong llval; char tmp[22]; @@ -1158,10 +1149,7 @@ void php_mysqli_fetch_into_hash_aux(zval *return_value, MYSQL_RES * result, zend */ snprintf(tmp, sizeof(tmp), (mysql_fetch_field_direct(result, i)->flags & UNSIGNED_FLAG)? MYSQLI_LLU_SPEC : MYSQLI_LL_SPEC, llval); ZVAL_STRING(&res, tmp); - } else -#endif - { - + } else { ZVAL_STRINGL(&res, row[i], field_len[i]); } diff --git a/ext/mysqli/mysqli.stub.php b/ext/mysqli/mysqli.stub.php index e370b30242e8b..5d8a75148ddae 100644 --- a/ext/mysqli/mysqli.stub.php +++ b/ext/mysqli/mysqli.stub.php @@ -79,13 +79,11 @@ public function dump_debug_info() {} */ public function debug(string $debug_options) {} -#ifdef HAVE_MYSQLI_GET_CHARSET /** * @return object|null * @alias mysqli_get_charset */ public function get_charset() {} -#endif /** * @return string|null @@ -233,13 +231,11 @@ public function savepoint(string $name) {} */ public function select_db(string $database) {} -#ifdef HAVE_MYSQLI_SET_CHARSET /** * @return bool * @alias mysqli_set_charset */ public function set_charset(string $charset) {} -#endif /** * @param mixed $value diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index 18a6c81d68d71..3e7bbcb11c3fd 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -459,9 +459,7 @@ mysqli_stmt_bind_result_do_bind(MY_STMT *stmt, zval *args, unsigned int argc) break; case MYSQL_TYPE_LONGLONG: -#if MYSQL_VERSION_ID > 50002 || defined(MYSQLI_USE_MYSQLND) case MYSQL_TYPE_BIT: -#endif stmt->result.buf[ofs].type = IS_STRING; stmt->result.buf[ofs].buflen = sizeof(my_ulonglong); stmt->result.buf[ofs].val = (char *)emalloc(stmt->result.buf[ofs].buflen); @@ -611,7 +609,7 @@ PHP_FUNCTION(mysqli_change_user) char *user, *password, *dbname; size_t user_len, password_len, dbname_len; zend_ulong rc; -#if !defined(MYSQLI_USE_MYSQLND) && defined(HAVE_MYSQLI_SET_CHARSET) +#if !defined(MYSQLI_USE_MYSQLND) const CHARSET_INFO * old_charset; #endif @@ -620,7 +618,7 @@ PHP_FUNCTION(mysqli_change_user) } MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); -#if !defined(MYSQLI_USE_MYSQLND) && defined(HAVE_MYSQLI_SET_CHARSET) +#if !defined(MYSQLI_USE_MYSQLND) old_charset = mysql->mysql->charset; #endif @@ -634,7 +632,7 @@ PHP_FUNCTION(mysqli_change_user) if (rc) { RETURN_FALSE; } -#if !defined(MYSQLI_USE_MYSQLND) && defined(HAVE_MYSQLI_SET_CHARSET) +#if !defined(MYSQLI_USE_MYSQLND) if (mysql_get_server_version(mysql->mysql) < 50123L) { /* Request the current charset, or it will be reset to the system one. @@ -1024,12 +1022,9 @@ void mysqli_stmt_fetch_libmysql(INTERNAL_FUNCTION_PARAMETERS) } case IS_STRING: if (stmt->stmt->bind[i].buffer_type == MYSQL_TYPE_LONGLONG -#if MYSQL_VERSION_ID > 50002 || stmt->stmt->bind[i].buffer_type == MYSQL_TYPE_BIT -#endif ) { my_bool uns = (stmt->stmt->fields[i].flags & UNSIGNED_FLAG)? 1:0; -#if MYSQL_VERSION_ID > 50002 if (stmt->stmt->bind[i].buffer_type == MYSQL_TYPE_BIT) { switch (stmt->result.buf[i].output_len) { case 8:llval = (my_ulonglong) bit_uint8korr(stmt->result.buf[i].val);break; @@ -1041,9 +1036,7 @@ void mysqli_stmt_fetch_libmysql(INTERNAL_FUNCTION_PARAMETERS) case 2:llval = (my_ulonglong) bit_uint2korr(stmt->result.buf[i].val);break; case 1:llval = (my_ulonglong) uint1korr(stmt->result.buf[i].val);break; } - } else -#endif - { + } else { llval= *(my_ulonglong *) stmt->result.buf[i].val; } #if SIZEOF_ZEND_LONG==8 @@ -1065,14 +1058,10 @@ void mysqli_stmt_fetch_libmysql(INTERNAL_FUNCTION_PARAMETERS) ZEND_TRY_ASSIGN_REF_LONG(result, llval); } } else { -#if defined(MYSQL_DATA_TRUNCATED) && MYSQL_VERSION_ID > 50002 if (ret == MYSQL_DATA_TRUNCATED && *(stmt->stmt->bind[i].error) != 0) { /* result was truncated */ ZEND_TRY_ASSIGN_REF_STRINGL(result, stmt->result.buf[i].val, stmt->stmt->bind[i].buffer_length); } else { -#else - { -#endif ZEND_TRY_ASSIGN_REF_STRINGL(result, stmt->result.buf[i].val, stmt->result.buf[i].output_len); } } diff --git a/ext/mysqli/mysqli_arginfo.h b/ext/mysqli/mysqli_arginfo.h index a857c59261c93..bbc489f6be208 100644 --- a/ext/mysqli/mysqli_arginfo.h +++ b/ext/mysqli/mysqli_arginfo.h @@ -458,10 +458,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_debug, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, debug_options, IS_STRING, 0) ZEND_END_ARG_INFO() -#if defined(HAVE_MYSQLI_GET_CHARSET) -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_get_charset, 0, 0, 0) -ZEND_END_ARG_INFO() -#endif +#define arginfo_class_mysqli_get_charset arginfo_class_mysqli_character_set_name #define arginfo_class_mysqli_get_client_info arginfo_class_mysqli_character_set_name @@ -544,11 +541,9 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_select_db, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, database, IS_STRING, 0) ZEND_END_ARG_INFO() -#if defined(HAVE_MYSQLI_SET_CHARSET) ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_set_charset, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, charset, IS_STRING, 0) ZEND_END_ARG_INFO() -#endif ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_options, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0) @@ -796,9 +791,6 @@ ZEND_FUNCTION(mysqli_use_result); ZEND_FUNCTION(mysqli_warning_count); ZEND_FUNCTION(mysqli_refresh); ZEND_FUNCTION(mysqli_link_construct); -#if defined(HAVE_MYSQLI_GET_CHARSET) -ZEND_FUNCTION(mysqli_get_charset); -#endif #if defined(MYSQLI_USE_MYSQLND) ZEND_FUNCTION(mysqli_get_connection_stats); #endif @@ -809,9 +801,6 @@ ZEND_FUNCTION(mysqli_poll); #if defined(MYSQLI_USE_MYSQLND) ZEND_FUNCTION(mysqli_reap_async_query); #endif -#if defined(HAVE_MYSQLI_SET_CHARSET) -ZEND_FUNCTION(mysqli_set_charset); -#endif ZEND_FUNCTION(mysqli_result_construct); #if defined(MYSQLI_USE_MYSQLND) ZEND_FUNCTION(mysqli_fetch_all); @@ -955,9 +944,7 @@ static const zend_function_entry class_mysqli_methods[] = { ZEND_ME_MAPPING(connect, mysqli_connect, arginfo_class_mysqli_connect, ZEND_ACC_PUBLIC) ZEND_ME_MAPPING(dump_debug_info, mysqli_dump_debug_info, arginfo_class_mysqli_dump_debug_info, ZEND_ACC_PUBLIC) ZEND_ME_MAPPING(debug, mysqli_debug, arginfo_class_mysqli_debug, ZEND_ACC_PUBLIC) -#if defined(HAVE_MYSQLI_GET_CHARSET) ZEND_ME_MAPPING(get_charset, mysqli_get_charset, arginfo_class_mysqli_get_charset, ZEND_ACC_PUBLIC) -#endif ZEND_ME_MAPPING(get_client_info, mysqli_get_client_info, arginfo_class_mysqli_get_client_info, ZEND_ACC_PUBLIC) #if defined(MYSQLI_USE_MYSQLND) ZEND_ME_MAPPING(get_connection_stats, mysqli_get_connection_stats, arginfo_class_mysqli_get_connection_stats, ZEND_ACC_PUBLIC) @@ -986,9 +973,7 @@ static const zend_function_entry class_mysqli_methods[] = { ZEND_ME_MAPPING(rollback, mysqli_rollback, arginfo_class_mysqli_rollback, ZEND_ACC_PUBLIC) ZEND_ME_MAPPING(savepoint, mysqli_savepoint, arginfo_class_mysqli_savepoint, ZEND_ACC_PUBLIC) ZEND_ME_MAPPING(select_db, mysqli_select_db, arginfo_class_mysqli_select_db, ZEND_ACC_PUBLIC) -#if defined(HAVE_MYSQLI_SET_CHARSET) ZEND_ME_MAPPING(set_charset, mysqli_set_charset, arginfo_class_mysqli_set_charset, ZEND_ACC_PUBLIC) -#endif ZEND_ME_MAPPING(options, mysqli_options, arginfo_class_mysqli_options, ZEND_ACC_PUBLIC) ZEND_ME_MAPPING(set_opt, mysqli_options, arginfo_class_mysqli_set_opt, ZEND_ACC_PUBLIC) ZEND_ME_MAPPING(ssl_set, mysqli_ssl_set, arginfo_class_mysqli_ssl_set, ZEND_ACC_PUBLIC) diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c index 34b74be321614..97d648dc2f14a 100644 --- a/ext/mysqli/mysqli_nonapi.c +++ b/ext/mysqli/mysqli_nonapi.c @@ -1035,7 +1035,6 @@ PHP_FUNCTION(mysqli_stmt_get_warnings) } /* }}} */ -#ifdef HAVE_MYSQLI_SET_CHARSET /* {{{ proto bool mysqli_set_charset(object link, string csname) sets client character set */ PHP_FUNCTION(mysqli_set_charset) @@ -1056,9 +1055,7 @@ PHP_FUNCTION(mysqli_set_charset) RETURN_TRUE; } /* }}} */ -#endif -#ifdef HAVE_MYSQLI_GET_CHARSET /* {{{ proto object mysqli_get_charset(object link) U returns a character set object */ PHP_FUNCTION(mysqli_get_charset) @@ -1115,7 +1112,6 @@ PHP_FUNCTION(mysqli_get_charset) add_property_string(return_value, "comment", (comment) ? (char *)comment : ""); } /* }}} */ -#endif #if !defined(MYSQLI_USE_MYSQLND) extern char * mysqli_escape_string_for_tx_name_in_comment(const char * const name); diff --git a/ext/mysqli/mysqli_priv.h b/ext/mysqli/mysqli_priv.h index 6d3db39038447..f537514968fe9 100644 --- a/ext/mysqli/mysqli_priv.h +++ b/ext/mysqli/mysqli_priv.h @@ -24,16 +24,6 @@ #define MYSQL_UNIX_ADDR PHP_MYSQL_UNIX_SOCK_ADDR #endif -/* character set support */ -#if defined(MYSQLND_VERSION_ID) || MYSQL_VERSION_ID > 50009 -#define HAVE_MYSQLI_GET_CHARSET -#endif - -#if defined(MYSQLND_VERSION_ID) || MYSQL_VERSION_ID > 50005 -#define HAVE_MYSQLI_SET_CHARSET -#endif - - extern const zend_function_entry mysqli_functions[]; extern const zend_function_entry mysqli_link_methods[]; extern const zend_function_entry mysqli_stmt_methods[]; diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index 26b4eee82b862..4f83223af54f6 100644 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -787,12 +787,10 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options) #endif } -#ifdef PDO_MYSQL_HAS_CHARSET if (vars[0].optval && mysql_options(H->server, MYSQL_SET_CHARSET_NAME, vars[0].optval)) { pdo_mysql_error(dbh); goto cleanup; } -#endif dbname = vars[1].optval; host = vars[2].optval; diff --git a/ext/pdo_mysql/php_pdo_mysql_int.h b/ext/pdo_mysql/php_pdo_mysql_int.h index f90a92d6a4a8c..6bc55552edf36 100644 --- a/ext/pdo_mysql/php_pdo_mysql_int.h +++ b/ext/pdo_mysql/php_pdo_mysql_int.h @@ -28,10 +28,6 @@ # define PDO_MYSQL_PARAM_BIND MYSQL_BIND #endif -#if (MYSQL_VERSION_ID >= 40113 && MYSQL_VERSION_ID < 50000) || MYSQL_VERSION_ID >= 50007 || defined(MYSQL_USE_MYSQLND) -# define PDO_MYSQL_HAS_CHARSET -#endif - #if defined(PDO_USE_MYSQLND) && PHP_DEBUG && !defined(PHP_WIN32) #define PDO_DBG_ENABLED 1 From ef0e4478c51540510b67f7781ad240f5e0592ee4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 2 Feb 2020 21:43:42 +0000 Subject: [PATCH 238/338] Add get_debug_type() function RFC: https://wiki.php.net/rfc/get_debug_type --- UPGRADING | 4 ++ ext/standard/basic_functions.stub.php | 3 + ext/standard/basic_functions_arginfo.h | 4 ++ .../get_debug_type_basic.phpt | 57 +++++++++++++++++++ ext/standard/type.c | 46 +++++++++++++++ 5 files changed, 114 insertions(+) create mode 100644 ext/standard/tests/general_functions/get_debug_type_basic.phpt diff --git a/UPGRADING b/UPGRADING index 21c58954fb9d1..fd56cf201d75b 100644 --- a/UPGRADING +++ b/UPGRADING @@ -534,6 +534,10 @@ PHP 8.0 UPGRADE NOTES . Added fdiv() function, which performs a floating-point division under IEEE 754 semantics. Division by zero is considered well-defined and will return one of Inf, -Inf or NaN. + . Added get_debug_type() function, which returns a type useful for error + messages. Unlike get_type(), it uses canonical type names, returns class + names for objects, and indicates the resource type for resources. + RFC: https://wiki.php.net/rfc/get_debug_type - Zip: . ZipArchive::setMtimeName and ZipArchive::setMtimeIndex to set the diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 1700f3ad10cac..7294c2ecf0404 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -1382,6 +1382,9 @@ function socket_set_timeout($socket, int $seconds, int $microseconds = 0): bool /** @param mixed $var */ function gettype($var): string {} +/** @param mixed $var */ +function get_debug_type($var): string {} + function settype(&$var, string $type): bool {} /** @param mixed $value */ diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 7208e2d0464d8..d170f5dbd28be 100755 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -2051,6 +2051,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gettype, 0, 1, IS_STRING, 0) ZEND_ARG_INFO(0, var) ZEND_END_ARG_INFO() +#define arginfo_get_debug_type arginfo_gettype + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_settype, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(1, var) ZEND_ARG_TYPE_INFO(0, type, IS_STRING, 0) @@ -2792,6 +2794,7 @@ ZEND_FUNCTION(stream_set_chunk_size); ZEND_FUNCTION(stream_set_timeout); #endif ZEND_FUNCTION(gettype); +ZEND_FUNCTION(get_debug_type); ZEND_FUNCTION(settype); ZEND_FUNCTION(intval); ZEND_FUNCTION(floatval); @@ -3436,6 +3439,7 @@ static const zend_function_entry ext_functions[] = { ZEND_FALIAS(socket_set_timeout, stream_set_timeout, arginfo_socket_set_timeout) #endif ZEND_FE(gettype, arginfo_gettype) + ZEND_FE(get_debug_type, arginfo_get_debug_type) ZEND_FE(settype, arginfo_settype) ZEND_FE(intval, arginfo_intval) ZEND_FE(floatval, arginfo_floatval) diff --git a/ext/standard/tests/general_functions/get_debug_type_basic.phpt b/ext/standard/tests/general_functions/get_debug_type_basic.phpt new file mode 100644 index 0000000000000..35fc8085175c8 --- /dev/null +++ b/ext/standard/tests/general_functions/get_debug_type_basic.phpt @@ -0,0 +1,57 @@ +--TEST-- +Test get_debug_type() class reading +--FILE-- +ce->ce_flags & ZEND_ACC_ANON_CLASS) { + name = ZSTR_VAL(Z_OBJ_P(arg)->ce->name); + RETURN_NEW_STR(zend_string_init(name, strlen(name), 0)); + } else { + RETURN_STR_COPY(Z_OBJ_P(arg)->ce->name); + } + case IS_RESOURCE: + name = zend_rsrc_list_get_rsrc_type(Z_RES_P(arg)); + if (name) { + RETURN_NEW_STR(zend_strpprintf(0, "resource (%s)", name)); + } else { + RETURN_INTERNED_STR(ZSTR_KNOWN(ZEND_STR_CLOSED_RESOURCE)); + } + default: + RETURN_INTERNED_STR(ZSTR_KNOWN(ZEND_STR_UNKNOWN)); + } +} +/* }}} */ + + /* {{{ proto bool settype(mixed &var, string type) Set the type of the variable */ PHP_FUNCTION(settype) From 13df3fcb0af6ac13caed0a902428c914fdab7c58 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 23 Apr 2020 11:49:28 +0300 Subject: [PATCH 239/338] More accurate life range termination --- ext/opcache/jit/zend_jit_trace.c | 149 +++++++++++++++++++++---------- 1 file changed, 101 insertions(+), 48 deletions(-) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 2f19ddd6f3985..717b8dd55a469 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -1701,40 +1701,43 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin return tssa; } -static void zend_jit_close_var(zend_jit_trace_stack *stack, uint32_t n, const zend_ssa *ssa, const zend_op **ssa_opcodes, const zend_op_array *op_array, const zend_ssa *op_array_ssa, int *start, int *end, uint8_t *flags, int idx) +static void zend_jit_close_var(zend_jit_trace_stack *stack, uint32_t n, int *start, int *end, uint8_t *flags, int line) { int32_t var = STACK_VAR(stack, n); - int32_t use; - - if (var >= 0 && start[var] >= 0 && end[var] >= 0) { - if (end[var] >= 0 && op_array_ssa->vars) { - use = ssa_opcodes[end[var]] - op_array->opcodes; - if (ssa->ops[end[var]].op1_use == var) { - if (zend_ssa_is_last_use(op_array, op_array_ssa, op_array_ssa->ops[use].op1_use, use)) { - flags[var] |= ZREG_LAST_USE; - return; - } - } else if (ssa->ops[end[var]].op2_use == var) { - if (zend_ssa_is_last_use(op_array, op_array_ssa, op_array_ssa->ops[use].op2_use, use)) { - flags[var] |= ZREG_LAST_USE; - return; - } - } else if (ssa->ops[end[var]].result_use == var) { - if (zend_ssa_is_last_use(op_array, op_array_ssa, op_array_ssa->ops[use].result_use, use)) { - flags[var] |= ZREG_LAST_USE; - return; - } + + if (var >= 0 && start[var] >= 0 && !(flags[var] & ZREG_LAST_USE)) { + // TODO: shrink interval to last side exit ???? + end[var] = line; + } +} + +static void zend_jit_trace_use_var(int line, int var, int def, int use_chain, int *start, int *end, uint8_t *flags, const zend_ssa *ssa, const zend_op **ssa_opcodes, const zend_op_array *op_array, const zend_ssa *op_array_ssa) +{ + ZEND_ASSERT(start[var] >= 0); + ZEND_ASSERT(!(flags[var] & ZREG_LAST_USE)); + end[var] = line; + if (def >= 0) { + flags[var] |= ZREG_LAST_USE; + } else if (use_chain < 0 && (flags[var] & (ZREG_LOAD|ZREG_STORE))) { + flags[var] |= ZREG_LAST_USE; + } else if (use_chain >= 0 && !zend_ssa_is_no_val_use(ssa_opcodes[use_chain], ssa->ops + use_chain, var)) { + /* pass */ + } else if (op_array_ssa->vars) { + uint32_t use = ssa_opcodes[line] - op_array->opcodes; + + if (ssa->ops[line].op1_use == var) { + if (zend_ssa_is_last_use(op_array, op_array_ssa, op_array_ssa->ops[use].op1_use, use)) { + flags[var] |= ZREG_LAST_USE; + } + } else if (ssa->ops[line].op2_use == var) { + if (zend_ssa_is_last_use(op_array, op_array_ssa, op_array_ssa->ops[use].op2_use, use)) { + flags[var] |= ZREG_LAST_USE; + } + } else if (ssa->ops[line].result_use == var) { + if (zend_ssa_is_last_use(op_array, op_array_ssa, op_array_ssa->ops[use].result_use, use)) { + flags[var] |= ZREG_LAST_USE; } } -#if 0 - // TODO: try this optimization later ??? - if (flags[var] & (ZREG_LOAD|ZREG_STORE)) { - /* we don't have to extend live range if it's already in memory */ - return; - } -#endif - // TODO: shrink interval to last side exit ???? - end[var] = idx; } } @@ -1844,7 +1847,7 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace && start[ssa_op->op1_use] >= 0 && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op1_use)) { if (support_opline) { - end[ssa_op->op1_use] = idx; + zend_jit_trace_use_var(idx, ssa_op->op1_use, ssa_op->op1_def, ssa_op->op1_use_chain, start, end, flags, ssa, ssa_opcodes, op_array, op_array_ssa); } else { start[ssa_op->op1_use] = -1; end[ssa_op->op1_use] = -1; @@ -1852,10 +1855,11 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace } } if (ssa_op->op2_use >= 0 + && ssa_op->op2_use != ssa_op->op1_use && start[ssa_op->op2_use] >= 0 && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op2_use)) { if (support_opline) { - end[ssa_op->op2_use] = idx; + zend_jit_trace_use_var(idx, ssa_op->op2_use, ssa_op->op2_def, ssa_op->op2_use_chain, start, end, flags, ssa, ssa_opcodes, op_array, op_array_ssa); } else { start[ssa_op->op2_use] = -1; end[ssa_op->op2_use] = -1; @@ -1863,10 +1867,12 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace } } if (ssa_op->result_use >= 0 + && ssa_op->result_use != ssa_op->op1_use + && ssa_op->result_use != ssa_op->op2_use && start[ssa_op->result_use] >= 0 && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->result_use)) { if (support_opline) { - end[ssa_op->result_use] = idx; + zend_jit_trace_use_var(idx, ssa_op->result_use, ssa_op->result_def, ssa_op->res_use_chain, start, end, flags, ssa, ssa_opcodes, op_array, op_array_ssa); } else { start[ssa_op->result_use] = -1; end[ssa_op->result_use] = -1; @@ -1875,15 +1881,15 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace } if (ssa_op->op1_def >= 0) { - zend_jit_close_var(stack, EX_VAR_TO_NUM(opline->op1.var), ssa, ssa_opcodes, op_array, op_array_ssa, start, end, flags, idx); + zend_jit_close_var(stack, EX_VAR_TO_NUM(opline->op1.var), start, end, flags, idx); SET_STACK_VAR(stack, EX_VAR_TO_NUM(opline->op1.var), ssa_op->op1_def); } if (ssa_op->op2_def >= 0) { - zend_jit_close_var(stack, EX_VAR_TO_NUM(opline->op2.var), ssa, ssa_opcodes, op_array, op_array_ssa, start, end, flags, idx); + zend_jit_close_var(stack, EX_VAR_TO_NUM(opline->op2.var), start, end, flags, idx); SET_STACK_VAR(stack, EX_VAR_TO_NUM(opline->op2.var), ssa_op->op2_def); } if (ssa_op->result_def >= 0) { - zend_jit_close_var(stack, EX_VAR_TO_NUM(opline->result.var), ssa, ssa_opcodes, op_array, op_array_ssa, start, end, flags, idx); + zend_jit_close_var(stack, EX_VAR_TO_NUM(opline->result.var), start, end, flags, idx); SET_STACK_VAR(stack, EX_VAR_TO_NUM(opline->result.var), ssa_op->result_def); } @@ -1931,7 +1937,7 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace && start[ssa_op->op1_use] >= 0 && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op1_use)) { if (support_opline) { - end[ssa_op->op1_use] = idx; + zend_jit_trace_use_var(idx, ssa_op->op1_use, ssa_op->op1_def, ssa_op->op1_use_chain, start, end, flags, ssa, ssa_opcodes, op_array, op_array_ssa); } else { start[ssa_op->op1_use] = -1; end[ssa_op->op1_use] = -1; @@ -1939,7 +1945,7 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace } } if (ssa_op->op1_def >= 0) { - zend_jit_close_var(stack, EX_VAR_TO_NUM(opline->op1.var), ssa, ssa_opcodes, op_array, op_array_ssa, start, end, flags, idx); + zend_jit_close_var(stack, EX_VAR_TO_NUM(opline->op1.var), start, end, flags, idx); SET_STACK_VAR(stack, EX_VAR_TO_NUM(opline->op1.var), ssa_op->op1_def); if (support_opline && (ssa->vars[ssa_op->op1_def].use_chain >= 0 @@ -1961,7 +1967,7 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace while (opline->opcode == ZEND_RECV_INIT) { /* RECV_INIT doesn't support registers */ if (ssa_op->result_def >= 0) { - zend_jit_close_var(stack, EX_VAR_TO_NUM(opline->result.var), ssa, ssa_opcodes, op_array, op_array_ssa, start, end, flags, idx); + zend_jit_close_var(stack, EX_VAR_TO_NUM(opline->result.var), start, end, flags, idx); SET_STACK_VAR(stack, EX_VAR_TO_NUM(opline->result.var), ssa_op->result_def); } ssa_op++; @@ -1976,7 +1982,7 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace while (opline->opcode == ZEND_BIND_GLOBAL) { /* BIND_GLOBAL doesn't support registers */ if (ssa_op->op1_def >= 0) { - zend_jit_close_var(stack, EX_VAR_TO_NUM(opline->op1.var), ssa, ssa_opcodes, op_array, op_array_ssa, start, end, flags, idx); + zend_jit_close_var(stack, EX_VAR_TO_NUM(opline->op1.var), start, end, flags, idx); SET_STACK_VAR(stack, EX_VAR_TO_NUM(opline->op1.var), ssa_op->op1_def); } ssa_op++; @@ -2016,7 +2022,7 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace } else if (p->op == ZEND_JIT_TRACE_BACK) { /* Close exiting call frames */ for (i = 0; i < op_array->last_var; i++) { - zend_jit_close_var(stack, i, ssa, ssa_opcodes, op_array, op_array_ssa, start, end, flags, idx-1); + zend_jit_close_var(stack, i, start, end, flags, idx-1); } op_array = p->op_array; jit_extension = @@ -2050,8 +2056,10 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace zend_ssa_phi *phi = ssa->blocks[1].phis; while (phi) { - if (start[phi->sources[1]] >= 0) { - end[phi->sources[1]] = idx; + i = phi->sources[1]; + if (start[i] >= 0) { + end[i] = idx; + flags[i] &= ~ZREG_LAST_USE; } phi = phi->next; } @@ -2059,11 +2067,12 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace for (i = 0; i < op_array->last_var; i++) { if (start[i] >= 0 && !ssa->vars[i].phi_use_chain) { end[i] = idx; + flags[i] &= ~ZREG_LAST_USE; } } } else { for (i = 0; i < op_array->last_var; i++) { - zend_jit_close_var(stack, i, ssa, ssa_opcodes, op_array, op_array_ssa, start, end, flags, idx); + zend_jit_close_var(stack, i, start, end, flags, idx); } } @@ -2333,6 +2342,27 @@ static int zend_jit_trace_stack_needs_deoptimization(zend_jit_trace_stack *stack return 0; } +static void zend_jit_trace_clenup_stack(zend_jit_trace_stack *stack, const zend_op *opline, const zend_ssa_op *ssa_op, const zend_ssa *ssa, zend_lifetime_interval **ra) +{ + uint32_t line = ssa_op - ssa->ops; + + if (ssa_op->op1_use >= 0 + && ra[ssa_op->op1_use] + && ra[ssa_op->op1_use]->range.end == line) { + SET_STACK_REG(stack, EX_VAR_TO_NUM(opline->op1.var), ZREG_NONE); + } + if (ssa_op->op2_use >= 0 + && ra[ssa_op->op2_use] + && ra[ssa_op->op2_use]->range.end == line) { + SET_STACK_REG(stack, EX_VAR_TO_NUM(opline->op2.var), ZREG_NONE); + } + if (ssa_op->result_use >= 0 + && ra[ssa_op->result_use] + && ra[ssa_op->result_use]->range.end == line) { + SET_STACK_REG(stack, EX_VAR_TO_NUM(opline->result.var), ZREG_NONE); + } +} + static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t parent_trace, uint32_t exit_num) { const void *handler = NULL; @@ -3057,8 +3087,12 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par if ((opline->result_type & (IS_SMART_BRANCH_JMPZ|IS_SMART_BRANCH_JMPNZ)) != 0) { zend_bool exit_if_true = 0; const zend_op *exit_opline = zend_jit_trace_get_exit_opline(p + 1, opline + 1, &exit_if_true); - uint32_t exit_point = zend_jit_trace_get_exit_point(opline, exit_opline, p + 1); + uint32_t exit_point; + if (ra) { + zend_jit_trace_clenup_stack(stack, opline, ssa_op, ssa, ra); + } + exit_point = zend_jit_trace_get_exit_point(opline, exit_opline, p + 1); exit_addr = zend_jit_trace_get_exit_addr(exit_point); if (!exit_addr) { goto jit_failure; @@ -3086,8 +3120,12 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par if ((opline->result_type & (IS_SMART_BRANCH_JMPZ|IS_SMART_BRANCH_JMPNZ)) != 0) { zend_bool exit_if_true = 0; const zend_op *exit_opline = zend_jit_trace_get_exit_opline(p + 1, opline + 1, &exit_if_true); - uint32_t exit_point = zend_jit_trace_get_exit_point(opline, exit_opline, p + 1); + uint32_t exit_point; + if (ra) { + zend_jit_trace_clenup_stack(stack, opline, ssa_op, ssa, ra); + } + exit_point = zend_jit_trace_get_exit_point(opline, exit_opline, p + 1); exit_addr = zend_jit_trace_get_exit_addr(exit_point); if (!exit_addr) { goto jit_failure; @@ -3138,8 +3176,12 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par if ((opline->result_type & (IS_SMART_BRANCH_JMPZ|IS_SMART_BRANCH_JMPNZ)) != 0) { zend_bool exit_if_true = 0; const zend_op *exit_opline = zend_jit_trace_get_exit_opline(p + 1, opline + 1, &exit_if_true); - uint32_t exit_point = zend_jit_trace_get_exit_point(opline, exit_opline, p + 1); + uint32_t exit_point; + if (ra) { + zend_jit_trace_clenup_stack(stack, opline, ssa_op, ssa, ra); + } + exit_point = zend_jit_trace_get_exit_point(opline, exit_opline, p + 1); exit_addr = zend_jit_trace_get_exit_addr(exit_point); if (!exit_addr) { goto jit_failure; @@ -3256,6 +3298,9 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par } else { ZEND_ASSERT(0); } + if (ra) { + zend_jit_trace_clenup_stack(stack, opline, ssa_op, ssa, ra); + } exit_point = zend_jit_trace_get_exit_point(opline, exit_opline, p+1); exit_addr = zend_jit_trace_get_exit_addr(exit_point); if (!exit_addr) { @@ -3307,8 +3352,12 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par if ((opline->result_type & (IS_SMART_BRANCH_JMPZ|IS_SMART_BRANCH_JMPNZ)) != 0) { zend_bool exit_if_true = 0; const zend_op *exit_opline = zend_jit_trace_get_exit_opline(p + 1, opline + 1, &exit_if_true); - uint32_t exit_point = zend_jit_trace_get_exit_point(opline, exit_opline, p + 1); + uint32_t exit_point; + if (ra) { + zend_jit_trace_clenup_stack(stack, opline, ssa_op, ssa, ra); + } + exit_point = zend_jit_trace_get_exit_point(opline, exit_opline, p + 1); exit_addr = zend_jit_trace_get_exit_addr(exit_point); if (!exit_addr) { goto jit_failure; @@ -3513,6 +3562,10 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par } #endif + if (ra) { + zend_jit_trace_clenup_stack(stack, opline, ssa_op, ssa, ra); + } + /* Keep information about known types on abstract stack */ if (ssa_op->result_def >= 0) { zend_uchar type = IS_UNKNOWN; From cf7c68283d7a4e05f687e26343cfb90a3c06f1b3 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 23 Apr 2020 11:34:07 +0200 Subject: [PATCH 240/338] Fix treatment of "self" when validating against trait method If we're validating a class method against a trait method, we need to treat "self" in the trait method as the class where the method is used. To achieve this, we need to thread the proto scope through all methods, so it can be provided separately from proto.common->scope. --- Zend/tests/traits/abstract_method_10.phpt | 19 +++++ Zend/tests/traits/abstract_method_8.phpt | 21 +++++ Zend/tests/traits/abstract_method_9.phpt | 29 +++++++ Zend/zend_inheritance.c | 97 +++++++++++++++-------- 4 files changed, 131 insertions(+), 35 deletions(-) create mode 100644 Zend/tests/traits/abstract_method_10.phpt create mode 100644 Zend/tests/traits/abstract_method_8.phpt create mode 100644 Zend/tests/traits/abstract_method_9.phpt diff --git a/Zend/tests/traits/abstract_method_10.phpt b/Zend/tests/traits/abstract_method_10.phpt new file mode 100644 index 0000000000000..3dcd603d41476 --- /dev/null +++ b/Zend/tests/traits/abstract_method_10.phpt @@ -0,0 +1,19 @@ +--TEST-- +Abstract method in trait using "self" (invalid) +--FILE-- + +===DONE=== +--EXPECTF-- +Fatal error: Declaration of C::method(int $x): int must be compatible with T::method(C $x): C in %s on line %d diff --git a/Zend/tests/traits/abstract_method_8.phpt b/Zend/tests/traits/abstract_method_8.phpt new file mode 100644 index 0000000000000..1893cc2b38196 --- /dev/null +++ b/Zend/tests/traits/abstract_method_8.phpt @@ -0,0 +1,21 @@ +--TEST-- +Abstract method in trait using "self" +--FILE-- + +===DONE=== +--EXPECT-- +===DONE=== diff --git a/Zend/tests/traits/abstract_method_9.phpt b/Zend/tests/traits/abstract_method_9.phpt new file mode 100644 index 0000000000000..02877c8255a0c --- /dev/null +++ b/Zend/tests/traits/abstract_method_9.phpt @@ -0,0 +1,29 @@ +--TEST-- +Abstract method in trait using "self" (delayed obligation) +--FILE-- + +===DONE=== +--EXPECT-- +===DONE=== diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 1c10da561665f..3725c00ccc1c2 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -29,7 +29,8 @@ static void add_dependency_obligation(zend_class_entry *ce, zend_class_entry *dependency_ce); static void add_compatibility_obligation( - zend_class_entry *ce, const zend_function *child_fn, const zend_function *parent_fn); + zend_class_entry *ce, const zend_function *child_fn, const zend_function *parent_fn, + zend_class_entry *parent_scope); static void add_property_compatibility_obligation( zend_class_entry *ce, const zend_property_info *child_prop, const zend_property_info *parent_prop); @@ -496,8 +497,8 @@ static inheritance_status zend_perform_covariant_type_check( /* }}} */ static inheritance_status zend_do_perform_arg_type_hint_check( - const zend_function *fe, zend_arg_info *fe_arg_info, - const zend_function *proto, zend_arg_info *proto_arg_info) /* {{{ */ + zend_class_entry *fe_scope, zend_arg_info *fe_arg_info, + zend_class_entry *proto_scope, zend_arg_info *proto_arg_info) /* {{{ */ { if (!ZEND_TYPE_IS_SET(fe_arg_info->type)) { /* Child with no type is always compatible */ @@ -512,12 +513,16 @@ static inheritance_status zend_do_perform_arg_type_hint_check( /* Contravariant type check is performed as a covariant type check with swapped * argument order. */ return zend_perform_covariant_type_check( - proto->common.scope, proto_arg_info->type, fe->common.scope, fe_arg_info->type); + proto_scope, proto_arg_info->type, fe_scope, fe_arg_info->type); } /* }}} */ +/* For abstract trait methods, proto_scope will differ from proto->common.scope, + * as self will refer to the self of the class the trait is used in, not the trait + * the method was declared in. */ static inheritance_status zend_do_perform_implementation_check( - const zend_function *fe, const zend_function *proto) /* {{{ */ + const zend_function *fe, const zend_function *proto, + zend_class_entry *proto_scope) /* {{{ */ { uint32_t i, num_args, proto_num_args, fe_num_args; inheritance_status status, local_status; @@ -578,7 +583,8 @@ static inheritance_status zend_do_perform_implementation_check( return INHERITANCE_ERROR; } - local_status = zend_do_perform_arg_type_hint_check(fe, fe_arg_info, proto, proto_arg_info); + local_status = zend_do_perform_arg_type_hint_check( + fe->common.scope, fe_arg_info, proto_scope, proto_arg_info); if (UNEXPECTED(local_status != INHERITANCE_SUCCESS)) { if (UNEXPECTED(local_status == INHERITANCE_ERROR)) { @@ -604,7 +610,7 @@ static inheritance_status zend_do_perform_implementation_check( local_status = zend_perform_covariant_type_check( fe->common.scope, fe->common.arg_info[-1].type, - proto->common.scope, proto->common.arg_info[-1].type); + proto_scope, proto->common.arg_info[-1].type); if (UNEXPECTED(local_status != INHERITANCE_SUCCESS)) { if (UNEXPECTED(local_status == INHERITANCE_ERROR)) { @@ -619,10 +625,11 @@ static inheritance_status zend_do_perform_implementation_check( } /* }}} */ -static ZEND_COLD void zend_append_type_hint(smart_str *str, const zend_function *fptr, zend_arg_info *arg_info, int return_hint) /* {{{ */ +static ZEND_COLD void zend_append_type_hint( + smart_str *str, zend_class_entry *scope, zend_arg_info *arg_info, int return_hint) /* {{{ */ { if (ZEND_TYPE_IS_SET(arg_info->type)) { - zend_string *type_str = zend_type_to_string_resolved(arg_info->type, fptr->common.scope); + zend_string *type_str = zend_type_to_string_resolved(arg_info->type, scope); smart_str_append(str, type_str); zend_string_release(type_str); if (!return_hint) { @@ -632,7 +639,8 @@ static ZEND_COLD void zend_append_type_hint(smart_str *str, const zend_function } /* }}} */ -static ZEND_COLD zend_string *zend_get_function_declaration(const zend_function *fptr) /* {{{ */ +static ZEND_COLD zend_string *zend_get_function_declaration( + const zend_function *fptr, zend_class_entry *scope) /* {{{ */ { smart_str str = {0}; @@ -659,7 +667,7 @@ static ZEND_COLD zend_string *zend_get_function_declaration(const zend_function num_args++; } for (i = 0; i < num_args;) { - zend_append_type_hint(&str, fptr, arg_info, 0); + zend_append_type_hint(&str, scope, arg_info, 0); if (ZEND_ARG_SEND_MODE(arg_info)) { smart_str_appendc(&str, '&'); @@ -752,7 +760,7 @@ static ZEND_COLD zend_string *zend_get_function_declaration(const zend_function if (fptr->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) { smart_str_appends(&str, ": "); - zend_append_type_hint(&str, fptr, fptr->common.arg_info - 1, 1); + zend_append_type_hint(&str, scope, fptr->common.arg_info - 1, 1); } smart_str_0(&str); @@ -765,10 +773,10 @@ static zend_always_inline uint32_t func_lineno(const zend_function *fn) { } static void ZEND_COLD emit_incompatible_method_error( - const zend_function *child, const zend_function *parent, + const zend_function *child, const zend_function *parent, zend_class_entry *parent_scope, inheritance_status status) { - zend_string *parent_prototype = zend_get_function_declaration(parent); - zend_string *child_prototype = zend_get_function_declaration(child); + zend_string *parent_prototype = zend_get_function_declaration(parent, parent_scope); + zend_string *child_prototype = zend_get_function_declaration(child, child->common.scope); if (status == INHERITANCE_UNRESOLVED) { /* Fetch the first unresolved class from registered autoloads */ zend_string *unresolved_class = NULL; @@ -791,20 +799,23 @@ static void ZEND_COLD emit_incompatible_method_error( static void perform_delayable_implementation_check( zend_class_entry *ce, const zend_function *fe, - const zend_function *proto) + const zend_function *proto, zend_class_entry *proto_scope) { - inheritance_status status = zend_do_perform_implementation_check(fe, proto); + inheritance_status status = zend_do_perform_implementation_check(fe, proto, proto_scope); if (UNEXPECTED(status != INHERITANCE_SUCCESS)) { if (EXPECTED(status == INHERITANCE_UNRESOLVED)) { - add_compatibility_obligation(ce, fe, proto); + add_compatibility_obligation(ce, fe, proto, proto_scope); } else { ZEND_ASSERT(status == INHERITANCE_ERROR); - emit_incompatible_method_error(fe, proto, status); + emit_incompatible_method_error(fe, proto, proto_scope, status); } } } -static zend_always_inline inheritance_status do_inheritance_check_on_method_ex(zend_function *child, zend_function *parent, zend_class_entry *ce, zval *child_zv, zend_bool check_visibility, zend_bool check_only, zend_bool checked) /* {{{ */ +static zend_always_inline inheritance_status do_inheritance_check_on_method_ex( + zend_function *child, zend_function *parent, + zend_class_entry *ce, zend_class_entry *parent_scope, zval *child_zv, + zend_bool check_visibility, zend_bool check_only, zend_bool checked) /* {{{ */ { uint32_t child_flags; uint32_t parent_flags = parent->common.fn_flags; @@ -899,17 +910,20 @@ static zend_always_inline inheritance_status do_inheritance_check_on_method_ex(z if (!checked) { if (check_only) { - return zend_do_perform_implementation_check(child, parent); + return zend_do_perform_implementation_check(child, parent, parent_scope); } - perform_delayable_implementation_check(ce, child, parent); + perform_delayable_implementation_check(ce, child, parent, parent_scope); } return INHERITANCE_SUCCESS; } /* }}} */ -static zend_never_inline void do_inheritance_check_on_method(zend_function *child, zend_function *parent, zend_class_entry *ce, zval *child_zv, zend_bool check_visibility) /* {{{ */ +static zend_never_inline void do_inheritance_check_on_method( + zend_function *child, zend_function *parent, + zend_class_entry *ce, zend_class_entry *parent_scope, + zval *child_zv, zend_bool check_visibility) /* {{{ */ { - do_inheritance_check_on_method_ex(child, parent, ce, child_zv, check_visibility, 0, 0); + do_inheritance_check_on_method_ex(child, parent, ce, parent_scope, child_zv, check_visibility, 0, 0); } /* }}} */ @@ -927,9 +941,11 @@ static zend_always_inline void do_inherit_method(zend_string *key, zend_function if (checked) { do_inheritance_check_on_method_ex( - func, parent, ce, child, /* check_visibility */ 1, 0, checked); + func, parent, ce, parent->common.scope, child, + /* check_visibility */ 1, 0, checked); } else { - do_inheritance_check_on_method(func, parent, ce, child, /* check_visibility */ 1); + do_inheritance_check_on_method( + func, parent, ce, parent->common.scope, child, /* check_visibility */ 1); } } else { @@ -1589,8 +1605,13 @@ static void zend_add_trait_method(zend_class_entry *ce, zend_string *name, zend_ /* "abstract private" methods in traits were not available prior to PHP 8. * As such, "abstract protected" was sometimes used to indicate trait requirements, * even though the "implementing" method was private. Do not check visibility - * requirements to maintain backwards-compatibility with such usage. */ - do_inheritance_check_on_method(existing_fn, fn, ce, NULL, /* check_visibility */ 0); + * requirements to maintain backwards-compatibility with such usage. + * + * The parent_scope passed here is not fn->common.scope, because we want "self" to be + * resolved against the using class, not the declaring trait. + */ + do_inheritance_check_on_method( + existing_fn, fn, ce, /* parent_scope */ ce, NULL, /* check_visibility */ 0); return; } @@ -1607,7 +1628,8 @@ static void zend_add_trait_method(zend_class_entry *ce, zend_string *name, zend_ } else { /* inherited members are overridden by members inserted by traits */ /* check whether the trait method fulfills the inheritance requirements */ - do_inheritance_check_on_method(fn, existing_fn, ce, NULL, /* check_visibility */ 1); + do_inheritance_check_on_method( + fn, existing_fn, ce, existing_fn->common.scope, NULL, /* check_visibility */ 1); } } @@ -2182,6 +2204,7 @@ typedef struct { * so use copies of functions here as well. */ zend_function parent_fn; zend_function child_fn; + zend_class_entry *parent_scope; }; struct { const zend_property_info *parent_prop; @@ -2229,7 +2252,8 @@ static void add_dependency_obligation(zend_class_entry *ce, zend_class_entry *de } static void add_compatibility_obligation( - zend_class_entry *ce, const zend_function *child_fn, const zend_function *parent_fn) { + zend_class_entry *ce, const zend_function *child_fn, const zend_function *parent_fn, + zend_class_entry *parent_scope) { HashTable *obligations = get_or_init_obligations_for_class(ce); variance_obligation *obligation = emalloc(sizeof(variance_obligation)); obligation->type = OBLIGATION_COMPATIBILITY; @@ -2244,6 +2268,7 @@ static void add_compatibility_obligation( } else { memcpy(&obligation->parent_fn, parent_fn, sizeof(zend_op_array)); } + obligation->parent_scope = parent_scope; zend_hash_next_index_insert_ptr(obligations, obligation); } @@ -2272,13 +2297,14 @@ static int check_variance_obligation(zval *zv) { } } else if (obligation->type == OBLIGATION_COMPATIBILITY) { inheritance_status status = zend_do_perform_implementation_check( - &obligation->child_fn, &obligation->parent_fn); + &obligation->child_fn, &obligation->parent_fn, obligation->parent_scope); if (UNEXPECTED(status != INHERITANCE_SUCCESS)) { if (EXPECTED(status == INHERITANCE_UNRESOLVED)) { return ZEND_HASH_APPLY_KEEP; } ZEND_ASSERT(status == INHERITANCE_ERROR); - emit_incompatible_method_error(&obligation->child_fn, &obligation->parent_fn, status); + emit_incompatible_method_error( + &obligation->child_fn, &obligation->parent_fn, obligation->parent_scope, status); } /* Either the compatibility check was successful or only threw a warning. */ } else { @@ -2345,10 +2371,10 @@ static void report_variance_errors(zend_class_entry *ce) { /* Just used to populate the delayed_autoloads table, * which will be used when printing the "unresolved" error. */ inheritance_status status = zend_do_perform_implementation_check( - &obligation->child_fn, &obligation->parent_fn); + &obligation->child_fn, &obligation->parent_fn, obligation->parent_scope); ZEND_ASSERT(status == INHERITANCE_UNRESOLVED); emit_incompatible_method_error( - &obligation->child_fn, &obligation->parent_fn, status); + &obligation->child_fn, &obligation->parent_fn, obligation->parent_scope, status); } else if (obligation->type == OBLIGATION_PROPERTY_COMPATIBILITY) { emit_incompatible_property_error(obligation->child_prop, obligation->parent_prop); } else { @@ -2475,7 +2501,8 @@ static inheritance_status zend_can_early_bind(zend_class_entry *ce, zend_class_e zend_function *child_func = Z_FUNC_P(zv); inheritance_status status = do_inheritance_check_on_method_ex( - child_func, parent_func, ce, NULL, /* check_visibility */ 1, 1, 0); + child_func, parent_func, ce, parent_func->common.scope, NULL, + /* check_visibility */ 1, 1, 0); if (UNEXPECTED(status != INHERITANCE_SUCCESS)) { return status; From 64d30c19768484c8eb7225818fe32d7e3696557f Mon Sep 17 00:00:00 2001 From: Jacob Dreesen Date: Thu, 23 Apr 2020 11:20:58 +0200 Subject: [PATCH 241/338] Fix typo in UPGRADING [ci skip] --- UPGRADING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPGRADING b/UPGRADING index fd56cf201d75b..07305869f776c 100644 --- a/UPGRADING +++ b/UPGRADING @@ -535,7 +535,7 @@ PHP 8.0 UPGRADE NOTES IEEE 754 semantics. Division by zero is considered well-defined and will return one of Inf, -Inf or NaN. . Added get_debug_type() function, which returns a type useful for error - messages. Unlike get_type(), it uses canonical type names, returns class + messages. Unlike gettype(), it uses canonical type names, returns class names for objects, and indicates the resource type for resources. RFC: https://wiki.php.net/rfc/get_debug_type From 0810fcd0d0eb907b79b9619f73dc7d13aed5c611 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 19 Mar 2020 00:51:51 +0100 Subject: [PATCH 242/338] Make throw statement an expression RFC: https://wiki.php.net/rfc/throw_expression This has an open issue with temporaries that are live at the time of the throw being leaked. Landing this now for easier testing and will revert if we cannot resolve the issue. Closes GH-5279. --- UPGRADING | 3 + Zend/tests/throw/001.phpt | 175 ++++++++++++++++++ Zend/tests/throw/002.phpt | 127 +++++++++++++ Zend/zend_compile.c | 11 +- Zend/zend_language_parser.y | 3 +- ext/tokenizer/tests/PhpToken_getAll.phpt | 16 +- .../tests/token_get_all_variation4.phpt | 2 +- ext/tokenizer/tokenizer_data.c | 4 +- 8 files changed, 325 insertions(+), 16 deletions(-) create mode 100644 Zend/tests/throw/001.phpt create mode 100644 Zend/tests/throw/002.phpt diff --git a/UPGRADING b/UPGRADING index 07305869f776c..c4eca6daaa0e0 100644 --- a/UPGRADING +++ b/UPGRADING @@ -459,6 +459,9 @@ PHP 8.0 UPGRADE NOTES defines a __toString() method. RFC: https://wiki.php.net/rfc/stringable . Traits can now define abstract private methods. + RFC: https://wiki.php.net/rfc/abstract_trait_method_validation + . `throw` can now be used as an expression. + RFC: https://wiki.php.net/rfc/throw_expression - Date: . Added DateTime::createFromInterface() and diff --git a/Zend/tests/throw/001.phpt b/Zend/tests/throw/001.phpt new file mode 100644 index 0000000000000..072d9f45b54e1 --- /dev/null +++ b/Zend/tests/throw/001.phpt @@ -0,0 +1,175 @@ +--TEST-- +throw expression +--FILE-- +getMessage()); +} + +try { + $result = false && throw new Exception("false && throw"); + var_dump($result); +} catch (Exception $e) { + var_dump($e->getMessage()); +} + +try { + $result = true and throw new Exception("true and throw"); + var_dump($result); +} catch (Exception $e) { + var_dump($e->getMessage()); +} + +try { + $result = false and throw new Exception("false and throw"); + var_dump($result); +} catch (Exception $e) { + var_dump($e->getMessage()); +} + +try { + $result = true || throw new Exception("true || throw"); + var_dump($result); +} catch (Exception $e) { + var_dump($e->getMessage()); +} + +try { + $result = false || throw new Exception("false || throw"); + var_dump($result); +} catch (Exception $e) { + var_dump($e->getMessage()); +} + +try { + $result = true or throw new Exception("true or throw"); + var_dump($result); +} catch (Exception $e) { + var_dump($e->getMessage()); +} + +try { + $result = false or throw new Exception("false or throw"); + var_dump($result); +} catch (Exception $e) { + var_dump($e->getMessage()); +} + +try { + $result = null ?? throw new Exception("null ?? throw"); + var_dump($result); +} catch (Exception $e) { + var_dump($e->getMessage()); +} + +try { + $result = "foo" ?? throw new Exception('"foo" ?? throw'); + var_dump($result); +} catch (Exception $e) { + var_dump($e->getMessage()); +} + +try { + $result = null ?: throw new Exception("null ?: throw"); + var_dump($result); +} catch (Exception $e) { + var_dump($e->getMessage()); +} + +try { + $result = "foo" ?: throw new Exception('"foo" ?: throw'); + var_dump($result); +} catch (Exception $e) { + var_dump($e->getMessage()); +} + +try { + $callable = fn() => throw new Exception("fn() => throw"); + var_dump("not yet"); + $callable(); +} catch (Exception $e) { + var_dump($e->getMessage()); +} + +$result = "bar"; +try { + $result = throw new Exception(); +} catch (Exception $e) {} +var_dump($result); + +try { + var_dump( + throw new Exception("exception 1"), + throw new Exception("exception 2") + ); +} catch (Exception $e) { + var_dump($e->getMessage()); +} + +try { + $result = true ? true : throw new Exception("true ? true : throw"); + var_dump($result); +} catch (Exception $e) { + var_dump($e->getMessage()); +} + +try { + $result = false ? true : throw new Exception("false ? true : throw"); + var_dump($result); +} catch (Exception $e) { + var_dump($e->getMessage()); +} + +try { + throw new Exception() + 1; +} catch (Throwable $e) { + var_dump($e->getMessage()); +} + +try { + throw $exception = new Exception('throw $exception = new Exception();'); +} catch (Exception $e) {} +var_dump($exception->getMessage()); + +try { + $exception = null; + throw $exception ??= new Exception('throw $exception ??= new Exception();'); +} catch (Exception $e) {} +var_dump($exception->getMessage()); + +try { + throw null ?? new Exception('throw null ?? new Exception();'); +} catch (Exception $e) { + var_dump($e->getMessage()); +} + +?> +--EXPECTF-- +string(13) "true && throw" +bool(false) +string(14) "true and throw" +bool(false) +bool(true) +string(14) "false || throw" +bool(true) +string(14) "false or throw" +string(13) "null ?? throw" +string(3) "foo" +string(13) "null ?: throw" +string(3) "foo" +string(7) "not yet" +string(13) "fn() => throw" +string(3) "bar" +string(11) "exception 1" +bool(true) +string(20) "false ? true : throw" + +Notice: Object of class Exception could not be converted to number in %s on line %d +string(22) "Can only throw objects" +string(35) "throw $exception = new Exception();" +string(37) "throw $exception ??= new Exception();" +string(30) "throw null ?? new Exception();" diff --git a/Zend/tests/throw/002.phpt b/Zend/tests/throw/002.phpt new file mode 100644 index 0000000000000..8736c27fc3142 --- /dev/null +++ b/Zend/tests/throw/002.phpt @@ -0,0 +1,127 @@ +--TEST-- +Test throw with various expressions +--FILE-- +createNotFoundException(); + } + + public static function staticCreateNotFoundException() { + return new Exception('Static not found'); + } + + public static function staticThrowException() { + throw static::staticCreateNotFoundException(); + } +} + +try { + (new Foo())->throwException(); +} catch(Exception $e) { + echo $e->getMessage() . "\n"; +} + +try { + Foo::staticThrowException(); +} catch(Exception $e) { + echo $e->getMessage() . "\n"; +} + +try { + throw true ? new Exception('Ternary true 1') : new Exception('Ternary true 2'); +} catch(Exception $e) { + echo $e->getMessage() . "\n"; +} + +try { + throw false ? new Exception('Ternary false 1') : new Exception('Ternary false 2'); +} catch(Exception $e) { + echo $e->getMessage() . "\n"; +} + +try { + $exception1 = new Exception('Coalesce non-null 1'); + $exception2 = new Exception('Coalesce non-null 2'); + throw $exception1 ?? $exception2; +} catch(Exception $e) { + echo $e->getMessage() . "\n"; +} + +try { + $exception1 = null; + $exception2 = new Exception('Coalesce null 2'); + throw $exception1 ?? $exception2; +} catch(Exception $e) { + echo $e->getMessage() . "\n"; +} + +try { + throw $exception = new Exception('Assignment'); +} catch(Exception $e) { + echo $e->getMessage() . "\n"; +} + +try { + $exception = null; + throw $exception ??= new Exception('Coalesce assignment null'); +} catch(Exception $e) { + echo $e->getMessage() . "\n"; +} + +try { + $exception = new Exception('Coalesce assignment non-null 1'); + throw $exception ??= new Exception('Coalesce assignment non-null 2'); +} catch(Exception $e) { + echo $e->getMessage() . "\n"; +} + +$andConditionalTest = function ($condition1, $condition2) { + throw $condition1 && $condition2 + ? new Exception('And in conditional 1') + : new Exception('And in conditional 2'); +}; + +try { + $andConditionalTest(false, false); +} catch(Exception $e) { + echo $e->getMessage() . "\n"; +} + +try { + $andConditionalTest(false, true); +} catch (Exception $e) { + echo $e->getMessage() . "\n"; +} + +try { + $andConditionalTest(true, false); +} catch (Exception $e) { + echo $e->getMessage() . "\n"; +} + +try { + $andConditionalTest(true, true); +} catch (Exception $e) { + echo $e->getMessage() . "\n"; +} + +--EXPECT-- +Not found +Static not found +Ternary true 1 +Ternary false 2 +Coalesce non-null 1 +Coalesce null 2 +Assignment +Coalesce assignment null +Coalesce assignment non-null 1 +And in conditional 2 +And in conditional 2 +And in conditional 2 +And in conditional 1 diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 2e30295980c4f..aa108c4d7f91c 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -4557,7 +4557,7 @@ void zend_compile_echo(zend_ast *ast) /* {{{ */ } /* }}} */ -void zend_compile_throw(zend_ast *ast) /* {{{ */ +void zend_compile_throw(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *expr_ast = ast->child[0]; @@ -4565,6 +4565,9 @@ void zend_compile_throw(zend_ast *ast) /* {{{ */ zend_compile_expr(&expr_node, expr_ast); zend_emit_op(NULL, ZEND_THROW, &expr_node, NULL); + + result->op_type = IS_CONST; + ZVAL_BOOL(&result->u.constant, 1); } /* }}} */ @@ -8741,9 +8744,6 @@ void zend_compile_stmt(zend_ast *ast) /* {{{ */ case ZEND_AST_ECHO: zend_compile_echo(ast); break; - case ZEND_AST_THROW: - zend_compile_throw(ast); - break; case ZEND_AST_BREAK: case ZEND_AST_CONTINUE: zend_compile_break_continue(ast); @@ -8953,6 +8953,9 @@ void zend_compile_expr(znode *result, zend_ast *ast) /* {{{ */ case ZEND_AST_ARROW_FUNC: zend_compile_func_decl(result, ast, 0); return; + case ZEND_AST_THROW: + zend_compile_throw(result, ast); + break; default: ZEND_ASSERT(0 /* not supported */); } diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y index c1ced9a35aa21..c75c1e6993865 100644 --- a/Zend/zend_language_parser.y +++ b/Zend/zend_language_parser.y @@ -51,6 +51,7 @@ static YYSIZE_T zend_yytnamerr(char*, const char*); %destructor { zend_ast_destroy($$); } %destructor { if ($$) zend_string_release_ex($$, 0); } +%precedence T_THROW %precedence PREC_ARROW_FUNCTION %precedence T_INCLUDE T_INCLUDE_ONCE T_REQUIRE T_REQUIRE_ONCE %left T_LOGICAL_OR @@ -457,7 +458,6 @@ statement: | ';' /* empty statement */ { $$ = NULL; } | T_TRY '{' inner_statement_list '}' catch_list finally_statement { $$ = zend_ast_create(ZEND_AST_TRY, $3, $5, $6); } - | T_THROW expr ';' { $$ = zend_ast_create(ZEND_AST_THROW, $2); } | T_GOTO T_STRING ';' { $$ = zend_ast_create(ZEND_AST_GOTO, $2); } | T_STRING ':' { $$ = zend_ast_create(ZEND_AST_LABEL, $1); } ; @@ -1019,6 +1019,7 @@ expr: | T_YIELD expr { $$ = zend_ast_create(ZEND_AST_YIELD, $2, NULL); CG(extra_fn_flags) |= ZEND_ACC_GENERATOR; } | T_YIELD expr T_DOUBLE_ARROW expr { $$ = zend_ast_create(ZEND_AST_YIELD, $4, $2); CG(extra_fn_flags) |= ZEND_ACC_GENERATOR; } | T_YIELD_FROM expr { $$ = zend_ast_create(ZEND_AST_YIELD_FROM, $2); CG(extra_fn_flags) |= ZEND_ACC_GENERATOR; } + | T_THROW expr { $$ = zend_ast_create(ZEND_AST_THROW, $2); } | inline_function { $$ = $1; } | T_STATIC inline_function { $$ = $2; ((zend_ast_decl *) $$)->flags |= ZEND_ACC_STATIC; } ; diff --git a/ext/tokenizer/tests/PhpToken_getAll.phpt b/ext/tokenizer/tests/PhpToken_getAll.phpt index 604a979023ed7..baab0a5658e24 100644 --- a/ext/tokenizer/tests/PhpToken_getAll.phpt +++ b/ext/tokenizer/tests/PhpToken_getAll.phpt @@ -32,7 +32,7 @@ array(15) { [1]=> object(PhpToken)#2 (4) { ["id"]=> - int(342) + int(343) ["text"]=> string(8) "function" ["line"]=> @@ -54,7 +54,7 @@ array(15) { [3]=> object(PhpToken)#4 (4) { ["id"]=> - int(310) + int(311) ["text"]=> string(3) "foo" ["line"]=> @@ -121,7 +121,7 @@ array(15) { [9]=> object(PhpToken)#10 (4) { ["id"]=> - int(324) + int(325) ["text"]=> string(4) "echo" ["line"]=> @@ -143,7 +143,7 @@ array(15) { [11]=> object(PhpToken)#12 (4) { ["id"]=> - int(314) + int(315) ["text"]=> string(5) ""bar"" ["line"]=> @@ -202,7 +202,7 @@ array(15) { [1]=> object(PhpToken)#14 (4) { ["id"]=> - int(342) + int(343) ["text"]=> string(8) "function" ["line"]=> @@ -224,7 +224,7 @@ array(15) { [3]=> object(PhpToken)#12 (4) { ["id"]=> - int(310) + int(311) ["text"]=> string(3) "foo" ["line"]=> @@ -291,7 +291,7 @@ array(15) { [9]=> object(PhpToken)#6 (4) { ["id"]=> - int(324) + int(325) ["text"]=> string(4) "echo" ["line"]=> @@ -313,7 +313,7 @@ array(15) { [11]=> object(PhpToken)#4 (4) { ["id"]=> - int(314) + int(315) ["text"]=> string(5) ""bar"" ["line"]=> diff --git a/ext/tokenizer/tests/token_get_all_variation4.phpt b/ext/tokenizer/tests/token_get_all_variation4.phpt index 66e3cb413d2c4..be18ddf0b35c1 100644 --- a/ext/tokenizer/tests/token_get_all_variation4.phpt +++ b/ext/tokenizer/tests/token_get_all_variation4.phpt @@ -80,7 +80,7 @@ array(88) { [5]=> array(3) { [0]=> - int(286) + int(%d) [1]=> string(2) "==" [2]=> diff --git a/ext/tokenizer/tokenizer_data.c b/ext/tokenizer/tokenizer_data.c index 3ddf89521a8cd..9c7df932076ce 100644 --- a/ext/tokenizer/tokenizer_data.c +++ b/ext/tokenizer/tokenizer_data.c @@ -25,6 +25,7 @@ void tokenizer_register_constants(INIT_FUNC_ARGS) { + REGISTER_LONG_CONSTANT("T_THROW", T_THROW, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_INCLUDE", T_INCLUDE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_INCLUDE_ONCE", T_INCLUDE_ONCE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_REQUIRE", T_REQUIRE, CONST_CS | CONST_PERSISTENT); @@ -114,7 +115,6 @@ void tokenizer_register_constants(INIT_FUNC_ARGS) { REGISTER_LONG_CONSTANT("T_TRY", T_TRY, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_CATCH", T_CATCH, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_FINALLY", T_FINALLY, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("T_THROW", T_THROW, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_USE", T_USE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_INSTEADOF", T_INSTEADOF, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_GLOBAL", T_GLOBAL, CONST_CS | CONST_PERSISTENT); @@ -168,6 +168,7 @@ char *get_token_type_name(int token_type) { switch (token_type) { + case T_THROW: return "T_THROW"; case T_INCLUDE: return "T_INCLUDE"; case T_INCLUDE_ONCE: return "T_INCLUDE_ONCE"; case T_REQUIRE: return "T_REQUIRE"; @@ -257,7 +258,6 @@ char *get_token_type_name(int token_type) case T_TRY: return "T_TRY"; case T_CATCH: return "T_CATCH"; case T_FINALLY: return "T_FINALLY"; - case T_THROW: return "T_THROW"; case T_USE: return "T_USE"; case T_INSTEADOF: return "T_INSTEADOF"; case T_GLOBAL: return "T_GLOBAL"; From 51fb8398e2dcd56e7cb07bce9e0596ea14e2f03a Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Tue, 7 Apr 2020 15:41:06 +0200 Subject: [PATCH 243/338] Add additional preg_match test case (cherry picked from commit a1a044dcc74379fafb2b63db5ab033aa062aada7 on author's explicit request) --- ext/pcre/tests/preg_match_latin.phpt | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 ext/pcre/tests/preg_match_latin.phpt diff --git a/ext/pcre/tests/preg_match_latin.phpt b/ext/pcre/tests/preg_match_latin.phpt new file mode 100644 index 0000000000000..8f1d1899cb1c0 --- /dev/null +++ b/ext/pcre/tests/preg_match_latin.phpt @@ -0,0 +1,35 @@ +--TEST-- +preg_match() single line match with latin input +--FILE-- + +===Done=== +--EXPECT-- +array(3) { + [0]=> + array(1) { + [0]=> + string(5) "latin" + } + [1]=> + array(1) { + [0]=> + string(18) "кириллица" + } + [2]=> + array(1) { + [0]=> + string(5) "latin" + } +} +===Done=== From 41a04f96b487e642f3c046636f13412d95759b17 Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Fri, 24 Apr 2020 01:27:40 +0000 Subject: [PATCH 244/338] Remove dead checks for LOG_FILE paths, replace with CONFIG_ONLY option --- travis/compile.sh | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/travis/compile.sh b/travis/compile.sh index 7af4bb21b0d41..81e0750874218 100755 --- a/travis/compile.sh +++ b/travis/compile.sh @@ -15,21 +15,6 @@ else S390X_CONFIG=""; fi -if [[ -z "$CONFIG_LOG_FILE" ]]; then - CONFIG_QUIET="--quiet" - CONFIG_LOG_FILE="/dev/stdout" -else - CONFIG_QUIET="" -fi -if [[ -z "$MAKE_LOG_FILE" ]]; then - MAKE_QUIET="--quiet" - MAKE_LOG_FILE="/dev/stdout" -else - MAKE_QUIET="" -fi - -MAKE_JOBS=${MAKE_JOBS:-$(nproc)} - ./buildconf --force ./configure \ --enable-option-checking=fatal \ @@ -86,5 +71,8 @@ $S390X_CONFIG \ --enable-werror \ --with-pear -make "-j${MAKE_JOBS}" $MAKE_QUIET -make install +if [[ -z "$CONFIG_ONLY" ]]; then + MAKE_JOBS=${MAKE_JOBS:-$(nproc)} + make "-j${MAKE_JOBS}" $MAKE_QUIET + make install +fi From 767a77ac19af1192aa8b674d62f75b08abb199d6 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 23 Apr 2020 14:49:26 +0200 Subject: [PATCH 245/338] Fix #36365: scandir duplicates file name at every 65535th file Since DIR_W32.offset is declared as `uint16_t`, we have an overflow for directories with many entries. This patch changes the field to `uint32_t`. --- NEWS | 2 ++ ext/standard/tests/file/bug36365.phpt | 27 +++++++++++++++++++++++++++ win32/readdir.h | 2 +- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 ext/standard/tests/file/bug36365.phpt diff --git a/NEWS b/NEWS index e39f3587ad9c6..98c5a8a6f26b2 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,8 @@ PHP NEWS (cmb) . Fixed bug #79368 ("Unexpected end of file" is not an acceptable error message). (Alex Dowad) + . Fixed bug #36365 (scandir duplicates file name at every 65535th file). + (cmb) - BZ2: . Fixed bug #71263 (fread() does not report bzip2.decompress errors). (cmb) diff --git a/ext/standard/tests/file/bug36365.phpt b/ext/standard/tests/file/bug36365.phpt new file mode 100644 index 0000000000000..be1a6c5165558 --- /dev/null +++ b/ext/standard/tests/file/bug36365.phpt @@ -0,0 +1,27 @@ +--TEST-- +Bug #36365 (scandir duplicates file name at every 65535th file) +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECT-- +int(70002) diff --git a/win32/readdir.h b/win32/readdir.h index 61876f3dc10fc..cc8e1a9a2510c 100644 --- a/win32/readdir.h +++ b/win32/readdir.h @@ -26,7 +26,7 @@ struct dirent { /* typedef DIR - not the same as Unix */ struct DIR_W32 { HANDLE handle; /* _findfirst/_findnext handle */ - uint16_t offset; /* offset into directory */ + uint32_t offset; /* offset into directory */ uint8_t finished; /* 1 if there are not more files */ WIN32_FIND_DATAW fileinfo; /* from _findfirst/_findnext */ wchar_t *dirw; /* the dir we are reading */ From f7ad25f6c146ac181ac26c2bd04c056fd57e0cf3 Mon Sep 17 00:00:00 2001 From: Symeon Charalabides Date: Thu, 23 Apr 2020 23:51:07 +0100 Subject: [PATCH 246/338] Test XSLTProcessor::importStylesheet() with invalid stylesheet --- ...ocessor_importStylesheet-invalidparam.phpt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 ext/xsl/tests/xsltprocessor_importStylesheet-invalidparam.phpt diff --git a/ext/xsl/tests/xsltprocessor_importStylesheet-invalidparam.phpt b/ext/xsl/tests/xsltprocessor_importStylesheet-invalidparam.phpt new file mode 100644 index 0000000000000..91bd07cf8a121 --- /dev/null +++ b/ext/xsl/tests/xsltprocessor_importStylesheet-invalidparam.phpt @@ -0,0 +1,19 @@ +--TEST-- +XSLTProcessor::importStylesheet() - Test with invalid stylesheet +--SKIPIF-- + +--FILE-- +importStylesheet($dummy)); + +?> +--EXPECTF-- +Warning: Invalid Document in %s on line %d +bool(false) From c915c601710e2a44e6c7f89fcb12b8047c968108 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 24 Apr 2020 10:43:42 +0200 Subject: [PATCH 247/338] Update intl test suite for ICU 67.1 --- ext/intl/tests/locale_filter_matches3.phpt | 4 +- ext/intl/tests/locale_filter_matches4.phpt | 366 +++++++++++++++++++++ ext/intl/tests/locale_lookup_variant2.phpt | 2 +- ext/intl/tests/locale_lookup_variant3.phpt | 100 ++++++ 4 files changed, 469 insertions(+), 3 deletions(-) create mode 100644 ext/intl/tests/locale_filter_matches4.phpt create mode 100644 ext/intl/tests/locale_lookup_variant3.phpt diff --git a/ext/intl/tests/locale_filter_matches3.phpt b/ext/intl/tests/locale_filter_matches3.phpt index 703ba78154048..4f8f0379af0b3 100644 --- a/ext/intl/tests/locale_filter_matches3.phpt +++ b/ext/intl/tests/locale_filter_matches3.phpt @@ -1,8 +1,8 @@ --TEST-- -locale_filter_matches.phpt() ICU >= 51.2 +locale_filter_matches.phpt() ICU >= 51.2 && ICU < 67.1 --SKIPIF-- -= 51.2'); ?> += 0) die('skip for ICU < 67.1'); ?> --FILE-- = 67.1 +--SKIPIF-- + += 67.1'); ?> +--FILE-- + +--EXPECT-- +-------------- +loc_range:de-de matches lang_tag de-DEVA ? NO +loc_range:de_DE canonically matches lang_tag de_Deva ? NO +-------------- +loc_range:de-de matches lang_tag de-DE-1996 ? YES +loc_range:de_DE canonically matches lang_tag de_DE_1996 ? YES +-------------- +loc_range:de-de matches lang_tag de-DE ? YES +loc_range:de_DE canonically matches lang_tag de_DE ? YES +-------------- +loc_range:de-de matches lang_tag zh_Hans ? NO +loc_range:de_DE canonically matches lang_tag zh_Hans ? NO +-------------- +loc_range:de-de matches lang_tag de-CH-1996 ? NO +loc_range:de_DE canonically matches lang_tag de_CH_1996 ? NO +-------------- +loc_range:de-de matches lang_tag sl_IT ? NO +loc_range:de_DE canonically matches lang_tag sl_IT ? NO +-------------- +loc_range:de-de matches lang_tag sl_IT_nedis-a-kirti-x-xyz ? NO +loc_range:de_DE canonically matches lang_tag sl_IT_NEDIS_A_KIRTI_X_XYZ ? NO +-------------- +loc_range:de-de matches lang_tag sl_IT_rozaj ? NO +loc_range:de_DE canonically matches lang_tag sl_IT_ROZAJ ? NO +-------------- +loc_range:de-de matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? NO +loc_range:de_DE canonically matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? NO +-------------- +loc_range:de-de matches lang_tag i-enochian ? NO +loc_range:de_DE canonically matches lang_tag @x=i-enochian ? NO +-------------- +loc_range:de-de matches lang_tag sgn-CH-de ? NO +loc_range:de_DE canonically matches lang_tag sgn_CH_DE ? NO +-------------- +loc_range:de-de matches lang_tag art-lojban ? NO +loc_range:de_DE canonically matches lang_tag jbo ? NO +-------------- +loc_range:de-de matches lang_tag i-lux ? NO +loc_range:de_DE canonically matches lang_tag lb ? NO +-------------- +loc_range:de-de matches lang_tag art-lojban ? NO +loc_range:de_DE canonically matches lang_tag jbo ? NO +-------------- +loc_range:de-de matches lang_tag jbo ? NO +loc_range:de_DE canonically matches lang_tag jbo ? NO +-------------- +loc_range:de-de matches lang_tag en_sl_IT ? NO +loc_range:de_DE canonically matches lang_tag en_SL_IT ? NO +-------------- +loc_range:sl_IT matches lang_tag de-DEVA ? NO +loc_range:sl_IT canonically matches lang_tag de_Deva ? NO +-------------- +loc_range:sl_IT matches lang_tag de-DE-1996 ? NO +loc_range:sl_IT canonically matches lang_tag de_DE_1996 ? NO +-------------- +loc_range:sl_IT matches lang_tag de-DE ? NO +loc_range:sl_IT canonically matches lang_tag de_DE ? NO +-------------- +loc_range:sl_IT matches lang_tag zh_Hans ? NO +loc_range:sl_IT canonically matches lang_tag zh_Hans ? NO +-------------- +loc_range:sl_IT matches lang_tag de-CH-1996 ? NO +loc_range:sl_IT canonically matches lang_tag de_CH_1996 ? NO +-------------- +loc_range:sl_IT matches lang_tag sl_IT ? YES +loc_range:sl_IT canonically matches lang_tag sl_IT ? YES +-------------- +loc_range:sl_IT matches lang_tag sl_IT_nedis-a-kirti-x-xyz ? YES +loc_range:sl_IT canonically matches lang_tag sl_IT_NEDIS_A_KIRTI_X_XYZ ? YES +-------------- +loc_range:sl_IT matches lang_tag sl_IT_rozaj ? YES +loc_range:sl_IT canonically matches lang_tag sl_IT_ROZAJ ? YES +-------------- +loc_range:sl_IT matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? YES +loc_range:sl_IT canonically matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? YES +-------------- +loc_range:sl_IT matches lang_tag i-enochian ? NO +loc_range:sl_IT canonically matches lang_tag @x=i-enochian ? NO +-------------- +loc_range:sl_IT matches lang_tag sgn-CH-de ? NO +loc_range:sl_IT canonically matches lang_tag sgn_CH_DE ? NO +-------------- +loc_range:sl_IT matches lang_tag art-lojban ? NO +loc_range:sl_IT canonically matches lang_tag jbo ? NO +-------------- +loc_range:sl_IT matches lang_tag i-lux ? NO +loc_range:sl_IT canonically matches lang_tag lb ? NO +-------------- +loc_range:sl_IT matches lang_tag art-lojban ? NO +loc_range:sl_IT canonically matches lang_tag jbo ? NO +-------------- +loc_range:sl_IT matches lang_tag jbo ? NO +loc_range:sl_IT canonically matches lang_tag jbo ? NO +-------------- +loc_range:sl_IT matches lang_tag en_sl_IT ? NO +loc_range:sl_IT canonically matches lang_tag en_SL_IT ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag de-DEVA ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag de_Deva ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag de-DE-1996 ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag de_DE_1996 ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag de-DE ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag de_DE ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag zh_Hans ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag zh_Hans ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag de-CH-1996 ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag de_CH_1996 ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag sl_IT ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag sl_IT ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag sl_IT_nedis-a-kirti-x-xyz ? YES +loc_range:sl_IT_NEDIS canonically matches lang_tag sl_IT_NEDIS_A_KIRTI_X_XYZ ? YES +-------------- +loc_range:sl_IT_Nedis matches lang_tag sl_IT_rozaj ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag sl_IT_ROZAJ ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? YES +loc_range:sl_IT_NEDIS canonically matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? YES +-------------- +loc_range:sl_IT_Nedis matches lang_tag i-enochian ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag @x=i-enochian ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag sgn-CH-de ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag sgn_CH_DE ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag art-lojban ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag jbo ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag i-lux ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag lb ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag art-lojban ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag jbo ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag jbo ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag jbo ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag en_sl_IT ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag en_SL_IT ? NO +-------------- +loc_range:jbo matches lang_tag de-DEVA ? NO +loc_range:jbo canonically matches lang_tag de_Deva ? NO +-------------- +loc_range:jbo matches lang_tag de-DE-1996 ? NO +loc_range:jbo canonically matches lang_tag de_DE_1996 ? NO +-------------- +loc_range:jbo matches lang_tag de-DE ? NO +loc_range:jbo canonically matches lang_tag de_DE ? NO +-------------- +loc_range:jbo matches lang_tag zh_Hans ? NO +loc_range:jbo canonically matches lang_tag zh_Hans ? NO +-------------- +loc_range:jbo matches lang_tag de-CH-1996 ? NO +loc_range:jbo canonically matches lang_tag de_CH_1996 ? NO +-------------- +loc_range:jbo matches lang_tag sl_IT ? NO +loc_range:jbo canonically matches lang_tag sl_IT ? NO +-------------- +loc_range:jbo matches lang_tag sl_IT_nedis-a-kirti-x-xyz ? NO +loc_range:jbo canonically matches lang_tag sl_IT_NEDIS_A_KIRTI_X_XYZ ? NO +-------------- +loc_range:jbo matches lang_tag sl_IT_rozaj ? NO +loc_range:jbo canonically matches lang_tag sl_IT_ROZAJ ? NO +-------------- +loc_range:jbo matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? NO +loc_range:jbo canonically matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? NO +-------------- +loc_range:jbo matches lang_tag i-enochian ? NO +loc_range:jbo canonically matches lang_tag @x=i-enochian ? NO +-------------- +loc_range:jbo matches lang_tag sgn-CH-de ? NO +loc_range:jbo canonically matches lang_tag sgn_CH_DE ? NO +-------------- +loc_range:jbo matches lang_tag art-lojban ? NO +loc_range:jbo canonically matches lang_tag jbo ? YES +-------------- +loc_range:jbo matches lang_tag i-lux ? NO +loc_range:jbo canonically matches lang_tag lb ? NO +-------------- +loc_range:jbo matches lang_tag art-lojban ? NO +loc_range:jbo canonically matches lang_tag jbo ? YES +-------------- +loc_range:jbo matches lang_tag jbo ? YES +loc_range:jbo canonically matches lang_tag jbo ? YES +-------------- +loc_range:jbo matches lang_tag en_sl_IT ? NO +loc_range:jbo canonically matches lang_tag en_SL_IT ? NO +-------------- +loc_range:art-lojban matches lang_tag de-DEVA ? NO +loc_range:jbo canonically matches lang_tag de_Deva ? NO +-------------- +loc_range:art-lojban matches lang_tag de-DE-1996 ? NO +loc_range:jbo canonically matches lang_tag de_DE_1996 ? NO +-------------- +loc_range:art-lojban matches lang_tag de-DE ? NO +loc_range:jbo canonically matches lang_tag de_DE ? NO +-------------- +loc_range:art-lojban matches lang_tag zh_Hans ? NO +loc_range:jbo canonically matches lang_tag zh_Hans ? NO +-------------- +loc_range:art-lojban matches lang_tag de-CH-1996 ? NO +loc_range:jbo canonically matches lang_tag de_CH_1996 ? NO +-------------- +loc_range:art-lojban matches lang_tag sl_IT ? NO +loc_range:jbo canonically matches lang_tag sl_IT ? NO +-------------- +loc_range:art-lojban matches lang_tag sl_IT_nedis-a-kirti-x-xyz ? NO +loc_range:jbo canonically matches lang_tag sl_IT_NEDIS_A_KIRTI_X_XYZ ? NO +-------------- +loc_range:art-lojban matches lang_tag sl_IT_rozaj ? NO +loc_range:jbo canonically matches lang_tag sl_IT_ROZAJ ? NO +-------------- +loc_range:art-lojban matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? NO +loc_range:jbo canonically matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? NO +-------------- +loc_range:art-lojban matches lang_tag i-enochian ? NO +loc_range:jbo canonically matches lang_tag @x=i-enochian ? NO +-------------- +loc_range:art-lojban matches lang_tag sgn-CH-de ? NO +loc_range:jbo canonically matches lang_tag sgn_CH_DE ? NO +-------------- +loc_range:art-lojban matches lang_tag art-lojban ? YES +loc_range:jbo canonically matches lang_tag jbo ? YES +-------------- +loc_range:art-lojban matches lang_tag i-lux ? NO +loc_range:jbo canonically matches lang_tag lb ? NO +-------------- +loc_range:art-lojban matches lang_tag art-lojban ? YES +loc_range:jbo canonically matches lang_tag jbo ? YES +-------------- +loc_range:art-lojban matches lang_tag jbo ? NO +loc_range:jbo canonically matches lang_tag jbo ? YES +-------------- +loc_range:art-lojban matches lang_tag en_sl_IT ? NO +loc_range:jbo canonically matches lang_tag en_SL_IT ? NO +-------------- +loc_range:sl_IT matches lang_tag de-DEVA ? NO +loc_range:sl_IT canonically matches lang_tag de_Deva ? NO +-------------- +loc_range:sl_IT matches lang_tag de-DE-1996 ? NO +loc_range:sl_IT canonically matches lang_tag de_DE_1996 ? NO +-------------- +loc_range:sl_IT matches lang_tag de-DE ? NO +loc_range:sl_IT canonically matches lang_tag de_DE ? NO +-------------- +loc_range:sl_IT matches lang_tag zh_Hans ? NO +loc_range:sl_IT canonically matches lang_tag zh_Hans ? NO +-------------- +loc_range:sl_IT matches lang_tag de-CH-1996 ? NO +loc_range:sl_IT canonically matches lang_tag de_CH_1996 ? NO +-------------- +loc_range:sl_IT matches lang_tag sl_IT ? YES +loc_range:sl_IT canonically matches lang_tag sl_IT ? YES +-------------- +loc_range:sl_IT matches lang_tag sl_IT_nedis-a-kirti-x-xyz ? YES +loc_range:sl_IT canonically matches lang_tag sl_IT_NEDIS_A_KIRTI_X_XYZ ? YES +-------------- +loc_range:sl_IT matches lang_tag sl_IT_rozaj ? YES +loc_range:sl_IT canonically matches lang_tag sl_IT_ROZAJ ? YES +-------------- +loc_range:sl_IT matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? YES +loc_range:sl_IT canonically matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? YES +-------------- +loc_range:sl_IT matches lang_tag i-enochian ? NO +loc_range:sl_IT canonically matches lang_tag @x=i-enochian ? NO +-------------- +loc_range:sl_IT matches lang_tag sgn-CH-de ? NO +loc_range:sl_IT canonically matches lang_tag sgn_CH_DE ? NO +-------------- +loc_range:sl_IT matches lang_tag art-lojban ? NO +loc_range:sl_IT canonically matches lang_tag jbo ? NO +-------------- +loc_range:sl_IT matches lang_tag i-lux ? NO +loc_range:sl_IT canonically matches lang_tag lb ? NO +-------------- +loc_range:sl_IT matches lang_tag art-lojban ? NO +loc_range:sl_IT canonically matches lang_tag jbo ? NO +-------------- +loc_range:sl_IT matches lang_tag jbo ? NO +loc_range:sl_IT canonically matches lang_tag jbo ? NO +-------------- +loc_range:sl_IT matches lang_tag en_sl_IT ? NO +loc_range:sl_IT canonically matches lang_tag en_SL_IT ? NO diff --git a/ext/intl/tests/locale_lookup_variant2.phpt b/ext/intl/tests/locale_lookup_variant2.phpt index 7375284a0b1b6..7d49fd19bbf50 100644 --- a/ext/intl/tests/locale_lookup_variant2.phpt +++ b/ext/intl/tests/locale_lookup_variant2.phpt @@ -2,7 +2,7 @@ locale_lookup.phpt() --SKIPIF-- -= 51.2'); ?> += 0) die('skip for ICU < 67.1'); ?> --FILE-- += 67.1'); ?> +--FILE-- + +--EXPECT-- +-------------- +loc_range:de-de +lang_tags: de-DEVA,de-DE-1996,de-DE,zh_Hans,de-CH-1996,sl_IT,sl_IT_nedis-a-kirti-x-xyz,sl_IT_rozaj,sl_IT_NEDIS_ROJAZ_1901,i-enochian,sgn-CH-de,art-lojban,i-lux,art-lojban,jbo,en_sl_IT,zh-Hant-CN-x-prv1-prv2 + +lookup result:de-DE +Canonical lookup result:de_de +-------------- +loc_range:sl_IT +lang_tags: de-DEVA,de-DE-1996,de-DE,zh_Hans,de-CH-1996,sl_IT,sl_IT_nedis-a-kirti-x-xyz,sl_IT_rozaj,sl_IT_NEDIS_ROJAZ_1901,i-enochian,sgn-CH-de,art-lojban,i-lux,art-lojban,jbo,en_sl_IT,zh-Hant-CN-x-prv1-prv2 + +lookup result:sl_IT +Canonical lookup result:sl_it +-------------- +loc_range:sl_IT_Nedis +lang_tags: de-DEVA,de-DE-1996,de-DE,zh_Hans,de-CH-1996,sl_IT,sl_IT_nedis-a-kirti-x-xyz,sl_IT_rozaj,sl_IT_NEDIS_ROJAZ_1901,i-enochian,sgn-CH-de,art-lojban,i-lux,art-lojban,jbo,en_sl_IT,zh-Hant-CN-x-prv1-prv2 + +lookup result:sl_IT +Canonical lookup result:sl_it +-------------- +loc_range:jbo +lang_tags: de-DEVA,de-DE-1996,de-DE,zh_Hans,de-CH-1996,sl_IT,sl_IT_nedis-a-kirti-x-xyz,sl_IT_rozaj,sl_IT_NEDIS_ROJAZ_1901,i-enochian,sgn-CH-de,art-lojban,i-lux,art-lojban,jbo,en_sl_IT,zh-Hant-CN-x-prv1-prv2 + +lookup result:jbo +Canonical lookup result:jbo +-------------- +loc_range:art-lojban +lang_tags: de-DEVA,de-DE-1996,de-DE,zh_Hans,de-CH-1996,sl_IT,sl_IT_nedis-a-kirti-x-xyz,sl_IT_rozaj,sl_IT_NEDIS_ROJAZ_1901,i-enochian,sgn-CH-de,art-lojban,i-lux,art-lojban,jbo,en_sl_IT,zh-Hant-CN-x-prv1-prv2 + +lookup result:art-lojban +Canonical lookup result:jbo From f65240759fbadb5e84283d5b833b78f674cc256b Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 23 Apr 2020 20:26:08 +0200 Subject: [PATCH 248/338] Use return in compile_expr for consistency --- Zend/zend_compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index aa108c4d7f91c..89cd301662313 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -8955,7 +8955,7 @@ void zend_compile_expr(znode *result, zend_ast *ast) /* {{{ */ return; case ZEND_AST_THROW: zend_compile_throw(result, ast); - break; + return; default: ZEND_ASSERT(0 /* not supported */); } From f264bf2d69d99f0bc23961e0b3ea0b5744f51c27 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 24 Apr 2020 12:04:54 +0200 Subject: [PATCH 249/338] Accept result znode in zend_compile_class_decl() Make this use the same pattern we use everywhere else. --- Zend/zend_compile.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 89cd301662313..b400c6f225fab 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -4245,7 +4245,7 @@ void zend_compile_static_call(znode *result, zend_ast *ast, uint32_t type) /* {{ } /* }}} */ -zend_op *zend_compile_class_decl(zend_ast *ast, zend_bool toplevel); +void zend_compile_class_decl(znode *result, zend_ast *ast, zend_bool toplevel); void zend_compile_new(znode *result, zend_ast *ast) /* {{{ */ { @@ -4257,9 +4257,7 @@ void zend_compile_new(znode *result, zend_ast *ast) /* {{{ */ if (class_ast->kind == ZEND_AST_CLASS) { /* anon class declaration */ - opline = zend_compile_class_decl(class_ast, 0); - class_node.op_type = opline->result_type; - class_node.u.op.var = opline->result.var; + zend_compile_class_decl(&class_node, class_ast, 0); } else { zend_compile_class_ref(&class_node, class_ast, ZEND_FETCH_CLASS_EXCEPTION); } @@ -6630,7 +6628,7 @@ static zend_string *zend_generate_anon_class_name(zend_ast_decl *decl) return zend_new_interned_string(result); } -zend_op *zend_compile_class_decl(zend_ast *ast, zend_bool toplevel) /* {{{ */ +void zend_compile_class_decl(znode *result, zend_ast *ast, zend_bool toplevel) /* {{{ */ { zend_ast_decl *decl = (zend_ast_decl *) ast; zend_ast *extends_ast = decl->child[0]; @@ -6769,7 +6767,7 @@ zend_op *zend_compile_class_decl(zend_ast *ast, zend_bool toplevel) /* {{{ */ if (zend_try_early_bind(ce, parent_ce, lcname, NULL)) { CG(zend_lineno) = ast->lineno; zend_string_release(lcname); - return NULL; + return; } CG(zend_lineno) = ast->lineno; } @@ -6777,7 +6775,7 @@ zend_op *zend_compile_class_decl(zend_ast *ast, zend_bool toplevel) /* {{{ */ zend_string_release(lcname); zend_build_properties_info_table(ce); ce->ce_flags |= ZEND_ACC_LINKED; - return NULL; + return; } } @@ -6796,8 +6794,7 @@ zend_op *zend_compile_class_decl(zend_ast *ast, zend_bool toplevel) /* {{{ */ if (decl->flags & ZEND_ACC_ANON_CLASS) { opline->opcode = ZEND_DECLARE_ANON_CLASS; opline->extended_value = zend_alloc_cache_slot(); - opline->result_type = IS_VAR; - opline->result.var = get_temporary_variable(); + zend_make_var_result(result, opline); if (!zend_hash_add_ptr(CG(class_table), lcname, ce)) { zend_error_noreturn(E_ERROR, "Runtime definition key collision for %s. This is a bug", ZSTR_VAL(name)); @@ -6825,7 +6822,6 @@ zend_op *zend_compile_class_decl(zend_ast *ast, zend_bool toplevel) /* {{{ */ opline->result.opline_num = -1; } } - return opline; } /* }}} */ @@ -8702,7 +8698,7 @@ void zend_compile_top_stmt(zend_ast *ast) /* {{{ */ CG(zend_lineno) = ((zend_ast_decl *) ast)->end_lineno; } else if (ast->kind == ZEND_AST_CLASS) { CG(zend_lineno) = ast->lineno; - zend_compile_class_decl(ast, 1); + zend_compile_class_decl(NULL, ast, 1); CG(zend_lineno) = ((zend_ast_decl *) ast)->end_lineno; } else { zend_compile_stmt(ast); @@ -8792,7 +8788,7 @@ void zend_compile_stmt(zend_ast *ast) /* {{{ */ zend_compile_use_trait(ast); break; case ZEND_AST_CLASS: - zend_compile_class_decl(ast, 0); + zend_compile_class_decl(NULL, ast, 0); break; case ZEND_AST_GROUP_USE: zend_compile_group_use(ast); From 786e0ae574c9bff31cae78e6d824ff84f0556af3 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 24 Apr 2020 12:10:06 +0200 Subject: [PATCH 250/338] Use zend_make_tmp_result() helper in more places --- Zend/zend_compile.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index b400c6f225fab..d9566be14aa59 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -7617,12 +7617,11 @@ void zend_compile_short_circuiting(znode *result, zend_ast *ast) /* {{{ */ if (left_node.op_type == IS_TMP_VAR) { SET_NODE(opline_jmpz->result, &left_node); + GET_NODE(result, opline_jmpz->result); } else { - opline_jmpz->result.var = get_temporary_variable(); - opline_jmpz->result_type = IS_TMP_VAR; + zend_make_tmp_result(result, opline_jmpz); } - GET_NODE(result, opline_jmpz->result); zend_compile_expr(&right_node, right_ast); opline_bool = zend_emit_op(NULL, ZEND_BOOL, &right_node, NULL); @@ -8442,28 +8441,23 @@ static void zend_compile_encaps_list(znode *result, zend_ast *ast) /* {{{ */ opline->extended_value = IS_STRING; opline->op1_type = opline->op2_type; opline->op1 = opline->op2; - opline->result_type = IS_TMP_VAR; - opline->result.var = get_temporary_variable(); SET_UNUSED(opline->op2); - GET_NODE(result, opline->result); + zend_make_tmp_result(result, opline); } } else if (j == 2) { opline->opcode = ZEND_FAST_CONCAT; opline->extended_value = 0; opline->op1_type = init_opline->op2_type; opline->op1 = init_opline->op2; - opline->result_type = IS_TMP_VAR; - opline->result.var = get_temporary_variable(); + zend_make_tmp_result(result, opline); MAKE_NOP(init_opline); - GET_NODE(result, opline->result); } else { uint32_t var; init_opline->extended_value = j; opline->opcode = ZEND_ROPE_END; - opline->result.var = get_temporary_variable(); + zend_make_tmp_result(result, opline); var = opline->op1.var = get_temporary_variable(); - GET_NODE(result, opline->result); /* Allocates the necessary number of zval slots to keep the rope */ i = ((j * sizeof(zend_string*)) + (sizeof(zval) - 1)) / sizeof(zval); From dc379e1c45bd8bba353720bae54e4e5221f2e7d6 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 24 Apr 2020 14:24:52 +0300 Subject: [PATCH 251/338] Abort register allocation if no candidates --- ext/opcache/jit/zend_jit_trace.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 717b8dd55a469..d04f9bca58c6a 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -2104,9 +2104,15 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace j++; } } + count = j; free_alloca(start, use_heap); start = end = NULL; + if (!count) { + zend_arena_release(&CG(arena), checkpoint); + return NULL; + } + /* Add hints */ if (parent_vars_count) { zend_jit_trace_stack *parent_stack = @@ -2225,14 +2231,21 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace memset(intervals, 0, ssa->vars_count * sizeof(zend_lifetime_interval*)); ival = list; + count = 0; while (ival != NULL) { ZEND_ASSERT(ival->reg != ZREG_NONE); + count++; next = ival->list_next; ival->list_next = intervals[ival->ssa_var]; intervals[ival->ssa_var] = ival; ival = next; } + if (!count) { + zend_arena_release(&CG(arena), checkpoint); + return NULL; + } + /* SSA resolution */ if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) { zend_ssa_phi *phi = ssa->blocks[1].phis; @@ -2306,12 +2319,18 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace } if (may_remove) { intervals[i] = NULL; + count--; } } } // Remove intervals used once ???? + if (!count) { + zend_arena_release(&CG(arena), checkpoint); + return NULL; + } + if (ZCG(accel_directives).jit_debug & ZEND_JIT_DEBUG_REG_ALLOC) { fprintf(stderr, "---- TRACE %d Allocated Live Ranges\n", ZEND_JIT_TRACE_NUM); for (i = 0; i < ssa->vars_count; i++) { From b962d2e36ff3014257c8e87dfefe2a9c591568b9 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Fri, 24 Apr 2020 12:31:30 +0100 Subject: [PATCH 252/338] Updated to version 2020.1 (2020a) --- ext/date/lib/timezonedb.h | 1622 +++++++++++++++++++------------------ 1 file changed, 830 insertions(+), 792 deletions(-) diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h index f00bfd47dfb11..aa1656ab3a357 100644 --- a/ext/date/lib/timezonedb.h +++ b/ext/date/lib/timezonedb.h @@ -1,5 +1,5 @@ /* This is a generated file, do not modify */ -const timelib_tzdb_index_entry timezonedb_idx_builtin[594] = { +const timelib_tzdb_index_entry timezonedb_idx_builtin[595] = { #ifdef TIMELIB_SUPPORTS_V2DATA # define FOR_V2(v2,v1) v2 #else @@ -108,502 +108,503 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[594] = { { "America/Curacao" , FOR_V2(0x011892, 0x006EAE) }, { "America/Danmarkshavn" , FOR_V2(0x011958, 0x006F10) }, { "America/Dawson" , FOR_V2(0x011C38, 0x00704C) }, - { "America/Dawson_Creek" , FOR_V2(0x01247F, 0x007377) }, - { "America/Denver" , FOR_V2(0x0128C5, 0x007539) }, - { "America/Detroit" , FOR_V2(0x013272, 0x0078D8) }, - { "America/Dominica" , FOR_V2(0x013B4D, 0x007C32) }, - { "America/Edmonton" , FOR_V2(0x013BED, 0x007C83) }, - { "America/Eirunepe" , FOR_V2(0x014532, 0x008002) }, - { "America/El_Salvador" , FOR_V2(0x0147DD, 0x00811D) }, - { "America/Ensenada" , FOR_V2(0x0148C9, 0x00818C) }, - { "America/Fort_Nelson" , FOR_V2(0x0151FB, 0x0084F5) }, - { "America/Fort_Wayne" , FOR_V2(0x015ADB, 0x008854) }, - { "America/Fortaleza" , FOR_V2(0x016169, 0x008ACF) }, - { "America/Glace_Bay" , FOR_V2(0x016467, 0x008C13) }, - { "America/Godthab" , FOR_V2(0x016D1E, 0x008F5E) }, - { "America/Goose_Bay" , FOR_V2(0x017496, 0x00922E) }, - { "America/Grand_Turk" , FOR_V2(0x01814C, 0x0096FB) }, - { "America/Grenada" , FOR_V2(0x018890, 0x0099AF) }, - { "America/Guadeloupe" , FOR_V2(0x018930, 0x009A00) }, - { "America/Guatemala" , FOR_V2(0x0189D0, 0x009A51) }, - { "America/Guayaquil" , FOR_V2(0x018AF4, 0x009AD4) }, - { "America/Guyana" , FOR_V2(0x018C08, 0x009B5F) }, - { "America/Halifax" , FOR_V2(0x018D00, 0x009BD5) }, - { "America/Havana" , FOR_V2(0x019A8A, 0x00A0DB) }, - { "America/Hermosillo" , FOR_V2(0x01A406, 0x00A459) }, - { "America/Indiana/Indianapolis" , FOR_V2(0x01A5D1, 0x00A533) }, - { "America/Indiana/Knox" , FOR_V2(0x01AC78, 0x00A7C7) }, - { "America/Indiana/Marengo" , FOR_V2(0x01B615, 0x00AB66) }, - { "America/Indiana/Petersburg" , FOR_V2(0x01BCF2, 0x00AE0C) }, - { "America/Indiana/Tell_City" , FOR_V2(0x01C481, 0x00B0EF) }, - { "America/Indiana/Vevay" , FOR_V2(0x01CB35, 0x00B389) }, - { "America/Indiana/Vincennes" , FOR_V2(0x01D0E1, 0x00B5C4) }, - { "America/Indiana/Winamac" , FOR_V2(0x01D7A7, 0x00B865) }, - { "America/Indianapolis" , FOR_V2(0x01DEBB, 0x00BB1E) }, - { "America/Inuvik" , FOR_V2(0x01E549, 0x00BD99) }, - { "America/Iqaluit" , FOR_V2(0x01ECCF, 0x00C070) }, - { "America/Jamaica" , FOR_V2(0x01F4E9, 0x00C394) }, - { "America/Jujuy" , FOR_V2(0x01F6D7, 0x00C462) }, - { "America/Juneau" , FOR_V2(0x01FAFB, 0x00C5FE) }, - { "America/Kentucky/Louisville" , FOR_V2(0x02044C, 0x00C983) }, - { "America/Kentucky/Monticello" , FOR_V2(0x020F4A, 0x00CDA7) }, - { "America/Knox_IN" , FOR_V2(0x02189A, 0x00D12B) }, - { "America/Kralendijk" , FOR_V2(0x022222, 0x00D4B5) }, - { "America/La_Paz" , FOR_V2(0x0222E8, 0x00D517) }, - { "America/Lima" , FOR_V2(0x0223DC, 0x00D58B) }, - { "America/Los_Angeles" , FOR_V2(0x02257E, 0x00D63C) }, - { "America/Louisville" , FOR_V2(0x0230A5, 0x00DA59) }, - { "America/Lower_Princes" , FOR_V2(0x023B85, 0x00DE5F) }, - { "America/Maceio" , FOR_V2(0x023C4B, 0x00DEC1) }, - { "America/Managua" , FOR_V2(0x023F4F, 0x00DFF9) }, - { "America/Manaus" , FOR_V2(0x024109, 0x00E0B9) }, - { "America/Marigot" , FOR_V2(0x024380, 0x00E1BE) }, - { "America/Martinique" , FOR_V2(0x024420, 0x00E20F) }, - { "America/Matamoros" , FOR_V2(0x024514, 0x00E284) }, - { "America/Mazatlan" , FOR_V2(0x024ACC, 0x00E4CB) }, - { "America/Mendoza" , FOR_V2(0x025103, 0x00E741) }, - { "America/Menominee" , FOR_V2(0x025543, 0x00E8E7) }, - { "America/Merida" , FOR_V2(0x025E50, 0x00EC59) }, - { "America/Metlakatla" , FOR_V2(0x02640A, 0x00EE92) }, - { "America/Mexico_City" , FOR_V2(0x0269BC, 0x00F0C7) }, - { "America/Miquelon" , FOR_V2(0x027004, 0x00F327) }, - { "America/Moncton" , FOR_V2(0x027692, 0x00F594) }, - { "America/Monterrey" , FOR_V2(0x028308, 0x00FA37) }, - { "America/Montevideo" , FOR_V2(0x0288C7, 0x00FC85) }, - { "America/Montreal" , FOR_V2(0x028EB9, 0x00FED2) }, - { "America/Montserrat" , FOR_V2(0x029C6B, 0x0103D3) }, - { "America/Nassau" , FOR_V2(0x029D0B, 0x010424) }, - { "America/New_York" , FOR_V2(0x02A5E9, 0x010763) }, - { "America/Nipigon" , FOR_V2(0x02B3D9, 0x010C87) }, - { "America/Nome" , FOR_V2(0x02BC50, 0x010FBF) }, - { "America/Noronha" , FOR_V2(0x02C5A8, 0x011342) }, - { "America/North_Dakota/Beulah" , FOR_V2(0x02C890, 0x011470) }, - { "America/North_Dakota/Center" , FOR_V2(0x02D1FD, 0x0117FF) }, - { "America/North_Dakota/New_Salem" , FOR_V2(0x02DB6A, 0x011B8E) }, - { "America/Ojinaga" , FOR_V2(0x02E4DD, 0x011F23) }, - { "America/Panama" , FOR_V2(0x02EADD, 0x01217D) }, - { "America/Pangnirtung" , FOR_V2(0x02EB9F, 0x0121DD) }, - { "America/Paramaribo" , FOR_V2(0x02F3F3, 0x01251A) }, - { "America/Phoenix" , FOR_V2(0x02F505, 0x01259B) }, - { "America/Port-au-Prince" , FOR_V2(0x02F676, 0x01264F) }, - { "America/Port_of_Spain" , FOR_V2(0x02FC1C, 0x012870) }, - { "America/Porto_Acre" , FOR_V2(0x02FCBC, 0x0128C1) }, - { "America/Porto_Velho" , FOR_V2(0x02FF3C, 0x0129C3) }, - { "America/Puerto_Rico" , FOR_V2(0x030190, 0x012AB7) }, - { "America/Punta_Arenas" , FOR_V2(0x030292, 0x012B33) }, - { "America/Rainy_River" , FOR_V2(0x030A20, 0x012E1C) }, - { "America/Rankin_Inlet" , FOR_V2(0x031298, 0x013155) }, - { "America/Recife" , FOR_V2(0x031A1E, 0x01342F) }, - { "America/Regina" , FOR_V2(0x031D00, 0x013557) }, - { "America/Resolute" , FOR_V2(0x0320F5, 0x0136F5) }, - { "America/Rio_Branco" , FOR_V2(0x03287C, 0x0139D0) }, - { "America/Rosario" , FOR_V2(0x032B00, 0x013AD6) }, - { "America/Santa_Isabel" , FOR_V2(0x032F40, 0x013C7C) }, - { "America/Santarem" , FOR_V2(0x033872, 0x013FE5) }, - { "America/Santiago" , FOR_V2(0x033AE3, 0x0140E7) }, - { "America/Santo_Domingo" , FOR_V2(0x0344E2, 0x0144A5) }, - { "America/Sao_Paulo" , FOR_V2(0x0346B8, 0x014571) }, - { "America/Scoresbysund" , FOR_V2(0x034C9E, 0x0147C9) }, - { "America/Shiprock" , FOR_V2(0x035443, 0x014AB4) }, - { "America/Sitka" , FOR_V2(0x035DDB, 0x014E3E) }, - { "America/St_Barthelemy" , FOR_V2(0x036713, 0x0151B6) }, - { "America/St_Johns" , FOR_V2(0x0367B3, 0x015207) }, - { "America/St_Kitts" , FOR_V2(0x037628, 0x01576D) }, - { "America/St_Lucia" , FOR_V2(0x0376C8, 0x0157BE) }, - { "America/St_Thomas" , FOR_V2(0x037768, 0x01580F) }, - { "America/St_Vincent" , FOR_V2(0x037808, 0x015860) }, - { "America/Swift_Current" , FOR_V2(0x0378A8, 0x0158B1) }, - { "America/Tegucigalpa" , FOR_V2(0x037AF6, 0x0159B6) }, - { "America/Thule" , FOR_V2(0x037BFE, 0x015A2F) }, - { "America/Thunder_Bay" , FOR_V2(0x0381F6, 0x015C6E) }, - { "America/Tijuana" , FOR_V2(0x038AB6, 0x015FBF) }, - { "America/Toronto" , FOR_V2(0x039409, 0x016349) }, - { "America/Tortola" , FOR_V2(0x03A1D8, 0x016867) }, - { "America/Vancouver" , FOR_V2(0x03A278, 0x0168B8) }, - { "America/Virgin" , FOR_V2(0x03ADE9, 0x016CFB) }, - { "America/Whitehorse" , FOR_V2(0x03AE89, 0x016D4C) }, - { "America/Winnipeg" , FOR_V2(0x03B6D0, 0x017077) }, - { "America/Yakutat" , FOR_V2(0x03C22D, 0x0174BA) }, - { "America/Yellowknife" , FOR_V2(0x03CB4A, 0x017823) }, - { "Antarctica/Casey" , FOR_V2(0x03D31B, 0x017B1D) }, - { "Antarctica/Davis" , FOR_V2(0x03D455, 0x017BAE) }, - { "Antarctica/DumontDUrville" , FOR_V2(0x03D58F, 0x017C3F) }, - { "Antarctica/Macquarie" , FOR_V2(0x03D66D, 0x017CAF) }, - { "Antarctica/Mawson" , FOR_V2(0x03DC79, 0x017F06) }, - { "Antarctica/McMurdo" , FOR_V2(0x03DD52, 0x017F71) }, - { "Antarctica/Palmer" , FOR_V2(0x03E709, 0x01831F) }, - { "Antarctica/Rothera" , FOR_V2(0x03ECA5, 0x01854C) }, - { "Antarctica/South_Pole" , FOR_V2(0x03ED5C, 0x0185A9) }, - { "Antarctica/Syowa" , FOR_V2(0x03F6ED, 0x018931) }, - { "Antarctica/Troll" , FOR_V2(0x03F7A3, 0x01898C) }, - { "Antarctica/Vostok" , FOR_V2(0x03FC3E, 0x018B49) }, - { "Arctic/Longyearbyen" , FOR_V2(0x03FCF5, 0x018BA5) }, - { "Asia/Aden" , FOR_V2(0x0405B5, 0x018EE3) }, - { "Asia/Almaty" , FOR_V2(0x040666, 0x018F39) }, - { "Asia/Amman" , FOR_V2(0x040A6E, 0x0190E2) }, - { "Asia/Anadyr" , FOR_V2(0x0411B7, 0x019393) }, - { "Asia/Aqtau" , FOR_V2(0x04167A, 0x01957D) }, - { "Asia/Aqtobe" , FOR_V2(0x041A72, 0x01971F) }, - { "Asia/Ashgabat" , FOR_V2(0x041E7E, 0x0198C5) }, - { "Asia/Ashkhabad" , FOR_V2(0x0420F5, 0x0199CE) }, - { "Asia/Atyrau" , FOR_V2(0x04236C, 0x019AD7) }, - { "Asia/Baghdad" , FOR_V2(0x04276C, 0x019C7D) }, - { "Asia/Bahrain" , FOR_V2(0x042B4F, 0x019E02) }, - { "Asia/Baku" , FOR_V2(0x042C22, 0x019E67) }, - { "Asia/Bangkok" , FOR_V2(0x0430F9, 0x01A04E) }, - { "Asia/Barnaul" , FOR_V2(0x0431CC, 0x01A0B3) }, - { "Asia/Beirut" , FOR_V2(0x0436AB, 0x01A2A3) }, - { "Asia/Bishkek" , FOR_V2(0x043F21, 0x01A5BB) }, - { "Asia/Brunei" , FOR_V2(0x044304, 0x01A744) }, - { "Asia/Calcutta" , FOR_V2(0x0443DB, 0x01A7AB) }, - { "Asia/Chita" , FOR_V2(0x044504, 0x01A82B) }, - { "Asia/Choibalsan" , FOR_V2(0x0449E9, 0x01AA23) }, - { "Asia/Chongqing" , FOR_V2(0x044DBC, 0x01ABAF) }, - { "Asia/Chungking" , FOR_V2(0x044FDD, 0x01AC8C) }, - { "Asia/Colombo" , FOR_V2(0x0451FE, 0x01AD69) }, - { "Asia/Dacca" , FOR_V2(0x04537E, 0x01AE16) }, - { "Asia/Damascus" , FOR_V2(0x0454DB, 0x01AEB6) }, - { "Asia/Dhaka" , FOR_V2(0x045DDD, 0x01B200) }, - { "Asia/Dili" , FOR_V2(0x045F3A, 0x01B2A0) }, - { "Asia/Dubai" , FOR_V2(0x046029, 0x01B30F) }, - { "Asia/Dushanbe" , FOR_V2(0x0460DA, 0x01B365) }, - { "Asia/Famagusta" , FOR_V2(0x046335, 0x01B462) }, - { "Asia/Gaza" , FOR_V2(0x046B3C, 0x01B768) }, - { "Asia/Harbin" , FOR_V2(0x04745E, 0x01BACD) }, - { "Asia/Hebron" , FOR_V2(0x04767F, 0x01BBAA) }, - { "Asia/Ho_Chi_Minh" , FOR_V2(0x047FBC, 0x01BF18) }, - { "Asia/Hong_Kong" , FOR_V2(0x048127, 0x01BFBB) }, - { "Asia/Hovd" , FOR_V2(0x0485E6, 0x01C193) }, - { "Asia/Irkutsk" , FOR_V2(0x048998, 0x01C31D) }, - { "Asia/Istanbul" , FOR_V2(0x048E99, 0x01C526) }, - { "Asia/Jakarta" , FOR_V2(0x049640, 0x01C813) }, - { "Asia/Jayapura" , FOR_V2(0x0497BC, 0x01C8CA) }, - { "Asia/Jerusalem" , FOR_V2(0x0498DB, 0x01C971) }, - { "Asia/Kabul" , FOR_V2(0x04A1D7, 0x01CCC1) }, - { "Asia/Kamchatka" , FOR_V2(0x04A2B3, 0x01CD28) }, - { "Asia/Karachi" , FOR_V2(0x04A75F, 0x01CF06) }, - { "Asia/Kashgar" , FOR_V2(0x04A8E6, 0x01CFB6) }, - { "Asia/Kathmandu" , FOR_V2(0x04A997, 0x01D00C) }, - { "Asia/Katmandu" , FOR_V2(0x04AA77, 0x01D075) }, - { "Asia/Khandyga" , FOR_V2(0x04AB57, 0x01D0DE) }, - { "Asia/Kolkata" , FOR_V2(0x04B078, 0x01D2F7) }, - { "Asia/Krasnoyarsk" , FOR_V2(0x04B1A1, 0x01D377) }, - { "Asia/Kuala_Lumpur" , FOR_V2(0x04B67D, 0x01D56F) }, - { "Asia/Kuching" , FOR_V2(0x04B81C, 0x01D638) }, - { "Asia/Kuwait" , FOR_V2(0x04BA19, 0x01D719) }, - { "Asia/Macao" , FOR_V2(0x04BACA, 0x01D76F) }, - { "Asia/Macau" , FOR_V2(0x04BFA1, 0x01D94F) }, - { "Asia/Magadan" , FOR_V2(0x04C478, 0x01DB2F) }, - { "Asia/Makassar" , FOR_V2(0x04C95A, 0x01DD23) }, - { "Asia/Manila" , FOR_V2(0x04CAAD, 0x01DDEB) }, - { "Asia/Muscat" , FOR_V2(0x04CC01, 0x01DE7E) }, - { "Asia/Nicosia" , FOR_V2(0x04CCB2, 0x01DED4) }, - { "Asia/Novokuznetsk" , FOR_V2(0x04D4A3, 0x01E1CF) }, - { "Asia/Novosibirsk" , FOR_V2(0x04D94D, 0x01E3AC) }, - { "Asia/Omsk" , FOR_V2(0x04DE32, 0x01E5A2) }, - { "Asia/Oral" , FOR_V2(0x04E302, 0x01E78E) }, - { "Asia/Phnom_Penh" , FOR_V2(0x04E70A, 0x01E933) }, - { "Asia/Pontianak" , FOR_V2(0x04E7DD, 0x01E998) }, - { "Asia/Pyongyang" , FOR_V2(0x04E960, 0x01EA57) }, - { "Asia/Qatar" , FOR_V2(0x04EA59, 0x01EACC) }, - { "Asia/Qostanay" , FOR_V2(0x04EB2C, 0x01EB31) }, - { "Asia/Qyzylorda" , FOR_V2(0x04EF45, 0x01ECE4) }, - { "Asia/Rangoon" , FOR_V2(0x04F36F, 0x01EE9F) }, - { "Asia/Riyadh" , FOR_V2(0x04F487, 0x01EF20) }, - { "Asia/Saigon" , FOR_V2(0x04F538, 0x01EF76) }, - { "Asia/Sakhalin" , FOR_V2(0x04F6A3, 0x01F019) }, - { "Asia/Samarkand" , FOR_V2(0x04FB79, 0x01F20B) }, - { "Asia/Seoul" , FOR_V2(0x04FDD7, 0x01F312) }, - { "Asia/Shanghai" , FOR_V2(0x05004C, 0x01F415) }, - { "Asia/Singapore" , FOR_V2(0x050279, 0x01F4FE) }, - { "Asia/Srednekolymsk" , FOR_V2(0x050404, 0x01F5B3) }, - { "Asia/Taipei" , FOR_V2(0x0508EA, 0x01F7B4) }, - { "Asia/Tashkent" , FOR_V2(0x050BEF, 0x01F8E7) }, - { "Asia/Tbilisi" , FOR_V2(0x050E5B, 0x01F9F5) }, - { "Asia/Tehran" , FOR_V2(0x051272, 0x01FB98) }, - { "Asia/Tel_Aviv" , FOR_V2(0x051C94, 0x01FE0A) }, - { "Asia/Thimbu" , FOR_V2(0x052590, 0x02015A) }, - { "Asia/Thimphu" , FOR_V2(0x052667, 0x0201C1) }, - { "Asia/Tokyo" , FOR_V2(0x05273E, 0x020228) }, - { "Asia/Tomsk" , FOR_V2(0x05287F, 0x0202B9) }, - { "Asia/Ujung_Pandang" , FOR_V2(0x052D5E, 0x0204A9) }, - { "Asia/Ulaanbaatar" , FOR_V2(0x052E68, 0x020528) }, - { "Asia/Ulan_Bator" , FOR_V2(0x053204, 0x02069C) }, - { "Asia/Urumqi" , FOR_V2(0x05358B, 0x0207FB) }, - { "Asia/Ust-Nera" , FOR_V2(0x053649, 0x02085E) }, - { "Asia/Vientiane" , FOR_V2(0x053B4D, 0x020A65) }, - { "Asia/Vladivostok" , FOR_V2(0x053C20, 0x020ACA) }, - { "Asia/Yakutsk" , FOR_V2(0x0540F7, 0x020CBC) }, - { "Asia/Yangon" , FOR_V2(0x0545CD, 0x020EAE) }, - { "Asia/Yekaterinburg" , FOR_V2(0x0546E5, 0x020F2F) }, - { "Asia/Yerevan" , FOR_V2(0x054BDA, 0x02112C) }, - { "Atlantic/Azores" , FOR_V2(0x055065, 0x0212F5) }, - { "Atlantic/Bermuda" , FOR_V2(0x055E13, 0x021809) }, - { "Atlantic/Canary" , FOR_V2(0x0565D9, 0x021AE4) }, - { "Atlantic/Cape_Verde" , FOR_V2(0x056D5C, 0x021DB9) }, - { "Atlantic/Faeroe" , FOR_V2(0x056E76, 0x021E3E) }, - { "Atlantic/Faroe" , FOR_V2(0x057599, 0x0220E2) }, - { "Atlantic/Jan_Mayen" , FOR_V2(0x057CBC, 0x022386) }, - { "Atlantic/Madeira" , FOR_V2(0x05857C, 0x0226C4) }, - { "Atlantic/Reykjavik" , FOR_V2(0x05932A, 0x022BE1) }, - { "Atlantic/South_Georgia" , FOR_V2(0x0597C0, 0x022DA7) }, - { "Atlantic/St_Helena" , FOR_V2(0x059870, 0x022DFD) }, - { "Atlantic/Stanley" , FOR_V2(0x059910, 0x022E4E) }, - { "Australia/ACT" , FOR_V2(0x059DDA, 0x023027) }, - { "Australia/Adelaide" , FOR_V2(0x05A682, 0x023356) }, - { "Australia/Brisbane" , FOR_V2(0x05AF4B, 0x023694) }, - { "Australia/Broken_Hill" , FOR_V2(0x05B11F, 0x023769) }, - { "Australia/Canberra" , FOR_V2(0x05BA0A, 0x023AB4) }, - { "Australia/Currie" , FOR_V2(0x05C2B2, 0x023DE3) }, - { "Australia/Darwin" , FOR_V2(0x05CB70, 0x024128) }, - { "Australia/Eucla" , FOR_V2(0x05CCBE, 0x0241BF) }, - { "Australia/Hobart" , FOR_V2(0x05CEC7, 0x0242A7) }, - { "Australia/LHI" , FOR_V2(0x05D7F4, 0x024613) }, - { "Australia/Lindeman" , FOR_V2(0x05DF44, 0x0248C6) }, - { "Australia/Lord_Howe" , FOR_V2(0x05E158, 0x0249B7) }, - { "Australia/Melbourne" , FOR_V2(0x05E8B8, 0x024C7A) }, - { "Australia/North" , FOR_V2(0x05F168, 0x024FB1) }, - { "Australia/NSW" , FOR_V2(0x05F2A4, 0x025036) }, - { "Australia/Perth" , FOR_V2(0x05FB4C, 0x025365) }, - { "Australia/Queensland" , FOR_V2(0x05FD42, 0x02544B) }, - { "Australia/South" , FOR_V2(0x05FEFF, 0x025509) }, - { "Australia/Sydney" , FOR_V2(0x0607B9, 0x025838) }, - { "Australia/Tasmania" , FOR_V2(0x06107D, 0x025B83) }, - { "Australia/Victoria" , FOR_V2(0x061995, 0x025EDA) }, - { "Australia/West" , FOR_V2(0x06223D, 0x026209) }, - { "Australia/Yancowinna" , FOR_V2(0x062415, 0x0262D1) }, - { "Brazil/Acre" , FOR_V2(0x062CE4, 0x026600) }, - { "Brazil/DeNoronha" , FOR_V2(0x062F64, 0x026702) }, - { "Brazil/East" , FOR_V2(0x06323C, 0x026820) }, - { "Brazil/West" , FOR_V2(0x0637EC, 0x026A42) }, - { "Canada/Atlantic" , FOR_V2(0x063A54, 0x026B38) }, - { "Canada/Central" , FOR_V2(0x0647C0, 0x027020) }, - { "Canada/Eastern" , FOR_V2(0x065300, 0x027446) }, - { "Canada/Mountain" , FOR_V2(0x0660B2, 0x027947) }, - { "Canada/Newfoundland" , FOR_V2(0x0669DA, 0x027CA9) }, - { "Canada/Pacific" , FOR_V2(0x06782D, 0x0281ED) }, - { "Canada/Saskatchewan" , FOR_V2(0x068385, 0x028617) }, - { "Canada/Yukon" , FOR_V2(0x068765, 0x0287A0) }, - { "CET" , FOR_V2(0x068F95, 0x028AB4) }, - { "Chile/Continental" , FOR_V2(0x0697CF, 0x028DB9) }, - { "Chile/EasterIsland" , FOR_V2(0x06A1BC, 0x029165) }, - { "CST6CDT" , FOR_V2(0x06AA81, 0x0294A5) }, - { "Cuba" , FOR_V2(0x06B393, 0x0297FE) }, - { "EET" , FOR_V2(0x06BD0F, 0x029B7C) }, - { "Egypt" , FOR_V2(0x06C48F, 0x029E3F) }, - { "Eire" , FOR_V2(0x06CC3E, 0x02A11B) }, - { "EST" , FOR_V2(0x06D9EE, 0x02A623) }, - { "EST5EDT" , FOR_V2(0x06DA6C, 0x02A665) }, - { "Etc/GMT" , FOR_V2(0x06E37E, 0x02A9BE) }, - { "Etc/GMT+0" , FOR_V2(0x06E3FC, 0x02AA00) }, - { "Etc/GMT+1" , FOR_V2(0x06E47A, 0x02AA42) }, - { "Etc/GMT+10" , FOR_V2(0x06E4FA, 0x02AA84) }, - { "Etc/GMT+11" , FOR_V2(0x06E57B, 0x02AAC6) }, - { "Etc/GMT+12" , FOR_V2(0x06E5FC, 0x02AB08) }, - { "Etc/GMT+2" , FOR_V2(0x06E67D, 0x02AB4A) }, - { "Etc/GMT+3" , FOR_V2(0x06E6FD, 0x02AB8C) }, - { "Etc/GMT+4" , FOR_V2(0x06E77D, 0x02ABCE) }, - { "Etc/GMT+5" , FOR_V2(0x06E7FD, 0x02AC10) }, - { "Etc/GMT+6" , FOR_V2(0x06E87D, 0x02AC52) }, - { "Etc/GMT+7" , FOR_V2(0x06E8FD, 0x02AC94) }, - { "Etc/GMT+8" , FOR_V2(0x06E97D, 0x02ACD6) }, - { "Etc/GMT+9" , FOR_V2(0x06E9FD, 0x02AD18) }, - { "Etc/GMT-0" , FOR_V2(0x06EA7D, 0x02AD5A) }, - { "Etc/GMT-1" , FOR_V2(0x06EAFB, 0x02AD9C) }, - { "Etc/GMT-10" , FOR_V2(0x06EB7C, 0x02ADDE) }, - { "Etc/GMT-11" , FOR_V2(0x06EBFE, 0x02AE20) }, - { "Etc/GMT-12" , FOR_V2(0x06EC80, 0x02AE62) }, - { "Etc/GMT-13" , FOR_V2(0x06ED02, 0x02AEA4) }, - { "Etc/GMT-14" , FOR_V2(0x06ED84, 0x02AEE6) }, - { "Etc/GMT-2" , FOR_V2(0x06EE06, 0x02AF28) }, - { "Etc/GMT-3" , FOR_V2(0x06EE87, 0x02AF6A) }, - { "Etc/GMT-4" , FOR_V2(0x06EF08, 0x02AFAC) }, - { "Etc/GMT-5" , FOR_V2(0x06EF89, 0x02AFEE) }, - { "Etc/GMT-6" , FOR_V2(0x06F00A, 0x02B030) }, - { "Etc/GMT-7" , FOR_V2(0x06F08B, 0x02B072) }, - { "Etc/GMT-8" , FOR_V2(0x06F10C, 0x02B0B4) }, - { "Etc/GMT-9" , FOR_V2(0x06F18D, 0x02B0F6) }, - { "Etc/GMT0" , FOR_V2(0x06F20E, 0x02B138) }, - { "Etc/Greenwich" , FOR_V2(0x06F28C, 0x02B17A) }, - { "Etc/UCT" , FOR_V2(0x06F30A, 0x02B1BC) }, - { "Etc/Universal" , FOR_V2(0x06F388, 0x02B1FE) }, - { "Etc/UTC" , FOR_V2(0x06F406, 0x02B240) }, - { "Etc/Zulu" , FOR_V2(0x06F484, 0x02B282) }, - { "Europe/Amsterdam" , FOR_V2(0x06F502, 0x02B2C4) }, - { "Europe/Andorra" , FOR_V2(0x07006C, 0x02B709) }, - { "Europe/Astrakhan" , FOR_V2(0x070746, 0x02B996) }, - { "Europe/Athens" , FOR_V2(0x070BF1, 0x02BB74) }, - { "Europe/Belfast" , FOR_V2(0x0714D3, 0x02BEC8) }, - { "Europe/Belgrade" , FOR_V2(0x07231F, 0x02C403) }, - { "Europe/Berlin" , FOR_V2(0x072AAB, 0x02C6D3) }, - { "Europe/Bratislava" , FOR_V2(0x0733C5, 0x02CA44) }, - { "Europe/Brussels" , FOR_V2(0x073CCE, 0x02CD98) }, - { "Europe/Bucharest" , FOR_V2(0x07484F, 0x02D1D6) }, - { "Europe/Budapest" , FOR_V2(0x0750E3, 0x02D507) }, - { "Europe/Busingen" , FOR_V2(0x075A2F, 0x02D877) }, - { "Europe/Chisinau" , FOR_V2(0x0761B8, 0x02DB3F) }, - { "Europe/Copenhagen" , FOR_V2(0x076B1A, 0x02DECE) }, - { "Europe/Dublin" , FOR_V2(0x07737F, 0x02E1E4) }, - { "Europe/Gibraltar" , FOR_V2(0x07812F, 0x02E6EC) }, - { "Europe/Guernsey" , FOR_V2(0x078D27, 0x02EB54) }, - { "Europe/Helsinki" , FOR_V2(0x079B73, 0x02F08F) }, - { "Europe/Isle_of_Man" , FOR_V2(0x07A2EB, 0x02F356) }, - { "Europe/Istanbul" , FOR_V2(0x07B137, 0x02F891) }, - { "Europe/Jersey" , FOR_V2(0x07B8DE, 0x02FB7E) }, - { "Europe/Kaliningrad" , FOR_V2(0x07C72A, 0x0300B9) }, - { "Europe/Kiev" , FOR_V2(0x07CD1F, 0x030320) }, - { "Europe/Kirov" , FOR_V2(0x07D567, 0x030653) }, - { "Europe/Lisbon" , FOR_V2(0x07DA02, 0x030829) }, - { "Europe/Ljubljana" , FOR_V2(0x07E7AE, 0x030D45) }, - { "Europe/London" , FOR_V2(0x07EF3A, 0x031015) }, - { "Europe/Luxembourg" , FOR_V2(0x07FD86, 0x031550) }, - { "Europe/Madrid" , FOR_V2(0x080914, 0x0319A1) }, - { "Europe/Malta" , FOR_V2(0x081366, 0x031D86) }, - { "Europe/Mariehamn" , FOR_V2(0x081DAE, 0x032150) }, - { "Europe/Minsk" , FOR_V2(0x082526, 0x032417) }, - { "Europe/Monaco" , FOR_V2(0x082A5B, 0x032629) }, - { "Europe/Moscow" , FOR_V2(0x0835E7, 0x032A75) }, - { "Europe/Nicosia" , FOR_V2(0x083C06, 0x032CF5) }, - { "Europe/Oslo" , FOR_V2(0x0843E4, 0x032FDD) }, - { "Europe/Paris" , FOR_V2(0x084CA4, 0x03331B) }, - { "Europe/Podgorica" , FOR_V2(0x085842, 0x033772) }, - { "Europe/Prague" , FOR_V2(0x085FCE, 0x033A42) }, - { "Europe/Riga" , FOR_V2(0x0868D7, 0x033D96) }, - { "Europe/Rome" , FOR_V2(0x087179, 0x0340E2) }, - { "Europe/Samara" , FOR_V2(0x087BD6, 0x0344AC) }, - { "Europe/San_Marino" , FOR_V2(0x0880BA, 0x0346AA) }, - { "Europe/Sarajevo" , FOR_V2(0x088B17, 0x034A74) }, - { "Europe/Saratov" , FOR_V2(0x0892A3, 0x034D44) }, - { "Europe/Simferopol" , FOR_V2(0x08975E, 0x034F29) }, - { "Europe/Skopje" , FOR_V2(0x089D26, 0x035181) }, - { "Europe/Sofia" , FOR_V2(0x08A4B2, 0x035451) }, - { "Europe/Stockholm" , FOR_V2(0x08ACDB, 0x035758) }, - { "Europe/Tallinn" , FOR_V2(0x08B45C, 0x035A18) }, - { "Europe/Tirane" , FOR_V2(0x08BCCC, 0x035D51) }, - { "Europe/Tiraspol" , FOR_V2(0x08C4FC, 0x036057) }, - { "Europe/Ulyanovsk" , FOR_V2(0x08CE5E, 0x0363E6) }, - { "Europe/Uzhgorod" , FOR_V2(0x08D36F, 0x0365F3) }, - { "Europe/Vaduz" , FOR_V2(0x08DB85, 0x036909) }, - { "Europe/Vatican" , FOR_V2(0x08E306, 0x036BC9) }, - { "Europe/Vienna" , FOR_V2(0x08ED63, 0x036F93) }, - { "Europe/Vilnius" , FOR_V2(0x08F607, 0x0372C7) }, - { "Europe/Volgograd" , FOR_V2(0x08FE85, 0x03760D) }, - { "Europe/Warsaw" , FOR_V2(0x090330, 0x0377EB) }, - { "Europe/Zagreb" , FOR_V2(0x090D9A, 0x037BCE) }, - { "Europe/Zaporozhye" , FOR_V2(0x091526, 0x037E9E) }, - { "Europe/Zurich" , FOR_V2(0x091D9A, 0x0381F2) }, - { "Factory" , FOR_V2(0x09251B, 0x0384B2) }, - { "GB" , FOR_V2(0x09259B, 0x0384F4) }, - { "GB-Eire" , FOR_V2(0x0933E7, 0x038A2F) }, - { "GMT" , FOR_V2(0x094233, 0x038F6A) }, - { "GMT+0" , FOR_V2(0x0942B1, 0x038FAC) }, - { "GMT-0" , FOR_V2(0x09432F, 0x038FEE) }, - { "GMT0" , FOR_V2(0x0943AD, 0x039030) }, - { "Greenwich" , FOR_V2(0x09442B, 0x039072) }, - { "Hongkong" , FOR_V2(0x0944A9, 0x0390B4) }, - { "HST" , FOR_V2(0x094968, 0x03928C) }, - { "Iceland" , FOR_V2(0x0949E7, 0x0392CE) }, - { "Indian/Antananarivo" , FOR_V2(0x094E7D, 0x039494) }, - { "Indian/Chagos" , FOR_V2(0x094F84, 0x039512) }, - { "Indian/Christmas" , FOR_V2(0x095057, 0x039577) }, - { "Indian/Cocos" , FOR_V2(0x095108, 0x0395CD) }, - { "Indian/Comoro" , FOR_V2(0x0951C2, 0x039625) }, - { "Indian/Kerguelen" , FOR_V2(0x0952C9, 0x0396A3) }, - { "Indian/Mahe" , FOR_V2(0x09537A, 0x0396F9) }, - { "Indian/Maldives" , FOR_V2(0x09542B, 0x03974F) }, - { "Indian/Mauritius" , FOR_V2(0x0954FE, 0x0397B4) }, - { "Indian/Mayotte" , FOR_V2(0x0955FB, 0x039828) }, - { "Indian/Reunion" , FOR_V2(0x095702, 0x0398A6) }, - { "Iran" , FOR_V2(0x0957B3, 0x0398FC) }, - { "Israel" , FOR_V2(0x0961D5, 0x039B6E) }, - { "Jamaica" , FOR_V2(0x096AD1, 0x039EBE) }, - { "Japan" , FOR_V2(0x096CBF, 0x039F8C) }, - { "Kwajalein" , FOR_V2(0x096E00, 0x03A01D) }, - { "Libya" , FOR_V2(0x096F48, 0x03A0B4) }, - { "MET" , FOR_V2(0x0971C5, 0x03A1B5) }, - { "Mexico/BajaNorte" , FOR_V2(0x0979FF, 0x03A4BA) }, - { "Mexico/BajaSur" , FOR_V2(0x098331, 0x03A823) }, - { "Mexico/General" , FOR_V2(0x098933, 0x03AA64) }, - { "MST" , FOR_V2(0x098F6F, 0x03ACB8) }, - { "MST7MDT" , FOR_V2(0x098FED, 0x03ACFA) }, - { "Navajo" , FOR_V2(0x0998FF, 0x03B053) }, - { "NZ" , FOR_V2(0x09A297, 0x03B3DD) }, - { "NZ-CHAT" , FOR_V2(0x09AC28, 0x03B765) }, - { "Pacific/Apia" , FOR_V2(0x09B448, 0x03BA60) }, - { "Pacific/Auckland" , FOR_V2(0x09B89D, 0x03BC08) }, - { "Pacific/Bougainville" , FOR_V2(0x09C246, 0x03BFA8) }, - { "Pacific/Chatham" , FOR_V2(0x09C36A, 0x03C02D) }, - { "Pacific/Chuuk" , FOR_V2(0x09CB99, 0x03C337) }, - { "Pacific/Easter" , FOR_V2(0x09CCC1, 0x03C3C0) }, - { "Pacific/Efate" , FOR_V2(0x09D593, 0x03C70D) }, - { "Pacific/Enderbury" , FOR_V2(0x09D771, 0x03C7D1) }, - { "Pacific/Fakaofo" , FOR_V2(0x09D876, 0x03C854) }, - { "Pacific/Fiji" , FOR_V2(0x09D94A, 0x03C8B9) }, - { "Pacific/Funafuti" , FOR_V2(0x09DD8B, 0x03CA4F) }, - { "Pacific/Galapagos" , FOR_V2(0x09DE3D, 0x03CAA5) }, - { "Pacific/Gambier" , FOR_V2(0x09DF48, 0x03CB2B) }, - { "Pacific/Guadalcanal" , FOR_V2(0x09E007, 0x03CB90) }, - { "Pacific/Guam" , FOR_V2(0x09E0B9, 0x03CBE6) }, - { "Pacific/Honolulu" , FOR_V2(0x09E2B3, 0x03CCB5) }, - { "Pacific/Johnston" , FOR_V2(0x09E40E, 0x03CD5A) }, - { "Pacific/Kiritimati" , FOR_V2(0x09E563, 0x03CDF9) }, - { "Pacific/Kosrae" , FOR_V2(0x09E669, 0x03CE7B) }, - { "Pacific/Kwajalein" , FOR_V2(0x09E7DA, 0x03CF1E) }, - { "Pacific/Majuro" , FOR_V2(0x09E92B, 0x03CFBE) }, - { "Pacific/Marquesas" , FOR_V2(0x09EA8A, 0x03D06D) }, - { "Pacific/Midway" , FOR_V2(0x09EB54, 0x03D0D6) }, - { "Pacific/Nauru" , FOR_V2(0x09EC1D, 0x03D140) }, - { "Pacific/Niue" , FOR_V2(0x09ED25, 0x03D1BB) }, - { "Pacific/Norfolk" , FOR_V2(0x09EE22, 0x03D233) }, - { "Pacific/Noumea" , FOR_V2(0x09F19E, 0x03D391) }, - { "Pacific/Pago_Pago" , FOR_V2(0x09F2DA, 0x03D420) }, - { "Pacific/Palau" , FOR_V2(0x09F395, 0x03D47C) }, - { "Pacific/Pitcairn" , FOR_V2(0x09F455, 0x03D4D2) }, - { "Pacific/Pohnpei" , FOR_V2(0x09F52B, 0x03D539) }, - { "Pacific/Ponape" , FOR_V2(0x09F674, 0x03D5D0) }, - { "Pacific/Port_Moresby" , FOR_V2(0x09F7AF, 0x03D659) }, - { "Pacific/Rarotonga" , FOR_V2(0x09F892, 0x03D6CC) }, - { "Pacific/Saipan" , FOR_V2(0x09FADF, 0x03D7BC) }, - { "Pacific/Samoa" , FOR_V2(0x09FCD9, 0x03D88B) }, - { "Pacific/Tahiti" , FOR_V2(0x09FD94, 0x03D8E7) }, - { "Pacific/Tarawa" , FOR_V2(0x09FE54, 0x03D94C) }, - { "Pacific/Tongatapu" , FOR_V2(0x09FF15, 0x03D9B1) }, - { "Pacific/Truk" , FOR_V2(0x0A0095, 0x03DA5C) }, - { "Pacific/Wake" , FOR_V2(0x0A01AE, 0x03DAD6) }, - { "Pacific/Wallis" , FOR_V2(0x0A026B, 0x03DB37) }, - { "Pacific/Yap" , FOR_V2(0x0A031D, 0x03DB8D) }, - { "Poland" , FOR_V2(0x0A0436, 0x03DC07) }, - { "Portugal" , FOR_V2(0x0A0EA0, 0x03DFEA) }, - { "PRC" , FOR_V2(0x0A1C39, 0x03E4F3) }, - { "PST8PDT" , FOR_V2(0x0A1E5A, 0x03E5D0) }, - { "ROC" , FOR_V2(0x0A276C, 0x03E929) }, - { "ROK" , FOR_V2(0x0A2A71, 0x03EA5C) }, - { "Singapore" , FOR_V2(0x0A2CE6, 0x03EB5F) }, - { "Turkey" , FOR_V2(0x0A2E71, 0x03EC14) }, - { "UCT" , FOR_V2(0x0A3618, 0x03EF01) }, - { "Universal" , FOR_V2(0x0A3696, 0x03EF43) }, - { "US/Alaska" , FOR_V2(0x0A3714, 0x03EF85) }, - { "US/Aleutian" , FOR_V2(0x0A4063, 0x03F2FD) }, - { "US/Arizona" , FOR_V2(0x0A49A3, 0x03F66E) }, - { "US/Central" , FOR_V2(0x0A4AF7, 0x03F705) }, - { "US/East-Indiana" , FOR_V2(0x0A58FB, 0x03FC29) }, - { "US/Eastern" , FOR_V2(0x0A5F89, 0x03FEA4) }, - { "US/Hawaii" , FOR_V2(0x0A6D65, 0x0403B4) }, - { "US/Indiana-Starke" , FOR_V2(0x0A6EBA, 0x040453) }, - { "US/Michigan" , FOR_V2(0x0A7842, 0x0407DD) }, - { "US/Mountain" , FOR_V2(0x0A8104, 0x040B1E) }, - { "US/Pacific" , FOR_V2(0x0A8A9C, 0x040EA8) }, - { "US/Pacific-New" , FOR_V2(0x0A95BC, 0x0412BE) }, - { "US/Samoa" , FOR_V2(0x0AA0DC, 0x0416D4) }, - { "UTC" , FOR_V2(0x0AA197, 0x041730) }, - { "W-SU" , FOR_V2(0x0AA215, 0x041772) }, - { "WET" , FOR_V2(0x0AA820, 0x0419DE) }, - { "Zulu" , FOR_V2(0x0AAF9D, 0x041CA1) }, + { "America/Dawson_Creek" , FOR_V2(0x01229A, 0x0072D3) }, + { "America/Denver" , FOR_V2(0x0126E0, 0x007495) }, + { "America/Detroit" , FOR_V2(0x01308D, 0x007834) }, + { "America/Dominica" , FOR_V2(0x013968, 0x007B8E) }, + { "America/Edmonton" , FOR_V2(0x013A08, 0x007BDF) }, + { "America/Eirunepe" , FOR_V2(0x01434D, 0x007F5E) }, + { "America/El_Salvador" , FOR_V2(0x0145F8, 0x008079) }, + { "America/Ensenada" , FOR_V2(0x0146E4, 0x0080E8) }, + { "America/Fort_Nelson" , FOR_V2(0x015016, 0x008451) }, + { "America/Fort_Wayne" , FOR_V2(0x0158F6, 0x0087B0) }, + { "America/Fortaleza" , FOR_V2(0x015F84, 0x008A2B) }, + { "America/Glace_Bay" , FOR_V2(0x016282, 0x008B6F) }, + { "America/Godthab" , FOR_V2(0x016B39, 0x008EBA) }, + { "America/Goose_Bay" , FOR_V2(0x01729B, 0x009174) }, + { "America/Grand_Turk" , FOR_V2(0x017F51, 0x009641) }, + { "America/Grenada" , FOR_V2(0x018695, 0x0098F5) }, + { "America/Guadeloupe" , FOR_V2(0x018735, 0x009946) }, + { "America/Guatemala" , FOR_V2(0x0187D5, 0x009997) }, + { "America/Guayaquil" , FOR_V2(0x0188F9, 0x009A1A) }, + { "America/Guyana" , FOR_V2(0x018A0D, 0x009AA5) }, + { "America/Halifax" , FOR_V2(0x018B05, 0x009B1B) }, + { "America/Havana" , FOR_V2(0x01988F, 0x00A021) }, + { "America/Hermosillo" , FOR_V2(0x01A20B, 0x00A39F) }, + { "America/Indiana/Indianapolis" , FOR_V2(0x01A3D6, 0x00A479) }, + { "America/Indiana/Knox" , FOR_V2(0x01AA7D, 0x00A70D) }, + { "America/Indiana/Marengo" , FOR_V2(0x01B41A, 0x00AAAC) }, + { "America/Indiana/Petersburg" , FOR_V2(0x01BAF7, 0x00AD52) }, + { "America/Indiana/Tell_City" , FOR_V2(0x01C286, 0x00B035) }, + { "America/Indiana/Vevay" , FOR_V2(0x01C93A, 0x00B2CF) }, + { "America/Indiana/Vincennes" , FOR_V2(0x01CEE6, 0x00B50A) }, + { "America/Indiana/Winamac" , FOR_V2(0x01D5AC, 0x00B7AB) }, + { "America/Indianapolis" , FOR_V2(0x01DCC0, 0x00BA64) }, + { "America/Inuvik" , FOR_V2(0x01E34E, 0x00BCDF) }, + { "America/Iqaluit" , FOR_V2(0x01EAD4, 0x00BFB6) }, + { "America/Jamaica" , FOR_V2(0x01F2EE, 0x00C2DA) }, + { "America/Jujuy" , FOR_V2(0x01F4DC, 0x00C3A8) }, + { "America/Juneau" , FOR_V2(0x01F900, 0x00C544) }, + { "America/Kentucky/Louisville" , FOR_V2(0x020251, 0x00C8C9) }, + { "America/Kentucky/Monticello" , FOR_V2(0x020D4F, 0x00CCED) }, + { "America/Knox_IN" , FOR_V2(0x02169F, 0x00D071) }, + { "America/Kralendijk" , FOR_V2(0x022027, 0x00D3FB) }, + { "America/La_Paz" , FOR_V2(0x0220ED, 0x00D45D) }, + { "America/Lima" , FOR_V2(0x0221E1, 0x00D4D1) }, + { "America/Los_Angeles" , FOR_V2(0x022383, 0x00D582) }, + { "America/Louisville" , FOR_V2(0x022EAA, 0x00D99F) }, + { "America/Lower_Princes" , FOR_V2(0x02398A, 0x00DDA5) }, + { "America/Maceio" , FOR_V2(0x023A50, 0x00DE07) }, + { "America/Managua" , FOR_V2(0x023D54, 0x00DF3F) }, + { "America/Manaus" , FOR_V2(0x023F0E, 0x00DFFF) }, + { "America/Marigot" , FOR_V2(0x024185, 0x00E104) }, + { "America/Martinique" , FOR_V2(0x024225, 0x00E155) }, + { "America/Matamoros" , FOR_V2(0x024319, 0x00E1CA) }, + { "America/Mazatlan" , FOR_V2(0x0248D1, 0x00E411) }, + { "America/Mendoza" , FOR_V2(0x024F08, 0x00E687) }, + { "America/Menominee" , FOR_V2(0x025348, 0x00E82D) }, + { "America/Merida" , FOR_V2(0x025C55, 0x00EB9F) }, + { "America/Metlakatla" , FOR_V2(0x02620F, 0x00EDD8) }, + { "America/Mexico_City" , FOR_V2(0x0267C1, 0x00F00D) }, + { "America/Miquelon" , FOR_V2(0x026E09, 0x00F26D) }, + { "America/Moncton" , FOR_V2(0x027497, 0x00F4DA) }, + { "America/Monterrey" , FOR_V2(0x02810D, 0x00F97D) }, + { "America/Montevideo" , FOR_V2(0x0286CC, 0x00FBCB) }, + { "America/Montreal" , FOR_V2(0x028CBE, 0x00FE18) }, + { "America/Montserrat" , FOR_V2(0x029A70, 0x010319) }, + { "America/Nassau" , FOR_V2(0x029B10, 0x01036A) }, + { "America/New_York" , FOR_V2(0x02A3EE, 0x0106A9) }, + { "America/Nipigon" , FOR_V2(0x02B1DE, 0x010BCD) }, + { "America/Nome" , FOR_V2(0x02BA55, 0x010F05) }, + { "America/Noronha" , FOR_V2(0x02C3AD, 0x011288) }, + { "America/North_Dakota/Beulah" , FOR_V2(0x02C695, 0x0113B6) }, + { "America/North_Dakota/Center" , FOR_V2(0x02D002, 0x011745) }, + { "America/North_Dakota/New_Salem" , FOR_V2(0x02D96F, 0x011AD4) }, + { "America/Nuuk" , FOR_V2(0x02E2E2, 0x011E69) }, + { "America/Ojinaga" , FOR_V2(0x02EA5A, 0x012139) }, + { "America/Panama" , FOR_V2(0x02F05A, 0x012393) }, + { "America/Pangnirtung" , FOR_V2(0x02F11C, 0x0123F3) }, + { "America/Paramaribo" , FOR_V2(0x02F970, 0x012730) }, + { "America/Phoenix" , FOR_V2(0x02FA82, 0x0127B1) }, + { "America/Port-au-Prince" , FOR_V2(0x02FBF3, 0x012865) }, + { "America/Port_of_Spain" , FOR_V2(0x030199, 0x012A86) }, + { "America/Porto_Acre" , FOR_V2(0x030239, 0x012AD7) }, + { "America/Porto_Velho" , FOR_V2(0x0304B9, 0x012BD9) }, + { "America/Puerto_Rico" , FOR_V2(0x03070D, 0x012CCD) }, + { "America/Punta_Arenas" , FOR_V2(0x03080F, 0x012D49) }, + { "America/Rainy_River" , FOR_V2(0x030F9D, 0x013032) }, + { "America/Rankin_Inlet" , FOR_V2(0x031815, 0x01336B) }, + { "America/Recife" , FOR_V2(0x031F9B, 0x013645) }, + { "America/Regina" , FOR_V2(0x03227D, 0x01376D) }, + { "America/Resolute" , FOR_V2(0x032672, 0x01390B) }, + { "America/Rio_Branco" , FOR_V2(0x032DF9, 0x013BE6) }, + { "America/Rosario" , FOR_V2(0x03307D, 0x013CEC) }, + { "America/Santa_Isabel" , FOR_V2(0x0334BD, 0x013E92) }, + { "America/Santarem" , FOR_V2(0x033DEF, 0x0141FB) }, + { "America/Santiago" , FOR_V2(0x034060, 0x0142FD) }, + { "America/Santo_Domingo" , FOR_V2(0x034A5F, 0x0146BB) }, + { "America/Sao_Paulo" , FOR_V2(0x034C35, 0x014787) }, + { "America/Scoresbysund" , FOR_V2(0x03521B, 0x0149DF) }, + { "America/Shiprock" , FOR_V2(0x0359C0, 0x014CCA) }, + { "America/Sitka" , FOR_V2(0x036358, 0x015054) }, + { "America/St_Barthelemy" , FOR_V2(0x036C90, 0x0153CC) }, + { "America/St_Johns" , FOR_V2(0x036D30, 0x01541D) }, + { "America/St_Kitts" , FOR_V2(0x037BA5, 0x015983) }, + { "America/St_Lucia" , FOR_V2(0x037C45, 0x0159D4) }, + { "America/St_Thomas" , FOR_V2(0x037CE5, 0x015A25) }, + { "America/St_Vincent" , FOR_V2(0x037D85, 0x015A76) }, + { "America/Swift_Current" , FOR_V2(0x037E25, 0x015AC7) }, + { "America/Tegucigalpa" , FOR_V2(0x038073, 0x015BCC) }, + { "America/Thule" , FOR_V2(0x03817B, 0x015C45) }, + { "America/Thunder_Bay" , FOR_V2(0x038773, 0x015E84) }, + { "America/Tijuana" , FOR_V2(0x039033, 0x0161D5) }, + { "America/Toronto" , FOR_V2(0x039986, 0x01655F) }, + { "America/Tortola" , FOR_V2(0x03A755, 0x016A7D) }, + { "America/Vancouver" , FOR_V2(0x03A7F5, 0x016ACE) }, + { "America/Virgin" , FOR_V2(0x03B366, 0x016F11) }, + { "America/Whitehorse" , FOR_V2(0x03B406, 0x016F62) }, + { "America/Winnipeg" , FOR_V2(0x03BA68, 0x0171E9) }, + { "America/Yakutat" , FOR_V2(0x03C5C5, 0x01762C) }, + { "America/Yellowknife" , FOR_V2(0x03CEE2, 0x017995) }, + { "Antarctica/Casey" , FOR_V2(0x03D6B3, 0x017C8F) }, + { "Antarctica/Davis" , FOR_V2(0x03D7ED, 0x017D20) }, + { "Antarctica/DumontDUrville" , FOR_V2(0x03D927, 0x017DB1) }, + { "Antarctica/Macquarie" , FOR_V2(0x03DA05, 0x017E21) }, + { "Antarctica/Mawson" , FOR_V2(0x03E011, 0x018078) }, + { "Antarctica/McMurdo" , FOR_V2(0x03E0EA, 0x0180E3) }, + { "Antarctica/Palmer" , FOR_V2(0x03EAA1, 0x018491) }, + { "Antarctica/Rothera" , FOR_V2(0x03F03D, 0x0186BE) }, + { "Antarctica/South_Pole" , FOR_V2(0x03F0F4, 0x01871B) }, + { "Antarctica/Syowa" , FOR_V2(0x03FA85, 0x018AA3) }, + { "Antarctica/Troll" , FOR_V2(0x03FB3B, 0x018AFE) }, + { "Antarctica/Vostok" , FOR_V2(0x03FFD6, 0x018CBB) }, + { "Arctic/Longyearbyen" , FOR_V2(0x04008D, 0x018D17) }, + { "Asia/Aden" , FOR_V2(0x04094D, 0x019055) }, + { "Asia/Almaty" , FOR_V2(0x0409FE, 0x0190AB) }, + { "Asia/Amman" , FOR_V2(0x040E06, 0x019254) }, + { "Asia/Anadyr" , FOR_V2(0x04154F, 0x019505) }, + { "Asia/Aqtau" , FOR_V2(0x041A12, 0x0196EF) }, + { "Asia/Aqtobe" , FOR_V2(0x041E0A, 0x019891) }, + { "Asia/Ashgabat" , FOR_V2(0x042216, 0x019A37) }, + { "Asia/Ashkhabad" , FOR_V2(0x04248D, 0x019B40) }, + { "Asia/Atyrau" , FOR_V2(0x042704, 0x019C49) }, + { "Asia/Baghdad" , FOR_V2(0x042B04, 0x019DEF) }, + { "Asia/Bahrain" , FOR_V2(0x042EE7, 0x019F74) }, + { "Asia/Baku" , FOR_V2(0x042FBA, 0x019FD9) }, + { "Asia/Bangkok" , FOR_V2(0x043491, 0x01A1C0) }, + { "Asia/Barnaul" , FOR_V2(0x043564, 0x01A225) }, + { "Asia/Beirut" , FOR_V2(0x043A43, 0x01A415) }, + { "Asia/Bishkek" , FOR_V2(0x0442B9, 0x01A72D) }, + { "Asia/Brunei" , FOR_V2(0x04469C, 0x01A8B6) }, + { "Asia/Calcutta" , FOR_V2(0x044773, 0x01A91D) }, + { "Asia/Chita" , FOR_V2(0x04489C, 0x01A99D) }, + { "Asia/Choibalsan" , FOR_V2(0x044D81, 0x01AB95) }, + { "Asia/Chongqing" , FOR_V2(0x045154, 0x01AD21) }, + { "Asia/Chungking" , FOR_V2(0x045391, 0x01AE08) }, + { "Asia/Colombo" , FOR_V2(0x0455CE, 0x01AEEF) }, + { "Asia/Dacca" , FOR_V2(0x04574E, 0x01AF9C) }, + { "Asia/Damascus" , FOR_V2(0x0458AB, 0x01B03C) }, + { "Asia/Dhaka" , FOR_V2(0x0461AD, 0x01B386) }, + { "Asia/Dili" , FOR_V2(0x04630A, 0x01B426) }, + { "Asia/Dubai" , FOR_V2(0x0463F9, 0x01B495) }, + { "Asia/Dushanbe" , FOR_V2(0x0464AA, 0x01B4EB) }, + { "Asia/Famagusta" , FOR_V2(0x046705, 0x01B5E8) }, + { "Asia/Gaza" , FOR_V2(0x046F0C, 0x01B8EE) }, + { "Asia/Harbin" , FOR_V2(0x04782E, 0x01BC53) }, + { "Asia/Hebron" , FOR_V2(0x047A6B, 0x01BD3A) }, + { "Asia/Ho_Chi_Minh" , FOR_V2(0x0483A8, 0x01C0A8) }, + { "Asia/Hong_Kong" , FOR_V2(0x048513, 0x01C14B) }, + { "Asia/Hovd" , FOR_V2(0x0489D2, 0x01C323) }, + { "Asia/Irkutsk" , FOR_V2(0x048D84, 0x01C4AD) }, + { "Asia/Istanbul" , FOR_V2(0x049285, 0x01C6B6) }, + { "Asia/Jakarta" , FOR_V2(0x049A2C, 0x01C9A3) }, + { "Asia/Jayapura" , FOR_V2(0x049BA8, 0x01CA5A) }, + { "Asia/Jerusalem" , FOR_V2(0x049CC7, 0x01CB01) }, + { "Asia/Kabul" , FOR_V2(0x04A5C3, 0x01CE51) }, + { "Asia/Kamchatka" , FOR_V2(0x04A69F, 0x01CEB8) }, + { "Asia/Karachi" , FOR_V2(0x04AB4B, 0x01D096) }, + { "Asia/Kashgar" , FOR_V2(0x04ACD2, 0x01D146) }, + { "Asia/Kathmandu" , FOR_V2(0x04AD83, 0x01D19C) }, + { "Asia/Katmandu" , FOR_V2(0x04AE63, 0x01D205) }, + { "Asia/Khandyga" , FOR_V2(0x04AF43, 0x01D26E) }, + { "Asia/Kolkata" , FOR_V2(0x04B464, 0x01D487) }, + { "Asia/Krasnoyarsk" , FOR_V2(0x04B58D, 0x01D507) }, + { "Asia/Kuala_Lumpur" , FOR_V2(0x04BA69, 0x01D6FF) }, + { "Asia/Kuching" , FOR_V2(0x04BC08, 0x01D7C8) }, + { "Asia/Kuwait" , FOR_V2(0x04BE05, 0x01D8A9) }, + { "Asia/Macao" , FOR_V2(0x04BEB6, 0x01D8FF) }, + { "Asia/Macau" , FOR_V2(0x04C38D, 0x01DADF) }, + { "Asia/Magadan" , FOR_V2(0x04C864, 0x01DCBF) }, + { "Asia/Makassar" , FOR_V2(0x04CD46, 0x01DEB3) }, + { "Asia/Manila" , FOR_V2(0x04CE99, 0x01DF7B) }, + { "Asia/Muscat" , FOR_V2(0x04CFED, 0x01E00E) }, + { "Asia/Nicosia" , FOR_V2(0x04D09E, 0x01E064) }, + { "Asia/Novokuznetsk" , FOR_V2(0x04D88F, 0x01E35F) }, + { "Asia/Novosibirsk" , FOR_V2(0x04DD39, 0x01E53C) }, + { "Asia/Omsk" , FOR_V2(0x04E21E, 0x01E732) }, + { "Asia/Oral" , FOR_V2(0x04E6EE, 0x01E91E) }, + { "Asia/Phnom_Penh" , FOR_V2(0x04EAF6, 0x01EAC3) }, + { "Asia/Pontianak" , FOR_V2(0x04EBC9, 0x01EB28) }, + { "Asia/Pyongyang" , FOR_V2(0x04ED4C, 0x01EBE7) }, + { "Asia/Qatar" , FOR_V2(0x04EE45, 0x01EC5C) }, + { "Asia/Qostanay" , FOR_V2(0x04EF18, 0x01ECC1) }, + { "Asia/Qyzylorda" , FOR_V2(0x04F331, 0x01EE74) }, + { "Asia/Rangoon" , FOR_V2(0x04F75B, 0x01F02F) }, + { "Asia/Riyadh" , FOR_V2(0x04F873, 0x01F0B0) }, + { "Asia/Saigon" , FOR_V2(0x04F924, 0x01F106) }, + { "Asia/Sakhalin" , FOR_V2(0x04FA8F, 0x01F1A9) }, + { "Asia/Samarkand" , FOR_V2(0x04FF65, 0x01F39B) }, + { "Asia/Seoul" , FOR_V2(0x0501C3, 0x01F4A2) }, + { "Asia/Shanghai" , FOR_V2(0x050438, 0x01F5A5) }, + { "Asia/Singapore" , FOR_V2(0x050681, 0x01F698) }, + { "Asia/Srednekolymsk" , FOR_V2(0x05080C, 0x01F74D) }, + { "Asia/Taipei" , FOR_V2(0x050CF2, 0x01F94E) }, + { "Asia/Tashkent" , FOR_V2(0x050FF7, 0x01FA81) }, + { "Asia/Tbilisi" , FOR_V2(0x051263, 0x01FB8F) }, + { "Asia/Tehran" , FOR_V2(0x05167A, 0x01FD32) }, + { "Asia/Tel_Aviv" , FOR_V2(0x05209C, 0x01FFA4) }, + { "Asia/Thimbu" , FOR_V2(0x052998, 0x0202F4) }, + { "Asia/Thimphu" , FOR_V2(0x052A6F, 0x02035B) }, + { "Asia/Tokyo" , FOR_V2(0x052B46, 0x0203C2) }, + { "Asia/Tomsk" , FOR_V2(0x052C87, 0x020453) }, + { "Asia/Ujung_Pandang" , FOR_V2(0x053166, 0x020643) }, + { "Asia/Ulaanbaatar" , FOR_V2(0x053270, 0x0206C2) }, + { "Asia/Ulan_Bator" , FOR_V2(0x05360C, 0x020836) }, + { "Asia/Urumqi" , FOR_V2(0x053993, 0x020995) }, + { "Asia/Ust-Nera" , FOR_V2(0x053A51, 0x0209F8) }, + { "Asia/Vientiane" , FOR_V2(0x053F55, 0x020BFF) }, + { "Asia/Vladivostok" , FOR_V2(0x054028, 0x020C64) }, + { "Asia/Yakutsk" , FOR_V2(0x0544FF, 0x020E56) }, + { "Asia/Yangon" , FOR_V2(0x0549D5, 0x021048) }, + { "Asia/Yekaterinburg" , FOR_V2(0x054AED, 0x0210C9) }, + { "Asia/Yerevan" , FOR_V2(0x054FE2, 0x0212C6) }, + { "Atlantic/Azores" , FOR_V2(0x05546D, 0x02148F) }, + { "Atlantic/Bermuda" , FOR_V2(0x05621B, 0x0219A3) }, + { "Atlantic/Canary" , FOR_V2(0x0569E1, 0x021C7E) }, + { "Atlantic/Cape_Verde" , FOR_V2(0x057164, 0x021F53) }, + { "Atlantic/Faeroe" , FOR_V2(0x05727E, 0x021FD8) }, + { "Atlantic/Faroe" , FOR_V2(0x0579A1, 0x02227C) }, + { "Atlantic/Jan_Mayen" , FOR_V2(0x0580C4, 0x022520) }, + { "Atlantic/Madeira" , FOR_V2(0x058984, 0x02285E) }, + { "Atlantic/Reykjavik" , FOR_V2(0x059732, 0x022D7B) }, + { "Atlantic/South_Georgia" , FOR_V2(0x059BC8, 0x022F41) }, + { "Atlantic/St_Helena" , FOR_V2(0x059C78, 0x022F97) }, + { "Atlantic/Stanley" , FOR_V2(0x059D18, 0x022FE8) }, + { "Australia/ACT" , FOR_V2(0x05A1E2, 0x0231C1) }, + { "Australia/Adelaide" , FOR_V2(0x05AA8A, 0x0234F0) }, + { "Australia/Brisbane" , FOR_V2(0x05B353, 0x02382E) }, + { "Australia/Broken_Hill" , FOR_V2(0x05B527, 0x023903) }, + { "Australia/Canberra" , FOR_V2(0x05BE12, 0x023C4E) }, + { "Australia/Currie" , FOR_V2(0x05C6BA, 0x023F7D) }, + { "Australia/Darwin" , FOR_V2(0x05CF78, 0x0242C2) }, + { "Australia/Eucla" , FOR_V2(0x05D0C6, 0x024359) }, + { "Australia/Hobart" , FOR_V2(0x05D2CF, 0x024441) }, + { "Australia/LHI" , FOR_V2(0x05DBFC, 0x0247AD) }, + { "Australia/Lindeman" , FOR_V2(0x05E34C, 0x024A60) }, + { "Australia/Lord_Howe" , FOR_V2(0x05E560, 0x024B51) }, + { "Australia/Melbourne" , FOR_V2(0x05ECC0, 0x024E14) }, + { "Australia/North" , FOR_V2(0x05F570, 0x02514B) }, + { "Australia/NSW" , FOR_V2(0x05F6AC, 0x0251D0) }, + { "Australia/Perth" , FOR_V2(0x05FF54, 0x0254FF) }, + { "Australia/Queensland" , FOR_V2(0x06014A, 0x0255E5) }, + { "Australia/South" , FOR_V2(0x060307, 0x0256A3) }, + { "Australia/Sydney" , FOR_V2(0x060BC1, 0x0259D2) }, + { "Australia/Tasmania" , FOR_V2(0x061485, 0x025D1D) }, + { "Australia/Victoria" , FOR_V2(0x061D9D, 0x026074) }, + { "Australia/West" , FOR_V2(0x062645, 0x0263A3) }, + { "Australia/Yancowinna" , FOR_V2(0x06281D, 0x02646B) }, + { "Brazil/Acre" , FOR_V2(0x0630EC, 0x02679A) }, + { "Brazil/DeNoronha" , FOR_V2(0x06336C, 0x02689C) }, + { "Brazil/East" , FOR_V2(0x063644, 0x0269BA) }, + { "Brazil/West" , FOR_V2(0x063BF4, 0x026BDC) }, + { "Canada/Atlantic" , FOR_V2(0x063E5C, 0x026CD2) }, + { "Canada/Central" , FOR_V2(0x064BC8, 0x0271BA) }, + { "Canada/Eastern" , FOR_V2(0x065708, 0x0275E0) }, + { "Canada/Mountain" , FOR_V2(0x0664BA, 0x027AE1) }, + { "Canada/Newfoundland" , FOR_V2(0x066DE2, 0x027E43) }, + { "Canada/Pacific" , FOR_V2(0x067C35, 0x028387) }, + { "Canada/Saskatchewan" , FOR_V2(0x06878D, 0x0287B1) }, + { "Canada/Yukon" , FOR_V2(0x068B6D, 0x02893A) }, + { "CET" , FOR_V2(0x0691B9, 0x028BAB) }, + { "Chile/Continental" , FOR_V2(0x0699F3, 0x028EB0) }, + { "Chile/EasterIsland" , FOR_V2(0x06A3E0, 0x02925C) }, + { "CST6CDT" , FOR_V2(0x06ACA5, 0x02959C) }, + { "Cuba" , FOR_V2(0x06B5B7, 0x0298F5) }, + { "EET" , FOR_V2(0x06BF33, 0x029C73) }, + { "Egypt" , FOR_V2(0x06C6B3, 0x029F36) }, + { "Eire" , FOR_V2(0x06CE62, 0x02A212) }, + { "EST" , FOR_V2(0x06DC12, 0x02A71A) }, + { "EST5EDT" , FOR_V2(0x06DC90, 0x02A75C) }, + { "Etc/GMT" , FOR_V2(0x06E5A2, 0x02AAB5) }, + { "Etc/GMT+0" , FOR_V2(0x06E620, 0x02AAF7) }, + { "Etc/GMT+1" , FOR_V2(0x06E69E, 0x02AB39) }, + { "Etc/GMT+10" , FOR_V2(0x06E71E, 0x02AB7B) }, + { "Etc/GMT+11" , FOR_V2(0x06E79F, 0x02ABBD) }, + { "Etc/GMT+12" , FOR_V2(0x06E820, 0x02ABFF) }, + { "Etc/GMT+2" , FOR_V2(0x06E8A1, 0x02AC41) }, + { "Etc/GMT+3" , FOR_V2(0x06E921, 0x02AC83) }, + { "Etc/GMT+4" , FOR_V2(0x06E9A1, 0x02ACC5) }, + { "Etc/GMT+5" , FOR_V2(0x06EA21, 0x02AD07) }, + { "Etc/GMT+6" , FOR_V2(0x06EAA1, 0x02AD49) }, + { "Etc/GMT+7" , FOR_V2(0x06EB21, 0x02AD8B) }, + { "Etc/GMT+8" , FOR_V2(0x06EBA1, 0x02ADCD) }, + { "Etc/GMT+9" , FOR_V2(0x06EC21, 0x02AE0F) }, + { "Etc/GMT-0" , FOR_V2(0x06ECA1, 0x02AE51) }, + { "Etc/GMT-1" , FOR_V2(0x06ED1F, 0x02AE93) }, + { "Etc/GMT-10" , FOR_V2(0x06EDA0, 0x02AED5) }, + { "Etc/GMT-11" , FOR_V2(0x06EE22, 0x02AF17) }, + { "Etc/GMT-12" , FOR_V2(0x06EEA4, 0x02AF59) }, + { "Etc/GMT-13" , FOR_V2(0x06EF26, 0x02AF9B) }, + { "Etc/GMT-14" , FOR_V2(0x06EFA8, 0x02AFDD) }, + { "Etc/GMT-2" , FOR_V2(0x06F02A, 0x02B01F) }, + { "Etc/GMT-3" , FOR_V2(0x06F0AB, 0x02B061) }, + { "Etc/GMT-4" , FOR_V2(0x06F12C, 0x02B0A3) }, + { "Etc/GMT-5" , FOR_V2(0x06F1AD, 0x02B0E5) }, + { "Etc/GMT-6" , FOR_V2(0x06F22E, 0x02B127) }, + { "Etc/GMT-7" , FOR_V2(0x06F2AF, 0x02B169) }, + { "Etc/GMT-8" , FOR_V2(0x06F330, 0x02B1AB) }, + { "Etc/GMT-9" , FOR_V2(0x06F3B1, 0x02B1ED) }, + { "Etc/GMT0" , FOR_V2(0x06F432, 0x02B22F) }, + { "Etc/Greenwich" , FOR_V2(0x06F4B0, 0x02B271) }, + { "Etc/UCT" , FOR_V2(0x06F52E, 0x02B2B3) }, + { "Etc/Universal" , FOR_V2(0x06F5AC, 0x02B2F5) }, + { "Etc/UTC" , FOR_V2(0x06F62A, 0x02B337) }, + { "Etc/Zulu" , FOR_V2(0x06F6A8, 0x02B379) }, + { "Europe/Amsterdam" , FOR_V2(0x06F726, 0x02B3BB) }, + { "Europe/Andorra" , FOR_V2(0x070290, 0x02B800) }, + { "Europe/Astrakhan" , FOR_V2(0x07096A, 0x02BA8D) }, + { "Europe/Athens" , FOR_V2(0x070E15, 0x02BC6B) }, + { "Europe/Belfast" , FOR_V2(0x0716F7, 0x02BFBF) }, + { "Europe/Belgrade" , FOR_V2(0x072543, 0x02C4FA) }, + { "Europe/Berlin" , FOR_V2(0x072CCF, 0x02C7CA) }, + { "Europe/Bratislava" , FOR_V2(0x0735E9, 0x02CB3B) }, + { "Europe/Brussels" , FOR_V2(0x073EF2, 0x02CE8F) }, + { "Europe/Bucharest" , FOR_V2(0x074A73, 0x02D2CD) }, + { "Europe/Budapest" , FOR_V2(0x075307, 0x02D5FE) }, + { "Europe/Busingen" , FOR_V2(0x075C53, 0x02D96E) }, + { "Europe/Chisinau" , FOR_V2(0x0763DC, 0x02DC36) }, + { "Europe/Copenhagen" , FOR_V2(0x076D3E, 0x02DFC5) }, + { "Europe/Dublin" , FOR_V2(0x0775A3, 0x02E2DB) }, + { "Europe/Gibraltar" , FOR_V2(0x078353, 0x02E7E3) }, + { "Europe/Guernsey" , FOR_V2(0x078F4B, 0x02EC4B) }, + { "Europe/Helsinki" , FOR_V2(0x079D97, 0x02F186) }, + { "Europe/Isle_of_Man" , FOR_V2(0x07A50F, 0x02F44D) }, + { "Europe/Istanbul" , FOR_V2(0x07B35B, 0x02F988) }, + { "Europe/Jersey" , FOR_V2(0x07BB02, 0x02FC75) }, + { "Europe/Kaliningrad" , FOR_V2(0x07C94E, 0x0301B0) }, + { "Europe/Kiev" , FOR_V2(0x07CF43, 0x030417) }, + { "Europe/Kirov" , FOR_V2(0x07D78B, 0x03074A) }, + { "Europe/Lisbon" , FOR_V2(0x07DC26, 0x030920) }, + { "Europe/Ljubljana" , FOR_V2(0x07E9D2, 0x030E3C) }, + { "Europe/London" , FOR_V2(0x07F15E, 0x03110C) }, + { "Europe/Luxembourg" , FOR_V2(0x07FFAA, 0x031647) }, + { "Europe/Madrid" , FOR_V2(0x080B38, 0x031A98) }, + { "Europe/Malta" , FOR_V2(0x08158A, 0x031E7D) }, + { "Europe/Mariehamn" , FOR_V2(0x081FD2, 0x032247) }, + { "Europe/Minsk" , FOR_V2(0x08274A, 0x03250E) }, + { "Europe/Monaco" , FOR_V2(0x082C7F, 0x032720) }, + { "Europe/Moscow" , FOR_V2(0x08380B, 0x032B6C) }, + { "Europe/Nicosia" , FOR_V2(0x083E2A, 0x032DEC) }, + { "Europe/Oslo" , FOR_V2(0x084608, 0x0330D4) }, + { "Europe/Paris" , FOR_V2(0x084EC8, 0x033412) }, + { "Europe/Podgorica" , FOR_V2(0x085A66, 0x033869) }, + { "Europe/Prague" , FOR_V2(0x0861F2, 0x033B39) }, + { "Europe/Riga" , FOR_V2(0x086AFB, 0x033E8D) }, + { "Europe/Rome" , FOR_V2(0x08739D, 0x0341D9) }, + { "Europe/Samara" , FOR_V2(0x087DFA, 0x0345A3) }, + { "Europe/San_Marino" , FOR_V2(0x0882DE, 0x0347A1) }, + { "Europe/Sarajevo" , FOR_V2(0x088D3B, 0x034B6B) }, + { "Europe/Saratov" , FOR_V2(0x0894C7, 0x034E3B) }, + { "Europe/Simferopol" , FOR_V2(0x089982, 0x035020) }, + { "Europe/Skopje" , FOR_V2(0x089F41, 0x03526F) }, + { "Europe/Sofia" , FOR_V2(0x08A6CD, 0x03553F) }, + { "Europe/Stockholm" , FOR_V2(0x08AEF6, 0x035846) }, + { "Europe/Tallinn" , FOR_V2(0x08B677, 0x035B06) }, + { "Europe/Tirane" , FOR_V2(0x08BEE7, 0x035E3F) }, + { "Europe/Tiraspol" , FOR_V2(0x08C717, 0x036145) }, + { "Europe/Ulyanovsk" , FOR_V2(0x08D079, 0x0364D4) }, + { "Europe/Uzhgorod" , FOR_V2(0x08D58A, 0x0366E1) }, + { "Europe/Vaduz" , FOR_V2(0x08DDA6, 0x0369FD) }, + { "Europe/Vatican" , FOR_V2(0x08E527, 0x036CBD) }, + { "Europe/Vienna" , FOR_V2(0x08EF84, 0x037087) }, + { "Europe/Vilnius" , FOR_V2(0x08F828, 0x0373BB) }, + { "Europe/Volgograd" , FOR_V2(0x0900A6, 0x037701) }, + { "Europe/Warsaw" , FOR_V2(0x090551, 0x0378DF) }, + { "Europe/Zagreb" , FOR_V2(0x090FBB, 0x037CC2) }, + { "Europe/Zaporozhye" , FOR_V2(0x091747, 0x037F92) }, + { "Europe/Zurich" , FOR_V2(0x091FA8, 0x0382D3) }, + { "Factory" , FOR_V2(0x092729, 0x038593) }, + { "GB" , FOR_V2(0x0927A9, 0x0385D5) }, + { "GB-Eire" , FOR_V2(0x0935F5, 0x038B10) }, + { "GMT" , FOR_V2(0x094441, 0x03904B) }, + { "GMT+0" , FOR_V2(0x0944BF, 0x03908D) }, + { "GMT-0" , FOR_V2(0x09453D, 0x0390CF) }, + { "GMT0" , FOR_V2(0x0945BB, 0x039111) }, + { "Greenwich" , FOR_V2(0x094639, 0x039153) }, + { "Hongkong" , FOR_V2(0x0946B7, 0x039195) }, + { "HST" , FOR_V2(0x094B76, 0x03936D) }, + { "Iceland" , FOR_V2(0x094BF5, 0x0393AF) }, + { "Indian/Antananarivo" , FOR_V2(0x09508B, 0x039575) }, + { "Indian/Chagos" , FOR_V2(0x095192, 0x0395F3) }, + { "Indian/Christmas" , FOR_V2(0x095265, 0x039658) }, + { "Indian/Cocos" , FOR_V2(0x095316, 0x0396AE) }, + { "Indian/Comoro" , FOR_V2(0x0953D0, 0x039706) }, + { "Indian/Kerguelen" , FOR_V2(0x0954D7, 0x039784) }, + { "Indian/Mahe" , FOR_V2(0x095588, 0x0397DA) }, + { "Indian/Maldives" , FOR_V2(0x095639, 0x039830) }, + { "Indian/Mauritius" , FOR_V2(0x09570C, 0x039895) }, + { "Indian/Mayotte" , FOR_V2(0x095809, 0x039909) }, + { "Indian/Reunion" , FOR_V2(0x095910, 0x039987) }, + { "Iran" , FOR_V2(0x0959C1, 0x0399DD) }, + { "Israel" , FOR_V2(0x0963E3, 0x039C4F) }, + { "Jamaica" , FOR_V2(0x096CDF, 0x039F9F) }, + { "Japan" , FOR_V2(0x096ECD, 0x03A06D) }, + { "Kwajalein" , FOR_V2(0x09700E, 0x03A0FE) }, + { "Libya" , FOR_V2(0x097156, 0x03A195) }, + { "MET" , FOR_V2(0x0973D3, 0x03A296) }, + { "Mexico/BajaNorte" , FOR_V2(0x097C0D, 0x03A59B) }, + { "Mexico/BajaSur" , FOR_V2(0x09853F, 0x03A904) }, + { "Mexico/General" , FOR_V2(0x098B41, 0x03AB45) }, + { "MST" , FOR_V2(0x09917D, 0x03AD99) }, + { "MST7MDT" , FOR_V2(0x0991FB, 0x03ADDB) }, + { "Navajo" , FOR_V2(0x099B0D, 0x03B134) }, + { "NZ" , FOR_V2(0x09A4A5, 0x03B4BE) }, + { "NZ-CHAT" , FOR_V2(0x09AE36, 0x03B846) }, + { "Pacific/Apia" , FOR_V2(0x09B656, 0x03BB41) }, + { "Pacific/Auckland" , FOR_V2(0x09BAAB, 0x03BCE9) }, + { "Pacific/Bougainville" , FOR_V2(0x09C454, 0x03C089) }, + { "Pacific/Chatham" , FOR_V2(0x09C578, 0x03C10E) }, + { "Pacific/Chuuk" , FOR_V2(0x09CDA7, 0x03C418) }, + { "Pacific/Easter" , FOR_V2(0x09CECF, 0x03C4A1) }, + { "Pacific/Efate" , FOR_V2(0x09D7A1, 0x03C7EE) }, + { "Pacific/Enderbury" , FOR_V2(0x09D97F, 0x03C8B2) }, + { "Pacific/Fakaofo" , FOR_V2(0x09DA84, 0x03C935) }, + { "Pacific/Fiji" , FOR_V2(0x09DB58, 0x03C99A) }, + { "Pacific/Funafuti" , FOR_V2(0x09DF99, 0x03CB30) }, + { "Pacific/Galapagos" , FOR_V2(0x09E04B, 0x03CB86) }, + { "Pacific/Gambier" , FOR_V2(0x09E156, 0x03CC0C) }, + { "Pacific/Guadalcanal" , FOR_V2(0x09E215, 0x03CC71) }, + { "Pacific/Guam" , FOR_V2(0x09E2C7, 0x03CCC7) }, + { "Pacific/Honolulu" , FOR_V2(0x09E4C1, 0x03CD96) }, + { "Pacific/Johnston" , FOR_V2(0x09E61C, 0x03CE3B) }, + { "Pacific/Kiritimati" , FOR_V2(0x09E771, 0x03CEDA) }, + { "Pacific/Kosrae" , FOR_V2(0x09E877, 0x03CF5C) }, + { "Pacific/Kwajalein" , FOR_V2(0x09E9E8, 0x03CFFF) }, + { "Pacific/Majuro" , FOR_V2(0x09EB39, 0x03D09F) }, + { "Pacific/Marquesas" , FOR_V2(0x09EC98, 0x03D14E) }, + { "Pacific/Midway" , FOR_V2(0x09ED62, 0x03D1B7) }, + { "Pacific/Nauru" , FOR_V2(0x09EE2B, 0x03D221) }, + { "Pacific/Niue" , FOR_V2(0x09EF33, 0x03D29C) }, + { "Pacific/Norfolk" , FOR_V2(0x09F030, 0x03D314) }, + { "Pacific/Noumea" , FOR_V2(0x09F3AC, 0x03D472) }, + { "Pacific/Pago_Pago" , FOR_V2(0x09F4E8, 0x03D501) }, + { "Pacific/Palau" , FOR_V2(0x09F5A3, 0x03D55D) }, + { "Pacific/Pitcairn" , FOR_V2(0x09F663, 0x03D5B3) }, + { "Pacific/Pohnpei" , FOR_V2(0x09F739, 0x03D61A) }, + { "Pacific/Ponape" , FOR_V2(0x09F882, 0x03D6B1) }, + { "Pacific/Port_Moresby" , FOR_V2(0x09F9BD, 0x03D73A) }, + { "Pacific/Rarotonga" , FOR_V2(0x09FAA0, 0x03D7AD) }, + { "Pacific/Saipan" , FOR_V2(0x09FCED, 0x03D89D) }, + { "Pacific/Samoa" , FOR_V2(0x09FEE7, 0x03D96C) }, + { "Pacific/Tahiti" , FOR_V2(0x09FFA2, 0x03D9C8) }, + { "Pacific/Tarawa" , FOR_V2(0x0A0062, 0x03DA2D) }, + { "Pacific/Tongatapu" , FOR_V2(0x0A0123, 0x03DA92) }, + { "Pacific/Truk" , FOR_V2(0x0A02A3, 0x03DB3D) }, + { "Pacific/Wake" , FOR_V2(0x0A03BC, 0x03DBB7) }, + { "Pacific/Wallis" , FOR_V2(0x0A0479, 0x03DC18) }, + { "Pacific/Yap" , FOR_V2(0x0A052B, 0x03DC6E) }, + { "Poland" , FOR_V2(0x0A0644, 0x03DCE8) }, + { "Portugal" , FOR_V2(0x0A10AE, 0x03E0CB) }, + { "PRC" , FOR_V2(0x0A1E47, 0x03E5D4) }, + { "PST8PDT" , FOR_V2(0x0A2084, 0x03E6BB) }, + { "ROC" , FOR_V2(0x0A2996, 0x03EA14) }, + { "ROK" , FOR_V2(0x0A2C9B, 0x03EB47) }, + { "Singapore" , FOR_V2(0x0A2F10, 0x03EC4A) }, + { "Turkey" , FOR_V2(0x0A309B, 0x03ECFF) }, + { "UCT" , FOR_V2(0x0A3842, 0x03EFEC) }, + { "Universal" , FOR_V2(0x0A38C0, 0x03F02E) }, + { "US/Alaska" , FOR_V2(0x0A393E, 0x03F070) }, + { "US/Aleutian" , FOR_V2(0x0A428D, 0x03F3E8) }, + { "US/Arizona" , FOR_V2(0x0A4BCD, 0x03F759) }, + { "US/Central" , FOR_V2(0x0A4D21, 0x03F7F0) }, + { "US/East-Indiana" , FOR_V2(0x0A5B25, 0x03FD14) }, + { "US/Eastern" , FOR_V2(0x0A61B3, 0x03FF8F) }, + { "US/Hawaii" , FOR_V2(0x0A6F8F, 0x04049F) }, + { "US/Indiana-Starke" , FOR_V2(0x0A70E4, 0x04053E) }, + { "US/Michigan" , FOR_V2(0x0A7A6C, 0x0408C8) }, + { "US/Mountain" , FOR_V2(0x0A832E, 0x040C09) }, + { "US/Pacific" , FOR_V2(0x0A8CC6, 0x040F93) }, + { "US/Pacific-New" , FOR_V2(0x0A97E6, 0x0413A9) }, + { "US/Samoa" , FOR_V2(0x0AA306, 0x0417BF) }, + { "UTC" , FOR_V2(0x0AA3C1, 0x04181B) }, + { "W-SU" , FOR_V2(0x0AA43F, 0x04185D) }, + { "WET" , FOR_V2(0x0AAA4A, 0x041AC9) }, + { "Zulu" , FOR_V2(0x0AB1C7, 0x041D8C) }, }; #ifdef TIMELIB_SUPPORTS_V2DATA -const unsigned char timelib_timezone_db_data_builtin[700443] = { +const unsigned char timelib_timezone_db_data_builtin[700997] = { #else -const unsigned char timelib_timezone_db_data_builtin[269539] = { +const unsigned char timelib_timezone_db_data_builtin[269774] = { #endif @@ -1051,15 +1052,15 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 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, 0xCE, 0x43, 0xA0, 0x5C, 0xFC, 0x68, 0x20, -0x5E, 0x9B, 0xB0, 0xA0, 0x5E, 0xC9, 0xD5, 0x20, 0x60, 0x72, 0x58, 0x20, 0x60, 0xA0, 0x7C, 0xA0, +0x5E, 0x9B, 0xB0, 0xA0, 0x5E, 0xD3, 0x0F, 0xA0, 0x60, 0x72, 0x58, 0x20, 0x60, 0xA0, 0x7C, 0xA0, 0x62, 0x3F, 0xC5, 0x20, 0x62, 0x77, 0x24, 0x20, 0x64, 0x16, 0x6C, 0xA0, 0x64, 0x44, 0x91, 0x20, 0x65, 0xED, 0x14, 0x20, 0x66, 0x1B, 0x38, 0xA0, 0x67, 0xBA, 0x81, 0x20, 0x67, 0xF1, 0xE0, 0x20, 0x69, 0x91, 0x28, 0xA0, 0x69, 0xBF, 0x4D, 0x20, 0x6B, 0x67, 0xD0, 0x20, 0x6B, 0x95, 0xF4, 0xA0, -0x6D, 0x35, 0x3D, 0x20, 0x6D, 0x63, 0x61, 0xA0, 0x6F, 0x0B, 0xE4, 0xA0, 0x6F, 0x3A, 0x09, 0x20, +0x6D, 0x35, 0x3D, 0x20, 0x6D, 0x6C, 0x9C, 0x20, 0x6F, 0x0B, 0xE4, 0xA0, 0x6F, 0x3A, 0x09, 0x20, 0x70, 0xD9, 0x51, 0xA0, 0x71, 0x10, 0xB0, 0xA0, 0x72, 0xAF, 0xF9, 0x20, 0x72, 0xDE, 0x1D, 0xA0, 0x74, 0x86, 0xA0, 0xA0, 0x74, 0xB4, 0xC5, 0x20, 0x76, 0x54, 0x0D, 0xA0, 0x76, 0x8B, 0x6C, 0xA0, 0x78, 0x2A, 0xB5, 0x20, 0x78, 0x58, 0xD9, 0xA0, 0x79, 0xF8, 0x22, 0x20, 0x7A, 0x2F, 0x81, 0x20, -0x7B, 0xCE, 0xC9, 0xA0, 0x7B, 0xFC, 0xEE, 0x20, 0x7D, 0xA5, 0x71, 0x20, 0x7D, 0xD3, 0x95, 0xA0, +0x7B, 0xCE, 0xC9, 0xA0, 0x7C, 0x06, 0x28, 0xA0, 0x7D, 0xA5, 0x71, 0x20, 0x7D, 0xD3, 0x95, 0xA0, 0x7F, 0x72, 0xDE, 0x20, 0x7F, 0xAA, 0x3D, 0x20, 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, @@ -1103,7 +1104,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 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, 0xCE, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xFC, 0x68, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x9B, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x5E, 0xC9, 0xD5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, +0x5E, 0xD3, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0xA0, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x62, 0x77, 0x24, 0x20, 0x00, 0x00, 0x00, 0x00, 0x64, 0x16, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x44, 0x91, 0x20, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x14, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -1111,7 +1112,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x67, 0xF1, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x69, 0x91, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xBF, 0x4D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x67, 0xD0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x95, 0xF4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x35, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, -0x6D, 0x63, 0x61, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x0B, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, +0x6D, 0x6C, 0x9C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x0B, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A, 0x09, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0xD9, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x10, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x72, 0xAF, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0xDE, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x86, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, @@ -1119,7 +1120,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x76, 0x8B, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x2A, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x78, 0x58, 0xD9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x2F, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7B, 0xFC, 0xEE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, +0x7C, 0x06, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xD3, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xAA, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x81, 0x49, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x81, 0x77, 0xAA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x20, 0x2D, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -1127,7 +1128,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x85, 0x24, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC4, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x86, 0xF2, 0x66, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x91, 0xAE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x88, 0xC9, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x68, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, -0x8A, 0x96, 0x7A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3E, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, +0x8A, 0x9F, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3E, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x6D, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x0C, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x43, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8F, 0xE3, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x90, 0x11, 0x36, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB9, 0xB9, 0xA0, 0x00, 0x00, 0x00, 0x00, @@ -1135,7 +1136,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x93, 0xBE, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5D, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x95, 0x8B, 0xF2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x97, 0x2B, 0x3B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x97, 0x62, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x99, 0x01, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x99, 0x30, 0x07, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD8, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, +0x99, 0x39, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD8, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x06, 0xAE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA5, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xDD, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x7C, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9E, 0xAA, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x53, 0x46, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -1143,28 +1144,28 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0xA2, 0x58, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA3, 0xF7, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA4, 0x25, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA5, 0xC4, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA5, 0xFC, 0x26, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA7, 0x9B, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, -0xA7, 0xC9, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA9, 0x72, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, +0xA7, 0xD2, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA9, 0x72, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA9, 0xA0, 0x3B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x3F, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x76, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x16, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x44, 0x4F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAE, 0xEC, 0xD2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAF, 0x1A, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xBA, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, -0xB0, 0xE8, 0x64, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x90, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, +0xB0, 0xF1, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x90, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB2, 0xBF, 0x0B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x5E, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x95, 0xB3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x34, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, -0xB6, 0x63, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x0B, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, +0xB6, 0x6C, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x0B, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x39, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD9, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBA, 0x10, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xAF, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xDD, 0xDC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x86, 0x5F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0xB4, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x53, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, -0xBF, 0x81, 0xF0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x2A, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, +0xBF, 0x8B, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x2A, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x58, 0x98, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xF7, 0xE0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC3, 0x2F, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC4, 0xCE, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, -0xC4, 0xFC, 0xAC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA5, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, +0xC5, 0x05, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA5, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xD3, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x72, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC8, 0xA9, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x49, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x77, 0x68, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1F, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x4E, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCD, 0xED, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, -0xCE, 0x1B, 0x7D, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xC4, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, +0xCE, 0x24, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xC4, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xF2, 0x24, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD1, 0x91, 0x6D, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xC8, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x68, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x96, 0x39, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x3E, 0xBC, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -1172,7 +1173,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0xD7, 0x43, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD8, 0xE2, 0xD0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD9, 0x10, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB9, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xE7, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x86, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00, -0xDC, 0xB5, 0x09, 0xA0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0xDC, 0xBE, 0x44, 0x20, 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, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, @@ -1429,15 +1430,15 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 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, 0xCE, 0x43, 0xA0, -0x5C, 0xFC, 0x68, 0x20, 0x5E, 0x9B, 0xB0, 0xA0, 0x5E, 0xC9, 0xD5, 0x20, 0x60, 0x72, 0x58, 0x20, +0x5C, 0xFC, 0x68, 0x20, 0x5E, 0x9B, 0xB0, 0xA0, 0x5E, 0xD3, 0x0F, 0xA0, 0x60, 0x72, 0x58, 0x20, 0x60, 0xA0, 0x7C, 0xA0, 0x62, 0x3F, 0xC5, 0x20, 0x62, 0x77, 0x24, 0x20, 0x64, 0x16, 0x6C, 0xA0, 0x64, 0x44, 0x91, 0x20, 0x65, 0xED, 0x14, 0x20, 0x66, 0x1B, 0x38, 0xA0, 0x67, 0xBA, 0x81, 0x20, 0x67, 0xF1, 0xE0, 0x20, 0x69, 0x91, 0x28, 0xA0, 0x69, 0xBF, 0x4D, 0x20, 0x6B, 0x67, 0xD0, 0x20, -0x6B, 0x95, 0xF4, 0xA0, 0x6D, 0x35, 0x3D, 0x20, 0x6D, 0x63, 0x61, 0xA0, 0x6F, 0x0B, 0xE4, 0xA0, +0x6B, 0x95, 0xF4, 0xA0, 0x6D, 0x35, 0x3D, 0x20, 0x6D, 0x6C, 0x9C, 0x20, 0x6F, 0x0B, 0xE4, 0xA0, 0x6F, 0x3A, 0x09, 0x20, 0x70, 0xD9, 0x51, 0xA0, 0x71, 0x10, 0xB0, 0xA0, 0x72, 0xAF, 0xF9, 0x20, 0x72, 0xDE, 0x1D, 0xA0, 0x74, 0x86, 0xA0, 0xA0, 0x74, 0xB4, 0xC5, 0x20, 0x76, 0x54, 0x0D, 0xA0, 0x76, 0x8B, 0x6C, 0xA0, 0x78, 0x2A, 0xB5, 0x20, 0x78, 0x58, 0xD9, 0xA0, 0x79, 0xF8, 0x22, 0x20, -0x7A, 0x2F, 0x81, 0x20, 0x7B, 0xCE, 0xC9, 0xA0, 0x7B, 0xFC, 0xEE, 0x20, 0x7D, 0xA5, 0x71, 0x20, +0x7A, 0x2F, 0x81, 0x20, 0x7B, 0xCE, 0xC9, 0xA0, 0x7C, 0x06, 0x28, 0xA0, 0x7D, 0xA5, 0x71, 0x20, 0x7D, 0xD3, 0x95, 0xA0, 0x7F, 0x72, 0xDE, 0x20, 0x7F, 0xAA, 0x3D, 0x20, 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, @@ -1475,7 +1476,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 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, 0xCE, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xFC, 0x68, 0x20, 0x00, 0x00, 0x00, 0x00, -0x5E, 0x9B, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xC9, 0xD5, 0x20, 0x00, 0x00, 0x00, 0x00, +0x5E, 0x9B, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xD3, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0xA0, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x62, 0x77, 0x24, 0x20, 0x00, 0x00, 0x00, 0x00, 0x64, 0x16, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x44, 0x91, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -1483,7 +1484,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x67, 0xBA, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x69, 0x91, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xBF, 0x4D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x67, 0xD0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x95, 0xF4, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x6D, 0x35, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x63, 0x61, 0xA0, 0x00, 0x00, 0x00, 0x00, +0x6D, 0x35, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x6C, 0x9C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x0B, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A, 0x09, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0xD9, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x10, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x72, 0xAF, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0xDE, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, @@ -1491,7 +1492,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x76, 0x54, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x8B, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x2A, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x78, 0x58, 0xD9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x2F, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, -0x7B, 0xCE, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xFC, 0xEE, 0x20, 0x00, 0x00, 0x00, 0x00, +0x7B, 0xCE, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x06, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xD3, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xAA, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x81, 0x49, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x81, 0x77, 0xAA, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -1499,7 +1500,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x84, 0xED, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x85, 0x24, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC4, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x86, 0xF2, 0x66, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x91, 0xAE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x88, 0xC9, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x8A, 0x68, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x96, 0x7A, 0xA0, 0x00, 0x00, 0x00, 0x00, +0x8A, 0x68, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x9F, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3E, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x6D, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x0C, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x43, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8F, 0xE3, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x90, 0x11, 0x36, 0xA0, 0x00, 0x00, 0x00, 0x00, @@ -1507,7 +1508,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x93, 0x87, 0x26, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x93, 0xBE, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5D, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x95, 0x8B, 0xF2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x97, 0x2B, 0x3B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x97, 0x62, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00, -0x99, 0x01, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x99, 0x30, 0x07, 0x20, 0x00, 0x00, 0x00, 0x00, +0x99, 0x01, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x99, 0x39, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD8, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x06, 0xAE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA5, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xDD, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x7C, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9E, 0xAA, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -1515,28 +1516,28 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0xA2, 0x20, 0xB3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x58, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA3, 0xF7, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA4, 0x25, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA5, 0xC4, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA5, 0xFC, 0x26, 0xA0, 0x00, 0x00, 0x00, 0x00, -0xA7, 0x9B, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA7, 0xC9, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00, +0xA7, 0x9B, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA7, 0xD2, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA9, 0x72, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA9, 0xA0, 0x3B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x3F, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x76, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x16, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x44, 0x4F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAE, 0xEC, 0xD2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAF, 0x1A, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, -0xB0, 0xBA, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xE8, 0x64, 0x20, 0x00, 0x00, 0x00, 0x00, +0xB0, 0xBA, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xF1, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x90, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB2, 0xBF, 0x0B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x5E, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x95, 0xB3, 0x20, 0x00, 0x00, 0x00, 0x00, -0xB6, 0x34, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x63, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, +0xB6, 0x34, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x6C, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x0B, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x39, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD9, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBA, 0x10, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xAF, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xDD, 0xDC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x86, 0x5F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0xB4, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, -0xBF, 0x53, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x81, 0xF0, 0xA0, 0x00, 0x00, 0x00, 0x00, +0xBF, 0x53, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x8B, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x2A, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x58, 0x98, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xF7, 0xE0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC3, 0x2F, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, -0xC4, 0xCE, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC4, 0xFC, 0xAC, 0xA0, 0x00, 0x00, 0x00, 0x00, +0xC4, 0xCE, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC5, 0x05, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA5, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xD3, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x72, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC8, 0xA9, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x49, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x77, 0x68, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1F, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x4E, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, -0xCD, 0xED, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x1B, 0x7D, 0x20, 0x00, 0x00, 0x00, 0x00, +0xCD, 0xED, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x24, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xC4, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xF2, 0x24, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD1, 0x91, 0x6D, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xC8, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x68, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x96, 0x39, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -1544,7 +1545,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0xD7, 0x0C, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x43, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD8, 0xE2, 0xD0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD9, 0x10, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB9, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xE7, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, -0xDC, 0x86, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDC, 0xB5, 0x09, 0xA0, 0x01, 0x03, 0x02, 0x03, +0xDC, 0x86, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDC, 0xBE, 0x44, 0x20, 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, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, @@ -5687,8 +5688,8 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { /* America/Dawson */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x80, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x25, 0x80, 0x00, 0x00, 0x00, 0x9E, 0xB8, 0xCB, 0xB0, 0x9F, 0xBB, 0x23, 0xA0, 0xA0, 0xD0, 0x0C, 0xB0, 0xA1, 0xA2, 0xD2, 0x80, 0xCB, 0x89, 0x28, 0xB0, 0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x34, 0x20, 0xF7, 0x2F, 0x76, 0x90, 0xF8, 0x28, 0xA2, 0x10, 0x07, 0x30, 0xEC, 0x90, 0x13, 0x69, 0x72, 0x20, 0x14, 0x59, 0x55, 0x10, @@ -5711,34 +5712,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x51, 0x3C, 0x59, 0xA0, 0x52, 0x76, 0x10, 0x90, 0x53, 0x1C, 0x3B, 0xA0, 0x54, 0x55, 0xF2, 0x90, 0x54, 0xFC, 0x1D, 0xA0, 0x56, 0x35, 0xD4, 0x90, 0x56, 0xE5, 0x3A, 0x20, 0x58, 0x1E, 0xF1, 0x10, 0x58, 0xC5, 0x1C, 0x20, 0x59, 0xFE, 0xD3, 0x10, 0x5A, 0xA4, 0xFE, 0x20, 0x5B, 0xDE, 0xB5, 0x10, -0x5C, 0x84, 0xE0, 0x20, 0x5D, 0xBE, 0x97, 0x10, 0x5E, 0x64, 0xC2, 0x20, 0x5F, 0x9E, 0x79, 0x10, -0x60, 0x4D, 0xDE, 0xA0, 0x61, 0x87, 0x95, 0x90, 0x62, 0x2D, 0xC0, 0xA0, 0x63, 0x67, 0x77, 0x90, -0x64, 0x0D, 0xA2, 0xA0, 0x65, 0x47, 0x59, 0x90, 0x65, 0xED, 0x84, 0xA0, 0x67, 0x27, 0x3B, 0x90, -0x67, 0xCD, 0x66, 0xA0, 0x69, 0x07, 0x1D, 0x90, 0x69, 0xAD, 0x48, 0xA0, 0x6A, 0xE6, 0xFF, 0x90, -0x6B, 0x96, 0x65, 0x20, 0x6C, 0xD0, 0x1C, 0x10, 0x6D, 0x76, 0x47, 0x20, 0x6E, 0xAF, 0xFE, 0x10, -0x6F, 0x56, 0x29, 0x20, 0x70, 0x8F, 0xE0, 0x10, 0x71, 0x36, 0x0B, 0x20, 0x72, 0x6F, 0xC2, 0x10, -0x73, 0x15, 0xED, 0x20, 0x74, 0x4F, 0xA4, 0x10, 0x74, 0xFF, 0x09, 0xA0, 0x76, 0x38, 0xC0, 0x90, -0x76, 0xDE, 0xEB, 0xA0, 0x78, 0x18, 0xA2, 0x90, 0x78, 0xBE, 0xCD, 0xA0, 0x79, 0xF8, 0x84, 0x90, -0x7A, 0x9E, 0xAF, 0xA0, 0x7B, 0xD8, 0x66, 0x90, 0x7C, 0x7E, 0x91, 0xA0, 0x7D, 0xB8, 0x48, 0x90, -0x7E, 0x5E, 0x73, 0xA0, 0x7F, 0x98, 0x2A, 0x90, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, -0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x5C, 0x84, 0xE0, 0x20, 0x5D, 0xBE, 0x97, 0x10, 0x5E, 0x64, 0xC2, 0x20, 0x02, 0x01, 0x02, 0x01, +0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0xFF, 0xFF, 0x7D, 0x4C, 0x00, 0x00, 0xFF, 0xFF, 0x8F, -0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, 0xFF, -0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, 0x00, -0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, -0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, -0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x08, 0xFF, 0xFF, 0x7D, 0x4C, 0x00, 0x00, 0xFF, 0xFF, +0x8F, 0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, +0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, +0x00, 0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x21, 0x4C, 0x4D, +0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, +0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x4D, +0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, #ifdef TIMELIB_SUPPORTS_V2DATA 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0xFF, 0xFF, 0xFF, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x25, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0x86, 0x8E, 0xB4, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0xCB, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x23, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0xD0, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xA2, 0xD2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x28, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, @@ -5784,44 +5775,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, -0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00, -0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x61, 0x87, 0x95, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x63, 0x67, 0x77, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x65, 0x47, 0x59, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x67, 0x27, 0x3B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x69, 0x07, 0x1D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, -0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, -0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, -0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, -0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00, -0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x76, 0x38, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x78, 0x18, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x79, 0xF8, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7F, 0x98, 0x2A, 0x90, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x02, 0x01, 0x02, 0x01, +0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0xFF, 0xFF, 0x7D, 0x4C, 0x00, 0x00, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x04, 0xFF, -0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, 0xFF, 0xFF, 0x8F, 0x80, 0x01, -0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x19, 0xFF, 0xFF, 0x9D, -0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, -0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, -0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x01, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x53, 0x54, 0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, -0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, -#endif -0x00, 0xEB, 0x16, 0x4A, 0x00, 0x3D, 0xEC, 0xDD, 0x00, 0x00, 0x00, 0x17, 0x50, 0x61, 0x63, 0x69, -0x66, 0x69, 0x63, 0x20, 0x2D, 0x20, 0x59, 0x75, 0x6B, 0x6F, 0x6E, 0x20, 0x28, 0x6E, 0x6F, 0x72, -0x74, 0x68, 0x29, +0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x08, 0xFF, 0xFF, 0x7D, 0x4C, 0x00, 0x00, 0xFF, 0xFF, +0x8F, 0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, +0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, +0x00, 0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x21, 0x4C, 0x4D, +0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, +0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x4D, +0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x0A, +#endif +0x00, 0xEB, 0x16, 0x4A, 0x00, 0x3D, 0xEC, 0xDD, 0x00, 0x00, 0x00, 0x16, 0x50, 0x61, 0x63, 0x69, +0x66, 0x69, 0x63, 0x20, 0x2D, 0x20, 0x59, 0x75, 0x6B, 0x6F, 0x6E, 0x20, 0x28, 0x77, 0x65, 0x73, +0x74, 0x29, /* America/Dawson_Creek */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -7051,7 +7022,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x42, 0x72, 0x65, 0x74, 0x6F, 0x6E, 0x29, /* America/Godthab */ -0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 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, 0x76, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0C, 0x9B, 0x80, 0x68, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x14, 0x33, 0xFA, 0x90, 0x15, 0x23, 0xEB, 0x90, 0x16, 0x13, 0xDC, 0x90, @@ -7171,9 +7142,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x32, 0x3E, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x2D, 0x32, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x2D, 0x31, 0x0A, #endif -0x00, 0xEB, 0x43, 0xDD, 0x00, 0xC3, 0xB8, 0x2A, 0x00, 0x00, 0x00, 0x16, 0x47, 0x72, 0x65, 0x65, -0x6E, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, -0x73, 0x29, +0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, /* America/Goose_Bay */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -13386,6 +13355,131 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x72, 0x61, 0x6C, 0x20, 0x2D, 0x20, 0x4E, 0x44, 0x20, 0x28, 0x4D, 0x6F, 0x72, 0x74, 0x6F, 0x6E, 0x20, 0x72, 0x75, 0x72, 0x61, 0x6C, 0x29, +/* America/Nuuk */ +0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x4C, 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, 0x76, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0C, 0x9B, 0x80, 0x68, 0x00, +0x13, 0x4D, 0x7C, 0x50, 0x14, 0x33, 0xFA, 0x90, 0x15, 0x23, 0xEB, 0x90, 0x16, 0x13, 0xDC, 0x90, +0x17, 0x03, 0xCD, 0x90, 0x17, 0xF3, 0xBE, 0x90, 0x18, 0xE3, 0xAF, 0x90, 0x19, 0xD3, 0xA0, 0x90, +0x1A, 0xC3, 0x91, 0x90, 0x1B, 0xBC, 0xBD, 0x10, 0x1C, 0xAC, 0xAE, 0x10, 0x1D, 0x9C, 0x9F, 0x10, +0x1E, 0x8C, 0x90, 0x10, 0x1F, 0x7C, 0x81, 0x10, 0x20, 0x6C, 0x72, 0x10, 0x21, 0x5C, 0x63, 0x10, +0x22, 0x4C, 0x54, 0x10, 0x23, 0x3C, 0x45, 0x10, 0x24, 0x2C, 0x36, 0x10, 0x25, 0x1C, 0x27, 0x10, +0x26, 0x0C, 0x18, 0x10, 0x27, 0x05, 0x43, 0x90, 0x27, 0xF5, 0x34, 0x90, 0x28, 0xE5, 0x25, 0x90, +0x29, 0xD5, 0x16, 0x90, 0x2A, 0xC5, 0x07, 0x90, 0x2B, 0xB4, 0xF8, 0x90, 0x2C, 0xA4, 0xE9, 0x90, +0x2D, 0x94, 0xDA, 0x90, 0x2E, 0x84, 0xCB, 0x90, 0x2F, 0x74, 0xBC, 0x90, 0x30, 0x64, 0xAD, 0x90, +0x31, 0x5D, 0xD9, 0x10, 0x32, 0x72, 0xB4, 0x10, 0x33, 0x3D, 0xBB, 0x10, 0x34, 0x52, 0x96, 0x10, +0x35, 0x1D, 0x9D, 0x10, 0x36, 0x32, 0x78, 0x10, 0x36, 0xFD, 0x7F, 0x10, 0x38, 0x1B, 0x94, 0x90, +0x38, 0xDD, 0x61, 0x10, 0x39, 0xFB, 0x76, 0x90, 0x3A, 0xBD, 0x43, 0x10, 0x3B, 0xDB, 0x58, 0x90, +0x3C, 0xA6, 0x5F, 0x90, 0x3D, 0xBB, 0x3A, 0x90, 0x3E, 0x86, 0x41, 0x90, 0x3F, 0x9B, 0x1C, 0x90, +0x40, 0x66, 0x23, 0x90, 0x41, 0x84, 0x39, 0x10, 0x42, 0x46, 0x05, 0x90, 0x43, 0x64, 0x1B, 0x10, +0x44, 0x25, 0xE7, 0x90, 0x45, 0x43, 0xFD, 0x10, 0x46, 0x05, 0xC9, 0x90, 0x47, 0x23, 0xDF, 0x10, +0x47, 0xEE, 0xE6, 0x10, 0x49, 0x03, 0xC1, 0x10, 0x49, 0xCE, 0xC8, 0x10, 0x4A, 0xE3, 0xA3, 0x10, +0x4B, 0xAE, 0xAA, 0x10, 0x4C, 0xCC, 0xBF, 0x90, 0x4D, 0x8E, 0x8C, 0x10, 0x4E, 0xAC, 0xA1, 0x90, +0x4F, 0x6E, 0x6E, 0x10, 0x50, 0x8C, 0x83, 0x90, 0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90, +0x53, 0x37, 0x6C, 0x90, 0x54, 0x4C, 0x47, 0x90, 0x55, 0x17, 0x4E, 0x90, 0x56, 0x2C, 0x29, 0x90, +0x56, 0xF7, 0x30, 0x90, 0x58, 0x15, 0x46, 0x10, 0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10, +0x5A, 0xB6, 0xF4, 0x90, 0x5B, 0xD5, 0x0A, 0x10, 0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10, +0x5E, 0x7F, 0xF3, 0x10, 0x5F, 0x94, 0xCE, 0x10, 0x60, 0x5F, 0xD5, 0x10, 0x61, 0x7D, 0xEA, 0x90, +0x62, 0x3F, 0xB7, 0x10, 0x63, 0x5D, 0xCC, 0x90, 0x64, 0x1F, 0x99, 0x10, 0x65, 0x3D, 0xAE, 0x90, +0x66, 0x08, 0xB5, 0x90, 0x67, 0x1D, 0x90, 0x90, 0x67, 0xE8, 0x97, 0x90, 0x68, 0xFD, 0x72, 0x90, +0x69, 0xC8, 0x79, 0x90, 0x6A, 0xDD, 0x54, 0x90, 0x6B, 0xA8, 0x5B, 0x90, 0x6C, 0xC6, 0x71, 0x10, +0x6D, 0x88, 0x3D, 0x90, 0x6E, 0xA6, 0x53, 0x10, 0x6F, 0x68, 0x1F, 0x90, 0x70, 0x86, 0x35, 0x10, +0x71, 0x51, 0x3C, 0x10, 0x72, 0x66, 0x17, 0x10, 0x73, 0x31, 0x1E, 0x10, 0x74, 0x45, 0xF9, 0x10, +0x75, 0x11, 0x00, 0x10, 0x76, 0x2F, 0x15, 0x90, 0x76, 0xF0, 0xE2, 0x10, 0x78, 0x0E, 0xF7, 0x90, +0x78, 0xD0, 0xC4, 0x10, 0x79, 0xEE, 0xD9, 0x90, 0x7A, 0xB0, 0xA6, 0x10, 0x7B, 0xCE, 0xBB, 0x90, +0x7C, 0x99, 0xC2, 0x90, 0x7D, 0xAE, 0x9D, 0x90, 0x7E, 0x79, 0xA4, 0x90, 0x7F, 0x8E, 0x7F, 0x90, +0x7F, 0xFF, 0xFF, 0xFF, 0x01, 0x04, 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, 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, 0x02, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, +0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, +0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, +0x2D, 0x30, 0x32, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, +#ifdef TIMELIB_SUPPORTS_V2DATA +0x54, 0x5A, 0x69, 0x66, 0x33, 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, 0x76, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, +0x9B, 0x80, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00, +0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, +0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, +0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, +0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, +0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, +0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, +0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, +0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, +0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, +0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, +0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, +0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, +0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, +0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, +0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, +0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, +0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, +0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, +0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, +0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, +0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, +0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, +0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, +0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, +0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, +0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, +0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, +0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, +0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, +0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, +0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, +0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, +0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, +0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, +0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, +0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, +0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, +0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, +0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, +0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, +0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, +0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, +0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, +0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, +0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, +0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, +0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, +0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, +0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, +0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, +0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, +0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, +0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, +0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, +0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, +0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, +0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, +0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x01, 0x04, 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, 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, 0x02, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, +0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, +0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x2D, 0x30, 0x32, 0x00, 0x00, 0x00, 0x01, 0x01, +0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x33, 0x3E, 0x33, 0x3C, 0x2D, 0x30, +0x32, 0x3E, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x2D, 0x32, 0x2C, 0x4D, 0x31, 0x30, +0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x2D, 0x31, 0x0A, +#endif +0x00, 0xEB, 0x43, 0xDD, 0x00, 0xC3, 0xB8, 0x2A, 0x00, 0x00, 0x00, 0x16, 0x47, 0x72, 0x65, 0x65, +0x6E, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, +0x73, 0x29, + /* America/Ojinaga */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -16828,8 +16922,8 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { /* America/Whitehorse */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x80, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x25, 0x80, 0x00, 0x00, 0x00, 0x9E, 0xB8, 0xCB, 0xB0, 0x9F, 0xBB, 0x23, 0xA0, 0xA0, 0xD0, 0x0C, 0xB0, 0xA1, 0xA2, 0xD2, 0x80, 0xCB, 0x89, 0x28, 0xB0, 0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x34, 0x20, 0xF7, 0x2F, 0x76, 0x90, 0xF8, 0x28, 0xA2, 0x10, 0xFB, 0x1D, 0x5F, 0x10, 0x13, 0x69, 0x72, 0x20, 0x14, 0x59, 0x55, 0x10, @@ -16852,34 +16946,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x51, 0x3C, 0x59, 0xA0, 0x52, 0x76, 0x10, 0x90, 0x53, 0x1C, 0x3B, 0xA0, 0x54, 0x55, 0xF2, 0x90, 0x54, 0xFC, 0x1D, 0xA0, 0x56, 0x35, 0xD4, 0x90, 0x56, 0xE5, 0x3A, 0x20, 0x58, 0x1E, 0xF1, 0x10, 0x58, 0xC5, 0x1C, 0x20, 0x59, 0xFE, 0xD3, 0x10, 0x5A, 0xA4, 0xFE, 0x20, 0x5B, 0xDE, 0xB5, 0x10, -0x5C, 0x84, 0xE0, 0x20, 0x5D, 0xBE, 0x97, 0x10, 0x5E, 0x64, 0xC2, 0x20, 0x5F, 0x9E, 0x79, 0x10, -0x60, 0x4D, 0xDE, 0xA0, 0x61, 0x87, 0x95, 0x90, 0x62, 0x2D, 0xC0, 0xA0, 0x63, 0x67, 0x77, 0x90, -0x64, 0x0D, 0xA2, 0xA0, 0x65, 0x47, 0x59, 0x90, 0x65, 0xED, 0x84, 0xA0, 0x67, 0x27, 0x3B, 0x90, -0x67, 0xCD, 0x66, 0xA0, 0x69, 0x07, 0x1D, 0x90, 0x69, 0xAD, 0x48, 0xA0, 0x6A, 0xE6, 0xFF, 0x90, -0x6B, 0x96, 0x65, 0x20, 0x6C, 0xD0, 0x1C, 0x10, 0x6D, 0x76, 0x47, 0x20, 0x6E, 0xAF, 0xFE, 0x10, -0x6F, 0x56, 0x29, 0x20, 0x70, 0x8F, 0xE0, 0x10, 0x71, 0x36, 0x0B, 0x20, 0x72, 0x6F, 0xC2, 0x10, -0x73, 0x15, 0xED, 0x20, 0x74, 0x4F, 0xA4, 0x10, 0x74, 0xFF, 0x09, 0xA0, 0x76, 0x38, 0xC0, 0x90, -0x76, 0xDE, 0xEB, 0xA0, 0x78, 0x18, 0xA2, 0x90, 0x78, 0xBE, 0xCD, 0xA0, 0x79, 0xF8, 0x84, 0x90, -0x7A, 0x9E, 0xAF, 0xA0, 0x7B, 0xD8, 0x66, 0x90, 0x7C, 0x7E, 0x91, 0xA0, 0x7D, 0xB8, 0x48, 0x90, -0x7E, 0x5E, 0x73, 0xA0, 0x7F, 0x98, 0x2A, 0x90, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, -0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x5C, 0x84, 0xE0, 0x20, 0x5D, 0xBE, 0x97, 0x10, 0x5E, 0x64, 0xC2, 0x20, 0x02, 0x01, 0x02, 0x01, +0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, 0x8F, -0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, 0xFF, -0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, 0x00, -0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, -0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, -0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x08, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, +0x8F, 0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, +0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, +0x00, 0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x21, 0x4C, 0x4D, +0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, +0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x4D, +0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, #ifdef TIMELIB_SUPPORTS_V2DATA 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0xFF, 0xFF, 0xFF, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x25, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0x86, 0x8A, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0xCB, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x23, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0xD0, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xA2, 0xD2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x28, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, @@ -16925,44 +17009,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, -0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00, -0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x61, 0x87, 0x95, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x63, 0x67, 0x77, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x65, 0x47, 0x59, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x67, 0x27, 0x3B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x69, 0x07, 0x1D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, -0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, -0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, -0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, -0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00, -0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x76, 0x38, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x78, 0x18, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x79, 0xF8, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7F, 0x98, 0x2A, 0x90, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x02, 0x01, 0x02, 0x01, +0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x04, 0xFF, -0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, 0xFF, 0xFF, 0x8F, 0x80, 0x01, -0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x19, 0xFF, 0xFF, 0x9D, -0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, -0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, -0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x01, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x53, 0x54, 0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, -0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, -#endif -0x00, 0xE5, 0xF9, 0xB2, 0x00, 0x44, 0x96, 0x97, 0x00, 0x00, 0x00, 0x17, 0x50, 0x61, 0x63, 0x69, -0x66, 0x69, 0x63, 0x20, 0x2D, 0x20, 0x59, 0x75, 0x6B, 0x6F, 0x6E, 0x20, 0x28, 0x73, 0x6F, 0x75, -0x74, 0x68, 0x29, +0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x08, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, +0x8F, 0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, +0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, +0x00, 0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x21, 0x4C, 0x4D, +0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, +0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x4D, +0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x0A, +#endif +0x00, 0xE5, 0xF9, 0xB2, 0x00, 0x44, 0x96, 0x97, 0x00, 0x00, 0x00, 0x16, 0x50, 0x61, 0x63, 0x69, +0x66, 0x69, 0x63, 0x20, 0x2D, 0x20, 0x59, 0x75, 0x6B, 0x6F, 0x6E, 0x20, 0x28, 0x65, 0x61, 0x73, +0x74, 0x29, /* America/Winnipeg */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -19570,23 +19634,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { /* Asia/Chongqing */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, -0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, 0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, -0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, 0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, -0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, 0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, -0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, 0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, -0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, 0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, -0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, 0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, -0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, +0xA0, 0x97, 0xA2, 0x80, 0xA1, 0x79, 0x04, 0xF0, 0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, +0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, 0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, +0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, 0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, +0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, 0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, +0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, 0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, +0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, 0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, +0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, 0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, -0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, -0x00, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x71, +0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, +0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, #ifdef TIMELIB_SUPPORTS_V2DATA 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, -0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, +0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x97, 0xA2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0xA1, 0x79, 0x04, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x09, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xD3, 0xBD, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x05, 0x8A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x7C, 0x40, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x3B, 0x3E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x8B, 0x7B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, @@ -19600,33 +19665,34 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x25, 0x12, 0x7C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x27, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0x5E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x28, 0x07, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0x40, 0x10, 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, 0x00, -0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, -0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, 0x43, 0x53, -0x54, 0x2D, 0x38, 0x0A, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, +0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, +0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A, #endif 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, /* Asia/Chungking */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, -0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, 0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, -0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, 0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, -0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, 0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, -0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, 0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, -0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, 0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, -0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, 0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, -0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, +0xA0, 0x97, 0xA2, 0x80, 0xA1, 0x79, 0x04, 0xF0, 0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, +0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, 0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, +0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, 0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, +0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, 0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, +0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, 0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, +0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, 0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, +0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, 0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, -0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, -0x00, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x71, +0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, +0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, #ifdef TIMELIB_SUPPORTS_V2DATA 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, -0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, +0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x97, 0xA2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0xA1, 0x79, 0x04, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x09, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xD3, 0xBD, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x05, 0x8A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x7C, 0x40, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x3B, 0x3E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x8B, 0x7B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, @@ -19640,10 +19706,10 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x25, 0x12, 0x7C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x27, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0x5E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x28, 0x07, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0x40, 0x10, 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, 0x00, -0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, -0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, 0x43, 0x53, -0x54, 0x2D, 0x38, 0x0A, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, +0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, +0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A, #endif 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, @@ -20247,23 +20313,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { /* Asia/Harbin */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, -0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, 0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, -0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, 0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, -0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, 0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, -0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, 0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, -0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, 0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, -0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, 0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, -0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, +0xA0, 0x97, 0xA2, 0x80, 0xA1, 0x79, 0x04, 0xF0, 0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, +0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, 0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, +0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, 0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, +0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, 0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, +0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, 0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, +0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, 0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, +0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, 0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, -0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, -0x00, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x71, +0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, +0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, #ifdef TIMELIB_SUPPORTS_V2DATA 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, -0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, +0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x97, 0xA2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0xA1, 0x79, 0x04, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x09, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xD3, 0xBD, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x05, 0x8A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x7C, 0x40, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x3B, 0x3E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x8B, 0x7B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, @@ -20277,10 +20344,10 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x25, 0x12, 0x7C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x27, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0x5E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x28, 0x07, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0x40, 0x10, 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, 0x00, -0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, -0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, 0x43, 0x53, -0x54, 0x2D, 0x38, 0x0A, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, +0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, +0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A, #endif 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, @@ -22727,23 +22794,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { /* Asia/Shanghai */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, -0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, 0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, -0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, 0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, -0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, 0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, -0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, 0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, -0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, 0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, -0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, 0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, -0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, +0xA0, 0x97, 0xA2, 0x80, 0xA1, 0x79, 0x04, 0xF0, 0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, +0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, 0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, +0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, 0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, +0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, 0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, +0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, 0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, +0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, 0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, +0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, 0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, -0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, -0x00, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x71, +0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, +0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, #ifdef TIMELIB_SUPPORTS_V2DATA 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, -0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, +0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x97, 0xA2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0xA1, 0x79, 0x04, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x09, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xD3, 0xBD, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x05, 0x8A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x7C, 0x40, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x3B, 0x3E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x8B, 0x7B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, @@ -22757,10 +22825,10 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x25, 0x12, 0x7C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x27, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0x5E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x28, 0x07, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0x40, 0x10, 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, 0x00, -0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, -0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, 0x43, 0x53, -0x54, 0x2D, 0x38, 0x0A, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, +0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, +0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A, #endif 0x00, 0xB8, 0xFC, 0xC5, 0x01, 0xCC, 0x00, 0x6A, 0x00, 0x00, 0x00, 0x0C, 0x42, 0x65, 0x69, 0x6A, 0x69, 0x6E, 0x67, 0x20, 0x54, 0x69, 0x6D, 0x65, @@ -29352,8 +29420,8 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { /* Canada/Yukon */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x80, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x25, 0x80, 0x00, 0x00, 0x00, 0x9E, 0xB8, 0xCB, 0xB0, 0x9F, 0xBB, 0x23, 0xA0, 0xA0, 0xD0, 0x0C, 0xB0, 0xA1, 0xA2, 0xD2, 0x80, 0xCB, 0x89, 0x28, 0xB0, 0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x34, 0x20, 0xF7, 0x2F, 0x76, 0x90, 0xF8, 0x28, 0xA2, 0x10, 0xFB, 0x1D, 0x5F, 0x10, 0x13, 0x69, 0x72, 0x20, 0x14, 0x59, 0x55, 0x10, @@ -29376,34 +29444,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x51, 0x3C, 0x59, 0xA0, 0x52, 0x76, 0x10, 0x90, 0x53, 0x1C, 0x3B, 0xA0, 0x54, 0x55, 0xF2, 0x90, 0x54, 0xFC, 0x1D, 0xA0, 0x56, 0x35, 0xD4, 0x90, 0x56, 0xE5, 0x3A, 0x20, 0x58, 0x1E, 0xF1, 0x10, 0x58, 0xC5, 0x1C, 0x20, 0x59, 0xFE, 0xD3, 0x10, 0x5A, 0xA4, 0xFE, 0x20, 0x5B, 0xDE, 0xB5, 0x10, -0x5C, 0x84, 0xE0, 0x20, 0x5D, 0xBE, 0x97, 0x10, 0x5E, 0x64, 0xC2, 0x20, 0x5F, 0x9E, 0x79, 0x10, -0x60, 0x4D, 0xDE, 0xA0, 0x61, 0x87, 0x95, 0x90, 0x62, 0x2D, 0xC0, 0xA0, 0x63, 0x67, 0x77, 0x90, -0x64, 0x0D, 0xA2, 0xA0, 0x65, 0x47, 0x59, 0x90, 0x65, 0xED, 0x84, 0xA0, 0x67, 0x27, 0x3B, 0x90, -0x67, 0xCD, 0x66, 0xA0, 0x69, 0x07, 0x1D, 0x90, 0x69, 0xAD, 0x48, 0xA0, 0x6A, 0xE6, 0xFF, 0x90, -0x6B, 0x96, 0x65, 0x20, 0x6C, 0xD0, 0x1C, 0x10, 0x6D, 0x76, 0x47, 0x20, 0x6E, 0xAF, 0xFE, 0x10, -0x6F, 0x56, 0x29, 0x20, 0x70, 0x8F, 0xE0, 0x10, 0x71, 0x36, 0x0B, 0x20, 0x72, 0x6F, 0xC2, 0x10, -0x73, 0x15, 0xED, 0x20, 0x74, 0x4F, 0xA4, 0x10, 0x74, 0xFF, 0x09, 0xA0, 0x76, 0x38, 0xC0, 0x90, -0x76, 0xDE, 0xEB, 0xA0, 0x78, 0x18, 0xA2, 0x90, 0x78, 0xBE, 0xCD, 0xA0, 0x79, 0xF8, 0x84, 0x90, -0x7A, 0x9E, 0xAF, 0xA0, 0x7B, 0xD8, 0x66, 0x90, 0x7C, 0x7E, 0x91, 0xA0, 0x7D, 0xB8, 0x48, 0x90, -0x7E, 0x5E, 0x73, 0xA0, 0x7F, 0x98, 0x2A, 0x90, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, -0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x5C, 0x84, 0xE0, 0x20, 0x5D, 0xBE, 0x97, 0x10, 0x5E, 0x64, 0xC2, 0x20, 0x02, 0x01, 0x02, 0x01, +0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, 0x8F, -0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, 0xFF, -0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, 0x00, -0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, -0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, -0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x08, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, +0x8F, 0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, +0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, +0x00, 0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x21, 0x4C, 0x4D, +0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, +0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x4D, +0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, #ifdef TIMELIB_SUPPORTS_V2DATA 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0xFF, 0xFF, 0xFF, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x25, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0x86, 0x8A, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0xCB, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x23, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0xD0, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xA2, 0xD2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x28, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, @@ -29449,40 +29507,20 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, -0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00, -0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x61, 0x87, 0x95, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x63, 0x67, 0x77, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x65, 0x47, 0x59, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x67, 0x27, 0x3B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x69, 0x07, 0x1D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, -0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, -0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, -0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, -0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00, -0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x76, 0x38, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x78, 0x18, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x79, 0xF8, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7F, 0x98, 0x2A, 0x90, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x02, 0x01, 0x02, 0x01, +0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x04, 0xFF, -0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, 0xFF, 0xFF, 0x8F, 0x80, 0x01, -0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x19, 0xFF, 0xFF, 0x9D, -0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, -0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, -0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x01, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x53, 0x54, 0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, -0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, +0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x08, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, +0x8F, 0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, +0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, +0x00, 0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x21, 0x4C, 0x4D, +0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, +0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x4D, +0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x0A, #endif 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, @@ -38361,8 +38399,8 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x4B, 0x2D, 0x33, 0x0A, #endif -0x00, 0xCD, 0xEA, 0xD7, 0x01, 0x46, 0xB0, 0xD0, 0x00, 0x00, 0x00, 0x0F, 0x4D, 0x53, 0x4B, 0x2B, -0x30, 0x30, 0x20, 0x2D, 0x20, 0x43, 0x72, 0x69, 0x6D, 0x65, 0x61, +0x00, 0xCD, 0xEA, 0xD7, 0x01, 0x46, 0xB0, 0xD0, 0x00, 0x00, 0x00, 0x06, 0x43, 0x72, 0x69, 0x6D, +0x65, 0x61, /* Europe/Skopje */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -39402,8 +39440,8 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A, #endif -0x00, 0xD3, 0x83, 0x22, 0x01, 0x34, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x08, 0x52, 0x75, 0x74, 0x68, -0x65, 0x6E, 0x69, 0x61, +0x00, 0xD3, 0x83, 0x22, 0x01, 0x34, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x0E, 0x54, 0x72, 0x61, 0x6E, +0x73, 0x63, 0x61, 0x72, 0x70, 0x61, 0x74, 0x68, 0x69, 0x61, /* Europe/Vaduz */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4C, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -40498,10 +40536,9 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A, #endif -0x00, 0xD2, 0x51, 0x25, 0x01, 0x48, 0x51, 0x7A, 0x00, 0x00, 0x00, 0x2E, 0x5A, 0x61, 0x70, 0x6F, -0x72, 0x6F, 0x7A, 0x68, 0x27, 0x79, 0x65, 0x2F, 0x5A, 0x61, 0x70, 0x6F, 0x72, 0x69, 0x7A, 0x68, -0x69, 0x61, 0x3B, 0x20, 0x4C, 0x75, 0x67, 0x61, 0x6E, 0x73, 0x6B, 0x2F, 0x4C, 0x75, 0x68, 0x61, -0x6E, 0x73, 0x6B, 0x20, 0x28, 0x65, 0x61, 0x73, 0x74, 0x29, +0x00, 0xD2, 0x51, 0x25, 0x01, 0x48, 0x51, 0x7A, 0x00, 0x00, 0x00, 0x1B, 0x5A, 0x61, 0x70, 0x6F, +0x72, 0x6F, 0x7A, 0x68, 0x79, 0x65, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x65, 0x61, 0x73, 0x74, 0x20, +0x4C, 0x75, 0x67, 0x61, 0x6E, 0x73, 0x6B, /* Europe/Zurich */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -45004,23 +45041,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { /* PRC */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, -0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, 0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, -0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, 0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, -0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, 0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, -0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, 0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, -0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, 0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, -0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, 0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, -0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, +0xA0, 0x97, 0xA2, 0x80, 0xA1, 0x79, 0x04, 0xF0, 0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, +0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, 0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, +0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, 0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, +0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, 0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, +0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, 0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, +0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, 0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, +0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, 0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, -0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, -0x00, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x71, +0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, +0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, #ifdef TIMELIB_SUPPORTS_V2DATA 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, -0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, +0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x97, 0xA2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0xA1, 0x79, 0x04, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x09, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xD3, 0xBD, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x05, 0x8A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x7C, 0x40, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x3B, 0x3E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x8B, 0x7B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, @@ -45034,10 +45072,10 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x25, 0x12, 0x7C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x27, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0x5E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x28, 0x07, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0x40, 0x10, 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, 0x00, -0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, -0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, 0x43, 0x53, -0x54, 0x2D, 0x38, 0x0A, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, +0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, +0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A, #endif 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, @@ -47495,4 +47533,4 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { #endif 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,}; -const timelib_tzdb timezonedb_builtin = { "2019.3", 594, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; +const timelib_tzdb timezonedb_builtin = { "2020.1", 595, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; From 36764185688675b52fc96c14359f466538cda129 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Fri, 24 Apr 2020 12:31:32 +0100 Subject: [PATCH 253/338] Updated to version 2020.1 (2020a) --- ext/date/lib/timezonedb.h | 1622 +++++++++++++++++++------------------ 1 file changed, 830 insertions(+), 792 deletions(-) diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h index f00bfd47dfb11..aa1656ab3a357 100644 --- a/ext/date/lib/timezonedb.h +++ b/ext/date/lib/timezonedb.h @@ -1,5 +1,5 @@ /* This is a generated file, do not modify */ -const timelib_tzdb_index_entry timezonedb_idx_builtin[594] = { +const timelib_tzdb_index_entry timezonedb_idx_builtin[595] = { #ifdef TIMELIB_SUPPORTS_V2DATA # define FOR_V2(v2,v1) v2 #else @@ -108,502 +108,503 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[594] = { { "America/Curacao" , FOR_V2(0x011892, 0x006EAE) }, { "America/Danmarkshavn" , FOR_V2(0x011958, 0x006F10) }, { "America/Dawson" , FOR_V2(0x011C38, 0x00704C) }, - { "America/Dawson_Creek" , FOR_V2(0x01247F, 0x007377) }, - { "America/Denver" , FOR_V2(0x0128C5, 0x007539) }, - { "America/Detroit" , FOR_V2(0x013272, 0x0078D8) }, - { "America/Dominica" , FOR_V2(0x013B4D, 0x007C32) }, - { "America/Edmonton" , FOR_V2(0x013BED, 0x007C83) }, - { "America/Eirunepe" , FOR_V2(0x014532, 0x008002) }, - { "America/El_Salvador" , FOR_V2(0x0147DD, 0x00811D) }, - { "America/Ensenada" , FOR_V2(0x0148C9, 0x00818C) }, - { "America/Fort_Nelson" , FOR_V2(0x0151FB, 0x0084F5) }, - { "America/Fort_Wayne" , FOR_V2(0x015ADB, 0x008854) }, - { "America/Fortaleza" , FOR_V2(0x016169, 0x008ACF) }, - { "America/Glace_Bay" , FOR_V2(0x016467, 0x008C13) }, - { "America/Godthab" , FOR_V2(0x016D1E, 0x008F5E) }, - { "America/Goose_Bay" , FOR_V2(0x017496, 0x00922E) }, - { "America/Grand_Turk" , FOR_V2(0x01814C, 0x0096FB) }, - { "America/Grenada" , FOR_V2(0x018890, 0x0099AF) }, - { "America/Guadeloupe" , FOR_V2(0x018930, 0x009A00) }, - { "America/Guatemala" , FOR_V2(0x0189D0, 0x009A51) }, - { "America/Guayaquil" , FOR_V2(0x018AF4, 0x009AD4) }, - { "America/Guyana" , FOR_V2(0x018C08, 0x009B5F) }, - { "America/Halifax" , FOR_V2(0x018D00, 0x009BD5) }, - { "America/Havana" , FOR_V2(0x019A8A, 0x00A0DB) }, - { "America/Hermosillo" , FOR_V2(0x01A406, 0x00A459) }, - { "America/Indiana/Indianapolis" , FOR_V2(0x01A5D1, 0x00A533) }, - { "America/Indiana/Knox" , FOR_V2(0x01AC78, 0x00A7C7) }, - { "America/Indiana/Marengo" , FOR_V2(0x01B615, 0x00AB66) }, - { "America/Indiana/Petersburg" , FOR_V2(0x01BCF2, 0x00AE0C) }, - { "America/Indiana/Tell_City" , FOR_V2(0x01C481, 0x00B0EF) }, - { "America/Indiana/Vevay" , FOR_V2(0x01CB35, 0x00B389) }, - { "America/Indiana/Vincennes" , FOR_V2(0x01D0E1, 0x00B5C4) }, - { "America/Indiana/Winamac" , FOR_V2(0x01D7A7, 0x00B865) }, - { "America/Indianapolis" , FOR_V2(0x01DEBB, 0x00BB1E) }, - { "America/Inuvik" , FOR_V2(0x01E549, 0x00BD99) }, - { "America/Iqaluit" , FOR_V2(0x01ECCF, 0x00C070) }, - { "America/Jamaica" , FOR_V2(0x01F4E9, 0x00C394) }, - { "America/Jujuy" , FOR_V2(0x01F6D7, 0x00C462) }, - { "America/Juneau" , FOR_V2(0x01FAFB, 0x00C5FE) }, - { "America/Kentucky/Louisville" , FOR_V2(0x02044C, 0x00C983) }, - { "America/Kentucky/Monticello" , FOR_V2(0x020F4A, 0x00CDA7) }, - { "America/Knox_IN" , FOR_V2(0x02189A, 0x00D12B) }, - { "America/Kralendijk" , FOR_V2(0x022222, 0x00D4B5) }, - { "America/La_Paz" , FOR_V2(0x0222E8, 0x00D517) }, - { "America/Lima" , FOR_V2(0x0223DC, 0x00D58B) }, - { "America/Los_Angeles" , FOR_V2(0x02257E, 0x00D63C) }, - { "America/Louisville" , FOR_V2(0x0230A5, 0x00DA59) }, - { "America/Lower_Princes" , FOR_V2(0x023B85, 0x00DE5F) }, - { "America/Maceio" , FOR_V2(0x023C4B, 0x00DEC1) }, - { "America/Managua" , FOR_V2(0x023F4F, 0x00DFF9) }, - { "America/Manaus" , FOR_V2(0x024109, 0x00E0B9) }, - { "America/Marigot" , FOR_V2(0x024380, 0x00E1BE) }, - { "America/Martinique" , FOR_V2(0x024420, 0x00E20F) }, - { "America/Matamoros" , FOR_V2(0x024514, 0x00E284) }, - { "America/Mazatlan" , FOR_V2(0x024ACC, 0x00E4CB) }, - { "America/Mendoza" , FOR_V2(0x025103, 0x00E741) }, - { "America/Menominee" , FOR_V2(0x025543, 0x00E8E7) }, - { "America/Merida" , FOR_V2(0x025E50, 0x00EC59) }, - { "America/Metlakatla" , FOR_V2(0x02640A, 0x00EE92) }, - { "America/Mexico_City" , FOR_V2(0x0269BC, 0x00F0C7) }, - { "America/Miquelon" , FOR_V2(0x027004, 0x00F327) }, - { "America/Moncton" , FOR_V2(0x027692, 0x00F594) }, - { "America/Monterrey" , FOR_V2(0x028308, 0x00FA37) }, - { "America/Montevideo" , FOR_V2(0x0288C7, 0x00FC85) }, - { "America/Montreal" , FOR_V2(0x028EB9, 0x00FED2) }, - { "America/Montserrat" , FOR_V2(0x029C6B, 0x0103D3) }, - { "America/Nassau" , FOR_V2(0x029D0B, 0x010424) }, - { "America/New_York" , FOR_V2(0x02A5E9, 0x010763) }, - { "America/Nipigon" , FOR_V2(0x02B3D9, 0x010C87) }, - { "America/Nome" , FOR_V2(0x02BC50, 0x010FBF) }, - { "America/Noronha" , FOR_V2(0x02C5A8, 0x011342) }, - { "America/North_Dakota/Beulah" , FOR_V2(0x02C890, 0x011470) }, - { "America/North_Dakota/Center" , FOR_V2(0x02D1FD, 0x0117FF) }, - { "America/North_Dakota/New_Salem" , FOR_V2(0x02DB6A, 0x011B8E) }, - { "America/Ojinaga" , FOR_V2(0x02E4DD, 0x011F23) }, - { "America/Panama" , FOR_V2(0x02EADD, 0x01217D) }, - { "America/Pangnirtung" , FOR_V2(0x02EB9F, 0x0121DD) }, - { "America/Paramaribo" , FOR_V2(0x02F3F3, 0x01251A) }, - { "America/Phoenix" , FOR_V2(0x02F505, 0x01259B) }, - { "America/Port-au-Prince" , FOR_V2(0x02F676, 0x01264F) }, - { "America/Port_of_Spain" , FOR_V2(0x02FC1C, 0x012870) }, - { "America/Porto_Acre" , FOR_V2(0x02FCBC, 0x0128C1) }, - { "America/Porto_Velho" , FOR_V2(0x02FF3C, 0x0129C3) }, - { "America/Puerto_Rico" , FOR_V2(0x030190, 0x012AB7) }, - { "America/Punta_Arenas" , FOR_V2(0x030292, 0x012B33) }, - { "America/Rainy_River" , FOR_V2(0x030A20, 0x012E1C) }, - { "America/Rankin_Inlet" , FOR_V2(0x031298, 0x013155) }, - { "America/Recife" , FOR_V2(0x031A1E, 0x01342F) }, - { "America/Regina" , FOR_V2(0x031D00, 0x013557) }, - { "America/Resolute" , FOR_V2(0x0320F5, 0x0136F5) }, - { "America/Rio_Branco" , FOR_V2(0x03287C, 0x0139D0) }, - { "America/Rosario" , FOR_V2(0x032B00, 0x013AD6) }, - { "America/Santa_Isabel" , FOR_V2(0x032F40, 0x013C7C) }, - { "America/Santarem" , FOR_V2(0x033872, 0x013FE5) }, - { "America/Santiago" , FOR_V2(0x033AE3, 0x0140E7) }, - { "America/Santo_Domingo" , FOR_V2(0x0344E2, 0x0144A5) }, - { "America/Sao_Paulo" , FOR_V2(0x0346B8, 0x014571) }, - { "America/Scoresbysund" , FOR_V2(0x034C9E, 0x0147C9) }, - { "America/Shiprock" , FOR_V2(0x035443, 0x014AB4) }, - { "America/Sitka" , FOR_V2(0x035DDB, 0x014E3E) }, - { "America/St_Barthelemy" , FOR_V2(0x036713, 0x0151B6) }, - { "America/St_Johns" , FOR_V2(0x0367B3, 0x015207) }, - { "America/St_Kitts" , FOR_V2(0x037628, 0x01576D) }, - { "America/St_Lucia" , FOR_V2(0x0376C8, 0x0157BE) }, - { "America/St_Thomas" , FOR_V2(0x037768, 0x01580F) }, - { "America/St_Vincent" , FOR_V2(0x037808, 0x015860) }, - { "America/Swift_Current" , FOR_V2(0x0378A8, 0x0158B1) }, - { "America/Tegucigalpa" , FOR_V2(0x037AF6, 0x0159B6) }, - { "America/Thule" , FOR_V2(0x037BFE, 0x015A2F) }, - { "America/Thunder_Bay" , FOR_V2(0x0381F6, 0x015C6E) }, - { "America/Tijuana" , FOR_V2(0x038AB6, 0x015FBF) }, - { "America/Toronto" , FOR_V2(0x039409, 0x016349) }, - { "America/Tortola" , FOR_V2(0x03A1D8, 0x016867) }, - { "America/Vancouver" , FOR_V2(0x03A278, 0x0168B8) }, - { "America/Virgin" , FOR_V2(0x03ADE9, 0x016CFB) }, - { "America/Whitehorse" , FOR_V2(0x03AE89, 0x016D4C) }, - { "America/Winnipeg" , FOR_V2(0x03B6D0, 0x017077) }, - { "America/Yakutat" , FOR_V2(0x03C22D, 0x0174BA) }, - { "America/Yellowknife" , FOR_V2(0x03CB4A, 0x017823) }, - { "Antarctica/Casey" , FOR_V2(0x03D31B, 0x017B1D) }, - { "Antarctica/Davis" , FOR_V2(0x03D455, 0x017BAE) }, - { "Antarctica/DumontDUrville" , FOR_V2(0x03D58F, 0x017C3F) }, - { "Antarctica/Macquarie" , FOR_V2(0x03D66D, 0x017CAF) }, - { "Antarctica/Mawson" , FOR_V2(0x03DC79, 0x017F06) }, - { "Antarctica/McMurdo" , FOR_V2(0x03DD52, 0x017F71) }, - { "Antarctica/Palmer" , FOR_V2(0x03E709, 0x01831F) }, - { "Antarctica/Rothera" , FOR_V2(0x03ECA5, 0x01854C) }, - { "Antarctica/South_Pole" , FOR_V2(0x03ED5C, 0x0185A9) }, - { "Antarctica/Syowa" , FOR_V2(0x03F6ED, 0x018931) }, - { "Antarctica/Troll" , FOR_V2(0x03F7A3, 0x01898C) }, - { "Antarctica/Vostok" , FOR_V2(0x03FC3E, 0x018B49) }, - { "Arctic/Longyearbyen" , FOR_V2(0x03FCF5, 0x018BA5) }, - { "Asia/Aden" , FOR_V2(0x0405B5, 0x018EE3) }, - { "Asia/Almaty" , FOR_V2(0x040666, 0x018F39) }, - { "Asia/Amman" , FOR_V2(0x040A6E, 0x0190E2) }, - { "Asia/Anadyr" , FOR_V2(0x0411B7, 0x019393) }, - { "Asia/Aqtau" , FOR_V2(0x04167A, 0x01957D) }, - { "Asia/Aqtobe" , FOR_V2(0x041A72, 0x01971F) }, - { "Asia/Ashgabat" , FOR_V2(0x041E7E, 0x0198C5) }, - { "Asia/Ashkhabad" , FOR_V2(0x0420F5, 0x0199CE) }, - { "Asia/Atyrau" , FOR_V2(0x04236C, 0x019AD7) }, - { "Asia/Baghdad" , FOR_V2(0x04276C, 0x019C7D) }, - { "Asia/Bahrain" , FOR_V2(0x042B4F, 0x019E02) }, - { "Asia/Baku" , FOR_V2(0x042C22, 0x019E67) }, - { "Asia/Bangkok" , FOR_V2(0x0430F9, 0x01A04E) }, - { "Asia/Barnaul" , FOR_V2(0x0431CC, 0x01A0B3) }, - { "Asia/Beirut" , FOR_V2(0x0436AB, 0x01A2A3) }, - { "Asia/Bishkek" , FOR_V2(0x043F21, 0x01A5BB) }, - { "Asia/Brunei" , FOR_V2(0x044304, 0x01A744) }, - { "Asia/Calcutta" , FOR_V2(0x0443DB, 0x01A7AB) }, - { "Asia/Chita" , FOR_V2(0x044504, 0x01A82B) }, - { "Asia/Choibalsan" , FOR_V2(0x0449E9, 0x01AA23) }, - { "Asia/Chongqing" , FOR_V2(0x044DBC, 0x01ABAF) }, - { "Asia/Chungking" , FOR_V2(0x044FDD, 0x01AC8C) }, - { "Asia/Colombo" , FOR_V2(0x0451FE, 0x01AD69) }, - { "Asia/Dacca" , FOR_V2(0x04537E, 0x01AE16) }, - { "Asia/Damascus" , FOR_V2(0x0454DB, 0x01AEB6) }, - { "Asia/Dhaka" , FOR_V2(0x045DDD, 0x01B200) }, - { "Asia/Dili" , FOR_V2(0x045F3A, 0x01B2A0) }, - { "Asia/Dubai" , FOR_V2(0x046029, 0x01B30F) }, - { "Asia/Dushanbe" , FOR_V2(0x0460DA, 0x01B365) }, - { "Asia/Famagusta" , FOR_V2(0x046335, 0x01B462) }, - { "Asia/Gaza" , FOR_V2(0x046B3C, 0x01B768) }, - { "Asia/Harbin" , FOR_V2(0x04745E, 0x01BACD) }, - { "Asia/Hebron" , FOR_V2(0x04767F, 0x01BBAA) }, - { "Asia/Ho_Chi_Minh" , FOR_V2(0x047FBC, 0x01BF18) }, - { "Asia/Hong_Kong" , FOR_V2(0x048127, 0x01BFBB) }, - { "Asia/Hovd" , FOR_V2(0x0485E6, 0x01C193) }, - { "Asia/Irkutsk" , FOR_V2(0x048998, 0x01C31D) }, - { "Asia/Istanbul" , FOR_V2(0x048E99, 0x01C526) }, - { "Asia/Jakarta" , FOR_V2(0x049640, 0x01C813) }, - { "Asia/Jayapura" , FOR_V2(0x0497BC, 0x01C8CA) }, - { "Asia/Jerusalem" , FOR_V2(0x0498DB, 0x01C971) }, - { "Asia/Kabul" , FOR_V2(0x04A1D7, 0x01CCC1) }, - { "Asia/Kamchatka" , FOR_V2(0x04A2B3, 0x01CD28) }, - { "Asia/Karachi" , FOR_V2(0x04A75F, 0x01CF06) }, - { "Asia/Kashgar" , FOR_V2(0x04A8E6, 0x01CFB6) }, - { "Asia/Kathmandu" , FOR_V2(0x04A997, 0x01D00C) }, - { "Asia/Katmandu" , FOR_V2(0x04AA77, 0x01D075) }, - { "Asia/Khandyga" , FOR_V2(0x04AB57, 0x01D0DE) }, - { "Asia/Kolkata" , FOR_V2(0x04B078, 0x01D2F7) }, - { "Asia/Krasnoyarsk" , FOR_V2(0x04B1A1, 0x01D377) }, - { "Asia/Kuala_Lumpur" , FOR_V2(0x04B67D, 0x01D56F) }, - { "Asia/Kuching" , FOR_V2(0x04B81C, 0x01D638) }, - { "Asia/Kuwait" , FOR_V2(0x04BA19, 0x01D719) }, - { "Asia/Macao" , FOR_V2(0x04BACA, 0x01D76F) }, - { "Asia/Macau" , FOR_V2(0x04BFA1, 0x01D94F) }, - { "Asia/Magadan" , FOR_V2(0x04C478, 0x01DB2F) }, - { "Asia/Makassar" , FOR_V2(0x04C95A, 0x01DD23) }, - { "Asia/Manila" , FOR_V2(0x04CAAD, 0x01DDEB) }, - { "Asia/Muscat" , FOR_V2(0x04CC01, 0x01DE7E) }, - { "Asia/Nicosia" , FOR_V2(0x04CCB2, 0x01DED4) }, - { "Asia/Novokuznetsk" , FOR_V2(0x04D4A3, 0x01E1CF) }, - { "Asia/Novosibirsk" , FOR_V2(0x04D94D, 0x01E3AC) }, - { "Asia/Omsk" , FOR_V2(0x04DE32, 0x01E5A2) }, - { "Asia/Oral" , FOR_V2(0x04E302, 0x01E78E) }, - { "Asia/Phnom_Penh" , FOR_V2(0x04E70A, 0x01E933) }, - { "Asia/Pontianak" , FOR_V2(0x04E7DD, 0x01E998) }, - { "Asia/Pyongyang" , FOR_V2(0x04E960, 0x01EA57) }, - { "Asia/Qatar" , FOR_V2(0x04EA59, 0x01EACC) }, - { "Asia/Qostanay" , FOR_V2(0x04EB2C, 0x01EB31) }, - { "Asia/Qyzylorda" , FOR_V2(0x04EF45, 0x01ECE4) }, - { "Asia/Rangoon" , FOR_V2(0x04F36F, 0x01EE9F) }, - { "Asia/Riyadh" , FOR_V2(0x04F487, 0x01EF20) }, - { "Asia/Saigon" , FOR_V2(0x04F538, 0x01EF76) }, - { "Asia/Sakhalin" , FOR_V2(0x04F6A3, 0x01F019) }, - { "Asia/Samarkand" , FOR_V2(0x04FB79, 0x01F20B) }, - { "Asia/Seoul" , FOR_V2(0x04FDD7, 0x01F312) }, - { "Asia/Shanghai" , FOR_V2(0x05004C, 0x01F415) }, - { "Asia/Singapore" , FOR_V2(0x050279, 0x01F4FE) }, - { "Asia/Srednekolymsk" , FOR_V2(0x050404, 0x01F5B3) }, - { "Asia/Taipei" , FOR_V2(0x0508EA, 0x01F7B4) }, - { "Asia/Tashkent" , FOR_V2(0x050BEF, 0x01F8E7) }, - { "Asia/Tbilisi" , FOR_V2(0x050E5B, 0x01F9F5) }, - { "Asia/Tehran" , FOR_V2(0x051272, 0x01FB98) }, - { "Asia/Tel_Aviv" , FOR_V2(0x051C94, 0x01FE0A) }, - { "Asia/Thimbu" , FOR_V2(0x052590, 0x02015A) }, - { "Asia/Thimphu" , FOR_V2(0x052667, 0x0201C1) }, - { "Asia/Tokyo" , FOR_V2(0x05273E, 0x020228) }, - { "Asia/Tomsk" , FOR_V2(0x05287F, 0x0202B9) }, - { "Asia/Ujung_Pandang" , FOR_V2(0x052D5E, 0x0204A9) }, - { "Asia/Ulaanbaatar" , FOR_V2(0x052E68, 0x020528) }, - { "Asia/Ulan_Bator" , FOR_V2(0x053204, 0x02069C) }, - { "Asia/Urumqi" , FOR_V2(0x05358B, 0x0207FB) }, - { "Asia/Ust-Nera" , FOR_V2(0x053649, 0x02085E) }, - { "Asia/Vientiane" , FOR_V2(0x053B4D, 0x020A65) }, - { "Asia/Vladivostok" , FOR_V2(0x053C20, 0x020ACA) }, - { "Asia/Yakutsk" , FOR_V2(0x0540F7, 0x020CBC) }, - { "Asia/Yangon" , FOR_V2(0x0545CD, 0x020EAE) }, - { "Asia/Yekaterinburg" , FOR_V2(0x0546E5, 0x020F2F) }, - { "Asia/Yerevan" , FOR_V2(0x054BDA, 0x02112C) }, - { "Atlantic/Azores" , FOR_V2(0x055065, 0x0212F5) }, - { "Atlantic/Bermuda" , FOR_V2(0x055E13, 0x021809) }, - { "Atlantic/Canary" , FOR_V2(0x0565D9, 0x021AE4) }, - { "Atlantic/Cape_Verde" , FOR_V2(0x056D5C, 0x021DB9) }, - { "Atlantic/Faeroe" , FOR_V2(0x056E76, 0x021E3E) }, - { "Atlantic/Faroe" , FOR_V2(0x057599, 0x0220E2) }, - { "Atlantic/Jan_Mayen" , FOR_V2(0x057CBC, 0x022386) }, - { "Atlantic/Madeira" , FOR_V2(0x05857C, 0x0226C4) }, - { "Atlantic/Reykjavik" , FOR_V2(0x05932A, 0x022BE1) }, - { "Atlantic/South_Georgia" , FOR_V2(0x0597C0, 0x022DA7) }, - { "Atlantic/St_Helena" , FOR_V2(0x059870, 0x022DFD) }, - { "Atlantic/Stanley" , FOR_V2(0x059910, 0x022E4E) }, - { "Australia/ACT" , FOR_V2(0x059DDA, 0x023027) }, - { "Australia/Adelaide" , FOR_V2(0x05A682, 0x023356) }, - { "Australia/Brisbane" , FOR_V2(0x05AF4B, 0x023694) }, - { "Australia/Broken_Hill" , FOR_V2(0x05B11F, 0x023769) }, - { "Australia/Canberra" , FOR_V2(0x05BA0A, 0x023AB4) }, - { "Australia/Currie" , FOR_V2(0x05C2B2, 0x023DE3) }, - { "Australia/Darwin" , FOR_V2(0x05CB70, 0x024128) }, - { "Australia/Eucla" , FOR_V2(0x05CCBE, 0x0241BF) }, - { "Australia/Hobart" , FOR_V2(0x05CEC7, 0x0242A7) }, - { "Australia/LHI" , FOR_V2(0x05D7F4, 0x024613) }, - { "Australia/Lindeman" , FOR_V2(0x05DF44, 0x0248C6) }, - { "Australia/Lord_Howe" , FOR_V2(0x05E158, 0x0249B7) }, - { "Australia/Melbourne" , FOR_V2(0x05E8B8, 0x024C7A) }, - { "Australia/North" , FOR_V2(0x05F168, 0x024FB1) }, - { "Australia/NSW" , FOR_V2(0x05F2A4, 0x025036) }, - { "Australia/Perth" , FOR_V2(0x05FB4C, 0x025365) }, - { "Australia/Queensland" , FOR_V2(0x05FD42, 0x02544B) }, - { "Australia/South" , FOR_V2(0x05FEFF, 0x025509) }, - { "Australia/Sydney" , FOR_V2(0x0607B9, 0x025838) }, - { "Australia/Tasmania" , FOR_V2(0x06107D, 0x025B83) }, - { "Australia/Victoria" , FOR_V2(0x061995, 0x025EDA) }, - { "Australia/West" , FOR_V2(0x06223D, 0x026209) }, - { "Australia/Yancowinna" , FOR_V2(0x062415, 0x0262D1) }, - { "Brazil/Acre" , FOR_V2(0x062CE4, 0x026600) }, - { "Brazil/DeNoronha" , FOR_V2(0x062F64, 0x026702) }, - { "Brazil/East" , FOR_V2(0x06323C, 0x026820) }, - { "Brazil/West" , FOR_V2(0x0637EC, 0x026A42) }, - { "Canada/Atlantic" , FOR_V2(0x063A54, 0x026B38) }, - { "Canada/Central" , FOR_V2(0x0647C0, 0x027020) }, - { "Canada/Eastern" , FOR_V2(0x065300, 0x027446) }, - { "Canada/Mountain" , FOR_V2(0x0660B2, 0x027947) }, - { "Canada/Newfoundland" , FOR_V2(0x0669DA, 0x027CA9) }, - { "Canada/Pacific" , FOR_V2(0x06782D, 0x0281ED) }, - { "Canada/Saskatchewan" , FOR_V2(0x068385, 0x028617) }, - { "Canada/Yukon" , FOR_V2(0x068765, 0x0287A0) }, - { "CET" , FOR_V2(0x068F95, 0x028AB4) }, - { "Chile/Continental" , FOR_V2(0x0697CF, 0x028DB9) }, - { "Chile/EasterIsland" , FOR_V2(0x06A1BC, 0x029165) }, - { "CST6CDT" , FOR_V2(0x06AA81, 0x0294A5) }, - { "Cuba" , FOR_V2(0x06B393, 0x0297FE) }, - { "EET" , FOR_V2(0x06BD0F, 0x029B7C) }, - { "Egypt" , FOR_V2(0x06C48F, 0x029E3F) }, - { "Eire" , FOR_V2(0x06CC3E, 0x02A11B) }, - { "EST" , FOR_V2(0x06D9EE, 0x02A623) }, - { "EST5EDT" , FOR_V2(0x06DA6C, 0x02A665) }, - { "Etc/GMT" , FOR_V2(0x06E37E, 0x02A9BE) }, - { "Etc/GMT+0" , FOR_V2(0x06E3FC, 0x02AA00) }, - { "Etc/GMT+1" , FOR_V2(0x06E47A, 0x02AA42) }, - { "Etc/GMT+10" , FOR_V2(0x06E4FA, 0x02AA84) }, - { "Etc/GMT+11" , FOR_V2(0x06E57B, 0x02AAC6) }, - { "Etc/GMT+12" , FOR_V2(0x06E5FC, 0x02AB08) }, - { "Etc/GMT+2" , FOR_V2(0x06E67D, 0x02AB4A) }, - { "Etc/GMT+3" , FOR_V2(0x06E6FD, 0x02AB8C) }, - { "Etc/GMT+4" , FOR_V2(0x06E77D, 0x02ABCE) }, - { "Etc/GMT+5" , FOR_V2(0x06E7FD, 0x02AC10) }, - { "Etc/GMT+6" , FOR_V2(0x06E87D, 0x02AC52) }, - { "Etc/GMT+7" , FOR_V2(0x06E8FD, 0x02AC94) }, - { "Etc/GMT+8" , FOR_V2(0x06E97D, 0x02ACD6) }, - { "Etc/GMT+9" , FOR_V2(0x06E9FD, 0x02AD18) }, - { "Etc/GMT-0" , FOR_V2(0x06EA7D, 0x02AD5A) }, - { "Etc/GMT-1" , FOR_V2(0x06EAFB, 0x02AD9C) }, - { "Etc/GMT-10" , FOR_V2(0x06EB7C, 0x02ADDE) }, - { "Etc/GMT-11" , FOR_V2(0x06EBFE, 0x02AE20) }, - { "Etc/GMT-12" , FOR_V2(0x06EC80, 0x02AE62) }, - { "Etc/GMT-13" , FOR_V2(0x06ED02, 0x02AEA4) }, - { "Etc/GMT-14" , FOR_V2(0x06ED84, 0x02AEE6) }, - { "Etc/GMT-2" , FOR_V2(0x06EE06, 0x02AF28) }, - { "Etc/GMT-3" , FOR_V2(0x06EE87, 0x02AF6A) }, - { "Etc/GMT-4" , FOR_V2(0x06EF08, 0x02AFAC) }, - { "Etc/GMT-5" , FOR_V2(0x06EF89, 0x02AFEE) }, - { "Etc/GMT-6" , FOR_V2(0x06F00A, 0x02B030) }, - { "Etc/GMT-7" , FOR_V2(0x06F08B, 0x02B072) }, - { "Etc/GMT-8" , FOR_V2(0x06F10C, 0x02B0B4) }, - { "Etc/GMT-9" , FOR_V2(0x06F18D, 0x02B0F6) }, - { "Etc/GMT0" , FOR_V2(0x06F20E, 0x02B138) }, - { "Etc/Greenwich" , FOR_V2(0x06F28C, 0x02B17A) }, - { "Etc/UCT" , FOR_V2(0x06F30A, 0x02B1BC) }, - { "Etc/Universal" , FOR_V2(0x06F388, 0x02B1FE) }, - { "Etc/UTC" , FOR_V2(0x06F406, 0x02B240) }, - { "Etc/Zulu" , FOR_V2(0x06F484, 0x02B282) }, - { "Europe/Amsterdam" , FOR_V2(0x06F502, 0x02B2C4) }, - { "Europe/Andorra" , FOR_V2(0x07006C, 0x02B709) }, - { "Europe/Astrakhan" , FOR_V2(0x070746, 0x02B996) }, - { "Europe/Athens" , FOR_V2(0x070BF1, 0x02BB74) }, - { "Europe/Belfast" , FOR_V2(0x0714D3, 0x02BEC8) }, - { "Europe/Belgrade" , FOR_V2(0x07231F, 0x02C403) }, - { "Europe/Berlin" , FOR_V2(0x072AAB, 0x02C6D3) }, - { "Europe/Bratislava" , FOR_V2(0x0733C5, 0x02CA44) }, - { "Europe/Brussels" , FOR_V2(0x073CCE, 0x02CD98) }, - { "Europe/Bucharest" , FOR_V2(0x07484F, 0x02D1D6) }, - { "Europe/Budapest" , FOR_V2(0x0750E3, 0x02D507) }, - { "Europe/Busingen" , FOR_V2(0x075A2F, 0x02D877) }, - { "Europe/Chisinau" , FOR_V2(0x0761B8, 0x02DB3F) }, - { "Europe/Copenhagen" , FOR_V2(0x076B1A, 0x02DECE) }, - { "Europe/Dublin" , FOR_V2(0x07737F, 0x02E1E4) }, - { "Europe/Gibraltar" , FOR_V2(0x07812F, 0x02E6EC) }, - { "Europe/Guernsey" , FOR_V2(0x078D27, 0x02EB54) }, - { "Europe/Helsinki" , FOR_V2(0x079B73, 0x02F08F) }, - { "Europe/Isle_of_Man" , FOR_V2(0x07A2EB, 0x02F356) }, - { "Europe/Istanbul" , FOR_V2(0x07B137, 0x02F891) }, - { "Europe/Jersey" , FOR_V2(0x07B8DE, 0x02FB7E) }, - { "Europe/Kaliningrad" , FOR_V2(0x07C72A, 0x0300B9) }, - { "Europe/Kiev" , FOR_V2(0x07CD1F, 0x030320) }, - { "Europe/Kirov" , FOR_V2(0x07D567, 0x030653) }, - { "Europe/Lisbon" , FOR_V2(0x07DA02, 0x030829) }, - { "Europe/Ljubljana" , FOR_V2(0x07E7AE, 0x030D45) }, - { "Europe/London" , FOR_V2(0x07EF3A, 0x031015) }, - { "Europe/Luxembourg" , FOR_V2(0x07FD86, 0x031550) }, - { "Europe/Madrid" , FOR_V2(0x080914, 0x0319A1) }, - { "Europe/Malta" , FOR_V2(0x081366, 0x031D86) }, - { "Europe/Mariehamn" , FOR_V2(0x081DAE, 0x032150) }, - { "Europe/Minsk" , FOR_V2(0x082526, 0x032417) }, - { "Europe/Monaco" , FOR_V2(0x082A5B, 0x032629) }, - { "Europe/Moscow" , FOR_V2(0x0835E7, 0x032A75) }, - { "Europe/Nicosia" , FOR_V2(0x083C06, 0x032CF5) }, - { "Europe/Oslo" , FOR_V2(0x0843E4, 0x032FDD) }, - { "Europe/Paris" , FOR_V2(0x084CA4, 0x03331B) }, - { "Europe/Podgorica" , FOR_V2(0x085842, 0x033772) }, - { "Europe/Prague" , FOR_V2(0x085FCE, 0x033A42) }, - { "Europe/Riga" , FOR_V2(0x0868D7, 0x033D96) }, - { "Europe/Rome" , FOR_V2(0x087179, 0x0340E2) }, - { "Europe/Samara" , FOR_V2(0x087BD6, 0x0344AC) }, - { "Europe/San_Marino" , FOR_V2(0x0880BA, 0x0346AA) }, - { "Europe/Sarajevo" , FOR_V2(0x088B17, 0x034A74) }, - { "Europe/Saratov" , FOR_V2(0x0892A3, 0x034D44) }, - { "Europe/Simferopol" , FOR_V2(0x08975E, 0x034F29) }, - { "Europe/Skopje" , FOR_V2(0x089D26, 0x035181) }, - { "Europe/Sofia" , FOR_V2(0x08A4B2, 0x035451) }, - { "Europe/Stockholm" , FOR_V2(0x08ACDB, 0x035758) }, - { "Europe/Tallinn" , FOR_V2(0x08B45C, 0x035A18) }, - { "Europe/Tirane" , FOR_V2(0x08BCCC, 0x035D51) }, - { "Europe/Tiraspol" , FOR_V2(0x08C4FC, 0x036057) }, - { "Europe/Ulyanovsk" , FOR_V2(0x08CE5E, 0x0363E6) }, - { "Europe/Uzhgorod" , FOR_V2(0x08D36F, 0x0365F3) }, - { "Europe/Vaduz" , FOR_V2(0x08DB85, 0x036909) }, - { "Europe/Vatican" , FOR_V2(0x08E306, 0x036BC9) }, - { "Europe/Vienna" , FOR_V2(0x08ED63, 0x036F93) }, - { "Europe/Vilnius" , FOR_V2(0x08F607, 0x0372C7) }, - { "Europe/Volgograd" , FOR_V2(0x08FE85, 0x03760D) }, - { "Europe/Warsaw" , FOR_V2(0x090330, 0x0377EB) }, - { "Europe/Zagreb" , FOR_V2(0x090D9A, 0x037BCE) }, - { "Europe/Zaporozhye" , FOR_V2(0x091526, 0x037E9E) }, - { "Europe/Zurich" , FOR_V2(0x091D9A, 0x0381F2) }, - { "Factory" , FOR_V2(0x09251B, 0x0384B2) }, - { "GB" , FOR_V2(0x09259B, 0x0384F4) }, - { "GB-Eire" , FOR_V2(0x0933E7, 0x038A2F) }, - { "GMT" , FOR_V2(0x094233, 0x038F6A) }, - { "GMT+0" , FOR_V2(0x0942B1, 0x038FAC) }, - { "GMT-0" , FOR_V2(0x09432F, 0x038FEE) }, - { "GMT0" , FOR_V2(0x0943AD, 0x039030) }, - { "Greenwich" , FOR_V2(0x09442B, 0x039072) }, - { "Hongkong" , FOR_V2(0x0944A9, 0x0390B4) }, - { "HST" , FOR_V2(0x094968, 0x03928C) }, - { "Iceland" , FOR_V2(0x0949E7, 0x0392CE) }, - { "Indian/Antananarivo" , FOR_V2(0x094E7D, 0x039494) }, - { "Indian/Chagos" , FOR_V2(0x094F84, 0x039512) }, - { "Indian/Christmas" , FOR_V2(0x095057, 0x039577) }, - { "Indian/Cocos" , FOR_V2(0x095108, 0x0395CD) }, - { "Indian/Comoro" , FOR_V2(0x0951C2, 0x039625) }, - { "Indian/Kerguelen" , FOR_V2(0x0952C9, 0x0396A3) }, - { "Indian/Mahe" , FOR_V2(0x09537A, 0x0396F9) }, - { "Indian/Maldives" , FOR_V2(0x09542B, 0x03974F) }, - { "Indian/Mauritius" , FOR_V2(0x0954FE, 0x0397B4) }, - { "Indian/Mayotte" , FOR_V2(0x0955FB, 0x039828) }, - { "Indian/Reunion" , FOR_V2(0x095702, 0x0398A6) }, - { "Iran" , FOR_V2(0x0957B3, 0x0398FC) }, - { "Israel" , FOR_V2(0x0961D5, 0x039B6E) }, - { "Jamaica" , FOR_V2(0x096AD1, 0x039EBE) }, - { "Japan" , FOR_V2(0x096CBF, 0x039F8C) }, - { "Kwajalein" , FOR_V2(0x096E00, 0x03A01D) }, - { "Libya" , FOR_V2(0x096F48, 0x03A0B4) }, - { "MET" , FOR_V2(0x0971C5, 0x03A1B5) }, - { "Mexico/BajaNorte" , FOR_V2(0x0979FF, 0x03A4BA) }, - { "Mexico/BajaSur" , FOR_V2(0x098331, 0x03A823) }, - { "Mexico/General" , FOR_V2(0x098933, 0x03AA64) }, - { "MST" , FOR_V2(0x098F6F, 0x03ACB8) }, - { "MST7MDT" , FOR_V2(0x098FED, 0x03ACFA) }, - { "Navajo" , FOR_V2(0x0998FF, 0x03B053) }, - { "NZ" , FOR_V2(0x09A297, 0x03B3DD) }, - { "NZ-CHAT" , FOR_V2(0x09AC28, 0x03B765) }, - { "Pacific/Apia" , FOR_V2(0x09B448, 0x03BA60) }, - { "Pacific/Auckland" , FOR_V2(0x09B89D, 0x03BC08) }, - { "Pacific/Bougainville" , FOR_V2(0x09C246, 0x03BFA8) }, - { "Pacific/Chatham" , FOR_V2(0x09C36A, 0x03C02D) }, - { "Pacific/Chuuk" , FOR_V2(0x09CB99, 0x03C337) }, - { "Pacific/Easter" , FOR_V2(0x09CCC1, 0x03C3C0) }, - { "Pacific/Efate" , FOR_V2(0x09D593, 0x03C70D) }, - { "Pacific/Enderbury" , FOR_V2(0x09D771, 0x03C7D1) }, - { "Pacific/Fakaofo" , FOR_V2(0x09D876, 0x03C854) }, - { "Pacific/Fiji" , FOR_V2(0x09D94A, 0x03C8B9) }, - { "Pacific/Funafuti" , FOR_V2(0x09DD8B, 0x03CA4F) }, - { "Pacific/Galapagos" , FOR_V2(0x09DE3D, 0x03CAA5) }, - { "Pacific/Gambier" , FOR_V2(0x09DF48, 0x03CB2B) }, - { "Pacific/Guadalcanal" , FOR_V2(0x09E007, 0x03CB90) }, - { "Pacific/Guam" , FOR_V2(0x09E0B9, 0x03CBE6) }, - { "Pacific/Honolulu" , FOR_V2(0x09E2B3, 0x03CCB5) }, - { "Pacific/Johnston" , FOR_V2(0x09E40E, 0x03CD5A) }, - { "Pacific/Kiritimati" , FOR_V2(0x09E563, 0x03CDF9) }, - { "Pacific/Kosrae" , FOR_V2(0x09E669, 0x03CE7B) }, - { "Pacific/Kwajalein" , FOR_V2(0x09E7DA, 0x03CF1E) }, - { "Pacific/Majuro" , FOR_V2(0x09E92B, 0x03CFBE) }, - { "Pacific/Marquesas" , FOR_V2(0x09EA8A, 0x03D06D) }, - { "Pacific/Midway" , FOR_V2(0x09EB54, 0x03D0D6) }, - { "Pacific/Nauru" , FOR_V2(0x09EC1D, 0x03D140) }, - { "Pacific/Niue" , FOR_V2(0x09ED25, 0x03D1BB) }, - { "Pacific/Norfolk" , FOR_V2(0x09EE22, 0x03D233) }, - { "Pacific/Noumea" , FOR_V2(0x09F19E, 0x03D391) }, - { "Pacific/Pago_Pago" , FOR_V2(0x09F2DA, 0x03D420) }, - { "Pacific/Palau" , FOR_V2(0x09F395, 0x03D47C) }, - { "Pacific/Pitcairn" , FOR_V2(0x09F455, 0x03D4D2) }, - { "Pacific/Pohnpei" , FOR_V2(0x09F52B, 0x03D539) }, - { "Pacific/Ponape" , FOR_V2(0x09F674, 0x03D5D0) }, - { "Pacific/Port_Moresby" , FOR_V2(0x09F7AF, 0x03D659) }, - { "Pacific/Rarotonga" , FOR_V2(0x09F892, 0x03D6CC) }, - { "Pacific/Saipan" , FOR_V2(0x09FADF, 0x03D7BC) }, - { "Pacific/Samoa" , FOR_V2(0x09FCD9, 0x03D88B) }, - { "Pacific/Tahiti" , FOR_V2(0x09FD94, 0x03D8E7) }, - { "Pacific/Tarawa" , FOR_V2(0x09FE54, 0x03D94C) }, - { "Pacific/Tongatapu" , FOR_V2(0x09FF15, 0x03D9B1) }, - { "Pacific/Truk" , FOR_V2(0x0A0095, 0x03DA5C) }, - { "Pacific/Wake" , FOR_V2(0x0A01AE, 0x03DAD6) }, - { "Pacific/Wallis" , FOR_V2(0x0A026B, 0x03DB37) }, - { "Pacific/Yap" , FOR_V2(0x0A031D, 0x03DB8D) }, - { "Poland" , FOR_V2(0x0A0436, 0x03DC07) }, - { "Portugal" , FOR_V2(0x0A0EA0, 0x03DFEA) }, - { "PRC" , FOR_V2(0x0A1C39, 0x03E4F3) }, - { "PST8PDT" , FOR_V2(0x0A1E5A, 0x03E5D0) }, - { "ROC" , FOR_V2(0x0A276C, 0x03E929) }, - { "ROK" , FOR_V2(0x0A2A71, 0x03EA5C) }, - { "Singapore" , FOR_V2(0x0A2CE6, 0x03EB5F) }, - { "Turkey" , FOR_V2(0x0A2E71, 0x03EC14) }, - { "UCT" , FOR_V2(0x0A3618, 0x03EF01) }, - { "Universal" , FOR_V2(0x0A3696, 0x03EF43) }, - { "US/Alaska" , FOR_V2(0x0A3714, 0x03EF85) }, - { "US/Aleutian" , FOR_V2(0x0A4063, 0x03F2FD) }, - { "US/Arizona" , FOR_V2(0x0A49A3, 0x03F66E) }, - { "US/Central" , FOR_V2(0x0A4AF7, 0x03F705) }, - { "US/East-Indiana" , FOR_V2(0x0A58FB, 0x03FC29) }, - { "US/Eastern" , FOR_V2(0x0A5F89, 0x03FEA4) }, - { "US/Hawaii" , FOR_V2(0x0A6D65, 0x0403B4) }, - { "US/Indiana-Starke" , FOR_V2(0x0A6EBA, 0x040453) }, - { "US/Michigan" , FOR_V2(0x0A7842, 0x0407DD) }, - { "US/Mountain" , FOR_V2(0x0A8104, 0x040B1E) }, - { "US/Pacific" , FOR_V2(0x0A8A9C, 0x040EA8) }, - { "US/Pacific-New" , FOR_V2(0x0A95BC, 0x0412BE) }, - { "US/Samoa" , FOR_V2(0x0AA0DC, 0x0416D4) }, - { "UTC" , FOR_V2(0x0AA197, 0x041730) }, - { "W-SU" , FOR_V2(0x0AA215, 0x041772) }, - { "WET" , FOR_V2(0x0AA820, 0x0419DE) }, - { "Zulu" , FOR_V2(0x0AAF9D, 0x041CA1) }, + { "America/Dawson_Creek" , FOR_V2(0x01229A, 0x0072D3) }, + { "America/Denver" , FOR_V2(0x0126E0, 0x007495) }, + { "America/Detroit" , FOR_V2(0x01308D, 0x007834) }, + { "America/Dominica" , FOR_V2(0x013968, 0x007B8E) }, + { "America/Edmonton" , FOR_V2(0x013A08, 0x007BDF) }, + { "America/Eirunepe" , FOR_V2(0x01434D, 0x007F5E) }, + { "America/El_Salvador" , FOR_V2(0x0145F8, 0x008079) }, + { "America/Ensenada" , FOR_V2(0x0146E4, 0x0080E8) }, + { "America/Fort_Nelson" , FOR_V2(0x015016, 0x008451) }, + { "America/Fort_Wayne" , FOR_V2(0x0158F6, 0x0087B0) }, + { "America/Fortaleza" , FOR_V2(0x015F84, 0x008A2B) }, + { "America/Glace_Bay" , FOR_V2(0x016282, 0x008B6F) }, + { "America/Godthab" , FOR_V2(0x016B39, 0x008EBA) }, + { "America/Goose_Bay" , FOR_V2(0x01729B, 0x009174) }, + { "America/Grand_Turk" , FOR_V2(0x017F51, 0x009641) }, + { "America/Grenada" , FOR_V2(0x018695, 0x0098F5) }, + { "America/Guadeloupe" , FOR_V2(0x018735, 0x009946) }, + { "America/Guatemala" , FOR_V2(0x0187D5, 0x009997) }, + { "America/Guayaquil" , FOR_V2(0x0188F9, 0x009A1A) }, + { "America/Guyana" , FOR_V2(0x018A0D, 0x009AA5) }, + { "America/Halifax" , FOR_V2(0x018B05, 0x009B1B) }, + { "America/Havana" , FOR_V2(0x01988F, 0x00A021) }, + { "America/Hermosillo" , FOR_V2(0x01A20B, 0x00A39F) }, + { "America/Indiana/Indianapolis" , FOR_V2(0x01A3D6, 0x00A479) }, + { "America/Indiana/Knox" , FOR_V2(0x01AA7D, 0x00A70D) }, + { "America/Indiana/Marengo" , FOR_V2(0x01B41A, 0x00AAAC) }, + { "America/Indiana/Petersburg" , FOR_V2(0x01BAF7, 0x00AD52) }, + { "America/Indiana/Tell_City" , FOR_V2(0x01C286, 0x00B035) }, + { "America/Indiana/Vevay" , FOR_V2(0x01C93A, 0x00B2CF) }, + { "America/Indiana/Vincennes" , FOR_V2(0x01CEE6, 0x00B50A) }, + { "America/Indiana/Winamac" , FOR_V2(0x01D5AC, 0x00B7AB) }, + { "America/Indianapolis" , FOR_V2(0x01DCC0, 0x00BA64) }, + { "America/Inuvik" , FOR_V2(0x01E34E, 0x00BCDF) }, + { "America/Iqaluit" , FOR_V2(0x01EAD4, 0x00BFB6) }, + { "America/Jamaica" , FOR_V2(0x01F2EE, 0x00C2DA) }, + { "America/Jujuy" , FOR_V2(0x01F4DC, 0x00C3A8) }, + { "America/Juneau" , FOR_V2(0x01F900, 0x00C544) }, + { "America/Kentucky/Louisville" , FOR_V2(0x020251, 0x00C8C9) }, + { "America/Kentucky/Monticello" , FOR_V2(0x020D4F, 0x00CCED) }, + { "America/Knox_IN" , FOR_V2(0x02169F, 0x00D071) }, + { "America/Kralendijk" , FOR_V2(0x022027, 0x00D3FB) }, + { "America/La_Paz" , FOR_V2(0x0220ED, 0x00D45D) }, + { "America/Lima" , FOR_V2(0x0221E1, 0x00D4D1) }, + { "America/Los_Angeles" , FOR_V2(0x022383, 0x00D582) }, + { "America/Louisville" , FOR_V2(0x022EAA, 0x00D99F) }, + { "America/Lower_Princes" , FOR_V2(0x02398A, 0x00DDA5) }, + { "America/Maceio" , FOR_V2(0x023A50, 0x00DE07) }, + { "America/Managua" , FOR_V2(0x023D54, 0x00DF3F) }, + { "America/Manaus" , FOR_V2(0x023F0E, 0x00DFFF) }, + { "America/Marigot" , FOR_V2(0x024185, 0x00E104) }, + { "America/Martinique" , FOR_V2(0x024225, 0x00E155) }, + { "America/Matamoros" , FOR_V2(0x024319, 0x00E1CA) }, + { "America/Mazatlan" , FOR_V2(0x0248D1, 0x00E411) }, + { "America/Mendoza" , FOR_V2(0x024F08, 0x00E687) }, + { "America/Menominee" , FOR_V2(0x025348, 0x00E82D) }, + { "America/Merida" , FOR_V2(0x025C55, 0x00EB9F) }, + { "America/Metlakatla" , FOR_V2(0x02620F, 0x00EDD8) }, + { "America/Mexico_City" , FOR_V2(0x0267C1, 0x00F00D) }, + { "America/Miquelon" , FOR_V2(0x026E09, 0x00F26D) }, + { "America/Moncton" , FOR_V2(0x027497, 0x00F4DA) }, + { "America/Monterrey" , FOR_V2(0x02810D, 0x00F97D) }, + { "America/Montevideo" , FOR_V2(0x0286CC, 0x00FBCB) }, + { "America/Montreal" , FOR_V2(0x028CBE, 0x00FE18) }, + { "America/Montserrat" , FOR_V2(0x029A70, 0x010319) }, + { "America/Nassau" , FOR_V2(0x029B10, 0x01036A) }, + { "America/New_York" , FOR_V2(0x02A3EE, 0x0106A9) }, + { "America/Nipigon" , FOR_V2(0x02B1DE, 0x010BCD) }, + { "America/Nome" , FOR_V2(0x02BA55, 0x010F05) }, + { "America/Noronha" , FOR_V2(0x02C3AD, 0x011288) }, + { "America/North_Dakota/Beulah" , FOR_V2(0x02C695, 0x0113B6) }, + { "America/North_Dakota/Center" , FOR_V2(0x02D002, 0x011745) }, + { "America/North_Dakota/New_Salem" , FOR_V2(0x02D96F, 0x011AD4) }, + { "America/Nuuk" , FOR_V2(0x02E2E2, 0x011E69) }, + { "America/Ojinaga" , FOR_V2(0x02EA5A, 0x012139) }, + { "America/Panama" , FOR_V2(0x02F05A, 0x012393) }, + { "America/Pangnirtung" , FOR_V2(0x02F11C, 0x0123F3) }, + { "America/Paramaribo" , FOR_V2(0x02F970, 0x012730) }, + { "America/Phoenix" , FOR_V2(0x02FA82, 0x0127B1) }, + { "America/Port-au-Prince" , FOR_V2(0x02FBF3, 0x012865) }, + { "America/Port_of_Spain" , FOR_V2(0x030199, 0x012A86) }, + { "America/Porto_Acre" , FOR_V2(0x030239, 0x012AD7) }, + { "America/Porto_Velho" , FOR_V2(0x0304B9, 0x012BD9) }, + { "America/Puerto_Rico" , FOR_V2(0x03070D, 0x012CCD) }, + { "America/Punta_Arenas" , FOR_V2(0x03080F, 0x012D49) }, + { "America/Rainy_River" , FOR_V2(0x030F9D, 0x013032) }, + { "America/Rankin_Inlet" , FOR_V2(0x031815, 0x01336B) }, + { "America/Recife" , FOR_V2(0x031F9B, 0x013645) }, + { "America/Regina" , FOR_V2(0x03227D, 0x01376D) }, + { "America/Resolute" , FOR_V2(0x032672, 0x01390B) }, + { "America/Rio_Branco" , FOR_V2(0x032DF9, 0x013BE6) }, + { "America/Rosario" , FOR_V2(0x03307D, 0x013CEC) }, + { "America/Santa_Isabel" , FOR_V2(0x0334BD, 0x013E92) }, + { "America/Santarem" , FOR_V2(0x033DEF, 0x0141FB) }, + { "America/Santiago" , FOR_V2(0x034060, 0x0142FD) }, + { "America/Santo_Domingo" , FOR_V2(0x034A5F, 0x0146BB) }, + { "America/Sao_Paulo" , FOR_V2(0x034C35, 0x014787) }, + { "America/Scoresbysund" , FOR_V2(0x03521B, 0x0149DF) }, + { "America/Shiprock" , FOR_V2(0x0359C0, 0x014CCA) }, + { "America/Sitka" , FOR_V2(0x036358, 0x015054) }, + { "America/St_Barthelemy" , FOR_V2(0x036C90, 0x0153CC) }, + { "America/St_Johns" , FOR_V2(0x036D30, 0x01541D) }, + { "America/St_Kitts" , FOR_V2(0x037BA5, 0x015983) }, + { "America/St_Lucia" , FOR_V2(0x037C45, 0x0159D4) }, + { "America/St_Thomas" , FOR_V2(0x037CE5, 0x015A25) }, + { "America/St_Vincent" , FOR_V2(0x037D85, 0x015A76) }, + { "America/Swift_Current" , FOR_V2(0x037E25, 0x015AC7) }, + { "America/Tegucigalpa" , FOR_V2(0x038073, 0x015BCC) }, + { "America/Thule" , FOR_V2(0x03817B, 0x015C45) }, + { "America/Thunder_Bay" , FOR_V2(0x038773, 0x015E84) }, + { "America/Tijuana" , FOR_V2(0x039033, 0x0161D5) }, + { "America/Toronto" , FOR_V2(0x039986, 0x01655F) }, + { "America/Tortola" , FOR_V2(0x03A755, 0x016A7D) }, + { "America/Vancouver" , FOR_V2(0x03A7F5, 0x016ACE) }, + { "America/Virgin" , FOR_V2(0x03B366, 0x016F11) }, + { "America/Whitehorse" , FOR_V2(0x03B406, 0x016F62) }, + { "America/Winnipeg" , FOR_V2(0x03BA68, 0x0171E9) }, + { "America/Yakutat" , FOR_V2(0x03C5C5, 0x01762C) }, + { "America/Yellowknife" , FOR_V2(0x03CEE2, 0x017995) }, + { "Antarctica/Casey" , FOR_V2(0x03D6B3, 0x017C8F) }, + { "Antarctica/Davis" , FOR_V2(0x03D7ED, 0x017D20) }, + { "Antarctica/DumontDUrville" , FOR_V2(0x03D927, 0x017DB1) }, + { "Antarctica/Macquarie" , FOR_V2(0x03DA05, 0x017E21) }, + { "Antarctica/Mawson" , FOR_V2(0x03E011, 0x018078) }, + { "Antarctica/McMurdo" , FOR_V2(0x03E0EA, 0x0180E3) }, + { "Antarctica/Palmer" , FOR_V2(0x03EAA1, 0x018491) }, + { "Antarctica/Rothera" , FOR_V2(0x03F03D, 0x0186BE) }, + { "Antarctica/South_Pole" , FOR_V2(0x03F0F4, 0x01871B) }, + { "Antarctica/Syowa" , FOR_V2(0x03FA85, 0x018AA3) }, + { "Antarctica/Troll" , FOR_V2(0x03FB3B, 0x018AFE) }, + { "Antarctica/Vostok" , FOR_V2(0x03FFD6, 0x018CBB) }, + { "Arctic/Longyearbyen" , FOR_V2(0x04008D, 0x018D17) }, + { "Asia/Aden" , FOR_V2(0x04094D, 0x019055) }, + { "Asia/Almaty" , FOR_V2(0x0409FE, 0x0190AB) }, + { "Asia/Amman" , FOR_V2(0x040E06, 0x019254) }, + { "Asia/Anadyr" , FOR_V2(0x04154F, 0x019505) }, + { "Asia/Aqtau" , FOR_V2(0x041A12, 0x0196EF) }, + { "Asia/Aqtobe" , FOR_V2(0x041E0A, 0x019891) }, + { "Asia/Ashgabat" , FOR_V2(0x042216, 0x019A37) }, + { "Asia/Ashkhabad" , FOR_V2(0x04248D, 0x019B40) }, + { "Asia/Atyrau" , FOR_V2(0x042704, 0x019C49) }, + { "Asia/Baghdad" , FOR_V2(0x042B04, 0x019DEF) }, + { "Asia/Bahrain" , FOR_V2(0x042EE7, 0x019F74) }, + { "Asia/Baku" , FOR_V2(0x042FBA, 0x019FD9) }, + { "Asia/Bangkok" , FOR_V2(0x043491, 0x01A1C0) }, + { "Asia/Barnaul" , FOR_V2(0x043564, 0x01A225) }, + { "Asia/Beirut" , FOR_V2(0x043A43, 0x01A415) }, + { "Asia/Bishkek" , FOR_V2(0x0442B9, 0x01A72D) }, + { "Asia/Brunei" , FOR_V2(0x04469C, 0x01A8B6) }, + { "Asia/Calcutta" , FOR_V2(0x044773, 0x01A91D) }, + { "Asia/Chita" , FOR_V2(0x04489C, 0x01A99D) }, + { "Asia/Choibalsan" , FOR_V2(0x044D81, 0x01AB95) }, + { "Asia/Chongqing" , FOR_V2(0x045154, 0x01AD21) }, + { "Asia/Chungking" , FOR_V2(0x045391, 0x01AE08) }, + { "Asia/Colombo" , FOR_V2(0x0455CE, 0x01AEEF) }, + { "Asia/Dacca" , FOR_V2(0x04574E, 0x01AF9C) }, + { "Asia/Damascus" , FOR_V2(0x0458AB, 0x01B03C) }, + { "Asia/Dhaka" , FOR_V2(0x0461AD, 0x01B386) }, + { "Asia/Dili" , FOR_V2(0x04630A, 0x01B426) }, + { "Asia/Dubai" , FOR_V2(0x0463F9, 0x01B495) }, + { "Asia/Dushanbe" , FOR_V2(0x0464AA, 0x01B4EB) }, + { "Asia/Famagusta" , FOR_V2(0x046705, 0x01B5E8) }, + { "Asia/Gaza" , FOR_V2(0x046F0C, 0x01B8EE) }, + { "Asia/Harbin" , FOR_V2(0x04782E, 0x01BC53) }, + { "Asia/Hebron" , FOR_V2(0x047A6B, 0x01BD3A) }, + { "Asia/Ho_Chi_Minh" , FOR_V2(0x0483A8, 0x01C0A8) }, + { "Asia/Hong_Kong" , FOR_V2(0x048513, 0x01C14B) }, + { "Asia/Hovd" , FOR_V2(0x0489D2, 0x01C323) }, + { "Asia/Irkutsk" , FOR_V2(0x048D84, 0x01C4AD) }, + { "Asia/Istanbul" , FOR_V2(0x049285, 0x01C6B6) }, + { "Asia/Jakarta" , FOR_V2(0x049A2C, 0x01C9A3) }, + { "Asia/Jayapura" , FOR_V2(0x049BA8, 0x01CA5A) }, + { "Asia/Jerusalem" , FOR_V2(0x049CC7, 0x01CB01) }, + { "Asia/Kabul" , FOR_V2(0x04A5C3, 0x01CE51) }, + { "Asia/Kamchatka" , FOR_V2(0x04A69F, 0x01CEB8) }, + { "Asia/Karachi" , FOR_V2(0x04AB4B, 0x01D096) }, + { "Asia/Kashgar" , FOR_V2(0x04ACD2, 0x01D146) }, + { "Asia/Kathmandu" , FOR_V2(0x04AD83, 0x01D19C) }, + { "Asia/Katmandu" , FOR_V2(0x04AE63, 0x01D205) }, + { "Asia/Khandyga" , FOR_V2(0x04AF43, 0x01D26E) }, + { "Asia/Kolkata" , FOR_V2(0x04B464, 0x01D487) }, + { "Asia/Krasnoyarsk" , FOR_V2(0x04B58D, 0x01D507) }, + { "Asia/Kuala_Lumpur" , FOR_V2(0x04BA69, 0x01D6FF) }, + { "Asia/Kuching" , FOR_V2(0x04BC08, 0x01D7C8) }, + { "Asia/Kuwait" , FOR_V2(0x04BE05, 0x01D8A9) }, + { "Asia/Macao" , FOR_V2(0x04BEB6, 0x01D8FF) }, + { "Asia/Macau" , FOR_V2(0x04C38D, 0x01DADF) }, + { "Asia/Magadan" , FOR_V2(0x04C864, 0x01DCBF) }, + { "Asia/Makassar" , FOR_V2(0x04CD46, 0x01DEB3) }, + { "Asia/Manila" , FOR_V2(0x04CE99, 0x01DF7B) }, + { "Asia/Muscat" , FOR_V2(0x04CFED, 0x01E00E) }, + { "Asia/Nicosia" , FOR_V2(0x04D09E, 0x01E064) }, + { "Asia/Novokuznetsk" , FOR_V2(0x04D88F, 0x01E35F) }, + { "Asia/Novosibirsk" , FOR_V2(0x04DD39, 0x01E53C) }, + { "Asia/Omsk" , FOR_V2(0x04E21E, 0x01E732) }, + { "Asia/Oral" , FOR_V2(0x04E6EE, 0x01E91E) }, + { "Asia/Phnom_Penh" , FOR_V2(0x04EAF6, 0x01EAC3) }, + { "Asia/Pontianak" , FOR_V2(0x04EBC9, 0x01EB28) }, + { "Asia/Pyongyang" , FOR_V2(0x04ED4C, 0x01EBE7) }, + { "Asia/Qatar" , FOR_V2(0x04EE45, 0x01EC5C) }, + { "Asia/Qostanay" , FOR_V2(0x04EF18, 0x01ECC1) }, + { "Asia/Qyzylorda" , FOR_V2(0x04F331, 0x01EE74) }, + { "Asia/Rangoon" , FOR_V2(0x04F75B, 0x01F02F) }, + { "Asia/Riyadh" , FOR_V2(0x04F873, 0x01F0B0) }, + { "Asia/Saigon" , FOR_V2(0x04F924, 0x01F106) }, + { "Asia/Sakhalin" , FOR_V2(0x04FA8F, 0x01F1A9) }, + { "Asia/Samarkand" , FOR_V2(0x04FF65, 0x01F39B) }, + { "Asia/Seoul" , FOR_V2(0x0501C3, 0x01F4A2) }, + { "Asia/Shanghai" , FOR_V2(0x050438, 0x01F5A5) }, + { "Asia/Singapore" , FOR_V2(0x050681, 0x01F698) }, + { "Asia/Srednekolymsk" , FOR_V2(0x05080C, 0x01F74D) }, + { "Asia/Taipei" , FOR_V2(0x050CF2, 0x01F94E) }, + { "Asia/Tashkent" , FOR_V2(0x050FF7, 0x01FA81) }, + { "Asia/Tbilisi" , FOR_V2(0x051263, 0x01FB8F) }, + { "Asia/Tehran" , FOR_V2(0x05167A, 0x01FD32) }, + { "Asia/Tel_Aviv" , FOR_V2(0x05209C, 0x01FFA4) }, + { "Asia/Thimbu" , FOR_V2(0x052998, 0x0202F4) }, + { "Asia/Thimphu" , FOR_V2(0x052A6F, 0x02035B) }, + { "Asia/Tokyo" , FOR_V2(0x052B46, 0x0203C2) }, + { "Asia/Tomsk" , FOR_V2(0x052C87, 0x020453) }, + { "Asia/Ujung_Pandang" , FOR_V2(0x053166, 0x020643) }, + { "Asia/Ulaanbaatar" , FOR_V2(0x053270, 0x0206C2) }, + { "Asia/Ulan_Bator" , FOR_V2(0x05360C, 0x020836) }, + { "Asia/Urumqi" , FOR_V2(0x053993, 0x020995) }, + { "Asia/Ust-Nera" , FOR_V2(0x053A51, 0x0209F8) }, + { "Asia/Vientiane" , FOR_V2(0x053F55, 0x020BFF) }, + { "Asia/Vladivostok" , FOR_V2(0x054028, 0x020C64) }, + { "Asia/Yakutsk" , FOR_V2(0x0544FF, 0x020E56) }, + { "Asia/Yangon" , FOR_V2(0x0549D5, 0x021048) }, + { "Asia/Yekaterinburg" , FOR_V2(0x054AED, 0x0210C9) }, + { "Asia/Yerevan" , FOR_V2(0x054FE2, 0x0212C6) }, + { "Atlantic/Azores" , FOR_V2(0x05546D, 0x02148F) }, + { "Atlantic/Bermuda" , FOR_V2(0x05621B, 0x0219A3) }, + { "Atlantic/Canary" , FOR_V2(0x0569E1, 0x021C7E) }, + { "Atlantic/Cape_Verde" , FOR_V2(0x057164, 0x021F53) }, + { "Atlantic/Faeroe" , FOR_V2(0x05727E, 0x021FD8) }, + { "Atlantic/Faroe" , FOR_V2(0x0579A1, 0x02227C) }, + { "Atlantic/Jan_Mayen" , FOR_V2(0x0580C4, 0x022520) }, + { "Atlantic/Madeira" , FOR_V2(0x058984, 0x02285E) }, + { "Atlantic/Reykjavik" , FOR_V2(0x059732, 0x022D7B) }, + { "Atlantic/South_Georgia" , FOR_V2(0x059BC8, 0x022F41) }, + { "Atlantic/St_Helena" , FOR_V2(0x059C78, 0x022F97) }, + { "Atlantic/Stanley" , FOR_V2(0x059D18, 0x022FE8) }, + { "Australia/ACT" , FOR_V2(0x05A1E2, 0x0231C1) }, + { "Australia/Adelaide" , FOR_V2(0x05AA8A, 0x0234F0) }, + { "Australia/Brisbane" , FOR_V2(0x05B353, 0x02382E) }, + { "Australia/Broken_Hill" , FOR_V2(0x05B527, 0x023903) }, + { "Australia/Canberra" , FOR_V2(0x05BE12, 0x023C4E) }, + { "Australia/Currie" , FOR_V2(0x05C6BA, 0x023F7D) }, + { "Australia/Darwin" , FOR_V2(0x05CF78, 0x0242C2) }, + { "Australia/Eucla" , FOR_V2(0x05D0C6, 0x024359) }, + { "Australia/Hobart" , FOR_V2(0x05D2CF, 0x024441) }, + { "Australia/LHI" , FOR_V2(0x05DBFC, 0x0247AD) }, + { "Australia/Lindeman" , FOR_V2(0x05E34C, 0x024A60) }, + { "Australia/Lord_Howe" , FOR_V2(0x05E560, 0x024B51) }, + { "Australia/Melbourne" , FOR_V2(0x05ECC0, 0x024E14) }, + { "Australia/North" , FOR_V2(0x05F570, 0x02514B) }, + { "Australia/NSW" , FOR_V2(0x05F6AC, 0x0251D0) }, + { "Australia/Perth" , FOR_V2(0x05FF54, 0x0254FF) }, + { "Australia/Queensland" , FOR_V2(0x06014A, 0x0255E5) }, + { "Australia/South" , FOR_V2(0x060307, 0x0256A3) }, + { "Australia/Sydney" , FOR_V2(0x060BC1, 0x0259D2) }, + { "Australia/Tasmania" , FOR_V2(0x061485, 0x025D1D) }, + { "Australia/Victoria" , FOR_V2(0x061D9D, 0x026074) }, + { "Australia/West" , FOR_V2(0x062645, 0x0263A3) }, + { "Australia/Yancowinna" , FOR_V2(0x06281D, 0x02646B) }, + { "Brazil/Acre" , FOR_V2(0x0630EC, 0x02679A) }, + { "Brazil/DeNoronha" , FOR_V2(0x06336C, 0x02689C) }, + { "Brazil/East" , FOR_V2(0x063644, 0x0269BA) }, + { "Brazil/West" , FOR_V2(0x063BF4, 0x026BDC) }, + { "Canada/Atlantic" , FOR_V2(0x063E5C, 0x026CD2) }, + { "Canada/Central" , FOR_V2(0x064BC8, 0x0271BA) }, + { "Canada/Eastern" , FOR_V2(0x065708, 0x0275E0) }, + { "Canada/Mountain" , FOR_V2(0x0664BA, 0x027AE1) }, + { "Canada/Newfoundland" , FOR_V2(0x066DE2, 0x027E43) }, + { "Canada/Pacific" , FOR_V2(0x067C35, 0x028387) }, + { "Canada/Saskatchewan" , FOR_V2(0x06878D, 0x0287B1) }, + { "Canada/Yukon" , FOR_V2(0x068B6D, 0x02893A) }, + { "CET" , FOR_V2(0x0691B9, 0x028BAB) }, + { "Chile/Continental" , FOR_V2(0x0699F3, 0x028EB0) }, + { "Chile/EasterIsland" , FOR_V2(0x06A3E0, 0x02925C) }, + { "CST6CDT" , FOR_V2(0x06ACA5, 0x02959C) }, + { "Cuba" , FOR_V2(0x06B5B7, 0x0298F5) }, + { "EET" , FOR_V2(0x06BF33, 0x029C73) }, + { "Egypt" , FOR_V2(0x06C6B3, 0x029F36) }, + { "Eire" , FOR_V2(0x06CE62, 0x02A212) }, + { "EST" , FOR_V2(0x06DC12, 0x02A71A) }, + { "EST5EDT" , FOR_V2(0x06DC90, 0x02A75C) }, + { "Etc/GMT" , FOR_V2(0x06E5A2, 0x02AAB5) }, + { "Etc/GMT+0" , FOR_V2(0x06E620, 0x02AAF7) }, + { "Etc/GMT+1" , FOR_V2(0x06E69E, 0x02AB39) }, + { "Etc/GMT+10" , FOR_V2(0x06E71E, 0x02AB7B) }, + { "Etc/GMT+11" , FOR_V2(0x06E79F, 0x02ABBD) }, + { "Etc/GMT+12" , FOR_V2(0x06E820, 0x02ABFF) }, + { "Etc/GMT+2" , FOR_V2(0x06E8A1, 0x02AC41) }, + { "Etc/GMT+3" , FOR_V2(0x06E921, 0x02AC83) }, + { "Etc/GMT+4" , FOR_V2(0x06E9A1, 0x02ACC5) }, + { "Etc/GMT+5" , FOR_V2(0x06EA21, 0x02AD07) }, + { "Etc/GMT+6" , FOR_V2(0x06EAA1, 0x02AD49) }, + { "Etc/GMT+7" , FOR_V2(0x06EB21, 0x02AD8B) }, + { "Etc/GMT+8" , FOR_V2(0x06EBA1, 0x02ADCD) }, + { "Etc/GMT+9" , FOR_V2(0x06EC21, 0x02AE0F) }, + { "Etc/GMT-0" , FOR_V2(0x06ECA1, 0x02AE51) }, + { "Etc/GMT-1" , FOR_V2(0x06ED1F, 0x02AE93) }, + { "Etc/GMT-10" , FOR_V2(0x06EDA0, 0x02AED5) }, + { "Etc/GMT-11" , FOR_V2(0x06EE22, 0x02AF17) }, + { "Etc/GMT-12" , FOR_V2(0x06EEA4, 0x02AF59) }, + { "Etc/GMT-13" , FOR_V2(0x06EF26, 0x02AF9B) }, + { "Etc/GMT-14" , FOR_V2(0x06EFA8, 0x02AFDD) }, + { "Etc/GMT-2" , FOR_V2(0x06F02A, 0x02B01F) }, + { "Etc/GMT-3" , FOR_V2(0x06F0AB, 0x02B061) }, + { "Etc/GMT-4" , FOR_V2(0x06F12C, 0x02B0A3) }, + { "Etc/GMT-5" , FOR_V2(0x06F1AD, 0x02B0E5) }, + { "Etc/GMT-6" , FOR_V2(0x06F22E, 0x02B127) }, + { "Etc/GMT-7" , FOR_V2(0x06F2AF, 0x02B169) }, + { "Etc/GMT-8" , FOR_V2(0x06F330, 0x02B1AB) }, + { "Etc/GMT-9" , FOR_V2(0x06F3B1, 0x02B1ED) }, + { "Etc/GMT0" , FOR_V2(0x06F432, 0x02B22F) }, + { "Etc/Greenwich" , FOR_V2(0x06F4B0, 0x02B271) }, + { "Etc/UCT" , FOR_V2(0x06F52E, 0x02B2B3) }, + { "Etc/Universal" , FOR_V2(0x06F5AC, 0x02B2F5) }, + { "Etc/UTC" , FOR_V2(0x06F62A, 0x02B337) }, + { "Etc/Zulu" , FOR_V2(0x06F6A8, 0x02B379) }, + { "Europe/Amsterdam" , FOR_V2(0x06F726, 0x02B3BB) }, + { "Europe/Andorra" , FOR_V2(0x070290, 0x02B800) }, + { "Europe/Astrakhan" , FOR_V2(0x07096A, 0x02BA8D) }, + { "Europe/Athens" , FOR_V2(0x070E15, 0x02BC6B) }, + { "Europe/Belfast" , FOR_V2(0x0716F7, 0x02BFBF) }, + { "Europe/Belgrade" , FOR_V2(0x072543, 0x02C4FA) }, + { "Europe/Berlin" , FOR_V2(0x072CCF, 0x02C7CA) }, + { "Europe/Bratislava" , FOR_V2(0x0735E9, 0x02CB3B) }, + { "Europe/Brussels" , FOR_V2(0x073EF2, 0x02CE8F) }, + { "Europe/Bucharest" , FOR_V2(0x074A73, 0x02D2CD) }, + { "Europe/Budapest" , FOR_V2(0x075307, 0x02D5FE) }, + { "Europe/Busingen" , FOR_V2(0x075C53, 0x02D96E) }, + { "Europe/Chisinau" , FOR_V2(0x0763DC, 0x02DC36) }, + { "Europe/Copenhagen" , FOR_V2(0x076D3E, 0x02DFC5) }, + { "Europe/Dublin" , FOR_V2(0x0775A3, 0x02E2DB) }, + { "Europe/Gibraltar" , FOR_V2(0x078353, 0x02E7E3) }, + { "Europe/Guernsey" , FOR_V2(0x078F4B, 0x02EC4B) }, + { "Europe/Helsinki" , FOR_V2(0x079D97, 0x02F186) }, + { "Europe/Isle_of_Man" , FOR_V2(0x07A50F, 0x02F44D) }, + { "Europe/Istanbul" , FOR_V2(0x07B35B, 0x02F988) }, + { "Europe/Jersey" , FOR_V2(0x07BB02, 0x02FC75) }, + { "Europe/Kaliningrad" , FOR_V2(0x07C94E, 0x0301B0) }, + { "Europe/Kiev" , FOR_V2(0x07CF43, 0x030417) }, + { "Europe/Kirov" , FOR_V2(0x07D78B, 0x03074A) }, + { "Europe/Lisbon" , FOR_V2(0x07DC26, 0x030920) }, + { "Europe/Ljubljana" , FOR_V2(0x07E9D2, 0x030E3C) }, + { "Europe/London" , FOR_V2(0x07F15E, 0x03110C) }, + { "Europe/Luxembourg" , FOR_V2(0x07FFAA, 0x031647) }, + { "Europe/Madrid" , FOR_V2(0x080B38, 0x031A98) }, + { "Europe/Malta" , FOR_V2(0x08158A, 0x031E7D) }, + { "Europe/Mariehamn" , FOR_V2(0x081FD2, 0x032247) }, + { "Europe/Minsk" , FOR_V2(0x08274A, 0x03250E) }, + { "Europe/Monaco" , FOR_V2(0x082C7F, 0x032720) }, + { "Europe/Moscow" , FOR_V2(0x08380B, 0x032B6C) }, + { "Europe/Nicosia" , FOR_V2(0x083E2A, 0x032DEC) }, + { "Europe/Oslo" , FOR_V2(0x084608, 0x0330D4) }, + { "Europe/Paris" , FOR_V2(0x084EC8, 0x033412) }, + { "Europe/Podgorica" , FOR_V2(0x085A66, 0x033869) }, + { "Europe/Prague" , FOR_V2(0x0861F2, 0x033B39) }, + { "Europe/Riga" , FOR_V2(0x086AFB, 0x033E8D) }, + { "Europe/Rome" , FOR_V2(0x08739D, 0x0341D9) }, + { "Europe/Samara" , FOR_V2(0x087DFA, 0x0345A3) }, + { "Europe/San_Marino" , FOR_V2(0x0882DE, 0x0347A1) }, + { "Europe/Sarajevo" , FOR_V2(0x088D3B, 0x034B6B) }, + { "Europe/Saratov" , FOR_V2(0x0894C7, 0x034E3B) }, + { "Europe/Simferopol" , FOR_V2(0x089982, 0x035020) }, + { "Europe/Skopje" , FOR_V2(0x089F41, 0x03526F) }, + { "Europe/Sofia" , FOR_V2(0x08A6CD, 0x03553F) }, + { "Europe/Stockholm" , FOR_V2(0x08AEF6, 0x035846) }, + { "Europe/Tallinn" , FOR_V2(0x08B677, 0x035B06) }, + { "Europe/Tirane" , FOR_V2(0x08BEE7, 0x035E3F) }, + { "Europe/Tiraspol" , FOR_V2(0x08C717, 0x036145) }, + { "Europe/Ulyanovsk" , FOR_V2(0x08D079, 0x0364D4) }, + { "Europe/Uzhgorod" , FOR_V2(0x08D58A, 0x0366E1) }, + { "Europe/Vaduz" , FOR_V2(0x08DDA6, 0x0369FD) }, + { "Europe/Vatican" , FOR_V2(0x08E527, 0x036CBD) }, + { "Europe/Vienna" , FOR_V2(0x08EF84, 0x037087) }, + { "Europe/Vilnius" , FOR_V2(0x08F828, 0x0373BB) }, + { "Europe/Volgograd" , FOR_V2(0x0900A6, 0x037701) }, + { "Europe/Warsaw" , FOR_V2(0x090551, 0x0378DF) }, + { "Europe/Zagreb" , FOR_V2(0x090FBB, 0x037CC2) }, + { "Europe/Zaporozhye" , FOR_V2(0x091747, 0x037F92) }, + { "Europe/Zurich" , FOR_V2(0x091FA8, 0x0382D3) }, + { "Factory" , FOR_V2(0x092729, 0x038593) }, + { "GB" , FOR_V2(0x0927A9, 0x0385D5) }, + { "GB-Eire" , FOR_V2(0x0935F5, 0x038B10) }, + { "GMT" , FOR_V2(0x094441, 0x03904B) }, + { "GMT+0" , FOR_V2(0x0944BF, 0x03908D) }, + { "GMT-0" , FOR_V2(0x09453D, 0x0390CF) }, + { "GMT0" , FOR_V2(0x0945BB, 0x039111) }, + { "Greenwich" , FOR_V2(0x094639, 0x039153) }, + { "Hongkong" , FOR_V2(0x0946B7, 0x039195) }, + { "HST" , FOR_V2(0x094B76, 0x03936D) }, + { "Iceland" , FOR_V2(0x094BF5, 0x0393AF) }, + { "Indian/Antananarivo" , FOR_V2(0x09508B, 0x039575) }, + { "Indian/Chagos" , FOR_V2(0x095192, 0x0395F3) }, + { "Indian/Christmas" , FOR_V2(0x095265, 0x039658) }, + { "Indian/Cocos" , FOR_V2(0x095316, 0x0396AE) }, + { "Indian/Comoro" , FOR_V2(0x0953D0, 0x039706) }, + { "Indian/Kerguelen" , FOR_V2(0x0954D7, 0x039784) }, + { "Indian/Mahe" , FOR_V2(0x095588, 0x0397DA) }, + { "Indian/Maldives" , FOR_V2(0x095639, 0x039830) }, + { "Indian/Mauritius" , FOR_V2(0x09570C, 0x039895) }, + { "Indian/Mayotte" , FOR_V2(0x095809, 0x039909) }, + { "Indian/Reunion" , FOR_V2(0x095910, 0x039987) }, + { "Iran" , FOR_V2(0x0959C1, 0x0399DD) }, + { "Israel" , FOR_V2(0x0963E3, 0x039C4F) }, + { "Jamaica" , FOR_V2(0x096CDF, 0x039F9F) }, + { "Japan" , FOR_V2(0x096ECD, 0x03A06D) }, + { "Kwajalein" , FOR_V2(0x09700E, 0x03A0FE) }, + { "Libya" , FOR_V2(0x097156, 0x03A195) }, + { "MET" , FOR_V2(0x0973D3, 0x03A296) }, + { "Mexico/BajaNorte" , FOR_V2(0x097C0D, 0x03A59B) }, + { "Mexico/BajaSur" , FOR_V2(0x09853F, 0x03A904) }, + { "Mexico/General" , FOR_V2(0x098B41, 0x03AB45) }, + { "MST" , FOR_V2(0x09917D, 0x03AD99) }, + { "MST7MDT" , FOR_V2(0x0991FB, 0x03ADDB) }, + { "Navajo" , FOR_V2(0x099B0D, 0x03B134) }, + { "NZ" , FOR_V2(0x09A4A5, 0x03B4BE) }, + { "NZ-CHAT" , FOR_V2(0x09AE36, 0x03B846) }, + { "Pacific/Apia" , FOR_V2(0x09B656, 0x03BB41) }, + { "Pacific/Auckland" , FOR_V2(0x09BAAB, 0x03BCE9) }, + { "Pacific/Bougainville" , FOR_V2(0x09C454, 0x03C089) }, + { "Pacific/Chatham" , FOR_V2(0x09C578, 0x03C10E) }, + { "Pacific/Chuuk" , FOR_V2(0x09CDA7, 0x03C418) }, + { "Pacific/Easter" , FOR_V2(0x09CECF, 0x03C4A1) }, + { "Pacific/Efate" , FOR_V2(0x09D7A1, 0x03C7EE) }, + { "Pacific/Enderbury" , FOR_V2(0x09D97F, 0x03C8B2) }, + { "Pacific/Fakaofo" , FOR_V2(0x09DA84, 0x03C935) }, + { "Pacific/Fiji" , FOR_V2(0x09DB58, 0x03C99A) }, + { "Pacific/Funafuti" , FOR_V2(0x09DF99, 0x03CB30) }, + { "Pacific/Galapagos" , FOR_V2(0x09E04B, 0x03CB86) }, + { "Pacific/Gambier" , FOR_V2(0x09E156, 0x03CC0C) }, + { "Pacific/Guadalcanal" , FOR_V2(0x09E215, 0x03CC71) }, + { "Pacific/Guam" , FOR_V2(0x09E2C7, 0x03CCC7) }, + { "Pacific/Honolulu" , FOR_V2(0x09E4C1, 0x03CD96) }, + { "Pacific/Johnston" , FOR_V2(0x09E61C, 0x03CE3B) }, + { "Pacific/Kiritimati" , FOR_V2(0x09E771, 0x03CEDA) }, + { "Pacific/Kosrae" , FOR_V2(0x09E877, 0x03CF5C) }, + { "Pacific/Kwajalein" , FOR_V2(0x09E9E8, 0x03CFFF) }, + { "Pacific/Majuro" , FOR_V2(0x09EB39, 0x03D09F) }, + { "Pacific/Marquesas" , FOR_V2(0x09EC98, 0x03D14E) }, + { "Pacific/Midway" , FOR_V2(0x09ED62, 0x03D1B7) }, + { "Pacific/Nauru" , FOR_V2(0x09EE2B, 0x03D221) }, + { "Pacific/Niue" , FOR_V2(0x09EF33, 0x03D29C) }, + { "Pacific/Norfolk" , FOR_V2(0x09F030, 0x03D314) }, + { "Pacific/Noumea" , FOR_V2(0x09F3AC, 0x03D472) }, + { "Pacific/Pago_Pago" , FOR_V2(0x09F4E8, 0x03D501) }, + { "Pacific/Palau" , FOR_V2(0x09F5A3, 0x03D55D) }, + { "Pacific/Pitcairn" , FOR_V2(0x09F663, 0x03D5B3) }, + { "Pacific/Pohnpei" , FOR_V2(0x09F739, 0x03D61A) }, + { "Pacific/Ponape" , FOR_V2(0x09F882, 0x03D6B1) }, + { "Pacific/Port_Moresby" , FOR_V2(0x09F9BD, 0x03D73A) }, + { "Pacific/Rarotonga" , FOR_V2(0x09FAA0, 0x03D7AD) }, + { "Pacific/Saipan" , FOR_V2(0x09FCED, 0x03D89D) }, + { "Pacific/Samoa" , FOR_V2(0x09FEE7, 0x03D96C) }, + { "Pacific/Tahiti" , FOR_V2(0x09FFA2, 0x03D9C8) }, + { "Pacific/Tarawa" , FOR_V2(0x0A0062, 0x03DA2D) }, + { "Pacific/Tongatapu" , FOR_V2(0x0A0123, 0x03DA92) }, + { "Pacific/Truk" , FOR_V2(0x0A02A3, 0x03DB3D) }, + { "Pacific/Wake" , FOR_V2(0x0A03BC, 0x03DBB7) }, + { "Pacific/Wallis" , FOR_V2(0x0A0479, 0x03DC18) }, + { "Pacific/Yap" , FOR_V2(0x0A052B, 0x03DC6E) }, + { "Poland" , FOR_V2(0x0A0644, 0x03DCE8) }, + { "Portugal" , FOR_V2(0x0A10AE, 0x03E0CB) }, + { "PRC" , FOR_V2(0x0A1E47, 0x03E5D4) }, + { "PST8PDT" , FOR_V2(0x0A2084, 0x03E6BB) }, + { "ROC" , FOR_V2(0x0A2996, 0x03EA14) }, + { "ROK" , FOR_V2(0x0A2C9B, 0x03EB47) }, + { "Singapore" , FOR_V2(0x0A2F10, 0x03EC4A) }, + { "Turkey" , FOR_V2(0x0A309B, 0x03ECFF) }, + { "UCT" , FOR_V2(0x0A3842, 0x03EFEC) }, + { "Universal" , FOR_V2(0x0A38C0, 0x03F02E) }, + { "US/Alaska" , FOR_V2(0x0A393E, 0x03F070) }, + { "US/Aleutian" , FOR_V2(0x0A428D, 0x03F3E8) }, + { "US/Arizona" , FOR_V2(0x0A4BCD, 0x03F759) }, + { "US/Central" , FOR_V2(0x0A4D21, 0x03F7F0) }, + { "US/East-Indiana" , FOR_V2(0x0A5B25, 0x03FD14) }, + { "US/Eastern" , FOR_V2(0x0A61B3, 0x03FF8F) }, + { "US/Hawaii" , FOR_V2(0x0A6F8F, 0x04049F) }, + { "US/Indiana-Starke" , FOR_V2(0x0A70E4, 0x04053E) }, + { "US/Michigan" , FOR_V2(0x0A7A6C, 0x0408C8) }, + { "US/Mountain" , FOR_V2(0x0A832E, 0x040C09) }, + { "US/Pacific" , FOR_V2(0x0A8CC6, 0x040F93) }, + { "US/Pacific-New" , FOR_V2(0x0A97E6, 0x0413A9) }, + { "US/Samoa" , FOR_V2(0x0AA306, 0x0417BF) }, + { "UTC" , FOR_V2(0x0AA3C1, 0x04181B) }, + { "W-SU" , FOR_V2(0x0AA43F, 0x04185D) }, + { "WET" , FOR_V2(0x0AAA4A, 0x041AC9) }, + { "Zulu" , FOR_V2(0x0AB1C7, 0x041D8C) }, }; #ifdef TIMELIB_SUPPORTS_V2DATA -const unsigned char timelib_timezone_db_data_builtin[700443] = { +const unsigned char timelib_timezone_db_data_builtin[700997] = { #else -const unsigned char timelib_timezone_db_data_builtin[269539] = { +const unsigned char timelib_timezone_db_data_builtin[269774] = { #endif @@ -1051,15 +1052,15 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 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, 0xCE, 0x43, 0xA0, 0x5C, 0xFC, 0x68, 0x20, -0x5E, 0x9B, 0xB0, 0xA0, 0x5E, 0xC9, 0xD5, 0x20, 0x60, 0x72, 0x58, 0x20, 0x60, 0xA0, 0x7C, 0xA0, +0x5E, 0x9B, 0xB0, 0xA0, 0x5E, 0xD3, 0x0F, 0xA0, 0x60, 0x72, 0x58, 0x20, 0x60, 0xA0, 0x7C, 0xA0, 0x62, 0x3F, 0xC5, 0x20, 0x62, 0x77, 0x24, 0x20, 0x64, 0x16, 0x6C, 0xA0, 0x64, 0x44, 0x91, 0x20, 0x65, 0xED, 0x14, 0x20, 0x66, 0x1B, 0x38, 0xA0, 0x67, 0xBA, 0x81, 0x20, 0x67, 0xF1, 0xE0, 0x20, 0x69, 0x91, 0x28, 0xA0, 0x69, 0xBF, 0x4D, 0x20, 0x6B, 0x67, 0xD0, 0x20, 0x6B, 0x95, 0xF4, 0xA0, -0x6D, 0x35, 0x3D, 0x20, 0x6D, 0x63, 0x61, 0xA0, 0x6F, 0x0B, 0xE4, 0xA0, 0x6F, 0x3A, 0x09, 0x20, +0x6D, 0x35, 0x3D, 0x20, 0x6D, 0x6C, 0x9C, 0x20, 0x6F, 0x0B, 0xE4, 0xA0, 0x6F, 0x3A, 0x09, 0x20, 0x70, 0xD9, 0x51, 0xA0, 0x71, 0x10, 0xB0, 0xA0, 0x72, 0xAF, 0xF9, 0x20, 0x72, 0xDE, 0x1D, 0xA0, 0x74, 0x86, 0xA0, 0xA0, 0x74, 0xB4, 0xC5, 0x20, 0x76, 0x54, 0x0D, 0xA0, 0x76, 0x8B, 0x6C, 0xA0, 0x78, 0x2A, 0xB5, 0x20, 0x78, 0x58, 0xD9, 0xA0, 0x79, 0xF8, 0x22, 0x20, 0x7A, 0x2F, 0x81, 0x20, -0x7B, 0xCE, 0xC9, 0xA0, 0x7B, 0xFC, 0xEE, 0x20, 0x7D, 0xA5, 0x71, 0x20, 0x7D, 0xD3, 0x95, 0xA0, +0x7B, 0xCE, 0xC9, 0xA0, 0x7C, 0x06, 0x28, 0xA0, 0x7D, 0xA5, 0x71, 0x20, 0x7D, 0xD3, 0x95, 0xA0, 0x7F, 0x72, 0xDE, 0x20, 0x7F, 0xAA, 0x3D, 0x20, 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, @@ -1103,7 +1104,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 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, 0xCE, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xFC, 0x68, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x9B, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x5E, 0xC9, 0xD5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, +0x5E, 0xD3, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0xA0, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x62, 0x77, 0x24, 0x20, 0x00, 0x00, 0x00, 0x00, 0x64, 0x16, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x44, 0x91, 0x20, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x14, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -1111,7 +1112,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x67, 0xF1, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x69, 0x91, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xBF, 0x4D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x67, 0xD0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x95, 0xF4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x35, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, -0x6D, 0x63, 0x61, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x0B, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, +0x6D, 0x6C, 0x9C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x0B, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A, 0x09, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0xD9, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x10, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x72, 0xAF, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0xDE, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x86, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, @@ -1119,7 +1120,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x76, 0x8B, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x2A, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x78, 0x58, 0xD9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x2F, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7B, 0xFC, 0xEE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, +0x7C, 0x06, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xD3, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xAA, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x81, 0x49, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x81, 0x77, 0xAA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x20, 0x2D, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -1127,7 +1128,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x85, 0x24, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC4, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x86, 0xF2, 0x66, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x91, 0xAE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x88, 0xC9, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x68, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, -0x8A, 0x96, 0x7A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3E, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, +0x8A, 0x9F, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3E, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x6D, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x0C, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x43, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8F, 0xE3, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x90, 0x11, 0x36, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB9, 0xB9, 0xA0, 0x00, 0x00, 0x00, 0x00, @@ -1135,7 +1136,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x93, 0xBE, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5D, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x95, 0x8B, 0xF2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x97, 0x2B, 0x3B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x97, 0x62, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x99, 0x01, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x99, 0x30, 0x07, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD8, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, +0x99, 0x39, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD8, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x06, 0xAE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA5, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xDD, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x7C, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9E, 0xAA, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x53, 0x46, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -1143,28 +1144,28 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0xA2, 0x58, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA3, 0xF7, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA4, 0x25, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA5, 0xC4, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA5, 0xFC, 0x26, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA7, 0x9B, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, -0xA7, 0xC9, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA9, 0x72, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, +0xA7, 0xD2, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA9, 0x72, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA9, 0xA0, 0x3B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x3F, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x76, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x16, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x44, 0x4F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAE, 0xEC, 0xD2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAF, 0x1A, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xBA, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, -0xB0, 0xE8, 0x64, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x90, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, +0xB0, 0xF1, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x90, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB2, 0xBF, 0x0B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x5E, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x95, 0xB3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x34, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, -0xB6, 0x63, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x0B, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, +0xB6, 0x6C, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x0B, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x39, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD9, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBA, 0x10, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xAF, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xDD, 0xDC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x86, 0x5F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0xB4, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x53, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, -0xBF, 0x81, 0xF0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x2A, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, +0xBF, 0x8B, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x2A, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x58, 0x98, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xF7, 0xE0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC3, 0x2F, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC4, 0xCE, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, -0xC4, 0xFC, 0xAC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA5, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, +0xC5, 0x05, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA5, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xD3, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x72, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC8, 0xA9, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x49, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x77, 0x68, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1F, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x4E, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCD, 0xED, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, -0xCE, 0x1B, 0x7D, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xC4, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, +0xCE, 0x24, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xC4, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xF2, 0x24, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD1, 0x91, 0x6D, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xC8, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x68, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x96, 0x39, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x3E, 0xBC, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -1172,7 +1173,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0xD7, 0x43, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD8, 0xE2, 0xD0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD9, 0x10, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB9, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xE7, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x86, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00, -0xDC, 0xB5, 0x09, 0xA0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0xDC, 0xBE, 0x44, 0x20, 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, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, @@ -1429,15 +1430,15 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 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, 0xCE, 0x43, 0xA0, -0x5C, 0xFC, 0x68, 0x20, 0x5E, 0x9B, 0xB0, 0xA0, 0x5E, 0xC9, 0xD5, 0x20, 0x60, 0x72, 0x58, 0x20, +0x5C, 0xFC, 0x68, 0x20, 0x5E, 0x9B, 0xB0, 0xA0, 0x5E, 0xD3, 0x0F, 0xA0, 0x60, 0x72, 0x58, 0x20, 0x60, 0xA0, 0x7C, 0xA0, 0x62, 0x3F, 0xC5, 0x20, 0x62, 0x77, 0x24, 0x20, 0x64, 0x16, 0x6C, 0xA0, 0x64, 0x44, 0x91, 0x20, 0x65, 0xED, 0x14, 0x20, 0x66, 0x1B, 0x38, 0xA0, 0x67, 0xBA, 0x81, 0x20, 0x67, 0xF1, 0xE0, 0x20, 0x69, 0x91, 0x28, 0xA0, 0x69, 0xBF, 0x4D, 0x20, 0x6B, 0x67, 0xD0, 0x20, -0x6B, 0x95, 0xF4, 0xA0, 0x6D, 0x35, 0x3D, 0x20, 0x6D, 0x63, 0x61, 0xA0, 0x6F, 0x0B, 0xE4, 0xA0, +0x6B, 0x95, 0xF4, 0xA0, 0x6D, 0x35, 0x3D, 0x20, 0x6D, 0x6C, 0x9C, 0x20, 0x6F, 0x0B, 0xE4, 0xA0, 0x6F, 0x3A, 0x09, 0x20, 0x70, 0xD9, 0x51, 0xA0, 0x71, 0x10, 0xB0, 0xA0, 0x72, 0xAF, 0xF9, 0x20, 0x72, 0xDE, 0x1D, 0xA0, 0x74, 0x86, 0xA0, 0xA0, 0x74, 0xB4, 0xC5, 0x20, 0x76, 0x54, 0x0D, 0xA0, 0x76, 0x8B, 0x6C, 0xA0, 0x78, 0x2A, 0xB5, 0x20, 0x78, 0x58, 0xD9, 0xA0, 0x79, 0xF8, 0x22, 0x20, -0x7A, 0x2F, 0x81, 0x20, 0x7B, 0xCE, 0xC9, 0xA0, 0x7B, 0xFC, 0xEE, 0x20, 0x7D, 0xA5, 0x71, 0x20, +0x7A, 0x2F, 0x81, 0x20, 0x7B, 0xCE, 0xC9, 0xA0, 0x7C, 0x06, 0x28, 0xA0, 0x7D, 0xA5, 0x71, 0x20, 0x7D, 0xD3, 0x95, 0xA0, 0x7F, 0x72, 0xDE, 0x20, 0x7F, 0xAA, 0x3D, 0x20, 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, @@ -1475,7 +1476,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 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, 0xCE, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xFC, 0x68, 0x20, 0x00, 0x00, 0x00, 0x00, -0x5E, 0x9B, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xC9, 0xD5, 0x20, 0x00, 0x00, 0x00, 0x00, +0x5E, 0x9B, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xD3, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0xA0, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x62, 0x77, 0x24, 0x20, 0x00, 0x00, 0x00, 0x00, 0x64, 0x16, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x44, 0x91, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -1483,7 +1484,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x67, 0xBA, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x69, 0x91, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xBF, 0x4D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x67, 0xD0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x95, 0xF4, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x6D, 0x35, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x63, 0x61, 0xA0, 0x00, 0x00, 0x00, 0x00, +0x6D, 0x35, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x6C, 0x9C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x0B, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A, 0x09, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0xD9, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x10, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x72, 0xAF, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0xDE, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, @@ -1491,7 +1492,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x76, 0x54, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x8B, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x2A, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x78, 0x58, 0xD9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x2F, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, -0x7B, 0xCE, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xFC, 0xEE, 0x20, 0x00, 0x00, 0x00, 0x00, +0x7B, 0xCE, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x06, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xD3, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xAA, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x81, 0x49, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x81, 0x77, 0xAA, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -1499,7 +1500,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x84, 0xED, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x85, 0x24, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC4, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x86, 0xF2, 0x66, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x91, 0xAE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x88, 0xC9, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x8A, 0x68, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x96, 0x7A, 0xA0, 0x00, 0x00, 0x00, 0x00, +0x8A, 0x68, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x9F, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3E, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x6D, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x0C, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x43, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8F, 0xE3, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x90, 0x11, 0x36, 0xA0, 0x00, 0x00, 0x00, 0x00, @@ -1507,7 +1508,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x93, 0x87, 0x26, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x93, 0xBE, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5D, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x95, 0x8B, 0xF2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x97, 0x2B, 0x3B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x97, 0x62, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00, -0x99, 0x01, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x99, 0x30, 0x07, 0x20, 0x00, 0x00, 0x00, 0x00, +0x99, 0x01, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x99, 0x39, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD8, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x06, 0xAE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA5, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xDD, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x7C, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9E, 0xAA, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -1515,28 +1516,28 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0xA2, 0x20, 0xB3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x58, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA3, 0xF7, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA4, 0x25, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA5, 0xC4, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA5, 0xFC, 0x26, 0xA0, 0x00, 0x00, 0x00, 0x00, -0xA7, 0x9B, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA7, 0xC9, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00, +0xA7, 0x9B, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA7, 0xD2, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA9, 0x72, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA9, 0xA0, 0x3B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x3F, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x76, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x16, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x44, 0x4F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAE, 0xEC, 0xD2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAF, 0x1A, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, -0xB0, 0xBA, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xE8, 0x64, 0x20, 0x00, 0x00, 0x00, 0x00, +0xB0, 0xBA, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xF1, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x90, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB2, 0xBF, 0x0B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x5E, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x95, 0xB3, 0x20, 0x00, 0x00, 0x00, 0x00, -0xB6, 0x34, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x63, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, +0xB6, 0x34, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x6C, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x0B, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x39, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD9, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBA, 0x10, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xAF, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xDD, 0xDC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x86, 0x5F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0xB4, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, -0xBF, 0x53, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x81, 0xF0, 0xA0, 0x00, 0x00, 0x00, 0x00, +0xBF, 0x53, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x8B, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x2A, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x58, 0x98, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xF7, 0xE0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC3, 0x2F, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, -0xC4, 0xCE, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC4, 0xFC, 0xAC, 0xA0, 0x00, 0x00, 0x00, 0x00, +0xC4, 0xCE, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC5, 0x05, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA5, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xD3, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x72, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC8, 0xA9, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x49, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x77, 0x68, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1F, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x4E, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, -0xCD, 0xED, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x1B, 0x7D, 0x20, 0x00, 0x00, 0x00, 0x00, +0xCD, 0xED, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x24, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xC4, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xF2, 0x24, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD1, 0x91, 0x6D, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xC8, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x68, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x96, 0x39, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -1544,7 +1545,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0xD7, 0x0C, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x43, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD8, 0xE2, 0xD0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD9, 0x10, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB9, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xE7, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, -0xDC, 0x86, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDC, 0xB5, 0x09, 0xA0, 0x01, 0x03, 0x02, 0x03, +0xDC, 0x86, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDC, 0xBE, 0x44, 0x20, 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, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, @@ -5687,8 +5688,8 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { /* America/Dawson */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x80, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x25, 0x80, 0x00, 0x00, 0x00, 0x9E, 0xB8, 0xCB, 0xB0, 0x9F, 0xBB, 0x23, 0xA0, 0xA0, 0xD0, 0x0C, 0xB0, 0xA1, 0xA2, 0xD2, 0x80, 0xCB, 0x89, 0x28, 0xB0, 0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x34, 0x20, 0xF7, 0x2F, 0x76, 0x90, 0xF8, 0x28, 0xA2, 0x10, 0x07, 0x30, 0xEC, 0x90, 0x13, 0x69, 0x72, 0x20, 0x14, 0x59, 0x55, 0x10, @@ -5711,34 +5712,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x51, 0x3C, 0x59, 0xA0, 0x52, 0x76, 0x10, 0x90, 0x53, 0x1C, 0x3B, 0xA0, 0x54, 0x55, 0xF2, 0x90, 0x54, 0xFC, 0x1D, 0xA0, 0x56, 0x35, 0xD4, 0x90, 0x56, 0xE5, 0x3A, 0x20, 0x58, 0x1E, 0xF1, 0x10, 0x58, 0xC5, 0x1C, 0x20, 0x59, 0xFE, 0xD3, 0x10, 0x5A, 0xA4, 0xFE, 0x20, 0x5B, 0xDE, 0xB5, 0x10, -0x5C, 0x84, 0xE0, 0x20, 0x5D, 0xBE, 0x97, 0x10, 0x5E, 0x64, 0xC2, 0x20, 0x5F, 0x9E, 0x79, 0x10, -0x60, 0x4D, 0xDE, 0xA0, 0x61, 0x87, 0x95, 0x90, 0x62, 0x2D, 0xC0, 0xA0, 0x63, 0x67, 0x77, 0x90, -0x64, 0x0D, 0xA2, 0xA0, 0x65, 0x47, 0x59, 0x90, 0x65, 0xED, 0x84, 0xA0, 0x67, 0x27, 0x3B, 0x90, -0x67, 0xCD, 0x66, 0xA0, 0x69, 0x07, 0x1D, 0x90, 0x69, 0xAD, 0x48, 0xA0, 0x6A, 0xE6, 0xFF, 0x90, -0x6B, 0x96, 0x65, 0x20, 0x6C, 0xD0, 0x1C, 0x10, 0x6D, 0x76, 0x47, 0x20, 0x6E, 0xAF, 0xFE, 0x10, -0x6F, 0x56, 0x29, 0x20, 0x70, 0x8F, 0xE0, 0x10, 0x71, 0x36, 0x0B, 0x20, 0x72, 0x6F, 0xC2, 0x10, -0x73, 0x15, 0xED, 0x20, 0x74, 0x4F, 0xA4, 0x10, 0x74, 0xFF, 0x09, 0xA0, 0x76, 0x38, 0xC0, 0x90, -0x76, 0xDE, 0xEB, 0xA0, 0x78, 0x18, 0xA2, 0x90, 0x78, 0xBE, 0xCD, 0xA0, 0x79, 0xF8, 0x84, 0x90, -0x7A, 0x9E, 0xAF, 0xA0, 0x7B, 0xD8, 0x66, 0x90, 0x7C, 0x7E, 0x91, 0xA0, 0x7D, 0xB8, 0x48, 0x90, -0x7E, 0x5E, 0x73, 0xA0, 0x7F, 0x98, 0x2A, 0x90, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, -0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x5C, 0x84, 0xE0, 0x20, 0x5D, 0xBE, 0x97, 0x10, 0x5E, 0x64, 0xC2, 0x20, 0x02, 0x01, 0x02, 0x01, +0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0xFF, 0xFF, 0x7D, 0x4C, 0x00, 0x00, 0xFF, 0xFF, 0x8F, -0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, 0xFF, -0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, 0x00, -0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, -0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, -0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x08, 0xFF, 0xFF, 0x7D, 0x4C, 0x00, 0x00, 0xFF, 0xFF, +0x8F, 0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, +0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, +0x00, 0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x21, 0x4C, 0x4D, +0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, +0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x4D, +0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, #ifdef TIMELIB_SUPPORTS_V2DATA 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0xFF, 0xFF, 0xFF, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x25, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0x86, 0x8E, 0xB4, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0xCB, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x23, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0xD0, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xA2, 0xD2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x28, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, @@ -5784,44 +5775,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, -0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00, -0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x61, 0x87, 0x95, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x63, 0x67, 0x77, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x65, 0x47, 0x59, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x67, 0x27, 0x3B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x69, 0x07, 0x1D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, -0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, -0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, -0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, -0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00, -0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x76, 0x38, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x78, 0x18, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x79, 0xF8, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7F, 0x98, 0x2A, 0x90, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x02, 0x01, 0x02, 0x01, +0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0xFF, 0xFF, 0x7D, 0x4C, 0x00, 0x00, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x04, 0xFF, -0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, 0xFF, 0xFF, 0x8F, 0x80, 0x01, -0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x19, 0xFF, 0xFF, 0x9D, -0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, -0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, -0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x01, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x53, 0x54, 0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, -0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, -#endif -0x00, 0xEB, 0x16, 0x4A, 0x00, 0x3D, 0xEC, 0xDD, 0x00, 0x00, 0x00, 0x17, 0x50, 0x61, 0x63, 0x69, -0x66, 0x69, 0x63, 0x20, 0x2D, 0x20, 0x59, 0x75, 0x6B, 0x6F, 0x6E, 0x20, 0x28, 0x6E, 0x6F, 0x72, -0x74, 0x68, 0x29, +0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x08, 0xFF, 0xFF, 0x7D, 0x4C, 0x00, 0x00, 0xFF, 0xFF, +0x8F, 0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, +0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, +0x00, 0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x21, 0x4C, 0x4D, +0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, +0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x4D, +0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x0A, +#endif +0x00, 0xEB, 0x16, 0x4A, 0x00, 0x3D, 0xEC, 0xDD, 0x00, 0x00, 0x00, 0x16, 0x50, 0x61, 0x63, 0x69, +0x66, 0x69, 0x63, 0x20, 0x2D, 0x20, 0x59, 0x75, 0x6B, 0x6F, 0x6E, 0x20, 0x28, 0x77, 0x65, 0x73, +0x74, 0x29, /* America/Dawson_Creek */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -7051,7 +7022,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x42, 0x72, 0x65, 0x74, 0x6F, 0x6E, 0x29, /* America/Godthab */ -0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 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, 0x76, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0C, 0x9B, 0x80, 0x68, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x14, 0x33, 0xFA, 0x90, 0x15, 0x23, 0xEB, 0x90, 0x16, 0x13, 0xDC, 0x90, @@ -7171,9 +7142,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x32, 0x3E, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x2D, 0x32, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x2D, 0x31, 0x0A, #endif -0x00, 0xEB, 0x43, 0xDD, 0x00, 0xC3, 0xB8, 0x2A, 0x00, 0x00, 0x00, 0x16, 0x47, 0x72, 0x65, 0x65, -0x6E, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, -0x73, 0x29, +0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, /* America/Goose_Bay */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -13386,6 +13355,131 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x72, 0x61, 0x6C, 0x20, 0x2D, 0x20, 0x4E, 0x44, 0x20, 0x28, 0x4D, 0x6F, 0x72, 0x74, 0x6F, 0x6E, 0x20, 0x72, 0x75, 0x72, 0x61, 0x6C, 0x29, +/* America/Nuuk */ +0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x4C, 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, 0x76, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0C, 0x9B, 0x80, 0x68, 0x00, +0x13, 0x4D, 0x7C, 0x50, 0x14, 0x33, 0xFA, 0x90, 0x15, 0x23, 0xEB, 0x90, 0x16, 0x13, 0xDC, 0x90, +0x17, 0x03, 0xCD, 0x90, 0x17, 0xF3, 0xBE, 0x90, 0x18, 0xE3, 0xAF, 0x90, 0x19, 0xD3, 0xA0, 0x90, +0x1A, 0xC3, 0x91, 0x90, 0x1B, 0xBC, 0xBD, 0x10, 0x1C, 0xAC, 0xAE, 0x10, 0x1D, 0x9C, 0x9F, 0x10, +0x1E, 0x8C, 0x90, 0x10, 0x1F, 0x7C, 0x81, 0x10, 0x20, 0x6C, 0x72, 0x10, 0x21, 0x5C, 0x63, 0x10, +0x22, 0x4C, 0x54, 0x10, 0x23, 0x3C, 0x45, 0x10, 0x24, 0x2C, 0x36, 0x10, 0x25, 0x1C, 0x27, 0x10, +0x26, 0x0C, 0x18, 0x10, 0x27, 0x05, 0x43, 0x90, 0x27, 0xF5, 0x34, 0x90, 0x28, 0xE5, 0x25, 0x90, +0x29, 0xD5, 0x16, 0x90, 0x2A, 0xC5, 0x07, 0x90, 0x2B, 0xB4, 0xF8, 0x90, 0x2C, 0xA4, 0xE9, 0x90, +0x2D, 0x94, 0xDA, 0x90, 0x2E, 0x84, 0xCB, 0x90, 0x2F, 0x74, 0xBC, 0x90, 0x30, 0x64, 0xAD, 0x90, +0x31, 0x5D, 0xD9, 0x10, 0x32, 0x72, 0xB4, 0x10, 0x33, 0x3D, 0xBB, 0x10, 0x34, 0x52, 0x96, 0x10, +0x35, 0x1D, 0x9D, 0x10, 0x36, 0x32, 0x78, 0x10, 0x36, 0xFD, 0x7F, 0x10, 0x38, 0x1B, 0x94, 0x90, +0x38, 0xDD, 0x61, 0x10, 0x39, 0xFB, 0x76, 0x90, 0x3A, 0xBD, 0x43, 0x10, 0x3B, 0xDB, 0x58, 0x90, +0x3C, 0xA6, 0x5F, 0x90, 0x3D, 0xBB, 0x3A, 0x90, 0x3E, 0x86, 0x41, 0x90, 0x3F, 0x9B, 0x1C, 0x90, +0x40, 0x66, 0x23, 0x90, 0x41, 0x84, 0x39, 0x10, 0x42, 0x46, 0x05, 0x90, 0x43, 0x64, 0x1B, 0x10, +0x44, 0x25, 0xE7, 0x90, 0x45, 0x43, 0xFD, 0x10, 0x46, 0x05, 0xC9, 0x90, 0x47, 0x23, 0xDF, 0x10, +0x47, 0xEE, 0xE6, 0x10, 0x49, 0x03, 0xC1, 0x10, 0x49, 0xCE, 0xC8, 0x10, 0x4A, 0xE3, 0xA3, 0x10, +0x4B, 0xAE, 0xAA, 0x10, 0x4C, 0xCC, 0xBF, 0x90, 0x4D, 0x8E, 0x8C, 0x10, 0x4E, 0xAC, 0xA1, 0x90, +0x4F, 0x6E, 0x6E, 0x10, 0x50, 0x8C, 0x83, 0x90, 0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90, +0x53, 0x37, 0x6C, 0x90, 0x54, 0x4C, 0x47, 0x90, 0x55, 0x17, 0x4E, 0x90, 0x56, 0x2C, 0x29, 0x90, +0x56, 0xF7, 0x30, 0x90, 0x58, 0x15, 0x46, 0x10, 0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10, +0x5A, 0xB6, 0xF4, 0x90, 0x5B, 0xD5, 0x0A, 0x10, 0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10, +0x5E, 0x7F, 0xF3, 0x10, 0x5F, 0x94, 0xCE, 0x10, 0x60, 0x5F, 0xD5, 0x10, 0x61, 0x7D, 0xEA, 0x90, +0x62, 0x3F, 0xB7, 0x10, 0x63, 0x5D, 0xCC, 0x90, 0x64, 0x1F, 0x99, 0x10, 0x65, 0x3D, 0xAE, 0x90, +0x66, 0x08, 0xB5, 0x90, 0x67, 0x1D, 0x90, 0x90, 0x67, 0xE8, 0x97, 0x90, 0x68, 0xFD, 0x72, 0x90, +0x69, 0xC8, 0x79, 0x90, 0x6A, 0xDD, 0x54, 0x90, 0x6B, 0xA8, 0x5B, 0x90, 0x6C, 0xC6, 0x71, 0x10, +0x6D, 0x88, 0x3D, 0x90, 0x6E, 0xA6, 0x53, 0x10, 0x6F, 0x68, 0x1F, 0x90, 0x70, 0x86, 0x35, 0x10, +0x71, 0x51, 0x3C, 0x10, 0x72, 0x66, 0x17, 0x10, 0x73, 0x31, 0x1E, 0x10, 0x74, 0x45, 0xF9, 0x10, +0x75, 0x11, 0x00, 0x10, 0x76, 0x2F, 0x15, 0x90, 0x76, 0xF0, 0xE2, 0x10, 0x78, 0x0E, 0xF7, 0x90, +0x78, 0xD0, 0xC4, 0x10, 0x79, 0xEE, 0xD9, 0x90, 0x7A, 0xB0, 0xA6, 0x10, 0x7B, 0xCE, 0xBB, 0x90, +0x7C, 0x99, 0xC2, 0x90, 0x7D, 0xAE, 0x9D, 0x90, 0x7E, 0x79, 0xA4, 0x90, 0x7F, 0x8E, 0x7F, 0x90, +0x7F, 0xFF, 0xFF, 0xFF, 0x01, 0x04, 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, 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, 0x02, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, +0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, +0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, +0x2D, 0x30, 0x32, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, +#ifdef TIMELIB_SUPPORTS_V2DATA +0x54, 0x5A, 0x69, 0x66, 0x33, 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, 0x76, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, +0x9B, 0x80, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00, +0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, +0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, +0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, +0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, +0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, +0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, +0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, +0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, +0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, +0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, +0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, +0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, +0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, +0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, +0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, +0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, +0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, +0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, +0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, +0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, +0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, +0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, +0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, +0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, +0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, +0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, +0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, +0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, +0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, +0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, +0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, +0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, +0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, +0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, +0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, +0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, +0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, +0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, +0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, +0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, +0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, +0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, +0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, +0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, +0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, +0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, +0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, +0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, +0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, +0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, +0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, +0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, +0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, +0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, +0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, +0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, +0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, +0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x01, 0x04, 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, 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, 0x02, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, +0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, +0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x2D, 0x30, 0x32, 0x00, 0x00, 0x00, 0x01, 0x01, +0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x33, 0x3E, 0x33, 0x3C, 0x2D, 0x30, +0x32, 0x3E, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x2D, 0x32, 0x2C, 0x4D, 0x31, 0x30, +0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x2D, 0x31, 0x0A, +#endif +0x00, 0xEB, 0x43, 0xDD, 0x00, 0xC3, 0xB8, 0x2A, 0x00, 0x00, 0x00, 0x16, 0x47, 0x72, 0x65, 0x65, +0x6E, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, +0x73, 0x29, + /* America/Ojinaga */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -16828,8 +16922,8 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { /* America/Whitehorse */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x80, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x25, 0x80, 0x00, 0x00, 0x00, 0x9E, 0xB8, 0xCB, 0xB0, 0x9F, 0xBB, 0x23, 0xA0, 0xA0, 0xD0, 0x0C, 0xB0, 0xA1, 0xA2, 0xD2, 0x80, 0xCB, 0x89, 0x28, 0xB0, 0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x34, 0x20, 0xF7, 0x2F, 0x76, 0x90, 0xF8, 0x28, 0xA2, 0x10, 0xFB, 0x1D, 0x5F, 0x10, 0x13, 0x69, 0x72, 0x20, 0x14, 0x59, 0x55, 0x10, @@ -16852,34 +16946,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x51, 0x3C, 0x59, 0xA0, 0x52, 0x76, 0x10, 0x90, 0x53, 0x1C, 0x3B, 0xA0, 0x54, 0x55, 0xF2, 0x90, 0x54, 0xFC, 0x1D, 0xA0, 0x56, 0x35, 0xD4, 0x90, 0x56, 0xE5, 0x3A, 0x20, 0x58, 0x1E, 0xF1, 0x10, 0x58, 0xC5, 0x1C, 0x20, 0x59, 0xFE, 0xD3, 0x10, 0x5A, 0xA4, 0xFE, 0x20, 0x5B, 0xDE, 0xB5, 0x10, -0x5C, 0x84, 0xE0, 0x20, 0x5D, 0xBE, 0x97, 0x10, 0x5E, 0x64, 0xC2, 0x20, 0x5F, 0x9E, 0x79, 0x10, -0x60, 0x4D, 0xDE, 0xA0, 0x61, 0x87, 0x95, 0x90, 0x62, 0x2D, 0xC0, 0xA0, 0x63, 0x67, 0x77, 0x90, -0x64, 0x0D, 0xA2, 0xA0, 0x65, 0x47, 0x59, 0x90, 0x65, 0xED, 0x84, 0xA0, 0x67, 0x27, 0x3B, 0x90, -0x67, 0xCD, 0x66, 0xA0, 0x69, 0x07, 0x1D, 0x90, 0x69, 0xAD, 0x48, 0xA0, 0x6A, 0xE6, 0xFF, 0x90, -0x6B, 0x96, 0x65, 0x20, 0x6C, 0xD0, 0x1C, 0x10, 0x6D, 0x76, 0x47, 0x20, 0x6E, 0xAF, 0xFE, 0x10, -0x6F, 0x56, 0x29, 0x20, 0x70, 0x8F, 0xE0, 0x10, 0x71, 0x36, 0x0B, 0x20, 0x72, 0x6F, 0xC2, 0x10, -0x73, 0x15, 0xED, 0x20, 0x74, 0x4F, 0xA4, 0x10, 0x74, 0xFF, 0x09, 0xA0, 0x76, 0x38, 0xC0, 0x90, -0x76, 0xDE, 0xEB, 0xA0, 0x78, 0x18, 0xA2, 0x90, 0x78, 0xBE, 0xCD, 0xA0, 0x79, 0xF8, 0x84, 0x90, -0x7A, 0x9E, 0xAF, 0xA0, 0x7B, 0xD8, 0x66, 0x90, 0x7C, 0x7E, 0x91, 0xA0, 0x7D, 0xB8, 0x48, 0x90, -0x7E, 0x5E, 0x73, 0xA0, 0x7F, 0x98, 0x2A, 0x90, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, -0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x5C, 0x84, 0xE0, 0x20, 0x5D, 0xBE, 0x97, 0x10, 0x5E, 0x64, 0xC2, 0x20, 0x02, 0x01, 0x02, 0x01, +0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, 0x8F, -0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, 0xFF, -0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, 0x00, -0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, -0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, -0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x08, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, +0x8F, 0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, +0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, +0x00, 0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x21, 0x4C, 0x4D, +0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, +0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x4D, +0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, #ifdef TIMELIB_SUPPORTS_V2DATA 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0xFF, 0xFF, 0xFF, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x25, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0x86, 0x8A, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0xCB, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x23, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0xD0, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xA2, 0xD2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x28, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, @@ -16925,44 +17009,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, -0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00, -0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x61, 0x87, 0x95, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x63, 0x67, 0x77, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x65, 0x47, 0x59, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x67, 0x27, 0x3B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x69, 0x07, 0x1D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, -0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, -0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, -0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, -0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00, -0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x76, 0x38, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x78, 0x18, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x79, 0xF8, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7F, 0x98, 0x2A, 0x90, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x02, 0x01, 0x02, 0x01, +0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x04, 0xFF, -0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, 0xFF, 0xFF, 0x8F, 0x80, 0x01, -0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x19, 0xFF, 0xFF, 0x9D, -0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, -0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, -0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x01, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x53, 0x54, 0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, -0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, -#endif -0x00, 0xE5, 0xF9, 0xB2, 0x00, 0x44, 0x96, 0x97, 0x00, 0x00, 0x00, 0x17, 0x50, 0x61, 0x63, 0x69, -0x66, 0x69, 0x63, 0x20, 0x2D, 0x20, 0x59, 0x75, 0x6B, 0x6F, 0x6E, 0x20, 0x28, 0x73, 0x6F, 0x75, -0x74, 0x68, 0x29, +0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x08, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, +0x8F, 0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, +0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, +0x00, 0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x21, 0x4C, 0x4D, +0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, +0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x4D, +0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x0A, +#endif +0x00, 0xE5, 0xF9, 0xB2, 0x00, 0x44, 0x96, 0x97, 0x00, 0x00, 0x00, 0x16, 0x50, 0x61, 0x63, 0x69, +0x66, 0x69, 0x63, 0x20, 0x2D, 0x20, 0x59, 0x75, 0x6B, 0x6F, 0x6E, 0x20, 0x28, 0x65, 0x61, 0x73, +0x74, 0x29, /* America/Winnipeg */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -19570,23 +19634,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { /* Asia/Chongqing */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, -0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, 0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, -0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, 0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, -0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, 0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, -0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, 0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, -0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, 0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, -0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, 0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, -0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, +0xA0, 0x97, 0xA2, 0x80, 0xA1, 0x79, 0x04, 0xF0, 0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, +0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, 0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, +0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, 0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, +0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, 0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, +0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, 0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, +0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, 0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, +0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, 0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, -0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, -0x00, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x71, +0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, +0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, #ifdef TIMELIB_SUPPORTS_V2DATA 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, -0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, +0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x97, 0xA2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0xA1, 0x79, 0x04, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x09, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xD3, 0xBD, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x05, 0x8A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x7C, 0x40, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x3B, 0x3E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x8B, 0x7B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, @@ -19600,33 +19665,34 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x25, 0x12, 0x7C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x27, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0x5E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x28, 0x07, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0x40, 0x10, 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, 0x00, -0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, -0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, 0x43, 0x53, -0x54, 0x2D, 0x38, 0x0A, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, +0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, +0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A, #endif 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, /* Asia/Chungking */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, -0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, 0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, -0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, 0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, -0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, 0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, -0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, 0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, -0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, 0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, -0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, 0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, -0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, +0xA0, 0x97, 0xA2, 0x80, 0xA1, 0x79, 0x04, 0xF0, 0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, +0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, 0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, +0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, 0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, +0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, 0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, +0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, 0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, +0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, 0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, +0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, 0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, -0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, -0x00, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x71, +0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, +0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, #ifdef TIMELIB_SUPPORTS_V2DATA 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, -0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, +0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x97, 0xA2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0xA1, 0x79, 0x04, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x09, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xD3, 0xBD, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x05, 0x8A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x7C, 0x40, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x3B, 0x3E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x8B, 0x7B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, @@ -19640,10 +19706,10 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x25, 0x12, 0x7C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x27, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0x5E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x28, 0x07, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0x40, 0x10, 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, 0x00, -0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, -0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, 0x43, 0x53, -0x54, 0x2D, 0x38, 0x0A, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, +0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, +0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A, #endif 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, @@ -20247,23 +20313,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { /* Asia/Harbin */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, -0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, 0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, -0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, 0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, -0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, 0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, -0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, 0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, -0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, 0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, -0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, 0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, -0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, +0xA0, 0x97, 0xA2, 0x80, 0xA1, 0x79, 0x04, 0xF0, 0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, +0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, 0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, +0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, 0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, +0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, 0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, +0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, 0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, +0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, 0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, +0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, 0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, -0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, -0x00, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x71, +0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, +0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, #ifdef TIMELIB_SUPPORTS_V2DATA 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, -0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, +0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x97, 0xA2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0xA1, 0x79, 0x04, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x09, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xD3, 0xBD, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x05, 0x8A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x7C, 0x40, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x3B, 0x3E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x8B, 0x7B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, @@ -20277,10 +20344,10 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x25, 0x12, 0x7C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x27, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0x5E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x28, 0x07, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0x40, 0x10, 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, 0x00, -0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, -0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, 0x43, 0x53, -0x54, 0x2D, 0x38, 0x0A, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, +0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, +0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A, #endif 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, @@ -22727,23 +22794,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { /* Asia/Shanghai */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, -0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, 0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, -0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, 0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, -0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, 0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, -0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, 0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, -0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, 0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, -0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, 0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, -0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, +0xA0, 0x97, 0xA2, 0x80, 0xA1, 0x79, 0x04, 0xF0, 0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, +0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, 0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, +0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, 0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, +0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, 0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, +0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, 0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, +0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, 0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, +0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, 0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, -0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, -0x00, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x71, +0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, +0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, #ifdef TIMELIB_SUPPORTS_V2DATA 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, -0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, +0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x97, 0xA2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0xA1, 0x79, 0x04, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x09, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xD3, 0xBD, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x05, 0x8A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x7C, 0x40, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x3B, 0x3E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x8B, 0x7B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, @@ -22757,10 +22825,10 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x25, 0x12, 0x7C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x27, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0x5E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x28, 0x07, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0x40, 0x10, 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, 0x00, -0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, -0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, 0x43, 0x53, -0x54, 0x2D, 0x38, 0x0A, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, +0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, +0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A, #endif 0x00, 0xB8, 0xFC, 0xC5, 0x01, 0xCC, 0x00, 0x6A, 0x00, 0x00, 0x00, 0x0C, 0x42, 0x65, 0x69, 0x6A, 0x69, 0x6E, 0x67, 0x20, 0x54, 0x69, 0x6D, 0x65, @@ -29352,8 +29420,8 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { /* Canada/Yukon */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x80, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x25, 0x80, 0x00, 0x00, 0x00, 0x9E, 0xB8, 0xCB, 0xB0, 0x9F, 0xBB, 0x23, 0xA0, 0xA0, 0xD0, 0x0C, 0xB0, 0xA1, 0xA2, 0xD2, 0x80, 0xCB, 0x89, 0x28, 0xB0, 0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x34, 0x20, 0xF7, 0x2F, 0x76, 0x90, 0xF8, 0x28, 0xA2, 0x10, 0xFB, 0x1D, 0x5F, 0x10, 0x13, 0x69, 0x72, 0x20, 0x14, 0x59, 0x55, 0x10, @@ -29376,34 +29444,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x51, 0x3C, 0x59, 0xA0, 0x52, 0x76, 0x10, 0x90, 0x53, 0x1C, 0x3B, 0xA0, 0x54, 0x55, 0xF2, 0x90, 0x54, 0xFC, 0x1D, 0xA0, 0x56, 0x35, 0xD4, 0x90, 0x56, 0xE5, 0x3A, 0x20, 0x58, 0x1E, 0xF1, 0x10, 0x58, 0xC5, 0x1C, 0x20, 0x59, 0xFE, 0xD3, 0x10, 0x5A, 0xA4, 0xFE, 0x20, 0x5B, 0xDE, 0xB5, 0x10, -0x5C, 0x84, 0xE0, 0x20, 0x5D, 0xBE, 0x97, 0x10, 0x5E, 0x64, 0xC2, 0x20, 0x5F, 0x9E, 0x79, 0x10, -0x60, 0x4D, 0xDE, 0xA0, 0x61, 0x87, 0x95, 0x90, 0x62, 0x2D, 0xC0, 0xA0, 0x63, 0x67, 0x77, 0x90, -0x64, 0x0D, 0xA2, 0xA0, 0x65, 0x47, 0x59, 0x90, 0x65, 0xED, 0x84, 0xA0, 0x67, 0x27, 0x3B, 0x90, -0x67, 0xCD, 0x66, 0xA0, 0x69, 0x07, 0x1D, 0x90, 0x69, 0xAD, 0x48, 0xA0, 0x6A, 0xE6, 0xFF, 0x90, -0x6B, 0x96, 0x65, 0x20, 0x6C, 0xD0, 0x1C, 0x10, 0x6D, 0x76, 0x47, 0x20, 0x6E, 0xAF, 0xFE, 0x10, -0x6F, 0x56, 0x29, 0x20, 0x70, 0x8F, 0xE0, 0x10, 0x71, 0x36, 0x0B, 0x20, 0x72, 0x6F, 0xC2, 0x10, -0x73, 0x15, 0xED, 0x20, 0x74, 0x4F, 0xA4, 0x10, 0x74, 0xFF, 0x09, 0xA0, 0x76, 0x38, 0xC0, 0x90, -0x76, 0xDE, 0xEB, 0xA0, 0x78, 0x18, 0xA2, 0x90, 0x78, 0xBE, 0xCD, 0xA0, 0x79, 0xF8, 0x84, 0x90, -0x7A, 0x9E, 0xAF, 0xA0, 0x7B, 0xD8, 0x66, 0x90, 0x7C, 0x7E, 0x91, 0xA0, 0x7D, 0xB8, 0x48, 0x90, -0x7E, 0x5E, 0x73, 0xA0, 0x7F, 0x98, 0x2A, 0x90, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, -0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x5C, 0x84, 0xE0, 0x20, 0x5D, 0xBE, 0x97, 0x10, 0x5E, 0x64, 0xC2, 0x20, 0x02, 0x01, 0x02, 0x01, +0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, 0x8F, -0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, 0xFF, -0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, 0x00, -0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, -0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, -0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x08, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, +0x8F, 0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, +0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, +0x00, 0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x21, 0x4C, 0x4D, +0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, +0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x4D, +0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, #ifdef TIMELIB_SUPPORTS_V2DATA 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0xFF, 0xFF, 0xFF, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x25, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0x86, 0x8A, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0xCB, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x23, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0xD0, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xA2, 0xD2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x28, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, @@ -29449,40 +29507,20 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, -0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00, -0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x61, 0x87, 0x95, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x63, 0x67, 0x77, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x65, 0x47, 0x59, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x67, 0x27, 0x3B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x69, 0x07, 0x1D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, -0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, -0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, -0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, -0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00, -0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x76, 0x38, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x78, 0x18, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x79, 0xF8, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7F, 0x98, 0x2A, 0x90, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x02, 0x01, 0x02, 0x01, +0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x04, 0xFF, -0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, 0xFF, 0xFF, 0x8F, 0x80, 0x01, -0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x19, 0xFF, 0xFF, 0x9D, -0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, -0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, -0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x01, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x53, 0x54, 0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, -0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, +0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x08, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, +0x8F, 0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, +0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, +0x00, 0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x21, 0x4C, 0x4D, +0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, +0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x4D, +0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x0A, #endif 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, @@ -38361,8 +38399,8 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x4B, 0x2D, 0x33, 0x0A, #endif -0x00, 0xCD, 0xEA, 0xD7, 0x01, 0x46, 0xB0, 0xD0, 0x00, 0x00, 0x00, 0x0F, 0x4D, 0x53, 0x4B, 0x2B, -0x30, 0x30, 0x20, 0x2D, 0x20, 0x43, 0x72, 0x69, 0x6D, 0x65, 0x61, +0x00, 0xCD, 0xEA, 0xD7, 0x01, 0x46, 0xB0, 0xD0, 0x00, 0x00, 0x00, 0x06, 0x43, 0x72, 0x69, 0x6D, +0x65, 0x61, /* Europe/Skopje */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -39402,8 +39440,8 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A, #endif -0x00, 0xD3, 0x83, 0x22, 0x01, 0x34, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x08, 0x52, 0x75, 0x74, 0x68, -0x65, 0x6E, 0x69, 0x61, +0x00, 0xD3, 0x83, 0x22, 0x01, 0x34, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x0E, 0x54, 0x72, 0x61, 0x6E, +0x73, 0x63, 0x61, 0x72, 0x70, 0x61, 0x74, 0x68, 0x69, 0x61, /* Europe/Vaduz */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4C, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -40498,10 +40536,9 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A, #endif -0x00, 0xD2, 0x51, 0x25, 0x01, 0x48, 0x51, 0x7A, 0x00, 0x00, 0x00, 0x2E, 0x5A, 0x61, 0x70, 0x6F, -0x72, 0x6F, 0x7A, 0x68, 0x27, 0x79, 0x65, 0x2F, 0x5A, 0x61, 0x70, 0x6F, 0x72, 0x69, 0x7A, 0x68, -0x69, 0x61, 0x3B, 0x20, 0x4C, 0x75, 0x67, 0x61, 0x6E, 0x73, 0x6B, 0x2F, 0x4C, 0x75, 0x68, 0x61, -0x6E, 0x73, 0x6B, 0x20, 0x28, 0x65, 0x61, 0x73, 0x74, 0x29, +0x00, 0xD2, 0x51, 0x25, 0x01, 0x48, 0x51, 0x7A, 0x00, 0x00, 0x00, 0x1B, 0x5A, 0x61, 0x70, 0x6F, +0x72, 0x6F, 0x7A, 0x68, 0x79, 0x65, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x65, 0x61, 0x73, 0x74, 0x20, +0x4C, 0x75, 0x67, 0x61, 0x6E, 0x73, 0x6B, /* Europe/Zurich */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -45004,23 +45041,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { /* PRC */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, -0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, 0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, -0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, 0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, -0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, 0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, -0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, 0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, -0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, 0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, -0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, 0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, -0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, +0xA0, 0x97, 0xA2, 0x80, 0xA1, 0x79, 0x04, 0xF0, 0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, +0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, 0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, +0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, 0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, +0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, 0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, +0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, 0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, +0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, 0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, +0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, 0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, -0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, -0x00, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x71, +0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, +0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, #ifdef TIMELIB_SUPPORTS_V2DATA 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, -0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, +0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x97, 0xA2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0xA1, 0x79, 0x04, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x09, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xD3, 0xBD, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x05, 0x8A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x7C, 0x40, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x3B, 0x3E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x8B, 0x7B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, @@ -45034,10 +45072,10 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x25, 0x12, 0x7C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x27, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0x5E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x28, 0x07, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0x40, 0x10, 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, 0x00, -0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, -0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, 0x43, 0x53, -0x54, 0x2D, 0x38, 0x0A, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, +0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, +0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A, #endif 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, @@ -47495,4 +47533,4 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { #endif 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,}; -const timelib_tzdb timezonedb_builtin = { "2019.3", 594, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; +const timelib_tzdb timezonedb_builtin = { "2020.1", 595, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; From 8397df274a501df62f5f005793efbd07863a20e6 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Fri, 24 Apr 2020 12:31:33 +0100 Subject: [PATCH 254/338] Updated to version 2020.1 (2020a) --- ext/date/lib/timezonedb.h | 1622 +++++++++++++++++++------------------ 1 file changed, 830 insertions(+), 792 deletions(-) diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h index f00bfd47dfb11..aa1656ab3a357 100644 --- a/ext/date/lib/timezonedb.h +++ b/ext/date/lib/timezonedb.h @@ -1,5 +1,5 @@ /* This is a generated file, do not modify */ -const timelib_tzdb_index_entry timezonedb_idx_builtin[594] = { +const timelib_tzdb_index_entry timezonedb_idx_builtin[595] = { #ifdef TIMELIB_SUPPORTS_V2DATA # define FOR_V2(v2,v1) v2 #else @@ -108,502 +108,503 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[594] = { { "America/Curacao" , FOR_V2(0x011892, 0x006EAE) }, { "America/Danmarkshavn" , FOR_V2(0x011958, 0x006F10) }, { "America/Dawson" , FOR_V2(0x011C38, 0x00704C) }, - { "America/Dawson_Creek" , FOR_V2(0x01247F, 0x007377) }, - { "America/Denver" , FOR_V2(0x0128C5, 0x007539) }, - { "America/Detroit" , FOR_V2(0x013272, 0x0078D8) }, - { "America/Dominica" , FOR_V2(0x013B4D, 0x007C32) }, - { "America/Edmonton" , FOR_V2(0x013BED, 0x007C83) }, - { "America/Eirunepe" , FOR_V2(0x014532, 0x008002) }, - { "America/El_Salvador" , FOR_V2(0x0147DD, 0x00811D) }, - { "America/Ensenada" , FOR_V2(0x0148C9, 0x00818C) }, - { "America/Fort_Nelson" , FOR_V2(0x0151FB, 0x0084F5) }, - { "America/Fort_Wayne" , FOR_V2(0x015ADB, 0x008854) }, - { "America/Fortaleza" , FOR_V2(0x016169, 0x008ACF) }, - { "America/Glace_Bay" , FOR_V2(0x016467, 0x008C13) }, - { "America/Godthab" , FOR_V2(0x016D1E, 0x008F5E) }, - { "America/Goose_Bay" , FOR_V2(0x017496, 0x00922E) }, - { "America/Grand_Turk" , FOR_V2(0x01814C, 0x0096FB) }, - { "America/Grenada" , FOR_V2(0x018890, 0x0099AF) }, - { "America/Guadeloupe" , FOR_V2(0x018930, 0x009A00) }, - { "America/Guatemala" , FOR_V2(0x0189D0, 0x009A51) }, - { "America/Guayaquil" , FOR_V2(0x018AF4, 0x009AD4) }, - { "America/Guyana" , FOR_V2(0x018C08, 0x009B5F) }, - { "America/Halifax" , FOR_V2(0x018D00, 0x009BD5) }, - { "America/Havana" , FOR_V2(0x019A8A, 0x00A0DB) }, - { "America/Hermosillo" , FOR_V2(0x01A406, 0x00A459) }, - { "America/Indiana/Indianapolis" , FOR_V2(0x01A5D1, 0x00A533) }, - { "America/Indiana/Knox" , FOR_V2(0x01AC78, 0x00A7C7) }, - { "America/Indiana/Marengo" , FOR_V2(0x01B615, 0x00AB66) }, - { "America/Indiana/Petersburg" , FOR_V2(0x01BCF2, 0x00AE0C) }, - { "America/Indiana/Tell_City" , FOR_V2(0x01C481, 0x00B0EF) }, - { "America/Indiana/Vevay" , FOR_V2(0x01CB35, 0x00B389) }, - { "America/Indiana/Vincennes" , FOR_V2(0x01D0E1, 0x00B5C4) }, - { "America/Indiana/Winamac" , FOR_V2(0x01D7A7, 0x00B865) }, - { "America/Indianapolis" , FOR_V2(0x01DEBB, 0x00BB1E) }, - { "America/Inuvik" , FOR_V2(0x01E549, 0x00BD99) }, - { "America/Iqaluit" , FOR_V2(0x01ECCF, 0x00C070) }, - { "America/Jamaica" , FOR_V2(0x01F4E9, 0x00C394) }, - { "America/Jujuy" , FOR_V2(0x01F6D7, 0x00C462) }, - { "America/Juneau" , FOR_V2(0x01FAFB, 0x00C5FE) }, - { "America/Kentucky/Louisville" , FOR_V2(0x02044C, 0x00C983) }, - { "America/Kentucky/Monticello" , FOR_V2(0x020F4A, 0x00CDA7) }, - { "America/Knox_IN" , FOR_V2(0x02189A, 0x00D12B) }, - { "America/Kralendijk" , FOR_V2(0x022222, 0x00D4B5) }, - { "America/La_Paz" , FOR_V2(0x0222E8, 0x00D517) }, - { "America/Lima" , FOR_V2(0x0223DC, 0x00D58B) }, - { "America/Los_Angeles" , FOR_V2(0x02257E, 0x00D63C) }, - { "America/Louisville" , FOR_V2(0x0230A5, 0x00DA59) }, - { "America/Lower_Princes" , FOR_V2(0x023B85, 0x00DE5F) }, - { "America/Maceio" , FOR_V2(0x023C4B, 0x00DEC1) }, - { "America/Managua" , FOR_V2(0x023F4F, 0x00DFF9) }, - { "America/Manaus" , FOR_V2(0x024109, 0x00E0B9) }, - { "America/Marigot" , FOR_V2(0x024380, 0x00E1BE) }, - { "America/Martinique" , FOR_V2(0x024420, 0x00E20F) }, - { "America/Matamoros" , FOR_V2(0x024514, 0x00E284) }, - { "America/Mazatlan" , FOR_V2(0x024ACC, 0x00E4CB) }, - { "America/Mendoza" , FOR_V2(0x025103, 0x00E741) }, - { "America/Menominee" , FOR_V2(0x025543, 0x00E8E7) }, - { "America/Merida" , FOR_V2(0x025E50, 0x00EC59) }, - { "America/Metlakatla" , FOR_V2(0x02640A, 0x00EE92) }, - { "America/Mexico_City" , FOR_V2(0x0269BC, 0x00F0C7) }, - { "America/Miquelon" , FOR_V2(0x027004, 0x00F327) }, - { "America/Moncton" , FOR_V2(0x027692, 0x00F594) }, - { "America/Monterrey" , FOR_V2(0x028308, 0x00FA37) }, - { "America/Montevideo" , FOR_V2(0x0288C7, 0x00FC85) }, - { "America/Montreal" , FOR_V2(0x028EB9, 0x00FED2) }, - { "America/Montserrat" , FOR_V2(0x029C6B, 0x0103D3) }, - { "America/Nassau" , FOR_V2(0x029D0B, 0x010424) }, - { "America/New_York" , FOR_V2(0x02A5E9, 0x010763) }, - { "America/Nipigon" , FOR_V2(0x02B3D9, 0x010C87) }, - { "America/Nome" , FOR_V2(0x02BC50, 0x010FBF) }, - { "America/Noronha" , FOR_V2(0x02C5A8, 0x011342) }, - { "America/North_Dakota/Beulah" , FOR_V2(0x02C890, 0x011470) }, - { "America/North_Dakota/Center" , FOR_V2(0x02D1FD, 0x0117FF) }, - { "America/North_Dakota/New_Salem" , FOR_V2(0x02DB6A, 0x011B8E) }, - { "America/Ojinaga" , FOR_V2(0x02E4DD, 0x011F23) }, - { "America/Panama" , FOR_V2(0x02EADD, 0x01217D) }, - { "America/Pangnirtung" , FOR_V2(0x02EB9F, 0x0121DD) }, - { "America/Paramaribo" , FOR_V2(0x02F3F3, 0x01251A) }, - { "America/Phoenix" , FOR_V2(0x02F505, 0x01259B) }, - { "America/Port-au-Prince" , FOR_V2(0x02F676, 0x01264F) }, - { "America/Port_of_Spain" , FOR_V2(0x02FC1C, 0x012870) }, - { "America/Porto_Acre" , FOR_V2(0x02FCBC, 0x0128C1) }, - { "America/Porto_Velho" , FOR_V2(0x02FF3C, 0x0129C3) }, - { "America/Puerto_Rico" , FOR_V2(0x030190, 0x012AB7) }, - { "America/Punta_Arenas" , FOR_V2(0x030292, 0x012B33) }, - { "America/Rainy_River" , FOR_V2(0x030A20, 0x012E1C) }, - { "America/Rankin_Inlet" , FOR_V2(0x031298, 0x013155) }, - { "America/Recife" , FOR_V2(0x031A1E, 0x01342F) }, - { "America/Regina" , FOR_V2(0x031D00, 0x013557) }, - { "America/Resolute" , FOR_V2(0x0320F5, 0x0136F5) }, - { "America/Rio_Branco" , FOR_V2(0x03287C, 0x0139D0) }, - { "America/Rosario" , FOR_V2(0x032B00, 0x013AD6) }, - { "America/Santa_Isabel" , FOR_V2(0x032F40, 0x013C7C) }, - { "America/Santarem" , FOR_V2(0x033872, 0x013FE5) }, - { "America/Santiago" , FOR_V2(0x033AE3, 0x0140E7) }, - { "America/Santo_Domingo" , FOR_V2(0x0344E2, 0x0144A5) }, - { "America/Sao_Paulo" , FOR_V2(0x0346B8, 0x014571) }, - { "America/Scoresbysund" , FOR_V2(0x034C9E, 0x0147C9) }, - { "America/Shiprock" , FOR_V2(0x035443, 0x014AB4) }, - { "America/Sitka" , FOR_V2(0x035DDB, 0x014E3E) }, - { "America/St_Barthelemy" , FOR_V2(0x036713, 0x0151B6) }, - { "America/St_Johns" , FOR_V2(0x0367B3, 0x015207) }, - { "America/St_Kitts" , FOR_V2(0x037628, 0x01576D) }, - { "America/St_Lucia" , FOR_V2(0x0376C8, 0x0157BE) }, - { "America/St_Thomas" , FOR_V2(0x037768, 0x01580F) }, - { "America/St_Vincent" , FOR_V2(0x037808, 0x015860) }, - { "America/Swift_Current" , FOR_V2(0x0378A8, 0x0158B1) }, - { "America/Tegucigalpa" , FOR_V2(0x037AF6, 0x0159B6) }, - { "America/Thule" , FOR_V2(0x037BFE, 0x015A2F) }, - { "America/Thunder_Bay" , FOR_V2(0x0381F6, 0x015C6E) }, - { "America/Tijuana" , FOR_V2(0x038AB6, 0x015FBF) }, - { "America/Toronto" , FOR_V2(0x039409, 0x016349) }, - { "America/Tortola" , FOR_V2(0x03A1D8, 0x016867) }, - { "America/Vancouver" , FOR_V2(0x03A278, 0x0168B8) }, - { "America/Virgin" , FOR_V2(0x03ADE9, 0x016CFB) }, - { "America/Whitehorse" , FOR_V2(0x03AE89, 0x016D4C) }, - { "America/Winnipeg" , FOR_V2(0x03B6D0, 0x017077) }, - { "America/Yakutat" , FOR_V2(0x03C22D, 0x0174BA) }, - { "America/Yellowknife" , FOR_V2(0x03CB4A, 0x017823) }, - { "Antarctica/Casey" , FOR_V2(0x03D31B, 0x017B1D) }, - { "Antarctica/Davis" , FOR_V2(0x03D455, 0x017BAE) }, - { "Antarctica/DumontDUrville" , FOR_V2(0x03D58F, 0x017C3F) }, - { "Antarctica/Macquarie" , FOR_V2(0x03D66D, 0x017CAF) }, - { "Antarctica/Mawson" , FOR_V2(0x03DC79, 0x017F06) }, - { "Antarctica/McMurdo" , FOR_V2(0x03DD52, 0x017F71) }, - { "Antarctica/Palmer" , FOR_V2(0x03E709, 0x01831F) }, - { "Antarctica/Rothera" , FOR_V2(0x03ECA5, 0x01854C) }, - { "Antarctica/South_Pole" , FOR_V2(0x03ED5C, 0x0185A9) }, - { "Antarctica/Syowa" , FOR_V2(0x03F6ED, 0x018931) }, - { "Antarctica/Troll" , FOR_V2(0x03F7A3, 0x01898C) }, - { "Antarctica/Vostok" , FOR_V2(0x03FC3E, 0x018B49) }, - { "Arctic/Longyearbyen" , FOR_V2(0x03FCF5, 0x018BA5) }, - { "Asia/Aden" , FOR_V2(0x0405B5, 0x018EE3) }, - { "Asia/Almaty" , FOR_V2(0x040666, 0x018F39) }, - { "Asia/Amman" , FOR_V2(0x040A6E, 0x0190E2) }, - { "Asia/Anadyr" , FOR_V2(0x0411B7, 0x019393) }, - { "Asia/Aqtau" , FOR_V2(0x04167A, 0x01957D) }, - { "Asia/Aqtobe" , FOR_V2(0x041A72, 0x01971F) }, - { "Asia/Ashgabat" , FOR_V2(0x041E7E, 0x0198C5) }, - { "Asia/Ashkhabad" , FOR_V2(0x0420F5, 0x0199CE) }, - { "Asia/Atyrau" , FOR_V2(0x04236C, 0x019AD7) }, - { "Asia/Baghdad" , FOR_V2(0x04276C, 0x019C7D) }, - { "Asia/Bahrain" , FOR_V2(0x042B4F, 0x019E02) }, - { "Asia/Baku" , FOR_V2(0x042C22, 0x019E67) }, - { "Asia/Bangkok" , FOR_V2(0x0430F9, 0x01A04E) }, - { "Asia/Barnaul" , FOR_V2(0x0431CC, 0x01A0B3) }, - { "Asia/Beirut" , FOR_V2(0x0436AB, 0x01A2A3) }, - { "Asia/Bishkek" , FOR_V2(0x043F21, 0x01A5BB) }, - { "Asia/Brunei" , FOR_V2(0x044304, 0x01A744) }, - { "Asia/Calcutta" , FOR_V2(0x0443DB, 0x01A7AB) }, - { "Asia/Chita" , FOR_V2(0x044504, 0x01A82B) }, - { "Asia/Choibalsan" , FOR_V2(0x0449E9, 0x01AA23) }, - { "Asia/Chongqing" , FOR_V2(0x044DBC, 0x01ABAF) }, - { "Asia/Chungking" , FOR_V2(0x044FDD, 0x01AC8C) }, - { "Asia/Colombo" , FOR_V2(0x0451FE, 0x01AD69) }, - { "Asia/Dacca" , FOR_V2(0x04537E, 0x01AE16) }, - { "Asia/Damascus" , FOR_V2(0x0454DB, 0x01AEB6) }, - { "Asia/Dhaka" , FOR_V2(0x045DDD, 0x01B200) }, - { "Asia/Dili" , FOR_V2(0x045F3A, 0x01B2A0) }, - { "Asia/Dubai" , FOR_V2(0x046029, 0x01B30F) }, - { "Asia/Dushanbe" , FOR_V2(0x0460DA, 0x01B365) }, - { "Asia/Famagusta" , FOR_V2(0x046335, 0x01B462) }, - { "Asia/Gaza" , FOR_V2(0x046B3C, 0x01B768) }, - { "Asia/Harbin" , FOR_V2(0x04745E, 0x01BACD) }, - { "Asia/Hebron" , FOR_V2(0x04767F, 0x01BBAA) }, - { "Asia/Ho_Chi_Minh" , FOR_V2(0x047FBC, 0x01BF18) }, - { "Asia/Hong_Kong" , FOR_V2(0x048127, 0x01BFBB) }, - { "Asia/Hovd" , FOR_V2(0x0485E6, 0x01C193) }, - { "Asia/Irkutsk" , FOR_V2(0x048998, 0x01C31D) }, - { "Asia/Istanbul" , FOR_V2(0x048E99, 0x01C526) }, - { "Asia/Jakarta" , FOR_V2(0x049640, 0x01C813) }, - { "Asia/Jayapura" , FOR_V2(0x0497BC, 0x01C8CA) }, - { "Asia/Jerusalem" , FOR_V2(0x0498DB, 0x01C971) }, - { "Asia/Kabul" , FOR_V2(0x04A1D7, 0x01CCC1) }, - { "Asia/Kamchatka" , FOR_V2(0x04A2B3, 0x01CD28) }, - { "Asia/Karachi" , FOR_V2(0x04A75F, 0x01CF06) }, - { "Asia/Kashgar" , FOR_V2(0x04A8E6, 0x01CFB6) }, - { "Asia/Kathmandu" , FOR_V2(0x04A997, 0x01D00C) }, - { "Asia/Katmandu" , FOR_V2(0x04AA77, 0x01D075) }, - { "Asia/Khandyga" , FOR_V2(0x04AB57, 0x01D0DE) }, - { "Asia/Kolkata" , FOR_V2(0x04B078, 0x01D2F7) }, - { "Asia/Krasnoyarsk" , FOR_V2(0x04B1A1, 0x01D377) }, - { "Asia/Kuala_Lumpur" , FOR_V2(0x04B67D, 0x01D56F) }, - { "Asia/Kuching" , FOR_V2(0x04B81C, 0x01D638) }, - { "Asia/Kuwait" , FOR_V2(0x04BA19, 0x01D719) }, - { "Asia/Macao" , FOR_V2(0x04BACA, 0x01D76F) }, - { "Asia/Macau" , FOR_V2(0x04BFA1, 0x01D94F) }, - { "Asia/Magadan" , FOR_V2(0x04C478, 0x01DB2F) }, - { "Asia/Makassar" , FOR_V2(0x04C95A, 0x01DD23) }, - { "Asia/Manila" , FOR_V2(0x04CAAD, 0x01DDEB) }, - { "Asia/Muscat" , FOR_V2(0x04CC01, 0x01DE7E) }, - { "Asia/Nicosia" , FOR_V2(0x04CCB2, 0x01DED4) }, - { "Asia/Novokuznetsk" , FOR_V2(0x04D4A3, 0x01E1CF) }, - { "Asia/Novosibirsk" , FOR_V2(0x04D94D, 0x01E3AC) }, - { "Asia/Omsk" , FOR_V2(0x04DE32, 0x01E5A2) }, - { "Asia/Oral" , FOR_V2(0x04E302, 0x01E78E) }, - { "Asia/Phnom_Penh" , FOR_V2(0x04E70A, 0x01E933) }, - { "Asia/Pontianak" , FOR_V2(0x04E7DD, 0x01E998) }, - { "Asia/Pyongyang" , FOR_V2(0x04E960, 0x01EA57) }, - { "Asia/Qatar" , FOR_V2(0x04EA59, 0x01EACC) }, - { "Asia/Qostanay" , FOR_V2(0x04EB2C, 0x01EB31) }, - { "Asia/Qyzylorda" , FOR_V2(0x04EF45, 0x01ECE4) }, - { "Asia/Rangoon" , FOR_V2(0x04F36F, 0x01EE9F) }, - { "Asia/Riyadh" , FOR_V2(0x04F487, 0x01EF20) }, - { "Asia/Saigon" , FOR_V2(0x04F538, 0x01EF76) }, - { "Asia/Sakhalin" , FOR_V2(0x04F6A3, 0x01F019) }, - { "Asia/Samarkand" , FOR_V2(0x04FB79, 0x01F20B) }, - { "Asia/Seoul" , FOR_V2(0x04FDD7, 0x01F312) }, - { "Asia/Shanghai" , FOR_V2(0x05004C, 0x01F415) }, - { "Asia/Singapore" , FOR_V2(0x050279, 0x01F4FE) }, - { "Asia/Srednekolymsk" , FOR_V2(0x050404, 0x01F5B3) }, - { "Asia/Taipei" , FOR_V2(0x0508EA, 0x01F7B4) }, - { "Asia/Tashkent" , FOR_V2(0x050BEF, 0x01F8E7) }, - { "Asia/Tbilisi" , FOR_V2(0x050E5B, 0x01F9F5) }, - { "Asia/Tehran" , FOR_V2(0x051272, 0x01FB98) }, - { "Asia/Tel_Aviv" , FOR_V2(0x051C94, 0x01FE0A) }, - { "Asia/Thimbu" , FOR_V2(0x052590, 0x02015A) }, - { "Asia/Thimphu" , FOR_V2(0x052667, 0x0201C1) }, - { "Asia/Tokyo" , FOR_V2(0x05273E, 0x020228) }, - { "Asia/Tomsk" , FOR_V2(0x05287F, 0x0202B9) }, - { "Asia/Ujung_Pandang" , FOR_V2(0x052D5E, 0x0204A9) }, - { "Asia/Ulaanbaatar" , FOR_V2(0x052E68, 0x020528) }, - { "Asia/Ulan_Bator" , FOR_V2(0x053204, 0x02069C) }, - { "Asia/Urumqi" , FOR_V2(0x05358B, 0x0207FB) }, - { "Asia/Ust-Nera" , FOR_V2(0x053649, 0x02085E) }, - { "Asia/Vientiane" , FOR_V2(0x053B4D, 0x020A65) }, - { "Asia/Vladivostok" , FOR_V2(0x053C20, 0x020ACA) }, - { "Asia/Yakutsk" , FOR_V2(0x0540F7, 0x020CBC) }, - { "Asia/Yangon" , FOR_V2(0x0545CD, 0x020EAE) }, - { "Asia/Yekaterinburg" , FOR_V2(0x0546E5, 0x020F2F) }, - { "Asia/Yerevan" , FOR_V2(0x054BDA, 0x02112C) }, - { "Atlantic/Azores" , FOR_V2(0x055065, 0x0212F5) }, - { "Atlantic/Bermuda" , FOR_V2(0x055E13, 0x021809) }, - { "Atlantic/Canary" , FOR_V2(0x0565D9, 0x021AE4) }, - { "Atlantic/Cape_Verde" , FOR_V2(0x056D5C, 0x021DB9) }, - { "Atlantic/Faeroe" , FOR_V2(0x056E76, 0x021E3E) }, - { "Atlantic/Faroe" , FOR_V2(0x057599, 0x0220E2) }, - { "Atlantic/Jan_Mayen" , FOR_V2(0x057CBC, 0x022386) }, - { "Atlantic/Madeira" , FOR_V2(0x05857C, 0x0226C4) }, - { "Atlantic/Reykjavik" , FOR_V2(0x05932A, 0x022BE1) }, - { "Atlantic/South_Georgia" , FOR_V2(0x0597C0, 0x022DA7) }, - { "Atlantic/St_Helena" , FOR_V2(0x059870, 0x022DFD) }, - { "Atlantic/Stanley" , FOR_V2(0x059910, 0x022E4E) }, - { "Australia/ACT" , FOR_V2(0x059DDA, 0x023027) }, - { "Australia/Adelaide" , FOR_V2(0x05A682, 0x023356) }, - { "Australia/Brisbane" , FOR_V2(0x05AF4B, 0x023694) }, - { "Australia/Broken_Hill" , FOR_V2(0x05B11F, 0x023769) }, - { "Australia/Canberra" , FOR_V2(0x05BA0A, 0x023AB4) }, - { "Australia/Currie" , FOR_V2(0x05C2B2, 0x023DE3) }, - { "Australia/Darwin" , FOR_V2(0x05CB70, 0x024128) }, - { "Australia/Eucla" , FOR_V2(0x05CCBE, 0x0241BF) }, - { "Australia/Hobart" , FOR_V2(0x05CEC7, 0x0242A7) }, - { "Australia/LHI" , FOR_V2(0x05D7F4, 0x024613) }, - { "Australia/Lindeman" , FOR_V2(0x05DF44, 0x0248C6) }, - { "Australia/Lord_Howe" , FOR_V2(0x05E158, 0x0249B7) }, - { "Australia/Melbourne" , FOR_V2(0x05E8B8, 0x024C7A) }, - { "Australia/North" , FOR_V2(0x05F168, 0x024FB1) }, - { "Australia/NSW" , FOR_V2(0x05F2A4, 0x025036) }, - { "Australia/Perth" , FOR_V2(0x05FB4C, 0x025365) }, - { "Australia/Queensland" , FOR_V2(0x05FD42, 0x02544B) }, - { "Australia/South" , FOR_V2(0x05FEFF, 0x025509) }, - { "Australia/Sydney" , FOR_V2(0x0607B9, 0x025838) }, - { "Australia/Tasmania" , FOR_V2(0x06107D, 0x025B83) }, - { "Australia/Victoria" , FOR_V2(0x061995, 0x025EDA) }, - { "Australia/West" , FOR_V2(0x06223D, 0x026209) }, - { "Australia/Yancowinna" , FOR_V2(0x062415, 0x0262D1) }, - { "Brazil/Acre" , FOR_V2(0x062CE4, 0x026600) }, - { "Brazil/DeNoronha" , FOR_V2(0x062F64, 0x026702) }, - { "Brazil/East" , FOR_V2(0x06323C, 0x026820) }, - { "Brazil/West" , FOR_V2(0x0637EC, 0x026A42) }, - { "Canada/Atlantic" , FOR_V2(0x063A54, 0x026B38) }, - { "Canada/Central" , FOR_V2(0x0647C0, 0x027020) }, - { "Canada/Eastern" , FOR_V2(0x065300, 0x027446) }, - { "Canada/Mountain" , FOR_V2(0x0660B2, 0x027947) }, - { "Canada/Newfoundland" , FOR_V2(0x0669DA, 0x027CA9) }, - { "Canada/Pacific" , FOR_V2(0x06782D, 0x0281ED) }, - { "Canada/Saskatchewan" , FOR_V2(0x068385, 0x028617) }, - { "Canada/Yukon" , FOR_V2(0x068765, 0x0287A0) }, - { "CET" , FOR_V2(0x068F95, 0x028AB4) }, - { "Chile/Continental" , FOR_V2(0x0697CF, 0x028DB9) }, - { "Chile/EasterIsland" , FOR_V2(0x06A1BC, 0x029165) }, - { "CST6CDT" , FOR_V2(0x06AA81, 0x0294A5) }, - { "Cuba" , FOR_V2(0x06B393, 0x0297FE) }, - { "EET" , FOR_V2(0x06BD0F, 0x029B7C) }, - { "Egypt" , FOR_V2(0x06C48F, 0x029E3F) }, - { "Eire" , FOR_V2(0x06CC3E, 0x02A11B) }, - { "EST" , FOR_V2(0x06D9EE, 0x02A623) }, - { "EST5EDT" , FOR_V2(0x06DA6C, 0x02A665) }, - { "Etc/GMT" , FOR_V2(0x06E37E, 0x02A9BE) }, - { "Etc/GMT+0" , FOR_V2(0x06E3FC, 0x02AA00) }, - { "Etc/GMT+1" , FOR_V2(0x06E47A, 0x02AA42) }, - { "Etc/GMT+10" , FOR_V2(0x06E4FA, 0x02AA84) }, - { "Etc/GMT+11" , FOR_V2(0x06E57B, 0x02AAC6) }, - { "Etc/GMT+12" , FOR_V2(0x06E5FC, 0x02AB08) }, - { "Etc/GMT+2" , FOR_V2(0x06E67D, 0x02AB4A) }, - { "Etc/GMT+3" , FOR_V2(0x06E6FD, 0x02AB8C) }, - { "Etc/GMT+4" , FOR_V2(0x06E77D, 0x02ABCE) }, - { "Etc/GMT+5" , FOR_V2(0x06E7FD, 0x02AC10) }, - { "Etc/GMT+6" , FOR_V2(0x06E87D, 0x02AC52) }, - { "Etc/GMT+7" , FOR_V2(0x06E8FD, 0x02AC94) }, - { "Etc/GMT+8" , FOR_V2(0x06E97D, 0x02ACD6) }, - { "Etc/GMT+9" , FOR_V2(0x06E9FD, 0x02AD18) }, - { "Etc/GMT-0" , FOR_V2(0x06EA7D, 0x02AD5A) }, - { "Etc/GMT-1" , FOR_V2(0x06EAFB, 0x02AD9C) }, - { "Etc/GMT-10" , FOR_V2(0x06EB7C, 0x02ADDE) }, - { "Etc/GMT-11" , FOR_V2(0x06EBFE, 0x02AE20) }, - { "Etc/GMT-12" , FOR_V2(0x06EC80, 0x02AE62) }, - { "Etc/GMT-13" , FOR_V2(0x06ED02, 0x02AEA4) }, - { "Etc/GMT-14" , FOR_V2(0x06ED84, 0x02AEE6) }, - { "Etc/GMT-2" , FOR_V2(0x06EE06, 0x02AF28) }, - { "Etc/GMT-3" , FOR_V2(0x06EE87, 0x02AF6A) }, - { "Etc/GMT-4" , FOR_V2(0x06EF08, 0x02AFAC) }, - { "Etc/GMT-5" , FOR_V2(0x06EF89, 0x02AFEE) }, - { "Etc/GMT-6" , FOR_V2(0x06F00A, 0x02B030) }, - { "Etc/GMT-7" , FOR_V2(0x06F08B, 0x02B072) }, - { "Etc/GMT-8" , FOR_V2(0x06F10C, 0x02B0B4) }, - { "Etc/GMT-9" , FOR_V2(0x06F18D, 0x02B0F6) }, - { "Etc/GMT0" , FOR_V2(0x06F20E, 0x02B138) }, - { "Etc/Greenwich" , FOR_V2(0x06F28C, 0x02B17A) }, - { "Etc/UCT" , FOR_V2(0x06F30A, 0x02B1BC) }, - { "Etc/Universal" , FOR_V2(0x06F388, 0x02B1FE) }, - { "Etc/UTC" , FOR_V2(0x06F406, 0x02B240) }, - { "Etc/Zulu" , FOR_V2(0x06F484, 0x02B282) }, - { "Europe/Amsterdam" , FOR_V2(0x06F502, 0x02B2C4) }, - { "Europe/Andorra" , FOR_V2(0x07006C, 0x02B709) }, - { "Europe/Astrakhan" , FOR_V2(0x070746, 0x02B996) }, - { "Europe/Athens" , FOR_V2(0x070BF1, 0x02BB74) }, - { "Europe/Belfast" , FOR_V2(0x0714D3, 0x02BEC8) }, - { "Europe/Belgrade" , FOR_V2(0x07231F, 0x02C403) }, - { "Europe/Berlin" , FOR_V2(0x072AAB, 0x02C6D3) }, - { "Europe/Bratislava" , FOR_V2(0x0733C5, 0x02CA44) }, - { "Europe/Brussels" , FOR_V2(0x073CCE, 0x02CD98) }, - { "Europe/Bucharest" , FOR_V2(0x07484F, 0x02D1D6) }, - { "Europe/Budapest" , FOR_V2(0x0750E3, 0x02D507) }, - { "Europe/Busingen" , FOR_V2(0x075A2F, 0x02D877) }, - { "Europe/Chisinau" , FOR_V2(0x0761B8, 0x02DB3F) }, - { "Europe/Copenhagen" , FOR_V2(0x076B1A, 0x02DECE) }, - { "Europe/Dublin" , FOR_V2(0x07737F, 0x02E1E4) }, - { "Europe/Gibraltar" , FOR_V2(0x07812F, 0x02E6EC) }, - { "Europe/Guernsey" , FOR_V2(0x078D27, 0x02EB54) }, - { "Europe/Helsinki" , FOR_V2(0x079B73, 0x02F08F) }, - { "Europe/Isle_of_Man" , FOR_V2(0x07A2EB, 0x02F356) }, - { "Europe/Istanbul" , FOR_V2(0x07B137, 0x02F891) }, - { "Europe/Jersey" , FOR_V2(0x07B8DE, 0x02FB7E) }, - { "Europe/Kaliningrad" , FOR_V2(0x07C72A, 0x0300B9) }, - { "Europe/Kiev" , FOR_V2(0x07CD1F, 0x030320) }, - { "Europe/Kirov" , FOR_V2(0x07D567, 0x030653) }, - { "Europe/Lisbon" , FOR_V2(0x07DA02, 0x030829) }, - { "Europe/Ljubljana" , FOR_V2(0x07E7AE, 0x030D45) }, - { "Europe/London" , FOR_V2(0x07EF3A, 0x031015) }, - { "Europe/Luxembourg" , FOR_V2(0x07FD86, 0x031550) }, - { "Europe/Madrid" , FOR_V2(0x080914, 0x0319A1) }, - { "Europe/Malta" , FOR_V2(0x081366, 0x031D86) }, - { "Europe/Mariehamn" , FOR_V2(0x081DAE, 0x032150) }, - { "Europe/Minsk" , FOR_V2(0x082526, 0x032417) }, - { "Europe/Monaco" , FOR_V2(0x082A5B, 0x032629) }, - { "Europe/Moscow" , FOR_V2(0x0835E7, 0x032A75) }, - { "Europe/Nicosia" , FOR_V2(0x083C06, 0x032CF5) }, - { "Europe/Oslo" , FOR_V2(0x0843E4, 0x032FDD) }, - { "Europe/Paris" , FOR_V2(0x084CA4, 0x03331B) }, - { "Europe/Podgorica" , FOR_V2(0x085842, 0x033772) }, - { "Europe/Prague" , FOR_V2(0x085FCE, 0x033A42) }, - { "Europe/Riga" , FOR_V2(0x0868D7, 0x033D96) }, - { "Europe/Rome" , FOR_V2(0x087179, 0x0340E2) }, - { "Europe/Samara" , FOR_V2(0x087BD6, 0x0344AC) }, - { "Europe/San_Marino" , FOR_V2(0x0880BA, 0x0346AA) }, - { "Europe/Sarajevo" , FOR_V2(0x088B17, 0x034A74) }, - { "Europe/Saratov" , FOR_V2(0x0892A3, 0x034D44) }, - { "Europe/Simferopol" , FOR_V2(0x08975E, 0x034F29) }, - { "Europe/Skopje" , FOR_V2(0x089D26, 0x035181) }, - { "Europe/Sofia" , FOR_V2(0x08A4B2, 0x035451) }, - { "Europe/Stockholm" , FOR_V2(0x08ACDB, 0x035758) }, - { "Europe/Tallinn" , FOR_V2(0x08B45C, 0x035A18) }, - { "Europe/Tirane" , FOR_V2(0x08BCCC, 0x035D51) }, - { "Europe/Tiraspol" , FOR_V2(0x08C4FC, 0x036057) }, - { "Europe/Ulyanovsk" , FOR_V2(0x08CE5E, 0x0363E6) }, - { "Europe/Uzhgorod" , FOR_V2(0x08D36F, 0x0365F3) }, - { "Europe/Vaduz" , FOR_V2(0x08DB85, 0x036909) }, - { "Europe/Vatican" , FOR_V2(0x08E306, 0x036BC9) }, - { "Europe/Vienna" , FOR_V2(0x08ED63, 0x036F93) }, - { "Europe/Vilnius" , FOR_V2(0x08F607, 0x0372C7) }, - { "Europe/Volgograd" , FOR_V2(0x08FE85, 0x03760D) }, - { "Europe/Warsaw" , FOR_V2(0x090330, 0x0377EB) }, - { "Europe/Zagreb" , FOR_V2(0x090D9A, 0x037BCE) }, - { "Europe/Zaporozhye" , FOR_V2(0x091526, 0x037E9E) }, - { "Europe/Zurich" , FOR_V2(0x091D9A, 0x0381F2) }, - { "Factory" , FOR_V2(0x09251B, 0x0384B2) }, - { "GB" , FOR_V2(0x09259B, 0x0384F4) }, - { "GB-Eire" , FOR_V2(0x0933E7, 0x038A2F) }, - { "GMT" , FOR_V2(0x094233, 0x038F6A) }, - { "GMT+0" , FOR_V2(0x0942B1, 0x038FAC) }, - { "GMT-0" , FOR_V2(0x09432F, 0x038FEE) }, - { "GMT0" , FOR_V2(0x0943AD, 0x039030) }, - { "Greenwich" , FOR_V2(0x09442B, 0x039072) }, - { "Hongkong" , FOR_V2(0x0944A9, 0x0390B4) }, - { "HST" , FOR_V2(0x094968, 0x03928C) }, - { "Iceland" , FOR_V2(0x0949E7, 0x0392CE) }, - { "Indian/Antananarivo" , FOR_V2(0x094E7D, 0x039494) }, - { "Indian/Chagos" , FOR_V2(0x094F84, 0x039512) }, - { "Indian/Christmas" , FOR_V2(0x095057, 0x039577) }, - { "Indian/Cocos" , FOR_V2(0x095108, 0x0395CD) }, - { "Indian/Comoro" , FOR_V2(0x0951C2, 0x039625) }, - { "Indian/Kerguelen" , FOR_V2(0x0952C9, 0x0396A3) }, - { "Indian/Mahe" , FOR_V2(0x09537A, 0x0396F9) }, - { "Indian/Maldives" , FOR_V2(0x09542B, 0x03974F) }, - { "Indian/Mauritius" , FOR_V2(0x0954FE, 0x0397B4) }, - { "Indian/Mayotte" , FOR_V2(0x0955FB, 0x039828) }, - { "Indian/Reunion" , FOR_V2(0x095702, 0x0398A6) }, - { "Iran" , FOR_V2(0x0957B3, 0x0398FC) }, - { "Israel" , FOR_V2(0x0961D5, 0x039B6E) }, - { "Jamaica" , FOR_V2(0x096AD1, 0x039EBE) }, - { "Japan" , FOR_V2(0x096CBF, 0x039F8C) }, - { "Kwajalein" , FOR_V2(0x096E00, 0x03A01D) }, - { "Libya" , FOR_V2(0x096F48, 0x03A0B4) }, - { "MET" , FOR_V2(0x0971C5, 0x03A1B5) }, - { "Mexico/BajaNorte" , FOR_V2(0x0979FF, 0x03A4BA) }, - { "Mexico/BajaSur" , FOR_V2(0x098331, 0x03A823) }, - { "Mexico/General" , FOR_V2(0x098933, 0x03AA64) }, - { "MST" , FOR_V2(0x098F6F, 0x03ACB8) }, - { "MST7MDT" , FOR_V2(0x098FED, 0x03ACFA) }, - { "Navajo" , FOR_V2(0x0998FF, 0x03B053) }, - { "NZ" , FOR_V2(0x09A297, 0x03B3DD) }, - { "NZ-CHAT" , FOR_V2(0x09AC28, 0x03B765) }, - { "Pacific/Apia" , FOR_V2(0x09B448, 0x03BA60) }, - { "Pacific/Auckland" , FOR_V2(0x09B89D, 0x03BC08) }, - { "Pacific/Bougainville" , FOR_V2(0x09C246, 0x03BFA8) }, - { "Pacific/Chatham" , FOR_V2(0x09C36A, 0x03C02D) }, - { "Pacific/Chuuk" , FOR_V2(0x09CB99, 0x03C337) }, - { "Pacific/Easter" , FOR_V2(0x09CCC1, 0x03C3C0) }, - { "Pacific/Efate" , FOR_V2(0x09D593, 0x03C70D) }, - { "Pacific/Enderbury" , FOR_V2(0x09D771, 0x03C7D1) }, - { "Pacific/Fakaofo" , FOR_V2(0x09D876, 0x03C854) }, - { "Pacific/Fiji" , FOR_V2(0x09D94A, 0x03C8B9) }, - { "Pacific/Funafuti" , FOR_V2(0x09DD8B, 0x03CA4F) }, - { "Pacific/Galapagos" , FOR_V2(0x09DE3D, 0x03CAA5) }, - { "Pacific/Gambier" , FOR_V2(0x09DF48, 0x03CB2B) }, - { "Pacific/Guadalcanal" , FOR_V2(0x09E007, 0x03CB90) }, - { "Pacific/Guam" , FOR_V2(0x09E0B9, 0x03CBE6) }, - { "Pacific/Honolulu" , FOR_V2(0x09E2B3, 0x03CCB5) }, - { "Pacific/Johnston" , FOR_V2(0x09E40E, 0x03CD5A) }, - { "Pacific/Kiritimati" , FOR_V2(0x09E563, 0x03CDF9) }, - { "Pacific/Kosrae" , FOR_V2(0x09E669, 0x03CE7B) }, - { "Pacific/Kwajalein" , FOR_V2(0x09E7DA, 0x03CF1E) }, - { "Pacific/Majuro" , FOR_V2(0x09E92B, 0x03CFBE) }, - { "Pacific/Marquesas" , FOR_V2(0x09EA8A, 0x03D06D) }, - { "Pacific/Midway" , FOR_V2(0x09EB54, 0x03D0D6) }, - { "Pacific/Nauru" , FOR_V2(0x09EC1D, 0x03D140) }, - { "Pacific/Niue" , FOR_V2(0x09ED25, 0x03D1BB) }, - { "Pacific/Norfolk" , FOR_V2(0x09EE22, 0x03D233) }, - { "Pacific/Noumea" , FOR_V2(0x09F19E, 0x03D391) }, - { "Pacific/Pago_Pago" , FOR_V2(0x09F2DA, 0x03D420) }, - { "Pacific/Palau" , FOR_V2(0x09F395, 0x03D47C) }, - { "Pacific/Pitcairn" , FOR_V2(0x09F455, 0x03D4D2) }, - { "Pacific/Pohnpei" , FOR_V2(0x09F52B, 0x03D539) }, - { "Pacific/Ponape" , FOR_V2(0x09F674, 0x03D5D0) }, - { "Pacific/Port_Moresby" , FOR_V2(0x09F7AF, 0x03D659) }, - { "Pacific/Rarotonga" , FOR_V2(0x09F892, 0x03D6CC) }, - { "Pacific/Saipan" , FOR_V2(0x09FADF, 0x03D7BC) }, - { "Pacific/Samoa" , FOR_V2(0x09FCD9, 0x03D88B) }, - { "Pacific/Tahiti" , FOR_V2(0x09FD94, 0x03D8E7) }, - { "Pacific/Tarawa" , FOR_V2(0x09FE54, 0x03D94C) }, - { "Pacific/Tongatapu" , FOR_V2(0x09FF15, 0x03D9B1) }, - { "Pacific/Truk" , FOR_V2(0x0A0095, 0x03DA5C) }, - { "Pacific/Wake" , FOR_V2(0x0A01AE, 0x03DAD6) }, - { "Pacific/Wallis" , FOR_V2(0x0A026B, 0x03DB37) }, - { "Pacific/Yap" , FOR_V2(0x0A031D, 0x03DB8D) }, - { "Poland" , FOR_V2(0x0A0436, 0x03DC07) }, - { "Portugal" , FOR_V2(0x0A0EA0, 0x03DFEA) }, - { "PRC" , FOR_V2(0x0A1C39, 0x03E4F3) }, - { "PST8PDT" , FOR_V2(0x0A1E5A, 0x03E5D0) }, - { "ROC" , FOR_V2(0x0A276C, 0x03E929) }, - { "ROK" , FOR_V2(0x0A2A71, 0x03EA5C) }, - { "Singapore" , FOR_V2(0x0A2CE6, 0x03EB5F) }, - { "Turkey" , FOR_V2(0x0A2E71, 0x03EC14) }, - { "UCT" , FOR_V2(0x0A3618, 0x03EF01) }, - { "Universal" , FOR_V2(0x0A3696, 0x03EF43) }, - { "US/Alaska" , FOR_V2(0x0A3714, 0x03EF85) }, - { "US/Aleutian" , FOR_V2(0x0A4063, 0x03F2FD) }, - { "US/Arizona" , FOR_V2(0x0A49A3, 0x03F66E) }, - { "US/Central" , FOR_V2(0x0A4AF7, 0x03F705) }, - { "US/East-Indiana" , FOR_V2(0x0A58FB, 0x03FC29) }, - { "US/Eastern" , FOR_V2(0x0A5F89, 0x03FEA4) }, - { "US/Hawaii" , FOR_V2(0x0A6D65, 0x0403B4) }, - { "US/Indiana-Starke" , FOR_V2(0x0A6EBA, 0x040453) }, - { "US/Michigan" , FOR_V2(0x0A7842, 0x0407DD) }, - { "US/Mountain" , FOR_V2(0x0A8104, 0x040B1E) }, - { "US/Pacific" , FOR_V2(0x0A8A9C, 0x040EA8) }, - { "US/Pacific-New" , FOR_V2(0x0A95BC, 0x0412BE) }, - { "US/Samoa" , FOR_V2(0x0AA0DC, 0x0416D4) }, - { "UTC" , FOR_V2(0x0AA197, 0x041730) }, - { "W-SU" , FOR_V2(0x0AA215, 0x041772) }, - { "WET" , FOR_V2(0x0AA820, 0x0419DE) }, - { "Zulu" , FOR_V2(0x0AAF9D, 0x041CA1) }, + { "America/Dawson_Creek" , FOR_V2(0x01229A, 0x0072D3) }, + { "America/Denver" , FOR_V2(0x0126E0, 0x007495) }, + { "America/Detroit" , FOR_V2(0x01308D, 0x007834) }, + { "America/Dominica" , FOR_V2(0x013968, 0x007B8E) }, + { "America/Edmonton" , FOR_V2(0x013A08, 0x007BDF) }, + { "America/Eirunepe" , FOR_V2(0x01434D, 0x007F5E) }, + { "America/El_Salvador" , FOR_V2(0x0145F8, 0x008079) }, + { "America/Ensenada" , FOR_V2(0x0146E4, 0x0080E8) }, + { "America/Fort_Nelson" , FOR_V2(0x015016, 0x008451) }, + { "America/Fort_Wayne" , FOR_V2(0x0158F6, 0x0087B0) }, + { "America/Fortaleza" , FOR_V2(0x015F84, 0x008A2B) }, + { "America/Glace_Bay" , FOR_V2(0x016282, 0x008B6F) }, + { "America/Godthab" , FOR_V2(0x016B39, 0x008EBA) }, + { "America/Goose_Bay" , FOR_V2(0x01729B, 0x009174) }, + { "America/Grand_Turk" , FOR_V2(0x017F51, 0x009641) }, + { "America/Grenada" , FOR_V2(0x018695, 0x0098F5) }, + { "America/Guadeloupe" , FOR_V2(0x018735, 0x009946) }, + { "America/Guatemala" , FOR_V2(0x0187D5, 0x009997) }, + { "America/Guayaquil" , FOR_V2(0x0188F9, 0x009A1A) }, + { "America/Guyana" , FOR_V2(0x018A0D, 0x009AA5) }, + { "America/Halifax" , FOR_V2(0x018B05, 0x009B1B) }, + { "America/Havana" , FOR_V2(0x01988F, 0x00A021) }, + { "America/Hermosillo" , FOR_V2(0x01A20B, 0x00A39F) }, + { "America/Indiana/Indianapolis" , FOR_V2(0x01A3D6, 0x00A479) }, + { "America/Indiana/Knox" , FOR_V2(0x01AA7D, 0x00A70D) }, + { "America/Indiana/Marengo" , FOR_V2(0x01B41A, 0x00AAAC) }, + { "America/Indiana/Petersburg" , FOR_V2(0x01BAF7, 0x00AD52) }, + { "America/Indiana/Tell_City" , FOR_V2(0x01C286, 0x00B035) }, + { "America/Indiana/Vevay" , FOR_V2(0x01C93A, 0x00B2CF) }, + { "America/Indiana/Vincennes" , FOR_V2(0x01CEE6, 0x00B50A) }, + { "America/Indiana/Winamac" , FOR_V2(0x01D5AC, 0x00B7AB) }, + { "America/Indianapolis" , FOR_V2(0x01DCC0, 0x00BA64) }, + { "America/Inuvik" , FOR_V2(0x01E34E, 0x00BCDF) }, + { "America/Iqaluit" , FOR_V2(0x01EAD4, 0x00BFB6) }, + { "America/Jamaica" , FOR_V2(0x01F2EE, 0x00C2DA) }, + { "America/Jujuy" , FOR_V2(0x01F4DC, 0x00C3A8) }, + { "America/Juneau" , FOR_V2(0x01F900, 0x00C544) }, + { "America/Kentucky/Louisville" , FOR_V2(0x020251, 0x00C8C9) }, + { "America/Kentucky/Monticello" , FOR_V2(0x020D4F, 0x00CCED) }, + { "America/Knox_IN" , FOR_V2(0x02169F, 0x00D071) }, + { "America/Kralendijk" , FOR_V2(0x022027, 0x00D3FB) }, + { "America/La_Paz" , FOR_V2(0x0220ED, 0x00D45D) }, + { "America/Lima" , FOR_V2(0x0221E1, 0x00D4D1) }, + { "America/Los_Angeles" , FOR_V2(0x022383, 0x00D582) }, + { "America/Louisville" , FOR_V2(0x022EAA, 0x00D99F) }, + { "America/Lower_Princes" , FOR_V2(0x02398A, 0x00DDA5) }, + { "America/Maceio" , FOR_V2(0x023A50, 0x00DE07) }, + { "America/Managua" , FOR_V2(0x023D54, 0x00DF3F) }, + { "America/Manaus" , FOR_V2(0x023F0E, 0x00DFFF) }, + { "America/Marigot" , FOR_V2(0x024185, 0x00E104) }, + { "America/Martinique" , FOR_V2(0x024225, 0x00E155) }, + { "America/Matamoros" , FOR_V2(0x024319, 0x00E1CA) }, + { "America/Mazatlan" , FOR_V2(0x0248D1, 0x00E411) }, + { "America/Mendoza" , FOR_V2(0x024F08, 0x00E687) }, + { "America/Menominee" , FOR_V2(0x025348, 0x00E82D) }, + { "America/Merida" , FOR_V2(0x025C55, 0x00EB9F) }, + { "America/Metlakatla" , FOR_V2(0x02620F, 0x00EDD8) }, + { "America/Mexico_City" , FOR_V2(0x0267C1, 0x00F00D) }, + { "America/Miquelon" , FOR_V2(0x026E09, 0x00F26D) }, + { "America/Moncton" , FOR_V2(0x027497, 0x00F4DA) }, + { "America/Monterrey" , FOR_V2(0x02810D, 0x00F97D) }, + { "America/Montevideo" , FOR_V2(0x0286CC, 0x00FBCB) }, + { "America/Montreal" , FOR_V2(0x028CBE, 0x00FE18) }, + { "America/Montserrat" , FOR_V2(0x029A70, 0x010319) }, + { "America/Nassau" , FOR_V2(0x029B10, 0x01036A) }, + { "America/New_York" , FOR_V2(0x02A3EE, 0x0106A9) }, + { "America/Nipigon" , FOR_V2(0x02B1DE, 0x010BCD) }, + { "America/Nome" , FOR_V2(0x02BA55, 0x010F05) }, + { "America/Noronha" , FOR_V2(0x02C3AD, 0x011288) }, + { "America/North_Dakota/Beulah" , FOR_V2(0x02C695, 0x0113B6) }, + { "America/North_Dakota/Center" , FOR_V2(0x02D002, 0x011745) }, + { "America/North_Dakota/New_Salem" , FOR_V2(0x02D96F, 0x011AD4) }, + { "America/Nuuk" , FOR_V2(0x02E2E2, 0x011E69) }, + { "America/Ojinaga" , FOR_V2(0x02EA5A, 0x012139) }, + { "America/Panama" , FOR_V2(0x02F05A, 0x012393) }, + { "America/Pangnirtung" , FOR_V2(0x02F11C, 0x0123F3) }, + { "America/Paramaribo" , FOR_V2(0x02F970, 0x012730) }, + { "America/Phoenix" , FOR_V2(0x02FA82, 0x0127B1) }, + { "America/Port-au-Prince" , FOR_V2(0x02FBF3, 0x012865) }, + { "America/Port_of_Spain" , FOR_V2(0x030199, 0x012A86) }, + { "America/Porto_Acre" , FOR_V2(0x030239, 0x012AD7) }, + { "America/Porto_Velho" , FOR_V2(0x0304B9, 0x012BD9) }, + { "America/Puerto_Rico" , FOR_V2(0x03070D, 0x012CCD) }, + { "America/Punta_Arenas" , FOR_V2(0x03080F, 0x012D49) }, + { "America/Rainy_River" , FOR_V2(0x030F9D, 0x013032) }, + { "America/Rankin_Inlet" , FOR_V2(0x031815, 0x01336B) }, + { "America/Recife" , FOR_V2(0x031F9B, 0x013645) }, + { "America/Regina" , FOR_V2(0x03227D, 0x01376D) }, + { "America/Resolute" , FOR_V2(0x032672, 0x01390B) }, + { "America/Rio_Branco" , FOR_V2(0x032DF9, 0x013BE6) }, + { "America/Rosario" , FOR_V2(0x03307D, 0x013CEC) }, + { "America/Santa_Isabel" , FOR_V2(0x0334BD, 0x013E92) }, + { "America/Santarem" , FOR_V2(0x033DEF, 0x0141FB) }, + { "America/Santiago" , FOR_V2(0x034060, 0x0142FD) }, + { "America/Santo_Domingo" , FOR_V2(0x034A5F, 0x0146BB) }, + { "America/Sao_Paulo" , FOR_V2(0x034C35, 0x014787) }, + { "America/Scoresbysund" , FOR_V2(0x03521B, 0x0149DF) }, + { "America/Shiprock" , FOR_V2(0x0359C0, 0x014CCA) }, + { "America/Sitka" , FOR_V2(0x036358, 0x015054) }, + { "America/St_Barthelemy" , FOR_V2(0x036C90, 0x0153CC) }, + { "America/St_Johns" , FOR_V2(0x036D30, 0x01541D) }, + { "America/St_Kitts" , FOR_V2(0x037BA5, 0x015983) }, + { "America/St_Lucia" , FOR_V2(0x037C45, 0x0159D4) }, + { "America/St_Thomas" , FOR_V2(0x037CE5, 0x015A25) }, + { "America/St_Vincent" , FOR_V2(0x037D85, 0x015A76) }, + { "America/Swift_Current" , FOR_V2(0x037E25, 0x015AC7) }, + { "America/Tegucigalpa" , FOR_V2(0x038073, 0x015BCC) }, + { "America/Thule" , FOR_V2(0x03817B, 0x015C45) }, + { "America/Thunder_Bay" , FOR_V2(0x038773, 0x015E84) }, + { "America/Tijuana" , FOR_V2(0x039033, 0x0161D5) }, + { "America/Toronto" , FOR_V2(0x039986, 0x01655F) }, + { "America/Tortola" , FOR_V2(0x03A755, 0x016A7D) }, + { "America/Vancouver" , FOR_V2(0x03A7F5, 0x016ACE) }, + { "America/Virgin" , FOR_V2(0x03B366, 0x016F11) }, + { "America/Whitehorse" , FOR_V2(0x03B406, 0x016F62) }, + { "America/Winnipeg" , FOR_V2(0x03BA68, 0x0171E9) }, + { "America/Yakutat" , FOR_V2(0x03C5C5, 0x01762C) }, + { "America/Yellowknife" , FOR_V2(0x03CEE2, 0x017995) }, + { "Antarctica/Casey" , FOR_V2(0x03D6B3, 0x017C8F) }, + { "Antarctica/Davis" , FOR_V2(0x03D7ED, 0x017D20) }, + { "Antarctica/DumontDUrville" , FOR_V2(0x03D927, 0x017DB1) }, + { "Antarctica/Macquarie" , FOR_V2(0x03DA05, 0x017E21) }, + { "Antarctica/Mawson" , FOR_V2(0x03E011, 0x018078) }, + { "Antarctica/McMurdo" , FOR_V2(0x03E0EA, 0x0180E3) }, + { "Antarctica/Palmer" , FOR_V2(0x03EAA1, 0x018491) }, + { "Antarctica/Rothera" , FOR_V2(0x03F03D, 0x0186BE) }, + { "Antarctica/South_Pole" , FOR_V2(0x03F0F4, 0x01871B) }, + { "Antarctica/Syowa" , FOR_V2(0x03FA85, 0x018AA3) }, + { "Antarctica/Troll" , FOR_V2(0x03FB3B, 0x018AFE) }, + { "Antarctica/Vostok" , FOR_V2(0x03FFD6, 0x018CBB) }, + { "Arctic/Longyearbyen" , FOR_V2(0x04008D, 0x018D17) }, + { "Asia/Aden" , FOR_V2(0x04094D, 0x019055) }, + { "Asia/Almaty" , FOR_V2(0x0409FE, 0x0190AB) }, + { "Asia/Amman" , FOR_V2(0x040E06, 0x019254) }, + { "Asia/Anadyr" , FOR_V2(0x04154F, 0x019505) }, + { "Asia/Aqtau" , FOR_V2(0x041A12, 0x0196EF) }, + { "Asia/Aqtobe" , FOR_V2(0x041E0A, 0x019891) }, + { "Asia/Ashgabat" , FOR_V2(0x042216, 0x019A37) }, + { "Asia/Ashkhabad" , FOR_V2(0x04248D, 0x019B40) }, + { "Asia/Atyrau" , FOR_V2(0x042704, 0x019C49) }, + { "Asia/Baghdad" , FOR_V2(0x042B04, 0x019DEF) }, + { "Asia/Bahrain" , FOR_V2(0x042EE7, 0x019F74) }, + { "Asia/Baku" , FOR_V2(0x042FBA, 0x019FD9) }, + { "Asia/Bangkok" , FOR_V2(0x043491, 0x01A1C0) }, + { "Asia/Barnaul" , FOR_V2(0x043564, 0x01A225) }, + { "Asia/Beirut" , FOR_V2(0x043A43, 0x01A415) }, + { "Asia/Bishkek" , FOR_V2(0x0442B9, 0x01A72D) }, + { "Asia/Brunei" , FOR_V2(0x04469C, 0x01A8B6) }, + { "Asia/Calcutta" , FOR_V2(0x044773, 0x01A91D) }, + { "Asia/Chita" , FOR_V2(0x04489C, 0x01A99D) }, + { "Asia/Choibalsan" , FOR_V2(0x044D81, 0x01AB95) }, + { "Asia/Chongqing" , FOR_V2(0x045154, 0x01AD21) }, + { "Asia/Chungking" , FOR_V2(0x045391, 0x01AE08) }, + { "Asia/Colombo" , FOR_V2(0x0455CE, 0x01AEEF) }, + { "Asia/Dacca" , FOR_V2(0x04574E, 0x01AF9C) }, + { "Asia/Damascus" , FOR_V2(0x0458AB, 0x01B03C) }, + { "Asia/Dhaka" , FOR_V2(0x0461AD, 0x01B386) }, + { "Asia/Dili" , FOR_V2(0x04630A, 0x01B426) }, + { "Asia/Dubai" , FOR_V2(0x0463F9, 0x01B495) }, + { "Asia/Dushanbe" , FOR_V2(0x0464AA, 0x01B4EB) }, + { "Asia/Famagusta" , FOR_V2(0x046705, 0x01B5E8) }, + { "Asia/Gaza" , FOR_V2(0x046F0C, 0x01B8EE) }, + { "Asia/Harbin" , FOR_V2(0x04782E, 0x01BC53) }, + { "Asia/Hebron" , FOR_V2(0x047A6B, 0x01BD3A) }, + { "Asia/Ho_Chi_Minh" , FOR_V2(0x0483A8, 0x01C0A8) }, + { "Asia/Hong_Kong" , FOR_V2(0x048513, 0x01C14B) }, + { "Asia/Hovd" , FOR_V2(0x0489D2, 0x01C323) }, + { "Asia/Irkutsk" , FOR_V2(0x048D84, 0x01C4AD) }, + { "Asia/Istanbul" , FOR_V2(0x049285, 0x01C6B6) }, + { "Asia/Jakarta" , FOR_V2(0x049A2C, 0x01C9A3) }, + { "Asia/Jayapura" , FOR_V2(0x049BA8, 0x01CA5A) }, + { "Asia/Jerusalem" , FOR_V2(0x049CC7, 0x01CB01) }, + { "Asia/Kabul" , FOR_V2(0x04A5C3, 0x01CE51) }, + { "Asia/Kamchatka" , FOR_V2(0x04A69F, 0x01CEB8) }, + { "Asia/Karachi" , FOR_V2(0x04AB4B, 0x01D096) }, + { "Asia/Kashgar" , FOR_V2(0x04ACD2, 0x01D146) }, + { "Asia/Kathmandu" , FOR_V2(0x04AD83, 0x01D19C) }, + { "Asia/Katmandu" , FOR_V2(0x04AE63, 0x01D205) }, + { "Asia/Khandyga" , FOR_V2(0x04AF43, 0x01D26E) }, + { "Asia/Kolkata" , FOR_V2(0x04B464, 0x01D487) }, + { "Asia/Krasnoyarsk" , FOR_V2(0x04B58D, 0x01D507) }, + { "Asia/Kuala_Lumpur" , FOR_V2(0x04BA69, 0x01D6FF) }, + { "Asia/Kuching" , FOR_V2(0x04BC08, 0x01D7C8) }, + { "Asia/Kuwait" , FOR_V2(0x04BE05, 0x01D8A9) }, + { "Asia/Macao" , FOR_V2(0x04BEB6, 0x01D8FF) }, + { "Asia/Macau" , FOR_V2(0x04C38D, 0x01DADF) }, + { "Asia/Magadan" , FOR_V2(0x04C864, 0x01DCBF) }, + { "Asia/Makassar" , FOR_V2(0x04CD46, 0x01DEB3) }, + { "Asia/Manila" , FOR_V2(0x04CE99, 0x01DF7B) }, + { "Asia/Muscat" , FOR_V2(0x04CFED, 0x01E00E) }, + { "Asia/Nicosia" , FOR_V2(0x04D09E, 0x01E064) }, + { "Asia/Novokuznetsk" , FOR_V2(0x04D88F, 0x01E35F) }, + { "Asia/Novosibirsk" , FOR_V2(0x04DD39, 0x01E53C) }, + { "Asia/Omsk" , FOR_V2(0x04E21E, 0x01E732) }, + { "Asia/Oral" , FOR_V2(0x04E6EE, 0x01E91E) }, + { "Asia/Phnom_Penh" , FOR_V2(0x04EAF6, 0x01EAC3) }, + { "Asia/Pontianak" , FOR_V2(0x04EBC9, 0x01EB28) }, + { "Asia/Pyongyang" , FOR_V2(0x04ED4C, 0x01EBE7) }, + { "Asia/Qatar" , FOR_V2(0x04EE45, 0x01EC5C) }, + { "Asia/Qostanay" , FOR_V2(0x04EF18, 0x01ECC1) }, + { "Asia/Qyzylorda" , FOR_V2(0x04F331, 0x01EE74) }, + { "Asia/Rangoon" , FOR_V2(0x04F75B, 0x01F02F) }, + { "Asia/Riyadh" , FOR_V2(0x04F873, 0x01F0B0) }, + { "Asia/Saigon" , FOR_V2(0x04F924, 0x01F106) }, + { "Asia/Sakhalin" , FOR_V2(0x04FA8F, 0x01F1A9) }, + { "Asia/Samarkand" , FOR_V2(0x04FF65, 0x01F39B) }, + { "Asia/Seoul" , FOR_V2(0x0501C3, 0x01F4A2) }, + { "Asia/Shanghai" , FOR_V2(0x050438, 0x01F5A5) }, + { "Asia/Singapore" , FOR_V2(0x050681, 0x01F698) }, + { "Asia/Srednekolymsk" , FOR_V2(0x05080C, 0x01F74D) }, + { "Asia/Taipei" , FOR_V2(0x050CF2, 0x01F94E) }, + { "Asia/Tashkent" , FOR_V2(0x050FF7, 0x01FA81) }, + { "Asia/Tbilisi" , FOR_V2(0x051263, 0x01FB8F) }, + { "Asia/Tehran" , FOR_V2(0x05167A, 0x01FD32) }, + { "Asia/Tel_Aviv" , FOR_V2(0x05209C, 0x01FFA4) }, + { "Asia/Thimbu" , FOR_V2(0x052998, 0x0202F4) }, + { "Asia/Thimphu" , FOR_V2(0x052A6F, 0x02035B) }, + { "Asia/Tokyo" , FOR_V2(0x052B46, 0x0203C2) }, + { "Asia/Tomsk" , FOR_V2(0x052C87, 0x020453) }, + { "Asia/Ujung_Pandang" , FOR_V2(0x053166, 0x020643) }, + { "Asia/Ulaanbaatar" , FOR_V2(0x053270, 0x0206C2) }, + { "Asia/Ulan_Bator" , FOR_V2(0x05360C, 0x020836) }, + { "Asia/Urumqi" , FOR_V2(0x053993, 0x020995) }, + { "Asia/Ust-Nera" , FOR_V2(0x053A51, 0x0209F8) }, + { "Asia/Vientiane" , FOR_V2(0x053F55, 0x020BFF) }, + { "Asia/Vladivostok" , FOR_V2(0x054028, 0x020C64) }, + { "Asia/Yakutsk" , FOR_V2(0x0544FF, 0x020E56) }, + { "Asia/Yangon" , FOR_V2(0x0549D5, 0x021048) }, + { "Asia/Yekaterinburg" , FOR_V2(0x054AED, 0x0210C9) }, + { "Asia/Yerevan" , FOR_V2(0x054FE2, 0x0212C6) }, + { "Atlantic/Azores" , FOR_V2(0x05546D, 0x02148F) }, + { "Atlantic/Bermuda" , FOR_V2(0x05621B, 0x0219A3) }, + { "Atlantic/Canary" , FOR_V2(0x0569E1, 0x021C7E) }, + { "Atlantic/Cape_Verde" , FOR_V2(0x057164, 0x021F53) }, + { "Atlantic/Faeroe" , FOR_V2(0x05727E, 0x021FD8) }, + { "Atlantic/Faroe" , FOR_V2(0x0579A1, 0x02227C) }, + { "Atlantic/Jan_Mayen" , FOR_V2(0x0580C4, 0x022520) }, + { "Atlantic/Madeira" , FOR_V2(0x058984, 0x02285E) }, + { "Atlantic/Reykjavik" , FOR_V2(0x059732, 0x022D7B) }, + { "Atlantic/South_Georgia" , FOR_V2(0x059BC8, 0x022F41) }, + { "Atlantic/St_Helena" , FOR_V2(0x059C78, 0x022F97) }, + { "Atlantic/Stanley" , FOR_V2(0x059D18, 0x022FE8) }, + { "Australia/ACT" , FOR_V2(0x05A1E2, 0x0231C1) }, + { "Australia/Adelaide" , FOR_V2(0x05AA8A, 0x0234F0) }, + { "Australia/Brisbane" , FOR_V2(0x05B353, 0x02382E) }, + { "Australia/Broken_Hill" , FOR_V2(0x05B527, 0x023903) }, + { "Australia/Canberra" , FOR_V2(0x05BE12, 0x023C4E) }, + { "Australia/Currie" , FOR_V2(0x05C6BA, 0x023F7D) }, + { "Australia/Darwin" , FOR_V2(0x05CF78, 0x0242C2) }, + { "Australia/Eucla" , FOR_V2(0x05D0C6, 0x024359) }, + { "Australia/Hobart" , FOR_V2(0x05D2CF, 0x024441) }, + { "Australia/LHI" , FOR_V2(0x05DBFC, 0x0247AD) }, + { "Australia/Lindeman" , FOR_V2(0x05E34C, 0x024A60) }, + { "Australia/Lord_Howe" , FOR_V2(0x05E560, 0x024B51) }, + { "Australia/Melbourne" , FOR_V2(0x05ECC0, 0x024E14) }, + { "Australia/North" , FOR_V2(0x05F570, 0x02514B) }, + { "Australia/NSW" , FOR_V2(0x05F6AC, 0x0251D0) }, + { "Australia/Perth" , FOR_V2(0x05FF54, 0x0254FF) }, + { "Australia/Queensland" , FOR_V2(0x06014A, 0x0255E5) }, + { "Australia/South" , FOR_V2(0x060307, 0x0256A3) }, + { "Australia/Sydney" , FOR_V2(0x060BC1, 0x0259D2) }, + { "Australia/Tasmania" , FOR_V2(0x061485, 0x025D1D) }, + { "Australia/Victoria" , FOR_V2(0x061D9D, 0x026074) }, + { "Australia/West" , FOR_V2(0x062645, 0x0263A3) }, + { "Australia/Yancowinna" , FOR_V2(0x06281D, 0x02646B) }, + { "Brazil/Acre" , FOR_V2(0x0630EC, 0x02679A) }, + { "Brazil/DeNoronha" , FOR_V2(0x06336C, 0x02689C) }, + { "Brazil/East" , FOR_V2(0x063644, 0x0269BA) }, + { "Brazil/West" , FOR_V2(0x063BF4, 0x026BDC) }, + { "Canada/Atlantic" , FOR_V2(0x063E5C, 0x026CD2) }, + { "Canada/Central" , FOR_V2(0x064BC8, 0x0271BA) }, + { "Canada/Eastern" , FOR_V2(0x065708, 0x0275E0) }, + { "Canada/Mountain" , FOR_V2(0x0664BA, 0x027AE1) }, + { "Canada/Newfoundland" , FOR_V2(0x066DE2, 0x027E43) }, + { "Canada/Pacific" , FOR_V2(0x067C35, 0x028387) }, + { "Canada/Saskatchewan" , FOR_V2(0x06878D, 0x0287B1) }, + { "Canada/Yukon" , FOR_V2(0x068B6D, 0x02893A) }, + { "CET" , FOR_V2(0x0691B9, 0x028BAB) }, + { "Chile/Continental" , FOR_V2(0x0699F3, 0x028EB0) }, + { "Chile/EasterIsland" , FOR_V2(0x06A3E0, 0x02925C) }, + { "CST6CDT" , FOR_V2(0x06ACA5, 0x02959C) }, + { "Cuba" , FOR_V2(0x06B5B7, 0x0298F5) }, + { "EET" , FOR_V2(0x06BF33, 0x029C73) }, + { "Egypt" , FOR_V2(0x06C6B3, 0x029F36) }, + { "Eire" , FOR_V2(0x06CE62, 0x02A212) }, + { "EST" , FOR_V2(0x06DC12, 0x02A71A) }, + { "EST5EDT" , FOR_V2(0x06DC90, 0x02A75C) }, + { "Etc/GMT" , FOR_V2(0x06E5A2, 0x02AAB5) }, + { "Etc/GMT+0" , FOR_V2(0x06E620, 0x02AAF7) }, + { "Etc/GMT+1" , FOR_V2(0x06E69E, 0x02AB39) }, + { "Etc/GMT+10" , FOR_V2(0x06E71E, 0x02AB7B) }, + { "Etc/GMT+11" , FOR_V2(0x06E79F, 0x02ABBD) }, + { "Etc/GMT+12" , FOR_V2(0x06E820, 0x02ABFF) }, + { "Etc/GMT+2" , FOR_V2(0x06E8A1, 0x02AC41) }, + { "Etc/GMT+3" , FOR_V2(0x06E921, 0x02AC83) }, + { "Etc/GMT+4" , FOR_V2(0x06E9A1, 0x02ACC5) }, + { "Etc/GMT+5" , FOR_V2(0x06EA21, 0x02AD07) }, + { "Etc/GMT+6" , FOR_V2(0x06EAA1, 0x02AD49) }, + { "Etc/GMT+7" , FOR_V2(0x06EB21, 0x02AD8B) }, + { "Etc/GMT+8" , FOR_V2(0x06EBA1, 0x02ADCD) }, + { "Etc/GMT+9" , FOR_V2(0x06EC21, 0x02AE0F) }, + { "Etc/GMT-0" , FOR_V2(0x06ECA1, 0x02AE51) }, + { "Etc/GMT-1" , FOR_V2(0x06ED1F, 0x02AE93) }, + { "Etc/GMT-10" , FOR_V2(0x06EDA0, 0x02AED5) }, + { "Etc/GMT-11" , FOR_V2(0x06EE22, 0x02AF17) }, + { "Etc/GMT-12" , FOR_V2(0x06EEA4, 0x02AF59) }, + { "Etc/GMT-13" , FOR_V2(0x06EF26, 0x02AF9B) }, + { "Etc/GMT-14" , FOR_V2(0x06EFA8, 0x02AFDD) }, + { "Etc/GMT-2" , FOR_V2(0x06F02A, 0x02B01F) }, + { "Etc/GMT-3" , FOR_V2(0x06F0AB, 0x02B061) }, + { "Etc/GMT-4" , FOR_V2(0x06F12C, 0x02B0A3) }, + { "Etc/GMT-5" , FOR_V2(0x06F1AD, 0x02B0E5) }, + { "Etc/GMT-6" , FOR_V2(0x06F22E, 0x02B127) }, + { "Etc/GMT-7" , FOR_V2(0x06F2AF, 0x02B169) }, + { "Etc/GMT-8" , FOR_V2(0x06F330, 0x02B1AB) }, + { "Etc/GMT-9" , FOR_V2(0x06F3B1, 0x02B1ED) }, + { "Etc/GMT0" , FOR_V2(0x06F432, 0x02B22F) }, + { "Etc/Greenwich" , FOR_V2(0x06F4B0, 0x02B271) }, + { "Etc/UCT" , FOR_V2(0x06F52E, 0x02B2B3) }, + { "Etc/Universal" , FOR_V2(0x06F5AC, 0x02B2F5) }, + { "Etc/UTC" , FOR_V2(0x06F62A, 0x02B337) }, + { "Etc/Zulu" , FOR_V2(0x06F6A8, 0x02B379) }, + { "Europe/Amsterdam" , FOR_V2(0x06F726, 0x02B3BB) }, + { "Europe/Andorra" , FOR_V2(0x070290, 0x02B800) }, + { "Europe/Astrakhan" , FOR_V2(0x07096A, 0x02BA8D) }, + { "Europe/Athens" , FOR_V2(0x070E15, 0x02BC6B) }, + { "Europe/Belfast" , FOR_V2(0x0716F7, 0x02BFBF) }, + { "Europe/Belgrade" , FOR_V2(0x072543, 0x02C4FA) }, + { "Europe/Berlin" , FOR_V2(0x072CCF, 0x02C7CA) }, + { "Europe/Bratislava" , FOR_V2(0x0735E9, 0x02CB3B) }, + { "Europe/Brussels" , FOR_V2(0x073EF2, 0x02CE8F) }, + { "Europe/Bucharest" , FOR_V2(0x074A73, 0x02D2CD) }, + { "Europe/Budapest" , FOR_V2(0x075307, 0x02D5FE) }, + { "Europe/Busingen" , FOR_V2(0x075C53, 0x02D96E) }, + { "Europe/Chisinau" , FOR_V2(0x0763DC, 0x02DC36) }, + { "Europe/Copenhagen" , FOR_V2(0x076D3E, 0x02DFC5) }, + { "Europe/Dublin" , FOR_V2(0x0775A3, 0x02E2DB) }, + { "Europe/Gibraltar" , FOR_V2(0x078353, 0x02E7E3) }, + { "Europe/Guernsey" , FOR_V2(0x078F4B, 0x02EC4B) }, + { "Europe/Helsinki" , FOR_V2(0x079D97, 0x02F186) }, + { "Europe/Isle_of_Man" , FOR_V2(0x07A50F, 0x02F44D) }, + { "Europe/Istanbul" , FOR_V2(0x07B35B, 0x02F988) }, + { "Europe/Jersey" , FOR_V2(0x07BB02, 0x02FC75) }, + { "Europe/Kaliningrad" , FOR_V2(0x07C94E, 0x0301B0) }, + { "Europe/Kiev" , FOR_V2(0x07CF43, 0x030417) }, + { "Europe/Kirov" , FOR_V2(0x07D78B, 0x03074A) }, + { "Europe/Lisbon" , FOR_V2(0x07DC26, 0x030920) }, + { "Europe/Ljubljana" , FOR_V2(0x07E9D2, 0x030E3C) }, + { "Europe/London" , FOR_V2(0x07F15E, 0x03110C) }, + { "Europe/Luxembourg" , FOR_V2(0x07FFAA, 0x031647) }, + { "Europe/Madrid" , FOR_V2(0x080B38, 0x031A98) }, + { "Europe/Malta" , FOR_V2(0x08158A, 0x031E7D) }, + { "Europe/Mariehamn" , FOR_V2(0x081FD2, 0x032247) }, + { "Europe/Minsk" , FOR_V2(0x08274A, 0x03250E) }, + { "Europe/Monaco" , FOR_V2(0x082C7F, 0x032720) }, + { "Europe/Moscow" , FOR_V2(0x08380B, 0x032B6C) }, + { "Europe/Nicosia" , FOR_V2(0x083E2A, 0x032DEC) }, + { "Europe/Oslo" , FOR_V2(0x084608, 0x0330D4) }, + { "Europe/Paris" , FOR_V2(0x084EC8, 0x033412) }, + { "Europe/Podgorica" , FOR_V2(0x085A66, 0x033869) }, + { "Europe/Prague" , FOR_V2(0x0861F2, 0x033B39) }, + { "Europe/Riga" , FOR_V2(0x086AFB, 0x033E8D) }, + { "Europe/Rome" , FOR_V2(0x08739D, 0x0341D9) }, + { "Europe/Samara" , FOR_V2(0x087DFA, 0x0345A3) }, + { "Europe/San_Marino" , FOR_V2(0x0882DE, 0x0347A1) }, + { "Europe/Sarajevo" , FOR_V2(0x088D3B, 0x034B6B) }, + { "Europe/Saratov" , FOR_V2(0x0894C7, 0x034E3B) }, + { "Europe/Simferopol" , FOR_V2(0x089982, 0x035020) }, + { "Europe/Skopje" , FOR_V2(0x089F41, 0x03526F) }, + { "Europe/Sofia" , FOR_V2(0x08A6CD, 0x03553F) }, + { "Europe/Stockholm" , FOR_V2(0x08AEF6, 0x035846) }, + { "Europe/Tallinn" , FOR_V2(0x08B677, 0x035B06) }, + { "Europe/Tirane" , FOR_V2(0x08BEE7, 0x035E3F) }, + { "Europe/Tiraspol" , FOR_V2(0x08C717, 0x036145) }, + { "Europe/Ulyanovsk" , FOR_V2(0x08D079, 0x0364D4) }, + { "Europe/Uzhgorod" , FOR_V2(0x08D58A, 0x0366E1) }, + { "Europe/Vaduz" , FOR_V2(0x08DDA6, 0x0369FD) }, + { "Europe/Vatican" , FOR_V2(0x08E527, 0x036CBD) }, + { "Europe/Vienna" , FOR_V2(0x08EF84, 0x037087) }, + { "Europe/Vilnius" , FOR_V2(0x08F828, 0x0373BB) }, + { "Europe/Volgograd" , FOR_V2(0x0900A6, 0x037701) }, + { "Europe/Warsaw" , FOR_V2(0x090551, 0x0378DF) }, + { "Europe/Zagreb" , FOR_V2(0x090FBB, 0x037CC2) }, + { "Europe/Zaporozhye" , FOR_V2(0x091747, 0x037F92) }, + { "Europe/Zurich" , FOR_V2(0x091FA8, 0x0382D3) }, + { "Factory" , FOR_V2(0x092729, 0x038593) }, + { "GB" , FOR_V2(0x0927A9, 0x0385D5) }, + { "GB-Eire" , FOR_V2(0x0935F5, 0x038B10) }, + { "GMT" , FOR_V2(0x094441, 0x03904B) }, + { "GMT+0" , FOR_V2(0x0944BF, 0x03908D) }, + { "GMT-0" , FOR_V2(0x09453D, 0x0390CF) }, + { "GMT0" , FOR_V2(0x0945BB, 0x039111) }, + { "Greenwich" , FOR_V2(0x094639, 0x039153) }, + { "Hongkong" , FOR_V2(0x0946B7, 0x039195) }, + { "HST" , FOR_V2(0x094B76, 0x03936D) }, + { "Iceland" , FOR_V2(0x094BF5, 0x0393AF) }, + { "Indian/Antananarivo" , FOR_V2(0x09508B, 0x039575) }, + { "Indian/Chagos" , FOR_V2(0x095192, 0x0395F3) }, + { "Indian/Christmas" , FOR_V2(0x095265, 0x039658) }, + { "Indian/Cocos" , FOR_V2(0x095316, 0x0396AE) }, + { "Indian/Comoro" , FOR_V2(0x0953D0, 0x039706) }, + { "Indian/Kerguelen" , FOR_V2(0x0954D7, 0x039784) }, + { "Indian/Mahe" , FOR_V2(0x095588, 0x0397DA) }, + { "Indian/Maldives" , FOR_V2(0x095639, 0x039830) }, + { "Indian/Mauritius" , FOR_V2(0x09570C, 0x039895) }, + { "Indian/Mayotte" , FOR_V2(0x095809, 0x039909) }, + { "Indian/Reunion" , FOR_V2(0x095910, 0x039987) }, + { "Iran" , FOR_V2(0x0959C1, 0x0399DD) }, + { "Israel" , FOR_V2(0x0963E3, 0x039C4F) }, + { "Jamaica" , FOR_V2(0x096CDF, 0x039F9F) }, + { "Japan" , FOR_V2(0x096ECD, 0x03A06D) }, + { "Kwajalein" , FOR_V2(0x09700E, 0x03A0FE) }, + { "Libya" , FOR_V2(0x097156, 0x03A195) }, + { "MET" , FOR_V2(0x0973D3, 0x03A296) }, + { "Mexico/BajaNorte" , FOR_V2(0x097C0D, 0x03A59B) }, + { "Mexico/BajaSur" , FOR_V2(0x09853F, 0x03A904) }, + { "Mexico/General" , FOR_V2(0x098B41, 0x03AB45) }, + { "MST" , FOR_V2(0x09917D, 0x03AD99) }, + { "MST7MDT" , FOR_V2(0x0991FB, 0x03ADDB) }, + { "Navajo" , FOR_V2(0x099B0D, 0x03B134) }, + { "NZ" , FOR_V2(0x09A4A5, 0x03B4BE) }, + { "NZ-CHAT" , FOR_V2(0x09AE36, 0x03B846) }, + { "Pacific/Apia" , FOR_V2(0x09B656, 0x03BB41) }, + { "Pacific/Auckland" , FOR_V2(0x09BAAB, 0x03BCE9) }, + { "Pacific/Bougainville" , FOR_V2(0x09C454, 0x03C089) }, + { "Pacific/Chatham" , FOR_V2(0x09C578, 0x03C10E) }, + { "Pacific/Chuuk" , FOR_V2(0x09CDA7, 0x03C418) }, + { "Pacific/Easter" , FOR_V2(0x09CECF, 0x03C4A1) }, + { "Pacific/Efate" , FOR_V2(0x09D7A1, 0x03C7EE) }, + { "Pacific/Enderbury" , FOR_V2(0x09D97F, 0x03C8B2) }, + { "Pacific/Fakaofo" , FOR_V2(0x09DA84, 0x03C935) }, + { "Pacific/Fiji" , FOR_V2(0x09DB58, 0x03C99A) }, + { "Pacific/Funafuti" , FOR_V2(0x09DF99, 0x03CB30) }, + { "Pacific/Galapagos" , FOR_V2(0x09E04B, 0x03CB86) }, + { "Pacific/Gambier" , FOR_V2(0x09E156, 0x03CC0C) }, + { "Pacific/Guadalcanal" , FOR_V2(0x09E215, 0x03CC71) }, + { "Pacific/Guam" , FOR_V2(0x09E2C7, 0x03CCC7) }, + { "Pacific/Honolulu" , FOR_V2(0x09E4C1, 0x03CD96) }, + { "Pacific/Johnston" , FOR_V2(0x09E61C, 0x03CE3B) }, + { "Pacific/Kiritimati" , FOR_V2(0x09E771, 0x03CEDA) }, + { "Pacific/Kosrae" , FOR_V2(0x09E877, 0x03CF5C) }, + { "Pacific/Kwajalein" , FOR_V2(0x09E9E8, 0x03CFFF) }, + { "Pacific/Majuro" , FOR_V2(0x09EB39, 0x03D09F) }, + { "Pacific/Marquesas" , FOR_V2(0x09EC98, 0x03D14E) }, + { "Pacific/Midway" , FOR_V2(0x09ED62, 0x03D1B7) }, + { "Pacific/Nauru" , FOR_V2(0x09EE2B, 0x03D221) }, + { "Pacific/Niue" , FOR_V2(0x09EF33, 0x03D29C) }, + { "Pacific/Norfolk" , FOR_V2(0x09F030, 0x03D314) }, + { "Pacific/Noumea" , FOR_V2(0x09F3AC, 0x03D472) }, + { "Pacific/Pago_Pago" , FOR_V2(0x09F4E8, 0x03D501) }, + { "Pacific/Palau" , FOR_V2(0x09F5A3, 0x03D55D) }, + { "Pacific/Pitcairn" , FOR_V2(0x09F663, 0x03D5B3) }, + { "Pacific/Pohnpei" , FOR_V2(0x09F739, 0x03D61A) }, + { "Pacific/Ponape" , FOR_V2(0x09F882, 0x03D6B1) }, + { "Pacific/Port_Moresby" , FOR_V2(0x09F9BD, 0x03D73A) }, + { "Pacific/Rarotonga" , FOR_V2(0x09FAA0, 0x03D7AD) }, + { "Pacific/Saipan" , FOR_V2(0x09FCED, 0x03D89D) }, + { "Pacific/Samoa" , FOR_V2(0x09FEE7, 0x03D96C) }, + { "Pacific/Tahiti" , FOR_V2(0x09FFA2, 0x03D9C8) }, + { "Pacific/Tarawa" , FOR_V2(0x0A0062, 0x03DA2D) }, + { "Pacific/Tongatapu" , FOR_V2(0x0A0123, 0x03DA92) }, + { "Pacific/Truk" , FOR_V2(0x0A02A3, 0x03DB3D) }, + { "Pacific/Wake" , FOR_V2(0x0A03BC, 0x03DBB7) }, + { "Pacific/Wallis" , FOR_V2(0x0A0479, 0x03DC18) }, + { "Pacific/Yap" , FOR_V2(0x0A052B, 0x03DC6E) }, + { "Poland" , FOR_V2(0x0A0644, 0x03DCE8) }, + { "Portugal" , FOR_V2(0x0A10AE, 0x03E0CB) }, + { "PRC" , FOR_V2(0x0A1E47, 0x03E5D4) }, + { "PST8PDT" , FOR_V2(0x0A2084, 0x03E6BB) }, + { "ROC" , FOR_V2(0x0A2996, 0x03EA14) }, + { "ROK" , FOR_V2(0x0A2C9B, 0x03EB47) }, + { "Singapore" , FOR_V2(0x0A2F10, 0x03EC4A) }, + { "Turkey" , FOR_V2(0x0A309B, 0x03ECFF) }, + { "UCT" , FOR_V2(0x0A3842, 0x03EFEC) }, + { "Universal" , FOR_V2(0x0A38C0, 0x03F02E) }, + { "US/Alaska" , FOR_V2(0x0A393E, 0x03F070) }, + { "US/Aleutian" , FOR_V2(0x0A428D, 0x03F3E8) }, + { "US/Arizona" , FOR_V2(0x0A4BCD, 0x03F759) }, + { "US/Central" , FOR_V2(0x0A4D21, 0x03F7F0) }, + { "US/East-Indiana" , FOR_V2(0x0A5B25, 0x03FD14) }, + { "US/Eastern" , FOR_V2(0x0A61B3, 0x03FF8F) }, + { "US/Hawaii" , FOR_V2(0x0A6F8F, 0x04049F) }, + { "US/Indiana-Starke" , FOR_V2(0x0A70E4, 0x04053E) }, + { "US/Michigan" , FOR_V2(0x0A7A6C, 0x0408C8) }, + { "US/Mountain" , FOR_V2(0x0A832E, 0x040C09) }, + { "US/Pacific" , FOR_V2(0x0A8CC6, 0x040F93) }, + { "US/Pacific-New" , FOR_V2(0x0A97E6, 0x0413A9) }, + { "US/Samoa" , FOR_V2(0x0AA306, 0x0417BF) }, + { "UTC" , FOR_V2(0x0AA3C1, 0x04181B) }, + { "W-SU" , FOR_V2(0x0AA43F, 0x04185D) }, + { "WET" , FOR_V2(0x0AAA4A, 0x041AC9) }, + { "Zulu" , FOR_V2(0x0AB1C7, 0x041D8C) }, }; #ifdef TIMELIB_SUPPORTS_V2DATA -const unsigned char timelib_timezone_db_data_builtin[700443] = { +const unsigned char timelib_timezone_db_data_builtin[700997] = { #else -const unsigned char timelib_timezone_db_data_builtin[269539] = { +const unsigned char timelib_timezone_db_data_builtin[269774] = { #endif @@ -1051,15 +1052,15 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 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, 0xCE, 0x43, 0xA0, 0x5C, 0xFC, 0x68, 0x20, -0x5E, 0x9B, 0xB0, 0xA0, 0x5E, 0xC9, 0xD5, 0x20, 0x60, 0x72, 0x58, 0x20, 0x60, 0xA0, 0x7C, 0xA0, +0x5E, 0x9B, 0xB0, 0xA0, 0x5E, 0xD3, 0x0F, 0xA0, 0x60, 0x72, 0x58, 0x20, 0x60, 0xA0, 0x7C, 0xA0, 0x62, 0x3F, 0xC5, 0x20, 0x62, 0x77, 0x24, 0x20, 0x64, 0x16, 0x6C, 0xA0, 0x64, 0x44, 0x91, 0x20, 0x65, 0xED, 0x14, 0x20, 0x66, 0x1B, 0x38, 0xA0, 0x67, 0xBA, 0x81, 0x20, 0x67, 0xF1, 0xE0, 0x20, 0x69, 0x91, 0x28, 0xA0, 0x69, 0xBF, 0x4D, 0x20, 0x6B, 0x67, 0xD0, 0x20, 0x6B, 0x95, 0xF4, 0xA0, -0x6D, 0x35, 0x3D, 0x20, 0x6D, 0x63, 0x61, 0xA0, 0x6F, 0x0B, 0xE4, 0xA0, 0x6F, 0x3A, 0x09, 0x20, +0x6D, 0x35, 0x3D, 0x20, 0x6D, 0x6C, 0x9C, 0x20, 0x6F, 0x0B, 0xE4, 0xA0, 0x6F, 0x3A, 0x09, 0x20, 0x70, 0xD9, 0x51, 0xA0, 0x71, 0x10, 0xB0, 0xA0, 0x72, 0xAF, 0xF9, 0x20, 0x72, 0xDE, 0x1D, 0xA0, 0x74, 0x86, 0xA0, 0xA0, 0x74, 0xB4, 0xC5, 0x20, 0x76, 0x54, 0x0D, 0xA0, 0x76, 0x8B, 0x6C, 0xA0, 0x78, 0x2A, 0xB5, 0x20, 0x78, 0x58, 0xD9, 0xA0, 0x79, 0xF8, 0x22, 0x20, 0x7A, 0x2F, 0x81, 0x20, -0x7B, 0xCE, 0xC9, 0xA0, 0x7B, 0xFC, 0xEE, 0x20, 0x7D, 0xA5, 0x71, 0x20, 0x7D, 0xD3, 0x95, 0xA0, +0x7B, 0xCE, 0xC9, 0xA0, 0x7C, 0x06, 0x28, 0xA0, 0x7D, 0xA5, 0x71, 0x20, 0x7D, 0xD3, 0x95, 0xA0, 0x7F, 0x72, 0xDE, 0x20, 0x7F, 0xAA, 0x3D, 0x20, 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, @@ -1103,7 +1104,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 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, 0xCE, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xFC, 0x68, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x9B, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x5E, 0xC9, 0xD5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, +0x5E, 0xD3, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0xA0, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x62, 0x77, 0x24, 0x20, 0x00, 0x00, 0x00, 0x00, 0x64, 0x16, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x44, 0x91, 0x20, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x14, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -1111,7 +1112,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x67, 0xF1, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x69, 0x91, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xBF, 0x4D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x67, 0xD0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x95, 0xF4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x35, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, -0x6D, 0x63, 0x61, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x0B, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, +0x6D, 0x6C, 0x9C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x0B, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A, 0x09, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0xD9, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x10, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x72, 0xAF, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0xDE, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x86, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, @@ -1119,7 +1120,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x76, 0x8B, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x2A, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x78, 0x58, 0xD9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x2F, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7B, 0xFC, 0xEE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, +0x7C, 0x06, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xD3, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xAA, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x81, 0x49, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x81, 0x77, 0xAA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x83, 0x20, 0x2D, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -1127,7 +1128,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x85, 0x24, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC4, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x86, 0xF2, 0x66, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x91, 0xAE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x88, 0xC9, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x68, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, -0x8A, 0x96, 0x7A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3E, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, +0x8A, 0x9F, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3E, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x6D, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x0C, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x43, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8F, 0xE3, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x90, 0x11, 0x36, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x91, 0xB9, 0xB9, 0xA0, 0x00, 0x00, 0x00, 0x00, @@ -1135,7 +1136,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x93, 0xBE, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5D, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x95, 0x8B, 0xF2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x97, 0x2B, 0x3B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x97, 0x62, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x99, 0x01, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x99, 0x30, 0x07, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD8, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, +0x99, 0x39, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD8, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x06, 0xAE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA5, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xDD, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x7C, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9E, 0xAA, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x53, 0x46, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -1143,28 +1144,28 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0xA2, 0x58, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA3, 0xF7, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA4, 0x25, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA5, 0xC4, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA5, 0xFC, 0x26, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA7, 0x9B, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, -0xA7, 0xC9, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA9, 0x72, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, +0xA7, 0xD2, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA9, 0x72, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA9, 0xA0, 0x3B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x3F, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x76, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x16, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x44, 0x4F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAE, 0xEC, 0xD2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAF, 0x1A, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xBA, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, -0xB0, 0xE8, 0x64, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x90, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, +0xB0, 0xF1, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x90, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB2, 0xBF, 0x0B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x5E, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x95, 0xB3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x34, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, -0xB6, 0x63, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x0B, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, +0xB6, 0x6C, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x0B, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x39, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD9, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBA, 0x10, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xAF, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xDD, 0xDC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x86, 0x5F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0xB4, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x53, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, -0xBF, 0x81, 0xF0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x2A, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, +0xBF, 0x8B, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x2A, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x58, 0x98, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xF7, 0xE0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC3, 0x2F, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC4, 0xCE, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, -0xC4, 0xFC, 0xAC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA5, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, +0xC5, 0x05, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA5, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xD3, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x72, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC8, 0xA9, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x49, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x77, 0x68, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1F, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x4E, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCD, 0xED, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, -0xCE, 0x1B, 0x7D, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xC4, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, +0xCE, 0x24, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xC4, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xF2, 0x24, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD1, 0x91, 0x6D, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xC8, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x68, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x96, 0x39, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x3E, 0xBC, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -1172,7 +1173,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0xD7, 0x43, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD8, 0xE2, 0xD0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD9, 0x10, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB9, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xE7, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x86, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00, -0xDC, 0xB5, 0x09, 0xA0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0xDC, 0xBE, 0x44, 0x20, 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, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, @@ -1429,15 +1430,15 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 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, 0xCE, 0x43, 0xA0, -0x5C, 0xFC, 0x68, 0x20, 0x5E, 0x9B, 0xB0, 0xA0, 0x5E, 0xC9, 0xD5, 0x20, 0x60, 0x72, 0x58, 0x20, +0x5C, 0xFC, 0x68, 0x20, 0x5E, 0x9B, 0xB0, 0xA0, 0x5E, 0xD3, 0x0F, 0xA0, 0x60, 0x72, 0x58, 0x20, 0x60, 0xA0, 0x7C, 0xA0, 0x62, 0x3F, 0xC5, 0x20, 0x62, 0x77, 0x24, 0x20, 0x64, 0x16, 0x6C, 0xA0, 0x64, 0x44, 0x91, 0x20, 0x65, 0xED, 0x14, 0x20, 0x66, 0x1B, 0x38, 0xA0, 0x67, 0xBA, 0x81, 0x20, 0x67, 0xF1, 0xE0, 0x20, 0x69, 0x91, 0x28, 0xA0, 0x69, 0xBF, 0x4D, 0x20, 0x6B, 0x67, 0xD0, 0x20, -0x6B, 0x95, 0xF4, 0xA0, 0x6D, 0x35, 0x3D, 0x20, 0x6D, 0x63, 0x61, 0xA0, 0x6F, 0x0B, 0xE4, 0xA0, +0x6B, 0x95, 0xF4, 0xA0, 0x6D, 0x35, 0x3D, 0x20, 0x6D, 0x6C, 0x9C, 0x20, 0x6F, 0x0B, 0xE4, 0xA0, 0x6F, 0x3A, 0x09, 0x20, 0x70, 0xD9, 0x51, 0xA0, 0x71, 0x10, 0xB0, 0xA0, 0x72, 0xAF, 0xF9, 0x20, 0x72, 0xDE, 0x1D, 0xA0, 0x74, 0x86, 0xA0, 0xA0, 0x74, 0xB4, 0xC5, 0x20, 0x76, 0x54, 0x0D, 0xA0, 0x76, 0x8B, 0x6C, 0xA0, 0x78, 0x2A, 0xB5, 0x20, 0x78, 0x58, 0xD9, 0xA0, 0x79, 0xF8, 0x22, 0x20, -0x7A, 0x2F, 0x81, 0x20, 0x7B, 0xCE, 0xC9, 0xA0, 0x7B, 0xFC, 0xEE, 0x20, 0x7D, 0xA5, 0x71, 0x20, +0x7A, 0x2F, 0x81, 0x20, 0x7B, 0xCE, 0xC9, 0xA0, 0x7C, 0x06, 0x28, 0xA0, 0x7D, 0xA5, 0x71, 0x20, 0x7D, 0xD3, 0x95, 0xA0, 0x7F, 0x72, 0xDE, 0x20, 0x7F, 0xAA, 0x3D, 0x20, 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, @@ -1475,7 +1476,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 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, 0xCE, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xFC, 0x68, 0x20, 0x00, 0x00, 0x00, 0x00, -0x5E, 0x9B, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xC9, 0xD5, 0x20, 0x00, 0x00, 0x00, 0x00, +0x5E, 0x9B, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xD3, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0xA0, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xC5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x62, 0x77, 0x24, 0x20, 0x00, 0x00, 0x00, 0x00, 0x64, 0x16, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x44, 0x91, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -1483,7 +1484,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x67, 0xBA, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x69, 0x91, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xBF, 0x4D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x67, 0xD0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x95, 0xF4, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x6D, 0x35, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x63, 0x61, 0xA0, 0x00, 0x00, 0x00, 0x00, +0x6D, 0x35, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x6C, 0x9C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x0B, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A, 0x09, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0xD9, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x10, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x72, 0xAF, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0xDE, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, @@ -1491,7 +1492,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x76, 0x54, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x8B, 0x6C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x2A, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x78, 0x58, 0xD9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x2F, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, -0x7B, 0xCE, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xFC, 0xEE, 0x20, 0x00, 0x00, 0x00, 0x00, +0x7B, 0xCE, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x06, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xD3, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xAA, 0x3D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x81, 0x49, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x81, 0x77, 0xAA, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -1499,7 +1500,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x84, 0xED, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x85, 0x24, 0xF9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x86, 0xC4, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x86, 0xF2, 0x66, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x91, 0xAE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x88, 0xC9, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x8A, 0x68, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x96, 0x7A, 0xA0, 0x00, 0x00, 0x00, 0x00, +0x8A, 0x68, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x9F, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3E, 0xFD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x6D, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x0C, 0x6A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x43, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x8F, 0xE3, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x90, 0x11, 0x36, 0xA0, 0x00, 0x00, 0x00, 0x00, @@ -1507,7 +1508,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x93, 0x87, 0x26, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x93, 0xBE, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x95, 0x5D, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x95, 0x8B, 0xF2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x97, 0x2B, 0x3B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x97, 0x62, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00, -0x99, 0x01, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x99, 0x30, 0x07, 0x20, 0x00, 0x00, 0x00, 0x00, +0x99, 0x01, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x99, 0x39, 0x41, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xD8, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x06, 0xAE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xA5, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9C, 0xDD, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x7C, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9E, 0xAA, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -1515,28 +1516,28 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0xA2, 0x20, 0xB3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x58, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA3, 0xF7, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA4, 0x25, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA5, 0xC4, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA5, 0xFC, 0x26, 0xA0, 0x00, 0x00, 0x00, 0x00, -0xA7, 0x9B, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA7, 0xC9, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00, +0xA7, 0x9B, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA7, 0xD2, 0xCE, 0x20, 0x00, 0x00, 0x00, 0x00, 0xA9, 0x72, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xA9, 0xA0, 0x3B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x3F, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x76, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x16, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x44, 0x4F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAE, 0xEC, 0xD2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xAF, 0x1A, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, -0xB0, 0xBA, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xE8, 0x64, 0x20, 0x00, 0x00, 0x00, 0x00, +0xB0, 0xBA, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xF1, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x90, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB2, 0xBF, 0x0B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x5E, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x95, 0xB3, 0x20, 0x00, 0x00, 0x00, 0x00, -0xB6, 0x34, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x63, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, +0xB6, 0x34, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x6C, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x0B, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x39, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xB9, 0xD9, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBA, 0x10, 0x6F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xAF, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xDD, 0xDC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x86, 0x5F, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBD, 0xB4, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, -0xBF, 0x53, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x81, 0xF0, 0xA0, 0x00, 0x00, 0x00, 0x00, +0xBF, 0x53, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x8B, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x2A, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x58, 0x98, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xF7, 0xE0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC3, 0x2F, 0x3F, 0xA0, 0x00, 0x00, 0x00, 0x00, -0xC4, 0xCE, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC4, 0xFC, 0xAC, 0xA0, 0x00, 0x00, 0x00, 0x00, +0xC4, 0xCE, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC5, 0x05, 0xE7, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xA5, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xD3, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x72, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xC8, 0xA9, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x49, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCA, 0x77, 0x68, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x1F, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x4E, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, -0xCD, 0xED, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x1B, 0x7D, 0x20, 0x00, 0x00, 0x00, 0x00, +0xCD, 0xED, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x24, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xC4, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xF2, 0x24, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD1, 0x91, 0x6D, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xC8, 0xCC, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x68, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x96, 0x39, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -1544,7 +1545,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0xD7, 0x0C, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x43, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0xD8, 0xE2, 0xD0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0xD9, 0x10, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xB9, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDA, 0xE7, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, -0xDC, 0x86, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDC, 0xB5, 0x09, 0xA0, 0x01, 0x03, 0x02, 0x03, +0xDC, 0x86, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00, 0xDC, 0xBE, 0x44, 0x20, 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, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, @@ -5687,8 +5688,8 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { /* America/Dawson */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x80, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x25, 0x80, 0x00, 0x00, 0x00, 0x9E, 0xB8, 0xCB, 0xB0, 0x9F, 0xBB, 0x23, 0xA0, 0xA0, 0xD0, 0x0C, 0xB0, 0xA1, 0xA2, 0xD2, 0x80, 0xCB, 0x89, 0x28, 0xB0, 0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x34, 0x20, 0xF7, 0x2F, 0x76, 0x90, 0xF8, 0x28, 0xA2, 0x10, 0x07, 0x30, 0xEC, 0x90, 0x13, 0x69, 0x72, 0x20, 0x14, 0x59, 0x55, 0x10, @@ -5711,34 +5712,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x51, 0x3C, 0x59, 0xA0, 0x52, 0x76, 0x10, 0x90, 0x53, 0x1C, 0x3B, 0xA0, 0x54, 0x55, 0xF2, 0x90, 0x54, 0xFC, 0x1D, 0xA0, 0x56, 0x35, 0xD4, 0x90, 0x56, 0xE5, 0x3A, 0x20, 0x58, 0x1E, 0xF1, 0x10, 0x58, 0xC5, 0x1C, 0x20, 0x59, 0xFE, 0xD3, 0x10, 0x5A, 0xA4, 0xFE, 0x20, 0x5B, 0xDE, 0xB5, 0x10, -0x5C, 0x84, 0xE0, 0x20, 0x5D, 0xBE, 0x97, 0x10, 0x5E, 0x64, 0xC2, 0x20, 0x5F, 0x9E, 0x79, 0x10, -0x60, 0x4D, 0xDE, 0xA0, 0x61, 0x87, 0x95, 0x90, 0x62, 0x2D, 0xC0, 0xA0, 0x63, 0x67, 0x77, 0x90, -0x64, 0x0D, 0xA2, 0xA0, 0x65, 0x47, 0x59, 0x90, 0x65, 0xED, 0x84, 0xA0, 0x67, 0x27, 0x3B, 0x90, -0x67, 0xCD, 0x66, 0xA0, 0x69, 0x07, 0x1D, 0x90, 0x69, 0xAD, 0x48, 0xA0, 0x6A, 0xE6, 0xFF, 0x90, -0x6B, 0x96, 0x65, 0x20, 0x6C, 0xD0, 0x1C, 0x10, 0x6D, 0x76, 0x47, 0x20, 0x6E, 0xAF, 0xFE, 0x10, -0x6F, 0x56, 0x29, 0x20, 0x70, 0x8F, 0xE0, 0x10, 0x71, 0x36, 0x0B, 0x20, 0x72, 0x6F, 0xC2, 0x10, -0x73, 0x15, 0xED, 0x20, 0x74, 0x4F, 0xA4, 0x10, 0x74, 0xFF, 0x09, 0xA0, 0x76, 0x38, 0xC0, 0x90, -0x76, 0xDE, 0xEB, 0xA0, 0x78, 0x18, 0xA2, 0x90, 0x78, 0xBE, 0xCD, 0xA0, 0x79, 0xF8, 0x84, 0x90, -0x7A, 0x9E, 0xAF, 0xA0, 0x7B, 0xD8, 0x66, 0x90, 0x7C, 0x7E, 0x91, 0xA0, 0x7D, 0xB8, 0x48, 0x90, -0x7E, 0x5E, 0x73, 0xA0, 0x7F, 0x98, 0x2A, 0x90, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, -0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x5C, 0x84, 0xE0, 0x20, 0x5D, 0xBE, 0x97, 0x10, 0x5E, 0x64, 0xC2, 0x20, 0x02, 0x01, 0x02, 0x01, +0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0xFF, 0xFF, 0x7D, 0x4C, 0x00, 0x00, 0xFF, 0xFF, 0x8F, -0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, 0xFF, -0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, 0x00, -0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, -0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, -0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x08, 0xFF, 0xFF, 0x7D, 0x4C, 0x00, 0x00, 0xFF, 0xFF, +0x8F, 0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, +0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, +0x00, 0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x21, 0x4C, 0x4D, +0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, +0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x4D, +0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, #ifdef TIMELIB_SUPPORTS_V2DATA 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0xFF, 0xFF, 0xFF, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x25, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0x86, 0x8E, 0xB4, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0xCB, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x23, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0xD0, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xA2, 0xD2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x28, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, @@ -5784,44 +5775,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, -0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00, -0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x61, 0x87, 0x95, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x63, 0x67, 0x77, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x65, 0x47, 0x59, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x67, 0x27, 0x3B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x69, 0x07, 0x1D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, -0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, -0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, -0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, -0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00, -0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x76, 0x38, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x78, 0x18, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x79, 0xF8, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7F, 0x98, 0x2A, 0x90, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x02, 0x01, 0x02, 0x01, +0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0xFF, 0xFF, 0x7D, 0x4C, 0x00, 0x00, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x04, 0xFF, -0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, 0xFF, 0xFF, 0x8F, 0x80, 0x01, -0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x19, 0xFF, 0xFF, 0x9D, -0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, -0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, -0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x01, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x53, 0x54, 0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, -0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, -#endif -0x00, 0xEB, 0x16, 0x4A, 0x00, 0x3D, 0xEC, 0xDD, 0x00, 0x00, 0x00, 0x17, 0x50, 0x61, 0x63, 0x69, -0x66, 0x69, 0x63, 0x20, 0x2D, 0x20, 0x59, 0x75, 0x6B, 0x6F, 0x6E, 0x20, 0x28, 0x6E, 0x6F, 0x72, -0x74, 0x68, 0x29, +0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x08, 0xFF, 0xFF, 0x7D, 0x4C, 0x00, 0x00, 0xFF, 0xFF, +0x8F, 0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, +0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, +0x00, 0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x21, 0x4C, 0x4D, +0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, +0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x4D, +0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x0A, +#endif +0x00, 0xEB, 0x16, 0x4A, 0x00, 0x3D, 0xEC, 0xDD, 0x00, 0x00, 0x00, 0x16, 0x50, 0x61, 0x63, 0x69, +0x66, 0x69, 0x63, 0x20, 0x2D, 0x20, 0x59, 0x75, 0x6B, 0x6F, 0x6E, 0x20, 0x28, 0x77, 0x65, 0x73, +0x74, 0x29, /* America/Dawson_Creek */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -7051,7 +7022,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x42, 0x72, 0x65, 0x74, 0x6F, 0x6E, 0x29, /* America/Godthab */ -0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 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, 0x76, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0C, 0x9B, 0x80, 0x68, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x14, 0x33, 0xFA, 0x90, 0x15, 0x23, 0xEB, 0x90, 0x16, 0x13, 0xDC, 0x90, @@ -7171,9 +7142,7 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x32, 0x3E, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x2D, 0x32, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x2D, 0x31, 0x0A, #endif -0x00, 0xEB, 0x43, 0xDD, 0x00, 0xC3, 0xB8, 0x2A, 0x00, 0x00, 0x00, 0x16, 0x47, 0x72, 0x65, 0x65, -0x6E, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, -0x73, 0x29, +0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, /* America/Goose_Bay */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -13386,6 +13355,131 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x72, 0x61, 0x6C, 0x20, 0x2D, 0x20, 0x4E, 0x44, 0x20, 0x28, 0x4D, 0x6F, 0x72, 0x74, 0x6F, 0x6E, 0x20, 0x72, 0x75, 0x72, 0x61, 0x6C, 0x29, +/* America/Nuuk */ +0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x4C, 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, 0x76, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0C, 0x9B, 0x80, 0x68, 0x00, +0x13, 0x4D, 0x7C, 0x50, 0x14, 0x33, 0xFA, 0x90, 0x15, 0x23, 0xEB, 0x90, 0x16, 0x13, 0xDC, 0x90, +0x17, 0x03, 0xCD, 0x90, 0x17, 0xF3, 0xBE, 0x90, 0x18, 0xE3, 0xAF, 0x90, 0x19, 0xD3, 0xA0, 0x90, +0x1A, 0xC3, 0x91, 0x90, 0x1B, 0xBC, 0xBD, 0x10, 0x1C, 0xAC, 0xAE, 0x10, 0x1D, 0x9C, 0x9F, 0x10, +0x1E, 0x8C, 0x90, 0x10, 0x1F, 0x7C, 0x81, 0x10, 0x20, 0x6C, 0x72, 0x10, 0x21, 0x5C, 0x63, 0x10, +0x22, 0x4C, 0x54, 0x10, 0x23, 0x3C, 0x45, 0x10, 0x24, 0x2C, 0x36, 0x10, 0x25, 0x1C, 0x27, 0x10, +0x26, 0x0C, 0x18, 0x10, 0x27, 0x05, 0x43, 0x90, 0x27, 0xF5, 0x34, 0x90, 0x28, 0xE5, 0x25, 0x90, +0x29, 0xD5, 0x16, 0x90, 0x2A, 0xC5, 0x07, 0x90, 0x2B, 0xB4, 0xF8, 0x90, 0x2C, 0xA4, 0xE9, 0x90, +0x2D, 0x94, 0xDA, 0x90, 0x2E, 0x84, 0xCB, 0x90, 0x2F, 0x74, 0xBC, 0x90, 0x30, 0x64, 0xAD, 0x90, +0x31, 0x5D, 0xD9, 0x10, 0x32, 0x72, 0xB4, 0x10, 0x33, 0x3D, 0xBB, 0x10, 0x34, 0x52, 0x96, 0x10, +0x35, 0x1D, 0x9D, 0x10, 0x36, 0x32, 0x78, 0x10, 0x36, 0xFD, 0x7F, 0x10, 0x38, 0x1B, 0x94, 0x90, +0x38, 0xDD, 0x61, 0x10, 0x39, 0xFB, 0x76, 0x90, 0x3A, 0xBD, 0x43, 0x10, 0x3B, 0xDB, 0x58, 0x90, +0x3C, 0xA6, 0x5F, 0x90, 0x3D, 0xBB, 0x3A, 0x90, 0x3E, 0x86, 0x41, 0x90, 0x3F, 0x9B, 0x1C, 0x90, +0x40, 0x66, 0x23, 0x90, 0x41, 0x84, 0x39, 0x10, 0x42, 0x46, 0x05, 0x90, 0x43, 0x64, 0x1B, 0x10, +0x44, 0x25, 0xE7, 0x90, 0x45, 0x43, 0xFD, 0x10, 0x46, 0x05, 0xC9, 0x90, 0x47, 0x23, 0xDF, 0x10, +0x47, 0xEE, 0xE6, 0x10, 0x49, 0x03, 0xC1, 0x10, 0x49, 0xCE, 0xC8, 0x10, 0x4A, 0xE3, 0xA3, 0x10, +0x4B, 0xAE, 0xAA, 0x10, 0x4C, 0xCC, 0xBF, 0x90, 0x4D, 0x8E, 0x8C, 0x10, 0x4E, 0xAC, 0xA1, 0x90, +0x4F, 0x6E, 0x6E, 0x10, 0x50, 0x8C, 0x83, 0x90, 0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90, +0x53, 0x37, 0x6C, 0x90, 0x54, 0x4C, 0x47, 0x90, 0x55, 0x17, 0x4E, 0x90, 0x56, 0x2C, 0x29, 0x90, +0x56, 0xF7, 0x30, 0x90, 0x58, 0x15, 0x46, 0x10, 0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10, +0x5A, 0xB6, 0xF4, 0x90, 0x5B, 0xD5, 0x0A, 0x10, 0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10, +0x5E, 0x7F, 0xF3, 0x10, 0x5F, 0x94, 0xCE, 0x10, 0x60, 0x5F, 0xD5, 0x10, 0x61, 0x7D, 0xEA, 0x90, +0x62, 0x3F, 0xB7, 0x10, 0x63, 0x5D, 0xCC, 0x90, 0x64, 0x1F, 0x99, 0x10, 0x65, 0x3D, 0xAE, 0x90, +0x66, 0x08, 0xB5, 0x90, 0x67, 0x1D, 0x90, 0x90, 0x67, 0xE8, 0x97, 0x90, 0x68, 0xFD, 0x72, 0x90, +0x69, 0xC8, 0x79, 0x90, 0x6A, 0xDD, 0x54, 0x90, 0x6B, 0xA8, 0x5B, 0x90, 0x6C, 0xC6, 0x71, 0x10, +0x6D, 0x88, 0x3D, 0x90, 0x6E, 0xA6, 0x53, 0x10, 0x6F, 0x68, 0x1F, 0x90, 0x70, 0x86, 0x35, 0x10, +0x71, 0x51, 0x3C, 0x10, 0x72, 0x66, 0x17, 0x10, 0x73, 0x31, 0x1E, 0x10, 0x74, 0x45, 0xF9, 0x10, +0x75, 0x11, 0x00, 0x10, 0x76, 0x2F, 0x15, 0x90, 0x76, 0xF0, 0xE2, 0x10, 0x78, 0x0E, 0xF7, 0x90, +0x78, 0xD0, 0xC4, 0x10, 0x79, 0xEE, 0xD9, 0x90, 0x7A, 0xB0, 0xA6, 0x10, 0x7B, 0xCE, 0xBB, 0x90, +0x7C, 0x99, 0xC2, 0x90, 0x7D, 0xAE, 0x9D, 0x90, 0x7E, 0x79, 0xA4, 0x90, 0x7F, 0x8E, 0x7F, 0x90, +0x7F, 0xFF, 0xFF, 0xFF, 0x01, 0x04, 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, 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, 0x02, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, +0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, +0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, +0x2D, 0x30, 0x32, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, +#ifdef TIMELIB_SUPPORTS_V2DATA +0x54, 0x5A, 0x69, 0x66, 0x33, 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, 0x76, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, +0x9B, 0x80, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00, +0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, +0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, +0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, +0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, +0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, +0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, +0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, +0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, +0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, +0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, +0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, +0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, +0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, +0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, +0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, +0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, +0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, +0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, +0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, +0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, +0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, +0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, +0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, +0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, +0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, +0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, +0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, +0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, +0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, +0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, +0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, +0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, +0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, +0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, +0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, +0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, +0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, +0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, +0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, +0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, +0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, +0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, +0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, +0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, +0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, +0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, +0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, +0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, +0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, +0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, +0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, +0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, +0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, +0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, +0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, +0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, +0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, +0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x01, 0x04, 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, 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, 0x02, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, +0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, +0x4C, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x2D, 0x30, 0x32, 0x00, 0x00, 0x00, 0x01, 0x01, +0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x33, 0x3E, 0x33, 0x3C, 0x2D, 0x30, +0x32, 0x3E, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x2D, 0x32, 0x2C, 0x4D, 0x31, 0x30, +0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x2D, 0x31, 0x0A, +#endif +0x00, 0xEB, 0x43, 0xDD, 0x00, 0xC3, 0xB8, 0x2A, 0x00, 0x00, 0x00, 0x16, 0x47, 0x72, 0x65, 0x65, +0x6E, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, +0x73, 0x29, + /* America/Ojinaga */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -16828,8 +16922,8 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { /* America/Whitehorse */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x80, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x25, 0x80, 0x00, 0x00, 0x00, 0x9E, 0xB8, 0xCB, 0xB0, 0x9F, 0xBB, 0x23, 0xA0, 0xA0, 0xD0, 0x0C, 0xB0, 0xA1, 0xA2, 0xD2, 0x80, 0xCB, 0x89, 0x28, 0xB0, 0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x34, 0x20, 0xF7, 0x2F, 0x76, 0x90, 0xF8, 0x28, 0xA2, 0x10, 0xFB, 0x1D, 0x5F, 0x10, 0x13, 0x69, 0x72, 0x20, 0x14, 0x59, 0x55, 0x10, @@ -16852,34 +16946,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x51, 0x3C, 0x59, 0xA0, 0x52, 0x76, 0x10, 0x90, 0x53, 0x1C, 0x3B, 0xA0, 0x54, 0x55, 0xF2, 0x90, 0x54, 0xFC, 0x1D, 0xA0, 0x56, 0x35, 0xD4, 0x90, 0x56, 0xE5, 0x3A, 0x20, 0x58, 0x1E, 0xF1, 0x10, 0x58, 0xC5, 0x1C, 0x20, 0x59, 0xFE, 0xD3, 0x10, 0x5A, 0xA4, 0xFE, 0x20, 0x5B, 0xDE, 0xB5, 0x10, -0x5C, 0x84, 0xE0, 0x20, 0x5D, 0xBE, 0x97, 0x10, 0x5E, 0x64, 0xC2, 0x20, 0x5F, 0x9E, 0x79, 0x10, -0x60, 0x4D, 0xDE, 0xA0, 0x61, 0x87, 0x95, 0x90, 0x62, 0x2D, 0xC0, 0xA0, 0x63, 0x67, 0x77, 0x90, -0x64, 0x0D, 0xA2, 0xA0, 0x65, 0x47, 0x59, 0x90, 0x65, 0xED, 0x84, 0xA0, 0x67, 0x27, 0x3B, 0x90, -0x67, 0xCD, 0x66, 0xA0, 0x69, 0x07, 0x1D, 0x90, 0x69, 0xAD, 0x48, 0xA0, 0x6A, 0xE6, 0xFF, 0x90, -0x6B, 0x96, 0x65, 0x20, 0x6C, 0xD0, 0x1C, 0x10, 0x6D, 0x76, 0x47, 0x20, 0x6E, 0xAF, 0xFE, 0x10, -0x6F, 0x56, 0x29, 0x20, 0x70, 0x8F, 0xE0, 0x10, 0x71, 0x36, 0x0B, 0x20, 0x72, 0x6F, 0xC2, 0x10, -0x73, 0x15, 0xED, 0x20, 0x74, 0x4F, 0xA4, 0x10, 0x74, 0xFF, 0x09, 0xA0, 0x76, 0x38, 0xC0, 0x90, -0x76, 0xDE, 0xEB, 0xA0, 0x78, 0x18, 0xA2, 0x90, 0x78, 0xBE, 0xCD, 0xA0, 0x79, 0xF8, 0x84, 0x90, -0x7A, 0x9E, 0xAF, 0xA0, 0x7B, 0xD8, 0x66, 0x90, 0x7C, 0x7E, 0x91, 0xA0, 0x7D, 0xB8, 0x48, 0x90, -0x7E, 0x5E, 0x73, 0xA0, 0x7F, 0x98, 0x2A, 0x90, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, -0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x5C, 0x84, 0xE0, 0x20, 0x5D, 0xBE, 0x97, 0x10, 0x5E, 0x64, 0xC2, 0x20, 0x02, 0x01, 0x02, 0x01, +0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, 0x8F, -0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, 0xFF, -0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, 0x00, -0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, -0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, -0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x08, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, +0x8F, 0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, +0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, +0x00, 0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x21, 0x4C, 0x4D, +0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, +0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x4D, +0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, #ifdef TIMELIB_SUPPORTS_V2DATA 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0xFF, 0xFF, 0xFF, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x25, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0x86, 0x8A, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0xCB, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x23, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0xD0, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xA2, 0xD2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x28, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, @@ -16925,44 +17009,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, -0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00, -0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x61, 0x87, 0x95, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x63, 0x67, 0x77, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x65, 0x47, 0x59, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x67, 0x27, 0x3B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x69, 0x07, 0x1D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, -0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, -0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, -0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, -0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00, -0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x76, 0x38, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x78, 0x18, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x79, 0xF8, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7F, 0x98, 0x2A, 0x90, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x02, 0x01, 0x02, 0x01, +0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x04, 0xFF, -0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, 0xFF, 0xFF, 0x8F, 0x80, 0x01, -0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x19, 0xFF, 0xFF, 0x9D, -0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, -0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, -0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x01, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x53, 0x54, 0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, -0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, -#endif -0x00, 0xE5, 0xF9, 0xB2, 0x00, 0x44, 0x96, 0x97, 0x00, 0x00, 0x00, 0x17, 0x50, 0x61, 0x63, 0x69, -0x66, 0x69, 0x63, 0x20, 0x2D, 0x20, 0x59, 0x75, 0x6B, 0x6F, 0x6E, 0x20, 0x28, 0x73, 0x6F, 0x75, -0x74, 0x68, 0x29, +0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x08, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, +0x8F, 0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, +0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, +0x00, 0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x21, 0x4C, 0x4D, +0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, +0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x4D, +0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x0A, +#endif +0x00, 0xE5, 0xF9, 0xB2, 0x00, 0x44, 0x96, 0x97, 0x00, 0x00, 0x00, 0x16, 0x50, 0x61, 0x63, 0x69, +0x66, 0x69, 0x63, 0x20, 0x2D, 0x20, 0x59, 0x75, 0x6B, 0x6F, 0x6E, 0x20, 0x28, 0x65, 0x61, 0x73, +0x74, 0x29, /* America/Winnipeg */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -19570,23 +19634,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { /* Asia/Chongqing */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, -0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, 0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, -0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, 0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, -0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, 0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, -0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, 0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, -0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, 0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, -0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, 0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, -0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, +0xA0, 0x97, 0xA2, 0x80, 0xA1, 0x79, 0x04, 0xF0, 0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, +0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, 0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, +0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, 0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, +0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, 0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, +0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, 0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, +0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, 0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, +0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, 0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, -0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, -0x00, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x71, +0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, +0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, #ifdef TIMELIB_SUPPORTS_V2DATA 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, -0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, +0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x97, 0xA2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0xA1, 0x79, 0x04, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x09, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xD3, 0xBD, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x05, 0x8A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x7C, 0x40, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x3B, 0x3E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x8B, 0x7B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, @@ -19600,33 +19665,34 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x25, 0x12, 0x7C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x27, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0x5E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x28, 0x07, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0x40, 0x10, 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, 0x00, -0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, -0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, 0x43, 0x53, -0x54, 0x2D, 0x38, 0x0A, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, +0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, +0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A, #endif 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, /* Asia/Chungking */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, -0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, 0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, -0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, 0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, -0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, 0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, -0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, 0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, -0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, 0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, -0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, 0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, -0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, +0xA0, 0x97, 0xA2, 0x80, 0xA1, 0x79, 0x04, 0xF0, 0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, +0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, 0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, +0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, 0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, +0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, 0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, +0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, 0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, +0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, 0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, +0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, 0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, -0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, -0x00, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x71, +0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, +0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, #ifdef TIMELIB_SUPPORTS_V2DATA 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, -0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, +0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x97, 0xA2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0xA1, 0x79, 0x04, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x09, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xD3, 0xBD, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x05, 0x8A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x7C, 0x40, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x3B, 0x3E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x8B, 0x7B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, @@ -19640,10 +19706,10 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x25, 0x12, 0x7C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x27, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0x5E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x28, 0x07, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0x40, 0x10, 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, 0x00, -0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, -0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, 0x43, 0x53, -0x54, 0x2D, 0x38, 0x0A, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, +0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, +0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A, #endif 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, @@ -20247,23 +20313,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { /* Asia/Harbin */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, -0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, 0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, -0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, 0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, -0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, 0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, -0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, 0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, -0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, 0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, -0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, 0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, -0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, +0xA0, 0x97, 0xA2, 0x80, 0xA1, 0x79, 0x04, 0xF0, 0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, +0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, 0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, +0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, 0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, +0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, 0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, +0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, 0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, +0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, 0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, +0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, 0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, -0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, -0x00, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x71, +0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, +0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, #ifdef TIMELIB_SUPPORTS_V2DATA 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, -0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, +0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x97, 0xA2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0xA1, 0x79, 0x04, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x09, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xD3, 0xBD, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x05, 0x8A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x7C, 0x40, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x3B, 0x3E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x8B, 0x7B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, @@ -20277,10 +20344,10 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x25, 0x12, 0x7C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x27, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0x5E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x28, 0x07, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0x40, 0x10, 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, 0x00, -0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, -0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, 0x43, 0x53, -0x54, 0x2D, 0x38, 0x0A, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, +0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, +0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A, #endif 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, @@ -22727,23 +22794,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { /* Asia/Shanghai */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, -0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, 0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, -0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, 0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, -0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, 0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, -0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, 0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, -0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, 0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, -0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, 0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, -0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, +0xA0, 0x97, 0xA2, 0x80, 0xA1, 0x79, 0x04, 0xF0, 0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, +0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, 0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, +0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, 0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, +0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, 0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, +0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, 0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, +0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, 0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, +0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, 0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, -0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, -0x00, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x71, +0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, +0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, #ifdef TIMELIB_SUPPORTS_V2DATA 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, -0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, +0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x97, 0xA2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0xA1, 0x79, 0x04, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x09, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xD3, 0xBD, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x05, 0x8A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x7C, 0x40, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x3B, 0x3E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x8B, 0x7B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, @@ -22757,10 +22825,10 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x25, 0x12, 0x7C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x27, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0x5E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x28, 0x07, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0x40, 0x10, 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, 0x00, -0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, -0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, 0x43, 0x53, -0x54, 0x2D, 0x38, 0x0A, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, +0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, +0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A, #endif 0x00, 0xB8, 0xFC, 0xC5, 0x01, 0xCC, 0x00, 0x6A, 0x00, 0x00, 0x00, 0x0C, 0x42, 0x65, 0x69, 0x6A, 0x69, 0x6E, 0x67, 0x20, 0x54, 0x69, 0x6D, 0x65, @@ -29352,8 +29420,8 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { /* Canada/Yukon */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x80, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x25, 0x80, 0x00, 0x00, 0x00, 0x9E, 0xB8, 0xCB, 0xB0, 0x9F, 0xBB, 0x23, 0xA0, 0xA0, 0xD0, 0x0C, 0xB0, 0xA1, 0xA2, 0xD2, 0x80, 0xCB, 0x89, 0x28, 0xB0, 0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x34, 0x20, 0xF7, 0x2F, 0x76, 0x90, 0xF8, 0x28, 0xA2, 0x10, 0xFB, 0x1D, 0x5F, 0x10, 0x13, 0x69, 0x72, 0x20, 0x14, 0x59, 0x55, 0x10, @@ -29376,34 +29444,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x51, 0x3C, 0x59, 0xA0, 0x52, 0x76, 0x10, 0x90, 0x53, 0x1C, 0x3B, 0xA0, 0x54, 0x55, 0xF2, 0x90, 0x54, 0xFC, 0x1D, 0xA0, 0x56, 0x35, 0xD4, 0x90, 0x56, 0xE5, 0x3A, 0x20, 0x58, 0x1E, 0xF1, 0x10, 0x58, 0xC5, 0x1C, 0x20, 0x59, 0xFE, 0xD3, 0x10, 0x5A, 0xA4, 0xFE, 0x20, 0x5B, 0xDE, 0xB5, 0x10, -0x5C, 0x84, 0xE0, 0x20, 0x5D, 0xBE, 0x97, 0x10, 0x5E, 0x64, 0xC2, 0x20, 0x5F, 0x9E, 0x79, 0x10, -0x60, 0x4D, 0xDE, 0xA0, 0x61, 0x87, 0x95, 0x90, 0x62, 0x2D, 0xC0, 0xA0, 0x63, 0x67, 0x77, 0x90, -0x64, 0x0D, 0xA2, 0xA0, 0x65, 0x47, 0x59, 0x90, 0x65, 0xED, 0x84, 0xA0, 0x67, 0x27, 0x3B, 0x90, -0x67, 0xCD, 0x66, 0xA0, 0x69, 0x07, 0x1D, 0x90, 0x69, 0xAD, 0x48, 0xA0, 0x6A, 0xE6, 0xFF, 0x90, -0x6B, 0x96, 0x65, 0x20, 0x6C, 0xD0, 0x1C, 0x10, 0x6D, 0x76, 0x47, 0x20, 0x6E, 0xAF, 0xFE, 0x10, -0x6F, 0x56, 0x29, 0x20, 0x70, 0x8F, 0xE0, 0x10, 0x71, 0x36, 0x0B, 0x20, 0x72, 0x6F, 0xC2, 0x10, -0x73, 0x15, 0xED, 0x20, 0x74, 0x4F, 0xA4, 0x10, 0x74, 0xFF, 0x09, 0xA0, 0x76, 0x38, 0xC0, 0x90, -0x76, 0xDE, 0xEB, 0xA0, 0x78, 0x18, 0xA2, 0x90, 0x78, 0xBE, 0xCD, 0xA0, 0x79, 0xF8, 0x84, 0x90, -0x7A, 0x9E, 0xAF, 0xA0, 0x7B, 0xD8, 0x66, 0x90, 0x7C, 0x7E, 0x91, 0xA0, 0x7D, 0xB8, 0x48, 0x90, -0x7E, 0x5E, 0x73, 0xA0, 0x7F, 0x98, 0x2A, 0x90, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, -0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x5C, 0x84, 0xE0, 0x20, 0x5D, 0xBE, 0x97, 0x10, 0x5E, 0x64, 0xC2, 0x20, 0x02, 0x01, 0x02, 0x01, +0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, 0x8F, -0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, 0xFF, -0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, 0x00, -0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, -0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, -0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x08, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, +0x8F, 0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, +0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, +0x00, 0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x21, 0x4C, 0x4D, +0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, +0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x4D, +0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, #ifdef TIMELIB_SUPPORTS_V2DATA 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0xFF, 0xFF, 0xFF, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x25, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0x86, 0x8A, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0xCB, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x23, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0xD0, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xA2, 0xD2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x28, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, @@ -29449,40 +29507,20 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, -0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00, -0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x61, 0x87, 0x95, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x63, 0x67, 0x77, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x65, 0x47, 0x59, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x67, 0x27, 0x3B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x69, 0x07, 0x1D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, -0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, -0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, -0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, -0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00, -0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x76, 0x38, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x78, 0x18, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x79, 0xF8, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x7F, 0x98, 0x2A, 0x90, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, +0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x02, 0x01, 0x02, 0x01, +0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, -0x06, 0x07, 0x06, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x04, 0xFF, -0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, 0xFF, 0xFF, 0x8F, 0x80, 0x01, -0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x19, 0xFF, 0xFF, 0x9D, -0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, -0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, -0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x01, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x53, 0x54, 0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, -0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, +0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x08, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, +0x8F, 0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, +0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, +0x00, 0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x21, 0x4C, 0x4D, +0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, +0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x4D, +0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x0A, #endif 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, @@ -38361,8 +38399,8 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x4B, 0x2D, 0x33, 0x0A, #endif -0x00, 0xCD, 0xEA, 0xD7, 0x01, 0x46, 0xB0, 0xD0, 0x00, 0x00, 0x00, 0x0F, 0x4D, 0x53, 0x4B, 0x2B, -0x30, 0x30, 0x20, 0x2D, 0x20, 0x43, 0x72, 0x69, 0x6D, 0x65, 0x61, +0x00, 0xCD, 0xEA, 0xD7, 0x01, 0x46, 0xB0, 0xD0, 0x00, 0x00, 0x00, 0x06, 0x43, 0x72, 0x69, 0x6D, +0x65, 0x61, /* Europe/Skopje */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -39402,8 +39440,8 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A, #endif -0x00, 0xD3, 0x83, 0x22, 0x01, 0x34, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x08, 0x52, 0x75, 0x74, 0x68, -0x65, 0x6E, 0x69, 0x61, +0x00, 0xD3, 0x83, 0x22, 0x01, 0x34, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x0E, 0x54, 0x72, 0x61, 0x6E, +0x73, 0x63, 0x61, 0x72, 0x70, 0x61, 0x74, 0x68, 0x69, 0x61, /* Europe/Vaduz */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4C, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -40498,10 +40536,9 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A, #endif -0x00, 0xD2, 0x51, 0x25, 0x01, 0x48, 0x51, 0x7A, 0x00, 0x00, 0x00, 0x2E, 0x5A, 0x61, 0x70, 0x6F, -0x72, 0x6F, 0x7A, 0x68, 0x27, 0x79, 0x65, 0x2F, 0x5A, 0x61, 0x70, 0x6F, 0x72, 0x69, 0x7A, 0x68, -0x69, 0x61, 0x3B, 0x20, 0x4C, 0x75, 0x67, 0x61, 0x6E, 0x73, 0x6B, 0x2F, 0x4C, 0x75, 0x68, 0x61, -0x6E, 0x73, 0x6B, 0x20, 0x28, 0x65, 0x61, 0x73, 0x74, 0x29, +0x00, 0xD2, 0x51, 0x25, 0x01, 0x48, 0x51, 0x7A, 0x00, 0x00, 0x00, 0x1B, 0x5A, 0x61, 0x70, 0x6F, +0x72, 0x6F, 0x7A, 0x68, 0x79, 0x65, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x65, 0x61, 0x73, 0x74, 0x20, +0x4C, 0x75, 0x67, 0x61, 0x6E, 0x73, 0x6B, /* Europe/Zurich */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -45004,23 +45041,24 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { /* PRC */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, -0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, 0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, -0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, 0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, -0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, 0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, -0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, 0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, -0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, 0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, -0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, 0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, -0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00, +0xA0, 0x97, 0xA2, 0x80, 0xA1, 0x79, 0x04, 0xF0, 0xC8, 0x59, 0x5E, 0x80, 0xC9, 0x09, 0xF9, 0x70, +0xC9, 0xD3, 0xBD, 0x00, 0xCB, 0x05, 0x8A, 0xF0, 0xCB, 0x7C, 0x40, 0x00, 0xD2, 0x3B, 0x3E, 0xF0, +0xD3, 0x8B, 0x7B, 0x80, 0xD4, 0x42, 0xAD, 0xF0, 0xD5, 0x45, 0x22, 0x00, 0xD6, 0x4C, 0xBF, 0xF0, +0xD7, 0x3C, 0xBF, 0x00, 0xD8, 0x06, 0x66, 0x70, 0xD9, 0x1D, 0xF2, 0x80, 0xD9, 0x41, 0x7C, 0xF0, +0x1E, 0xBA, 0x52, 0x20, 0x1F, 0x69, 0x9B, 0x90, 0x20, 0x7E, 0x84, 0xA0, 0x21, 0x49, 0x7D, 0x90, +0x22, 0x67, 0xA1, 0x20, 0x23, 0x29, 0x5F, 0x90, 0x24, 0x47, 0x83, 0x20, 0x25, 0x12, 0x7C, 0x10, +0x26, 0x27, 0x65, 0x20, 0x26, 0xF2, 0x5E, 0x10, 0x28, 0x07, 0x47, 0x20, 0x28, 0xD2, 0x40, 0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, -0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, -0x00, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x71, +0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, +0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, #ifdef TIMELIB_SUPPORTS_V2DATA 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, -0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, +0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x97, 0xA2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0xA1, 0x79, 0x04, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0x5E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x09, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xD3, 0xBD, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x05, 0x8A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x7C, 0x40, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x3B, 0x3E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x8B, 0x7B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, @@ -45034,10 +45072,10 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { 0x25, 0x12, 0x7C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x27, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0x5E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x28, 0x07, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0x40, 0x10, 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, 0x00, -0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, -0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, 0x43, 0x53, -0x54, 0x2D, 0x38, 0x0A, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, +0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, +0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A, #endif 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, @@ -47495,4 +47533,4 @@ const unsigned char timelib_timezone_db_data_builtin[269539] = { #endif 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,}; -const timelib_tzdb timezonedb_builtin = { "2019.3", 594, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; +const timelib_tzdb timezonedb_builtin = { "2020.1", 595, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; From 9ddf9ac98e9ee25e693b68cba08bcc874dfee0dd Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 24 Apr 2020 16:14:44 +0300 Subject: [PATCH 255/338] cleanup --- ext/opcache/jit/zend_jit_trace.c | 129 ++++++++++++++----------------- 1 file changed, 58 insertions(+), 71 deletions(-) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index d04f9bca58c6a..4a687dd4c9cfe 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -1754,20 +1754,21 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace uint8_t *flags; const zend_op_array **vars_op_array; zend_lifetime_interval **intervals, *list, *ival; - zend_lifetime_interval *hints = NULL; void *checkpoint; zend_jit_trace_stack_frame *frame; zend_jit_trace_stack *stack; uint32_t parent_vars_count = parent_trace ? zend_jit_traces[parent_trace].exit_info[exit_num].stack_size : 0; + zend_jit_trace_stack *parent_stack = parent_trace ? + zend_jit_traces[parent_trace].stack_map + + zend_jit_traces[parent_trace].exit_info[exit_num].stack_offset : NULL; ALLOCA_FLAG(use_heap); ZEND_ASSERT(ssa->var_info != NULL); start = do_alloca(sizeof(int) * ssa->vars_count * 2 + ZEND_MM_ALIGNED_SIZE(sizeof(uint8_t) * ssa->vars_count) + - ZEND_MM_ALIGNED_SIZE(sizeof(zend_op_array*) * ssa->vars_count) + - ZEND_MM_ALIGNED_SIZE(sizeof(zend_lifetime_interval) * parent_vars_count), + ZEND_MM_ALIGNED_SIZE(sizeof(zend_op_array*) * ssa->vars_count), use_heap); if (!start) { return NULL; @@ -1775,7 +1776,6 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace end = start + ssa->vars_count; flags = (uint8_t*)(end + ssa->vars_count); vars_op_array = (const zend_op_array**)(flags + ZEND_MM_ALIGNED_SIZE(sizeof(uint8_t) * ssa->vars_count)); - hints = (zend_lifetime_interval*)((char*)vars_op_array + ZEND_MM_ALIGNED_SIZE(sizeof(zend_op_array*) * ssa->vars_count)); memset(start, -1, sizeof(int) * ssa->vars_count * 2); memset(flags, 0, sizeof(uint8_t) * ssa->vars_count); @@ -1802,8 +1802,13 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace if ((ssa->vars[i].use_chain >= 0 /*|| ssa->vars[i].phi_use_chain*/) && zend_jit_var_supports_reg(ssa, i)) { start[i] = 0; - flags[i] = ZREG_LOAD; - count++; + if (i < parent_vars_count && STACK_REG(parent_stack, i) != ZREG_NONE) { + /* We will try to reuse register from parent trace */ + count += 2; + } else { + flags[i] = ZREG_LOAD; + count++; + } } i++; } @@ -2086,10 +2091,8 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace memset(intervals, 0, sizeof(zend_lifetime_interval*) * ssa->vars_count); list = zend_arena_alloc(&CG(arena), sizeof(zend_lifetime_interval) * count); j = 0; -//fprintf(stderr, "(%d)\n", count); for (i = 0; i < ssa->vars_count; i++) { if (start[i] >= 0 && end[i] >= 0) { -//fprintf(stderr, "#%d: %d..%d\n", i, start[i], end[i]); ZEND_ASSERT(j < count); intervals[i] = &list[j]; list[j].ssa_var = i; @@ -2115,25 +2118,27 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace /* Add hints */ if (parent_vars_count) { - zend_jit_trace_stack *parent_stack = - zend_jit_traces[parent_trace].stack_map + - zend_jit_traces[parent_trace].exit_info[exit_num].stack_offset; - - j = trace_buffer->op_array->last_var; + i = trace_buffer->op_array->last_var; if (trace_buffer->start != ZEND_JIT_TRACE_START_ENTER) { - j += trace_buffer->op_array->T; + i += trace_buffer->op_array->T; } - if (parent_vars_count < (uint32_t)j) { - j = parent_vars_count; + if ((uint32_t)i > parent_vars_count) { + i = parent_vars_count; } - if (j) { - memset(hints, 0, sizeof(zend_lifetime_interval) * j); - for (i = 0; i < j; i++) { - if (intervals[i] && STACK_REG(parent_stack, i) != ZREG_NONE) { - intervals[i]->hint = hints + i; - hints[i].ssa_var = - 1; - hints[i].reg = STACK_REG(parent_stack, i); - } + while (i > 0) { + i--; + if (intervals[i] && STACK_REG(parent_stack, i) != ZREG_NONE) { + list[j].ssa_var = - 1; + list[j].reg = STACK_REG(parent_stack, i); + list[j].flags = 0; + list[j].range.start = -1; + list[j].range.end = -1; + list[j].range.next = NULL; + list[j].hint = NULL; + list[j].used_as_hint = NULL; + list[j].list_next = NULL; + intervals[i]->hint = &list[j]; + j++; } } } @@ -2246,6 +2251,23 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace return NULL; } + /* Add LOAD flag to registers that can't reuse register from parent trace */ + if (parent_vars_count) { + i = trace_buffer->op_array->last_var; + if (trace_buffer->start != ZEND_JIT_TRACE_START_ENTER) { + i += trace_buffer->op_array->T; + } + if ((uint32_t)i > parent_vars_count) { + i = parent_vars_count; + } + while (i > 0) { + i--; + if (intervals[i] && intervals[i]->reg != STACK_REG(parent_stack, i)) { + intervals[i]->flags |= ZREG_LOAD; + } + } + } + /* SSA resolution */ if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) { zend_ssa_phi *phi = ssa->blocks[1].phis; @@ -2259,7 +2281,12 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace intervals[def]->flags |= ZREG_LOAD; } else if (intervals[def]->reg != intervals[use]->reg) { intervals[def]->flags |= ZREG_LOAD; - intervals[use]->flags |= ZREG_STORE; + if (ssa->vars[use].use_chain >= 0) { + intervals[use]->flags |= ZREG_STORE; + } else { + intervals[use] = NULL; + count--; + } } else { use = phi->sources[0]; ZEND_ASSERT(!intervals[use]); @@ -2275,57 +2302,17 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace intervals[use]->list_next = NULL; } } else if (intervals[use] && !ssa->vars[phi->ssa_var].no_val) { - intervals[use]->flags |= ZREG_STORE; - } - phi = phi->next; - } - } - - if (parent_vars_count) { - /* Variables that reuse registers from parent trace don't have to be loaded */ - j = op_array->last_var; - if (trace_buffer->start != ZEND_JIT_TRACE_START_ENTER) { - j += op_array->T; - } - if (parent_vars_count < (uint32_t)j) { - j = parent_vars_count; - } - for (i = 0; i < j; i++) { - if (intervals[i] - && intervals[i]->hint - && intervals[i]->reg == intervals[i]->hint->reg - && intervals[i]->hint->ssa_var == -1) { - intervals[i]->flags &= ~ZREG_LOAD; - } - } - } - - /* Remove useless register allocation */ - for (i = 0; i < ssa->vars_count; i++) { - if (intervals[i] && - ((intervals[i]->flags & ZREG_LOAD) || - ((intervals[i]->flags & ZREG_STORE) && ssa->vars[i].definition >= 0)) && - ssa->vars[i].use_chain < 0) { - zend_bool may_remove = 1; - zend_ssa_phi *phi = ssa->vars[i].phi_use_chain; - - while (phi) { - if (intervals[phi->ssa_var] && - !(intervals[phi->ssa_var]->flags & ZREG_LOAD)) { - may_remove = 0; - break; + if (ssa->vars[use].use_chain >= 0) { + intervals[use]->flags |= ZREG_STORE; + } else { + intervals[use] = NULL; + count--; } - phi = zend_ssa_next_use_phi(ssa, i, phi); - } - if (may_remove) { - intervals[i] = NULL; - count--; } + phi = phi->next; } } - // Remove intervals used once ???? - if (!count) { zend_arena_release(&CG(arena), checkpoint); return NULL; From 8a04d39d1cd11b002f02c8dea6498740949fb0cd Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 24 Apr 2020 16:14:58 +0300 Subject: [PATCH 256/338] Skip life range with LOAD and single use --- ext/opcache/jit/zend_jit_trace.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 4a687dd4c9cfe..bbebebed12db9 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -2094,6 +2094,12 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace for (i = 0; i < ssa->vars_count; i++) { if (start[i] >= 0 && end[i] >= 0) { ZEND_ASSERT(j < count); + if ((flags[i] & ZREG_LOAD) && + (flags[i] & ZREG_LAST_USE) && + end[i] == ssa->vars[i].use_chain) { + /* skip life range with single use */ + continue; + } intervals[i] = &list[j]; list[j].ssa_var = i; list[j].reg = ZREG_NONE; From 6ab2e82ab56c51f203256bd61207c910ce1b6e7e Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 24 Apr 2020 16:32:31 +0300 Subject: [PATCH 257/338] Avoid STORE of register inherited from parent trace --- ext/opcache/jit/zend_jit_trace.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index bbebebed12db9..f7408b6707ff1 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -2513,8 +2513,10 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par // TODO: Merge two loops implementing paralel move ??? for (i = 0; i < parent_vars_count; i++) { if (STACK_REG(parent_stack, i) != ZREG_NONE) { - // TODO: optimize out useless stores ???? - if (!zend_jit_store_var(&dasm_state, ssa->var_info[i].type, i, STACK_REG(parent_stack, i))) { + if (ra && ra[i] && ra[i]->reg == STACK_REG(parent_stack, i)) { + /* register already loaded by parent trace */ + SET_STACK_REG(stack, i, ra[i]->reg); + } else if (!zend_jit_store_var(&dasm_state, ssa->var_info[i].type, i, STACK_REG(parent_stack, i))) { goto jit_failure; } } From 3151676f520555bfadb39ea76779e93552d13fc1 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 24 Apr 2020 14:51:44 +0200 Subject: [PATCH 258/338] Fix #79514: Memory leaks while including unexistent file We have to destroy (un-opened) ZEND_HANDLE_FILENAMEs. --- NEWS | 2 ++ Zend/tests/bug79514.phpt | 13 +++++++++++++ Zend/zend_stream.c | 2 ++ 3 files changed, 17 insertions(+) create mode 100644 Zend/tests/bug79514.phpt diff --git a/NEWS b/NEWS index 88185d170f788..bc5fc665e2c3c 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,8 @@ PHP NEWS - Core: . Fixed bug #78434 (Generator yields no items after valid() call). (Nikita) . Fixed bug #79477 (casting object into array creates references). (Nikita) + . Fixed bug #79514 (Memory leaks while including unexistent file). (cmb, + Nikita) - DOM: . Fixed bug #78221 (DOMNode::normalize() doesn't remove empty text nodes). diff --git a/Zend/tests/bug79514.phpt b/Zend/tests/bug79514.phpt new file mode 100644 index 0000000000000..5182489964779 --- /dev/null +++ b/Zend/tests/bug79514.phpt @@ -0,0 +1,13 @@ +--TEST-- +Bug #79514 (Memory leaks while including unexistent file) +--FILE-- + +--EXPECT-- +bool(true) diff --git a/Zend/zend_stream.c b/Zend/zend_stream.c index 3890248a26052..38b145736bea2 100644 --- a/Zend/zend_stream.c +++ b/Zend/zend_stream.c @@ -238,6 +238,8 @@ ZEND_API int zend_compare_file_handles(zend_file_handle *fh1, zend_file_handle * return 0; } switch (fh1->type) { + case ZEND_HANDLE_FILENAME: + return strcmp(fh1->filename, fh2->filename) == 0; case ZEND_HANDLE_FP: return fh1->handle.fp == fh2->handle.fp; case ZEND_HANDLE_STREAM: From 77ee4e63a61e884d393713fa822df043eec6c87b Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 22 Apr 2020 13:00:40 +0200 Subject: [PATCH 259/338] Nothing in codebase cares whether platform has fpclass() Therefore, don't bother checking for it in 'configure' script. Closes GH-5453 --- configure.ac | 1 - 1 file changed, 1 deletion(-) diff --git a/configure.ac b/configure.ac index 66d491c5f3623..50cfd0d4190f7 100644 --- a/configure.ac +++ b/configure.ac @@ -548,7 +548,6 @@ ctime_r \ crypt \ explicit_memset \ flock \ -fpclass \ ftok \ funopen \ gai_strerror \ From d7f7080bb5b42a4dd2d08c91c02645b9d9a74a50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sat, 25 Apr 2020 19:08:53 +0200 Subject: [PATCH 260/338] Generate methods entries from stubs for ext/spl Closes GH-5458 --- ext/spl/php_spl.c | 24 +- ext/spl/php_spl.h | 5 - ext/spl/php_spl.stub.php | 2 + ext/spl/php_spl_arginfo.h | 37 +++ ext/spl/spl_array.c | 145 +++------- ext/spl/spl_array.stub.php | 66 ++++- ext/spl/spl_array_arginfo.h | 105 ++++++++ ext/spl/spl_directory.c | 281 ++++++------------- ext/spl/spl_directory.stub.php | 15 +- ext/spl/spl_directory_arginfo.h | 233 +++++++++++++++- ext/spl/spl_dllist.c | 101 ++----- ext/spl/spl_dllist.stub.php | 8 +- ext/spl/spl_dllist_arginfo.h | 71 +++++ ext/spl/spl_fixedarray.c | 55 ++-- ext/spl/spl_fixedarray.stub.php | 2 + ext/spl/spl_fixedarray_arginfo.h | 39 +++ ext/spl/spl_functions.h | 13 +- ext/spl/spl_heap.c | 102 ++----- ext/spl/spl_heap.stub.php | 42 ++- ext/spl/spl_heap_arginfo.h | 77 ++++++ ext/spl/spl_iterators.c | 445 ++++++++----------------------- ext/spl/spl_iterators.stub.php | 88 ++---- ext/spl/spl_iterators_arginfo.h | 356 +++++++++++++++++++++---- ext/spl/spl_observer.c | 135 +++------- ext/spl/spl_observer.stub.php | 15 +- ext/spl/spl_observer_arginfo.h | 95 +++++++ 26 files changed, 1443 insertions(+), 1114 deletions(-) diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c index 9ccb9da3a5058..759218e8021c7 100644 --- a/ext/spl/php_spl.c +++ b/ext/spl/php_spl.c @@ -893,28 +893,6 @@ PHP_MINFO_FUNCTION(spl) } /* }}} */ -/* {{{ spl_functions - */ -static const zend_function_entry spl_functions[] = { - PHP_FE(spl_classes, arginfo_spl_classes) - PHP_FE(spl_autoload, arginfo_spl_autoload) - PHP_FE(spl_autoload_extensions, arginfo_spl_autoload_extensions) - PHP_FE(spl_autoload_register, arginfo_spl_autoload_register) - PHP_FE(spl_autoload_unregister, arginfo_spl_autoload_unregister) - PHP_FE(spl_autoload_functions, arginfo_spl_autoload_functions) - PHP_FE(spl_autoload_call, arginfo_spl_autoload_call) - PHP_FE(class_parents, arginfo_class_parents) - PHP_FE(class_implements, arginfo_class_implements) - PHP_FE(class_uses, arginfo_class_uses) - PHP_FE(spl_object_hash, arginfo_spl_object_hash) - PHP_FE(spl_object_id, arginfo_spl_object_id) - PHP_FE(iterator_to_array, arginfo_iterator_to_array) - PHP_FE(iterator_count, arginfo_iterator_count) - PHP_FE(iterator_apply, arginfo_iterator_apply) - PHP_FE_END -}; -/* }}} */ - /* {{{ PHP_MINIT_FUNCTION(spl) */ PHP_MINIT_FUNCTION(spl) @@ -966,7 +944,7 @@ PHP_RSHUTDOWN_FUNCTION(spl) /* {{{ */ zend_module_entry spl_module_entry = { STANDARD_MODULE_HEADER, "SPL", - spl_functions, + ext_functions, PHP_MINIT(spl), NULL, PHP_RINIT(spl), diff --git a/ext/spl/php_spl.h b/ext/spl/php_spl.h index 61fc80ac1d0ac..a4aaba46903f4 100644 --- a/ext/spl/php_spl.h +++ b/ext/spl/php_spl.h @@ -63,11 +63,6 @@ ZEND_END_MODULE_GLOBALS(spl) ZEND_EXTERN_MODULE_GLOBALS(spl) #define SPL_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(spl, v) -PHP_FUNCTION(spl_classes); -PHP_FUNCTION(class_parents); -PHP_FUNCTION(class_implements); -PHP_FUNCTION(class_uses); - PHPAPI zend_string *php_spl_object_hash(zval *obj); #endif /* PHP_SPL_H */ diff --git a/ext/spl/php_spl.stub.php b/ext/spl/php_spl.stub.php index 1ff967358e70b..8811e1913a2be 100755 --- a/ext/spl/php_spl.stub.php +++ b/ext/spl/php_spl.stub.php @@ -1,5 +1,7 @@ get_iterator = spl_array_get_iterator; spl_ce_RecursiveArrayIterator->ce_flags |= ZEND_ACC_REUSE_GET_ITERATOR; diff --git a/ext/spl/spl_array.stub.php b/ext/spl/spl_array.stub.php index a68a482edd022..41cc787b169b3 100755 --- a/ext/spl/spl_array.stub.php +++ b/ext/spl/spl_array.stub.php @@ -1,5 +1,7 @@ flags, SPL_FILE_DIR_SKIPDOTS); @@ -831,7 +831,7 @@ SPL_METHOD(DirectoryIterator, next) /* {{{ proto void DirectoryIterator::seek(int position) Seek to the given position */ -SPL_METHOD(DirectoryIterator, seek) +PHP_METHOD(DirectoryIterator, seek) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); zval retval; @@ -861,7 +861,7 @@ SPL_METHOD(DirectoryIterator, seek) /* {{{ proto string DirectoryIterator::valid() Check whether dir contains more entries */ -SPL_METHOD(DirectoryIterator, valid) +PHP_METHOD(DirectoryIterator, valid) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); @@ -875,7 +875,7 @@ SPL_METHOD(DirectoryIterator, valid) /* {{{ proto string SplFileInfo::getPath() Return the path */ -SPL_METHOD(SplFileInfo, getPath) +PHP_METHOD(SplFileInfo, getPath) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); char *path; @@ -896,7 +896,7 @@ SPL_METHOD(SplFileInfo, getPath) /* {{{ proto string SplFileInfo::getFilename() Return filename only */ -SPL_METHOD(SplFileInfo, getFilename) +PHP_METHOD(SplFileInfo, getFilename) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); size_t path_len; @@ -917,7 +917,7 @@ SPL_METHOD(SplFileInfo, getFilename) /* {{{ proto string DirectoryIterator::getFilename() Return filename of current dir entry */ -SPL_METHOD(DirectoryIterator, getFilename) +PHP_METHOD(DirectoryIterator, getFilename) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); @@ -931,7 +931,7 @@ SPL_METHOD(DirectoryIterator, getFilename) /* {{{ proto string SplFileInfo::getExtension() Returns file extension component of path */ -SPL_METHOD(SplFileInfo, getExtension) +PHP_METHOD(SplFileInfo, getExtension) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); char *fname = NULL; @@ -972,7 +972,7 @@ SPL_METHOD(SplFileInfo, getExtension) /* {{{ proto string DirectoryIterator::getExtension() Returns the file extension component of path */ -SPL_METHOD(DirectoryIterator, getExtension) +PHP_METHOD(DirectoryIterator, getExtension) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); const char *p; @@ -999,7 +999,7 @@ SPL_METHOD(DirectoryIterator, getExtension) /* {{{ proto string SplFileInfo::getBasename([string $suffix]) Returns filename component of path */ -SPL_METHOD(SplFileInfo, getBasename) +PHP_METHOD(SplFileInfo, getBasename) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); char *fname, *suffix = 0; @@ -1026,7 +1026,7 @@ SPL_METHOD(SplFileInfo, getBasename) /* {{{ proto string DirectoryIterator::getBasename([string $suffix]) Returns filename component of current dir entry */ -SPL_METHOD(DirectoryIterator, getBasename) +PHP_METHOD(DirectoryIterator, getBasename) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); char *suffix = 0; @@ -1045,7 +1045,7 @@ SPL_METHOD(DirectoryIterator, getBasename) /* {{{ proto string SplFileInfo::getPathname() Return path and filename */ -SPL_METHOD(SplFileInfo, getPathname) +PHP_METHOD(SplFileInfo, getPathname) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); char *path; @@ -1065,7 +1065,7 @@ SPL_METHOD(SplFileInfo, getPathname) /* {{{ proto string FilesystemIterator::key() Return getPathname() or getFilename() depending on flags */ -SPL_METHOD(FilesystemIterator, key) +PHP_METHOD(FilesystemIterator, key) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); @@ -1084,7 +1084,7 @@ SPL_METHOD(FilesystemIterator, key) /* {{{ proto string FilesystemIterator::current() Return getFilename(), getFileInfo() or $this depending on flags */ -SPL_METHOD(FilesystemIterator, current) +PHP_METHOD(FilesystemIterator, current) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); @@ -1107,7 +1107,7 @@ SPL_METHOD(FilesystemIterator, current) /* {{{ proto bool DirectoryIterator::isDot() Returns true if current entry is '.' or '..' */ -SPL_METHOD(DirectoryIterator, isDot) +PHP_METHOD(DirectoryIterator, isDot) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); @@ -1124,7 +1124,7 @@ SPL_METHOD(DirectoryIterator, isDot) /* When the constructor gets called the object is already created by the engine, so we must only call 'additional' initializations. */ -SPL_METHOD(SplFileInfo, __construct) +PHP_METHOD(SplFileInfo, __construct) { spl_filesystem_object *intern; char *path; @@ -1144,7 +1144,7 @@ SPL_METHOD(SplFileInfo, __construct) /* {{{ FileInfoFunction */ #define FileInfoFunction(func_name, func_num) \ -SPL_METHOD(SplFileInfo, func_name) \ +PHP_METHOD(SplFileInfo, func_name) \ { \ spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); \ zend_error_handling error_handling; \ @@ -1236,7 +1236,7 @@ FileInfoFunction(isLink, FS_IS_LINK) /* {{{ proto string SplFileInfo::getLinkTarget() Return the target of a symbolic link */ -SPL_METHOD(SplFileInfo, getLinkTarget) +PHP_METHOD(SplFileInfo, getLinkTarget) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); ssize_t ret; @@ -1286,7 +1286,7 @@ SPL_METHOD(SplFileInfo, getLinkTarget) /* {{{ proto string SplFileInfo::getRealPath() Return the resolved path */ -SPL_METHOD(SplFileInfo, getRealPath) +PHP_METHOD(SplFileInfo, getRealPath) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); char buff[MAXPATHLEN]; @@ -1327,7 +1327,7 @@ SPL_METHOD(SplFileInfo, getRealPath) /* {{{ proto SplFileObject SplFileInfo::openFile([string mode = 'r' [, bool use_include_path [, resource context]]]) Open the current file */ -SPL_METHOD(SplFileInfo, openFile) +PHP_METHOD(SplFileInfo, openFile) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); @@ -1337,7 +1337,7 @@ SPL_METHOD(SplFileInfo, openFile) /* {{{ proto void SplFileInfo::setFileClass([string class_name]) Class to use in openFile() */ -SPL_METHOD(SplFileInfo, setFileClass) +PHP_METHOD(SplFileInfo, setFileClass) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); zend_class_entry *ce = spl_ce_SplFileObject; @@ -1352,7 +1352,7 @@ SPL_METHOD(SplFileInfo, setFileClass) /* {{{ proto void SplFileInfo::setInfoClass([string class_name]) Class to use in getFileInfo(), getPathInfo() */ -SPL_METHOD(SplFileInfo, setInfoClass) +PHP_METHOD(SplFileInfo, setInfoClass) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); zend_class_entry *ce = spl_ce_SplFileInfo; @@ -1367,7 +1367,7 @@ SPL_METHOD(SplFileInfo, setInfoClass) /* {{{ proto SplFileInfo SplFileInfo::getFileInfo([string $class_name]) Get/copy file info */ -SPL_METHOD(SplFileInfo, getFileInfo) +PHP_METHOD(SplFileInfo, getFileInfo) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); zend_class_entry *ce = intern->info_class; @@ -1382,7 +1382,7 @@ SPL_METHOD(SplFileInfo, getFileInfo) /* {{{ proto SplFileInfo SplFileInfo::getPathInfo([string $class_name]) Get/copy file info */ -SPL_METHOD(SplFileInfo, getPathInfo) +PHP_METHOD(SplFileInfo, getPathInfo) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); zend_class_entry *ce = intern->info_class; @@ -1404,7 +1404,7 @@ SPL_METHOD(SplFileInfo, getPathInfo) /* }}} */ /* {{{ proto void SplFileInfo::__debugInfo() */ -SPL_METHOD(SplFileInfo, __debugInfo) +PHP_METHOD(SplFileInfo, __debugInfo) { if (zend_parse_parameters_none() == FAILURE) { return; @@ -1414,7 +1414,7 @@ SPL_METHOD(SplFileInfo, __debugInfo) } /* }}} */ /* {{{ proto SplFileInfo::_bad_state_ex(void) */ -SPL_METHOD(SplFileInfo, _bad_state_ex) +PHP_METHOD(SplFileInfo, _bad_state_ex) { zend_throw_exception_ex(spl_ce_LogicException, 0, "The parent constructor was not called: the object is in an " @@ -1424,7 +1424,7 @@ SPL_METHOD(SplFileInfo, _bad_state_ex) /* {{{ proto FilesystemIterator::__construct(string path [, int flags]) Cronstructs a new dir iterator from a path. */ -SPL_METHOD(FilesystemIterator, __construct) +PHP_METHOD(FilesystemIterator, __construct) { spl_filesystem_object_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, DIT_CTOR_FLAGS | SPL_FILE_DIR_SKIPDOTS); } @@ -1432,7 +1432,7 @@ SPL_METHOD(FilesystemIterator, __construct) /* {{{ proto void FilesystemIterator::rewind() Rewind dir back to the start */ -SPL_METHOD(FilesystemIterator, rewind) +PHP_METHOD(FilesystemIterator, rewind) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); int skip_dots = SPL_HAS_FLAG(intern->flags, SPL_FILE_DIR_SKIPDOTS); @@ -1453,7 +1453,7 @@ SPL_METHOD(FilesystemIterator, rewind) /* {{{ proto int FilesystemIterator::getFlags() Get handling flags */ -SPL_METHOD(FilesystemIterator, getFlags) +PHP_METHOD(FilesystemIterator, getFlags) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); @@ -1466,7 +1466,7 @@ SPL_METHOD(FilesystemIterator, getFlags) /* {{{ proto void FilesystemIterator::setFlags(long $flags) Set handling flags */ -SPL_METHOD(FilesystemIterator, setFlags) +PHP_METHOD(FilesystemIterator, setFlags) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); zend_long flags; @@ -1481,7 +1481,7 @@ SPL_METHOD(FilesystemIterator, setFlags) /* {{{ proto bool RecursiveDirectoryIterator::hasChildren([bool $allow_links = false]) Returns whether current entry is a directory and not '.' or '..' */ -SPL_METHOD(RecursiveDirectoryIterator, hasChildren) +PHP_METHOD(RecursiveDirectoryIterator, hasChildren) { zend_bool allow_links = 0; spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); @@ -1506,7 +1506,7 @@ SPL_METHOD(RecursiveDirectoryIterator, hasChildren) /* {{{ proto RecursiveDirectoryIterator DirectoryIterator::getChildren() Returns an iterator for the current entry if it is a directory */ -SPL_METHOD(RecursiveDirectoryIterator, getChildren) +PHP_METHOD(RecursiveDirectoryIterator, getChildren) { zval zpath, zflags; spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); @@ -1541,7 +1541,7 @@ SPL_METHOD(RecursiveDirectoryIterator, getChildren) /* {{{ proto void RecursiveDirectoryIterator::getSubPath() Get sub path */ -SPL_METHOD(RecursiveDirectoryIterator, getSubPath) +PHP_METHOD(RecursiveDirectoryIterator, getSubPath) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); @@ -1559,7 +1559,7 @@ SPL_METHOD(RecursiveDirectoryIterator, getSubPath) /* {{{ proto void RecursiveDirectoryIterator::getSubPathname() Get sub path and file name */ -SPL_METHOD(RecursiveDirectoryIterator, getSubPathname) +PHP_METHOD(RecursiveDirectoryIterator, getSubPathname) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); char slash = SPL_HAS_FLAG(intern->flags, SPL_FILE_DIR_UNIXPATHS) ? '/' : DEFAULT_SLASH; @@ -1578,7 +1578,7 @@ SPL_METHOD(RecursiveDirectoryIterator, getSubPathname) /* {{{ proto RecursiveDirectoryIterator::__construct(string path [, int flags]) Cronstructs a new dir iterator from a path. */ -SPL_METHOD(RecursiveDirectoryIterator, __construct) +PHP_METHOD(RecursiveDirectoryIterator, __construct) { spl_filesystem_object_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, DIT_CTOR_FLAGS); } @@ -1587,7 +1587,7 @@ SPL_METHOD(RecursiveDirectoryIterator, __construct) #ifdef HAVE_GLOB /* {{{ proto GlobIterator::__construct(string path [, int flags]) Cronstructs a new dir iterator from a glob expression (no glob:// needed). */ -SPL_METHOD(GlobIterator, __construct) +PHP_METHOD(GlobIterator, __construct) { spl_filesystem_object_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, DIT_CTOR_FLAGS|DIT_CTOR_GLOB); } @@ -1595,7 +1595,7 @@ SPL_METHOD(GlobIterator, __construct) /* {{{ proto int GlobIterator::count() Return the number of directories and files found by globbing */ -SPL_METHOD(GlobIterator, count) +PHP_METHOD(GlobIterator, count) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); @@ -1883,90 +1883,6 @@ static int spl_filesystem_object_cast(zend_object *readobj, zval *writeobj, int } /* }}} */ -/* the method table */ -/* each method can have its own parameters and visibility */ -static const zend_function_entry spl_SplFileInfo_functions[] = { - SPL_ME(SplFileInfo, __construct, arginfo_class_SplFileInfo___construct, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, getPath, arginfo_class_SplFileInfo_getPath, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, getFilename, arginfo_class_SplFileInfo_getFilename, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, getExtension, arginfo_class_SplFileInfo_getExtension, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, getBasename, arginfo_class_SplFileInfo_getBasename, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, getPathname, arginfo_class_SplFileInfo_getPathname, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, getPerms, arginfo_class_SplFileInfo_getPerms, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, getInode, arginfo_class_SplFileInfo_getInode, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, getSize, arginfo_class_SplFileInfo_getSize, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, getOwner, arginfo_class_SplFileInfo_getOwner, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, getGroup, arginfo_class_SplFileInfo_getGroup, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, getATime, arginfo_class_SplFileInfo_getATime, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, getMTime, arginfo_class_SplFileInfo_getMTime, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, getCTime, arginfo_class_SplFileInfo_getCTime, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, getType, arginfo_class_SplFileInfo_getType, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, isWritable, arginfo_class_SplFileInfo_isWritable, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, isReadable, arginfo_class_SplFileInfo_isReadable, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, isExecutable, arginfo_class_SplFileInfo_isExecutable, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, isFile, arginfo_class_SplFileInfo_isFile, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, isDir, arginfo_class_SplFileInfo_isDir, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, isLink, arginfo_class_SplFileInfo_isLink, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, getLinkTarget, arginfo_class_SplFileInfo_getLinkTarget, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, getRealPath, arginfo_class_SplFileInfo_getRealPath, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, getFileInfo, arginfo_class_SplFileInfo_getFileInfo, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, getPathInfo, arginfo_class_SplFileInfo_getPathInfo, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, openFile, arginfo_class_SplFileInfo_openFile, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, setFileClass, arginfo_class_SplFileInfo_setFileClass, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, setInfoClass, arginfo_class_SplFileInfo_setInfoClass, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, __debugInfo, arginfo_class_SplFileInfo___debugInfo, ZEND_ACC_PUBLIC) - SPL_ME(SplFileInfo, _bad_state_ex, arginfo_class_SplFileInfo__bad_state_ex, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) - SPL_MA(SplFileInfo, __toString, SplFileInfo, getPathname, arginfo_class_SplFileInfo___toString, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - -/* the method table */ -/* each method can have its own parameters and visibility */ -static const zend_function_entry spl_DirectoryIterator_functions[] = { - SPL_ME(DirectoryIterator, __construct, arginfo_class_DirectoryIterator___construct, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, getFilename, arginfo_class_DirectoryIterator_getFilename, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, getExtension, arginfo_class_DirectoryIterator_getExtension, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, getBasename, arginfo_class_DirectoryIterator_getBasename, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, isDot, arginfo_class_DirectoryIterator_isDot, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, rewind, arginfo_class_DirectoryIterator_rewind, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, valid, arginfo_class_DirectoryIterator_valid, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, key, arginfo_class_DirectoryIterator_key, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, current, arginfo_class_DirectoryIterator_current, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, next, arginfo_class_DirectoryIterator_next, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, seek, arginfo_class_DirectoryIterator_seek, ZEND_ACC_PUBLIC) - SPL_MA(DirectoryIterator, __toString, DirectoryIterator, getFilename, arginfo_class_DirectoryIterator___toString, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - -static const zend_function_entry spl_FilesystemIterator_functions[] = { - SPL_ME(FilesystemIterator, __construct, arginfo_class_FilesystemIterator___construct, ZEND_ACC_PUBLIC) - SPL_ME(FilesystemIterator, rewind, arginfo_class_FilesystemIterator_rewind, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, next, arginfo_class_FilesystemIterator_next, ZEND_ACC_PUBLIC) - SPL_ME(FilesystemIterator, key, arginfo_class_FilesystemIterator_key, ZEND_ACC_PUBLIC) - SPL_ME(FilesystemIterator, current, arginfo_class_FilesystemIterator_current, ZEND_ACC_PUBLIC) - SPL_ME(FilesystemIterator, getFlags, arginfo_class_FilesystemIterator_getFlags, ZEND_ACC_PUBLIC) - SPL_ME(FilesystemIterator, setFlags, arginfo_class_FilesystemIterator_setFlags, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - -static const zend_function_entry spl_RecursiveDirectoryIterator_functions[] = { - SPL_ME(RecursiveDirectoryIterator, __construct, arginfo_class_RecursiveDirectoryIterator___construct, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveDirectoryIterator, hasChildren, arginfo_class_RecursiveDirectoryIterator_hasChildren, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveDirectoryIterator, getChildren, arginfo_class_RecursiveDirectoryIterator_getChildren, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveDirectoryIterator, getSubPath, arginfo_class_RecursiveDirectoryIterator_getSubPath, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveDirectoryIterator, getSubPathname,arginfo_class_RecursiveDirectoryIterator_getSubPathname, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - -#ifdef HAVE_GLOB -static const zend_function_entry spl_GlobIterator_functions[] = { - SPL_ME(GlobIterator, __construct, arginfo_class_GlobIterator___construct, ZEND_ACC_PUBLIC) - SPL_ME(GlobIterator, count, arginfo_class_GlobIterator_count, ZEND_ACC_PUBLIC) - PHP_FE_END -}; -#endif -/* }}} */ - static int spl_filesystem_file_read(spl_filesystem_object *intern, int silent) /* {{{ */ { char *buf; @@ -2198,7 +2114,7 @@ static void spl_filesystem_file_rewind(zval * this_ptr, spl_filesystem_object *i /* {{{ proto SplFileObject::__construct(string filename [, string mode = 'r' [, bool use_include_path [, resource context]]]]) Construct a new file object */ -SPL_METHOD(SplFileObject, __construct) +PHP_METHOD(SplFileObject, __construct) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); zend_bool use_include_path = 0; @@ -2258,7 +2174,7 @@ SPL_METHOD(SplFileObject, __construct) /* {{{ proto SplTempFileObject::__construct([int max_memory]) Construct a new temp file object */ -SPL_METHOD(SplTempFileObject, __construct) +PHP_METHOD(SplTempFileObject, __construct) { zend_long max_memory = PHP_STREAM_MAX_MEM; char tmp_fname[48]; @@ -2292,7 +2208,7 @@ SPL_METHOD(SplTempFileObject, __construct) /* {{{ proto void SplFileObject::rewind() Rewind the file and read the first line */ -SPL_METHOD(SplFileObject, rewind) +PHP_METHOD(SplFileObject, rewind) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); @@ -2305,7 +2221,7 @@ SPL_METHOD(SplFileObject, rewind) /* {{{ proto void SplFileObject::eof() Return whether end of file is reached */ -SPL_METHOD(SplFileObject, eof) +PHP_METHOD(SplFileObject, eof) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); @@ -2323,7 +2239,7 @@ SPL_METHOD(SplFileObject, eof) /* {{{ proto void SplFileObject::valid() Return !eof() */ -SPL_METHOD(SplFileObject, valid) +PHP_METHOD(SplFileObject, valid) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); @@ -2343,7 +2259,7 @@ SPL_METHOD(SplFileObject, valid) /* {{{ proto string SplFileObject::fgets() Rturn next line from file */ -SPL_METHOD(SplFileObject, fgets) +PHP_METHOD(SplFileObject, fgets) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); @@ -2364,7 +2280,7 @@ SPL_METHOD(SplFileObject, fgets) /* {{{ proto string SplFileObject::current() Return current line from file */ -SPL_METHOD(SplFileObject, current) +PHP_METHOD(SplFileObject, current) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); @@ -2393,7 +2309,7 @@ SPL_METHOD(SplFileObject, current) /* {{{ proto int SplFileObject::key() Return line number */ -SPL_METHOD(SplFileObject, key) +PHP_METHOD(SplFileObject, key) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); @@ -2410,7 +2326,7 @@ SPL_METHOD(SplFileObject, key) /* {{{ proto void SplFileObject::next() Read next line */ -SPL_METHOD(SplFileObject, next) +PHP_METHOD(SplFileObject, next) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); @@ -2427,7 +2343,7 @@ SPL_METHOD(SplFileObject, next) /* {{{ proto void SplFileObject::setFlags(int flags) Set file handling flags */ -SPL_METHOD(SplFileObject, setFlags) +PHP_METHOD(SplFileObject, setFlags) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); @@ -2438,7 +2354,7 @@ SPL_METHOD(SplFileObject, setFlags) /* {{{ proto int SplFileObject::getFlags() Get file handling flags */ -SPL_METHOD(SplFileObject, getFlags) +PHP_METHOD(SplFileObject, getFlags) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); @@ -2451,7 +2367,7 @@ SPL_METHOD(SplFileObject, getFlags) /* {{{ proto void SplFileObject::setMaxLineLen(int max_len) Set maximum line length */ -SPL_METHOD(SplFileObject, setMaxLineLen) +PHP_METHOD(SplFileObject, setMaxLineLen) { zend_long max_len; @@ -2471,7 +2387,7 @@ SPL_METHOD(SplFileObject, setMaxLineLen) /* {{{ proto int SplFileObject::getMaxLineLen() Get maximum line length */ -SPL_METHOD(SplFileObject, getMaxLineLen) +PHP_METHOD(SplFileObject, getMaxLineLen) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); @@ -2484,7 +2400,7 @@ SPL_METHOD(SplFileObject, getMaxLineLen) /* {{{ proto bool SplFileObject::hasChildren() Return false */ -SPL_METHOD(SplFileObject, hasChildren) +PHP_METHOD(SplFileObject, hasChildren) { if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); @@ -2495,7 +2411,7 @@ SPL_METHOD(SplFileObject, hasChildren) /* {{{ proto bool SplFileObject::getChildren() Read NULL */ -SPL_METHOD(SplFileObject, getChildren) +PHP_METHOD(SplFileObject, getChildren) { if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); @@ -2505,7 +2421,7 @@ SPL_METHOD(SplFileObject, getChildren) /* {{{ FileFunction */ #define FileFunction(func_name) \ -SPL_METHOD(SplFileObject, func_name) \ +PHP_METHOD(SplFileObject, func_name) \ { \ spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); \ FileFunctionCall(func_name, ZEND_NUM_ARGS(), NULL); \ @@ -2514,7 +2430,7 @@ SPL_METHOD(SplFileObject, func_name) \ /* {{{ proto array SplFileObject::fgetcsv([string delimiter [, string enclosure [, escape = '\\']]]) Return current line as csv */ -SPL_METHOD(SplFileObject, fgetcsv) +PHP_METHOD(SplFileObject, fgetcsv) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); char delimiter = intern->u.file.delimiter, enclosure = intern->u.file.enclosure; @@ -2566,7 +2482,7 @@ SPL_METHOD(SplFileObject, fgetcsv) /* {{{ proto int SplFileObject::fputcsv(array fields, [string delimiter [, string enclosure [, string escape]]]) Output a field array as a CSV line */ -SPL_METHOD(SplFileObject, fputcsv) +PHP_METHOD(SplFileObject, fputcsv) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); char delimiter = intern->u.file.delimiter, enclosure = intern->u.file.enclosure; @@ -2621,7 +2537,7 @@ SPL_METHOD(SplFileObject, fputcsv) /* {{{ proto void SplFileObject::setCsvControl([string delimiter [, string enclosure [, string escape ]]]) Set the delimiter, enclosure and escape character used in fgetcsv */ -SPL_METHOD(SplFileObject, setCsvControl) +PHP_METHOD(SplFileObject, setCsvControl) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); char delimiter = ',', enclosure = '"'; @@ -2671,7 +2587,7 @@ SPL_METHOD(SplFileObject, setCsvControl) /* {{{ proto array SplFileObject::getCsvControl() Get the delimiter, enclosure and escape character used in fgetcsv */ -SPL_METHOD(SplFileObject, getCsvControl) +PHP_METHOD(SplFileObject, getCsvControl) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); char delimiter[2], enclosure[2], escape[2]; @@ -2702,7 +2618,7 @@ FileFunction(flock) /* {{{ proto bool SplFileObject::fflush() Flush the file */ -SPL_METHOD(SplFileObject, fflush) +PHP_METHOD(SplFileObject, fflush) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); @@ -2716,7 +2632,7 @@ SPL_METHOD(SplFileObject, fflush) /* {{{ proto int SplFileObject::ftell() Return current file position */ -SPL_METHOD(SplFileObject, ftell) +PHP_METHOD(SplFileObject, ftell) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); zend_long ret; @@ -2737,7 +2653,7 @@ SPL_METHOD(SplFileObject, ftell) /* {{{ proto int SplFileObject::fseek(int pos [, int whence = SEEK_SET]) Return current file position */ -SPL_METHOD(SplFileObject, fseek) +PHP_METHOD(SplFileObject, fseek) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); zend_long pos, whence = SEEK_SET; @@ -2757,7 +2673,7 @@ SPL_METHOD(SplFileObject, fseek) /* {{{ proto int SplFileObject::fgetc() Get a character form the file */ -SPL_METHOD(SplFileObject, fgetc) +PHP_METHOD(SplFileObject, fgetc) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); char buf[2]; @@ -2787,7 +2703,7 @@ SPL_METHOD(SplFileObject, fgetc) /* {{{ proto int SplFileObject::fpassthru() Output all remaining data from a file pointer */ -SPL_METHOD(SplFileObject, fpassthru) +PHP_METHOD(SplFileObject, fpassthru) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); @@ -2801,7 +2717,7 @@ SPL_METHOD(SplFileObject, fpassthru) /* {{{ proto bool SplFileObject::fscanf(string format [, string ...]) Implements a mostly ANSI compatible fscanf() */ -SPL_METHOD(SplFileObject, fscanf) +PHP_METHOD(SplFileObject, fscanf) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); @@ -2819,7 +2735,7 @@ SPL_METHOD(SplFileObject, fscanf) /* {{{ proto int|false SplFileObject::fwrite(string str [, int length]) Binary-safe file write */ -SPL_METHOD(SplFileObject, fwrite) +PHP_METHOD(SplFileObject, fwrite) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); char *str; @@ -2855,7 +2771,7 @@ SPL_METHOD(SplFileObject, fwrite) RETURN_LONG(written); } /* }}} */ -SPL_METHOD(SplFileObject, fread) +PHP_METHOD(SplFileObject, fread) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); zend_long length = 0; @@ -2889,7 +2805,7 @@ FileFunction(fstat) /* {{{ proto bool SplFileObject::ftruncate(int size) Truncate file to 'size' length */ -SPL_METHOD(SplFileObject, ftruncate) +PHP_METHOD(SplFileObject, ftruncate) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); zend_long size; @@ -2913,7 +2829,7 @@ SPL_METHOD(SplFileObject, ftruncate) /* {{{ proto void SplFileObject::seek(int line_pos) Seek to specified line */ -SPL_METHOD(SplFileObject, seek) +PHP_METHOD(SplFileObject, seek) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); zend_long line_pos; @@ -2940,54 +2856,11 @@ SPL_METHOD(SplFileObject, seek) } } /* }}} */ -static const zend_function_entry spl_SplFileObject_functions[] = { - SPL_ME(SplFileObject, __construct, arginfo_class_SplFileObject___construct, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, rewind, arginfo_class_SplFileObject_rewind, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, eof, arginfo_class_SplFileObject_eof, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, valid, arginfo_class_SplFileObject_valid, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, fgets, arginfo_class_SplFileObject_fgets, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, fgetcsv, arginfo_class_SplFileObject_fgetcsv, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, fputcsv, arginfo_class_SplFileObject_fputcsv, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, setCsvControl, arginfo_class_SplFileObject_setCsvControl, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, getCsvControl, arginfo_class_SplFileObject_getCsvControl, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, flock, arginfo_class_SplFileObject_flock, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, fflush, arginfo_class_SplFileObject_fflush, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, ftell, arginfo_class_SplFileObject_ftell, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, fseek, arginfo_class_SplFileObject_fseek, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, fgetc, arginfo_class_SplFileObject_fgetc, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, fpassthru, arginfo_class_SplFileObject_fpassthru, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, fscanf, arginfo_class_SplFileObject_fscanf, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, fwrite, arginfo_class_SplFileObject_fwrite, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, fread, arginfo_class_SplFileObject_fread, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, fstat, arginfo_class_SplFileObject_fstat, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, ftruncate, arginfo_class_SplFileObject_ftruncate, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, current, arginfo_class_SplFileObject_current, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, key, arginfo_class_SplFileObject_key, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, next, arginfo_class_SplFileObject_next, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, setFlags, arginfo_class_SplFileObject_setFlags, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, getFlags, arginfo_class_SplFileObject_getFlags, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, setMaxLineLen, arginfo_class_SplFileObject_setMaxLineLen, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, getMaxLineLen, arginfo_class_SplFileObject_getMaxLineLen, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, hasChildren, arginfo_class_SplFileObject_hasChildren, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, getChildren, arginfo_class_SplFileObject_getChildren, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, seek, arginfo_class_SplFileObject_seek, ZEND_ACC_PUBLIC) - /* mappings */ - SPL_MA(SplFileObject, getCurrentLine, SplFileObject, fgets, arginfo_class_SplFileObject_getCurrentLine, ZEND_ACC_PUBLIC) - SPL_MA(SplFileObject, __toString, SplFileObject, fgets, arginfo_class_SplFileObject___toString, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - -static const zend_function_entry spl_SplTempFileObject_functions[] = { - SPL_ME(SplTempFileObject, __construct, arginfo_class_SplTempFileObject___construct, ZEND_ACC_PUBLIC) - PHP_FE_END -}; -/* }}} */ - /* {{{ PHP_MINIT_FUNCTION(spl_directory) */ PHP_MINIT_FUNCTION(spl_directory) { - REGISTER_SPL_STD_CLASS_EX(SplFileInfo, spl_filesystem_object_new, spl_SplFileInfo_functions); + REGISTER_SPL_STD_CLASS_EX(SplFileInfo, spl_filesystem_object_new, class_SplFileInfo_methods); memcpy(&spl_filesystem_object_handlers, &std_object_handlers, sizeof(zend_object_handlers)); spl_filesystem_object_handlers.offset = XtOffsetOf(spl_filesystem_object, std); spl_filesystem_object_handlers.clone_obj = spl_filesystem_object_clone; @@ -2999,13 +2872,13 @@ PHP_MINIT_FUNCTION(spl_directory) REGISTER_SPL_IMPLEMENTS(SplFileInfo, Stringable); - REGISTER_SPL_SUB_CLASS_EX(DirectoryIterator, SplFileInfo, spl_filesystem_object_new, spl_DirectoryIterator_functions); + REGISTER_SPL_SUB_CLASS_EX(DirectoryIterator, SplFileInfo, spl_filesystem_object_new, class_DirectoryIterator_methods); zend_class_implements(spl_ce_DirectoryIterator, 1, zend_ce_iterator); REGISTER_SPL_IMPLEMENTS(DirectoryIterator, SeekableIterator); spl_ce_DirectoryIterator->get_iterator = spl_filesystem_dir_get_iterator; - REGISTER_SPL_SUB_CLASS_EX(FilesystemIterator, DirectoryIterator, spl_filesystem_object_new, spl_FilesystemIterator_functions); + REGISTER_SPL_SUB_CLASS_EX(FilesystemIterator, DirectoryIterator, spl_filesystem_object_new, class_FilesystemIterator_methods); REGISTER_SPL_CLASS_CONST_LONG(FilesystemIterator, "CURRENT_MODE_MASK", SPL_FILE_DIR_CURRENT_MODE_MASK); REGISTER_SPL_CLASS_CONST_LONG(FilesystemIterator, "CURRENT_AS_PATHNAME", SPL_FILE_DIR_CURRENT_AS_PATHNAME); @@ -3022,7 +2895,7 @@ PHP_MINIT_FUNCTION(spl_directory) spl_ce_FilesystemIterator->get_iterator = spl_filesystem_tree_get_iterator; - REGISTER_SPL_SUB_CLASS_EX(RecursiveDirectoryIterator, FilesystemIterator, spl_filesystem_object_new, spl_RecursiveDirectoryIterator_functions); + REGISTER_SPL_SUB_CLASS_EX(RecursiveDirectoryIterator, FilesystemIterator, spl_filesystem_object_new, class_RecursiveDirectoryIterator_methods); REGISTER_SPL_IMPLEMENTS(RecursiveDirectoryIterator, RecursiveIterator); memcpy(&spl_filesystem_object_check_handlers, &spl_filesystem_object_handlers, sizeof(zend_object_handlers)); @@ -3030,11 +2903,11 @@ PHP_MINIT_FUNCTION(spl_directory) spl_filesystem_object_check_handlers.get_method = spl_filesystem_object_get_method_check; #ifdef HAVE_GLOB - REGISTER_SPL_SUB_CLASS_EX(GlobIterator, FilesystemIterator, spl_filesystem_object_new_check, spl_GlobIterator_functions); + REGISTER_SPL_SUB_CLASS_EX(GlobIterator, FilesystemIterator, spl_filesystem_object_new_check, class_GlobIterator_methods); REGISTER_SPL_IMPLEMENTS(GlobIterator, Countable); #endif - REGISTER_SPL_SUB_CLASS_EX(SplFileObject, SplFileInfo, spl_filesystem_object_new_check, spl_SplFileObject_functions); + REGISTER_SPL_SUB_CLASS_EX(SplFileObject, SplFileInfo, spl_filesystem_object_new_check, class_SplFileObject_methods); REGISTER_SPL_IMPLEMENTS(SplFileObject, RecursiveIterator); REGISTER_SPL_IMPLEMENTS(SplFileObject, SeekableIterator); @@ -3043,7 +2916,7 @@ PHP_MINIT_FUNCTION(spl_directory) REGISTER_SPL_CLASS_CONST_LONG(SplFileObject, "SKIP_EMPTY", SPL_FILE_OBJECT_SKIP_EMPTY); REGISTER_SPL_CLASS_CONST_LONG(SplFileObject, "READ_CSV", SPL_FILE_OBJECT_READ_CSV); - REGISTER_SPL_SUB_CLASS_EX(SplTempFileObject, SplFileObject, spl_filesystem_object_new_check, spl_SplTempFileObject_functions); + REGISTER_SPL_SUB_CLASS_EX(SplTempFileObject, SplFileObject, spl_filesystem_object_new_check, class_SplTempFileObject_methods); return SUCCESS; } /* }}} */ diff --git a/ext/spl/spl_directory.stub.php b/ext/spl/spl_directory.stub.php index 6e8108b6a3dc2..513dfef8aa3a9 100755 --- a/ext/spl/spl_directory.stub.php +++ b/ext/spl/spl_directory.stub.php @@ -1,5 +1,7 @@ traverse_pointer; @@ -1116,7 +1116,7 @@ SPL_METHOD(SplDoublyLinkedList, current) /* {{{ proto string SplDoublyLinkedList::serialize() Serializes storage */ -SPL_METHOD(SplDoublyLinkedList, serialize) +PHP_METHOD(SplDoublyLinkedList, serialize) { spl_dllist_object *intern = Z_SPLDLLIST_P(ZEND_THIS); smart_str buf = {0}; @@ -1154,7 +1154,7 @@ SPL_METHOD(SplDoublyLinkedList, serialize) /* {{{ proto void SplDoublyLinkedList::unserialize(string serialized) Unserializes storage */ -SPL_METHOD(SplDoublyLinkedList, unserialize) +PHP_METHOD(SplDoublyLinkedList, unserialize) { spl_dllist_object *intern = Z_SPLDLLIST_P(ZEND_THIS); zval *flags, *elem; @@ -1215,7 +1215,7 @@ SPL_METHOD(SplDoublyLinkedList, unserialize) } /* }}} */ /* {{{ proto array SplDoublyLinkedList::__serialize() */ -SPL_METHOD(SplDoublyLinkedList, __serialize) +PHP_METHOD(SplDoublyLinkedList, __serialize) { spl_dllist_object *intern = Z_SPLDLLIST_P(ZEND_THIS); spl_ptr_llist_element *current = intern->llist->head; @@ -1247,7 +1247,7 @@ SPL_METHOD(SplDoublyLinkedList, __serialize) } /* }}} */ /* {{{ proto void SplDoublyLinkedList::__unserialize(array serialized) */ -SPL_METHOD(SplDoublyLinkedList, __unserialize) { +PHP_METHOD(SplDoublyLinkedList, __unserialize) { spl_dllist_object *intern = Z_SPLDLLIST_P(ZEND_THIS); HashTable *data; zval *flags_zv, *storage_zv, *members_zv, *elem; @@ -1278,7 +1278,7 @@ SPL_METHOD(SplDoublyLinkedList, __unserialize) { /* {{{ proto void SplDoublyLinkedList::add(mixed index, mixed newval) Inserts a new entry before the specified $index consisting of $newval. */ -SPL_METHOD(SplDoublyLinkedList, add) +PHP_METHOD(SplDoublyLinkedList, add) { zval *zindex, *value; spl_dllist_object *intern; @@ -1331,7 +1331,7 @@ SPL_METHOD(SplDoublyLinkedList, add) } /* }}} */ /* {{{ proto void SplDoublyLinkedList::__debugInfo() */ -SPL_METHOD(SplDoublyLinkedList, __debugInfo) +PHP_METHOD(SplDoublyLinkedList, __debugInfo) { if (zend_parse_parameters_none() == FAILURE) { return; @@ -1380,52 +1380,9 @@ zend_object_iterator *spl_dllist_get_iterator(zend_class_entry *ce, zval *object } /* }}} */ -static const zend_function_entry spl_funcs_SplQueue[] = { - SPL_MA(SplQueue, enqueue, SplDoublyLinkedList, push, arginfo_class_SplQueue_enqueue, ZEND_ACC_PUBLIC) - SPL_MA(SplQueue, dequeue, SplDoublyLinkedList, shift, arginfo_class_SplQueue_dequeue, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - -static const zend_function_entry spl_funcs_SplDoublyLinkedList[] = { - SPL_ME(SplDoublyLinkedList, pop, arginfo_class_SplDoublyLinkedList_pop, ZEND_ACC_PUBLIC) - SPL_ME(SplDoublyLinkedList, shift, arginfo_class_SplDoublyLinkedList_shift, ZEND_ACC_PUBLIC) - SPL_ME(SplDoublyLinkedList, push, arginfo_class_SplDoublyLinkedList_push, ZEND_ACC_PUBLIC) - SPL_ME(SplDoublyLinkedList, unshift, arginfo_class_SplDoublyLinkedList_unshift, ZEND_ACC_PUBLIC) - SPL_ME(SplDoublyLinkedList, top, arginfo_class_SplDoublyLinkedList_top, ZEND_ACC_PUBLIC) - SPL_ME(SplDoublyLinkedList, bottom, arginfo_class_SplDoublyLinkedList_bottom, ZEND_ACC_PUBLIC) - SPL_ME(SplDoublyLinkedList, isEmpty, arginfo_class_SplDoublyLinkedList_isEmpty, ZEND_ACC_PUBLIC) - SPL_ME(SplDoublyLinkedList, setIteratorMode, arginfo_class_SplDoublyLinkedList_setIteratorMode, ZEND_ACC_PUBLIC) - SPL_ME(SplDoublyLinkedList, getIteratorMode, arginfo_class_SplDoublyLinkedList_getIteratorMode, ZEND_ACC_PUBLIC) - SPL_ME(SplDoublyLinkedList, __debugInfo, arginfo_class_SplDoublyLinkedList___debugInfo, ZEND_ACC_PUBLIC) - /* Countable */ - SPL_ME(SplDoublyLinkedList, count, arginfo_class_SplDoublyLinkedList_count, ZEND_ACC_PUBLIC) - /* ArrayAccess */ - SPL_ME(SplDoublyLinkedList, offsetExists, arginfo_class_SplDoublyLinkedList_offsetExists, ZEND_ACC_PUBLIC) - SPL_ME(SplDoublyLinkedList, offsetGet, arginfo_class_SplDoublyLinkedList_offsetGet, ZEND_ACC_PUBLIC) - SPL_ME(SplDoublyLinkedList, offsetSet, arginfo_class_SplDoublyLinkedList_offsetSet, ZEND_ACC_PUBLIC) - SPL_ME(SplDoublyLinkedList, offsetUnset, arginfo_class_SplDoublyLinkedList_offsetUnset, ZEND_ACC_PUBLIC) - - SPL_ME(SplDoublyLinkedList, add, arginfo_class_SplDoublyLinkedList_add, ZEND_ACC_PUBLIC) - - /* Iterator */ - SPL_ME(SplDoublyLinkedList, rewind, arginfo_class_SplDoublyLinkedList_rewind, ZEND_ACC_PUBLIC) - SPL_ME(SplDoublyLinkedList, current, arginfo_class_SplDoublyLinkedList_current, ZEND_ACC_PUBLIC) - SPL_ME(SplDoublyLinkedList, key, arginfo_class_SplDoublyLinkedList_key, ZEND_ACC_PUBLIC) - SPL_ME(SplDoublyLinkedList, next, arginfo_class_SplDoublyLinkedList_next, ZEND_ACC_PUBLIC) - SPL_ME(SplDoublyLinkedList, prev, arginfo_class_SplDoublyLinkedList_prev, ZEND_ACC_PUBLIC) - SPL_ME(SplDoublyLinkedList, valid, arginfo_class_SplDoublyLinkedList_valid, ZEND_ACC_PUBLIC) - /* Serializable */ - SPL_ME(SplDoublyLinkedList, unserialize, arginfo_class_SplDoublyLinkedList_unserialize, ZEND_ACC_PUBLIC) - SPL_ME(SplDoublyLinkedList, serialize, arginfo_class_SplDoublyLinkedList_serialize, ZEND_ACC_PUBLIC) - SPL_ME(SplDoublyLinkedList, __unserialize, arginfo_class_SplDoublyLinkedList___unserialize, ZEND_ACC_PUBLIC) - SPL_ME(SplDoublyLinkedList, __serialize, arginfo_class_SplDoublyLinkedList___serialize, ZEND_ACC_PUBLIC) - PHP_FE_END -}; -/* }}} */ - PHP_MINIT_FUNCTION(spl_dllist) /* {{{ */ { - REGISTER_SPL_STD_CLASS_EX(SplDoublyLinkedList, spl_dllist_object_new, spl_funcs_SplDoublyLinkedList); + REGISTER_SPL_STD_CLASS_EX(SplDoublyLinkedList, spl_dllist_object_new, class_SplDoublyLinkedList_methods); memcpy(&spl_handler_SplDoublyLinkedList, &std_object_handlers, sizeof(zend_object_handlers)); spl_handler_SplDoublyLinkedList.offset = XtOffsetOf(spl_dllist_object, std); @@ -1447,8 +1404,8 @@ PHP_MINIT_FUNCTION(spl_dllist) /* {{{ */ spl_ce_SplDoublyLinkedList->get_iterator = spl_dllist_get_iterator; - REGISTER_SPL_SUB_CLASS_EX(SplQueue, SplDoublyLinkedList, spl_dllist_object_new, spl_funcs_SplQueue); - REGISTER_SPL_SUB_CLASS_EX(SplStack, SplDoublyLinkedList, spl_dllist_object_new, NULL); + REGISTER_SPL_SUB_CLASS_EX(SplQueue, SplDoublyLinkedList, spl_dllist_object_new, class_SplQueue_methods); + REGISTER_SPL_SUB_CLASS_EX(SplStack, SplDoublyLinkedList, spl_dllist_object_new, class_SplStack_methods); spl_ce_SplQueue->get_iterator = spl_dllist_get_iterator; spl_ce_SplStack->get_iterator = spl_dllist_get_iterator; diff --git a/ext/spl/spl_dllist.stub.php b/ext/spl/spl_dllist.stub.php index 0cb91d8ddf548..3cda7de01f679 100755 --- a/ext/spl/spl_dllist.stub.php +++ b/ext/spl/spl_dllist.stub.php @@ -1,5 +1,7 @@ get_iterator = spl_heap_get_iterator; - REGISTER_SPL_SUB_CLASS_EX(SplMinHeap, SplHeap, spl_heap_object_new, spl_funcs_SplMinHeap); - REGISTER_SPL_SUB_CLASS_EX(SplMaxHeap, SplHeap, spl_heap_object_new, spl_funcs_SplMaxHeap); + REGISTER_SPL_SUB_CLASS_EX(SplMinHeap, SplHeap, spl_heap_object_new, class_SplMinHeap_methods); + REGISTER_SPL_SUB_CLASS_EX(SplMaxHeap, SplHeap, spl_heap_object_new, class_SplMaxHeap_methods); spl_ce_SplMaxHeap->get_iterator = spl_heap_get_iterator; spl_ce_SplMinHeap->get_iterator = spl_heap_get_iterator; - REGISTER_SPL_STD_CLASS_EX(SplPriorityQueue, spl_heap_object_new, spl_funcs_SplPriorityQueue); + REGISTER_SPL_STD_CLASS_EX(SplPriorityQueue, spl_heap_object_new, class_SplPriorityQueue_methods); memcpy(&spl_handler_SplPriorityQueue, &std_object_handlers, sizeof(zend_object_handlers)); spl_handler_SplPriorityQueue.offset = XtOffsetOf(spl_heap_object, std); diff --git a/ext/spl/spl_heap.stub.php b/ext/spl/spl_heap.stub.php index e98bed6cb2b41..5642d784e6db4 100644 --- a/ext/spl/spl_heap.stub.php +++ b/ext/spl/spl_heap.stub.php @@ -1,5 +1,7 @@ level; @@ -719,7 +713,7 @@ SPL_METHOD(RecursiveIteratorIterator, getSubIterator) /* {{{ proto RecursiveIterator RecursiveIteratorIterator::getInnerIterator() The current active sub iterator */ -SPL_METHOD(RecursiveIteratorIterator, getInnerIterator) +PHP_METHOD(RecursiveIteratorIterator, getInnerIterator) { spl_recursive_it_object *object = Z_SPLRECURSIVE_IT_P(ZEND_THIS); zval *zobject; @@ -735,7 +729,7 @@ SPL_METHOD(RecursiveIteratorIterator, getInnerIterator) /* {{{ proto RecursiveIterator RecursiveIteratorIterator::beginIteration() Called when iteration begins (after first rewind() call) */ -SPL_METHOD(RecursiveIteratorIterator, beginIteration) +PHP_METHOD(RecursiveIteratorIterator, beginIteration) { if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); @@ -745,7 +739,7 @@ SPL_METHOD(RecursiveIteratorIterator, beginIteration) /* {{{ proto RecursiveIterator RecursiveIteratorIterator::endIteration() Called when iteration ends (when valid() first returns false */ -SPL_METHOD(RecursiveIteratorIterator, endIteration) +PHP_METHOD(RecursiveIteratorIterator, endIteration) { if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); @@ -755,7 +749,7 @@ SPL_METHOD(RecursiveIteratorIterator, endIteration) /* {{{ proto bool RecursiveIteratorIterator::callHasChildren() Called for each element to test whether it has children */ -SPL_METHOD(RecursiveIteratorIterator, callHasChildren) +PHP_METHOD(RecursiveIteratorIterator, callHasChildren) { spl_recursive_it_object *object = Z_SPLRECURSIVE_IT_P(ZEND_THIS); zend_class_entry *ce; @@ -784,7 +778,7 @@ SPL_METHOD(RecursiveIteratorIterator, callHasChildren) /* {{{ proto RecursiveIterator RecursiveIteratorIterator::callGetChildren() Return children of current element */ -SPL_METHOD(RecursiveIteratorIterator, callGetChildren) +PHP_METHOD(RecursiveIteratorIterator, callGetChildren) { spl_recursive_it_object *object = Z_SPLRECURSIVE_IT_P(ZEND_THIS); zend_class_entry *ce; @@ -809,7 +803,7 @@ SPL_METHOD(RecursiveIteratorIterator, callGetChildren) /* {{{ proto void RecursiveIteratorIterator::beginChildren() Called when recursing one level down */ -SPL_METHOD(RecursiveIteratorIterator, beginChildren) +PHP_METHOD(RecursiveIteratorIterator, beginChildren) { if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); @@ -819,7 +813,7 @@ SPL_METHOD(RecursiveIteratorIterator, beginChildren) /* {{{ proto void RecursiveIteratorIterator::endChildren() Called when end recursing one level */ -SPL_METHOD(RecursiveIteratorIterator, endChildren) +PHP_METHOD(RecursiveIteratorIterator, endChildren) { if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); @@ -829,7 +823,7 @@ SPL_METHOD(RecursiveIteratorIterator, endChildren) /* {{{ proto void RecursiveIteratorIterator::nextElement() Called when the next element is available */ -SPL_METHOD(RecursiveIteratorIterator, nextElement) +PHP_METHOD(RecursiveIteratorIterator, nextElement) { if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); @@ -839,7 +833,7 @@ SPL_METHOD(RecursiveIteratorIterator, nextElement) /* {{{ proto void RecursiveIteratorIterator::setMaxDepth([$max_depth = -1]) Set the maximum allowed depth (or any depth if pmax_depth = -1] */ -SPL_METHOD(RecursiveIteratorIterator, setMaxDepth) +PHP_METHOD(RecursiveIteratorIterator, setMaxDepth) { spl_recursive_it_object *object = Z_SPLRECURSIVE_IT_P(ZEND_THIS); zend_long max_depth = -1; @@ -859,7 +853,7 @@ SPL_METHOD(RecursiveIteratorIterator, setMaxDepth) /* {{{ proto int|false RecursiveIteratorIterator::getMaxDepth() Return the maximum accepted depth or false if any depth is allowed */ -SPL_METHOD(RecursiveIteratorIterator, getMaxDepth) +PHP_METHOD(RecursiveIteratorIterator, getMaxDepth) { spl_recursive_it_object *object = Z_SPLRECURSIVE_IT_P(ZEND_THIS); @@ -982,28 +976,6 @@ static zend_object *spl_RecursiveTreeIterator_new(zend_class_entry *class_type) } /* }}} */ -static const zend_function_entry spl_funcs_RecursiveIteratorIterator[] = { - SPL_ME(RecursiveIteratorIterator, __construct, arginfo_class_RecursiveIteratorIterator___construct, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, rewind, arginfo_class_RecursiveIteratorIterator_rewind, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, valid, arginfo_class_RecursiveIteratorIterator_valid, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, key, arginfo_class_RecursiveIteratorIterator_key, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, current, arginfo_class_RecursiveIteratorIterator_current, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, next, arginfo_class_RecursiveIteratorIterator_next, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, getDepth, arginfo_class_RecursiveIteratorIterator_getDepth, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, getSubIterator, arginfo_class_RecursiveIteratorIterator_getSubIterator, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, getInnerIterator, arginfo_class_RecursiveIteratorIterator_getInnerIterator, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, beginIteration, arginfo_class_RecursiveIteratorIterator_beginIteration, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, endIteration, arginfo_class_RecursiveIteratorIterator_endIteration, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, callHasChildren, arginfo_class_RecursiveIteratorIterator_callHasChildren, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, callGetChildren, arginfo_class_RecursiveIteratorIterator_callGetChildren, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, beginChildren, arginfo_class_RecursiveIteratorIterator_beginChildren, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, endChildren, arginfo_class_RecursiveIteratorIterator_endChildren, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, nextElement, arginfo_class_RecursiveIteratorIterator_nextElement, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, setMaxDepth, arginfo_class_RecursiveIteratorIterator_setMaxDepth, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, getMaxDepth, arginfo_class_RecursiveIteratorIterator_getMaxDepth, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - static void spl_recursive_tree_iterator_get_prefix(spl_recursive_it_object *object, zval *return_value) { smart_str str = {0}; @@ -1065,14 +1037,14 @@ static void spl_recursive_tree_iterator_get_postfix(spl_recursive_it_object *obj /* {{{ proto RecursiveTreeIterator::__construct(RecursiveIterator|IteratorAggregate it [, int flags = RTIT_BYPASS_KEY [, int cit_flags = CIT_CATCH_GET_CHILD [, mode = RIT_SELF_FIRST ]]]) throws InvalidArgumentException RecursiveIteratorIterator to generate ASCII graphic trees for the entries in a RecursiveIterator */ -SPL_METHOD(RecursiveTreeIterator, __construct) +PHP_METHOD(RecursiveTreeIterator, __construct) { spl_recursive_it_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_RecursiveTreeIterator, zend_ce_iterator, RIT_RecursiveTreeIterator); } /* }}} */ /* {{{ proto void RecursiveTreeIterator::setPrefixPart(int part, string prefix) throws OutOfRangeException Sets prefix parts as used in getPrefix() */ -SPL_METHOD(RecursiveTreeIterator, setPrefixPart) +PHP_METHOD(RecursiveTreeIterator, setPrefixPart) { zend_long part; char* prefix; @@ -1094,7 +1066,7 @@ SPL_METHOD(RecursiveTreeIterator, setPrefixPart) /* {{{ proto string RecursiveTreeIterator::getPrefix() Returns the string to place in front of current element */ -SPL_METHOD(RecursiveTreeIterator, getPrefix) +PHP_METHOD(RecursiveTreeIterator, getPrefix) { spl_recursive_it_object *object = Z_SPLRECURSIVE_IT_P(ZEND_THIS); @@ -1113,7 +1085,7 @@ SPL_METHOD(RecursiveTreeIterator, getPrefix) /* {{{ proto void RecursiveTreeIterator::setPostfix(string prefix) Sets postfix as used in getPostfix() */ -SPL_METHOD(RecursiveTreeIterator, setPostfix) +PHP_METHOD(RecursiveTreeIterator, setPostfix) { spl_recursive_it_object *object = Z_SPLRECURSIVE_IT_P(ZEND_THIS); char* postfix; @@ -1129,7 +1101,7 @@ SPL_METHOD(RecursiveTreeIterator, setPostfix) /* {{{ proto string RecursiveTreeIterator::getEntry() Returns the string presentation built for current element */ -SPL_METHOD(RecursiveTreeIterator, getEntry) +PHP_METHOD(RecursiveTreeIterator, getEntry) { spl_recursive_it_object *object = Z_SPLRECURSIVE_IT_P(ZEND_THIS); @@ -1148,7 +1120,7 @@ SPL_METHOD(RecursiveTreeIterator, getEntry) /* {{{ proto string RecursiveTreeIterator::getPostfix() Returns the string to place after the current element */ -SPL_METHOD(RecursiveTreeIterator, getPostfix) +PHP_METHOD(RecursiveTreeIterator, getPostfix) { spl_recursive_it_object *object = Z_SPLRECURSIVE_IT_P(ZEND_THIS); @@ -1167,7 +1139,7 @@ SPL_METHOD(RecursiveTreeIterator, getPostfix) /* {{{ proto mixed RecursiveTreeIterator::current() Returns the current element prefixed and postfixed */ -SPL_METHOD(RecursiveTreeIterator, current) +PHP_METHOD(RecursiveTreeIterator, current) { spl_recursive_it_object *object = Z_SPLRECURSIVE_IT_P(ZEND_THIS); zval prefix, entry, postfix; @@ -1229,7 +1201,7 @@ SPL_METHOD(RecursiveTreeIterator, current) /* {{{ proto mixed RecursiveTreeIterator::key() Returns the current key prefixed and postfixed */ -SPL_METHOD(RecursiveTreeIterator, key) +PHP_METHOD(RecursiveTreeIterator, key) { spl_recursive_it_object *object = Z_SPLRECURSIVE_IT_P(ZEND_THIS); zend_object_iterator *iterator; @@ -1280,28 +1252,6 @@ SPL_METHOD(RecursiveTreeIterator, key) RETURN_NEW_STR(str); } /* }}} */ -static const zend_function_entry spl_funcs_RecursiveTreeIterator[] = { - SPL_ME(RecursiveTreeIterator, __construct, arginfo_class_RecursiveTreeIterator___construct, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, rewind, arginfo_class_RecursiveTreeIterator_rewind, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, valid, arginfo_class_RecursiveTreeIterator_valid, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveTreeIterator, key, arginfo_class_RecursiveTreeIterator_key, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveTreeIterator, current, arginfo_class_RecursiveTreeIterator_current, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, next, arginfo_class_RecursiveTreeIterator_next, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, beginIteration, arginfo_class_RecursiveTreeIterator_beginIteration, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, endIteration, arginfo_class_RecursiveTreeIterator_endIteration, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, callHasChildren, arginfo_class_RecursiveTreeIterator_callHasChildren, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, callGetChildren, arginfo_class_RecursiveTreeIterator_callGetChildren, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, beginChildren, arginfo_class_RecursiveTreeIterator_beginChildren, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, endChildren, arginfo_class_RecursiveTreeIterator_endChildren, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveIteratorIterator, nextElement, arginfo_class_RecursiveTreeIterator_nextElement, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveTreeIterator, getPrefix, arginfo_class_RecursiveTreeIterator_getPrefix, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveTreeIterator, setPrefixPart, arginfo_class_RecursiveTreeIterator_setPrefixPart, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveTreeIterator, getEntry, arginfo_class_RecursiveTreeIterator_getEntry, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveTreeIterator, setPostfix, arginfo_class_RecursiveTreeIterator_setPostfix, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveTreeIterator, getPostfix, arginfo_class_RecursiveTreeIterator_getPostfix, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - static zend_function *spl_dual_it_get_method(zend_object **object, zend_string *method, const zval *key) { zend_function *function_handler; @@ -1503,14 +1453,14 @@ static spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAMETERS, z /* {{{ proto FilterIterator::__construct(Iterator it) Create an Iterator from another iterator */ -SPL_METHOD(FilterIterator, __construct) +PHP_METHOD(FilterIterator, __construct) { spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_FilterIterator, zend_ce_iterator, DIT_FilterIterator); } /* }}} */ /* {{{ proto CallbackFilterIterator::__construct(Iterator it, callback func) Create an Iterator from another iterator */ -SPL_METHOD(CallbackFilterIterator, __construct) +PHP_METHOD(CallbackFilterIterator, __construct) { spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_CallbackFilterIterator, zend_ce_iterator, DIT_CallbackFilterIterator); } /* }}} */ @@ -1520,7 +1470,7 @@ SPL_METHOD(CallbackFilterIterator, __construct) proto Iterator LimitIterator::getInnerIterator() proto Iterator ParentIterator::getInnerIterator() Get the inner iterator */ -SPL_METHOD(dual_it, getInnerIterator) +PHP_METHOD(IteratorIterator, getInnerIterator) { spl_dual_it_object *intern; @@ -1623,7 +1573,7 @@ static inline void spl_dual_it_next(spl_dual_it_object *intern, int do_free) proto void IteratorIterator::rewind() Rewind the iterator */ -SPL_METHOD(dual_it, rewind) +PHP_METHOD(IteratorIterator, rewind) { spl_dual_it_object *intern; @@ -1642,7 +1592,7 @@ SPL_METHOD(dual_it, rewind) proto bool IteratorIterator::valid() proto bool NoRewindIterator::valid() Check whether the current element is valid */ -SPL_METHOD(dual_it, valid) +PHP_METHOD(IteratorIterator, valid) { spl_dual_it_object *intern; @@ -1663,7 +1613,7 @@ SPL_METHOD(dual_it, valid) proto mixed NoRewindIterator::key() proto mixed AppendIterator::key() Get the current key */ -SPL_METHOD(dual_it, key) +PHP_METHOD(IteratorIterator, key) { spl_dual_it_object *intern; @@ -1689,7 +1639,7 @@ SPL_METHOD(dual_it, key) proto mixed IteratorIterator::current() proto mixed NoRewindIterator::current() Get the current element value */ -SPL_METHOD(dual_it, current) +PHP_METHOD(IteratorIterator, current) { spl_dual_it_object *intern; @@ -1712,7 +1662,7 @@ SPL_METHOD(dual_it, current) proto void IteratorIterator::next() proto void NoRewindIterator::next() Move the iterator forward */ -SPL_METHOD(dual_it, next) +PHP_METHOD(IteratorIterator, next) { spl_dual_it_object *intern; @@ -1761,7 +1711,7 @@ static inline void spl_filter_it_next(zval *zthis, spl_dual_it_object *intern) /* {{{ proto void FilterIterator::rewind() Rewind the iterator */ -SPL_METHOD(FilterIterator, rewind) +PHP_METHOD(FilterIterator, rewind) { spl_dual_it_object *intern; @@ -1775,7 +1725,7 @@ SPL_METHOD(FilterIterator, rewind) /* {{{ proto void FilterIterator::next() Move the iterator forward */ -SPL_METHOD(FilterIterator, next) +PHP_METHOD(FilterIterator, next) { spl_dual_it_object *intern; @@ -1789,7 +1739,7 @@ SPL_METHOD(FilterIterator, next) /* {{{ proto RecursiveCallbackFilterIterator::__construct(RecursiveIterator it, callback func) Create a RecursiveCallbackFilterIterator from a RecursiveIterator */ -SPL_METHOD(RecursiveCallbackFilterIterator, __construct) +PHP_METHOD(RecursiveCallbackFilterIterator, __construct) { spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_RecursiveCallbackFilterIterator, spl_ce_RecursiveIterator, DIT_RecursiveCallbackFilterIterator); } /* }}} */ @@ -1797,14 +1747,14 @@ SPL_METHOD(RecursiveCallbackFilterIterator, __construct) /* {{{ proto RecursiveFilterIterator::__construct(RecursiveIterator it) Create a RecursiveFilterIterator from a RecursiveIterator */ -SPL_METHOD(RecursiveFilterIterator, __construct) +PHP_METHOD(RecursiveFilterIterator, __construct) { spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_RecursiveFilterIterator, spl_ce_RecursiveIterator, DIT_RecursiveFilterIterator); } /* }}} */ /* {{{ proto bool RecursiveFilterIterator::hasChildren() Check whether the inner iterator's current element has children */ -SPL_METHOD(RecursiveFilterIterator, hasChildren) +PHP_METHOD(RecursiveFilterIterator, hasChildren) { spl_dual_it_object *intern; @@ -1819,7 +1769,7 @@ SPL_METHOD(RecursiveFilterIterator, hasChildren) /* {{{ proto RecursiveFilterIterator RecursiveFilterIterator::getChildren() Return the inner iterator's children contained in a RecursiveFilterIterator */ -SPL_METHOD(RecursiveFilterIterator, getChildren) +PHP_METHOD(RecursiveFilterIterator, getChildren) { spl_dual_it_object *intern; zval retval; @@ -1839,7 +1789,7 @@ SPL_METHOD(RecursiveFilterIterator, getChildren) /* {{{ proto RecursiveCallbackFilterIterator RecursiveCallbackFilterIterator::getChildren() Return the inner iterator's children contained in a RecursiveCallbackFilterIterator */ -SPL_METHOD(RecursiveCallbackFilterIterator, getChildren) +PHP_METHOD(RecursiveCallbackFilterIterator, getChildren) { spl_dual_it_object *intern; zval retval; @@ -1858,21 +1808,21 @@ SPL_METHOD(RecursiveCallbackFilterIterator, getChildren) } /* }}} */ /* {{{ proto ParentIterator::__construct(RecursiveIterator it) Create a ParentIterator from a RecursiveIterator */ -SPL_METHOD(ParentIterator, __construct) +PHP_METHOD(ParentIterator, __construct) { spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_ParentIterator, spl_ce_RecursiveIterator, DIT_ParentIterator); } /* }}} */ /* {{{ proto RegexIterator::__construct(Iterator it, string regex [, int mode [, int flags [, int preg_flags]]]) Create an RegexIterator from another iterator and a regular expression */ -SPL_METHOD(RegexIterator, __construct) +PHP_METHOD(RegexIterator, __construct) { spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_RegexIterator, zend_ce_iterator, DIT_RegexIterator); } /* }}} */ /* {{{ proto bool CallbackFilterIterator::accept() Calls the callback with the current value, the current key and the inner iterator as arguments */ -SPL_METHOD(CallbackFilterIterator, accept) +PHP_METHOD(CallbackFilterIterator, accept) { spl_dual_it_object *intern = Z_SPLDUAL_IT_P(ZEND_THIS); zend_fcall_info *fci = &intern->u.cbfilter->fci; @@ -1912,7 +1862,7 @@ SPL_METHOD(CallbackFilterIterator, accept) /* {{{ proto bool RegexIterator::accept() Match (string)current() against regular expression */ -SPL_METHOD(RegexIterator, accept) +PHP_METHOD(RegexIterator, accept) { spl_dual_it_object *intern; zend_string *result, *subject; @@ -2007,7 +1957,7 @@ SPL_METHOD(RegexIterator, accept) /* {{{ proto string RegexIterator::getRegex() Returns current regular expression */ -SPL_METHOD(RegexIterator, getRegex) +PHP_METHOD(RegexIterator, getRegex) { spl_dual_it_object *intern = Z_SPLDUAL_IT_P(ZEND_THIS); @@ -2020,7 +1970,7 @@ SPL_METHOD(RegexIterator, getRegex) /* {{{ proto bool RegexIterator::getMode() Returns current operation mode */ -SPL_METHOD(RegexIterator, getMode) +PHP_METHOD(RegexIterator, getMode) { spl_dual_it_object *intern; @@ -2035,7 +1985,7 @@ SPL_METHOD(RegexIterator, getMode) /* {{{ proto bool RegexIterator::setMode(int new_mode) Set new operation mode */ -SPL_METHOD(RegexIterator, setMode) +PHP_METHOD(RegexIterator, setMode) { spl_dual_it_object *intern; zend_long mode; @@ -2056,7 +2006,7 @@ SPL_METHOD(RegexIterator, setMode) /* {{{ proto bool RegexIterator::getFlags() Returns current operation flags */ -SPL_METHOD(RegexIterator, getFlags) +PHP_METHOD(RegexIterator, getFlags) { spl_dual_it_object *intern; @@ -2071,7 +2021,7 @@ SPL_METHOD(RegexIterator, getFlags) /* {{{ proto bool RegexIterator::setFlags(int new_flags) Set operation flags */ -SPL_METHOD(RegexIterator, setFlags) +PHP_METHOD(RegexIterator, setFlags) { spl_dual_it_object *intern; zend_long flags; @@ -2087,7 +2037,7 @@ SPL_METHOD(RegexIterator, setFlags) /* {{{ proto bool RegexIterator::getFlags() Returns current PREG flags (if in use or NULL) */ -SPL_METHOD(RegexIterator, getPregFlags) +PHP_METHOD(RegexIterator, getPregFlags) { spl_dual_it_object *intern; @@ -2106,7 +2056,7 @@ SPL_METHOD(RegexIterator, getPregFlags) /* {{{ proto bool RegexIterator::setPregFlags(int new_flags) Set PREG flags */ -SPL_METHOD(RegexIterator, setPregFlags) +PHP_METHOD(RegexIterator, setPregFlags) { spl_dual_it_object *intern; zend_long preg_flags; @@ -2123,14 +2073,14 @@ SPL_METHOD(RegexIterator, setPregFlags) /* {{{ proto RecursiveRegexIterator::__construct(RecursiveIterator it, string regex [, int mode [, int flags [, int preg_flags]]]) Create an RecursiveRegexIterator from another recursive iterator and a regular expression */ -SPL_METHOD(RecursiveRegexIterator, __construct) +PHP_METHOD(RecursiveRegexIterator, __construct) { spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_RecursiveRegexIterator, spl_ce_RecursiveIterator, DIT_RecursiveRegexIterator); } /* }}} */ /* {{{ proto RecursiveRegexIterator RecursiveRegexIterator::getChildren() Return the inner iterator's children contained in a RecursiveRegexIterator */ -SPL_METHOD(RecursiveRegexIterator, getChildren) +PHP_METHOD(RecursiveRegexIterator, getChildren) { spl_dual_it_object *intern; zval retval; @@ -2159,7 +2109,7 @@ SPL_METHOD(RecursiveRegexIterator, getChildren) zval_ptr_dtor(&retval); } /* }}} */ -SPL_METHOD(RecursiveRegexIterator, accept) +PHP_METHOD(RecursiveRegexIterator, accept) { spl_dual_it_object *intern; @@ -2256,65 +2206,6 @@ static zend_object *spl_dual_it_new(zend_class_entry *class_type) } /* }}} */ -static const zend_function_entry spl_funcs_FilterIterator[] = { - SPL_ME(FilterIterator, __construct, arginfo_class_FilterIterator___construct, ZEND_ACC_PUBLIC) - SPL_ME(FilterIterator, rewind, arginfo_class_FilterIterator_rewind, ZEND_ACC_PUBLIC) - SPL_ME(dual_it, valid, arginfo_class_FilterIterator_valid, ZEND_ACC_PUBLIC) - SPL_ME(dual_it, key, arginfo_class_FilterIterator_key, ZEND_ACC_PUBLIC) - SPL_ME(dual_it, current, arginfo_class_FilterIterator_current, ZEND_ACC_PUBLIC) - SPL_ME(FilterIterator, next, arginfo_class_FilterIterator_next, ZEND_ACC_PUBLIC) - SPL_ME(dual_it, getInnerIterator, arginfo_class_FilterIterator_getInnerIterator, ZEND_ACC_PUBLIC) - SPL_ABSTRACT_ME(FilterIterator, accept, arginfo_class_FilterIterator_accept) - PHP_FE_END -}; - -static const zend_function_entry spl_funcs_CallbackFilterIterator[] = { - SPL_ME(CallbackFilterIterator, __construct, arginfo_class_CallbackFilterIterator___construct, ZEND_ACC_PUBLIC) - SPL_ME(CallbackFilterIterator, accept, arginfo_class_CallbackFilterIterator_accept, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - -static const zend_function_entry spl_funcs_RecursiveCallbackFilterIterator[] = { - SPL_ME(RecursiveCallbackFilterIterator, __construct, arginfo_class_RecursiveCallbackFilterIterator___construct, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveFilterIterator, hasChildren, arginfo_class_RecursiveCallbackFilterIterator_hasChildren, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveCallbackFilterIterator, getChildren, arginfo_class_RecursiveCallbackFilterIterator_getChildren, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - -static const zend_function_entry spl_funcs_RecursiveFilterIterator[] = { - SPL_ME(RecursiveFilterIterator, __construct, arginfo_class_RecursiveFilterIterator___construct, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveFilterIterator, hasChildren, arginfo_class_RecursiveFilterIterator_hasChildren, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveFilterIterator, getChildren, arginfo_class_RecursiveFilterIterator_getChildren, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - -static const zend_function_entry spl_funcs_ParentIterator[] = { - SPL_ME(ParentIterator, __construct, arginfo_class_ParentIterator___construct, ZEND_ACC_PUBLIC) - SPL_MA(ParentIterator, accept, RecursiveFilterIterator, hasChildren, arginfo_class_ParentIterator_accept, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - -static const zend_function_entry spl_funcs_RegexIterator[] = { - SPL_ME(RegexIterator, __construct, arginfo_class_RegexIterator___construct, ZEND_ACC_PUBLIC) - SPL_ME(RegexIterator, accept, arginfo_class_RegexIterator_accept, ZEND_ACC_PUBLIC) - SPL_ME(RegexIterator, getMode, arginfo_class_RegexIterator_getMode, ZEND_ACC_PUBLIC) - SPL_ME(RegexIterator, setMode, arginfo_class_RegexIterator_setMode, ZEND_ACC_PUBLIC) - SPL_ME(RegexIterator, getFlags, arginfo_class_RegexIterator_getFlags, ZEND_ACC_PUBLIC) - SPL_ME(RegexIterator, setFlags, arginfo_class_RegexIterator_setFlags, ZEND_ACC_PUBLIC) - SPL_ME(RegexIterator, getPregFlags, arginfo_class_RegexIterator_getPregFlags, ZEND_ACC_PUBLIC) - SPL_ME(RegexIterator, setPregFlags, arginfo_class_RegexIterator_setPregFlags, ZEND_ACC_PUBLIC) - SPL_ME(RegexIterator, getRegex, arginfo_class_RegexIterator_getRegex, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - -static const zend_function_entry spl_funcs_RecursiveRegexIterator[] = { - SPL_ME(RecursiveRegexIterator, __construct, arginfo_class_RecursiveRegexIterator___construct, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveRegexIterator, accept, arginfo_class_RecursiveRegexIterator_accept, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveFilterIterator, hasChildren, arginfo_class_RecursiveRegexIterator_hasChildren, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveRegexIterator, getChildren, arginfo_class_RecursiveRegexIterator_getChildren, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - static inline int spl_limit_it_valid(spl_dual_it_object *intern) { /* FAILURE / SUCCESS */ @@ -2365,14 +2256,14 @@ static inline void spl_limit_it_seek(spl_dual_it_object *intern, zend_long pos) /* {{{ proto LimitIterator::__construct(Iterator it [, int offset, int count]) Construct a LimitIterator from an Iterator with a given starting offset and optionally a maximum count */ -SPL_METHOD(LimitIterator, __construct) +PHP_METHOD(LimitIterator, __construct) { spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_LimitIterator, zend_ce_iterator, DIT_LimitIterator); } /* }}} */ /* {{{ proto void LimitIterator::rewind() Rewind the iterator to the specified starting offset */ -SPL_METHOD(LimitIterator, rewind) +PHP_METHOD(LimitIterator, rewind) { spl_dual_it_object *intern; @@ -2387,7 +2278,7 @@ SPL_METHOD(LimitIterator, rewind) /* {{{ proto bool LimitIterator::valid() Check whether the current element is valid */ -SPL_METHOD(LimitIterator, valid) +PHP_METHOD(LimitIterator, valid) { spl_dual_it_object *intern; @@ -2403,7 +2294,7 @@ SPL_METHOD(LimitIterator, valid) /* {{{ proto void LimitIterator::next() Move the iterator forward */ -SPL_METHOD(LimitIterator, next) +PHP_METHOD(LimitIterator, next) { spl_dual_it_object *intern; @@ -2421,7 +2312,7 @@ SPL_METHOD(LimitIterator, next) /* {{{ proto void LimitIterator::seek(int position) Seek to the given position */ -SPL_METHOD(LimitIterator, seek) +PHP_METHOD(LimitIterator, seek) { spl_dual_it_object *intern; zend_long pos; @@ -2437,7 +2328,7 @@ SPL_METHOD(LimitIterator, seek) /* {{{ proto int LimitIterator::getPosition() Return the current position */ -SPL_METHOD(LimitIterator, getPosition) +PHP_METHOD(LimitIterator, getPosition) { spl_dual_it_object *intern; @@ -2449,24 +2340,6 @@ SPL_METHOD(LimitIterator, getPosition) RETURN_LONG(intern->current.pos); } /* }}} */ -static const zend_function_entry spl_funcs_SeekableIterator[] = { - SPL_ABSTRACT_ME(SeekableIterator, seek, arginfo_class_SeekableIterator_seek) - PHP_FE_END -}; - -static const zend_function_entry spl_funcs_LimitIterator[] = { - SPL_ME(LimitIterator, __construct, arginfo_class_LimitIterator___construct, ZEND_ACC_PUBLIC) - SPL_ME(LimitIterator, rewind, arginfo_class_LimitIterator_rewind, ZEND_ACC_PUBLIC) - SPL_ME(LimitIterator, valid, arginfo_class_LimitIterator_valid, ZEND_ACC_PUBLIC) - SPL_ME(dual_it, key, arginfo_class_LimitIterator_key, ZEND_ACC_PUBLIC) - SPL_ME(dual_it, current, arginfo_class_LimitIterator_current, ZEND_ACC_PUBLIC) - SPL_ME(LimitIterator, next, arginfo_class_LimitIterator_next, ZEND_ACC_PUBLIC) - SPL_ME(LimitIterator, seek, arginfo_class_LimitIterator_seek, ZEND_ACC_PUBLIC) - SPL_ME(LimitIterator, getPosition, arginfo_class_LimitIterator_getPosition, ZEND_ACC_PUBLIC) - SPL_ME(dual_it, getInnerIterator, arginfo_class_LimitIterator_getInnerIterator, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - static inline int spl_caching_it_valid(spl_dual_it_object *intern) { return intern->u.caching.flags & CIT_VALID ? SUCCESS : FAILURE; @@ -2559,14 +2432,14 @@ static inline void spl_caching_it_rewind(spl_dual_it_object *intern) /* {{{ proto CachingIterator::__construct(Iterator it [, flags = CIT_CALL_TOSTRING]) Construct a CachingIterator from an Iterator */ -SPL_METHOD(CachingIterator, __construct) +PHP_METHOD(CachingIterator, __construct) { spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_CachingIterator, zend_ce_iterator, DIT_CachingIterator); } /* }}} */ /* {{{ proto void CachingIterator::rewind() Rewind the iterator */ -SPL_METHOD(CachingIterator, rewind) +PHP_METHOD(CachingIterator, rewind) { spl_dual_it_object *intern; @@ -2581,7 +2454,7 @@ SPL_METHOD(CachingIterator, rewind) /* {{{ proto bool CachingIterator::valid() Check whether the current element is valid */ -SPL_METHOD(CachingIterator, valid) +PHP_METHOD(CachingIterator, valid) { spl_dual_it_object *intern; @@ -2596,7 +2469,7 @@ SPL_METHOD(CachingIterator, valid) /* {{{ proto void CachingIterator::next() Move the iterator forward */ -SPL_METHOD(CachingIterator, next) +PHP_METHOD(CachingIterator, next) { spl_dual_it_object *intern; @@ -2611,7 +2484,7 @@ SPL_METHOD(CachingIterator, next) /* {{{ proto bool CachingIterator::hasNext() Check whether the inner iterator has a valid next element */ -SPL_METHOD(CachingIterator, hasNext) +PHP_METHOD(CachingIterator, hasNext) { spl_dual_it_object *intern; @@ -2626,7 +2499,7 @@ SPL_METHOD(CachingIterator, hasNext) /* {{{ proto string CachingIterator::__toString() Return the string representation of the current element */ -SPL_METHOD(CachingIterator, __toString) +PHP_METHOD(CachingIterator, __toString) { spl_dual_it_object *intern; @@ -2659,7 +2532,7 @@ SPL_METHOD(CachingIterator, __toString) /* {{{ proto void CachingIterator::offsetSet(mixed index, mixed newval) Set given index in cache */ -SPL_METHOD(CachingIterator, offsetSet) +PHP_METHOD(CachingIterator, offsetSet) { spl_dual_it_object *intern; zend_string *key; @@ -2683,7 +2556,7 @@ SPL_METHOD(CachingIterator, offsetSet) /* {{{ proto string CachingIterator::offsetGet(mixed index) Return the internal cache if used */ -SPL_METHOD(CachingIterator, offsetGet) +PHP_METHOD(CachingIterator, offsetGet) { spl_dual_it_object *intern; zend_string *key; @@ -2711,7 +2584,7 @@ SPL_METHOD(CachingIterator, offsetGet) /* {{{ proto void CachingIterator::offsetUnset(mixed index) Unset given index in cache */ -SPL_METHOD(CachingIterator, offsetUnset) +PHP_METHOD(CachingIterator, offsetUnset) { spl_dual_it_object *intern; zend_string *key; @@ -2733,7 +2606,7 @@ SPL_METHOD(CachingIterator, offsetUnset) /* {{{ proto bool CachingIterator::offsetExists(mixed index) Return whether the requested index exists */ -SPL_METHOD(CachingIterator, offsetExists) +PHP_METHOD(CachingIterator, offsetExists) { spl_dual_it_object *intern; zend_string *key; @@ -2755,7 +2628,7 @@ SPL_METHOD(CachingIterator, offsetExists) /* {{{ proto array CachingIterator::getCache() Return the cache */ -SPL_METHOD(CachingIterator, getCache) +PHP_METHOD(CachingIterator, getCache) { spl_dual_it_object *intern; @@ -2776,7 +2649,7 @@ SPL_METHOD(CachingIterator, getCache) /* {{{ proto int CachingIterator::getFlags() Return the internal flags */ -SPL_METHOD(CachingIterator, getFlags) +PHP_METHOD(CachingIterator, getFlags) { spl_dual_it_object *intern; @@ -2792,7 +2665,7 @@ SPL_METHOD(CachingIterator, getFlags) /* {{{ proto void CachingIterator::setFlags(int flags) Set the internal flags */ -SPL_METHOD(CachingIterator, setFlags) +PHP_METHOD(CachingIterator, setFlags) { spl_dual_it_object *intern; zend_long flags; @@ -2825,7 +2698,7 @@ SPL_METHOD(CachingIterator, setFlags) /* {{{ proto void CachingIterator::count() Number of cached elements */ -SPL_METHOD(CachingIterator, count) +PHP_METHOD(CachingIterator, count) { spl_dual_it_object *intern; @@ -2844,37 +2717,16 @@ SPL_METHOD(CachingIterator, count) } /* }}} */ -static const zend_function_entry spl_funcs_CachingIterator[] = { - SPL_ME(CachingIterator, __construct, arginfo_class_CachingIterator___construct, ZEND_ACC_PUBLIC) - SPL_ME(CachingIterator, rewind, arginfo_class_CachingIterator_rewind, ZEND_ACC_PUBLIC) - SPL_ME(CachingIterator, valid, arginfo_class_CachingIterator_valid, ZEND_ACC_PUBLIC) - SPL_ME(dual_it, key, arginfo_class_CachingIterator_key, ZEND_ACC_PUBLIC) - SPL_ME(dual_it, current, arginfo_class_CachingIterator_current, ZEND_ACC_PUBLIC) - SPL_ME(CachingIterator, next, arginfo_class_CachingIterator_next, ZEND_ACC_PUBLIC) - SPL_ME(CachingIterator, hasNext, arginfo_class_CachingIterator_hasNext, ZEND_ACC_PUBLIC) - SPL_ME(CachingIterator, __toString, arginfo_class_CachingIterator___toString, ZEND_ACC_PUBLIC) - SPL_ME(dual_it, getInnerIterator, arginfo_class_CachingIterator_getInnerIterator, ZEND_ACC_PUBLIC) - SPL_ME(CachingIterator, getFlags, arginfo_class_CachingIterator_getFlags, ZEND_ACC_PUBLIC) - SPL_ME(CachingIterator, setFlags, arginfo_class_CachingIterator_setFlags, ZEND_ACC_PUBLIC) - SPL_ME(CachingIterator, offsetGet, arginfo_class_CachingIterator_offsetGet, ZEND_ACC_PUBLIC) - SPL_ME(CachingIterator, offsetSet, arginfo_class_CachingIterator_offsetSet, ZEND_ACC_PUBLIC) - SPL_ME(CachingIterator, offsetUnset, arginfo_class_CachingIterator_offsetUnset, ZEND_ACC_PUBLIC) - SPL_ME(CachingIterator, offsetExists, arginfo_class_CachingIterator_offsetExists, ZEND_ACC_PUBLIC) - SPL_ME(CachingIterator, getCache, arginfo_class_CachingIterator_getCache, ZEND_ACC_PUBLIC) - SPL_ME(CachingIterator, count, arginfo_class_CachingIterator_count, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - /* {{{ proto RecursiveCachingIterator::__construct(RecursiveIterator it [, flags = CIT_CALL_TOSTRING]) Create an iterator from a RecursiveIterator */ -SPL_METHOD(RecursiveCachingIterator, __construct) +PHP_METHOD(RecursiveCachingIterator, __construct) { spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_RecursiveCachingIterator, spl_ce_RecursiveIterator, DIT_RecursiveCachingIterator); } /* }}} */ /* {{{ proto bool RecursiveCachingIterator::hasChildren() Check whether the current element of the inner iterator has children */ -SPL_METHOD(RecursiveCachingIterator, hasChildren) +PHP_METHOD(RecursiveCachingIterator, hasChildren) { spl_dual_it_object *intern; @@ -2889,7 +2741,7 @@ SPL_METHOD(RecursiveCachingIterator, hasChildren) /* {{{ proto RecursiveCachingIterator RecursiveCachingIterator::getChildren() Return the inner iterator's children as a RecursiveCachingIterator */ -SPL_METHOD(RecursiveCachingIterator, getChildren) +PHP_METHOD(RecursiveCachingIterator, getChildren) { spl_dual_it_object *intern; @@ -2908,41 +2760,23 @@ SPL_METHOD(RecursiveCachingIterator, getChildren) } } /* }}} */ -static const zend_function_entry spl_funcs_RecursiveCachingIterator[] = { - SPL_ME(RecursiveCachingIterator, __construct, arginfo_class_RecursiveCachingIterator___construct, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveCachingIterator, hasChildren, arginfo_class_RecursiveCachingIterator_hasChildren, ZEND_ACC_PUBLIC) - SPL_ME(RecursiveCachingIterator, getChildren, arginfo_class_RecursiveCachingIterator_getChildren, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - /* {{{ proto IteratorIterator::__construct(Traversable it) Create an iterator from anything that is traversable */ -SPL_METHOD(IteratorIterator, __construct) +PHP_METHOD(IteratorIterator, __construct) { spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_IteratorIterator, zend_ce_traversable, DIT_IteratorIterator); } /* }}} */ -static const zend_function_entry spl_funcs_IteratorIterator[] = { - SPL_ME(IteratorIterator, __construct, arginfo_class_IteratorIterator___construct, ZEND_ACC_PUBLIC) - SPL_ME(dual_it, rewind, arginfo_class_IteratorIterator_rewind, ZEND_ACC_PUBLIC) - SPL_ME(dual_it, valid, arginfo_class_IteratorIterator_valid, ZEND_ACC_PUBLIC) - SPL_ME(dual_it, key, arginfo_class_IteratorIterator_key, ZEND_ACC_PUBLIC) - SPL_ME(dual_it, current, arginfo_class_IteratorIterator_current, ZEND_ACC_PUBLIC) - SPL_ME(dual_it, next, arginfo_class_IteratorIterator_next, ZEND_ACC_PUBLIC) - SPL_ME(dual_it, getInnerIterator, arginfo_class_IteratorIterator_getInnerIterator, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - /* {{{ proto NoRewindIterator::__construct(Iterator it) Create an iterator from another iterator */ -SPL_METHOD(NoRewindIterator, __construct) +PHP_METHOD(NoRewindIterator, __construct) { spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_NoRewindIterator, zend_ce_iterator, DIT_NoRewindIterator); } /* }}} */ /* {{{ proto void NoRewindIterator::rewind() Prevent a call to inner iterators rewind() */ -SPL_METHOD(NoRewindIterator, rewind) +PHP_METHOD(NoRewindIterator, rewind) { if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); @@ -2952,7 +2786,7 @@ SPL_METHOD(NoRewindIterator, rewind) /* {{{ proto bool NoRewindIterator::valid() Return inner iterators valid() */ -SPL_METHOD(NoRewindIterator, valid) +PHP_METHOD(NoRewindIterator, valid) { spl_dual_it_object *intern; @@ -2966,7 +2800,7 @@ SPL_METHOD(NoRewindIterator, valid) /* {{{ proto mixed NoRewindIterator::key() Return inner iterators key() */ -SPL_METHOD(NoRewindIterator, key) +PHP_METHOD(NoRewindIterator, key) { spl_dual_it_object *intern; @@ -2985,7 +2819,7 @@ SPL_METHOD(NoRewindIterator, key) /* {{{ proto mixed NoRewindIterator::current() Return inner iterators current() */ -SPL_METHOD(NoRewindIterator, current) +PHP_METHOD(NoRewindIterator, current) { spl_dual_it_object *intern; zval *data; @@ -3003,7 +2837,7 @@ SPL_METHOD(NoRewindIterator, current) /* {{{ proto void NoRewindIterator::next() Return inner iterators next() */ -SPL_METHOD(NoRewindIterator, next) +PHP_METHOD(NoRewindIterator, next) { spl_dual_it_object *intern; @@ -3015,27 +2849,16 @@ SPL_METHOD(NoRewindIterator, next) intern->inner.iterator->funcs->move_forward(intern->inner.iterator); } /* }}} */ -static const zend_function_entry spl_funcs_NoRewindIterator[] = { - SPL_ME(NoRewindIterator, __construct, arginfo_class_NoRewindIterator___construct, ZEND_ACC_PUBLIC) - SPL_ME(NoRewindIterator, rewind, arginfo_class_NoRewindIterator_rewind, ZEND_ACC_PUBLIC) - SPL_ME(NoRewindIterator, valid, arginfo_class_NoRewindIterator_valid, ZEND_ACC_PUBLIC) - SPL_ME(NoRewindIterator, key, arginfo_class_NoRewindIterator_key, ZEND_ACC_PUBLIC) - SPL_ME(NoRewindIterator, current, arginfo_class_NoRewindIterator_current, ZEND_ACC_PUBLIC) - SPL_ME(NoRewindIterator, next, arginfo_class_NoRewindIterator_next, ZEND_ACC_PUBLIC) - SPL_ME(dual_it, getInnerIterator, arginfo_class_NoRewindIterator_getInnerIterator, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - /* {{{ proto InfiniteIterator::__construct(Iterator it) Create an iterator from another iterator */ -SPL_METHOD(InfiniteIterator, __construct) +PHP_METHOD(InfiniteIterator, __construct) { spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_InfiniteIterator, zend_ce_iterator, DIT_InfiniteIterator); } /* }}} */ /* {{{ proto void InfiniteIterator::next() Prevent a call to inner iterators rewind() (internally the current data will be fetched if valid()) */ -SPL_METHOD(InfiniteIterator, next) +PHP_METHOD(InfiniteIterator, next) { spl_dual_it_object *intern; @@ -3056,15 +2879,9 @@ SPL_METHOD(InfiniteIterator, next) } } /* }}} */ -static const zend_function_entry spl_funcs_InfiniteIterator[] = { - SPL_ME(InfiniteIterator, __construct, arginfo_class_InfiniteIterator___construct, ZEND_ACC_PUBLIC) - SPL_ME(InfiniteIterator, next, arginfo_class_InfiniteIterator_next, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - /* {{{ proto void EmptyIterator::rewind() Does nothing */ -SPL_METHOD(EmptyIterator, rewind) +PHP_METHOD(EmptyIterator, rewind) { if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); @@ -3073,7 +2890,7 @@ SPL_METHOD(EmptyIterator, rewind) /* {{{ proto false EmptyIterator::valid() Return false */ -SPL_METHOD(EmptyIterator, valid) +PHP_METHOD(EmptyIterator, valid) { if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); @@ -3084,7 +2901,7 @@ SPL_METHOD(EmptyIterator, valid) /* {{{ proto void EmptyIterator::key() Throws exception BadMethodCallException */ -SPL_METHOD(EmptyIterator, key) +PHP_METHOD(EmptyIterator, key) { if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); @@ -3095,7 +2912,7 @@ SPL_METHOD(EmptyIterator, key) /* {{{ proto void EmptyIterator::current() Throws exception BadMethodCallException */ -SPL_METHOD(EmptyIterator, current) +PHP_METHOD(EmptyIterator, current) { if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); @@ -3106,22 +2923,13 @@ SPL_METHOD(EmptyIterator, current) /* {{{ proto void EmptyIterator::next() Does nothing */ -SPL_METHOD(EmptyIterator, next) +PHP_METHOD(EmptyIterator, next) { if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } } /* }}} */ -static const zend_function_entry spl_funcs_EmptyIterator[] = { - SPL_ME(EmptyIterator, rewind, arginfo_class_EmptyIterator_rewind, ZEND_ACC_PUBLIC) - SPL_ME(EmptyIterator, valid, arginfo_class_EmptyIterator_valid, ZEND_ACC_PUBLIC) - SPL_ME(EmptyIterator, key, arginfo_class_EmptyIterator_key, ZEND_ACC_PUBLIC) - SPL_ME(EmptyIterator, current, arginfo_class_EmptyIterator_current, ZEND_ACC_PUBLIC) - SPL_ME(EmptyIterator, next, arginfo_class_EmptyIterator_next, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - int spl_append_it_next_iterator(spl_dual_it_object *intern) /* {{{*/ { spl_dual_it_free(intern); @@ -3170,14 +2978,14 @@ void spl_append_it_next(spl_dual_it_object *intern) /* {{{ */ /* {{{ proto AppendIterator::__construct() Create an AppendIterator */ -SPL_METHOD(AppendIterator, __construct) +PHP_METHOD(AppendIterator, __construct) { spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_AppendIterator, zend_ce_iterator, DIT_AppendIterator); } /* }}} */ /* {{{ proto void AppendIterator::append(Iterator it) Append an iterator */ -SPL_METHOD(AppendIterator, append) +PHP_METHOD(AppendIterator, append) { spl_dual_it_object *intern; zval *it; @@ -3208,7 +3016,7 @@ SPL_METHOD(AppendIterator, append) /* {{{ proto mixed AppendIterator::current() Get the current element value */ -SPL_METHOD(AppendIterator, current) +PHP_METHOD(AppendIterator, current) { spl_dual_it_object *intern; @@ -3230,7 +3038,7 @@ SPL_METHOD(AppendIterator, current) /* {{{ proto void AppendIterator::rewind() Rewind to the first iterator and rewind the first iterator, too */ -SPL_METHOD(AppendIterator, rewind) +PHP_METHOD(AppendIterator, rewind) { spl_dual_it_object *intern; @@ -3248,7 +3056,7 @@ SPL_METHOD(AppendIterator, rewind) /* {{{ proto bool AppendIterator::valid() Check if the current state is valid */ -SPL_METHOD(AppendIterator, valid) +PHP_METHOD(AppendIterator, valid) { spl_dual_it_object *intern; @@ -3263,7 +3071,7 @@ SPL_METHOD(AppendIterator, valid) /* {{{ proto void AppendIterator::next() Forward to next element */ -SPL_METHOD(AppendIterator, next) +PHP_METHOD(AppendIterator, next) { spl_dual_it_object *intern; @@ -3278,7 +3086,7 @@ SPL_METHOD(AppendIterator, next) /* {{{ proto int AppendIterator::getIteratorIndex() Get index of iterator */ -SPL_METHOD(AppendIterator, getIteratorIndex) +PHP_METHOD(AppendIterator, getIteratorIndex) { spl_dual_it_object *intern; @@ -3294,7 +3102,7 @@ SPL_METHOD(AppendIterator, getIteratorIndex) /* {{{ proto ArrayIterator AppendIterator::getArrayIterator() Get access to inner ArrayIterator */ -SPL_METHOD(AppendIterator, getArrayIterator) +PHP_METHOD(AppendIterator, getArrayIterator) { spl_dual_it_object *intern; zval *value; @@ -3309,20 +3117,6 @@ SPL_METHOD(AppendIterator, getArrayIterator) ZVAL_COPY_DEREF(return_value, value); } /* }}} */ -static const zend_function_entry spl_funcs_AppendIterator[] = { - SPL_ME(AppendIterator, __construct, arginfo_class_AppendIterator___construct, ZEND_ACC_PUBLIC) - SPL_ME(AppendIterator, append, arginfo_class_AppendIterator_append, ZEND_ACC_PUBLIC) - SPL_ME(AppendIterator, rewind, arginfo_class_AppendIterator_rewind, ZEND_ACC_PUBLIC) - SPL_ME(AppendIterator, valid, arginfo_class_AppendIterator_valid, ZEND_ACC_PUBLIC) - SPL_ME(dual_it, key, arginfo_class_AppendIterator_key, ZEND_ACC_PUBLIC) - SPL_ME(AppendIterator, current, arginfo_class_AppendIterator_current, ZEND_ACC_PUBLIC) - SPL_ME(AppendIterator, next, arginfo_class_AppendIterator_next, ZEND_ACC_PUBLIC) - SPL_ME(dual_it, getInnerIterator, arginfo_class_AppendIterator_getInnerIterator, ZEND_ACC_PUBLIC) - SPL_ME(AppendIterator, getIteratorIndex, arginfo_class_AppendIterator_getIteratorIndex, ZEND_ACC_PUBLIC) - SPL_ME(AppendIterator, getArrayIterator, arginfo_class_AppendIterator_getArrayIterator, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - PHPAPI int spl_iterator_apply(zval *obj, spl_iterator_apply_func_t apply_func, void *puser) { zend_object_iterator *iter; @@ -3494,11 +3288,6 @@ PHP_FUNCTION(iterator_apply) } /* }}} */ -static const zend_function_entry spl_funcs_OuterIterator[] = { - SPL_ABSTRACT_ME(OuterIterator, getInnerIterator, arginfo_class_OuterIterator_getInnerIterator) - PHP_FE_END -}; - /* {{{ PHP_MINIT_FUNCTION(spl_iterators) */ PHP_MINIT_FUNCTION(spl_iterators) @@ -3506,7 +3295,7 @@ PHP_MINIT_FUNCTION(spl_iterators) REGISTER_SPL_INTERFACE(RecursiveIterator); REGISTER_SPL_ITERATOR(RecursiveIterator); - REGISTER_SPL_STD_CLASS_EX(RecursiveIteratorIterator, spl_RecursiveIteratorIterator_new, spl_funcs_RecursiveIteratorIterator); + REGISTER_SPL_STD_CLASS_EX(RecursiveIteratorIterator, spl_RecursiveIteratorIterator_new, class_RecursiveIteratorIterator_methods); REGISTER_SPL_ITERATOR(RecursiveIteratorIterator); memcpy(&spl_handlers_rec_it_it, &std_object_handlers, sizeof(zend_object_handlers)); @@ -3533,30 +3322,30 @@ PHP_MINIT_FUNCTION(spl_iterators) REGISTER_SPL_INTERFACE(OuterIterator); REGISTER_SPL_ITERATOR(OuterIterator); - REGISTER_SPL_STD_CLASS_EX(IteratorIterator, spl_dual_it_new, spl_funcs_IteratorIterator); + REGISTER_SPL_STD_CLASS_EX(IteratorIterator, spl_dual_it_new, class_IteratorIterator_methods); REGISTER_SPL_ITERATOR(IteratorIterator); REGISTER_SPL_IMPLEMENTS(IteratorIterator, OuterIterator); - REGISTER_SPL_SUB_CLASS_EX(FilterIterator, IteratorIterator, spl_dual_it_new, spl_funcs_FilterIterator); + REGISTER_SPL_SUB_CLASS_EX(FilterIterator, IteratorIterator, spl_dual_it_new, class_FilterIterator_methods); spl_ce_FilterIterator->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; - REGISTER_SPL_SUB_CLASS_EX(RecursiveFilterIterator, FilterIterator, spl_dual_it_new, spl_funcs_RecursiveFilterIterator); + REGISTER_SPL_SUB_CLASS_EX(RecursiveFilterIterator, FilterIterator, spl_dual_it_new, class_RecursiveFilterIterator_methods); REGISTER_SPL_IMPLEMENTS(RecursiveFilterIterator, RecursiveIterator); - REGISTER_SPL_SUB_CLASS_EX(CallbackFilterIterator, FilterIterator, spl_dual_it_new, spl_funcs_CallbackFilterIterator); + REGISTER_SPL_SUB_CLASS_EX(CallbackFilterIterator, FilterIterator, spl_dual_it_new, class_CallbackFilterIterator_methods); - REGISTER_SPL_SUB_CLASS_EX(RecursiveCallbackFilterIterator, CallbackFilterIterator, spl_dual_it_new, spl_funcs_RecursiveCallbackFilterIterator); + REGISTER_SPL_SUB_CLASS_EX(RecursiveCallbackFilterIterator, CallbackFilterIterator, spl_dual_it_new, class_RecursiveCallbackFilterIterator_methods); REGISTER_SPL_IMPLEMENTS(RecursiveCallbackFilterIterator, RecursiveIterator); - REGISTER_SPL_SUB_CLASS_EX(ParentIterator, RecursiveFilterIterator, spl_dual_it_new, spl_funcs_ParentIterator); + REGISTER_SPL_SUB_CLASS_EX(ParentIterator, RecursiveFilterIterator, spl_dual_it_new, class_ParentIterator_methods); REGISTER_SPL_INTERFACE(SeekableIterator); REGISTER_SPL_ITERATOR(SeekableIterator); - REGISTER_SPL_SUB_CLASS_EX(LimitIterator, IteratorIterator, spl_dual_it_new, spl_funcs_LimitIterator); + REGISTER_SPL_SUB_CLASS_EX(LimitIterator, IteratorIterator, spl_dual_it_new, class_LimitIterator_methods); - REGISTER_SPL_SUB_CLASS_EX(CachingIterator, IteratorIterator, spl_dual_it_new, spl_funcs_CachingIterator); + REGISTER_SPL_SUB_CLASS_EX(CachingIterator, IteratorIterator, spl_dual_it_new, class_CachingIterator_methods); REGISTER_SPL_IMPLEMENTS(CachingIterator, ArrayAccess); REGISTER_SPL_IMPLEMENTS(CachingIterator, Countable); REGISTER_SPL_IMPLEMENTS(CachingIterator, Stringable); @@ -3568,17 +3357,17 @@ PHP_MINIT_FUNCTION(spl_iterators) REGISTER_SPL_CLASS_CONST_LONG(CachingIterator, "TOSTRING_USE_INNER", CIT_TOSTRING_USE_INNER); REGISTER_SPL_CLASS_CONST_LONG(CachingIterator, "FULL_CACHE", CIT_FULL_CACHE); - REGISTER_SPL_SUB_CLASS_EX(RecursiveCachingIterator, CachingIterator, spl_dual_it_new, spl_funcs_RecursiveCachingIterator); + REGISTER_SPL_SUB_CLASS_EX(RecursiveCachingIterator, CachingIterator, spl_dual_it_new, class_RecursiveCachingIterator_methods); REGISTER_SPL_IMPLEMENTS(RecursiveCachingIterator, RecursiveIterator); - REGISTER_SPL_SUB_CLASS_EX(NoRewindIterator, IteratorIterator, spl_dual_it_new, spl_funcs_NoRewindIterator); + REGISTER_SPL_SUB_CLASS_EX(NoRewindIterator, IteratorIterator, spl_dual_it_new, class_NoRewindIterator_methods); - REGISTER_SPL_SUB_CLASS_EX(AppendIterator, IteratorIterator, spl_dual_it_new, spl_funcs_AppendIterator); + REGISTER_SPL_SUB_CLASS_EX(AppendIterator, IteratorIterator, spl_dual_it_new, class_AppendIterator_methods); REGISTER_SPL_IMPLEMENTS(RecursiveIteratorIterator, OuterIterator); - REGISTER_SPL_SUB_CLASS_EX(InfiniteIterator, IteratorIterator, spl_dual_it_new, spl_funcs_InfiniteIterator); - REGISTER_SPL_SUB_CLASS_EX(RegexIterator, FilterIterator, spl_dual_it_new, spl_funcs_RegexIterator); + REGISTER_SPL_SUB_CLASS_EX(InfiniteIterator, IteratorIterator, spl_dual_it_new, class_InfiniteIterator_methods); + REGISTER_SPL_SUB_CLASS_EX(RegexIterator, FilterIterator, spl_dual_it_new, class_RegexIterator_methods); REGISTER_SPL_CLASS_CONST_LONG(RegexIterator, "USE_KEY", REGIT_USE_KEY); REGISTER_SPL_CLASS_CONST_LONG(RegexIterator, "INVERT_MATCH",REGIT_INVERTED); REGISTER_SPL_CLASS_CONST_LONG(RegexIterator, "MATCH", REGIT_MODE_MATCH); @@ -3587,13 +3376,13 @@ PHP_MINIT_FUNCTION(spl_iterators) REGISTER_SPL_CLASS_CONST_LONG(RegexIterator, "SPLIT", REGIT_MODE_SPLIT); REGISTER_SPL_CLASS_CONST_LONG(RegexIterator, "REPLACE", REGIT_MODE_REPLACE); REGISTER_SPL_PROPERTY(RegexIterator, "replacement", 0); - REGISTER_SPL_SUB_CLASS_EX(RecursiveRegexIterator, RegexIterator, spl_dual_it_new, spl_funcs_RecursiveRegexIterator); + REGISTER_SPL_SUB_CLASS_EX(RecursiveRegexIterator, RegexIterator, spl_dual_it_new, class_RecursiveRegexIterator_methods); REGISTER_SPL_IMPLEMENTS(RecursiveRegexIterator, RecursiveIterator); - REGISTER_SPL_STD_CLASS_EX(EmptyIterator, NULL, spl_funcs_EmptyIterator); + REGISTER_SPL_STD_CLASS_EX(EmptyIterator, NULL, class_EmptyIterator_methods); REGISTER_SPL_ITERATOR(EmptyIterator); - REGISTER_SPL_SUB_CLASS_EX(RecursiveTreeIterator, RecursiveIteratorIterator, spl_RecursiveTreeIterator_new, spl_funcs_RecursiveTreeIterator); + REGISTER_SPL_SUB_CLASS_EX(RecursiveTreeIterator, RecursiveIteratorIterator, spl_RecursiveTreeIterator_new, class_RecursiveTreeIterator_methods); REGISTER_SPL_CLASS_CONST_LONG(RecursiveTreeIterator, "BYPASS_CURRENT", RTIT_BYPASS_CURRENT); REGISTER_SPL_CLASS_CONST_LONG(RecursiveTreeIterator, "BYPASS_KEY", RTIT_BYPASS_KEY); REGISTER_SPL_CLASS_CONST_LONG(RecursiveTreeIterator, "PREFIX_LEFT", 0); diff --git a/ext/spl/spl_iterators.stub.php b/ext/spl/spl_iterators.stub.php index 7c407f2998347..fa97f45b62a3d 100644 --- a/ext/spl/spl_iterators.stub.php +++ b/ext/spl/spl_iterators.stub.php @@ -1,5 +1,7 @@ Date: Sun, 26 Apr 2020 00:15:52 +0200 Subject: [PATCH 261/338] Use the default type error message for Exception::__construct() Closes GH-5460 --- Zend/tests/exception_018.phpt | 2 +- Zend/tests/exception_019.phpt | 2 +- Zend/tests/exception_020.phpt | 2 +- Zend/tests/exception_021.phpt | 2 +- Zend/tests/exception_022.phpt | 2 +- Zend/zend_exceptions.c | 25 ++----------------------- 6 files changed, 7 insertions(+), 28 deletions(-) diff --git a/Zend/tests/exception_018.phpt b/Zend/tests/exception_018.phpt index aa39d53b676dc..6789cfe9813b1 100644 --- a/Zend/tests/exception_018.phpt +++ b/Zend/tests/exception_018.phpt @@ -8,7 +8,7 @@ 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 +Fatal error: Uncaught TypeError: Exception::__construct(): Argument #1 ($message) must be of type string, object given in %s:%d Stack trace: #0 %sexception_018.php(%d): Exception->__construct(Object(stdClass)) #1 {main} diff --git a/Zend/tests/exception_019.phpt b/Zend/tests/exception_019.phpt index 4ebb077fe682e..7aa20c2bc7639 100644 --- a/Zend/tests/exception_019.phpt +++ b/Zend/tests/exception_019.phpt @@ -7,7 +7,7 @@ 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 +Fatal error: Uncaught TypeError: Exception::__construct(): Argument #1 ($message) must be of type string, object given in %s:%d Stack trace: #0 %sexception_019.php(%d): Exception->__construct(Object(stdClass)) #1 {main} diff --git a/Zend/tests/exception_020.phpt b/Zend/tests/exception_020.phpt index 6f8981f5e66e5..3135ef3633409 100644 --- a/Zend/tests/exception_020.phpt +++ b/Zend/tests/exception_020.phpt @@ -8,7 +8,7 @@ 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 +Fatal error: Uncaught TypeError: ErrorException::__construct(): Argument #1 ($message) must be of type string, object given in %s:%d Stack trace: #0 %sexception_020.php(%d): ErrorException->__construct(Object(stdClass)) #1 {main} diff --git a/Zend/tests/exception_021.phpt b/Zend/tests/exception_021.phpt index 5955e7989b788..70ca3caa5734c 100644 --- a/Zend/tests/exception_021.phpt +++ b/Zend/tests/exception_021.phpt @@ -8,7 +8,7 @@ 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 +Fatal error: Uncaught TypeError: Error::__construct(): Argument #1 ($message) must be of type string, object given in %s:%d Stack trace: #0 %sexception_021.php(%d): Error->__construct(Object(stdClass)) #1 {main} diff --git a/Zend/tests/exception_022.phpt b/Zend/tests/exception_022.phpt index 83d47145c34fd..e9b9da87e99fa 100644 --- a/Zend/tests/exception_022.phpt +++ b/Zend/tests/exception_022.phpt @@ -7,7 +7,7 @@ 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 +Fatal error: Uncaught TypeError: Error::__construct(): Argument #1 ($message) must be of type string, object given in %s:%d Stack trace: #0 %sexception_022.php(%d): Error->__construct(Object(stdClass)) #1 {main} diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index fb48d34bdf61b..60893095aed1b 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -273,22 +273,11 @@ ZEND_METHOD(exception, __construct) zend_long code = 0; zval tmp, *object, *previous = NULL; zend_class_entry *base_ce; - int argc = ZEND_NUM_ARGS(); object = ZEND_THIS; base_ce = i_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 (Z_TYPE(EX(This)) == IS_OBJECT) { - ce = Z_OBJCE(EX(This)); - } else if (Z_CE(EX(This))) { - ce = Z_CE(EX(This)); - } else { - ce = base_ce; - } - zend_throw_error(NULL, "Wrong parameters for %s([string $message [, long $code [, Throwable $previous = NULL]]])", ZSTR_VAL(ce->name)); + if (zend_parse_parameters(ZEND_NUM_ARGS(), "|SlO!", &message, &code, &previous, zend_ce_throwable) == FAILURE) { RETURN_THROWS(); } @@ -344,17 +333,7 @@ ZEND_METHOD(error_exception, __construct) zval tmp, *object, *previous = NULL; int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|SllSlO!", &message, &code, &severity, &filename, &lineno, &previous, zend_ce_throwable) == FAILURE) { - zend_class_entry *ce; - - if (Z_TYPE(EX(This)) == IS_OBJECT) { - ce = Z_OBJCE(EX(This)); - } else if (Z_CE(EX(This))) { - ce = Z_CE(EX(This)); - } else { - ce = zend_ce_error_exception; - } - zend_throw_error(NULL, "Wrong parameters for %s([string $message [, long $code, [ long $severity, [ string $filename, [ long $lineno [, Throwable $previous = NULL]]]]]])", ZSTR_VAL(ce->name)); + if (zend_parse_parameters(argc, "|SllSlO!", &message, &code, &severity, &filename, &lineno, &previous, zend_ce_throwable) == FAILURE) { RETURN_THROWS(); } From 6f908a0bf4b51cfe3327e3eb245af8831c5cac4d Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Thu, 23 Apr 2020 20:17:55 +0200 Subject: [PATCH 262/338] Check Serialization magic methods structure Closes GH-5441 --- Zend/tests/magic_methods_serialize.phpt | 12 ++++++++++++ Zend/tests/magic_methods_unserialize.phpt | 12 ++++++++++++ Zend/zend_API.c | 12 ++++++++++++ Zend/zend_compile.c | 4 ++++ 4 files changed, 40 insertions(+) create mode 100644 Zend/tests/magic_methods_serialize.phpt create mode 100644 Zend/tests/magic_methods_unserialize.phpt diff --git a/Zend/tests/magic_methods_serialize.phpt b/Zend/tests/magic_methods_serialize.phpt new file mode 100644 index 0000000000000..978aff8b4f76c --- /dev/null +++ b/Zend/tests/magic_methods_serialize.phpt @@ -0,0 +1,12 @@ +--TEST-- +__serialize declaration +--FILE-- + +--EXPECTF-- +Warning: The magic method Foo::__serialize() must have public visibility and cannot be static in %s on line %d + +Fatal error: Method Foo::__serialize() cannot take arguments in %s on line %d diff --git a/Zend/tests/magic_methods_unserialize.phpt b/Zend/tests/magic_methods_unserialize.phpt new file mode 100644 index 0000000000000..dc6aa171a7b45 --- /dev/null +++ b/Zend/tests/magic_methods_unserialize.phpt @@ -0,0 +1,12 @@ +--TEST-- +__unserialize declaration +--FILE-- + +--EXPECTF-- +Warning: The magic method Foo::__unserialize() must have public visibility and cannot be static in %s on line %d + +Fatal error: Method Foo::__unserialize() must take exactly 1 argument in %s on line %d diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 7ec8806d18351..c144bf82feac6 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2023,6 +2023,18 @@ ZEND_API void zend_check_magic_method_implementation(const zend_class_entry *ce, } else if (name_len == sizeof(ZEND_DEBUGINFO_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_DEBUGINFO_FUNC_NAME, sizeof(ZEND_DEBUGINFO_FUNC_NAME)-1) && fptr->common.num_args != 0) { zend_error(error_type, "Method %s::__debugInfo() cannot take arguments", ZSTR_VAL(ce->name)); + } else if ( + name_len == sizeof("__serialize") - 1 + && !memcmp(lcname, "__serialize", sizeof("__serialize") - 1) + && fptr->common.num_args != 0 + ) { + zend_error(error_type, "Method %s::__serialize() cannot take arguments", ZSTR_VAL(ce->name)); + } else if ( + name_len == sizeof("__unserialize") - 1 + && !memcmp(lcname, "__unserialize", sizeof("__unserialize") - 1) + && fptr->common.num_args != 1 + ) { + zend_error(error_type, "Method %s::__unserialize() must take exactly 1 argument", ZSTR_VAL(ce->name)); } } /* }}} */ diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index d9566be14aa59..472a402fe6b72 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -6171,6 +6171,10 @@ void zend_begin_method_decl(zend_op_array *op_array, zend_string *name, zend_boo } else if (zend_string_equals_literal(lcname, ZEND_DEBUGINFO_FUNC_NAME)) { zend_check_magic_method_attr(fn_flags, ce, "__debugInfo", 0); ce->__debugInfo = (zend_function *) op_array; + } else if (zend_string_equals_literal(lcname, "__serialize")) { + zend_check_magic_method_attr(fn_flags, ce, "__serialize", 0); + } else if (zend_string_equals_literal(lcname, "__unserialize")) { + zend_check_magic_method_attr(fn_flags, ce, "__unserialize", 0); } zend_string_release_ex(lcname, 0); From d21d23afef54f152d9ca661909c6d042d6bfcf48 Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Thu, 23 Apr 2020 17:13:01 +0200 Subject: [PATCH 263/338] Clean section of test not working due to short open tags Closes GH-5440 --- ext/phar/tests/bug79082.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/phar/tests/bug79082.phpt b/ext/phar/tests/bug79082.phpt index ca453d1b57bcf..5dc861801a073 100644 --- a/ext/phar/tests/bug79082.phpt +++ b/ext/phar/tests/bug79082.phpt @@ -34,7 +34,7 @@ foreach([Phar::TAR => 'tar', Phar::ZIP => 'zip'] as $mode => $ext) { } ?> --CLEAN-- - Date: Sat, 25 Apr 2020 23:10:07 +0200 Subject: [PATCH 264/338] Generate method entries from stubs for Zend classes Closes GH-5459 --- Zend/zend_exceptions.c | 91 ++++++--------------- Zend/zend_exceptions.stub.php | 90 +++++++++++++++++---- Zend/zend_exceptions_arginfo.h | 144 ++++++++++++++++++++++++++++++--- Zend/zend_generators.c | 14 +--- Zend/zend_generators.stub.php | 2 + Zend/zend_generators_arginfo.h | 23 ++++++ Zend/zend_interfaces.c | 48 +---------- Zend/zend_interfaces.h | 2 +- Zend/zend_interfaces.stub.php | 2 + Zend/zend_interfaces_arginfo.h | 51 ++++++++++++ Zend/zend_weakrefs.c | 20 +---- Zend/zend_weakrefs.stub.php | 26 +++--- Zend/zend_weakrefs_arginfo.h | 28 +++++++ sapi/cli/tests/005.phpt | 8 +- 14 files changed, 368 insertions(+), 181 deletions(-) diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 60893095aed1b..4fc283755c99a 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -258,7 +258,7 @@ static zend_object *zend_error_exception_new(zend_class_entry *class_type) /* {{ /* {{{ proto Exception|Error Exception|Error::__clone() Clone the exception object */ -ZEND_COLD ZEND_METHOD(exception, __clone) +ZEND_COLD ZEND_METHOD(Exception, __clone) { /* Should never be executable */ zend_throw_exception(NULL, "Cannot clone object using __clone()", 0); @@ -267,7 +267,7 @@ ZEND_COLD ZEND_METHOD(exception, __clone) /* {{{ proto Exception|Error::__construct(string message, int code [, Throwable previous]) Exception constructor */ -ZEND_METHOD(exception, __construct) +ZEND_METHOD(Exception, __construct) { zend_string *message = NULL; zend_long code = 0; @@ -305,7 +305,7 @@ ZEND_METHOD(exception, __construct) zend_unset_property(i_get_exception_base(object), object, ZSTR_VAL(ZSTR_KNOWN(id)), ZSTR_LEN(ZSTR_KNOWN(id))); \ } -ZEND_METHOD(exception, __wakeup) +ZEND_METHOD(Exception, __wakeup) { zval value, *pvalue; zval *object = ZEND_THIS; @@ -326,7 +326,7 @@ ZEND_METHOD(exception, __wakeup) /* {{{ proto ErrorException::__construct(string message, int code, int severity [, string filename [, int lineno [, Throwable previous]]]) ErrorException constructor */ -ZEND_METHOD(error_exception, __construct) +ZEND_METHOD(ErrorException, __construct) { zend_string *message = NULL, *filename = NULL; zend_long code = 0, severity = E_ERROR, lineno; @@ -377,7 +377,7 @@ ZEND_METHOD(error_exception, __construct) /* {{{ proto string Exception|Error::getFile() Get the file in which the exception occurred */ -ZEND_METHOD(exception, getFile) +ZEND_METHOD(Exception, getFile) { zval *prop, rv; @@ -391,7 +391,7 @@ ZEND_METHOD(exception, getFile) /* {{{ proto int Exception|Error::getLine() Get the line in which the exception occurred */ -ZEND_METHOD(exception, getLine) +ZEND_METHOD(Exception, getLine) { zval *prop, rv; @@ -405,7 +405,7 @@ ZEND_METHOD(exception, getLine) /* {{{ proto string Exception|Error::getMessage() Get the exception message */ -ZEND_METHOD(exception, getMessage) +ZEND_METHOD(Exception, getMessage) { zval *prop, rv; @@ -419,7 +419,7 @@ ZEND_METHOD(exception, getMessage) /* {{{ proto int Exception|Error::getCode() Get the exception code */ -ZEND_METHOD(exception, getCode) +ZEND_METHOD(Exception, getCode) { zval *prop, rv; @@ -433,7 +433,7 @@ ZEND_METHOD(exception, getCode) /* {{{ proto array Exception|Error::getTrace() Get the stack trace for the location in which the exception occurred */ -ZEND_METHOD(exception, getTrace) +ZEND_METHOD(Exception, getTrace) { zval *prop, rv; @@ -447,7 +447,7 @@ ZEND_METHOD(exception, getTrace) /* {{{ proto int ErrorException::getSeverity() Get the exception severity */ -ZEND_METHOD(error_exception, getSeverity) +ZEND_METHOD(ErrorException, getSeverity) { zval *prop, rv; @@ -590,7 +590,7 @@ static void _build_trace_string(smart_str *str, HashTable *ht, uint32_t num) /* /* {{{ proto string Exception|Error::getTraceAsString() Obtain the backtrace for the exception as a string (instead of an array) */ -ZEND_METHOD(exception, getTraceAsString) +ZEND_METHOD(Exception, getTraceAsString) { zval *trace, *frame, rv; zend_ulong index; @@ -629,7 +629,7 @@ ZEND_METHOD(exception, getTraceAsString) /* {{{ proto Throwable Exception|Error::getPrevious() Return previous Throwable or NULL. */ -ZEND_METHOD(exception, getPrevious) +ZEND_METHOD(Exception, getPrevious) { zval rv; @@ -640,7 +640,7 @@ ZEND_METHOD(exception, getPrevious) /* {{{ proto string Exception|Error::__toString() Obtain the string representation of the Exception object */ -ZEND_METHOD(exception, __toString) +ZEND_METHOD(Exception, __toString) { zval trace, *exception; zend_class_entry *base_ce; @@ -733,51 +733,6 @@ ZEND_METHOD(exception, __toString) } /* }}} */ -/** {{{ Throwable method definition */ -static const zend_function_entry zend_funcs_throwable[] = { - ZEND_ABSTRACT_ME(throwable, getMessage, arginfo_class_Throwable_getMessage) - ZEND_ABSTRACT_ME(throwable, getCode, arginfo_class_Throwable_getCode) - ZEND_ABSTRACT_ME(throwable, getFile, arginfo_class_Throwable_getFile) - ZEND_ABSTRACT_ME(throwable, getLine, arginfo_class_Throwable_getLine) - ZEND_ABSTRACT_ME(throwable, getTrace, arginfo_class_Throwable_getTrace) - ZEND_ABSTRACT_ME(throwable, getPrevious, arginfo_class_Throwable_getPrevious) - ZEND_ABSTRACT_ME(throwable, getTraceAsString, arginfo_class_Throwable_getTraceAsString) - 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 - * such exceptions in that handler. - * Also all getXY() methods are final because thy serve as read only access to - * their corresponding properties, no more, no less. If after all you need to - * override something then it is method __toString(). - * And never try to change the state of exceptions and never implement anything - * that gives the user anything to accomplish this. - */ -static const zend_function_entry default_exception_functions[] = { - ZEND_ME(exception, __clone, arginfo_class_Exception___clone, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL) - ZEND_ME(exception, __construct, arginfo_class_Exception___construct, ZEND_ACC_PUBLIC) - ZEND_ME(exception, __wakeup, arginfo_class_Exception___wakeup, ZEND_ACC_PUBLIC) - ZEND_ME(exception, getMessage, arginfo_class_Exception_getMessage, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) - ZEND_ME(exception, getCode, arginfo_class_Exception_getCode, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) - ZEND_ME(exception, getFile, arginfo_class_Exception_getFile, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) - ZEND_ME(exception, getLine, arginfo_class_Exception_getLine, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) - ZEND_ME(exception, getTrace, arginfo_class_Exception_getTrace, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) - ZEND_ME(exception, getPrevious, arginfo_class_Exception_getPrevious, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) - ZEND_ME(exception, getTraceAsString, arginfo_class_Exception_getTraceAsString, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) - ZEND_ME(exception, __toString, arginfo_class_Exception___toString, 0) - ZEND_FE_END -}; - -static const zend_function_entry error_exception_functions[] = { - ZEND_ME(error_exception, __construct, arginfo_class_ErrorException___construct, ZEND_ACC_PUBLIC) - ZEND_ME(error_exception, getSeverity, arginfo_class_ErrorException_getSeverity, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) - ZEND_FE_END -}; -/* }}} */ - void zend_register_default_exception(void) /* {{{ */ { zend_class_entry ce; @@ -788,7 +743,7 @@ void zend_register_default_exception(void) /* {{{ */ memcpy(&default_exception_handlers, &std_object_handlers, sizeof(zend_object_handlers)); default_exception_handlers.clone_obj = NULL; - INIT_CLASS_ENTRY(ce, "Exception", default_exception_functions); + INIT_CLASS_ENTRY(ce, "Exception", class_Exception_methods); zend_ce_exception = zend_register_internal_class_ex(&ce, NULL); zend_ce_exception->create_object = zend_default_exception_new; zend_class_implements(zend_ce_exception, 1, zend_ce_throwable); @@ -801,12 +756,12 @@ void zend_register_default_exception(void) /* {{{ */ zend_declare_property_null(zend_ce_exception, "trace", sizeof("trace")-1, ZEND_ACC_PRIVATE); zend_declare_property_null(zend_ce_exception, "previous", sizeof("previous")-1, ZEND_ACC_PRIVATE); - INIT_CLASS_ENTRY(ce, "ErrorException", error_exception_functions); + INIT_CLASS_ENTRY(ce, "ErrorException", class_ErrorException_methods); zend_ce_error_exception = zend_register_internal_class_ex(&ce, zend_ce_exception); zend_ce_error_exception->create_object = zend_error_exception_new; zend_declare_property_long(zend_ce_error_exception, "severity", sizeof("severity")-1, E_ERROR, ZEND_ACC_PROTECTED); - INIT_CLASS_ENTRY(ce, "Error", default_exception_functions); + INIT_CLASS_ENTRY(ce, "Error", class_Error_methods); zend_ce_error = zend_register_internal_class_ex(&ce, NULL); zend_ce_error->create_object = zend_default_exception_new; zend_class_implements(zend_ce_error, 1, zend_ce_throwable); @@ -819,31 +774,31 @@ void zend_register_default_exception(void) /* {{{ */ zend_declare_property_null(zend_ce_error, "trace", sizeof("trace")-1, ZEND_ACC_PRIVATE); zend_declare_property_null(zend_ce_error, "previous", sizeof("previous")-1, ZEND_ACC_PRIVATE); - INIT_CLASS_ENTRY(ce, "CompileError", NULL); + INIT_CLASS_ENTRY(ce, "CompileError", class_CompileError_methods); zend_ce_compile_error = zend_register_internal_class_ex(&ce, zend_ce_error); zend_ce_compile_error->create_object = zend_default_exception_new; - INIT_CLASS_ENTRY(ce, "ParseError", NULL); + INIT_CLASS_ENTRY(ce, "ParseError", class_ParseError_methods); zend_ce_parse_error = zend_register_internal_class_ex(&ce, zend_ce_compile_error); zend_ce_parse_error->create_object = zend_default_exception_new; - INIT_CLASS_ENTRY(ce, "TypeError", NULL); + INIT_CLASS_ENTRY(ce, "TypeError", class_TypeError_methods); zend_ce_type_error = zend_register_internal_class_ex(&ce, zend_ce_error); zend_ce_type_error->create_object = zend_default_exception_new; - INIT_CLASS_ENTRY(ce, "ArgumentCountError", NULL); + INIT_CLASS_ENTRY(ce, "ArgumentCountError", class_ArgumentCountError_methods); zend_ce_argument_count_error = zend_register_internal_class_ex(&ce, zend_ce_type_error); zend_ce_argument_count_error->create_object = zend_default_exception_new; - INIT_CLASS_ENTRY(ce, "ValueError", NULL); + INIT_CLASS_ENTRY(ce, "ValueError", class_ValueError_methods); zend_ce_value_error = zend_register_internal_class_ex(&ce, zend_ce_error); zend_ce_value_error->create_object = zend_default_exception_new; - INIT_CLASS_ENTRY(ce, "ArithmeticError", NULL); + INIT_CLASS_ENTRY(ce, "ArithmeticError", class_ArithmeticError_methods); zend_ce_arithmetic_error = zend_register_internal_class_ex(&ce, zend_ce_error); zend_ce_arithmetic_error->create_object = zend_default_exception_new; - INIT_CLASS_ENTRY(ce, "DivisionByZeroError", NULL); + INIT_CLASS_ENTRY(ce, "DivisionByZeroError", class_DivisionByZeroError_methods); zend_ce_division_by_zero_error = zend_register_internal_class_ex(&ce, zend_ce_arithmetic_error); zend_ce_division_by_zero_error->create_object = zend_default_exception_new; } diff --git a/Zend/zend_exceptions.stub.php b/Zend/zend_exceptions.stub.php index 83e3a3ba45191..c467f36ecb584 100644 --- a/Zend/zend_exceptions.stub.php +++ b/Zend/zend_exceptions.stub.php @@ -1,5 +1,7 @@ ce_flags |= ZEND_ACC_FINAL; zend_ce_generator->create_object = zend_generator_create; diff --git a/Zend/zend_generators.stub.php b/Zend/zend_generators.stub.php index 7f45f726b5e40..5fb485895c596 100644 --- a/Zend/zend_generators.stub.php +++ b/Zend/zend_generators.stub.php @@ -1,5 +1,7 @@ interface_gets_implemented = zend_implement_ ## class_name;\ } diff --git a/Zend/zend_interfaces.stub.php b/Zend/zend_interfaces.stub.php index 1deb28a384376..2865aace08fae 100644 --- a/Zend/zend_interfaces.stub.php +++ b/Zend/zend_interfaces.stub.php @@ -1,5 +1,7 @@ ce_flags |= ZEND_ACC_FINAL; @@ -652,7 +636,7 @@ void zend_register_weakref_ce(void) /* {{{ */ zend_weakref_handlers.get_property_ptr_ptr = zend_weakref_no_read_ptr; zend_weakref_handlers.clone_obj = NULL; - INIT_CLASS_ENTRY(ce, "WeakMap", zend_weakmap_methods); + INIT_CLASS_ENTRY(ce, "WeakMap", class_WeakMap_methods); zend_ce_weakmap = zend_register_internal_class(&ce); zend_ce_weakmap->ce_flags |= ZEND_ACC_FINAL; diff --git a/Zend/zend_weakrefs.stub.php b/Zend/zend_weakrefs.stub.php index aada11bc79e02..4cf189b064b2f 100644 --- a/Zend/zend_weakrefs.stub.php +++ b/Zend/zend_weakrefs.stub.php @@ -1,33 +1,35 @@ class stdClass ] { } " -string(2003) "Class [ class Exception implements Throwable, Stringable ] { +string(2159) "Class [ class Exception implements Throwable, Stringable ] { - Constants [0] { } @@ -84,6 +84,7 @@ string(2003) "Class [ class Exception implements Throwable, Stri - Parameters [0] { } + - Return [ string ] } Method [ final public method getCode ] { @@ -96,30 +97,35 @@ string(2003) "Class [ class Exception implements Throwable, Stri - Parameters [0] { } + - Return [ string ] } Method [ final public method getLine ] { - Parameters [0] { } + - Return [ int ] } Method [ final public method getTrace ] { - Parameters [0] { } + - Return [ array ] } Method [ final public method getPrevious ] { - Parameters [0] { } + - Return [ ?Throwable ] } Method [ final public method getTraceAsString ] { - Parameters [0] { } + - Return [ string ] } Method [ public method __toString ] { From e2f15862255701f09132e004dcc22a5f92cf402c Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sun, 26 Apr 2020 12:10:46 +0200 Subject: [PATCH 265/338] Add gen_stub.php to devel pack --- win32/build/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/win32/build/Makefile b/win32/build/Makefile index d0315f41c4be6..a5a4259d17128 100644 --- a/win32/build/Makefile +++ b/win32/build/Makefile @@ -237,6 +237,7 @@ build-devel: build-headers build-lib @if not exist $(BUILD_DIR_DEV)\script mkdir $(BUILD_DIR_DEV)\script >nul @if not exist $(BUILD_DIR_DEV)\build mkdir $(BUILD_DIR_DEV)\build >nul @copy run-tests.php $(BUILD_DIR_DEV)\script\ /y >nul + @copy build\gen_stub.php $(BUILD_DIR_DEV)\build\ /y >nul @copy win32\build\confutils.js $(BUILD_DIR_DEV)\script\ /y >nul @copy win32\build\configure.tail $(BUILD_DIR_DEV)\script\ /y >nul @copy win32\build\config.w32.phpize.in $(BUILD_DIR_DEV)\script\ /y >nul From 90db6f2cc539d99a1396a337ed0928c3f642255b Mon Sep 17 00:00:00 2001 From: Levi Morrison Date: Fri, 24 Apr 2020 15:00:13 -0600 Subject: [PATCH 266/338] Add case insensitive find_ptr hash functions - zend_hash_find_ptr_lc(ht, zend_string *key) - zend_hash_str_find_ptr_lc(ht, const char *str, size_t len) Note that zend_hash_str_find_ptr_lc used to exist in zend_compile.c as zend_hash_find_ptr_lc. When exporting this I figured it was best to use the same conventions as the rest of zend_hash.h. --- Zend/zend_compile.c | 36 +++++++++++------------------------- Zend/zend_hash.c | 22 ++++++++++++++++++++++ Zend/zend_hash.h | 8 ++++++++ 3 files changed, 41 insertions(+), 25 deletions(-) diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 472a402fe6b72..381a180f2953c 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -272,23 +272,9 @@ static zend_always_inline zend_bool zend_is_confusable_type(const zend_string *n } /* }}} */ -static void *zend_hash_find_ptr_lc(HashTable *ht, const char *str, size_t len) { - void *result; - zend_string *lcname; - ALLOCA_FLAG(use_heap); - - ZSTR_ALLOCA_ALLOC(lcname, len, use_heap); - zend_str_tolower_copy(ZSTR_VAL(lcname), str, len); - result = zend_hash_find_ptr(ht, lcname); - ZSTR_ALLOCA_FREE(lcname, use_heap); - - return result; -} - static zend_bool zend_is_not_imported(zend_string *name) { /* Assuming "name" is unqualified here. */ - return !FC(imports) - || zend_hash_find_ptr_lc(FC(imports), ZSTR_VAL(name), ZSTR_LEN(name)) == NULL; + return !FC(imports) || zend_hash_find_ptr_lc(FC(imports), name) == NULL; } void zend_oparray_context_begin(zend_oparray_context *prev_context) /* {{{ */ @@ -901,7 +887,7 @@ zend_string *zend_resolve_non_class_name( if (case_sensitive) { import_name = zend_hash_find_ptr(current_import_sub, name); } else { - import_name = zend_hash_find_ptr_lc(current_import_sub, ZSTR_VAL(name), ZSTR_LEN(name)); + import_name = zend_hash_find_ptr_lc(current_import_sub, name); } if (import_name) { @@ -918,7 +904,7 @@ zend_string *zend_resolve_non_class_name( if (compound && FC(imports)) { /* If the first part of a qualified name is an alias, substitute it. */ size_t len = compound - ZSTR_VAL(name); - zend_string *import_name = zend_hash_find_ptr_lc(FC(imports), ZSTR_VAL(name), len); + zend_string *import_name = zend_hash_str_find_ptr_lc(FC(imports), ZSTR_VAL(name), len); if (import_name) { return zend_concat_names( @@ -971,7 +957,7 @@ zend_string *zend_resolve_class_name(zend_string *name, uint32_t type) /* {{{ */ /* If the first part of a qualified name is an alias, substitute it. */ size_t len = compound - ZSTR_VAL(name); zend_string *import_name = - zend_hash_find_ptr_lc(FC(imports), ZSTR_VAL(name), len); + zend_hash_str_find_ptr_lc(FC(imports), ZSTR_VAL(name), len); if (import_name) { return zend_concat_names( @@ -980,7 +966,7 @@ zend_string *zend_resolve_class_name(zend_string *name, uint32_t type) /* {{{ */ } else { /* If an unqualified name is an alias, replace it. */ zend_string *import_name - = zend_hash_find_ptr_lc(FC(imports), ZSTR_VAL(name), ZSTR_LEN(name)); + = zend_hash_find_ptr_lc(FC(imports), name); if (import_name) { return zend_string_copy(import_name); @@ -1613,7 +1599,7 @@ static zend_bool zend_verify_ct_const_access(zend_class_constant *c, zend_class_ if (ce->ce_flags & ZEND_ACC_RESOLVED_PARENT) { ce = ce->parent; } else { - ce = zend_hash_find_ptr_lc(CG(class_table), ZSTR_VAL(ce->parent_name), ZSTR_LEN(ce->parent_name)); + ce = zend_hash_find_ptr_lc(CG(class_table), ce->parent_name); if (!ce) { break; } @@ -1633,7 +1619,7 @@ static zend_bool zend_try_ct_eval_class_const(zval *zv, zend_string *class_name, if (class_name_refers_to_active_ce(class_name, fetch_type)) { cc = zend_hash_find_ptr(&CG(active_class_entry)->constants_table, name); } else if (fetch_type == ZEND_FETCH_CLASS_DEFAULT && !(CG(compiler_options) & ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION)) { - zend_class_entry *ce = zend_hash_find_ptr_lc(CG(class_table), ZSTR_VAL(class_name), ZSTR_LEN(class_name)); + zend_class_entry *ce = zend_hash_find_ptr_lc(CG(class_table), class_name); if (ce) { cc = zend_hash_find_ptr(&ce->constants_table, name); } else { @@ -6191,8 +6177,8 @@ static void zend_begin_func_decl(znode *result, zend_op_array *op_array, zend_as lcname = zend_string_tolower(name); if (FC(imports_function)) { - zend_string *import_name = zend_hash_find_ptr_lc( - FC(imports_function), ZSTR_VAL(unqualified_name), ZSTR_LEN(unqualified_name)); + zend_string *import_name = + zend_hash_find_ptr_lc(FC(imports_function), unqualified_name); if (import_name && !zend_string_equals_ci(lcname, import_name)) { zend_error_noreturn(E_COMPILE_ERROR, "Cannot declare function %s " "because the name is already in use", ZSTR_VAL(name)); @@ -6657,8 +6643,8 @@ void zend_compile_class_decl(znode *result, zend_ast *ast, zend_bool toplevel) / lcname = zend_string_tolower(name); if (FC(imports)) { - zend_string *import_name = zend_hash_find_ptr_lc( - FC(imports), ZSTR_VAL(unqualified_name), ZSTR_LEN(unqualified_name)); + zend_string *import_name = + zend_hash_find_ptr_lc(FC(imports), unqualified_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", ZSTR_VAL(name)); diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index 872a22822942b..d57c0a69d2e03 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -84,6 +84,28 @@ static void _zend_is_inconsistent(const HashTable *ht, const char *file, int lin zend_hash_do_resize(ht); \ } +ZEND_API void *zend_hash_str_find_ptr_lc(const HashTable *ht, const char *str, size_t len) { + void *result; + char *lc_str; + + /* Stack allocate small strings to improve performance */ + ALLOCA_FLAG(use_heap) + + lc_str = zend_str_tolower_copy(do_alloca(len + 1, use_heap), str, len); + result = zend_hash_str_find_ptr(ht, lc_str, len); + free_alloca(lc_str, use_heap); + + return result; +} + +ZEND_API void *zend_hash_find_ptr_lc(const HashTable *ht, zend_string *key) { + void *result; + zend_string *lc_key = zend_string_tolower(key); + result = zend_hash_find_ptr(ht, lc_key); + zend_string_release(lc_key); + return result; +} + static void ZEND_FASTCALL zend_hash_do_resize(HashTable *ht); static zend_always_inline uint32_t zend_hash_check_size(uint32_t nSize) diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index 289b9a3349d46..632658d938772 100644 --- a/Zend/zend_hash.h +++ b/Zend/zend_hash.h @@ -847,6 +847,14 @@ static zend_always_inline void *zend_hash_str_find_ptr(const HashTable *ht, cons } } +/* Will lowercase the str; use only if you don't need the lowercased string for + * anything else. If you have a lowered string, use zend_hash_str_find_ptr. */ +ZEND_API void *zend_hash_str_find_ptr_lc(const HashTable *ht, const char *str, size_t len); + +/* Will lowercase the str; use only if you don't need the lowercased string for + * anything else. If you have a lowered string, use zend_hash_find_ptr. */ +ZEND_API void *zend_hash_find_ptr_lc(const HashTable *ht, zend_string *key); + static zend_always_inline void *zend_hash_index_find_ptr(const HashTable *ht, zend_ulong h) { zval *zv; From 29968d8f992559080bc9d5d4eab37f1fad8094df Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 24 Apr 2020 17:24:25 +0200 Subject: [PATCH 267/338] Fix #79470: PHP incompatible with 3rd party file system on demand We add support for Activision HSM (`IO_REPARSE_TAG_ACTIVISION_HSM`) and VFS for Git (`IO_REPARSE_TAG_PROJFS`). The latter fixes bug #78784. --- NEWS | 4 ++++ Zend/zend_virtual_cwd.c | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 1831014f2417e..c96ee110d04b5 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,10 @@ PHP NEWS . Fixed bug #79434 (PHP 7.3 and PHP-7.4 crash with NULL-pointer dereference on !CS constant). (Nikita) . Fixed bug #79477 (casting object into array creates references). (Nikita) + . Fixed bug #79470 (PHP incompatible with 3rd party file system on demand). + (cmb) + . Fixed bug #78784 (Unable to interact with files inside a VFS for Git + repository). (cmb) - DOM: . Fixed bug #78221 (DOMNode::normalize() doesn't remove empty text nodes). diff --git a/Zend/zend_virtual_cwd.c b/Zend/zend_virtual_cwd.c index c523f40dc952d..253ed8c420262 100644 --- a/Zend/zend_virtual_cwd.c +++ b/Zend/zend_virtual_cwd.c @@ -55,6 +55,14 @@ #define IO_REPARSE_TAG_ONEDRIVE (0x80000021L) #endif +# ifndef IO_REPARSE_TAG_ACTIVISION_HSM +# define IO_REPARSE_TAG_ACTIVISION_HSM (0x00000047L) +# endif + +# ifndef IO_REPARSE_TAG_PROJFS +# define IO_REPARSE_TAG_PROJFS (0x9000001CL) +# endif + # ifndef VOLUME_NAME_NT # define VOLUME_NAME_NT 0x2 # endif @@ -1002,7 +1010,9 @@ static size_t tsrm_realpath_r(char *path, size_t start, size_t len, int *ll, tim else if (pbuffer->ReparseTag == IO_REPARSE_TAG_DEDUP || /* Starting with 1709. */ (pbuffer->ReparseTag & ~IO_REPARSE_TAG_CLOUD_MASK) == IO_REPARSE_TAG_CLOUD || - IO_REPARSE_TAG_ONEDRIVE == pbuffer->ReparseTag) { + IO_REPARSE_TAG_ONEDRIVE == pbuffer->ReparseTag || + IO_REPARSE_TAG_ACTIVISION_HSM == pbuffer->ReparseTag || + IO_REPARSE_TAG_PROJFS == pbuffer->ReparseTag) { isabsolute = 1; substitutename = malloc((len + 1) * sizeof(char)); if (!substitutename) { From 6bc8f7e5a9949b2ba79376abd1ed13d0b4d0ae3c Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 21 Apr 2020 13:28:01 +0200 Subject: [PATCH 268/338] Fix #79065: DOM classes do not expose properties to Reflection We add a `get_properties` handler which complements the already existing `has_property` and `read_property`handlers. --- NEWS | 2 ++ ext/dom/php_dom.c | 23 +++++++++++++++++++++++ ext/dom/tests/bug79065.phpt | 30 ++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 ext/dom/tests/bug79065.phpt diff --git a/NEWS b/NEWS index ba008a7ba7f7c..0fecf66f7f79d 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,8 @@ PHP NEWS - DOM: . Fixed bug #78221 (DOMNode::normalize() doesn't remove empty text nodes). (cmb) + . Fixed bug #79065 (DOM classes do not expose properties to Reflection). + (cmb) - EXIF: . Fixed bug #79336 (ext/exif/tests/bug79046.phpt fails on Big endian arch). diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index 6bc72e9f97940..ad297ca7788fb 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -410,6 +410,28 @@ static int dom_property_exists(zval *object, zval *member, int check_empty, void } /* }}} */ +/* {{{ dom_get_properties */ +static HashTable *dom_get_properties(zval *object) +{ + dom_object *obj = Z_DOMOBJ_P(object); + HashTable *props = zend_std_get_properties(object); + + if (obj->prop_handler != NULL) { + zend_string *key; + dom_prop_handler *hnd; + + ZEND_HASH_FOREACH_STR_KEY_PTR(obj->prop_handler, key, hnd) { + zval val; + + if (hnd->read_func(obj, &val) == SUCCESS) { + zend_hash_update(props, key, &val); + } + } ZEND_HASH_FOREACH_END(); + } + return props; +} +/* }}} */ + static HashTable* dom_get_debug_info_helper(zval *object, int *is_temp) /* {{{ */ { dom_object *obj = Z_DOMOBJ_P(object); @@ -602,6 +624,7 @@ PHP_MINIT_FUNCTION(dom) dom_object_handlers.get_property_ptr_ptr = dom_get_property_ptr_ptr; dom_object_handlers.clone_obj = dom_objects_store_clone_obj; dom_object_handlers.has_property = dom_property_exists; + dom_object_handlers.get_properties = dom_get_properties; dom_object_handlers.get_debug_info = dom_get_debug_info; memcpy(&dom_nnodemap_object_handlers, &dom_object_handlers, sizeof(zend_object_handlers)); diff --git a/ext/dom/tests/bug79065.phpt b/ext/dom/tests/bug79065.phpt new file mode 100644 index 0000000000000..9f3f49b7c80c7 --- /dev/null +++ b/ext/dom/tests/bug79065.phpt @@ -0,0 +1,30 @@ +--TEST-- +Bug #79065 (DOM classes do not expose properties to Reflection) +--SKIPIF-- + +--FILE-- +loadHTML('test'); +var_dump(count(get_object_vars($dom))); + +$ro = new ReflectionObject($dom); +var_dump(count($ro->getProperties())); +var_dump($ro->hasProperty("textContent")); +$rp = $ro->getProperty("textContent"); +var_dump($rp); +var_dump($rp->getValue($dom)); +?> +--EXPECTF-- +int(35) +int(35) +bool(true) +object(ReflectionProperty)#%d (2) { + ["name"]=> + string(11) "textContent" + ["class"]=> + string(11) "DOMDocument" +} +string(4) "test" From 41c7d28c113d1c8e9c98cc834e8479f8567e5e3a Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 27 Apr 2020 10:21:26 +0200 Subject: [PATCH 269/338] Add macro to get ini target address --- Zend/zend.c | 13 +---- Zend/zend_ini.c | 73 +++------------------------ Zend/zend_ini.h | 8 +++ ext/opcache/zend_accelerator_module.c | 54 +++----------------- ext/soap/soap.c | 11 +--- ext/zlib/zlib.c | 11 +--- main/fopen_wrappers.c | 10 +--- 7 files changed, 28 insertions(+), 152 deletions(-) diff --git a/Zend/zend.c b/Zend/zend.c index 555483a7be25a..40dd8991a1ea0 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -139,18 +139,9 @@ static ZEND_INI_MH(OnUpdateScriptEncoding) /* {{{ */ static ZEND_INI_MH(OnUpdateAssertions) /* {{{ */ { - zend_long *p, val; -#ifndef ZTS - char *base = (char *) mh_arg2; -#else - char *base; - - base = (char *) ts_resource(*((int *) mh_arg2)); -#endif - - p = (zend_long *) (base+(size_t) mh_arg1); + zend_long *p = (zend_long *) ZEND_INI_GET_ADDR(); - val = zend_atol(ZSTR_VAL(new_value), ZSTR_LEN(new_value)); + zend_long val = zend_atol(ZSTR_VAL(new_value), ZSTR_LEN(new_value)); if (stage != ZEND_INI_STAGE_STARTUP && stage != ZEND_INI_STAGE_SHUTDOWN && diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index a2344653bc4b0..279dcae03c931 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -578,17 +578,7 @@ ZEND_INI_DISP(display_link_numbers) /* {{{ */ /* Standard message handlers */ ZEND_API ZEND_INI_MH(OnUpdateBool) /* {{{ */ { - zend_bool *p; -#ifndef ZTS - char *base = (char *) mh_arg2; -#else - char *base; - - base = (char *) ts_resource(*((int *) mh_arg2)); -#endif - - p = (zend_bool *) (base+(size_t) mh_arg1); - + zend_bool *p = (zend_bool *) ZEND_INI_GET_ADDR(); *p = zend_ini_parse_bool(new_value); return SUCCESS; } @@ -596,17 +586,7 @@ ZEND_API ZEND_INI_MH(OnUpdateBool) /* {{{ */ ZEND_API ZEND_INI_MH(OnUpdateLong) /* {{{ */ { - zend_long *p; -#ifndef ZTS - char *base = (char *) mh_arg2; -#else - char *base; - - base = (char *) ts_resource(*((int *) mh_arg2)); -#endif - - p = (zend_long *) (base+(size_t) mh_arg1); - + zend_long *p = (zend_long *) ZEND_INI_GET_ADDR(); *p = zend_atol(ZSTR_VAL(new_value), ZSTR_LEN(new_value)); return SUCCESS; } @@ -614,21 +594,12 @@ ZEND_API ZEND_INI_MH(OnUpdateLong) /* {{{ */ ZEND_API ZEND_INI_MH(OnUpdateLongGEZero) /* {{{ */ { - zend_long *p, tmp; -#ifndef ZTS - char *base = (char *) mh_arg2; -#else - char *base; - - base = (char *) ts_resource(*((int *) mh_arg2)); -#endif - - tmp = zend_atol(ZSTR_VAL(new_value), ZSTR_LEN(new_value)); + zend_long tmp = zend_atol(ZSTR_VAL(new_value), ZSTR_LEN(new_value)); if (tmp < 0) { return FAILURE; } - p = (zend_long *) (base+(size_t) mh_arg1); + zend_long *p = (zend_long *) ZEND_INI_GET_ADDR(); *p = tmp; return SUCCESS; @@ -637,17 +608,7 @@ ZEND_API ZEND_INI_MH(OnUpdateLongGEZero) /* {{{ */ ZEND_API ZEND_INI_MH(OnUpdateReal) /* {{{ */ { - double *p; -#ifndef ZTS - char *base = (char *) mh_arg2; -#else - char *base; - - base = (char *) ts_resource(*((int *) mh_arg2)); -#endif - - p = (double *) (base+(size_t) mh_arg1); - + double *p = (double *) ZEND_INI_GET_ADDR(); *p = zend_strtod(ZSTR_VAL(new_value), NULL); return SUCCESS; } @@ -655,17 +616,7 @@ ZEND_API ZEND_INI_MH(OnUpdateReal) /* {{{ */ ZEND_API ZEND_INI_MH(OnUpdateString) /* {{{ */ { - char **p; -#ifndef ZTS - char *base = (char *) mh_arg2; -#else - char *base; - - base = (char *) ts_resource(*((int *) mh_arg2)); -#endif - - p = (char **) (base+(size_t) mh_arg1); - + char **p = (char **) ZEND_INI_GET_ADDR(); *p = new_value ? ZSTR_VAL(new_value) : NULL; return SUCCESS; } @@ -673,21 +624,11 @@ ZEND_API ZEND_INI_MH(OnUpdateString) /* {{{ */ ZEND_API ZEND_INI_MH(OnUpdateStringUnempty) /* {{{ */ { - char **p; -#ifndef ZTS - char *base = (char *) mh_arg2; -#else - char *base; - - base = (char *) ts_resource(*((int *) mh_arg2)); -#endif - if (new_value && !ZSTR_VAL(new_value)[0]) { return FAILURE; } - p = (char **) (base+(size_t) mh_arg1); - + char **p = (char **) ZEND_INI_GET_ADDR(); *p = new_value ? ZSTR_VAL(new_value) : NULL; return SUCCESS; } diff --git a/Zend/zend_ini.h b/Zend/zend_ini.h index 3759ca319618c..0289b322be1a2 100644 --- a/Zend/zend_ini.h +++ b/Zend/zend_ini.h @@ -194,4 +194,12 @@ typedef struct _zend_ini_parser_param { void *arg; } zend_ini_parser_param; +#ifndef ZTS +# define ZEND_INI_GET_BASE() ((char *) mh_arg2) +#else +# define ZEND_INI_GET_BASE() ((char *) ts_resource(*((int *) mh_arg2))) +#endif + +#define ZEND_INI_GET_ADDR() (ZEND_INI_GET_BASE() + (size_t) mh_arg1) + #endif /* ZEND_INI_H */ diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c index ef3cb5cc5c473..da9806db7f1e1 100644 --- a/ext/opcache/zend_accelerator_module.c +++ b/ext/opcache/zend_accelerator_module.c @@ -63,19 +63,8 @@ static int validate_api_restriction(void) static ZEND_INI_MH(OnUpdateMemoryConsumption) { - zend_long *p; - zend_long memsize; -#ifndef ZTS - char *base = (char *) mh_arg2; -#else - char *base = (char *) ts_resource(*((int *) mh_arg2)); -#endif - - /* keep the compiler happy */ - (void)entry; (void)mh_arg2; (void)mh_arg3; (void)stage; - - p = (zend_long *) (base + (size_t)mh_arg1); - memsize = atoi(ZSTR_VAL(new_value)); + zend_long *p = (zend_long *) ZEND_INI_GET_ADDR(); + zend_long memsize = atoi(ZSTR_VAL(new_value)); /* sanity check we must use at least 8 MB */ if (memsize < 8) { const char *new_new_value = "8"; @@ -103,19 +92,8 @@ static ZEND_INI_MH(OnUpdateMemoryConsumption) static ZEND_INI_MH(OnUpdateMaxAcceleratedFiles) { - zend_long *p; - zend_long size; -#ifndef ZTS - char *base = (char *) mh_arg2; -#else - char *base = (char *) ts_resource(*((int *) mh_arg2)); -#endif - - /* keep the compiler happy */ - (void)entry; (void)mh_arg2; (void)mh_arg3; (void)stage; - - p = (zend_long *) (base + (size_t)mh_arg1); - size = atoi(ZSTR_VAL(new_value)); + zend_long *p = (zend_long *) ZEND_INI_GET_ADDR(); + zend_long size = atoi(ZSTR_VAL(new_value)); /* sanity check we must use a value between MIN_ACCEL_FILES and MAX_ACCEL_FILES */ if (size < MIN_ACCEL_FILES || size > MAX_ACCEL_FILES) { @@ -147,19 +125,8 @@ static ZEND_INI_MH(OnUpdateMaxAcceleratedFiles) static ZEND_INI_MH(OnUpdateMaxWastedPercentage) { - double *p; - zend_long percentage; -#ifndef ZTS - char *base = (char *) mh_arg2; -#else - char *base = (char *) ts_resource(*((int *) mh_arg2)); -#endif - - /* keep the compiler happy */ - (void)entry; (void)mh_arg2; (void)mh_arg3; (void)stage; - - p = (double *) (base + (size_t)mh_arg1); - percentage = atoi(ZSTR_VAL(new_value)); + double *p = (double *) ZEND_INI_GET_ADDR(); + zend_long percentage = atoi(ZSTR_VAL(new_value)); if (percentage <= 0 || percentage > 50) { const char *new_new_value = "5"; @@ -187,14 +154,7 @@ static ZEND_INI_MH(OnEnable) return OnUpdateBool(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage); } else { /* It may be only temporary disabled */ - zend_bool *p; -#ifndef ZTS - char *base = (char *) mh_arg2; -#else - char *base = (char *) ts_resource(*((int *) mh_arg2)); -#endif - - p = (zend_bool *) (base+(size_t) mh_arg1); + zend_bool *p = (zend_bool *) ZEND_INI_GET_ADDR(); if ((ZSTR_LEN(new_value) == 2 && strcasecmp("on", ZSTR_VAL(new_value)) == 0) || (ZSTR_LEN(new_value) == 3 && strcasecmp("yes", ZSTR_VAL(new_value)) == 0) || (ZSTR_LEN(new_value) == 4 && strcasecmp("true", ZSTR_VAL(new_value)) == 0) || diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 2c82ac3919a40..a93813e9d1869 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -211,17 +211,8 @@ ZEND_GET_MODULE(soap) ZEND_INI_MH(OnUpdateCacheMode) { - char *p; -#ifndef ZTS - char *base = (char *) mh_arg2; -#else - char *base = (char *) ts_resource(*((int *) mh_arg2)); -#endif - - p = (char*) (base+(size_t) mh_arg1); - + char *p = (char *) ZEND_INI_GET_ADDR(); *p = (char)atoi(ZSTR_VAL(new_value)); - return SUCCESS; } diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 99a1f14b2bf4c..6951c155ad7ba 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -1250,15 +1250,6 @@ static PHP_INI_MH(OnUpdate_zlib_output_compression) { int int_value; char *ini_value; - zend_long *p; -#ifndef ZTS - char *base = (char *) mh_arg2; -#else - char *base; - - base = (char *) ts_resource(*((int *) mh_arg2)); -#endif - if (new_value == NULL) { return FAILURE; } @@ -1284,7 +1275,7 @@ static PHP_INI_MH(OnUpdate_zlib_output_compression) } } - p = (zend_long *) (base+(size_t) mh_arg1); + zend_long *p = (zend_long *) ZEND_INI_GET_ADDR(); *p = int_value; ZLIBG(output_compression) = ZLIBG(output_compression_default); diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index b2d698e7b0050..d61a7c689397e 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -73,14 +73,8 @@ Allows any change to open_basedir setting in during Startup and Shutdown events, or a tightening during activation/runtime/deactivation */ PHPAPI ZEND_INI_MH(OnUpdateBaseDir) { - char **p, *pathbuf, *ptr, *end; -#ifndef ZTS - char *base = (char *) mh_arg2; -#else - char *base = (char *) ts_resource(*((int *) mh_arg2)); -#endif - - p = (char **) (base + (size_t) mh_arg1); + char **p = (char **) ZEND_INI_GET_ADDR(); + char *pathbuf, *ptr, *end; if (stage == PHP_INI_STAGE_STARTUP || stage == PHP_INI_STAGE_SHUTDOWN || stage == PHP_INI_STAGE_ACTIVATE || stage == PHP_INI_STAGE_DEACTIVATE) { /* We're in a PHP_INI_SYSTEM context, no restrictions */ From 6a500cb249c9fd0f0cd054582e121c8be4f0b138 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Mon, 27 Apr 2020 16:26:50 +0800 Subject: [PATCH 270/338] SSE2 str_tolower --- Zend/zend_operators.c | 60 ++++++++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 23 deletions(-) diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 7f9b804f1e067..109a1c58d8dac 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -30,6 +30,10 @@ #include "zend_exceptions.h" #include "zend_closures.h" +#ifdef __SSE2__ +#include +#endif + #if ZEND_USE_TOLOWER_L #include static _locale_t current_locale = NULL; @@ -2456,17 +2460,38 @@ ZEND_API void zend_update_current_locale(void) /* {{{ */ /* }}} */ #endif -ZEND_API char* ZEND_FASTCALL zend_str_tolower_copy(char *dest, const char *source, size_t length) /* {{{ */ -{ - register unsigned char *str = (unsigned char*)source; - register unsigned char *result = (unsigned char*)dest; - register unsigned char *end = str + length; - - while (str < end) { - *result++ = zend_tolower_ascii(*str++); +static zend_always_inline void zend_str_tolower_impl(char *dest, const char *str, size_t length) /* {{{ */ { + register unsigned char *p = (unsigned char*)str; + register unsigned char *q = (unsigned char*)dest; + register unsigned char *end = p + length; +#ifdef __SSE2__ + if (length >= 16) { + const __m128i _A = _mm_set1_epi8('A' - 1); + const __m128i Z_ = _mm_set1_epi8('Z' + 1); + const __m128i delta = _mm_set1_epi8('a' - 'A'); + do { + __m128i op = _mm_loadu_si128((__m128i*)p); + __m128i gt = _mm_cmpgt_epi8(op, _A); + __m128i lt = _mm_cmplt_epi8(op, Z_); + __m128i mingle = _mm_and_si128(gt, lt); + __m128i add = _mm_and_si128(mingle, delta); + __m128i lower = _mm_add_epi8(op, add); + _mm_storeu_si128((__m128i *)q, lower); + p += 16; + q += 16; + } while (p + 16 <= end); } - *result = '\0'; +#endif + while (p < end) { + *q++ = zend_tolower_ascii(*p++); + } +} +/* }}} */ +ZEND_API char* ZEND_FASTCALL zend_str_tolower_copy(char *dest, const char *source, size_t length) /* {{{ */ +{ + zend_str_tolower_impl(dest, source, length); + dest[length] = '\0'; return dest; } /* }}} */ @@ -2479,13 +2504,7 @@ ZEND_API char* ZEND_FASTCALL zend_str_tolower_dup(const char *source, size_t len ZEND_API void ZEND_FASTCALL zend_str_tolower(char *str, size_t length) /* {{{ */ { - register unsigned char *p = (unsigned char*)str; - register unsigned char *end = p + length; - - while (p < end) { - *p = zend_tolower_ascii(*p); - p++; - } + zend_str_tolower_impl(str, (const char*)str, length); } /* }}} */ @@ -2521,7 +2540,6 @@ ZEND_API zend_string* ZEND_FASTCALL zend_string_tolower_ex(zend_string *str, int { register unsigned char *p = (unsigned char*)ZSTR_VAL(str); register unsigned char *end = p + ZSTR_LEN(str); - while (p < end) { if (*p != zend_tolower_ascii(*p)) { zend_string *res = zend_string_alloc(ZSTR_LEN(str), persistent); @@ -2531,12 +2549,8 @@ ZEND_API zend_string* ZEND_FASTCALL zend_string_tolower_ex(zend_string *str, int memcpy(ZSTR_VAL(res), ZSTR_VAL(str), p - (unsigned char*)ZSTR_VAL(str)); } r = p + (ZSTR_VAL(res) - ZSTR_VAL(str)); - while (p < end) { - *r = zend_tolower_ascii(*p); - p++; - r++; - } - *r = '\0'; + zend_str_tolower_impl((char*)r, (const char*)p, end - p); + ZSTR_VAL(res)[ZSTR_LEN(res)] = '\0'; return res; } p++; From 48a34bc1202e9664121c9e9aa004c79ac71af3f5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 24 Apr 2020 18:59:13 +0200 Subject: [PATCH 271/338] Add helper APIs for get_gc implementations get_gc() implementations that need to explore heterogeneous data currently work by computing how many GC entries they need, allocating a buffer for that and storing it on the object. This is inefficient and wastes memory, because the buffer is retained after the GC run. This commit adds an API for a single global GC buffer, which can be reused by get_gc implementations (as only one get_gc call is ever active at the same time). The GC buffer will automatically grow during the GC run and be discarded at the end. --- Zend/zend_execute_API.c | 2 + Zend/zend_gc.c | 28 ++++++++++++- Zend/zend_gc.h | 39 ++++++++++++++++++ Zend/zend_generators.c | 88 ++++++----------------------------------- Zend/zend_generators.h | 3 -- Zend/zend_globals.h | 2 + ext/spl/spl_dllist.c | 18 ++------- ext/spl/spl_observer.c | 22 ++--------- 8 files changed, 89 insertions(+), 113 deletions(-) diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 1c7c904b194a8..ce801c3098faf 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -184,6 +184,8 @@ void init_executor(void) /* {{{ */ EG(persistent_functions_count) = EG(function_table)->nNumUsed; EG(persistent_classes_count) = EG(class_table)->nNumUsed; + EG(get_gc_buffer).start = EG(get_gc_buffer).end = EG(get_gc_buffer).cur = NULL; + zend_weakrefs_init(); EG(active) = 1; diff --git a/Zend/zend_gc.c b/Zend/zend_gc.c index 30698f448450b..76f60b7abf742 100644 --- a/Zend/zend_gc.c +++ b/Zend/zend_gc.c @@ -1416,6 +1416,8 @@ static int gc_remove_nested_data_from_buffer(zend_refcounted *ref, gc_root_buffe } while (0); } +static void zend_get_gc_buffer_release(); + ZEND_API int zend_gc_collect_cycles(void) { int count = 0; @@ -1451,6 +1453,7 @@ ZEND_API int zend_gc_collect_cycles(void) if (!GC_G(num_roots)) { /* nothing to free */ GC_TRACE("Nothing to free"); + zend_get_gc_buffer_release(); GC_G(gc_active) = 0; return 0; } @@ -1533,6 +1536,7 @@ ZEND_API int zend_gc_collect_cycles(void) if (GC_G(gc_protected)) { /* something went wrong */ + zend_get_gc_buffer_release(); return 0; } } @@ -1595,7 +1599,7 @@ ZEND_API int zend_gc_collect_cycles(void) } gc_compact(); - + zend_get_gc_buffer_release(); return count; } @@ -1607,6 +1611,28 @@ ZEND_API void zend_gc_get_status(zend_gc_status *status) status->num_roots = GC_G(num_roots); } +ZEND_API zend_get_gc_buffer *zend_get_gc_buffer_create() { + /* There can only be one get_gc() call active at a time, + * so there only needs to be one buffer. */ + zend_get_gc_buffer *gc_buffer = &EG(get_gc_buffer); + gc_buffer->cur = gc_buffer->start; + return gc_buffer; +} + +ZEND_API void zend_get_gc_buffer_grow(zend_get_gc_buffer *gc_buffer) { + size_t old_capacity = gc_buffer->end - gc_buffer->start; + size_t new_capacity = old_capacity == 0 ? 64 : old_capacity * 2; + gc_buffer->start = erealloc(gc_buffer->start, new_capacity * sizeof(zval)); + gc_buffer->end = gc_buffer->start + new_capacity; + gc_buffer->cur = gc_buffer->start + old_capacity; +} + +static void zend_get_gc_buffer_release() { + zend_get_gc_buffer *gc_buffer = &EG(get_gc_buffer); + efree(gc_buffer->start); + gc_buffer->start = gc_buffer->end = gc_buffer->cur = NULL; +} + #ifdef ZTS size_t zend_gc_globals_size(void) { diff --git a/Zend/zend_gc.h b/Zend/zend_gc.h index d7b4e1a533eff..4754f31713956 100644 --- a/Zend/zend_gc.h +++ b/Zend/zend_gc.h @@ -84,4 +84,43 @@ static zend_always_inline void gc_check_possible_root(zend_refcounted *ref) } } +/* These APIs can be used to simplify object get_gc implementations + * over heterogenous structures. See zend_generator_get_gc() for + * a usage example. */ + +typedef struct { + zval *cur; + zval *end; + zval *start; +} zend_get_gc_buffer; + +ZEND_API zend_get_gc_buffer *zend_get_gc_buffer_create(); +ZEND_API void zend_get_gc_buffer_grow(zend_get_gc_buffer *gc_buffer); + +static zend_always_inline void zend_get_gc_buffer_add_zval( + zend_get_gc_buffer *gc_buffer, zval *zv) { + if (Z_REFCOUNTED_P(zv)) { + if (UNEXPECTED(gc_buffer->cur == gc_buffer->end)) { + zend_get_gc_buffer_grow(gc_buffer); + } + ZVAL_COPY_VALUE(gc_buffer->cur, zv); + gc_buffer->cur++; + } +} + +static zend_always_inline void zend_get_gc_buffer_add_obj( + zend_get_gc_buffer *gc_buffer, zend_object *obj) { + if (UNEXPECTED(gc_buffer->cur == gc_buffer->end)) { + zend_get_gc_buffer_grow(gc_buffer); + } + ZVAL_OBJ(gc_buffer->cur, obj); + gc_buffer->cur++; +} + +static zend_always_inline void zend_get_gc_buffer_use( + zend_get_gc_buffer *gc_buffer, zval **table, int *n) { + *table = gc_buffer->start; + *n = gc_buffer->cur - gc_buffer->start; +} + #endif /* ZEND_GC_H */ diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c index b3261842eb02c..ce681557df9ea 100644 --- a/Zend/zend_generators.c +++ b/Zend/zend_generators.c @@ -152,12 +152,6 @@ ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished OBJ_RELEASE(ZEND_CLOSURE_OBJECT(EX(func))); } - /* Free GC buffer. GC for closed generators doesn't need an allocated buffer */ - if (generator->gc_buffer) { - efree(generator->gc_buffer); - generator->gc_buffer = NULL; - } - efree(execute_data); } } @@ -279,63 +273,11 @@ static void zend_generator_free_storage(zend_object *object) /* {{{ */ } /* }}} */ -static uint32_t calc_gc_buffer_size(zend_generator *generator) /* {{{ */ -{ - uint32_t size = 4; /* value, key, retval, values */ - if (generator->execute_data) { - zend_execute_data *execute_data = generator->execute_data; - zend_op_array *op_array = &EX(func)->op_array; - - /* Compiled variables */ - if (!(EX_CALL_INFO() & ZEND_CALL_HAS_SYMBOL_TABLE)) { - size += op_array->last_var; - } - /* Extra args */ - if (EX_CALL_INFO() & ZEND_CALL_FREE_EXTRA_ARGS) { - size += EX_NUM_ARGS() - op_array->num_args; - } - size += (EX_CALL_INFO() & ZEND_CALL_RELEASE_THIS) != 0; /* $this */ - size += (EX_CALL_INFO() & ZEND_CALL_CLOSURE) != 0; /* Closure object */ - - /* Live vars */ - if (execute_data->opline != op_array->opcodes) { - /* -1 required because we want the last run opcode, not the next to-be-run one. */ - uint32_t i, op_num = execute_data->opline - op_array->opcodes - 1; - for (i = 0; i < op_array->last_live_range; i++) { - const zend_live_range *range = &op_array->live_range[i]; - if (range->start > op_num) { - /* Further ranges will not be relevant... */ - break; - } else if (op_num < range->end) { - /* LIVE_ROPE and LIVE_SILENCE not relevant for GC */ - uint32_t kind = range->var & ZEND_LIVE_MASK; - if (kind == ZEND_LIVE_TMPVAR || kind == ZEND_LIVE_LOOP) { - size++; - } - } - } - } - - /* Yield from root references */ - if (generator->node.children == 0) { - zend_generator *root = generator->node.ptr.root; - while (root != generator) { - root = zend_generator_get_child(&root->node, generator); - size++; - } - } - } - return size; -} -/* }}} */ - static HashTable *zend_generator_get_gc(zend_object *object, zval **table, int *n) /* {{{ */ { zend_generator *generator = (zend_generator*)object; zend_execute_data *execute_data = generator->execute_data; zend_op_array *op_array; - zval *gc_buffer; - uint32_t gc_buffer_size; if (!execute_data) { /* If the generator has been closed, it can only hold on to three values: The value, key @@ -346,24 +288,17 @@ static HashTable *zend_generator_get_gc(zend_object *object, zval **table, int * } op_array = &EX(func)->op_array; - gc_buffer_size = calc_gc_buffer_size(generator); - if (generator->gc_buffer_size < gc_buffer_size) { - generator->gc_buffer = safe_erealloc(generator->gc_buffer, sizeof(zval), gc_buffer_size, 0); - generator->gc_buffer_size = gc_buffer_size; - } - - *n = gc_buffer_size; - *table = gc_buffer = generator->gc_buffer; - ZVAL_COPY_VALUE(gc_buffer++, &generator->value); - ZVAL_COPY_VALUE(gc_buffer++, &generator->key); - ZVAL_COPY_VALUE(gc_buffer++, &generator->retval); - ZVAL_COPY_VALUE(gc_buffer++, &generator->values); + zend_get_gc_buffer *gc_buffer = zend_get_gc_buffer_create(); + zend_get_gc_buffer_add_zval(gc_buffer, &generator->value); + zend_get_gc_buffer_add_zval(gc_buffer, &generator->key); + zend_get_gc_buffer_add_zval(gc_buffer, &generator->retval); + zend_get_gc_buffer_add_zval(gc_buffer, &generator->values); if (!(EX_CALL_INFO() & ZEND_CALL_HAS_SYMBOL_TABLE)) { uint32_t i, num_cvs = EX(func)->op_array.last_var; for (i = 0; i < num_cvs; i++) { - ZVAL_COPY_VALUE(gc_buffer++, EX_VAR_NUM(i)); + zend_get_gc_buffer_add_zval(gc_buffer, EX_VAR_NUM(i)); } } @@ -371,15 +306,15 @@ static HashTable *zend_generator_get_gc(zend_object *object, zval **table, int * zval *zv = EX_VAR_NUM(op_array->last_var + op_array->T); zval *end = zv + (EX_NUM_ARGS() - op_array->num_args); while (zv != end) { - ZVAL_COPY_VALUE(gc_buffer++, zv++); + zend_get_gc_buffer_add_zval(gc_buffer, zv++); } } if (EX_CALL_INFO() & ZEND_CALL_RELEASE_THIS) { - ZVAL_OBJ(gc_buffer++, Z_OBJ(execute_data->This)); + zend_get_gc_buffer_add_obj(gc_buffer, Z_OBJ(execute_data->This)); } if (EX_CALL_INFO() & ZEND_CALL_CLOSURE) { - ZVAL_OBJ(gc_buffer++, ZEND_CLOSURE_OBJECT(EX(func))); + zend_get_gc_buffer_add_obj(gc_buffer, ZEND_CLOSURE_OBJECT(EX(func))); } if (execute_data->opline != op_array->opcodes) { @@ -393,7 +328,7 @@ static HashTable *zend_generator_get_gc(zend_object *object, zval **table, int * uint32_t var_num = range->var & ~ZEND_LIVE_MASK; zval *var = EX_VAR(var_num); if (kind == ZEND_LIVE_TMPVAR || kind == ZEND_LIVE_LOOP) { - ZVAL_COPY_VALUE(gc_buffer++, var); + zend_get_gc_buffer_add_zval(gc_buffer, var); } } } @@ -402,11 +337,12 @@ static HashTable *zend_generator_get_gc(zend_object *object, zval **table, int * if (generator->node.children == 0) { zend_generator *root = generator->node.ptr.root; while (root != generator) { - ZVAL_OBJ(gc_buffer++, &root->std); + zend_get_gc_buffer_add_obj(gc_buffer, &root->std); root = zend_generator_get_child(&root->node, generator); } } + zend_get_gc_buffer_use(gc_buffer, table, n); if (EX_CALL_INFO() & ZEND_CALL_HAS_SYMBOL_TABLE) { return execute_data->symbol_table; } else { diff --git a/Zend/zend_generators.h b/Zend/zend_generators.h index abccf3a5294cb..3a3d567508dd8 100644 --- a/Zend/zend_generators.h +++ b/Zend/zend_generators.h @@ -89,9 +89,6 @@ struct _zend_generator { /* ZEND_GENERATOR_* flags */ zend_uchar flags; - - zval *gc_buffer; - uint32_t gc_buffer_size; }; static const zend_uchar ZEND_GENERATOR_CURRENTLY_RUNNING = 0x1; diff --git a/Zend/zend_globals.h b/Zend/zend_globals.h index b7139fdfd6287..298c22fe61651 100644 --- a/Zend/zend_globals.h +++ b/Zend/zend_globals.h @@ -238,6 +238,8 @@ struct _zend_executor_globals { zend_bool exception_ignore_args; + zend_get_gc_buffer get_gc_buffer; + void *reserved[ZEND_MAX_RESERVED_RESOURCES]; }; diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c index 306aefa5d850a..ef0e5b60ff76c 100644 --- a/ext/spl/spl_dllist.c +++ b/ext/spl/spl_dllist.c @@ -91,8 +91,6 @@ struct _spl_dllist_object { zend_function *fptr_offset_del; zend_function *fptr_count; zend_class_entry *ce_get_iterator; - zval *gc_data; - int gc_data_count; zend_object std; }; @@ -356,10 +354,6 @@ static void spl_dllist_object_free_storage(zend_object *object) /* {{{ */ zval_ptr_dtor(&tmp); } - if (intern->gc_data != NULL) { - efree(intern->gc_data); - }; - spl_ptr_llist_destroy(intern->llist); SPL_LLIST_CHECK_DELREF(intern->traverse_pointer); } @@ -534,21 +528,15 @@ static inline HashTable* spl_dllist_object_get_debug_info(zend_object *obj) /* { static HashTable *spl_dllist_object_get_gc(zend_object *obj, zval **gc_data, int *gc_data_count) /* {{{ */ { spl_dllist_object *intern = spl_dllist_from_obj(obj); + zend_get_gc_buffer *gc_buffer = zend_get_gc_buffer_create(); spl_ptr_llist_element *current = intern->llist->head; - int i = 0; - - if (intern->gc_data_count < intern->llist->count) { - intern->gc_data_count = intern->llist->count; - intern->gc_data = safe_erealloc(intern->gc_data, intern->gc_data_count, sizeof(zval), 0); - } while (current) { - ZVAL_COPY_VALUE(&intern->gc_data[i++], ¤t->data); + zend_get_gc_buffer_add_zval(gc_buffer, ¤t->data); current = current->next; } - *gc_data = intern->gc_data; - *gc_data_count = i; + zend_get_gc_buffer_use(gc_buffer, gc_data, gc_data_count); return zend_std_get_properties(obj); } /* }}} */ diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c index 09f27595d9437..bcf3a3953592f 100644 --- a/ext/spl/spl_observer.c +++ b/ext/spl/spl_observer.c @@ -50,8 +50,6 @@ typedef struct _spl_SplObjectStorage { /* {{{ */ HashPosition pos; zend_long flags; zend_function *fptr_get_hash; - zval *gcdata; - size_t gcdata_num; zend_object std; } spl_SplObjectStorage; /* }}} */ @@ -75,11 +73,6 @@ void spl_SplObjectStorage_free_storage(zend_object *object) /* {{{ */ zend_object_std_dtor(&intern->std); zend_hash_destroy(&intern->storage); - - if (intern->gcdata != NULL) { - efree(intern->gcdata); - } - } /* }}} */ static int spl_object_storage_get_hash(zend_hash_key *key, spl_SplObjectStorage *intern, zval *obj) { @@ -285,23 +278,16 @@ static inline HashTable* spl_object_storage_debug_info(zend_object *obj) /* {{{ /* overridden for garbage collection */ static HashTable *spl_object_storage_get_gc(zend_object *obj, zval **table, int *n) /* {{{ */ { - int i = 0; spl_SplObjectStorage *intern = spl_object_storage_from_obj(obj); spl_SplObjectStorageElement *element; - - if (intern->storage.nNumOfElements * 2 > intern->gcdata_num) { - intern->gcdata_num = intern->storage.nNumOfElements * 2; - intern->gcdata = (zval*)erealloc(intern->gcdata, sizeof(zval) * intern->gcdata_num); - } + zend_get_gc_buffer *gc_buffer = zend_get_gc_buffer_create(); ZEND_HASH_FOREACH_PTR(&intern->storage, element) { - ZVAL_COPY_VALUE(&intern->gcdata[i++], &element->obj); - ZVAL_COPY_VALUE(&intern->gcdata[i++], &element->inf); + zend_get_gc_buffer_add_zval(gc_buffer, &element->obj); + zend_get_gc_buffer_add_zval(gc_buffer, &element->inf); } ZEND_HASH_FOREACH_END(); - *table = intern->gcdata; - *n = i; - + zend_get_gc_buffer_use(gc_buffer, table, n); return zend_std_get_properties(obj); } /* }}} */ From b64aee97069fc77c141c787e5408d9e12f5971b4 Mon Sep 17 00:00:00 2001 From: Vladyslav Startsev <17382248+vladyslavstartsev@users.noreply.github.com> Date: Sat, 25 Apr 2020 02:18:09 +0300 Subject: [PATCH 272/338] Ensure bcmath scale is between 0 and INT_MAX Make sure bcmatch scale is between 0 and INT_MAX, both for the ini setting, and all the functions accepting a scale argument. A ValueError is thrown if a function argument is out of range. Closes GH-5455. --- ext/bcmath/bcmath.c | 112 ++++++++++++++++----- ext/bcmath/php_bcmath.h | 2 +- ext/bcmath/tests/bcscale_variation001.phpt | 9 +- ext/bcmath/tests/bug60377.phpt | 10 +- ext/bcmath/tests/bug72093.phpt | 10 +- ext/bcmath/tests/negative_scale.phpt | 70 +++++++++++++ 6 files changed, 177 insertions(+), 36 deletions(-) create mode 100644 ext/bcmath/tests/negative_scale.phpt diff --git a/ext/bcmath/bcmath.c b/ext/bcmath/bcmath.c index 8c46ee0f9344e..61ee95b2118a2 100644 --- a/ext/bcmath/bcmath.c +++ b/ext/bcmath/bcmath.c @@ -45,7 +45,7 @@ zend_module_entry bcmath_module_entry = { PHP_BCMATH_VERSION, PHP_MODULE_GLOBALS(bcmath), PHP_GINIT(bcmath), - PHP_GSHUTDOWN(bcmath), + PHP_GSHUTDOWN(bcmath), NULL, STANDARD_MODULE_PROPERTIES_EX }; @@ -57,9 +57,25 @@ ZEND_TSRMLS_CACHE_DEFINE() ZEND_GET_MODULE(bcmath) #endif +ZEND_INI_MH(OnUpdateScale) +{ + int *p; + zend_long tmp; + + tmp = zend_atol(ZSTR_VAL(new_value), ZSTR_LEN(new_value)); + if (tmp < 0 || tmp > INT_MAX) { + return FAILURE; + } + + p = (int *) ZEND_INI_GET_ADDR(); + *p = (int) tmp; + + return SUCCESS; +} + /* {{{ PHP_INI */ PHP_INI_BEGIN() - STD_PHP_INI_ENTRY("bcmath.scale", "0", PHP_INI_ALL, OnUpdateLongGEZero, bc_precision, zend_bcmath_globals, bcmath_globals) + STD_PHP_INI_ENTRY("bcmath.scale", "0", PHP_INI_ALL, OnUpdateScale, bc_precision, zend_bcmath_globals, bcmath_globals) PHP_INI_END() /* }}} */ @@ -142,7 +158,7 @@ PHP_FUNCTION(bcadd) zend_string *left, *right; zend_long scale_param = 0; bc_num first, second, result; - int scale = (int)BCG(bc_precision); + int scale = BCG(bc_precision); ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(left) @@ -152,7 +168,11 @@ PHP_FUNCTION(bcadd) ZEND_PARSE_PARAMETERS_END(); if (ZEND_NUM_ARGS() == 3) { - scale = (int) (scale_param < 0 ? 0 : scale_param); + if (scale_param < 0 || scale_param > INT_MAX) { + zend_argument_value_error(3, "must be between 0 and %d", INT_MAX); + RETURN_THROWS(); + } + scale = (int) scale_param; } bc_init_num(&first); @@ -177,7 +197,7 @@ PHP_FUNCTION(bcsub) zend_string *left, *right; zend_long scale_param = 0; bc_num first, second, result; - int scale = (int)BCG(bc_precision); + int scale = BCG(bc_precision); ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(left) @@ -187,7 +207,11 @@ PHP_FUNCTION(bcsub) ZEND_PARSE_PARAMETERS_END(); if (ZEND_NUM_ARGS() == 3) { - scale = (int) ((int)scale_param < 0 ? 0 : scale_param); + if (scale_param < 0 || scale_param > INT_MAX) { + zend_argument_value_error(3, "must be between 0 and %d", INT_MAX); + RETURN_THROWS(); + } + scale = (int) scale_param; } bc_init_num(&first); @@ -212,7 +236,7 @@ PHP_FUNCTION(bcmul) zend_string *left, *right; zend_long scale_param = 0; bc_num first, second, result; - int scale = (int)BCG(bc_precision); + int scale = BCG(bc_precision); ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(left) @@ -222,7 +246,11 @@ PHP_FUNCTION(bcmul) ZEND_PARSE_PARAMETERS_END(); if (ZEND_NUM_ARGS() == 3) { - scale = (int) ((int)scale_param < 0 ? 0 : scale_param); + if (scale_param < 0 || scale_param > INT_MAX) { + zend_argument_value_error(3, "must be between 0 and %d", INT_MAX); + RETURN_THROWS(); + } + scale = (int) scale_param; } bc_init_num(&first); @@ -247,7 +275,7 @@ PHP_FUNCTION(bcdiv) zend_string *left, *right; zend_long scale_param = 0; bc_num first, second, result; - int scale = (int)BCG(bc_precision); + int scale = BCG(bc_precision); ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(left) @@ -257,7 +285,11 @@ PHP_FUNCTION(bcdiv) ZEND_PARSE_PARAMETERS_END(); if (ZEND_NUM_ARGS() == 3) { - scale = (int) ((int)scale_param < 0 ? 0 : scale_param); + if (scale_param < 0 || scale_param > INT_MAX) { + zend_argument_value_error(3, "must be between 0 and %d", INT_MAX); + RETURN_THROWS(); + } + scale = (int) scale_param; } bc_init_num(&first); @@ -289,7 +321,7 @@ PHP_FUNCTION(bcmod) zend_string *left, *right; zend_long scale_param = 0; bc_num first, second, result; - int scale = (int)BCG(bc_precision); + int scale = BCG(bc_precision); ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(left) @@ -299,7 +331,11 @@ PHP_FUNCTION(bcmod) ZEND_PARSE_PARAMETERS_END(); if (ZEND_NUM_ARGS() == 3) { - scale = (int) ((int)scale_param < 0 ? 0 : scale_param); + if (scale_param < 0 || scale_param > INT_MAX) { + zend_argument_value_error(3, "must be between 0 and %d", INT_MAX); + RETURN_THROWS(); + } + scale = (int) scale_param; } bc_init_num(&first); @@ -329,18 +365,26 @@ PHP_FUNCTION(bcmod) PHP_FUNCTION(bcpowmod) { zend_string *left, *right, *modulus; + zend_long scale_param = 0; bc_num first, second, mod, result; - zend_long scale = BCG(bc_precision); - int scale_int; + int scale = BCG(bc_precision); ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_STR(left) Z_PARAM_STR(right) Z_PARAM_STR(modulus) Z_PARAM_OPTIONAL - Z_PARAM_LONG(scale) + Z_PARAM_LONG(scale_param) ZEND_PARSE_PARAMETERS_END(); + if (ZEND_NUM_ARGS() == 4) { + if (scale_param < 0 || scale_param > INT_MAX) { + zend_argument_value_error(4, "must be between 0 and %d", INT_MAX); + RETURN_THROWS(); + } + scale = (int) scale_param; + } + bc_init_num(&first); bc_init_num(&second); bc_init_num(&mod); @@ -349,10 +393,8 @@ PHP_FUNCTION(bcpowmod) php_str2num(&second, ZSTR_VAL(right)); php_str2num(&mod, ZSTR_VAL(modulus)); - scale_int = (int) ((int)scale < 0 ? 0 : scale); - - if (bc_raisemod(first, second, mod, &result, scale_int) != -1) { - RETVAL_STR(bc_num2str_ex(result, scale_int)); + if (bc_raisemod(first, second, mod, &result, scale) != -1) { + RETVAL_STR(bc_num2str_ex(result, scale)); } else { RETVAL_FALSE; } @@ -372,7 +414,7 @@ PHP_FUNCTION(bcpow) zend_string *left, *right; zend_long scale_param = 0; bc_num first, second, result; - int scale = (int)BCG(bc_precision); + int scale = BCG(bc_precision); ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(left) @@ -382,7 +424,11 @@ PHP_FUNCTION(bcpow) ZEND_PARSE_PARAMETERS_END(); if (ZEND_NUM_ARGS() == 3) { - scale = (int) ((int)scale_param < 0 ? 0 : scale_param); + if (scale_param < 0 || scale_param > INT_MAX) { + zend_argument_value_error(3, "must be between 0 and %d", INT_MAX); + RETURN_THROWS(); + } + scale = (int) scale_param; } bc_init_num(&first); @@ -407,7 +453,7 @@ PHP_FUNCTION(bcsqrt) zend_string *left; zend_long scale_param = 0; bc_num result; - int scale = (int)BCG(bc_precision); + int scale = BCG(bc_precision); ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(left) @@ -416,7 +462,11 @@ PHP_FUNCTION(bcsqrt) ZEND_PARSE_PARAMETERS_END(); if (ZEND_NUM_ARGS() == 2) { - scale = (int) ((int)scale_param < 0 ? 0 : scale_param); + if (scale_param < 0 || scale_param > INT_MAX) { + zend_argument_value_error(2, "must be between 0 and %d", INT_MAX); + RETURN_THROWS(); + } + scale = (int) scale_param; } bc_init_num(&result); @@ -440,7 +490,7 @@ PHP_FUNCTION(bccomp) zend_string *left, *right; zend_long scale_param = 0; bc_num first, second; - int scale = (int)BCG(bc_precision); + int scale = BCG(bc_precision); ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(left) @@ -450,7 +500,11 @@ PHP_FUNCTION(bccomp) ZEND_PARSE_PARAMETERS_END(); if (ZEND_NUM_ARGS() == 3) { - scale = (int) ((int)scale_param < 0 ? 0 : scale_param); + if (scale_param < 0 || scale_param > INT_MAX) { + zend_argument_value_error(3, "must be between 0 and %d", INT_MAX); + RETURN_THROWS(); + } + scale = (int) scale_param; } bc_init_num(&first); @@ -460,7 +514,7 @@ PHP_FUNCTION(bccomp) php_error_docref(NULL, E_WARNING, "bcmath function argument is not well-formed"); } if (!bc_str2num(&second, ZSTR_VAL(right), scale)) { - php_error_docref(NULL, E_WARNING, "bcmath function argument is not well-formed"); + php_error_docref(NULL, E_WARNING, "bcmath function argument is not well-formed"); } RETVAL_LONG(bc_compare(first, second)); @@ -484,7 +538,11 @@ PHP_FUNCTION(bcscale) old_scale = BCG(bc_precision); if (ZEND_NUM_ARGS() == 1) { - BCG(bc_precision) = ((int)new_scale < 0) ? 0 : new_scale; + if (new_scale < 0 || new_scale > INT_MAX) { + zend_argument_value_error(1, "must be between 0 and %d", INT_MAX); + RETURN_THROWS(); + } + BCG(bc_precision) = (int) new_scale; } RETURN_LONG(old_scale); diff --git a/ext/bcmath/php_bcmath.h b/ext/bcmath/php_bcmath.h index bafaf29e7a8eb..c7a8a85d735e2 100644 --- a/ext/bcmath/php_bcmath.h +++ b/ext/bcmath/php_bcmath.h @@ -33,7 +33,7 @@ ZEND_BEGIN_MODULE_GLOBALS(bcmath) bc_num _zero_; bc_num _one_; bc_num _two_; - zend_long bc_precision; + int bc_precision; ZEND_END_MODULE_GLOBALS(bcmath) #if defined(ZTS) && defined(COMPILE_DL_BCMATH) diff --git a/ext/bcmath/tests/bcscale_variation001.phpt b/ext/bcmath/tests/bcscale_variation001.phpt index 51c6767bd47bb..0718d724c2ae2 100644 --- a/ext/bcmath/tests/bcscale_variation001.phpt +++ b/ext/bcmath/tests/bcscale_variation001.phpt @@ -1,13 +1,18 @@ --TEST-- -bcscale() with negative argument +bcscale() fails with negative argument --SKIPIF-- --INI-- bcmath.scale=0 --FILE-- getMessage() . \PHP_EOL; +} ?> --EXPECT-- 5 +bcscale(): Argument #1 ($scale) must be between 0 and 2147483647 diff --git a/ext/bcmath/tests/bug60377.phpt b/ext/bcmath/tests/bug60377.phpt index eb140d92cf718..6caf7d466182a 100644 --- a/ext/bcmath/tests/bug60377.phpt +++ b/ext/bcmath/tests/bug60377.phpt @@ -5,10 +5,14 @@ bcscale related problem on 64bits platforms if (PHP_INT_SIZE != 8) die("skip: 64-bit only"); ?> --FILE-- getMessage() . \PHP_EOL; +} $var67 = bcsqrt(0); $var414 = bcadd(0,-1,10); -die('ALIVE'); ?> + --EXPECT-- -ALIVE +bcscale(): Argument #1 ($scale) must be between 0 and 2147483647 diff --git a/ext/bcmath/tests/bug72093.phpt b/ext/bcmath/tests/bug72093.phpt index 235a4e04a3e05..7111bf6e3aca8 100644 --- a/ext/bcmath/tests/bug72093.phpt +++ b/ext/bcmath/tests/bug72093.phpt @@ -1,16 +1,20 @@ --TEST-- -Bug 72093: bcpowmod accepts negative scale and corrupts _one_ definition +Bug 72093: bcpowmod fails on negative scale and corrupts _one_ definition --SKIPIF-- --FILE-- getMessage() . \PHP_EOL; +} var_dump(bcpowmod(1, 1.2, 1, 1)); ?> --EXPECTF-- -string(1) "1" +bcpowmod(): Argument #4 ($scale) must be between 0 and 2147483647 Warning: bcpowmod(): Non-zero scale in exponent in %s on line %d string(3) "0.0" diff --git a/ext/bcmath/tests/negative_scale.phpt b/ext/bcmath/tests/negative_scale.phpt new file mode 100644 index 0000000000000..96d1e1b600ff0 --- /dev/null +++ b/ext/bcmath/tests/negative_scale.phpt @@ -0,0 +1,70 @@ +--TEST-- +all errors on negative scale +--SKIPIF-- + +--INI-- +bcmath.scale=0 +--FILE-- +getMessage() . \PHP_EOL; +} +try { + bcsub('1','2',-1); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} +try { + bcmul('1','2',-1); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} +try { + bcdiv('1','2',-1); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} +try { + bcmod('1','2',-1); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} +try { + bcpowmod('1', '2', '3', -9); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} +try { + bcpow('1', '2', -1); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} +try { + bcsqrt('9', -1); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} +try { + bccomp('1', '2', -1); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} +try { + bcscale(-1); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} +?> +--EXPECT-- +bcadd(): Argument #3 ($scale) must be between 0 and 2147483647 +bcsub(): Argument #3 ($scale) must be between 0 and 2147483647 +bcmul(): Argument #3 ($scale) must be between 0 and 2147483647 +bcdiv(): Argument #3 ($scale) must be between 0 and 2147483647 +bcmod(): Argument #3 ($scale) must be between 0 and 2147483647 +bcpowmod(): Argument #4 ($scale) must be between 0 and 2147483647 +bcpow(): Argument #3 ($scale) must be between 0 and 2147483647 +bcsqrt(): Argument #2 ($scale) must be between 0 and 2147483647 +bccomp(): Argument #3 ($scale) must be between 0 and 2147483647 +bcscale(): Argument #1 ($scale) must be between 0 and 2147483647 From bbb8b95dbd12aba5524547f93858331ad2d95cbf Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 26 Apr 2020 00:03:44 +0200 Subject: [PATCH 273/338] Remove duplicate tests Remove duplicate test (iterator_018.phpt) This is exactly the same as iterator_011.phpt. Remove duplicate test (offsets_chaining_2.phpt) This is exactly the same as offsets_chaining_1.phpt. Remove duplicate test (offsets_chaining_4.phpt) This is exactly the same as offsets_chaining_3.phpt. Remove duplicate test (ReflectionObject_export_basic1.phpt) This is exactly the same as ReflectionObject___toString_basic1.phpt. Remove duplicate test (ReflectionObject_export_basic2.phpt) This is exactly the same as ReflectionObject___toString_basic2.phpt. Closes GH-5467. --- .../tests/ReflectionObject_export_basic1.phpt | 36 -------------- .../tests/ReflectionObject_export_basic2.phpt | 39 --------------- ext/spl/tests/iterator_018.phpt | 48 ------------------- tests/strings/offsets_chaining_2.phpt | 9 ---- tests/strings/offsets_chaining_4.phpt | 9 ---- 5 files changed, 141 deletions(-) delete mode 100644 ext/reflection/tests/ReflectionObject_export_basic1.phpt delete mode 100644 ext/reflection/tests/ReflectionObject_export_basic2.phpt delete mode 100644 ext/spl/tests/iterator_018.phpt delete mode 100644 tests/strings/offsets_chaining_2.phpt delete mode 100644 tests/strings/offsets_chaining_4.phpt diff --git a/ext/reflection/tests/ReflectionObject_export_basic1.phpt b/ext/reflection/tests/ReflectionObject_export_basic1.phpt deleted file mode 100644 index 9da648f3a2b3a..0000000000000 --- a/ext/reflection/tests/ReflectionObject_export_basic1.phpt +++ /dev/null @@ -1,36 +0,0 @@ ---TEST-- -ReflectionObject::__toString() : very basic test with no dynamic properties ---FILE-- - ---EXPECTF-- -Object of class [ class Foo ] { - @@ %s 3-5 - - - Constants [0] { - } - - - Static properties [0] { - } - - - Static methods [0] { - } - - - Properties [1] { - Property [ public $bar = 1 ] - } - - - Dynamic properties [0] { - } - - - Methods [0] { - } -} diff --git a/ext/reflection/tests/ReflectionObject_export_basic2.phpt b/ext/reflection/tests/ReflectionObject_export_basic2.phpt deleted file mode 100644 index e93dd9b331a29..0000000000000 --- a/ext/reflection/tests/ReflectionObject_export_basic2.phpt +++ /dev/null @@ -1,39 +0,0 @@ ---TEST-- -ReflectionObject::__toString() : very basic test with dynamic properties ---FILE-- -dynProp = 'hello'; -$f->dynProp2 = 'hello again'; -echo new ReflectionObject($f); - -?> ---EXPECTF-- -Object of class [ class Foo ] { - @@ %s 3-5 - - - Constants [0] { - } - - - Static properties [0] { - } - - - Static methods [0] { - } - - - Properties [1] { - Property [ public $bar = 1 ] - } - - - Dynamic properties [2] { - Property [ public $dynProp ] - Property [ public $dynProp2 ] - } - - - Methods [0] { - } -} diff --git a/ext/spl/tests/iterator_018.phpt b/ext/spl/tests/iterator_018.phpt deleted file mode 100644 index 5d814ce1f7e36..0000000000000 --- a/ext/spl/tests/iterator_018.phpt +++ /dev/null @@ -1,48 +0,0 @@ ---TEST-- -SPL: InfiniteIterator ---FILE-- -$val) -{ - echo "$key=>$val\n"; -} - -echo "===InfiniteIterator===\n"; - -$it = new ArrayIterator(array(0 => 'A', 1 => 'B', 2 => 'C', 3 => 'D')); -$it = new InfiniteIterator($it); -$it = new LimitIterator($it, 2, 5); -foreach($it as $val=>$key) -{ - echo "$val=>$key\n"; -} - -echo "===Infinite/LimitIterator===\n"; - -$it = new ArrayIterator(array(0 => 'A', 1 => 'B', 2 => 'C', 3 => 'D')); -$it = new LimitIterator($it, 1, 2); -$it = new InfiniteIterator($it); -$it = new LimitIterator($it, 2, 5); -foreach($it as $val=>$key) -{ - echo "$val=>$key\n"; -} - -?> ---EXPECT-- -===EmptyIterator=== -===InfiniteIterator=== -2=>C -3=>D -0=>A -1=>B -2=>C -===Infinite/LimitIterator=== -1=>B -2=>C -1=>B -2=>C -1=>B diff --git a/tests/strings/offsets_chaining_2.phpt b/tests/strings/offsets_chaining_2.phpt deleted file mode 100644 index 18b6fa2f9dec3..0000000000000 --- a/tests/strings/offsets_chaining_2.phpt +++ /dev/null @@ -1,9 +0,0 @@ ---TEST-- -testing the behavior of string offset chaining ---FILE-- - ---EXPECT-- -string(1) "f" diff --git a/tests/strings/offsets_chaining_4.phpt b/tests/strings/offsets_chaining_4.phpt deleted file mode 100644 index 12cac5917f186..0000000000000 --- a/tests/strings/offsets_chaining_4.phpt +++ /dev/null @@ -1,9 +0,0 @@ ---TEST-- -testing the behavior of string offset chaining ---FILE-- - ---EXPECT-- -bool(true) From 1baa58317f2bbe46d6a0d36a59fbe298e3006977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=A1vio=20Heleno?= Date: Thu, 23 Apr 2020 22:26:35 -0300 Subject: [PATCH 274/338] Fixed run-tests.php for PHP 7.2 Flexible heredoc syntax is only available since PHP 7.3. Closes GH-5444. --- run-tests.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/run-tests.php b/run-tests.php index b708f73c72b8a..ffdb72a00ee32 100755 --- a/run-tests.php +++ b/run-tests.php @@ -2748,7 +2748,7 @@ function run_test($php, $file, $env) } // write .sh - if (strpos($log_format, 'S') !== false && file_put_contents($sh_filename, << Date: Sat, 25 Apr 2020 01:04:35 +0100 Subject: [PATCH 275/338] Test xml_error_string() and xml_get_error_code() Closes GH-5456. --- ext/xml/tests/xml_error_string_basic.phpt | 38 +++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 ext/xml/tests/xml_error_string_basic.phpt diff --git a/ext/xml/tests/xml_error_string_basic.phpt b/ext/xml/tests/xml_error_string_basic.phpt new file mode 100644 index 0000000000000..e72fa68bd1ad9 --- /dev/null +++ b/ext/xml/tests/xml_error_string_basic.phpt @@ -0,0 +1,38 @@ +--TEST-- +xml_error_string() - Basic test on 5 error codes +--SKIPIF-- + +--FILE-- +', + '', + '', + '', + '', +); + +foreach ($xmls as $xml) { + $xml_parser = xml_parser_create(); + if (!xml_parse($xml_parser, $xml, true)) { + var_dump(xml_get_error_code($xml_parser)); + var_dump(xml_error_string(xml_get_error_code($xml_parser))); + } + xml_parser_free($xml_parser); +} +?> +--EXPECT-- +int(5) +string(20) "Invalid document end" +int(47) +string(35) "Processing Instruction not finished" +int(57) +string(28) "XML declaration not finished" +int(64) +string(17) "Reserved XML Name" +int(76) +string(14) "Mismatched tag" From 74f1547591cfb8244dae3b4afdb6c26164a80772 Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Sun, 26 Apr 2020 06:06:19 +0200 Subject: [PATCH 276/338] Use zend_string in zend_check_magic_method implementation --- Zend/zend_API.c | 48 ++++++++++++++++-------------------------------- 1 file changed, 16 insertions(+), 32 deletions(-) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index c144bf82feac6..636cf703cc427 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -1960,82 +1960,66 @@ ZEND_API zend_module_entry* zend_register_internal_module(zend_module_entry *mod ZEND_API void zend_check_magic_method_implementation(const zend_class_entry *ce, const zend_function *fptr, int error_type) /* {{{ */ { - char lcname[16]; - size_t name_len; + zend_string *lcname; if (ZSTR_VAL(fptr->common.function_name)[0] != '_' || ZSTR_VAL(fptr->common.function_name)[1] != '_') { return; } - /* we don't care if the function name is longer, in fact lowercasing only - * the beginning of the name speeds up the check process */ - name_len = ZSTR_LEN(fptr->common.function_name); - zend_str_tolower_copy(lcname, ZSTR_VAL(fptr->common.function_name), MIN(name_len, sizeof(lcname)-1)); - lcname[sizeof(lcname)-1] = '\0'; /* zend_str_tolower_copy won't necessarily set the zero byte */ + lcname = zend_string_tolower(fptr->common.function_name); - if (name_len == sizeof(ZEND_DESTRUCTOR_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_DESTRUCTOR_FUNC_NAME, sizeof(ZEND_DESTRUCTOR_FUNC_NAME) - 1) && fptr->common.num_args != 0) { + if (zend_string_equals_literal(lcname, ZEND_DESTRUCTOR_FUNC_NAME) && fptr->common.num_args != 0) { zend_error(error_type, "Destructor %s::%s() cannot take arguments", ZSTR_VAL(ce->name), ZEND_DESTRUCTOR_FUNC_NAME); - } else if (name_len == sizeof(ZEND_CLONE_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_CLONE_FUNC_NAME, sizeof(ZEND_CLONE_FUNC_NAME) - 1) && fptr->common.num_args != 0) { + } else if (zend_string_equals_literal(lcname, ZEND_CLONE_FUNC_NAME) && fptr->common.num_args != 0) { zend_error(error_type, "Method %s::%s() cannot accept any arguments", ZSTR_VAL(ce->name), ZEND_CLONE_FUNC_NAME); - } else if (name_len == sizeof(ZEND_GET_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_GET_FUNC_NAME, sizeof(ZEND_GET_FUNC_NAME) - 1)) { + } else if (zend_string_equals_literal(lcname, ZEND_GET_FUNC_NAME)) { if (fptr->common.num_args != 1) { zend_error(error_type, "Method %s::%s() must take exactly 1 argument", ZSTR_VAL(ce->name), ZEND_GET_FUNC_NAME); } else if (QUICK_ARG_SHOULD_BE_SENT_BY_REF(fptr, 1)) { zend_error(error_type, "Method %s::%s() cannot take arguments by reference", ZSTR_VAL(ce->name), ZEND_GET_FUNC_NAME); } - } else if (name_len == sizeof(ZEND_SET_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_SET_FUNC_NAME, sizeof(ZEND_SET_FUNC_NAME) - 1)) { + } else if (zend_string_equals_literal(lcname, ZEND_SET_FUNC_NAME)) { if (fptr->common.num_args != 2) { zend_error(error_type, "Method %s::%s() must take exactly 2 arguments", ZSTR_VAL(ce->name), ZEND_SET_FUNC_NAME); } else if (QUICK_ARG_SHOULD_BE_SENT_BY_REF(fptr, 1) || QUICK_ARG_SHOULD_BE_SENT_BY_REF(fptr, 2)) { zend_error(error_type, "Method %s::%s() cannot take arguments by reference", ZSTR_VAL(ce->name), ZEND_SET_FUNC_NAME); } - } else if (name_len == sizeof(ZEND_UNSET_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_UNSET_FUNC_NAME, sizeof(ZEND_UNSET_FUNC_NAME) - 1)) { + } else if (zend_string_equals_literal(lcname, ZEND_UNSET_FUNC_NAME)) { if (fptr->common.num_args != 1) { zend_error(error_type, "Method %s::%s() must take exactly 1 argument", ZSTR_VAL(ce->name), ZEND_UNSET_FUNC_NAME); } else if (QUICK_ARG_SHOULD_BE_SENT_BY_REF(fptr, 1)) { zend_error(error_type, "Method %s::%s() cannot take arguments by reference", ZSTR_VAL(ce->name), ZEND_UNSET_FUNC_NAME); } - } else if (name_len == sizeof(ZEND_ISSET_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_ISSET_FUNC_NAME, sizeof(ZEND_ISSET_FUNC_NAME) - 1)) { + } else if (zend_string_equals_literal(lcname, ZEND_ISSET_FUNC_NAME)) { if (fptr->common.num_args != 1) { zend_error(error_type, "Method %s::%s() must take exactly 1 argument", ZSTR_VAL(ce->name), ZEND_ISSET_FUNC_NAME); } else if (QUICK_ARG_SHOULD_BE_SENT_BY_REF(fptr, 1)) { zend_error(error_type, "Method %s::%s() cannot take arguments by reference", ZSTR_VAL(ce->name), ZEND_ISSET_FUNC_NAME); } - } else if (name_len == sizeof(ZEND_CALL_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_CALL_FUNC_NAME, sizeof(ZEND_CALL_FUNC_NAME) - 1)) { + } else if (zend_string_equals_literal(lcname, ZEND_CALL_FUNC_NAME)) { if (fptr->common.num_args != 2) { zend_error(error_type, "Method %s::%s() must take exactly 2 arguments", ZSTR_VAL(ce->name), ZEND_CALL_FUNC_NAME); } else if (QUICK_ARG_SHOULD_BE_SENT_BY_REF(fptr, 1) || QUICK_ARG_SHOULD_BE_SENT_BY_REF(fptr, 2)) { zend_error(error_type, "Method %s::%s() cannot take arguments by reference", ZSTR_VAL(ce->name), ZEND_CALL_FUNC_NAME); } - } else if (name_len == sizeof(ZEND_CALLSTATIC_FUNC_NAME) - 1 && - !memcmp(lcname, ZEND_CALLSTATIC_FUNC_NAME, sizeof(ZEND_CALLSTATIC_FUNC_NAME)-1) - ) { + } else if (zend_string_equals_literal(lcname, ZEND_CALLSTATIC_FUNC_NAME)) { if (fptr->common.num_args != 2) { zend_error(error_type, "Method %s::__callStatic() must take exactly 2 arguments", ZSTR_VAL(ce->name)); } else if (QUICK_ARG_SHOULD_BE_SENT_BY_REF(fptr, 1) || QUICK_ARG_SHOULD_BE_SENT_BY_REF(fptr, 2)) { zend_error(error_type, "Method %s::__callStatic() cannot take arguments by reference", ZSTR_VAL(ce->name)); } - } else if (name_len == sizeof(ZEND_TOSTRING_FUNC_NAME) - 1 && - !memcmp(lcname, ZEND_TOSTRING_FUNC_NAME, sizeof(ZEND_TOSTRING_FUNC_NAME)-1) && fptr->common.num_args != 0 - ) { + } else if (zend_string_equals_literal(lcname, ZEND_TOSTRING_FUNC_NAME) && fptr->common.num_args != 0) { zend_error(error_type, "Method %s::__toString() cannot take arguments", ZSTR_VAL(ce->name)); - } else if (name_len == sizeof(ZEND_DEBUGINFO_FUNC_NAME) - 1 && - !memcmp(lcname, ZEND_DEBUGINFO_FUNC_NAME, sizeof(ZEND_DEBUGINFO_FUNC_NAME)-1) && fptr->common.num_args != 0) { + } else if (zend_string_equals_literal(lcname, ZEND_DEBUGINFO_FUNC_NAME) && fptr->common.num_args != 0) { zend_error(error_type, "Method %s::__debugInfo() cannot take arguments", ZSTR_VAL(ce->name)); - } else if ( - name_len == sizeof("__serialize") - 1 - && !memcmp(lcname, "__serialize", sizeof("__serialize") - 1) - && fptr->common.num_args != 0 - ) { + } else if (zend_string_equals_literal(lcname, "__serialize") && fptr->common.num_args != 0) { zend_error(error_type, "Method %s::__serialize() cannot take arguments", ZSTR_VAL(ce->name)); - } else if ( - name_len == sizeof("__unserialize") - 1 - && !memcmp(lcname, "__unserialize", sizeof("__unserialize") - 1) - && fptr->common.num_args != 1 - ) { + } else if (zend_string_equals_literal(lcname, "__unserialize") && fptr->common.num_args != 1) { zend_error(error_type, "Method %s::__unserialize() must take exactly 1 argument", ZSTR_VAL(ce->name)); } + + zend_string_release_ex(lcname, 0); } /* }}} */ From fd00c7cf10f68e9ebe31a6b8ec563e5aeb80a535 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 27 Apr 2020 12:33:29 +0200 Subject: [PATCH 277/338] Pass existing lcname to check_magic_method_implementation --- Zend/zend_API.c | 11 +++-------- Zend/zend_API.h | 3 ++- Zend/zend_compile.c | 10 ++++++---- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 636cf703cc427..4aa76ca111036 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -1958,17 +1958,13 @@ ZEND_API zend_module_entry* zend_register_internal_module(zend_module_entry *mod } /* }}} */ -ZEND_API void zend_check_magic_method_implementation(const zend_class_entry *ce, const zend_function *fptr, int error_type) /* {{{ */ +ZEND_API void zend_check_magic_method_implementation(const zend_class_entry *ce, const zend_function *fptr, zend_string *lcname, int error_type) /* {{{ */ { - zend_string *lcname; - if (ZSTR_VAL(fptr->common.function_name)[0] != '_' || ZSTR_VAL(fptr->common.function_name)[1] != '_') { return; } - lcname = zend_string_tolower(fptr->common.function_name); - if (zend_string_equals_literal(lcname, ZEND_DESTRUCTOR_FUNC_NAME) && fptr->common.num_args != 0) { zend_error(error_type, "Destructor %s::%s() cannot take arguments", ZSTR_VAL(ce->name), ZEND_DESTRUCTOR_FUNC_NAME); } else if (zend_string_equals_literal(lcname, ZEND_CLONE_FUNC_NAME) && fptr->common.num_args != 0) { @@ -2018,8 +2014,6 @@ ZEND_API void zend_check_magic_method_implementation(const zend_class_entry *ce, } else if (zend_string_equals_literal(lcname, "__unserialize") && fptr->common.num_args != 1) { zend_error(error_type, "Method %s::__unserialize() must take exactly 1 argument", ZSTR_VAL(ce->name)); } - - zend_string_release_ex(lcname, 0); } /* }}} */ @@ -2237,7 +2231,8 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio reg_function = NULL; } if (reg_function) { - zend_check_magic_method_implementation(scope, reg_function, error_type); + zend_check_magic_method_implementation( + scope, reg_function, lowercase_name, error_type); } } ptr++; diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 44c24bbca17eb..51353ad710c15 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -319,7 +319,8 @@ ZEND_API int zend_startup_module_ex(zend_module_entry *module); ZEND_API int zend_startup_modules(void); ZEND_API void zend_collect_module_handlers(void); ZEND_API void zend_destroy_modules(void); -ZEND_API void zend_check_magic_method_implementation(const zend_class_entry *ce, const zend_function *fptr, int error_type); +ZEND_API void zend_check_magic_method_implementation( + const zend_class_entry *ce, const zend_function *fptr, zend_string *lcname, int error_type); ZEND_API zend_class_entry *zend_register_internal_class(zend_class_entry *class_entry); ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *class_entry, zend_class_entry *parent_ce); diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 381a180f2953c..a83d4d3d180c1 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -6070,7 +6070,7 @@ static void add_stringable_interface(zend_class_entry *ce) { zend_string_init("stringable", sizeof("stringable") - 1, 0); } -void zend_begin_method_decl(zend_op_array *op_array, zend_string *name, zend_bool has_body) /* {{{ */ +zend_string *zend_begin_method_decl(zend_op_array *op_array, zend_string *name, zend_bool has_body) /* {{{ */ { zend_class_entry *ce = CG(active_class_entry); zend_bool in_interface = (ce->ce_flags & ZEND_ACC_INTERFACE) != 0; @@ -6163,7 +6163,7 @@ void zend_begin_method_decl(zend_op_array *op_array, zend_string *name, zend_boo zend_check_magic_method_attr(fn_flags, ce, "__unserialize", 0); } - zend_string_release_ex(lcname, 0); + return lcname; } /* }}} */ @@ -6236,6 +6236,7 @@ void zend_compile_func_decl(znode *result, zend_ast *ast, zend_bool toplevel) /* zend_ast *stmt_ast = decl->child[2]; zend_ast *return_type_ast = decl->child[3]; zend_bool is_method = decl->kind == ZEND_AST_METHOD; + zend_string *method_lcname; zend_class_entry *orig_class_entry = CG(active_class_entry); zend_op_array *orig_op_array = CG(active_op_array); @@ -6268,7 +6269,7 @@ void zend_compile_func_decl(znode *result, zend_ast *ast, zend_bool toplevel) /* if (is_method) { zend_bool has_body = stmt_ast != NULL; - zend_begin_method_decl(op_array, decl->name, has_body); + method_lcname = zend_begin_method_decl(op_array, decl->name, has_body); } else { zend_begin_func_decl(result, op_array, decl, toplevel); if (decl->kind == ZEND_AST_ARROW_FUNC) { @@ -6323,7 +6324,8 @@ void zend_compile_func_decl(znode *result, zend_ast *ast, zend_bool toplevel) /* if (is_method) { zend_check_magic_method_implementation( - CG(active_class_entry), (zend_function *) op_array, E_COMPILE_ERROR); + CG(active_class_entry), (zend_function *) op_array, method_lcname, E_COMPILE_ERROR); + zend_string_release_ex(method_lcname, 0); } /* put the implicit return on the really last line */ From a447897db08ebed361a7d18c8ea0d10089040460 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 27 Apr 2020 12:50:24 +0200 Subject: [PATCH 278/338] Use information about classes returned by internal functions --- ext/opcache/Optimizer/zend_func_info.c | 12 +++++++++--- ext/opcache/Optimizer/zend_func_info.h | 4 +++- ext/opcache/Optimizer/zend_inference.c | 15 ++++++--------- ext/opcache/jit/zend_jit_x86.dasc | 4 +++- 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index c9c567ffbfe34..880e2238d4304 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -886,10 +886,14 @@ static const func_info_t func_infos[] = { static HashTable func_info; int zend_func_info_rid = -1; -uint32_t zend_get_func_info(const zend_call_info *call_info, const zend_ssa *ssa) +uint32_t zend_get_func_info( + const zend_call_info *call_info, const zend_ssa *ssa, + zend_class_entry **ce, zend_bool *ce_is_instanceof) { uint32_t ret = 0; const zend_function *callee_func = call_info->callee_func; + *ce = NULL; + *ce_is_instanceof = 0; if (callee_func->type == ZEND_INTERNAL_FUNCTION) { zval *zv; @@ -909,8 +913,8 @@ uint32_t zend_get_func_info(const zend_call_info *call_info, const zend_ssa *ssa } if (callee_func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) { - zend_class_entry *ce; // TODO: Use the CE. - ret = zend_fetch_arg_info_type(NULL, callee_func->common.arg_info - 1, &ce); + ret = zend_fetch_arg_info_type(NULL, callee_func->common.arg_info - 1, ce); + *ce_is_instanceof = 1; } else { #if 0 fprintf(stderr, "Unknown internal function '%s'\n", func->common.function_name); @@ -926,6 +930,8 @@ uint32_t zend_get_func_info(const zend_call_info *call_info, const zend_ssa *ssa zend_func_info *info = ZEND_FUNC_INFO((zend_op_array*)callee_func); if (info) { ret = info->return_info.type; + *ce = info->return_info.ce; + *ce_is_instanceof = info->return_info.is_instanceof; } if (!ret) { ret = MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF diff --git a/ext/opcache/Optimizer/zend_func_info.h b/ext/opcache/Optimizer/zend_func_info.h index 0f4fcea092de0..9599c29fa19f7 100644 --- a/ext/opcache/Optimizer/zend_func_info.h +++ b/ext/opcache/Optimizer/zend_func_info.h @@ -49,7 +49,9 @@ BEGIN_EXTERN_C() extern int zend_func_info_rid; -uint32_t zend_get_func_info(const zend_call_info *call_info, const zend_ssa *ssa); +uint32_t zend_get_func_info( + const zend_call_info *call_info, const zend_ssa *ssa, + zend_class_entry **ce, zend_bool *ce_is_instanceof); int zend_func_info_startup(void); int zend_func_info_shutdown(void); diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c index f868f78265d64..af8a3996de2d3 100644 --- a/ext/opcache/Optimizer/zend_inference.c +++ b/ext/opcache/Optimizer/zend_inference.c @@ -3436,16 +3436,13 @@ static zend_always_inline int _zend_update_type_info( if (!call_info) { goto unknown_opcode; } - tmp = zend_get_func_info(call_info, ssa); + + zend_class_entry *ce; + zend_bool ce_is_instanceof; + tmp = zend_get_func_info(call_info, ssa, &ce, &ce_is_instanceof); UPDATE_SSA_TYPE(tmp, ssa_op->result_def); - if (call_info->callee_func->type == ZEND_USER_FUNCTION) { - func_info = ZEND_FUNC_INFO(&call_info->callee_func->op_array); - if (func_info) { - UPDATE_SSA_OBJ_TYPE( - func_info->return_info.ce, - func_info->return_info.is_instanceof, - ssa_op->result_def); - } + if (ce) { + UPDATE_SSA_OBJ_TYPE(ce, ce_is_instanceof, ssa_op->result_def); } } break; diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 6ba439239b32c..173b83164208a 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -8463,8 +8463,10 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend |1: if (!RETURN_VALUE_USED(opline)) { + zend_class_entry *ce; + zend_bool ce_is_instanceof; uint32_t func_info = call_info ? - zend_get_func_info(call_info, ssa) : + zend_get_func_info(call_info, ssa, &ce, &ce_is_instanceof) : (MAY_BE_ANY|MAY_BE_REF|MAY_BE_RC1|MAY_BE_RCN); if (func_info & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF)) { From 58005d7b42a871260b07805f0981ac2b690d6607 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Mon, 27 Apr 2020 20:31:06 +0800 Subject: [PATCH 279/338] Remove unnecessary register qualifier --- Zend/zend_operators.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 109a1c58d8dac..81f758e229843 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -2463,7 +2463,7 @@ ZEND_API void zend_update_current_locale(void) /* {{{ */ static zend_always_inline void zend_str_tolower_impl(char *dest, const char *str, size_t length) /* {{{ */ { register unsigned char *p = (unsigned char*)str; register unsigned char *q = (unsigned char*)dest; - register unsigned char *end = p + length; + unsigned char *end = p + length; #ifdef __SSE2__ if (length >= 16) { const __m128i _A = _mm_set1_epi8('A' - 1); From af67b06995619ecadce4180fbeb49e851c8ec999 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 27 Apr 2020 10:26:51 +0200 Subject: [PATCH 280/338] SessionUpdateTimestampHandler class was never implemented It seems that in 2015, work was being done so that users could add their own custom session handlers. The implementer intended to add a class called SessionUpdateTimestampHandler, but never did so. The variable which was intended to point to its class entry is never initialized. The implementer also coded two methods for this class. Strangely, the method bodies are declared with PHP_METHOD(SessionHandler, ...) rather than PHP(SessionUpdateTimestampHandler, ...). However, these method implementations are not added to the method table of any class or interface. They are just dead code. --- ext/session/mod_user_class.c | 34 ---------------------------------- ext/session/php_session.h | 2 -- ext/session/session.c | 3 --- 3 files changed, 39 deletions(-) diff --git a/ext/session/mod_user_class.c b/ext/session/mod_user_class.c index 1415b407a5125..f1a90912516b1 100644 --- a/ext/session/mod_user_class.c +++ b/ext/session/mod_user_class.c @@ -176,37 +176,3 @@ PHP_METHOD(SessionHandler, create_sid) RETURN_STR(id); } /* }}} */ - -/* {{{ proto char SessionUpdateTimestampHandler::validateId(string id) - Simply return TRUE */ -PHP_METHOD(SessionHandler, validateId) -{ - zend_string *key; - - PS_SANITY_CHECK_IS_OPEN; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &key) == FAILURE) { - RETURN_THROWS(); - } - - /* Legacy save handler may not support validate_sid API. Return TRUE. */ - RETURN_TRUE; -} -/* }}} */ - -/* {{{ proto bool SessionUpdateTimestampHandler::updateTimestamp(string id, string data) - Simply call update_timestamp */ -PHP_METHOD(SessionHandler, updateTimestamp) -{ - zend_string *key, *val; - - PS_SANITY_CHECK_IS_OPEN; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "SS", &key, &val) == FAILURE) { - RETURN_THROWS(); - } - - /* Legacy save handler may not support update_timestamp API. Just write. */ - RETVAL_BOOL(SUCCESS == PS(default_mod)->s_write(&PS(mod_data), key, val, PS(gc_maxlifetime))); -} -/* }}} */ diff --git a/ext/session/php_session.h b/ext/session/php_session.h index 34987992eae67..6f9664402486e 100644 --- a/ext/session/php_session.h +++ b/ext/session/php_session.h @@ -325,7 +325,5 @@ extern PHP_METHOD(SessionHandler, write); extern PHP_METHOD(SessionHandler, destroy); extern PHP_METHOD(SessionHandler, gc); extern PHP_METHOD(SessionHandler, create_sid); -extern PHP_METHOD(SessionHandler, validateId); -extern PHP_METHOD(SessionHandler, updateTimestamp); #endif diff --git a/ext/session/session.c b/ext/session/session.c index 60157b33564b8..8b97bb62ad35e 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -70,9 +70,6 @@ zend_class_entry *php_session_iface_entry; /* SessionIdInterface */ zend_class_entry *php_session_id_iface_entry; -/* SessionUpdateTimestampHandler class */ -zend_class_entry *php_session_update_timestamp_class_entry; - /* SessionUpdateTimestampInterface */ zend_class_entry *php_session_update_timestamp_iface_entry; From 51dfba3d7b77d3f7db430d2d41d2ecc1fd96988e Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 27 Apr 2020 14:57:07 +0200 Subject: [PATCH 281/338] Show all tests on AppVeyor This is a temporary measure to try to resolve the often failing mysqli_insert_packet_overflow.phpt issue. Unfortunately, I have not been able to reproduce the test failure locally, or in my php-src fork. --- appveyor/test_task.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor/test_task.bat b/appveyor/test_task.bat index 9a4913c2dfad2..b4eb02740e4d7 100644 --- a/appveyor/test_task.bat +++ b/appveyor/test_task.bat @@ -96,7 +96,7 @@ mkdir c:\tests_tmp set TEST_PHP_JUNIT=c:\junit.out.xml cd "%APPVEYOR_BUILD_FOLDER%" -nmake test TESTS="%OPCACHE_OPTS% -q --offline --show-diff --show-slow 1000 --set-timeout 120 -g FAIL,XFAIL,BORK,WARN,LEAK,SKIP --temp-source c:\tests_tmp --temp-target c:\tests_tmp %PARALLEL%" +nmake test TESTS="%OPCACHE_OPTS% -q --offline --show-diff --show-slow 1000 --set-timeout 120 --temp-source c:\tests_tmp --temp-target c:\tests_tmp %PARALLEL%" set EXIT_CODE=%errorlevel% From 29fc6846d8c796aad6b21df9880b7957e067f5fc Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 27 Apr 2020 15:59:37 +0300 Subject: [PATCH 282/338] Fixed incorrect side exit address --- ext/opcache/jit/zend_jit_x86.dasc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 173b83164208a..047287b006b0a 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -4538,7 +4538,7 @@ static int zend_jit_fetch_dimension_address_inner(dasm_State **Dst, const zend_o zend_jit_addr res_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->result.var); const void *exit_addr = NULL; - if (zend_jit_trigger == ZEND_JIT_ON_HOT_TRACE && type == BP_VAR_R) { + if (zend_jit_trigger == ZEND_JIT_ON_HOT_TRACE && (type == BP_VAR_R || type == BP_VAR_RW)) { int32_t exit_point = zend_jit_trace_get_exit_point(opline, opline, NULL); exit_addr = zend_jit_trace_get_exit_addr(exit_point); if (!exit_addr) { From 19e886d9d823a84e55a462c344e75e2e0707d294 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 24 Apr 2020 16:12:06 +0200 Subject: [PATCH 283/338] Avoid throw expression leaks Mark "throw" used in expression context with a flag, and don't treat it as a BB terminator in that case. This prevents us from optimizing away the following opcodes as unreachable, which may result in live ranges being dropped incorrectly. Close GH-5450. --- Zend/tests/throw/leaks.phpt | 31 +++++++++++++++++++++++++++++++ Zend/zend_compile.c | 14 ++++++++++---- Zend/zend_compile.h | 2 ++ ext/opcache/Optimizer/zend_cfg.c | 8 +++++++- 4 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 Zend/tests/throw/leaks.phpt diff --git a/Zend/tests/throw/leaks.phpt b/Zend/tests/throw/leaks.phpt new file mode 100644 index 0000000000000..072f65f2fc80c --- /dev/null +++ b/Zend/tests/throw/leaks.phpt @@ -0,0 +1,31 @@ +--TEST-- +throw expression should not leak temporaries +--FILE-- + +--EXPECT-- +Caught +Caught +Caught +int(32767) diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index a83d4d3d180c1..bb279d5570b8e 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -4548,10 +4548,13 @@ void zend_compile_throw(znode *result, zend_ast *ast) /* {{{ */ znode expr_node; zend_compile_expr(&expr_node, expr_ast); - zend_emit_op(NULL, ZEND_THROW, &expr_node, NULL); - - result->op_type = IS_CONST; - ZVAL_BOOL(&result->u.constant, 1); + zend_op *opline = zend_emit_op(NULL, ZEND_THROW, &expr_node, NULL); + if (result) { + /* Mark this as an "expression throw" for opcache. */ + opline->extended_value = ZEND_THROW_IS_EXPR; + result->op_type = IS_CONST; + ZVAL_BOOL(&result->u.constant, 1); + } } /* }}} */ @@ -8791,6 +8794,9 @@ void zend_compile_stmt(zend_ast *ast) /* {{{ */ case ZEND_AST_HALT_COMPILER: zend_compile_halt_compiler(ast); break; + case ZEND_AST_THROW: + zend_compile_throw(NULL, ast); + break; default: { znode result; diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 8631747c06300..a90219b1b4453 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -927,6 +927,8 @@ ZEND_API zend_string *zend_type_to_string(zend_type type); #define ZEND_SEND_BY_REF 1u #define ZEND_SEND_PREFER_REF 2u +#define ZEND_THROW_IS_EXPR 1u + /* The send mode and is_variadic flag are stored as part of zend_type */ #define _ZEND_SEND_MODE_SHIFT _ZEND_TYPE_EXTRA_FLAGS_SHIFT #define _ZEND_IS_VARIADIC_BIT (1 << (_ZEND_TYPE_EXTRA_FLAGS_SHIFT + 2)) diff --git a/ext/opcache/Optimizer/zend_cfg.c b/ext/opcache/Optimizer/zend_cfg.c index c5b1b53a0ec63..6ac5781e09dca 100644 --- a/ext/opcache/Optimizer/zend_cfg.c +++ b/ext/opcache/Optimizer/zend_cfg.c @@ -296,11 +296,17 @@ int zend_build_cfg(zend_arena **arena, const zend_op_array *op_array, uint32_t b case ZEND_RETURN_BY_REF: case ZEND_GENERATOR_RETURN: case ZEND_EXIT: - case ZEND_THROW: if (i + 1 < op_array->last) { BB_START(i + 1); } break; + case ZEND_THROW: + /* Don't treat THROW as terminator if it's used in expression context, + * as we may lose live ranges when eliminating unreachable code. */ + if (opline->extended_value != ZEND_THROW_IS_EXPR && i + 1 < op_array->last) { + BB_START(i + 1); + } + break; case ZEND_INCLUDE_OR_EVAL: flags |= ZEND_FUNC_INDIRECT_VAR_ACCESS; case ZEND_GENERATOR_CREATE: From a6960cfb05f47daf8308f15f100233390734a5a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Mon, 27 Apr 2020 13:54:12 +0200 Subject: [PATCH 284/338] Fix inaccurate func infos Closes GH-5472 --- ext/opcache/Optimizer/zend_func_info.c | 46 +++++++++++++------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index 880e2238d4304..81fd90cc2c65c 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -297,8 +297,8 @@ static const func_info_t func_infos[] = { F1("file_get_contents", MAY_BE_FALSE | MAY_BE_STRING), F1("stream_context_create", MAY_BE_RESOURCE), F0("stream_context_set_params", MAY_BE_FALSE | MAY_BE_TRUE), - F1("stream_context_get_params", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY), - FN("stream_context_get_options", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY), + F1("stream_context_get_params", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY), + FN("stream_context_get_options", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY), FN("stream_context_get_default", MAY_BE_FALSE | MAY_BE_RESOURCE), FN("stream_context_set_default", MAY_BE_FALSE | MAY_BE_RESOURCE), FN("stream_filter_prepend", MAY_BE_FALSE | MAY_BE_RESOURCE), @@ -312,9 +312,9 @@ static const func_info_t func_infos[] = { F1("stream_socket_pair", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_RESOURCE), #endif F1("stream_get_contents", MAY_BE_FALSE | MAY_BE_STRING), - F1("fgetcsv", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING), + F1("fgetcsv", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING), F1("get_meta_tags", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING), - F1("stream_get_meta_data", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY), + F1("stream_get_meta_data", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY), F1("stream_get_line", MAY_BE_FALSE | MAY_BE_STRING), F1("stream_get_wrappers", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), F1("stream_get_transports", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), @@ -524,9 +524,9 @@ static const func_info_t func_infos[] = { F1("curl_file_create", MAY_BE_OBJECT), /* ext/mbstring */ - F1("mb_convert_case", MAY_BE_FALSE | MAY_BE_STRING), - F1("mb_strtoupper", MAY_BE_FALSE | MAY_BE_STRING), - F1("mb_strtolower", MAY_BE_FALSE | MAY_BE_STRING), + F1("mb_convert_case", MAY_BE_STRING), + F1("mb_strtoupper", MAY_BE_STRING), + F1("mb_strtolower", MAY_BE_STRING), F1("mb_language", MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_STRING), F1("mb_internal_encoding", MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_STRING), F1("mb_http_input", MAY_BE_FALSE | MAY_BE_STRING| MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), @@ -539,19 +539,19 @@ static const func_info_t func_infos[] = { F1("mb_strrchr", MAY_BE_FALSE | MAY_BE_STRING), F1("mb_stristr", MAY_BE_FALSE | MAY_BE_STRING), F1("mb_strrichr", MAY_BE_FALSE | MAY_BE_STRING), - F1("mb_substr", MAY_BE_FALSE | MAY_BE_STRING), + F1("mb_substr", MAY_BE_STRING), F1("mb_strcut", MAY_BE_FALSE | MAY_BE_STRING), - F1("mb_strimwidth", MAY_BE_FALSE | MAY_BE_STRING), + F1("mb_strimwidth", MAY_BE_STRING), F1("mb_convert_encoding", MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY), F1("mb_detect_encoding", MAY_BE_FALSE | MAY_BE_STRING), F1("mb_list_encodings", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), - F1("mb_encoding_aliases", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), - F1("mb_convert_kana", MAY_BE_FALSE | MAY_BE_STRING), - F1("mb_encode_mimeheader", MAY_BE_FALSE | MAY_BE_STRING), - F1("mb_decode_mimeheader", MAY_BE_FALSE | MAY_BE_STRING), + F1("mb_encoding_aliases", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), + F1("mb_convert_kana", MAY_BE_STRING), + F1("mb_encode_mimeheader", MAY_BE_STRING), + F1("mb_decode_mimeheader", MAY_BE_STRING), F1("mb_convert_variables", MAY_BE_FALSE | MAY_BE_STRING), - F1("mb_encode_numericentity", MAY_BE_FALSE | MAY_BE_STRING), - F1("mb_decode_numericentity", MAY_BE_FALSE | MAY_BE_STRING), + F1("mb_encode_numericentity", MAY_BE_STRING), + F1("mb_decode_numericentity", MAY_BE_STRING), F1("mb_get_info", MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY), F1("mb_regex_encoding", MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_STRING), @@ -579,7 +579,7 @@ static const func_info_t func_infos[] = { /* ext/xml */ F1("xml_error_string", MAY_BE_NULL | MAY_BE_STRING), - F1("xml_parser_get_option", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_STRING), + F1("xml_parser_get_option", MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_STRING), F1("utf8_encode", MAY_BE_STRING), F1("utf8_decode", MAY_BE_STRING), @@ -612,8 +612,8 @@ static const func_info_t func_infos[] = { F1("hash_copy", MAY_BE_OBJECT), F1("hash_algos", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), F1("hash_pbkdf2", MAY_BE_STRING), - F1("mhash_keygen_s2k", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING), - F1("mhash_get_hash_name", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING), + F1("mhash_keygen_s2k", MAY_BE_FALSE | MAY_BE_STRING), + F1("mhash_get_hash_name", MAY_BE_FALSE | MAY_BE_STRING), F1("mhash", MAY_BE_FALSE | MAY_BE_FALSE | MAY_BE_STRING), /* ext/sodium */ @@ -650,11 +650,11 @@ static const func_info_t func_infos[] = { F1("sodium_crypto_scalarmult", MAY_BE_STRING), F1("sodium_crypto_kx_seed_keypair", MAY_BE_STRING), F1("sodium_crypto_kx_keypair", MAY_BE_STRING), - F1("sodium_crypto_kx_secretkey", MAY_BE_NULL | MAY_BE_STRING), - F1("sodium_crypto_kx_publickey", MAY_BE_NULL | MAY_BE_STRING), - F1("sodium_crypto_kx_client_session_keys", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), - F1("sodium_crypto_kx_server_session_keys", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), - F1("sodium_crypto_auth", MAY_BE_NULL | MAY_BE_STRING), + F1("sodium_crypto_kx_secretkey", MAY_BE_STRING), + F1("sodium_crypto_kx_publickey", MAY_BE_STRING), + F1("sodium_crypto_kx_client_session_keys", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), + F1("sodium_crypto_kx_server_session_keys", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), + F1("sodium_crypto_auth", MAY_BE_STRING), F1("sodium_crypto_aead_aes256gcm_keygen", MAY_BE_STRING), F1("sodium_crypto_auth_keygen", MAY_BE_STRING), F1("sodium_crypto_generichash_keygen", MAY_BE_STRING), From cc8a8613b6fb37fdd24c0941e769bd716efbdad5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 27 Apr 2020 15:32:29 +0200 Subject: [PATCH 285/338] Remove MAY_BE_FALSE from range() type info --- ext/opcache/Optimizer/zend_func_info.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index 81fd90cc2c65c..ad774facfe88f 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -61,7 +61,7 @@ static uint32_t zend_range_info(const zend_call_info *call_info, const zend_ssa uint32_t t2 = _ssa_op1_info(op_array, ssa, call_info->arg_info[1].opline, &ssa->ops[call_info->arg_info[1].opline - op_array->opcodes]); uint32_t t3 = 0; - uint32_t tmp = MAY_BE_RC1 | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG; + uint32_t tmp = MAY_BE_RC1 | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG; if (call_info->num_args == 3) { t3 = _ssa_op1_info(op_array, ssa, call_info->arg_info[2].opline, @@ -82,8 +82,8 @@ static uint32_t zend_range_info(const zend_call_info *call_info, const zend_ssa } return tmp; } else { - /* may warning, and return FALSE */ - return MAY_BE_RC1 | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_DOUBLE | MAY_BE_ARRAY_OF_STRING; + /* May throw */ + return MAY_BE_RC1 | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_DOUBLE | MAY_BE_ARRAY_OF_STRING; } } From 58eafbe734faeae24bcbbdfc8a4855587d99b7f3 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 27 Apr 2020 15:35:19 +0200 Subject: [PATCH 286/338] Make array_rand() type info more accurate --- ext/opcache/Optimizer/zend_func_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index ad774facfe88f..6654ce42d8808 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -388,7 +388,7 @@ static const func_info_t func_infos[] = { FN("array_pad", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY), F1("array_flip", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING), F1("array_change_key_case", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY), - F1("array_rand", UNKNOWN_INFO), + FN("array_rand", MAY_BE_LONG | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING), FN("array_unique", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY), F1("array_intersect", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY), F1("array_intersect_key", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY), From c5f87eee5d039af904eddc38684b7a594d758daa Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 27 Apr 2020 15:39:08 +0200 Subject: [PATCH 287/338] Mark passthru() as RC0 This function only returns null/false, RC1 does not make sense. --- ext/opcache/Optimizer/zend_func_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index 6654ce42d8808..d63a773b40e74 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -195,7 +195,7 @@ static const func_info_t func_infos[] = { F1("system", MAY_BE_FALSE | MAY_BE_STRING), F1("escapeshellcmd", MAY_BE_STRING), F1("escapeshellarg", MAY_BE_STRING), - F1("passthru", MAY_BE_NULL | MAY_BE_FALSE), + F0("passthru", MAY_BE_NULL | MAY_BE_FALSE), F1("shell_exec", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING), #ifdef PHP_CAN_SUPPORT_PROC_OPEN F1("proc_open", MAY_BE_FALSE | MAY_BE_RESOURCE), From 16e9d74f078c48eb62afc97a29fa30d1969cc7fd Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 27 Apr 2020 16:22:03 +0200 Subject: [PATCH 288/338] Fixed bug #79432 --- ext/spl/php_spl.c | 14 ++++++++------ ext/spl/tests/bug79432.phpt | 14 ++++++++++++++ 2 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 ext/spl/tests/bug79432.phpt diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c index 759218e8021c7..11fec690723ee 100644 --- a/ext/spl/php_spl.c +++ b/ext/spl/php_spl.c @@ -393,14 +393,16 @@ static void autoload_func_info_dtor(zval *element) Try all registered autoload function to load the requested class */ PHP_FUNCTION(spl_autoload_call) { - zval *class_name, retval; - zend_string *lc_name, *func_name; + zend_string *class_name, *lc_name, *func_name; autoload_func_info *alfi; + zval retval, params[1]; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &class_name) == FAILURE || Z_TYPE_P(class_name) != IS_STRING) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &class_name) == FAILURE) { RETURN_THROWS(); } + ZVAL_STR(¶ms[0], class_name); + if (SPL_G(autoload_functions)) { HashPosition pos; zend_ulong num_idx; @@ -411,12 +413,12 @@ PHP_FUNCTION(spl_autoload_call) int l_autoload_running = SPL_G(autoload_running); SPL_G(autoload_running) = 1; - lc_name = zend_string_tolower(Z_STR_P(class_name)); + lc_name = zend_string_tolower(class_name); fci.size = sizeof(fci); fci.retval = &retval; fci.param_count = 1; - fci.params = class_name; + fci.params = params; fci.no_separation = 1; ZVAL_UNDEF(&fci.function_name); /* Unused */ @@ -474,7 +476,7 @@ PHP_FUNCTION(spl_autoload_call) ZVAL_UNDEF(&fcall_info.function_name); fcall_info.retval = &retval; fcall_info.param_count = 1; - fcall_info.params = class_name; + fcall_info.params = params; fcall_info.object = NULL; fcall_info.no_separation = 1; diff --git a/ext/spl/tests/bug79432.phpt b/ext/spl/tests/bug79432.phpt new file mode 100644 index 0000000000000..cce017cb63b3b --- /dev/null +++ b/ext/spl/tests/bug79432.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #79432 (spl_autoload_call() with non-string argument violates assertion) +--FILE-- +getMessage(), "\n"; +} + +?> +--EXPECT-- +spl_autoload_call(): Argument #1 ($class_name) must be of type string, array given From f38d6cea420f1ab6975647cfc87292072538629f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 27 Apr 2020 13:01:13 +0200 Subject: [PATCH 289/338] Check func_info consistency Make sure explicitly specified func_info is a subset of automatically computed info. This will at least prevent cases where a type is removed from stubs, but not removed from func_info. Closes GH-5471. --- ext/opcache/Optimizer/zend_func_info.c | 50 +++++++++++++++++++------- 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index d63a773b40e74..6f1c24705171e 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -886,6 +886,28 @@ static const func_info_t func_infos[] = { static HashTable func_info; int zend_func_info_rid = -1; +static uint32_t get_internal_func_info( + const zend_call_info *call_info, const zend_ssa *ssa, zend_string *lcname) { + if (call_info->callee_func->common.scope) { + /* This is a method, not a function. */ + return 0; + } + + zval *zv = zend_hash_find_ex(&func_info, lcname, 1); + if (!zv) { + return 0; + } + + func_info_t *info = Z_PTR_P(zv); + if (UNEXPECTED(zend_optimizer_is_disabled_func(info->name, info->name_len))) { + return MAY_BE_NULL; + } else if (info->info_func) { + return info->info_func(call_info, ssa); + } else { + return info->info; + } +} + uint32_t zend_get_func_info( const zend_call_info *call_info, const zend_ssa *ssa, zend_class_entry **ce, zend_bool *ce_is_instanceof) @@ -896,21 +918,14 @@ uint32_t zend_get_func_info( *ce_is_instanceof = 0; if (callee_func->type == ZEND_INTERNAL_FUNCTION) { - zval *zv; zend_string *lcname = Z_STR_P(CRT_CONSTANT_EX(call_info->caller_op_array, call_info->caller_init_opline, call_info->caller_init_opline->op2)); - if (!call_info->callee_func->common.scope - && (zv = zend_hash_find_ex(&func_info, lcname, 1))) { - func_info_t *info = Z_PTR_P(zv); - if (UNEXPECTED(zend_optimizer_is_disabled_func(info->name, info->name_len))) { - ret = MAY_BE_NULL; - } else if (info->info_func) { - ret = info->info_func(call_info, ssa); - } else { - ret = info->info; - } - return ret; + uint32_t internal_ret = get_internal_func_info(call_info, ssa, lcname); +#if !ZEND_DEBUG + if (internal_ret) { + return internal_ret; } +#endif if (callee_func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) { ret = zend_fetch_arg_info_type(NULL, callee_func->common.arg_info - 1, ce); @@ -925,6 +940,17 @@ uint32_t zend_get_func_info( if (callee_func->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) { ret |= MAY_BE_REF; } + +#if ZEND_DEBUG + /* Check whether the func_info information is a subset of the information we can compute + * from the specified return type. */ + if (internal_ret) { + if (internal_ret & ~ret) { + fprintf(stderr, "Inaccurate func info for %s()\n", ZSTR_VAL(lcname)); + } + return internal_ret; + } +#endif } else { // FIXME: the order of functions matters!!! zend_func_info *info = ZEND_FUNC_INFO((zend_op_array*)callee_func); From 7ce8c5ad892b8ce65426d7a8a6cf7376d56c98ee Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Sun, 26 Apr 2020 07:34:19 +0200 Subject: [PATCH 290/338] Slipt error messages while checking magic methods attributes Closes GH-5465 --- Zend/tests/bug61025.phpt | 4 ++-- Zend/tests/bug65322.phpt | 2 +- Zend/tests/bug67436/bug67436.phpt | 2 +- Zend/tests/bug67436/bug67436_nohandler.phpt | 2 +- Zend/tests/bug70215.phpt | 2 +- Zend/tests/errmsg_045.phpt | 2 +- Zend/tests/magic_methods_002.phpt | 2 +- Zend/tests/magic_methods_003.phpt | 2 +- Zend/tests/magic_methods_004.phpt | 2 +- Zend/tests/magic_methods_005.phpt | 2 +- Zend/tests/magic_methods_006.phpt | 2 +- Zend/tests/magic_methods_007.phpt | 2 +- Zend/tests/magic_methods_008.phpt | 2 +- Zend/tests/magic_methods_009.phpt | 2 +- Zend/tests/magic_methods_010.phpt | 4 +++- Zend/tests/magic_methods_serialize.phpt | 2 +- Zend/tests/magic_methods_unserialize.phpt | 2 +- Zend/zend_compile.c | 14 ++++++++++---- tests/classes/__call_005.phpt | 2 +- tests/classes/__call_007.phpt | 2 +- 20 files changed, 32 insertions(+), 24 deletions(-) diff --git a/Zend/tests/bug61025.phpt b/Zend/tests/bug61025.phpt index 54f6443f85c80..00139e6a9b4da 100644 --- a/Zend/tests/bug61025.phpt +++ b/Zend/tests/bug61025.phpt @@ -20,9 +20,9 @@ echo $b->__invoke(); ?> --EXPECTF-- -Warning: The magic method InvokeAble::__invoke() must have public visibility and cannot be static in %sbug61025.php on line %d +Warning: The magic method InvokeAble::__invoke() cannot be static in %sbug61025.php on line %d -Warning: The magic method Bar::__invoke() must have public visibility and cannot be static in %sbug61025.php on line %d +Warning: The magic method Bar::__invoke() must have public visibility in %sbug61025.php on line %d Bar Fatal error: Uncaught Error: Call to private method Bar::__invoke() from context '' in %sbug61025.php:%d Stack trace: diff --git a/Zend/tests/bug65322.phpt b/Zend/tests/bug65322.phpt index 9b5da8e4b7fa4..0a64783d68e60 100644 --- a/Zend/tests/bug65322.phpt +++ b/Zend/tests/bug65322.phpt @@ -19,6 +19,6 @@ eval('class A { private function __invoke() { } }'); ?> --EXPECTF-- -string(%d) "The magic method A::__invoke() must have public visibility and cannot be static" +string(%d) "The magic method A::__invoke() must have public visibility" string(%d) "%s(%d) : eval()'d code" string(1) "X" diff --git a/Zend/tests/bug67436/bug67436.phpt b/Zend/tests/bug67436/bug67436.phpt index ade29731ae4e4..1ceb83f491515 100644 --- a/Zend/tests/bug67436/bug67436.phpt +++ b/Zend/tests/bug67436/bug67436.phpt @@ -22,6 +22,6 @@ a::staticTest(); $b = new b(); $b->test(); --EXPECTF-- -string(%d) "The magic method b::__invoke() must have public visibility and cannot be static" +string(%d) "The magic method b::__invoke() must have public visibility" b::test() a::test(c::TESTCONSTANT) diff --git a/Zend/tests/bug67436/bug67436_nohandler.phpt b/Zend/tests/bug67436/bug67436_nohandler.phpt index abccfb62f4923..4a34870ebfabe 100644 --- a/Zend/tests/bug67436/bug67436_nohandler.phpt +++ b/Zend/tests/bug67436/bug67436_nohandler.phpt @@ -14,6 +14,6 @@ a::staticTest(); $b = new b(); $b->test(); --EXPECTF-- -Warning: The magic method b::__invoke() must have public visibility and cannot be static in %s on line %d +Warning: The magic method b::__invoke() must have public visibility in %s on line %d b::test() a::test(c::TESTCONSTANT) diff --git a/Zend/tests/bug70215.phpt b/Zend/tests/bug70215.phpt index 76a96722251a0..60fa802a7f972 100644 --- a/Zend/tests/bug70215.phpt +++ b/Zend/tests/bug70215.phpt @@ -17,5 +17,5 @@ $b(); ?> --EXPECTF-- -Warning: The magic method A::__invoke() must have public visibility and cannot be static in %s on line %d +Warning: The magic method A::__invoke() cannot be static in %s on line %d A diff --git a/Zend/tests/errmsg_045.phpt b/Zend/tests/errmsg_045.phpt index 35e6c7b00fef0..4a75cf5df4168 100644 --- a/Zend/tests/errmsg_045.phpt +++ b/Zend/tests/errmsg_045.phpt @@ -14,7 +14,7 @@ eval('class A { private function __invoke() { } }'); ?> --EXPECTF-- -string(%d) "The magic method A::__invoke() must have public visibility and cannot be static" +string(%d) "The magic method A::__invoke() must have public visibility" string(%d) "%s(%d) : eval()'d code" Warning: Undefined variable $undefined in %s on line %d diff --git a/Zend/tests/magic_methods_002.phpt b/Zend/tests/magic_methods_002.phpt index dbd4977ad6fe9..56868013bf3e2 100644 --- a/Zend/tests/magic_methods_002.phpt +++ b/Zend/tests/magic_methods_002.phpt @@ -11,4 +11,4 @@ class foo { ?> --EXPECTF-- -Warning: The magic method foo::__unset() must have public visibility and cannot be static in %s on line %d +Warning: The magic method foo::__unset() must have public visibility in %s on line %d diff --git a/Zend/tests/magic_methods_003.phpt b/Zend/tests/magic_methods_003.phpt index d2207e9db76cf..9f7ff5e9a51c4 100644 --- a/Zend/tests/magic_methods_003.phpt +++ b/Zend/tests/magic_methods_003.phpt @@ -11,4 +11,4 @@ class foo { ?> --EXPECTF-- -Warning: The magic method foo::__unset() must have public visibility and cannot be static in %s on line %d +Warning: The magic method foo::__unset() cannot be static in %s on line %d diff --git a/Zend/tests/magic_methods_004.phpt b/Zend/tests/magic_methods_004.phpt index 695747fdc72bb..b9ad81c6accae 100644 --- a/Zend/tests/magic_methods_004.phpt +++ b/Zend/tests/magic_methods_004.phpt @@ -11,4 +11,4 @@ class foo { ?> --EXPECTF-- -Warning: The magic method foo::__unset() must have public visibility and cannot be static in %s on line %d +Warning: The magic method foo::__unset() must have public visibility in %s on line %d diff --git a/Zend/tests/magic_methods_005.phpt b/Zend/tests/magic_methods_005.phpt index 14704c9229fc8..fe1cfa34e484c 100644 --- a/Zend/tests/magic_methods_005.phpt +++ b/Zend/tests/magic_methods_005.phpt @@ -9,4 +9,4 @@ interface a { ?> --EXPECTF-- -Warning: The magic method a::__call() must have public visibility and cannot be static in %s on line %d +Warning: The magic method a::__call() cannot be static in %s on line %d diff --git a/Zend/tests/magic_methods_006.phpt b/Zend/tests/magic_methods_006.phpt index 92c01636ce162..00fe599fc7182 100644 --- a/Zend/tests/magic_methods_006.phpt +++ b/Zend/tests/magic_methods_006.phpt @@ -9,4 +9,4 @@ interface a { ?> --EXPECTF-- -Warning: The magic method a::__callStatic() must have public visibility and be static in %s on line %d +Warning: The magic method a::__callStatic() must be static in %s on line %d diff --git a/Zend/tests/magic_methods_007.phpt b/Zend/tests/magic_methods_007.phpt index dd7714e5df1d0..86642b4ecb724 100644 --- a/Zend/tests/magic_methods_007.phpt +++ b/Zend/tests/magic_methods_007.phpt @@ -9,6 +9,6 @@ abstract class b { ?> --EXPECTF-- -Warning: The magic method b::__set() must have public visibility and cannot be static in %s on line %d +Warning: The magic method b::__set() must have public visibility in %s on line %d Fatal error: Method b::__set() must take exactly 2 arguments in %s on line %d diff --git a/Zend/tests/magic_methods_008.phpt b/Zend/tests/magic_methods_008.phpt index de99ecafd9e3d..3ddeb61d24e4d 100644 --- a/Zend/tests/magic_methods_008.phpt +++ b/Zend/tests/magic_methods_008.phpt @@ -14,6 +14,6 @@ class a extends b { ?> --EXPECTF-- -Warning: The magic method a::__set() must have public visibility and cannot be static in %s on line %d +Warning: The magic method a::__set() must have public visibility in %s on line %d Fatal error: Access level to a::__set() must be public (as in class b) in %s on line 8 diff --git a/Zend/tests/magic_methods_009.phpt b/Zend/tests/magic_methods_009.phpt index 17a99cef48616..97b54d2412de2 100644 --- a/Zend/tests/magic_methods_009.phpt +++ b/Zend/tests/magic_methods_009.phpt @@ -10,4 +10,4 @@ class a { ?> --EXPECTF-- -Warning: The magic method a::__callStatic() must have public visibility and be static in %s on line %d +Warning: The magic method a::__callStatic() must have public visibility in %s on line %d diff --git a/Zend/tests/magic_methods_010.phpt b/Zend/tests/magic_methods_010.phpt index 4c939d3faa192..b93d6e19f170e 100644 --- a/Zend/tests/magic_methods_010.phpt +++ b/Zend/tests/magic_methods_010.phpt @@ -10,6 +10,8 @@ class a { ?> --EXPECTF-- -Warning: The magic method a::__toString() must have public visibility and cannot be static in %s on line %d +Warning: The magic method a::__toString() must have public visibility in %s on line %d + +Warning: The magic method a::__toString() cannot be static in %s on line %d Fatal error: Method a::__toString() cannot take arguments in %s on line %d diff --git a/Zend/tests/magic_methods_serialize.phpt b/Zend/tests/magic_methods_serialize.phpt index 978aff8b4f76c..e3d20974c6f46 100644 --- a/Zend/tests/magic_methods_serialize.phpt +++ b/Zend/tests/magic_methods_serialize.phpt @@ -7,6 +7,6 @@ class Foo { } ?> --EXPECTF-- -Warning: The magic method Foo::__serialize() must have public visibility and cannot be static in %s on line %d +Warning: The magic method Foo::__serialize() cannot be static in %s on line %d Fatal error: Method Foo::__serialize() cannot take arguments in %s on line %d diff --git a/Zend/tests/magic_methods_unserialize.phpt b/Zend/tests/magic_methods_unserialize.phpt index dc6aa171a7b45..757cb6bf98aab 100644 --- a/Zend/tests/magic_methods_unserialize.phpt +++ b/Zend/tests/magic_methods_unserialize.phpt @@ -7,6 +7,6 @@ class Foo { } ?> --EXPECTF-- -Warning: The magic method Foo::__unserialize() must have public visibility and cannot be static in %s on line %d +Warning: The magic method Foo::__unserialize() cannot be static in %s on line %d Fatal error: Method Foo::__unserialize() must take exactly 1 argument in %s on line %d diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index bb279d5570b8e..7c84456a6ff9c 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -6041,15 +6041,21 @@ static void zend_compile_implicit_closure_uses(closure_info *info) static void zend_check_magic_method_attr(uint32_t attr, zend_class_entry *ce, const char* method, zend_bool is_static) /* {{{ */ { + if (!(attr & ZEND_ACC_PUBLIC)) { + zend_error(E_WARNING, + "The magic method %s::%s() must have public visibility", + ZSTR_VAL(ce->name), method); + } + if (is_static) { - if (!(attr & ZEND_ACC_PUBLIC) || !(attr & ZEND_ACC_STATIC)) { + if (!(attr & ZEND_ACC_STATIC)) { zend_error(E_WARNING, - "The magic method %s::%s() must have public visibility and be static", + "The magic method %s::%s() must be static", ZSTR_VAL(ce->name), method); } - } else if (!(attr & ZEND_ACC_PUBLIC) || (attr & ZEND_ACC_STATIC)) { + } else if (attr & ZEND_ACC_STATIC) { zend_error(E_WARNING, - "The magic method %s::%s() must have public visibility and cannot be static", + "The magic method %s::%s() cannot be static", ZSTR_VAL(ce->name), method); } } diff --git a/tests/classes/__call_005.phpt b/tests/classes/__call_005.phpt index 8db8cec43e3dd..20416edb5d05a 100644 --- a/tests/classes/__call_005.phpt +++ b/tests/classes/__call_005.phpt @@ -22,7 +22,7 @@ $b = new B(); $b->test(); ?> --EXPECTF-- -Warning: The magic method A::__call() must have public visibility and cannot be static in %s__call_005.php on line 3 +Warning: The magic method A::__call() must have public visibility in %s__call_005.php on line 3 In A::__call(test1, array(1,a)) object(B)#1 (0) { } diff --git a/tests/classes/__call_007.phpt b/tests/classes/__call_007.phpt index 6f90e84f7db62..e2edb8a5304f7 100644 --- a/tests/classes/__call_007.phpt +++ b/tests/classes/__call_007.phpt @@ -51,7 +51,7 @@ try { } ?> --EXPECTF-- -Warning: The magic method A::__call() must have public visibility and cannot be static in %s on line 3 +Warning: The magic method A::__call() cannot be static in %s on line 3 ---> Invoke __call via simple method call. object(A)#1 (0) { } From aaa30f14ebb0e2b7c33a70c225e01d678dd27a8d Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Sun, 26 Apr 2020 03:03:58 +0200 Subject: [PATCH 291/338] Reduce code duplication using for loop --- ext/standard/filestat.c | 60 ++++++++++++++++------------------------- 1 file changed, 23 insertions(+), 37 deletions(-) diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index 35090bde5463e..c4b4717c0e393 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -756,15 +756,9 @@ PHP_FUNCTION(clearstatcache) */ PHPAPI void php_stat(const char *filename, size_t filename_length, int type, zval *return_value) { - zval stat_dev, stat_ino, stat_mode, stat_nlink, stat_uid, stat_gid, stat_rdev, - stat_size, stat_atime, stat_mtime, stat_ctime, stat_blksize, stat_blocks; zend_stat_t *stat_sb; php_stream_statbuf ssb; int flags = 0, rmask=S_IROTH, wmask=S_IWOTH, xmask=S_IXOTH; /* access rights defaults to other */ - char *stat_sb_names[13] = { - "dev", "ino", "mode", "nlink", "uid", "gid", "rdev", - "size", "atime", "mtime", "ctime", "blksize", "blocks" - }; const char *local; php_stream_wrapper *wrapper; @@ -911,7 +905,19 @@ PHPAPI void php_stat(const char *filename, size_t filename_length, int type, zva RETURN_TRUE; /* the false case was done earlier */ case FS_LSTAT: /* FALLTHROUGH */ - case FS_STAT: + case FS_STAT: { + char *stat_sb_names[] = { + "dev", "ino", "mode", "nlink", "uid", "gid", "rdev", + "size", "atime", "mtime", "ctime", "blksize", "blocks" + }; + zval stat_dev, stat_ino, stat_mode, stat_nlink, stat_uid, stat_gid, stat_rdev, + stat_size, stat_atime, stat_mtime, stat_ctime, stat_blksize, stat_blocks; + zval *stat_sb_addresses[] = { + &stat_dev, &stat_ino, &stat_mode, &stat_nlink, &stat_uid, &stat_gid, &stat_rdev, + &stat_size, &stat_atime, &stat_mtime, &stat_ctime, &stat_blksize, &stat_blocks + }; + size_t i, size_stat_sb = sizeof(stat_sb_addresses) / sizeof(*stat_sb_addresses); + array_init(return_value); ZVAL_LONG(&stat_dev, stat_sb->st_dev); @@ -939,38 +945,18 @@ PHPAPI void php_stat(const char *filename, size_t filename_length, int type, zva #else ZVAL_LONG(&stat_blocks,-1); #endif - /* Store numeric indexes in proper order */ - zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_dev); - zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_ino); - zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_mode); - zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_nlink); - zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_uid); - zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_gid); - - zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_rdev); - zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_size); - zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_atime); - zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_mtime); - zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_ctime); - zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_blksize); - zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_blocks); - - /* Store string indexes referencing the same zval*/ - zend_hash_str_add_new(Z_ARRVAL_P(return_value), stat_sb_names[0], strlen(stat_sb_names[0]), &stat_dev); - zend_hash_str_add_new(Z_ARRVAL_P(return_value), stat_sb_names[1], strlen(stat_sb_names[1]), &stat_ino); - zend_hash_str_add_new(Z_ARRVAL_P(return_value), stat_sb_names[2], strlen(stat_sb_names[2]), &stat_mode); - zend_hash_str_add_new(Z_ARRVAL_P(return_value), stat_sb_names[3], strlen(stat_sb_names[3]), &stat_nlink); - zend_hash_str_add_new(Z_ARRVAL_P(return_value), stat_sb_names[4], strlen(stat_sb_names[4]), &stat_uid); - zend_hash_str_add_new(Z_ARRVAL_P(return_value), stat_sb_names[5], strlen(stat_sb_names[5]), &stat_gid); - zend_hash_str_add_new(Z_ARRVAL_P(return_value), stat_sb_names[6], strlen(stat_sb_names[6]), &stat_rdev); - zend_hash_str_add_new(Z_ARRVAL_P(return_value), stat_sb_names[7], strlen(stat_sb_names[7]), &stat_size); - zend_hash_str_add_new(Z_ARRVAL_P(return_value), stat_sb_names[8], strlen(stat_sb_names[8]), &stat_atime); - zend_hash_str_add_new(Z_ARRVAL_P(return_value), stat_sb_names[9], strlen(stat_sb_names[9]), &stat_mtime); - zend_hash_str_add_new(Z_ARRVAL_P(return_value), stat_sb_names[10], strlen(stat_sb_names[10]), &stat_ctime); - zend_hash_str_add_new(Z_ARRVAL_P(return_value), stat_sb_names[11], strlen(stat_sb_names[11]), &stat_blksize); - zend_hash_str_add_new(Z_ARRVAL_P(return_value), stat_sb_names[12], strlen(stat_sb_names[12]), &stat_blocks); + for (i = 0; i < size_stat_sb; i++) { + /* Store numeric indexes in proper order */ + zend_hash_next_index_insert(Z_ARRVAL_P(return_value), stat_sb_addresses[i]); + } + + for (i = 0; i < size_stat_sb; i++) { + /* Store string indexes referencing the same zval */ + zend_hash_str_add_new(Z_ARRVAL_P(return_value), stat_sb_names[i], strlen(stat_sb_names[i]), stat_sb_addresses[i]); + } return; + } } php_error_docref(NULL, E_WARNING, "Didn't understand stat call"); RETURN_FALSE; From 5dafd7b4fe4c1e96a86b8db47569aa9c6d330cc2 Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Mon, 27 Apr 2020 21:01:47 +0200 Subject: [PATCH 292/338] Use EXPECT instead of EXPECTF when possible EXPECTF logic in run tests is considerable, so lets avoid it # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # On branch tests/use-simpler-expect-section # Your branch is behind 'fork/tests/use-simpler-expect-section' by 1 commit, and can be fast-forwarded. # (use "git pull" to update your local branch) # # Changes to be committed: # modified: Zend/tests/005.phpt # modified: Zend/tests/bug27669.phpt # modified: Zend/tests/bug51827.phpt # modified: Zend/tests/bug63206.phpt # modified: Zend/tests/bug63206_1.phpt # modified: Zend/tests/bug63206_2.phpt # modified: Zend/tests/incompat_ctx_user.phpt # modified: Zend/tests/instanceof_001.phpt # modified: Zend/tests/unexpected_ref_bug.phpt # modified: ext/date/tests/012.phpt # modified: ext/date/tests/DatePeriod_wrong_recurrence_on_constructor.phpt # modified: ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt # modified: ext/date/tests/date_parse_001.phpt # modified: ext/date/tests/date_parse_error.phpt # modified: ext/date/tests/gmmktime_basic.phpt # modified: ext/date/tests/mktime_error.phpt # modified: ext/date/tests/timezone_abbreviations_list_basic1.phpt # modified: ext/fileinfo/tests/finfo_set_flags_basic-mb.phpt # modified: ext/fileinfo/tests/finfo_set_flags_basic.phpt # modified: ext/filter/tests/007.phpt # modified: ext/filter/tests/008.phpt # modified: ext/filter/tests/010.phpt # modified: ext/hash/tests/hash_hkdf_edges.phpt # modified: ext/hash/tests/hash_hmac_file_basic.phpt # modified: ext/json/tests/json_last_error_msg_error.phpt # modified: ext/libxml/tests/bug76777.phpt # modified: ext/pcre/tests/preg_replace_error2.phpt # modified: ext/pcre/tests/split2.phpt # modified: ext/phar/tests/phar_isvalidpharfilename.phpt # modified: ext/phar/tests/pharfileinfo_chmod.phpt # modified: ext/phar/tests/pharfileinfo_setmetadata.phpt # modified: ext/phar/tests/stat2_5.3.phpt # modified: ext/posix/tests/posix_getgrgid_error.phpt # modified: ext/posix/tests/posix_getpgid_error.phpt # modified: ext/posix/tests/posix_getpwuid_error.phpt # modified: ext/posix/tests/posix_getsid_error.phpt # modified: ext/posix/tests/posix_initgroups.phpt # modified: ext/posix/tests/posix_kill_error.phpt # modified: ext/posix/tests/posix_strerror_error.phpt # modified: ext/reflection/tests/ReflectionClass_hasProperty_002.phpt # modified: ext/reflection/tests/ReflectionMethod_getClosure_error.phpt # modified: ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt # modified: ext/reflection/tests/ReflectionObject_getName_basic.phpt # modified: ext/reflection/tests/ReflectionProperty_isDefault_basic.phpt # modified: ext/reflection/tests/ReflectionProperty_setValue_error.phpt # modified: ext/session/tests/bug79221.phpt # modified: ext/session/tests/session_cache_limiter_error.phpt # modified: ext/spl/tests/bug61347.phpt # modified: ext/spl/tests/fileobject_005.phpt # modified: ext/spl/tests/iterator_045.phpt # modified: ext/spl/tests/regexIterator_setMode_error.phpt # modified: ext/spl/tests/spl_heap_is_empty_basic.phpt # modified: ext/sqlite3/tests/sqlite3_40_setauthorizer.phpt # modified: ext/sqlite3/tests/sqlite3stmt_getsql_expanded.phpt # modified: ext/standard/tests/array/005.phpt # modified: ext/standard/tests/array/009.phpt # modified: ext/standard/tests/array/array_diff_assoc_error.phpt # modified: ext/standard/tests/array/array_diff_error.phpt # modified: ext/standard/tests/array/array_diff_key_error.phpt # modified: ext/standard/tests/array/array_filter.phpt # modified: ext/standard/tests/array/array_filter_variation10.phpt # modified: ext/standard/tests/array/array_key_exists_variation3.phpt # modified: ext/standard/tests/array/array_map_error.phpt # modified: ext/standard/tests/array/array_merge.phpt # modified: ext/standard/tests/array/array_push.phpt # modified: ext/standard/tests/array/array_slice.phpt # modified: ext/standard/tests/array/array_unshift.phpt # modified: ext/standard/tests/array/array_walk.phpt # modified: ext/standard/tests/array/array_walk_error2.phpt # modified: ext/standard/tests/array/array_walk_recursive1.phpt # modified: ext/standard/tests/array/array_walk_recursive_error2.phpt # modified: ext/standard/tests/array/array_walk_recursive_variation7.phpt # modified: ext/standard/tests/array/array_walk_variation7.phpt # modified: ext/standard/tests/array/uasort_variation8.phpt # modified: ext/standard/tests/array/usort_variation8.phpt # modified: ext/standard/tests/assert/assert_variation.phpt # modified: ext/standard/tests/file/auto_detect_line_endings_1.phpt # modified: ext/standard/tests/file/auto_detect_line_endings_2.phpt # modified: ext/standard/tests/file/basename.phpt # modified: ext/standard/tests/file/fscanf.phpt # modified: ext/standard/tests/file/fscanf_variation10.phpt # modified: ext/standard/tests/file/is_dir_variation3.phpt # modified: ext/standard/tests/file/is_executable_error.phpt # modified: ext/standard/tests/file/is_executable_variation3.phpt # modified: ext/standard/tests/file/is_file_variation3.phpt # modified: ext/standard/tests/file/is_readable_error.phpt # modified: ext/standard/tests/file/is_readable_variation3.phpt # modified: ext/standard/tests/file/is_uploaded_file_basic.phpt # modified: ext/standard/tests/file/is_writable_error.phpt # modified: ext/standard/tests/file/is_writable_variation3.phpt # modified: ext/standard/tests/file/move_uploaded_file_basic.phpt # modified: ext/standard/tests/general_functions/get_include_path_basic.phpt # modified: ext/standard/tests/general_functions/include_path.phpt # modified: ext/standard/tests/general_functions/is_array.phpt # modified: ext/standard/tests/general_functions/is_bool.phpt # modified: ext/standard/tests/general_functions/is_float_64bit.phpt # modified: ext/standard/tests/general_functions/is_int_64bit.phpt # modified: ext/standard/tests/general_functions/is_null.phpt # modified: ext/standard/tests/general_functions/is_numeric.phpt # modified: ext/standard/tests/general_functions/is_object.phpt # modified: ext/standard/tests/general_functions/is_scalar.phpt # modified: ext/standard/tests/general_functions/is_string.phpt # modified: ext/standard/tests/general_functions/ob_get_length_basic.phpt # modified: ext/standard/tests/general_functions/php_uname_error.phpt # modified: ext/standard/tests/general_functions/print_r.phpt # modified: ext/standard/tests/general_functions/print_r_64bit.phpt # modified: ext/standard/tests/general_functions/var_dump_64bit.phpt # modified: ext/standard/tests/general_functions/var_export-locale.phpt # modified: ext/standard/tests/image/image_type_to_extension.phpt # modified: ext/standard/tests/math/lcg_value_basic.phpt # modified: ext/standard/tests/network/inet.phpt # modified: ext/standard/tests/network/ip_x86_64.phpt # modified: ext/standard/tests/random/random_int.phpt # modified: ext/standard/tests/serialize/bug45706.phpt # modified: ext/standard/tests/streams/bug61115.phpt # modified: ext/standard/tests/streams/bug78662.phpt # modified: ext/standard/tests/streams/stream_set_timeout_error.phpt # modified: ext/standard/tests/strings/chr_error.phpt # modified: ext/standard/tests/strings/fprintf_error.phpt # modified: ext/standard/tests/strings/htmlentities24.phpt # modified: ext/standard/tests/strings/htmlspecialchars.phpt # modified: ext/standard/tests/strings/ltrim.phpt # modified: ext/standard/tests/strings/metaphone.phpt # modified: ext/standard/tests/strings/parse_str_basic1.phpt # modified: ext/standard/tests/strings/parse_str_basic3.phpt # modified: ext/standard/tests/strings/printf_error.phpt # modified: ext/standard/tests/strings/rtrim.phpt # modified: ext/standard/tests/strings/soundex.phpt # modified: ext/standard/tests/strings/sprintf_variation15.phpt # modified: ext/standard/tests/strings/sscanf_error.phpt # modified: ext/standard/tests/strings/str_ireplace.phpt # modified: ext/standard/tests/strings/stristr.phpt # modified: ext/standard/tests/strings/strrchr_variation1.phpt # modified: ext/standard/tests/strings/strrchr_variation2.phpt # modified: ext/standard/tests/strings/strtolower.phpt # modified: ext/standard/tests/strings/strtoupper1.phpt # modified: ext/standard/tests/strings/strval_error.phpt # modified: ext/standard/tests/strings/substr.phpt # modified: ext/standard/tests/strings/trim1.phpt # modified: ext/standard/tests/strings/vfprintf_error1.phpt # modified: ext/standard/tests/time/strptime_error.phpt # modified: ext/tokenizer/tests/001.phpt # modified: ext/xmlreader/tests/static.phpt # modified: ext/xmlwriter/tests/bug41326.phpt # modified: tests/output/stream_isatty_err.phpt # modified: tests/output/stream_isatty_in-err.phpt # modified: tests/output/stream_isatty_in-out-err.phpt # modified: tests/output/stream_isatty_in-out.phpt # modified: tests/output/stream_isatty_out-err.phpt # modified: tests/output/stream_isatty_out.phpt # # Changes not staged for commit: # modified: run-tests.php # # ------------------------ >8 ------------------------ # Do not modify or remove the line above. # Everything below it will be ignored. diff --git a/Zend/tests/005.phpt b/Zend/tests/005.phpt index f4abfb6c51..413f3205ad 100644 --- a/Zend/tests/005.phpt +++ b/Zend/tests/005.phpt @@ -13,7 +13,7 @@ var_dump(strcasecmp("01", "01")); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- int(0) int(-3) int(-1) diff --git a/Zend/tests/bug27669.phpt b/Zend/tests/bug27669.phpt index 7067c23e0d..9cd845e337 100644 --- a/Zend/tests/bug27669.phpt +++ b/Zend/tests/bug27669.phpt @@ -10,5 +10,5 @@ Bug #27669 (PHP 5 didn't support all possibilities for calling static methods dy $y[0] = 'hello'; A::{$y[0]}(); ?> ---EXPECTF-- +--EXPECT-- Hello World diff --git a/Zend/tests/bug51827.phpt b/Zend/tests/bug51827.phpt index 6c3d721716..1a2d9bdf39 100644 --- a/Zend/tests/bug51827.phpt +++ b/Zend/tests/bug51827.phpt @@ -13,7 +13,7 @@ register_shutdown_function('ABC'); register_shutdown_function('exploDe'); ?> ---EXPECTF-- +--EXPECT-- int(1) Fatal error: Uncaught ArgumentCountError: explode() expects at least 2 parameters, 0 given in [no active file]:0 diff --git a/Zend/tests/bug63206.phpt b/Zend/tests/bug63206.phpt index dc7bb1fd1d..6aba55eca1 100644 --- a/Zend/tests/bug63206.phpt +++ b/Zend/tests/bug63206.phpt @@ -22,7 +22,7 @@ set_error_handler(function() { $triggerNotice1++; $triggerNotice2++; ?> ---EXPECTF-- +--EXPECT-- Second handler Internal handler Second handler diff --git a/Zend/tests/bug63206_1.phpt b/Zend/tests/bug63206_1.phpt index f08f913824..d054211638 100644 --- a/Zend/tests/bug63206_1.phpt +++ b/Zend/tests/bug63206_1.phpt @@ -22,5 +22,5 @@ restore_error_handler(); $triggerNotice++; ?> ---EXPECTF-- +--EXPECT-- Second handler diff --git a/Zend/tests/bug63206_2.phpt b/Zend/tests/bug63206_2.phpt index 7a2bf38543..a4a67f577e 100644 --- a/Zend/tests/bug63206_2.phpt +++ b/Zend/tests/bug63206_2.phpt @@ -22,5 +22,5 @@ restore_exception_handler(); throw new Exception(); ?> ---EXPECTF-- +--EXPECT-- Second handler diff --git a/Zend/tests/incompat_ctx_user.phpt b/Zend/tests/incompat_ctx_user.phpt index 8c7461e4f7..3fe0456175 100644 --- a/Zend/tests/incompat_ctx_user.phpt +++ b/Zend/tests/incompat_ctx_user.phpt @@ -16,5 +16,5 @@ try { echo "Exception: " . $e->getMessage() . "\n"; } ?> ---EXPECTF-- +--EXPECT-- Exception: Non-static method A::foo() cannot be called statically diff --git a/Zend/tests/instanceof_001.phpt b/Zend/tests/instanceof_001.phpt index 27170420f0..02b7d59baf 100644 --- a/Zend/tests/instanceof_001.phpt +++ b/Zend/tests/instanceof_001.phpt @@ -17,7 +17,7 @@ var_dump($c[0] instanceof stdClass); var_dump(@$inexistent instanceof stdClass); ?> ---EXPECTF-- +--EXPECT-- bool(true) bool(true) bool(true) diff --git a/Zend/tests/unexpected_ref_bug.phpt b/Zend/tests/unexpected_ref_bug.phpt index 0d78410d1a..172b1e6224 100644 --- a/Zend/tests/unexpected_ref_bug.phpt +++ b/Zend/tests/unexpected_ref_bug.phpt @@ -15,5 +15,5 @@ $my_var = str_repeat("A", 64); $data = call_user_func_array("str_replace", array(&$my_var, new Test(), "foo")); echo "Done.\n"; ?> ---EXPECTF-- +--EXPECT-- Done. diff --git a/ext/date/tests/012.phpt b/ext/date/tests/012.phpt index ee8faf1c00..0997ef047c 100644 --- a/ext/date/tests/012.phpt +++ b/ext/date/tests/012.phpt @@ -13,7 +13,7 @@ var_dump(date_isodate_set($dto, 2006, 100, 15)); var_dump($dto->format("Y/m/d H:i:s")); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- object(DateTime)#1 (3) { ["date"]=> string(26) "2006-01-23 00:00:00.000000" diff --git a/ext/date/tests/DatePeriod_wrong_recurrence_on_constructor.phpt b/ext/date/tests/DatePeriod_wrong_recurrence_on_constructor.phpt index 715ea63dc9..f96753b019 100644 --- a/ext/date/tests/DatePeriod_wrong_recurrence_on_constructor.phpt +++ b/ext/date/tests/DatePeriod_wrong_recurrence_on_constructor.phpt @@ -14,6 +14,6 @@ try { echo $exception->getMessage(), "\n"; } ?> ---EXPECTF-- +--EXPECT-- DatePeriod::__construct(): The recurrence count '0' is invalid. Needs to be > 0 DatePeriod::__construct(): The recurrence count '-1' is invalid. Needs to be > 0 diff --git a/ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt b/ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt index cb948e9df5..670dcb2ee3 100644 --- a/ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt +++ b/ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt @@ -22,7 +22,7 @@ echo "\n-- Format a sample entry --\n"; var_dump( $abbr["acst"] ); ?> ---EXPECTF-- +--EXPECT-- *** Testing DateTimeZone::listAbbreviations() : basic functionality *** string(5) "array" int(144) diff --git a/ext/date/tests/date_parse_001.phpt b/ext/date/tests/date_parse_001.phpt index 0d58c1f8e9..36f8d9bbdd 100644 --- a/ext/date/tests/date_parse_001.phpt +++ b/ext/date/tests/date_parse_001.phpt @@ -14,7 +14,7 @@ Test basic date_parse() var_dump(date_parse("")); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- array(12) { ["year"]=> int(2006) diff --git a/ext/date/tests/date_parse_error.phpt b/ext/date/tests/date_parse_error.phpt index 24b0094c9e..6a5180fdfb 100644 --- a/ext/date/tests/date_parse_error.phpt +++ b/ext/date/tests/date_parse_error.phpt @@ -17,7 +17,7 @@ $invalid_date = "2OO9-02--27 10:00?00.5"; var_dump( date_parse($invalid_date) ); ?> ---EXPECTF-- +--EXPECT-- *** Testing date_parse() : error conditions *** -- Testing date_parse() function with unexpected characters in $date argument -- diff --git a/ext/date/tests/gmmktime_basic.phpt b/ext/date/tests/gmmktime_basic.phpt index 303bd9b010..f96b635c08 100644 --- a/ext/date/tests/gmmktime_basic.phpt +++ b/ext/date/tests/gmmktime_basic.phpt @@ -22,6 +22,6 @@ $year = 2008; var_dump( gmmktime($hour, $min, $sec, $mon, $day, $year) ); ?> ---EXPECTF-- +--EXPECT-- *** Testing gmmktime() : basic functionality *** int(1218182888) diff --git a/ext/date/tests/mktime_error.phpt b/ext/date/tests/mktime_error.phpt index e40e40f38d..8bdb61df7b 100644 --- a/ext/date/tests/mktime_error.phpt +++ b/ext/date/tests/mktime_error.phpt @@ -35,7 +35,7 @@ try { } ?> ---EXPECTF-- +--EXPECT-- *** Testing mktime() : error conditions *** -- Testing mktime() function with Zero arguments -- diff --git a/ext/date/tests/timezone_abbreviations_list_basic1.phpt b/ext/date/tests/timezone_abbreviations_list_basic1.phpt index b3bf7c84a1..0640b8a83d 100644 --- a/ext/date/tests/timezone_abbreviations_list_basic1.phpt +++ b/ext/date/tests/timezone_abbreviations_list_basic1.phpt @@ -22,7 +22,7 @@ echo "\n-- Format a sample entry --\n"; var_dump( $abbr["acst"] ); ?> ---EXPECTF-- +--EXPECT-- *** Testing timezone_abbreviations_list() : basic functionality *** string(5) "array" int(144) diff --git a/ext/fileinfo/tests/finfo_set_flags_basic-mb.phpt b/ext/fileinfo/tests/finfo_set_flags_basic-mb.phpt index 50a1559f58..855acaaed8 100644 --- a/ext/fileinfo/tests/finfo_set_flags_basic-mb.phpt +++ b/ext/fileinfo/tests/finfo_set_flags_basic-mb.phpt @@ -25,7 +25,7 @@ $finfo = new finfo( FILEINFO_NONE, $magicFile ); var_dump( $finfo->set_flags( FILEINFO_MIME ) ); ?> ---EXPECTF-- +--EXPECT-- *** Testing finfo_set_flags() : basic functionality *** bool(true) bool(true) diff --git a/ext/fileinfo/tests/finfo_set_flags_basic.phpt b/ext/fileinfo/tests/finfo_set_flags_basic.phpt index 95f2648f51..fe2921b560 100644 --- a/ext/fileinfo/tests/finfo_set_flags_basic.phpt +++ b/ext/fileinfo/tests/finfo_set_flags_basic.phpt @@ -25,7 +25,7 @@ $finfo = new finfo( FILEINFO_NONE, $magicFile ); var_dump( $finfo->set_flags( FILEINFO_MIME ) ); ?> ---EXPECTF-- +--EXPECT-- *** Testing finfo_set_flags() : basic functionality *** bool(true) bool(true) diff --git a/ext/filter/tests/007.phpt b/ext/filter/tests/007.phpt index dc966b8cc9..b5f285342b 100644 --- a/ext/filter/tests/007.phpt +++ b/ext/filter/tests/007.phpt @@ -23,7 +23,7 @@ var_dump(filter_has_var(INPUT_POST, "")); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- bool(true) bool(true) bool(false) diff --git a/ext/filter/tests/008.phpt b/ext/filter/tests/008.phpt index 75e0968c62..1d4d64529d 100644 --- a/ext/filter/tests/008.phpt +++ b/ext/filter/tests/008.phpt @@ -9,7 +9,7 @@ var_dump(filter_list()); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- array(21) { [0]=> string(3) "int" diff --git a/ext/filter/tests/010.phpt b/ext/filter/tests/010.phpt index 14f8db01af..46b6044668 100644 --- a/ext/filter/tests/010.phpt +++ b/ext/filter/tests/010.phpt @@ -17,7 +17,7 @@ var_dump(filter_var(1, 0, array())); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- array(7) { [0]=> int(1) diff --git a/ext/hash/tests/hash_hkdf_edges.phpt b/ext/hash/tests/hash_hkdf_edges.phpt index cee86ae82e..ceb21631d1 100644 --- a/ext/hash/tests/hash_hkdf_edges.phpt +++ b/ext/hash/tests/hash_hkdf_edges.phpt @@ -25,7 +25,7 @@ catch (\Error $e) { } ?> ---EXPECTF-- +--EXPECT-- *** Testing hash_hkdf(): edge cases *** Length < digestSize: 98b16391063ece Length % digestSize != 0: 98b16391063ecee006a3ca8ee5776b1e5f diff --git a/ext/hash/tests/hash_hmac_file_basic.phpt b/ext/hash/tests/hash_hmac_file_basic.phpt index 4569c46c35..11b9d05738 100644 --- a/ext/hash/tests/hash_hmac_file_basic.phpt +++ b/ext/hash/tests/hash_hmac_file_basic.phpt @@ -57,7 +57,7 @@ echo "sha256(raw): " . bin2hex(hash_hmac_file('sha256', $file, $key, TRUE)). "\n unlink($file); ?> ---EXPECTF-- +--EXPECT-- *** Testing hash_hmac_file() : basic functionality *** gost: 94c39a40d5db852a8dc3d24e37eebf2d53e3d711457c59cd02b614f792a9d918 haval128,3: f1cea637451097d790354a86de3f54a3 diff --git a/ext/json/tests/json_last_error_msg_error.phpt b/ext/json/tests/json_last_error_msg_error.phpt index 75b06f72a2..0eb55c4c66 100644 --- a/ext/json/tests/json_last_error_msg_error.phpt +++ b/ext/json/tests/json_last_error_msg_error.phpt @@ -14,6 +14,6 @@ try { } ?> ---EXPECTF-- +--EXPECT-- string(8) "No error" json_last_error_msg() expects exactly 0 parameters, 1 given diff --git a/ext/libxml/tests/bug76777.phpt b/ext/libxml/tests/bug76777.phpt index 5e15024b81..c50e52203f 100644 --- a/ext/libxml/tests/bug76777.phpt +++ b/ext/libxml/tests/bug76777.phpt @@ -29,7 +29,7 @@ libxml_set_external_entity_loader(function($p,$s,$c) { $dom=new DOMDocument($xml); $dom->schemaValidateSource($xsd); ?> ---EXPECTF-- +--EXPECT-- NULL string(15) "nonexistent.xsd" array(4) { diff --git a/ext/pcre/tests/preg_replace_error2.phpt b/ext/pcre/tests/preg_replace_error2.phpt index 2401e0bb49..d7748bf954 100644 --- a/ext/pcre/tests/preg_replace_error2.phpt +++ b/ext/pcre/tests/preg_replace_error2.phpt @@ -29,7 +29,7 @@ try { } echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing preg_replace() : error conditions *** Arg value is: this is a string diff --git a/ext/pcre/tests/split2.phpt b/ext/pcre/tests/split2.phpt index 5fafee3b87..3d9714a420 100644 --- a/ext/pcre/tests/split2.phpt +++ b/ext/pcre/tests/split2.phpt @@ -19,7 +19,7 @@ var_dump(preg_split('/(\d*)/', 'ab2c3u')); var_dump(preg_last_error() == PREG_RECURSION_LIMIT_ERROR); ?> ---EXPECTF-- +--EXPECT-- array(15) { [0]=> string(0) "" diff --git a/ext/phar/tests/phar_isvalidpharfilename.phpt b/ext/phar/tests/phar_isvalidpharfilename.phpt index 8b9088b9b3..d44c0603e9 100644 --- a/ext/phar/tests/phar_isvalidpharfilename.phpt +++ b/ext/phar/tests/phar_isvalidpharfilename.phpt @@ -72,7 +72,7 @@ var_dump(Phar::isValidPharFilename('dir.phar.php', false)); --CLEAN-- chmod(0666); ?> --CLEAN-- ---EXPECTF-- +--EXPECT-- Phar entry "a" is a temporary directory (not an actual entry in the archive), cannot chmod diff --git a/ext/phar/tests/pharfileinfo_setmetadata.phpt b/ext/phar/tests/pharfileinfo_setmetadata.phpt index 38e23f706d..8b4385ad5f 100644 --- a/ext/phar/tests/pharfileinfo_setmetadata.phpt +++ b/ext/phar/tests/pharfileinfo_setmetadata.phpt @@ -40,7 +40,7 @@ echo $e->getMessage(), "\n"; --CLEAN-- ---EXPECTF-- +--EXPECT-- Phar entry is a temporary directory (not an actual entry in the archive), cannot set metadata Phar entry is a temporary directory (not an actual entry in the archive), cannot delete metadata Write operations disabled by the php.ini setting phar.readonly diff --git a/ext/phar/tests/stat2_5.3.phpt b/ext/phar/tests/stat2_5.3.phpt index 19acc3ba99..9e9e158602 100644 --- a/ext/phar/tests/stat2_5.3.phpt +++ b/ext/phar/tests/stat2_5.3.phpt @@ -35,7 +35,7 @@ include $fname3; --CLEAN-- ---EXPECTF-- +--EXPECT-- bool(true) is_link bool(false) diff --git a/ext/posix/tests/posix_getgrgid_error.phpt b/ext/posix/tests/posix_getgrgid_error.phpt index e9dbe2a6ce..36ffcf4952 100644 --- a/ext/posix/tests/posix_getgrgid_error.phpt +++ b/ext/posix/tests/posix_getgrgid_error.phpt @@ -20,7 +20,7 @@ var_dump( posix_getgrgid($gid)); echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing posix_getgrgid() : error conditions *** -- Testing posix_getgrgid() function with a negative group id -- diff --git a/ext/posix/tests/posix_getpgid_error.phpt b/ext/posix/tests/posix_getpgid_error.phpt index 19e306b2ee..85f12d4917 100644 --- a/ext/posix/tests/posix_getpgid_error.phpt +++ b/ext/posix/tests/posix_getpgid_error.phpt @@ -22,7 +22,7 @@ var_dump( posix_getpgid($pid) ); echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing posix_getpgid() : error conditions *** -- Testing posix_getpgid() with negative pid -- diff --git a/ext/posix/tests/posix_getpwuid_error.phpt b/ext/posix/tests/posix_getpwuid_error.phpt index 365033b689..b4ec515e74 100644 --- a/ext/posix/tests/posix_getpwuid_error.phpt +++ b/ext/posix/tests/posix_getpwuid_error.phpt @@ -20,7 +20,7 @@ var_dump( posix_getpwuid($uid) ); echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing posix_getpwuid() : error conditions *** -- Testing posix_getpwuid() function negative uid -- diff --git a/ext/posix/tests/posix_getsid_error.phpt b/ext/posix/tests/posix_getsid_error.phpt index 8e05a23496..08080230aa 100644 --- a/ext/posix/tests/posix_getsid_error.phpt +++ b/ext/posix/tests/posix_getsid_error.phpt @@ -15,5 +15,5 @@ PHP Testfest Berlin 2009-05-10 ---EXPECTF-- +--EXPECT-- bool(false) diff --git a/ext/posix/tests/posix_initgroups.phpt b/ext/posix/tests/posix_initgroups.phpt index 20cf8cef8b..c77acfe3a4 100644 --- a/ext/posix/tests/posix_initgroups.phpt +++ b/ext/posix/tests/posix_initgroups.phpt @@ -11,5 +11,5 @@ if (!function_exists('posix_initgroups')) die('skip posix_initgroups() not found var_dump(posix_initgroups(NULL, NULL)); ?> ---EXPECTF-- +--EXPECT-- bool(false) diff --git a/ext/posix/tests/posix_kill_error.phpt b/ext/posix/tests/posix_kill_error.phpt index 89474c4994..ea9b4f45dc 100644 --- a/ext/posix/tests/posix_kill_error.phpt +++ b/ext/posix/tests/posix_kill_error.phpt @@ -28,7 +28,7 @@ var_dump( posix_kill($pid, 999) ); echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing posix_kill() : error conditions *** -- Testing posix_kill() function with invalid signal -- diff --git a/ext/posix/tests/posix_strerror_error.phpt b/ext/posix/tests/posix_strerror_error.phpt index 60b096656a..2792ff5b3b 100644 --- a/ext/posix/tests/posix_strerror_error.phpt +++ b/ext/posix/tests/posix_strerror_error.phpt @@ -20,7 +20,7 @@ echo gettype( posix_strerror($errno) )."\n"; echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing posix_strerror() : error conditions *** -- Testing posix_strerror() function with invalid error number -- diff --git a/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt b/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt index a135939052..607fead65c 100644 --- a/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt +++ b/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt @@ -16,7 +16,7 @@ var_dump($rc->hasProperty(1)); var_dump($rc->hasProperty(1.5)); var_dump($rc->hasProperty(true)); ?> ---EXPECTF-- +--EXPECT-- Check invalid params: bool(false) bool(false) diff --git a/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt b/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt index 728ddf9265..7e45eec411 100644 --- a/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt +++ b/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt @@ -43,7 +43,7 @@ try { } ?> ---EXPECTF-- +--EXPECT-- *** Testing ReflectionMethod::getClosure() : error conditions *** -- Testing ReflectionMethod::getClosure() function with invalid object -- diff --git a/ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt b/ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt index 113cabbbeb..c3bab48d6f 100644 --- a/ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt +++ b/ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt @@ -69,7 +69,7 @@ try { } ?> ---EXPECTF-- +--EXPECT-- Non-instance: string(72) "Given object is not an instance of the class this method was declared in" diff --git a/ext/reflection/tests/ReflectionObject_getName_basic.phpt b/ext/reflection/tests/ReflectionObject_getName_basic.phpt index 1885695cb1..94ad1e2c7b 100644 --- a/ext/reflection/tests/ReflectionObject_getName_basic.phpt +++ b/ext/reflection/tests/ReflectionObject_getName_basic.phpt @@ -15,7 +15,7 @@ $r3 = new ReflectionObject($r2); var_dump($r3->getName()); ?> ---EXPECTF-- +--EXPECT-- string(8) "stdClass" string(1) "C" string(16) "ReflectionObject" diff --git a/ext/reflection/tests/ReflectionProperty_isDefault_basic.phpt b/ext/reflection/tests/ReflectionProperty_isDefault_basic.phpt index 1472615178..7defcb76e0 100644 --- a/ext/reflection/tests/ReflectionProperty_isDefault_basic.phpt +++ b/ext/reflection/tests/ReflectionProperty_isDefault_basic.phpt @@ -25,7 +25,7 @@ reflectProperty("TestClass", "prot"); reflectProperty("TestClass", "priv"); ?> ---EXPECTF-- +--EXPECT-- ********************************** Reflecting on property TestClass::pub diff --git a/ext/reflection/tests/ReflectionProperty_setValue_error.phpt b/ext/reflection/tests/ReflectionProperty_setValue_error.phpt index f58590b3ea..1f0c2b5f2b 100644 --- a/ext/reflection/tests/ReflectionProperty_setValue_error.phpt +++ b/ext/reflection/tests/ReflectionProperty_setValue_error.phpt @@ -32,7 +32,7 @@ $propInfo = new ReflectionProperty('TestClass', 'pub2'); var_dump($propInfo->setValue($instanceWithNoProperties, "NewValue")); var_dump($instanceWithNoProperties->pub2); ?> ---EXPECTF-- +--EXPECT-- Protected property: Cannot access non-public member TestClass::$prot diff --git a/ext/session/tests/bug79221.phpt b/ext/session/tests/bug79221.phpt index b0972c4697..0813457035 100644 --- a/ext/session/tests/bug79221.phpt +++ b/ext/session/tests/bug79221.phpt @@ -40,6 +40,6 @@ session_start(); var_dump($_SESSION); session_destroy(); ---EXPECTF-- +--EXPECT-- array(0) { } diff --git a/ext/session/tests/session_cache_limiter_error.phpt b/ext/session/tests/session_cache_limiter_error.phpt index 284649e277..d291d531c0 100644 --- a/ext/session/tests/session_cache_limiter_error.phpt +++ b/ext/session/tests/session_cache_limiter_error.phpt @@ -89,7 +89,7 @@ fclose($fp); echo "Done"; ob_end_flush(); ?> ---EXPECTF-- +--EXPECT-- *** Testing session_cache_limiter() : error functionality *** -- Iteration 1 -- diff --git a/ext/spl/tests/bug61347.phpt b/ext/spl/tests/bug61347.phpt index b83f48f7ff..4b4f9eaedf 100644 --- a/ext/spl/tests/bug61347.phpt +++ b/ext/spl/tests/bug61347.phpt @@ -21,7 +21,7 @@ var_dump(isset($b[37])); //true var_dump(isset($b['no_exists'])); //false var_dump(empty($b['b'])); //true var_dump(empty($b[37])); //true ---EXPECTF-- +--EXPECT-- bool(false) bool(false) bool(false) diff --git a/ext/spl/tests/fileobject_005.phpt b/ext/spl/tests/fileobject_005.phpt index e26a8d7aea..cce4a7d6a6 100644 --- a/ext/spl/tests/fileobject_005.phpt +++ b/ext/spl/tests/fileobject_005.phpt @@ -27,6 +27,6 @@ $fo->fwrite("blahlubba"); $path = __DIR__.DIRECTORY_SEPARATOR.'fileobject_005.txt'; unlink($path); ?> ---EXPECTF-- +--EXPECT-- bool(true) string(4) "blah" diff --git a/ext/spl/tests/iterator_045.phpt b/ext/spl/tests/iterator_045.phpt index 63d78cc78e..e245b95688 100644 --- a/ext/spl/tests/iterator_045.phpt +++ b/ext/spl/tests/iterator_045.phpt @@ -88,7 +88,7 @@ $it->testUnset($unsets); $it->show(); ?> ---EXPECTF-- +--EXPECT-- Exception: MyCachingIterator does not use a full cache (see CachingIterator::__construct) Exception: MyCachingIterator does not use a full cache (see CachingIterator::__construct) MyCachingIterator::testSet() diff --git a/ext/spl/tests/regexIterator_setMode_error.phpt b/ext/spl/tests/regexIterator_setMode_error.phpt index 4816896d8a..3b0eaf1d66 100644 --- a/ext/spl/tests/regexIterator_setMode_error.phpt +++ b/ext/spl/tests/regexIterator_setMode_error.phpt @@ -18,7 +18,7 @@ try { } ?> ---EXPECTF-- +--EXPECT-- int(0) string(14) "Illegal mode 7" int(0) diff --git a/ext/spl/tests/spl_heap_is_empty_basic.phpt b/ext/spl/tests/spl_heap_is_empty_basic.phpt index 4a90734ad4..abf64f8d9d 100644 --- a/ext/spl/tests/spl_heap_is_empty_basic.phpt +++ b/ext/spl/tests/spl_heap_is_empty_basic.phpt @@ -22,7 +22,7 @@ var_dump($heap->isEmpty()); $heap->extract(); var_dump($heap->isEmpty()); ?> ---EXPECTF-- +--EXPECT-- bool(true) bool(false) bool(true) diff --git a/ext/sqlite3/tests/sqlite3_40_setauthorizer.phpt b/ext/sqlite3/tests/sqlite3_40_setauthorizer.phpt index 994c67e0c3..459beeca53 100644 --- a/ext/sqlite3/tests/sqlite3_40_setauthorizer.phpt +++ b/ext/sqlite3/tests/sqlite3_40_setauthorizer.phpt @@ -69,7 +69,7 @@ try { } ?> ---EXPECTF-- +--EXPECT-- int(1) Unable to prepare statement: 23, not authorized bool(true) diff --git a/ext/sqlite3/tests/sqlite3stmt_getsql_expanded.phpt b/ext/sqlite3/tests/sqlite3stmt_getsql_expanded.phpt index 3f9fe84130..9a893c590d 100644 --- a/ext/sqlite3/tests/sqlite3stmt_getsql_expanded.phpt +++ b/ext/sqlite3/tests/sqlite3stmt_getsql_expanded.phpt @@ -44,7 +44,7 @@ var_dump($db->close()); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- Getting expanded SQL statement string(21) "SELECT 42, 'php', 43;" Execute statement diff --git a/ext/standard/tests/array/005.phpt b/ext/standard/tests/array/005.phpt index c51e98a67b..ed9f0458c4 100644 --- a/ext/standard/tests/array/005.phpt +++ b/ext/standard/tests/array/005.phpt @@ -69,7 +69,7 @@ var_dump( current($mixed_array[1]) ); echo"Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing Error Conditions *** NULL diff --git a/ext/standard/tests/array/009.phpt b/ext/standard/tests/array/009.phpt index c62be0d27c..fc10d293ff 100644 --- a/ext/standard/tests/array/009.phpt +++ b/ext/standard/tests/array/009.phpt @@ -71,7 +71,7 @@ foreach ($varient_arrays as $sub_array ) { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing basic operations *** -- Iteration 1 -- int(0) diff --git a/ext/standard/tests/array/array_diff_assoc_error.phpt b/ext/standard/tests/array/array_diff_assoc_error.phpt index 6aa7864ee9..69015289e2 100644 --- a/ext/standard/tests/array/array_diff_assoc_error.phpt +++ b/ext/standard/tests/array/array_diff_assoc_error.phpt @@ -33,7 +33,7 @@ try { echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing array_diff_assoc() : error conditions *** -- Testing array_diff_assoc() function with zero arguments -- diff --git a/ext/standard/tests/array/array_diff_error.phpt b/ext/standard/tests/array/array_diff_error.phpt index d269f010b8..889c5ce1b2 100644 --- a/ext/standard/tests/array/array_diff_error.phpt +++ b/ext/standard/tests/array/array_diff_error.phpt @@ -33,7 +33,7 @@ try { echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing array_diff() : error conditions *** -- Testing array_diff() function with zero arguments -- diff --git a/ext/standard/tests/array/array_diff_key_error.phpt b/ext/standard/tests/array/array_diff_key_error.phpt index e957abce1c..80ff5728fe 100644 --- a/ext/standard/tests/array/array_diff_key_error.phpt +++ b/ext/standard/tests/array/array_diff_key_error.phpt @@ -28,7 +28,7 @@ try { echo $e->getMessage(), "\n"; } ?> ---EXPECTF-- +--EXPECT-- *** Testing array_diff_key() : error conditions *** -- Testing array_diff_key() function with less than expected no. of arguments -- diff --git a/ext/standard/tests/array/array_filter.phpt b/ext/standard/tests/array/array_filter.phpt index a1b18bd234..2cb21ca609 100644 --- a/ext/standard/tests/array/array_filter.phpt +++ b/ext/standard/tests/array/array_filter.phpt @@ -28,7 +28,7 @@ var_dump(array_filter($array3, "even")); var_dump(array_filter(array())); ?> ---EXPECTF-- +--EXPECT-- Odd : array(3) { ["a"]=> diff --git a/ext/standard/tests/array/array_filter_variation10.phpt b/ext/standard/tests/array/array_filter_variation10.phpt index 265daf1fb4..ff88d7a7f8 100644 --- a/ext/standard/tests/array/array_filter_variation10.phpt +++ b/ext/standard/tests/array/array_filter_variation10.phpt @@ -56,7 +56,7 @@ try { echo "Done" ?> ---EXPECTF-- +--EXPECT-- *** Testing array_filter() : usage variations - using array keys in 'callback' *** 0 = 0 1 = 1 diff --git a/ext/standard/tests/array/array_key_exists_variation3.phpt b/ext/standard/tests/array/array_key_exists_variation3.phpt index 4a6409bb1f..ef6cf45139 100644 --- a/ext/standard/tests/array/array_key_exists_variation3.phpt +++ b/ext/standard/tests/array/array_key_exists_variation3.phpt @@ -34,7 +34,7 @@ foreach($keys as $key) { echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing array_key_exists() : usage variations *** -- Iteration 1 -- diff --git a/ext/standard/tests/array/array_map_error.phpt b/ext/standard/tests/array/array_map_error.phpt index 4739bbf663..b41871e1c4 100644 --- a/ext/standard/tests/array/array_map_error.phpt +++ b/ext/standard/tests/array/array_map_error.phpt @@ -38,7 +38,7 @@ var_dump( array_map('callback2', $arr1, $arr2, $arr3) ); echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing array_map() : error conditions *** -- Testing array_map() function with one less than expected no. of arguments -- diff --git a/ext/standard/tests/array/array_merge.phpt b/ext/standard/tests/array/array_merge.phpt index 08ecbf7147..75007779fa 100644 --- a/ext/standard/tests/array/array_merge.phpt +++ b/ext/standard/tests/array/array_merge.phpt @@ -83,7 +83,7 @@ var_dump(array_merge()); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing array_merge() basic functionality *** --- Iteration 0 --- diff --git a/ext/standard/tests/array/array_push.phpt b/ext/standard/tests/array/array_push.phpt index 227a520ac1..78076b8fc4 100644 --- a/ext/standard/tests/array/array_push.phpt +++ b/ext/standard/tests/array/array_push.phpt @@ -60,7 +60,7 @@ var_dump( $mixed_array[2] ); echo"\nDone"; ?> ---EXPECTF-- +--EXPECT-- *** Testing Edge Conditions *** int(11) int(1) diff --git a/ext/standard/tests/array/array_slice.phpt b/ext/standard/tests/array/array_slice.phpt index d19f5195d6..a76277883a 100644 --- a/ext/standard/tests/array/array_slice.phpt +++ b/ext/standard/tests/array/array_slice.phpt @@ -68,7 +68,7 @@ foreach ($var_array as $sub_array) var_dump (array_slice($var_array[2], -3, -2, false) ); ?> ---EXPECTF-- +--EXPECT-- *** Iteration 1 *** *** Variation with first two Arguments *** diff --git a/ext/standard/tests/array/array_unshift.phpt b/ext/standard/tests/array/array_unshift.phpt index 9ebe83391e..265de4e846 100644 --- a/ext/standard/tests/array/array_unshift.phpt +++ b/ext/standard/tests/array/array_unshift.phpt @@ -12,7 +12,7 @@ var_dump($a); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- int(1) array(1) { [0]=> diff --git a/ext/standard/tests/array/array_walk.phpt b/ext/standard/tests/array/array_walk.phpt index 1f5457c9f7..151c9c70d0 100644 --- a/ext/standard/tests/array/array_walk.phpt +++ b/ext/standard/tests/array/array_walk.phpt @@ -24,7 +24,7 @@ try { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- int(1) int(0) string(4) "data" diff --git a/ext/standard/tests/array/array_walk_error2.phpt b/ext/standard/tests/array/array_walk_error2.phpt index dfc95d3af8..e5aeadcdc0 100644 --- a/ext/standard/tests/array/array_walk_error2.phpt +++ b/ext/standard/tests/array/array_walk_error2.phpt @@ -54,7 +54,7 @@ try { echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing array_walk() : error conditions - callback parameters *** Exception: Too few arguments to function callback1(), 2 passed and exactly 3 expected Exception: Too few arguments to function callback2(), 3 passed and exactly 4 expected diff --git a/ext/standard/tests/array/array_walk_recursive1.phpt b/ext/standard/tests/array/array_walk_recursive1.phpt index 472cb1032d..d4d3e7d8eb 100644 --- a/ext/standard/tests/array/array_walk_recursive1.phpt +++ b/ext/standard/tests/array/array_walk_recursive1.phpt @@ -24,7 +24,7 @@ try { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- int(1) int(0) string(4) "data" diff --git a/ext/standard/tests/array/array_walk_recursive_error2.phpt b/ext/standard/tests/array/array_walk_recursive_error2.phpt index f1686d7acd..2509c95f60 100644 --- a/ext/standard/tests/array/array_walk_recursive_error2.phpt +++ b/ext/standard/tests/array/array_walk_recursive_error2.phpt @@ -54,7 +54,7 @@ try { echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing array_walk_recursive() : error conditions - callback parameters *** Exception: Too few arguments to function callback1(), 2 passed and exactly 3 expected Exception: Too few arguments to function callback2(), 3 passed and exactly 4 expected diff --git a/ext/standard/tests/array/array_walk_recursive_variation7.phpt b/ext/standard/tests/array/array_walk_recursive_variation7.phpt index a0c159d71d..a1cbdad2bd 100644 --- a/ext/standard/tests/array/array_walk_recursive_variation7.phpt +++ b/ext/standard/tests/array/array_walk_recursive_variation7.phpt @@ -33,7 +33,7 @@ echo "-- Anonymous function with null argument --\n"; var_dump( array_walk_recursive( $input, function() { echo "1\n"; })); echo "Done" ?> ---EXPECTF-- +--EXPECT-- *** Testing array_walk_recursive() : anonymous function as callback *** -- Anonymous function with one argument -- int(2) diff --git a/ext/standard/tests/array/array_walk_variation7.phpt b/ext/standard/tests/array/array_walk_variation7.phpt index 0354782eda..3689f8a798 100644 --- a/ext/standard/tests/array/array_walk_variation7.phpt +++ b/ext/standard/tests/array/array_walk_variation7.phpt @@ -33,7 +33,7 @@ echo "-- Anonymous function with null argument --\n"; var_dump( array_walk( $input, function() { echo "1\n"; })); echo "Done" ?> ---EXPECTF-- +--EXPECT-- *** Testing array_walk() : anonymous function as callback *** -- Anonymous function with one argument -- int(2) diff --git a/ext/standard/tests/array/uasort_variation8.phpt b/ext/standard/tests/array/uasort_variation8.phpt index d27cd569c0..b6abdeaef3 100644 --- a/ext/standard/tests/array/uasort_variation8.phpt +++ b/ext/standard/tests/array/uasort_variation8.phpt @@ -29,7 +29,7 @@ var_dump($array_arg); echo "Done" ?> ---EXPECTF-- +--EXPECT-- *** Testing uasort() : built in function as 'cmp_function' *** -- Testing uasort() with built-in 'cmp_function': strcasecmp() -- bool(true) diff --git a/ext/standard/tests/array/usort_variation8.phpt b/ext/standard/tests/array/usort_variation8.phpt index 55ff362d41..4a750ccefa 100644 --- a/ext/standard/tests/array/usort_variation8.phpt +++ b/ext/standard/tests/array/usort_variation8.phpt @@ -31,7 +31,7 @@ var_dump( usort($temp_array2, 'strcmp') ); var_dump($temp_array2); ?> ---EXPECTF-- +--EXPECT-- *** Testing usort() : usage variation *** -- Testing usort() with built-in 'cmp_function': strcasecmp() -- diff --git a/ext/standard/tests/assert/assert_variation.phpt b/ext/standard/tests/assert/assert_variation.phpt index a28ea58d5a..7b550b36d1 100644 --- a/ext/standard/tests/assert/assert_variation.phpt +++ b/ext/standard/tests/assert/assert_variation.phpt @@ -67,7 +67,7 @@ var_dump($rao=assert_options(ASSERT_CALLBACK)); echo "ini.get(\"assert.callback\") => [".ini_get("assert.callback")."]\n\n"; var_dump($r2=assert(0 != 0)); echo"\n"; ---EXPECTF-- +--EXPECT-- Initial values: assert_options(ASSERT_CALLBACK) => [f1] Initial values: ini.get("assert.callback") => [f1] f1 called diff --git a/ext/standard/tests/file/auto_detect_line_endings_1.phpt b/ext/standard/tests/file/auto_detect_line_endings_1.phpt index c79082ecdb..5a4ff0a10f 100644 --- a/ext/standard/tests/file/auto_detect_line_endings_1.phpt +++ b/ext/standard/tests/file/auto_detect_line_endings_1.phpt @@ -15,7 +15,7 @@ var_dump(fgets(STDIN)); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- string(1) "1" string(8) "fooBar1 " string(8) "fooBar2 " diff --git a/ext/standard/tests/file/auto_detect_line_endings_2.phpt b/ext/standard/tests/file/auto_detect_line_endings_2.phpt index f33a055e08..3994f1ee3b 100644 --- a/ext/standard/tests/file/auto_detect_line_endings_2.phpt +++ b/ext/standard/tests/file/auto_detect_line_endings_2.phpt @@ -16,7 +16,7 @@ var_dump(fgets($stdin)); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- string(2) "on" string(8) "fooBar1 " string(8) "fooBar2 " diff --git a/ext/standard/tests/file/basename.phpt b/ext/standard/tests/file/basename.phpt index 8352f4da4b..7a98e833a3 100644 --- a/ext/standard/tests/file/basename.phpt +++ b/ext/standard/tests/file/basename.phpt @@ -138,7 +138,7 @@ check_basename( $file_path_variations ); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing basic operations *** --Iteration 1-- diff --git a/ext/standard/tests/file/fscanf.phpt b/ext/standard/tests/file/fscanf.phpt index 6605b795ff..4acadc6169 100644 --- a/ext/standard/tests/file/fscanf.phpt +++ b/ext/standard/tests/file/fscanf.phpt @@ -75,7 +75,7 @@ echo "Done\n"; $filename = __DIR__."/fscanf.dat"; unlink($filename); ?> ---EXPECTF-- +--EXPECT-- int(0) NULL int(1) diff --git a/ext/standard/tests/file/fscanf_variation10.phpt b/ext/standard/tests/file/fscanf_variation10.phpt index f657c07005..507ed8e22d 100644 --- a/ext/standard/tests/file/fscanf_variation10.phpt +++ b/ext/standard/tests/file/fscanf_variation10.phpt @@ -82,7 +82,7 @@ $file_path = __DIR__; $filename = "$file_path/fscanf_variation10.tmp"; unlink($filename); ?> ---EXPECTF-- +--EXPECT-- *** Test fscanf(): different float format types with resource *** -- iteration 1 -- diff --git a/ext/standard/tests/file/is_dir_variation3.phpt b/ext/standard/tests/file/is_dir_variation3.phpt index e82d9ae034..1cf1f25138 100644 --- a/ext/standard/tests/file/is_dir_variation3.phpt +++ b/ext/standard/tests/file/is_dir_variation3.phpt @@ -30,7 +30,7 @@ foreach($dirnames as $dirname) { var_dump( is_dir($dirname) ); } ?> ---EXPECTF-- +--EXPECT-- *** Testing is_dir() with Invalid arguments: expected bool(false) *** bool(false) bool(false) diff --git a/ext/standard/tests/file/is_executable_error.phpt b/ext/standard/tests/file/is_executable_error.phpt index ad90d64435..e77ca86349 100644 --- a/ext/standard/tests/file/is_executable_error.phpt +++ b/ext/standard/tests/file/is_executable_error.phpt @@ -10,7 +10,7 @@ echo "\n*** Testing is_exceutable() on non-existent directory ***\n"; var_dump( is_executable(__DIR__."/is_executable") ); echo "Done\n"; ---EXPECTF-- +--EXPECT-- *** Testing is_exceutable() on non-existent directory *** bool(false) Done diff --git a/ext/standard/tests/file/is_executable_variation3.phpt b/ext/standard/tests/file/is_executable_variation3.phpt index 92ad3320d3..802dbfdf7e 100644 --- a/ext/standard/tests/file/is_executable_variation3.phpt +++ b/ext/standard/tests/file/is_executable_variation3.phpt @@ -40,7 +40,7 @@ foreach( $invalid_files as $invalid_file ) { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing is_executable(): usage variations *** *** Testing is_executable() on invalid files *** diff --git a/ext/standard/tests/file/is_file_variation3.phpt b/ext/standard/tests/file/is_file_variation3.phpt index d33b01dfb3..5bdb63e37c 100644 --- a/ext/standard/tests/file/is_file_variation3.phpt +++ b/ext/standard/tests/file/is_file_variation3.phpt @@ -39,7 +39,7 @@ foreach([ clearstatcache(); } ?> ---EXPECTF-- +--EXPECT-- float(-2.34555): 0 string(1) " ": 0 string(0) "": 0 diff --git a/ext/standard/tests/file/is_readable_error.phpt b/ext/standard/tests/file/is_readable_error.phpt index 1520eb4d20..c8a6c34fa0 100644 --- a/ext/standard/tests/file/is_readable_error.phpt +++ b/ext/standard/tests/file/is_readable_error.phpt @@ -11,7 +11,7 @@ var_dump( is_readable(__DIR__."/is_readable.tmp") ); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing is_readable() on non-existent file *** bool(false) Done diff --git a/ext/standard/tests/file/is_readable_variation3.phpt b/ext/standard/tests/file/is_readable_variation3.phpt index 97c794d1b7..f7eebdc2b8 100644 --- a/ext/standard/tests/file/is_readable_variation3.phpt +++ b/ext/standard/tests/file/is_readable_variation3.phpt @@ -37,7 +37,7 @@ foreach( $misc_files as $misc_file ) { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing is_readable(): usage variations *** *** Testing is_readable() on miscellaneous filenames *** diff --git a/ext/standard/tests/file/is_uploaded_file_basic.phpt b/ext/standard/tests/file/is_uploaded_file_basic.phpt index d053244a79..3e5bf6320c 100644 --- a/ext/standard/tests/file/is_uploaded_file_basic.phpt +++ b/ext/standard/tests/file/is_uploaded_file_basic.phpt @@ -30,7 +30,7 @@ var_dump(is_uploaded_file('random_filename.txt')); var_dump(is_uploaded_file('__FILE__')); ?> ---EXPECTF-- +--EXPECT-- bool(true) bool(false) bool(false) diff --git a/ext/standard/tests/file/is_writable_error.phpt b/ext/standard/tests/file/is_writable_error.phpt index e2a38412cd..f01e69b13d 100644 --- a/ext/standard/tests/file/is_writable_error.phpt +++ b/ext/standard/tests/file/is_writable_error.phpt @@ -14,7 +14,7 @@ var_dump( is_writeable(__DIR__."/is_writable") ); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing is_writable() on non-existent file *** bool(false) bool(false) diff --git a/ext/standard/tests/file/is_writable_variation3.phpt b/ext/standard/tests/file/is_writable_variation3.phpt index c5843a5abf..167d874ac2 100644 --- a/ext/standard/tests/file/is_writable_variation3.phpt +++ b/ext/standard/tests/file/is_writable_variation3.phpt @@ -37,7 +37,7 @@ foreach( $misc_files as $misc_file ) { clearstatcache(); } ?> ---EXPECTF-- +--EXPECT-- *** Testing is_writable(): usage variations *** *** Testing is_writable() with invalid filenames *** diff --git a/ext/standard/tests/file/move_uploaded_file_basic.phpt b/ext/standard/tests/file/move_uploaded_file_basic.phpt index 7af8748fe2..b80c052691 100644 --- a/ext/standard/tests/file/move_uploaded_file_basic.phpt +++ b/ext/standard/tests/file/move_uploaded_file_basic.phpt @@ -50,7 +50,7 @@ var_dump(move_uploaded_file($_FILES['file2']['tmp_name'], $destination4)); unlink($destination4); ?> ---EXPECTF-- +--EXPECT-- Valid move bool(true) bool(true) diff --git a/ext/standard/tests/general_functions/get_include_path_basic.phpt b/ext/standard/tests/general_functions/get_include_path_basic.phpt index bb7ccf542b..c17d5d3e71 100644 --- a/ext/standard/tests/general_functions/get_include_path_basic.phpt +++ b/ext/standard/tests/general_functions/get_include_path_basic.phpt @@ -20,7 +20,7 @@ if (ini_get("include_path") == get_include_path()) { } ?> ---EXPECTF-- +--EXPECT-- *** Testing get_include_path() string(1) "." PASSED diff --git a/ext/standard/tests/general_functions/include_path.phpt b/ext/standard/tests/general_functions/include_path.phpt index 56327500ea..06e806b3a2 100644 --- a/ext/standard/tests/general_functions/include_path.phpt +++ b/ext/standard/tests/general_functions/include_path.phpt @@ -31,7 +31,7 @@ var_dump(get_include_path()); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- string(1) "." NULL string(1) "." diff --git a/ext/standard/tests/general_functions/is_array.phpt b/ext/standard/tests/general_functions/is_array.phpt index 200ecbd6ac..37de6d5a5b 100644 --- a/ext/standard/tests/general_functions/is_array.phpt +++ b/ext/standard/tests/general_functions/is_array.phpt @@ -103,7 +103,7 @@ echo "Done\n"; fclose($fp); closedir($dfp); ?> ---EXPECTF-- +--EXPECT-- *** Testing is_array() on different type of arrays *** -- Iteration 1 -- bool(true) diff --git a/ext/standard/tests/general_functions/is_bool.phpt b/ext/standard/tests/general_functions/is_bool.phpt index 7c8d693a1b..70aaed9c3f 100644 --- a/ext/standard/tests/general_functions/is_bool.phpt +++ b/ext/standard/tests/general_functions/is_bool.phpt @@ -134,7 +134,7 @@ fclose($fp); closedir($dfp); ?> ---EXPECTF-- +--EXPECT-- *** Testing is_bool() with valid boolean values *** -- Iteration 1 -- bool(true) diff --git a/ext/standard/tests/general_functions/is_float_64bit.phpt b/ext/standard/tests/general_functions/is_float_64bit.phpt index dc6df0f109..1815e53c00 100644 --- a/ext/standard/tests/general_functions/is_float_64bit.phpt +++ b/ext/standard/tests/general_functions/is_float_64bit.phpt @@ -131,7 +131,7 @@ foreach ($not_floats as $value ) { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing is_float(), is_double() and is_real() with float values*** -- Iteration 1 -- bool(false) diff --git a/ext/standard/tests/general_functions/is_int_64bit.phpt b/ext/standard/tests/general_functions/is_int_64bit.phpt index e5c6ce77e0..8e5e9332c0 100644 --- a/ext/standard/tests/general_functions/is_int_64bit.phpt +++ b/ext/standard/tests/general_functions/is_int_64bit.phpt @@ -136,7 +136,7 @@ foreach ($not_int_types as $type ) { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing is_int(), is_integer() & is_long() with valid integer values *** --Iteration 1-- bool(true) diff --git a/ext/standard/tests/general_functions/is_null.phpt b/ext/standard/tests/general_functions/is_null.phpt index 4fc325c744..6560707e57 100644 --- a/ext/standard/tests/general_functions/is_null.phpt +++ b/ext/standard/tests/general_functions/is_null.phpt @@ -134,7 +134,7 @@ fclose($fp); closedir($dfp); ?> ---EXPECTF-- +--EXPECT-- *** Testing is_null() with valid null values *** -- Iteration 1 -- bool(true) diff --git a/ext/standard/tests/general_functions/is_numeric.phpt b/ext/standard/tests/general_functions/is_numeric.phpt index 491aa5d15b..8883c57ac2 100644 --- a/ext/standard/tests/general_functions/is_numeric.phpt +++ b/ext/standard/tests/general_functions/is_numeric.phpt @@ -152,7 +152,7 @@ fclose($fp); closedir($dfp); ?> ---EXPECTF-- +--EXPECT-- *** Testing is_numeric() with valid numeric values *** -- Iteration 1 -- bool(true) diff --git a/ext/standard/tests/general_functions/is_object.phpt b/ext/standard/tests/general_functions/is_object.phpt index dd0e7689fd..8a5ac1bcbe 100644 --- a/ext/standard/tests/general_functions/is_object.phpt +++ b/ext/standard/tests/general_functions/is_object.phpt @@ -145,7 +145,7 @@ fclose($fp); closedir($dfp); ?> ---EXPECTF-- +--EXPECT-- *** Testing is_object() with valid objects *** -- Iteration 1 -- bool(true) diff --git a/ext/standard/tests/general_functions/is_scalar.phpt b/ext/standard/tests/general_functions/is_scalar.phpt index f7ef3f5317..6a89da9f56 100644 --- a/ext/standard/tests/general_functions/is_scalar.phpt +++ b/ext/standard/tests/general_functions/is_scalar.phpt @@ -112,7 +112,7 @@ fclose($fp); closedir($dfp); ?> ---EXPECTF-- +--EXPECT-- *** Testing basic operations *** -- Iteration 1 -- bool(true) diff --git a/ext/standard/tests/general_functions/is_string.phpt b/ext/standard/tests/general_functions/is_string.phpt index 7760f79831..a4ef7a47b1 100644 --- a/ext/standard/tests/general_functions/is_string.phpt +++ b/ext/standard/tests/general_functions/is_string.phpt @@ -147,7 +147,7 @@ fclose($fp); closedir($dfp); ?> ---EXPECTF-- +--EXPECT-- *** Testing is_string() with valid string values *** -- Iteration 1 -- bool(true) diff --git a/ext/standard/tests/general_functions/ob_get_length_basic.phpt b/ext/standard/tests/general_functions/ob_get_length_basic.phpt index 46d5d2d0f6..0eb1adf9ee 100644 --- a/ext/standard/tests/general_functions/ob_get_length_basic.phpt +++ b/ext/standard/tests/general_functions/ob_get_length_basic.phpt @@ -32,7 +32,7 @@ dump_string_length( '' ); dump_string_length( null ); ?> ---EXPECTF-- +--EXPECT-- *** Testing ob_get_length() : basic functionality *** bool(false) int(26) diff --git a/ext/standard/tests/general_functions/php_uname_error.phpt b/ext/standard/tests/general_functions/php_uname_error.phpt index 23859a33ac..c64c15b404 100644 --- a/ext/standard/tests/general_functions/php_uname_error.phpt +++ b/ext/standard/tests/general_functions/php_uname_error.phpt @@ -13,7 +13,7 @@ echo "\n-- Testing php_uname() function with invalid mode --\n"; var_dump( php_uname('z') == php_uname('z') ); ?> ---EXPECTF-- +--EXPECT-- *** Testing php_uname() - error test -- Testing php_uname() function with invalid mode -- diff --git a/ext/standard/tests/general_functions/print_r.phpt b/ext/standard/tests/general_functions/print_r.phpt index 3f24a5bc9d..d2ec63f5b4 100644 --- a/ext/standard/tests/general_functions/print_r.phpt +++ b/ext/standard/tests/general_functions/print_r.phpt @@ -276,7 +276,7 @@ closedir($dir_handle); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing print_r() on integer variables *** -- Iteration 1 -- diff --git a/ext/standard/tests/general_functions/print_r_64bit.phpt b/ext/standard/tests/general_functions/print_r_64bit.phpt index a0e9e148c6..5df1637dbd 100644 --- a/ext/standard/tests/general_functions/print_r_64bit.phpt +++ b/ext/standard/tests/general_functions/print_r_64bit.phpt @@ -280,7 +280,7 @@ closedir($dir_handle); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing print_r() on integer variables *** -- Iteration 1 -- diff --git a/ext/standard/tests/general_functions/var_dump_64bit.phpt b/ext/standard/tests/general_functions/var_dump_64bit.phpt index 0600775f58..7b74761586 100644 --- a/ext/standard/tests/general_functions/var_dump_64bit.phpt +++ b/ext/standard/tests/general_functions/var_dump_64bit.phpt @@ -279,7 +279,7 @@ closedir($dir_handle); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing var_dump() on integer variables *** -- Iteration 1 -- int(0) diff --git a/ext/standard/tests/general_functions/var_export-locale.phpt b/ext/standard/tests/general_functions/var_export-locale.phpt index bdc61d9928..9f9cd0e896 100644 --- a/ext/standard/tests/general_functions/var_export-locale.phpt +++ b/ext/standard/tests/general_functions/var_export-locale.phpt @@ -307,7 +307,7 @@ echo "\nDone"; ?> ---EXPECTF-- +--EXPECT-- *** Testing var_export() with integer values *** *** Output for integer values *** diff --git a/ext/standard/tests/image/image_type_to_extension.phpt b/ext/standard/tests/image/image_type_to_extension.phpt index 249df57943..448aac4e99 100644 --- a/ext/standard/tests/image/image_type_to_extension.phpt +++ b/ext/standard/tests/image/image_type_to_extension.phpt @@ -33,7 +33,7 @@ image_type_to_extension() var_dump(image_type_to_extension(0)); ?> Done ---EXPECTF-- +--EXPECT-- Constant: IMAGETYPE_GIF With dot: .gif Without dot: gif diff --git a/ext/standard/tests/math/lcg_value_basic.phpt b/ext/standard/tests/math/lcg_value_basic.phpt index 95811c6f3c..ca76b5c836 100644 --- a/ext/standard/tests/math/lcg_value_basic.phpt +++ b/ext/standard/tests/math/lcg_value_basic.phpt @@ -24,7 +24,7 @@ if ($i != 100) { echo "MATHS test script completed\n"; ?> ---EXPECTF-- +--EXPECT-- MATHS test script started lcg_value tests... diff --git a/ext/standard/tests/network/inet.phpt b/ext/standard/tests/network/inet.phpt index 29b4aa0e6b..b25265446f 100644 --- a/ext/standard/tests/network/inet.phpt +++ b/ext/standard/tests/network/inet.phpt @@ -35,7 +35,7 @@ foreach ($array as $val) { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- string(9) "127.0.0.1" string(13) "255.255.255.0" bool(false) diff --git a/ext/standard/tests/network/ip_x86_64.phpt b/ext/standard/tests/network/ip_x86_64.phpt index c659eb70fb..dd81bde55c 100644 --- a/ext/standard/tests/network/ip_x86_64.phpt +++ b/ext/standard/tests/network/ip_x86_64.phpt @@ -29,7 +29,7 @@ var_dump(long2ip(-110000)); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- int(2130706433) string(9) "127.0.0.1" int(167772161) diff --git a/ext/standard/tests/random/random_int.phpt b/ext/standard/tests/random/random_int.phpt index 94654a7f72..6fd04420ee 100644 --- a/ext/standard/tests/random/random_int.phpt +++ b/ext/standard/tests/random/random_int.phpt @@ -15,7 +15,7 @@ var_dump(is_int(random_int(PHP_INT_MIN, PHP_INT_MAX))); var_dump(random_int(42,42)); ?> ---EXPECTF-- +--EXPECT-- bool(true) bool(true) bool(true) diff --git a/ext/standard/tests/serialize/bug45706.phpt b/ext/standard/tests/serialize/bug45706.phpt index cc71dec4e6..c29081cab7 100644 --- a/ext/standard/tests/serialize/bug45706.phpt +++ b/ext/standard/tests/serialize/bug45706.phpt @@ -12,7 +12,7 @@ $s = serialize($x); $s = str_replace("Foo", "Bar", $s); $y = unserialize($s); var_dump($y); ---EXPECTF-- +--EXPECT-- array(2) { [0]=> object(__PHP_Incomplete_Class)#3 (5) { diff --git a/ext/standard/tests/streams/bug61115.phpt b/ext/standard/tests/streams/bug61115.phpt index 3caffde232..ce6b57651c 100644 --- a/ext/standard/tests/streams/bug61115.phpt +++ b/ext/standard/tests/streams/bug61115.phpt @@ -13,5 +13,5 @@ try { echo $e->getMessage(), "\n"; } ?> ---EXPECTF-- +--EXPECT-- Object of class Closure could not be converted to string diff --git a/ext/standard/tests/streams/bug78662.phpt b/ext/standard/tests/streams/bug78662.phpt index e874d5aef6..2ea00b67b1 100644 --- a/ext/standard/tests/streams/bug78662.phpt +++ b/ext/standard/tests/streams/bug78662.phpt @@ -26,7 +26,7 @@ var_dump(fwrite($f, "bar")); var_dump(fread($f, 100)); ?> Done ---EXPECTF-- +--EXPECT-- bool(false) bool(false) Done diff --git a/ext/standard/tests/streams/stream_set_timeout_error.phpt b/ext/standard/tests/streams/stream_set_timeout_error.phpt index 7dcc645422..64e9aa5773 100644 --- a/ext/standard/tests/streams/stream_set_timeout_error.phpt +++ b/ext/standard/tests/streams/stream_set_timeout_error.phpt @@ -41,7 +41,7 @@ fclose($server); echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing stream_set_timeout() : error conditions *** -- Testing stream_set_timeout() function with a closed socket -- diff --git a/ext/standard/tests/strings/chr_error.phpt b/ext/standard/tests/strings/chr_error.phpt index 2603b69210..b6bd9973b6 100644 --- a/ext/standard/tests/strings/chr_error.phpt +++ b/ext/standard/tests/strings/chr_error.phpt @@ -26,7 +26,7 @@ try { } ?> ---EXPECTF-- +--EXPECT-- *** Testing chr() : error conditions *** -- Testing chr() function with no arguments -- diff --git a/ext/standard/tests/strings/fprintf_error.phpt b/ext/standard/tests/strings/fprintf_error.phpt index 1ffc188051..bfef30a75b 100644 --- a/ext/standard/tests/strings/fprintf_error.phpt +++ b/ext/standard/tests/strings/fprintf_error.phpt @@ -29,7 +29,7 @@ try { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing Error Conditions *** Wrong parameter count for fprintf() Wrong parameter count for fprintf() diff --git a/ext/standard/tests/strings/htmlentities24.phpt b/ext/standard/tests/strings/htmlentities24.phpt index f2abfd5ba8..2a04bd345e 100644 --- a/ext/standard/tests/strings/htmlentities24.phpt +++ b/ext/standard/tests/strings/htmlentities24.phpt @@ -37,7 +37,7 @@ var_dump( htmlentities($str, ENT_COMPAT) ); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Retrieving htmlentities for 256 characters *** string(12) "636872283029" string(12) "636872283129" diff --git a/ext/standard/tests/strings/htmlspecialchars.phpt b/ext/standard/tests/strings/htmlspecialchars.phpt index 6e5c5fac36..5677da6fe2 100644 --- a/ext/standard/tests/strings/htmlspecialchars.phpt +++ b/ext/standard/tests/strings/htmlspecialchars.phpt @@ -37,7 +37,7 @@ var_dump( htmlspecialchars($str, ENT_COMPAT) ); echo "Done\n" ?> ---EXPECTF-- +--EXPECT-- *** Retrieving htmlspecialchars for 256 characters *** string(12) "636872283029" string(12) "636872283129" diff --git a/ext/standard/tests/strings/ltrim.phpt b/ext/standard/tests/strings/ltrim.phpt index 51287e04d7..8ac57ca92e 100644 --- a/ext/standard/tests/strings/ltrim.phpt +++ b/ext/standard/tests/strings/ltrim.phpt @@ -41,7 +41,7 @@ var_dump( ltrim($str, "\nusi") ); echo "\nDone\n"; ?> ---EXPECTF-- +--EXPECT-- *** Output for Error Conditions *** *** Using heredoc string *** diff --git a/ext/standard/tests/strings/metaphone.phpt b/ext/standard/tests/strings/metaphone.phpt index 2bc16b3248..a6b52e3934 100644 --- a/ext/standard/tests/strings/metaphone.phpt +++ b/ext/standard/tests/strings/metaphone.phpt @@ -24,7 +24,7 @@ foreach($array as $str) { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- string(0) "" string(0) "" bool(false) diff --git a/ext/standard/tests/strings/parse_str_basic1.phpt b/ext/standard/tests/strings/parse_str_basic1.phpt index 60277fa184..38652ba0fa 100644 --- a/ext/standard/tests/strings/parse_str_basic1.phpt +++ b/ext/standard/tests/strings/parse_str_basic1.phpt @@ -27,7 +27,7 @@ var_dump(parse_str($s1, $res3_array)); var_dump($res3_array); ?> ---EXPECTF-- +--EXPECT-- *** Testing parse_str() : basic functionality *** Basic test WITH undefined var for result arg diff --git a/ext/standard/tests/strings/parse_str_basic3.phpt b/ext/standard/tests/strings/parse_str_basic3.phpt index 25b5f8745d..0ea88a365b 100644 --- a/ext/standard/tests/strings/parse_str_basic3.phpt +++ b/ext/standard/tests/strings/parse_str_basic3.phpt @@ -73,7 +73,7 @@ var_dump(parse_str($str, $res)); var_dump($res); ?> ---EXPECTF-- +--EXPECT-- *** Testing parse_str() : basic functionality *** Test string with array values and results array diff --git a/ext/standard/tests/strings/printf_error.phpt b/ext/standard/tests/strings/printf_error.phpt index 62591e9e6f..e9fc0a4383 100644 --- a/ext/standard/tests/strings/printf_error.phpt +++ b/ext/standard/tests/strings/printf_error.phpt @@ -61,7 +61,7 @@ try { } ?> ---EXPECTF-- +--EXPECT-- *** Testing printf() : error conditions *** -- Testing printf() function with Zero arguments -- diff --git a/ext/standard/tests/strings/rtrim.phpt b/ext/standard/tests/strings/rtrim.phpt index 223a839f58..2fc531faad 100644 --- a/ext/standard/tests/strings/rtrim.phpt +++ b/ext/standard/tests/strings/rtrim.phpt @@ -42,7 +42,7 @@ var_dump( rtrim($str, "ing") ); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Output for Normal Behaviour *** string(10) "rtrim test" string(13) "rtrim test " diff --git a/ext/standard/tests/strings/soundex.phpt b/ext/standard/tests/strings/soundex.phpt index ef61ac495e..c4acc2ff68 100644 --- a/ext/standard/tests/strings/soundex.phpt +++ b/ext/standard/tests/strings/soundex.phpt @@ -30,7 +30,7 @@ foreach ($array as $str) { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- bool(false) string(4) "0000" string(4) "F650" diff --git a/ext/standard/tests/strings/sprintf_variation15.phpt b/ext/standard/tests/strings/sprintf_variation15.phpt index 07774a92ec..66d85647ff 100644 --- a/ext/standard/tests/strings/sprintf_variation15.phpt +++ b/ext/standard/tests/strings/sprintf_variation15.phpt @@ -74,7 +74,7 @@ foreach($string_values as $string_value) { echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing sprintf() : string formats with string values *** -- Iteration 1 -- diff --git a/ext/standard/tests/strings/sscanf_error.phpt b/ext/standard/tests/strings/sscanf_error.phpt index ffaefb8418..0af8f9ed14 100644 --- a/ext/standard/tests/strings/sscanf_error.phpt +++ b/ext/standard/tests/strings/sscanf_error.phpt @@ -20,7 +20,7 @@ try { echo $exception->getMessage() . "\n"; } ?> ---EXPECTF-- +--EXPECT-- *** Testing sscanf() : error conditions *** -- Testing sscanf() function with more than expected no. of arguments -- diff --git a/ext/standard/tests/strings/str_ireplace.phpt b/ext/standard/tests/strings/str_ireplace.phpt index a5a35769e4..c360004a14 100644 --- a/ext/standard/tests/strings/str_ireplace.phpt +++ b/ext/standard/tests/strings/str_ireplace.phpt @@ -44,7 +44,7 @@ var_dump($Data = str_ireplace("\n", "
", $Data)); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- string(0) "" string(8) "aaaaaaaT" string(8) "aaaaaaaT" diff --git a/ext/standard/tests/strings/stristr.phpt b/ext/standard/tests/strings/stristr.phpt index 7b1b5312a1..09e6cff53c 100644 --- a/ext/standard/tests/strings/stristr.phpt +++ b/ext/standard/tests/strings/stristr.phpt @@ -14,7 +14,7 @@ stristr() function var_dump(md5(stristr("\\\\a\\", "\\a"))); var_dump(stristr("tEsT sTrInG", " ")); ?> ---EXPECTF-- +--EXPECT-- string(11) "tEsT sTrInG" string(6) "sTrInG" string(6) "sTrInG" diff --git a/ext/standard/tests/strings/strrchr_variation1.phpt b/ext/standard/tests/strings/strrchr_variation1.phpt index a75dd96bbf..f28571ba7f 100644 --- a/ext/standard/tests/strings/strrchr_variation1.phpt +++ b/ext/standard/tests/strings/strrchr_variation1.phpt @@ -81,7 +81,7 @@ for($index=0; $index ---EXPECTF-- +--EXPECT-- *** Testing strrchr() function: with various double quoted strings *** -- Iteration 1 -- string(16) "lo123456he #4 A " diff --git a/ext/standard/tests/strings/strrchr_variation2.phpt b/ext/standard/tests/strings/strrchr_variation2.phpt index 2ff6720fb9..e6e510dd55 100644 --- a/ext/standard/tests/strings/strrchr_variation2.phpt +++ b/ext/standard/tests/strings/strrchr_variation2.phpt @@ -81,7 +81,7 @@ for($index=0; $index ---EXPECTF-- +--EXPECT-- *** Testing strrchr() function: with various single quoted strings *** -- Iteration 1 -- string(22) "lo123456he \x234 \101 " diff --git a/ext/standard/tests/strings/strtolower.phpt b/ext/standard/tests/strings/strtolower.phpt index 7c7e2bb4c7..041b66a00c 100644 --- a/ext/standard/tests/strings/strtolower.phpt +++ b/ext/standard/tests/strings/strtolower.phpt @@ -65,7 +65,7 @@ else echo "*** Done ***"; ?> ---EXPECTF-- +--EXPECT-- *** Testing strtolower() with 128 chars *** 00 => 00 01 => 01 diff --git a/ext/standard/tests/strings/strtoupper1.phpt b/ext/standard/tests/strings/strtoupper1.phpt index c243ff10c7..6c7434ba16 100644 --- a/ext/standard/tests/strings/strtoupper1.phpt +++ b/ext/standard/tests/strings/strtoupper1.phpt @@ -65,7 +65,7 @@ else echo "*** Done ***"; ?> ---EXPECTF-- +--EXPECT-- *** Testing strtoupper() with 128 chars *** 00 => 00 01 => 01 diff --git a/ext/standard/tests/strings/strval_error.phpt b/ext/standard/tests/strings/strval_error.phpt index a363e26f24..88cca824a6 100644 --- a/ext/standard/tests/strings/strval_error.phpt +++ b/ext/standard/tests/strings/strval_error.phpt @@ -25,7 +25,7 @@ try { } ?> ---EXPECTF-- +--EXPECT-- *** Testing strval() : error conditions *** -- Testing strval() function with object which has not toString() method -- diff --git a/ext/standard/tests/strings/substr.phpt b/ext/standard/tests/strings/substr.phpt index fe687ed1ae..6028c17008 100644 --- a/ext/standard/tests/strings/substr.phpt +++ b/ext/standard/tests/strings/substr.phpt @@ -66,7 +66,7 @@ var_dump (substr("abcdef" , 2, NULL) ); echo"\nDone"; ?> ---EXPECTF-- +--EXPECT-- --- Iteration 1 --- -- Variations for two arguments -- diff --git a/ext/standard/tests/strings/trim1.phpt b/ext/standard/tests/strings/trim1.phpt index 1ad504c61d..a31d7213a1 100644 --- a/ext/standard/tests/strings/trim1.phpt +++ b/ext/standard/tests/strings/trim1.phpt @@ -49,7 +49,7 @@ var_dump( trim($str, "us\ning") ); echo "\nDone"; ?> ---EXPECTF-- +--EXPECT-- string(0) "" string(0) "" string(1) "0" diff --git a/ext/standard/tests/strings/vfprintf_error1.phpt b/ext/standard/tests/strings/vfprintf_error1.phpt index f2057ea388..fdaecd6fb3 100644 --- a/ext/standard/tests/strings/vfprintf_error1.phpt +++ b/ext/standard/tests/strings/vfprintf_error1.phpt @@ -42,7 +42,7 @@ $file = 'vfprintf_error1.txt'; unlink( $file ); ?> ---EXPECTF-- +--EXPECT-- -- Testing vfprintf() function with more than expected no. of arguments -- Wrong parameter count for vfprintf() Wrong parameter count for vfprintf() diff --git a/ext/standard/tests/time/strptime_error.phpt b/ext/standard/tests/time/strptime_error.phpt index d7eb11fc55..87965cd1a2 100644 --- a/ext/standard/tests/time/strptime_error.phpt +++ b/ext/standard/tests/time/strptime_error.phpt @@ -24,7 +24,7 @@ $format = '%b %d %Y %H:%M:%S'; var_dump( strptime('foo', $format) ); ?> ---EXPECTF-- +--EXPECT-- *** Testing strptime() : error conditions *** -- Testing strptime() function on failure -- diff --git a/ext/tokenizer/tests/001.phpt b/ext/tokenizer/tests/001.phpt index 8e58c81891..006377d5e9 100644 --- a/ext/tokenizer/tests/001.phpt +++ b/ext/tokenizer/tests/001.phpt @@ -129,7 +129,7 @@ echo token_name(0x8000000F), "\n"; echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- T_INCLUDE T_INCLUDE_ONCE T_EVAL diff --git a/ext/xmlreader/tests/static.phpt b/ext/xmlreader/tests/static.phpt index 1c6cb5b870..a722e31105 100644 --- a/ext/xmlreader/tests/static.phpt +++ b/ext/xmlreader/tests/static.phpt @@ -22,7 +22,7 @@ while ($reader->read()) { echo $reader->name, "\n"; } ?> ---EXPECTF-- +--EXPECT-- books books books diff --git a/ext/xmlwriter/tests/bug41326.phpt b/ext/xmlwriter/tests/bug41326.phpt index 886e149261..c04ffe3167 100644 --- a/ext/xmlwriter/tests/bug41326.phpt +++ b/ext/xmlwriter/tests/bug41326.phpt @@ -35,7 +35,7 @@ $xw->endElement(); $xw->endDocument(); print $xw->flush(true); ?> ---EXPECTF-- +--EXPECT-- diff --git a/tests/output/stream_isatty_err.phpt b/tests/output/stream_isatty_err.phpt index 55a25f1c9f..e7c1038350 100644 --- a/tests/output/stream_isatty_err.phpt +++ b/tests/output/stream_isatty_err.phpt @@ -13,7 +13,7 @@ STDERR require __DIR__.'/stream_isatty.inc'; testToStdErr(); ?> ---EXPECTF-- +--EXPECT-- STDIN (constant): bool(true) STDIN (fopen): bool(true) STDIN (php://fd/0): bool(true) diff --git a/tests/output/stream_isatty_in-err.phpt b/tests/output/stream_isatty_in-err.phpt index 2554eb4689..73514955d4 100644 --- a/tests/output/stream_isatty_in-err.phpt +++ b/tests/output/stream_isatty_in-err.phpt @@ -13,7 +13,7 @@ STDIN STDERR require __DIR__.'/stream_isatty.inc'; testToStdErr(); ?> ---EXPECTF-- +--EXPECT-- STDIN (constant): bool(false) STDIN (fopen): bool(false) STDIN (php://fd/0): bool(false) diff --git a/tests/output/stream_isatty_in-out-err.phpt b/tests/output/stream_isatty_in-out-err.phpt index 496bdd100e..9b65e8861b 100644 --- a/tests/output/stream_isatty_in-out-err.phpt +++ b/tests/output/stream_isatty_in-out-err.phpt @@ -13,7 +13,7 @@ STDIN STDOUT STDERR require __DIR__.'/stream_isatty.inc'; testToStdOut(); ?> ---EXPECTF-- +--EXPECT-- STDIN (constant): bool(false) STDIN (fopen): bool(false) STDIN (php://fd/0): bool(false) diff --git a/tests/output/stream_isatty_in-out.phpt b/tests/output/stream_isatty_in-out.phpt index d58e9aa05c..c2bb346854 100644 --- a/tests/output/stream_isatty_in-out.phpt +++ b/tests/output/stream_isatty_in-out.phpt @@ -13,7 +13,7 @@ STDIN STDOUT require __DIR__.'/stream_isatty.inc'; testToStdOut(); ?> ---EXPECTF-- +--EXPECT-- STDIN (constant): bool(false) STDIN (fopen): bool(false) STDIN (php://fd/0): bool(false) diff --git a/tests/output/stream_isatty_out-err.phpt b/tests/output/stream_isatty_out-err.phpt index e3ec1237bc..dc113a9720 100644 --- a/tests/output/stream_isatty_out-err.phpt +++ b/tests/output/stream_isatty_out-err.phpt @@ -13,7 +13,7 @@ STDOUT STDERR require __DIR__.'/stream_isatty.inc'; testToStdOut(); ?> ---EXPECTF-- +--EXPECT-- STDIN (constant): bool(true) STDIN (fopen): bool(true) STDIN (php://fd/0): bool(true) diff --git a/tests/output/stream_isatty_out.phpt b/tests/output/stream_isatty_out.phpt index 3ea4996ac4..f18c986c5a 100644 --- a/tests/output/stream_isatty_out.phpt +++ b/tests/output/stream_isatty_out.phpt @@ -13,7 +13,7 @@ STDOUT require __DIR__.'/stream_isatty.inc'; testToStdOut(); ?> ---EXPECTF-- +--EXPECT-- STDIN (constant): bool(true) STDIN (fopen): bool(true) STDIN (php://fd/0): bool(true) # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # Date: Mon Apr 27 21:01:47 2020 +0200 # # On branch tests/use-simpler-expect-section # Your branch and 'fork/tests/use-simpler-expect-section' have diverged, # and have 1 and 1 different commits each, respectively. # (use "git pull" to merge the remote branch into yours) # # Changes to be committed: # modified: Zend/tests/005.phpt # modified: Zend/tests/bug27669.phpt # modified: Zend/tests/bug51827.phpt # modified: Zend/tests/bug63206.phpt # modified: Zend/tests/bug63206_1.phpt # modified: Zend/tests/bug63206_2.phpt # modified: Zend/tests/incompat_ctx_user.phpt # modified: Zend/tests/instanceof_001.phpt # modified: Zend/tests/unexpected_ref_bug.phpt # modified: ext/date/tests/012.phpt # modified: ext/date/tests/DatePeriod_wrong_recurrence_on_constructor.phpt # modified: ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt # modified: ext/date/tests/date_parse_001.phpt # modified: ext/date/tests/date_parse_error.phpt # modified: ext/date/tests/gmmktime_basic.phpt # modified: ext/date/tests/mktime_error.phpt # modified: ext/date/tests/timezone_abbreviations_list_basic1.phpt # modified: ext/fileinfo/tests/finfo_set_flags_basic-mb.phpt # modified: ext/fileinfo/tests/finfo_set_flags_basic.phpt # modified: ext/filter/tests/007.phpt # modified: ext/filter/tests/008.phpt # modified: ext/filter/tests/010.phpt # modified: ext/hash/tests/hash_hkdf_edges.phpt # modified: ext/hash/tests/hash_hmac_file_basic.phpt # modified: ext/json/tests/json_last_error_msg_error.phpt # modified: ext/libxml/tests/bug76777.phpt # modified: ext/pcre/tests/preg_replace_error2.phpt # modified: ext/pcre/tests/split2.phpt # modified: ext/phar/tests/phar_isvalidpharfilename.phpt # modified: ext/phar/tests/pharfileinfo_chmod.phpt # modified: ext/phar/tests/pharfileinfo_setmetadata.phpt # modified: ext/phar/tests/stat2_5.3.phpt # modified: ext/posix/tests/posix_getgrgid_error.phpt # modified: ext/posix/tests/posix_getpgid_error.phpt # modified: ext/posix/tests/posix_getpwuid_error.phpt # modified: ext/posix/tests/posix_getsid_error.phpt # modified: ext/posix/tests/posix_initgroups.phpt # modified: ext/posix/tests/posix_kill_error.phpt # modified: ext/posix/tests/posix_strerror_error.phpt # modified: ext/reflection/tests/ReflectionClass_hasProperty_002.phpt # modified: ext/reflection/tests/ReflectionMethod_getClosure_error.phpt # modified: ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt # modified: ext/reflection/tests/ReflectionObject_getName_basic.phpt # modified: ext/reflection/tests/ReflectionProperty_isDefault_basic.phpt # modified: ext/reflection/tests/ReflectionProperty_setValue_error.phpt # modified: ext/session/tests/bug79221.phpt # modified: ext/session/tests/session_cache_limiter_error.phpt # modified: ext/spl/tests/bug61347.phpt # modified: ext/spl/tests/fileobject_005.phpt # modified: ext/spl/tests/iterator_045.phpt # modified: ext/spl/tests/regexIterator_setMode_error.phpt # modified: ext/spl/tests/spl_heap_is_empty_basic.phpt # modified: ext/sqlite3/tests/sqlite3_40_setauthorizer.phpt # modified: ext/sqlite3/tests/sqlite3stmt_getsql_expanded.phpt # modified: ext/standard/tests/array/005.phpt # modified: ext/standard/tests/array/009.phpt # modified: ext/standard/tests/array/array_diff_assoc_error.phpt # modified: ext/standard/tests/array/array_diff_error.phpt # modified: ext/standard/tests/array/array_diff_key_error.phpt # modified: ext/standard/tests/array/array_filter.phpt # modified: ext/standard/tests/array/array_filter_variation10.phpt # modified: ext/standard/tests/array/array_key_exists_variation3.phpt # modified: ext/standard/tests/array/array_map_error.phpt # modified: ext/standard/tests/array/array_merge.phpt # modified: ext/standard/tests/array/array_push.phpt # modified: ext/standard/tests/array/array_slice.phpt # modified: ext/standard/tests/array/array_unshift.phpt # modified: ext/standard/tests/array/array_walk.phpt # modified: ext/standard/tests/array/array_walk_error2.phpt # modified: ext/standard/tests/array/array_walk_recursive1.phpt # modified: ext/standard/tests/array/array_walk_recursive_error2.phpt # modified: ext/standard/tests/array/array_walk_recursive_variation7.phpt # modified: ext/standard/tests/array/array_walk_variation7.phpt # modified: ext/standard/tests/array/uasort_variation8.phpt # modified: ext/standard/tests/array/usort_variation8.phpt # modified: ext/standard/tests/assert/assert_variation.phpt # modified: ext/standard/tests/file/auto_detect_line_endings_1.phpt # modified: ext/standard/tests/file/auto_detect_line_endings_2.phpt # modified: ext/standard/tests/file/basename.phpt # modified: ext/standard/tests/file/fscanf.phpt # modified: ext/standard/tests/file/fscanf_variation10.phpt # modified: ext/standard/tests/file/is_dir_variation3.phpt # modified: ext/standard/tests/file/is_executable_error.phpt # modified: ext/standard/tests/file/is_executable_variation3.phpt # modified: ext/standard/tests/file/is_file_variation3.phpt # modified: ext/standard/tests/file/is_readable_error.phpt # modified: ext/standard/tests/file/is_readable_variation3.phpt # modified: ext/standard/tests/file/is_uploaded_file_basic.phpt # modified: ext/standard/tests/file/is_writable_error.phpt # modified: ext/standard/tests/file/is_writable_variation3.phpt # modified: ext/standard/tests/file/move_uploaded_file_basic.phpt # modified: ext/standard/tests/general_functions/get_include_path_basic.phpt # modified: ext/standard/tests/general_functions/include_path.phpt # modified: ext/standard/tests/general_functions/is_array.phpt # modified: ext/standard/tests/general_functions/is_bool.phpt # modified: ext/standard/tests/general_functions/is_float_64bit.phpt # modified: ext/standard/tests/general_functions/is_int_64bit.phpt # modified: ext/standard/tests/general_functions/is_null.phpt # modified: ext/standard/tests/general_functions/is_numeric.phpt # modified: ext/standard/tests/general_functions/is_object.phpt # modified: ext/standard/tests/general_functions/is_scalar.phpt # modified: ext/standard/tests/general_functions/is_string.phpt # modified: ext/standard/tests/general_functions/ob_get_length_basic.phpt # modified: ext/standard/tests/general_functions/php_uname_error.phpt # modified: ext/standard/tests/general_functions/print_r.phpt # modified: ext/standard/tests/general_functions/print_r_64bit.phpt # modified: ext/standard/tests/general_functions/var_dump_64bit.phpt # modified: ext/standard/tests/general_functions/var_export-locale.phpt # modified: ext/standard/tests/image/image_type_to_extension.phpt # modified: ext/standard/tests/math/lcg_value_basic.phpt # modified: ext/standard/tests/network/inet.phpt # modified: ext/standard/tests/network/ip_x86_64.phpt # modified: ext/standard/tests/random/random_int.phpt # modified: ext/standard/tests/serialize/bug45706.phpt # modified: ext/standard/tests/streams/bug61115.phpt # modified: ext/standard/tests/streams/bug78662.phpt # modified: ext/standard/tests/streams/stream_set_timeout_error.phpt # modified: ext/standard/tests/strings/chr_error.phpt # modified: ext/standard/tests/strings/fprintf_error.phpt # modified: ext/standard/tests/strings/htmlentities24.phpt # modified: ext/standard/tests/strings/htmlspecialchars.phpt # modified: ext/standard/tests/strings/ltrim.phpt # modified: ext/standard/tests/strings/metaphone.phpt # modified: ext/standard/tests/strings/parse_str_basic1.phpt # modified: ext/standard/tests/strings/parse_str_basic3.phpt # modified: ext/standard/tests/strings/printf_error.phpt # modified: ext/standard/tests/strings/rtrim.phpt # modified: ext/standard/tests/strings/soundex.phpt # modified: ext/standard/tests/strings/sprintf_variation15.phpt # modified: ext/standard/tests/strings/sscanf_error.phpt # modified: ext/standard/tests/strings/str_ireplace.phpt # modified: ext/standard/tests/strings/stristr.phpt # modified: ext/standard/tests/strings/strrchr_variation1.phpt # modified: ext/standard/tests/strings/strrchr_variation2.phpt # modified: ext/standard/tests/strings/strtolower.phpt # modified: ext/standard/tests/strings/strtoupper1.phpt # modified: ext/standard/tests/strings/strval_error.phpt # modified: ext/standard/tests/strings/substr.phpt # modified: ext/standard/tests/strings/trim1.phpt # modified: ext/standard/tests/strings/vfprintf_error1.phpt # modified: ext/standard/tests/time/strptime_error.phpt # modified: ext/tokenizer/tests/001.phpt # modified: ext/xmlreader/tests/static.phpt # modified: ext/xmlwriter/tests/bug41326.phpt # modified: tests/output/stream_isatty_err.phpt # modified: tests/output/stream_isatty_in-err.phpt # modified: tests/output/stream_isatty_in-out-err.phpt # modified: tests/output/stream_isatty_in-out.phpt # modified: tests/output/stream_isatty_out-err.phpt # modified: tests/output/stream_isatty_out.phpt # # Changes not staged for commit: # modified: run-tests.php # # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # Date: Mon Apr 27 21:01:47 2020 +0200 # # On branch tests/use-simpler-expect-section # Your branch is up to date with 'fork/tests/use-simpler-expect-section'. # # Changes to be committed: # modified: Zend/tests/005.phpt # modified: Zend/tests/bug27669.phpt # modified: Zend/tests/bug51827.phpt # modified: Zend/tests/bug63206.phpt # modified: Zend/tests/bug63206_1.phpt # modified: Zend/tests/bug63206_2.phpt # modified: Zend/tests/incompat_ctx_user.phpt # modified: Zend/tests/instanceof_001.phpt # modified: Zend/tests/unexpected_ref_bug.phpt # modified: ext/date/tests/012.phpt # modified: ext/date/tests/DatePeriod_wrong_recurrence_on_constructor.phpt # modified: ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt # modified: ext/date/tests/date_parse_001.phpt # modified: ext/date/tests/date_parse_error.phpt # modified: ext/date/tests/gmmktime_basic.phpt # modified: ext/date/tests/mktime_error.phpt # modified: ext/date/tests/timezone_abbreviations_list_basic1.phpt # modified: ext/fileinfo/tests/finfo_set_flags_basic-mb.phpt # modified: ext/fileinfo/tests/finfo_set_flags_basic.phpt # modified: ext/filter/tests/007.phpt # modified: ext/filter/tests/008.phpt # modified: ext/filter/tests/010.phpt # modified: ext/hash/tests/hash_hkdf_edges.phpt # modified: ext/hash/tests/hash_hmac_file_basic.phpt # modified: ext/json/tests/json_last_error_msg_error.phpt # modified: ext/libxml/tests/bug76777.phpt # modified: ext/pcre/tests/preg_replace_error2.phpt # modified: ext/pcre/tests/split2.phpt # modified: ext/phar/tests/phar_isvalidpharfilename.phpt # modified: ext/phar/tests/pharfileinfo_chmod.phpt # modified: ext/phar/tests/pharfileinfo_setmetadata.phpt # modified: ext/phar/tests/stat2_5.3.phpt # modified: ext/posix/tests/posix_getgrgid_error.phpt # modified: ext/posix/tests/posix_getpgid_error.phpt # modified: ext/posix/tests/posix_getpwuid_error.phpt # modified: ext/posix/tests/posix_getsid_error.phpt # modified: ext/posix/tests/posix_initgroups.phpt # modified: ext/posix/tests/posix_kill_error.phpt # modified: ext/posix/tests/posix_strerror_error.phpt # modified: ext/reflection/tests/ReflectionClass_hasProperty_002.phpt # modified: ext/reflection/tests/ReflectionMethod_getClosure_error.phpt # modified: ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt # modified: ext/reflection/tests/ReflectionObject_getName_basic.phpt # modified: ext/reflection/tests/ReflectionProperty_isDefault_basic.phpt # modified: ext/reflection/tests/ReflectionProperty_setValue_error.phpt # modified: ext/session/tests/bug79221.phpt # modified: ext/session/tests/session_cache_limiter_error.phpt # modified: ext/spl/tests/bug61347.phpt # modified: ext/spl/tests/fileobject_005.phpt # modified: ext/spl/tests/iterator_045.phpt # modified: ext/spl/tests/regexIterator_setMode_error.phpt # modified: ext/spl/tests/spl_heap_is_empty_basic.phpt # modified: ext/sqlite3/tests/sqlite3_40_setauthorizer.phpt # modified: ext/sqlite3/tests/sqlite3stmt_getsql_expanded.phpt # modified: ext/standard/tests/array/005.phpt # modified: ext/standard/tests/array/009.phpt # modified: ext/standard/tests/array/array_diff_assoc_error.phpt # modified: ext/standard/tests/array/array_diff_error.phpt # modified: ext/standard/tests/array/array_diff_key_error.phpt # modified: ext/standard/tests/array/array_filter.phpt # modified: ext/standard/tests/array/array_filter_variation10.phpt # modified: ext/standard/tests/array/array_key_exists_variation3.phpt # modified: ext/standard/tests/array/array_map_error.phpt # modified: ext/standard/tests/array/array_merge.phpt # modified: ext/standard/tests/array/array_push.phpt # modified: ext/standard/tests/array/array_slice.phpt # modified: ext/standard/tests/array/array_unshift.phpt # modified: ext/standard/tests/array/array_walk.phpt # modified: ext/standard/tests/array/array_walk_error2.phpt # modified: ext/standard/tests/array/array_walk_recursive1.phpt # modified: ext/standard/tests/array/array_walk_recursive_error2.phpt # modified: ext/standard/tests/array/array_walk_recursive_variation7.phpt # modified: ext/standard/tests/array/array_walk_variation7.phpt # modified: ext/standard/tests/array/uasort_variation8.phpt # modified: ext/standard/tests/array/usort_variation8.phpt # modified: ext/standard/tests/assert/assert_variation.phpt # modified: ext/standard/tests/file/auto_detect_line_endings_1.phpt # modified: ext/standard/tests/file/auto_detect_line_endings_2.phpt # modified: ext/standard/tests/file/basename.phpt # modified: ext/standard/tests/file/fscanf.phpt # modified: ext/standard/tests/file/fscanf_variation10.phpt # modified: ext/standard/tests/file/is_dir_variation3.phpt # modified: ext/standard/tests/file/is_executable_error.phpt # modified: ext/standard/tests/file/is_executable_variation3.phpt # modified: ext/standard/tests/file/is_file_variation3.phpt # modified: ext/standard/tests/file/is_readable_error.phpt # modified: ext/standard/tests/file/is_readable_variation3.phpt # modified: ext/standard/tests/file/is_uploaded_file_basic.phpt # modified: ext/standard/tests/file/is_writable_error.phpt # modified: ext/standard/tests/file/is_writable_variation3.phpt # modified: ext/standard/tests/file/move_uploaded_file_basic.phpt # modified: ext/standard/tests/general_functions/get_include_path_basic.phpt # modified: ext/standard/tests/general_functions/include_path.phpt # modified: ext/standard/tests/general_functions/is_array.phpt # modified: ext/standard/tests/general_functions/is_bool.phpt # modified: ext/standard/tests/general_functions/is_float_64bit.phpt # modified: ext/standard/tests/general_functions/is_int_64bit.phpt # modified: ext/standard/tests/general_functions/is_null.phpt # modified: ext/standard/tests/general_functions/is_numeric.phpt # modified: ext/standard/tests/general_functions/is_object.phpt # modified: ext/standard/tests/general_functions/is_scalar.phpt # modified: ext/standard/tests/general_functions/is_string.phpt # modified: ext/standard/tests/general_functions/ob_get_length_basic.phpt # modified: ext/standard/tests/general_functions/php_uname_error.phpt # modified: ext/standard/tests/general_functions/print_r.phpt # modified: ext/standard/tests/general_functions/print_r_64bit.phpt # modified: ext/standard/tests/general_functions/var_dump_64bit.phpt # modified: ext/standard/tests/general_functions/var_export-locale.phpt # modified: ext/standard/tests/image/image_type_to_extension.phpt # modified: ext/standard/tests/math/lcg_value_basic.phpt # modified: ext/standard/tests/network/inet.phpt # modified: ext/standard/tests/network/ip_x86_64.phpt # modified: ext/standard/tests/random/random_int.phpt # modified: ext/standard/tests/serialize/bug45706.phpt # modified: ext/standard/tests/streams/bug61115.phpt # modified: ext/standard/tests/streams/bug78662.phpt # modified: ext/standard/tests/streams/stream_set_timeout_error.phpt # modified: ext/standard/tests/strings/chr_error.phpt # modified: ext/standard/tests/strings/fprintf_error.phpt # modified: ext/standard/tests/strings/htmlentities24.phpt # modified: ext/standard/tests/strings/htmlspecialchars.phpt # modified: ext/standard/tests/strings/ltrim.phpt # modified: ext/standard/tests/strings/metaphone.phpt # modified: ext/standard/tests/strings/parse_str_basic1.phpt # modified: ext/standard/tests/strings/parse_str_basic3.phpt # modified: ext/standard/tests/strings/printf_error.phpt # modified: ext/standard/tests/strings/rtrim.phpt # modified: ext/standard/tests/strings/soundex.phpt # modified: ext/standard/tests/strings/sprintf_variation15.phpt # modified: ext/standard/tests/strings/sscanf_error.phpt # modified: ext/standard/tests/strings/str_ireplace.phpt # modified: ext/standard/tests/strings/stristr.phpt # modified: ext/standard/tests/strings/strrchr_variation1.phpt # modified: ext/standard/tests/strings/strrchr_variation2.phpt # modified: ext/standard/tests/strings/strtolower.phpt # modified: ext/standard/tests/strings/strtoupper1.phpt # modified: ext/standard/tests/strings/strval_error.phpt # modified: ext/standard/tests/strings/substr.phpt # modified: ext/standard/tests/strings/trim1.phpt # modified: ext/standard/tests/strings/vfprintf_error1.phpt # modified: ext/standard/tests/time/strptime_error.phpt # modified: ext/tokenizer/tests/001.phpt # modified: ext/xmlreader/tests/static.phpt # modified: ext/xmlwriter/tests/bug41326.phpt # modified: tests/output/stream_isatty_err.phpt # modified: tests/output/stream_isatty_in-err.phpt # modified: tests/output/stream_isatty_in-out-err.phpt # modified: tests/output/stream_isatty_in-out.phpt # modified: tests/output/stream_isatty_out-err.phpt # modified: tests/output/stream_isatty_out.phpt # # Changes not staged for commit: # modified: run-tests.php # # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # Date: Mon Apr 27 21:01:47 2020 +0200 # # On branch tests/use-simpler-expect-section # Your branch is up to date with 'fork/tests/use-simpler-expect-section'. # # Changes to be committed: # modified: Zend/tests/005.phpt # modified: Zend/tests/bug27669.phpt # modified: Zend/tests/bug51827.phpt # modified: Zend/tests/bug63206.phpt # modified: Zend/tests/bug63206_1.phpt # modified: Zend/tests/bug63206_2.phpt # modified: Zend/tests/incompat_ctx_user.phpt # modified: Zend/tests/instanceof_001.phpt # modified: Zend/tests/unexpected_ref_bug.phpt # modified: ext/date/tests/012.phpt # modified: ext/date/tests/DatePeriod_wrong_recurrence_on_constructor.phpt # modified: ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt # modified: ext/date/tests/date_parse_001.phpt # modified: ext/date/tests/date_parse_error.phpt # modified: ext/date/tests/gmmktime_basic.phpt # modified: ext/date/tests/mktime_error.phpt # modified: ext/date/tests/timezone_abbreviations_list_basic1.phpt # modified: ext/fileinfo/tests/finfo_set_flags_basic-mb.phpt # modified: ext/fileinfo/tests/finfo_set_flags_basic.phpt # modified: ext/filter/tests/007.phpt # modified: ext/filter/tests/008.phpt # modified: ext/filter/tests/010.phpt # modified: ext/hash/tests/hash_hkdf_edges.phpt # modified: ext/hash/tests/hash_hmac_file_basic.phpt # modified: ext/json/tests/json_last_error_msg_error.phpt # modified: ext/libxml/tests/bug76777.phpt # modified: ext/pcre/tests/preg_replace_error2.phpt # modified: ext/pcre/tests/split2.phpt # modified: ext/phar/tests/phar_isvalidpharfilename.phpt # modified: ext/phar/tests/pharfileinfo_chmod.phpt # modified: ext/phar/tests/pharfileinfo_setmetadata.phpt # modified: ext/phar/tests/stat2_5.3.phpt # modified: ext/posix/tests/posix_getgrgid_error.phpt # modified: ext/posix/tests/posix_getpgid_error.phpt # modified: ext/posix/tests/posix_getpwuid_error.phpt # modified: ext/posix/tests/posix_getsid_error.phpt # modified: ext/posix/tests/posix_initgroups.phpt # modified: ext/posix/tests/posix_kill_error.phpt # modified: ext/posix/tests/posix_strerror_error.phpt # modified: ext/reflection/tests/ReflectionClass_hasProperty_002.phpt # modified: ext/reflection/tests/ReflectionMethod_getClosure_error.phpt # modified: ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt # modified: ext/reflection/tests/ReflectionObject_getName_basic.phpt # modified: ext/reflection/tests/ReflectionProperty_isDefault_basic.phpt # modified: ext/reflection/tests/ReflectionProperty_setValue_error.phpt # modified: ext/session/tests/bug79221.phpt # modified: ext/session/tests/session_cache_limiter_error.phpt # modified: ext/spl/tests/bug61347.phpt # modified: ext/spl/tests/fileobject_005.phpt # modified: ext/spl/tests/iterator_045.phpt # modified: ext/spl/tests/regexIterator_setMode_error.phpt # modified: ext/spl/tests/spl_heap_is_empty_basic.phpt # modified: ext/sqlite3/tests/sqlite3_40_setauthorizer.phpt # modified: ext/sqlite3/tests/sqlite3stmt_getsql_expanded.phpt # modified: ext/standard/tests/array/005.phpt # modified: ext/standard/tests/array/009.phpt # modified: ext/standard/tests/array/array_diff_assoc_error.phpt # modified: ext/standard/tests/array/array_diff_error.phpt # modified: ext/standard/tests/array/array_diff_key_error.phpt # modified: ext/standard/tests/array/array_filter.phpt # modified: ext/standard/tests/array/array_filter_variation10.phpt # modified: ext/standard/tests/array/array_key_exists_variation3.phpt # modified: ext/standard/tests/array/array_map_error.phpt # modified: ext/standard/tests/array/array_merge.phpt # modified: ext/standard/tests/array/array_push.phpt # modified: ext/standard/tests/array/array_slice.phpt # modified: ext/standard/tests/array/array_unshift.phpt # modified: ext/standard/tests/array/array_walk.phpt # modified: ext/standard/tests/array/array_walk_error2.phpt # modified: ext/standard/tests/array/array_walk_recursive1.phpt # modified: ext/standard/tests/array/array_walk_recursive_error2.phpt # modified: ext/standard/tests/array/array_walk_recursive_variation7.phpt # modified: ext/standard/tests/array/array_walk_variation7.phpt # modified: ext/standard/tests/array/uasort_variation8.phpt # modified: ext/standard/tests/array/usort_variation8.phpt # modified: ext/standard/tests/assert/assert_variation.phpt # modified: ext/standard/tests/file/auto_detect_line_endings_1.phpt # modified: ext/standard/tests/file/auto_detect_line_endings_2.phpt # modified: ext/standard/tests/file/basename.phpt # modified: ext/standard/tests/file/fscanf.phpt # modified: ext/standard/tests/file/fscanf_variation10.phpt # modified: ext/standard/tests/file/is_dir_variation3.phpt # modified: ext/standard/tests/file/is_executable_error.phpt # modified: ext/standard/tests/file/is_executable_variation3.phpt # modified: ext/standard/tests/file/is_file_variation3.phpt # modified: ext/standard/tests/file/is_readable_error.phpt # modified: ext/standard/tests/file/is_readable_variation3.phpt # modified: ext/standard/tests/file/is_uploaded_file_basic.phpt # modified: ext/standard/tests/file/is_writable_error.phpt # modified: ext/standard/tests/file/is_writable_variation3.phpt # modified: ext/standard/tests/file/move_uploaded_file_basic.phpt # modified: ext/standard/tests/general_functions/get_include_path_basic.phpt # modified: ext/standard/tests/general_functions/include_path.phpt # modified: ext/standard/tests/general_functions/is_array.phpt # modified: ext/standard/tests/general_functions/is_bool.phpt # modified: ext/standard/tests/general_functions/is_float_64bit.phpt # modified: ext/standard/tests/general_functions/is_int_64bit.phpt # modified: ext/standard/tests/general_functions/is_null.phpt # modified: ext/standard/tests/general_functions/is_numeric.phpt # modified: ext/standard/tests/general_functions/is_object.phpt # modified: ext/standard/tests/general_functions/is_scalar.phpt # modified: ext/standard/tests/general_functions/is_string.phpt # modified: ext/standard/tests/general_functions/ob_get_length_basic.phpt # modified: ext/standard/tests/general_functions/php_uname_error.phpt # modified: ext/standard/tests/general_functions/print_r.phpt # modified: ext/standard/tests/general_functions/print_r_64bit.phpt # modified: ext/standard/tests/general_functions/var_dump_64bit.phpt # modified: ext/standard/tests/general_functions/var_export-locale.phpt # modified: ext/standard/tests/image/image_type_to_extension.phpt # modified: ext/standard/tests/math/lcg_value_basic.phpt # modified: ext/standard/tests/network/inet.phpt # modified: ext/standard/tests/network/ip_x86_64.phpt # modified: ext/standard/tests/random/random_int.phpt # modified: ext/standard/tests/serialize/bug45706.phpt # modified: ext/standard/tests/streams/bug61115.phpt # modified: ext/standard/tests/streams/bug78662.phpt # modified: ext/standard/tests/streams/stream_set_timeout_error.phpt # modified: ext/standard/tests/strings/chr_error.phpt # modified: ext/standard/tests/strings/fprintf_error.phpt # modified: ext/standard/tests/strings/htmlentities24.phpt # modified: ext/standard/tests/strings/htmlspecialchars.phpt # modified: ext/standard/tests/strings/ltrim.phpt # modified: ext/standard/tests/strings/metaphone.phpt # modified: ext/standard/tests/strings/parse_str_basic1.phpt # modified: ext/standard/tests/strings/parse_str_basic3.phpt # modified: ext/standard/tests/strings/printf_error.phpt # modified: ext/standard/tests/strings/rtrim.phpt # modified: ext/standard/tests/strings/soundex.phpt # modified: ext/standard/tests/strings/sprintf_variation15.phpt # modified: ext/standard/tests/strings/sscanf_error.phpt # modified: ext/standard/tests/strings/str_ireplace.phpt # modified: ext/standard/tests/strings/stristr.phpt # modified: ext/standard/tests/strings/strrchr_variation1.phpt # modified: ext/standard/tests/strings/strrchr_variation2.phpt # modified: ext/standard/tests/strings/strtolower.phpt # modified: ext/standard/tests/strings/strtoupper1.phpt # modified: ext/standard/tests/strings/strval_error.phpt # modified: ext/standard/tests/strings/substr.phpt # modified: ext/standard/tests/strings/trim1.phpt # modified: ext/standard/tests/strings/vfprintf_error1.phpt # modified: ext/standard/tests/time/strptime_error.phpt # modified: ext/tokenizer/tests/001.phpt # modified: ext/xmlreader/tests/static.phpt # modified: ext/xmlwriter/tests/bug41326.phpt # modified: tests/output/stream_isatty_err.phpt # modified: tests/output/stream_isatty_in-err.phpt # modified: tests/output/stream_isatty_in-out-err.phpt # modified: tests/output/stream_isatty_in-out.phpt # modified: tests/output/stream_isatty_out-err.phpt # modified: tests/output/stream_isatty_out.phpt # # Changes not staged for commit: # modified: run-tests.php # --- Zend/tests/005.phpt | 2 +- Zend/tests/bug27669.phpt | 2 +- Zend/tests/bug51827.phpt | 2 +- Zend/tests/bug63206.phpt | 2 +- Zend/tests/bug63206_1.phpt | 2 +- Zend/tests/bug63206_2.phpt | 2 +- Zend/tests/incompat_ctx_user.phpt | 2 +- Zend/tests/instanceof_001.phpt | 2 +- Zend/tests/unexpected_ref_bug.phpt | 2 +- ext/date/tests/012.phpt | 2 +- ...eriod_wrong_recurrence_on_constructor.phpt | 2 +- ...DateTimeZone_listAbbreviations_basic1.phpt | 2 +- ext/date/tests/date_parse_001.phpt | 2 +- ext/date/tests/date_parse_error.phpt | 2 +- ext/date/tests/gmmktime_basic.phpt | 2 +- ext/date/tests/mktime_error.phpt | 2 +- .../timezone_abbreviations_list_basic1.phpt | 2 +- .../tests/finfo_set_flags_basic-mb.phpt | 2 +- ext/fileinfo/tests/finfo_set_flags_basic.phpt | 2 +- ext/filter/tests/007.phpt | 2 +- ext/filter/tests/008.phpt | 2 +- ext/filter/tests/010.phpt | 2 +- ext/hash/tests/hash_hkdf_edges.phpt | 2 +- ext/hash/tests/hash_hmac_file_basic.phpt | 2 +- ext/json/tests/json_last_error_msg_error.phpt | 2 +- ext/libxml/tests/bug76777.phpt | 2 +- ext/pcre/tests/preg_replace_error2.phpt | 2 +- ext/pcre/tests/split2.phpt | 2 +- ext/phar/tests/phar_isvalidpharfilename.phpt | 2 +- ext/phar/tests/pharfileinfo_chmod.phpt | 2 +- ext/phar/tests/pharfileinfo_setmetadata.phpt | 2 +- ext/phar/tests/stat2_5.3.phpt | 2 +- ext/posix/tests/posix_getgrgid_error.phpt | 2 +- ext/posix/tests/posix_getpgid_error.phpt | 2 +- ext/posix/tests/posix_getpwuid_error.phpt | 2 +- ext/posix/tests/posix_getsid_error.phpt | 2 +- ext/posix/tests/posix_initgroups.phpt | 2 +- ext/posix/tests/posix_kill_error.phpt | 2 +- ext/posix/tests/posix_strerror_error.phpt | 2 +- .../ReflectionClass_hasProperty_002.phpt | 2 +- .../ReflectionMethod_getClosure_error.phpt | 2 +- .../ReflectionMethod_invokeArgs_error3.phpt | 2 +- .../tests/ReflectionObject_getName_basic.phpt | 2 +- .../ReflectionProperty_isDefault_basic.phpt | 2 +- .../ReflectionProperty_setValue_error.phpt | 2 +- ext/session/tests/bug79221.phpt | 2 +- .../tests/session_cache_limiter_error.phpt | 2 +- ext/spl/tests/bug61347.phpt | 2 +- ext/spl/tests/fileobject_005.phpt | 2 +- ext/spl/tests/iterator_045.phpt | 2 +- .../tests/regexIterator_setMode_error.phpt | 2 +- ext/spl/tests/spl_heap_is_empty_basic.phpt | 2 +- .../tests/sqlite3_40_setauthorizer.phpt | 2 +- .../tests/sqlite3stmt_getsql_expanded.phpt | 2 +- ext/standard/tests/array/005.phpt | 2 +- ext/standard/tests/array/009.phpt | 2 +- .../tests/array/array_diff_assoc_error.phpt | 2 +- .../tests/array/array_diff_error.phpt | 2 +- .../tests/array/array_diff_key_error.phpt | 2 +- ext/standard/tests/array/array_filter.phpt | 2 +- .../tests/array/array_filter_variation10.phpt | 2 +- .../array/array_key_exists_variation3.phpt | 2 +- ext/standard/tests/array/array_map_error.phpt | 2 +- ext/standard/tests/array/array_merge.phpt | 2 +- ext/standard/tests/array/array_push.phpt | 2 +- ext/standard/tests/array/array_slice.phpt | 2 +- ext/standard/tests/array/array_unshift.phpt | 2 +- ext/standard/tests/array/array_walk.phpt | 2 +- .../tests/array/array_walk_error2.phpt | 2 +- .../tests/array/array_walk_recursive1.phpt | 2 +- .../array/array_walk_recursive_error2.phpt | 2 +- .../array_walk_recursive_variation7.phpt | 2 +- .../tests/array/array_walk_variation7.phpt | 2 +- .../tests/array/uasort_variation8.phpt | 2 +- .../tests/array/usort_variation8.phpt | 2 +- .../tests/assert/assert_variation.phpt | 2 +- .../file/auto_detect_line_endings_1.phpt | 2 +- .../file/auto_detect_line_endings_2.phpt | 2 +- ext/standard/tests/file/basename.phpt | Bin 6843 -> 6842 bytes ext/standard/tests/file/fscanf.phpt | 2 +- .../tests/file/fscanf_variation10.phpt | 2 +- .../tests/file/is_dir_variation3.phpt | 2 +- .../tests/file/is_executable_error.phpt | 2 +- .../tests/file/is_executable_variation3.phpt | 2 +- .../tests/file/is_file_variation3.phpt | 2 +- .../tests/file/is_readable_error.phpt | 2 +- .../tests/file/is_readable_variation3.phpt | 2 +- .../tests/file/is_uploaded_file_basic.phpt | 2 +- .../tests/file/is_writable_error.phpt | 2 +- .../tests/file/is_writable_variation3.phpt | 2 +- .../tests/file/move_uploaded_file_basic.phpt | 2 +- .../get_include_path_basic.phpt | 2 +- .../tests/general_functions/include_path.phpt | 2 +- .../tests/general_functions/is_array.phpt | 2 +- .../tests/general_functions/is_bool.phpt | 2 +- .../general_functions/is_float_64bit.phpt | 2 +- .../tests/general_functions/is_int_64bit.phpt | 2 +- .../tests/general_functions/is_null.phpt | 2 +- .../tests/general_functions/is_numeric.phpt | 2 +- .../tests/general_functions/is_object.phpt | 2 +- .../tests/general_functions/is_scalar.phpt | 2 +- .../tests/general_functions/is_string.phpt | 2 +- .../ob_get_length_basic.phpt | 2 +- .../general_functions/php_uname_error.phpt | 2 +- .../tests/general_functions/print_r.phpt | 2 +- .../general_functions/print_r_64bit.phpt | 2 +- .../general_functions/var_dump_64bit.phpt | 2 +- .../general_functions/var_export-locale.phpt | 2 +- .../tests/image/image_type_to_extension.phpt | 2 +- ext/standard/tests/math/lcg_value_basic.phpt | 2 +- ext/standard/tests/network/inet.phpt | 2 +- ext/standard/tests/network/ip_x86_64.phpt | 2 +- ext/standard/tests/random/random_int.phpt | 2 +- ext/standard/tests/serialize/bug45706.phpt | 2 +- ext/standard/tests/streams/bug61115.phpt | 2 +- ext/standard/tests/streams/bug78662.phpt | 2 +- .../streams/stream_set_timeout_error.phpt | 2 +- ext/standard/tests/strings/chr_error.phpt | 2 +- ext/standard/tests/strings/fprintf_error.phpt | 2 +- .../tests/strings/htmlentities24.phpt | 2 +- .../tests/strings/htmlspecialchars.phpt | 2 +- ext/standard/tests/strings/ltrim.phpt | 2 +- ext/standard/tests/strings/metaphone.phpt | 2 +- .../tests/strings/parse_str_basic1.phpt | 2 +- .../tests/strings/parse_str_basic3.phpt | Bin 4325 -> 4324 bytes ext/standard/tests/strings/printf_error.phpt | 2 +- ext/standard/tests/strings/rtrim.phpt | Bin 2107 -> 2106 bytes ext/standard/tests/strings/soundex.phpt | 2 +- .../tests/strings/sprintf_variation15.phpt | Bin 5922 -> 5921 bytes ext/standard/tests/strings/sscanf_error.phpt | 2 +- ext/standard/tests/strings/str_ireplace.phpt | 2 +- ext/standard/tests/strings/stristr.phpt | 2 +- .../tests/strings/strrchr_variation1.phpt | Bin 4371 -> 4370 bytes .../tests/strings/strrchr_variation2.phpt | 2 +- ext/standard/tests/strings/strtolower.phpt | Bin 3417 -> 3416 bytes ext/standard/tests/strings/strtoupper1.phpt | Bin 3426 -> 3425 bytes ext/standard/tests/strings/strval_error.phpt | 2 +- ext/standard/tests/strings/substr.phpt | Bin 4223 -> 4222 bytes ext/standard/tests/strings/trim1.phpt | Bin 1538 -> 1537 bytes .../tests/strings/vfprintf_error1.phpt | 2 +- ext/standard/tests/time/strptime_error.phpt | 2 +- ext/tokenizer/tests/001.phpt | 2 +- ext/xmlreader/tests/static.phpt | 2 +- ext/xmlwriter/tests/bug41326.phpt | 2 +- tests/output/stream_isatty_err.phpt | 2 +- tests/output/stream_isatty_in-err.phpt | 2 +- tests/output/stream_isatty_in-out-err.phpt | 2 +- tests/output/stream_isatty_in-out.phpt | 2 +- tests/output/stream_isatty_out-err.phpt | 2 +- tests/output/stream_isatty_out.phpt | 2 +- 150 files changed, 141 insertions(+), 141 deletions(-) diff --git a/Zend/tests/005.phpt b/Zend/tests/005.phpt index f4abfb6c51ef8..413f3205adf2d 100644 --- a/Zend/tests/005.phpt +++ b/Zend/tests/005.phpt @@ -13,7 +13,7 @@ var_dump(strcasecmp("01", "01")); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- int(0) int(-3) int(-1) diff --git a/Zend/tests/bug27669.phpt b/Zend/tests/bug27669.phpt index 7067c23e0d474..9cd845e337f2e 100644 --- a/Zend/tests/bug27669.phpt +++ b/Zend/tests/bug27669.phpt @@ -10,5 +10,5 @@ Bug #27669 (PHP 5 didn't support all possibilities for calling static methods dy $y[0] = 'hello'; A::{$y[0]}(); ?> ---EXPECTF-- +--EXPECT-- Hello World diff --git a/Zend/tests/bug51827.phpt b/Zend/tests/bug51827.phpt index 6c3d721716943..1a2d9bdf39ca4 100644 --- a/Zend/tests/bug51827.phpt +++ b/Zend/tests/bug51827.phpt @@ -13,7 +13,7 @@ register_shutdown_function('ABC'); register_shutdown_function('exploDe'); ?> ---EXPECTF-- +--EXPECT-- int(1) Fatal error: Uncaught ArgumentCountError: explode() expects at least 2 parameters, 0 given in [no active file]:0 diff --git a/Zend/tests/bug63206.phpt b/Zend/tests/bug63206.phpt index dc7bb1fd1dd8b..6aba55eca1ba6 100644 --- a/Zend/tests/bug63206.phpt +++ b/Zend/tests/bug63206.phpt @@ -22,7 +22,7 @@ set_error_handler(function() { $triggerNotice1++; $triggerNotice2++; ?> ---EXPECTF-- +--EXPECT-- Second handler Internal handler Second handler diff --git a/Zend/tests/bug63206_1.phpt b/Zend/tests/bug63206_1.phpt index f08f913824f6b..d0542116388ba 100644 --- a/Zend/tests/bug63206_1.phpt +++ b/Zend/tests/bug63206_1.phpt @@ -22,5 +22,5 @@ restore_error_handler(); $triggerNotice++; ?> ---EXPECTF-- +--EXPECT-- Second handler diff --git a/Zend/tests/bug63206_2.phpt b/Zend/tests/bug63206_2.phpt index 7a2bf385437ad..a4a67f577e6b4 100644 --- a/Zend/tests/bug63206_2.phpt +++ b/Zend/tests/bug63206_2.phpt @@ -22,5 +22,5 @@ restore_exception_handler(); throw new Exception(); ?> ---EXPECTF-- +--EXPECT-- Second handler diff --git a/Zend/tests/incompat_ctx_user.phpt b/Zend/tests/incompat_ctx_user.phpt index 8c7461e4f79e4..3fe0456175f09 100644 --- a/Zend/tests/incompat_ctx_user.phpt +++ b/Zend/tests/incompat_ctx_user.phpt @@ -16,5 +16,5 @@ try { echo "Exception: " . $e->getMessage() . "\n"; } ?> ---EXPECTF-- +--EXPECT-- Exception: Non-static method A::foo() cannot be called statically diff --git a/Zend/tests/instanceof_001.phpt b/Zend/tests/instanceof_001.phpt index 27170420f09a4..02b7d59baf02a 100644 --- a/Zend/tests/instanceof_001.phpt +++ b/Zend/tests/instanceof_001.phpt @@ -17,7 +17,7 @@ var_dump($c[0] instanceof stdClass); var_dump(@$inexistent instanceof stdClass); ?> ---EXPECTF-- +--EXPECT-- bool(true) bool(true) bool(true) diff --git a/Zend/tests/unexpected_ref_bug.phpt b/Zend/tests/unexpected_ref_bug.phpt index 0d78410d1a91d..172b1e6224ec5 100644 --- a/Zend/tests/unexpected_ref_bug.phpt +++ b/Zend/tests/unexpected_ref_bug.phpt @@ -15,5 +15,5 @@ $my_var = str_repeat("A", 64); $data = call_user_func_array("str_replace", array(&$my_var, new Test(), "foo")); echo "Done.\n"; ?> ---EXPECTF-- +--EXPECT-- Done. diff --git a/ext/date/tests/012.phpt b/ext/date/tests/012.phpt index ee8faf1c002ec..0997ef047cc3e 100644 --- a/ext/date/tests/012.phpt +++ b/ext/date/tests/012.phpt @@ -13,7 +13,7 @@ var_dump(date_isodate_set($dto, 2006, 100, 15)); var_dump($dto->format("Y/m/d H:i:s")); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- object(DateTime)#1 (3) { ["date"]=> string(26) "2006-01-23 00:00:00.000000" diff --git a/ext/date/tests/DatePeriod_wrong_recurrence_on_constructor.phpt b/ext/date/tests/DatePeriod_wrong_recurrence_on_constructor.phpt index 715ea63dc94db..f96753b019aed 100644 --- a/ext/date/tests/DatePeriod_wrong_recurrence_on_constructor.phpt +++ b/ext/date/tests/DatePeriod_wrong_recurrence_on_constructor.phpt @@ -14,6 +14,6 @@ try { echo $exception->getMessage(), "\n"; } ?> ---EXPECTF-- +--EXPECT-- DatePeriod::__construct(): The recurrence count '0' is invalid. Needs to be > 0 DatePeriod::__construct(): The recurrence count '-1' is invalid. Needs to be > 0 diff --git a/ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt b/ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt index cb948e9df5c3a..670dcb2ee3944 100644 --- a/ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt +++ b/ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt @@ -22,7 +22,7 @@ echo "\n-- Format a sample entry --\n"; var_dump( $abbr["acst"] ); ?> ---EXPECTF-- +--EXPECT-- *** Testing DateTimeZone::listAbbreviations() : basic functionality *** string(5) "array" int(144) diff --git a/ext/date/tests/date_parse_001.phpt b/ext/date/tests/date_parse_001.phpt index 0d58c1f8e964b..36f8d9bbdd8ed 100644 --- a/ext/date/tests/date_parse_001.phpt +++ b/ext/date/tests/date_parse_001.phpt @@ -14,7 +14,7 @@ Test basic date_parse() var_dump(date_parse("")); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- array(12) { ["year"]=> int(2006) diff --git a/ext/date/tests/date_parse_error.phpt b/ext/date/tests/date_parse_error.phpt index 24b0094c9e210..6a5180fdfb45f 100644 --- a/ext/date/tests/date_parse_error.phpt +++ b/ext/date/tests/date_parse_error.phpt @@ -17,7 +17,7 @@ $invalid_date = "2OO9-02--27 10:00?00.5"; var_dump( date_parse($invalid_date) ); ?> ---EXPECTF-- +--EXPECT-- *** Testing date_parse() : error conditions *** -- Testing date_parse() function with unexpected characters in $date argument -- diff --git a/ext/date/tests/gmmktime_basic.phpt b/ext/date/tests/gmmktime_basic.phpt index 303bd9b010e3c..f96b635c08962 100644 --- a/ext/date/tests/gmmktime_basic.phpt +++ b/ext/date/tests/gmmktime_basic.phpt @@ -22,6 +22,6 @@ $year = 2008; var_dump( gmmktime($hour, $min, $sec, $mon, $day, $year) ); ?> ---EXPECTF-- +--EXPECT-- *** Testing gmmktime() : basic functionality *** int(1218182888) diff --git a/ext/date/tests/mktime_error.phpt b/ext/date/tests/mktime_error.phpt index e40e40f38ddd9..8bdb61df7b238 100644 --- a/ext/date/tests/mktime_error.phpt +++ b/ext/date/tests/mktime_error.phpt @@ -35,7 +35,7 @@ try { } ?> ---EXPECTF-- +--EXPECT-- *** Testing mktime() : error conditions *** -- Testing mktime() function with Zero arguments -- diff --git a/ext/date/tests/timezone_abbreviations_list_basic1.phpt b/ext/date/tests/timezone_abbreviations_list_basic1.phpt index b3bf7c84a1850..0640b8a83dcb1 100644 --- a/ext/date/tests/timezone_abbreviations_list_basic1.phpt +++ b/ext/date/tests/timezone_abbreviations_list_basic1.phpt @@ -22,7 +22,7 @@ echo "\n-- Format a sample entry --\n"; var_dump( $abbr["acst"] ); ?> ---EXPECTF-- +--EXPECT-- *** Testing timezone_abbreviations_list() : basic functionality *** string(5) "array" int(144) diff --git a/ext/fileinfo/tests/finfo_set_flags_basic-mb.phpt b/ext/fileinfo/tests/finfo_set_flags_basic-mb.phpt index 50a1559f581ee..855acaaed83b4 100644 --- a/ext/fileinfo/tests/finfo_set_flags_basic-mb.phpt +++ b/ext/fileinfo/tests/finfo_set_flags_basic-mb.phpt @@ -25,7 +25,7 @@ $finfo = new finfo( FILEINFO_NONE, $magicFile ); var_dump( $finfo->set_flags( FILEINFO_MIME ) ); ?> ---EXPECTF-- +--EXPECT-- *** Testing finfo_set_flags() : basic functionality *** bool(true) bool(true) diff --git a/ext/fileinfo/tests/finfo_set_flags_basic.phpt b/ext/fileinfo/tests/finfo_set_flags_basic.phpt index 95f2648f51888..fe2921b560534 100644 --- a/ext/fileinfo/tests/finfo_set_flags_basic.phpt +++ b/ext/fileinfo/tests/finfo_set_flags_basic.phpt @@ -25,7 +25,7 @@ $finfo = new finfo( FILEINFO_NONE, $magicFile ); var_dump( $finfo->set_flags( FILEINFO_MIME ) ); ?> ---EXPECTF-- +--EXPECT-- *** Testing finfo_set_flags() : basic functionality *** bool(true) bool(true) diff --git a/ext/filter/tests/007.phpt b/ext/filter/tests/007.phpt index dc966b8cc9a21..b5f285342bf96 100644 --- a/ext/filter/tests/007.phpt +++ b/ext/filter/tests/007.phpt @@ -23,7 +23,7 @@ var_dump(filter_has_var(INPUT_POST, "")); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- bool(true) bool(true) bool(false) diff --git a/ext/filter/tests/008.phpt b/ext/filter/tests/008.phpt index 75e0968c620a1..1d4d64529dc9a 100644 --- a/ext/filter/tests/008.phpt +++ b/ext/filter/tests/008.phpt @@ -9,7 +9,7 @@ var_dump(filter_list()); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- array(21) { [0]=> string(3) "int" diff --git a/ext/filter/tests/010.phpt b/ext/filter/tests/010.phpt index 14f8db01af8a5..46b6044668897 100644 --- a/ext/filter/tests/010.phpt +++ b/ext/filter/tests/010.phpt @@ -17,7 +17,7 @@ var_dump(filter_var(1, 0, array())); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- array(7) { [0]=> int(1) diff --git a/ext/hash/tests/hash_hkdf_edges.phpt b/ext/hash/tests/hash_hkdf_edges.phpt index cee86ae82ead4..ceb21631d1848 100644 --- a/ext/hash/tests/hash_hkdf_edges.phpt +++ b/ext/hash/tests/hash_hkdf_edges.phpt @@ -25,7 +25,7 @@ catch (\Error $e) { } ?> ---EXPECTF-- +--EXPECT-- *** Testing hash_hkdf(): edge cases *** Length < digestSize: 98b16391063ece Length % digestSize != 0: 98b16391063ecee006a3ca8ee5776b1e5f diff --git a/ext/hash/tests/hash_hmac_file_basic.phpt b/ext/hash/tests/hash_hmac_file_basic.phpt index 4569c46c3511d..11b9d05738849 100644 --- a/ext/hash/tests/hash_hmac_file_basic.phpt +++ b/ext/hash/tests/hash_hmac_file_basic.phpt @@ -57,7 +57,7 @@ echo "sha256(raw): " . bin2hex(hash_hmac_file('sha256', $file, $key, TRUE)). "\n unlink($file); ?> ---EXPECTF-- +--EXPECT-- *** Testing hash_hmac_file() : basic functionality *** gost: 94c39a40d5db852a8dc3d24e37eebf2d53e3d711457c59cd02b614f792a9d918 haval128,3: f1cea637451097d790354a86de3f54a3 diff --git a/ext/json/tests/json_last_error_msg_error.phpt b/ext/json/tests/json_last_error_msg_error.phpt index 75b06f72a2db0..0eb55c4c660f1 100644 --- a/ext/json/tests/json_last_error_msg_error.phpt +++ b/ext/json/tests/json_last_error_msg_error.phpt @@ -14,6 +14,6 @@ try { } ?> ---EXPECTF-- +--EXPECT-- string(8) "No error" json_last_error_msg() expects exactly 0 parameters, 1 given diff --git a/ext/libxml/tests/bug76777.phpt b/ext/libxml/tests/bug76777.phpt index 5e15024b8101e..c50e52203fe50 100644 --- a/ext/libxml/tests/bug76777.phpt +++ b/ext/libxml/tests/bug76777.phpt @@ -29,7 +29,7 @@ libxml_set_external_entity_loader(function($p,$s,$c) { $dom=new DOMDocument($xml); $dom->schemaValidateSource($xsd); ?> ---EXPECTF-- +--EXPECT-- NULL string(15) "nonexistent.xsd" array(4) { diff --git a/ext/pcre/tests/preg_replace_error2.phpt b/ext/pcre/tests/preg_replace_error2.phpt index 2401e0bb4987e..d7748bf954f46 100644 --- a/ext/pcre/tests/preg_replace_error2.phpt +++ b/ext/pcre/tests/preg_replace_error2.phpt @@ -29,7 +29,7 @@ try { } echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing preg_replace() : error conditions *** Arg value is: this is a string diff --git a/ext/pcre/tests/split2.phpt b/ext/pcre/tests/split2.phpt index 5fafee3b8751a..3d9714a4204ce 100644 --- a/ext/pcre/tests/split2.phpt +++ b/ext/pcre/tests/split2.phpt @@ -19,7 +19,7 @@ var_dump(preg_split('/(\d*)/', 'ab2c3u')); var_dump(preg_last_error() == PREG_RECURSION_LIMIT_ERROR); ?> ---EXPECTF-- +--EXPECT-- array(15) { [0]=> string(0) "" diff --git a/ext/phar/tests/phar_isvalidpharfilename.phpt b/ext/phar/tests/phar_isvalidpharfilename.phpt index 8b9088b9b3cc6..d44c0603e93d2 100644 --- a/ext/phar/tests/phar_isvalidpharfilename.phpt +++ b/ext/phar/tests/phar_isvalidpharfilename.phpt @@ -72,7 +72,7 @@ var_dump(Phar::isValidPharFilename('dir.phar.php', false)); --CLEAN-- chmod(0666); ?> --CLEAN-- ---EXPECTF-- +--EXPECT-- Phar entry "a" is a temporary directory (not an actual entry in the archive), cannot chmod diff --git a/ext/phar/tests/pharfileinfo_setmetadata.phpt b/ext/phar/tests/pharfileinfo_setmetadata.phpt index 38e23f706dba5..8b4385ad5fe42 100644 --- a/ext/phar/tests/pharfileinfo_setmetadata.phpt +++ b/ext/phar/tests/pharfileinfo_setmetadata.phpt @@ -40,7 +40,7 @@ echo $e->getMessage(), "\n"; --CLEAN-- ---EXPECTF-- +--EXPECT-- Phar entry is a temporary directory (not an actual entry in the archive), cannot set metadata Phar entry is a temporary directory (not an actual entry in the archive), cannot delete metadata Write operations disabled by the php.ini setting phar.readonly diff --git a/ext/phar/tests/stat2_5.3.phpt b/ext/phar/tests/stat2_5.3.phpt index 19acc3ba99054..9e9e158602146 100644 --- a/ext/phar/tests/stat2_5.3.phpt +++ b/ext/phar/tests/stat2_5.3.phpt @@ -35,7 +35,7 @@ include $fname3; --CLEAN-- ---EXPECTF-- +--EXPECT-- bool(true) is_link bool(false) diff --git a/ext/posix/tests/posix_getgrgid_error.phpt b/ext/posix/tests/posix_getgrgid_error.phpt index e9dbe2a6ce6f3..36ffcf49521c2 100644 --- a/ext/posix/tests/posix_getgrgid_error.phpt +++ b/ext/posix/tests/posix_getgrgid_error.phpt @@ -20,7 +20,7 @@ var_dump( posix_getgrgid($gid)); echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing posix_getgrgid() : error conditions *** -- Testing posix_getgrgid() function with a negative group id -- diff --git a/ext/posix/tests/posix_getpgid_error.phpt b/ext/posix/tests/posix_getpgid_error.phpt index 19e306b2eeb15..85f12d4917a2c 100644 --- a/ext/posix/tests/posix_getpgid_error.phpt +++ b/ext/posix/tests/posix_getpgid_error.phpt @@ -22,7 +22,7 @@ var_dump( posix_getpgid($pid) ); echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing posix_getpgid() : error conditions *** -- Testing posix_getpgid() with negative pid -- diff --git a/ext/posix/tests/posix_getpwuid_error.phpt b/ext/posix/tests/posix_getpwuid_error.phpt index 365033b6897f4..b4ec515e746ac 100644 --- a/ext/posix/tests/posix_getpwuid_error.phpt +++ b/ext/posix/tests/posix_getpwuid_error.phpt @@ -20,7 +20,7 @@ var_dump( posix_getpwuid($uid) ); echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing posix_getpwuid() : error conditions *** -- Testing posix_getpwuid() function negative uid -- diff --git a/ext/posix/tests/posix_getsid_error.phpt b/ext/posix/tests/posix_getsid_error.phpt index 8e05a2349675c..08080230aa549 100644 --- a/ext/posix/tests/posix_getsid_error.phpt +++ b/ext/posix/tests/posix_getsid_error.phpt @@ -15,5 +15,5 @@ PHP Testfest Berlin 2009-05-10 ---EXPECTF-- +--EXPECT-- bool(false) diff --git a/ext/posix/tests/posix_initgroups.phpt b/ext/posix/tests/posix_initgroups.phpt index 20cf8cef8b336..c77acfe3a488f 100644 --- a/ext/posix/tests/posix_initgroups.phpt +++ b/ext/posix/tests/posix_initgroups.phpt @@ -11,5 +11,5 @@ if (!function_exists('posix_initgroups')) die('skip posix_initgroups() not found var_dump(posix_initgroups(NULL, NULL)); ?> ---EXPECTF-- +--EXPECT-- bool(false) diff --git a/ext/posix/tests/posix_kill_error.phpt b/ext/posix/tests/posix_kill_error.phpt index 89474c4994266..ea9b4f45dc07e 100644 --- a/ext/posix/tests/posix_kill_error.phpt +++ b/ext/posix/tests/posix_kill_error.phpt @@ -28,7 +28,7 @@ var_dump( posix_kill($pid, 999) ); echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing posix_kill() : error conditions *** -- Testing posix_kill() function with invalid signal -- diff --git a/ext/posix/tests/posix_strerror_error.phpt b/ext/posix/tests/posix_strerror_error.phpt index 60b096656a2c4..2792ff5b3bc40 100644 --- a/ext/posix/tests/posix_strerror_error.phpt +++ b/ext/posix/tests/posix_strerror_error.phpt @@ -20,7 +20,7 @@ echo gettype( posix_strerror($errno) )."\n"; echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing posix_strerror() : error conditions *** -- Testing posix_strerror() function with invalid error number -- diff --git a/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt b/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt index a1359390524a2..607fead65ca71 100644 --- a/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt +++ b/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt @@ -16,7 +16,7 @@ var_dump($rc->hasProperty(1)); var_dump($rc->hasProperty(1.5)); var_dump($rc->hasProperty(true)); ?> ---EXPECTF-- +--EXPECT-- Check invalid params: bool(false) bool(false) diff --git a/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt b/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt index 728ddf9265b30..7e45eec411149 100644 --- a/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt +++ b/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt @@ -43,7 +43,7 @@ try { } ?> ---EXPECTF-- +--EXPECT-- *** Testing ReflectionMethod::getClosure() : error conditions *** -- Testing ReflectionMethod::getClosure() function with invalid object -- diff --git a/ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt b/ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt index 113cabbbeb8ee..c3bab48d6f6ad 100644 --- a/ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt +++ b/ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt @@ -69,7 +69,7 @@ try { } ?> ---EXPECTF-- +--EXPECT-- Non-instance: string(72) "Given object is not an instance of the class this method was declared in" diff --git a/ext/reflection/tests/ReflectionObject_getName_basic.phpt b/ext/reflection/tests/ReflectionObject_getName_basic.phpt index 1885695cb1911..94ad1e2c7b367 100644 --- a/ext/reflection/tests/ReflectionObject_getName_basic.phpt +++ b/ext/reflection/tests/ReflectionObject_getName_basic.phpt @@ -15,7 +15,7 @@ $r3 = new ReflectionObject($r2); var_dump($r3->getName()); ?> ---EXPECTF-- +--EXPECT-- string(8) "stdClass" string(1) "C" string(16) "ReflectionObject" diff --git a/ext/reflection/tests/ReflectionProperty_isDefault_basic.phpt b/ext/reflection/tests/ReflectionProperty_isDefault_basic.phpt index 14726151781aa..7defcb76e0f70 100644 --- a/ext/reflection/tests/ReflectionProperty_isDefault_basic.phpt +++ b/ext/reflection/tests/ReflectionProperty_isDefault_basic.phpt @@ -25,7 +25,7 @@ reflectProperty("TestClass", "prot"); reflectProperty("TestClass", "priv"); ?> ---EXPECTF-- +--EXPECT-- ********************************** Reflecting on property TestClass::pub diff --git a/ext/reflection/tests/ReflectionProperty_setValue_error.phpt b/ext/reflection/tests/ReflectionProperty_setValue_error.phpt index f58590b3eab44..1f0c2b5f2bf79 100644 --- a/ext/reflection/tests/ReflectionProperty_setValue_error.phpt +++ b/ext/reflection/tests/ReflectionProperty_setValue_error.phpt @@ -32,7 +32,7 @@ $propInfo = new ReflectionProperty('TestClass', 'pub2'); var_dump($propInfo->setValue($instanceWithNoProperties, "NewValue")); var_dump($instanceWithNoProperties->pub2); ?> ---EXPECTF-- +--EXPECT-- Protected property: Cannot access non-public member TestClass::$prot diff --git a/ext/session/tests/bug79221.phpt b/ext/session/tests/bug79221.phpt index b0972c4697054..08134570357a6 100644 --- a/ext/session/tests/bug79221.phpt +++ b/ext/session/tests/bug79221.phpt @@ -40,6 +40,6 @@ session_start(); var_dump($_SESSION); session_destroy(); ---EXPECTF-- +--EXPECT-- array(0) { } diff --git a/ext/session/tests/session_cache_limiter_error.phpt b/ext/session/tests/session_cache_limiter_error.phpt index 284649e277760..d291d531c0416 100644 --- a/ext/session/tests/session_cache_limiter_error.phpt +++ b/ext/session/tests/session_cache_limiter_error.phpt @@ -89,7 +89,7 @@ fclose($fp); echo "Done"; ob_end_flush(); ?> ---EXPECTF-- +--EXPECT-- *** Testing session_cache_limiter() : error functionality *** -- Iteration 1 -- diff --git a/ext/spl/tests/bug61347.phpt b/ext/spl/tests/bug61347.phpt index b83f48f7ff95e..4b4f9eaedfb7a 100644 --- a/ext/spl/tests/bug61347.phpt +++ b/ext/spl/tests/bug61347.phpt @@ -21,7 +21,7 @@ var_dump(isset($b[37])); //true var_dump(isset($b['no_exists'])); //false var_dump(empty($b['b'])); //true var_dump(empty($b[37])); //true ---EXPECTF-- +--EXPECT-- bool(false) bool(false) bool(false) diff --git a/ext/spl/tests/fileobject_005.phpt b/ext/spl/tests/fileobject_005.phpt index e26a8d7aea028..cce4a7d6a6761 100644 --- a/ext/spl/tests/fileobject_005.phpt +++ b/ext/spl/tests/fileobject_005.phpt @@ -27,6 +27,6 @@ $fo->fwrite("blahlubba"); $path = __DIR__.DIRECTORY_SEPARATOR.'fileobject_005.txt'; unlink($path); ?> ---EXPECTF-- +--EXPECT-- bool(true) string(4) "blah" diff --git a/ext/spl/tests/iterator_045.phpt b/ext/spl/tests/iterator_045.phpt index 63d78cc78e40c..e245b9568886d 100644 --- a/ext/spl/tests/iterator_045.phpt +++ b/ext/spl/tests/iterator_045.phpt @@ -88,7 +88,7 @@ $it->testUnset($unsets); $it->show(); ?> ---EXPECTF-- +--EXPECT-- Exception: MyCachingIterator does not use a full cache (see CachingIterator::__construct) Exception: MyCachingIterator does not use a full cache (see CachingIterator::__construct) MyCachingIterator::testSet() diff --git a/ext/spl/tests/regexIterator_setMode_error.phpt b/ext/spl/tests/regexIterator_setMode_error.phpt index 4816896d8a464..3b0eaf1d66c1e 100644 --- a/ext/spl/tests/regexIterator_setMode_error.phpt +++ b/ext/spl/tests/regexIterator_setMode_error.phpt @@ -18,7 +18,7 @@ try { } ?> ---EXPECTF-- +--EXPECT-- int(0) string(14) "Illegal mode 7" int(0) diff --git a/ext/spl/tests/spl_heap_is_empty_basic.phpt b/ext/spl/tests/spl_heap_is_empty_basic.phpt index 4a90734ad4415..abf64f8d9d601 100644 --- a/ext/spl/tests/spl_heap_is_empty_basic.phpt +++ b/ext/spl/tests/spl_heap_is_empty_basic.phpt @@ -22,7 +22,7 @@ var_dump($heap->isEmpty()); $heap->extract(); var_dump($heap->isEmpty()); ?> ---EXPECTF-- +--EXPECT-- bool(true) bool(false) bool(true) diff --git a/ext/sqlite3/tests/sqlite3_40_setauthorizer.phpt b/ext/sqlite3/tests/sqlite3_40_setauthorizer.phpt index 994c67e0c3502..459beeca531d4 100644 --- a/ext/sqlite3/tests/sqlite3_40_setauthorizer.phpt +++ b/ext/sqlite3/tests/sqlite3_40_setauthorizer.phpt @@ -69,7 +69,7 @@ try { } ?> ---EXPECTF-- +--EXPECT-- int(1) Unable to prepare statement: 23, not authorized bool(true) diff --git a/ext/sqlite3/tests/sqlite3stmt_getsql_expanded.phpt b/ext/sqlite3/tests/sqlite3stmt_getsql_expanded.phpt index 3f9fe841302d2..9a893c590d3a9 100644 --- a/ext/sqlite3/tests/sqlite3stmt_getsql_expanded.phpt +++ b/ext/sqlite3/tests/sqlite3stmt_getsql_expanded.phpt @@ -44,7 +44,7 @@ var_dump($db->close()); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- Getting expanded SQL statement string(21) "SELECT 42, 'php', 43;" Execute statement diff --git a/ext/standard/tests/array/005.phpt b/ext/standard/tests/array/005.phpt index c51e98a67b28e..ed9f0458c4834 100644 --- a/ext/standard/tests/array/005.phpt +++ b/ext/standard/tests/array/005.phpt @@ -69,7 +69,7 @@ var_dump( current($mixed_array[1]) ); echo"Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing Error Conditions *** NULL diff --git a/ext/standard/tests/array/009.phpt b/ext/standard/tests/array/009.phpt index c62be0d27c2c2..fc10d293ff539 100644 --- a/ext/standard/tests/array/009.phpt +++ b/ext/standard/tests/array/009.phpt @@ -71,7 +71,7 @@ foreach ($varient_arrays as $sub_array ) { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing basic operations *** -- Iteration 1 -- int(0) diff --git a/ext/standard/tests/array/array_diff_assoc_error.phpt b/ext/standard/tests/array/array_diff_assoc_error.phpt index 6aa7864ee91fd..69015289e2365 100644 --- a/ext/standard/tests/array/array_diff_assoc_error.phpt +++ b/ext/standard/tests/array/array_diff_assoc_error.phpt @@ -33,7 +33,7 @@ try { echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing array_diff_assoc() : error conditions *** -- Testing array_diff_assoc() function with zero arguments -- diff --git a/ext/standard/tests/array/array_diff_error.phpt b/ext/standard/tests/array/array_diff_error.phpt index d269f010b80fd..889c5ce1b25b4 100644 --- a/ext/standard/tests/array/array_diff_error.phpt +++ b/ext/standard/tests/array/array_diff_error.phpt @@ -33,7 +33,7 @@ try { echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing array_diff() : error conditions *** -- Testing array_diff() function with zero arguments -- diff --git a/ext/standard/tests/array/array_diff_key_error.phpt b/ext/standard/tests/array/array_diff_key_error.phpt index e957abce1c2e6..80ff5728fe47a 100644 --- a/ext/standard/tests/array/array_diff_key_error.phpt +++ b/ext/standard/tests/array/array_diff_key_error.phpt @@ -28,7 +28,7 @@ try { echo $e->getMessage(), "\n"; } ?> ---EXPECTF-- +--EXPECT-- *** Testing array_diff_key() : error conditions *** -- Testing array_diff_key() function with less than expected no. of arguments -- diff --git a/ext/standard/tests/array/array_filter.phpt b/ext/standard/tests/array/array_filter.phpt index a1b18bd234cc2..2cb21ca609fdd 100644 --- a/ext/standard/tests/array/array_filter.phpt +++ b/ext/standard/tests/array/array_filter.phpt @@ -28,7 +28,7 @@ var_dump(array_filter($array3, "even")); var_dump(array_filter(array())); ?> ---EXPECTF-- +--EXPECT-- Odd : array(3) { ["a"]=> diff --git a/ext/standard/tests/array/array_filter_variation10.phpt b/ext/standard/tests/array/array_filter_variation10.phpt index 265daf1fb4bc8..ff88d7a7f87f6 100644 --- a/ext/standard/tests/array/array_filter_variation10.phpt +++ b/ext/standard/tests/array/array_filter_variation10.phpt @@ -56,7 +56,7 @@ try { echo "Done" ?> ---EXPECTF-- +--EXPECT-- *** Testing array_filter() : usage variations - using array keys in 'callback' *** 0 = 0 1 = 1 diff --git a/ext/standard/tests/array/array_key_exists_variation3.phpt b/ext/standard/tests/array/array_key_exists_variation3.phpt index 4a6409bb1fcc4..ef6cf4513941f 100644 --- a/ext/standard/tests/array/array_key_exists_variation3.phpt +++ b/ext/standard/tests/array/array_key_exists_variation3.phpt @@ -34,7 +34,7 @@ foreach($keys as $key) { echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing array_key_exists() : usage variations *** -- Iteration 1 -- diff --git a/ext/standard/tests/array/array_map_error.phpt b/ext/standard/tests/array/array_map_error.phpt index 4739bbf6630b2..b41871e1c420c 100644 --- a/ext/standard/tests/array/array_map_error.phpt +++ b/ext/standard/tests/array/array_map_error.phpt @@ -38,7 +38,7 @@ var_dump( array_map('callback2', $arr1, $arr2, $arr3) ); echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing array_map() : error conditions *** -- Testing array_map() function with one less than expected no. of arguments -- diff --git a/ext/standard/tests/array/array_merge.phpt b/ext/standard/tests/array/array_merge.phpt index 08ecbf7147d46..75007779faa48 100644 --- a/ext/standard/tests/array/array_merge.phpt +++ b/ext/standard/tests/array/array_merge.phpt @@ -83,7 +83,7 @@ var_dump(array_merge()); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing array_merge() basic functionality *** --- Iteration 0 --- diff --git a/ext/standard/tests/array/array_push.phpt b/ext/standard/tests/array/array_push.phpt index 227a520ac1e54..78076b8fc4fc0 100644 --- a/ext/standard/tests/array/array_push.phpt +++ b/ext/standard/tests/array/array_push.phpt @@ -60,7 +60,7 @@ var_dump( $mixed_array[2] ); echo"\nDone"; ?> ---EXPECTF-- +--EXPECT-- *** Testing Edge Conditions *** int(11) int(1) diff --git a/ext/standard/tests/array/array_slice.phpt b/ext/standard/tests/array/array_slice.phpt index d19f5195d6f12..a76277883a4aa 100644 --- a/ext/standard/tests/array/array_slice.phpt +++ b/ext/standard/tests/array/array_slice.phpt @@ -68,7 +68,7 @@ foreach ($var_array as $sub_array) var_dump (array_slice($var_array[2], -3, -2, false) ); ?> ---EXPECTF-- +--EXPECT-- *** Iteration 1 *** *** Variation with first two Arguments *** diff --git a/ext/standard/tests/array/array_unshift.phpt b/ext/standard/tests/array/array_unshift.phpt index 9ebe83391e142..265de4e84645b 100644 --- a/ext/standard/tests/array/array_unshift.phpt +++ b/ext/standard/tests/array/array_unshift.phpt @@ -12,7 +12,7 @@ var_dump($a); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- int(1) array(1) { [0]=> diff --git a/ext/standard/tests/array/array_walk.phpt b/ext/standard/tests/array/array_walk.phpt index 1f5457c9f74f7..151c9c70d0434 100644 --- a/ext/standard/tests/array/array_walk.phpt +++ b/ext/standard/tests/array/array_walk.phpt @@ -24,7 +24,7 @@ try { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- int(1) int(0) string(4) "data" diff --git a/ext/standard/tests/array/array_walk_error2.phpt b/ext/standard/tests/array/array_walk_error2.phpt index dfc95d3af8b72..e5aeadcdc09c0 100644 --- a/ext/standard/tests/array/array_walk_error2.phpt +++ b/ext/standard/tests/array/array_walk_error2.phpt @@ -54,7 +54,7 @@ try { echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing array_walk() : error conditions - callback parameters *** Exception: Too few arguments to function callback1(), 2 passed and exactly 3 expected Exception: Too few arguments to function callback2(), 3 passed and exactly 4 expected diff --git a/ext/standard/tests/array/array_walk_recursive1.phpt b/ext/standard/tests/array/array_walk_recursive1.phpt index 472cb1032d127..d4d3e7d8eb26e 100644 --- a/ext/standard/tests/array/array_walk_recursive1.phpt +++ b/ext/standard/tests/array/array_walk_recursive1.phpt @@ -24,7 +24,7 @@ try { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- int(1) int(0) string(4) "data" diff --git a/ext/standard/tests/array/array_walk_recursive_error2.phpt b/ext/standard/tests/array/array_walk_recursive_error2.phpt index f1686d7acdc2a..2509c95f60dcd 100644 --- a/ext/standard/tests/array/array_walk_recursive_error2.phpt +++ b/ext/standard/tests/array/array_walk_recursive_error2.phpt @@ -54,7 +54,7 @@ try { echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing array_walk_recursive() : error conditions - callback parameters *** Exception: Too few arguments to function callback1(), 2 passed and exactly 3 expected Exception: Too few arguments to function callback2(), 3 passed and exactly 4 expected diff --git a/ext/standard/tests/array/array_walk_recursive_variation7.phpt b/ext/standard/tests/array/array_walk_recursive_variation7.phpt index a0c159d71d151..a1cbdad2bd6a1 100644 --- a/ext/standard/tests/array/array_walk_recursive_variation7.phpt +++ b/ext/standard/tests/array/array_walk_recursive_variation7.phpt @@ -33,7 +33,7 @@ echo "-- Anonymous function with null argument --\n"; var_dump( array_walk_recursive( $input, function() { echo "1\n"; })); echo "Done" ?> ---EXPECTF-- +--EXPECT-- *** Testing array_walk_recursive() : anonymous function as callback *** -- Anonymous function with one argument -- int(2) diff --git a/ext/standard/tests/array/array_walk_variation7.phpt b/ext/standard/tests/array/array_walk_variation7.phpt index 0354782eda104..3689f8a7981c8 100644 --- a/ext/standard/tests/array/array_walk_variation7.phpt +++ b/ext/standard/tests/array/array_walk_variation7.phpt @@ -33,7 +33,7 @@ echo "-- Anonymous function with null argument --\n"; var_dump( array_walk( $input, function() { echo "1\n"; })); echo "Done" ?> ---EXPECTF-- +--EXPECT-- *** Testing array_walk() : anonymous function as callback *** -- Anonymous function with one argument -- int(2) diff --git a/ext/standard/tests/array/uasort_variation8.phpt b/ext/standard/tests/array/uasort_variation8.phpt index d27cd569c009b..b6abdeaef354f 100644 --- a/ext/standard/tests/array/uasort_variation8.phpt +++ b/ext/standard/tests/array/uasort_variation8.phpt @@ -29,7 +29,7 @@ var_dump($array_arg); echo "Done" ?> ---EXPECTF-- +--EXPECT-- *** Testing uasort() : built in function as 'cmp_function' *** -- Testing uasort() with built-in 'cmp_function': strcasecmp() -- bool(true) diff --git a/ext/standard/tests/array/usort_variation8.phpt b/ext/standard/tests/array/usort_variation8.phpt index 55ff362d41b63..4a750ccefaf6b 100644 --- a/ext/standard/tests/array/usort_variation8.phpt +++ b/ext/standard/tests/array/usort_variation8.phpt @@ -31,7 +31,7 @@ var_dump( usort($temp_array2, 'strcmp') ); var_dump($temp_array2); ?> ---EXPECTF-- +--EXPECT-- *** Testing usort() : usage variation *** -- Testing usort() with built-in 'cmp_function': strcasecmp() -- diff --git a/ext/standard/tests/assert/assert_variation.phpt b/ext/standard/tests/assert/assert_variation.phpt index a28ea58d5a332..7b550b36d1e29 100644 --- a/ext/standard/tests/assert/assert_variation.phpt +++ b/ext/standard/tests/assert/assert_variation.phpt @@ -67,7 +67,7 @@ var_dump($rao=assert_options(ASSERT_CALLBACK)); echo "ini.get(\"assert.callback\") => [".ini_get("assert.callback")."]\n\n"; var_dump($r2=assert(0 != 0)); echo"\n"; ---EXPECTF-- +--EXPECT-- Initial values: assert_options(ASSERT_CALLBACK) => [f1] Initial values: ini.get("assert.callback") => [f1] f1 called diff --git a/ext/standard/tests/file/auto_detect_line_endings_1.phpt b/ext/standard/tests/file/auto_detect_line_endings_1.phpt index c79082ecdb212..5a4ff0a10f8f6 100644 --- a/ext/standard/tests/file/auto_detect_line_endings_1.phpt +++ b/ext/standard/tests/file/auto_detect_line_endings_1.phpt @@ -15,7 +15,7 @@ var_dump(fgets(STDIN)); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- string(1) "1" string(8) "fooBar1 " string(8) "fooBar2 " diff --git a/ext/standard/tests/file/auto_detect_line_endings_2.phpt b/ext/standard/tests/file/auto_detect_line_endings_2.phpt index f33a055e08325..3994f1ee3b806 100644 --- a/ext/standard/tests/file/auto_detect_line_endings_2.phpt +++ b/ext/standard/tests/file/auto_detect_line_endings_2.phpt @@ -16,7 +16,7 @@ var_dump(fgets($stdin)); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- string(2) "on" string(8) "fooBar1 " string(8) "fooBar2 " diff --git a/ext/standard/tests/file/basename.phpt b/ext/standard/tests/file/basename.phpt index 8352f4da4b62d4bd6339a22a85b1905291097901..7a98e833a317e06f23896bf63009a5f0de5bf820 100644 GIT binary patch delta 12 TcmdmOy32G!82{#Q{uFKiB1Z&$ delta 21 ccmdmGy4!R^7(a`ft}fT)E ---EXPECTF-- +--EXPECT-- int(0) NULL int(1) diff --git a/ext/standard/tests/file/fscanf_variation10.phpt b/ext/standard/tests/file/fscanf_variation10.phpt index f657c07005844..507ed8e22df4a 100644 --- a/ext/standard/tests/file/fscanf_variation10.phpt +++ b/ext/standard/tests/file/fscanf_variation10.phpt @@ -82,7 +82,7 @@ $file_path = __DIR__; $filename = "$file_path/fscanf_variation10.tmp"; unlink($filename); ?> ---EXPECTF-- +--EXPECT-- *** Test fscanf(): different float format types with resource *** -- iteration 1 -- diff --git a/ext/standard/tests/file/is_dir_variation3.phpt b/ext/standard/tests/file/is_dir_variation3.phpt index e82d9ae034256..1cf1f251388da 100644 --- a/ext/standard/tests/file/is_dir_variation3.phpt +++ b/ext/standard/tests/file/is_dir_variation3.phpt @@ -30,7 +30,7 @@ foreach($dirnames as $dirname) { var_dump( is_dir($dirname) ); } ?> ---EXPECTF-- +--EXPECT-- *** Testing is_dir() with Invalid arguments: expected bool(false) *** bool(false) bool(false) diff --git a/ext/standard/tests/file/is_executable_error.phpt b/ext/standard/tests/file/is_executable_error.phpt index ad90d64435f7a..e77ca86349fce 100644 --- a/ext/standard/tests/file/is_executable_error.phpt +++ b/ext/standard/tests/file/is_executable_error.phpt @@ -10,7 +10,7 @@ echo "\n*** Testing is_exceutable() on non-existent directory ***\n"; var_dump( is_executable(__DIR__."/is_executable") ); echo "Done\n"; ---EXPECTF-- +--EXPECT-- *** Testing is_exceutable() on non-existent directory *** bool(false) Done diff --git a/ext/standard/tests/file/is_executable_variation3.phpt b/ext/standard/tests/file/is_executable_variation3.phpt index 92ad3320d3555..802dbfdf7ea7c 100644 --- a/ext/standard/tests/file/is_executable_variation3.phpt +++ b/ext/standard/tests/file/is_executable_variation3.phpt @@ -40,7 +40,7 @@ foreach( $invalid_files as $invalid_file ) { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing is_executable(): usage variations *** *** Testing is_executable() on invalid files *** diff --git a/ext/standard/tests/file/is_file_variation3.phpt b/ext/standard/tests/file/is_file_variation3.phpt index d33b01dfb3faa..5bdb63e37cb31 100644 --- a/ext/standard/tests/file/is_file_variation3.phpt +++ b/ext/standard/tests/file/is_file_variation3.phpt @@ -39,7 +39,7 @@ foreach([ clearstatcache(); } ?> ---EXPECTF-- +--EXPECT-- float(-2.34555): 0 string(1) " ": 0 string(0) "": 0 diff --git a/ext/standard/tests/file/is_readable_error.phpt b/ext/standard/tests/file/is_readable_error.phpt index 1520eb4d209c5..c8a6c34fa04e6 100644 --- a/ext/standard/tests/file/is_readable_error.phpt +++ b/ext/standard/tests/file/is_readable_error.phpt @@ -11,7 +11,7 @@ var_dump( is_readable(__DIR__."/is_readable.tmp") ); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing is_readable() on non-existent file *** bool(false) Done diff --git a/ext/standard/tests/file/is_readable_variation3.phpt b/ext/standard/tests/file/is_readable_variation3.phpt index 97c794d1b745c..f7eebdc2b89e7 100644 --- a/ext/standard/tests/file/is_readable_variation3.phpt +++ b/ext/standard/tests/file/is_readable_variation3.phpt @@ -37,7 +37,7 @@ foreach( $misc_files as $misc_file ) { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing is_readable(): usage variations *** *** Testing is_readable() on miscellaneous filenames *** diff --git a/ext/standard/tests/file/is_uploaded_file_basic.phpt b/ext/standard/tests/file/is_uploaded_file_basic.phpt index d053244a798c8..3e5bf6320c383 100644 --- a/ext/standard/tests/file/is_uploaded_file_basic.phpt +++ b/ext/standard/tests/file/is_uploaded_file_basic.phpt @@ -30,7 +30,7 @@ var_dump(is_uploaded_file('random_filename.txt')); var_dump(is_uploaded_file('__FILE__')); ?> ---EXPECTF-- +--EXPECT-- bool(true) bool(false) bool(false) diff --git a/ext/standard/tests/file/is_writable_error.phpt b/ext/standard/tests/file/is_writable_error.phpt index e2a38412cdca5..f01e69b13d6bb 100644 --- a/ext/standard/tests/file/is_writable_error.phpt +++ b/ext/standard/tests/file/is_writable_error.phpt @@ -14,7 +14,7 @@ var_dump( is_writeable(__DIR__."/is_writable") ); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing is_writable() on non-existent file *** bool(false) bool(false) diff --git a/ext/standard/tests/file/is_writable_variation3.phpt b/ext/standard/tests/file/is_writable_variation3.phpt index c5843a5abfb8a..167d874ac267c 100644 --- a/ext/standard/tests/file/is_writable_variation3.phpt +++ b/ext/standard/tests/file/is_writable_variation3.phpt @@ -37,7 +37,7 @@ foreach( $misc_files as $misc_file ) { clearstatcache(); } ?> ---EXPECTF-- +--EXPECT-- *** Testing is_writable(): usage variations *** *** Testing is_writable() with invalid filenames *** diff --git a/ext/standard/tests/file/move_uploaded_file_basic.phpt b/ext/standard/tests/file/move_uploaded_file_basic.phpt index 7af8748fe292e..b80c052691854 100644 --- a/ext/standard/tests/file/move_uploaded_file_basic.phpt +++ b/ext/standard/tests/file/move_uploaded_file_basic.phpt @@ -50,7 +50,7 @@ var_dump(move_uploaded_file($_FILES['file2']['tmp_name'], $destination4)); unlink($destination4); ?> ---EXPECTF-- +--EXPECT-- Valid move bool(true) bool(true) diff --git a/ext/standard/tests/general_functions/get_include_path_basic.phpt b/ext/standard/tests/general_functions/get_include_path_basic.phpt index bb7ccf542bb7a..c17d5d3e71b5b 100644 --- a/ext/standard/tests/general_functions/get_include_path_basic.phpt +++ b/ext/standard/tests/general_functions/get_include_path_basic.phpt @@ -20,7 +20,7 @@ if (ini_get("include_path") == get_include_path()) { } ?> ---EXPECTF-- +--EXPECT-- *** Testing get_include_path() string(1) "." PASSED diff --git a/ext/standard/tests/general_functions/include_path.phpt b/ext/standard/tests/general_functions/include_path.phpt index 56327500eaad7..06e806b3a2398 100644 --- a/ext/standard/tests/general_functions/include_path.phpt +++ b/ext/standard/tests/general_functions/include_path.phpt @@ -31,7 +31,7 @@ var_dump(get_include_path()); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- string(1) "." NULL string(1) "." diff --git a/ext/standard/tests/general_functions/is_array.phpt b/ext/standard/tests/general_functions/is_array.phpt index 200ecbd6acd2c..37de6d5a5bf22 100644 --- a/ext/standard/tests/general_functions/is_array.phpt +++ b/ext/standard/tests/general_functions/is_array.phpt @@ -103,7 +103,7 @@ echo "Done\n"; fclose($fp); closedir($dfp); ?> ---EXPECTF-- +--EXPECT-- *** Testing is_array() on different type of arrays *** -- Iteration 1 -- bool(true) diff --git a/ext/standard/tests/general_functions/is_bool.phpt b/ext/standard/tests/general_functions/is_bool.phpt index 7c8d693a1b853..70aaed9c3f7cb 100644 --- a/ext/standard/tests/general_functions/is_bool.phpt +++ b/ext/standard/tests/general_functions/is_bool.phpt @@ -134,7 +134,7 @@ fclose($fp); closedir($dfp); ?> ---EXPECTF-- +--EXPECT-- *** Testing is_bool() with valid boolean values *** -- Iteration 1 -- bool(true) diff --git a/ext/standard/tests/general_functions/is_float_64bit.phpt b/ext/standard/tests/general_functions/is_float_64bit.phpt index dc6df0f1095f1..1815e53c00e06 100644 --- a/ext/standard/tests/general_functions/is_float_64bit.phpt +++ b/ext/standard/tests/general_functions/is_float_64bit.phpt @@ -131,7 +131,7 @@ foreach ($not_floats as $value ) { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing is_float(), is_double() and is_real() with float values*** -- Iteration 1 -- bool(false) diff --git a/ext/standard/tests/general_functions/is_int_64bit.phpt b/ext/standard/tests/general_functions/is_int_64bit.phpt index e5c6ce77e02e2..8e5e9332c0475 100644 --- a/ext/standard/tests/general_functions/is_int_64bit.phpt +++ b/ext/standard/tests/general_functions/is_int_64bit.phpt @@ -136,7 +136,7 @@ foreach ($not_int_types as $type ) { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing is_int(), is_integer() & is_long() with valid integer values *** --Iteration 1-- bool(true) diff --git a/ext/standard/tests/general_functions/is_null.phpt b/ext/standard/tests/general_functions/is_null.phpt index 4fc325c744100..6560707e57478 100644 --- a/ext/standard/tests/general_functions/is_null.phpt +++ b/ext/standard/tests/general_functions/is_null.phpt @@ -134,7 +134,7 @@ fclose($fp); closedir($dfp); ?> ---EXPECTF-- +--EXPECT-- *** Testing is_null() with valid null values *** -- Iteration 1 -- bool(true) diff --git a/ext/standard/tests/general_functions/is_numeric.phpt b/ext/standard/tests/general_functions/is_numeric.phpt index 491aa5d15b49b..8883c57ac2210 100644 --- a/ext/standard/tests/general_functions/is_numeric.phpt +++ b/ext/standard/tests/general_functions/is_numeric.phpt @@ -152,7 +152,7 @@ fclose($fp); closedir($dfp); ?> ---EXPECTF-- +--EXPECT-- *** Testing is_numeric() with valid numeric values *** -- Iteration 1 -- bool(true) diff --git a/ext/standard/tests/general_functions/is_object.phpt b/ext/standard/tests/general_functions/is_object.phpt index dd0e7689fd4ab..8a5ac1bcbe6b5 100644 --- a/ext/standard/tests/general_functions/is_object.phpt +++ b/ext/standard/tests/general_functions/is_object.phpt @@ -145,7 +145,7 @@ fclose($fp); closedir($dfp); ?> ---EXPECTF-- +--EXPECT-- *** Testing is_object() with valid objects *** -- Iteration 1 -- bool(true) diff --git a/ext/standard/tests/general_functions/is_scalar.phpt b/ext/standard/tests/general_functions/is_scalar.phpt index f7ef3f5317544..6a89da9f56468 100644 --- a/ext/standard/tests/general_functions/is_scalar.phpt +++ b/ext/standard/tests/general_functions/is_scalar.phpt @@ -112,7 +112,7 @@ fclose($fp); closedir($dfp); ?> ---EXPECTF-- +--EXPECT-- *** Testing basic operations *** -- Iteration 1 -- bool(true) diff --git a/ext/standard/tests/general_functions/is_string.phpt b/ext/standard/tests/general_functions/is_string.phpt index 7760f79831866..a4ef7a47b11f4 100644 --- a/ext/standard/tests/general_functions/is_string.phpt +++ b/ext/standard/tests/general_functions/is_string.phpt @@ -147,7 +147,7 @@ fclose($fp); closedir($dfp); ?> ---EXPECTF-- +--EXPECT-- *** Testing is_string() with valid string values *** -- Iteration 1 -- bool(true) diff --git a/ext/standard/tests/general_functions/ob_get_length_basic.phpt b/ext/standard/tests/general_functions/ob_get_length_basic.phpt index 46d5d2d0f6349..0eb1adf9eef92 100644 --- a/ext/standard/tests/general_functions/ob_get_length_basic.phpt +++ b/ext/standard/tests/general_functions/ob_get_length_basic.phpt @@ -32,7 +32,7 @@ dump_string_length( '' ); dump_string_length( null ); ?> ---EXPECTF-- +--EXPECT-- *** Testing ob_get_length() : basic functionality *** bool(false) int(26) diff --git a/ext/standard/tests/general_functions/php_uname_error.phpt b/ext/standard/tests/general_functions/php_uname_error.phpt index 23859a33ac284..c64c15b404679 100644 --- a/ext/standard/tests/general_functions/php_uname_error.phpt +++ b/ext/standard/tests/general_functions/php_uname_error.phpt @@ -13,7 +13,7 @@ echo "\n-- Testing php_uname() function with invalid mode --\n"; var_dump( php_uname('z') == php_uname('z') ); ?> ---EXPECTF-- +--EXPECT-- *** Testing php_uname() - error test -- Testing php_uname() function with invalid mode -- diff --git a/ext/standard/tests/general_functions/print_r.phpt b/ext/standard/tests/general_functions/print_r.phpt index 3f24a5bc9d44d..d2ec63f5b4daf 100644 --- a/ext/standard/tests/general_functions/print_r.phpt +++ b/ext/standard/tests/general_functions/print_r.phpt @@ -276,7 +276,7 @@ closedir($dir_handle); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing print_r() on integer variables *** -- Iteration 1 -- diff --git a/ext/standard/tests/general_functions/print_r_64bit.phpt b/ext/standard/tests/general_functions/print_r_64bit.phpt index a0e9e148c68ea..5df1637dbdfc0 100644 --- a/ext/standard/tests/general_functions/print_r_64bit.phpt +++ b/ext/standard/tests/general_functions/print_r_64bit.phpt @@ -280,7 +280,7 @@ closedir($dir_handle); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing print_r() on integer variables *** -- Iteration 1 -- diff --git a/ext/standard/tests/general_functions/var_dump_64bit.phpt b/ext/standard/tests/general_functions/var_dump_64bit.phpt index 0600775f589c8..7b747615868d8 100644 --- a/ext/standard/tests/general_functions/var_dump_64bit.phpt +++ b/ext/standard/tests/general_functions/var_dump_64bit.phpt @@ -279,7 +279,7 @@ closedir($dir_handle); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing var_dump() on integer variables *** -- Iteration 1 -- int(0) diff --git a/ext/standard/tests/general_functions/var_export-locale.phpt b/ext/standard/tests/general_functions/var_export-locale.phpt index bdc61d9928484..9f9cd0e896fd7 100644 --- a/ext/standard/tests/general_functions/var_export-locale.phpt +++ b/ext/standard/tests/general_functions/var_export-locale.phpt @@ -307,7 +307,7 @@ echo "\nDone"; ?> ---EXPECTF-- +--EXPECT-- *** Testing var_export() with integer values *** *** Output for integer values *** diff --git a/ext/standard/tests/image/image_type_to_extension.phpt b/ext/standard/tests/image/image_type_to_extension.phpt index 249df579436ca..448aac4e99b33 100644 --- a/ext/standard/tests/image/image_type_to_extension.phpt +++ b/ext/standard/tests/image/image_type_to_extension.phpt @@ -33,7 +33,7 @@ image_type_to_extension() var_dump(image_type_to_extension(0)); ?> Done ---EXPECTF-- +--EXPECT-- Constant: IMAGETYPE_GIF With dot: .gif Without dot: gif diff --git a/ext/standard/tests/math/lcg_value_basic.phpt b/ext/standard/tests/math/lcg_value_basic.phpt index 95811c6f3c2e2..ca76b5c836044 100644 --- a/ext/standard/tests/math/lcg_value_basic.phpt +++ b/ext/standard/tests/math/lcg_value_basic.phpt @@ -24,7 +24,7 @@ if ($i != 100) { echo "MATHS test script completed\n"; ?> ---EXPECTF-- +--EXPECT-- MATHS test script started lcg_value tests... diff --git a/ext/standard/tests/network/inet.phpt b/ext/standard/tests/network/inet.phpt index 29b4aa0e6be97..b25265446f227 100644 --- a/ext/standard/tests/network/inet.phpt +++ b/ext/standard/tests/network/inet.phpt @@ -35,7 +35,7 @@ foreach ($array as $val) { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- string(9) "127.0.0.1" string(13) "255.255.255.0" bool(false) diff --git a/ext/standard/tests/network/ip_x86_64.phpt b/ext/standard/tests/network/ip_x86_64.phpt index c659eb70fb8ad..dd81bde55c89b 100644 --- a/ext/standard/tests/network/ip_x86_64.phpt +++ b/ext/standard/tests/network/ip_x86_64.phpt @@ -29,7 +29,7 @@ var_dump(long2ip(-110000)); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- int(2130706433) string(9) "127.0.0.1" int(167772161) diff --git a/ext/standard/tests/random/random_int.phpt b/ext/standard/tests/random/random_int.phpt index 94654a7f727f5..6fd04420eea44 100644 --- a/ext/standard/tests/random/random_int.phpt +++ b/ext/standard/tests/random/random_int.phpt @@ -15,7 +15,7 @@ var_dump(is_int(random_int(PHP_INT_MIN, PHP_INT_MAX))); var_dump(random_int(42,42)); ?> ---EXPECTF-- +--EXPECT-- bool(true) bool(true) bool(true) diff --git a/ext/standard/tests/serialize/bug45706.phpt b/ext/standard/tests/serialize/bug45706.phpt index cc71dec4e634d..c29081cab78e2 100644 --- a/ext/standard/tests/serialize/bug45706.phpt +++ b/ext/standard/tests/serialize/bug45706.phpt @@ -12,7 +12,7 @@ $s = serialize($x); $s = str_replace("Foo", "Bar", $s); $y = unserialize($s); var_dump($y); ---EXPECTF-- +--EXPECT-- array(2) { [0]=> object(__PHP_Incomplete_Class)#3 (5) { diff --git a/ext/standard/tests/streams/bug61115.phpt b/ext/standard/tests/streams/bug61115.phpt index 3caffde232976..ce6b57651cfa5 100644 --- a/ext/standard/tests/streams/bug61115.phpt +++ b/ext/standard/tests/streams/bug61115.phpt @@ -13,5 +13,5 @@ try { echo $e->getMessage(), "\n"; } ?> ---EXPECTF-- +--EXPECT-- Object of class Closure could not be converted to string diff --git a/ext/standard/tests/streams/bug78662.phpt b/ext/standard/tests/streams/bug78662.phpt index e874d5aef68c4..2ea00b67b1aa3 100644 --- a/ext/standard/tests/streams/bug78662.phpt +++ b/ext/standard/tests/streams/bug78662.phpt @@ -26,7 +26,7 @@ var_dump(fwrite($f, "bar")); var_dump(fread($f, 100)); ?> Done ---EXPECTF-- +--EXPECT-- bool(false) bool(false) Done diff --git a/ext/standard/tests/streams/stream_set_timeout_error.phpt b/ext/standard/tests/streams/stream_set_timeout_error.phpt index 7dcc6454223ed..64e9aa57734d9 100644 --- a/ext/standard/tests/streams/stream_set_timeout_error.phpt +++ b/ext/standard/tests/streams/stream_set_timeout_error.phpt @@ -41,7 +41,7 @@ fclose($server); echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing stream_set_timeout() : error conditions *** -- Testing stream_set_timeout() function with a closed socket -- diff --git a/ext/standard/tests/strings/chr_error.phpt b/ext/standard/tests/strings/chr_error.phpt index 2603b69210930..b6bd9973b6c58 100644 --- a/ext/standard/tests/strings/chr_error.phpt +++ b/ext/standard/tests/strings/chr_error.phpt @@ -26,7 +26,7 @@ try { } ?> ---EXPECTF-- +--EXPECT-- *** Testing chr() : error conditions *** -- Testing chr() function with no arguments -- diff --git a/ext/standard/tests/strings/fprintf_error.phpt b/ext/standard/tests/strings/fprintf_error.phpt index 1ffc188051167..bfef30a75b618 100644 --- a/ext/standard/tests/strings/fprintf_error.phpt +++ b/ext/standard/tests/strings/fprintf_error.phpt @@ -29,7 +29,7 @@ try { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing Error Conditions *** Wrong parameter count for fprintf() Wrong parameter count for fprintf() diff --git a/ext/standard/tests/strings/htmlentities24.phpt b/ext/standard/tests/strings/htmlentities24.phpt index f2abfd5ba81c1..2a04bd345eefc 100644 --- a/ext/standard/tests/strings/htmlentities24.phpt +++ b/ext/standard/tests/strings/htmlentities24.phpt @@ -37,7 +37,7 @@ var_dump( htmlentities($str, ENT_COMPAT) ); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Retrieving htmlentities for 256 characters *** string(12) "636872283029" string(12) "636872283129" diff --git a/ext/standard/tests/strings/htmlspecialchars.phpt b/ext/standard/tests/strings/htmlspecialchars.phpt index 6e5c5fac36a58..5677da6fe29f4 100644 --- a/ext/standard/tests/strings/htmlspecialchars.phpt +++ b/ext/standard/tests/strings/htmlspecialchars.phpt @@ -37,7 +37,7 @@ var_dump( htmlspecialchars($str, ENT_COMPAT) ); echo "Done\n" ?> ---EXPECTF-- +--EXPECT-- *** Retrieving htmlspecialchars for 256 characters *** string(12) "636872283029" string(12) "636872283129" diff --git a/ext/standard/tests/strings/ltrim.phpt b/ext/standard/tests/strings/ltrim.phpt index 51287e04d7f02..8ac57ca92eb44 100644 --- a/ext/standard/tests/strings/ltrim.phpt +++ b/ext/standard/tests/strings/ltrim.phpt @@ -41,7 +41,7 @@ var_dump( ltrim($str, "\nusi") ); echo "\nDone\n"; ?> ---EXPECTF-- +--EXPECT-- *** Output for Error Conditions *** *** Using heredoc string *** diff --git a/ext/standard/tests/strings/metaphone.phpt b/ext/standard/tests/strings/metaphone.phpt index 2bc16b3248db0..a6b52e3934a1f 100644 --- a/ext/standard/tests/strings/metaphone.phpt +++ b/ext/standard/tests/strings/metaphone.phpt @@ -24,7 +24,7 @@ foreach($array as $str) { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- string(0) "" string(0) "" bool(false) diff --git a/ext/standard/tests/strings/parse_str_basic1.phpt b/ext/standard/tests/strings/parse_str_basic1.phpt index 60277fa1848ab..38652ba0faf05 100644 --- a/ext/standard/tests/strings/parse_str_basic1.phpt +++ b/ext/standard/tests/strings/parse_str_basic1.phpt @@ -27,7 +27,7 @@ var_dump(parse_str($s1, $res3_array)); var_dump($res3_array); ?> ---EXPECTF-- +--EXPECT-- *** Testing parse_str() : basic functionality *** Basic test WITH undefined var for result arg diff --git a/ext/standard/tests/strings/parse_str_basic3.phpt b/ext/standard/tests/strings/parse_str_basic3.phpt index 25b5f8745d6ac21a67a3d5390b0e59c4b1939f16..0ea88a365bc4ba2a8a8e1551cc21c47f26bc0af7 100644 GIT binary patch delta 12 TcmaE=_(X9-Jjdn)j#dr;B(?<0 delta 14 VcmaE&_*8L2JO`uO=6H@)4gf5n1rY!M diff --git a/ext/standard/tests/strings/printf_error.phpt b/ext/standard/tests/strings/printf_error.phpt index 62591e9e6fcb7..e9fc0a4383cc0 100644 --- a/ext/standard/tests/strings/printf_error.phpt +++ b/ext/standard/tests/strings/printf_error.phpt @@ -61,7 +61,7 @@ try { } ?> ---EXPECTF-- +--EXPECT-- *** Testing printf() : error conditions *** -- Testing printf() function with Zero arguments -- diff --git a/ext/standard/tests/strings/rtrim.phpt b/ext/standard/tests/strings/rtrim.phpt index 223a839f580c53efb511b1aac96e06056e1521e9..2fc531faada7171c0fdc7abe4c339a3265cf260f 100644 GIT binary patch delta 12 TcmdljuuEV=4%_BjwsVXCAkGA> delta 14 Vcmdlbuv=h54jZG}<{Y+ji~uL&1oHp@ diff --git a/ext/standard/tests/strings/soundex.phpt b/ext/standard/tests/strings/soundex.phpt index ef61ac495ead1..c4acc2ff6842d 100644 --- a/ext/standard/tests/strings/soundex.phpt +++ b/ext/standard/tests/strings/soundex.phpt @@ -30,7 +30,7 @@ foreach ($array as $str) { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- bool(false) string(4) "0000" string(4) "F650" diff --git a/ext/standard/tests/strings/sprintf_variation15.phpt b/ext/standard/tests/strings/sprintf_variation15.phpt index 07774a92ecf0408df9fc189a387a123fe9edf226..66d85647ff38d57b35338ed9423e542378cd8ebb 100644 GIT binary patch delta 20 bcmZ3aw@`0G5i7HgetMessage() . "\n"; } ?> ---EXPECTF-- +--EXPECT-- *** Testing sscanf() : error conditions *** -- Testing sscanf() function with more than expected no. of arguments -- diff --git a/ext/standard/tests/strings/str_ireplace.phpt b/ext/standard/tests/strings/str_ireplace.phpt index a5a35769e47df..c360004a14279 100644 --- a/ext/standard/tests/strings/str_ireplace.phpt +++ b/ext/standard/tests/strings/str_ireplace.phpt @@ -44,7 +44,7 @@ var_dump($Data = str_ireplace("\n", "
", $Data)); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- string(0) "" string(8) "aaaaaaaT" string(8) "aaaaaaaT" diff --git a/ext/standard/tests/strings/stristr.phpt b/ext/standard/tests/strings/stristr.phpt index 7b1b5312a1ab2..09e6cff53c06b 100644 --- a/ext/standard/tests/strings/stristr.phpt +++ b/ext/standard/tests/strings/stristr.phpt @@ -14,7 +14,7 @@ stristr() function var_dump(md5(stristr("\\\\a\\", "\\a"))); var_dump(stristr("tEsT sTrInG", " ")); ?> ---EXPECTF-- +--EXPECT-- string(11) "tEsT sTrInG" string(6) "sTrInG" string(6) "sTrInG" diff --git a/ext/standard/tests/strings/strrchr_variation1.phpt b/ext/standard/tests/strings/strrchr_variation1.phpt index a75dd96bbf6f64cccfabe85c40c10382ec6899b0..f28571ba7ff9ea611572bff7dc8e9b56292d8380 100644 GIT binary patch delta 12 TcmbQNG)Za0Pu9)9SS7guBWwij delta 14 VcmbQFG+AlGPgX{^%|BTsxdAId1vCHv diff --git a/ext/standard/tests/strings/strrchr_variation2.phpt b/ext/standard/tests/strings/strrchr_variation2.phpt index 2ff6720fb9005..e6e510dd55b95 100644 --- a/ext/standard/tests/strings/strrchr_variation2.phpt +++ b/ext/standard/tests/strings/strrchr_variation2.phpt @@ -81,7 +81,7 @@ for($index=0; $index ---EXPECTF-- +--EXPECT-- *** Testing strrchr() function: with various single quoted strings *** -- Iteration 1 -- string(22) "lo123456he \x234 \101 " diff --git a/ext/standard/tests/strings/strtolower.phpt b/ext/standard/tests/strings/strtolower.phpt index 7c7e2bb4c7e13fa1ffa7525d29d7eccd5e79ed33..041b66a00c8d2bcc81ac675062cf0fc5cb458b71 100644 GIT binary patch delta 23 ecmca9bwg@{1{;&E?qqvz`N^?Nyqm+>nAibWk_I#Y delta 21 ccmca1byI4C1{;f;t}fSPdnWD8VQft707 ---EXPECTF-- +--EXPECT-- *** Testing strval() : error conditions *** -- Testing strval() function with object which has not toString() method -- diff --git a/ext/standard/tests/strings/substr.phpt b/ext/standard/tests/strings/substr.phpt index fe687ed1aefd77cdeb64da58baf93a0c70e77850..6028c1700884174d233b07cf876efe5cdc48a779 100644 GIT binary patch delta 12 Tcmeyb@K0ew9>?Z<4gn4TCYc1L delta 14 VcmeyT@Lyp=9tWe_<~$Ao4gfC(1nd9+ diff --git a/ext/standard/tests/strings/trim1.phpt b/ext/standard/tests/strings/trim1.phpt index 1ad504c61d078a155b369eb9a2006bb1218b249b..a31d7213a1385df17656d4d581e6e6e2ca4a3794 100644 GIT binary patch delta 12 TcmZqTY2?|kl4bKMmIy`w9XSLu delta 14 VcmZqVY2w+il7-Q2^GcQoMgSww1bF}e diff --git a/ext/standard/tests/strings/vfprintf_error1.phpt b/ext/standard/tests/strings/vfprintf_error1.phpt index f2057ea388125..fdaecd6fb3553 100644 --- a/ext/standard/tests/strings/vfprintf_error1.phpt +++ b/ext/standard/tests/strings/vfprintf_error1.phpt @@ -42,7 +42,7 @@ $file = 'vfprintf_error1.txt'; unlink( $file ); ?> ---EXPECTF-- +--EXPECT-- -- Testing vfprintf() function with more than expected no. of arguments -- Wrong parameter count for vfprintf() Wrong parameter count for vfprintf() diff --git a/ext/standard/tests/time/strptime_error.phpt b/ext/standard/tests/time/strptime_error.phpt index d7eb11fc550eb..87965cd1a2b04 100644 --- a/ext/standard/tests/time/strptime_error.phpt +++ b/ext/standard/tests/time/strptime_error.phpt @@ -24,7 +24,7 @@ $format = '%b %d %Y %H:%M:%S'; var_dump( strptime('foo', $format) ); ?> ---EXPECTF-- +--EXPECT-- *** Testing strptime() : error conditions *** -- Testing strptime() function on failure -- diff --git a/ext/tokenizer/tests/001.phpt b/ext/tokenizer/tests/001.phpt index 8e58c81891963..006377d5e98cd 100644 --- a/ext/tokenizer/tests/001.phpt +++ b/ext/tokenizer/tests/001.phpt @@ -129,7 +129,7 @@ echo token_name(0x8000000F), "\n"; echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- T_INCLUDE T_INCLUDE_ONCE T_EVAL diff --git a/ext/xmlreader/tests/static.phpt b/ext/xmlreader/tests/static.phpt index 1c6cb5b8709f4..a722e31105a28 100644 --- a/ext/xmlreader/tests/static.phpt +++ b/ext/xmlreader/tests/static.phpt @@ -22,7 +22,7 @@ while ($reader->read()) { echo $reader->name, "\n"; } ?> ---EXPECTF-- +--EXPECT-- books books books diff --git a/ext/xmlwriter/tests/bug41326.phpt b/ext/xmlwriter/tests/bug41326.phpt index 886e14926160d..c04ffe3167d5c 100644 --- a/ext/xmlwriter/tests/bug41326.phpt +++ b/ext/xmlwriter/tests/bug41326.phpt @@ -35,7 +35,7 @@ $xw->endElement(); $xw->endDocument(); print $xw->flush(true); ?> ---EXPECTF-- +--EXPECT-- diff --git a/tests/output/stream_isatty_err.phpt b/tests/output/stream_isatty_err.phpt index 55a25f1c9fea8..e7c10383506d3 100644 --- a/tests/output/stream_isatty_err.phpt +++ b/tests/output/stream_isatty_err.phpt @@ -13,7 +13,7 @@ STDERR require __DIR__.'/stream_isatty.inc'; testToStdErr(); ?> ---EXPECTF-- +--EXPECT-- STDIN (constant): bool(true) STDIN (fopen): bool(true) STDIN (php://fd/0): bool(true) diff --git a/tests/output/stream_isatty_in-err.phpt b/tests/output/stream_isatty_in-err.phpt index 2554eb468964d..73514955d43c9 100644 --- a/tests/output/stream_isatty_in-err.phpt +++ b/tests/output/stream_isatty_in-err.phpt @@ -13,7 +13,7 @@ STDIN STDERR require __DIR__.'/stream_isatty.inc'; testToStdErr(); ?> ---EXPECTF-- +--EXPECT-- STDIN (constant): bool(false) STDIN (fopen): bool(false) STDIN (php://fd/0): bool(false) diff --git a/tests/output/stream_isatty_in-out-err.phpt b/tests/output/stream_isatty_in-out-err.phpt index 496bdd100e604..9b65e8861b86b 100644 --- a/tests/output/stream_isatty_in-out-err.phpt +++ b/tests/output/stream_isatty_in-out-err.phpt @@ -13,7 +13,7 @@ STDIN STDOUT STDERR require __DIR__.'/stream_isatty.inc'; testToStdOut(); ?> ---EXPECTF-- +--EXPECT-- STDIN (constant): bool(false) STDIN (fopen): bool(false) STDIN (php://fd/0): bool(false) diff --git a/tests/output/stream_isatty_in-out.phpt b/tests/output/stream_isatty_in-out.phpt index d58e9aa05c626..c2bb346854f4f 100644 --- a/tests/output/stream_isatty_in-out.phpt +++ b/tests/output/stream_isatty_in-out.phpt @@ -13,7 +13,7 @@ STDIN STDOUT require __DIR__.'/stream_isatty.inc'; testToStdOut(); ?> ---EXPECTF-- +--EXPECT-- STDIN (constant): bool(false) STDIN (fopen): bool(false) STDIN (php://fd/0): bool(false) diff --git a/tests/output/stream_isatty_out-err.phpt b/tests/output/stream_isatty_out-err.phpt index e3ec1237bc49a..dc113a972060e 100644 --- a/tests/output/stream_isatty_out-err.phpt +++ b/tests/output/stream_isatty_out-err.phpt @@ -13,7 +13,7 @@ STDOUT STDERR require __DIR__.'/stream_isatty.inc'; testToStdOut(); ?> ---EXPECTF-- +--EXPECT-- STDIN (constant): bool(true) STDIN (fopen): bool(true) STDIN (php://fd/0): bool(true) diff --git a/tests/output/stream_isatty_out.phpt b/tests/output/stream_isatty_out.phpt index 3ea4996ac4a2c..f18c986c5abf6 100644 --- a/tests/output/stream_isatty_out.phpt +++ b/tests/output/stream_isatty_out.phpt @@ -13,7 +13,7 @@ STDOUT require __DIR__.'/stream_isatty.inc'; testToStdOut(); ?> ---EXPECTF-- +--EXPECT-- STDIN (constant): bool(true) STDIN (fopen): bool(true) STDIN (php://fd/0): bool(true) From 5fe723c92da05d9a2d7763fd9d54d223f4381571 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 27 Apr 2020 23:31:54 +0300 Subject: [PATCH 293/338] Fix libtool to provide a simple way to generate only "shared" object files or libraries. - Support for "-shared" option is taken from libtool-2.0 that is already at lease 15 years old. - Change PHP build system to use "-shared" instead of "--tag=disable-static". --- build/Makefile.global | 2 +- build/ltmain.sh | 13 +++++++++++++ build/php.m4 | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/build/Makefile.global b/build/Makefile.global index 237308d265976..17482043f9c54 100644 --- a/build/Makefile.global +++ b/build/Makefile.global @@ -16,7 +16,7 @@ build-modules: $(PHP_MODULES) $(PHP_ZEND_EX) build-binaries: $(PHP_BINARIES) libphp.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) - $(LIBTOOL) --mode=link --tag=disable-static $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ + $(LIBTOOL) --mode=link $(CC) -shared $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ -@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1 libs/libphp.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) diff --git a/build/ltmain.sh b/build/ltmain.sh index 7e2240e980e01..2f1c8c9dc80f0 100755 --- a/build/ltmain.sh +++ b/build/ltmain.sh @@ -811,6 +811,13 @@ if test -z "$show_help"; then for arg in $later; do case $arg in + -shared) + test yes = "$build_libtool_libs" \ + || func_fatal_configuration "cannot build a shared library" + build_old_libs=no + continue + ;; + -static) build_old_libs=yes continue @@ -1177,6 +1184,12 @@ EOF for arg do case $arg in + -shared) + test yes != "$build_libtool_libs" \ + && func_fatal_configuration "cannot build a shared library" + build_old_libs=no + break + ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) diff --git a/build/php.m4 b/build/php.m4 index 1b9940147e162..c5ce380264627 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -851,7 +851,7 @@ AC_DEFUN([PHP_SHARED_MODULE],[ \$(LIBTOOL) --mode=install cp $3/$1.$suffix \$(phplibdir) $3/$1.$suffix: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES) - \$(LIBTOOL) --mode=link --tag=disable-static ifelse($4,,[\$(CC)],[\$(CXX)]) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o [\$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_LIBADD) + \$(LIBTOOL) --mode=link ifelse($4,,[\$(CC)],[\$(CXX)]) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o [\$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_LIBADD) EOF ]) From 11491b63f800d150a00e9855f3a0a49e7bca50f7 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Tue, 28 Apr 2020 11:04:20 +0800 Subject: [PATCH 294/338] Also zend_str_tolower_dup_ex --- Zend/zend_operators.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 81f758e229843..e420dd962e8ae 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -2522,12 +2522,8 @@ ZEND_API char* ZEND_FASTCALL zend_str_tolower_dup_ex(const char *source, size_t memcpy(res, source, p - (const unsigned char*)source); } r = (unsigned char*)p + (res - source); - while (p < end) { - *r = zend_tolower_ascii(*p); - p++; - r++; - } - *r = '\0'; + zend_str_tolower_impl((char *)r, (const char*)p, end - p); + res[length] = '\0'; return res; } p++; From 5f900b328593de7b39d9c3f264b38be20b45944d Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Tue, 28 Apr 2020 11:13:33 +0800 Subject: [PATCH 295/338] update NEWS --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index 98c5a8a6f26b2..4cc5691d9ea98 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,7 @@ PHP NEWS message). (Alex Dowad) . Fixed bug #36365 (scandir duplicates file name at every 65535th file). (cmb) + . Use SSE2 instructions do locale independent strtolower. (Laruence) - BZ2: . Fixed bug #71263 (fread() does not report bzip2.decompress errors). (cmb) From a233e128a57e89eadfcb6668d75ff5bc6e40c713 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Tue, 28 Apr 2020 11:33:02 +0800 Subject: [PATCH 296/338] Use ascii lowercase if locale is default C --- ext/standard/string.c | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/ext/standard/string.c b/ext/standard/string.c index 33de160aa83b7..6b7d2e7c9683c 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1462,29 +1462,33 @@ PHPAPI zend_string *php_string_tolower(zend_string *s) unsigned char *c; const unsigned char *e; - c = (unsigned char *)ZSTR_VAL(s); - e = c + ZSTR_LEN(s); + if (EXPECTED(!BG(locale_changed))) { + return zend_string_tolower(s); + } else { + c = (unsigned char *)ZSTR_VAL(s); + e = c + ZSTR_LEN(s); - while (c < e) { - if (isupper(*c)) { - register unsigned char *r; - zend_string *res = zend_string_alloc(ZSTR_LEN(s), 0); + while (c < e) { + if (isupper(*c)) { + register unsigned char *r; + zend_string *res = zend_string_alloc(ZSTR_LEN(s), 0); - if (c != (unsigned char*)ZSTR_VAL(s)) { - memcpy(ZSTR_VAL(res), ZSTR_VAL(s), c - (unsigned char*)ZSTR_VAL(s)); - } - r = c + (ZSTR_VAL(res) - ZSTR_VAL(s)); - while (c < e) { - *r = tolower(*c); - r++; - c++; + if (c != (unsigned char*)ZSTR_VAL(s)) { + memcpy(ZSTR_VAL(res), ZSTR_VAL(s), c - (unsigned char*)ZSTR_VAL(s)); + } + r = c + (ZSTR_VAL(res) - ZSTR_VAL(s)); + while (c < e) { + *r = tolower(*c); + r++; + c++; + } + *r = '\0'; + return res; } - *r = '\0'; - return res; + c++; } - c++; + return zend_string_copy(s); } - return zend_string_copy(s); } /* }}} */ From d2c6bf203a3b3cb1ee17e5eca37f9f1a7fbe0dc3 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Tue, 28 Apr 2020 13:47:04 +0800 Subject: [PATCH 297/338] Folder mark --- Zend/zend_operators.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index e420dd962e8ae..6b1c92fce6810 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -199,7 +199,6 @@ ZEND_API void ZEND_FASTCALL convert_scalar_to_number(zval *op) /* {{{ */ } /* }}} */ -/* {{{ _zendi_convert_scalar_to_number */ static zend_never_inline zval* ZEND_FASTCALL _zendi_convert_scalar_to_number_silent(zval *op, zval *holder) /* {{{ */ { switch (Z_TYPE_P(op)) { @@ -270,7 +269,7 @@ static zend_never_inline int ZEND_FASTCALL _zendi_try_convert_scalar_to_number(z } /* }}} */ -static zend_always_inline int zendi_try_convert_scalar_to_number(zval *op, zval *holder) +static zend_always_inline int zendi_try_convert_scalar_to_number(zval *op, zval *holder) /* {{{ */ { if (Z_TYPE_P(op) == IS_LONG || Z_TYPE_P(op) == IS_DOUBLE) { ZVAL_COPY_VALUE(holder, op); @@ -279,6 +278,7 @@ static zend_always_inline int zendi_try_convert_scalar_to_number(zval *op, zval return _zendi_try_convert_scalar_to_number(op, holder); } } +/* }}} */ #define ZEND_TRY_BINARY_OP1_OBJECT_OPERATION(opcode) \ if (UNEXPECTED(Z_TYPE_P(op1) == IS_OBJECT) \ @@ -626,7 +626,7 @@ ZEND_API void ZEND_FASTCALL _convert_to_string(zval *op) /* {{{ */ } /* }}} */ -ZEND_API zend_bool ZEND_FASTCALL _try_convert_to_string(zval *op) +ZEND_API zend_bool ZEND_FASTCALL _try_convert_to_string(zval *op) /* {{{ */ { zend_string *str; @@ -639,6 +639,7 @@ ZEND_API zend_bool ZEND_FASTCALL _try_convert_to_string(zval *op) ZVAL_STR(op, str); return 1; } +/* }}} */ static void convert_scalar_to_array(zval *op) /* {{{ */ { @@ -943,8 +944,7 @@ ZEND_API zend_string* ZEND_FASTCALL zval_try_get_string_func(zval *op) /* {{{ */ } /* }}} */ -static ZEND_COLD zend_never_inline void ZEND_FASTCALL zend_binop_error( - const char *operator, zval *op1, zval *op2) { +static ZEND_COLD zend_never_inline void ZEND_FASTCALL zend_binop_error(const char *operator, zval *op1, zval *op2) /* {{{ */ { if (EG(exception)) { return; } @@ -952,6 +952,7 @@ static ZEND_COLD zend_never_inline void ZEND_FASTCALL zend_binop_error( zend_type_error("Unsupported operand types: %s %s %s", zend_get_type_by_const(Z_TYPE_P(op1)), operator, zend_get_type_by_const(Z_TYPE_P(op2))); } +/* }}} */ static zend_never_inline void ZEND_FASTCALL add_function_array(zval *result, zval *op1, zval *op2) /* {{{ */ { @@ -1123,6 +1124,7 @@ static zend_always_inline int mul_function_fast(zval *result, zval *op1, zval *o return FAILURE; } } +/* }}} */ static zend_never_inline int ZEND_FASTCALL mul_function_slow(zval *result, zval *op1, zval *op2) /* {{{ */ { @@ -1302,6 +1304,7 @@ static int ZEND_FASTCALL div_function_base(zval *result, zval *op1, zval *op2) / return FAILURE; } } +/* }}} */ ZEND_API int ZEND_FASTCALL div_function(zval *result, zval *op1, zval *op2) /* {{{ */ { @@ -3083,7 +3086,7 @@ ZEND_API const char* ZEND_FASTCALL zend_memnrstr_ex(const char *haystack, const #if !ZEND_DVAL_TO_LVAL_CAST_OK # if SIZEOF_ZEND_LONG == 4 -ZEND_API zend_long ZEND_FASTCALL zend_dval_to_lval_slow(double d) +ZEND_API zend_long ZEND_FASTCALL zend_dval_to_lval_slow(double d) /* {{{ */ { double two_pow_32 = pow(2., 32.), dmod; @@ -3110,5 +3113,6 @@ ZEND_API zend_long ZEND_FASTCALL zend_dval_to_lval_slow(double d) } return (zend_long)(zend_ulong)dmod; } +/* }}} */ #endif #endif From d906eb23f6cc86c69f7edc2732d7a46901b992a3 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Tue, 28 Apr 2020 14:17:21 +0800 Subject: [PATCH 298/338] Fixed bug #79526 (`__sleep` error message doesn't include the name of the class) --- ext/standard/tests/serialize/bug79526.phpt | 32 ++++++++++++++++++++++ ext/standard/var.c | 8 ++++-- 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 ext/standard/tests/serialize/bug79526.phpt diff --git a/ext/standard/tests/serialize/bug79526.phpt b/ext/standard/tests/serialize/bug79526.phpt new file mode 100644 index 0000000000000..b237df0d735de --- /dev/null +++ b/ext/standard/tests/serialize/bug79526.phpt @@ -0,0 +1,32 @@ +--TEST-- +Bug #79526 (`__sleep` error message doesn't include the name of the class) +--FILE-- + +Done +--EXPECTF-- +Notice: serialize(): A::__sleep should return an array only containing the names of instance-variables to serialize in %sbug79526.php on line %d + +Notice: serialize(): B::__sleep should return an array only containing the names of instance-variables to serialize in %sbug79526.php on line %d + +Notice: serialize(): "1" returned as member variable from __sleep() but does not exist in %sbug79526.php on line %d +Done diff --git a/ext/standard/var.c b/ext/standard/var.c index 3652a631e31a0..609acf449e1fa 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -729,8 +729,11 @@ static int php_var_serialize_call_sleep(zval *retval, zval *struc) /* {{{ */ } if (!HASH_OF(retval)) { + zend_class_entry *ce; + ZEND_ASSERT(Z_TYPE_P(struc) == IS_OBJECT); + ce = Z_OBJCE_P(struc); zval_ptr_dtor(retval); - php_error_docref(NULL, E_NOTICE, "__sleep should return an array only containing the names of instance-variables to serialize"); + php_error_docref(NULL, E_NOTICE, "%s::__sleep should return an array only containing the names of instance-variables to serialize", ZSTR_VAL(ce->name)); return FAILURE; } @@ -811,7 +814,8 @@ static int php_var_serialize_get_sleep_props( ZVAL_DEREF(name_val); if (Z_TYPE_P(name_val) != IS_STRING) { php_error_docref(NULL, E_NOTICE, - "__sleep should return an array only containing the names of instance-variables to serialize."); + "%s::__sleep should return an array only containing the names of instance-variables to serialize", + ZSTR_VAL(ce->name)); } name = zval_get_tmp_string(name_val, &tmp_name); From 6998cc502997336125a75987efda563a770ab839 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 28 Apr 2020 09:10:50 +0200 Subject: [PATCH 299/338] Bump version --- NEWS | 4 +++- Zend/zend.h | 2 +- configure.ac | 2 +- main/php_version.h | 6 +++--- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index c96ee110d04b5..598941399332e 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 7.3.18 +?? ??? ????, PHP 7.3.19 + +30 Apr 2020, PHP 7.3.18RC1 - Core: . Fixed bug #79434 (PHP 7.3 and PHP-7.4 crash with NULL-pointer dereference diff --git a/Zend/zend.h b/Zend/zend.h index 238b453a0c1ba..52ffd145b5801 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -20,7 +20,7 @@ #ifndef ZEND_H #define ZEND_H -#define ZEND_VERSION "3.3.18-dev" +#define ZEND_VERSION "3.3.19-dev" #define ZEND_ENGINE_3 diff --git a/configure.ac b/configure.ac index 3d129f3594885..3cbfaf0762685 100644 --- a/configure.ac +++ b/configure.ac @@ -107,7 +107,7 @@ int zend_sprintf(char *buffer, const char *format, ...); PHP_MAJOR_VERSION=7 PHP_MINOR_VERSION=3 -PHP_RELEASE_VERSION=18 +PHP_RELEASE_VERSION=19 PHP_EXTRA_VERSION="-dev" PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION" PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION` diff --git a/main/php_version.h b/main/php_version.h index a4de784fc6e7a..5b0572926266c 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.ac to change version number */ #define PHP_MAJOR_VERSION 7 #define PHP_MINOR_VERSION 3 -#define PHP_RELEASE_VERSION 18 +#define PHP_RELEASE_VERSION 19 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "7.3.18-dev" -#define PHP_VERSION_ID 70318 +#define PHP_VERSION "7.3.19-dev" +#define PHP_VERSION_ID 70319 From 790a08c885fa78d92d52a56817c5bdf2ce950e29 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 28 Apr 2020 13:05:56 +0300 Subject: [PATCH 300/338] Improve JIT code for FCALL with "fake" INIT and avoid fcall_guard if possible. --- ext/opcache/jit/zend_jit_trace.c | 110 ++++++++++++++++++++++++------- 1 file changed, 87 insertions(+), 23 deletions(-) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index f7408b6707ff1..42df977078de3 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -757,32 +757,75 @@ static int find_return_ssa_var(zend_jit_trace_rec *p, zend_ssa_op *ssa_op) } } -static int find_call_num_args(zend_jit_trace_rec *p) +static const zend_op *zend_jit_trace_find_init_fcall_op(zend_jit_trace_rec *p, const zend_op_array *op_array) { - while (1) { - if (p->op == ZEND_JIT_TRACE_VM) { - if (p->opline->opcode == ZEND_INIT_FCALL - || p->opline->opcode == ZEND_INIT_FCALL_BY_NAME - || p->opline->opcode == ZEND_INIT_NS_FCALL_BY_NAME - || p->opline->opcode == ZEND_INIT_DYNAMIC_CALL - || p->opline->opcode == ZEND_INIT_USER_CALL - || p->opline->opcode == ZEND_NEW - || p->opline->opcode == ZEND_INIT_METHOD_CALL - || p->opline->opcode == ZEND_INIT_STATIC_METHOD_CALL) { - if (p->opline->extended_value <= TRACE_FRAME_MAX_NUM_ARGS) { - return p->opline->extended_value; - } else { - return -1; + if (!p->fake) { + p--; + while (1) { + if (p->op == ZEND_JIT_TRACE_VM) { + if (p->opline->opcode == ZEND_INIT_FCALL + || p->opline->opcode == ZEND_INIT_FCALL_BY_NAME + || p->opline->opcode == ZEND_INIT_NS_FCALL_BY_NAME + || p->opline->opcode == ZEND_INIT_DYNAMIC_CALL + || p->opline->opcode == ZEND_INIT_USER_CALL + || p->opline->opcode == ZEND_NEW + || p->opline->opcode == ZEND_INIT_METHOD_CALL + || p->opline->opcode == ZEND_INIT_STATIC_METHOD_CALL) { + return p->opline; + } + return NULL; + } else if (p->op == ZEND_JIT_TRACE_OP1_TYPE || p->op == ZEND_JIT_TRACE_OP2_TYPE) { + /*skip */ + } else { + return NULL; + } + p--; + } + } else { + const zend_op *opline = NULL; + int call_level = 0; + + p++; + while (1) { + if (p->op == ZEND_JIT_TRACE_VM) { + opline = p->opline; + break; + } else if (p->op == ZEND_JIT_TRACE_INIT_CALL) { + call_level++; + /*skip */ + } else { + return NULL; + } + p--; + } + if (opline) { + while (opline > op_array->opcodes) { + opline--; + switch (opline->opcode) { + case ZEND_INIT_FCALL: + case ZEND_INIT_FCALL_BY_NAME: + case ZEND_INIT_NS_FCALL_BY_NAME: + case ZEND_INIT_METHOD_CALL: + case ZEND_INIT_DYNAMIC_CALL: + case ZEND_INIT_STATIC_METHOD_CALL: + case ZEND_INIT_USER_CALL: + case ZEND_NEW: + if (call_level == 0) { + return opline; + } + call_level--; + break; + case ZEND_DO_FCALL: + case ZEND_DO_ICALL: + case ZEND_DO_UCALL: + case ZEND_DO_FCALL_BY_NAME: + call_level++; + break; } } - return -1; - } else if (p->op == ZEND_JIT_TRACE_OP1_TYPE || p->op == ZEND_JIT_TRACE_OP2_TYPE) { - /*skip */ - } else { - return -1; } - p--; } + return NULL; } static int is_checked_guard(const zend_ssa *tssa, const zend_op **ssa_opcodes, uint32_t var, uint32_t phi_var) @@ -3854,8 +3897,16 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par } else if (p->op == ZEND_JIT_TRACE_END) { break; } else if (p->op == ZEND_JIT_TRACE_INIT_CALL) { + const zend_op *init_opline = zend_jit_trace_find_init_fcall_op(p, op_array); + int num_args = -1; + + if (init_opline + && init_opline->extended_value <= TRACE_FRAME_MAX_NUM_ARGS) { + num_args = init_opline->extended_value; + } + call = top; - TRACE_FRAME_INIT(call, p->func, 1, !p->fake ? find_call_num_args(p-1) : -1); + TRACE_FRAME_INIT(call, p->func, 1, num_args); call->prev = frame->call; if (!p->fake) { TRACE_FRAME_SET_LAST_SEND_BY_VAL(call); @@ -3879,7 +3930,20 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par } } if (p->fake) { - if (!zend_jit_init_fcall_guard(&dasm_state, NULL, p->func)) { + int skip_guard = 0; + + if (init_opline) { + zend_call_info *call_info = jit_extension->func_info.callee_info; + + while (call_info) { + if (call_info->caller_init_opline == init_opline) { + skip_guard = 1; + break; + } + call_info = call_info->next_callee; + } + } + if (!skip_guard && !zend_jit_init_fcall_guard(&dasm_state, NULL, p->func)) { goto jit_failure; } } From 7d1c8064912da100be0106774b9ba08ec1a88ee6 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 28 Apr 2020 14:46:04 +0200 Subject: [PATCH 301/338] Clarify that FFI::cdef() does not return NULL --- ext/ffi/ffi.c | 4 +++- ext/ffi/ffi.stub.php | 2 +- ext/ffi/ffi_arginfo.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c index 55c1b7093bfd3..1ca8a9be7568d 100644 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@ -2869,7 +2869,7 @@ ZEND_METHOD(FFI, cdef) /* {{{ */ efree(FFI_G(tags)); FFI_G(tags) = NULL; } - return; + RETURN_THROWS(); } if (FFI_G(symbols)) { @@ -2881,6 +2881,7 @@ ZEND_METHOD(FFI, cdef) /* {{{ */ addr = DL_FETCH_SYMBOL(handle, ZSTR_VAL(name)); if (!addr) { zend_throw_error(zend_ffi_exception_ce, "Failed resolving C variable '%s'", ZSTR_VAL(name)); + RETURN_THROWS(); } sym->addr = addr; } else if (sym->kind == ZEND_FFI_SYM_FUNC) { @@ -2890,6 +2891,7 @@ ZEND_METHOD(FFI, cdef) /* {{{ */ zend_string_release(mangled_name); if (!addr) { zend_throw_error(zend_ffi_exception_ce, "Failed resolving C function '%s'", ZSTR_VAL(name)); + RETURN_THROWS(); } sym->addr = addr; } diff --git a/ext/ffi/ffi.stub.php b/ext/ffi/ffi.stub.php index 4d3100579e935..a45235469e7a6 100644 --- a/ext/ffi/ffi.stub.php +++ b/ext/ffi/ffi.stub.php @@ -4,7 +4,7 @@ final class FFI { - public static function cdef(string $code = UNKNOWN, string $lib = UNKNOWN): ?FFI {} + public static function cdef(string $code = UNKNOWN, string $lib = UNKNOWN): FFI {} public static function load(string $filename): ?FFI {} diff --git a/ext/ffi/ffi_arginfo.h b/ext/ffi/ffi_arginfo.h index 960c3e3965024..009512fe827da 100644 --- a/ext/ffi/ffi_arginfo.h +++ b/ext/ffi/ffi_arginfo.h @@ -1,6 +1,6 @@ /* This is a generated file, edit the .stub.php file instead. */ -ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_cdef, 0, 0, FFI, 1) +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_cdef, 0, 0, FFI, 0) ZEND_ARG_TYPE_INFO(0, code, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, lib, IS_STRING, 0) ZEND_END_ARG_INFO() From 75470bc312ef2e151696ea5c1ee026c089944623 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 28 Apr 2020 15:09:41 +0200 Subject: [PATCH 302/338] Revert "Fix #79065: DOM classes do not expose properties to Reflection" This reverts commit 6bc8f7e5a9949b2ba79376abd1ed13d0b4d0ae3c. This causes an assertion failure in PHPUnit. --- NEWS | 2 -- ext/dom/php_dom.c | 23 ----------------------- ext/dom/tests/bug79065.phpt | 30 ------------------------------ 3 files changed, 55 deletions(-) delete mode 100644 ext/dom/tests/bug79065.phpt diff --git a/NEWS b/NEWS index 0fecf66f7f79d..ba008a7ba7f7c 100644 --- a/NEWS +++ b/NEWS @@ -16,8 +16,6 @@ PHP NEWS - DOM: . Fixed bug #78221 (DOMNode::normalize() doesn't remove empty text nodes). (cmb) - . Fixed bug #79065 (DOM classes do not expose properties to Reflection). - (cmb) - EXIF: . Fixed bug #79336 (ext/exif/tests/bug79046.phpt fails on Big endian arch). diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index ad297ca7788fb..6bc72e9f97940 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -410,28 +410,6 @@ static int dom_property_exists(zval *object, zval *member, int check_empty, void } /* }}} */ -/* {{{ dom_get_properties */ -static HashTable *dom_get_properties(zval *object) -{ - dom_object *obj = Z_DOMOBJ_P(object); - HashTable *props = zend_std_get_properties(object); - - if (obj->prop_handler != NULL) { - zend_string *key; - dom_prop_handler *hnd; - - ZEND_HASH_FOREACH_STR_KEY_PTR(obj->prop_handler, key, hnd) { - zval val; - - if (hnd->read_func(obj, &val) == SUCCESS) { - zend_hash_update(props, key, &val); - } - } ZEND_HASH_FOREACH_END(); - } - return props; -} -/* }}} */ - static HashTable* dom_get_debug_info_helper(zval *object, int *is_temp) /* {{{ */ { dom_object *obj = Z_DOMOBJ_P(object); @@ -624,7 +602,6 @@ PHP_MINIT_FUNCTION(dom) dom_object_handlers.get_property_ptr_ptr = dom_get_property_ptr_ptr; dom_object_handlers.clone_obj = dom_objects_store_clone_obj; dom_object_handlers.has_property = dom_property_exists; - dom_object_handlers.get_properties = dom_get_properties; dom_object_handlers.get_debug_info = dom_get_debug_info; memcpy(&dom_nnodemap_object_handlers, &dom_object_handlers, sizeof(zend_object_handlers)); diff --git a/ext/dom/tests/bug79065.phpt b/ext/dom/tests/bug79065.phpt deleted file mode 100644 index 9f3f49b7c80c7..0000000000000 --- a/ext/dom/tests/bug79065.phpt +++ /dev/null @@ -1,30 +0,0 @@ ---TEST-- -Bug #79065 (DOM classes do not expose properties to Reflection) ---SKIPIF-- - ---FILE-- -loadHTML('test'); -var_dump(count(get_object_vars($dom))); - -$ro = new ReflectionObject($dom); -var_dump(count($ro->getProperties())); -var_dump($ro->hasProperty("textContent")); -$rp = $ro->getProperty("textContent"); -var_dump($rp); -var_dump($rp->getValue($dom)); -?> ---EXPECTF-- -int(35) -int(35) -bool(true) -object(ReflectionProperty)#%d (2) { - ["name"]=> - string(11) "textContent" - ["class"]=> - string(11) "DOMDocument" -} -string(4) "test" From dc1574e0a0097e006acd783acff01f6537b79185 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 28 Apr 2020 15:25:35 +0200 Subject: [PATCH 303/338] Fix ifunc resolver return type warning --- ext/standard/string.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ext/standard/string.c b/ext/standard/string.c index 33de160aa83b7..c06de62a80a52 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -3673,9 +3673,12 @@ void php_stripslashes_default(zend_string *str); PHPAPI zend_string *php_addslashes(zend_string *str) __attribute__((ifunc("resolve_addslashes"))); PHPAPI void php_stripslashes(zend_string *str) __attribute__((ifunc("resolve_stripslashes"))); +typedef zend_string *(*php_addslashes_func_t)(zend_string *); +typedef void (*php_stripslashes_func_t)(zend_string *); + ZEND_NO_SANITIZE_ADDRESS ZEND_ATTRIBUTE_UNUSED /* clang mistakenly warns about this */ -static void *resolve_addslashes() { +static php_addslashes_func_t resolve_addslashes() { if (zend_cpu_supports_sse42()) { return php_addslashes_sse42; } @@ -3684,7 +3687,7 @@ static void *resolve_addslashes() { ZEND_NO_SANITIZE_ADDRESS ZEND_ATTRIBUTE_UNUSED /* clang mistakenly warns about this */ -static void *resolve_stripslashes() { +static php_stripslashes_func_t resolve_stripslashes() { if (zend_cpu_supports_sse42()) { return php_stripslashes_sse42; } From 0da38cda6e7d2c181bdff02838b7ff755b1d6177 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 28 Apr 2020 15:43:52 +0200 Subject: [PATCH 304/338] Fix JIT segfaults in FFI tests Conservative fix that just disables this optimization. --- ext/opcache/jit/zend_jit_x86.dasc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 047287b006b0a..b9a0557aee3c1 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -8463,11 +8463,17 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend |1: if (!RETURN_VALUE_USED(opline)) { +#if 0 + /* If an exception is thrown, then the value stored in the return_value slot + * may have a different type. */ zend_class_entry *ce; zend_bool ce_is_instanceof; uint32_t func_info = call_info ? zend_get_func_info(call_info, ssa, &ce, &ce_is_instanceof) : (MAY_BE_ANY|MAY_BE_REF|MAY_BE_RC1|MAY_BE_RCN); +#else + uint32_t func_info = (MAY_BE_ANY|MAY_BE_REF|MAY_BE_RC1|MAY_BE_RCN); +#endif if (func_info & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF)) { | ZVAL_PTR_DTOR res_addr, func_info, 1, 1, opline From 88a701aa02ac44d0f4d6cd3dc74ca56e2058d0dc Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 28 Apr 2020 15:55:02 +0200 Subject: [PATCH 305/338] Less conservative fix I think it's reasonable to assume that the only possible types are those that are declared, and null, because null is what return_value is initialized to. --- ext/opcache/jit/zend_jit_x86.dasc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index b9a0557aee3c1..aac0e44f3c0bf 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -8463,17 +8463,15 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend |1: if (!RETURN_VALUE_USED(opline)) { -#if 0 - /* If an exception is thrown, then the value stored in the return_value slot - * may have a different type. */ zend_class_entry *ce; zend_bool ce_is_instanceof; uint32_t func_info = call_info ? zend_get_func_info(call_info, ssa, &ce, &ce_is_instanceof) : (MAY_BE_ANY|MAY_BE_REF|MAY_BE_RC1|MAY_BE_RCN); -#else - uint32_t func_info = (MAY_BE_ANY|MAY_BE_REF|MAY_BE_RC1|MAY_BE_RCN); -#endif + + /* If an exception is thrown, the return_value may stay at the + * original value of null. */ + func_info |= MAY_BE_NULL; if (func_info & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF)) { | ZVAL_PTR_DTOR res_addr, func_info, 1, 1, opline From 5eb4ab07f27c82336d337afa01d02a7bf574adaf Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 28 Apr 2020 16:08:17 +0200 Subject: [PATCH 306/338] Show eventual output of clean sections This is a hack to investigate why mysqli_insert_packet_overflow.phpt intermittently fails on AppVeyor, and will be reverted in due time. See . --- run-tests.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/run-tests.php b/run-tests.php index ffdb72a00ee32..93d84cc73fdc0 100755 --- a/run-tests.php +++ b/run-tests.php @@ -2497,7 +2497,10 @@ function run_test($php, $file, $env) $clean_params = settings2params($clean_params); $extra = !IS_WINDOWS ? "unset REQUEST_METHOD; unset QUERY_STRING; unset PATH_TRANSLATED; unset SCRIPT_FILENAME; unset REQUEST_METHOD;" : ""; - system_with_timeout("$extra $php $pass_options $extra_options -q $clean_params $no_file_cache \"$test_clean\"", $env); + $clean_output = system_with_timeout("$extra $php $pass_options $extra_options -q $clean_params $no_file_cache \"$test_clean\"", $env); + if (trim($clean_output) != '') { + echo "\nCLEAN OUTPUT: $file: $clean_output\n"; + } } if (!$cfg['keep']['clean']) { From f545ee2c6cc63bae79cc5618f2019e3d9bc2dfa5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 26 Mar 2020 16:39:08 +0100 Subject: [PATCH 307/338] Allow optional trailing comma in parameter list RFC: https://wiki.php.net/rfc/trailing_comma_in_parameter_list Closes GH-5306. --- UPGRADING | 2 ++ Zend/tests/func_sig_trailing_comma.phpt | 46 +++++++++++++++++++++++++ Zend/zend_language_parser.y | 2 +- 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 Zend/tests/func_sig_trailing_comma.phpt diff --git a/UPGRADING b/UPGRADING index c4eca6daaa0e0..40a78fcad5868 100644 --- a/UPGRADING +++ b/UPGRADING @@ -462,6 +462,8 @@ PHP 8.0 UPGRADE NOTES RFC: https://wiki.php.net/rfc/abstract_trait_method_validation . `throw` can now be used as an expression. RFC: https://wiki.php.net/rfc/throw_expression + . An optional trailing comma is now allowed in parameter lists. + RFC: https://wiki.php.net/rfc/trailing_comma_in_parameter_list - Date: . Added DateTime::createFromInterface() and diff --git a/Zend/tests/func_sig_trailing_comma.phpt b/Zend/tests/func_sig_trailing_comma.phpt new file mode 100644 index 0000000000000..8153edbb05880 --- /dev/null +++ b/Zend/tests/func_sig_trailing_comma.phpt @@ -0,0 +1,46 @@ +--TEST-- +Trailing comma in function signatures +--FILE-- + print "Foo\n"; + +?> +===DONE=== +--EXPECT-- +===DONE=== diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y index c75c1e6993865..78b6e758ba9dc 100644 --- a/Zend/zend_language_parser.y +++ b/Zend/zend_language_parser.y @@ -633,7 +633,7 @@ alt_if_stmt: ; parameter_list: - non_empty_parameter_list { $$ = $1; } + non_empty_parameter_list possible_comma { $$ = $1; } | %empty { $$ = zend_ast_create_list(0, ZEND_AST_PARAM_LIST); } ; From 34c460f32975adbe8f0f0a166ce5fbc2e1dabb4e Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Sun, 26 Apr 2020 04:31:47 +0200 Subject: [PATCH 308/338] Check `__set_state` structure Fix Bug #79521. Closes GH-5462. --- NEWS | 1 + Zend/tests/magic_methods_set_state.phpt | 14 ++++++++++++++ Zend/zend_compile.c | 2 ++ .../tests/ReflectionMethod_getModifiers_basic.phpt | 6 +++--- 4 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 Zend/tests/magic_methods_set_state.phpt diff --git a/NEWS b/NEWS index 4cc5691d9ea98..a6e2915ab6503 100644 --- a/NEWS +++ b/NEWS @@ -23,6 +23,7 @@ PHP NEWS . Fixed bug #36365 (scandir duplicates file name at every 65535th file). (cmb) . Use SSE2 instructions do locale independent strtolower. (Laruence) + . Fixed bug #79521 (Check __set_state structure). (carusogabriel) - BZ2: . Fixed bug #71263 (fread() does not report bzip2.decompress errors). (cmb) diff --git a/Zend/tests/magic_methods_set_state.phpt b/Zend/tests/magic_methods_set_state.phpt new file mode 100644 index 0000000000000..389798e54291d --- /dev/null +++ b/Zend/tests/magic_methods_set_state.phpt @@ -0,0 +1,14 @@ +--TEST-- +Testing __set_state() declaration with wrong modifier +--FILE-- + +--EXPECTF-- +Warning: The magic method Foo::__set_state() must be static in %s on line %d diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 7c84456a6ff9c..0923aa71415cd 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -6170,6 +6170,8 @@ zend_string *zend_begin_method_decl(zend_op_array *op_array, zend_string *name, zend_check_magic_method_attr(fn_flags, ce, "__serialize", 0); } else if (zend_string_equals_literal(lcname, "__unserialize")) { zend_check_magic_method_attr(fn_flags, ce, "__unserialize", 0); + } else if (zend_string_equals_literal(lcname, "__set_state")) { + zend_check_magic_method_attr(fn_flags, ce, "__set_state", 1); } return lcname; diff --git a/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt b/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt index 70038c31a088d..e5e967e28e82a 100644 --- a/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt +++ b/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt @@ -52,7 +52,7 @@ class TestClass public function __wakeup() {} - public function __set_state() {} + public static function __set_state() {} public function __autoload() {} } @@ -143,7 +143,7 @@ Modifiers for method TestClass::__wakeup(): Modifiers for method TestClass::__set_state(): -0x00000001 +0x00000011 Modifiers for method TestClass::__autoload(): @@ -207,7 +207,7 @@ Modifiers for method TestClass::__wakeup(): Modifiers for method TestClass::__set_state(): -0x00000001 +0x00000011 Modifiers for method TestClass::__autoload(): From 45cb42166d4a53fe0154be08097f112d6ec72a27 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 28 Apr 2020 21:06:32 +0200 Subject: [PATCH 309/338] Insert one more debug output --- ext/mysqli/tests/clean_table.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/mysqli/tests/clean_table.inc b/ext/mysqli/tests/clean_table.inc index a3dc8b66debf1..896d49c146e3f 100644 --- a/ext/mysqli/tests/clean_table.inc +++ b/ext/mysqli/tests/clean_table.inc @@ -11,4 +11,5 @@ if (!mysqli_query($link, 'DROP TABLE IF EXISTS test')) { } mysqli_close($link); +echo "Cleaned successfully\n"; ?> From 0b04b9347f5dfa42b3dc3f9791d5c8d36157cb8d Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 28 Apr 2020 17:42:52 +0200 Subject: [PATCH 310/338] Enclose contents of CLEAN sections in PHP tags We also place the CLEAN sections before EXPECT(F), and remove extraneous clean-ups. --- ext/openssl/tests/bug76296.phpt | 6 ++++-- ext/phar/tests/bug66960.phpt | 2 ++ ext/session/tests/session_save_path_variation4.phpt | 3 ++- ext/session/tests/session_save_path_variation5.phpt | 2 ++ ext/standard/tests/array/end_64bit.phpt | 4 ---- ext/standard/tests/streams/proc_open_bug60120.phpt | 7 +++++-- 6 files changed, 15 insertions(+), 9 deletions(-) diff --git a/ext/openssl/tests/bug76296.phpt b/ext/openssl/tests/bug76296.phpt index 41e3b9984e02c..0ac583d13eb6f 100644 --- a/ext/openssl/tests/bug76296.phpt +++ b/ext/openssl/tests/bug76296.phpt @@ -14,8 +14,10 @@ ini_set('open_basedir', $dir); var_dump(openssl_pkey_get_public($pem)); ?> +--CLEAN-- + --EXPECTF-- Warning: openssl_pkey_get_public(): open_basedir restriction in effect. File(%s) is not within the allowed path(s): (%s) in %s on line %d bool(false) ---CLEAN-- -@rmdir(__DIR__ . '/bug76296_openbasedir'); diff --git a/ext/phar/tests/bug66960.phpt b/ext/phar/tests/bug66960.phpt index 0d2ffa6df06b6..a2616c5e3ad49 100644 --- a/ext/phar/tests/bug66960.phpt +++ b/ext/phar/tests/bug66960.phpt @@ -15,8 +15,10 @@ var_dump(file_exists("phar://$file/". str_repeat('a', PHP_MAXPATHLEN+1))); echo 'done'; ?> --CLEAN-- + --EXPECT-- bool(false) bool(false) diff --git a/ext/session/tests/session_save_path_variation4.phpt b/ext/session/tests/session_save_path_variation4.phpt index a95b990dbc796..c59a39ece340b 100644 --- a/ext/session/tests/session_save_path_variation4.phpt +++ b/ext/session/tests/session_save_path_variation4.phpt @@ -42,10 +42,11 @@ echo "Done"; ob_end_flush(); ?> --CLEAN-- + --EXPECTF-- *** Testing session_save_path() : variation *** bool(true) diff --git a/ext/session/tests/session_save_path_variation5.phpt b/ext/session/tests/session_save_path_variation5.phpt index b97badf7f6dca..7a8907e6dd41f 100644 --- a/ext/session/tests/session_save_path_variation5.phpt +++ b/ext/session/tests/session_save_path_variation5.phpt @@ -40,9 +40,11 @@ echo "Done"; ob_end_flush(); ?> --CLEAN-- + --EXPECTF-- *** Testing session_save_path() : variation *** bool(true) diff --git a/ext/standard/tests/array/end_64bit.phpt b/ext/standard/tests/array/end_64bit.phpt index ba20693d0f995..26c74120a8d83 100644 --- a/ext/standard/tests/array/end_64bit.phpt +++ b/ext/standard/tests/array/end_64bit.phpt @@ -109,10 +109,6 @@ var_dump( current($resources) ); echo "Done\n"; ?> ---CLEAN-- -/* cleaning resource handles */ -fclose( $file_handle ); //file resource handle deleted -closedir( $dir_handle ); //dir resource handle deleted --EXPECTF-- *** Testing end() on different arrays *** -- Iteration 1 -- diff --git a/ext/standard/tests/streams/proc_open_bug60120.phpt b/ext/standard/tests/streams/proc_open_bug60120.phpt index 9cce5a4c94f1a..4e5190c861f30 100644 --- a/ext/standard/tests/streams/proc_open_bug60120.phpt +++ b/ext/standard/tests/streams/proc_open_bug60120.phpt @@ -88,10 +88,13 @@ var_dump( fclose($pipes[1]); fclose($pipes[2]); ?> +--CLEAN-- + --EXPECTF-- string(10000) "%s" string(10000) "%s" string(0) "" string(0) "" ---CLEAN-- -unlink($file); From 8e411fe54ed27c2601133ebc798bed634f556b00 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 29 Apr 2020 09:49:01 +0200 Subject: [PATCH 311/338] Revert "Merge branch 'sse2_strtolower' of https://github.com/laruence/php-src" This reverts commit 5a6373f904c6497551cd53baf323ddb854a553e1, reversing changes made to 45cb42166d4a53fe0154be08097f112d6ec72a27. This breaks strtolower-win32.phpt. --- ext/standard/string.c | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/ext/standard/string.c b/ext/standard/string.c index e8fe75cad176f..c06de62a80a52 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1462,33 +1462,29 @@ PHPAPI zend_string *php_string_tolower(zend_string *s) unsigned char *c; const unsigned char *e; - if (EXPECTED(!BG(locale_changed))) { - return zend_string_tolower(s); - } else { - c = (unsigned char *)ZSTR_VAL(s); - e = c + ZSTR_LEN(s); + c = (unsigned char *)ZSTR_VAL(s); + e = c + ZSTR_LEN(s); - while (c < e) { - if (isupper(*c)) { - register unsigned char *r; - zend_string *res = zend_string_alloc(ZSTR_LEN(s), 0); + while (c < e) { + if (isupper(*c)) { + register unsigned char *r; + zend_string *res = zend_string_alloc(ZSTR_LEN(s), 0); - if (c != (unsigned char*)ZSTR_VAL(s)) { - memcpy(ZSTR_VAL(res), ZSTR_VAL(s), c - (unsigned char*)ZSTR_VAL(s)); - } - r = c + (ZSTR_VAL(res) - ZSTR_VAL(s)); - while (c < e) { - *r = tolower(*c); - r++; - c++; - } - *r = '\0'; - return res; + if (c != (unsigned char*)ZSTR_VAL(s)) { + memcpy(ZSTR_VAL(res), ZSTR_VAL(s), c - (unsigned char*)ZSTR_VAL(s)); } - c++; + r = c + (ZSTR_VAL(res) - ZSTR_VAL(s)); + while (c < e) { + *r = tolower(*c); + r++; + c++; + } + *r = '\0'; + return res; } - return zend_string_copy(s); + c++; } + return zend_string_copy(s); } /* }}} */ From b1b98e08d0ad4bbbb213c002188ffa47075a8b0d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 29 Apr 2020 10:12:53 +0200 Subject: [PATCH 312/338] Make 045.phpt busy wait The timeout is only real-time based on Windows. Make this use a busy wait loop instead. If hard_timeout is broken, this will fail with a run-tests enforced timeout instead. --- tests/lang/045.phpt | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/lang/045.phpt b/tests/lang/045.phpt index 44fb80141003b..e5299ae2221cb 100644 --- a/tests/lang/045.phpt +++ b/tests/lang/045.phpt @@ -13,13 +13,7 @@ set_time_limit(1); register_shutdown_function("plop"); function plop() { - $ts = time(); - while(true) { - if ((time()-$ts) > 2) { - echo "Failed!"; - break; - } - } + while (true); } plop(); ?> From dad51108600c6c5d1d19c7dfd55e5198258236d9 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 29 Apr 2020 10:22:05 +0200 Subject: [PATCH 313/338] Remove dead code As pointed out by Girgias, index is always non-NULL here. --- ext/standard/array.c | 80 +++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 42 deletions(-) diff --git a/ext/standard/array.c b/ext/standard/array.c index d86177b5f9068..09756b74e5b44 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -4199,50 +4199,46 @@ PHP_FUNCTION(array_column) /* Failure will leave keyval alone which will land us on the final else block below * which is to append the value as next_index */ - if (index) { - zval rv; - zval *keyval = array_column_fetch_prop(data, index, &rv); - - if (keyval) { - switch (Z_TYPE_P(keyval)) { - case IS_STRING: - zend_symtable_update(Z_ARRVAL_P(return_value), Z_STR_P(keyval), colval); - break; - case IS_LONG: - zend_hash_index_update(Z_ARRVAL_P(return_value), Z_LVAL_P(keyval), colval); - break; - case IS_OBJECT: - { - zend_string *tmp_key; - zend_string *key = zval_get_tmp_string(keyval, &tmp_key); - zend_symtable_update(Z_ARRVAL_P(return_value), key, colval); - zend_tmp_string_release(tmp_key); - break; - } - case IS_NULL: - zend_hash_update(Z_ARRVAL_P(return_value), ZSTR_EMPTY_ALLOC(), colval); - break; - case IS_DOUBLE: - zend_hash_index_update(Z_ARRVAL_P(return_value), - zend_dval_to_lval(Z_DVAL_P(keyval)), colval); - break; - case IS_TRUE: - zend_hash_index_update(Z_ARRVAL_P(return_value), 1, colval); - break; - case IS_FALSE: - zend_hash_index_update(Z_ARRVAL_P(return_value), 0, colval); - break; - case IS_RESOURCE: - zend_hash_index_update(Z_ARRVAL_P(return_value), Z_RES_HANDLE_P(keyval), colval); - break; - default: - zend_hash_next_index_insert(Z_ARRVAL_P(return_value), colval); + zval rv; + zval *keyval = array_column_fetch_prop(data, index, &rv); + + if (keyval) { + switch (Z_TYPE_P(keyval)) { + case IS_STRING: + zend_symtable_update(Z_ARRVAL_P(return_value), Z_STR_P(keyval), colval); + break; + case IS_LONG: + zend_hash_index_update(Z_ARRVAL_P(return_value), Z_LVAL_P(keyval), colval); + break; + case IS_OBJECT: + { + zend_string *tmp_key; + zend_string *key = zval_get_tmp_string(keyval, &tmp_key); + zend_symtable_update(Z_ARRVAL_P(return_value), key, colval); + zend_tmp_string_release(tmp_key); break; - } - zval_ptr_dtor(keyval); - } else { - zend_hash_next_index_insert(Z_ARRVAL_P(return_value), colval); + } + case IS_NULL: + zend_hash_update(Z_ARRVAL_P(return_value), ZSTR_EMPTY_ALLOC(), colval); + break; + case IS_DOUBLE: + zend_hash_index_update(Z_ARRVAL_P(return_value), + zend_dval_to_lval(Z_DVAL_P(keyval)), colval); + break; + case IS_TRUE: + zend_hash_index_update(Z_ARRVAL_P(return_value), 1, colval); + break; + case IS_FALSE: + zend_hash_index_update(Z_ARRVAL_P(return_value), 0, colval); + break; + case IS_RESOURCE: + zend_hash_index_update(Z_ARRVAL_P(return_value), Z_RES_HANDLE_P(keyval), colval); + break; + default: + zend_hash_next_index_insert(Z_ARRVAL_P(return_value), colval); + break; } + zval_ptr_dtor(keyval); } else { zend_hash_next_index_insert(Z_ARRVAL_P(return_value), colval); } From 533669f7c437e564a56fc559dbd375ac1fdc815e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 29 Apr 2020 10:27:20 +0200 Subject: [PATCH 314/338] Remove redundant addref+dtor --- Zend/zend_API.c | 2 +- ext/spl/spl_iterators.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 4aa76ca111036..37c8820164a5c 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -1578,7 +1578,7 @@ ZEND_API int array_set_zval_key(HashTable *ht, zval *key, zval *value) /* {{{ */ result = zend_symtable_update(ht, Z_STR_P(key), value); break; case IS_NULL: - result = zend_symtable_update(ht, ZSTR_EMPTY_ALLOC(), value); + result = zend_hash_update(ht, ZSTR_EMPTY_ALLOC(), value); break; case IS_RESOURCE: zend_error(E_WARNING, "Resource ID#%d used as offset, casting to integer (%d)", Z_RES_HANDLE_P(key), Z_RES_HANDLE_P(key)); diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c index 8c59eb38da1ef..a6ccc855c0ef9 100644 --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@ -2360,9 +2360,7 @@ static inline void spl_caching_it_next(spl_dual_it_object *intern) zval *data = &intern->current.data; ZVAL_DEREF(data); - Z_TRY_ADDREF_P(data); array_set_zval_key(Z_ARRVAL(intern->u.caching.zcache), key, data); - zval_ptr_dtor(data); } /* Recursion ? */ if (intern->dit_type == DIT_RecursiveCachingIterator) { From 67f9b0b754654e76ef8d5b5539fb520541092950 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 28 Apr 2020 18:33:19 +0200 Subject: [PATCH 315/338] Fix #79532: sizeof off_t can be wrong We have to actually determine the proper `SIZEOF_OFF_T`. Interestingly, it is `4` on Windows x64. We also have to prevent the redefinition in pg_config.h. The clean solution would likely be to not include pg_config.h at all, but that's out of scope for BC reasons for now. --- NEWS | 4 ++++ build/php.m4 | 1 + ext/ffi/tests/bug79532.phpt | 38 ++++++++++++++++++++++++++++++++++++ ext/pdo_pgsql/pdo_pgsql.c | 1 + ext/pdo_pgsql/pgsql_driver.c | 1 + ext/pgsql/php_pgsql.h | 1 + ext/zend_test/php_test.h | 1 + ext/zend_test/test.c | 8 ++++++++ win32/build/config.w32.h.in | 1 + 9 files changed, 56 insertions(+) create mode 100644 ext/ffi/tests/bug79532.phpt diff --git a/NEWS b/NEWS index ba008a7ba7f7c..f1312256756df 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| +?? ??? ????, PHP 7.4.7 + +- FFI: + . Fixed bug #79532 (sizeof off_t can be wrong). (cmb) ?? ??? ????, PHP 7.4.6 diff --git a/build/php.m4 b/build/php.m4 index 7392876478cd8..51fa37446a509 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -2416,6 +2416,7 @@ AC_DEFUN([PHP_CHECK_STDINT_TYPES], [ AC_CHECK_SIZEOF([long]) AC_CHECK_SIZEOF([long long]) AC_CHECK_SIZEOF([size_t]) + AC_CHECK_SIZEOF([off_t]) AC_CHECK_TYPES([int8, int16, int32, int64, int8_t, int16_t, int32_t, int64_t, uint8, uint16, uint32, uint64, uint8_t, uint16_t, uint32_t, uint64_t, u_int8_t, u_int16_t, u_int32_t, u_int64_t], [], [], [ #if HAVE_STDINT_H # include diff --git a/ext/ffi/tests/bug79532.phpt b/ext/ffi/tests/bug79532.phpt new file mode 100644 index 0000000000000..b6887dc7cb282 --- /dev/null +++ b/ext/ffi/tests/bug79532.phpt @@ -0,0 +1,38 @@ +--TEST-- +Bug #79532 (sizeof off_t can be wrong) +--SKIPIF-- + +--FILE-- +bug79532($array, 3); +var_dump($array); +?> +--EXPECTF-- +object(FFI\CData:int%d_t[3])#%d (3) { + [0]=> + int(0) + [1]=> + int(1) + [2]=> + int(2) +} diff --git a/ext/pdo_pgsql/pdo_pgsql.c b/ext/pdo_pgsql/pdo_pgsql.c index 8d60fe420b0b0..8d4158198dfbe 100644 --- a/ext/pdo_pgsql/pdo_pgsql.c +++ b/ext/pdo_pgsql/pdo_pgsql.c @@ -29,6 +29,7 @@ #include "php_pdo_pgsql_int.h" #ifdef HAVE_PG_CONFIG_H +#undef SIZEOF_OFF_T #include #endif diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c index b6f008071c628..403bfd611ae1e 100644 --- a/ext/pdo_pgsql/pgsql_driver.c +++ b/ext/pdo_pgsql/pgsql_driver.c @@ -31,6 +31,7 @@ #include "pdo/php_pdo_driver.h" #include "pdo/php_pdo_error.h" #include "ext/standard/file.h" +#undef SIZEOF_OFF_T #include "pg_config.h" /* needed for PG_VERSION */ #include "php_pdo_pgsql.h" #include "php_pdo_pgsql_int.h" diff --git a/ext/pgsql/php_pgsql.h b/ext/pgsql/php_pgsql.h index cecd2cc95b33e..a6c884d912b7c 100644 --- a/ext/pgsql/php_pgsql.h +++ b/ext/pgsql/php_pgsql.h @@ -51,6 +51,7 @@ extern zend_module_entry pgsql_module_entry; #endif #ifdef HAVE_PG_CONFIG_H +#undef SIZEOF_OFF_T #include #endif diff --git a/ext/zend_test/php_test.h b/ext/zend_test/php_test.h index 325484c434805..da57f7efc9a0e 100644 --- a/ext/zend_test/php_test.h +++ b/ext/zend_test/php_test.h @@ -38,5 +38,6 @@ struct bug79096 { }; ZEND_API struct bug79096 bug79096(void); +ZEND_API void bug79532(off_t *array, size_t elems); #endif diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c index b097a2412b9f5..dfae54e880d6c 100644 --- a/ext/zend_test/test.c +++ b/ext/zend_test/test.c @@ -328,3 +328,11 @@ struct bug79096 bug79096(void) b.b = 1; return b; } + +void bug79532(off_t *array, size_t elems) +{ + int i; + for (i = 0; i < elems; i++) { + array[i] = i; + } +} diff --git a/win32/build/config.w32.h.in b/win32/build/config.w32.h.in index 864bc882ff612..36a45fb76c186 100644 --- a/win32/build/config.w32.h.in +++ b/win32/build/config.w32.h.in @@ -101,6 +101,7 @@ # define SIZEOF_SIZE_T 4 # define SIZEOF_PTRDIFF_T 4 #endif +#define SIZEOF_OFF_T 4 #define HAVE_FNMATCH #define HAVE_GLOB #define PHP_SHLIB_SUFFIX "dll" From 17d763ff478871f867de945c959c9249b212a799 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 29 Apr 2020 10:57:27 +0200 Subject: [PATCH 316/338] JIT: Save opline before calling zend_timeout tests/045.phpt started segfaulting, because the opline is not set when zend_timeout is invoked. --- ext/opcache/jit/zend_jit_x86.dasc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index aac0e44f3c0bf..205c6dc38a6f6 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -1606,6 +1606,7 @@ static inline zend_bool is_signed(double d) static int zend_jit_interrupt_handler_stub(dasm_State **Dst) { |->interrupt_handler: + | SAVE_OPLINE | //EG(vm_interrupt) = 0; | MEM_OP2_1_ZTS mov, byte, executor_globals, vm_interrupt, 0, r0 | //if (EG(timed_out)) { @@ -1617,7 +1618,6 @@ static int zend_jit_interrupt_handler_stub(dasm_State **Dst) |1: | //} else if (zend_interrupt_function) { if (zend_interrupt_function) { - | SAVE_OPLINE | //zend_interrupt_function(execute_data); |.if X64 | mov CARG1, FP From faa57abe7123922dd65ec0583c1d2141db9b001f Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 29 Apr 2020 13:29:01 +0300 Subject: [PATCH 317/338] white space fixes --- ext/opcache/jit/zend_elf.c | 2 +- ext/opcache/jit/zend_jit.c | 18 +- ext/opcache/jit/zend_jit.h | 4 +- ext/opcache/jit/zend_jit_disasm_x86.c | 2 +- ext/opcache/jit/zend_jit_gdb.c | 68 +++--- ext/opcache/jit/zend_jit_perf_dump.c | 18 +- ext/opcache/jit/zend_jit_trace.c | 10 +- ext/opcache/jit/zend_jit_vm_helpers.c | 2 +- ext/opcache/jit/zend_jit_x86.dasc | 336 +++++++++++++------------- ext/opcache/jit/zend_jit_x86.h | 16 +- 10 files changed, 238 insertions(+), 238 deletions(-) diff --git a/ext/opcache/jit/zend_elf.c b/ext/opcache/jit/zend_elf.c index f5180e0a96ab6..7db7957befdee 100644 --- a/ext/opcache/jit/zend_elf.c +++ b/ext/opcache/jit/zend_elf.c @@ -58,7 +58,7 @@ void zend_elf_load_symbols(void) size_t pathlen = sizeof(path); int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1}; if (sysctl(mib, 4, path, &pathlen, NULL, 0) == -1) { - return; + return; } int fd = open(path, O_RDONLY); #else diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index 267b2edb33c52..d357f72a2e769 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -70,7 +70,7 @@ zend_jit_globals jit_globals; } \ } while(0) -#define DASM_M_FREE(ctx, p, sz) efree(p) +#define DASM_M_FREE(ctx, p, sz) efree(p) #include "dynasm/dasm_proto.h" @@ -254,7 +254,7 @@ static void *dasm_link_and_encode(dasm_State **dasm_state, zend_string *str = NULL; #endif - if (rt_opline && ssa && ssa->cfg.map) { + if (rt_opline && ssa && ssa->cfg.map) { /* Create additional entry point, to switch from interpreter to JIT-ed * code at run-time. */ @@ -291,7 +291,7 @@ static void *dasm_link_and_encode(dasm_State **dasm_state, } zend_jit_jmp(dasm_state, b); } - } + } if (dasm_link(dasm_state, &size) != DASM_S_OK) { // TODO: dasm_link() failed ??? @@ -347,7 +347,7 @@ static void *dasm_link_and_encode(dasm_State **dasm_state, } #if defined(HAVE_DISASM) || defined(HAVE_GDB) || defined(HAVE_OPROFILE) || defined(HAVE_PERFTOOLS) || defined(HAVE_VTUNE) - if (!name) { + if (!name) { if (ZCG(accel_directives).jit_debug & (ZEND_JIT_DEBUG_ASM|ZEND_JIT_DEBUG_GDB|ZEND_JIT_DEBUG_OPROFILE|ZEND_JIT_DEBUG_PERF|ZEND_JIT_DEBUG_VTUNE|ZEND_JIT_DEBUG_PERF_DUMP)) { str = zend_jit_func_name(op_array); if (str) { @@ -1513,13 +1513,13 @@ static int zend_jit_try_allocate_free_reg(const zend_op_array *op_array, const z } #endif - if (hint != ZREG_NONE && freeUntilPos[hint] > zend_interval_end(current)) { + if (hint != ZREG_NONE && freeUntilPos[hint] > zend_interval_end(current)) { current->reg = hint; if (current->used_as_hint) { ZEND_REGSET_INCL(*hints, hint); } return 1; - } + } if (ZEND_REGSET_IS_EMPTY(available)) { return 0; @@ -3031,9 +3031,9 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op return SUCCESS; jit_failure: - if (dasm_state) { + if (dasm_state) { dasm_free(&dasm_state); - } + } if (zend_jit_reg_alloc) { zend_arena_release(&CG(arena), checkpoint); } @@ -3063,7 +3063,7 @@ static int zend_real_jit_func(zend_op_array *op_array, zend_script *script, cons checkpoint = zend_arena_checkpoint(CG(arena)); - /* Build SSA */ + /* Build SSA */ memset(&ssa, 0, sizeof(zend_ssa)); if (zend_jit_op_array_analyze1(op_array, script, &ssa) != SUCCESS) { diff --git a/ext/opcache/jit/zend_jit.h b/ext/opcache/jit/zend_jit.h index cecd263eb8ad7..3f8196b309836 100644 --- a/ext/opcache/jit/zend_jit.h +++ b/ext/opcache/jit/zend_jit.h @@ -118,8 +118,8 @@ struct _zend_lifetime_interval { struct { ZEND_ENDIAN_LOHI_3( int8_t reg, - uint8_t flags, - uint16_t reserved + uint8_t flags, + uint16_t reserved )}; uint32_t reg_flags; }; diff --git a/ext/opcache/jit/zend_jit_disasm_x86.c b/ext/opcache/jit/zend_jit_disasm_x86.c index 2ff7b960fdfbe..a847716ace222 100644 --- a/ext/opcache/jit/zend_jit_disasm_x86.c +++ b/ext/opcache/jit/zend_jit_disasm_x86.c @@ -390,7 +390,7 @@ static int zend_jit_disasm_init(void) #undef REGISTER_EG #endif - /* Register JIT helper functions */ + /* Register JIT helper functions */ #define REGISTER_HELPER(n) \ zend_jit_disasm_add_symbol(#n, \ (uint64_t)(uintptr_t)n, sizeof(void*)); diff --git a/ext/opcache/jit/zend_jit_gdb.c b/ext/opcache/jit/zend_jit_gdb.c index 58b075ea8cfd4..2db7246372b48 100644 --- a/ext/opcache/jit/zend_jit_gdb.c +++ b/ext/opcache/jit/zend_jit_gdb.c @@ -92,7 +92,7 @@ enum { DW_REG_8, DW_REG_9, DW_REG_10, DW_REG_11, DW_REG_12, DW_REG_13, DW_REG_14, DW_REG_15, DW_REG_RA, - /* TODO: ARM supports? */ + /* TODO: ARM supports? */ #else #error "Unsupported target architecture" #endif @@ -290,48 +290,48 @@ static void zend_gdbjit_symtab(zend_gdbjit_ctx *ctx) #define DSTR(str) (ctx->p = p, zend_gdbjit_strz(ctx, (str)), p = ctx->p) #define DALIGNNOP(s) while ((uintptr_t)p & ((s)-1)) *p++ = DW_CFA_nop #define DSECT(name, stmt) \ - { uint32_t *szp_##name = (uint32_t *)p; p += 4; stmt \ - *szp_##name = (uint32_t)((p-(uint8_t *)szp_##name)-4); } + { uint32_t *szp_##name = (uint32_t *)p; p += 4; stmt \ + *szp_##name = (uint32_t)((p-(uint8_t *)szp_##name)-4); } static void zend_gdbjit_ehframe(zend_gdbjit_ctx *ctx) { - uint8_t *p = ctx->p; - uint8_t *framep = p; - - /* DWARF EH CIE (Common Information Entry) */ - DSECT(CIE, - DU32(0); /* CIE ID. */ - DB(DW_CIE_VERSION); /* Version */ - DSTR("zR"); /* Augmentation String. */ - DUV(1); /* Code alignment factor. */ - DSV(-(int32_t)sizeof(uintptr_t)); /* Data alignment factor. */ - DB(DW_REG_RA); /* Return address register. */ - DB(1); DB(DW_EH_PE_textrel|DW_EH_PE_udata4); /* Augmentation data. */ - DB(DW_CFA_def_cfa); DUV(DW_REG_SP); DUV(sizeof(uintptr_t)); - DB(DW_CFA_offset|DW_REG_RA); DUV(1); - DALIGNNOP(sizeof(uintptr_t)); - ) - - /* DWARF EH FDE (Frame Description Entry). */ - DSECT(FDE, - DU32((uint32_t)(p-framep)); /* Offset to CIE Pointer. */ - DU32(0); /* Machine code offset relative to .text. */ - DU32(ctx->szmcode); /* Machine code length. */ - DB(0); /* Augmentation data. */ - DB(DW_CFA_def_cfa_offset); DUV(sizeof(uintptr_t)); + uint8_t *p = ctx->p; + uint8_t *framep = p; + + /* DWARF EH CIE (Common Information Entry) */ + DSECT(CIE, + DU32(0); /* CIE ID. */ + DB(DW_CIE_VERSION); /* Version */ + DSTR("zR"); /* Augmentation String. */ + DUV(1); /* Code alignment factor. */ + DSV(-(int32_t)sizeof(uintptr_t)); /* Data alignment factor. */ + DB(DW_REG_RA); /* Return address register. */ + DB(1); DB(DW_EH_PE_textrel|DW_EH_PE_udata4); /* Augmentation data. */ + DB(DW_CFA_def_cfa); DUV(DW_REG_SP); DUV(sizeof(uintptr_t)); + DB(DW_CFA_offset|DW_REG_RA); DUV(1); + DALIGNNOP(sizeof(uintptr_t)); + ) + + /* DWARF EH FDE (Frame Description Entry). */ + DSECT(FDE, + DU32((uint32_t)(p-framep)); /* Offset to CIE Pointer. */ + DU32(0); /* Machine code offset relative to .text. */ + DU32(ctx->szmcode); /* Machine code length. */ + DB(0); /* Augmentation data. */ + DB(DW_CFA_def_cfa_offset); DUV(sizeof(uintptr_t)); #if defined(__i386__) - DB(DW_CFA_advance_loc|3); /* sub $0xc,%esp */ - DB(DW_CFA_def_cfa_offset); DUV(16); /* Aligned stack frame size. */ + DB(DW_CFA_advance_loc|3); /* sub $0xc,%esp */ + DB(DW_CFA_def_cfa_offset); DUV(16); /* Aligned stack frame size. */ #elif defined(__x86_64__) - DB(DW_CFA_advance_loc|4); /* sub $0x8,%rsp */ - DB(DW_CFA_def_cfa_offset); DUV(16); /* Aligned stack frame size. */ + DB(DW_CFA_advance_loc|4); /* sub $0x8,%rsp */ + DB(DW_CFA_def_cfa_offset); DUV(16); /* Aligned stack frame size. */ #else # error "Unsupported target architecture" #endif - DALIGNNOP(sizeof(uintptr_t)); - ) + DALIGNNOP(sizeof(uintptr_t)); + ) - ctx->p = p; + ctx->p = p; } static void zend_gdbjit_debuginfo(zend_gdbjit_ctx *ctx) diff --git a/ext/opcache/jit/zend_jit_perf_dump.c b/ext/opcache/jit/zend_jit_perf_dump.c index 94b1e4b859c24..5ee7f36ef914d 100644 --- a/ext/opcache/jit/zend_jit_perf_dump.c +++ b/ext/opcache/jit/zend_jit_perf_dump.c @@ -63,14 +63,14 @@ #define PADDING8(size) (ALIGN8(size) - (size)) typedef struct zend_perf_jitdump_header { - uint32_t magic; - uint32_t version; - uint32_t size; - uint32_t elf_mach_target; - uint32_t reserved; - uint32_t process_id; - uint64_t time_stamp; - uint64_t flags; + uint32_t magic; + uint32_t version; + uint32_t size; + uint32_t elf_mach_target; + uint32_t reserved; + uint32_t process_id; + uint64_t time_stamp; + uint64_t flags; } zend_perf_jitdump_header; typedef struct _zend_perf_jitdump_record { @@ -123,7 +123,7 @@ static void zend_jit_perf_jitdump_open(void) size_t pathlen = sizeof(path); int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1}; if (sysctl(mib, 4, path, &pathlen, NULL, 0) == -1) { - return; + return; } fd = open(path, O_RDONLY); #else diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 42df977078de3..7efe94517f888 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -83,7 +83,7 @@ static const void *zend_jit_trace_allocate_exit_group(uint32_t n) dasm_free(&dasm_state); #ifdef HAVE_DISASM - if (ZCG(accel_directives).jit_debug & ZEND_JIT_DEBUG_ASM) { + if (ZCG(accel_directives).jit_debug & ZEND_JIT_DEBUG_ASM) { uint32_t i; for (i = 0; i < ZEND_JIT_EXIT_POINTS_PER_GROUP; i++) { @@ -112,7 +112,7 @@ static const void *zend_jit_trace_allocate_exit_point(uint32_t n) group; ZEND_JIT_EXIT_NUM += ZEND_JIT_EXIT_POINTS_PER_GROUP; } while (n >= ZEND_JIT_EXIT_NUM); - return (const void*) + return (const void*) ((const char*)group + ((n % ZEND_JIT_EXIT_POINTS_PER_GROUP) * ZEND_JIT_EXIT_POINTS_SPACING)); } @@ -122,7 +122,7 @@ static const void *zend_jit_trace_get_exit_addr(uint32_t n) if (UNEXPECTED(n >= ZEND_JIT_EXIT_NUM)) { return zend_jit_trace_allocate_exit_point(n); } - return (const void*) + return (const void*) ((const char*)zend_jit_exit_groups[n / ZEND_JIT_EXIT_POINTS_PER_GROUP] + ((n % ZEND_JIT_EXIT_POINTS_PER_GROUP) * ZEND_JIT_EXIT_POINTS_SPACING)); } @@ -1802,7 +1802,7 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace zend_jit_trace_stack *stack; uint32_t parent_vars_count = parent_trace ? zend_jit_traces[parent_trace].exit_info[exit_num].stack_size : 0; - zend_jit_trace_stack *parent_stack = parent_trace ? + zend_jit_trace_stack *parent_stack = parent_trace ? zend_jit_traces[parent_trace].stack_map + zend_jit_traces[parent_trace].exit_info[exit_num].stack_offset : NULL; ALLOCA_FLAG(use_heap); @@ -2620,7 +2620,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par uint32_t exit_point = zend_jit_trace_get_exit_point(NULL, NULL, NULL); exit_addr = zend_jit_trace_get_exit_addr(exit_point); - if (!exit_addr) { + if (!exit_addr) { goto jit_failure; } } diff --git a/ext/opcache/jit/zend_jit_vm_helpers.c b/ext/opcache/jit/zend_jit_vm_helpers.c index 450fa6055d568..b2faaeb1a09c0 100644 --- a/ext/opcache/jit/zend_jit_vm_helpers.c +++ b/ext/opcache/jit/zend_jit_vm_helpers.c @@ -600,7 +600,7 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, ce1 = ce2 = NULL; op1_type = op2_type = op3_type = IS_UNKNOWN; if ((opline->op1_type & (IS_TMP_VAR|IS_VAR|IS_CV)) - && (opline->opcode != ZEND_ROPE_ADD && opline->opcode != ZEND_ROPE_END)) { + && (opline->opcode != ZEND_ROPE_ADD && opline->opcode != ZEND_ROPE_END)) { zval *zv = EX_VAR(opline->op1.var); op1_type = Z_TYPE_P(zv); if (op1_type == IS_INDIRECT) { diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 205c6dc38a6f6..60992a212828e 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -280,7 +280,7 @@ static void* dasm_labels[zend_lb_MAX]; | jmp aword [IP] || } else { | mov r0, aword EX:FCARG1a->opline -| jmp aword [r0] +| jmp aword [r0] || } |.endmacro @@ -298,7 +298,7 @@ static void* dasm_labels[zend_lb_MAX]; |.endmacro |.macro ADDR_OP1, addr_ins, addr, tmp_reg -| .if X64 +| .if X64 || if (IS_32BIT(addr)) { | addr_ins ((ptrdiff_t)addr) || } else { @@ -306,12 +306,12 @@ static void* dasm_labels[zend_lb_MAX]; | addr_ins tmp_reg || } | .else -| addr_ins ((ptrdiff_t)addr) -| .endif +| addr_ins ((ptrdiff_t)addr) +| .endif |.endmacro |.macro ADDR_OP2_2, addr_ins, op1, addr, tmp_reg -| .if X64 +| .if X64 || if (IS_32BIT(addr)) { | addr_ins op1, ((ptrdiff_t)addr) || } else { @@ -319,8 +319,8 @@ static void* dasm_labels[zend_lb_MAX]; | addr_ins op1, tmp_reg || } | .else -| addr_ins op1, ((ptrdiff_t)addr) -| .endif +| addr_ins op1, ((ptrdiff_t)addr) +| .endif |.endmacro |.macro PUSH_ADDR, addr, tmp_reg @@ -341,7 +341,7 @@ static void* dasm_labels[zend_lb_MAX]; | .if X64 || if (IS_32BIT(addr)) { | mem_ins prefix [addr] -|| } else { +|| } else { | mov64 tmp_reg, ((ptrdiff_t)addr) | mem_ins prefix [tmp_reg] || } @@ -351,7 +351,7 @@ static void* dasm_labels[zend_lb_MAX]; |.endmacro |.macro MEM_OP2_1, mem_ins, prefix, addr, op2, tmp_reg -| .if X64 +| .if X64 || if (IS_32BIT(addr)) { | mem_ins prefix [addr], op2 || } else { @@ -359,12 +359,12 @@ static void* dasm_labels[zend_lb_MAX]; | mem_ins prefix [tmp_reg], op2 || } | .else -| mem_ins prefix [addr], op2 -| .endif +| mem_ins prefix [addr], op2 +| .endif |.endmacro |.macro MEM_OP2_2, mem_ins, op1, prefix, addr, tmp_reg -| .if X64 +| .if X64 || if (IS_32BIT(addr)) { | mem_ins op1, prefix [addr] || } else { @@ -372,17 +372,17 @@ static void* dasm_labels[zend_lb_MAX]; | mem_ins op1, prefix [tmp_reg] || } | .else -| mem_ins op1, prefix [addr] -| .endif +| mem_ins op1, prefix [addr] +| .endif |.endmacro |.macro MEM_OP2_1_ZTS, mem_ins, prefix, struct, field, op2, tmp_reg | .if ZTS | LOAD_TSRM_CACHE tmp_reg -| mem_ins prefix [tmp_reg + (struct.._offset + offsetof(zend_..struct, field))], op2 +| mem_ins prefix [tmp_reg + (struct.._offset + offsetof(zend_..struct, field))], op2 | .else | MEM_OP2_1 mem_ins, prefix, &struct.field, op2, tmp_reg -| .endif +| .endif |.endmacro |.macro MEM_OP2_2_ZTS, mem_ins, op1, prefix, struct, field, tmp_reg @@ -391,11 +391,11 @@ static void* dasm_labels[zend_lb_MAX]; | mem_ins op1, prefix [tmp_reg + (struct.._offset + offsetof(zend_..struct, field))] | .else | MEM_OP2_2 mem_ins, op1, prefix, &struct.field, tmp_reg -| .endif +| .endif |.endmacro |.macro MEM_OP3_3, mem_ins, op1, op2, prefix, addr, tmp_reg -| .if X64 +| .if X64 || if (IS_32BIT(addr)) { | mem_ins op1, op2, prefix [addr] || } else { @@ -403,8 +403,8 @@ static void* dasm_labels[zend_lb_MAX]; | mem_ins op1, op2, prefix [tmp_reg] || } | .else -| mem_ins op1, op2, prefix [addr] -| .endif +| mem_ins op1, op2, prefix [addr] +| .endif |.endmacro |.macro LOAD_BASE_ADDR, reg, base, offset @@ -454,7 +454,7 @@ static void* dasm_labels[zend_lb_MAX]; || if (Z_MODE(addr) == IS_CONST_ZVAL) { | LOAD_ADDR reg, Z_ZV(addr) || } else if (Z_MODE(addr) == IS_MEM_ZVAL) { -| LOAD_BASE_ADDR reg, Z_REG(addr), Z_OFFSET(addr) +| LOAD_BASE_ADDR reg, Z_REG(addr), Z_OFFSET(addr) || } else { || ZEND_ASSERT(0); || } @@ -464,7 +464,7 @@ static void* dasm_labels[zend_lb_MAX]; || if (Z_MODE(addr) == IS_CONST_ZVAL) { | PUSH_ADDR Z_ZV(addr), tmp_reg || } else if (Z_MODE(addr) == IS_MEM_ZVAL) { -| PUSH_BASE_ADDR Z_REG(addr), Z_OFFSET(addr), tmp_reg +| PUSH_BASE_ADDR Z_REG(addr), Z_OFFSET(addr), tmp_reg || } else { || ZEND_ASSERT(0); || } @@ -538,9 +538,9 @@ static void* dasm_labels[zend_lb_MAX]; || if (Z_MODE(addr) == IS_CONST_ZVAL) { | MEM_OP2_2 sse_ins, xmm(reg-ZREG_XMM0), qword, Z_ZV(addr), r0 || } else if (Z_MODE(addr) == IS_MEM_ZVAL) { -| sse_ins xmm(reg-ZREG_XMM0), qword [Ra(Z_REG(addr))+Z_OFFSET(addr)] +| sse_ins xmm(reg-ZREG_XMM0), qword [Ra(Z_REG(addr))+Z_OFFSET(addr)] || } else if (Z_MODE(addr) == IS_REG) { -| sse_ins xmm(reg-ZREG_XMM0), xmm(Z_REG(addr)-ZREG_XMM0) +| sse_ins xmm(reg-ZREG_XMM0), xmm(Z_REG(addr)-ZREG_XMM0) || } else { || ZEND_ASSERT(0); || } @@ -548,20 +548,20 @@ static void* dasm_labels[zend_lb_MAX]; |.macro SSE_AVX_OP, sse_ins, avx_ins, reg, addr || if (Z_MODE(addr) == IS_CONST_ZVAL) { -| .if X64 +| .if X64 || if (IS_32BIT(Z_ZV(addr))) { -| SSE_AVX_INS sse_ins, avx_ins, xmm(reg-ZREG_XMM0), qword [Z_ZV(addr)] +| SSE_AVX_INS sse_ins, avx_ins, xmm(reg-ZREG_XMM0), qword [Z_ZV(addr)] || } else { -| LOAD_ADDR r0, Z_ZV(addr) -| SSE_AVX_INS sse_ins, avx_ins, xmm(reg-ZREG_XMM0), qword [r0] +| LOAD_ADDR r0, Z_ZV(addr) +| SSE_AVX_INS sse_ins, avx_ins, xmm(reg-ZREG_XMM0), qword [r0] || } -| .else -| SSE_AVX_INS sse_ins, avx_ins, xmm(reg-ZREG_XMM0), qword [Z_ZV(addr)] -| .endif +| .else +| SSE_AVX_INS sse_ins, avx_ins, xmm(reg-ZREG_XMM0), qword [Z_ZV(addr)] +| .endif || } else if (Z_MODE(addr) == IS_MEM_ZVAL) { -| SSE_AVX_INS sse_ins, avx_ins, xmm(reg-ZREG_XMM0), qword [Ra(Z_REG(addr))+Z_OFFSET(addr)] +| SSE_AVX_INS sse_ins, avx_ins, xmm(reg-ZREG_XMM0), qword [Ra(Z_REG(addr))+Z_OFFSET(addr)] || } else if (Z_MODE(addr) == IS_REG) { -| SSE_AVX_INS sse_ins, avx_ins, xmm(reg-ZREG_XMM0), xmm(Z_REG(addr)-ZREG_XMM0) +| SSE_AVX_INS sse_ins, avx_ins, xmm(reg-ZREG_XMM0), xmm(Z_REG(addr)-ZREG_XMM0) || } else { || ZEND_ASSERT(0); || } @@ -615,20 +615,20 @@ static void* dasm_labels[zend_lb_MAX]; |.macro SSE_GET_ZVAL_DVAL, reg, addr || if (Z_MODE(addr) != IS_REG || reg != Z_REG(addr)) { || if (Z_MODE(addr) == IS_CONST_ZVAL) { -| .if X64 +| .if X64 || if (IS_32BIT(Z_ZV(addr))) { -| SSE_AVX_INS movsd, vmovsd, xmm(reg-ZREG_XMM0), qword [Z_ZV(addr)] +| SSE_AVX_INS movsd, vmovsd, xmm(reg-ZREG_XMM0), qword [Z_ZV(addr)] || } else { -| LOAD_ADDR r0, Z_ZV(addr) -| SSE_AVX_INS movsd, vmovsd, xmm(reg-ZREG_XMM0), qword [r0] +| LOAD_ADDR r0, Z_ZV(addr) +| SSE_AVX_INS movsd, vmovsd, xmm(reg-ZREG_XMM0), qword [r0] || } -| .else -| SSE_AVX_INS movsd, vmovsd, xmm(reg-ZREG_XMM0), qword [Z_ZV(addr)] -| .endif +| .else +| SSE_AVX_INS movsd, vmovsd, xmm(reg-ZREG_XMM0), qword [Z_ZV(addr)] +| .endif || } else if (Z_MODE(addr) == IS_MEM_ZVAL) { -| SSE_AVX_INS movsd, vmovsd, xmm(reg-ZREG_XMM0), qword [Ra(Z_REG(addr))+Z_OFFSET(addr)] +| SSE_AVX_INS movsd, vmovsd, xmm(reg-ZREG_XMM0), qword [Ra(Z_REG(addr))+Z_OFFSET(addr)] || } else if (Z_MODE(addr) == IS_REG) { -| SSE_AVX_INS movsd, vmovaps, xmm(reg-ZREG_XMM0), xmm(Z_REG(addr)-ZREG_XMM0) +| SSE_AVX_INS movsd, vmovaps, xmm(reg-ZREG_XMM0), xmm(Z_REG(addr)-ZREG_XMM0) || } else { || ZEND_ASSERT(0); || } @@ -684,9 +684,9 @@ static void* dasm_labels[zend_lb_MAX]; || if (Z_MODE(addr) == IS_CONST_ZVAL) { | MEM_OP3_3 avx_ins, xmm(reg-ZREG_XMM0), xmm(op1_reg-ZREG_XMM0), qword, Z_ZV(addr), r0 || } else if (Z_MODE(addr) == IS_MEM_ZVAL) { -| avx_ins xmm(reg-ZREG_XMM0), xmm(op1_reg-ZREG_XMM0), qword [Ra(Z_REG(addr))+Z_OFFSET(addr)] +| avx_ins xmm(reg-ZREG_XMM0), xmm(op1_reg-ZREG_XMM0), qword [Ra(Z_REG(addr))+Z_OFFSET(addr)] || } else if (Z_MODE(addr) == IS_REG) { -| avx_ins xmm(reg-ZREG_XMM0), xmm(op1_reg-ZREG_XMM0), xmm(Z_REG(addr)-ZREG_XMM0) +| avx_ins xmm(reg-ZREG_XMM0), xmm(op1_reg-ZREG_XMM0), xmm(Z_REG(addr)-ZREG_XMM0) || } else { || ZEND_ASSERT(0); || } @@ -728,25 +728,25 @@ static void* dasm_labels[zend_lb_MAX]; |.macro LONG_OP, long_ins, reg, addr || if (Z_MODE(addr) == IS_CONST_ZVAL) { -| .if X64 -|| if (!IS_SIGNED_32BIT(Z_LVAL_P(Z_ZV(addr)))) { +| .if X64 +|| if (!IS_SIGNED_32BIT(Z_LVAL_P(Z_ZV(addr)))) { || if (reg != ZREG_R0) { -| mov64 r0, Z_LVAL_P(Z_ZV(addr)) -| long_ins Ra(reg), r0 +| mov64 r0, Z_LVAL_P(Z_ZV(addr)) +| long_ins Ra(reg), r0 || } else { -| mov64 r1, Z_LVAL_P(Z_ZV(addr)) -| long_ins Ra(reg), r1 +| mov64 r1, Z_LVAL_P(Z_ZV(addr)) +| long_ins Ra(reg), r1 || } -|| } else { -| long_ins Ra(reg), Z_LVAL_P(Z_ZV(addr)) -|| } -| .else -| long_ins Ra(reg), Z_LVAL_P(Z_ZV(addr)) -| .endif +|| } else { +| long_ins Ra(reg), Z_LVAL_P(Z_ZV(addr)) +|| } +| .else +| long_ins Ra(reg), Z_LVAL_P(Z_ZV(addr)) +| .endif || } else if (Z_MODE(addr) == IS_MEM_ZVAL) { -| long_ins Ra(reg), aword [Ra(Z_REG(addr))+Z_OFFSET(addr)] +| long_ins Ra(reg), aword [Ra(Z_REG(addr))+Z_OFFSET(addr)] || } else if (Z_MODE(addr) == IS_REG) { -| long_ins Ra(reg), Ra(Z_REG(addr)) +| long_ins Ra(reg), Ra(Z_REG(addr)) || } else { || ZEND_ASSERT(0); || } @@ -755,22 +755,22 @@ static void* dasm_labels[zend_lb_MAX]; |.macro LONG_OP_WITH_CONST, long_ins, op1_addr, lval || if (Z_MODE(op1_addr) == IS_MEM_ZVAL) { | .if X64 -|| if (!IS_SIGNED_32BIT(lval)) { -| mov64 r0, lval +|| if (!IS_SIGNED_32BIT(lval)) { +| mov64 r0, lval | long_ins aword [Ra(Z_REG(op1_addr))+Z_OFFSET(op1_addr)], r0 || } else { -| long_ins aword [Ra(Z_REG(op1_addr))+Z_OFFSET(op1_addr)], lval +| long_ins aword [Ra(Z_REG(op1_addr))+Z_OFFSET(op1_addr)], lval || } | .else | long_ins aword [Ra(Z_REG(op1_addr))+Z_OFFSET(op1_addr)], lval | .endif || } else if (Z_MODE(op1_addr) == IS_REG) { | .if X64 -|| if (!IS_SIGNED_32BIT(lval)) { -| mov64 r0, lval +|| if (!IS_SIGNED_32BIT(lval)) { +| mov64 r0, lval | long_ins Ra(Z_REG(op1_addr)), r0 || } else { -| long_ins Ra(Z_REG(op1_addr)), lval +| long_ins Ra(Z_REG(op1_addr)), lval || } | .else | long_ins Ra(Z_REG(op1_addr)), lval @@ -783,20 +783,20 @@ static void* dasm_labels[zend_lb_MAX]; |.macro GET_ZVAL_LVAL, reg, addr || if (Z_MODE(addr) == IS_CONST_ZVAL) { || if (Z_LVAL_P(Z_ZV(addr)) == 0) { -| xor Ra(reg), Ra(reg) +| xor Ra(reg), Ra(reg) || } else { -| .if X64 -|| if (!IS_SIGNED_32BIT(Z_LVAL_P(Z_ZV(addr)))) { -| mov64 Ra(reg), Z_LVAL_P(Z_ZV(addr)) -|| } else { -| mov Ra(reg), Z_LVAL_P(Z_ZV(addr)) -|| } -| .else -| mov Ra(reg), Z_LVAL_P(Z_ZV(addr)) -| .endif +| .if X64 +|| if (!IS_SIGNED_32BIT(Z_LVAL_P(Z_ZV(addr)))) { +| mov64 Ra(reg), Z_LVAL_P(Z_ZV(addr)) +|| } else { +| mov Ra(reg), Z_LVAL_P(Z_ZV(addr)) +|| } +| .else +| mov Ra(reg), Z_LVAL_P(Z_ZV(addr)) +| .endif || } || } else if (Z_MODE(addr) == IS_MEM_ZVAL) { -| mov Ra(reg), aword [Ra(Z_REG(addr))+Z_OFFSET(addr)] +| mov Ra(reg), aword [Ra(Z_REG(addr))+Z_OFFSET(addr)] || } else if (Z_MODE(addr) == IS_REG) { || if (reg != Z_REG(addr)) { | mov Ra(reg), Ra(Z_REG(addr)) @@ -879,7 +879,7 @@ static void* dasm_labels[zend_lb_MAX]; || } else if (!IS_32BIT(zv)) { | mov64 tmp_reg, ((uintptr_t)zv) | SSE_AVX_INS movsd, vmovsd, xmm(dst_reg-ZREG_XMM0), qword [tmp_reg] -| .endif +| .endif || } else { | SSE_AVX_INS movsd, vmovsd, xmm(dst_reg-ZREG_XMM0), qword [((uint32_t)(uintptr_t)zv)] || } @@ -933,7 +933,7 @@ static void* dasm_labels[zend_lb_MAX]; || } else if (!IS_32BIT(zv)) { | mov64 tmp_reg, ((uintptr_t)zv) | SSE_AVX_INS movsd, vmovsd, xmm(dst_reg-ZREG_XMM0), qword [tmp_reg] -| .endif +| .endif || } else { | SSE_AVX_INS movsd, vmovsd, xmm(dst_reg-ZREG_XMM0), qword [((uint32_t)(uintptr_t)zv)] || } @@ -1021,13 +1021,13 @@ static void* dasm_labels[zend_lb_MAX]; || if ((src_info & MAY_BE_ANY) == MAY_BE_LONG) { || if (Z_MODE(src_addr) == IS_REG) { || if (Z_MODE(dst_addr) != IS_REG || Z_REG(dst_addr) != Z_REG(src_addr)) { -| SET_ZVAL_LVAL dst_addr, Ra(Z_REG(src_addr)) +| SET_ZVAL_LVAL dst_addr, Ra(Z_REG(src_addr)) || } || } else if (Z_MODE(dst_addr) == IS_REG) { -| GET_ZVAL_LVAL Z_REG(dst_addr), src_addr +| GET_ZVAL_LVAL Z_REG(dst_addr), src_addr || } else { -| GET_ZVAL_LVAL tmp_reg2, src_addr -| SET_ZVAL_LVAL dst_addr, Ra(tmp_reg2) +| GET_ZVAL_LVAL tmp_reg2, src_addr +| SET_ZVAL_LVAL dst_addr, Ra(tmp_reg2) || } || } else if ((src_info & MAY_BE_ANY) == MAY_BE_DOUBLE) { || if (Z_MODE(src_addr) == IS_REG) { @@ -1039,8 +1039,8 @@ static void* dasm_labels[zend_lb_MAX]; | SSE_SET_ZVAL_DVAL dst_addr, ZREG_XMM0 || } || } else if (!(src_info & MAY_BE_DOUBLE)) { -| GET_ZVAL_PTR Ra(tmp_reg2), src_addr -| SET_ZVAL_PTR dst_addr, Ra(tmp_reg2) +| GET_ZVAL_PTR Ra(tmp_reg2), src_addr +| SET_ZVAL_PTR dst_addr, Ra(tmp_reg2) || } else { | .if X64 | GET_ZVAL_PTR Ra(tmp_reg2), src_addr @@ -1061,7 +1061,7 @@ static void* dasm_labels[zend_lb_MAX]; || } || } || if ((src_info & (MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE)) && -|| has_concrete_type(src_info & MAY_BE_ANY)) { +|| has_concrete_type(src_info & MAY_BE_ANY)) { || if (Z_MODE(dst_addr) == IS_MEM_ZVAL) { || if ((dst_info & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_GUARD)) != (src_info & (MAY_BE_ANY|MAY_BE_UNDEF))) { || zend_uchar type = concrete_type(src_info); @@ -1079,43 +1079,43 @@ static void* dasm_labels[zend_lb_MAX]; || if ((src_info & MAY_BE_ANY) == MAY_BE_LONG) { || if (Z_MODE(src_addr) == IS_REG) { || if (Z_MODE(dst_addr) != IS_REG || Z_REG(dst_addr) != Z_REG(src_addr)) { -| SET_ZVAL_LVAL dst_addr, Ra(Z_REG(src_addr)) +| SET_ZVAL_LVAL dst_addr, Ra(Z_REG(src_addr)) || } || if (Z_MODE(res_addr) != IS_REG || Z_REG(res_addr) != Z_REG(src_addr)) { -| SET_ZVAL_LVAL res_addr, Ra(Z_REG(src_addr)) +| SET_ZVAL_LVAL res_addr, Ra(Z_REG(src_addr)) || } || } else if (Z_MODE(dst_addr) == IS_REG) { -| GET_ZVAL_LVAL Z_REG(dst_addr), src_addr +| GET_ZVAL_LVAL Z_REG(dst_addr), src_addr || if (Z_MODE(res_addr) != IS_REG || Z_REG(res_addr) != Z_REG(dst_addr)) { -| SET_ZVAL_LVAL res_addr, Ra(Z_REG(dst_addr)) +| SET_ZVAL_LVAL res_addr, Ra(Z_REG(dst_addr)) || } || } else if (Z_MODE(res_addr) == IS_REG) { -| GET_ZVAL_LVAL Z_REG(res_addr), src_addr -| SET_ZVAL_LVAL dst_addr, Ra(Z_REG(res_addr)) +| GET_ZVAL_LVAL Z_REG(res_addr), src_addr +| SET_ZVAL_LVAL dst_addr, Ra(Z_REG(res_addr)) || } else { -| GET_ZVAL_LVAL tmp_reg2, src_addr -| SET_ZVAL_LVAL dst_addr, Ra(tmp_reg2) -| SET_ZVAL_LVAL res_addr, Ra(tmp_reg2) +| GET_ZVAL_LVAL tmp_reg2, src_addr +| SET_ZVAL_LVAL dst_addr, Ra(tmp_reg2) +| SET_ZVAL_LVAL res_addr, Ra(tmp_reg2) || } || } else if ((src_info & MAY_BE_ANY) == MAY_BE_DOUBLE) { || if (Z_MODE(src_addr) == IS_REG) { -| SSE_SET_ZVAL_DVAL dst_addr, Z_REG(src_addr) -| SSE_SET_ZVAL_DVAL res_addr, Z_REG(src_addr) +| SSE_SET_ZVAL_DVAL dst_addr, Z_REG(src_addr) +| SSE_SET_ZVAL_DVAL res_addr, Z_REG(src_addr) || } else if (Z_MODE(dst_addr) == IS_REG) { | SSE_GET_ZVAL_DVAL Z_REG(dst_addr), src_addr -| SSE_SET_ZVAL_DVAL res_addr, Z_REG(dst_addr) +| SSE_SET_ZVAL_DVAL res_addr, Z_REG(dst_addr) || } else if (Z_MODE(res_addr) == IS_REG) { | SSE_GET_ZVAL_DVAL Z_REG(res_addr), src_addr -| SSE_SET_ZVAL_DVAL dst_addr, Z_REG(res_addr) +| SSE_SET_ZVAL_DVAL dst_addr, Z_REG(res_addr) || } else { | SSE_GET_ZVAL_DVAL ZREG_XMM0, src_addr | SSE_SET_ZVAL_DVAL dst_addr, ZREG_XMM0 | SSE_SET_ZVAL_DVAL res_addr, ZREG_XMM0 || } || } else if (!(src_info & MAY_BE_DOUBLE)) { -| GET_ZVAL_PTR Ra(tmp_reg2), src_addr -| SET_ZVAL_PTR dst_addr, Ra(tmp_reg2) -| SET_ZVAL_PTR res_addr, Ra(tmp_reg2) +| GET_ZVAL_PTR Ra(tmp_reg2), src_addr +| SET_ZVAL_PTR dst_addr, Ra(tmp_reg2) +| SET_ZVAL_PTR res_addr, Ra(tmp_reg2) || } else { | .if X64 | GET_ZVAL_PTR Ra(tmp_reg2), src_addr @@ -1232,11 +1232,11 @@ static void* dasm_labels[zend_lb_MAX]; |.endmacro |.macro GC_ADDREF, zv -| add dword [zv], 1 +| add dword [zv], 1 |.endmacro |.macro GC_DELREF, zv -| sub dword [zv], 1 +| sub dword [zv], 1 |.endmacro |.macro IF_GC_MAY_NOT_LEAK, ptr, tmp_reg, label @@ -1600,7 +1600,7 @@ static uint32_t concrete_type(uint32_t value_type) static inline zend_bool is_signed(double d) { - return (((unsigned char*)&d)[sizeof(double)-1] & 0x80) != 0; + return (((unsigned char*)&d)[sizeof(double)-1] & 0x80) != 0; } static int zend_jit_interrupt_handler_stub(dasm_State **Dst) @@ -1739,7 +1739,7 @@ static int zend_jit_leave_throw_stub(dasm_State **Dst) |5: | // opline = EG(exception_op); | LOAD_IP_ADDR_ZTS executor_globals, exception_op - | // HANDLE_EXCEPTION() + | // HANDLE_EXCEPTION() | jmp ->exception_handler } else { | GET_IP FCARG1a @@ -1763,7 +1763,7 @@ static int zend_jit_leave_throw_stub(dasm_State **Dst) static int zend_jit_icall_throw_stub(dasm_State **Dst) { |->icall_throw_handler: - | // zend_throw_exception_internal(NULL); + | // zend_throw_exception_internal(NULL); |.if X64 | xor CARG1, CARG1 | EXT_CALL zend_throw_exception_internal, r0 @@ -1773,7 +1773,7 @@ static int zend_jit_icall_throw_stub(dasm_State **Dst) | EXT_CALL zend_throw_exception_internal, r0 | add r4, 16 |.endif - | // HANDLE_EXCEPTION() + | // HANDLE_EXCEPTION() | jmp ->exception_handler return 1; @@ -1792,9 +1792,9 @@ static int zend_jit_throw_cannot_pass_by_ref_stub(dasm_State **Dst) | // last EX(call) frame may be delayed | cmp RX, EX->call | je >1 - | mov r1, EX->call - | mov EX:RX->prev_execute_data, r1 - | mov EX->call, RX + | mov r1, EX->call + | mov EX:RX->prev_execute_data, r1 + | mov EX->call, RX |1: | mov RX, r0 |.if X64 @@ -2156,7 +2156,7 @@ static int zend_jit_hybrid_profile_jit_stub(dasm_State **Dst) | jz >1 | MEM_OP2_2_ZTS add, r2, aword, compiler_globals, map_ptr_base, r1 |1: - | mov r2, aword [r2] + | mov r2, aword [r2] #else # error "Unknown ZEND_MAP_PTR_KIND" #endif @@ -2164,7 +2164,7 @@ static int zend_jit_hybrid_profile_jit_stub(dasm_State **Dst) | // handler = (const void*)ZEND_FUNC_INFO(op_array); | mov r0, aword [r0 + offsetof(zend_op_array, reserved[zend_func_info_rid])] | // return ((zend_vm_opcode_handler_t)handler)(); - | jmp r0 + | jmp r0 return 1; } @@ -2263,7 +2263,7 @@ static int zend_jit_hybrid_trace_counter_stub(dasm_State **Dst, uint32_t cost) | mov r0, EX->func | mov r1, aword [r0 + offsetof(zend_op_array, reserved[zend_func_info_rid])] | mov r1, aword [r1 + offsetof(zend_jit_op_array_trace_extension, offset)] - | mov r2, aword [IP + r1 + offsetof(zend_op_trace_info, counter)] + | mov r2, aword [IP + r1 + offsetof(zend_op_trace_info, counter)] | sub word [r2], cost | jle >1 | jmp aword [IP + r1] @@ -3634,9 +3634,9 @@ static int zend_jit_math_long_long(dasm_State **Dst, } } else if (opcode == ZEND_DIV && (Z_MODE(op2_addr) == IS_CONST_ZVAL && - is_power_of_two(Z_LVAL_P(Z_ZV(op2_addr))))) { + is_power_of_two(Z_LVAL_P(Z_ZV(op2_addr))))) { | GET_ZVAL_LVAL result_reg, op1_addr - | shr Ra(result_reg), floor_log2(Z_LVAL_P(Z_ZV(op2_addr))) + | shr Ra(result_reg), floor_log2(Z_LVAL_P(Z_ZV(op2_addr))) } else { | GET_ZVAL_LVAL result_reg, op1_addr if (same_ops && opcode != ZEND_DIV) { @@ -4785,14 +4785,14 @@ static int zend_jit_fetch_dimension_address_inner(dasm_State **Dst, const zend_o | IF_Z_TYPE r0, IS_INDIRECT, >1 // SLOW |.cold_code |1: - | // retval = Z_INDIRECT_P(retval); + | // retval = Z_INDIRECT_P(retval); | GET_Z_PTR r0, r0 | IF_NOT_Z_TYPE r0, IS_UNDEF, >8 |2: switch (type) { case BP_VAR_R: if (zend_jit_trigger != ZEND_JIT_ON_HOT_TRACE) { - // zend_error(E_NOTICE, "Undefined index: %s", ZSTR_VAL(offset_key)); + // zend_error(E_NOTICE, "Undefined index: %s", ZSTR_VAL(offset_key)); | UNDEFINED_INDEX opline | jmp >9 } @@ -4954,7 +4954,7 @@ static int zend_jit_simple_assign(dasm_State **Dst, if (res_addr) { | SET_ZVAL_TYPE_INFO res_addr, IS_NULL } - | jmp >3 + | jmp >3 if (in_cold) { |2: } else { @@ -7517,7 +7517,7 @@ static int zend_jit_push_call_frame(dasm_State **Dst, const zend_op *opline, con | mov FCARG1a, used_stack | jnz >1 | // used_stack += (func->op_array.last_var + func->op_array.T - MIN(func->op_array.num_args, num_args)) * sizeof(zval); - | mov edx, opline->extended_value + | mov edx, opline->extended_value | cmp edx, dword [r0 + offsetof(zend_function, op_array.num_args)] | cmova edx, dword [r0 + offsetof(zend_function, op_array.num_args)] | sub edx, dword [r0 + offsetof(zend_function, op_array.last_var)] @@ -7741,11 +7741,11 @@ static int zend_jit_init_fcall_guard(dasm_State **Dst, const zend_op *opline, co | mov r1, EX->call | mov r1, aword EX:r1->func | .if X64 - || if (!IS_SIGNED_32BIT(opcodes)) { - | mov64 r0, ((ptrdiff_t)opcodes) + || if (!IS_SIGNED_32BIT(opcodes)) { + | mov64 r0, ((ptrdiff_t)opcodes) | cmp aword [r1 + offsetof(zend_op_array, opcodes)], r0 || } else { - | cmp aword [r1 + offsetof(zend_op_array, opcodes)], opcodes + | cmp aword [r1 + offsetof(zend_op_array, opcodes)], opcodes || } | .else | cmp aword [r1 + offsetof(zend_op_array, opcodes)], opcodes @@ -7755,11 +7755,11 @@ static int zend_jit_init_fcall_guard(dasm_State **Dst, const zend_op *opline, co | // call = EX(call); | mov r1, EX->call | .if X64 - || if (!IS_SIGNED_32BIT(func)) { - | mov64 r0, ((ptrdiff_t)func) + || if (!IS_SIGNED_32BIT(func)) { + | mov64 r0, ((ptrdiff_t)func) | cmp aword EX:r1->func, r0 || } else { - | cmp aword EX:r1->func, func + | cmp aword EX:r1->func, func || } | .else | cmp aword EX:r1->func, func @@ -7824,10 +7824,10 @@ static int zend_jit_init_fcall(dasm_State **Dst, const zend_op *opline, uint32_t /* load constant address later */ } else if (func && op_array == &func->op_array) { /* recursive call */ - | mov r0, EX->func + | mov r0, EX->func } else { | // if (CACHED_PTR(opline->result.num)) - | mov r0, EX->run_time_cache + | mov r0, EX->run_time_cache | mov r0, aword [r0 + opline->result.num] | test r0, r0 | jz >1 @@ -7839,7 +7839,7 @@ static int zend_jit_init_fcall(dasm_State **Dst, const zend_op *opline, uint32_t && (func->op_array.fn_flags & ZEND_ACC_IMMUTABLE)) { | LOAD_ADDR FCARG1a, func | EXT_CALL zend_jit_init_func_run_time_cache_helper, r0 - | mov r1, EX->run_time_cache + | mov r1, EX->run_time_cache | mov aword [r1 + opline->result.num], r0 | jmp >3 } else { @@ -7858,7 +7858,7 @@ static int zend_jit_init_fcall(dasm_State **Dst, const zend_op *opline, uint32_t ZEND_ASSERT(0); } | // CACHE_PTR(opline->result.num, fbc); - | mov r1, EX->run_time_cache + | mov r1, EX->run_time_cache | mov aword [r1 + opline->result.num], r0 if (zend_jit_trigger == ZEND_JIT_ON_HOT_TRACE) { if (!func || opline->opcode == ZEND_INIT_FCALL) { @@ -7869,11 +7869,11 @@ static int zend_jit_init_fcall(dasm_State **Dst, const zend_op *opline, uint32_t const zend_op *opcodes = func->op_array.opcodes; | .if X64 - || if (!IS_SIGNED_32BIT(opcodes)) { - | mov64 r1, ((ptrdiff_t)opcodes) + || if (!IS_SIGNED_32BIT(opcodes)) { + | mov64 r1, ((ptrdiff_t)opcodes) | cmp aword [r0 + offsetof(zend_op_array, opcodes)], r1 || } else { - | cmp aword [r0 + offsetof(zend_op_array, opcodes)], opcodes + | cmp aword [r0 + offsetof(zend_op_array, opcodes)], opcodes || } | .else | cmp aword [r0 + offsetof(zend_op_array, opcodes)], opcodes @@ -7881,11 +7881,11 @@ static int zend_jit_init_fcall(dasm_State **Dst, const zend_op *opline, uint32_t | jz >3 } else { | .if X64 - || if (!IS_SIGNED_32BIT(func)) { - | mov64 r1, ((ptrdiff_t)func) + || if (!IS_SIGNED_32BIT(func)) { + | mov64 r1, ((ptrdiff_t)func) | cmp r0, r1 || } else { - | cmp r0, func + | cmp r0, func || } | .else | cmp r0, func @@ -8147,13 +8147,13 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend if (func->op_array.fn_flags & ZEND_ACC_IMMUTABLE) { | MEM_OP2_2_ZTS add, r2, aword, compiler_globals, map_ptr_base, r1 } - | mov r2, aword [r2] + | mov r2, aword [r2] } else { | test r2, 1 | jz >1 | MEM_OP2_2_ZTS add, r2, aword, compiler_globals, map_ptr_base, r1 |1: - | mov r2, aword [r2] + | mov r2, aword [r2] } #else # error "Unknown ZEND_MAP_PTR_KIND" @@ -8244,14 +8244,14 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend if (func) { | // num_args = EX_NUM_ARGS(); | mov ecx, dword [FP + offsetof(zend_execute_data, This.u2.num_args)] - | // if (UNEXPECTED(num_args > first_extra_arg)) + | // if (UNEXPECTED(num_args > first_extra_arg)) | cmp ecx, (func->op_array.num_args) } else { | // first_extra_arg = op_array->num_args; | mov edx, dword [r0 + offsetof(zend_op_array, num_args)] | // num_args = EX_NUM_ARGS(); | mov ecx, dword [FP + offsetof(zend_execute_data, This.u2.num_args)] - | // if (UNEXPECTED(num_args > first_extra_arg)) + | // if (UNEXPECTED(num_args > first_extra_arg)) | cmp ecx, edx } | jg >1 @@ -8554,11 +8554,11 @@ static int zend_jit_send_val(dasm_State **Dst, const zend_op *opline, const zend } | mov r0, EX:RX->func | test dword [r0 + offsetof(zend_function, quick_arg_flags)], mask - | jnz &exit_addr + | jnz &exit_addr } else { | mov r0, EX:RX->func | test dword [r0 + offsetof(zend_function, quick_arg_flags)], mask - | jnz >1 + | jnz >1 |.cold_code |1: | SAVE_VALID_OPLINE opline, r0 @@ -8631,7 +8631,7 @@ static int zend_jit_send_ref(dasm_State **Dst, const zend_op *opline, const zend | GC_ADDREF r1 | SET_ZVAL_PTR arg_addr, r1 | SET_ZVAL_TYPE_INFO arg_addr, IS_REFERENCE_EX - | jmp >6 + | jmp >6 } |2: | // ZVAL_NEW_REF(arg, varptr); @@ -8699,7 +8699,7 @@ static int zend_jit_send_var(dasm_State **Dst, const zend_op *opline, const zend | mov r0, EX:RX->func | test dword [r0 + offsetof(zend_function, quick_arg_flags)], mask - | jnz >1 + | jnz >1 |.cold_code |1: if (!zend_jit_send_ref(Dst, opline, op_array, op1_info, 1)) { @@ -8738,7 +8738,7 @@ static int zend_jit_send_var(dasm_State **Dst, const zend_op *opline, const zend | mov r0, EX:RX->func | test dword [r0 + offsetof(zend_function, quick_arg_flags)], mask - | jnz >1 + | jnz >1 |.cold_code |1: @@ -8783,7 +8783,7 @@ static int zend_jit_send_var(dasm_State **Dst, const zend_op *opline, const zend } } else { | test dword [RX + offsetof(zend_execute_data, This.u1.type_info)], ZEND_CALL_SEND_ARG_BY_REF - | jnz >1 + | jnz >1 |.cold_code |1: if (!zend_jit_send_ref(Dst, opline, op_array, op1_info, 1)) { @@ -8926,7 +8926,7 @@ static int zend_jit_check_func_arg(dasm_State **Dst, const zend_op *opline, cons } | mov r0, EX:RX->func | test dword [r0 + offsetof(zend_function, quick_arg_flags)], mask - | jnz >1 + | jnz >1 |.cold_code |1: | // ZEND_ADD_CALL_FLAG(EX(call), ZEND_CALL_SEND_ARG_BY_REF); @@ -8949,9 +8949,9 @@ static int zend_jit_smart_true(dasm_State **Dst, const zend_op *opline, int jmp, | jmp >7 } } else if (smart_branch_opcode == ZEND_JMPNZ) { - | jmp =>target_label + | jmp =>target_label } else if (smart_branch_opcode == ZEND_JMPZNZ) { - | jmp =>target_label2 + | jmp =>target_label2 } else { ZEND_ASSERT(0); } @@ -8971,13 +8971,13 @@ static int zend_jit_smart_false(dasm_State **Dst, const zend_op *opline, int jmp { if (smart_branch_opcode) { if (smart_branch_opcode == ZEND_JMPZ) { - | jmp =>target_label + | jmp =>target_label } else if (smart_branch_opcode == ZEND_JMPNZ) { if (jmp) { | jmp >7 } } else if (smart_branch_opcode == ZEND_JMPZNZ) { - | jmp =>target_label + | jmp =>target_label } else { ZEND_ASSERT(0); } @@ -9014,7 +9014,7 @@ static int zend_jit_defined(dasm_State **Dst, const zend_op *opline, const zend_ } | // if (CACHED_PTR(opline->extended_value)) { - | mov r0, EX->run_time_cache + | mov r0, EX->run_time_cache | mov r0, aword [r0 + opline->extended_value] | test r0, r0 | jz >1 @@ -9023,7 +9023,7 @@ static int zend_jit_defined(dasm_State **Dst, const zend_op *opline, const zend_ |.cold_code |4: | MEM_OP2_2_ZTS mov, FCARG1a, aword, executor_globals, zend_constants, FCARG1a - | shr r0, 1 + | shr r0, 1 | cmp dword [FCARG1a + offsetof(HashTable, nNumOfElements)], eax if (smart_branch_opcode) { @@ -9213,7 +9213,7 @@ static int zend_jit_type_check(dasm_State **Dst, const zend_op *opline, const ze | mov cl, byte [FP + opline->op1.var + 8] } |2: - } else { + } else { if (op1_info & MAY_BE_REF) { | mov cl, byte [r0 + 8] } else { @@ -9231,12 +9231,12 @@ static int zend_jit_type_check(dasm_State **Dst, const zend_op *opline, const ze } } else if (smart_branch_opcode) { if (smart_branch_opcode == ZEND_JMPZ) { - | je =>target_label + | je =>target_label } else if (smart_branch_opcode == ZEND_JMPNZ) { - | jne =>target_label + | jne =>target_label } else if (smart_branch_opcode == ZEND_JMPZNZ) { - | je =>target_label - | jmp =>target_label2 + | je =>target_label + | jmp =>target_label2 } else { ZEND_ASSERT(0); } @@ -9306,12 +9306,12 @@ static int zend_jit_type_check(dasm_State **Dst, const zend_op *opline, const ze } } else if (smart_branch_opcode) { if (smart_branch_opcode == ZEND_JMPZ) { - | jne =>target_label + | jne =>target_label } else if (smart_branch_opcode == ZEND_JMPNZ) { - | je =>target_label + | je =>target_label } else if (smart_branch_opcode == ZEND_JMPZNZ) { - | jne =>target_label - | jmp =>target_label2 + | jne =>target_label + | jmp =>target_label2 } else { ZEND_ASSERT(0); } @@ -9335,7 +9335,7 @@ static int zend_jit_type_check(dasm_State **Dst, const zend_op *opline, const ze static uint32_t zend_ssa_cv_info(const zend_op *opline, const zend_op_array *op_array, zend_ssa *ssa, uint32_t var) { - uint32_t j, info; + uint32_t j, info; if (ssa->vars && ssa->var_info) { info = ssa->var_info[var].type; @@ -10000,7 +10000,7 @@ static int zend_jit_bind_global(dasm_State **Dst, const zend_op *opline, const z zend_string *varname = Z_STR_P(RT_CONSTANT(opline, opline->op2)); | // idx = (uint32_t)(uintptr_t)CACHED_PTR(opline->extended_value) - 1; - | mov r0, EX->run_time_cache + | mov r0, EX->run_time_cache | mov r0, aword [r0 + opline->extended_value] | sub r0, 1 | // if (EXPECTED(idx < EG(symbol_table).nNumUsed * sizeof(Bucket))) @@ -10066,7 +10066,7 @@ static int zend_jit_bind_global(dasm_State **Dst, const zend_op *opline, const z |.cold_code |9: | LOAD_ADDR FCARG1a, (ptrdiff_t)varname - | mov FCARG2a, EX->run_time_cache + | mov FCARG2a, EX->run_time_cache if (opline->extended_value) { | add FCARG2a, opline->extended_value } @@ -10131,7 +10131,7 @@ static int zend_jit_recv(dasm_State **Dst, const zend_op *opline, const zend_op_ |8: | SAVE_VALID_OPLINE opline, r0 | mov FCARG1a, r0 - | mov r0, EX->run_time_cache + | mov r0, EX->run_time_cache | add r0, opline->extended_value | mov FCARG2a, EX->func |.if X64WIN @@ -10278,7 +10278,7 @@ static int zend_jit_recv_init(dasm_State **Dst, const zend_op *opline, const zen if (has_slow & 2) { |8: | mov FCARG1a, r0 - | mov r0, EX->run_time_cache + | mov r0, EX->run_time_cache | lea r0, [r0 + opline->extended_value] | mov FCARG2a, EX->func |.if X64WIN @@ -10430,7 +10430,7 @@ static int zend_jit_fetch_obj_read(dasm_State **Dst, const zend_op *opline, cons } if (offset == ZEND_WRONG_PROPERTY_OFFSET) { - | mov r0, EX->run_time_cache + | mov r0, EX->run_time_cache | mov r2, aword [r0 + (opline->extended_value & ~ZEND_FETCH_OBJ_FLAGS)] | cmp r2, aword [FCARG1a + offsetof(zend_object, ce)] | jne >5 @@ -10768,7 +10768,7 @@ static int zend_jit_switch(dasm_State **Dst, const zend_op *opline, const zend_o zend_ssa_op *ssa_op = &ssa->ops[opline - op_array->opcodes]; uint32_t op1_info = OP1_INFO(); zend_jit_addr op1_addr = OP1_ADDR(); - int b = ssa->cfg.map[ZEND_OFFSET_TO_OPLINE(opline, opline->extended_value) - op_array->opcodes]; + int b = ssa->cfg.map[ZEND_OFFSET_TO_OPLINE(opline, opline->extended_value) - op_array->opcodes]; zval *val; if (opline->opcode == ZEND_SWITCH_LONG) { @@ -10943,7 +10943,7 @@ static zend_bool zend_jit_verify_return_type(dasm_State **Dst, const zend_op *op |.cold_code |8: | mov FCARG1a, r0 - | mov r0, EX->run_time_cache + | mov r0, EX->run_time_cache | add r0, opline->op2.num | mov FCARG2a, EX->func |.if X64 diff --git a/ext/opcache/jit/zend_jit_x86.h b/ext/opcache/jit/zend_jit_x86.h index 9a81c7f74b6c7..5bf2521815c6c 100644 --- a/ext/opcache/jit/zend_jit_x86.h +++ b/ext/opcache/jit/zend_jit_x86.h @@ -75,14 +75,14 @@ typedef struct _zend_jit_registers_buf { #endif } zend_jit_registers_buf; -#define ZREG_RAX ZREG_R0 -#define ZREG_RCX ZREG_R1 -#define ZREG_RDX ZREG_R2 -#define ZREG_RBX ZREG_R3 -#define ZREG_RSP ZREG_R4 -#define ZREG_RBP ZREG_R5 -#define ZREG_RSI ZREG_R6 -#define ZREG_RDI ZREG_R7 +#define ZREG_RAX ZREG_R0 +#define ZREG_RCX ZREG_R1 +#define ZREG_RDX ZREG_R2 +#define ZREG_RBX ZREG_R3 +#define ZREG_RSP ZREG_R4 +#define ZREG_RBP ZREG_R5 +#define ZREG_RSI ZREG_R6 +#define ZREG_RDI ZREG_R7 #ifdef _WIN64 # define ZREG_FP ZREG_R14 From 8555c2bff01291e00e4e6af9f0df3b4fe848a390 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Wed, 29 Apr 2020 18:58:28 +0800 Subject: [PATCH 318/338] Fixed bug #79536 (zend_clear_exception prevent exception's destructor to be called). --- NEWS | 2 ++ Zend/zend_exceptions.c | 6 ++-- ext/soap/tests/bug79536.phpt | 63 ++++++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 ext/soap/tests/bug79536.phpt diff --git a/NEWS b/NEWS index bc5fc665e2c3c..054ca007a1965 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,8 @@ PHP NEWS ?? ??? ????, PHP 7.4.6 - Core: + . Fixed bug #79536 (zend_clear_exception prevent exception's destructor to be + called). (Laruence) . Fixed bug #78434 (Generator yields no items after valid() call). (Nikita) . Fixed bug #79477 (casting object into array creates references). (Nikita) . Fixed bug #79514 (Memory leaks while including unexistent file). (cmb, diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 8672ed8e00342..937bf842922ae 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -179,16 +179,18 @@ ZEND_API ZEND_COLD void zend_throw_exception_internal(zval *exception) /* {{{ */ ZEND_API void zend_clear_exception(void) /* {{{ */ { + zend_object *exception; if (EG(prev_exception)) { - OBJ_RELEASE(EG(prev_exception)); EG(prev_exception) = NULL; } if (!EG(exception)) { return; } - OBJ_RELEASE(EG(exception)); + /* exception may have destructor */ + exception = EG(exception); EG(exception) = NULL; + OBJ_RELEASE(exception); if (EG(current_execute_data)) { EG(current_execute_data)->opline = EG(opline_before_exception); } diff --git a/ext/soap/tests/bug79536.phpt b/ext/soap/tests/bug79536.phpt new file mode 100644 index 0000000000000..6de17fb762308 --- /dev/null +++ b/ext/soap/tests/bug79536.phpt @@ -0,0 +1,63 @@ +--TEST-- +Bug #79536 (zend_clear_exception prevent exception's destructor to be called) +--SKIPIF-- + +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- + + + +??? + + + +"; + +class myFault extends SoapFault { + public function __destruct() { + } +} + +function book_to_xml($book) { + throw new myFault("Server", "Conversion Fault"); +} + +class test{ + function dotest2($str){ + $book = new book; + $book->a = "foo"; + $book->b = "bar"; + return $book; + } +} + +class book{ + public $a="a"; + public $b="c"; + +} + +$options=Array( + 'actor' =>'http://schemas.nothing.com', + 'typemap' => array(array("type_ns" => "http://schemas.nothing.com", + "type_name" => "book", + "to_xml" => "book_to_xml")) + ); + +$server = new SoapServer(__DIR__."/classmap.wsdl",$options); +$server->setClass("test"); +$server->handle($HTTP_RAW_POST_DATA); +echo "ok\n"; +?> +--EXPECT-- + +SOAP-ENV:ServerConversion Fault +ok From 9a98569efea4e02ee2e52b168610da8f7a3e9a0c Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 29 Apr 2020 11:12:03 +0200 Subject: [PATCH 319/338] Pass worker ID to clean scripts On Windows, reusing/sharing of OPcache instances with different configuration is not necessarily supported, so we have to make that it does not happen for the clean scripts, by using `$orig_ini_settings` instead of `$clean_params`. --- run-tests.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/run-tests.php b/run-tests.php index e632f69a828f5..5a6ac531fc38e 100755 --- a/run-tests.php +++ b/run-tests.php @@ -2473,12 +2473,9 @@ function run_test($php, $file, $env) save_text($test_clean, trim($section_text['CLEAN']), $temp_clean); if (!$no_clean) { - $clean_params = array(); - settings2array($ini_overwrites, $clean_params); - $clean_params = settings2params($clean_params); $extra = substr(PHP_OS, 0, 3) !== "WIN" ? "unset REQUEST_METHOD; unset QUERY_STRING; unset PATH_TRANSLATED; unset SCRIPT_FILENAME; unset REQUEST_METHOD;" : ""; - system_with_timeout("$extra $php $pass_options $extra_options -q $clean_params $no_file_cache \"$test_clean\"", $env); + system_with_timeout("$extra $php $pass_options $extra_options -q $orig_ini_settings $no_file_cache \"$test_clean\"", $env); } if (!$cfg['keep']['clean']) { From c3d6a0ac025b959521a8c54cadc8656894a3da22 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 29 Apr 2020 13:17:04 +0200 Subject: [PATCH 320/338] manage ZEND_DEP_FALIAS in gen_stub --- build/gen_stub.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build/gen_stub.php b/build/gen_stub.php index 5b2fee031784f..484645221915c 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -443,6 +443,13 @@ public function getFunctionEntry(): string { ); } } else { + if ($this->alias && $this->isDeprecated) { + return sprintf( + "\tZEND_DEP_FALIAS(%s, %s, %s)\n", + $this->name, $this->alias->name, $this->getArgInfoName() + ); + } + if ($this->alias) { return sprintf( "\tZEND_FALIAS(%s, %s, %s)\n", From 7e14e033743ad80562a9d53c1aab21a02e78b665 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 21 Apr 2020 12:03:49 +0200 Subject: [PATCH 321/338] Reduce test parallelism on ARM64 CI Let's go from 32 to 16 parallel jobs. We can reduce this further if necessary. Closes GH-5426. --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d12e846f2b196..1b3ce4119acac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -89,7 +89,9 @@ before_script: # Run PHPs run-tests.php script: - - ./sapi/cli/php run-tests.php -P -d extension=`pwd`/modules/zend_test.so $(if [ $ENABLE_DEBUG == 0 ]; then echo "-d opcache.enable_cli=1 -d opcache.protect_memory=1 -d zend_extension=`pwd`/modules/opcache.so"; fi) -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --offline --show-diff --show-slow 1000 --set-timeout 120 -j$(nproc) + # ARM64 CI reports nproc=32, which is excessive. + - if [ -z "$ARM64" ]; then export JOBS=$(nproc); else export JOBS=16; fi + - ./sapi/cli/php run-tests.php -P -d extension=`pwd`/modules/zend_test.so $(if [ $ENABLE_DEBUG == 0 ]; then echo "-d opcache.enable_cli=1 -d opcache.protect_memory=1 -d zend_extension=`pwd`/modules/opcache.so"; fi) -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --offline --show-diff --show-slow 1000 --set-timeout 120 -j$JOBS - sapi/cli/php -d extension_dir=`pwd`/modules -r 'dl("zend_test");' after_success: From 65934d31d1695a50d20951b109ce6996b0df119c Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 29 Apr 2020 18:24:18 +0300 Subject: [PATCH 322/338] Improved tracing JIT for nested calls --- ext/opcache/jit/zend_jit_internal.h | 2 ++ ext/opcache/jit/zend_jit_trace.c | 24 +++++++++++------------- ext/opcache/jit/zend_jit_vm_helpers.c | 16 ++++++++++++++-- ext/opcache/jit/zend_jit_x86.dasc | 4 +++- 4 files changed, 30 insertions(+), 16 deletions(-) diff --git a/ext/opcache/jit/zend_jit_internal.h b/ext/opcache/jit/zend_jit_internal.h index a385463029df0..c787bbf8b114b 100644 --- a/ext/opcache/jit/zend_jit_internal.h +++ b/ext/opcache/jit/zend_jit_internal.h @@ -363,6 +363,7 @@ struct _zend_jit_trace_stack_frame { zend_jit_trace_stack_frame *call; zend_jit_trace_stack_frame *prev; const zend_function *func; + uint32_t call_level; uint32_t _info; zend_jit_trace_stack stack[1]; }; @@ -384,6 +385,7 @@ struct _zend_jit_trace_stack_frame { _frame->call = NULL; \ _frame->prev = NULL; \ _frame->func = (const zend_function*)_func; \ + _frame->call_level = 0; \ _frame->_info = (((uint32_t)(num_args)) << TRACE_FRAME_SHIFT_NUM_ARGS) & TRACE_FRAME_MASK_NUM_ARGS; \ if (nested) { \ _frame->_info |= TRACE_FRAME_MASK_NESTED; \ diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 7efe94517f888..20696f5f5f48b 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -1614,8 +1614,12 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin v++; } if (return_value_info.type != 0) { - if ((p+1)->op == ZEND_JIT_TRACE_VM) { - const zend_op *opline = (p+1)->opline - 1; + zend_jit_trace_rec *q = p + 1; + while (q->op == ZEND_JIT_TRACE_INIT_CALL) { + q++; + } + if (q->op == ZEND_JIT_TRACE_VM) { + const zend_op *opline = q->opline - 1; if (opline->result_type != IS_UNUSED) { ssa_var_info[ p->first_ssa_var + @@ -2429,7 +2433,6 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par const zend_op_array *op_array; zend_ssa *ssa, *op_array_ssa; zend_jit_trace_rec *p; - int call_level = -1; // TODO: proper support for inlined functions ??? zend_jit_op_array_trace_extension *jit_extension; int num_op_arrays = 0; zend_jit_trace_info *t; @@ -2671,8 +2674,6 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par p++; } -#if 0 - // TODO: call level calculation doesn't work for traces ??? switch (opline->opcode) { case ZEND_INIT_FCALL: case ZEND_INIT_FCALL_BY_NAME: @@ -2682,9 +2683,8 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par case ZEND_INIT_STATIC_METHOD_CALL: case ZEND_INIT_USER_CALL: case ZEND_NEW: - call_level++; + frame->call_level++; } -#endif if (zend_jit_level >= ZEND_JIT_LEVEL_INLINE) { switch (opline->opcode) { @@ -3043,7 +3043,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par case ZEND_INIT_FCALL: case ZEND_INIT_FCALL_BY_NAME: case ZEND_INIT_NS_FCALL_BY_NAME: - if (!zend_jit_init_fcall(&dasm_state, opline, op_array_ssa->cfg.map ? op_array_ssa->cfg.map[opline - op_array->opcodes] : -1, op_array, op_array_ssa, call_level, p + 1)) { + if (!zend_jit_init_fcall(&dasm_state, opline, op_array_ssa->cfg.map ? op_array_ssa->cfg.map[opline - op_array->opcodes] : -1, op_array, op_array_ssa, frame->call_level, p + 1)) { goto jit_failure; } goto done; @@ -3128,7 +3128,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par case ZEND_DO_ICALL: case ZEND_DO_FCALL_BY_NAME: case ZEND_DO_FCALL: - if (!zend_jit_do_fcall(&dasm_state, opline, op_array, op_array_ssa, call_level, -1, p + 1)) { + if (!zend_jit_do_fcall(&dasm_state, opline, op_array, op_array_ssa, frame->call_level, -1, p + 1)) { goto jit_failure; } goto done; @@ -3608,16 +3608,13 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par } done: -#if 0 - // TODO: call level calculation doesn't work for traces ??? switch (opline->opcode) { case ZEND_DO_FCALL: case ZEND_DO_ICALL: case ZEND_DO_UCALL: case ZEND_DO_FCALL_BY_NAME: - call_level--; + frame->call_level--; } -#endif if (ra) { zend_jit_trace_clenup_stack(stack, opline, ssa_op, ssa, ra); @@ -3946,6 +3943,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par if (!skip_guard && !zend_jit_init_fcall_guard(&dasm_state, NULL, p->func)) { goto jit_failure; } + frame->call_level++; } } else if (p->op == ZEND_JIT_TRACE_DO_ICALL) { call = frame->call; diff --git a/ext/opcache/jit/zend_jit_vm_helpers.c b/ext/opcache/jit/zend_jit_vm_helpers.c index b2faaeb1a09c0..7fcd14feca8c1 100644 --- a/ext/opcache/jit/zend_jit_vm_helpers.c +++ b/ext/opcache/jit/zend_jit_vm_helpers.c @@ -696,6 +696,7 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, if (rc == 1) { #endif /* Enter into function */ + prev_call = NULL; if (level > ZEND_JIT_TRACE_MAX_CALL_DEPTH) { stop = ZEND_JIT_TRACE_STOP_TOO_DEEP; break; @@ -726,6 +727,7 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, level++; } else { /* Return from function */ + prev_call = EX(call); if (level == 0) { if (is_toplevel) { stop = ZEND_JIT_TRACE_STOP_TOPLEVEL; @@ -757,6 +759,10 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, unrolled_calls[ret_level] = &EX(func)->op_array; ret_level++; is_toplevel = EX(func)->op_array.function_name == NULL; + + if (prev_call) { + idx = zend_jit_trace_record_fake_init_call(prev_call, trace_buffer, idx); + } #endif } else if (start & ZEND_JIT_TRACE_START_LOOP && !zend_jit_trace_bad_loop_exit(orig_opline)) { @@ -785,8 +791,7 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, offset = jit_extension->offset; } if (EX(call) != prev_call) { - if (trace_buffer[idx-1].op != ZEND_JIT_TRACE_BACK - && EX(call) + if (EX(call) && EX(call)->prev_execute_data == prev_call) { if (EX(call)->func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) { /* TODO: Can we continue recording ??? */ @@ -868,6 +873,13 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, } } + if (stop == ZEND_JIT_TRACE_STOP_LINK) { + /* Shrink fake INIT_CALLs */ + while (trace_buffer[idx-1].op == ZEND_JIT_TRACE_INIT_CALL && trace_buffer[idx-1].fake) { + idx--; + } + } + TRACE_END(ZEND_JIT_TRACE_END, stop, opline); #ifdef HAVE_GCC_GLOBAL_REGS diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 60992a212828e..9501e08375eb5 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -9471,7 +9471,9 @@ static int zend_jit_leave_func(dasm_State **Dst, const zend_op *opline, const ze const void *exit_addr; zend_jit_trace_stack_frame *current_frame; - trace++; + do { + trace++; + } while (trace->op == ZEND_JIT_TRACE_INIT_CALL); ZEND_ASSERT(trace->op == ZEND_JIT_TRACE_VM || trace->op == ZEND_JIT_TRACE_END); next_opline = trace->opline; current_frame = JIT_G(current_frame); From d50a12629d371fbb79dc9a23c290d64f06b29a26 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 29 Apr 2020 18:37:51 +0200 Subject: [PATCH 323/338] Clean up naming in basename() implementation --- ext/standard/string.c | 54 +++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 30 deletions(-) diff --git a/ext/standard/string.c b/ext/standard/string.c index c06de62a80a52..3d2dda4606cf6 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1504,19 +1504,15 @@ PHP_FUNCTION(strtolower) /* {{{ php_basename */ -PHPAPI zend_string *php_basename(const char *s, size_t len, char *suffix, size_t sufflen) +PHPAPI zend_string *php_basename(const char *s, size_t len, char *suffix, size_t suffix_len) { - char *c; - const char *comp, *cend; - size_t inc_len, cnt; - int state; - zend_string *ret; - - comp = cend = c = (char*)s; - cnt = len; - state = 0; - while (cnt > 0) { - inc_len = (*c == '\0' ? 1 : php_mblen(c, cnt)); + /* State 0 is directly after a directory separator (or at the start of the string). + * State 1 is everything else. */ + int state = 0; + const char *basename_start = s; + const char *basename_end = s; + while (len > 0) { + int inc_len = (*s == '\0' ? 1 : php_mblen(s, len)); switch (inc_len) { case -2: @@ -1528,58 +1524,56 @@ PHPAPI zend_string *php_basename(const char *s, size_t len, char *suffix, size_t goto quit_loop; case 1: #if defined(PHP_WIN32) - if (*c == '/' || *c == '\\') { + if (*s == '/' || *s == '\\') { #else - if (*c == '/') { + if (*s == '/') { #endif if (state == 1) { state = 0; - cend = c; + basename_end = s; } #if defined(PHP_WIN32) /* Catch relative paths in c:file.txt style. They're not to confuse with the NTFS streams. This part ensures also, that no drive letter traversing happens. */ - } else if ((*c == ':' && (c - comp == 1))) { + } else if ((*s == ':' && (s - basename_start == 1))) { if (state == 0) { - comp = c; + basename_start = s; state = 1; } else { - cend = c; + basename_end = s; state = 0; } #endif } else { if (state == 0) { - comp = c; + basename_start = s; state = 1; } } break; default: if (state == 0) { - comp = c; + basename_start = s; state = 1; } break; } - c += inc_len; - cnt -= inc_len; + s += inc_len; + len -= inc_len; } quit_loop: if (state == 1) { - cend = c; - } - if (suffix != NULL && sufflen < (size_t)(cend - comp) && - memcmp(cend - sufflen, suffix, sufflen) == 0) { - cend -= sufflen; + basename_end = s; } - len = cend - comp; + if (suffix != NULL && suffix_len < (size_t)(basename_end - basename_start) && + memcmp(basename_end - suffix_len, suffix, suffix_len) == 0) { + basename_end -= suffix_len; + } - ret = zend_string_init(comp, len, 0); - return ret; + return zend_string_init(basename_start, basename_end - basename_start, 0); } /* }}} */ From 90705d44e3da1d0aa7b8b4fd921ec597391eccb2 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 29 Apr 2020 18:42:25 +0200 Subject: [PATCH 324/338] Treat invalid characters in basename() consistently Always simply ignore (pass through) them. Previously the behavior depended on where the invalid character occurred, as it messed up the state management. --- ext/standard/string.c | 10 +++++----- ext/standard/tests/strings/basename_invalid_path.phpt | 7 +++++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ext/standard/string.c b/ext/standard/string.c index 3d2dda4606cf6..a3b743474bb25 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1515,11 +1515,6 @@ PHPAPI zend_string *php_basename(const char *s, size_t len, char *suffix, size_t int inc_len = (*s == '\0' ? 1 : php_mblen(s, len)); switch (inc_len) { - case -2: - case -1: - inc_len = 1; - php_mb_reset(); - break; case 0: goto quit_loop; case 1: @@ -1553,6 +1548,11 @@ PHPAPI zend_string *php_basename(const char *s, size_t len, char *suffix, size_t } break; default: + if (inc_len < 0) { + /* If character is invalid, treat it like other non-significant characters. */ + inc_len = 1; + php_mb_reset(); + } if (state == 0) { basename_start = s; state = 1; diff --git a/ext/standard/tests/strings/basename_invalid_path.phpt b/ext/standard/tests/strings/basename_invalid_path.phpt index 573f8f014aec0..7ede6a94733e5 100644 --- a/ext/standard/tests/strings/basename_invalid_path.phpt +++ b/ext/standard/tests/strings/basename_invalid_path.phpt @@ -13,9 +13,12 @@ if((substr(PHP_OS, 0, 3) == "WIN")) If the filename ends in suffix this will also be cut off. */ -var_dump(basename(chr(-1))); +setlocale(LC_CTYPE, "C"); +var_dump(bin2hex(basename("\xff"))); +var_dump(bin2hex(basename("a\xffb"))); echo "Done\n"; --EXPECT-- -string(0) "" +string(2) "ff" +string(6) "61ff62" Done From 8ddaf13ed3e91fdad56edf0d71663dcf074c9b75 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 29 Apr 2020 08:48:47 +0200 Subject: [PATCH 325/338] Code tweaks: Remove unneeded semicolons --- ext/com_dotnet/php_com_dotnet.h | 2 +- ext/gd/gd.c | 4 ++-- ext/readline/readline_cli.c | 2 +- ext/zlib/zlib.c | 2 +- main/output.c | 2 +- sapi/cli/php_cli_server.c | 2 +- sapi/phpdbg/phpdbg.c | 2 +- sapi/phpdbg/phpdbg_rinit_hook.c | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ext/com_dotnet/php_com_dotnet.h b/ext/com_dotnet/php_com_dotnet.h index e770fd3a94d36..025e1a7dd0c85 100644 --- a/ext/com_dotnet/php_com_dotnet.h +++ b/ext/com_dotnet/php_com_dotnet.h @@ -49,7 +49,7 @@ ZEND_END_MODULE_GLOBALS(com_dotnet) ZEND_TSRMLS_CACHE_EXTERN() #endif -extern ZEND_DECLARE_MODULE_GLOBALS(com_dotnet); +ZEND_EXTERN_MODULE_GLOBALS(com_dotnet) #define COMG(v) ZEND_MODULE_GLOBALS_ACCESSOR(com_dotnet, v) #endif /* PHP_COM_DOTNET_H */ diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 1c6cc74be66df..7f9d057106dd3 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -195,7 +195,7 @@ zend_object *php_gd_image_object_create(zend_class_entry *class_type) intern->std.handlers = &php_gd_image_object_handlers; return &intern->std; -}; +} static void php_gd_image_object_free(zend_object *intern) { @@ -204,7 +204,7 @@ static void php_gd_image_object_free(zend_object *intern) img_obj_ptr->image = NULL; zend_object_std_dtor(intern); -}; +} /** * Creates a new GdImage object wrapping the gdImagePtr and attaches it diff --git a/ext/readline/readline_cli.c b/ext/readline/readline_cli.c index cfbf6d564f69c..c1ec134ffff02 100644 --- a/ext/readline/readline_cli.c +++ b/ext/readline/readline_cli.c @@ -70,7 +70,7 @@ #define DEFAULT_PROMPT "\\b \\> " -ZEND_DECLARE_MODULE_GLOBALS(cli_readline); +ZEND_DECLARE_MODULE_GLOBALS(cli_readline) static char php_last_char = '\0'; static FILE *pager_pipe = NULL; diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 6951c155ad7ba..cb7524e0f9e6e 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -47,7 +47,7 @@ int le_deflate; int le_inflate; #define le_inflate_name "zlib inflate" -ZEND_DECLARE_MODULE_GLOBALS(zlib); +ZEND_DECLARE_MODULE_GLOBALS(zlib) /* {{{ Memory management wrappers */ diff --git a/main/output.c b/main/output.c index 3bc8c278e43c8..4639001dd43c2 100644 --- a/main/output.c +++ b/main/output.c @@ -31,7 +31,7 @@ #include "zend_stack.h" #include "php_output.h" -PHPAPI ZEND_DECLARE_MODULE_GLOBALS(output); +PHPAPI ZEND_DECLARE_MODULE_GLOBALS(output) const char php_output_default_handler_name[sizeof("default output handler")] = "default output handler"; const char php_output_devnull_handler_name[sizeof("null output handler")] = "null output handler"; diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index dd26b5c971dab..1062c5b34cfcd 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -225,7 +225,7 @@ static void php_cli_server_buffer_append(php_cli_server_buffer *buffer, php_cli_ static void php_cli_server_logf(int type, const char *format, ...); static void php_cli_server_log_response(php_cli_server_client *client, int status, const char *message); -ZEND_DECLARE_MODULE_GLOBALS(cli_server); +ZEND_DECLARE_MODULE_GLOBALS(cli_server) /* {{{ static char php_cli_server_css[] * copied from ext/standard/info.c diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index 8a1d8213948bf..b85536c971436 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -56,7 +56,7 @@ ZEND_TSRMLS_CACHE_DEFINE() #endif -ZEND_DECLARE_MODULE_GLOBALS(phpdbg); +ZEND_DECLARE_MODULE_GLOBALS(phpdbg) int phpdbg_startup_run = 0; static PHP_INI_MH(OnUpdateEol) diff --git a/sapi/phpdbg/phpdbg_rinit_hook.c b/sapi/phpdbg/phpdbg_rinit_hook.c index 92013f5499ea1..ddbc43366939c 100644 --- a/sapi/phpdbg/phpdbg_rinit_hook.c +++ b/sapi/phpdbg/phpdbg_rinit_hook.c @@ -18,7 +18,7 @@ #include "php_ini.h" #include -ZEND_DECLARE_MODULE_GLOBALS(phpdbg_webhelper); +ZEND_DECLARE_MODULE_GLOBALS(phpdbg_webhelper) PHP_INI_BEGIN() STD_PHP_INI_ENTRY("phpdbg.auth", "", PHP_INI_SYSTEM | PHP_INI_PERDIR, OnUpdateString, auth, zend_phpdbg_webhelper_globals, phpdbg_webhelper_globals) From 66d42e98844de694c6f77c299a3dc045ac5a3261 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 29 Apr 2020 15:21:00 +0200 Subject: [PATCH 326/338] remove deprecated call and deprecate function to be removed in libenchant v2 add LIBENCHANT_VERSION constant --- ext/enchant/config.m4 | 6 ++--- ext/enchant/enchant.c | 23 ++++++++++-------- ext/enchant/enchant.stub.php | 24 +++++++++++++++++-- ext/enchant/enchant_arginfo.h | 22 ++++++++++------- ext/enchant/tests/broker_free_02.phpt | 2 +- ext/enchant/tests/broker_free_dict.phpt | 2 +- ext/enchant/tests/bug53070.phpt | 5 ++++ ext/enchant/tests/dict_add_to_personal.phpt | 4 ++-- ext/enchant/tests/dict_check.phpt | 2 +- ext/enchant/tests/dict_is_in_session.phpt | 4 ++-- .../tests/enchant_broker_set_dict_path.phpt | 11 ++++++++- 11 files changed, 74 insertions(+), 31 deletions(-) diff --git a/ext/enchant/config.m4 b/ext/enchant/config.m4 index 6c8dd726ce98c..f8d4f1b3e2f85 100644 --- a/ext/enchant/config.m4 +++ b/ext/enchant/config.m4 @@ -4,7 +4,7 @@ PHP_ARG_WITH([enchant], [Include Enchant support])]) if test "$PHP_ENCHANT" != "no"; then - PKG_CHECK_MODULES([ENCHANT], [enchant]) + PKG_CHECK_MODULES([ENCHANT], [enchant >= 1.4.2]) PHP_EVAL_INCLINE($ENCHANT_CFLAGS) PHP_EVAL_LIBLINE($ENCHANT_LIBS, ENCHANT_SHARED_LIBADD) @@ -13,14 +13,14 @@ if test "$PHP_ENCHANT" != "no"; then PHP_CHECK_LIBRARY(enchant, enchant_get_version, [ - AC_DEFINE(HAVE_ENCHANT_GET_VERSION, 1, [ ]) + AC_DEFINE(HAVE_ENCHANT_GET_VERSION, 1, [ enchant_get_version since 1.6.0 ]) ], [ ], [ $ENCHANT_LIBS ]) PHP_CHECK_LIBRARY(enchant, enchant_broker_set_param, [ - AC_DEFINE(HAVE_ENCHANT_BROKER_SET_PARAM, 1, [ ]) + AC_DEFINE(HAVE_ENCHANT_BROKER_SET_PARAM, 1, [ enchant_broker_set_param since 1.5.0 and removed in 2.x ]) ], [ ], [ $ENCHANT_LIBS ]) diff --git a/ext/enchant/enchant.c b/ext/enchant/enchant.c index 640a48d548b63..01955553797d2 100644 --- a/ext/enchant/enchant.c +++ b/ext/enchant/enchant.c @@ -197,6 +197,9 @@ PHP_MINIT_FUNCTION(enchant) le_enchant_dict = zend_register_list_destructors_ex(php_enchant_dict_free, NULL, "enchant_dict", module_number); REGISTER_LONG_CONSTANT("ENCHANT_MYSPELL", PHP_ENCHANT_MYSPELL, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("ENCHANT_ISPELL", PHP_ENCHANT_ISPELL, CONST_CS | CONST_PERSISTENT); +#ifdef HAVE_ENCHANT_GET_VERSION + REGISTER_STRING_CONSTANT("LIBENCHANT_VERSION", enchant_get_version(), CONST_CS | CONST_PERSISTENT); +#endif return SUCCESS; } /* }}} */ @@ -304,7 +307,7 @@ PHP_FUNCTION(enchant_broker_get_error) { zval *broker; enchant_broker *pbroker; - char *msg; + const char *msg; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &broker) == FAILURE) { RETURN_THROWS(); @@ -650,7 +653,7 @@ PHP_FUNCTION(enchant_dict_quick_check) for (i = 0; i < n_sugg; i++) { add_next_index_string(sugg, suggs[i]); } - enchant_dict_free_suggestions(pdict->pdict, suggs); + enchant_dict_free_string_list(pdict->pdict, suggs); } @@ -705,14 +708,14 @@ PHP_FUNCTION(enchant_dict_suggest) add_next_index_string(return_value, suggs[i]); } - enchant_dict_free_suggestions(pdict->pdict, suggs); + enchant_dict_free_string_list(pdict->pdict, suggs); } } /* }}} */ -/* {{{ proto void enchant_dict_add_to_personal(resource dict, string word) +/* {{{ proto void enchant_dict_add(resource dict, string word) add 'word' to personal word list */ -PHP_FUNCTION(enchant_dict_add_to_personal) +PHP_FUNCTION(enchant_dict_add) { zval *dict; char *word; @@ -725,7 +728,7 @@ PHP_FUNCTION(enchant_dict_add_to_personal) PHP_ENCHANT_GET_DICT; - enchant_dict_add_to_personal(pdict->pdict, word, wordlen); + enchant_dict_add(pdict->pdict, word, wordlen); } /* }}} */ @@ -748,9 +751,9 @@ PHP_FUNCTION(enchant_dict_add_to_session) } /* }}} */ -/* {{{ proto bool enchant_dict_is_in_session(resource dict, string word) +/* {{{ proto bool enchant_dict_is_added(resource dict, string word) whether or not 'word' exists in this spelling-session */ -PHP_FUNCTION(enchant_dict_is_in_session) +PHP_FUNCTION(enchant_dict_is_added) { zval *dict; char *word; @@ -763,7 +766,7 @@ PHP_FUNCTION(enchant_dict_is_in_session) PHP_ENCHANT_GET_DICT; - RETURN_BOOL(enchant_dict_is_in_session(pdict->pdict, word, wordlen)); + RETURN_BOOL(enchant_dict_is_added(pdict->pdict, word, wordlen)); } /* }}} */ @@ -796,7 +799,7 @@ PHP_FUNCTION(enchant_dict_get_error) { zval *dict; enchant_dict *pdict; - char *msg; + const char *msg; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &dict) == FAILURE) { RETURN_THROWS(); diff --git a/ext/enchant/enchant.stub.php b/ext/enchant/enchant.stub.php index b68e9ae325603..cad28b9103860 100644 --- a/ext/enchant/enchant.stub.php +++ b/ext/enchant/enchant.stub.php @@ -14,10 +14,16 @@ function enchant_broker_free($broker): bool {} */ function enchant_broker_get_error($broker) {} -/** @param resource $broker */ +/** +* @param resource $broker +* @deprecated +*/ function enchant_broker_set_dict_path($broker, int $name, string $value): bool {} -/** @param resource $broker */ +/** +* @param resource $broker +* @deprecated +*/ function enchant_broker_get_dict_path($broker, int $name): string|false {} /** @param resource $broker */ @@ -57,12 +63,26 @@ function enchant_dict_check($dict, string $word): bool {} function enchant_dict_suggest($dict, string $word): ?array {} /** @param resource $dict */ +function enchant_dict_add($dict, string $word): void {} + +/** +* @param resource $dict +* @alias enchant_dict_add +* @deprecated +*/ function enchant_dict_add_to_personal($dict, string $word): void {} /** @param resource $dict */ function enchant_dict_add_to_session($dict, string $word): void {} /** @param resource $dict */ +function enchant_dict_is_added($dict, string $word): bool {} + +/** +* @param resource $dict +* @alias enchant_dict_is_added +* @deprecated +*/ function enchant_dict_is_in_session($dict, string $word): bool {} /** @param resource $dict */ diff --git a/ext/enchant/enchant_arginfo.h b/ext/enchant/enchant_arginfo.h index ab89ab71f3faf..967bdfcf72915 100644 --- a/ext/enchant/enchant_arginfo.h +++ b/ext/enchant/enchant_arginfo.h @@ -69,12 +69,16 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_enchant_dict_suggest, 0, 2, IS_A ZEND_ARG_TYPE_INFO(0, word, IS_STRING, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_enchant_dict_add_to_personal, 0, 2, IS_VOID, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_enchant_dict_add, 0, 2, IS_VOID, 0) ZEND_ARG_INFO(0, dict) ZEND_ARG_TYPE_INFO(0, word, IS_STRING, 0) ZEND_END_ARG_INFO() -#define arginfo_enchant_dict_add_to_session arginfo_enchant_dict_add_to_personal +#define arginfo_enchant_dict_add_to_personal arginfo_enchant_dict_add + +#define arginfo_enchant_dict_add_to_session arginfo_enchant_dict_add + +#define arginfo_enchant_dict_is_added arginfo_enchant_dict_check #define arginfo_enchant_dict_is_in_session arginfo_enchant_dict_check @@ -108,9 +112,9 @@ ZEND_FUNCTION(enchant_broker_describe); ZEND_FUNCTION(enchant_dict_quick_check); ZEND_FUNCTION(enchant_dict_check); ZEND_FUNCTION(enchant_dict_suggest); -ZEND_FUNCTION(enchant_dict_add_to_personal); +ZEND_FUNCTION(enchant_dict_add); ZEND_FUNCTION(enchant_dict_add_to_session); -ZEND_FUNCTION(enchant_dict_is_in_session); +ZEND_FUNCTION(enchant_dict_is_added); ZEND_FUNCTION(enchant_dict_store_replacement); ZEND_FUNCTION(enchant_dict_get_error); ZEND_FUNCTION(enchant_dict_describe); @@ -120,8 +124,8 @@ static const zend_function_entry ext_functions[] = { ZEND_FE(enchant_broker_init, arginfo_enchant_broker_init) ZEND_FE(enchant_broker_free, arginfo_enchant_broker_free) ZEND_FE(enchant_broker_get_error, arginfo_enchant_broker_get_error) - ZEND_FE(enchant_broker_set_dict_path, arginfo_enchant_broker_set_dict_path) - ZEND_FE(enchant_broker_get_dict_path, arginfo_enchant_broker_get_dict_path) + ZEND_DEP_FE(enchant_broker_set_dict_path, arginfo_enchant_broker_set_dict_path) + ZEND_DEP_FE(enchant_broker_get_dict_path, arginfo_enchant_broker_get_dict_path) ZEND_FE(enchant_broker_list_dicts, arginfo_enchant_broker_list_dicts) ZEND_FE(enchant_broker_request_dict, arginfo_enchant_broker_request_dict) ZEND_FE(enchant_broker_request_pwl_dict, arginfo_enchant_broker_request_pwl_dict) @@ -132,9 +136,11 @@ static const zend_function_entry ext_functions[] = { ZEND_FE(enchant_dict_quick_check, arginfo_enchant_dict_quick_check) ZEND_FE(enchant_dict_check, arginfo_enchant_dict_check) ZEND_FE(enchant_dict_suggest, arginfo_enchant_dict_suggest) - ZEND_FE(enchant_dict_add_to_personal, arginfo_enchant_dict_add_to_personal) + ZEND_FE(enchant_dict_add, arginfo_enchant_dict_add) + ZEND_DEP_FALIAS(enchant_dict_add_to_personal, enchant_dict_add, arginfo_enchant_dict_add_to_personal) ZEND_FE(enchant_dict_add_to_session, arginfo_enchant_dict_add_to_session) - ZEND_FE(enchant_dict_is_in_session, arginfo_enchant_dict_is_in_session) + ZEND_FE(enchant_dict_is_added, arginfo_enchant_dict_is_added) + ZEND_DEP_FALIAS(enchant_dict_is_in_session, enchant_dict_is_added, arginfo_enchant_dict_is_in_session) ZEND_FE(enchant_dict_store_replacement, arginfo_enchant_dict_store_replacement) ZEND_FE(enchant_dict_get_error, arginfo_enchant_dict_get_error) ZEND_FE(enchant_dict_describe, arginfo_enchant_dict_describe) diff --git a/ext/enchant/tests/broker_free_02.phpt b/ext/enchant/tests/broker_free_02.phpt index 1b31c1fc37341..298a921d970b0 100644 --- a/ext/enchant/tests/broker_free_02.phpt +++ b/ext/enchant/tests/broker_free_02.phpt @@ -21,7 +21,7 @@ if (is_resource($broker)) { if ($requestDict) { echo("OK\n"); for($x=0;$x")) die('skip libenchant v1 only'); ?> --FILE-- --EXPECTF-- +Deprecated: Function enchant_broker_get_dict_path() is deprecated in %s + Warning: enchant_broker_get_dict_path(): dict_path not set in %s on line %d bool(false) +Deprecated: Function enchant_broker_get_dict_path() is deprecated in %s + Warning: enchant_broker_get_dict_path(): dict_path not set in %s on line %d bool(false) diff --git a/ext/enchant/tests/dict_add_to_personal.phpt b/ext/enchant/tests/dict_add_to_personal.phpt index 522ae8a2d1218..0c38734c5a5a2 100644 --- a/ext/enchant/tests/dict_add_to_personal.phpt +++ b/ext/enchant/tests/dict_add_to_personal.phpt @@ -1,5 +1,5 @@ --TEST-- -enchant_dict_add_to_personal() function +enchant_dict_add() function --CREDITS-- marcosptf - --SKIPIF-- @@ -20,7 +20,7 @@ if (is_resource($broker)) { if ($requestDict) { echo("OK\n"); - $AddtoPersonalDict = enchant_dict_add_to_personal($requestDict,$newWord); + $AddtoPersonalDict = enchant_dict_add($requestDict,$newWord); if (NULL === $AddtoPersonalDict) { var_dump($AddtoPersonalDict); diff --git a/ext/enchant/tests/dict_check.phpt b/ext/enchant/tests/dict_check.phpt index b48ed475841eb..ac0fc6fb4b079 100644 --- a/ext/enchant/tests/dict_check.phpt +++ b/ext/enchant/tests/dict_check.phpt @@ -20,7 +20,7 @@ if (is_resource($broker)) { if ($requestDict) { echo("OK\n"); - enchant_dict_add_to_personal($requestDict, $newWord); + enchant_dict_add($requestDict, $newWord); if (enchant_dict_check($requestDict, $newWord)) { echo("OK\n"); diff --git a/ext/enchant/tests/dict_is_in_session.phpt b/ext/enchant/tests/dict_is_in_session.phpt index 12771e552e8de..3084fc7122cbd 100644 --- a/ext/enchant/tests/dict_is_in_session.phpt +++ b/ext/enchant/tests/dict_is_in_session.phpt @@ -20,10 +20,10 @@ if (is_resource($broker)) { if ($requestDict) { echo("OK\n"); - $AddtoPersonalDict = enchant_dict_add_to_personal($requestDict,$newWord); + $AddtoPersonalDict = enchant_dict_add($requestDict,$newWord); if (NULL === $AddtoPersonalDict) { - var_dump(enchant_dict_is_in_session($requestDict,$newWord)); + var_dump(enchant_dict_is_added($requestDict,$newWord)); } else { echo("dict add to personal failed\n"); } diff --git a/ext/enchant/tests/enchant_broker_set_dict_path.phpt b/ext/enchant/tests/enchant_broker_set_dict_path.phpt index 9c21a86336aac..a072c2555519e 100644 --- a/ext/enchant/tests/enchant_broker_set_dict_path.phpt +++ b/ext/enchant/tests/enchant_broker_set_dict_path.phpt @@ -8,6 +8,7 @@ marcosptf - if(!extension_loaded('enchant')) die('skip, enchant not loader'); if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");} if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, no dictionary installed on this machine! \n");} +if (defined("LIBENCHANT_VERSION") && version_compare(LIBENCHANT_VERSION, "2", ">")) die('skip libenchant v1 only'); ?> --FILE-- ---EXPECT-- +--EXPECTF-- OK + +Deprecated: Function enchant_broker_set_dict_path() is deprecated in %s OK + +Deprecated: Function enchant_broker_set_dict_path() is deprecated in %s OK + +Deprecated: Function enchant_broker_get_dict_path() is deprecated in %s + +Deprecated: Function enchant_broker_get_dict_path() is deprecated in %s OK From 1b98151734dedc4a580eae7f1f267edcb4198aa6 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 30 Apr 2020 09:40:46 +0200 Subject: [PATCH 327/338] doc enchant changes --- NEWS | 6 ++++++ UPGRADING | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/NEWS b/NEWS index a6e2915ab6503..94e8e4855f3e8 100644 --- a/NEWS +++ b/NEWS @@ -40,6 +40,12 @@ PHP NEWS . Add property DOMXPath::$registerNodeNamespaces and constructor argument that allow global flag to configure query() or evaluate() calls. +- Enchant: + . Add LIBENCHANT_VERSION macro + . Deprecate enchant_broker_set_dict_path, enchant_broker_get_dict_path + enchant_dict_add_to_personal and enchant_dict_is_in_session + . Add enchant_dict_add and enchant_dict_is_added functions + - FPM: . Fixed bug #64865 (Search for .user.ini files from script dir up to CONTEXT_DOCUMENT_ROOT). (Will Bender) diff --git a/UPGRADING b/UPGRADING index 40a78fcad5868..de376fec44b3b 100644 --- a/UPGRADING +++ b/UPGRADING @@ -469,6 +469,11 @@ PHP 8.0 UPGRADE NOTES . Added DateTime::createFromInterface() and DateTimeImmutable::createFromInterface(). +- Enchant: + . enchant_dict_add() + . enchant_dict_is_added() + . LIBENCHANT_VERSION macro + - dom: . Introduce DOMParentNode and DOMChildNode with new traversal and manipulation APIs RFC: https://wiki.php.net/rfc/dom_living_standard_api @@ -495,6 +500,12 @@ PHP 8.0 UPGRADE NOTES 4. Deprecated Functionality ======================================== +- Enchant: + . enchant_broker_set_dict_path and enchant_broker_get_dict_path + not available in libenchant < 1.5 nor in libenchant-2 + . enchant_dict_add_to_personal, use enchant_dict_add instead + . enchant_dict_is_in_session, use enchant_dict_is_added instead + - Zip: . Using empty file as ZipArchive is deprecated. Libzip 1.6.0 do not accept empty files as valid zip archives any longer. From 8cb237345a50f724aca35133da7155b6bc47d133 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 30 Apr 2020 09:51:10 +0200 Subject: [PATCH 328/338] Revert "Show eventual output of clean sections" This reverts commit 5eb4ab07f27c82336d337afa01d02a7bf574adaf. The temporary hack has served its purpose. --- run-tests.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/run-tests.php b/run-tests.php index 1432cf173649e..7773202d02aae 100755 --- a/run-tests.php +++ b/run-tests.php @@ -2494,10 +2494,7 @@ function run_test($php, $file, $env) if (!$no_clean) { $extra = !IS_WINDOWS ? "unset REQUEST_METHOD; unset QUERY_STRING; unset PATH_TRANSLATED; unset SCRIPT_FILENAME; unset REQUEST_METHOD;" : ""; - $clean_output = system_with_timeout("$extra $php $pass_options $extra_options -q $orig_ini_settings $no_file_cache \"$test_clean\"", $env); - if (trim($clean_output) != '') { - echo "\nCLEAN OUTPUT: $file: $clean_output\n"; - } + system_with_timeout("$extra $php $pass_options $extra_options -q $orig_ini_settings $no_file_cache \"$test_clean\"", $env); } if (!$cfg['keep']['clean']) { From 53eee290b6f5ca531aef19885a392c939013ce36 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 27 Apr 2020 13:17:37 +0200 Subject: [PATCH 329/338] Completely remove disabled functions from function table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, disabling a function only replaces the internal function handler with one that throws a warning, and a few places in the engine special-case such functions, such as function_exists. This leaves us with a Schrödinger's function, which both does not exist (function_exists returns false) and does exist (you cannot define a function with the same name). In particular, this prevents the implementation of robust polyfills, as reported in https://bugs.php.net/bug.php?id=79382: if (!function_exists('getallheaders')) { function getallheaders(...) { ... } } If getallheaders() is a disabled function, this code will break. This patch changes disable_functions to remove the functions from the function table completely. For all intents and purposes, it will look like the function does not exist. This also renders two bits of PHP functionality obsolete and thus deprecated: * ReflectionFunction::isDisabled(), as it will no longer be possible to construct the ReflectionFunction of a disabled function in the first place. * get_defined_functions() with $exclude_disabled=false, as get_defined_functions() now never returns disabled functions. Fixed bug #79382. Closes GH-5473. --- UPGRADING | 13 ++++ Zend/tests/bug69315.phpt | 64 +++++++++++-------- Zend/tests/bug79382.phpt | 18 ++++++ Zend/tests/errmsg_020.phpt | 12 ++-- Zend/zend_API.c | 20 +----- Zend/zend_API.h | 2 - Zend/zend_builtin_functions.c | 30 +++------ Zend/zend_builtin_functions.stub.php | 2 +- Zend/zend_builtin_functions_arginfo.h | 2 +- Zend/zend_compile.c | 4 -- ext/opcache/Optimizer/pass1.c | 20 ++---- ext/opcache/Optimizer/sccp.c | 3 +- ext/opcache/Optimizer/zend_func_info.c | 4 +- ext/opcache/Optimizer/zend_optimizer.c | 7 -- .../Optimizer/zend_optimizer_internal.h | 1 - ext/opcache/tests/bug68104.phpt | 13 ++-- ext/opcache/tests/bug76796.phpt | 11 ++-- ext/reflection/php_reflection.c | 8 +-- ext/reflection/php_reflection.stub.php | 5 +- ext/reflection/php_reflection_arginfo.h | 2 +- .../ReflectionFunction_isDisabled_basic.phpt | 18 ++++-- tests/basic/bug31875.phpt | 10 ++- 22 files changed, 139 insertions(+), 130 deletions(-) create mode 100644 Zend/tests/bug79382.phpt diff --git a/UPGRADING b/UPGRADING index de376fec44b3b..96b9745d4ce63 100644 --- a/UPGRADING +++ b/UPGRADING @@ -178,6 +178,9 @@ PHP 8.0 UPGRADE NOTES } RFC: https://wiki.php.net/rfc/abstract_trait_method_validation + . Disabled functions are now treated exactly like non-existent functions. + Calling a disabled function will report it as unknown, and redefining a + disabled function is now possible. - COM: . Removed the ability to import case-insensitive constants from type @@ -500,6 +503,11 @@ PHP 8.0 UPGRADE NOTES 4. Deprecated Functionality ======================================== +- Core: + . Calling get_defined_functions() with $exclude_disabled explicitly set to + false is deprecated. get_defined_functions() will never include disabled + functions. + - Enchant: . enchant_broker_set_dict_path and enchant_broker_get_dict_path not available in libenchant < 1.5 nor in libenchant-2 @@ -511,6 +519,11 @@ PHP 8.0 UPGRADE NOTES do not accept empty files as valid zip archives any longer. Existing workaround will be removed in next version. +- Reflection: + . ReflectionFunction::isDisabled() is deprecated, as it is no longer possible + to create a ReflectionFunction for a disabled function. This method now + always returns false. + ======================================== 5. Changed Functions ======================================== diff --git a/Zend/tests/bug69315.phpt b/Zend/tests/bug69315.phpt index 0eb5afb0808ab..82017c0552410 100644 --- a/Zend/tests/bug69315.phpt +++ b/Zend/tests/bug69315.phpt @@ -7,32 +7,44 @@ disable_functions=strlen,defined,call_user_func,constant,is_string var_dump(function_exists("strlen")); var_dump(is_callable("strlen")); -var_dump(strlen("xxx")); -var_dump(defined("PHP_VERSION")); -var_dump(constant("PHP_VERSION")); -var_dump(call_user_func("strlen")); -var_dump(is_string("xxx")); -var_dump(is_string()); +try { + var_dump(strlen("xxx")); +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} +try { + var_dump(defined("PHP_VERSION")); +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} +try { + var_dump(constant("PHP_VERSION")); +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} +try { + var_dump(call_user_func("strlen")); +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} +try { + var_dump(is_string("xxx")); +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} +try { + var_dump(is_string()); +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} ?> ---EXPECTF-- +--EXPECT-- bool(false) -bool(true) - -Warning: strlen() has been disabled for security reasons in %sbug69315.php on line %d -NULL - -Warning: defined() has been disabled for security reasons in %sbug69315.php on line %d -NULL - -Warning: constant() has been disabled for security reasons in %sbug69315.php on line %d -NULL - -Warning: call_user_func() has been disabled for security reasons in %sbug69315.php on line %d -NULL - -Warning: is_string() has been disabled for security reasons in %sbug69315.php on line %d -NULL - -Warning: is_string() has been disabled for security reasons in %s on line %d -NULL +bool(false) +Call to undefined function strlen() +Call to undefined function defined() +Call to undefined function constant() +Call to undefined function call_user_func() +Call to undefined function is_string() +Call to undefined function is_string() diff --git a/Zend/tests/bug79382.phpt b/Zend/tests/bug79382.phpt new file mode 100644 index 0000000000000..bc6099c4e4329 --- /dev/null +++ b/Zend/tests/bug79382.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug #79382: Cannot redeclare disabled function +--INI-- +disable_functions=strlen +--FILE-- + +--EXPECT-- +int(6) diff --git a/Zend/tests/errmsg_020.phpt b/Zend/tests/errmsg_020.phpt index 636e29d01fe31..4a7c326d05317 100644 --- a/Zend/tests/errmsg_020.phpt +++ b/Zend/tests/errmsg_020.phpt @@ -5,10 +5,12 @@ disable_functions=phpinfo --FILE-- getMessage(), "\n"; +} -echo "Done\n"; ?> ---EXPECTF-- -Warning: phpinfo() has been disabled for security reasons in %s on line %d -Done +--EXPECT-- +Call to undefined function phpinfo() diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 37c8820164a5c..d2fb08d2d9f2f 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2686,27 +2686,9 @@ ZEND_API int zend_set_hash_symbol(zval *symbol, const char *name, int name_lengt /* Disabled functions support */ -/* {{{ proto void display_disabled_function(void) -Dummy function which displays an error when a disabled function is called. */ -ZEND_API ZEND_COLD ZEND_FUNCTION(display_disabled_function) -{ - zend_error(E_WARNING, "%s() has been disabled for security reasons", get_active_function_name()); -} -/* }}} */ - ZEND_API int zend_disable_function(char *function_name, size_t function_name_length) /* {{{ */ { - zend_internal_function *func; - if ((func = zend_hash_str_find_ptr(CG(function_table), function_name, function_name_length))) { - zend_free_internal_arg_info(func); - func->fn_flags &= ~(ZEND_ACC_VARIADIC | ZEND_ACC_HAS_TYPE_HINTS | ZEND_ACC_HAS_RETURN_TYPE); - func->num_args = 0; - func->required_num_args = 0; - func->arg_info = NULL; - func->handler = ZEND_FN(display_disabled_function); - return SUCCESS; - } - return FAILURE; + return zend_hash_str_del(CG(function_table), function_name, function_name_length); } /* }}} */ diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 51353ad710c15..fe6ec000e9d08 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -593,8 +593,6 @@ ZEND_API zend_bool zend_is_iterable(zval *iterable); ZEND_API zend_bool zend_is_countable(zval *countable); -ZEND_API ZEND_FUNCTION(display_disabled_function); - ZEND_API int zend_get_default_from_internal_arg_info( zval *default_value_zval, zend_internal_arg_info *arg_info); diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 5682d02822f90..300adf400e1d9 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1127,7 +1127,7 @@ ZEND_FUNCTION(trait_exists) ZEND_FUNCTION(function_exists) { zend_string *name; - zend_function *func; + zend_bool exists; zend_string *lcname; ZEND_PARSE_PARAMETERS_START(1, 1) @@ -1142,15 +1142,10 @@ ZEND_FUNCTION(function_exists) lcname = zend_string_tolower(name); } - func = zend_hash_find_ptr(EG(function_table), lcname); + exists = zend_hash_exists(EG(function_table), lcname); zend_string_release_ex(lcname, 0); - /* - * A bit of a hack, but not a bad one: we see if the handler of the function - * is actually one that displays "function is disabled" message. - */ - RETURN_BOOL(func && (func->type != ZEND_INTERNAL_FUNCTION || - func->internal_function.handler != zif_display_disabled_function)); + RETURN_BOOL(exists); } /* }}} */ @@ -1420,30 +1415,25 @@ ZEND_FUNCTION(get_defined_functions) zval internal, user; zend_string *key; zend_function *func; - zend_bool exclude_disabled = 0; - char *disable_functions = NULL; + zend_bool exclude_disabled = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &exclude_disabled) == FAILURE) { RETURN_THROWS(); } + if (exclude_disabled == 0) { + zend_error(E_DEPRECATED, + "get_defined_functions(): Setting $exclude_disabled to false has no effect"); + } + array_init(&internal); array_init(&user); array_init(return_value); - if (exclude_disabled) { - disable_functions = INI_STR("disable_functions"); - } ZEND_HASH_FOREACH_STR_KEY_PTR(EG(function_table), key, func) { if (key && ZSTR_VAL(key)[0] != 0) { if (func->type == ZEND_INTERNAL_FUNCTION) { - if (disable_functions != NULL) { - if (strstr(disable_functions, func->common.function_name->val) == NULL) { - add_next_index_str(&internal, zend_string_copy(key)); - } - } else { - add_next_index_str(&internal, zend_string_copy(key)); - } + add_next_index_str(&internal, zend_string_copy(key)); } else if (func->type == ZEND_USER_FUNCTION) { add_next_index_str(&user, zend_string_copy(key)); } diff --git a/Zend/zend_builtin_functions.stub.php b/Zend/zend_builtin_functions.stub.php index ec3d5a5203d8a..43b55b42a7d3b 100644 --- a/Zend/zend_builtin_functions.stub.php +++ b/Zend/zend_builtin_functions.stub.php @@ -85,7 +85,7 @@ function get_declared_traits(): array {} function get_declared_interfaces(): array {} -function get_defined_functions(bool $exclude_disabled = false): array {} +function get_defined_functions(bool $exclude_disabled = true): array {} function get_defined_vars(): array {} diff --git a/Zend/zend_builtin_functions_arginfo.h b/Zend/zend_builtin_functions_arginfo.h index ab4510f3d8ee5..571b14ba728ff 100644 --- a/Zend/zend_builtin_functions_arginfo.h +++ b/Zend/zend_builtin_functions_arginfo.h @@ -146,7 +146,7 @@ ZEND_END_ARG_INFO() #define arginfo_get_declared_interfaces arginfo_func_get_args ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_get_defined_functions, 0, 0, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, exclude_disabled, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, exclude_disabled, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() #define arginfo_get_defined_vars arginfo_func_get_args diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 0923aa71415cd..bc214fa39aa6b 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -3934,10 +3934,6 @@ int zend_compile_func_array_slice(znode *result, zend_ast_list *args) /* {{{ */ int zend_try_compile_special_func(znode *result, zend_string *lcname, zend_ast_list *args, zend_function *fbc, uint32_t type) /* {{{ */ { - if (fbc->internal_function.handler == ZEND_FN(display_disabled_function)) { - return FAILURE; - } - if (CG(compiler_options) & ZEND_COMPILE_NO_BUILTINS) { return FAILURE; } diff --git a/ext/opcache/Optimizer/pass1.c b/ext/opcache/Optimizer/pass1.c index 9219e5e19e62b..3beb1788a3e76 100644 --- a/ext/opcache/Optimizer/pass1.c +++ b/ext/opcache/Optimizer/pass1.c @@ -382,12 +382,10 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx) Z_TYPE(ZEND_OP1_LITERAL(send1_opline)) == IS_STRING) { if ((Z_STRLEN(ZEND_OP2_LITERAL(init_opline)) == sizeof("function_exists")-1 && !memcmp(Z_STRVAL(ZEND_OP2_LITERAL(init_opline)), - "function_exists", sizeof("function_exists")-1) && - !zend_optimizer_is_disabled_func("function_exists", sizeof("function_exists") - 1)) || + "function_exists", sizeof("function_exists")-1)) || (Z_STRLEN(ZEND_OP2_LITERAL(init_opline)) == sizeof("is_callable")-1 && !memcmp(Z_STRVAL(ZEND_OP2_LITERAL(init_opline)), - "is_callable", sizeof("is_callable")) && - !zend_optimizer_is_disabled_func("is_callable", sizeof("is_callable") - 1))) { + "is_callable", sizeof("is_callable")))) { zend_internal_function *func; zend_string *lc_name = zend_string_tolower( Z_STR(ZEND_OP1_LITERAL(send1_opline))); @@ -400,12 +398,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx) #endif ) { zval t; - if (Z_STRLEN(ZEND_OP2_LITERAL(init_opline)) == sizeof("is_callable") - 1 || - func->handler != ZEND_FN(display_disabled_function)) { - ZVAL_TRUE(&t); - } else { - ZVAL_FALSE(&t); - } + ZVAL_TRUE(&t); literal_dtor(&ZEND_OP2_LITERAL(init_opline)); MAKE_NOP(init_opline); literal_dtor(&ZEND_OP1_LITERAL(send1_opline)); @@ -423,8 +416,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx) break; } else if (Z_STRLEN(ZEND_OP2_LITERAL(init_opline)) == sizeof("extension_loaded")-1 && !memcmp(Z_STRVAL(ZEND_OP2_LITERAL(init_opline)), - "extension_loaded", sizeof("extension_loaded")-1) && - !zend_optimizer_is_disabled_func("extension_loaded", sizeof("extension_loaded") - 1)) { + "extension_loaded", sizeof("extension_loaded")-1)) { zval t; zend_string *lc_name = zend_string_tolower( Z_STR(ZEND_OP1_LITERAL(send1_opline))); @@ -465,8 +457,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx) break; } else if (Z_STRLEN(ZEND_OP2_LITERAL(init_opline)) == sizeof("constant")-1 && !memcmp(Z_STRVAL(ZEND_OP2_LITERAL(init_opline)), - "constant", sizeof("constant")-1) && - !zend_optimizer_is_disabled_func("constant", sizeof("constant") - 1)) { + "constant", sizeof("constant")-1)) { zval t; if (zend_optimizer_get_persistent_constant(Z_STR(ZEND_OP1_LITERAL(send1_opline)), &t, 1)) { @@ -488,7 +479,6 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx) } else if (Z_STRLEN(ZEND_OP2_LITERAL(init_opline)) == sizeof("dirname")-1 && !memcmp(Z_STRVAL(ZEND_OP2_LITERAL(init_opline)), "dirname", sizeof("dirname") - 1) && - !zend_optimizer_is_disabled_func("dirname", sizeof("dirname") - 1) && IS_ABSOLUTE_PATH(Z_STRVAL(ZEND_OP1_LITERAL(send1_opline)), Z_STRLEN(ZEND_OP1_LITERAL(send1_opline)))) { zend_string *dirname = zend_string_init(Z_STRVAL(ZEND_OP1_LITERAL(send1_opline)), Z_STRLEN(ZEND_OP1_LITERAL(send1_opline)), 0); ZSTR_LEN(dirname) = zend_dirname(ZSTR_VAL(dirname), ZSTR_LEN(dirname)); diff --git a/ext/opcache/Optimizer/sccp.c b/ext/opcache/Optimizer/sccp.c index d5c27ca664c45..adea2187785c6 100644 --- a/ext/opcache/Optimizer/sccp.c +++ b/ext/opcache/Optimizer/sccp.c @@ -1019,8 +1019,7 @@ static inline int ct_eval_func_call( } func = zend_hash_find_ptr(CG(function_table), name); - if (!func || func->type != ZEND_INTERNAL_FUNCTION - || func->internal_function.handler == ZEND_FN(display_disabled_function)) { + if (!func || func->type != ZEND_INTERNAL_FUNCTION) { return FAILURE; } diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index 6f1c24705171e..ff29cce9896a8 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -899,9 +899,7 @@ static uint32_t get_internal_func_info( } func_info_t *info = Z_PTR_P(zv); - if (UNEXPECTED(zend_optimizer_is_disabled_func(info->name, info->name_len))) { - return MAY_BE_NULL; - } else if (info->info_func) { + if (info->info_func) { return info->info_func(call_info, ssa); } else { return info->info; diff --git a/ext/opcache/Optimizer/zend_optimizer.c b/ext/opcache/Optimizer/zend_optimizer.c index 6f896af27ce41..61d2750ce9f89 100644 --- a/ext/opcache/Optimizer/zend_optimizer.c +++ b/ext/opcache/Optimizer/zend_optimizer.c @@ -157,13 +157,6 @@ static inline int zend_optimizer_add_literal_string(zend_op_array *op_array, zen return zend_optimizer_add_literal(op_array, &zv); } -int zend_optimizer_is_disabled_func(const char *name, size_t len) { - zend_function *fbc = (zend_function *)zend_hash_str_find_ptr(EG(function_table), name, len); - - return (fbc && fbc->type == ZEND_INTERNAL_FUNCTION && - fbc->internal_function.handler == ZEND_FN(display_disabled_function)); -} - static inline void drop_leading_backslash(zval *val) { if (Z_STRVAL_P(val)[0] == '\\') { zend_string *str = zend_string_init(Z_STRVAL_P(val) + 1, Z_STRLEN_P(val) - 1, 0); diff --git a/ext/opcache/Optimizer/zend_optimizer_internal.h b/ext/opcache/Optimizer/zend_optimizer_internal.h index ed0dac3e1921d..a525b668bfd0e 100644 --- a/ext/opcache/Optimizer/zend_optimizer_internal.h +++ b/ext/opcache/Optimizer/zend_optimizer_internal.h @@ -108,7 +108,6 @@ void zend_optimize_temporary_variables(zend_op_array *op_array, zend_optimizer_c void zend_optimizer_nop_removal(zend_op_array *op_array, zend_optimizer_ctx *ctx); void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx *ctx); void zend_optimizer_compact_vars(zend_op_array *op_array); -int zend_optimizer_is_disabled_func(const char *name, size_t len); zend_function *zend_optimizer_get_called_func( zend_script *script, zend_op_array *op_array, zend_op *opline, zend_bool *is_prototype); uint32_t zend_optimizer_classify_function(zend_string *name, uint32_t num_args); diff --git a/ext/opcache/tests/bug68104.phpt b/ext/opcache/tests/bug68104.phpt index 8d3bf70a4d069..6d994c79afe09 100644 --- a/ext/opcache/tests/bug68104.phpt +++ b/ext/opcache/tests/bug68104.phpt @@ -11,9 +11,12 @@ disable_functions=dl --FILE-- getMessage(), "\n"; +} ?> ---EXPECTF-- -bool(true) - -Warning: dl() has been disabled for security reasons in %sbug68104.php on line %d +--EXPECT-- +bool(false) +Call to undefined function dl() diff --git a/ext/opcache/tests/bug76796.phpt b/ext/opcache/tests/bug76796.phpt index ba7e26a0d5dc3..18f25d2558907 100644 --- a/ext/opcache/tests/bug76796.phpt +++ b/ext/opcache/tests/bug76796.phpt @@ -10,9 +10,12 @@ disable_functions=strpos --FILE-- getMessage(), "\n"; +} ?> ---EXPECTF-- -Warning: strpos() has been disabled for security reasons in %s on line %d -NULL +--EXPECT-- +Call to undefined function strpos() diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 552913dd1ef02..2856e0c6db77f 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -1549,16 +1549,12 @@ ZEND_METHOD(ReflectionFunctionAbstract, isUserDefined) Returns whether this function has been disabled or not */ ZEND_METHOD(ReflectionFunction, isDisabled) { - reflection_object *intern; - zend_function *fptr; - - GET_REFLECTION_OBJECT_PTR(fptr); - if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } - RETURN_BOOL(fptr->type == ZEND_INTERNAL_FUNCTION && fptr->internal_function.handler == zif_display_disabled_function); + /* A disabled function cannot be queried using Reflection. */ + RETURN_FALSE; } /* }}} */ diff --git a/ext/reflection/php_reflection.stub.php b/ext/reflection/php_reflection.stub.php index be6269fe78ba1..0adce7921c573 100644 --- a/ext/reflection/php_reflection.stub.php +++ b/ext/reflection/php_reflection.stub.php @@ -104,7 +104,10 @@ public function __construct($name) {} public function __toString(): string {} - /** @return bool */ + /** + * @return bool + * @deprecated ReflectionFunction can no longer be constructed for disabled functions + */ public function isDisabled() {} /** @return mixed */ diff --git a/ext/reflection/php_reflection_arginfo.h b/ext/reflection/php_reflection_arginfo.h index a0a606295b7ac..a7f12dba8ca1f 100644 --- a/ext/reflection/php_reflection_arginfo.h +++ b/ext/reflection/php_reflection_arginfo.h @@ -694,7 +694,7 @@ static const zend_function_entry class_ReflectionFunctionAbstract_methods[] = { static const zend_function_entry class_ReflectionFunction_methods[] = { ZEND_ME(ReflectionFunction, __construct, arginfo_class_ReflectionFunction___construct, ZEND_ACC_PUBLIC) ZEND_ME(ReflectionFunction, __toString, arginfo_class_ReflectionFunction___toString, ZEND_ACC_PUBLIC) - ZEND_ME(ReflectionFunction, isDisabled, arginfo_class_ReflectionFunction_isDisabled, ZEND_ACC_PUBLIC) + ZEND_ME(ReflectionFunction, isDisabled, arginfo_class_ReflectionFunction_isDisabled, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) ZEND_ME(ReflectionFunction, invoke, arginfo_class_ReflectionFunction_invoke, ZEND_ACC_PUBLIC) ZEND_ME(ReflectionFunction, invokeArgs, arginfo_class_ReflectionFunction_invokeArgs, ZEND_ACC_PUBLIC) ZEND_ME(ReflectionFunction, getClosure, arginfo_class_ReflectionFunction_getClosure, ZEND_ACC_PUBLIC) diff --git a/ext/reflection/tests/ReflectionFunction_isDisabled_basic.phpt b/ext/reflection/tests/ReflectionFunction_isDisabled_basic.phpt index 220c16f9cb10a..d63492751655e 100644 --- a/ext/reflection/tests/ReflectionFunction_isDisabled_basic.phpt +++ b/ext/reflection/tests/ReflectionFunction_isDisabled_basic.phpt @@ -7,8 +7,18 @@ TestFest PHP|Tek disable_functions=is_file --FILE-- isDisabled()); +try { + $rf = new ReflectionFunction('is_file'); + var_dump($rf->isDisabled()); +} catch (ReflectionException $e) { + echo $e->getMessage(), "\n"; +} + +$rf = new ReflectionFunction('is_string'); +var_dump($rf->isDisabled()); ?> ---EXPECT-- -bool(true) +--EXPECTF-- +Function is_file() does not exist + +Deprecated: Function ReflectionFunction::isDisabled() is deprecated in %s on line %d +bool(false) diff --git a/tests/basic/bug31875.phpt b/tests/basic/bug31875.phpt index 65f68b9af3b8a..c8ad25ec9f62c 100644 --- a/tests/basic/bug31875.phpt +++ b/tests/basic/bug31875.phpt @@ -8,6 +8,8 @@ disable_functions=dl ---EXPECT-- -bool(true) -bool(true) +--EXPECTF-- +bool(false) + +Deprecated: get_defined_functions(): Setting $exclude_disabled to false has no effect in %s on line %d +bool(false) bool(false) From 707cb18276b3d344e37535b82359a797d285c35b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 30 Apr 2020 09:55:25 +0200 Subject: [PATCH 330/338] Revert "Insert one more debug output" This reverts commit 45cb42166d4a53fe0154be08097f112d6ec72a27. --- ext/mysqli/tests/clean_table.inc | 1 - 1 file changed, 1 deletion(-) diff --git a/ext/mysqli/tests/clean_table.inc b/ext/mysqli/tests/clean_table.inc index 896d49c146e3f..a3dc8b66debf1 100644 --- a/ext/mysqli/tests/clean_table.inc +++ b/ext/mysqli/tests/clean_table.inc @@ -11,5 +11,4 @@ if (!mysqli_query($link, 'DROP TABLE IF EXISTS test')) { } mysqli_close($link); -echo "Cleaned successfully\n"; ?> From c4ad8beaa890b931031a5cf8a1d2d38550fca3af Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 29 Apr 2020 11:51:50 +0200 Subject: [PATCH 331/338] Do not inherit LC_CTYPE locale from environment Treatment of locales in PHP is currently inconsistent: The LC_ALL locale is set to "C", as is standard behavior on program startup. The LC_CTYPE locale is set to "", which will inherit it from the environment. However, the inherited LC_CTYPE locale will only be used in some cases, while in other cases it is necessary to perform an explicit setlocale() call in PHP first. This is the case for the locale-sensitive handling in the PCRE extension. Make things consistent by *never* inheriting any locales from the environment. LC_ALL, including LC_CTYPE will be "C" on startup. A locale can be set or inherited through an explicit setlocale() call, at which point the behavior will be fully consistent and predictable. Closes GH-5488. --- UPGRADING | 6 +++++ Zend/tests/lc_ctype_inheritance.phpt | 25 ++++++++++++++++++ ext/snmp/snmp.c | 3 +++ ext/standard/basic_functions.c | 1 - .../tests/strings/strtolower-win32.phpt | Bin 4406 -> 4455 bytes .../tests/strings/strtoupper1-win32.phpt | Bin 4415 -> 4464 bytes main/main.c | 1 - 7 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 Zend/tests/lc_ctype_inheritance.phpt diff --git a/UPGRADING b/UPGRADING index 96b9745d4ce63..982ebe635cfcc 100644 --- a/UPGRADING +++ b/UPGRADING @@ -397,6 +397,12 @@ PHP 8.0 UPGRADE NOTES . If the array returned by __sleep() contains non-existing properties, these are now silently ignored. Previously, such properties would have been serialized as if they had the value NULL. + . The default locale on startup is now always "C". No locales are inherited + from the environment by default. Previously, LC_ALL was set to "C", while + LC_CTYPE was inherited from the environment. However, some functions did not + respect the inherited locale without an explicit setlocale() call. An + explicit setlocale() call is now always required if you wish to change any + locale component from the default. - tidy: . The $use_include_path parameter, which was not used internally, has been diff --git a/Zend/tests/lc_ctype_inheritance.phpt b/Zend/tests/lc_ctype_inheritance.phpt new file mode 100644 index 0000000000000..8971ff1969723 --- /dev/null +++ b/Zend/tests/lc_ctype_inheritance.phpt @@ -0,0 +1,25 @@ +--TEST-- +Do not inherit LC_CTYPE from environment +--SKIPIF-- + +--ENV-- +LC_CTYPE=de_DE +--FILE-- + +--EXPECT-- +string(1) "C" +string(2) "e4" +int(0) +bool(true) +string(2) "c4" +int(1) diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index 8464e74aad375..d5cf7cce04a7d 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -49,6 +49,7 @@ #ifdef HAVE_UNISTD_H #include #endif +#include #ifndef __P #ifdef __GNUC__ @@ -1971,6 +1972,8 @@ PHP_MINIT_FUNCTION(snmp) le_snmp_session = zend_register_list_destructors_ex(php_snmp_session_destructor, NULL, PHP_SNMP_SESSION_RES_NAME, module_number); init_snmp("snmpapp"); + /* net-snmp corrupts the CTYPE locale during initialization. */ + setlocale(LC_CTYPE, "C"); #ifdef NETSNMP_DS_LIB_DONT_PERSIST_STATE /* Prevent update of the snmpapp.conf file */ diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 32a82aae26cbb..5fa7be86dbe3c 100755 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -516,7 +516,6 @@ PHP_RSHUTDOWN_FUNCTION(basic) /* {{{ */ * to the value in startup environment */ if (BG(locale_changed)) { setlocale(LC_ALL, "C"); - setlocale(LC_CTYPE, ""); zend_update_current_locale(); if (BG(locale_string)) { zend_string_release_ex(BG(locale_string), 0); diff --git a/ext/standard/tests/strings/strtolower-win32.phpt b/ext/standard/tests/strings/strtolower-win32.phpt index ff631754df6a89026cf0da44c630ad5580a2ccb2..2fc693641dbb38171e652a85e6e792731b65d8ba 100644 GIT binary patch delta 87 zcmdm{^jv9z`9uqO35A*(1;ygjlAQeH#GF(OALn@IkjMa6or&dg6Q}7-tdQYSNGwat Y%t=hjNuBt3wJ>(2jMkfb7+3KF0A5NT00000 delta 66 zcmaE^v`uM(Iitozb9n_#g_;@#jpEdjoc!d(oKy`T=XmFk$N*Oz1tld-1x4G5d2);j W6MOWS5{oD1$xeK*dh>q975o6Wj}@^1 diff --git a/ext/standard/tests/strings/strtoupper1-win32.phpt b/ext/standard/tests/strings/strtoupper1-win32.phpt index 7240e5c021dc89381c0d70f4f82e4328b1a806fb..619ab51d860273686c8af0d325f206a5cdd06984 100644 GIT binary patch delta 87 zcmdn5^g(HY`9uqO35A*(1;ygjlAQeH#GF(OALn@IkjMa6or&dg6Q}7-tdQYSNGwat Y%t=hjNuBt3tuS__jMkg`7&r0*0A#8k9RL6T delta 68 zcmeyMv|nk0Iitozb9n_#g_;@#jpEdjoc!d(oKy`T=XmFk$N*Oz1tld-1x4G*3mD}X X6(;uRF(noQ*|HNKtlfN&aXmi( Date: Wed, 1 Apr 2020 10:25:22 +0200 Subject: [PATCH 332/338] Make numeric operations on resources, arrays and objects type errors --- Zend/tests/add_003.phpt | 4 - Zend/tests/bug54305.phpt | 17 +- Zend/tests/bug73337.phpt | 5 +- Zend/tests/compound_assign_failure.phpt | 66 +- Zend/tests/decrement_001_64bit.phpt | 13 +- Zend/tests/gc_038.phpt | 68 +- Zend/tests/mod_001.phpt | 6 +- Zend/tests/not_002.phpt | 4 +- Zend/tests/operator_unsupported_types.phpt | 860 ++++++++++++++++++ Zend/tests/xor_001.phpt | 9 +- Zend/zend_compile.c | 8 +- Zend/zend_operators.c | 188 ++-- ext/opcache/Optimizer/zend_inference.c | 19 +- ext/opcache/jit/zend_jit.c | 3 +- ext/opcache/jit/zend_jit_trace.c | 3 +- ext/opcache/jit/zend_jit_x86.dasc | 5 +- .../tests/math/pow_variation1_64bit.phpt | 4 +- ext/standard/tests/math/pow_variation2.phpt | 4 +- 18 files changed, 1120 insertions(+), 166 deletions(-) create mode 100644 Zend/tests/operator_unsupported_types.phpt diff --git a/Zend/tests/add_003.phpt b/Zend/tests/add_003.phpt index 0f03f550e0282..69edb7cb1ec0e 100644 --- a/Zend/tests/add_003.phpt +++ b/Zend/tests/add_003.phpt @@ -20,12 +20,8 @@ var_dump($c); echo "Done\n"; ?> --EXPECTF-- -Notice: Object of class stdClass could not be converted to number in %sadd_003.php on line %d - Exception: Unsupported operand types: object + array -Notice: Object of class stdClass could not be converted to number in %s on line %d - Fatal error: Uncaught TypeError: Unsupported operand types: object + array in %s:%d Stack trace: #0 {main} diff --git a/Zend/tests/bug54305.phpt b/Zend/tests/bug54305.phpt index 8e85d2be58ec1..a443d480ec569 100644 --- a/Zend/tests/bug54305.phpt +++ b/Zend/tests/bug54305.phpt @@ -9,14 +9,11 @@ class TestClass { abstract class AbstractClass { } $methodWithArgs = new ReflectionMethod('TestClass', 'methodWithArgs'); -echo $methodWithArgs++; -?> ---EXPECTF-- -Method [ public method methodWithArgs ] { - @@ %sbug54305.php %d - %d - - - Parameters [2] { - Parameter #0 [ $a ] - Parameter #1 [ $b ] - } +try { + echo $methodWithArgs++; +} catch (TypeError $e) { + echo $e->getMessage(), "\n"; } +?> +--EXPECT-- +Cannot increment object diff --git a/Zend/tests/bug73337.phpt b/Zend/tests/bug73337.phpt index 53ce963c529fa..a338aa605c781 100644 --- a/Zend/tests/bug73337.phpt +++ b/Zend/tests/bug73337.phpt @@ -5,8 +5,5 @@ Bug #73337 (try/catch not working with two exceptions inside a same operation) class d { function __destruct() { throw new Exception; } } try { new d + new d; } catch (Exception $e) { print "Exception properly caught\n"; } ?> ---EXPECTF-- -Notice: Object of class d could not be converted to number in %sbug73337.php on line 3 - -Notice: Object of class d could not be converted to number in %sbug73337.php on line 3 +--EXPECT-- Exception properly caught diff --git a/Zend/tests/compound_assign_failure.phpt b/Zend/tests/compound_assign_failure.phpt index 1780725d93dce..0dc9af85f2530 100644 --- a/Zend/tests/compound_assign_failure.phpt +++ b/Zend/tests/compound_assign_failure.phpt @@ -34,167 +34,167 @@ try { $x = new stdClass; try { $x += 1; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = 1; try { $x += new stdClass; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = "foo"; try { $x += new stdClass; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = new stdClass; try { $x -= 1; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = 1; try { $x -= new stdClass; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = "foo"; try { $x -= new stdClass; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = new stdClass; try { $x *= 1; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = 1; try { $x *= new stdClass; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = "foo"; try { $x *= new stdClass; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = new stdClass; try { $x /= 1; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = 1; try { $x /= new stdClass; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = "foo"; try { $x /= new stdClass; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = new stdClass; try { $x %= 1; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = 1; try { $x %= new stdClass; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = "foo"; try { $x %= new stdClass; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = new stdClass; try { $x **= 1; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = 1; try { $x **= new stdClass; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = "foo"; try { $x **= new stdClass; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = new stdClass; try { $x ^= 1; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = 1; try { $x ^= new stdClass; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = "foo"; try { $x ^= new stdClass; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = new stdClass; try { $x &= 1; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = 1; try { $x &= new stdClass; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = "foo"; try { $x &= new stdClass; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = new stdClass; try { $x |= 1; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = 1; try { $x |= new stdClass; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = "foo"; try { $x |= new stdClass; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = new stdClass; try { $x <<= 1; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = 1; try { $x <<= new stdClass; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = "foo"; try { $x <<= new stdClass; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = new stdClass; try { $x >>= 1; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = 1; try { $x >>= new stdClass; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); $x = "foo"; try { $x >>= new stdClass; } -catch (Exception $e) {} +catch (Throwable $e) {} var_dump($x); ?> diff --git a/Zend/tests/decrement_001_64bit.phpt b/Zend/tests/decrement_001_64bit.phpt index 2b2100932a3c1..a96d8cbd0712f 100644 --- a/Zend/tests/decrement_001_64bit.phpt +++ b/Zend/tests/decrement_001_64bit.phpt @@ -26,13 +26,18 @@ $a = array( ); foreach ($a as $var) { - $var--; + try { + $var--; + } catch (TypeError $e) { + echo $e->getMessage(), "\n"; + } var_dump($var); } echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- +Cannot decrement array array(3) { [0]=> int(1) @@ -51,8 +56,10 @@ float(1.5) NULL bool(true) bool(false) -object(stdClass)#%d (0) { +Cannot decrement object +object(stdClass)#1 (0) { } +Cannot decrement array array(0) { } float(-9.223372036854776E+18) diff --git a/Zend/tests/gc_038.phpt b/Zend/tests/gc_038.phpt index d3219531d6152..91f22bf154b30 100644 --- a/Zend/tests/gc_038.phpt +++ b/Zend/tests/gc_038.phpt @@ -6,8 +6,10 @@ zend.enable_gc = 1 x= $x; - @$x += 5; + $x->x = $x; + try { + $x += 5; + } catch (TypeError $e) { unset($x); } $n = gc_collect_cycles(); echo "+=\t$n\n"; } @@ -15,8 +17,10 @@ test_add(); function test_sub() { $x = new stdClass; - $x->x= $x; - @$x -= 5; + $x->x = $x; + try { + $x -= 5; + } catch (TypeError $e) { unset($x); } $n = gc_collect_cycles(); echo "-=\t$n\n"; } @@ -24,8 +28,10 @@ test_sub(); function test_mul() { $x = new stdClass; - $x->x= $x; - @$x *= 5; + $x->x = $x; + try { + $x *= 5; + } catch (TypeError $e) { unset($x); } $n = gc_collect_cycles(); echo "*=\t$n\n"; } @@ -33,8 +39,10 @@ test_mul(); function test_div() { $x = new stdClass; - $x->x= $x; - @$x /= 5; + $x->x = $x; + try { + $x /= 5; + } catch (TypeError $e) { unset($x); } $n = gc_collect_cycles(); echo "/=\t$n\n"; } @@ -42,8 +50,10 @@ test_div(); function test_mod() { $x = new stdClass; - $x->x= $x; - @$x %= 5; + $x->x = $x; + try { + $x %= 5; + } catch (TypeError $e) { unset($x); } $n = gc_collect_cycles(); echo "%=\t$n\n"; } @@ -51,8 +61,10 @@ test_mod(); function test_sl() { $x = new stdClass; - $x->x= $x; - @$x <<= 5; + $x->x = $x; + try { + $x <<= 5; + } catch (TypeError $e) { unset($x); } $n = gc_collect_cycles(); echo "<<=\t$n\n"; } @@ -60,8 +72,10 @@ test_sl(); function test_sr() { $x = new stdClass; - $x->x= $x; - @$x >>= 5; + $x->x = $x; + try { + $x >>= 5; + } catch (TypeError $e) { unset($x); } $n = gc_collect_cycles(); echo ">>=\t$n\n"; } @@ -69,8 +83,10 @@ test_sr(); function test_or() { $x = new stdClass; - $x->x= $x; - @$x |= 1; + $x->x = $x; + try { + $x |= 5; + } catch (TypeError $e) { unset($x); } $n = gc_collect_cycles(); echo "|=\t$n\n"; } @@ -78,8 +94,10 @@ test_or(); function test_and() { $x = new stdClass; - $x->x= $x; - @$x &= 1; + $x->x = $x; + try { + $x &= 5; + } catch (TypeError $e) { unset($x); } $n = gc_collect_cycles(); echo "&=\t$n\n"; } @@ -87,8 +105,10 @@ test_and(); function test_xor() { $x = new stdClass; - $x->x= $x; - @$x ^= 1; + $x->x = $x; + try { + $x ^= 5; + } catch (TypeError $e) { unset($x); } $n = gc_collect_cycles(); echo "^=\t$n\n"; } @@ -96,8 +116,10 @@ test_xor(); function test_pow() { $x = new stdClass; - $x->x= $x; - @$x **= 1; + $x->x = $x; + try { + $x **= 5; + } catch (TypeError $e) { unset($x); } $n = gc_collect_cycles(); echo "**=\t$n\n"; } @@ -117,7 +139,7 @@ function test_concat() { } test_concat(); ?> ---EXPECT-- +--EXPECTF-- += 1 -= 1 *= 1 diff --git a/Zend/tests/mod_001.phpt b/Zend/tests/mod_001.phpt index a393a4364486a..5c543a26192c2 100644 --- a/Zend/tests/mod_001.phpt +++ b/Zend/tests/mod_001.phpt @@ -9,12 +9,12 @@ $b = array(); try { $c = $a % $b; var_dump($c); -} catch (DivisionByZeroError $e) { +} catch (TypeError $e) { echo "Exception: " . $e->getMessage() . "\n"; } echo "Done\n"; ?> ---EXPECT-- -Exception: Modulo by zero +--EXPECTF-- +Exception: Unsupported operand types: array % array Done diff --git a/Zend/tests/not_002.phpt b/Zend/tests/not_002.phpt index 38691a1a510ea..3282053b6b9d0 100644 --- a/Zend/tests/not_002.phpt +++ b/Zend/tests/not_002.phpt @@ -18,9 +18,9 @@ var_dump($a); echo "Done\n"; ?> --EXPECTF-- -Exception: Unsupported operand types +Exception: Cannot perform bitwise not on array -Fatal error: Uncaught Error: Unsupported operand types in %s:%d +Fatal error: Uncaught TypeError: Cannot perform bitwise not on array in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/operator_unsupported_types.phpt b/Zend/tests/operator_unsupported_types.phpt new file mode 100644 index 0000000000000..8b250eac0ae4c --- /dev/null +++ b/Zend/tests/operator_unsupported_types.phpt @@ -0,0 +1,860 @@ +--TEST-- +Using unsupported types with operators +--FILE-- +>', + '&', + '|', + '^', + // Works on booleans, never errors. + 'xor', + // Only generates errors that string conversion emits. + '.', +]; +$illegalValues = [ + '[]', + 'new stdClass', + 'STDOUT', +]; +$legalValues = [ + 'null', + 'true', + 'false', + '2', + '3.5', + '"123"', + '"foo"', // Semi-legal. +]; + +function evalBinOp(string $op, string $value1, string $value2) { + try { + eval("return $value1 $op $value2;"); + echo "No error for $value1 $op $value2\n"; + } catch (Throwable $e) { + echo $e->getMessage() . "\n"; + } +} + +echo "BINOP:\n"; +foreach ($binops as $op) { + foreach ($illegalValues as $illegalValue1) { + foreach ($illegalValues as $illegalValue2) { + evalBinOp($op, $illegalValue1, $illegalValue2); + } + } + foreach ($illegalValues as $illegalValue) { + foreach ($legalValues as $legalValue) { + evalBinOp($op, $illegalValue, $legalValue); + evalBinOp($op, $legalValue, $illegalValue); + } + } +} + +echo "\n\nUNOP:\n"; +foreach ($illegalValues as $illegalValue) { + try { + eval("return ~$illegalValue;"); + echo "No error for ~$copy\n"; + } catch (TypeError $e) { + echo $e->getMessage() . "\n"; + } +} + +echo "\n\nINCDEC:\n"; +foreach ($illegalValues as $illegalValue) { + $copy = eval("return $illegalValue;"); + try { + $copy++; + echo "No error for $copy++\n"; + } catch (TypeError $e) { + echo $e->getMessage() . "\n"; + } + $copy = eval("return $illegalValue;"); + try { + $copy--; + echo "No error for $copy--\n"; + } catch (TypeError $e) { + echo $e->getMessage() . "\n"; + } +} + +?> +--EXPECTF-- +BINOP: +No error for [] + [] +Unsupported operand types: array + object +Unsupported operand types: array + resource +Unsupported operand types: object + array +Unsupported operand types: object + object +Unsupported operand types: object + resource +Unsupported operand types: resource + array +Unsupported operand types: resource + object +Unsupported operand types: resource + resource +Unsupported operand types: array + null +Unsupported operand types: null + array +Unsupported operand types: array + bool +Unsupported operand types: bool + array +Unsupported operand types: array + bool +Unsupported operand types: bool + array +Unsupported operand types: array + int +Unsupported operand types: int + array +Unsupported operand types: array + float +Unsupported operand types: float + array +Unsupported operand types: array + string +Unsupported operand types: string + array +Unsupported operand types: array + string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string + array +Unsupported operand types: object + null +Unsupported operand types: null + object +Unsupported operand types: object + bool +Unsupported operand types: bool + object +Unsupported operand types: object + bool +Unsupported operand types: bool + object +Unsupported operand types: object + int +Unsupported operand types: int + object +Unsupported operand types: object + float +Unsupported operand types: float + object +Unsupported operand types: object + string +Unsupported operand types: string + object +Unsupported operand types: object + string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string + object +Unsupported operand types: resource + null +Unsupported operand types: null + resource +Unsupported operand types: resource + bool +Unsupported operand types: bool + resource +Unsupported operand types: resource + bool +Unsupported operand types: bool + resource +Unsupported operand types: resource + int +Unsupported operand types: int + resource +Unsupported operand types: resource + float +Unsupported operand types: float + resource +Unsupported operand types: resource + string +Unsupported operand types: string + resource +Unsupported operand types: resource + string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string + resource +Unsupported operand types: array - array +Unsupported operand types: array - object +Unsupported operand types: array - resource +Unsupported operand types: object - array +Unsupported operand types: object - object +Unsupported operand types: object - resource +Unsupported operand types: resource - array +Unsupported operand types: resource - object +Unsupported operand types: resource - resource +Unsupported operand types: array - null +Unsupported operand types: null - array +Unsupported operand types: array - bool +Unsupported operand types: bool - array +Unsupported operand types: array - bool +Unsupported operand types: bool - array +Unsupported operand types: array - int +Unsupported operand types: int - array +Unsupported operand types: array - float +Unsupported operand types: float - array +Unsupported operand types: array - string +Unsupported operand types: string - array +Unsupported operand types: array - string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string - array +Unsupported operand types: object - null +Unsupported operand types: null - object +Unsupported operand types: object - bool +Unsupported operand types: bool - object +Unsupported operand types: object - bool +Unsupported operand types: bool - object +Unsupported operand types: object - int +Unsupported operand types: int - object +Unsupported operand types: object - float +Unsupported operand types: float - object +Unsupported operand types: object - string +Unsupported operand types: string - object +Unsupported operand types: object - string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string - object +Unsupported operand types: resource - null +Unsupported operand types: null - resource +Unsupported operand types: resource - bool +Unsupported operand types: bool - resource +Unsupported operand types: resource - bool +Unsupported operand types: bool - resource +Unsupported operand types: resource - int +Unsupported operand types: int - resource +Unsupported operand types: resource - float +Unsupported operand types: float - resource +Unsupported operand types: resource - string +Unsupported operand types: string - resource +Unsupported operand types: resource - string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string - resource +Unsupported operand types: array * array +Unsupported operand types: object * array +Unsupported operand types: resource * array +Unsupported operand types: object * array +Unsupported operand types: object * object +Unsupported operand types: object * resource +Unsupported operand types: resource * array +Unsupported operand types: object * resource +Unsupported operand types: resource * resource +Unsupported operand types: array * null +Unsupported operand types: null * array +Unsupported operand types: array * bool +Unsupported operand types: bool * array +Unsupported operand types: array * bool +Unsupported operand types: bool * array +Unsupported operand types: array * int +Unsupported operand types: int * array +Unsupported operand types: array * float +Unsupported operand types: float * array +Unsupported operand types: array * string +Unsupported operand types: string * array +Unsupported operand types: array * string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string * array +Unsupported operand types: object * null +Unsupported operand types: object * null +Unsupported operand types: object * bool +Unsupported operand types: object * bool +Unsupported operand types: object * bool +Unsupported operand types: object * bool +Unsupported operand types: object * int +Unsupported operand types: object * int +Unsupported operand types: object * float +Unsupported operand types: object * float +Unsupported operand types: object * string +Unsupported operand types: object * string +Unsupported operand types: object * string +Unsupported operand types: object * string +Unsupported operand types: resource * null +Unsupported operand types: resource * null +Unsupported operand types: resource * bool +Unsupported operand types: resource * bool +Unsupported operand types: resource * bool +Unsupported operand types: resource * bool +Unsupported operand types: resource * int +Unsupported operand types: resource * int +Unsupported operand types: resource * float +Unsupported operand types: resource * float +Unsupported operand types: resource * string +Unsupported operand types: resource * string +Unsupported operand types: resource * string +Unsupported operand types: resource * string +Unsupported operand types: array / array +Unsupported operand types: array / object +Unsupported operand types: array / resource +Unsupported operand types: object / array +Unsupported operand types: object / object +Unsupported operand types: object / resource +Unsupported operand types: resource / array +Unsupported operand types: resource / object +Unsupported operand types: resource / resource +Unsupported operand types: array / null +Unsupported operand types: null / array +Unsupported operand types: array / bool +Unsupported operand types: bool / array +Unsupported operand types: array / bool +Unsupported operand types: bool / array +Unsupported operand types: array / int +Unsupported operand types: int / array +Unsupported operand types: array / float +Unsupported operand types: float / array +Unsupported operand types: array / string +Unsupported operand types: string / array +Unsupported operand types: array / string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string / array +Unsupported operand types: object / null +Unsupported operand types: null / object +Unsupported operand types: object / bool +Unsupported operand types: bool / object +Unsupported operand types: object / bool +Unsupported operand types: bool / object +Unsupported operand types: object / int +Unsupported operand types: int / object +Unsupported operand types: object / float +Unsupported operand types: float / object +Unsupported operand types: object / string +Unsupported operand types: string / object +Unsupported operand types: object / string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string / object +Unsupported operand types: resource / null +Unsupported operand types: null / resource +Unsupported operand types: resource / bool +Unsupported operand types: bool / resource +Unsupported operand types: resource / bool +Unsupported operand types: bool / resource +Unsupported operand types: resource / int +Unsupported operand types: int / resource +Unsupported operand types: resource / float +Unsupported operand types: float / resource +Unsupported operand types: resource / string +Unsupported operand types: string / resource +Unsupported operand types: resource / string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string / resource +Unsupported operand types: array % array +Unsupported operand types: array % object +Unsupported operand types: array % resource +Unsupported operand types: object % array +Unsupported operand types: object % object +Unsupported operand types: object % resource +Unsupported operand types: resource % array +Unsupported operand types: resource % object +Unsupported operand types: resource % resource +Unsupported operand types: array % null +Unsupported operand types: null % array +Unsupported operand types: array % bool +Unsupported operand types: bool % array +Unsupported operand types: array % bool +Unsupported operand types: bool % array +Unsupported operand types: array % int +Unsupported operand types: int % array +Unsupported operand types: array % float +Unsupported operand types: float % array +Unsupported operand types: array % string +Unsupported operand types: string % array +Unsupported operand types: array % string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string % array +Unsupported operand types: object % null +Unsupported operand types: null % object +Unsupported operand types: object % bool +Unsupported operand types: bool % object +Unsupported operand types: object % bool +Unsupported operand types: bool % object +Unsupported operand types: object % int +Unsupported operand types: int % object +Unsupported operand types: object % float +Unsupported operand types: float % object +Unsupported operand types: object % string +Unsupported operand types: string % object +Unsupported operand types: object % string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string % object +Unsupported operand types: resource % null +Unsupported operand types: null % resource +Unsupported operand types: resource % bool +Unsupported operand types: bool % resource +Unsupported operand types: resource % bool +Unsupported operand types: bool % resource +Unsupported operand types: resource % int +Unsupported operand types: int % resource +Unsupported operand types: resource % float +Unsupported operand types: float % resource +Unsupported operand types: resource % string +Unsupported operand types: string % resource +Unsupported operand types: resource % string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string % resource +Unsupported operand types: array ** array +Unsupported operand types: array ** object +Unsupported operand types: array ** resource +Unsupported operand types: object ** array +Unsupported operand types: object ** object +Unsupported operand types: object ** resource +Unsupported operand types: resource ** array +Unsupported operand types: resource ** object +Unsupported operand types: resource ** resource +Unsupported operand types: array ** null +Unsupported operand types: null ** array +Unsupported operand types: array ** bool +Unsupported operand types: bool ** array +Unsupported operand types: array ** bool +Unsupported operand types: bool ** array +Unsupported operand types: array ** int +Unsupported operand types: int ** array +Unsupported operand types: array ** float +Unsupported operand types: float ** array +Unsupported operand types: array ** string +Unsupported operand types: string ** array +Unsupported operand types: array ** string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string ** array +Unsupported operand types: object ** null +Unsupported operand types: null ** object +Unsupported operand types: object ** bool +Unsupported operand types: bool ** object +Unsupported operand types: object ** bool +Unsupported operand types: bool ** object +Unsupported operand types: object ** int +Unsupported operand types: int ** object +Unsupported operand types: object ** float +Unsupported operand types: float ** object +Unsupported operand types: object ** string +Unsupported operand types: string ** object +Unsupported operand types: object ** string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string ** object +Unsupported operand types: resource ** null +Unsupported operand types: null ** resource +Unsupported operand types: resource ** bool +Unsupported operand types: bool ** resource +Unsupported operand types: resource ** bool +Unsupported operand types: bool ** resource +Unsupported operand types: resource ** int +Unsupported operand types: int ** resource +Unsupported operand types: resource ** float +Unsupported operand types: float ** resource +Unsupported operand types: resource ** string +Unsupported operand types: string ** resource +Unsupported operand types: resource ** string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string ** resource +Unsupported operand types: array << array +Unsupported operand types: array << object +Unsupported operand types: array << resource +Unsupported operand types: object << array +Unsupported operand types: object << object +Unsupported operand types: object << resource +Unsupported operand types: resource << array +Unsupported operand types: resource << object +Unsupported operand types: resource << resource +Unsupported operand types: array << null +Unsupported operand types: null << array +Unsupported operand types: array << bool +Unsupported operand types: bool << array +Unsupported operand types: array << bool +Unsupported operand types: bool << array +Unsupported operand types: array << int +Unsupported operand types: int << array +Unsupported operand types: array << float +Unsupported operand types: float << array +Unsupported operand types: array << string +Unsupported operand types: string << array +Unsupported operand types: array << string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string << array +Unsupported operand types: object << null +Unsupported operand types: null << object +Unsupported operand types: object << bool +Unsupported operand types: bool << object +Unsupported operand types: object << bool +Unsupported operand types: bool << object +Unsupported operand types: object << int +Unsupported operand types: int << object +Unsupported operand types: object << float +Unsupported operand types: float << object +Unsupported operand types: object << string +Unsupported operand types: string << object +Unsupported operand types: object << string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string << object +Unsupported operand types: resource << null +Unsupported operand types: null << resource +Unsupported operand types: resource << bool +Unsupported operand types: bool << resource +Unsupported operand types: resource << bool +Unsupported operand types: bool << resource +Unsupported operand types: resource << int +Unsupported operand types: int << resource +Unsupported operand types: resource << float +Unsupported operand types: float << resource +Unsupported operand types: resource << string +Unsupported operand types: string << resource +Unsupported operand types: resource << string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string << resource +Unsupported operand types: array >> array +Unsupported operand types: array >> object +Unsupported operand types: array >> resource +Unsupported operand types: object >> array +Unsupported operand types: object >> object +Unsupported operand types: object >> resource +Unsupported operand types: resource >> array +Unsupported operand types: resource >> object +Unsupported operand types: resource >> resource +Unsupported operand types: array >> null +Unsupported operand types: null >> array +Unsupported operand types: array >> bool +Unsupported operand types: bool >> array +Unsupported operand types: array >> bool +Unsupported operand types: bool >> array +Unsupported operand types: array >> int +Unsupported operand types: int >> array +Unsupported operand types: array >> float +Unsupported operand types: float >> array +Unsupported operand types: array >> string +Unsupported operand types: string >> array +Unsupported operand types: array >> string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string >> array +Unsupported operand types: object >> null +Unsupported operand types: null >> object +Unsupported operand types: object >> bool +Unsupported operand types: bool >> object +Unsupported operand types: object >> bool +Unsupported operand types: bool >> object +Unsupported operand types: object >> int +Unsupported operand types: int >> object +Unsupported operand types: object >> float +Unsupported operand types: float >> object +Unsupported operand types: object >> string +Unsupported operand types: string >> object +Unsupported operand types: object >> string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string >> object +Unsupported operand types: resource >> null +Unsupported operand types: null >> resource +Unsupported operand types: resource >> bool +Unsupported operand types: bool >> resource +Unsupported operand types: resource >> bool +Unsupported operand types: bool >> resource +Unsupported operand types: resource >> int +Unsupported operand types: int >> resource +Unsupported operand types: resource >> float +Unsupported operand types: float >> resource +Unsupported operand types: resource >> string +Unsupported operand types: string >> resource +Unsupported operand types: resource >> string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string >> resource +Unsupported operand types: array & array +Unsupported operand types: object & array +Unsupported operand types: resource & array +Unsupported operand types: object & array +Unsupported operand types: object & object +Unsupported operand types: object & resource +Unsupported operand types: resource & array +Unsupported operand types: object & resource +Unsupported operand types: resource & resource +Unsupported operand types: array & null +Unsupported operand types: null & array +Unsupported operand types: array & bool +Unsupported operand types: bool & array +Unsupported operand types: array & bool +Unsupported operand types: bool & array +Unsupported operand types: array & int +Unsupported operand types: int & array +Unsupported operand types: array & float +Unsupported operand types: float & array +Unsupported operand types: array & string +Unsupported operand types: string & array +Unsupported operand types: array & string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string & array +Unsupported operand types: object & null +Unsupported operand types: object & null +Unsupported operand types: object & bool +Unsupported operand types: object & bool +Unsupported operand types: object & bool +Unsupported operand types: object & bool +Unsupported operand types: object & int +Unsupported operand types: object & int +Unsupported operand types: object & float +Unsupported operand types: object & float +Unsupported operand types: object & string +Unsupported operand types: object & string +Unsupported operand types: object & string +Unsupported operand types: object & string +Unsupported operand types: resource & null +Unsupported operand types: resource & null +Unsupported operand types: resource & bool +Unsupported operand types: resource & bool +Unsupported operand types: resource & bool +Unsupported operand types: resource & bool +Unsupported operand types: resource & int +Unsupported operand types: resource & int +Unsupported operand types: resource & float +Unsupported operand types: resource & float +Unsupported operand types: resource & string +Unsupported operand types: resource & string +Unsupported operand types: resource & string +Unsupported operand types: resource & string +Unsupported operand types: array | array +Unsupported operand types: object | array +Unsupported operand types: resource | array +Unsupported operand types: object | array +Unsupported operand types: object | object +Unsupported operand types: object | resource +Unsupported operand types: resource | array +Unsupported operand types: object | resource +Unsupported operand types: resource | resource +Unsupported operand types: array | null +Unsupported operand types: null | array +Unsupported operand types: array | bool +Unsupported operand types: bool | array +Unsupported operand types: array | bool +Unsupported operand types: bool | array +Unsupported operand types: array | int +Unsupported operand types: int | array +Unsupported operand types: array | float +Unsupported operand types: float | array +Unsupported operand types: array | string +Unsupported operand types: string | array +Unsupported operand types: array | string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string | array +Unsupported operand types: object | null +Unsupported operand types: object | null +Unsupported operand types: object | bool +Unsupported operand types: object | bool +Unsupported operand types: object | bool +Unsupported operand types: object | bool +Unsupported operand types: object | int +Unsupported operand types: object | int +Unsupported operand types: object | float +Unsupported operand types: object | float +Unsupported operand types: object | string +Unsupported operand types: object | string +Unsupported operand types: object | string +Unsupported operand types: object | string +Unsupported operand types: resource | null +Unsupported operand types: resource | null +Unsupported operand types: resource | bool +Unsupported operand types: resource | bool +Unsupported operand types: resource | bool +Unsupported operand types: resource | bool +Unsupported operand types: resource | int +Unsupported operand types: resource | int +Unsupported operand types: resource | float +Unsupported operand types: resource | float +Unsupported operand types: resource | string +Unsupported operand types: resource | string +Unsupported operand types: resource | string +Unsupported operand types: resource | string +Unsupported operand types: array ^ array +Unsupported operand types: object ^ array +Unsupported operand types: resource ^ array +Unsupported operand types: object ^ array +Unsupported operand types: object ^ object +Unsupported operand types: object ^ resource +Unsupported operand types: resource ^ array +Unsupported operand types: object ^ resource +Unsupported operand types: resource ^ resource +Unsupported operand types: array ^ null +Unsupported operand types: null ^ array +Unsupported operand types: array ^ bool +Unsupported operand types: bool ^ array +Unsupported operand types: array ^ bool +Unsupported operand types: bool ^ array +Unsupported operand types: array ^ int +Unsupported operand types: int ^ array +Unsupported operand types: array ^ float +Unsupported operand types: float ^ array +Unsupported operand types: array ^ string +Unsupported operand types: string ^ array +Unsupported operand types: array ^ string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string ^ array +Unsupported operand types: object ^ null +Unsupported operand types: object ^ null +Unsupported operand types: object ^ bool +Unsupported operand types: object ^ bool +Unsupported operand types: object ^ bool +Unsupported operand types: object ^ bool +Unsupported operand types: object ^ int +Unsupported operand types: object ^ int +Unsupported operand types: object ^ float +Unsupported operand types: object ^ float +Unsupported operand types: object ^ string +Unsupported operand types: object ^ string +Unsupported operand types: object ^ string +Unsupported operand types: object ^ string +Unsupported operand types: resource ^ null +Unsupported operand types: resource ^ null +Unsupported operand types: resource ^ bool +Unsupported operand types: resource ^ bool +Unsupported operand types: resource ^ bool +Unsupported operand types: resource ^ bool +Unsupported operand types: resource ^ int +Unsupported operand types: resource ^ int +Unsupported operand types: resource ^ float +Unsupported operand types: resource ^ float +Unsupported operand types: resource ^ string +Unsupported operand types: resource ^ string +Unsupported operand types: resource ^ string +Unsupported operand types: resource ^ string +No error for [] xor [] +No error for [] xor new stdClass +No error for [] xor STDOUT +No error for new stdClass xor [] +No error for new stdClass xor new stdClass +No error for new stdClass xor STDOUT +No error for STDOUT xor [] +No error for STDOUT xor new stdClass +No error for STDOUT xor STDOUT +No error for [] xor null +No error for null xor [] +No error for [] xor true +No error for true xor [] +No error for [] xor false +No error for false xor [] +No error for [] xor 2 +No error for 2 xor [] +No error for [] xor 3.5 +No error for 3.5 xor [] +No error for [] xor "123" +No error for "123" xor [] +No error for [] xor "foo" +No error for "foo" xor [] +No error for new stdClass xor null +No error for null xor new stdClass +No error for new stdClass xor true +No error for true xor new stdClass +No error for new stdClass xor false +No error for false xor new stdClass +No error for new stdClass xor 2 +No error for 2 xor new stdClass +No error for new stdClass xor 3.5 +No error for 3.5 xor new stdClass +No error for new stdClass xor "123" +No error for "123" xor new stdClass +No error for new stdClass xor "foo" +No error for "foo" xor new stdClass +No error for STDOUT xor null +No error for null xor STDOUT +No error for STDOUT xor true +No error for true xor STDOUT +No error for STDOUT xor false +No error for false xor STDOUT +No error for STDOUT xor 2 +No error for 2 xor STDOUT +No error for STDOUT xor 3.5 +No error for 3.5 xor STDOUT +No error for STDOUT xor "123" +No error for "123" xor STDOUT +No error for STDOUT xor "foo" +No error for "foo" xor STDOUT + +Warning: Array to string conversion in %s on line %d + +Warning: Array to string conversion in %s on line %d +No error for [] . [] + +Warning: Array to string conversion in %s on line %d +Object of class stdClass could not be converted to string + +Warning: Array to string conversion in %s on line %d +No error for [] . STDOUT + +Warning: Array to string conversion in %s on line %d +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string + +Warning: Array to string conversion in %s on line %d +No error for STDOUT . [] +Object of class stdClass could not be converted to string +No error for STDOUT . STDOUT + +Warning: Array to string conversion in %s on line %d +No error for [] . null + +Warning: Array to string conversion in %s on line %d +No error for null . [] + +Warning: Array to string conversion in %s on line %d +No error for [] . true + +Warning: Array to string conversion in %s on line %d +No error for true . [] + +Warning: Array to string conversion in %s on line %d +No error for [] . false + +Warning: Array to string conversion in %s on line %d +No error for false . [] + +Warning: Array to string conversion in %s on line %d +No error for [] . 2 + +Warning: Array to string conversion in %s on line %d +No error for 2 . [] + +Warning: Array to string conversion in %s on line %d +No error for [] . 3.5 + +Warning: Array to string conversion in %s on line %d +No error for 3.5 . [] + +Warning: Array to string conversion in %s on line %d +No error for [] . "123" + +Warning: Array to string conversion in %s on line %d +No error for "123" . [] + +Warning: Array to string conversion in %s on line %d +No error for [] . "foo" + +Warning: Array to string conversion in %s on line %d +No error for "foo" . [] +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +No error for STDOUT . null +No error for null . STDOUT +No error for STDOUT . true +No error for true . STDOUT +No error for STDOUT . false +No error for false . STDOUT +No error for STDOUT . 2 +No error for 2 . STDOUT +No error for STDOUT . 3.5 +No error for 3.5 . STDOUT +No error for STDOUT . "123" +No error for "123" . STDOUT +No error for STDOUT . "foo" +No error for "foo" . STDOUT + + +UNOP: +Cannot perform bitwise not on array +Cannot perform bitwise not on object +Cannot perform bitwise not on resource + + +INCDEC: +Cannot increment array +Cannot decrement array +Cannot increment object +Cannot decrement object +Cannot increment resource +Cannot decrement resource diff --git a/Zend/tests/xor_001.phpt b/Zend/tests/xor_001.phpt index 1a6d0fb6333c3..9678af16b5f71 100644 --- a/Zend/tests/xor_001.phpt +++ b/Zend/tests/xor_001.phpt @@ -6,11 +6,14 @@ XORing arrays $a = array(1,2,3); $b = array(); -$c = $a ^ $b; -var_dump($c); +try { + $c = $a ^ $b; +} catch (TypeError $e) { + echo $e->getMessage(), "\n"; +} echo "Done\n"; ?> --EXPECT-- -int(1) +Unsupported operand types: array ^ array Done diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index bc214fa39aa6b..8e620b277915e 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -7219,11 +7219,9 @@ ZEND_API zend_bool zend_binary_op_produces_error(uint32_t opcode, zval *op1, zva /* Adding two arrays is allowed. */ return 0; } - if (opcode == ZEND_ADD || opcode == ZEND_SUB || opcode == ZEND_MUL || opcode == ZEND_POW - || opcode == ZEND_DIV) { - /* These operators throw when one of the operands is an array. */ - return 1; - } + + /* Numeric operators throw when one of the operands is an array. */ + return 1; } /* While basic arithmetic operators always produce numeric string errors, diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 6b1c92fce6810..cb7533e1da85d 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -251,20 +251,17 @@ static zend_never_inline int ZEND_FASTCALL _zendi_try_convert_scalar_to_number(z } } return SUCCESS; - case IS_RESOURCE: - ZVAL_LONG(holder, Z_RES_HANDLE_P(op)); - return SUCCESS; case IS_OBJECT: - convert_object_to_type(op, holder, _IS_NUMBER); - if (UNEXPECTED(EG(exception))) { + if (Z_OBJ_HT_P(op)->cast_object(Z_OBJ_P(op), holder, _IS_NUMBER) == FAILURE + || EG(exception)) { return FAILURE; } - if (UNEXPECTED(Z_TYPE_P(holder) != IS_LONG && Z_TYPE_P(holder) != IS_DOUBLE)) { - ZVAL_LONG(holder, 1); - } + ZEND_ASSERT(Z_TYPE_P(holder) == IS_LONG || Z_TYPE_P(holder) == IS_DOUBLE); return SUCCESS; - default: + case IS_RESOURCE: + case IS_ARRAY: return FAILURE; + EMPTY_SWITCH_DEFAULT_CASE() } } /* }}} */ @@ -280,6 +277,59 @@ static zend_always_inline int zendi_try_convert_scalar_to_number(zval *op, zval } /* }}} */ +static zend_never_inline zend_long ZEND_FASTCALL zendi_try_get_long(zval *op, zend_bool *failed) /* {{{ */ +{ + *failed = 0; + switch (Z_TYPE_P(op)) { + case IS_NULL: + case IS_FALSE: + return 0; + case IS_TRUE: + return 1; + case IS_DOUBLE: + return zend_dval_to_lval(Z_DVAL_P(op)); + case IS_STRING: + { + zend_uchar type; + zend_long lval; + double dval; + if (0 == (type = is_numeric_string(Z_STRVAL_P(op), Z_STRLEN_P(op), &lval, &dval, -1))) { + zend_error(E_WARNING, "A non-numeric value encountered"); + if (UNEXPECTED(EG(exception))) { + *failed = 1; + } + return 0; + } else if (EXPECTED(type == IS_LONG)) { + return lval; + } else { + /* Previously we used strtol here, not is_numeric_string, + * and strtol gives you LONG_MAX/_MIN on overflow. + * We use use saturating conversion to emulate strtol()'s + * behaviour. + */ + return zend_dval_to_lval_cap(dval); + } + } + case IS_OBJECT: + { + zval dst; + if (Z_OBJ_HT_P(op)->cast_object(Z_OBJ_P(op), &dst, IS_LONG) == FAILURE + || EG(exception)) { + *failed = 1; + return 0; + } + ZEND_ASSERT(Z_TYPE(dst) == IS_LONG); + return Z_LVAL(dst); + } + case IS_RESOURCE: + case IS_ARRAY: + *failed = 1; + return 0; + EMPTY_SWITCH_DEFAULT_CASE() + } +} +/* }}} */ + #define ZEND_TRY_BINARY_OP1_OBJECT_OPERATION(opcode) \ if (UNEXPECTED(Z_TYPE_P(op1) == IS_OBJECT) \ && UNEXPECTED(Z_OBJ_HANDLER_P(op1, do_operation))) { \ @@ -307,9 +357,10 @@ static zend_always_inline int zendi_try_convert_scalar_to_number(zval *op, zval return SUCCESS; \ } -#define convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, op) \ +#define convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, opcode, sigil) \ do { \ if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { \ + zend_bool failed; \ if (Z_ISREF_P(op1)) { \ op1 = Z_REFVAL_P(op1); \ if (Z_TYPE_P(op1) == IS_LONG) { \ @@ -317,9 +368,10 @@ static zend_always_inline int zendi_try_convert_scalar_to_number(zval *op, zval break; \ } \ } \ - ZEND_TRY_BINARY_OP1_OBJECT_OPERATION(op); \ - op1_lval = _zval_get_long_func_noisy(op1); \ - if (UNEXPECTED(EG(exception))) { \ + ZEND_TRY_BINARY_OP1_OBJECT_OPERATION(opcode); \ + op1_lval = zendi_try_get_long(op1, &failed); \ + if (UNEXPECTED(failed)) { \ + zend_binop_error(sigil, op1, op2); \ if (result != op1) { \ ZVAL_UNDEF(result); \ } \ @@ -331,6 +383,7 @@ static zend_always_inline int zendi_try_convert_scalar_to_number(zval *op, zval } while (0); \ do { \ if (UNEXPECTED(Z_TYPE_P(op2) != IS_LONG)) { \ + zend_bool failed; \ if (Z_ISREF_P(op2)) { \ op2 = Z_REFVAL_P(op2); \ if (Z_TYPE_P(op2) == IS_LONG) { \ @@ -338,9 +391,10 @@ static zend_always_inline int zendi_try_convert_scalar_to_number(zval *op, zval break; \ } \ } \ - ZEND_TRY_BINARY_OP2_OBJECT_OPERATION(op); \ - op2_lval = _zval_get_long_func_noisy(op2); \ - if (UNEXPECTED(EG(exception))) { \ + ZEND_TRY_BINARY_OP2_OBJECT_OPERATION(opcode); \ + op2_lval = zendi_try_get_long(op2, &failed); \ + if (UNEXPECTED(failed)) { \ + zend_binop_error(sigil, op1, op2); \ if (result != op1) { \ ZVAL_UNDEF(result); \ } \ @@ -843,12 +897,6 @@ ZEND_API zend_long ZEND_FASTCALL zval_get_long_func(zval *op) /* {{{ */ } /* }}} */ -static zend_long ZEND_FASTCALL _zval_get_long_func_noisy(zval *op) /* {{{ */ -{ - return _zval_get_long_func_ex(op, 0); -} -/* }}} */ - ZEND_API double ZEND_FASTCALL zval_get_double_func(zval *op) /* {{{ */ { try_again: @@ -1343,7 +1391,7 @@ ZEND_API int ZEND_FASTCALL mod_function(zval *result, zval *op1, zval *op2) /* { { zend_long op1_lval, op2_lval; - convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, ZEND_MOD); + convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, ZEND_MOD, "%"); if (op2_lval == 0) { /* modulus by zero */ @@ -1482,7 +1530,8 @@ ZEND_API int ZEND_FASTCALL bitwise_not_function(zval *result, zval *op1) /* {{{ if (result != op1) { ZVAL_UNDEF(result); } - zend_throw_error(NULL, "Unsupported operand types"); + zend_type_error("Cannot perform bitwise not on %s", + zend_get_type_by_const(Z_TYPE_P(op1))); return FAILURE; } } @@ -1534,9 +1583,11 @@ ZEND_API int ZEND_FASTCALL bitwise_or_function(zval *result, zval *op1, zval *op } if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { + zend_bool failed; ZEND_TRY_BINARY_OP1_OBJECT_OPERATION(ZEND_BW_OR); - op1_lval = _zval_get_long_func_noisy(op1); - if (UNEXPECTED(EG(exception))) { + op1_lval = zendi_try_get_long(op1, &failed); + if (UNEXPECTED(failed)) { + zend_binop_error("|", op1, op2); if (result != op1) { ZVAL_UNDEF(result); } @@ -1546,9 +1597,11 @@ ZEND_API int ZEND_FASTCALL bitwise_or_function(zval *result, zval *op1, zval *op op1_lval = Z_LVAL_P(op1); } if (UNEXPECTED(Z_TYPE_P(op2) != IS_LONG)) { + zend_bool failed; ZEND_TRY_BINARY_OP2_OBJECT_OPERATION(ZEND_BW_OR); - op2_lval = _zval_get_long_func_noisy(op2); - if (UNEXPECTED(EG(exception))) { + op2_lval = zendi_try_get_long(op2, &failed); + if (UNEXPECTED(failed)) { + zend_binop_error("|", op1, op2); if (result != op1) { ZVAL_UNDEF(result); } @@ -1612,9 +1665,11 @@ ZEND_API int ZEND_FASTCALL bitwise_and_function(zval *result, zval *op1, zval *o } if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { + zend_bool failed; ZEND_TRY_BINARY_OP1_OBJECT_OPERATION(ZEND_BW_AND); - op1_lval = _zval_get_long_func_noisy(op1); - if (UNEXPECTED(EG(exception))) { + op1_lval = zendi_try_get_long(op1, &failed); + if (UNEXPECTED(failed)) { + zend_binop_error("&", op1, op2); if (result != op1) { ZVAL_UNDEF(result); } @@ -1624,9 +1679,11 @@ ZEND_API int ZEND_FASTCALL bitwise_and_function(zval *result, zval *op1, zval *o op1_lval = Z_LVAL_P(op1); } if (UNEXPECTED(Z_TYPE_P(op2) != IS_LONG)) { + zend_bool failed; ZEND_TRY_BINARY_OP2_OBJECT_OPERATION(ZEND_BW_AND); - op2_lval = _zval_get_long_func_noisy(op2); - if (UNEXPECTED(EG(exception))) { + op2_lval = zendi_try_get_long(op2, &failed); + if (UNEXPECTED(failed)) { + zend_binop_error("&", op1, op2); if (result != op1) { ZVAL_UNDEF(result); } @@ -1690,9 +1747,11 @@ ZEND_API int ZEND_FASTCALL bitwise_xor_function(zval *result, zval *op1, zval *o } if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { + zend_bool failed; ZEND_TRY_BINARY_OP1_OBJECT_OPERATION(ZEND_BW_XOR); - op1_lval = _zval_get_long_func_noisy(op1); - if (UNEXPECTED(EG(exception))) { + op1_lval = zendi_try_get_long(op1, &failed); + if (UNEXPECTED(failed)) { + zend_binop_error("^", op1, op2); if (result != op1) { ZVAL_UNDEF(result); } @@ -1702,9 +1761,11 @@ ZEND_API int ZEND_FASTCALL bitwise_xor_function(zval *result, zval *op1, zval *o op1_lval = Z_LVAL_P(op1); } if (UNEXPECTED(Z_TYPE_P(op2) != IS_LONG)) { + zend_bool failed; ZEND_TRY_BINARY_OP2_OBJECT_OPERATION(ZEND_BW_XOR); - op2_lval = _zval_get_long_func_noisy(op2); - if (UNEXPECTED(EG(exception))) { + op2_lval = zendi_try_get_long(op2, &failed); + if (UNEXPECTED(failed)) { + zend_binop_error("^", op1, op2); if (result != op1) { ZVAL_UNDEF(result); } @@ -1726,7 +1787,7 @@ ZEND_API int ZEND_FASTCALL shift_left_function(zval *result, zval *op1, zval *op { zend_long op1_lval, op2_lval; - convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, ZEND_SL); + convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, ZEND_SL, "<<"); /* prevent wrapping quirkiness on some processors where << 64 + x == << x */ if (UNEXPECTED((zend_ulong)op2_lval >= SIZEOF_ZEND_LONG * 8)) { @@ -1763,7 +1824,7 @@ ZEND_API int ZEND_FASTCALL shift_right_function(zval *result, zval *op1, zval *o { zend_long op1_lval, op2_lval; - convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, ZEND_SR); + convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, ZEND_SR, ">>"); /* prevent wrapping quirkiness on some processors where >> 64 + x == >> x */ if (UNEXPECTED((zend_ulong)op2_lval >= SIZEOF_ZEND_LONG * 8)) { @@ -2359,22 +2420,27 @@ ZEND_API int ZEND_FASTCALL increment_function(zval *op1) /* {{{ */ } } break; + case IS_FALSE: + case IS_TRUE: + /* Do nothing. */ + break; + case IS_REFERENCE: + op1 = Z_REFVAL_P(op1); + goto try_again; case IS_OBJECT: if (Z_OBJ_HANDLER_P(op1, do_operation)) { zval op2; - int res; - ZVAL_LONG(&op2, 1); - res = Z_OBJ_HANDLER_P(op1, do_operation)(ZEND_ADD, op1, op1, &op2); - - return res; + if (Z_OBJ_HANDLER_P(op1, do_operation)(ZEND_ADD, op1, op1, &op2) == SUCCESS) { + return SUCCESS; + } } + /* break missing intentionally */ + case IS_RESOURCE: + case IS_ARRAY: + zend_type_error("Cannot increment %s", zend_get_type_by_const(Z_TYPE_P(op1))); return FAILURE; - case IS_REFERENCE: - op1 = Z_REFVAL_P(op1); - goto try_again; - default: - return FAILURE; + EMPTY_SWITCH_DEFAULT_CASE() } return SUCCESS; } @@ -2415,22 +2481,28 @@ ZEND_API int ZEND_FASTCALL decrement_function(zval *op1) /* {{{ */ break; } break; + case IS_NULL: + case IS_FALSE: + case IS_TRUE: + /* Do nothing. */ + break; + case IS_REFERENCE: + op1 = Z_REFVAL_P(op1); + goto try_again; case IS_OBJECT: if (Z_OBJ_HANDLER_P(op1, do_operation)) { zval op2; - int res; - ZVAL_LONG(&op2, 1); - res = Z_OBJ_HANDLER_P(op1, do_operation)(ZEND_SUB, op1, op1, &op2); - - return res; + if (Z_OBJ_HANDLER_P(op1, do_operation)(ZEND_SUB, op1, op1, &op2) == SUCCESS) { + return SUCCESS; + } } + /* break missing intentionally */ + case IS_RESOURCE: + case IS_ARRAY: + zend_type_error("Cannot decrement %s", zend_get_type_by_const(Z_TYPE_P(op1))); return FAILURE; - case IS_REFERENCE: - op1 = Z_REFVAL_P(op1); - goto try_again; - default: - return FAILURE; + EMPTY_SWITCH_DEFAULT_CASE() } return SUCCESS; diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c index af8a3996de2d3..9975f7dc76ac4 100644 --- a/ext/opcache/Optimizer/zend_inference.c +++ b/ext/opcache/Optimizer/zend_inference.c @@ -4354,8 +4354,8 @@ int zend_may_throw(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_ && (t2 & MAY_BE_ANY) == MAY_BE_ARRAY) { return 0; } - return (t1 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT)) || - (t2 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT)); + return (t1 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) || + (t2 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)); case ZEND_DIV: case ZEND_MOD: if (!OP2_HAS_RANGE() || @@ -4367,12 +4367,12 @@ int zend_may_throw(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_ case ZEND_SUB: case ZEND_MUL: case ZEND_POW: - return (t1 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT)) || - (t2 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT)); + return (t1 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) || + (t2 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)); case ZEND_SL: case ZEND_SR: - return (t1 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT)) || - (t2 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT)) || + return (t1 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) || + (t2 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) || !OP2_HAS_RANGE() || OP2_MIN_RANGE() < 0; case ZEND_CONCAT: @@ -4386,15 +4386,16 @@ int zend_may_throw(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_ && (t2 & MAY_BE_ANY) == MAY_BE_STRING) { return 0; } - return (t1 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT)) || - (t2 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT)); + return (t1 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) || + (t2 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)); case ZEND_BW_NOT: return (t1 & (MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)); - case ZEND_BOOL_NOT: case ZEND_PRE_INC: case ZEND_POST_INC: case ZEND_PRE_DEC: case ZEND_POST_DEC: + return (t1 & (MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)); + case ZEND_BOOL_NOT: case ZEND_JMPZ: case ZEND_JMPNZ: case ZEND_JMPZNZ: diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index d357f72a2e769..586823c52eec2 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -2212,7 +2212,8 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op op1_def_info, OP1_DEF_REG_ADDR(), res_use_info, res_info, res_addr, - (op1_def_info & MAY_BE_LONG) && (op1_def_info & MAY_BE_DOUBLE) && zend_may_overflow(opline, op_array, ssa))) { + (op1_def_info & MAY_BE_LONG) && (op1_def_info & MAY_BE_DOUBLE) && zend_may_overflow(opline, op_array, ssa), + zend_may_throw(opline, ssa_op, op_array, ssa))) { goto jit_failure; } goto done; diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 20696f5f5f48b..93e30ae9e5476 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -2716,7 +2716,8 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par op1_def_info, OP1_DEF_REG_ADDR(), res_use_info, res_info, res_addr, - (op1_def_info & MAY_BE_LONG) && (op1_def_info & (MAY_BE_DOUBLE|MAY_BE_GUARD)) && zend_may_overflow_ex(opline, ssa_op, op_array, ssa))) { + (op1_def_info & MAY_BE_LONG) && (op1_def_info & (MAY_BE_DOUBLE|MAY_BE_GUARD)) && zend_may_overflow_ex(opline, ssa_op, op_array, ssa), + zend_may_throw(opline, ssa_op, op_array, ssa))) { goto jit_failure; } if ((op1_def_info & (MAY_BE_ANY|MAY_BE_GUARD)) == (MAY_BE_LONG|MAY_BE_GUARD)) { diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 9501e08375eb5..75ecbd130a652 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -3407,7 +3407,7 @@ static int zend_jit_update_regs(dasm_State **Dst, zend_jit_addr src, zend_jit_ad return 1; } -static int zend_jit_inc_dec(dasm_State **Dst, const zend_op *opline, const zend_op_array *op_array, uint32_t op1_info, zend_jit_addr op1_addr, uint32_t op1_def_info, zend_jit_addr op1_def_addr, uint32_t res_use_info, uint32_t res_info, zend_jit_addr res_addr, int may_overflow) +static int zend_jit_inc_dec(dasm_State **Dst, const zend_op *opline, const zend_op_array *op_array, uint32_t op1_info, zend_jit_addr op1_addr, uint32_t op1_def_info, zend_jit_addr op1_def_addr, uint32_t res_use_info, uint32_t res_info, zend_jit_addr res_addr, int may_overflow, int may_throw) { if (op1_info & ((MAY_BE_UNDEF|MAY_BE_ANY)-MAY_BE_LONG)) { | IF_NOT_ZVAL_TYPE op1_addr, IS_LONG, >2 @@ -3547,6 +3547,9 @@ static int zend_jit_inc_dec(dasm_State **Dst, const zend_op *opline, const zend_ | EXT_CALL decrement_function, r0 } } + if (may_throw) { + zend_jit_check_exception(Dst); + } } else { zend_reg tmp_reg; diff --git a/ext/standard/tests/math/pow_variation1_64bit.phpt b/ext/standard/tests/math/pow_variation1_64bit.phpt index 75b9f576db652..05cb9151ae1f7 100644 --- a/ext/standard/tests/math/pow_variation1_64bit.phpt +++ b/ext/standard/tests/math/pow_variation1_64bit.phpt @@ -174,9 +174,7 @@ Warning: A non-numeric value encountered in %s on line %d int(0) -- Iteration 23 -- - -Notice: Object of class classA could not be converted to number in %s on line %d -int(1) +Unsupported operand types: object ** int -- Iteration 24 -- int(0) diff --git a/ext/standard/tests/math/pow_variation2.phpt b/ext/standard/tests/math/pow_variation2.phpt index 8af96ef8d6d09..5d106ed9d2e7b 100644 --- a/ext/standard/tests/math/pow_variation2.phpt +++ b/ext/standard/tests/math/pow_variation2.phpt @@ -170,9 +170,7 @@ Warning: A non-numeric value encountered in %s on line %d float(1) -- Iteration 23 -- - -Notice: Object of class classA could not be converted to number in %s on line %d -float(20.3) +Unsupported operand types: float ** object -- Iteration 24 -- float(1) From 63a2238cf17cd4d3cdb6b5a7c16702a3dcd3ba98 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 2 Apr 2020 10:35:17 +0200 Subject: [PATCH 333/338] Try to fix 32-bit tests --- Zend/tests/decrement_001.phpt | 9 ++++++++- Zend/tests/increment_001.phpt | 9 ++++++++- ext/standard/tests/math/pow_variation1.phpt | 4 +--- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Zend/tests/decrement_001.phpt b/Zend/tests/decrement_001.phpt index 22d95b16ac667..5983c4eaa185b 100644 --- a/Zend/tests/decrement_001.phpt +++ b/Zend/tests/decrement_001.phpt @@ -26,13 +26,18 @@ $a = array( ); foreach ($a as $var) { - $var--; + try { + $var--; + } catch (TypeError $e) { + echo $e->getMessage(), "\n"; + } var_dump($var); } echo "Done\n"; ?> --EXPECTF-- +Cannot decrement array array(3) { [0]=> int(1) @@ -51,8 +56,10 @@ float(1.5) NULL bool(true) bool(false) +Cannot decrement object object(stdClass)#%d (0) { } +Cannot decrement array array(0) { } float(-2147483649) diff --git a/Zend/tests/increment_001.phpt b/Zend/tests/increment_001.phpt index 92f32bb657a2d..1e337d580239b 100644 --- a/Zend/tests/increment_001.phpt +++ b/Zend/tests/increment_001.phpt @@ -26,13 +26,18 @@ $a = array( ); foreach ($a as $var) { - $var++; + try { + $var++; + } catch (TypeError $e) { + echo $e->getMessage(), "\n"; + } var_dump($var); } echo "Done\n"; ?> --EXPECTF-- +Cannot decrement array array(3) { [0]=> int(1) @@ -51,8 +56,10 @@ float(3.5) int(1) bool(true) bool(false) +Cannot decrement object object(stdClass)#%d (0) { } +Cannot decrement array array(0) { } float(2147483648) diff --git a/ext/standard/tests/math/pow_variation1.phpt b/ext/standard/tests/math/pow_variation1.phpt index fc2c9aa1a23c0..f205c18a8364a 100644 --- a/ext/standard/tests/math/pow_variation1.phpt +++ b/ext/standard/tests/math/pow_variation1.phpt @@ -174,9 +174,7 @@ Warning: A non-numeric value encountered in %s on line %d int(0) -- Iteration 23 -- - -Notice: Object of class classA could not be converted to number in %s on line %d -int(1) +Unsupported operand types: object ** int -- Iteration 24 -- int(0) From b2a0b805ee031ad05e6ddc55d342dc19aeae9496 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 30 Apr 2020 10:35:56 +0200 Subject: [PATCH 334/338] Fix 32-bit tests --- Zend/tests/increment_001.phpt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Zend/tests/increment_001.phpt b/Zend/tests/increment_001.phpt index 1e337d580239b..a834c5c51d545 100644 --- a/Zend/tests/increment_001.phpt +++ b/Zend/tests/increment_001.phpt @@ -37,7 +37,7 @@ foreach ($a as $var) { echo "Done\n"; ?> --EXPECTF-- -Cannot decrement array +Cannot increment array array(3) { [0]=> int(1) @@ -56,10 +56,10 @@ float(3.5) int(1) bool(true) bool(false) -Cannot decrement object +Cannot increment object object(stdClass)#%d (0) { } -Cannot decrement array +Cannot increment array array(0) { } float(2147483648) From 486fefb6cf87c03d3cd27fa9e5feae5fd8832e7e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 30 Apr 2020 10:41:41 +0200 Subject: [PATCH 335/338] Fix may_throw for ASSIGN_OP --- ext/opcache/Optimizer/zend_inference.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c index 9975f7dc76ac4..d74904f84fa7f 100644 --- a/ext/opcache/Optimizer/zend_inference.c +++ b/ext/opcache/Optimizer/zend_inference.c @@ -4423,8 +4423,8 @@ int zend_may_throw(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_ && (t2 & MAY_BE_ANY) == MAY_BE_ARRAY) { return 0; } - return (t1 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT)) || - (t2 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT)); + return (t1 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) || + (t2 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)); } else if (opline->extended_value == ZEND_DIV || opline->extended_value == ZEND_MOD) { if (!OP2_HAS_RANGE() || @@ -4432,17 +4432,17 @@ int zend_may_throw(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_ /* Division by zero */ return 1; } - return (t1 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT)) || - (t2 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT)); + return (t1 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) || + (t2 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)); } else if (opline->extended_value == ZEND_SUB || opline->extended_value == ZEND_MUL || opline->extended_value == ZEND_POW) { - return (t1 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT)) || - (t2 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT)); + return (t1 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) || + (t2 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)); } else if (opline->extended_value == ZEND_SL || opline->extended_value == ZEND_SR) { - return (t1 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT)) || - (t2 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT)) || + return (t1 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) || + (t2 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) || !OP2_HAS_RANGE() || OP2_MIN_RANGE() < 0; } else if (opline->extended_value == ZEND_CONCAT) { @@ -4455,8 +4455,8 @@ int zend_may_throw(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_ && (t2 & MAY_BE_ANY) == MAY_BE_STRING) { return 0; } - return (t1 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT)) || - (t2 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT)); + return (t1 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) || + (t2 & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)); } return 1; case ZEND_ASSIGN: From dc711b6324ee05c7aaa0633df932aeeafeef10dd Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 30 Apr 2020 10:49:07 +0200 Subject: [PATCH 336/338] Also test assign op --- Zend/tests/operator_unsupported_types.phpt | 757 ++++++++++++++++++++- 1 file changed, 753 insertions(+), 4 deletions(-) diff --git a/Zend/tests/operator_unsupported_types.phpt b/Zend/tests/operator_unsupported_types.phpt index 8b250eac0ae4c..2570ad5a41361 100644 --- a/Zend/tests/operator_unsupported_types.phpt +++ b/Zend/tests/operator_unsupported_types.phpt @@ -44,7 +44,20 @@ function evalBinOp(string $op, string $value1, string $value2) { } } -echo "BINOP:\n"; +function evalAssignOp(string $op, string $value1, string $value2) { + $x = $origX = eval("return $value1;"); + try { + eval("\$x $op= $value2;"); + echo "No error for $value1 $op= $value2\n"; + } catch (Throwable $e) { + echo $e->getMessage() . "\n"; + if ($x !== $origX) { + die("Value corrupted!"); + } + } +} + +echo "BINARY OP:\n"; foreach ($binops as $op) { foreach ($illegalValues as $illegalValue1) { foreach ($illegalValues as $illegalValue2) { @@ -59,7 +72,24 @@ foreach ($binops as $op) { } } -echo "\n\nUNOP:\n"; +echo "\n\nASSIGN OP:\n"; +foreach ($binops as $op) { + if ($op === 'xor') continue; + + foreach ($illegalValues as $illegalValue1) { + foreach ($illegalValues as $illegalValue2) { + evalAssignOp($op, $illegalValue1, $illegalValue2); + } + } + foreach ($illegalValues as $illegalValue) { + foreach ($legalValues as $legalValue) { + evalAssignOp($op, $illegalValue, $legalValue); + evalAssignOp($op, $legalValue, $illegalValue); + } + } +} + +echo "\n\nUNARY OP:\n"; foreach ($illegalValues as $illegalValue) { try { eval("return ~$illegalValue;"); @@ -89,7 +119,7 @@ foreach ($illegalValues as $illegalValue) { ?> --EXPECTF-- -BINOP: +BINARY OP: No error for [] + [] Unsupported operand types: array + object Unsupported operand types: array + resource @@ -845,7 +875,726 @@ No error for STDOUT . "foo" No error for "foo" . STDOUT -UNOP: +ASSIGN OP: +No error for [] += [] +Unsupported operand types: array + object +Unsupported operand types: array + resource +Unsupported operand types: object + array +Unsupported operand types: object + object +Unsupported operand types: object + resource +Unsupported operand types: resource + array +Unsupported operand types: resource + object +Unsupported operand types: resource + resource +Unsupported operand types: array + null +Unsupported operand types: null + array +Unsupported operand types: array + bool +Unsupported operand types: bool + array +Unsupported operand types: array + bool +Unsupported operand types: bool + array +Unsupported operand types: array + int +Unsupported operand types: int + array +Unsupported operand types: array + float +Unsupported operand types: float + array +Unsupported operand types: array + string +Unsupported operand types: string + array +Unsupported operand types: array + string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string + array +Unsupported operand types: object + null +Unsupported operand types: null + object +Unsupported operand types: object + bool +Unsupported operand types: bool + object +Unsupported operand types: object + bool +Unsupported operand types: bool + object +Unsupported operand types: object + int +Unsupported operand types: int + object +Unsupported operand types: object + float +Unsupported operand types: float + object +Unsupported operand types: object + string +Unsupported operand types: string + object +Unsupported operand types: object + string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string + object +Unsupported operand types: resource + null +Unsupported operand types: null + resource +Unsupported operand types: resource + bool +Unsupported operand types: bool + resource +Unsupported operand types: resource + bool +Unsupported operand types: bool + resource +Unsupported operand types: resource + int +Unsupported operand types: int + resource +Unsupported operand types: resource + float +Unsupported operand types: float + resource +Unsupported operand types: resource + string +Unsupported operand types: string + resource +Unsupported operand types: resource + string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string + resource +Unsupported operand types: array - array +Unsupported operand types: array - object +Unsupported operand types: array - resource +Unsupported operand types: object - array +Unsupported operand types: object - object +Unsupported operand types: object - resource +Unsupported operand types: resource - array +Unsupported operand types: resource - object +Unsupported operand types: resource - resource +Unsupported operand types: array - null +Unsupported operand types: null - array +Unsupported operand types: array - bool +Unsupported operand types: bool - array +Unsupported operand types: array - bool +Unsupported operand types: bool - array +Unsupported operand types: array - int +Unsupported operand types: int - array +Unsupported operand types: array - float +Unsupported operand types: float - array +Unsupported operand types: array - string +Unsupported operand types: string - array +Unsupported operand types: array - string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string - array +Unsupported operand types: object - null +Unsupported operand types: null - object +Unsupported operand types: object - bool +Unsupported operand types: bool - object +Unsupported operand types: object - bool +Unsupported operand types: bool - object +Unsupported operand types: object - int +Unsupported operand types: int - object +Unsupported operand types: object - float +Unsupported operand types: float - object +Unsupported operand types: object - string +Unsupported operand types: string - object +Unsupported operand types: object - string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string - object +Unsupported operand types: resource - null +Unsupported operand types: null - resource +Unsupported operand types: resource - bool +Unsupported operand types: bool - resource +Unsupported operand types: resource - bool +Unsupported operand types: bool - resource +Unsupported operand types: resource - int +Unsupported operand types: int - resource +Unsupported operand types: resource - float +Unsupported operand types: float - resource +Unsupported operand types: resource - string +Unsupported operand types: string - resource +Unsupported operand types: resource - string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string - resource +Unsupported operand types: array * array +Unsupported operand types: array * object +Unsupported operand types: array * resource +Unsupported operand types: object * array +Unsupported operand types: object * object +Unsupported operand types: object * resource +Unsupported operand types: resource * array +Unsupported operand types: resource * object +Unsupported operand types: resource * resource +Unsupported operand types: array * null +Unsupported operand types: null * array +Unsupported operand types: array * bool +Unsupported operand types: bool * array +Unsupported operand types: array * bool +Unsupported operand types: bool * array +Unsupported operand types: array * int +Unsupported operand types: int * array +Unsupported operand types: array * float +Unsupported operand types: float * array +Unsupported operand types: array * string +Unsupported operand types: string * array +Unsupported operand types: array * string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string * array +Unsupported operand types: object * null +Unsupported operand types: null * object +Unsupported operand types: object * bool +Unsupported operand types: bool * object +Unsupported operand types: object * bool +Unsupported operand types: bool * object +Unsupported operand types: object * int +Unsupported operand types: int * object +Unsupported operand types: object * float +Unsupported operand types: float * object +Unsupported operand types: object * string +Unsupported operand types: string * object +Unsupported operand types: object * string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string * object +Unsupported operand types: resource * null +Unsupported operand types: null * resource +Unsupported operand types: resource * bool +Unsupported operand types: bool * resource +Unsupported operand types: resource * bool +Unsupported operand types: bool * resource +Unsupported operand types: resource * int +Unsupported operand types: int * resource +Unsupported operand types: resource * float +Unsupported operand types: float * resource +Unsupported operand types: resource * string +Unsupported operand types: string * resource +Unsupported operand types: resource * string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string * resource +Unsupported operand types: array / array +Unsupported operand types: array / object +Unsupported operand types: array / resource +Unsupported operand types: object / array +Unsupported operand types: object / object +Unsupported operand types: object / resource +Unsupported operand types: resource / array +Unsupported operand types: resource / object +Unsupported operand types: resource / resource +Unsupported operand types: array / null +Unsupported operand types: null / array +Unsupported operand types: array / bool +Unsupported operand types: bool / array +Unsupported operand types: array / bool +Unsupported operand types: bool / array +Unsupported operand types: array / int +Unsupported operand types: int / array +Unsupported operand types: array / float +Unsupported operand types: float / array +Unsupported operand types: array / string +Unsupported operand types: string / array +Unsupported operand types: array / string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string / array +Unsupported operand types: object / null +Unsupported operand types: null / object +Unsupported operand types: object / bool +Unsupported operand types: bool / object +Unsupported operand types: object / bool +Unsupported operand types: bool / object +Unsupported operand types: object / int +Unsupported operand types: int / object +Unsupported operand types: object / float +Unsupported operand types: float / object +Unsupported operand types: object / string +Unsupported operand types: string / object +Unsupported operand types: object / string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string / object +Unsupported operand types: resource / null +Unsupported operand types: null / resource +Unsupported operand types: resource / bool +Unsupported operand types: bool / resource +Unsupported operand types: resource / bool +Unsupported operand types: bool / resource +Unsupported operand types: resource / int +Unsupported operand types: int / resource +Unsupported operand types: resource / float +Unsupported operand types: float / resource +Unsupported operand types: resource / string +Unsupported operand types: string / resource +Unsupported operand types: resource / string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string / resource +Unsupported operand types: array % array +Unsupported operand types: array % object +Unsupported operand types: array % resource +Unsupported operand types: object % array +Unsupported operand types: object % object +Unsupported operand types: object % resource +Unsupported operand types: resource % array +Unsupported operand types: resource % object +Unsupported operand types: resource % resource +Unsupported operand types: array % null +Unsupported operand types: null % array +Unsupported operand types: array % bool +Unsupported operand types: bool % array +Unsupported operand types: array % bool +Unsupported operand types: bool % array +Unsupported operand types: array % int +Unsupported operand types: int % array +Unsupported operand types: array % float +Unsupported operand types: float % array +Unsupported operand types: array % string +Unsupported operand types: string % array +Unsupported operand types: array % string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string % array +Unsupported operand types: object % null +Unsupported operand types: null % object +Unsupported operand types: object % bool +Unsupported operand types: bool % object +Unsupported operand types: object % bool +Unsupported operand types: bool % object +Unsupported operand types: object % int +Unsupported operand types: int % object +Unsupported operand types: object % float +Unsupported operand types: float % object +Unsupported operand types: object % string +Unsupported operand types: string % object +Unsupported operand types: object % string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string % object +Unsupported operand types: resource % null +Unsupported operand types: null % resource +Unsupported operand types: resource % bool +Unsupported operand types: bool % resource +Unsupported operand types: resource % bool +Unsupported operand types: bool % resource +Unsupported operand types: resource % int +Unsupported operand types: int % resource +Unsupported operand types: resource % float +Unsupported operand types: float % resource +Unsupported operand types: resource % string +Unsupported operand types: string % resource +Unsupported operand types: resource % string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string % resource +Unsupported operand types: array ** array +Unsupported operand types: array ** object +Unsupported operand types: array ** resource +Unsupported operand types: object ** array +Unsupported operand types: object ** object +Unsupported operand types: object ** resource +Unsupported operand types: resource ** array +Unsupported operand types: resource ** object +Unsupported operand types: resource ** resource +Unsupported operand types: array ** null +Unsupported operand types: null ** array +Unsupported operand types: array ** bool +Unsupported operand types: bool ** array +Unsupported operand types: array ** bool +Unsupported operand types: bool ** array +Unsupported operand types: array ** int +Unsupported operand types: int ** array +Unsupported operand types: array ** float +Unsupported operand types: float ** array +Unsupported operand types: array ** string +Unsupported operand types: string ** array +Unsupported operand types: array ** string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string ** array +Unsupported operand types: object ** null +Unsupported operand types: null ** object +Unsupported operand types: object ** bool +Unsupported operand types: bool ** object +Unsupported operand types: object ** bool +Unsupported operand types: bool ** object +Unsupported operand types: object ** int +Unsupported operand types: int ** object +Unsupported operand types: object ** float +Unsupported operand types: float ** object +Unsupported operand types: object ** string +Unsupported operand types: string ** object +Unsupported operand types: object ** string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string ** object +Unsupported operand types: resource ** null +Unsupported operand types: null ** resource +Unsupported operand types: resource ** bool +Unsupported operand types: bool ** resource +Unsupported operand types: resource ** bool +Unsupported operand types: bool ** resource +Unsupported operand types: resource ** int +Unsupported operand types: int ** resource +Unsupported operand types: resource ** float +Unsupported operand types: float ** resource +Unsupported operand types: resource ** string +Unsupported operand types: string ** resource +Unsupported operand types: resource ** string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string ** resource +Unsupported operand types: array << array +Unsupported operand types: array << object +Unsupported operand types: array << resource +Unsupported operand types: object << array +Unsupported operand types: object << object +Unsupported operand types: object << resource +Unsupported operand types: resource << array +Unsupported operand types: resource << object +Unsupported operand types: resource << resource +Unsupported operand types: array << null +Unsupported operand types: null << array +Unsupported operand types: array << bool +Unsupported operand types: bool << array +Unsupported operand types: array << bool +Unsupported operand types: bool << array +Unsupported operand types: array << int +Unsupported operand types: int << array +Unsupported operand types: array << float +Unsupported operand types: float << array +Unsupported operand types: array << string +Unsupported operand types: string << array +Unsupported operand types: array << string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string << array +Unsupported operand types: object << null +Unsupported operand types: null << object +Unsupported operand types: object << bool +Unsupported operand types: bool << object +Unsupported operand types: object << bool +Unsupported operand types: bool << object +Unsupported operand types: object << int +Unsupported operand types: int << object +Unsupported operand types: object << float +Unsupported operand types: float << object +Unsupported operand types: object << string +Unsupported operand types: string << object +Unsupported operand types: object << string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string << object +Unsupported operand types: resource << null +Unsupported operand types: null << resource +Unsupported operand types: resource << bool +Unsupported operand types: bool << resource +Unsupported operand types: resource << bool +Unsupported operand types: bool << resource +Unsupported operand types: resource << int +Unsupported operand types: int << resource +Unsupported operand types: resource << float +Unsupported operand types: float << resource +Unsupported operand types: resource << string +Unsupported operand types: string << resource +Unsupported operand types: resource << string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string << resource +Unsupported operand types: array >> array +Unsupported operand types: array >> object +Unsupported operand types: array >> resource +Unsupported operand types: object >> array +Unsupported operand types: object >> object +Unsupported operand types: object >> resource +Unsupported operand types: resource >> array +Unsupported operand types: resource >> object +Unsupported operand types: resource >> resource +Unsupported operand types: array >> null +Unsupported operand types: null >> array +Unsupported operand types: array >> bool +Unsupported operand types: bool >> array +Unsupported operand types: array >> bool +Unsupported operand types: bool >> array +Unsupported operand types: array >> int +Unsupported operand types: int >> array +Unsupported operand types: array >> float +Unsupported operand types: float >> array +Unsupported operand types: array >> string +Unsupported operand types: string >> array +Unsupported operand types: array >> string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string >> array +Unsupported operand types: object >> null +Unsupported operand types: null >> object +Unsupported operand types: object >> bool +Unsupported operand types: bool >> object +Unsupported operand types: object >> bool +Unsupported operand types: bool >> object +Unsupported operand types: object >> int +Unsupported operand types: int >> object +Unsupported operand types: object >> float +Unsupported operand types: float >> object +Unsupported operand types: object >> string +Unsupported operand types: string >> object +Unsupported operand types: object >> string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string >> object +Unsupported operand types: resource >> null +Unsupported operand types: null >> resource +Unsupported operand types: resource >> bool +Unsupported operand types: bool >> resource +Unsupported operand types: resource >> bool +Unsupported operand types: bool >> resource +Unsupported operand types: resource >> int +Unsupported operand types: int >> resource +Unsupported operand types: resource >> float +Unsupported operand types: float >> resource +Unsupported operand types: resource >> string +Unsupported operand types: string >> resource +Unsupported operand types: resource >> string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string >> resource +Unsupported operand types: array & array +Unsupported operand types: array & object +Unsupported operand types: array & resource +Unsupported operand types: object & array +Unsupported operand types: object & object +Unsupported operand types: object & resource +Unsupported operand types: resource & array +Unsupported operand types: resource & object +Unsupported operand types: resource & resource +Unsupported operand types: array & null +Unsupported operand types: null & array +Unsupported operand types: array & bool +Unsupported operand types: bool & array +Unsupported operand types: array & bool +Unsupported operand types: bool & array +Unsupported operand types: array & int +Unsupported operand types: int & array +Unsupported operand types: array & float +Unsupported operand types: float & array +Unsupported operand types: array & string +Unsupported operand types: string & array +Unsupported operand types: array & string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string & array +Unsupported operand types: object & null +Unsupported operand types: null & object +Unsupported operand types: object & bool +Unsupported operand types: bool & object +Unsupported operand types: object & bool +Unsupported operand types: bool & object +Unsupported operand types: object & int +Unsupported operand types: int & object +Unsupported operand types: object & float +Unsupported operand types: float & object +Unsupported operand types: object & string +Unsupported operand types: string & object +Unsupported operand types: object & string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string & object +Unsupported operand types: resource & null +Unsupported operand types: null & resource +Unsupported operand types: resource & bool +Unsupported operand types: bool & resource +Unsupported operand types: resource & bool +Unsupported operand types: bool & resource +Unsupported operand types: resource & int +Unsupported operand types: int & resource +Unsupported operand types: resource & float +Unsupported operand types: float & resource +Unsupported operand types: resource & string +Unsupported operand types: string & resource +Unsupported operand types: resource & string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string & resource +Unsupported operand types: array | array +Unsupported operand types: array | object +Unsupported operand types: array | resource +Unsupported operand types: object | array +Unsupported operand types: object | object +Unsupported operand types: object | resource +Unsupported operand types: resource | array +Unsupported operand types: resource | object +Unsupported operand types: resource | resource +Unsupported operand types: array | null +Unsupported operand types: null | array +Unsupported operand types: array | bool +Unsupported operand types: bool | array +Unsupported operand types: array | bool +Unsupported operand types: bool | array +Unsupported operand types: array | int +Unsupported operand types: int | array +Unsupported operand types: array | float +Unsupported operand types: float | array +Unsupported operand types: array | string +Unsupported operand types: string | array +Unsupported operand types: array | string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string | array +Unsupported operand types: object | null +Unsupported operand types: null | object +Unsupported operand types: object | bool +Unsupported operand types: bool | object +Unsupported operand types: object | bool +Unsupported operand types: bool | object +Unsupported operand types: object | int +Unsupported operand types: int | object +Unsupported operand types: object | float +Unsupported operand types: float | object +Unsupported operand types: object | string +Unsupported operand types: string | object +Unsupported operand types: object | string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string | object +Unsupported operand types: resource | null +Unsupported operand types: null | resource +Unsupported operand types: resource | bool +Unsupported operand types: bool | resource +Unsupported operand types: resource | bool +Unsupported operand types: bool | resource +Unsupported operand types: resource | int +Unsupported operand types: int | resource +Unsupported operand types: resource | float +Unsupported operand types: float | resource +Unsupported operand types: resource | string +Unsupported operand types: string | resource +Unsupported operand types: resource | string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string | resource +Unsupported operand types: array ^ array +Unsupported operand types: array ^ object +Unsupported operand types: array ^ resource +Unsupported operand types: object ^ array +Unsupported operand types: object ^ object +Unsupported operand types: object ^ resource +Unsupported operand types: resource ^ array +Unsupported operand types: resource ^ object +Unsupported operand types: resource ^ resource +Unsupported operand types: array ^ null +Unsupported operand types: null ^ array +Unsupported operand types: array ^ bool +Unsupported operand types: bool ^ array +Unsupported operand types: array ^ bool +Unsupported operand types: bool ^ array +Unsupported operand types: array ^ int +Unsupported operand types: int ^ array +Unsupported operand types: array ^ float +Unsupported operand types: float ^ array +Unsupported operand types: array ^ string +Unsupported operand types: string ^ array +Unsupported operand types: array ^ string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string ^ array +Unsupported operand types: object ^ null +Unsupported operand types: null ^ object +Unsupported operand types: object ^ bool +Unsupported operand types: bool ^ object +Unsupported operand types: object ^ bool +Unsupported operand types: bool ^ object +Unsupported operand types: object ^ int +Unsupported operand types: int ^ object +Unsupported operand types: object ^ float +Unsupported operand types: float ^ object +Unsupported operand types: object ^ string +Unsupported operand types: string ^ object +Unsupported operand types: object ^ string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string ^ object +Unsupported operand types: resource ^ null +Unsupported operand types: null ^ resource +Unsupported operand types: resource ^ bool +Unsupported operand types: bool ^ resource +Unsupported operand types: resource ^ bool +Unsupported operand types: bool ^ resource +Unsupported operand types: resource ^ int +Unsupported operand types: int ^ resource +Unsupported operand types: resource ^ float +Unsupported operand types: float ^ resource +Unsupported operand types: resource ^ string +Unsupported operand types: string ^ resource +Unsupported operand types: resource ^ string + +Warning: A non-numeric value encountered in %s on line %d +Unsupported operand types: string ^ resource + +Warning: Array to string conversion in %s on line %d + +Warning: Array to string conversion in %s on line %d +No error for [] .= [] + +Warning: Array to string conversion in %s on line %d +Object of class stdClass could not be converted to string + +Warning: Array to string conversion in %s on line %d +No error for [] .= STDOUT +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string + +Warning: Array to string conversion in %s on line %d +No error for STDOUT .= [] +Object of class stdClass could not be converted to string +No error for STDOUT .= STDOUT + +Warning: Array to string conversion in %s on line %d +No error for [] .= null + +Warning: Array to string conversion in %s on line %d +No error for null .= [] + +Warning: Array to string conversion in %s on line %d +No error for [] .= true + +Warning: Array to string conversion in %s on line %d +No error for true .= [] + +Warning: Array to string conversion in %s on line %d +No error for [] .= false + +Warning: Array to string conversion in %s on line %d +No error for false .= [] + +Warning: Array to string conversion in %s on line %d +No error for [] .= 2 + +Warning: Array to string conversion in %s on line %d +No error for 2 .= [] + +Warning: Array to string conversion in %s on line %d +No error for [] .= 3.5 + +Warning: Array to string conversion in %s on line %d +No error for 3.5 .= [] + +Warning: Array to string conversion in %s on line %d +No error for [] .= "123" + +Warning: Array to string conversion in %s on line %d +No error for "123" .= [] + +Warning: Array to string conversion in %s on line %d +No error for [] .= "foo" + +Warning: Array to string conversion in %s on line %d +No error for "foo" .= [] +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +Object of class stdClass could not be converted to string +No error for STDOUT .= null +No error for null .= STDOUT +No error for STDOUT .= true +No error for true .= STDOUT +No error for STDOUT .= false +No error for false .= STDOUT +No error for STDOUT .= 2 +No error for 2 .= STDOUT +No error for STDOUT .= 3.5 +No error for 3.5 .= STDOUT +No error for STDOUT .= "123" +No error for "123" .= STDOUT +No error for STDOUT .= "foo" +No error for "foo" .= STDOUT + + +UNARY OP: Cannot perform bitwise not on array Cannot perform bitwise not on object Cannot perform bitwise not on resource From 9d0202986de3ae13c66e289174465402736965bb Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 30 Apr 2020 10:55:08 +0200 Subject: [PATCH 337/338] Don't use EXPECTF with large output PCRE gives up on regular expressions of this size. --- Zend/tests/operator_unsupported_types.phpt | 298 +++++++-------------- scripts/dev/bless_tests.php | 3 +- 2 files changed, 105 insertions(+), 196 deletions(-) diff --git a/Zend/tests/operator_unsupported_types.phpt b/Zend/tests/operator_unsupported_types.phpt index 2570ad5a41361..9004897d71415 100644 --- a/Zend/tests/operator_unsupported_types.phpt +++ b/Zend/tests/operator_unsupported_types.phpt @@ -35,6 +35,11 @@ $legalValues = [ '"foo"', // Semi-legal. ]; +set_error_handler(function($errno, $errstr) { + assert($errno == E_WARNING); + echo "Warning: $errstr\n"; +}); + function evalBinOp(string $op, string $value1, string $value2) { try { eval("return $value1 $op $value2;"); @@ -118,7 +123,7 @@ foreach ($illegalValues as $illegalValue) { } ?> ---EXPECTF-- +--EXPECT-- BINARY OP: No error for [] + [] Unsupported operand types: array + object @@ -142,8 +147,7 @@ Unsupported operand types: float + array Unsupported operand types: array + string Unsupported operand types: string + array Unsupported operand types: array + string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string + array Unsupported operand types: object + null Unsupported operand types: null + object @@ -158,8 +162,7 @@ Unsupported operand types: float + object Unsupported operand types: object + string Unsupported operand types: string + object Unsupported operand types: object + string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string + object Unsupported operand types: resource + null Unsupported operand types: null + resource @@ -174,8 +177,7 @@ Unsupported operand types: float + resource Unsupported operand types: resource + string Unsupported operand types: string + resource Unsupported operand types: resource + string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string + resource Unsupported operand types: array - array Unsupported operand types: array - object @@ -199,8 +201,7 @@ Unsupported operand types: float - array Unsupported operand types: array - string Unsupported operand types: string - array Unsupported operand types: array - string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string - array Unsupported operand types: object - null Unsupported operand types: null - object @@ -215,8 +216,7 @@ Unsupported operand types: float - object Unsupported operand types: object - string Unsupported operand types: string - object Unsupported operand types: object - string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string - object Unsupported operand types: resource - null Unsupported operand types: null - resource @@ -231,8 +231,7 @@ Unsupported operand types: float - resource Unsupported operand types: resource - string Unsupported operand types: string - resource Unsupported operand types: resource - string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string - resource Unsupported operand types: array * array Unsupported operand types: object * array @@ -256,8 +255,7 @@ Unsupported operand types: float * array Unsupported operand types: array * string Unsupported operand types: string * array Unsupported operand types: array * string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string * array Unsupported operand types: object * null Unsupported operand types: object * null @@ -309,8 +307,7 @@ Unsupported operand types: float / array Unsupported operand types: array / string Unsupported operand types: string / array Unsupported operand types: array / string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string / array Unsupported operand types: object / null Unsupported operand types: null / object @@ -325,8 +322,7 @@ Unsupported operand types: float / object Unsupported operand types: object / string Unsupported operand types: string / object Unsupported operand types: object / string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string / object Unsupported operand types: resource / null Unsupported operand types: null / resource @@ -341,8 +337,7 @@ Unsupported operand types: float / resource Unsupported operand types: resource / string Unsupported operand types: string / resource Unsupported operand types: resource / string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string / resource Unsupported operand types: array % array Unsupported operand types: array % object @@ -366,8 +361,7 @@ Unsupported operand types: float % array Unsupported operand types: array % string Unsupported operand types: string % array Unsupported operand types: array % string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string % array Unsupported operand types: object % null Unsupported operand types: null % object @@ -382,8 +376,7 @@ Unsupported operand types: float % object Unsupported operand types: object % string Unsupported operand types: string % object Unsupported operand types: object % string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string % object Unsupported operand types: resource % null Unsupported operand types: null % resource @@ -398,8 +391,7 @@ Unsupported operand types: float % resource Unsupported operand types: resource % string Unsupported operand types: string % resource Unsupported operand types: resource % string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string % resource Unsupported operand types: array ** array Unsupported operand types: array ** object @@ -423,8 +415,7 @@ Unsupported operand types: float ** array Unsupported operand types: array ** string Unsupported operand types: string ** array Unsupported operand types: array ** string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string ** array Unsupported operand types: object ** null Unsupported operand types: null ** object @@ -439,8 +430,7 @@ Unsupported operand types: float ** object Unsupported operand types: object ** string Unsupported operand types: string ** object Unsupported operand types: object ** string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string ** object Unsupported operand types: resource ** null Unsupported operand types: null ** resource @@ -455,8 +445,7 @@ Unsupported operand types: float ** resource Unsupported operand types: resource ** string Unsupported operand types: string ** resource Unsupported operand types: resource ** string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string ** resource Unsupported operand types: array << array Unsupported operand types: array << object @@ -480,8 +469,7 @@ Unsupported operand types: float << array Unsupported operand types: array << string Unsupported operand types: string << array Unsupported operand types: array << string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string << array Unsupported operand types: object << null Unsupported operand types: null << object @@ -496,8 +484,7 @@ Unsupported operand types: float << object Unsupported operand types: object << string Unsupported operand types: string << object Unsupported operand types: object << string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string << object Unsupported operand types: resource << null Unsupported operand types: null << resource @@ -512,8 +499,7 @@ Unsupported operand types: float << resource Unsupported operand types: resource << string Unsupported operand types: string << resource Unsupported operand types: resource << string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string << resource Unsupported operand types: array >> array Unsupported operand types: array >> object @@ -537,8 +523,7 @@ Unsupported operand types: float >> array Unsupported operand types: array >> string Unsupported operand types: string >> array Unsupported operand types: array >> string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string >> array Unsupported operand types: object >> null Unsupported operand types: null >> object @@ -553,8 +538,7 @@ Unsupported operand types: float >> object Unsupported operand types: object >> string Unsupported operand types: string >> object Unsupported operand types: object >> string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string >> object Unsupported operand types: resource >> null Unsupported operand types: null >> resource @@ -569,8 +553,7 @@ Unsupported operand types: float >> resource Unsupported operand types: resource >> string Unsupported operand types: string >> resource Unsupported operand types: resource >> string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string >> resource Unsupported operand types: array & array Unsupported operand types: object & array @@ -594,8 +577,7 @@ Unsupported operand types: float & array Unsupported operand types: array & string Unsupported operand types: string & array Unsupported operand types: array & string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string & array Unsupported operand types: object & null Unsupported operand types: object & null @@ -647,8 +629,7 @@ Unsupported operand types: float | array Unsupported operand types: array | string Unsupported operand types: string | array Unsupported operand types: array | string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string | array Unsupported operand types: object | null Unsupported operand types: object | null @@ -700,8 +681,7 @@ Unsupported operand types: float ^ array Unsupported operand types: array ^ string Unsupported operand types: string ^ array Unsupported operand types: array ^ string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string ^ array Unsupported operand types: object ^ null Unsupported operand types: object ^ null @@ -782,68 +762,48 @@ No error for STDOUT xor "123" No error for "123" xor STDOUT No error for STDOUT xor "foo" No error for "foo" xor STDOUT - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion +Warning: Array to string conversion No error for [] . [] - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion Object of class stdClass could not be converted to string - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for [] . STDOUT - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion Object of class stdClass could not be converted to string Object of class stdClass could not be converted to string Object of class stdClass could not be converted to string - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for STDOUT . [] Object of class stdClass could not be converted to string No error for STDOUT . STDOUT - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for [] . null - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for null . [] - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for [] . true - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for true . [] - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for [] . false - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for false . [] - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for [] . 2 - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for 2 . [] - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for [] . 3.5 - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for 3.5 . [] - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for [] . "123" - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for "123" . [] - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for [] . "foo" - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for "foo" . [] Object of class stdClass could not be converted to string Object of class stdClass could not be converted to string @@ -898,8 +858,7 @@ Unsupported operand types: float + array Unsupported operand types: array + string Unsupported operand types: string + array Unsupported operand types: array + string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string + array Unsupported operand types: object + null Unsupported operand types: null + object @@ -914,8 +873,7 @@ Unsupported operand types: float + object Unsupported operand types: object + string Unsupported operand types: string + object Unsupported operand types: object + string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string + object Unsupported operand types: resource + null Unsupported operand types: null + resource @@ -930,8 +888,7 @@ Unsupported operand types: float + resource Unsupported operand types: resource + string Unsupported operand types: string + resource Unsupported operand types: resource + string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string + resource Unsupported operand types: array - array Unsupported operand types: array - object @@ -955,8 +912,7 @@ Unsupported operand types: float - array Unsupported operand types: array - string Unsupported operand types: string - array Unsupported operand types: array - string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string - array Unsupported operand types: object - null Unsupported operand types: null - object @@ -971,8 +927,7 @@ Unsupported operand types: float - object Unsupported operand types: object - string Unsupported operand types: string - object Unsupported operand types: object - string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string - object Unsupported operand types: resource - null Unsupported operand types: null - resource @@ -987,8 +942,7 @@ Unsupported operand types: float - resource Unsupported operand types: resource - string Unsupported operand types: string - resource Unsupported operand types: resource - string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string - resource Unsupported operand types: array * array Unsupported operand types: array * object @@ -1012,8 +966,7 @@ Unsupported operand types: float * array Unsupported operand types: array * string Unsupported operand types: string * array Unsupported operand types: array * string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string * array Unsupported operand types: object * null Unsupported operand types: null * object @@ -1028,8 +981,7 @@ Unsupported operand types: float * object Unsupported operand types: object * string Unsupported operand types: string * object Unsupported operand types: object * string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string * object Unsupported operand types: resource * null Unsupported operand types: null * resource @@ -1044,8 +996,7 @@ Unsupported operand types: float * resource Unsupported operand types: resource * string Unsupported operand types: string * resource Unsupported operand types: resource * string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string * resource Unsupported operand types: array / array Unsupported operand types: array / object @@ -1069,8 +1020,7 @@ Unsupported operand types: float / array Unsupported operand types: array / string Unsupported operand types: string / array Unsupported operand types: array / string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string / array Unsupported operand types: object / null Unsupported operand types: null / object @@ -1085,8 +1035,7 @@ Unsupported operand types: float / object Unsupported operand types: object / string Unsupported operand types: string / object Unsupported operand types: object / string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string / object Unsupported operand types: resource / null Unsupported operand types: null / resource @@ -1101,8 +1050,7 @@ Unsupported operand types: float / resource Unsupported operand types: resource / string Unsupported operand types: string / resource Unsupported operand types: resource / string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string / resource Unsupported operand types: array % array Unsupported operand types: array % object @@ -1126,8 +1074,7 @@ Unsupported operand types: float % array Unsupported operand types: array % string Unsupported operand types: string % array Unsupported operand types: array % string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string % array Unsupported operand types: object % null Unsupported operand types: null % object @@ -1142,8 +1089,7 @@ Unsupported operand types: float % object Unsupported operand types: object % string Unsupported operand types: string % object Unsupported operand types: object % string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string % object Unsupported operand types: resource % null Unsupported operand types: null % resource @@ -1158,8 +1104,7 @@ Unsupported operand types: float % resource Unsupported operand types: resource % string Unsupported operand types: string % resource Unsupported operand types: resource % string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string % resource Unsupported operand types: array ** array Unsupported operand types: array ** object @@ -1183,8 +1128,7 @@ Unsupported operand types: float ** array Unsupported operand types: array ** string Unsupported operand types: string ** array Unsupported operand types: array ** string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string ** array Unsupported operand types: object ** null Unsupported operand types: null ** object @@ -1199,8 +1143,7 @@ Unsupported operand types: float ** object Unsupported operand types: object ** string Unsupported operand types: string ** object Unsupported operand types: object ** string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string ** object Unsupported operand types: resource ** null Unsupported operand types: null ** resource @@ -1215,8 +1158,7 @@ Unsupported operand types: float ** resource Unsupported operand types: resource ** string Unsupported operand types: string ** resource Unsupported operand types: resource ** string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string ** resource Unsupported operand types: array << array Unsupported operand types: array << object @@ -1240,8 +1182,7 @@ Unsupported operand types: float << array Unsupported operand types: array << string Unsupported operand types: string << array Unsupported operand types: array << string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string << array Unsupported operand types: object << null Unsupported operand types: null << object @@ -1256,8 +1197,7 @@ Unsupported operand types: float << object Unsupported operand types: object << string Unsupported operand types: string << object Unsupported operand types: object << string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string << object Unsupported operand types: resource << null Unsupported operand types: null << resource @@ -1272,8 +1212,7 @@ Unsupported operand types: float << resource Unsupported operand types: resource << string Unsupported operand types: string << resource Unsupported operand types: resource << string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string << resource Unsupported operand types: array >> array Unsupported operand types: array >> object @@ -1297,8 +1236,7 @@ Unsupported operand types: float >> array Unsupported operand types: array >> string Unsupported operand types: string >> array Unsupported operand types: array >> string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string >> array Unsupported operand types: object >> null Unsupported operand types: null >> object @@ -1313,8 +1251,7 @@ Unsupported operand types: float >> object Unsupported operand types: object >> string Unsupported operand types: string >> object Unsupported operand types: object >> string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string >> object Unsupported operand types: resource >> null Unsupported operand types: null >> resource @@ -1329,8 +1266,7 @@ Unsupported operand types: float >> resource Unsupported operand types: resource >> string Unsupported operand types: string >> resource Unsupported operand types: resource >> string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string >> resource Unsupported operand types: array & array Unsupported operand types: array & object @@ -1354,8 +1290,7 @@ Unsupported operand types: float & array Unsupported operand types: array & string Unsupported operand types: string & array Unsupported operand types: array & string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string & array Unsupported operand types: object & null Unsupported operand types: null & object @@ -1370,8 +1305,7 @@ Unsupported operand types: float & object Unsupported operand types: object & string Unsupported operand types: string & object Unsupported operand types: object & string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string & object Unsupported operand types: resource & null Unsupported operand types: null & resource @@ -1386,8 +1320,7 @@ Unsupported operand types: float & resource Unsupported operand types: resource & string Unsupported operand types: string & resource Unsupported operand types: resource & string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string & resource Unsupported operand types: array | array Unsupported operand types: array | object @@ -1411,8 +1344,7 @@ Unsupported operand types: float | array Unsupported operand types: array | string Unsupported operand types: string | array Unsupported operand types: array | string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string | array Unsupported operand types: object | null Unsupported operand types: null | object @@ -1427,8 +1359,7 @@ Unsupported operand types: float | object Unsupported operand types: object | string Unsupported operand types: string | object Unsupported operand types: object | string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string | object Unsupported operand types: resource | null Unsupported operand types: null | resource @@ -1443,8 +1374,7 @@ Unsupported operand types: float | resource Unsupported operand types: resource | string Unsupported operand types: string | resource Unsupported operand types: resource | string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string | resource Unsupported operand types: array ^ array Unsupported operand types: array ^ object @@ -1468,8 +1398,7 @@ Unsupported operand types: float ^ array Unsupported operand types: array ^ string Unsupported operand types: string ^ array Unsupported operand types: array ^ string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string ^ array Unsupported operand types: object ^ null Unsupported operand types: null ^ object @@ -1484,8 +1413,7 @@ Unsupported operand types: float ^ object Unsupported operand types: object ^ string Unsupported operand types: string ^ object Unsupported operand types: object ^ string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string ^ object Unsupported operand types: resource ^ null Unsupported operand types: null ^ resource @@ -1500,69 +1428,49 @@ Unsupported operand types: float ^ resource Unsupported operand types: resource ^ string Unsupported operand types: string ^ resource Unsupported operand types: resource ^ string - -Warning: A non-numeric value encountered in %s on line %d +Warning: A non-numeric value encountered Unsupported operand types: string ^ resource - -Warning: Array to string conversion in %s on line %d - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion +Warning: Array to string conversion No error for [] .= [] - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion Object of class stdClass could not be converted to string - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for [] .= STDOUT Object of class stdClass could not be converted to string Object of class stdClass could not be converted to string Object of class stdClass could not be converted to string - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for STDOUT .= [] Object of class stdClass could not be converted to string No error for STDOUT .= STDOUT - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for [] .= null - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for null .= [] - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for [] .= true - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for true .= [] - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for [] .= false - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for false .= [] - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for [] .= 2 - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for 2 .= [] - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for [] .= 3.5 - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for 3.5 .= [] - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for [] .= "123" - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for "123" .= [] - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for [] .= "foo" - -Warning: Array to string conversion in %s on line %d +Warning: Array to string conversion No error for "foo" .= [] Object of class stdClass could not be converted to string Object of class stdClass could not be converted to string diff --git a/scripts/dev/bless_tests.php b/scripts/dev/bless_tests.php index b772f00cc1964..8532e9386d210 100755 --- a/scripts/dev/bless_tests.php +++ b/scripts/dev/bless_tests.php @@ -106,7 +106,8 @@ function generateMinimallyDifferingOutput(string $out, string $oldExpect) { function insertOutput(string $phpt, string $out): string { return preg_replace_callback('/--EXPECTF?--.*$/s', function($matches) use($out) { - $F = strpos($out, '%') !== false ? 'F' : ''; + $hasWildcard = preg_match('/%[resSaAwidxfc]/', $out); + $F = $hasWildcard ? 'F' : ''; return "--EXPECT$F--\n" . $out . "\n"; }, $phpt); } From 7d99d3acfaa6b6deeb8faa94ddc8cefa9c4d5777 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 30 Apr 2020 10:56:39 +0200 Subject: [PATCH 338/338] Update throw expression test --- Zend/tests/throw/001.phpt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Zend/tests/throw/001.phpt b/Zend/tests/throw/001.phpt index 072d9f45b54e1..deb8743ab5667 100644 --- a/Zend/tests/throw/001.phpt +++ b/Zend/tests/throw/001.phpt @@ -148,7 +148,7 @@ try { } ?> ---EXPECTF-- +--EXPECT-- string(13) "true && throw" bool(false) string(14) "true and throw" @@ -167,9 +167,7 @@ string(3) "bar" string(11) "exception 1" bool(true) string(20) "false ? true : throw" - -Notice: Object of class Exception could not be converted to number in %s on line %d -string(22) "Can only throw objects" +string(39) "Unsupported operand types: object + int" string(35) "throw $exception = new Exception();" string(37) "throw $exception ??= new Exception();" string(30) "throw null ?? new Exception();"