summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2015-10-13 10:29:26 +0200
committerAnatol Belski <ab@php.net>2015-10-13 10:29:26 +0200
commit40142c084a28a6266b7b781778c74ee1b6133c95 (patch)
treecc25c8ea6116fa03b0d4c599cdb9c50558847e1d
parent417e58f332f8e1c5b56001f6e5ce67505c4e5997 (diff)
parent7597a065623c4437ff29004d87a5d45f1bfe50fe (diff)
downloadphp-git-40142c084a28a6266b7b781778c74ee1b6133c95.tar.gz
Merge branch 'PHP-7.0' into PHP-7.0.0
* PHP-7.0: (103 commits) Add more tests for closure binding Forbid "fake" closure rebinding increase API versions fork test for ICU 56.1 fork test for ICU-56.1 fix test for ICU-56.1 fix test Double declaration fix stack overflow Generally run all tests in sapi folder by default Fixed bug #70685 Normalize rebinding failures Implemented file_cache_fallback mechanism Improve previous fix Fixed bug #70681 update NEWS update NEWS Fixed bug #70630 (Closure::call/bind() crash with ReflectionFunction->getClosure()) Fixed reference cuntmting for closures (previously we didn't increment reference counter for "internal" closures) Fixed infinity recurion if we create closure on top of other closure. ...
-rw-r--r--TSRM/tsrm_win32.c16
-rw-r--r--UPGRADING3
-rw-r--r--Zend/tests/bug70630.phpt10
-rw-r--r--Zend/tests/bug70662.phpt18
-rw-r--r--Zend/tests/bug70681.phpt16
-rw-r--r--Zend/tests/bug70685.phpt22
-rw-r--r--Zend/tests/closure_041.phpt8
-rw-r--r--Zend/tests/closure_043.phpt20
-rw-r--r--Zend/tests/closure_061.phpt208
-rw-r--r--Zend/tests/closure_call.phpt2
-rw-r--r--Zend/zend.c2
-rw-r--r--Zend/zend_ast.h2
-rw-r--r--Zend/zend_closures.c132
-rw-r--r--Zend/zend_closures.h1
-rw-r--r--Zend/zend_compile.c41
-rw-r--r--Zend/zend_compile.h21
-rw-r--r--Zend/zend_execute.c14
-rw-r--r--Zend/zend_execute_API.c11
-rw-r--r--Zend/zend_extensions.h2
-rw-r--r--Zend/zend_language_parser.y9
-rw-r--r--Zend/zend_modules.h2
-rw-r--r--Zend/zend_object_handlers.c2
-rw-r--r--Zend/zend_operators.c10
-rw-r--r--Zend/zend_vm_def.h3
-rw-r--r--Zend/zend_vm_execute.h27
-rw-r--r--ext/date/lib/parse_date.c196
-rw-r--r--ext/date/lib/parse_iso_intervals.c36
-rw-r--r--ext/date/lib/timezonedb.h1176
-rw-r--r--ext/gmp/tests/gmp_random_seed-32bit.phpt230
-rw-r--r--ext/gmp/tests/gmp_random_seed.phpt1
-rw-r--r--ext/interbase/ibase_blobs.c2
-rw-r--r--ext/interbase/ibase_query.c14
-rw-r--r--ext/interbase/ibase_service.c9
-rw-r--r--ext/interbase/interbase.c2
-rw-r--r--ext/intl/calendar/calendar_methods.cpp56
-rw-r--r--ext/intl/grapheme/grapheme_string.c4
-rw-r--r--ext/intl/tests/calendar_clear_error.phpt3
-rw-r--r--ext/intl/tests/calendar_isWeekend_error.phpt1
-rw-r--r--ext/intl/tests/collator_get_sort_key_variant4.phpt2
-rw-r--r--ext/intl/tests/collator_get_sort_key_variant5.phpt1
-rw-r--r--ext/intl/tests/collator_get_sort_key_variant6.phpt98
-rw-r--r--ext/intl/tests/formatter_format5.phpt3
-rw-r--r--ext/intl/tests/formatter_format6.phpt130
-rw-r--r--ext/intl/tests/formatter_get_set_text_attribute.phpt3
-rw-r--r--ext/intl/tests/formatter_get_set_text_attribute_var2.phpt122
-rw-r--r--ext/intl/timezone/timezone_methods.cpp4
-rw-r--r--ext/mbstring/mbstring.c72
-rw-r--r--ext/mbstring/php_mbregex.c20
-rw-r--r--ext/mcrypt/mcrypt.c4
-rw-r--r--ext/mcrypt/tests/bug70625.phpt17
-rw-r--r--ext/mysqli/mysqli.c4
-rw-r--r--ext/mysqli/tests/mysqli_constants.phpt4
-rw-r--r--ext/mysqli/tests/mysqli_fetch_field_flags.phpt5
-rw-r--r--ext/oci8/oci8.c24
-rw-r--r--ext/oci8/tests/bug27303_2_11gR1.phpt202
-rw-r--r--ext/opcache/ZendAccelerator.c21
-rw-r--r--ext/opcache/ZendAccelerator.h9
-rw-r--r--ext/opcache/shared_alloc_win32.c52
-rw-r--r--ext/opcache/zend_accelerator_module.c9
-rw-r--r--ext/opcache/zend_shared_alloc.c10
-rw-r--r--ext/opcache/zend_shared_alloc.h1
-rw-r--r--ext/pcre/tests/bug69864.phpt2
-rw-r--r--ext/pdo_mysql/tests/bug54929.phpt2
-rw-r--r--ext/phar/tests/bug70433.phpt2
-rw-r--r--ext/reflection/bug70674.phpt8
-rw-r--r--ext/reflection/php_reflection.c6
-rw-r--r--ext/reflection/tests/ReflectionMethod_getDocComment_property_list.phpt41
-rw-r--r--ext/snmp/tests/wrong_hostname.phpt2
-rw-r--r--ext/sockets/tests/socket_cmsg_rights.phpt4
-rwxr-xr-xext/spl/config.m420
-rw-r--r--ext/spl/spl_observer.c40
-rw-r--r--ext/standard/array.c1
-rw-r--r--ext/standard/basic_functions.c2
-rw-r--r--ext/standard/dl.c4
-rw-r--r--ext/standard/math.c12
-rw-r--r--ext/standard/random.c12
-rw-r--r--ext/standard/string.c2
-rw-r--r--ext/standard/tests/array/bug70668.phpt63
-rw-r--r--ext/standard/tests/serialize/unserialize_error_001.phpt52
-rw-r--r--ext/standard/tests/serialize/unserialize_subclasses.phpt29
-rw-r--r--ext/standard/tests/strings/bug70667.phpt9
-rw-r--r--main/php.h2
-rw-r--r--main/php_ini.c2
-rwxr-xr-xmakedist2
-rw-r--r--pear/Makefile.frag2
-rwxr-xr-xrun-tests.php2
-rw-r--r--sapi/cgi/tests/003.phpt5
-rw-r--r--sapi/cgi/tests/004.phpt6
-rw-r--r--sapi/cgi/tests/005-win32.phpt34
-rw-r--r--sapi/cgi/tests/005.phpt9
-rw-r--r--sapi/cgi/tests/006.phpt6
-rw-r--r--sapi/cgi/tests/include.inc29
-rw-r--r--sapi/cgi/tests/skipif.inc4
-rw-r--r--sapi/cli/php_cli.c19
-rw-r--r--sapi/phpdbg/phpdbg.c34
-rw-r--r--sapi/phpdbg/phpdbg_prompt.c21
-rw-r--r--sapi/phpdbg/tests/exceptions_001.phpt2
-rw-r--r--sapi/phpdbg/tests/exceptions_002.phpt2
-rw-r--r--scripts/dev/check_parameters.php130
-rw-r--r--win32/build/mkdist.php2
100 files changed, 2567 insertions, 1208 deletions
diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c
index 98ed806c71..e8ec18650a 100644
--- a/TSRM/tsrm_win32.c
+++ b/TSRM/tsrm_win32.c
@@ -599,8 +599,10 @@ TSRM_API int shmget(int key, int size, int flags)
return -1;
}
- sprintf(shm_segment, "TSRM_SHM_SEGMENT:%d", key);
- sprintf(shm_info, "TSRM_SHM_DESCRIPTOR:%d", key);
+ snprintf(shm_segment, sizeof(shm_segment)-1, "TSRM_SHM_SEGMENT:%d", key);
+ snprintf(shm_info, sizeof(shm_info)-1, "TSRM_SHM_DESCRIPTOR:%d", key);
+ shm_segment[sizeof(shm_segment)-1] = '\0';
+ shm_info[sizeof(shm_info)-1] = '\0';
shm_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_segment);
info_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_info);
@@ -612,6 +614,12 @@ TSRM_API int shmget(int key, int size, int flags)
created = TRUE;
}
if (!shm_handle || !info_handle) {
+ if (shm_handle) {
+ CloseHandle(shm_handle);
+ }
+ if (info_handle) {
+ CloseHandle(info_handle);
+ }
return -1;
}
} else {
@@ -622,8 +630,8 @@ TSRM_API int shmget(int key, int size, int flags)
shm = shm_get(key, NULL);
if (!shm) {
- UnmapViewOfFile(shm_handle);
- UnmapViewOfFile(info_handle);
+ CloseHandle(shm_handle);
+ CloseHandle(info_handle);
return -1;
}
shm->segment = shm_handle;
diff --git a/UPGRADING b/UPGRADING
index 7f9c60f2be..cf06893151 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -643,6 +643,7 @@ Other
========================================
6. New Functions
========================================
+
- GMP
. Added gmp_random_seed().
@@ -666,6 +667,8 @@ Other
7. New Classes and Interfaces
========================================
+- ReflectionGenerator
+- ReflectionType
========================================
8. Removed Extensions and SAPIs
diff --git a/Zend/tests/bug70630.phpt b/Zend/tests/bug70630.phpt
new file mode 100644
index 0000000000..d78ee62c6a
--- /dev/null
+++ b/Zend/tests/bug70630.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #70630 (Closure::call/bind() crash with ReflectionFunction->getClosure())
+--FILE--
+<?php
+class a {}
+$x = (new ReflectionFunction("substr"))->getClosure();
+$x->call(new a);
+?>
+--EXPECTF--
+Warning: Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure() in %s on line %d
diff --git a/Zend/tests/bug70662.phpt b/Zend/tests/bug70662.phpt
new file mode 100644
index 0000000000..2bda8141ba
--- /dev/null
+++ b/Zend/tests/bug70662.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #70662: Duplicate array key via undefined index error handler
+--FILE--
+<?php
+
+$a = [];
+set_error_handler(function() use(&$a) {
+ $a['b'] = 2;
+});
+$a['b'] += 1;
+var_dump($a);
+
+?>
+--EXPECT--
+array(1) {
+ ["b"]=>
+ int(1)
+}
diff --git a/Zend/tests/bug70681.phpt b/Zend/tests/bug70681.phpt
new file mode 100644
index 0000000000..9dd09b07b8
--- /dev/null
+++ b/Zend/tests/bug70681.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #70681: Segfault when binding $this of internal instance method to null
+--FILE--
+<?php
+
+$c = (new ReflectionMethod('SplStack', 'count'))->getClosure(new SplStack);
+$c = $c->bindTo(null);
+
+$c = (new ReflectionFunction('strlen'))->getClosure();
+$c = $c->bindTo(null);
+var_dump($c("foo"));
+
+?>
+--EXPECTF--
+Warning: Cannot unbind $this of internal method in %s on line %d
+int(3)
diff --git a/Zend/tests/bug70685.phpt b/Zend/tests/bug70685.phpt
new file mode 100644
index 0000000000..7a49ff1825
--- /dev/null
+++ b/Zend/tests/bug70685.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Bug #70685: Segfault for getClosure() internal method rebind with invalid $this
+--FILE--
+<?php
+
+class cls {}
+
+$c = (new ReflectionMethod('SplStack', 'count'))->getClosure(new SplStack);
+$c = $c->bindTo(new cls);
+var_dump($c);
+
+$c = (new ReflectionMethod('SplStack', 'count'))->getClosure(new SplStack);
+$c = $c->bindTo(new SplStack, 'cls');
+var_dump($c);
+
+?>
+--EXPECTF--
+Warning: Cannot bind internal method SplDoublyLinkedList::count() to object of class cls in %s on line %d
+NULL
+
+Warning: Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure() in %s on line %d
+NULL
diff --git a/Zend/tests/closure_041.phpt b/Zend/tests/closure_041.phpt
index 947517b4ed..a7e9eab482 100644
--- a/Zend/tests/closure_041.phpt
+++ b/Zend/tests/closure_041.phpt
@@ -53,9 +53,9 @@ $d = $nonstaticScoped->bindTo(null); $d(); echo "\n";
$d->bindTo($d);
echo "After binding, with same-class instance for the bound ones", "\n";
-$d = $staticUnscoped->bindTo(new A); $d(); echo "\n";
+$d = $staticUnscoped->bindTo(new A);
$d = $nonstaticUnscoped->bindTo(new A); $d(); echo " (should be scoped to dummy class)\n";
-$d = $staticScoped->bindTo(new A); $d(); echo "\n";
+$d = $staticScoped->bindTo(new A);
$d = $nonstaticScoped->bindTo(new A); $d(); echo "\n";
echo "After binding, with different instance for the bound ones", "\n";
@@ -87,14 +87,10 @@ After binding, with same-class instance for the bound ones
Warning: Cannot bind an instance to a static closure in %s on line %d
scoped to A: bool(false)
-bound: no
-scoped to A: bool(false)
bound: A (should be scoped to dummy class)
Warning: Cannot bind an instance to a static closure in %s on line %d
scoped to A: bool(true)
-bound: no
-scoped to A: bool(true)
bound: A
After binding, with different instance for the bound ones
scoped to A: bool(false)
diff --git a/Zend/tests/closure_043.phpt b/Zend/tests/closure_043.phpt
index 98c88fda39..92b96575b5 100644
--- a/Zend/tests/closure_043.phpt
+++ b/Zend/tests/closure_043.phpt
@@ -26,16 +26,16 @@ $d = $staticUnscoped->bindTo(null, null); $d(); echo "\n";
$d = $staticScoped->bindTo(null, null); $d(); echo "\n";
echo "After binding, null scope, with instance", "\n";
-$d = $staticUnscoped->bindTo(new A, null); $d(); echo "\n";
-$d = $staticScoped->bindTo(new A, null); $d(); echo "\n";
+$d = $staticUnscoped->bindTo(new A, null);
+$d = $staticScoped->bindTo(new A, null);
echo "After binding, with scope, no instance", "\n";
$d = $staticUnscoped->bindTo(null, 'A'); $d(); echo "\n";
$d = $staticScoped->bindTo(null, 'A'); $d(); echo "\n";
echo "After binding, with scope, with instance", "\n";
-$d = $staticUnscoped->bindTo(new A, 'A'); $d(); echo "\n";
-$d = $staticScoped->bindTo(new A, 'A'); $d(); echo "\n";
+$d = $staticUnscoped->bindTo(new A, 'A');
+$d = $staticScoped->bindTo(new A, 'A');
echo "Done.\n";
@@ -57,14 +57,8 @@ bool(false)
After binding, null scope, with instance
Warning: Cannot bind an instance to a static closure in %s on line %d
-bool(false)
-bool(false)
-
Warning: Cannot bind an instance to a static closure in %s on line %d
-bool(false)
-bool(false)
-
After binding, with scope, no instance
bool(true)
bool(false)
@@ -75,12 +69,6 @@ bool(false)
After binding, with scope, with instance
Warning: Cannot bind an instance to a static closure in %s on line %d
-bool(true)
-bool(false)
-
Warning: Cannot bind an instance to a static closure in %s on line %d
-bool(true)
-bool(false)
-
Done.
diff --git a/Zend/tests/closure_061.phpt b/Zend/tests/closure_061.phpt
new file mode 100644
index 0000000000..a87303498e
--- /dev/null
+++ b/Zend/tests/closure_061.phpt
@@ -0,0 +1,208 @@
+--TEST--
+Rebinding of ::getClosure()s
+--FILE--
+<?php
+
+use SplDoublyLinkedList as DLL;
+
+function func($arg) { }
+
+class Cls {
+ public function method() {}
+ public static function staticMethod($arg) {}
+}
+
+class ClsChild extends Cls {}
+
+class ClsUnrelated {}
+
+/* Format: [Function, [Obj, Scope]] */
+$tests = [
+ ['func', [
+ [null, null],
+ [new Cls, null],
+ [new Cls, 'Cls'],
+ [null, 'Cls'],
+ [null, 'stdClass'],
+ [new stdClass, null],
+ ]],
+
+ ['strlen', [
+ [null, null],
+ [new Cls, null],
+ [new Cls, 'Cls'],
+ [null, 'Cls'],
+ [null, 'stdClass'],
+ [new stdClass, null],
+ ]],
+
+ [['Cls', 'staticMethod'], [
+ [null, 'Cls'],
+ [new Cls, null],
+ [new Cls, 'Cls'],
+ [null, null],
+ [null, 'ClsChild'],
+ [null, 'ClsUnrelated'],
+ ]],
+
+ [[new Cls, 'method'], [
+ [null, 'Cls'],
+ [new Cls, 'Cls'],
+ [new ClsChild, 'Cls'],
+ [new ClsUnrelated, 'Cls'],
+ [new Cls, null],
+ [new Cls, 'ClsUnrelated'],
+ [new Cls, 'ClsChild'],
+ ]],
+
+ [[new DLL, 'count'], [
+ [new DLL, DLL::class],
+ [new SplStack, DLL::class],
+ [new ClsUnrelated, DLL::class],
+ [null, null],
+ [null, DLL::class],
+ [new DLL, null],
+ [new DLL, ClsUnrelated::class],
+ ]],
+];
+
+set_error_handler(function($errno, $errstr) {
+ echo "$errstr\n\n";
+});
+
+foreach ($tests as list($fn, $bindings)) {
+ if (is_array($fn)) {
+ $r = new ReflectionMethod($fn[0], $fn[1]);
+ $c = $r->getClosure(is_object($fn[0]) ? $fn[0] : null);
+ $fnStr = is_object($fn[0]) ? "(new " . get_class($fn[0]) . ")->$fn[1]" : "$fn[0]::$fn[1]";
+ } else {
+ $c = (new ReflectionFunction($fn))->getClosure();
+ $fnStr = $fn;
+ }
+
+ echo "$fnStr()\n" . str_repeat('-', strlen($fnStr) + 2), "\n\n";
+
+ foreach ($bindings as list($obj, $scope)) {
+ $objStr = $obj ? "new " . get_class($obj) : "null";
+ $scopeStr = $scope ? "$scope::class" : "null";
+ echo "bindTo($objStr, $scopeStr):\n";
+
+ $ret = $c->bindTo($obj, $scope);
+ if ($ret !== null) {
+ echo "Success!\n\n";
+ }
+ }
+}
+
+?>
+--EXPECT--
+func()
+------
+
+bindTo(null, null):
+Success!
+
+bindTo(new Cls, null):
+Success!
+
+bindTo(new Cls, Cls::class):
+Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
+
+bindTo(null, Cls::class):
+Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
+
+bindTo(null, stdClass::class):
+Cannot bind closure to scope of internal class stdClass
+
+bindTo(new stdClass, null):
+Success!
+
+strlen()
+--------
+
+bindTo(null, null):
+Success!
+
+bindTo(new Cls, null):
+Success!
+
+bindTo(new Cls, Cls::class):
+Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
+
+bindTo(null, Cls::class):
+Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
+
+bindTo(null, stdClass::class):
+Cannot bind closure to scope of internal class stdClass
+
+bindTo(new stdClass, null):
+Success!
+
+Cls::staticMethod()
+-------------------
+
+bindTo(null, Cls::class):
+Success!
+
+bindTo(new Cls, null):
+Cannot bind an instance to a static closure
+
+bindTo(new Cls, Cls::class):
+Cannot bind an instance to a static closure
+
+bindTo(null, null):
+Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
+
+bindTo(null, ClsChild::class):
+Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
+
+bindTo(null, ClsUnrelated::class):
+Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
+
+(new Cls)->method()
+-------------------
+
+bindTo(null, Cls::class):
+Success!
+
+bindTo(new Cls, Cls::class):
+Success!
+
+bindTo(new ClsChild, Cls::class):
+Success!
+
+bindTo(new ClsUnrelated, Cls::class):
+Success!
+
+bindTo(new Cls, null):
+Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
+
+bindTo(new Cls, ClsUnrelated::class):
+Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
+
+bindTo(new Cls, ClsChild::class):
+Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
+
+(new SplDoublyLinkedList)->count()
+----------------------------------
+
+bindTo(new SplDoublyLinkedList, SplDoublyLinkedList::class):
+Success!
+
+bindTo(new SplStack, SplDoublyLinkedList::class):
+Success!
+
+bindTo(new ClsUnrelated, SplDoublyLinkedList::class):
+Cannot bind internal method SplDoublyLinkedList::count() to object of class ClsUnrelated
+
+bindTo(null, null):
+Cannot unbind $this of internal method
+
+bindTo(null, SplDoublyLinkedList::class):
+Cannot unbind $this of internal method
+
+bindTo(new SplDoublyLinkedList, null):
+Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
+
+bindTo(new SplDoublyLinkedList, ClsUnrelated::class):
+Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
diff --git a/Zend/tests/closure_call.phpt b/Zend/tests/closure_call.phpt
index e8bed36aec..f665c67ff6 100644
--- a/Zend/tests/closure_call.phpt
+++ b/Zend/tests/closure_call.phpt
@@ -61,7 +61,7 @@ int(0)
int(0)
int(3)
-Warning: Cannot bind closure to object of internal class stdClass in %s line %d
+Warning: Cannot bind closure to scope of internal class stdClass in %s line %d
NULL
int(21)
int(3)
diff --git a/Zend/zend.c b/Zend/zend.c
index 2934f4a075..27e807067f 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -129,7 +129,7 @@ static ZEND_INI_MH(OnUpdateAssertions) /* {{{ */
ZEND_INI_BEGIN()
ZEND_INI_ENTRY("error_reporting", NULL, ZEND_INI_ALL, OnUpdateErrorReporting)
- STD_ZEND_INI_BOOLEAN("zend.assertions", "1", ZEND_INI_ALL, OnUpdateAssertions, assertions, zend_executor_globals, executor_globals)
+ STD_ZEND_INI_ENTRY("zend.assertions", "1", ZEND_INI_ALL, OnUpdateAssertions, assertions, zend_executor_globals, executor_globals)
STD_ZEND_INI_BOOLEAN("zend.enable_gc", "1", ZEND_INI_ALL, OnUpdateGCEnabled, gc_enabled, zend_gc_globals, gc_globals)
STD_ZEND_INI_BOOLEAN("zend.multibyte", "0", ZEND_INI_PERDIR, OnUpdateBool, multibyte, zend_compiler_globals, compiler_globals)
ZEND_INI_ENTRY("zend.script_encoding", NULL, ZEND_INI_ALL, OnUpdateScriptEncoding)
diff --git a/Zend/zend_ast.h b/Zend/zend_ast.h
index 2b8d4d37b8..2defa1c2b3 100644
--- a/Zend/zend_ast.h
+++ b/Zend/zend_ast.h
@@ -124,7 +124,6 @@ enum _zend_ast_kind {
ZEND_AST_SWITCH,
ZEND_AST_SWITCH_CASE,
ZEND_AST_DECLARE,
- ZEND_AST_PROP_ELEM,
ZEND_AST_CONST_ELEM,
ZEND_AST_USE_TRAIT,
ZEND_AST_TRAIT_PRECEDENCE,
@@ -142,6 +141,7 @@ enum _zend_ast_kind {
ZEND_AST_TRY,
ZEND_AST_CATCH,
ZEND_AST_PARAM,
+ ZEND_AST_PROP_ELEM,
/* 4 child nodes */
ZEND_AST_FOR = 4 << ZEND_AST_NUM_CHILDREN_SHIFT,
diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c
index 50aa7d4188..76b10e43d3 100644
--- a/Zend/zend_closures.c
+++ b/Zend/zend_closures.c
@@ -34,11 +34,15 @@
#define ZEND_CLOSURE_PROPERTY_ERROR() \
zend_throw_error(NULL, "Closure object cannot have properties")
+/* reuse bit to mark "fake" closures (it wasn't used for functions before) */
+#define ZEND_ACC_FAKE_CLOSURE ZEND_ACC_INTERFACE
+
typedef struct _zend_closure {
zend_object std;
zend_function func;
zval this_ptr;
zend_class_entry *called_scope;
+ void (*orig_internal_handler)(INTERNAL_FUNCTION_PARAMETERS);
} zend_closure;
/* non-static since it needs to be referenced */
@@ -69,6 +73,47 @@ ZEND_METHOD(Closure, __invoke) /* {{{ */
}
/* }}} */
+static zend_bool zend_valid_closure_binding(
+ zend_closure *closure, zval *newthis, zend_class_entry *scope) /* {{{ */
+{
+ zend_function *func = &closure->func;
+ if (newthis) {
+ if (func->common.fn_flags & ZEND_ACC_STATIC) {
+ zend_error(E_WARNING, "Cannot bind an instance to a static closure");
+ return 0;
+ }
+
+ if (func->type == ZEND_INTERNAL_FUNCTION && func->common.scope &&
+ !instanceof_function(Z_OBJCE_P(newthis), func->common.scope)) {
+ /* Binding incompatible $this to an internal method is not supported. */
+ zend_error(E_WARNING, "Cannot bind internal method %s::%s() to object of class %s",
+ ZSTR_VAL(func->common.scope->name),
+ ZSTR_VAL(func->common.function_name),
+ ZSTR_VAL(Z_OBJCE_P(newthis)->name));
+ return 0;
+ }
+ } else if (!(func->common.fn_flags & ZEND_ACC_STATIC) && func->common.scope
+ && func->type == ZEND_INTERNAL_FUNCTION) {
+ zend_error(E_WARNING, "Cannot unbind $this of internal method");
+ return 0;
+ }
+
+ if (scope && scope != func->common.scope && scope->type == ZEND_INTERNAL_CLASS) {
+ /* rebinding to internal class is not allowed */
+ zend_error(E_WARNING, "Cannot bind closure to scope of internal class %s",
+ ZSTR_VAL(scope->name));
+ return 0;
+ }
+
+ if ((func->common.fn_flags & ZEND_ACC_FAKE_CLOSURE) && scope != func->common.scope) {
+ zend_error(E_WARNING, "Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()");
+ return 0;
+ }
+
+ return 1;
+}
+/* }}} */
+
/* {{{ proto mixed Closure::call(object to [, mixed parameter] [, mixed ...] )
Call closure, binding to a given object with its class as the scope */
ZEND_METHOD(Closure, call)
@@ -89,25 +134,9 @@ ZEND_METHOD(Closure, call)
zclosure = getThis();
closure = (zend_closure *) Z_OBJ_P(zclosure);
- if (closure->func.common.fn_flags & ZEND_ACC_STATIC) {
- zend_error(E_WARNING, "Cannot bind an instance to a static closure");
- return;
- }
-
- if (closure->func.type == ZEND_INTERNAL_FUNCTION) {
- /* verify that we aren't binding internal function to a wrong object */
- if ((closure->func.common.fn_flags & ZEND_ACC_STATIC) == 0 &&
- !instanceof_function(Z_OBJCE_P(newthis), closure->func.common.scope)) {
- zend_error(E_WARNING, "Cannot bind function %s::%s to object of class %s", ZSTR_VAL(closure->func.common.scope->name), ZSTR_VAL(closure->func.common.function_name), ZSTR_VAL(Z_OBJCE_P(newthis)->name));
- return;
- }
- }
-
newobj = Z_OBJ_P(newthis);
- if (newobj->ce != closure->func.common.scope && newobj->ce->type == ZEND_INTERNAL_CLASS) {
- /* rebinding to internal class is not allowed */
- zend_error(E_WARNING, "Cannot bind closure to object of internal class %s", ZSTR_VAL(newobj->ce->name));
+ if (!zend_valid_closure_binding(closure, newthis, Z_OBJCE_P(newthis))) {
return;
}
@@ -162,15 +191,11 @@ ZEND_METHOD(Closure, bind)
zend_class_entry *ce, *called_scope;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Oo!|z", &zclosure, zend_ce_closure, &newthis, &scope_arg) == FAILURE) {
- RETURN_NULL();
+ return;
}
closure = (zend_closure *)Z_OBJ_P(zclosure);
- if ((newthis != NULL) && (closure->func.common.fn_flags & ZEND_ACC_STATIC)) {
- zend_error(E_WARNING, "Cannot bind an instance to a static closure");
- }
-
if (scope_arg != NULL) { /* scope argument was given */
if (Z_TYPE_P(scope_arg) == IS_OBJECT) {
ce = Z_OBJCE_P(scope_arg);
@@ -187,15 +212,14 @@ ZEND_METHOD(Closure, bind)
}
zend_string_release(class_name);
}
- if(ce && ce != closure->func.common.scope && ce->type == ZEND_INTERNAL_CLASS) {
- /* rebinding to internal class is not allowed */
- zend_error(E_WARNING, "Cannot bind closure to scope of internal class %s", ZSTR_VAL(ce->name));
- return;
- }
} else { /* scope argument not given; do not change the scope by default */
ce = closure->func.common.scope;
}
+ if (!zend_valid_closure_binding(closure, newthis, ce)) {
+ return;
+ }
+
if (newthis) {
called_scope = Z_OBJCE_P(newthis);
} else {
@@ -517,6 +541,15 @@ void zend_register_closure_ce(void) /* {{{ */
}
/* }}} */
+static void zend_closure_internal_handler(INTERNAL_FUNCTION_PARAMETERS) /* {{{ */
+{
+ zend_closure *closure = (zend_closure*)EX(func)->common.prototype;
+ closure->orig_internal_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+ OBJ_RELEASE((zend_object*)closure);
+ EX(func) = NULL;
+}
+/* }}} */
+
ZEND_API void zend_create_closure(zval *res, zend_function *func, zend_class_entry *scope, zend_class_entry *called_scope, zval *this_ptr) /* {{{ */
{
zend_closure *closure;
@@ -525,17 +558,16 @@ ZEND_API void zend_create_closure(zval *res, zend_function *func, zend_class_ent
closure = (zend_closure *)Z_OBJ_P(res);
- memcpy(&closure->func, func, func->type == ZEND_USER_FUNCTION ? sizeof(zend_op_array) : sizeof(zend_internal_function));
- closure->func.common.prototype = (zend_function*)closure;
- closure->func.common.fn_flags |= ZEND_ACC_CLOSURE;
-
if ((scope == NULL) && this_ptr && (Z_TYPE_P(this_ptr) != IS_UNDEF)) {
/* use dummy scope if we're binding an object without specifying a scope */
/* maybe it would be better to create one for this purpose */
scope = zend_ce_closure;
}
- if (closure->func.type == ZEND_USER_FUNCTION) {
+ if (func->type == ZEND_USER_FUNCTION) {
+ memcpy(&closure->func, func, sizeof(zend_op_array));
+ closure->func.common.prototype = (zend_function*)closure;
+ closure->func.common.fn_flags |= ZEND_ACC_CLOSURE;
if (closure->func.op_array.static_variables) {
HashTable *static_variables = closure->func.op_array.static_variables;
@@ -551,19 +583,20 @@ ZEND_API void zend_create_closure(zval *res, zend_function *func, zend_class_ent
(*closure->func.op_array.refcount)++;
}
} else {
- /* verify that we aren't binding internal function to a wrong scope */
- if(func->common.scope != NULL) {
- if(scope && !instanceof_function(scope, func->common.scope)) {
- zend_error(E_WARNING, "Cannot bind function %s::%s to scope class %s", ZSTR_VAL(func->common.scope->name), ZSTR_VAL(func->common.function_name), ZSTR_VAL(scope->name));
- scope = NULL;
- }
- if(scope && this_ptr && (func->common.fn_flags & ZEND_ACC_STATIC) == 0 &&
- !instanceof_function(Z_OBJCE_P(this_ptr), closure->func.common.scope)) {
- zend_error(E_WARNING, "Cannot bind function %s::%s to object of class %s", ZSTR_VAL(func->common.scope->name), ZSTR_VAL(func->common.function_name), ZSTR_VAL(Z_OBJCE_P(this_ptr)->name));
- scope = NULL;
- this_ptr = NULL;
- }
+ memcpy(&closure->func, func, sizeof(zend_internal_function));
+ closure->func.common.prototype = (zend_function*)closure;
+ closure->func.common.fn_flags |= ZEND_ACC_CLOSURE;
+ /* wrap internal function handler to avoid memory leak */
+ if (UNEXPECTED(closure->func.internal_function.handler == zend_closure_internal_handler)) {
+ /* avoid infinity recursion, by taking handler from nested closure */
+ zend_closure *nested = (zend_closure*)((char*)func - XtOffsetOf(zend_closure, func));
+ ZEND_ASSERT(nested->std.ce == zend_ce_closure);
+ closure->orig_internal_handler = nested->orig_internal_handler;
} else {
+ closure->orig_internal_handler = closure->func.internal_function.handler;
+ }
+ closure->func.internal_function.handler = zend_closure_internal_handler;
+ if (!func->common.scope) {
/* if it's a free function, we won't set scope & this since they're meaningless */
this_ptr = NULL;
scope = NULL;
@@ -584,6 +617,17 @@ ZEND_API void zend_create_closure(zval *res, zend_function *func, zend_class_ent
}
/* }}} */
+ZEND_API void zend_create_fake_closure(zval *res, zend_function *func, zend_class_entry *scope, zend_class_entry *called_scope, zval *this_ptr) /* {{{ */
+{
+ zend_closure *closure;
+
+ zend_create_closure(res, func, scope, called_scope, this_ptr);
+
+ closure = (zend_closure *)Z_OBJ_P(res);
+ closure->func.common.fn_flags |= ZEND_ACC_FAKE_CLOSURE;
+}
+/* }}} */
+
/*
* Local variables:
* tab-width: 4
diff --git a/Zend/zend_closures.h b/Zend/zend_closures.h
index 8d0963ec17..8d4edfd37a 100644
--- a/Zend/zend_closures.h
+++ b/Zend/zend_closures.h
@@ -29,6 +29,7 @@ void zend_register_closure_ce(void);
extern ZEND_API zend_class_entry *zend_ce_closure;
ZEND_API void zend_create_closure(zval *res, zend_function *op_array, zend_class_entry *scope, zend_class_entry *called_scope, zval *this_ptr);
+ZEND_API void zend_create_fake_closure(zval *res, zend_function *op_array, zend_class_entry *scope, zend_class_entry *called_scope, zval *this_ptr);
ZEND_API zend_function *zend_get_closure_invoke_method(zend_object *obj);
ZEND_API const zend_function *zend_get_closure_method_def(zval *obj);
ZEND_API zval* zend_get_closure_this_ptr(zval *obj);
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 8e9f5414dd..26655ad795 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -1703,18 +1703,6 @@ zend_ast *zend_ast_append_str(zend_ast *left_ast, zend_ast *right_ast) /* {{{ */
}
/* }}} */
-/* A hacky way that is used to store the doc comment for properties */
-zend_ast *zend_ast_append_doc_comment(zend_ast *list) /* {{{ */
-{
- if (CG(doc_comment)) {
- list = zend_ast_list_add(list, zend_ast_create_zval_from_str(CG(doc_comment)));
- CG(doc_comment) = NULL;
- }
-
- return list;
-}
-/* }}} */
-
void zend_verify_namespace(void) /* {{{ */
{
if (FC(has_bracketed_namespaces) && !FC(in_namespace)) {
@@ -2042,6 +2030,7 @@ static void zend_emit_return_type_check(znode *expr, zend_arg_info *return_info)
void zend_emit_final_return(zval *zv) /* {{{ */
{
znode zn;
+ zend_op *ret;
zend_bool returns_reference = (CG(active_op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0;
if (CG(active_op_array)->fn_flags & ZEND_ACC_HAS_RETURN_TYPE) {
@@ -2055,7 +2044,8 @@ void zend_emit_final_return(zval *zv) /* {{{ */
ZVAL_NULL(&zn.u.constant);
}
- zend_emit_op(NULL, returns_reference ? ZEND_RETURN_BY_REF : ZEND_RETURN, &zn, NULL);
+ ret = zend_emit_op(NULL, returns_reference ? ZEND_RETURN_BY_REF : ZEND_RETURN, &zn, NULL);
+ ret->extended_value = -1;
}
/* }}} */
@@ -3612,12 +3602,14 @@ void zend_compile_return(zend_ast *ast) /* {{{ */
void zend_compile_echo(zend_ast *ast) /* {{{ */
{
+ zend_op *opline;
zend_ast *expr_ast = ast->child[0];
znode expr_node;
zend_compile_expr(&expr_node, expr_ast);
- zend_emit_op(NULL, ZEND_ECHO, &expr_node, NULL);
+ opline = zend_emit_op(NULL, ZEND_ECHO, &expr_node, NULL);
+ opline->extended_value = 0;
}
/* }}} */
@@ -4910,7 +4902,6 @@ void zend_compile_prop_decl(zend_ast *ast) /* {{{ */
uint32_t flags = list->attr;
zend_class_entry *ce = CG(active_class_entry);
uint32_t i, children = list->children;
- zend_string *doc_comment = NULL;
if (ce->ce_flags & ZEND_ACC_INTERFACE) {
zend_error_noreturn(E_COMPILE_ERROR, "Interfaces may not include member variables");
@@ -4920,19 +4911,20 @@ void zend_compile_prop_decl(zend_ast *ast) /* {{{ */
zend_error_noreturn(E_COMPILE_ERROR, "Properties cannot be declared abstract");
}
- /* Doc comment has been appended as last element in property list */
- if (list->child[children - 1]->kind == ZEND_AST_ZVAL) {
- doc_comment = zend_string_copy(zend_ast_get_str(list->child[children - 1]));
- children -= 1;
- }
-
for (i = 0; i < children; ++i) {
zend_ast *prop_ast = list->child[i];
zend_ast *name_ast = prop_ast->child[0];
zend_ast *value_ast = prop_ast->child[1];
+ zend_ast *doc_comment_ast = prop_ast->child[2];
zend_string *name = zend_ast_get_str(name_ast);
+ zend_string *doc_comment = NULL;
zval value_zv;
+ /* Doc comment has been appended as last element in ZEND_AST_PROP_ELEM ast */
+ if (doc_comment_ast) {
+ doc_comment = zend_string_copy(zend_ast_get_str(doc_comment_ast));
+ }
+
if (flags & ZEND_ACC_FINAL) {
zend_error_noreturn(E_COMPILE_ERROR, "Cannot declare property %s::$%s final, "
"the final modifier is allowed only for methods and classes",
@@ -4952,9 +4944,6 @@ void zend_compile_prop_decl(zend_ast *ast) /* {{{ */
name = zend_new_interned_string_safe(name);
zend_declare_property_ex(ce, name, &value_zv, flags, doc_comment);
-
- /* Doc comment is only assigned to first property */
- doc_comment = NULL;
}
}
/* }}} */
@@ -6214,12 +6203,14 @@ void zend_compile_coalesce(znode *result, zend_ast *ast) /* {{{ */
void zend_compile_print(znode *result, zend_ast *ast) /* {{{ */
{
+ zend_op *opline;
zend_ast *expr_ast = ast->child[0];
znode expr_node;
zend_compile_expr(&expr_node, expr_ast);
- zend_emit_op(NULL, ZEND_ECHO, &expr_node, NULL);
+ opline = zend_emit_op(NULL, ZEND_ECHO, &expr_node, NULL);
+ opline->extended_value = 1;
result->op_type = IS_CONST;
ZVAL_LONG(&result->u.constant, 1);
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h
index f6283fb5c9..b777a0ba8c 100644
--- a/Zend/zend_compile.h
+++ b/Zend/zend_compile.h
@@ -431,17 +431,17 @@ struct _zend_execute_data {
const zend_op *opline; /* executed opline */
zend_execute_data *call; /* current call */
zval *return_value;
- zend_function *func; /* executed op_array */
- zval This;
+ zend_function *func; /* executed funcrion */
+ zval This; /* this + call_info + num_args */
+ zend_class_entry *called_scope;
+ zend_execute_data *prev_execute_data;
+ zend_array *symbol_table;
#if ZEND_EX_USE_RUN_TIME_CACHE
- void **run_time_cache;
+ void **run_time_cache; /* cache op_array->run_time_cache */
#endif
#if ZEND_EX_USE_LITERALS
- zval *literals;
+ zval *literals; /* cache op_array->literals */
#endif
- zend_class_entry *called_scope;
- zend_execute_data *prev_execute_data;
- zend_array *symbol_table;
};
#define ZEND_CALL_FUNCTION (0 << 0)
@@ -698,7 +698,6 @@ void zend_emit_final_return(zval *zv);
zend_ast *zend_ast_append_str(zend_ast *left, zend_ast *right);
uint32_t zend_add_class_modifier(uint32_t flags, uint32_t new_flag);
uint32_t zend_add_member_modifier(uint32_t flags, uint32_t new_flag);
-zend_ast *zend_ast_append_doc_comment(zend_ast *list);
void zend_handle_encoding_declaration(zend_ast *ast);
/* parser-driven code generators */
@@ -954,9 +953,9 @@ static zend_always_inline int zend_check_arg_send_type(const zend_function *zf,
#define ZEND_ARRAY_SIZE_SHIFT 2
/* Pseudo-opcodes that are used only temporarily during compilation */
-#define ZEND_GOTO 253
-#define ZEND_BRK 254
-#define ZEND_CONT 255
+#define ZEND_GOTO 253
+#define ZEND_BRK 254
+#define ZEND_CONT 255
END_EXTERN_C()
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index c6c73490e5..5b98fb47fb 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -1451,8 +1451,8 @@ static zend_never_inline void zend_assign_op_overloaded_property(zval *object, z
ZVAL_OBJ(&obj, Z_OBJ_P(object));
Z_ADDREF(obj);
- if (Z_OBJ_HT(obj)->read_property &&
- (z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, cache_slot, &rv)) != NULL) {
+ if (EXPECTED(Z_OBJ_HT(obj)->read_property)) {
+ z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, cache_slot, &rv);
if (UNEXPECTED(EG(exception))) {
OBJ_RELEASE(Z_OBJ(obj));
return;
@@ -1557,7 +1557,8 @@ num_index:
break;
case BP_VAR_RW:
zend_error(E_NOTICE,"Undefined offset: " ZEND_LONG_FMT, hval);
- /* break missing intentionally */
+ retval = zend_hash_index_update(ht, hval, &EG(uninitialized_zval));
+ break;
case BP_VAR_W:
retval = zend_hash_index_add_new(ht, hval, &EG(uninitialized_zval));
break;
@@ -1605,7 +1606,8 @@ str_index:
break;
case BP_VAR_RW:
zend_error(E_NOTICE,"Undefined index: %s", ZSTR_VAL(offset_key));
- /* break missing intentionally */
+ retval = zend_hash_update(ht, offset_key, &EG(uninitialized_zval));
+ break;
case BP_VAR_W:
retval = zend_hash_add_new(ht, offset_key, &EG(uninitialized_zval));
break;
@@ -1964,8 +1966,8 @@ static zend_always_inline void zend_fetch_property_address(zval *result, zval *c
if (EXPECTED(Z_OBJ_HT_P(container)->get_property_ptr_ptr)) {
zval *ptr = Z_OBJ_HT_P(container)->get_property_ptr_ptr(container, prop_ptr, type, cache_slot);
if (NULL == ptr) {
- if (Z_OBJ_HT_P(container)->read_property &&
- (ptr = Z_OBJ_HT_P(container)->read_property(container, prop_ptr, type, cache_slot, result)) != NULL) {
+ if (EXPECTED(Z_OBJ_HT_P(container)->read_property)) {
+ ptr = Z_OBJ_HT_P(container)->read_property(container, prop_ptr, type, cache_slot, result);
if (ptr != result) {
ZVAL_INDIRECT(result, ptr);
} else if (UNEXPECTED(Z_ISREF_P(ptr) && Z_REFCOUNT_P(ptr) == 1)) {
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 965b08eb38..9d255edfd4 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -839,15 +839,16 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
}
Z_OBJ(call->This) = fci->object;
+ if (UNEXPECTED(func->op_array.fn_flags & ZEND_ACC_CLOSURE)) {
+ ZEND_ASSERT(GC_TYPE((zend_object*)func->op_array.prototype) == IS_OBJECT);
+ GC_REFCOUNT((zend_object*)func->op_array.prototype)++;
+ ZEND_ADD_CALL_FLAG(call, ZEND_CALL_CLOSURE);
+ }
+
if (func->type == ZEND_USER_FUNCTION) {
int call_via_handler = (func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) != 0;
EG(scope) = func->common.scope;
call->symbol_table = fci->symbol_table;
- if (UNEXPECTED(func->op_array.fn_flags & ZEND_ACC_CLOSURE)) {
- ZEND_ASSERT(GC_TYPE((zend_object*)func->op_array.prototype) == IS_OBJECT);
- GC_REFCOUNT((zend_object*)func->op_array.prototype)++;
- ZEND_ADD_CALL_FLAG(call, ZEND_CALL_CLOSURE);
- }
if (EXPECTED((func->op_array.fn_flags & ZEND_ACC_GENERATOR) == 0)) {
zend_init_execute_data(call, &func->op_array, fci->retval);
zend_execute_ex(call);
diff --git a/Zend/zend_extensions.h b/Zend/zend_extensions.h
index 60d03aa43f..36bcf2c004 100644
--- a/Zend/zend_extensions.h
+++ b/Zend/zend_extensions.h
@@ -28,7 +28,7 @@
/* The first number is the engine version and the rest is the date (YYYYMMDD).
* This way engine 2/3 API no. is always greater than engine 1 API no..
*/
-#define ZEND_EXTENSION_API_NO 320140815
+#define ZEND_EXTENSION_API_NO 320151012
typedef struct _zend_extension_version_info {
int zend_extension_api_no;
diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y
index c52c252f6c..dde76351e9 100644
--- a/Zend/zend_language_parser.y
+++ b/Zend/zend_language_parser.y
@@ -700,7 +700,7 @@ class_statement_list:
class_statement:
variable_modifiers property_list ';'
- { $$ = zend_ast_append_doc_comment($2); $$->attr = $1; }
+ { $$ = $2; $$->attr = $1; }
| T_CONST class_const_list ';'
{ $$ = $2; RESET_DOC_COMMENT(); }
| T_USE name_list trait_adaptations
@@ -798,9 +798,10 @@ property_list:
;
property:
- T_VARIABLE { $$ = zend_ast_create(ZEND_AST_PROP_ELEM, $1, NULL); }
- | T_VARIABLE '=' expr
- { $$ = zend_ast_create(ZEND_AST_PROP_ELEM, $1, $3); }
+ T_VARIABLE backup_doc_comment
+ { $$ = zend_ast_create(ZEND_AST_PROP_ELEM, $1, NULL, ($2 ? zend_ast_create_zval_from_str($2) : NULL)); }
+ | T_VARIABLE '=' expr backup_doc_comment
+ { $$ = zend_ast_create(ZEND_AST_PROP_ELEM, $1, $3, ($4 ? zend_ast_create_zval_from_str($4) : NULL)); }
;
class_const_list:
diff --git a/Zend/zend_modules.h b/Zend/zend_modules.h
index 13b93b13a4..be637f32e4 100644
--- a/Zend/zend_modules.h
+++ b/Zend/zend_modules.h
@@ -33,7 +33,7 @@
#define ZEND_MODULE_INFO_FUNC_ARGS zend_module_entry *zend_module
#define ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU zend_module
-#define ZEND_MODULE_API_NO 20141001
+#define ZEND_MODULE_API_NO 20151012
#ifdef ZTS
#define USING_ZTS 1
#else
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index 8587a82c8d..7c4b6a679a 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -494,7 +494,6 @@ static zend_long *zend_get_property_guard(zend_object *zobj, zend_string *member
{
HashTable *guards;
zend_long stub, *guard;
- zval tmp;
ZEND_ASSERT(GC_FLAGS(zobj) & IS_OBJ_USE_GUARDS);
if (GC_FLAGS(zobj) & IS_OBJ_HAS_GUARDS) {
@@ -506,7 +505,6 @@ static zend_long *zend_get_property_guard(zend_object *zobj, zend_string *member
} else {
ALLOC_HASHTABLE(guards);
zend_hash_init(guards, 8, NULL, zend_property_guard_dtor, 0);
- ZVAL_PTR(&tmp, guards);
Z_PTR(zobj->properties_table[zobj->ce->default_properties_count]) = guards;
GC_FLAGS(zobj) |= IS_OBJ_HAS_GUARDS;
}
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 2345e0b2d4..14dafe353b 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -492,7 +492,15 @@ try_again:
ZEND_API void ZEND_FASTCALL _convert_to_cstring(zval *op ZEND_FILE_LINE_DC) /* {{{ */
{
- _convert_to_string(op ZEND_FILE_LINE_CC);
+ if (Z_TYPE_P(op) == IS_DOUBLE) {
+ zend_string *str;
+ double dval = Z_DVAL_P(op);
+
+ str = zend_strpprintf(0, "%.*H", (int) EG(precision), dval);
+ ZVAL_NEW_STR(op, str);
+ } else {
+ _convert_to_string(op ZEND_FILE_LINE_CC);
+ }
}
/* }}} */
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index f0e7278459..0c34f1717b 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -1565,7 +1565,8 @@ ZEND_VM_HELPER_EX(zend_fetch_var_address_helper, CONST|TMPVAR|CV, UNUSED|CONST|V
break;
case BP_VAR_RW:
zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
+ retval = zend_hash_update(target_symbol_table, name, &EG(uninitialized_zval));
+ break;
case BP_VAR_W:
retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
break;
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 035f4ab7af..031e234281 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -5024,7 +5024,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
break;
case BP_VAR_RW:
zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
+ retval = zend_hash_update(target_symbol_table, name, &EG(uninitialized_zval));
+ break;
case BP_VAR_W:
retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
break;
@@ -6945,7 +6946,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
break;
case BP_VAR_RW:
zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
+ retval = zend_hash_update(target_symbol_table, name, &EG(uninitialized_zval));
+ break;
case BP_VAR_W:
retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
break;
@@ -7441,7 +7443,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
break;
case BP_VAR_RW:
zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
+ retval = zend_hash_update(target_symbol_table, name, &EG(uninitialized_zval));
+ break;
case BP_VAR_W:
retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
break;
@@ -31092,7 +31095,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
break;
case BP_VAR_RW:
zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
+ retval = zend_hash_update(target_symbol_table, name, &EG(uninitialized_zval));
+ break;
case BP_VAR_W:
retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
break;
@@ -33305,7 +33309,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
break;
case BP_VAR_RW:
zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
+ retval = zend_hash_update(target_symbol_table, name, &EG(uninitialized_zval));
+ break;
case BP_VAR_W:
retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
break;
@@ -34242,7 +34247,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
break;
case BP_VAR_RW:
zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
+ retval = zend_hash_update(target_symbol_table, name, &EG(uninitialized_zval));
+ break;
case BP_VAR_W:
retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
break;
@@ -41434,7 +41440,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
break;
case BP_VAR_RW:
zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
+ retval = zend_hash_update(target_symbol_table, name, &EG(uninitialized_zval));
+ break;
case BP_VAR_W:
retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
break;
@@ -42415,7 +42422,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
break;
case BP_VAR_RW:
zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
+ retval = zend_hash_update(target_symbol_table, name, &EG(uninitialized_zval));
+ break;
case BP_VAR_W:
retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
break;
@@ -42816,7 +42824,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
break;
case BP_VAR_RW:
zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
+ retval = zend_hash_update(target_symbol_table, name, &EG(uninitialized_zval));
+ break;
case BP_VAR_W:
retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
break;
diff --git a/ext/date/lib/parse_date.c b/ext/date/lib/parse_date.c
index 0ad50696f5..059b04cfcd 100644
--- a/ext/date/lib/parse_date.c
+++ b/ext/date/lib/parse_date.c
@@ -1,5 +1,5 @@
/* Generated by re2c 0.13.5 on Thu Aug 13 10:30:11 2015 */
-#line 1 "parse_date.re"
+#line 1 "ext/date/lib/parse_date.re"
/*
* The MIT License (MIT)
*
@@ -820,11 +820,11 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper)
std:
s->tok = cursor;
s->len = 0;
-#line 946 "parse_date.re"
+#line 946 "ext/date/lib/parse_date.re"
-#line 828 "<stdout>"
+#line 828 "ext/date/lib/parse_date.c"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
@@ -964,7 +964,7 @@ yy2:
}
yy3:
YYDEBUG(3, *YYCURSOR);
-#line 1626 "parse_date.re"
+#line 1626 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("tzcorrection | tz");
@@ -977,7 +977,7 @@ yy3:
TIMELIB_DEINIT;
return TIMELIB_TIMEZONE;
}
-#line 981 "<stdout>"
+#line 981 "ext/date/lib/parse_date.c"
yy4:
YYDEBUG(4, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1288,12 +1288,12 @@ yy11:
if (yych <= '9') goto yy1385;
yy12:
YYDEBUG(12, *YYCURSOR);
-#line 1721 "parse_date.re"
+#line 1721 "ext/date/lib/parse_date.re"
{
add_error(s, "Unexpected character");
goto std;
}
-#line 1297 "<stdout>"
+#line 1297 "ext/date/lib/parse_date.c"
yy13:
YYDEBUG(13, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2350,11 +2350,11 @@ yy48:
if (yych <= '9') goto yy54;
yy49:
YYDEBUG(49, *YYCURSOR);
-#line 1710 "parse_date.re"
+#line 1710 "ext/date/lib/parse_date.re"
{
goto std;
}
-#line 2358 "<stdout>"
+#line 2358 "ext/date/lib/parse_date.c"
yy50:
YYDEBUG(50, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2363,12 +2363,12 @@ yy51:
YYDEBUG(51, *YYCURSOR);
++YYCURSOR;
YYDEBUG(52, *YYCURSOR);
-#line 1715 "parse_date.re"
+#line 1715 "ext/date/lib/parse_date.re"
{
s->pos = cursor; s->line++;
goto std;
}
-#line 2372 "<stdout>"
+#line 2372 "ext/date/lib/parse_date.c"
yy53:
YYDEBUG(53, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2755,7 +2755,7 @@ yy71:
if (yych == 's') goto yy73;
yy72:
YYDEBUG(72, *YYCURSOR);
-#line 1694 "parse_date.re"
+#line 1694 "ext/date/lib/parse_date.re"
{
timelib_ull i;
DEBUG_OUTPUT("relative");
@@ -2770,7 +2770,7 @@ yy72:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 2774 "<stdout>"
+#line 2774 "ext/date/lib/parse_date.c"
yy73:
YYDEBUG(73, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3532,7 +3532,7 @@ yy165:
}
yy166:
YYDEBUG(166, *YYCURSOR);
-#line 1557 "parse_date.re"
+#line 1557 "ext/date/lib/parse_date.re"
{
const timelib_relunit* relunit;
DEBUG_OUTPUT("daytext");
@@ -3549,7 +3549,7 @@ yy166:
TIMELIB_DEINIT;
return TIMELIB_WEEKDAY;
}
-#line 3553 "<stdout>"
+#line 3553 "ext/date/lib/parse_date.c"
yy167:
YYDEBUG(167, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4069,7 +4069,7 @@ yy192:
}
yy193:
YYDEBUG(193, *YYCURSOR);
-#line 1616 "parse_date.re"
+#line 1616 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("monthtext");
TIMELIB_INIT;
@@ -4078,7 +4078,7 @@ yy193:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
-#line 4082 "<stdout>"
+#line 4082 "ext/date/lib/parse_date.c"
yy194:
YYDEBUG(194, *YYCURSOR);
++YYCURSOR;
@@ -4129,7 +4129,7 @@ yy197:
}
yy198:
YYDEBUG(198, *YYCURSOR);
-#line 1362 "parse_date.re"
+#line 1362 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datetextual | datenoyear");
@@ -4142,7 +4142,7 @@ yy198:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
-#line 4146 "<stdout>"
+#line 4146 "ext/date/lib/parse_date.c"
yy199:
YYDEBUG(199, *YYCURSOR);
yyaccept = 6;
@@ -4411,7 +4411,7 @@ yy221:
}
yy222:
YYDEBUG(222, *YYCURSOR);
-#line 1664 "parse_date.re"
+#line 1664 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz");
@@ -4440,7 +4440,7 @@ yy222:
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
-#line 4444 "<stdout>"
+#line 4444 "ext/date/lib/parse_date.c"
yy223:
YYDEBUG(223, *YYCURSOR);
yyaccept = 7;
@@ -5138,7 +5138,7 @@ yy277:
YYDEBUG(277, *YYCURSOR);
++YYCURSOR;
YYDEBUG(278, *YYCURSOR);
-#line 1640 "parse_date.re"
+#line 1640 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("dateshortwithtimeshort12 | dateshortwithtimelong12");
TIMELIB_INIT;
@@ -5161,7 +5161,7 @@ yy277:
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
-#line 5165 "<stdout>"
+#line 5165 "ext/date/lib/parse_date.c"
yy279:
YYDEBUG(279, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5339,7 +5339,7 @@ yy293:
++YYCURSOR;
yy294:
YYDEBUG(294, *YYCURSOR);
-#line 1334 "parse_date.re"
+#line 1334 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datenoday");
@@ -5352,7 +5352,7 @@ yy294:
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
-#line 5356 "<stdout>"
+#line 5356 "ext/date/lib/parse_date.c"
yy295:
YYDEBUG(295, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6572,7 +6572,7 @@ yy361:
if (yych <= '9') goto yy364;
yy363:
YYDEBUG(363, *YYCURSOR);
-#line 1478 "parse_date.re"
+#line 1478 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgtextshort");
@@ -6585,7 +6585,7 @@ yy363:
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
-#line 6589 "<stdout>"
+#line 6589 "ext/date/lib/parse_date.c"
yy364:
YYDEBUG(364, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7223,7 +7223,7 @@ yy391:
}
yy392:
YYDEBUG(392, *YYCURSOR);
-#line 1536 "parse_date.re"
+#line 1536 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("ago");
TIMELIB_INIT;
@@ -7243,7 +7243,7 @@ yy392:
TIMELIB_DEINIT;
return TIMELIB_AGO;
}
-#line 7247 "<stdout>"
+#line 7247 "ext/date/lib/parse_date.c"
yy393:
YYDEBUG(393, *YYCURSOR);
yyaccept = 5;
@@ -8993,7 +8993,7 @@ yy453:
++YYCURSOR;
yy454:
YYDEBUG(454, *YYCURSOR);
-#line 1239 "parse_date.re"
+#line 1239 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash | dateslash");
TIMELIB_INIT;
@@ -9004,7 +9004,7 @@ yy454:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 9008 "<stdout>"
+#line 9008 "ext/date/lib/parse_date.c"
yy455:
YYDEBUG(455, *YYCURSOR);
yyaccept = 0;
@@ -9564,7 +9564,7 @@ yy474:
}
yy475:
YYDEBUG(475, *YYCURSOR);
-#line 1376 "parse_date.re"
+#line 1376 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenoyearrev");
TIMELIB_INIT;
@@ -9575,7 +9575,7 @@ yy475:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
-#line 9579 "<stdout>"
+#line 9579 "ext/date/lib/parse_date.c"
yy476:
YYDEBUG(476, *YYCURSOR);
yyaccept = 10;
@@ -9716,7 +9716,7 @@ yy487:
YYDEBUG(487, *YYCURSOR);
++YYCURSOR;
YYDEBUG(488, *YYCURSOR);
-#line 1094 "parse_date.re"
+#line 1094 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12");
TIMELIB_INIT;
@@ -9732,7 +9732,7 @@ yy487:
TIMELIB_DEINIT;
return TIMELIB_TIME12;
}
-#line 9736 "<stdout>"
+#line 9736 "ext/date/lib/parse_date.c"
yy489:
YYDEBUG(489, *YYCURSOR);
yyaccept = 11;
@@ -9745,7 +9745,7 @@ yy489:
}
yy490:
YYDEBUG(490, *YYCURSOR);
-#line 1131 "parse_date.re"
+#line 1131 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long");
@@ -9770,7 +9770,7 @@ yy490:
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
-#line 9774 "<stdout>"
+#line 9774 "ext/date/lib/parse_date.c"
yy491:
YYDEBUG(491, *YYCURSOR);
yyaccept = 11;
@@ -10080,7 +10080,7 @@ yy522:
YYDEBUG(522, *YYCURSOR);
++YYCURSOR;
YYDEBUG(523, *YYCURSOR);
-#line 1111 "parse_date.re"
+#line 1111 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("mssqltime");
TIMELIB_INIT;
@@ -10099,7 +10099,7 @@ yy522:
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
-#line 10103 "<stdout>"
+#line 10103 "ext/date/lib/parse_date.c"
yy524:
YYDEBUG(524, *YYCURSOR);
yyaccept = 11;
@@ -10205,7 +10205,7 @@ yy533:
if (yych <= '9') goto yy540;
yy534:
YYDEBUG(534, *YYCURSOR);
-#line 1293 "parse_date.re"
+#line 1293 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datefull");
@@ -10219,7 +10219,7 @@ yy534:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL;
}
-#line 10223 "<stdout>"
+#line 10223 "ext/date/lib/parse_date.c"
yy535:
YYDEBUG(535, *YYCURSOR);
yych = *++YYCURSOR;
@@ -10956,7 +10956,7 @@ yy604:
YYDEBUG(605, *YYCURSOR);
++YYCURSOR;
YYDEBUG(606, *YYCURSOR);
-#line 1308 "parse_date.re"
+#line 1308 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("pointed date YYYY");
TIMELIB_INIT;
@@ -10967,7 +10967,7 @@ yy604:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
-#line 10971 "<stdout>"
+#line 10971 "ext/date/lib/parse_date.c"
yy607:
YYDEBUG(607, *YYCURSOR);
yyaccept = 11;
@@ -11003,7 +11003,7 @@ yy610:
if (yych <= '9') goto yy604;
yy611:
YYDEBUG(611, *YYCURSOR);
-#line 1320 "parse_date.re"
+#line 1320 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pointed date YY");
@@ -11016,7 +11016,7 @@ yy611:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
-#line 11020 "<stdout>"
+#line 11020 "ext/date/lib/parse_date.c"
yy612:
YYDEBUG(612, *YYCURSOR);
yyaccept = 11;
@@ -11657,7 +11657,7 @@ yy655:
}
yy656:
YYDEBUG(656, *YYCURSOR);
-#line 1279 "parse_date.re"
+#line 1279 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("gnudateshort");
@@ -11670,7 +11670,7 @@ yy656:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 11674 "<stdout>"
+#line 11674 "ext/date/lib/parse_date.c"
yy657:
YYDEBUG(657, *YYCURSOR);
yyaccept = 13;
@@ -11776,7 +11776,7 @@ yy665:
}
yy666:
YYDEBUG(666, *YYCURSOR);
-#line 1223 "parse_date.re"
+#line 1223 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("americanshort | american");
@@ -11791,7 +11791,7 @@ yy666:
TIMELIB_DEINIT;
return TIMELIB_AMERICAN;
}
-#line 11795 "<stdout>"
+#line 11795 "ext/date/lib/parse_date.c"
yy667:
YYDEBUG(667, *YYCURSOR);
yyaccept = 14;
@@ -12024,7 +12024,7 @@ yy699:
if (yych <= ':') goto yy703;
yy700:
YYDEBUG(700, *YYCURSOR);
-#line 1506 "parse_date.re"
+#line 1506 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("clf");
@@ -12044,7 +12044,7 @@ yy700:
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
-#line 12048 "<stdout>"
+#line 12048 "ext/date/lib/parse_date.c"
yy701:
YYDEBUG(701, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12596,7 +12596,7 @@ yy762:
}
yy763:
YYDEBUG(763, *YYCURSOR);
-#line 1251 "parse_date.re"
+#line 1251 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("iso8601date2");
@@ -12609,7 +12609,7 @@ yy763:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 12613 "<stdout>"
+#line 12613 "ext/date/lib/parse_date.c"
yy764:
YYDEBUG(764, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12648,7 +12648,7 @@ yy770:
YYDEBUG(770, *YYCURSOR);
++YYCURSOR;
YYDEBUG(771, *YYCURSOR);
-#line 1492 "parse_date.re"
+#line 1492 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgtextreverse");
@@ -12661,7 +12661,7 @@ yy770:
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
-#line 12665 "<stdout>"
+#line 12665 "ext/date/lib/parse_date.c"
yy772:
YYDEBUG(772, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12799,7 +12799,7 @@ yy782:
}
yy783:
YYDEBUG(783, *YYCURSOR);
-#line 1527 "parse_date.re"
+#line 1527 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("year4");
TIMELIB_INIT;
@@ -12807,7 +12807,7 @@ yy783:
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
-#line 12811 "<stdout>"
+#line 12811 "ext/date/lib/parse_date.c"
yy784:
YYDEBUG(784, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12958,7 +12958,7 @@ yy792:
}
yy793:
YYDEBUG(793, *YYCURSOR);
-#line 1348 "parse_date.re"
+#line 1348 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datenodayrev");
@@ -12971,7 +12971,7 @@ yy793:
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
-#line 12975 "<stdout>"
+#line 12975 "ext/date/lib/parse_date.c"
yy794:
YYDEBUG(794, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13186,7 +13186,7 @@ yy813:
if (yych <= '7') goto yy816;
yy814:
YYDEBUG(814, *YYCURSOR);
-#line 1459 "parse_date.re"
+#line 1459 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweek");
@@ -13204,7 +13204,7 @@ yy814:
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
-#line 13208 "<stdout>"
+#line 13208 "ext/date/lib/parse_date.c"
yy815:
YYDEBUG(815, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13214,7 +13214,7 @@ yy816:
YYDEBUG(816, *YYCURSOR);
++YYCURSOR;
YYDEBUG(817, *YYCURSOR);
-#line 1440 "parse_date.re"
+#line 1440 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweekday");
@@ -13232,7 +13232,7 @@ yy816:
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
-#line 13236 "<stdout>"
+#line 13236 "ext/date/lib/parse_date.c"
yy818:
YYDEBUG(818, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13296,7 +13296,7 @@ yy820:
}
yy821:
YYDEBUG(821, *YYCURSOR);
-#line 1426 "parse_date.re"
+#line 1426 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgydotd");
@@ -13309,7 +13309,7 @@ yy821:
TIMELIB_DEINIT;
return TIMELIB_PG_YEARDAY;
}
-#line 13313 "<stdout>"
+#line 13313 "ext/date/lib/parse_date.c"
yy822:
YYDEBUG(822, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13412,7 +13412,7 @@ yy841:
++YYCURSOR;
yy842:
YYDEBUG(842, *YYCURSOR);
-#line 1400 "parse_date.re"
+#line 1400 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx | exif");
@@ -13437,7 +13437,7 @@ yy842:
TIMELIB_DEINIT;
return TIMELIB_XMLRPC_SOAP;
}
-#line 13441 "<stdout>"
+#line 13441 "ext/date/lib/parse_date.c"
yy843:
YYDEBUG(843, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13699,7 +13699,7 @@ yy847:
}
yy848:
YYDEBUG(848, *YYCURSOR);
-#line 1388 "parse_date.re"
+#line 1388 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenocolon");
TIMELIB_INIT;
@@ -13710,7 +13710,7 @@ yy848:
TIMELIB_DEINIT;
return TIMELIB_DATE_NOCOLON;
}
-#line 13714 "<stdout>"
+#line 13714 "ext/date/lib/parse_date.c"
yy849:
YYDEBUG(849, *YYCURSOR);
yych = *++YYCURSOR;
@@ -14630,7 +14630,7 @@ yy972:
if (yych <= '9') goto yy995;
yy973:
YYDEBUG(973, *YYCURSOR);
-#line 1265 "parse_date.re"
+#line 1265 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("gnudateshorter");
@@ -14643,7 +14643,7 @@ yy973:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 14647 "<stdout>"
+#line 14647 "ext/date/lib/parse_date.c"
yy974:
YYDEBUG(974, *YYCURSOR);
yyaccept = 22;
@@ -15652,7 +15652,7 @@ yy1065:
}
yy1067:
YYDEBUG(1067, *YYCURSOR);
-#line 1157 "parse_date.re"
+#line 1157 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("gnunocolon");
TIMELIB_INIT;
@@ -15674,7 +15674,7 @@ yy1067:
TIMELIB_DEINIT;
return TIMELIB_GNU_NOCOLON;
}
-#line 15678 "<stdout>"
+#line 15678 "ext/date/lib/parse_date.c"
yy1068:
YYDEBUG(1068, *YYCURSOR);
yych = *++YYCURSOR;
@@ -15766,7 +15766,7 @@ yy1074:
}
yy1075:
YYDEBUG(1075, *YYCURSOR);
-#line 1203 "parse_date.re"
+#line 1203 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("iso8601nocolon");
@@ -15785,7 +15785,7 @@ yy1075:
TIMELIB_DEINIT;
return TIMELIB_ISO_NOCOLON;
}
-#line 15789 "<stdout>"
+#line 15789 "ext/date/lib/parse_date.c"
yy1076:
YYDEBUG(1076, *YYCURSOR);
yyaccept = 25;
@@ -16683,7 +16683,7 @@ yy1116:
}
yy1117:
YYDEBUG(1117, *YYCURSOR);
-#line 1599 "parse_date.re"
+#line 1599 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -16699,7 +16699,7 @@ yy1117:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 16703 "<stdout>"
+#line 16703 "ext/date/lib/parse_date.c"
yy1118:
YYDEBUG(1118, *YYCURSOR);
++YYCURSOR;
@@ -16750,7 +16750,7 @@ yy1125:
YYDEBUG(1125, *YYCURSOR);
++YYCURSOR;
YYDEBUG(1126, *YYCURSOR);
-#line 1072 "parse_date.re"
+#line 1072 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -16771,7 +16771,7 @@ yy1125:
TIMELIB_DEINIT;
return TIMELIB_WEEK_DAY_OF_MONTH;
}
-#line 16775 "<stdout>"
+#line 16775 "ext/date/lib/parse_date.c"
yy1127:
YYDEBUG(1127, *YYCURSOR);
yyaccept = 26;
@@ -16879,7 +16879,7 @@ yy1140:
}
yy1141:
YYDEBUG(1141, *YYCURSOR);
-#line 1575 "parse_date.re"
+#line 1575 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -16902,7 +16902,7 @@ yy1141:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 16906 "<stdout>"
+#line 16906 "ext/date/lib/parse_date.c"
yy1142:
YYDEBUG(1142, *YYCURSOR);
yych = *++YYCURSOR;
@@ -19579,7 +19579,7 @@ yy1293:
goto yy1297;
yy1294:
YYDEBUG(1294, *YYCURSOR);
-#line 1049 "parse_date.re"
+#line 1049 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("backof | frontof");
TIMELIB_INIT;
@@ -19601,7 +19601,7 @@ yy1294:
TIMELIB_DEINIT;
return TIMELIB_LF_DAY_OF_MONTH;
}
-#line 19605 "<stdout>"
+#line 19605 "ext/date/lib/parse_date.c"
yy1295:
YYDEBUG(1295, *YYCURSOR);
yyaccept = 28;
@@ -19862,7 +19862,7 @@ yy1315:
YYDEBUG(1315, *YYCURSOR);
++YYCURSOR;
YYDEBUG(1316, *YYCURSOR);
-#line 1032 "parse_date.re"
+#line 1032 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("firstdayof | lastdayof");
TIMELIB_INIT;
@@ -19878,7 +19878,7 @@ yy1315:
TIMELIB_DEINIT;
return TIMELIB_LF_DAY_OF_MONTH;
}
-#line 19882 "<stdout>"
+#line 19882 "ext/date/lib/parse_date.c"
yy1317:
YYDEBUG(1317, *YYCURSOR);
yyaccept = 0;
@@ -21309,7 +21309,7 @@ yy1385:
if (yych <= '9') goto yy1385;
yy1387:
YYDEBUG(1387, *YYCURSOR);
-#line 1006 "parse_date.re"
+#line 1006 "ext/date/lib/parse_date.re"
{
timelib_ull i;
@@ -21334,7 +21334,7 @@ yy1387:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 21338 "<stdout>"
+#line 21338 "ext/date/lib/parse_date.c"
yy1388:
YYDEBUG(1388, *YYCURSOR);
yych = *++YYCURSOR;
@@ -21770,7 +21770,7 @@ yy1416:
++YYCURSOR;
yy1417:
YYDEBUG(1417, *YYCURSOR);
-#line 994 "parse_date.re"
+#line 994 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("tomorrow");
TIMELIB_INIT;
@@ -21781,7 +21781,7 @@ yy1417:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 21785 "<stdout>"
+#line 21785 "ext/date/lib/parse_date.c"
yy1418:
YYDEBUG(1418, *YYCURSOR);
yych = *++YYCURSOR;
@@ -21816,7 +21816,7 @@ yy1419:
}
yy1420:
YYDEBUG(1420, *YYCURSOR);
-#line 984 "parse_date.re"
+#line 984 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("midnight | today");
TIMELIB_INIT;
@@ -21825,7 +21825,7 @@ yy1420:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 21829 "<stdout>"
+#line 21829 "ext/date/lib/parse_date.c"
yy1421:
YYDEBUG(1421, *YYCURSOR);
yych = *++YYCURSOR;
@@ -23837,7 +23837,7 @@ yy1499:
}
yy1500:
YYDEBUG(1500, *YYCURSOR);
-#line 963 "parse_date.re"
+#line 963 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("now");
TIMELIB_INIT;
@@ -23845,7 +23845,7 @@ yy1500:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 23849 "<stdout>"
+#line 23849 "ext/date/lib/parse_date.c"
yy1501:
YYDEBUG(1501, *YYCURSOR);
yych = *++YYCURSOR;
@@ -23984,7 +23984,7 @@ yy1507:
}
yy1508:
YYDEBUG(1508, *YYCURSOR);
-#line 972 "parse_date.re"
+#line 972 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("noon");
TIMELIB_INIT;
@@ -23995,7 +23995,7 @@ yy1508:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 23999 "<stdout>"
+#line 23999 "ext/date/lib/parse_date.c"
yy1509:
YYDEBUG(1509, *YYCURSOR);
yyaccept = 0;
@@ -24528,7 +24528,7 @@ yy1530:
++YYCURSOR;
yy1531:
YYDEBUG(1531, *YYCURSOR);
-#line 951 "parse_date.re"
+#line 951 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("yesterday");
TIMELIB_INIT;
@@ -24539,7 +24539,7 @@ yy1531:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 24543 "<stdout>"
+#line 24543 "ext/date/lib/parse_date.c"
yy1532:
YYDEBUG(1532, *YYCURSOR);
yyaccept = 0;
@@ -24712,7 +24712,7 @@ yy1537:
goto yy1531;
}
}
-#line 1725 "parse_date.re"
+#line 1725 "ext/date/lib/parse_date.re"
}
diff --git a/ext/date/lib/parse_iso_intervals.c b/ext/date/lib/parse_iso_intervals.c
index 5ae281d96d..237201623b 100644
--- a/ext/date/lib/parse_iso_intervals.c
+++ b/ext/date/lib/parse_iso_intervals.c
@@ -1,5 +1,5 @@
/* Generated by re2c 0.13.5 on Thu Aug 13 10:30:12 2015 */
-#line 1 "parse_iso_intervals.re"
+#line 1 "ext/date/lib/parse_iso_intervals.re"
/*
* The MIT License (MIT)
*
@@ -254,11 +254,11 @@ static int scan(Scanner *s)
std:
s->tok = cursor;
s->len = 0;
-#line 282 "parse_iso_intervals.re"
+#line 282 "ext/date/lib/parse_iso_intervals.re"
-#line 262 "<stdout>"
+#line 262 "ext/date/lib/parse_iso_intervals.c"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
@@ -325,12 +325,12 @@ std:
if ((yych = *YYCURSOR) <= '/') goto yy3;
if (yych <= '9') goto yy98;
yy3:
-#line 395 "parse_iso_intervals.re"
+#line 395 "ext/date/lib/parse_iso_intervals.re"
{
add_error(s, "Unexpected character");
goto std;
}
-#line 334 "<stdout>"
+#line 334 "ext/date/lib/parse_iso_intervals.c"
yy4:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
@@ -344,7 +344,7 @@ yy5:
if (yych <= '9') goto yy12;
if (yych == 'T') goto yy14;
yy6:
-#line 322 "parse_iso_intervals.re"
+#line 322 "ext/date/lib/parse_iso_intervals.re"
{
timelib_sll nr;
int in_time = 0;
@@ -385,22 +385,22 @@ yy6:
TIMELIB_DEINIT;
return TIMELIB_PERIOD;
}
-#line 389 "<stdout>"
+#line 389 "ext/date/lib/parse_iso_intervals.c"
yy7:
++YYCURSOR;
-#line 384 "parse_iso_intervals.re"
+#line 384 "ext/date/lib/parse_iso_intervals.re"
{
goto std;
}
-#line 396 "<stdout>"
+#line 396 "ext/date/lib/parse_iso_intervals.c"
yy9:
++YYCURSOR;
-#line 389 "parse_iso_intervals.re"
+#line 389 "ext/date/lib/parse_iso_intervals.re"
{
s->pos = cursor; s->line++;
goto std;
}
-#line 404 "<stdout>"
+#line 404 "ext/date/lib/parse_iso_intervals.c"
yy11:
yych = *++YYCURSOR;
goto yy3;
@@ -682,7 +682,7 @@ yy51:
if (yych <= '/') goto yy13;
if (yych >= ':') goto yy13;
++YYCURSOR;
-#line 364 "parse_iso_intervals.re"
+#line 364 "ext/date/lib/parse_iso_intervals.re"
{
DEBUG_OUTPUT("combinedrep");
TIMELIB_INIT;
@@ -701,7 +701,7 @@ yy51:
TIMELIB_DEINIT;
return TIMELIB_PERIOD;
}
-#line 705 "<stdout>"
+#line 705 "ext/date/lib/parse_iso_intervals.c"
yy59:
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
@@ -804,7 +804,7 @@ yy76:
if (yych != 'Z') goto yy13;
yy83:
++YYCURSOR;
-#line 298 "parse_iso_intervals.re"
+#line 298 "ext/date/lib/parse_iso_intervals.re"
{
timelib_time *current;
@@ -827,7 +827,7 @@ yy83:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 831 "<stdout>"
+#line 831 "ext/date/lib/parse_iso_intervals.c"
yy85:
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
@@ -889,7 +889,7 @@ yy98:
if (yych <= '/') goto yy100;
if (yych <= '9') goto yy98;
yy100:
-#line 287 "parse_iso_intervals.re"
+#line 287 "ext/date/lib/parse_iso_intervals.re"
{
DEBUG_OUTPUT("recurrences");
TIMELIB_INIT;
@@ -899,9 +899,9 @@ yy100:
s->have_recurrences = 1;
return TIMELIB_PERIOD;
}
-#line 903 "<stdout>"
+#line 903 "ext/date/lib/parse_iso_intervals.c"
}
-#line 399 "parse_iso_intervals.re"
+#line 399 "ext/date/lib/parse_iso_intervals.re"
}
#ifdef PHP_WIN32
diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h
index 562186fbca..ed56507cb3 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[583] = {
+const timelib_tzdb_index_entry timezonedb_idx_builtin[584] = {
#ifdef TIMELIB_SUPPORTS_V2DATA
# define FOR_V2(v2,v1) v2
#else
@@ -116,483 +116,484 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[583] = {
{ "America/Eirunepe" , FOR_V2(0x01533E, 0x008873) },
{ "America/El_Salvador" , FOR_V2(0x015600, 0x008998) },
{ "America/Ensenada" , FOR_V2(0x015706, 0x008A12) },
- { "America/Fort_Wayne" , FOR_V2(0x016046, 0x008D80) },
- { "America/Fortaleza" , FOR_V2(0x0166DD, 0x008FFB) },
- { "America/Glace_Bay" , FOR_V2(0x0169DF, 0x00913E) },
- { "America/Godthab" , FOR_V2(0x0172B2, 0x00949C) },
- { "America/Goose_Bay" , FOR_V2(0x017A21, 0x009765) },
- { "America/Grand_Turk" , FOR_V2(0x0186E9, 0x009C3B) },
- { "America/Grenada" , FOR_V2(0x018BFC, 0x009E2B) },
- { "America/Guadeloupe" , FOR_V2(0x018CB2, 0x009E85) },
- { "America/Guatemala" , FOR_V2(0x018D68, 0x009EDF) },
- { "America/Guayaquil" , FOR_V2(0x018EA6, 0x009F6D) },
- { "America/Guyana" , FOR_V2(0x018F85, 0x009FDB) },
- { "America/Halifax" , FOR_V2(0x01909F, 0x00A061) },
- { "America/Havana" , FOR_V2(0x019E45, 0x00A57A) },
- { "America/Hermosillo" , FOR_V2(0x01A7D6, 0x00A8FE) },
- { "America/Indiana/Indianapolis" , FOR_V2(0x01A9C7, 0x00A9E9) },
- { "America/Indiana/Knox" , FOR_V2(0x01B085, 0x00AC8B) },
- { "America/Indiana/Marengo" , FOR_V2(0x01BA3C, 0x00B03B) },
- { "America/Indiana/Petersburg" , FOR_V2(0x01C133, 0x00B2F2) },
- { "America/Indiana/Tell_City" , FOR_V2(0x01C8DC, 0x00B5E6) },
- { "America/Indiana/Vevay" , FOR_V2(0x01CFD4, 0x00B8A0) },
- { "America/Indiana/Vincennes" , FOR_V2(0x01D59A, 0x00BAEC) },
- { "America/Indiana/Winamac" , FOR_V2(0x01DC8D, 0x00BDB1) },
- { "America/Indianapolis" , FOR_V2(0x01E3BB, 0x00C07B) },
- { "America/Inuvik" , FOR_V2(0x01EA52, 0x00C2F6) },
- { "America/Iqaluit" , FOR_V2(0x01F210, 0x00C5F2) },
- { "America/Jamaica" , FOR_V2(0x01FA46, 0x00C929) },
- { "America/Jujuy" , FOR_V2(0x01FC4D, 0x00C9FF) },
- { "America/Juneau" , FOR_V2(0x0200D2, 0x00CBCA) },
- { "America/Kentucky/Louisville" , FOR_V2(0x020A36, 0x00CF59) },
- { "America/Kentucky/Monticello" , FOR_V2(0x021548, 0x00D388) },
- { "America/Knox_IN" , FOR_V2(0x021EB3, 0x00D71E) },
- { "America/Kralendijk" , FOR_V2(0x022844, 0x00DAA8) },
- { "America/La_Paz" , FOR_V2(0x022920, 0x00DB13) },
- { "America/Lima" , FOR_V2(0x022A1F, 0x00DB8B) },
- { "America/Los_Angeles" , FOR_V2(0x022BCC, 0x00DC40) },
- { "America/Louisville" , FOR_V2(0x023701, 0x00E062) },
- { "America/Lower_Princes" , FOR_V2(0x0241EA, 0x00E468) },
- { "America/Maceio" , FOR_V2(0x0242C6, 0x00E4D3) },
- { "America/Managua" , FOR_V2(0x0245D6, 0x00E612) },
- { "America/Manaus" , FOR_V2(0x0247B1, 0x00E6DE) },
- { "America/Marigot" , FOR_V2(0x024A2F, 0x00E7E5) },
- { "America/Martinique" , FOR_V2(0x024AE5, 0x00E83F) },
- { "America/Matamoros" , FOR_V2(0x024BF2, 0x00E8BC) },
- { "America/Mazatlan" , FOR_V2(0x0251D0, 0x00EB1A) },
- { "America/Mendoza" , FOR_V2(0x025820, 0x00ED94) },
- { "America/Menominee" , FOR_V2(0x025CC1, 0x00EF69) },
- { "America/Merida" , FOR_V2(0x0265FF, 0x00F303) },
- { "America/Metlakatla" , FOR_V2(0x026BDB, 0x00F54B) },
- { "America/Mexico_City" , FOR_V2(0x026EE1, 0x00F697) },
- { "America/Miquelon" , FOR_V2(0x02755C, 0x00F917) },
- { "America/Moncton" , FOR_V2(0x027BFC, 0x00FB8E) },
- { "America/Monterrey" , FOR_V2(0x028880, 0x010036) },
- { "America/Montevideo" , FOR_V2(0x028E68, 0x01029E) },
- { "America/Montreal" , FOR_V2(0x02945B, 0x0104E8) },
- { "America/Montserrat" , FOR_V2(0x02A216, 0x0109E9) },
- { "America/Nassau" , FOR_V2(0x02A2CC, 0x010A43) },
- { "America/New_York" , FOR_V2(0x02ABC4, 0x010D8D) },
- { "America/Nipigon" , FOR_V2(0x02B9B5, 0x0112A9) },
- { "America/Nome" , FOR_V2(0x02C25F, 0x01160B) },
- { "America/Noronha" , FOR_V2(0x02CBCC, 0x01199A) },
- { "America/North_Dakota/Beulah" , FOR_V2(0x02CEC0, 0x011ACF) },
- { "America/North_Dakota/Center" , FOR_V2(0x02D84C, 0x011E74) },
- { "America/North_Dakota/New_Salem" , FOR_V2(0x02E1D8, 0x012219) },
- { "America/Ojinaga" , FOR_V2(0x02EB79, 0x0125D3) },
- { "America/Panama" , FOR_V2(0x02F1A2, 0x012841) },
- { "America/Pangnirtung" , FOR_V2(0x02F279, 0x0128A7) },
- { "America/Paramaribo" , FOR_V2(0x02FAE4, 0x012BF2) },
- { "America/Phoenix" , FOR_V2(0x02FC24, 0x012C89) },
- { "America/Port-au-Prince" , FOR_V2(0x02FDC1, 0x012D58) },
- { "America/Port_of_Spain" , FOR_V2(0x030398, 0x012F89) },
- { "America/Porto_Acre" , FOR_V2(0x03044E, 0x012FE3) },
- { "America/Porto_Velho" , FOR_V2(0x0306EA, 0x0130F4) },
- { "America/Puerto_Rico" , FOR_V2(0x03094A, 0x0131EF) },
- { "America/Rainy_River" , FOR_V2(0x030A55, 0x01326B) },
- { "America/Rankin_Inlet" , FOR_V2(0x0312E6, 0x0135B4) },
- { "America/Recife" , FOR_V2(0x031A9A, 0x0138A7) },
- { "America/Regina" , FOR_V2(0x031D88, 0x0139D6) },
- { "America/Resolute" , FOR_V2(0x0321AB, 0x013B99) },
- { "America/Rio_Branco" , FOR_V2(0x032961, 0x013E8E) },
- { "America/Rosario" , FOR_V2(0x032C01, 0x013FA3) },
- { "America/Santa_Isabel" , FOR_V2(0x033076, 0x014162) },
- { "America/Santarem" , FOR_V2(0x0339F0, 0x01450A) },
- { "America/Santiago" , FOR_V2(0x033C74, 0x014614) },
- { "America/Santo_Domingo" , FOR_V2(0x0343FF, 0x0148F7) },
- { "America/Sao_Paulo" , FOR_V2(0x0345F4, 0x0149CE) },
- { "America/Scoresbysund" , FOR_V2(0x034E11, 0x014CE2) },
- { "America/Shiprock" , FOR_V2(0x0355C1, 0x014FD5) },
- { "America/Sitka" , FOR_V2(0x035F62, 0x01535F) },
- { "America/St_Barthelemy" , FOR_V2(0x0368C4, 0x0156EC) },
- { "America/St_Johns" , FOR_V2(0x03697A, 0x015746) },
- { "America/St_Kitts" , FOR_V2(0x0377FE, 0x015CB2) },
- { "America/St_Lucia" , FOR_V2(0x0378B4, 0x015D0C) },
- { "America/St_Thomas" , FOR_V2(0x03796A, 0x015D66) },
- { "America/St_Vincent" , FOR_V2(0x037A20, 0x015DC0) },
- { "America/Swift_Current" , FOR_V2(0x037AD6, 0x015E1A) },
- { "America/Tegucigalpa" , FOR_V2(0x037D4E, 0x015F40) },
- { "America/Thule" , FOR_V2(0x037E70, 0x015FC4) },
- { "America/Thunder_Bay" , FOR_V2(0x038484, 0x016210) },
- { "America/Tijuana" , FOR_V2(0x038D56, 0x01656A) },
- { "America/Toronto" , FOR_V2(0x0396C6, 0x016908) },
- { "America/Tortola" , FOR_V2(0x03A4B1, 0x016E39) },
- { "America/Vancouver" , FOR_V2(0x03A567, 0x016E93) },
- { "America/Virgin" , FOR_V2(0x03B0EC, 0x0172E1) },
- { "America/Whitehorse" , FOR_V2(0x03B1A2, 0x01733B) },
- { "America/Winnipeg" , FOR_V2(0x03B9F5, 0x017669) },
- { "America/Yakutat" , FOR_V2(0x03C572, 0x017ABA) },
- { "America/Yellowknife" , FOR_V2(0x03CEAB, 0x017E36) },
- { "Antarctica/Casey" , FOR_V2(0x03D6A0, 0x01814B) },
- { "Antarctica/Davis" , FOR_V2(0x03D7DB, 0x0181EE) },
- { "Antarctica/DumontDUrville" , FOR_V2(0x03D926, 0x018294) },
- { "Antarctica/Macquarie" , FOR_V2(0x03DA3A, 0x01832A) },
- { "Antarctica/Mawson" , FOR_V2(0x03E050, 0x018584) },
- { "Antarctica/McMurdo" , FOR_V2(0x03E141, 0x018605) },
- { "Antarctica/Palmer" , FOR_V2(0x03EB16, 0x0189C1) },
- { "Antarctica/Rothera" , FOR_V2(0x03F0C7, 0x018C09) },
- { "Antarctica/South_Pole" , FOR_V2(0x03F1A0, 0x018C84) },
- { "Antarctica/Syowa" , FOR_V2(0x03FB48, 0x019013) },
- { "Antarctica/Troll" , FOR_V2(0x03FC1A, 0x019086) },
- { "Antarctica/Vostok" , FOR_V2(0x0400CD, 0x01925D) },
- { "Arctic/Longyearbyen" , FOR_V2(0x0401A2, 0x0192D3) },
- { "Asia/Aden" , FOR_V2(0x040A79, 0x019616) },
- { "Asia/Almaty" , FOR_V2(0x040B30, 0x019670) },
- { "Asia/Amman" , FOR_V2(0x040EF2, 0x0197F4) },
- { "Asia/Anadyr" , FOR_V2(0x041653, 0x019AAF) },
- { "Asia/Aqtau" , FOR_V2(0x041B3F, 0x019CBE) },
- { "Asia/Aqtobe" , FOR_V2(0x041FF2, 0x019ECA) },
- { "Asia/Ashgabat" , FOR_V2(0x042429, 0x01A087) },
- { "Asia/Ashkhabad" , FOR_V2(0x0426D4, 0x01A1A9) },
- { "Asia/Baghdad" , FOR_V2(0x04297F, 0x01A2CB) },
- { "Asia/Bahrain" , FOR_V2(0x042D67, 0x01A451) },
- { "Asia/Baku" , FOR_V2(0x042E44, 0x01A4BC) },
- { "Asia/Bangkok" , FOR_V2(0x0435F4, 0x01A7A9) },
- { "Asia/Beirut" , FOR_V2(0x0436CC, 0x01A80F) },
- { "Asia/Bishkek" , FOR_V2(0x043F57, 0x01AB2D) },
- { "Asia/Brunei" , FOR_V2(0x044388, 0x01ACDE) },
- { "Asia/Calcutta" , FOR_V2(0x04445D, 0x01AD45) },
- { "Asia/Chita" , FOR_V2(0x04458C, 0x01ADCF) },
- { "Asia/Choibalsan" , FOR_V2(0x044AA0, 0x01AFF1) },
- { "Asia/Chongqing" , FOR_V2(0x0450EF, 0x01B25D) },
- { "Asia/Chungking" , FOR_V2(0x045299, 0x01B30E) },
- { "Asia/Colombo" , FOR_V2(0x045443, 0x01B3BF) },
- { "Asia/Dacca" , FOR_V2(0x0455D4, 0x01B474) },
- { "Asia/Damascus" , FOR_V2(0x045766, 0x01B52B) },
- { "Asia/Dhaka" , FOR_V2(0x046082, 0x01B880) },
- { "Asia/Dili" , FOR_V2(0x046214, 0x01B937) },
- { "Asia/Dubai" , FOR_V2(0x046355, 0x01B9CE) },
- { "Asia/Dushanbe" , FOR_V2(0x04640C, 0x01BA28) },
- { "Asia/Gaza" , FOR_V2(0x04667B, 0x01BB30) },
- { "Asia/Harbin" , FOR_V2(0x046F9B, 0x01BE94) },
- { "Asia/Hebron" , FOR_V2(0x047145, 0x01BF45) },
- { "Asia/Ho_Chi_Minh" , FOR_V2(0x047A80, 0x01C2B2) },
- { "Asia/Hong_Kong" , FOR_V2(0x047C01, 0x01C361) },
- { "Asia/Hovd" , FOR_V2(0x0480B2, 0x01C530) },
- { "Asia/Irkutsk" , FOR_V2(0x0486D2, 0x01C793) },
- { "Asia/Istanbul" , FOR_V2(0x048BE0, 0x01C99F) },
- { "Asia/Jakarta" , FOR_V2(0x0496A7, 0x01CD9D) },
- { "Asia/Jayapura" , FOR_V2(0x049833, 0x01CE58) },
- { "Asia/Jerusalem" , FOR_V2(0x049961, 0x01CF02) },
- { "Asia/Kabul" , FOR_V2(0x04A246, 0x01D24A) },
- { "Asia/Kamchatka" , FOR_V2(0x04A319, 0x01D2AC) },
- { "Asia/Karachi" , FOR_V2(0x04A7F4, 0x01D4B2) },
- { "Asia/Kashgar" , FOR_V2(0x04A993, 0x01D56C) },
- { "Asia/Kathmandu" , FOR_V2(0x04AA4A, 0x01D5C6) },
- { "Asia/Katmandu" , FOR_V2(0x04AB2A, 0x01D631) },
- { "Asia/Khandyga" , FOR_V2(0x04AC0A, 0x01D69C) },
- { "Asia/Kolkata" , FOR_V2(0x04B163, 0x01D8D3) },
- { "Asia/Krasnoyarsk" , FOR_V2(0x04B292, 0x01D95D) },
- { "Asia/Kuala_Lumpur" , FOR_V2(0x04B781, 0x01DB5F) },
- { "Asia/Kuching" , FOR_V2(0x04B92E, 0x01DC2D) },
- { "Asia/Kuwait" , FOR_V2(0x04BB50, 0x01DD20) },
- { "Asia/Macao" , FOR_V2(0x04BC07, 0x01DD7A) },
- { "Asia/Macau" , FOR_V2(0x04BF2E, 0x01DEBA) },
- { "Asia/Magadan" , FOR_V2(0x04C255, 0x01DFFA) },
- { "Asia/Makassar" , FOR_V2(0x04C75C, 0x01E213) },
- { "Asia/Manila" , FOR_V2(0x04C8C8, 0x01E2E5) },
- { "Asia/Muscat" , FOR_V2(0x04CA3D, 0x01E383) },
- { "Asia/Nicosia" , FOR_V2(0x04CAF4, 0x01E3DD) },
- { "Asia/Novokuznetsk" , FOR_V2(0x04D2E0, 0x01E6CA) },
- { "Asia/Novosibirsk" , FOR_V2(0x04D7FD, 0x01E8EF) },
- { "Asia/Omsk" , FOR_V2(0x04DCD8, 0x01EAE4) },
- { "Asia/Oral" , FOR_V2(0x04E1C6, 0x01ECE5) },
- { "Asia/Phnom_Penh" , FOR_V2(0x04E62D, 0x01EEBA) },
- { "Asia/Pontianak" , FOR_V2(0x04E705, 0x01EF20) },
- { "Asia/Pyongyang" , FOR_V2(0x04E89D, 0x01EFE7) },
- { "Asia/Qatar" , FOR_V2(0x04E9E1, 0x01F07E) },
- { "Asia/Qyzylorda" , FOR_V2(0x04EABE, 0x01F0E9) },
- { "Asia/Rangoon" , FOR_V2(0x04EF24, 0x01F2C4) },
- { "Asia/Riyadh" , FOR_V2(0x04F04D, 0x01F34D) },
- { "Asia/Saigon" , FOR_V2(0x04F104, 0x01F3A7) },
- { "Asia/Sakhalin" , FOR_V2(0x04F285, 0x01F456) },
- { "Asia/Samarkand" , FOR_V2(0x04F777, 0x01F658) },
- { "Asia/Seoul" , FOR_V2(0x04FA45, 0x01F793) },
- { "Asia/Shanghai" , FOR_V2(0x04FC8C, 0x01F88B) },
- { "Asia/Singapore" , FOR_V2(0x04FE42, 0x01F948) },
- { "Asia/Srednekolymsk" , FOR_V2(0x04FFFA, 0x01FA10) },
- { "Asia/Taipei" , FOR_V2(0x0504FA, 0x01FC1D) },
- { "Asia/Tashkent" , FOR_V2(0x050826, 0x01FD5F) },
- { "Asia/Tbilisi" , FOR_V2(0x050AEA, 0x01FE95) },
- { "Asia/Tehran" , FOR_V2(0x050F6C, 0x020068) },
- { "Asia/Tel_Aviv" , FOR_V2(0x0515F5, 0x0202E3) },
- { "Asia/Thimbu" , FOR_V2(0x051EDA, 0x02062B) },
- { "Asia/Thimphu" , FOR_V2(0x051FB7, 0x020696) },
- { "Asia/Tokyo" , FOR_V2(0x052094, 0x020701) },
- { "Asia/Ujung_Pandang" , FOR_V2(0x052203, 0x020798) },
- { "Asia/Ulaanbaatar" , FOR_V2(0x052327, 0x020822) },
- { "Asia/Ulan_Bator" , FOR_V2(0x05292A, 0x020A68) },
- { "Asia/Urumqi" , FOR_V2(0x052F1F, 0x020CA0) },
- { "Asia/Ust-Nera" , FOR_V2(0x052FE3, 0x020D07) },
- { "Asia/Vientiane" , FOR_V2(0x053513, 0x020F26) },
- { "Asia/Vladivostok" , FOR_V2(0x0535EB, 0x020F8C) },
- { "Asia/Yakutsk" , FOR_V2(0x053AD8, 0x02118B) },
- { "Asia/Yekaterinburg" , FOR_V2(0x053FC4, 0x02138A) },
- { "Asia/Yerevan" , FOR_V2(0x054517, 0x0215B8) },
- { "Atlantic/Azores" , FOR_V2(0x054A20, 0x0217BD) },
- { "Atlantic/Bermuda" , FOR_V2(0x0557D2, 0x021CD1) },
- { "Atlantic/Canary" , FOR_V2(0x055FB2, 0x021FB7) },
- { "Atlantic/Cape_Verde" , FOR_V2(0x056745, 0x022292) },
- { "Atlantic/Faeroe" , FOR_V2(0x05684F, 0x022310) },
- { "Atlantic/Faroe" , FOR_V2(0x056F80, 0x0225B9) },
- { "Atlantic/Jan_Mayen" , FOR_V2(0x0576B1, 0x022862) },
- { "Atlantic/Madeira" , FOR_V2(0x057F88, 0x022BA5) },
- { "Atlantic/Reykjavik" , FOR_V2(0x058D39, 0x0230BF) },
- { "Atlantic/South_Georgia" , FOR_V2(0x0591EB, 0x023291) },
- { "Atlantic/St_Helena" , FOR_V2(0x05928B, 0x0232D5) },
- { "Atlantic/Stanley" , FOR_V2(0x059341, 0x02332F) },
- { "Australia/ACT" , FOR_V2(0x05982B, 0x023516) },
- { "Australia/Adelaide" , FOR_V2(0x05A0E6, 0x02384A) },
- { "Australia/Brisbane" , FOR_V2(0x05A9BF, 0x023B89) },
- { "Australia/Broken_Hill" , FOR_V2(0x05ABAA, 0x023C67) },
- { "Australia/Canberra" , FOR_V2(0x05B4B4, 0x023FB8) },
- { "Australia/Currie" , FOR_V2(0x05BD6F, 0x0242EC) },
- { "Australia/Darwin" , FOR_V2(0x05C640, 0x024636) },
- { "Australia/Eucla" , FOR_V2(0x05C7A1, 0x0246CF) },
- { "Australia/Hobart" , FOR_V2(0x05C9B2, 0x0247BC) },
- { "Australia/LHI" , FOR_V2(0x05D2F6, 0x024B31) },
- { "Australia/Lindeman" , FOR_V2(0x05DA45, 0x024DE3) },
- { "Australia/Lord_Howe" , FOR_V2(0x05DC77, 0x024EDB) },
- { "Australia/Melbourne" , FOR_V2(0x05E3D6, 0x02519D) },
- { "Australia/North" , FOR_V2(0x05EC99, 0x0254D9) },
- { "Australia/NSW" , FOR_V2(0x05EDE8, 0x025560) },
- { "Australia/Perth" , FOR_V2(0x05F6A3, 0x025894) },
- { "Australia/Queensland" , FOR_V2(0x05F8B0, 0x025983) },
- { "Australia/South" , FOR_V2(0x05FA80, 0x025A46) },
- { "Australia/Sydney" , FOR_V2(0x06034A, 0x025D76) },
- { "Australia/Tasmania" , FOR_V2(0x060C25, 0x0260CA) },
- { "Australia/Victoria" , FOR_V2(0x061550, 0x026426) },
- { "Australia/West" , FOR_V2(0x061E0B, 0x02675A) },
- { "Australia/Yancowinna" , FOR_V2(0x061FF6, 0x026827) },
- { "Brazil/Acre" , FOR_V2(0x0628E4, 0x026B5C) },
- { "Brazil/DeNoronha" , FOR_V2(0x062B80, 0x026C6D) },
- { "Brazil/East" , FOR_V2(0x062E64, 0x026D92) },
- { "Brazil/West" , FOR_V2(0x06364F, 0x027074) },
- { "Canada/Atlantic" , FOR_V2(0x0638C3, 0x027171) },
- { "Canada/Central" , FOR_V2(0x06463D, 0x02765E) },
- { "Canada/East-Saskatchewan" , FOR_V2(0x065194, 0x027A89) },
- { "Canada/Eastern" , FOR_V2(0x065582, 0x027C17) },
- { "Canada/Mountain" , FOR_V2(0x06633D, 0x028118) },
- { "Canada/Newfoundland" , FOR_V2(0x066CAB, 0x028493) },
- { "Canada/Pacific" , FOR_V2(0x067B07, 0x0289D7) },
- { "Canada/Saskatchewan" , FOR_V2(0x068668, 0x028E01) },
- { "Canada/Yukon" , FOR_V2(0x068A56, 0x028F8F) },
- { "CET" , FOR_V2(0x06928F, 0x0292A3) },
- { "Chile/Continental" , FOR_V2(0x069AD1, 0x0295AC) },
- { "Chile/EasterIsland" , FOR_V2(0x06A24E, 0x029881) },
- { "CST6CDT" , FOR_V2(0x06A8A8, 0x029AEC) },
- { "Cuba" , FOR_V2(0x06B1AA, 0x029E3D) },
- { "EET" , FOR_V2(0x06BB3B, 0x02A1C1) },
- { "Egypt" , FOR_V2(0x06C29B, 0x02A474) },
- { "Eire" , FOR_V2(0x06CA5B, 0x02A754) },
- { "EST" , FOR_V2(0x06D84E, 0x02AC76) },
- { "EST5EDT" , FOR_V2(0x06D8D9, 0x02ACBA) },
- { "Etc/GMT" , FOR_V2(0x06E1DB, 0x02B00B) },
- { "Etc/GMT+0" , FOR_V2(0x06E266, 0x02B04F) },
- { "Etc/GMT+1" , FOR_V2(0x06E2F1, 0x02B093) },
- { "Etc/GMT+10" , FOR_V2(0x06E384, 0x02B0D9) },
- { "Etc/GMT+11" , FOR_V2(0x06E41B, 0x02B120) },
- { "Etc/GMT+12" , FOR_V2(0x06E4B2, 0x02B167) },
- { "Etc/GMT+2" , FOR_V2(0x06E549, 0x02B1AE) },
- { "Etc/GMT+3" , FOR_V2(0x06E5DC, 0x02B1F4) },
- { "Etc/GMT+4" , FOR_V2(0x06E66F, 0x02B23A) },
- { "Etc/GMT+5" , FOR_V2(0x06E702, 0x02B280) },
- { "Etc/GMT+6" , FOR_V2(0x06E795, 0x02B2C6) },
- { "Etc/GMT+7" , FOR_V2(0x06E828, 0x02B30C) },
- { "Etc/GMT+8" , FOR_V2(0x06E8BB, 0x02B352) },
- { "Etc/GMT+9" , FOR_V2(0x06E94E, 0x02B398) },
- { "Etc/GMT-0" , FOR_V2(0x06E9E1, 0x02B3DE) },
- { "Etc/GMT-1" , FOR_V2(0x06EA6C, 0x02B422) },
- { "Etc/GMT-10" , FOR_V2(0x06EB00, 0x02B468) },
- { "Etc/GMT-11" , FOR_V2(0x06EB98, 0x02B4AF) },
- { "Etc/GMT-12" , FOR_V2(0x06EC30, 0x02B4F6) },
- { "Etc/GMT-13" , FOR_V2(0x06ECC8, 0x02B53D) },
- { "Etc/GMT-14" , FOR_V2(0x06ED60, 0x02B584) },
- { "Etc/GMT-2" , FOR_V2(0x06EDF8, 0x02B5CB) },
- { "Etc/GMT-3" , FOR_V2(0x06EE8C, 0x02B611) },
- { "Etc/GMT-4" , FOR_V2(0x06EF20, 0x02B657) },
- { "Etc/GMT-5" , FOR_V2(0x06EFB4, 0x02B69D) },
- { "Etc/GMT-6" , FOR_V2(0x06F048, 0x02B6E3) },
- { "Etc/GMT-7" , FOR_V2(0x06F0DC, 0x02B729) },
- { "Etc/GMT-8" , FOR_V2(0x06F170, 0x02B76F) },
- { "Etc/GMT-9" , FOR_V2(0x06F204, 0x02B7B5) },
- { "Etc/GMT0" , FOR_V2(0x06F298, 0x02B7FB) },
- { "Etc/Greenwich" , FOR_V2(0x06F323, 0x02B83F) },
- { "Etc/UCT" , FOR_V2(0x06F3AE, 0x02B883) },
- { "Etc/Universal" , FOR_V2(0x06F439, 0x02B8C7) },
- { "Etc/UTC" , FOR_V2(0x06F4C4, 0x02B90B) },
- { "Etc/Zulu" , FOR_V2(0x06F54F, 0x02B94F) },
- { "Europe/Amsterdam" , FOR_V2(0x06F5DA, 0x02B993) },
- { "Europe/Andorra" , FOR_V2(0x070165, 0x02BDE2) },
- { "Europe/Athens" , FOR_V2(0x070848, 0x02C06F) },
- { "Europe/Belfast" , FOR_V2(0x071133, 0x02C3C3) },
- { "Europe/Belgrade" , FOR_V2(0x071FA6, 0x02C90B) },
- { "Europe/Berlin" , FOR_V2(0x072757, 0x02CBE5) },
- { "Europe/Bratislava" , FOR_V2(0x073090, 0x02CF5A) },
- { "Europe/Brussels" , FOR_V2(0x07397C, 0x02D29D) },
- { "Europe/Bucharest" , FOR_V2(0x074522, 0x02D6E5) },
- { "Europe/Budapest" , FOR_V2(0x074DDB, 0x02DA20) },
- { "Europe/Busingen" , FOR_V2(0x07574C, 0x02DD9A) },
- { "Europe/Chisinau" , FOR_V2(0x075EDE, 0x02E062) },
- { "Europe/Copenhagen" , FOR_V2(0x076869, 0x02E401) },
- { "Europe/Dublin" , FOR_V2(0x0770E5, 0x02E71C) },
- { "Europe/Gibraltar" , FOR_V2(0x077ED8, 0x02EC3E) },
- { "Europe/Guernsey" , FOR_V2(0x078AD9, 0x02F0A6) },
- { "Europe/Helsinki" , FOR_V2(0x07994C, 0x02F5EE) },
- { "Europe/Isle_of_Man" , FOR_V2(0x07A0CD, 0x02F8B5) },
- { "Europe/Istanbul" , FOR_V2(0x07AF40, 0x02FDFD) },
- { "Europe/Jersey" , FOR_V2(0x07BA07, 0x0301FB) },
- { "Europe/Kaliningrad" , FOR_V2(0x07C87A, 0x030743) },
- { "Europe/Kiev" , FOR_V2(0x07CEAB, 0x0309C7) },
- { "Europe/Lisbon" , FOR_V2(0x07D6F6, 0x030CF4) },
- { "Europe/Ljubljana" , FOR_V2(0x07E487, 0x0311FD) },
- { "Europe/London" , FOR_V2(0x07EC38, 0x0314D7) },
- { "Europe/Luxembourg" , FOR_V2(0x07FAAB, 0x031A1F) },
- { "Europe/Madrid" , FOR_V2(0x080655, 0x031E7A) },
- { "Europe/Malta" , FOR_V2(0x0810A4, 0x032251) },
- { "Europe/Mariehamn" , FOR_V2(0x081AF5, 0x03261B) },
- { "Europe/Minsk" , FOR_V2(0x082276, 0x0328E2) },
- { "Europe/Monaco" , FOR_V2(0x0827DA, 0x032B06) },
- { "Europe/Moscow" , FOR_V2(0x08336F, 0x032F52) },
- { "Europe/Nicosia" , FOR_V2(0x08398A, 0x0331CD) },
- { "Europe/Oslo" , FOR_V2(0x084176, 0x0334BA) },
- { "Europe/Paris" , FOR_V2(0x084A4D, 0x0337FD) },
- { "Europe/Podgorica" , FOR_V2(0x0855F4, 0x033C54) },
- { "Europe/Prague" , FOR_V2(0x085DA5, 0x033F2E) },
- { "Europe/Riga" , FOR_V2(0x086691, 0x034271) },
- { "Europe/Rome" , FOR_V2(0x086F58, 0x0345C7) },
- { "Europe/Samara" , FOR_V2(0x0879DA, 0x03499B) },
- { "Europe/San_Marino" , FOR_V2(0x087F91, 0x034C11) },
- { "Europe/Sarajevo" , FOR_V2(0x088A13, 0x034FE5) },
- { "Europe/Simferopol" , FOR_V2(0x0891C4, 0x0352BF) },
- { "Europe/Skopje" , FOR_V2(0x0897B4, 0x035524) },
- { "Europe/Sofia" , FOR_V2(0x089F65, 0x0357FE) },
- { "Europe/Stockholm" , FOR_V2(0x08A7C3, 0x035B17) },
- { "Europe/Tallinn" , FOR_V2(0x08AF4D, 0x035DD7) },
- { "Europe/Tirane" , FOR_V2(0x08B7E4, 0x03611D) },
- { "Europe/Tiraspol" , FOR_V2(0x08C022, 0x036428) },
- { "Europe/Uzhgorod" , FOR_V2(0x08C9AD, 0x0367C7) },
- { "Europe/Vaduz" , FOR_V2(0x08D1F8, 0x036AEF) },
- { "Europe/Vatican" , FOR_V2(0x08D982, 0x036DAF) },
- { "Europe/Vienna" , FOR_V2(0x08E404, 0x037183) },
- { "Europe/Vilnius" , FOR_V2(0x08ECCD, 0x0374C1) },
- { "Europe/Volgograd" , FOR_V2(0x08F570, 0x037811) },
- { "Europe/Warsaw" , FOR_V2(0x08FAC0, 0x037A43) },
- { "Europe/Zagreb" , FOR_V2(0x09055D, 0x037E35) },
- { "Europe/Zaporozhye" , FOR_V2(0x090D0E, 0x03810F) },
- { "Europe/Zurich" , FOR_V2(0x091587, 0x038461) },
- { "Factory" , FOR_V2(0x091D11, 0x038721) },
- { "GB" , FOR_V2(0x091E25, 0x038792) },
- { "GB-Eire" , FOR_V2(0x092C98, 0x038CDA) },
- { "GMT" , FOR_V2(0x093B0B, 0x039222) },
- { "GMT+0" , FOR_V2(0x093B96, 0x039266) },
- { "GMT-0" , FOR_V2(0x093C21, 0x0392AA) },
- { "GMT0" , FOR_V2(0x093CAC, 0x0392EE) },
- { "Greenwich" , FOR_V2(0x093D37, 0x039332) },
- { "Hongkong" , FOR_V2(0x093DC2, 0x039376) },
- { "HST" , FOR_V2(0x094273, 0x039545) },
- { "Iceland" , FOR_V2(0x0942FF, 0x039589) },
- { "Indian/Antananarivo" , FOR_V2(0x0947B1, 0x03975B) },
- { "Indian/Chagos" , FOR_V2(0x0948D8, 0x0397E7) },
- { "Indian/Christmas" , FOR_V2(0x0949AD, 0x03984E) },
- { "Indian/Cocos" , FOR_V2(0x094A4E, 0x039892) },
- { "Indian/Comoro" , FOR_V2(0x094AF2, 0x0398D6) },
- { "Indian/Kerguelen" , FOR_V2(0x094C19, 0x039962) },
- { "Indian/Mahe" , FOR_V2(0x094CD0, 0x0399BC) },
- { "Indian/Maldives" , FOR_V2(0x094D87, 0x039A16) },
- { "Indian/Mauritius" , FOR_V2(0x094E5F, 0x039A7C) },
- { "Indian/Mayotte" , FOR_V2(0x094F68, 0x039AF7) },
- { "Indian/Reunion" , FOR_V2(0x09508F, 0x039B83) },
- { "Iran" , FOR_V2(0x095146, 0x039BDD) },
- { "Israel" , FOR_V2(0x0957CF, 0x039E58) },
- { "Jamaica" , FOR_V2(0x0960B4, 0x03A1A0) },
- { "Japan" , FOR_V2(0x0962BB, 0x03A276) },
- { "Kwajalein" , FOR_V2(0x09642A, 0x03A30D) },
- { "Libya" , FOR_V2(0x096523, 0x03A381) },
- { "MET" , FOR_V2(0x0967BE, 0x03A48F) },
- { "Mexico/BajaNorte" , FOR_V2(0x097000, 0x03A798) },
- { "Mexico/BajaSur" , FOR_V2(0x097940, 0x03AB06) },
- { "Mexico/General" , FOR_V2(0x097F68, 0x03AD58) },
- { "MST" , FOR_V2(0x0985C6, 0x03AFBB) },
- { "MST7MDT" , FOR_V2(0x098651, 0x03AFFF) },
- { "Navajo" , FOR_V2(0x098F53, 0x03B350) },
- { "NZ" , FOR_V2(0x0998F4, 0x03B6DA) },
- { "NZ-CHAT" , FOR_V2(0x09A29C, 0x03BA69) },
- { "Pacific/Apia" , FOR_V2(0x09AAB1, 0x03BD5E) },
- { "Pacific/Auckland" , FOR_V2(0x09AF0B, 0x03BF07) },
- { "Pacific/Bougainville" , FOR_V2(0x09B8C1, 0x03C2A4) },
- { "Pacific/Chatham" , FOR_V2(0x09B9F1, 0x03C32D) },
- { "Pacific/Chuuk" , FOR_V2(0x09C215, 0x03C631) },
- { "Pacific/Easter" , FOR_V2(0x09C2CE, 0x03C68A) },
- { "Pacific/Efate" , FOR_V2(0x09C935, 0x03C902) },
- { "Pacific/Enderbury" , FOR_V2(0x09CB1F, 0x03C9CD) },
- { "Pacific/Fakaofo" , FOR_V2(0x09CC20, 0x03CA4C) },
- { "Pacific/Fiji" , FOR_V2(0x09CCF1, 0x03CAAE) },
- { "Pacific/Funafuti" , FOR_V2(0x09D12F, 0x03CC46) },
- { "Pacific/Galapagos" , FOR_V2(0x09D1D1, 0x03CC8A) },
- { "Pacific/Gambier" , FOR_V2(0x09D2C1, 0x03CD07) },
- { "Pacific/Guadalcanal" , FOR_V2(0x09D389, 0x03CD71) },
- { "Pacific/Guam" , FOR_V2(0x09D441, 0x03CDCB) },
- { "Pacific/Honolulu" , FOR_V2(0x09D52E, 0x03CE32) },
- { "Pacific/Johnston" , FOR_V2(0x09D654, 0x03CEBA) },
- { "Pacific/Kiritimati" , FOR_V2(0x09D782, 0x03CF4A) },
- { "Pacific/Kosrae" , FOR_V2(0x09D880, 0x03CFC6) },
- { "Pacific/Kwajalein" , FOR_V2(0x09D978, 0x03D03C) },
- { "Pacific/Majuro" , FOR_V2(0x09DA7A, 0x03D0B9) },
- { "Pacific/Marquesas" , FOR_V2(0x09DB59, 0x03D129) },
- { "Pacific/Midway" , FOR_V2(0x09DC26, 0x03D195) },
- { "Pacific/Nauru" , FOR_V2(0x09DD50, 0x03D227) },
- { "Pacific/Niue" , FOR_V2(0x09DE5A, 0x03D2A4) },
- { "Pacific/Norfolk" , FOR_V2(0x09DF48, 0x03D313) },
- { "Pacific/Noumea" , FOR_V2(0x09E024, 0x03D379) },
- { "Pacific/Pago_Pago" , FOR_V2(0x09E16A, 0x03D40E) },
- { "Pacific/Palau" , FOR_V2(0x09E286, 0x03D492) },
- { "Pacific/Pitcairn" , FOR_V2(0x09E327, 0x03D4D6) },
- { "Pacific/Pohnpei" , FOR_V2(0x09E3FE, 0x03D53C) },
- { "Pacific/Ponape" , FOR_V2(0x09E4B3, 0x03D591) },
- { "Pacific/Port_Moresby" , FOR_V2(0x09E558, 0x03D5D6) },
- { "Pacific/Rarotonga" , FOR_V2(0x09E61E, 0x03D628) },
- { "Pacific/Saipan" , FOR_V2(0x09E868, 0x03D715) },
- { "Pacific/Samoa" , FOR_V2(0x09E955, 0x03D77C) },
- { "Pacific/Tahiti" , FOR_V2(0x09EA71, 0x03D800) },
- { "Pacific/Tarawa" , FOR_V2(0x09EB3A, 0x03D86A) },
- { "Pacific/Tongatapu" , FOR_V2(0x09EBEE, 0x03D8BE) },
- { "Pacific/Truk" , FOR_V2(0x09ED4D, 0x03D95B) },
- { "Pacific/Wake" , FOR_V2(0x09EDF2, 0x03D9A0) },
- { "Pacific/Wallis" , FOR_V2(0x09EEA2, 0x03D9F0) },
- { "Pacific/Yap" , FOR_V2(0x09EF44, 0x03DA34) },
- { "Poland" , FOR_V2(0x09EFE9, 0x03DA79) },
- { "Portugal" , FOR_V2(0x09FA86, 0x03DE6B) },
- { "PRC" , FOR_V2(0x0A080F, 0x03E36C) },
- { "PST8PDT" , FOR_V2(0x0A09B9, 0x03E41D) },
- { "ROC" , FOR_V2(0x0A12BB, 0x03E76E) },
- { "ROK" , FOR_V2(0x0A15E7, 0x03E8B0) },
- { "Singapore" , FOR_V2(0x0A182E, 0x03E9A8) },
- { "Turkey" , FOR_V2(0x0A19E6, 0x03EA70) },
- { "UCT" , FOR_V2(0x0A24AD, 0x03EE6E) },
- { "Universal" , FOR_V2(0x0A2538, 0x03EEB2) },
- { "US/Alaska" , FOR_V2(0x0A25C3, 0x03EEF6) },
- { "US/Aleutian" , FOR_V2(0x0A2F1F, 0x03F270) },
- { "US/Arizona" , FOR_V2(0x0A3868, 0x03F5E1) },
- { "US/Central" , FOR_V2(0x0A39D5, 0x03F680) },
- { "US/East-Indiana" , FOR_V2(0x0A47E2, 0x03FBA4) },
- { "US/Eastern" , FOR_V2(0x0A4E79, 0x03FE1F) },
- { "US/Hawaii" , FOR_V2(0x0A5C5E, 0x04032F) },
- { "US/Indiana-Starke" , FOR_V2(0x0A5D7E, 0x0403B1) },
- { "US/Michigan" , FOR_V2(0x0A670F, 0x04073B) },
- { "US/Mountain" , FOR_V2(0x0A6FC3, 0x040A77) },
- { "US/Pacific" , FOR_V2(0x0A7964, 0x040E01) },
- { "US/Pacific-New" , FOR_V2(0x0A848D, 0x041217) },
- { "US/Samoa" , FOR_V2(0x0A8FB6, 0x04162D) },
- { "UTC" , FOR_V2(0x0A90D2, 0x0416B1) },
- { "W-SU" , FOR_V2(0x0A915D, 0x0416F5) },
- { "WET" , FOR_V2(0x0A9761, 0x041959) },
- { "Zulu" , FOR_V2(0x0A9EBE, 0x041C0C) },
+ { "America/Fort_Nelson" , FOR_V2(0x016046, 0x008D80) },
+ { "America/Fort_Wayne" , FOR_V2(0x016951, 0x009101) },
+ { "America/Fortaleza" , FOR_V2(0x016FE8, 0x00937C) },
+ { "America/Glace_Bay" , FOR_V2(0x0172EA, 0x0094BF) },
+ { "America/Godthab" , FOR_V2(0x017BBD, 0x00981D) },
+ { "America/Goose_Bay" , FOR_V2(0x01832C, 0x009AE6) },
+ { "America/Grand_Turk" , FOR_V2(0x018FF4, 0x009FBC) },
+ { "America/Grenada" , FOR_V2(0x019507, 0x00A1AC) },
+ { "America/Guadeloupe" , FOR_V2(0x0195BD, 0x00A206) },
+ { "America/Guatemala" , FOR_V2(0x019673, 0x00A260) },
+ { "America/Guayaquil" , FOR_V2(0x0197B1, 0x00A2EE) },
+ { "America/Guyana" , FOR_V2(0x019890, 0x00A35C) },
+ { "America/Halifax" , FOR_V2(0x0199AA, 0x00A3E2) },
+ { "America/Havana" , FOR_V2(0x01A750, 0x00A8FB) },
+ { "America/Hermosillo" , FOR_V2(0x01B0E1, 0x00AC7F) },
+ { "America/Indiana/Indianapolis" , FOR_V2(0x01B2D2, 0x00AD6A) },
+ { "America/Indiana/Knox" , FOR_V2(0x01B990, 0x00B00C) },
+ { "America/Indiana/Marengo" , FOR_V2(0x01C347, 0x00B3BC) },
+ { "America/Indiana/Petersburg" , FOR_V2(0x01CA3E, 0x00B673) },
+ { "America/Indiana/Tell_City" , FOR_V2(0x01D1E7, 0x00B967) },
+ { "America/Indiana/Vevay" , FOR_V2(0x01D8DF, 0x00BC21) },
+ { "America/Indiana/Vincennes" , FOR_V2(0x01DEA5, 0x00BE6D) },
+ { "America/Indiana/Winamac" , FOR_V2(0x01E598, 0x00C132) },
+ { "America/Indianapolis" , FOR_V2(0x01ECC6, 0x00C3FC) },
+ { "America/Inuvik" , FOR_V2(0x01F35D, 0x00C677) },
+ { "America/Iqaluit" , FOR_V2(0x01FB1B, 0x00C973) },
+ { "America/Jamaica" , FOR_V2(0x020351, 0x00CCAA) },
+ { "America/Jujuy" , FOR_V2(0x020558, 0x00CD80) },
+ { "America/Juneau" , FOR_V2(0x0209DD, 0x00CF4B) },
+ { "America/Kentucky/Louisville" , FOR_V2(0x021341, 0x00D2DA) },
+ { "America/Kentucky/Monticello" , FOR_V2(0x021E53, 0x00D709) },
+ { "America/Knox_IN" , FOR_V2(0x0227BE, 0x00DA9F) },
+ { "America/Kralendijk" , FOR_V2(0x02314F, 0x00DE29) },
+ { "America/La_Paz" , FOR_V2(0x02322B, 0x00DE94) },
+ { "America/Lima" , FOR_V2(0x02332A, 0x00DF0C) },
+ { "America/Los_Angeles" , FOR_V2(0x0234D7, 0x00DFC1) },
+ { "America/Louisville" , FOR_V2(0x02400C, 0x00E3E3) },
+ { "America/Lower_Princes" , FOR_V2(0x024AF5, 0x00E7E9) },
+ { "America/Maceio" , FOR_V2(0x024BD1, 0x00E854) },
+ { "America/Managua" , FOR_V2(0x024EE1, 0x00E993) },
+ { "America/Manaus" , FOR_V2(0x0250BC, 0x00EA5F) },
+ { "America/Marigot" , FOR_V2(0x02533A, 0x00EB66) },
+ { "America/Martinique" , FOR_V2(0x0253F0, 0x00EBC0) },
+ { "America/Matamoros" , FOR_V2(0x0254FD, 0x00EC3D) },
+ { "America/Mazatlan" , FOR_V2(0x025ADB, 0x00EE9B) },
+ { "America/Mendoza" , FOR_V2(0x02612B, 0x00F115) },
+ { "America/Menominee" , FOR_V2(0x0265CC, 0x00F2EA) },
+ { "America/Merida" , FOR_V2(0x026F0A, 0x00F684) },
+ { "America/Metlakatla" , FOR_V2(0x0274E6, 0x00F8CC) },
+ { "America/Mexico_City" , FOR_V2(0x0277EC, 0x00FA18) },
+ { "America/Miquelon" , FOR_V2(0x027E67, 0x00FC98) },
+ { "America/Moncton" , FOR_V2(0x028507, 0x00FF0F) },
+ { "America/Monterrey" , FOR_V2(0x02918B, 0x0103B7) },
+ { "America/Montevideo" , FOR_V2(0x029773, 0x01061F) },
+ { "America/Montreal" , FOR_V2(0x029D66, 0x010869) },
+ { "America/Montserrat" , FOR_V2(0x02AB21, 0x010D6A) },
+ { "America/Nassau" , FOR_V2(0x02ABD7, 0x010DC4) },
+ { "America/New_York" , FOR_V2(0x02B4CF, 0x01110E) },
+ { "America/Nipigon" , FOR_V2(0x02C2C0, 0x01162A) },
+ { "America/Nome" , FOR_V2(0x02CB6A, 0x01198C) },
+ { "America/Noronha" , FOR_V2(0x02D4D7, 0x011D1B) },
+ { "America/North_Dakota/Beulah" , FOR_V2(0x02D7CB, 0x011E50) },
+ { "America/North_Dakota/Center" , FOR_V2(0x02E157, 0x0121F5) },
+ { "America/North_Dakota/New_Salem" , FOR_V2(0x02EAE3, 0x01259A) },
+ { "America/Ojinaga" , FOR_V2(0x02F484, 0x012954) },
+ { "America/Panama" , FOR_V2(0x02FAAD, 0x012BC2) },
+ { "America/Pangnirtung" , FOR_V2(0x02FB84, 0x012C28) },
+ { "America/Paramaribo" , FOR_V2(0x0303EF, 0x012F73) },
+ { "America/Phoenix" , FOR_V2(0x03052F, 0x01300A) },
+ { "America/Port-au-Prince" , FOR_V2(0x0306CC, 0x0130D9) },
+ { "America/Port_of_Spain" , FOR_V2(0x030CA3, 0x01330A) },
+ { "America/Porto_Acre" , FOR_V2(0x030D59, 0x013364) },
+ { "America/Porto_Velho" , FOR_V2(0x030FF5, 0x013475) },
+ { "America/Puerto_Rico" , FOR_V2(0x031255, 0x013570) },
+ { "America/Rainy_River" , FOR_V2(0x031360, 0x0135EC) },
+ { "America/Rankin_Inlet" , FOR_V2(0x031BF1, 0x013935) },
+ { "America/Recife" , FOR_V2(0x0323A5, 0x013C28) },
+ { "America/Regina" , FOR_V2(0x032693, 0x013D57) },
+ { "America/Resolute" , FOR_V2(0x032AB6, 0x013F1A) },
+ { "America/Rio_Branco" , FOR_V2(0x03326C, 0x01420F) },
+ { "America/Rosario" , FOR_V2(0x03350C, 0x014324) },
+ { "America/Santa_Isabel" , FOR_V2(0x033981, 0x0144E3) },
+ { "America/Santarem" , FOR_V2(0x0342FB, 0x01488B) },
+ { "America/Santiago" , FOR_V2(0x03457F, 0x014995) },
+ { "America/Santo_Domingo" , FOR_V2(0x034D0A, 0x014C78) },
+ { "America/Sao_Paulo" , FOR_V2(0x034EFF, 0x014D4F) },
+ { "America/Scoresbysund" , FOR_V2(0x03571C, 0x015063) },
+ { "America/Shiprock" , FOR_V2(0x035ECC, 0x015356) },
+ { "America/Sitka" , FOR_V2(0x03686D, 0x0156E0) },
+ { "America/St_Barthelemy" , FOR_V2(0x0371CF, 0x015A6D) },
+ { "America/St_Johns" , FOR_V2(0x037285, 0x015AC7) },
+ { "America/St_Kitts" , FOR_V2(0x038109, 0x016033) },
+ { "America/St_Lucia" , FOR_V2(0x0381BF, 0x01608D) },
+ { "America/St_Thomas" , FOR_V2(0x038275, 0x0160E7) },
+ { "America/St_Vincent" , FOR_V2(0x03832B, 0x016141) },
+ { "America/Swift_Current" , FOR_V2(0x0383E1, 0x01619B) },
+ { "America/Tegucigalpa" , FOR_V2(0x038659, 0x0162C1) },
+ { "America/Thule" , FOR_V2(0x03877B, 0x016345) },
+ { "America/Thunder_Bay" , FOR_V2(0x038D8F, 0x016591) },
+ { "America/Tijuana" , FOR_V2(0x039661, 0x0168EB) },
+ { "America/Toronto" , FOR_V2(0x039FD1, 0x016C89) },
+ { "America/Tortola" , FOR_V2(0x03ADBC, 0x0171BA) },
+ { "America/Vancouver" , FOR_V2(0x03AE72, 0x017214) },
+ { "America/Virgin" , FOR_V2(0x03B9F7, 0x017662) },
+ { "America/Whitehorse" , FOR_V2(0x03BAAD, 0x0176BC) },
+ { "America/Winnipeg" , FOR_V2(0x03C300, 0x0179EA) },
+ { "America/Yakutat" , FOR_V2(0x03CE7D, 0x017E3B) },
+ { "America/Yellowknife" , FOR_V2(0x03D7B6, 0x0181B7) },
+ { "Antarctica/Casey" , FOR_V2(0x03DFAB, 0x0184CC) },
+ { "Antarctica/Davis" , FOR_V2(0x03E0E6, 0x01856F) },
+ { "Antarctica/DumontDUrville" , FOR_V2(0x03E231, 0x018615) },
+ { "Antarctica/Macquarie" , FOR_V2(0x03E345, 0x0186AB) },
+ { "Antarctica/Mawson" , FOR_V2(0x03E95B, 0x018905) },
+ { "Antarctica/McMurdo" , FOR_V2(0x03EA4C, 0x018986) },
+ { "Antarctica/Palmer" , FOR_V2(0x03F421, 0x018D42) },
+ { "Antarctica/Rothera" , FOR_V2(0x03F9D2, 0x018F8A) },
+ { "Antarctica/South_Pole" , FOR_V2(0x03FAAB, 0x019005) },
+ { "Antarctica/Syowa" , FOR_V2(0x040453, 0x019394) },
+ { "Antarctica/Troll" , FOR_V2(0x040525, 0x019407) },
+ { "Antarctica/Vostok" , FOR_V2(0x0409D8, 0x0195DE) },
+ { "Arctic/Longyearbyen" , FOR_V2(0x040AAD, 0x019654) },
+ { "Asia/Aden" , FOR_V2(0x041384, 0x019997) },
+ { "Asia/Almaty" , FOR_V2(0x04143B, 0x0199F1) },
+ { "Asia/Amman" , FOR_V2(0x0417FD, 0x019B75) },
+ { "Asia/Anadyr" , FOR_V2(0x041F5E, 0x019E30) },
+ { "Asia/Aqtau" , FOR_V2(0x04244A, 0x01A03F) },
+ { "Asia/Aqtobe" , FOR_V2(0x0428FD, 0x01A24B) },
+ { "Asia/Ashgabat" , FOR_V2(0x042D34, 0x01A408) },
+ { "Asia/Ashkhabad" , FOR_V2(0x042FDF, 0x01A52A) },
+ { "Asia/Baghdad" , FOR_V2(0x04328A, 0x01A64C) },
+ { "Asia/Bahrain" , FOR_V2(0x043672, 0x01A7D2) },
+ { "Asia/Baku" , FOR_V2(0x04374F, 0x01A83D) },
+ { "Asia/Bangkok" , FOR_V2(0x043EFF, 0x01AB2A) },
+ { "Asia/Beirut" , FOR_V2(0x043FD7, 0x01AB90) },
+ { "Asia/Bishkek" , FOR_V2(0x044862, 0x01AEAE) },
+ { "Asia/Brunei" , FOR_V2(0x044C93, 0x01B05F) },
+ { "Asia/Calcutta" , FOR_V2(0x044D68, 0x01B0C6) },
+ { "Asia/Chita" , FOR_V2(0x044E97, 0x01B150) },
+ { "Asia/Choibalsan" , FOR_V2(0x0453AB, 0x01B372) },
+ { "Asia/Chongqing" , FOR_V2(0x0459FA, 0x01B5DE) },
+ { "Asia/Chungking" , FOR_V2(0x045BA4, 0x01B68F) },
+ { "Asia/Colombo" , FOR_V2(0x045D4E, 0x01B740) },
+ { "Asia/Dacca" , FOR_V2(0x045EDF, 0x01B7F5) },
+ { "Asia/Damascus" , FOR_V2(0x046071, 0x01B8AC) },
+ { "Asia/Dhaka" , FOR_V2(0x04698D, 0x01BC01) },
+ { "Asia/Dili" , FOR_V2(0x046B1F, 0x01BCB8) },
+ { "Asia/Dubai" , FOR_V2(0x046C60, 0x01BD4F) },
+ { "Asia/Dushanbe" , FOR_V2(0x046D17, 0x01BDA9) },
+ { "Asia/Gaza" , FOR_V2(0x046F86, 0x01BEB1) },
+ { "Asia/Harbin" , FOR_V2(0x0478A6, 0x01C215) },
+ { "Asia/Hebron" , FOR_V2(0x047A50, 0x01C2C6) },
+ { "Asia/Ho_Chi_Minh" , FOR_V2(0x04838B, 0x01C633) },
+ { "Asia/Hong_Kong" , FOR_V2(0x04850C, 0x01C6E2) },
+ { "Asia/Hovd" , FOR_V2(0x0489BD, 0x01C8B1) },
+ { "Asia/Irkutsk" , FOR_V2(0x048FDD, 0x01CB14) },
+ { "Asia/Istanbul" , FOR_V2(0x0494EB, 0x01CD20) },
+ { "Asia/Jakarta" , FOR_V2(0x049FB2, 0x01D11E) },
+ { "Asia/Jayapura" , FOR_V2(0x04A13E, 0x01D1D9) },
+ { "Asia/Jerusalem" , FOR_V2(0x04A26C, 0x01D283) },
+ { "Asia/Kabul" , FOR_V2(0x04AB51, 0x01D5CB) },
+ { "Asia/Kamchatka" , FOR_V2(0x04AC24, 0x01D62D) },
+ { "Asia/Karachi" , FOR_V2(0x04B0FF, 0x01D833) },
+ { "Asia/Kashgar" , FOR_V2(0x04B29E, 0x01D8ED) },
+ { "Asia/Kathmandu" , FOR_V2(0x04B355, 0x01D947) },
+ { "Asia/Katmandu" , FOR_V2(0x04B435, 0x01D9B2) },
+ { "Asia/Khandyga" , FOR_V2(0x04B515, 0x01DA1D) },
+ { "Asia/Kolkata" , FOR_V2(0x04BA6E, 0x01DC54) },
+ { "Asia/Krasnoyarsk" , FOR_V2(0x04BB9D, 0x01DCDE) },
+ { "Asia/Kuala_Lumpur" , FOR_V2(0x04C08C, 0x01DEE0) },
+ { "Asia/Kuching" , FOR_V2(0x04C239, 0x01DFAE) },
+ { "Asia/Kuwait" , FOR_V2(0x04C45B, 0x01E0A1) },
+ { "Asia/Macao" , FOR_V2(0x04C512, 0x01E0FB) },
+ { "Asia/Macau" , FOR_V2(0x04C839, 0x01E23B) },
+ { "Asia/Magadan" , FOR_V2(0x04CB60, 0x01E37B) },
+ { "Asia/Makassar" , FOR_V2(0x04D067, 0x01E594) },
+ { "Asia/Manila" , FOR_V2(0x04D1D3, 0x01E666) },
+ { "Asia/Muscat" , FOR_V2(0x04D348, 0x01E704) },
+ { "Asia/Nicosia" , FOR_V2(0x04D3FF, 0x01E75E) },
+ { "Asia/Novokuznetsk" , FOR_V2(0x04DBEB, 0x01EA4B) },
+ { "Asia/Novosibirsk" , FOR_V2(0x04E108, 0x01EC70) },
+ { "Asia/Omsk" , FOR_V2(0x04E5E3, 0x01EE65) },
+ { "Asia/Oral" , FOR_V2(0x04EAD1, 0x01F066) },
+ { "Asia/Phnom_Penh" , FOR_V2(0x04EF38, 0x01F23B) },
+ { "Asia/Pontianak" , FOR_V2(0x04F010, 0x01F2A1) },
+ { "Asia/Pyongyang" , FOR_V2(0x04F1A8, 0x01F368) },
+ { "Asia/Qatar" , FOR_V2(0x04F2EC, 0x01F3FF) },
+ { "Asia/Qyzylorda" , FOR_V2(0x04F3C9, 0x01F46A) },
+ { "Asia/Rangoon" , FOR_V2(0x04F82F, 0x01F645) },
+ { "Asia/Riyadh" , FOR_V2(0x04F958, 0x01F6CE) },
+ { "Asia/Saigon" , FOR_V2(0x04FA0F, 0x01F728) },
+ { "Asia/Sakhalin" , FOR_V2(0x04FB90, 0x01F7D7) },
+ { "Asia/Samarkand" , FOR_V2(0x050082, 0x01F9D9) },
+ { "Asia/Seoul" , FOR_V2(0x050350, 0x01FB14) },
+ { "Asia/Shanghai" , FOR_V2(0x050597, 0x01FC0C) },
+ { "Asia/Singapore" , FOR_V2(0x05074D, 0x01FCC9) },
+ { "Asia/Srednekolymsk" , FOR_V2(0x050905, 0x01FD91) },
+ { "Asia/Taipei" , FOR_V2(0x050E05, 0x01FF9E) },
+ { "Asia/Tashkent" , FOR_V2(0x051131, 0x0200E0) },
+ { "Asia/Tbilisi" , FOR_V2(0x0513F5, 0x020216) },
+ { "Asia/Tehran" , FOR_V2(0x051877, 0x0203E9) },
+ { "Asia/Tel_Aviv" , FOR_V2(0x051F00, 0x020664) },
+ { "Asia/Thimbu" , FOR_V2(0x0527E5, 0x0209AC) },
+ { "Asia/Thimphu" , FOR_V2(0x0528C2, 0x020A17) },
+ { "Asia/Tokyo" , FOR_V2(0x05299F, 0x020A82) },
+ { "Asia/Ujung_Pandang" , FOR_V2(0x052B0E, 0x020B19) },
+ { "Asia/Ulaanbaatar" , FOR_V2(0x052C32, 0x020BA3) },
+ { "Asia/Ulan_Bator" , FOR_V2(0x053235, 0x020DE9) },
+ { "Asia/Urumqi" , FOR_V2(0x05382A, 0x021021) },
+ { "Asia/Ust-Nera" , FOR_V2(0x0538EE, 0x021088) },
+ { "Asia/Vientiane" , FOR_V2(0x053E1E, 0x0212A7) },
+ { "Asia/Vladivostok" , FOR_V2(0x053EF6, 0x02130D) },
+ { "Asia/Yakutsk" , FOR_V2(0x0543E3, 0x02150C) },
+ { "Asia/Yekaterinburg" , FOR_V2(0x0548CF, 0x02170B) },
+ { "Asia/Yerevan" , FOR_V2(0x054E22, 0x021939) },
+ { "Atlantic/Azores" , FOR_V2(0x05532B, 0x021B3E) },
+ { "Atlantic/Bermuda" , FOR_V2(0x0560DD, 0x022052) },
+ { "Atlantic/Canary" , FOR_V2(0x0568BD, 0x022338) },
+ { "Atlantic/Cape_Verde" , FOR_V2(0x057050, 0x022613) },
+ { "Atlantic/Faeroe" , FOR_V2(0x05715A, 0x022691) },
+ { "Atlantic/Faroe" , FOR_V2(0x05788B, 0x02293A) },
+ { "Atlantic/Jan_Mayen" , FOR_V2(0x057FBC, 0x022BE3) },
+ { "Atlantic/Madeira" , FOR_V2(0x058893, 0x022F26) },
+ { "Atlantic/Reykjavik" , FOR_V2(0x059644, 0x023440) },
+ { "Atlantic/South_Georgia" , FOR_V2(0x059AF6, 0x023612) },
+ { "Atlantic/St_Helena" , FOR_V2(0x059B96, 0x023656) },
+ { "Atlantic/Stanley" , FOR_V2(0x059C4C, 0x0236B0) },
+ { "Australia/ACT" , FOR_V2(0x05A136, 0x023897) },
+ { "Australia/Adelaide" , FOR_V2(0x05A9F1, 0x023BCB) },
+ { "Australia/Brisbane" , FOR_V2(0x05B2CA, 0x023F0A) },
+ { "Australia/Broken_Hill" , FOR_V2(0x05B4B5, 0x023FE8) },
+ { "Australia/Canberra" , FOR_V2(0x05BDBF, 0x024339) },
+ { "Australia/Currie" , FOR_V2(0x05C67A, 0x02466D) },
+ { "Australia/Darwin" , FOR_V2(0x05CF4B, 0x0249B7) },
+ { "Australia/Eucla" , FOR_V2(0x05D0AC, 0x024A50) },
+ { "Australia/Hobart" , FOR_V2(0x05D2BD, 0x024B3D) },
+ { "Australia/LHI" , FOR_V2(0x05DC01, 0x024EB2) },
+ { "Australia/Lindeman" , FOR_V2(0x05E350, 0x025164) },
+ { "Australia/Lord_Howe" , FOR_V2(0x05E582, 0x02525C) },
+ { "Australia/Melbourne" , FOR_V2(0x05ECE1, 0x02551E) },
+ { "Australia/North" , FOR_V2(0x05F5A4, 0x02585A) },
+ { "Australia/NSW" , FOR_V2(0x05F6F3, 0x0258E1) },
+ { "Australia/Perth" , FOR_V2(0x05FFAE, 0x025C15) },
+ { "Australia/Queensland" , FOR_V2(0x0601BB, 0x025D04) },
+ { "Australia/South" , FOR_V2(0x06038B, 0x025DC7) },
+ { "Australia/Sydney" , FOR_V2(0x060C55, 0x0260F7) },
+ { "Australia/Tasmania" , FOR_V2(0x061530, 0x02644B) },
+ { "Australia/Victoria" , FOR_V2(0x061E5B, 0x0267A7) },
+ { "Australia/West" , FOR_V2(0x062716, 0x026ADB) },
+ { "Australia/Yancowinna" , FOR_V2(0x062901, 0x026BA8) },
+ { "Brazil/Acre" , FOR_V2(0x0631EF, 0x026EDD) },
+ { "Brazil/DeNoronha" , FOR_V2(0x06348B, 0x026FEE) },
+ { "Brazil/East" , FOR_V2(0x06376F, 0x027113) },
+ { "Brazil/West" , FOR_V2(0x063F5A, 0x0273F5) },
+ { "Canada/Atlantic" , FOR_V2(0x0641CE, 0x0274F2) },
+ { "Canada/Central" , FOR_V2(0x064F48, 0x0279DF) },
+ { "Canada/East-Saskatchewan" , FOR_V2(0x065A9F, 0x027E0A) },
+ { "Canada/Eastern" , FOR_V2(0x065E8D, 0x027F98) },
+ { "Canada/Mountain" , FOR_V2(0x066C48, 0x028499) },
+ { "Canada/Newfoundland" , FOR_V2(0x0675B6, 0x028814) },
+ { "Canada/Pacific" , FOR_V2(0x068412, 0x028D58) },
+ { "Canada/Saskatchewan" , FOR_V2(0x068F73, 0x029182) },
+ { "Canada/Yukon" , FOR_V2(0x069361, 0x029310) },
+ { "CET" , FOR_V2(0x069B9A, 0x029624) },
+ { "Chile/Continental" , FOR_V2(0x06A3DC, 0x02992D) },
+ { "Chile/EasterIsland" , FOR_V2(0x06AB59, 0x029C02) },
+ { "CST6CDT" , FOR_V2(0x06B1B3, 0x029E6D) },
+ { "Cuba" , FOR_V2(0x06BAB5, 0x02A1BE) },
+ { "EET" , FOR_V2(0x06C446, 0x02A542) },
+ { "Egypt" , FOR_V2(0x06CBA6, 0x02A7F5) },
+ { "Eire" , FOR_V2(0x06D366, 0x02AAD5) },
+ { "EST" , FOR_V2(0x06E159, 0x02AFF7) },
+ { "EST5EDT" , FOR_V2(0x06E1E4, 0x02B03B) },
+ { "Etc/GMT" , FOR_V2(0x06EAE6, 0x02B38C) },
+ { "Etc/GMT+0" , FOR_V2(0x06EB71, 0x02B3D0) },
+ { "Etc/GMT+1" , FOR_V2(0x06EBFC, 0x02B414) },
+ { "Etc/GMT+10" , FOR_V2(0x06EC8F, 0x02B45A) },
+ { "Etc/GMT+11" , FOR_V2(0x06ED26, 0x02B4A1) },
+ { "Etc/GMT+12" , FOR_V2(0x06EDBD, 0x02B4E8) },
+ { "Etc/GMT+2" , FOR_V2(0x06EE54, 0x02B52F) },
+ { "Etc/GMT+3" , FOR_V2(0x06EEE7, 0x02B575) },
+ { "Etc/GMT+4" , FOR_V2(0x06EF7A, 0x02B5BB) },
+ { "Etc/GMT+5" , FOR_V2(0x06F00D, 0x02B601) },
+ { "Etc/GMT+6" , FOR_V2(0x06F0A0, 0x02B647) },
+ { "Etc/GMT+7" , FOR_V2(0x06F133, 0x02B68D) },
+ { "Etc/GMT+8" , FOR_V2(0x06F1C6, 0x02B6D3) },
+ { "Etc/GMT+9" , FOR_V2(0x06F259, 0x02B719) },
+ { "Etc/GMT-0" , FOR_V2(0x06F2EC, 0x02B75F) },
+ { "Etc/GMT-1" , FOR_V2(0x06F377, 0x02B7A3) },
+ { "Etc/GMT-10" , FOR_V2(0x06F40B, 0x02B7E9) },
+ { "Etc/GMT-11" , FOR_V2(0x06F4A3, 0x02B830) },
+ { "Etc/GMT-12" , FOR_V2(0x06F53B, 0x02B877) },
+ { "Etc/GMT-13" , FOR_V2(0x06F5D3, 0x02B8BE) },
+ { "Etc/GMT-14" , FOR_V2(0x06F66B, 0x02B905) },
+ { "Etc/GMT-2" , FOR_V2(0x06F703, 0x02B94C) },
+ { "Etc/GMT-3" , FOR_V2(0x06F797, 0x02B992) },
+ { "Etc/GMT-4" , FOR_V2(0x06F82B, 0x02B9D8) },
+ { "Etc/GMT-5" , FOR_V2(0x06F8BF, 0x02BA1E) },
+ { "Etc/GMT-6" , FOR_V2(0x06F953, 0x02BA64) },
+ { "Etc/GMT-7" , FOR_V2(0x06F9E7, 0x02BAAA) },
+ { "Etc/GMT-8" , FOR_V2(0x06FA7B, 0x02BAF0) },
+ { "Etc/GMT-9" , FOR_V2(0x06FB0F, 0x02BB36) },
+ { "Etc/GMT0" , FOR_V2(0x06FBA3, 0x02BB7C) },
+ { "Etc/Greenwich" , FOR_V2(0x06FC2E, 0x02BBC0) },
+ { "Etc/UCT" , FOR_V2(0x06FCB9, 0x02BC04) },
+ { "Etc/Universal" , FOR_V2(0x06FD44, 0x02BC48) },
+ { "Etc/UTC" , FOR_V2(0x06FDCF, 0x02BC8C) },
+ { "Etc/Zulu" , FOR_V2(0x06FE5A, 0x02BCD0) },
+ { "Europe/Amsterdam" , FOR_V2(0x06FEE5, 0x02BD14) },
+ { "Europe/Andorra" , FOR_V2(0x070A70, 0x02C163) },
+ { "Europe/Athens" , FOR_V2(0x071153, 0x02C3F0) },
+ { "Europe/Belfast" , FOR_V2(0x071A3E, 0x02C744) },
+ { "Europe/Belgrade" , FOR_V2(0x0728B1, 0x02CC8C) },
+ { "Europe/Berlin" , FOR_V2(0x073062, 0x02CF66) },
+ { "Europe/Bratislava" , FOR_V2(0x07399B, 0x02D2DB) },
+ { "Europe/Brussels" , FOR_V2(0x074287, 0x02D61E) },
+ { "Europe/Bucharest" , FOR_V2(0x074E2D, 0x02DA66) },
+ { "Europe/Budapest" , FOR_V2(0x0756E6, 0x02DDA1) },
+ { "Europe/Busingen" , FOR_V2(0x076057, 0x02E11B) },
+ { "Europe/Chisinau" , FOR_V2(0x0767E9, 0x02E3E3) },
+ { "Europe/Copenhagen" , FOR_V2(0x077174, 0x02E782) },
+ { "Europe/Dublin" , FOR_V2(0x0779F0, 0x02EA9D) },
+ { "Europe/Gibraltar" , FOR_V2(0x0787E3, 0x02EFBF) },
+ { "Europe/Guernsey" , FOR_V2(0x0793E4, 0x02F427) },
+ { "Europe/Helsinki" , FOR_V2(0x07A257, 0x02F96F) },
+ { "Europe/Isle_of_Man" , FOR_V2(0x07A9D8, 0x02FC36) },
+ { "Europe/Istanbul" , FOR_V2(0x07B84B, 0x03017E) },
+ { "Europe/Jersey" , FOR_V2(0x07C312, 0x03057C) },
+ { "Europe/Kaliningrad" , FOR_V2(0x07D185, 0x030AC4) },
+ { "Europe/Kiev" , FOR_V2(0x07D7B6, 0x030D48) },
+ { "Europe/Lisbon" , FOR_V2(0x07E001, 0x031075) },
+ { "Europe/Ljubljana" , FOR_V2(0x07ED92, 0x03157E) },
+ { "Europe/London" , FOR_V2(0x07F543, 0x031858) },
+ { "Europe/Luxembourg" , FOR_V2(0x0803B6, 0x031DA0) },
+ { "Europe/Madrid" , FOR_V2(0x080F60, 0x0321FB) },
+ { "Europe/Malta" , FOR_V2(0x0819AF, 0x0325D2) },
+ { "Europe/Mariehamn" , FOR_V2(0x082400, 0x03299C) },
+ { "Europe/Minsk" , FOR_V2(0x082B81, 0x032C63) },
+ { "Europe/Monaco" , FOR_V2(0x0830E5, 0x032E87) },
+ { "Europe/Moscow" , FOR_V2(0x083C7A, 0x0332D3) },
+ { "Europe/Nicosia" , FOR_V2(0x084295, 0x03354E) },
+ { "Europe/Oslo" , FOR_V2(0x084A81, 0x03383B) },
+ { "Europe/Paris" , FOR_V2(0x085358, 0x033B7E) },
+ { "Europe/Podgorica" , FOR_V2(0x085EFF, 0x033FD5) },
+ { "Europe/Prague" , FOR_V2(0x0866B0, 0x0342AF) },
+ { "Europe/Riga" , FOR_V2(0x086F9C, 0x0345F2) },
+ { "Europe/Rome" , FOR_V2(0x087863, 0x034948) },
+ { "Europe/Samara" , FOR_V2(0x0882E5, 0x034D1C) },
+ { "Europe/San_Marino" , FOR_V2(0x08889C, 0x034F92) },
+ { "Europe/Sarajevo" , FOR_V2(0x08931E, 0x035366) },
+ { "Europe/Simferopol" , FOR_V2(0x089ACF, 0x035640) },
+ { "Europe/Skopje" , FOR_V2(0x08A0BF, 0x0358A5) },
+ { "Europe/Sofia" , FOR_V2(0x08A870, 0x035B7F) },
+ { "Europe/Stockholm" , FOR_V2(0x08B0CE, 0x035E98) },
+ { "Europe/Tallinn" , FOR_V2(0x08B858, 0x036158) },
+ { "Europe/Tirane" , FOR_V2(0x08C0EF, 0x03649E) },
+ { "Europe/Tiraspol" , FOR_V2(0x08C92D, 0x0367A9) },
+ { "Europe/Uzhgorod" , FOR_V2(0x08D2B8, 0x036B48) },
+ { "Europe/Vaduz" , FOR_V2(0x08DB03, 0x036E70) },
+ { "Europe/Vatican" , FOR_V2(0x08E28D, 0x037130) },
+ { "Europe/Vienna" , FOR_V2(0x08ED0F, 0x037504) },
+ { "Europe/Vilnius" , FOR_V2(0x08F5D8, 0x037842) },
+ { "Europe/Volgograd" , FOR_V2(0x08FE7B, 0x037B92) },
+ { "Europe/Warsaw" , FOR_V2(0x0903CB, 0x037DC4) },
+ { "Europe/Zagreb" , FOR_V2(0x090E68, 0x0381B6) },
+ { "Europe/Zaporozhye" , FOR_V2(0x091619, 0x038490) },
+ { "Europe/Zurich" , FOR_V2(0x091E92, 0x0387E2) },
+ { "Factory" , FOR_V2(0x09261C, 0x038AA2) },
+ { "GB" , FOR_V2(0x092730, 0x038B13) },
+ { "GB-Eire" , FOR_V2(0x0935A3, 0x03905B) },
+ { "GMT" , FOR_V2(0x094416, 0x0395A3) },
+ { "GMT+0" , FOR_V2(0x0944A1, 0x0395E7) },
+ { "GMT-0" , FOR_V2(0x09452C, 0x03962B) },
+ { "GMT0" , FOR_V2(0x0945B7, 0x03966F) },
+ { "Greenwich" , FOR_V2(0x094642, 0x0396B3) },
+ { "Hongkong" , FOR_V2(0x0946CD, 0x0396F7) },
+ { "HST" , FOR_V2(0x094B7E, 0x0398C6) },
+ { "Iceland" , FOR_V2(0x094C0A, 0x03990A) },
+ { "Indian/Antananarivo" , FOR_V2(0x0950BC, 0x039ADC) },
+ { "Indian/Chagos" , FOR_V2(0x0951E3, 0x039B68) },
+ { "Indian/Christmas" , FOR_V2(0x0952B8, 0x039BCF) },
+ { "Indian/Cocos" , FOR_V2(0x095359, 0x039C13) },
+ { "Indian/Comoro" , FOR_V2(0x0953FD, 0x039C57) },
+ { "Indian/Kerguelen" , FOR_V2(0x095524, 0x039CE3) },
+ { "Indian/Mahe" , FOR_V2(0x0955DB, 0x039D3D) },
+ { "Indian/Maldives" , FOR_V2(0x095692, 0x039D97) },
+ { "Indian/Mauritius" , FOR_V2(0x09576A, 0x039DFD) },
+ { "Indian/Mayotte" , FOR_V2(0x095873, 0x039E78) },
+ { "Indian/Reunion" , FOR_V2(0x09599A, 0x039F04) },
+ { "Iran" , FOR_V2(0x095A51, 0x039F5E) },
+ { "Israel" , FOR_V2(0x0960DA, 0x03A1D9) },
+ { "Jamaica" , FOR_V2(0x0969BF, 0x03A521) },
+ { "Japan" , FOR_V2(0x096BC6, 0x03A5F7) },
+ { "Kwajalein" , FOR_V2(0x096D35, 0x03A68E) },
+ { "Libya" , FOR_V2(0x096E2E, 0x03A702) },
+ { "MET" , FOR_V2(0x0970C9, 0x03A810) },
+ { "Mexico/BajaNorte" , FOR_V2(0x09790B, 0x03AB19) },
+ { "Mexico/BajaSur" , FOR_V2(0x09824B, 0x03AE87) },
+ { "Mexico/General" , FOR_V2(0x098873, 0x03B0D9) },
+ { "MST" , FOR_V2(0x098ED1, 0x03B33C) },
+ { "MST7MDT" , FOR_V2(0x098F5C, 0x03B380) },
+ { "Navajo" , FOR_V2(0x09985E, 0x03B6D1) },
+ { "NZ" , FOR_V2(0x09A1FF, 0x03BA5B) },
+ { "NZ-CHAT" , FOR_V2(0x09ABA7, 0x03BDEA) },
+ { "Pacific/Apia" , FOR_V2(0x09B3BC, 0x03C0DF) },
+ { "Pacific/Auckland" , FOR_V2(0x09B816, 0x03C288) },
+ { "Pacific/Bougainville" , FOR_V2(0x09C1CC, 0x03C625) },
+ { "Pacific/Chatham" , FOR_V2(0x09C2FC, 0x03C6AE) },
+ { "Pacific/Chuuk" , FOR_V2(0x09CB20, 0x03C9B2) },
+ { "Pacific/Easter" , FOR_V2(0x09CBD9, 0x03CA0B) },
+ { "Pacific/Efate" , FOR_V2(0x09D240, 0x03CC83) },
+ { "Pacific/Enderbury" , FOR_V2(0x09D42A, 0x03CD4E) },
+ { "Pacific/Fakaofo" , FOR_V2(0x09D52B, 0x03CDCD) },
+ { "Pacific/Fiji" , FOR_V2(0x09D5FC, 0x03CE2F) },
+ { "Pacific/Funafuti" , FOR_V2(0x09DA39, 0x03CFC7) },
+ { "Pacific/Galapagos" , FOR_V2(0x09DADB, 0x03D00B) },
+ { "Pacific/Gambier" , FOR_V2(0x09DBCB, 0x03D088) },
+ { "Pacific/Guadalcanal" , FOR_V2(0x09DC93, 0x03D0F2) },
+ { "Pacific/Guam" , FOR_V2(0x09DD4B, 0x03D14C) },
+ { "Pacific/Honolulu" , FOR_V2(0x09DE38, 0x03D1B3) },
+ { "Pacific/Johnston" , FOR_V2(0x09DF5E, 0x03D23B) },
+ { "Pacific/Kiritimati" , FOR_V2(0x09E08C, 0x03D2CB) },
+ { "Pacific/Kosrae" , FOR_V2(0x09E18A, 0x03D347) },
+ { "Pacific/Kwajalein" , FOR_V2(0x09E282, 0x03D3BD) },
+ { "Pacific/Majuro" , FOR_V2(0x09E384, 0x03D43A) },
+ { "Pacific/Marquesas" , FOR_V2(0x09E463, 0x03D4AA) },
+ { "Pacific/Midway" , FOR_V2(0x09E530, 0x03D516) },
+ { "Pacific/Nauru" , FOR_V2(0x09E65A, 0x03D5A8) },
+ { "Pacific/Niue" , FOR_V2(0x09E764, 0x03D625) },
+ { "Pacific/Norfolk" , FOR_V2(0x09E852, 0x03D694) },
+ { "Pacific/Noumea" , FOR_V2(0x09E97F, 0x03D71E) },
+ { "Pacific/Pago_Pago" , FOR_V2(0x09EAC5, 0x03D7B3) },
+ { "Pacific/Palau" , FOR_V2(0x09EBE1, 0x03D837) },
+ { "Pacific/Pitcairn" , FOR_V2(0x09EC82, 0x03D87B) },
+ { "Pacific/Pohnpei" , FOR_V2(0x09ED59, 0x03D8E1) },
+ { "Pacific/Ponape" , FOR_V2(0x09EE0E, 0x03D936) },
+ { "Pacific/Port_Moresby" , FOR_V2(0x09EEB3, 0x03D97B) },
+ { "Pacific/Rarotonga" , FOR_V2(0x09EF79, 0x03D9CD) },
+ { "Pacific/Saipan" , FOR_V2(0x09F1C3, 0x03DABA) },
+ { "Pacific/Samoa" , FOR_V2(0x09F2B0, 0x03DB21) },
+ { "Pacific/Tahiti" , FOR_V2(0x09F3CC, 0x03DBA5) },
+ { "Pacific/Tarawa" , FOR_V2(0x09F495, 0x03DC0F) },
+ { "Pacific/Tongatapu" , FOR_V2(0x09F549, 0x03DC63) },
+ { "Pacific/Truk" , FOR_V2(0x09F6A8, 0x03DD00) },
+ { "Pacific/Wake" , FOR_V2(0x09F74D, 0x03DD45) },
+ { "Pacific/Wallis" , FOR_V2(0x09F7FD, 0x03DD95) },
+ { "Pacific/Yap" , FOR_V2(0x09F89F, 0x03DDD9) },
+ { "Poland" , FOR_V2(0x09F944, 0x03DE1E) },
+ { "Portugal" , FOR_V2(0x0A03E1, 0x03E210) },
+ { "PRC" , FOR_V2(0x0A116A, 0x03E711) },
+ { "PST8PDT" , FOR_V2(0x0A1314, 0x03E7C2) },
+ { "ROC" , FOR_V2(0x0A1C16, 0x03EB13) },
+ { "ROK" , FOR_V2(0x0A1F42, 0x03EC55) },
+ { "Singapore" , FOR_V2(0x0A2189, 0x03ED4D) },
+ { "Turkey" , FOR_V2(0x0A2341, 0x03EE15) },
+ { "UCT" , FOR_V2(0x0A2E08, 0x03F213) },
+ { "Universal" , FOR_V2(0x0A2E93, 0x03F257) },
+ { "US/Alaska" , FOR_V2(0x0A2F1E, 0x03F29B) },
+ { "US/Aleutian" , FOR_V2(0x0A387A, 0x03F615) },
+ { "US/Arizona" , FOR_V2(0x0A41C3, 0x03F986) },
+ { "US/Central" , FOR_V2(0x0A4330, 0x03FA25) },
+ { "US/East-Indiana" , FOR_V2(0x0A513D, 0x03FF49) },
+ { "US/Eastern" , FOR_V2(0x0A57D4, 0x0401C4) },
+ { "US/Hawaii" , FOR_V2(0x0A65B9, 0x0406D4) },
+ { "US/Indiana-Starke" , FOR_V2(0x0A66D9, 0x040756) },
+ { "US/Michigan" , FOR_V2(0x0A706A, 0x040AE0) },
+ { "US/Mountain" , FOR_V2(0x0A791E, 0x040E1C) },
+ { "US/Pacific" , FOR_V2(0x0A82BF, 0x0411A6) },
+ { "US/Pacific-New" , FOR_V2(0x0A8DE8, 0x0415BC) },
+ { "US/Samoa" , FOR_V2(0x0A9911, 0x0419D2) },
+ { "UTC" , FOR_V2(0x0A9A2D, 0x041A56) },
+ { "W-SU" , FOR_V2(0x0A9AB8, 0x041A9A) },
+ { "WET" , FOR_V2(0x0AA0BC, 0x041CFE) },
+ { "Zulu" , FOR_V2(0x0AA819, 0x041FB1) },
};
#ifdef TIMELIB_SUPPORTS_V2DATA
-const unsigned char timelib_timezone_db_data_builtin[696137] = {
+const unsigned char timelib_timezone_db_data_builtin[698532] = {
#else
-const unsigned char timelib_timezone_db_data_builtin[269392] = {
+const unsigned char timelib_timezone_db_data_builtin[270325] = {
#endif
@@ -6799,6 +6800,156 @@ const unsigned char timelib_timezone_db_data_builtin[269392] = {
#endif
0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+/* America/Fort_Nelson */
+0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0x80, 0x00, 0x00, 0x00,
+0x9E, 0xB8, 0xBD, 0xA0, 0x9F, 0xBB, 0x15, 0x90, 0xCB, 0x89, 0x1A, 0xA0, 0xD2, 0x23, 0xF4, 0x70,
+0xD2, 0x61, 0x26, 0x10, 0xD5, 0x55, 0xF1, 0x20, 0xD6, 0x20, 0xEA, 0x10, 0xD7, 0x35, 0xD3, 0x20,
+0xD8, 0x00, 0xCC, 0x10, 0xD9, 0x15, 0xB5, 0x20, 0xD9, 0xE0, 0xAE, 0x10, 0xDA, 0xFE, 0xD1, 0xA0,
+0xDB, 0xC0, 0x90, 0x10, 0xDC, 0xDE, 0xB3, 0xA0, 0xDD, 0xA9, 0xAC, 0x90, 0xDE, 0xBE, 0x95, 0xA0,
+0xDF, 0x89, 0x8E, 0x90, 0xE0, 0x9E, 0x77, 0xA0, 0xE1, 0x69, 0x70, 0x90, 0xE2, 0x7E, 0x59, 0xA0,
+0xE3, 0x49, 0x52, 0x90, 0xE4, 0x5E, 0x3B, 0xA0, 0xE5, 0x29, 0x34, 0x90, 0xE6, 0x47, 0x58, 0x20,
+0xE7, 0x12, 0x51, 0x10, 0xE8, 0x27, 0x3A, 0x20, 0xE8, 0xF2, 0x33, 0x10, 0xEA, 0x07, 0x1C, 0x20,
+0xEA, 0xD2, 0x15, 0x10, 0xEB, 0xE6, 0xFE, 0x20, 0xEC, 0xB1, 0xF7, 0x10, 0xED, 0xC6, 0xE0, 0x20,
+0xEE, 0x91, 0xD9, 0x10, 0xEF, 0xAF, 0xFC, 0xA0, 0xF0, 0x71, 0xBB, 0x10, 0xF1, 0x8F, 0xDE, 0xA0,
+0xF2, 0x7F, 0xC1, 0x90, 0xF3, 0x6F, 0xC0, 0xA0, 0xF4, 0x5F, 0xA3, 0x90, 0xF5, 0x4F, 0xA2, 0xA0,
+0xF6, 0x3F, 0x85, 0x90, 0xF7, 0x2F, 0x84, 0xA0, 0xF8, 0x28, 0xA2, 0x10, 0xF9, 0x0F, 0x66, 0xA0,
+0xFA, 0x08, 0x84, 0x10, 0xFA, 0xF8, 0x83, 0x20, 0xFB, 0xE8, 0x66, 0x10, 0xFC, 0xD8, 0x65, 0x20,
+0xFD, 0xC8, 0x48, 0x10, 0xFE, 0xB8, 0x47, 0x20, 0xFF, 0xA8, 0x2A, 0x10, 0x00, 0x98, 0x29, 0x20,
+0x01, 0x88, 0x0C, 0x10, 0x02, 0x78, 0x0B, 0x20, 0x03, 0x71, 0x28, 0x90, 0x04, 0x61, 0x27, 0xA0,
+0x05, 0x51, 0x0A, 0x90, 0x06, 0x41, 0x09, 0xA0, 0x07, 0x30, 0xEC, 0x90, 0x08, 0x20, 0xEB, 0xA0,
+0x09, 0x10, 0xCE, 0x90, 0x0A, 0x00, 0xCD, 0xA0, 0x0A, 0xF0, 0xB0, 0x90, 0x0B, 0xE0, 0xAF, 0xA0,
+0x0C, 0xD9, 0xCD, 0x10, 0x0D, 0xC0, 0x91, 0xA0, 0x0E, 0xB9, 0xAF, 0x10, 0x0F, 0xA9, 0xAE, 0x20,
+0x10, 0x99, 0x91, 0x10, 0x11, 0x89, 0x90, 0x20, 0x12, 0x79, 0x73, 0x10, 0x13, 0x69, 0x72, 0x20,
+0x14, 0x59, 0x55, 0x10, 0x15, 0x49, 0x54, 0x20, 0x16, 0x39, 0x37, 0x10, 0x17, 0x29, 0x36, 0x20,
+0x18, 0x22, 0x53, 0x90, 0x19, 0x09, 0x18, 0x20, 0x1A, 0x02, 0x35, 0x90, 0x1A, 0xF2, 0x34, 0xA0,
+0x1B, 0xE2, 0x17, 0x90, 0x1C, 0xD2, 0x16, 0xA0, 0x1D, 0xC1, 0xF9, 0x90, 0x1E, 0xB1, 0xF8, 0xA0,
+0x1F, 0xA1, 0xDB, 0x90, 0x20, 0x76, 0x2B, 0x20, 0x21, 0x81, 0xBD, 0x90, 0x22, 0x56, 0x0D, 0x20,
+0x23, 0x6A, 0xDA, 0x10, 0x24, 0x35, 0xEF, 0x20, 0x25, 0x4A, 0xBC, 0x10, 0x26, 0x15, 0xD1, 0x20,
+0x27, 0x2A, 0x9E, 0x10, 0x27, 0xFE, 0xED, 0xA0, 0x29, 0x0A, 0x80, 0x10, 0x29, 0xDE, 0xCF, 0xA0,
+0x2A, 0xEA, 0x62, 0x10, 0x2B, 0xBE, 0xB1, 0xA0, 0x2C, 0xD3, 0x7E, 0x90, 0x2D, 0x9E, 0x93, 0xA0,
+0x2E, 0xB3, 0x60, 0x90, 0x2F, 0x7E, 0x75, 0xA0, 0x30, 0x93, 0x42, 0x90, 0x31, 0x67, 0x92, 0x20,
+0x32, 0x73, 0x24, 0x90, 0x33, 0x47, 0x74, 0x20, 0x34, 0x53, 0x06, 0x90, 0x35, 0x27, 0x56, 0x20,
+0x36, 0x32, 0xE8, 0x90, 0x37, 0x07, 0x38, 0x20, 0x38, 0x1C, 0x05, 0x10, 0x38, 0xE7, 0x1A, 0x20,
+0x39, 0xFB, 0xE7, 0x10, 0x3A, 0xC6, 0xFC, 0x20, 0x3B, 0xDB, 0xC9, 0x10, 0x3C, 0xB0, 0x18, 0xA0,
+0x3D, 0xBB, 0xAB, 0x10, 0x3E, 0x8F, 0xFA, 0xA0, 0x3F, 0x9B, 0x8D, 0x10, 0x40, 0x6F, 0xDC, 0xA0,
+0x41, 0x84, 0xA9, 0x90, 0x42, 0x4F, 0xBE, 0xA0, 0x43, 0x64, 0x8B, 0x90, 0x44, 0x2F, 0xA0, 0xA0,
+0x45, 0x44, 0x6D, 0x90, 0x45, 0xF3, 0xD3, 0x20, 0x47, 0x2D, 0x8A, 0x10, 0x47, 0xD3, 0xB5, 0x20,
+0x49, 0x0D, 0x6C, 0x10, 0x49, 0xB3, 0x97, 0x20, 0x4A, 0xED, 0x4E, 0x10, 0x4B, 0x9C, 0xB3, 0xA0,
+0x4C, 0xD6, 0x6A, 0x90, 0x4D, 0x7C, 0x95, 0xA0, 0x4E, 0xB6, 0x4C, 0x90, 0x4F, 0x5C, 0x77, 0xA0,
+0x50, 0x96, 0x2E, 0x90, 0x51, 0x3C, 0x59, 0xA0, 0x52, 0x76, 0x10, 0x90, 0x53, 0x1C, 0x3B, 0xA0,
+0x54, 0x55, 0xF2, 0x90, 0x54, 0xFC, 0x1D, 0xA0, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0xFF, 0xFF, 0x8C, 0xF9, 0x00, 0x00, 0xFF, 0xFF, 0x9D,
+0x90, 0x01, 0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF,
+0xFF, 0x9D, 0x90, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x50,
+0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x4D,
+0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 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, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3D, 0x76, 0x87, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0xBD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x15, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x26, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xEA, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x00, 0xCC, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE0, 0xAE, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xD1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC0, 0x90, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0xB3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0xAC, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x95, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x8E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x77, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x70, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x59, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x52, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x3B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x29, 0x34, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x58, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x12, 0x51, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x3A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF2, 0x33, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x1C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xD2, 0x15, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xB1, 0xF7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0x91, 0xD9, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x71, 0xBB, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xDE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x7F, 0xC1, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0xC0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x5F, 0xA3, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0xA2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x3F, 0x85, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x84, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x28, 0xA2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x66, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x08, 0x84, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x83, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x66, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x65, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x48, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x47, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x88, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x28, 0x90, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x27, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x51, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x06, 0x41, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xCD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xAF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x53, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x17, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xF9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xDB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xBD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x22, 0x56, 0x0D, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xDA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xBC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x9E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x7E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x24, 0x90, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x74, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x53, 0x06, 0x90, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xE8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1C, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xE7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xC9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0xAB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x8D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0xA9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x8B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x6D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xD3, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x8A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x6C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x97, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x4E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x6A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x4C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x77, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x2E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x59, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x76, 0x10, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x3B, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xF2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x1D, 0xA0, 0x00, 0x02, 0x01, 0x02,
+0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0xFF, 0xFF, 0x8C, 0xF9,
+0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x08, 0xFF, 0xFF,
+0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x14,
+0x4C, 0x4D, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00,
+0x50, 0x50, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x0A,
+#endif
+0x00, 0xE3, 0x0D, 0x00, 0x00, 0x57, 0x6E, 0xD0, 0x00, 0x00, 0x00, 0x36, 0x4D, 0x6F, 0x75, 0x6E,
+0x74, 0x61, 0x69, 0x6E, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, 0x54, 0x69,
+0x6D, 0x65, 0x20, 0x2D, 0x20, 0x46, 0x6F, 0x72, 0x74, 0x20, 0x4E, 0x65, 0x6C, 0x73, 0x6F, 0x6E,
+0x2C, 0x20, 0x42, 0x72, 0x69, 0x74, 0x69, 0x73, 0x68, 0x20, 0x43, 0x6F, 0x6C, 0x75, 0x6D, 0x62,
+0x69, 0x61,
+
/* America/Fort_Wayne */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
@@ -20627,7 +20778,7 @@ const unsigned char timelib_timezone_db_data_builtin[269392] = {
0x49, 0x03, 0xC1, 0x10, 0x49, 0xCE, 0xC8, 0x10, 0x4A, 0xE3, 0xA3, 0x10, 0x4B, 0xAE, 0xAA, 0x10,
0x4C, 0xCC, 0xBF, 0x90, 0x4D, 0x8F, 0xDD, 0x90, 0x4E, 0xAC, 0xA1, 0x90, 0x4F, 0x6E, 0x6E, 0x10,
0x50, 0x8C, 0x83, 0x90, 0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90, 0x53, 0x38, 0xBE, 0x10,
-0x54, 0x4C, 0x47, 0x90, 0x55, 0x17, 0x4E, 0x90, 0x56, 0x2C, 0x29, 0x90, 0x56, 0xF7, 0x30, 0x90,
+0x54, 0x4C, 0x47, 0x90, 0x55, 0x17, 0x4E, 0x90, 0x56, 0x3E, 0x9E, 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,
@@ -20725,7 +20876,7 @@ const unsigned char timelib_timezone_db_data_builtin[269392] = {
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, 0x38, 0xBE, 0x10, 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,
+0x56, 0x3E, 0x9E, 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,
@@ -34355,7 +34506,7 @@ const unsigned char timelib_timezone_db_data_builtin[269392] = {
0x49, 0x03, 0xC1, 0x10, 0x49, 0xCE, 0xC8, 0x10, 0x4A, 0xE3, 0xA3, 0x10, 0x4B, 0xAE, 0xAA, 0x10,
0x4C, 0xCC, 0xBF, 0x90, 0x4D, 0x8F, 0xDD, 0x90, 0x4E, 0xAC, 0xA1, 0x90, 0x4F, 0x6E, 0x6E, 0x10,
0x50, 0x8C, 0x83, 0x90, 0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90, 0x53, 0x38, 0xBE, 0x10,
-0x54, 0x4C, 0x47, 0x90, 0x55, 0x17, 0x4E, 0x90, 0x56, 0x2C, 0x29, 0x90, 0x56, 0xF7, 0x30, 0x90,
+0x54, 0x4C, 0x47, 0x90, 0x55, 0x17, 0x4E, 0x90, 0x56, 0x3E, 0x9E, 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,
@@ -34453,7 +34604,7 @@ const unsigned char timelib_timezone_db_data_builtin[269392] = {
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, 0x38, 0xBE, 0x10, 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,
+0x56, 0x3E, 0x9E, 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,
@@ -43445,16 +43596,16 @@ const unsigned char timelib_timezone_db_data_builtin[269392] = {
0x38, 0xB7, 0xDC, 0x60, 0x4B, 0x11, 0x2C, 0xE0, 0x4B, 0xAE, 0x0F, 0x60, 0x4C, 0xC2, 0xEA, 0x60,
0x4D, 0x72, 0x41, 0xE0, 0x4E, 0xA2, 0xCC, 0x60, 0x4F, 0x1A, 0xC4, 0xE0, 0x50, 0x82, 0xAE, 0x60,
0x50, 0xFA, 0xA6, 0xE0, 0x52, 0x6B, 0xCA, 0xE0, 0x52, 0xDA, 0x7A, 0xD0, 0x54, 0x54, 0xE7, 0x60,
-0x54, 0xBA, 0x6A, 0xE0, 0x56, 0x34, 0xC9, 0x60, 0x56, 0xA3, 0x87, 0x60, 0x58, 0x1D, 0xE5, 0xE0,
-0x58, 0x83, 0x69, 0x60, 0x59, 0xFD, 0xC7, 0xE0, 0x5A, 0x63, 0x4B, 0x60, 0x5B, 0xDD, 0xA9, 0xE0,
+0x54, 0xBA, 0x6A, 0xE0, 0x56, 0x34, 0xC9, 0x60, 0x56, 0x9A, 0x4C, 0xE0, 0x58, 0x1D, 0xE5, 0xE0,
+0x58, 0x7A, 0x2E, 0xE0, 0x59, 0xFD, 0xC7, 0xE0, 0x5A, 0x63, 0x4B, 0x60, 0x5B, 0xDD, 0xA9, 0xE0,
0x5C, 0x43, 0x2D, 0x60, 0x5D, 0xBD, 0x8B, 0xE0, 0x5E, 0x23, 0x0F, 0x60, 0x5F, 0x9D, 0x6D, 0xE0,
-0x60, 0x0C, 0x2B, 0xE0, 0x61, 0x86, 0x8A, 0x60, 0x61, 0xEC, 0x0D, 0xE0, 0x63, 0x66, 0x6C, 0x60,
-0x63, 0xCB, 0xEF, 0xE0, 0x65, 0x46, 0x4E, 0x60, 0x65, 0xAB, 0xD1, 0xE0, 0x67, 0x26, 0x30, 0x60,
+0x60, 0x02, 0xF1, 0x60, 0x61, 0x86, 0x8A, 0x60, 0x61, 0xE2, 0xD3, 0x60, 0x63, 0x66, 0x6C, 0x60,
+0x63, 0xC2, 0xB5, 0x60, 0x65, 0x46, 0x4E, 0x60, 0x65, 0xAB, 0xD1, 0xE0, 0x67, 0x26, 0x30, 0x60,
0x67, 0x8B, 0xB3, 0xE0, 0x69, 0x06, 0x12, 0x60, 0x69, 0x6B, 0x95, 0xE0, 0x6A, 0xE5, 0xF4, 0x60,
-0x6B, 0x54, 0xB2, 0x60, 0x6C, 0xCF, 0x10, 0xE0, 0x6D, 0x34, 0x94, 0x60, 0x6E, 0xAE, 0xF2, 0xE0,
+0x6B, 0x4B, 0x77, 0xE0, 0x6C, 0xCF, 0x10, 0xE0, 0x6D, 0x2B, 0x59, 0xE0, 0x6E, 0xAE, 0xF2, 0xE0,
0x6F, 0x14, 0x76, 0x60, 0x70, 0x8E, 0xD4, 0xE0, 0x70, 0xF4, 0x58, 0x60, 0x72, 0x6E, 0xB6, 0xE0,
0x72, 0xD4, 0x3A, 0x60, 0x74, 0x4E, 0x98, 0xE0, 0x74, 0xB4, 0x1C, 0x60, 0x76, 0x37, 0xB5, 0x60,
-0x76, 0x9D, 0x38, 0xE0, 0x78, 0x17, 0x97, 0x60, 0x78, 0x7D, 0x1A, 0xE0, 0x79, 0xF7, 0x79, 0x60,
+0x76, 0x93, 0xFE, 0x60, 0x78, 0x17, 0x97, 0x60, 0x78, 0x73, 0xE0, 0x60, 0x79, 0xF7, 0x79, 0x60,
0x7A, 0x5C, 0xFC, 0xE0, 0x7B, 0xD7, 0x5B, 0x60, 0x7C, 0x3C, 0xDE, 0xE0, 0x7D, 0xB7, 0x3D, 0x60,
0x7E, 0x1C, 0xC0, 0xE0, 0x7F, 0x97, 0x1F, 0x60, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
@@ -43464,7 +43615,7 @@ const unsigned char timelib_timezone_db_data_builtin[269392] = {
0xD0, 0x01, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x46, 0x4A, 0x53,
0x54, 0x00, 0x46, 0x4A, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
#ifdef TIMELIB_SUPPORTS_V2DATA
-0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9A, 0x13, 0xB1, 0xC0, 0x00, 0x00, 0x00, 0x00,
@@ -43476,25 +43627,25 @@ const unsigned char timelib_timezone_db_data_builtin[269392] = {
0x50, 0x82, 0xAE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x50, 0xFA, 0xA6, 0xE0, 0x00, 0x00, 0x00, 0x00,
0x52, 0x6B, 0xCA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x52, 0xDA, 0x7A, 0xD0, 0x00, 0x00, 0x00, 0x00,
0x54, 0x54, 0xE7, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xBA, 0x6A, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x56, 0x34, 0xC9, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0xA3, 0x87, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x58, 0x1D, 0xE5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x83, 0x69, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x34, 0xC9, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0x9A, 0x4C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1D, 0xE5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x7A, 0x2E, 0xE0, 0x00, 0x00, 0x00, 0x00,
0x59, 0xFD, 0xC7, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0x63, 0x4B, 0x60, 0x00, 0x00, 0x00, 0x00,
0x5B, 0xDD, 0xA9, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x43, 0x2D, 0x60, 0x00, 0x00, 0x00, 0x00,
0x5D, 0xBD, 0x8B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x23, 0x0F, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x5F, 0x9D, 0x6D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x0C, 0x2B, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x61, 0x86, 0x8A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x61, 0xEC, 0x0D, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x63, 0x66, 0x6C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x63, 0xCB, 0xEF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9D, 0x6D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0xF1, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x86, 0x8A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x61, 0xE2, 0xD3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x66, 0x6C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x63, 0xC2, 0xB5, 0x60, 0x00, 0x00, 0x00, 0x00,
0x65, 0x46, 0x4E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xAB, 0xD1, 0xE0, 0x00, 0x00, 0x00, 0x00,
0x67, 0x26, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0x8B, 0xB3, 0xE0, 0x00, 0x00, 0x00, 0x00,
0x69, 0x06, 0x12, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0x6B, 0x95, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x6A, 0xE5, 0xF4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x54, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x6C, 0xCF, 0x10, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x34, 0x94, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE5, 0xF4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x4B, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0x10, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x2B, 0x59, 0xE0, 0x00, 0x00, 0x00, 0x00,
0x6E, 0xAE, 0xF2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x14, 0x76, 0x60, 0x00, 0x00, 0x00, 0x00,
0x70, 0x8E, 0xD4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x70, 0xF4, 0x58, 0x60, 0x00, 0x00, 0x00, 0x00,
0x72, 0x6E, 0xB6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x72, 0xD4, 0x3A, 0x60, 0x00, 0x00, 0x00, 0x00,
0x74, 0x4E, 0x98, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xB4, 0x1C, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x76, 0x37, 0xB5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0x9D, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x78, 0x17, 0x97, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0x7D, 0x1A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x37, 0xB5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0x93, 0xFE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x17, 0x97, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0x73, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00,
0x79, 0xF7, 0x79, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x5C, 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00,
0x7B, 0xD7, 0x5B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x3C, 0xDE, 0xE0, 0x00, 0x00, 0x00, 0x00,
0x7D, 0xB7, 0x3D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x1C, 0xC0, 0xE0, 0x00, 0x00, 0x00, 0x00,
@@ -43506,7 +43657,7 @@ const unsigned char timelib_timezone_db_data_builtin[269392] = {
0x00, 0xA8, 0xC0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x46, 0x4A, 0x53, 0x54, 0x00, 0x46, 0x4A,
0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x46, 0x4A, 0x54, 0x2D, 0x31, 0x32, 0x46,
0x4A, 0x53, 0x54, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x2E, 0x33,
-0x2E, 0x34, 0x2F, 0x37, 0x35, 0x0A,
+0x2E, 0x30, 0x2F, 0x33, 0x0A,
#endif
0x00, 0x6D, 0xA8, 0xEA, 0x02, 0x22, 0xE6, 0x82, 0x00, 0x00, 0x00, 0x00,
@@ -43817,20 +43968,25 @@ const unsigned char timelib_timezone_db_data_builtin[269392] = {
/* Pacific/Norfolk */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4E, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00,
-0xDC, 0x41, 0xF8, 0x80, 0x01, 0x02, 0x00, 0x00, 0x9D, 0x78, 0x00, 0x00, 0x00, 0x00, 0x9D, 0x80,
-0x00, 0x04, 0x00, 0x00, 0xA1, 0xB8, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x4D, 0x54, 0x00,
-0x4E, 0x46, 0x54, 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, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0x80, 0x00, 0x00, 0x00,
+0xDC, 0x41, 0xF8, 0x80, 0x09, 0x0F, 0xCA, 0x68, 0x09, 0xB5, 0xD9, 0x58, 0x56, 0x0F, 0xE6, 0x68,
+0x01, 0x02, 0x03, 0x02, 0x04, 0x00, 0x00, 0x9D, 0x78, 0x00, 0x00, 0x00, 0x00, 0x9D, 0x80, 0x00,
+0x04, 0x00, 0x00, 0xA1, 0xB8, 0x00, 0x08, 0x00, 0x00, 0xAF, 0xC8, 0x01, 0x0C, 0x00, 0x00, 0x9A,
+0xB0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x4D, 0x54, 0x00, 0x4E, 0x46, 0x54, 0x00, 0x4E,
+0x46, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x17, 0x88, 0xFF, 0xFF, 0xFF, 0xFF,
-0xDC, 0x41, 0xF8, 0x80, 0x00, 0x01, 0x02, 0x00, 0x00, 0x9D, 0x78, 0x00, 0x00, 0x00, 0x00, 0x9D,
-0x80, 0x00, 0x04, 0x00, 0x00, 0xA1, 0xB8, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x4D, 0x54,
-0x00, 0x4E, 0x46, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4E, 0x46, 0x54, 0x2D,
-0x31, 0x31, 0x3A, 0x33, 0x30, 0x0A,
+0xDC, 0x41, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0x0F, 0xCA, 0x68, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xB5, 0xD9, 0x58, 0x00, 0x00, 0x00, 0x00, 0x56, 0x0F, 0xE6, 0x68, 0x00, 0x01, 0x02, 0x03,
+0x02, 0x04, 0x00, 0x00, 0x9D, 0x78, 0x00, 0x00, 0x00, 0x00, 0x9D, 0x80, 0x00, 0x04, 0x00, 0x00,
+0xA1, 0xB8, 0x00, 0x08, 0x00, 0x00, 0xAF, 0xC8, 0x01, 0x0C, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x08,
+0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x4D, 0x54, 0x00, 0x4E, 0x46, 0x54, 0x00, 0x4E, 0x46, 0x53, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4E, 0x46, 0x54, 0x2D,
+0x31, 0x31, 0x0A,
#endif
0x00, 0x5D, 0x00, 0x98, 0x02, 0x12, 0xF4, 0x7A, 0x00, 0x00, 0x00, 0x00,
@@ -44916,7 +45072,7 @@ const unsigned char timelib_timezone_db_data_builtin[269392] = {
0x49, 0x03, 0xC1, 0x10, 0x49, 0xCE, 0xC8, 0x10, 0x4A, 0xE3, 0xA3, 0x10, 0x4B, 0xAE, 0xAA, 0x10,
0x4C, 0xCC, 0xBF, 0x90, 0x4D, 0x8F, 0xDD, 0x90, 0x4E, 0xAC, 0xA1, 0x90, 0x4F, 0x6E, 0x6E, 0x10,
0x50, 0x8C, 0x83, 0x90, 0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90, 0x53, 0x38, 0xBE, 0x10,
-0x54, 0x4C, 0x47, 0x90, 0x55, 0x17, 0x4E, 0x90, 0x56, 0x2C, 0x29, 0x90, 0x56, 0xF7, 0x30, 0x90,
+0x54, 0x4C, 0x47, 0x90, 0x55, 0x17, 0x4E, 0x90, 0x56, 0x3E, 0x9E, 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,
@@ -45014,7 +45170,7 @@ const unsigned char timelib_timezone_db_data_builtin[269392] = {
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, 0x38, 0xBE, 0x10, 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,
+0x56, 0x3E, 0x9E, 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,
@@ -47119,4 +47275,4 @@ const unsigned char timelib_timezone_db_data_builtin[269392] = {
#endif
0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,};
-const timelib_tzdb timezonedb_builtin = { "2015.6", 583, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
+const timelib_tzdb timezonedb_builtin = { "2015.7", 584, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
diff --git a/ext/gmp/tests/gmp_random_seed-32bit.phpt b/ext/gmp/tests/gmp_random_seed-32bit.phpt
new file mode 100644
index 0000000000..f0f4fca6e3
--- /dev/null
+++ b/ext/gmp/tests/gmp_random_seed-32bit.phpt
@@ -0,0 +1,230 @@
+--TEST--
+gmp_random_seed() basic tests
+--SKIPIF--
+<?php if (!extension_loaded("gmp")) print "skip"; ?>
+<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
+--FILE--
+<?php
+
+// zero int
+var_dump(gmp_random_seed(0));
+
+var_dump(gmp_strval(gmp_random()));
+var_dump(gmp_strval(gmp_random(1)));
+var_dump(gmp_strval(gmp_random(10)));
+
+var_dump(gmp_strval(gmp_random_bits(10)));
+var_dump(gmp_strval(gmp_random_bits(100)));
+var_dump(gmp_strval(gmp_random_bits(1000)));
+
+var_dump(gmp_strval(gmp_random_range(0, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 0)));
+
+
+// zero gmp
+var_dump(gmp_random_seed(gmp_init(0)));
+
+var_dump(gmp_strval(gmp_random()));
+var_dump(gmp_strval(gmp_random(1)));
+var_dump(gmp_strval(gmp_random(10)));
+
+var_dump(gmp_strval(gmp_random_bits(10)));
+var_dump(gmp_strval(gmp_random_bits(100)));
+var_dump(gmp_strval(gmp_random_bits(1000)));
+
+var_dump(gmp_strval(gmp_random_range(0, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 0)));
+
+
+// negative int
+var_dump(gmp_random_seed(-100));
+
+var_dump(gmp_strval(gmp_random()));
+var_dump(gmp_strval(gmp_random(1)));
+var_dump(gmp_strval(gmp_random(10)));
+
+var_dump(gmp_strval(gmp_random_bits(10)));
+var_dump(gmp_strval(gmp_random_bits(100)));
+var_dump(gmp_strval(gmp_random_bits(1000)));
+
+var_dump(gmp_strval(gmp_random_range(0, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 0)));
+
+
+// negative gmp
+var_dump(gmp_random_seed(gmp_init(-100)));
+
+var_dump(gmp_strval(gmp_random()));
+var_dump(gmp_strval(gmp_random(1)));
+var_dump(gmp_strval(gmp_random(10)));
+
+var_dump(gmp_strval(gmp_random_bits(10)));
+var_dump(gmp_strval(gmp_random_bits(100)));
+var_dump(gmp_strval(gmp_random_bits(1000)));
+
+var_dump(gmp_strval(gmp_random_range(0, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 0)));
+
+
+// positive int
+var_dump(gmp_random_seed(100));
+
+var_dump(gmp_strval(gmp_random()));
+var_dump(gmp_strval(gmp_random(1)));
+var_dump(gmp_strval(gmp_random(10)));
+
+var_dump(gmp_strval(gmp_random_bits(10)));
+var_dump(gmp_strval(gmp_random_bits(100)));
+var_dump(gmp_strval(gmp_random_bits(1000)));
+
+var_dump(gmp_strval(gmp_random_range(0, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 0)));
+
+
+// positive gmp
+var_dump(gmp_random_seed(100));
+
+var_dump(gmp_strval(gmp_random()));
+var_dump(gmp_strval(gmp_random(1)));
+var_dump(gmp_strval(gmp_random(10)));
+
+var_dump(gmp_strval(gmp_random_bits(10)));
+var_dump(gmp_strval(gmp_random_bits(100)));
+var_dump(gmp_strval(gmp_random_bits(1000)));
+
+var_dump(gmp_strval(gmp_random_range(0, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 0)));
+
+
+$seed = gmp_init(1);
+$seed <<= 512;
+
+// large negative gmp
+var_dump(gmp_random_seed($seed * -1));
+
+var_dump(gmp_strval(gmp_random()));
+var_dump(gmp_strval(gmp_random(1)));
+var_dump(gmp_strval(gmp_random(10)));
+
+var_dump(gmp_strval(gmp_random_bits(10)));
+var_dump(gmp_strval(gmp_random_bits(100)));
+var_dump(gmp_strval(gmp_random_bits(1000)));
+
+var_dump(gmp_strval(gmp_random_range(0, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 0)));
+
+
+// large positive gmp
+var_dump(gmp_random_seed($seed));
+
+var_dump(gmp_strval(gmp_random()));
+var_dump(gmp_strval(gmp_random(1)));
+var_dump(gmp_strval(gmp_random(10)));
+
+var_dump(gmp_strval(gmp_random_bits(10)));
+var_dump(gmp_strval(gmp_random_bits(100)));
+var_dump(gmp_strval(gmp_random_bits(1000)));
+
+var_dump(gmp_strval(gmp_random_range(0, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 0)));
+
+
+// standard non conversion error
+var_dump(gmp_random_seed('not a number'));
+
+
+echo "Done\n";
+?>
+--EXPECTF--
+NULL
+string(193) "2000022451473107283132031190545479155678097978829612864726689673263990484954900429188146529905019042225609517482723730948135765344007937183893986134210303199345433818579954244943136664096571499"
+string(10) "3792281639"
+string(97) "1281406676617847191505318987040099388645126071814252743902229506206669580396236451813261179688680"
+string(2) "86"
+string(30) "539590049119295715487546581833"
+string(301) "1421393257467327495225454368915273750356127352353055226245692071178379257048985726109650766437957017507708821700349355658110489309871463201057688894986035545794429493563972043777521547094922637182497036750765553664196591958728194711096442220858890056073974348364544481270013556644174056049511198143353"
+string(4) "8971"
+string(4) "7838"
+string(5) "-7823"
+NULL
+string(193) "2000022451473107283132031190545479155678097978829612864726689673263990484954900429188146529905019042225609517482723730948135765344007937183893986134210303199345433818579954244943136664096571499"
+string(10) "3792281639"
+string(97) "1281406676617847191505318987040099388645126071814252743902229506206669580396236451813261179688680"
+string(2) "86"
+string(30) "539590049119295715487546581833"
+string(301) "1421393257467327495225454368915273750356127352353055226245692071178379257048985726109650766437957017507708821700349355658110489309871463201057688894986035545794429493563972043777521547094922637182497036750765553664196591958728194711096442220858890056073974348364544481270013556644174056049511198143353"
+string(4) "8971"
+string(4) "7838"
+string(5) "-7823"
+NULL
+string(193) "2481908463276861025880840116973116041137167231715512003123396619946362384184452775649311777755189162364804428739438733886421190841599393284032499618736594054572838636962845446571583771860379424"
+string(9) "513032517"
+string(97) "1269389652350468424962405917839748437534426606829298977422985976022226588797299164880342257267822"
+string(3) "111"
+string(31) "1007352579363975542750518386428"
+string(301) "5972672173406546932378461222050826195392618168845902231231085819967980051373112173617569638344495916340820360974139193579303652817960325137050189614326029375858951250371622253667077551034119958866481056760107123567590230789917209543206262943739654964107980961862387602012190907147667678648223791029527"
+string(4) "2362"
+string(5) "-9377"
+string(5) "-8435"
+NULL
+string(193) "2481908463276861025880840116973116041137167231715512003123396619946362384184452775649311777755189162364804428739438733886421190841599393284032499618736594054572838636962845446571583771860379424"
+string(9) "513032517"
+string(97) "1269389652350468424962405917839748437534426606829298977422985976022226588797299164880342257267822"
+string(3) "111"
+string(31) "1007352579363975542750518386428"
+string(301) "5972672173406546932378461222050826195392618168845902231231085819967980051373112173617569638344495916340820360974139193579303652817960325137050189614326029375858951250371622253667077551034119958866481056760107123567590230789917209543206262943739654964107980961862387602012190907147667678648223791029527"
+string(4) "2362"
+string(5) "-9377"
+string(5) "-8435"
+NULL
+string(193) "2481908463276861025880840116973116041137167231715512003123396619946362384184452775649311777755189162364804428739438733886421190841599393284032499618736594054572838636962845446571583771860379424"
+string(9) "513032517"
+string(97) "1269389652350468424962405917839748437534426606829298977422985976022226588797299164880342257267822"
+string(3) "111"
+string(31) "1007352579363975542750518386428"
+string(301) "5972672173406546932378461222050826195392618168845902231231085819967980051373112173617569638344495916340820360974139193579303652817960325137050189614326029375858951250371622253667077551034119958866481056760107123567590230789917209543206262943739654964107980961862387602012190907147667678648223791029527"
+string(4) "2362"
+string(5) "-9377"
+string(5) "-8435"
+NULL
+string(193) "2481908463276861025880840116973116041137167231715512003123396619946362384184452775649311777755189162364804428739438733886421190841599393284032499618736594054572838636962845446571583771860379424"
+string(9) "513032517"
+string(97) "1269389652350468424962405917839748437534426606829298977422985976022226588797299164880342257267822"
+string(3) "111"
+string(31) "1007352579363975542750518386428"
+string(301) "5972672173406546932378461222050826195392618168845902231231085819967980051373112173617569638344495916340820360974139193579303652817960325137050189614326029375858951250371622253667077551034119958866481056760107123567590230789917209543206262943739654964107980961862387602012190907147667678648223791029527"
+string(4) "2362"
+string(5) "-9377"
+string(5) "-8435"
+NULL
+string(193) "4314861641594785951065006537821497084129700255567731661104366342587560122488351847486220156468888511744226746306538524023190734733433083354034308520246964938498767672539252131810891590624763642"
+string(10) "3301287097"
+string(97) "1532710025135934106005683287301200805525218110207399702226596673360222079570223526337866801028045"
+string(3) "317"
+string(30) "949682013136255600092941702271"
+string(302) "10419061168407861659407303769436775291881708415032871985692089124472434944956010985892897595466043265819000974537553172663152640727594826474137173310039809413311432062725623183603946900548710858191078057179743726366436832870919212340219523613153893742764101120396858424887711932475871305848021245801132"
+string(4) "2417"
+string(5) "-7975"
+string(4) "-378"
+NULL
+string(193) "4314861641594785951065006537821497084129700255567731661104366342587560122488351847486220156468888511744226746306538524023190734733433083354034308520246964938498767672539252131810891590624763642"
+string(10) "3301287097"
+string(97) "1532710025135934106005683287301200805525218110207399702226596673360222079570223526337866801028045"
+string(3) "317"
+string(30) "949682013136255600092941702271"
+string(302) "10419061168407861659407303769436775291881708415032871985692089124472434944956010985892897595466043265819000974537553172663152640727594826474137173310039809413311432062725623183603946900548710858191078057179743726366436832870919212340219523613153893742764101120396858424887711932475871305848021245801132"
+string(4) "2417"
+string(5) "-7975"
+string(4) "-378"
+
+Warning: gmp_random_seed(): Unable to convert variable to GMP - string is not an integer in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/gmp/tests/gmp_random_seed.phpt b/ext/gmp/tests/gmp_random_seed.phpt
index 3a832467bb..d28704e124 100644
--- a/ext/gmp/tests/gmp_random_seed.phpt
+++ b/ext/gmp/tests/gmp_random_seed.phpt
@@ -2,6 +2,7 @@
gmp_random_seed() basic tests
--SKIPIF--
<?php if (!extension_loaded("gmp")) print "skip"; ?>
+<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
--FILE--
<?php
diff --git a/ext/interbase/ibase_blobs.c b/ext/interbase/ibase_blobs.c
index ba384f8cd2..d492f55f7a 100644
--- a/ext/interbase/ibase_blobs.c
+++ b/ext/interbase/ibase_blobs.c
@@ -318,7 +318,7 @@ PHP_FUNCTION(ibase_blob_add)
PHP_FUNCTION(ibase_blob_get)
{
zval *blob_arg;
- unsigned long len_arg;
+ zend_ulong len_arg;
ibase_blob *ib_blob;
RESET_ERRMSG;
diff --git a/ext/interbase/ibase_query.c b/ext/interbase/ibase_query.c
index 43fa760833..fce9206dd7 100644
--- a/ext/interbase/ibase_query.c
+++ b/ext/interbase/ibase_query.c
@@ -1061,7 +1061,8 @@ PHP_FUNCTION(ibase_query)
{
zval *zlink, *ztrans, *bind_args = NULL;
char *query;
- int bind_i, query_len, bind_num;
+ size_t query_len;
+ int bind_i, bind_num;
long trans_res_id = 0;
ibase_db_link *ib_link = NULL;
ibase_trans *trans = NULL;
@@ -1073,7 +1074,7 @@ PHP_FUNCTION(ibase_query)
RETVAL_FALSE;
switch (ZEND_NUM_ARGS()) {
- long l;
+ zend_long l;
default:
if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, 3, "rrs",
@@ -1472,7 +1473,8 @@ static int _php_ibase_arr_zval(zval *ar_zval, char *data, unsigned long data_siz
static void _php_ibase_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int fetch_type) /* {{{ */
{
zval *result_arg;
- long i, array_cnt = 0, flag = 0;
+ zend_long flag = 0;
+ long i, array_cnt = 0;
ibase_result *ib_result;
RESET_ERRMSG;
@@ -1684,7 +1686,7 @@ PHP_FUNCTION(ibase_name_result)
{
zval *result_arg;
char *name_arg;
- int name_arg_len;
+ size_t name_arg_len;
ibase_result *ib_result;
RESET_ERRMSG;
@@ -1998,7 +2000,7 @@ static void _php_ibase_field_info(zval *return_value, XSQLVAR *var) /* {{{ */
PHP_FUNCTION(ibase_field_info)
{
zval *result_arg;
- long field_arg;
+ zend_long field_arg;
int type;
XSQLDA *sqlda;
@@ -2062,7 +2064,7 @@ PHP_FUNCTION(ibase_num_params)
PHP_FUNCTION(ibase_param_info)
{
zval *result_arg;
- long field_arg;
+ zend_long field_arg;
ibase_query *ib_query;
RESET_ERRMSG;
diff --git a/ext/interbase/ibase_service.c b/ext/interbase/ibase_service.c
index 53795f6668..628d4575f0 100644
--- a/ext/interbase/ibase_service.c
+++ b/ext/interbase/ibase_service.c
@@ -425,7 +425,7 @@ static void _php_ibase_backup_restore(INTERNAL_FUNCTION_PARAMETERS, char operati
zval *res;
char *db, *bk, buf[200];
size_t dblen, bklen, spb_len;
- long opts = 0;
+ zend_long opts = 0;
zend_bool verbose = 0;
ibase_service *svm;
@@ -488,8 +488,9 @@ static void _php_ibase_service_action(INTERNAL_FUNCTION_PARAMETERS, char svc_act
{
zval *res;
char buf[128], *db;
- int dblen, spb_len;
- long action, argument = 0;
+ size_t dblen;
+ int spb_len;
+ zend_long action, argument = 0;
ibase_service *svm;
RESET_ERRMSG;
@@ -596,7 +597,7 @@ PHP_FUNCTION(ibase_db_info)
PHP_FUNCTION(ibase_server_info)
{
zval *res;
- long action;
+ zend_long action;
ibase_service *svm;
RESET_ERRMSG;
diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c
index 919ea7de5e..cb6baad658 100644
--- a/ext/interbase/interbase.c
+++ b/ext/interbase/interbase.c
@@ -1421,7 +1421,7 @@ PHP_FUNCTION(ibase_gen_id)
zval *link = NULL;
char query[128], *generator;
size_t gen_len;
- long inc = 1;
+ zend_long inc = 1;
ibase_db_link *ib_link;
ibase_trans *trans = NULL;
XSQLDA out_sqlda;
diff --git a/ext/intl/calendar/calendar_methods.cpp b/ext/intl/calendar/calendar_methods.cpp
index ac5b33a89c..155ed5f7f4 100644
--- a/ext/intl/calendar/calendar_methods.cpp
+++ b/ext/intl/calendar/calendar_methods.cpp
@@ -522,48 +522,28 @@ U_CFUNC PHP_FUNCTION(intlcal_roll)
U_CFUNC PHP_FUNCTION(intlcal_clear)
{
- zval args_a[2] = {0},
- *args = &args_a[0];
- zend_long field;
- int variant;
+ zend_long field;
+ zend_bool field_is_null = 1;
CALENDAR_METHOD_INIT_VARS;
- if (ZEND_NUM_ARGS() > (getThis() ? 1 : 2) ||
- zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {
- intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_clear: too many arguments", 0);
- RETURN_FALSE;
- }
- if (!getThis()) {
- args++;
- }
- if (Z_ISUNDEF(args[0]) || Z_TYPE(args[0]) == IS_NULL) {
- zval *dummy; /* we know it's null */
- if (zend_parse_method_parameters(ZEND_NUM_ARGS(),
- getThis(), "O|z", &object, Calendar_ce_ptr, &dummy) == FAILURE) {
- intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_clear: bad arguments", 0);
- RETURN_FALSE;
- }
- variant = 0;
- } else if (zend_parse_method_parameters(ZEND_NUM_ARGS(),
- getThis(), "Ol", &object, Calendar_ce_ptr, &field) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(),
+ getThis(), "O|l!", &object, Calendar_ce_ptr, &field, &field_is_null) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"intlcal_clear: bad arguments", 0);
RETURN_FALSE;
- } else if (field < 0 || field >= UCAL_FIELD_COUNT) {
- intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_clear: invalid field", 0);
- RETURN_FALSE;
- } else {
- variant = 1;
}
CALENDAR_METHOD_FETCH_OBJECT;
- if (variant == 0) {
+ if (field_is_null) {
co->ucal->clear();
} else {
+ if (field < 0 || field >= UCAL_FIELD_COUNT) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_clear: invalid field", 0);
+ RETURN_FALSE;
+ }
+
co->ucal->clear((UCalendarDateFields)field);
}
@@ -614,7 +594,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_actual_minimum)
#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
U_CFUNC PHP_FUNCTION(intlcal_get_day_of_week_type)
{
- zend_ulong dow;
+ zend_long dow;
CALENDAR_METHOD_INIT_VARS;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
@@ -923,15 +903,11 @@ U_CFUNC PHP_FUNCTION(intlcal_is_set)
U_CFUNC PHP_FUNCTION(intlcal_is_weekend)
{
double date;
- zval *rawDate = NULL;
+ zend_bool date_is_null = 1;
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters_ex(ZEND_PARSE_PARAMS_QUIET,
- ZEND_NUM_ARGS(), getThis(),
- "O|z!", &object, Calendar_ce_ptr, &rawDate) == FAILURE
- || (rawDate != NULL &&
- zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
- "O|d", &object, Calendar_ce_ptr, &date) == FAILURE)) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
+ "O|d!", &object, Calendar_ce_ptr, &date, &date_is_null) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"intlcal_is_weekend: bad arguments", 0);
RETURN_FALSE;
@@ -939,7 +915,7 @@ U_CFUNC PHP_FUNCTION(intlcal_is_weekend)
CALENDAR_METHOD_FETCH_OBJECT;
- if (rawDate == NULL) {
+ if (date_is_null) {
RETURN_BOOL((int)co->ucal->isWeekend());
} else {
UBool ret = co->ucal->isWeekend((UDate)date, CALENDAR_ERROR_CODE(co));
diff --git a/ext/intl/grapheme/grapheme_string.c b/ext/intl/grapheme/grapheme_string.c
index c38d51aa78..f42ba7e69e 100644
--- a/ext/intl/grapheme/grapheme_string.c
+++ b/ext/intl/grapheme/grapheme_string.c
@@ -383,9 +383,9 @@ PHP_FUNCTION(grapheme_substr)
UBreakIterator* bi = NULL;
int sub_str_start_pos, sub_str_end_pos;
int32_t (*iter_func)(UBreakIterator *);
- int no_length = 1;
+ zend_bool no_length = 1;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|l!", (char **)&str, &str_len, &lstart, &length, &no_length) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|l!", &str, &str_len, &lstart, &length, &no_length) == FAILURE) {
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
"grapheme_substr: unable to parse input param", 0 );
RETURN_FALSE;
diff --git a/ext/intl/tests/calendar_clear_error.phpt b/ext/intl/tests/calendar_clear_error.phpt
index 7e9c52b2a5..7ff2ff0867 100644
--- a/ext/intl/tests/calendar_clear_error.phpt
+++ b/ext/intl/tests/calendar_clear_error.phpt
@@ -18,8 +18,9 @@ var_dump($c->clear(-1));
var_dump(intlcal_clear($c, -1));
var_dump(intlcal_clear(1, 2));
--EXPECTF--
+Warning: IntlCalendar::clear() expects at most 1 parameter, 2 given in %s on line %d
-Warning: IntlCalendar::clear(): intlcal_clear: too many arguments in %s on line %d
+Warning: IntlCalendar::clear(): intlcal_clear: bad arguments in %s on line %d
bool(false)
Warning: IntlCalendar::clear(): intlcal_clear: invalid field in %s on line %d
diff --git a/ext/intl/tests/calendar_isWeekend_error.phpt b/ext/intl/tests/calendar_isWeekend_error.phpt
index 8f723cc3c9..417bcb4c23 100644
--- a/ext/intl/tests/calendar_isWeekend_error.phpt
+++ b/ext/intl/tests/calendar_isWeekend_error.phpt
@@ -21,6 +21,7 @@ var_dump(intlcal_is_weekend($c, "jj"));
var_dump(intlcal_is_weekend(1));
--EXPECTF--
+Warning: IntlCalendar::isWeekend() expects at most 1 parameter, 2 given in %s on line %d
Warning: IntlCalendar::isWeekend(): intlcal_is_weekend: bad arguments in %s on line %d
bool(false)
diff --git a/ext/intl/tests/collator_get_sort_key_variant4.phpt b/ext/intl/tests/collator_get_sort_key_variant4.phpt
index ed2c9bc175..bd7af6a284 100644
--- a/ext/intl/tests/collator_get_sort_key_variant4.phpt
+++ b/ext/intl/tests/collator_get_sort_key_variant4.phpt
@@ -1,5 +1,5 @@
--TEST--
-collator_get_sort_key() icu >= 55.1
+collator_get_sort_key() icu >= 54.1
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '55.1') >= 0) die('skip for ICU < 55.1'); ?>
diff --git a/ext/intl/tests/collator_get_sort_key_variant5.phpt b/ext/intl/tests/collator_get_sort_key_variant5.phpt
index 52a3af9766..c7717389b7 100644
--- a/ext/intl/tests/collator_get_sort_key_variant5.phpt
+++ b/ext/intl/tests/collator_get_sort_key_variant5.phpt
@@ -2,6 +2,7 @@
collator_get_sort_key() icu >= 55.1
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '56.1') >= 0) die('skip for ICU < 56.1'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '55.1') < 0) die('skip for ICU >= 55.1'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/collator_get_sort_key_variant6.phpt b/ext/intl/tests/collator_get_sort_key_variant6.phpt
new file mode 100644
index 0000000000..d8105d76d4
--- /dev/null
+++ b/ext/intl/tests/collator_get_sort_key_variant6.phpt
@@ -0,0 +1,98 @@
+--TEST--
+collator_get_sort_key() icu >= 56.1
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '56.1') < 0) die('skip for ICU >= 56.1'); ?>
+--FILE--
+<?php
+
+/*
+ * Get sort keys using various locales
+ */
+function sort_arrays( $locale, $data )
+{
+ $res_str = '';
+
+ $coll = ut_coll_create( $locale );
+
+ foreach($data as $value) {
+ $res_val = ut_coll_get_sort_key( $coll, $value );
+ $res_str .= "source: ".$value."\n".
+ "key: ".bin2hex($res_val)."\n";
+ }
+
+ return $res_str;
+}
+
+
+function ut_main()
+{
+ $res_str = '';
+
+ // Regular strings keys
+ $test_params = array(
+ 'abc', 'abd', 'aaa',
+ 'аа', 'а', 'z',
+ '', null , '3',
+ 'y' , 'i' , 'k'
+ );
+
+ $res_str .= sort_arrays( 'en_US', $test_params );
+
+ // Sort a non-ASCII array using ru_RU locale.
+ $test_params = array(
+ 'абг', 'абв', 'жжж', 'эюя'
+ );
+
+ $res_str .= sort_arrays( 'ru_RU', $test_params );
+
+ // Sort an array using Lithuanian locale.
+ $res_str .= sort_arrays( 'lt_LT', $test_params );
+
+ return $res_str . "\n";
+}
+
+include_once( 'ut_common.inc' );
+ut_run();
+?>
+--EXPECT--
+source: abc
+key: 292b2d01070107
+source: abd
+key: 292b2f01070107
+source: aaa
+key: 29292901070107
+source: аа
+key: 60060601060106
+source: а
+key: 600601050105
+source: z
+key: 5b01050105
+source:
+key: 0101
+source:
+key: 0101
+source: 3
+key: 1801050105
+source: y
+key: 5901050105
+source: i
+key: 3901050105
+source: k
+key: 3d01050105
+source: абг
+key: 26060c1001070107
+source: абв
+key: 26060c0e01070107
+source: жжж
+key: 262c2c2c01070107
+source: эюя
+key: 26eef0f401070107
+source: абг
+key: 60060c1001070107
+source: абв
+key: 60060c0e01070107
+source: жжж
+key: 602c2c2c01070107
+source: эюя
+key: 60eef0f401070107
diff --git a/ext/intl/tests/formatter_format5.phpt b/ext/intl/tests/formatter_format5.phpt
index cbaf140a0f..5df2e8bbf3 100644
--- a/ext/intl/tests/formatter_format5.phpt
+++ b/ext/intl/tests/formatter_format5.phpt
@@ -1,8 +1,9 @@
--TEST--
-numfmt_format() icu >= 54.1
+numfmt_format() icu >= 54.1 && icu < 56.1
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '54.1') < 0) die('skip for ICU >= 54.1'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '56.1') >= 0) die('skip for ICU < 56.1'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/formatter_format6.phpt b/ext/intl/tests/formatter_format6.phpt
new file mode 100644
index 0000000000..80894c332b
--- /dev/null
+++ b/ext/intl/tests/formatter_format6.phpt
@@ -0,0 +1,130 @@
+--TEST--
+numfmt_format() icu >= 56.1
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '56.1') < 0) die('skip for ICU >= 56.1'); ?>
+--FILE--
+<?php
+
+/*
+ * Format a number using misc locales/patterns.
+ */
+
+/*
+ * TODO: doesn't pass on ICU 3.6 because 'ru' and 'de' locales changed
+ * currency and percent formatting.
+ */
+
+function ut_main()
+{
+ $styles = array(
+ NumberFormatter::PATTERN_DECIMAL => '##.#####################',
+ NumberFormatter::DECIMAL => '',
+ NumberFormatter::CURRENCY => '',
+ NumberFormatter::PERCENT => '',
+ NumberFormatter::SCIENTIFIC => '',
+ NumberFormatter::SPELLOUT => '@@@@@@@',
+ NumberFormatter::ORDINAL => '',
+ NumberFormatter::DURATION => '',
+ NumberFormatter::PATTERN_RULEBASED => '#####.###',
+ 1234999, // bad one
+ );
+
+ $integer = array(
+ NumberFormatter::ORDINAL => '',
+ NumberFormatter::DURATION => '',
+ );
+ $locales = array(
+ 'en_US',
+ 'ru_UA',
+ 'de',
+ 'fr',
+ 'en_UK'
+ );
+
+ $str_res = '';
+ $number = 1234567.891234567890000;
+
+ foreach( $locales as $locale )
+ {
+ $str_res .= "\nLocale is: $locale\n";
+ foreach( $styles as $style => $pattern )
+ {
+ $fmt = ut_nfmt_create( $locale, $style, $pattern );
+
+ if(!$fmt) {
+ $str_res .= "Bad formatter!\n";
+ continue;
+ }
+ $str_res .= dump( isset($integer[$style])?ut_nfmt_format( $fmt, $number, NumberFormatter::TYPE_INT32):ut_nfmt_format( $fmt, $number ) ) . "\n";
+ }
+ }
+ return $str_res;
+}
+
+include_once( 'ut_common.inc' );
+
+// Run the test
+ut_run();
+
+?>
+--EXPECTREGEX--
+Locale is: en_US
+'1234567.89123457'
+'1,234,567.891'
+'\$1,234,567.89'
+'123,456,789%'
+'1.23456789123457E6'
+'one million,? two hundred (and )?thirty-four thousand,? five hundred (and )?sixty-seven point eight nine one two three four five seven'
+'1,234,567(th|ᵗʰ)'
+'342:56:07'
+'#####.###'
+'USD1,234,567.89'
+
+Locale is: ru_UA
+'1234567,89123457'
+'1 234 567,891'
+'1 234 567,89 ?(грн\.|₴)'
+'123 456 789 ?%'
+'1,23456789123457E6'
+'один миллион двести тридцать четыре тысячи пятьсот шестьдесят семь целых восемьдесят девять миллионов сто двадцать три тысячи четыреста пятьдесят семь стомиллионных'
+'1 234 567.?'
+'1 234 567'
+'#####.###'
+'1 234 567,89 UAH'
+
+Locale is: de
+'1234567,89123457'
+'1.234.567,891'
+'(¤ )?1.234.567,89( ¤)?'
+'123\.456\.789 %'
+'1,23456789123457E6'
+'eine Million zwei­hundert­vier­und­dreißig­tausend­fünf­hundert­sieben­und­sechzig Komma acht neun eins zwei drei vier fünf sieben'
+'1.234.567.?'
+'1.234.567'
+'#####.###'
+'1.234.567,89 ¤¤'
+
+Locale is: fr
+'1234567,89123457'
+'1 234 567,891'
+'1 234 567,89 ¤'
+'123 456 789 ?%'
+'1,23456789123457E6'
+'un million deux cent trente-quatre mille cinq cent soixante-sept virgule huit neuf un deux trois quatre cinq sept'
+'1 234 567e'
+'1 234 567'
+'#####.###'
+'1 234 567,89 ¤¤'
+
+Locale is: en_UK
+'1234567.89123457'
+'1,234,567.891'
+'¤1,234,567.89'
+'123,456,789%'
+'1.23456789123457E6'
+'one million,? two hundred (and )?thirty-four thousand,? five hundred (and )?sixty-seven point eight nine one two three four five seven'
+'1,234,567(th|ᵗʰ)'
+'342:56:07'
+'#####.###'
+'¤¤1,234,567.89'
diff --git a/ext/intl/tests/formatter_get_set_text_attribute.phpt b/ext/intl/tests/formatter_get_set_text_attribute.phpt
index 539ff52322..0535da477b 100644
--- a/ext/intl/tests/formatter_get_set_text_attribute.phpt
+++ b/ext/intl/tests/formatter_get_set_text_attribute.phpt
@@ -1,7 +1,8 @@
--TEST--
-numfmt_get/set_text_attribute()
+numfmt_get/set_text_attribute() ICU < 56.1
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '56.1') >= 0) die('skip for ICU < 56.1'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/formatter_get_set_text_attribute_var2.phpt b/ext/intl/tests/formatter_get_set_text_attribute_var2.phpt
new file mode 100644
index 0000000000..f1306094c4
--- /dev/null
+++ b/ext/intl/tests/formatter_get_set_text_attribute_var2.phpt
@@ -0,0 +1,122 @@
+--TEST--
+numfmt_get/set_text_attribute() ICU >= 56.1
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '56.1') < 0) die('skip for ICU >= 56.1'); ?>
+--FILE--
+<?php
+
+/*
+ * Get/set text attribute.
+ */
+
+
+function ut_main()
+{
+ // Array with data for testing
+ $long_str = str_repeat('blah', 100);
+ $attributes = array(
+ 'POSITIVE_PREFIX' => array( NumberFormatter::POSITIVE_PREFIX, '_+_', 12345.1234 ),
+ 'POSITIVE_SUFFIX' => array( NumberFormatter::POSITIVE_SUFFIX, '_+_', 12345.1234 ),
+ 'NEGATIVE_PREFIX' => array( NumberFormatter::NEGATIVE_PREFIX, '_-_', -12345.1234 ),
+ 'NEGATIVE_SUFFIX' => array( NumberFormatter::NEGATIVE_SUFFIX, '_-_', -12345.1234 ),
+ 'PADDING_CHARACTER' => array( NumberFormatter::PADDING_CHARACTER, '^', 12345.1234 ),
+ 'POSITIVE_PREFIX-2' => array( NumberFormatter::POSITIVE_PREFIX, $long_str, 12345.1234 ),
+// 'CURRENCY_CODE' => array( NumberFormatter::CURRENCY_CODE, '_C_', 12345.1234 )
+// 'DEFAULT_RULESET' => array( NumberFormatter::DEFAULT_RULESET, '_DR_', 12345.1234 ),
+// 'PUBLIC_RULESETS' => array( NumberFormatter::PUBLIC_RULESETS, '_PR_', 12345.1234 )
+ );
+
+ $res_str = '';
+
+ $fmt = ut_nfmt_create( "en_US", NumberFormatter::DECIMAL );
+
+ foreach( $attributes as $attr_name => $data )
+ {
+ list( $attr, $new_val, $test_number ) = $data;
+ $res_str .= "\nAttribute $attr_name\n";
+
+ if( $attr == NumberFormatter::PADDING_CHARACTER )
+ ut_nfmt_set_attribute( $fmt, NumberFormatter::FORMAT_WIDTH, 21 );
+
+ // Get default attribute's value
+ $def_val = ut_nfmt_get_text_attribute( $fmt, $attr );
+ if( $def_val === false )
+ $res_str .= "get_text_attribute() error: " . ut_nfmt_get_error_message( $fmt ) . "\n";
+
+ $res_str .= "Default value: [$def_val]\n";
+ $res_str .= "Formatting number with default value: " . ut_nfmt_format( $fmt, $test_number ) . "\n";
+
+ // Set new attribute's value and see if it works out.
+ $res_val = ut_nfmt_set_text_attribute( $fmt, $attr, $new_val );
+ if( !$res_val )
+ $res_str .= "set_text_attribute() error: " . ut_nfmt_get_error_message( $fmt ) . "\n";
+
+ // Get attribute value back.
+ $new_val_check = ut_nfmt_get_text_attribute( $fmt, $attr );
+ $res_str .= "New value: [$new_val_check]\n";
+ $res_str .= "Formatting number with new value: " . ut_nfmt_format( $fmt, $test_number ) . "\n";
+
+ // Check if the new value has been set.
+ if( $new_val !== $new_val_check )
+ $res_str .= "ERROR: New $attr_name symbol value has not been set correctly.\n";
+
+ // Restore attribute's value to default
+ ut_nfmt_set_text_attribute( $fmt, $attr, $def_val );
+
+ if( $attr == NumberFormatter::PADDING_CHARACTER )
+ ut_nfmt_set_attribute( $fmt, NumberFormatter::FORMAT_WIDTH, 0 );
+ }
+
+ //
+ $fmt = ut_nfmt_create( "uk_UA", NumberFormatter::CURRENCY );
+ $res_str .= sprintf( "\nCurrency ISO-code for locale 'uk_UA' is: %s\n",
+ ut_nfmt_get_text_attribute( $fmt, NumberFormatter::CURRENCY_CODE ) );
+
+ return $res_str;
+}
+
+include_once( 'ut_common.inc' );
+ut_run();
+
+?>
+--EXPECT--
+Attribute POSITIVE_PREFIX
+Default value: []
+Formatting number with default value: 12,345.123
+New value: [_+_]
+Formatting number with new value: _+_12,345.123
+
+Attribute POSITIVE_SUFFIX
+Default value: []
+Formatting number with default value: 12,345.123
+New value: [_+_]
+Formatting number with new value: 12,345.123_+_
+
+Attribute NEGATIVE_PREFIX
+Default value: [-]
+Formatting number with default value: -12,345.123
+New value: [_-_]
+Formatting number with new value: _-_12,345.123
+
+Attribute NEGATIVE_SUFFIX
+Default value: []
+Formatting number with default value: -12,345.123
+New value: [_-_]
+Formatting number with new value: -12,345.123_-_
+
+Attribute PADDING_CHARACTER
+Default value: [ ]
+Formatting number with default value: 12,345.123
+New value: [^]
+Formatting number with new value: ^^^^^^^^^^^12,345.123
+
+Attribute POSITIVE_PREFIX-2
+Default value: []
+Formatting number with default value: 12,345.123
+New value: [blahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblah]
+Formatting number with new value: blahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblah12,345.123
+
+Currency ISO-code for locale 'uk_UA' is: UAH
+
+
diff --git a/ext/intl/timezone/timezone_methods.cpp b/ext/intl/timezone/timezone_methods.cpp
index c46b448bbe..a35174d3da 100644
--- a/ext/intl/timezone/timezone_methods.cpp
+++ b/ext/intl/timezone/timezone_methods.cpp
@@ -440,7 +440,7 @@ U_CFUNC PHP_FUNCTION(intltz_use_daylight_time)
U_CFUNC PHP_FUNCTION(intltz_get_offset)
{
- UDate date;
+ double date;
zend_bool local;
zval *rawOffsetArg,
*dstOffsetArg;
@@ -458,7 +458,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_offset)
TIMEZONE_METHOD_FETCH_OBJECT;
- to->utimezone->getOffset(date, (UBool) local, rawOffset, dstOffset,
+ to->utimezone->getOffset((UDate) date, (UBool) local, rawOffset, dstOffset,
TIMEZONE_ERROR_CODE(to));
INTL_METHOD_CHECK_STATUS(to, "intltz_get_offset: error obtaining offset");
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c
index ea753b9406..c0c622a51e 100644
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@ -2255,7 +2255,7 @@ PHP_FUNCTION(mb_strlen)
PHP_FUNCTION(mb_strpos)
{
int n, reverse = 0;
- zend_long offset;
+ zend_long offset = 0;
mbfl_string haystack, needle;
char *enc_name = NULL;
size_t enc_name_len;
@@ -2266,7 +2266,6 @@ PHP_FUNCTION(mb_strpos)
haystack.no_encoding = MBSTRG(current_internal_encoding)->no_encoding;
needle.no_language = MBSTRG(language);
needle.no_encoding = MBSTRG(current_internal_encoding)->no_encoding;
- offset = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|ls", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &offset, &enc_name, &enc_name_len) == FAILURE) {
return;
@@ -2416,13 +2415,11 @@ PHP_FUNCTION(mb_strrpos)
Finds position of first occurrence of a string within another, case insensitive */
PHP_FUNCTION(mb_stripos)
{
- int n;
- zend_long offset;
+ int n = -1;
+ zend_long offset = 0;
mbfl_string haystack, needle;
const char *from_encoding = MBSTRG(current_internal_encoding)->mime_name;
size_t from_encoding_len;
- n = -1;
- offset = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|ls", (char **)&haystack.val, (int *)&haystack.len, (char **)&needle.val, (int *)&needle.len, &offset, &from_encoding, &from_encoding_len) == FAILURE) {
return;
@@ -2445,13 +2442,11 @@ PHP_FUNCTION(mb_stripos)
Finds position of last occurrence of a string within another, case insensitive */
PHP_FUNCTION(mb_strripos)
{
- int n;
- zend_long offset;
+ int n = -1;
+ zend_long offset = 0;
mbfl_string haystack, needle;
const char *from_encoding = MBSTRG(current_internal_encoding)->mime_name;
size_t from_encoding_len;
- n = -1;
- offset = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|ls", (char **)&haystack.val, (int *)&haystack.len, (char **)&needle.val, (int *)&needle.len, &offset, &from_encoding, &from_encoding_len) == FAILURE) {
return;
@@ -2760,15 +2755,14 @@ PHP_FUNCTION(mb_substr_count)
Returns part of a string */
PHP_FUNCTION(mb_substr)
{
- size_t argc = ZEND_NUM_ARGS();
- char *str, *encoding;
+ char *str, *encoding = NULL;
zend_long from, len;
int mblen;
size_t str_len, encoding_len;
- zval *z_len = NULL;
+ zend_bool len_is_null = 1;
mbfl_string string, result, *ret;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|zs", &str, &str_len, &from, &z_len, &encoding, &encoding_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|l!s", &str, &str_len, &from, &len, &len_is_null, &encoding, &encoding_len) == FAILURE) {
return;
}
@@ -2776,7 +2770,7 @@ PHP_FUNCTION(mb_substr)
string.no_language = MBSTRG(language);
string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding;
- if (argc == 4) {
+ if (encoding) {
string.no_encoding = mbfl_name2no_encoding(encoding);
if (string.no_encoding == mbfl_no_encoding_invalid) {
php_error_docref(NULL, E_WARNING, "Unknown encoding \"%s\"", encoding);
@@ -2787,11 +2781,8 @@ PHP_FUNCTION(mb_substr)
string.val = (unsigned char *)str;
string.len = str_len;
- if (argc < 3 || Z_TYPE_P(z_len) == IS_NULL) {
+ if (len_is_null) {
len = str_len;
- } else {
- convert_to_long_ex(z_len);
- len = Z_LVAL_P(z_len);
}
/* measures length */
@@ -2840,22 +2831,21 @@ PHP_FUNCTION(mb_substr)
Returns part of a string */
PHP_FUNCTION(mb_strcut)
{
- size_t argc = ZEND_NUM_ARGS();
- char *encoding;
+ char *encoding = NULL;
zend_long from, len;
size_t encoding_len;
- zval *z_len = NULL;
+ zend_bool len_is_null = 1;
mbfl_string string, result, *ret;
mbfl_string_init(&string);
string.no_language = MBSTRG(language);
string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|zs", (char **)&string.val, (int **)&string.len, &from, &z_len, &encoding, &encoding_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|l!s", (char **)&string.val, (int **)&string.len, &from, &len, &len_is_null, &encoding, &encoding_len) == FAILURE) {
return;
}
- if (argc == 4) {
+ if (encoding) {
string.no_encoding = mbfl_name2no_encoding(encoding);
if (string.no_encoding == mbfl_no_encoding_invalid) {
php_error_docref(NULL, E_WARNING, "Unknown encoding \"%s\"", encoding);
@@ -2863,11 +2853,8 @@ PHP_FUNCTION(mb_strcut)
}
}
- if (argc < 3 || Z_TYPE_P(z_len) == IS_NULL) {
+ if (len_is_null) {
len = string.len;
- } else {
- convert_to_long_ex(z_len);
- len = Z_LVAL_P(z_len);
}
/* if "from" position is negative, count start position from the end
@@ -2944,7 +2931,7 @@ PHP_FUNCTION(mb_strwidth)
Trim the string in terminal width */
PHP_FUNCTION(mb_strimwidth)
{
- char *str, *trimmarker, *encoding;
+ char *str, *trimmarker = NULL, *encoding = NULL;
zend_long from, width;
size_t str_len, trimmarker_len, encoding_len;
mbfl_string string, result, marker, *ret;
@@ -2962,7 +2949,7 @@ PHP_FUNCTION(mb_strimwidth)
marker.val = NULL;
marker.len = 0;
- if (ZEND_NUM_ARGS() == 5) {
+ if (encoding) {
string.no_encoding = marker.no_encoding = mbfl_name2no_encoding(encoding);
if (string.no_encoding == mbfl_no_encoding_invalid) {
php_error_docref(NULL, E_WARNING, "Unknown encoding \"%s\"", encoding);
@@ -2983,7 +2970,7 @@ PHP_FUNCTION(mb_strimwidth)
RETURN_FALSE;
}
- if (ZEND_NUM_ARGS() >= 4) {
+ if (trimmarker) {
marker.val = (unsigned char *)trimmarker;
marker.len = trimmarker_len;
}
@@ -3092,7 +3079,7 @@ PHP_FUNCTION(mb_convert_encoding)
{
char *arg_str, *arg_new;
size_t str_len, new_len;
- zval *arg_old;
+ zval *arg_old = NULL;
size_t size, l, n;
char *_from_encodings = NULL, *ret, *s_free = NULL;
@@ -3103,7 +3090,7 @@ PHP_FUNCTION(mb_convert_encoding)
return;
}
- if (ZEND_NUM_ARGS() == 3) {
+ if (arg_old) {
switch (Z_TYPE_P(arg_old)) {
case IS_ARRAY:
target_hash = Z_ARRVAL_P(arg_old);
@@ -3241,21 +3228,21 @@ PHP_FUNCTION(mb_detect_encoding)
char *str;
size_t str_len;
zend_bool strict=0;
- zval *encoding_list;
+ zval *encoding_list = NULL;
mbfl_string string;
const mbfl_encoding *ret;
const mbfl_encoding **elist, **list;
size_t size;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|zb", &str, &str_len, &encoding_list, &strict) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|z!b", &str, &str_len, &encoding_list, &strict) == FAILURE) {
return;
}
/* make encoding list */
list = NULL;
size = 0;
- if (ZEND_NUM_ARGS() >= 2 && !Z_ISNULL_P(encoding_list)) {
+ if (encoding_list) {
switch (Z_TYPE_P(encoding_list)) {
case IS_ARRAY:
if (FAILURE == php_mb_parse_encoding_array(encoding_list, &list, &size, 0)) {
@@ -3780,17 +3767,16 @@ detect_end:
static void
php_mb_numericentity_exec(INTERNAL_FUNCTION_PARAMETERS, int type)
{
- char *str, *encoding;
+ char *str, *encoding = NULL;
size_t str_len, encoding_len;
zval *zconvmap, *hash_entry;
HashTable *target_hash;
- int argc = ZEND_NUM_ARGS();
int i, *convmap, *mapelm, mapsize=0;
zend_bool is_hex = 0;
mbfl_string string, result, *ret;
enum mbfl_no_encoding no_encoding;
- if (zend_parse_parameters(argc, "sz|sb", &str, &str_len, &zconvmap, &encoding, &encoding_len, &is_hex) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz|sb", &str, &str_len, &zconvmap, &encoding, &encoding_len, &is_hex) == FAILURE) {
return;
}
@@ -3801,7 +3787,7 @@ php_mb_numericentity_exec(INTERNAL_FUNCTION_PARAMETERS, int type)
string.len = str_len;
/* encoding */
- if ((argc == 3 || argc == 4) && encoding_len > 0) {
+ if (encoding && encoding_len > 0) {
no_encoding = mbfl_name2no_encoding(encoding);
if (no_encoding == mbfl_no_encoding_invalid) {
php_error_docref(NULL, E_WARNING, "Unknown encoding \"%s\"", encoding);
@@ -3811,10 +3797,8 @@ php_mb_numericentity_exec(INTERNAL_FUNCTION_PARAMETERS, int type)
}
}
- if (argc == 4) {
- if (type == 0 && is_hex) {
- type = 2; /* output in hex format */
- }
+ if (type == 0 && is_hex) {
+ type = 2; /* output in hex format */
}
/* conversion map */
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
index 35a986ac2a..d2787262ae 100644
--- a/ext/mbstring/php_mbregex.c
+++ b/ext/mbstring/php_mbregex.c
@@ -653,8 +653,7 @@ _php_mb_regex_init_options(const char *parg, int narg, OnigOptionType *option, O
Returns the current encoding for regex as a string. */
PHP_FUNCTION(mb_regex_encoding)
{
- size_t argc = ZEND_NUM_ARGS();
- char *encoding;
+ char *encoding = NULL;
size_t encoding_len;
OnigEncoding mbctype;
@@ -662,7 +661,7 @@ PHP_FUNCTION(mb_regex_encoding)
return;
}
- if (argc == 0) {
+ if (!encoding) {
const char *retval = _php_mb_regex_mbctype2name(MBREX(current_mbctype));
if (retval == NULL) {
@@ -670,7 +669,7 @@ PHP_FUNCTION(mb_regex_encoding)
}
RETURN_STRING((char *)retval);
- } else if (argc == 1) {
+ } else {
mbctype = _php_mb_regex_name2mbctype(encoding);
if (mbctype == ONIG_ENCODING_UNDEF) {
@@ -687,7 +686,7 @@ PHP_FUNCTION(mb_regex_encoding)
/* {{{ _php_mb_regex_ereg_exec */
static void _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAMETERS, int icase)
{
- zval *arg_pattern, *array;
+ zval *arg_pattern, *array = NULL;
char *string;
size_t string_len;
php_mb_regex_t *re;
@@ -696,8 +695,6 @@ static void _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAMETERS, int icase)
OnigOptionType options;
char *str;
- array = NULL;
-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zs|z/", &arg_pattern, &string, &string_len, &array) == FAILURE) {
RETURN_FALSE;
}
@@ -1180,26 +1177,25 @@ PHP_FUNCTION(mb_ereg_match)
static void
_php_mb_regex_ereg_search_exec(INTERNAL_FUNCTION_PARAMETERS, int mode)
{
- size_t argc = ZEND_NUM_ARGS();
- char *arg_pattern, *arg_options;
+ char *arg_pattern = NULL, *arg_options = NULL;
size_t arg_pattern_len, arg_options_len;
int n, i, err, pos, len, beg, end;
OnigOptionType option;
OnigUChar *str;
OnigSyntaxType *syntax;
- if (zend_parse_parameters(argc, "|ss", &arg_pattern, &arg_pattern_len, &arg_options, &arg_options_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|ss", &arg_pattern, &arg_pattern_len, &arg_options, &arg_options_len) == FAILURE) {
return;
}
option = MBREX(regex_default_options);
- if (argc == 2) {
+ if (arg_options) {
option = 0;
_php_mb_regex_init_options(arg_options, arg_options_len, &option, &syntax, NULL);
}
- if (argc > 0) {
+ if (arg_pattern) {
/* create regex pattern buffer */
if ((MBREX(search_re) = php_mbregex_compile_pattern(arg_pattern, arg_pattern_len, option, MBREX(current_mbctype), MBREX(regex_default_syntax))) == NULL) {
RETURN_FALSE;
diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c
index a9098ed283..bc65378911 100644
--- a/ext/mcrypt/mcrypt.c
+++ b/ext/mcrypt/mcrypt.c
@@ -1218,6 +1218,10 @@ static int php_mcrypt_ensure_valid_iv(MCRYPT td, const char *iv, int iv_size) /*
{
if (mcrypt_enc_mode_has_iv(td) == 1) {
int expected_iv_size = mcrypt_enc_get_iv_size(td);
+ if (expected_iv_size == 0) {
+ /* Algorithm does not use IV, even though mode supports it */
+ return SUCCESS;
+ }
if (!iv) {
php_error_docref(NULL, E_WARNING,
diff --git a/ext/mcrypt/tests/bug70625.phpt b/ext/mcrypt/tests/bug70625.phpt
new file mode 100644
index 0000000000..e9c0de0be3
--- /dev/null
+++ b/ext/mcrypt/tests/bug70625.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #70625: mcrypt_encrypt() : won't return data when no IV was specified under RC4
+--SKIPIF--
+<?php if (!extension_loaded("mcrypt")) print "skip"; ?>
+--FILE--
+<?php
+
+$key = 'secretkey';
+$ciphertext = mcrypt_encrypt(MCRYPT_ARCFOUR, $key, 'payload', MCRYPT_MODE_STREAM);
+var_dump(bin2hex($ciphertext));
+$plaintext = mcrypt_decrypt(MCRYPT_ARCFOUR, $key, $ciphertext, MCRYPT_MODE_STREAM);
+var_dump($plaintext);
+
+?>
+--EXPECT--
+string(14) "d5c9a57023d0f1"
+string(7) "payload"
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c
index 1c933d9ca4..ff1638d7d5 100644
--- a/ext/mysqli/mysqli.c
+++ b/ext/mysqli/mysqli.c
@@ -801,7 +801,9 @@ PHP_MINIT_FUNCTION(mysqli)
REGISTER_LONG_CONSTANT("MYSQLI_TYPE_CHAR", FIELD_TYPE_CHAR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("MYSQLI_TYPE_INTERVAL", FIELD_TYPE_INTERVAL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("MYSQLI_TYPE_GEOMETRY", FIELD_TYPE_GEOMETRY, CONST_CS | CONST_PERSISTENT);
-
+#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);
diff --git a/ext/mysqli/tests/mysqli_constants.phpt b/ext/mysqli/tests/mysqli_constants.phpt
index 9bbc8bb4b7..dd0f769e91 100644
--- a/ext/mysqli/tests/mysqli_constants.phpt
+++ b/ext/mysqli/tests/mysqli_constants.phpt
@@ -199,6 +199,10 @@ require_once('skipifconnectfailure.inc');
$expected_constants["MYSQLI_CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS"] = true;
}
+ if ($IS_MYSQLND) {
+ $expected_constants["MYSQLI_TYPE_JSON"] = true;
+ }
+
$unexpected_constants = array();
foreach ($constants as $group => $consts) {
diff --git a/ext/mysqli/tests/mysqli_fetch_field_flags.phpt b/ext/mysqli/tests/mysqli_fetch_field_flags.phpt
index 06b936aeed..e234a28fe5 100644
--- a/ext/mysqli/tests/mysqli_fetch_field_flags.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_field_flags.phpt
@@ -106,7 +106,10 @@ mysqli_close($link);
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
- if (mysqli_get_server_version($link) > 50600) {
+ $is_maria_db = strpos(mysqli_get_server_info($link), "MariaDB") !== false;
+ if ($is_maria_db) {
+ $columns['TIMESTAMP NOT NULL'] = 'ON_UPDATE_NOW TIMESTAMP BINARY UNSIGNED NOT_NULL';
+ } else if (mysqli_get_server_version($link) > 50600) {
$columns['TIMESTAMP NOT NULL'] = 'ON_UPDATE_NOW TIMESTAMP BINARY NOT_NULL';
}
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index eed4a1c8f8..2bb57b3373 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -1922,6 +1922,10 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
smart_str_append_unsigned_ex(&hashed_details, session_mode, 0);
smart_str_0(&hashed_details);
+ if (persistent) {
+ smart_str_appendl_ex(&hashed_details, "pc", sizeof("pc") - 1, 0);
+ }
+
/* make it lowercase */
/* PHPNG TODO is this safe to do? What about interned strings? */
php_strtolower(hashed_details.s->val, hashed_details.s->len);
@@ -1996,14 +2000,20 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
if (!ping_done && (*(connection->next_pingp) > 0) && (timestamp >= *(connection->next_pingp)) && !php_oci_connection_ping(connection)) {
/* server died */
} else {
- php_oci_connection *tmp;
+ php_oci_connection *tmp = (php_oci_connection *) NULL;
+ zval *tmp_val = (zval *) NULL;
/* okay, the connection is open and the server is still alive */
connection->used_this_request = 1;
- tmp = (php_oci_connection *)connection->id->ptr;
-
- if (tmp != NULL && tmp->hash_key->len == hashed_details.s->len &&
- memcmp(tmp->hash_key->val, hashed_details.s->val, tmp->hash_key->len) == 0) {
+ tmp_val = zend_hash_index_find(&EG(regular_list), connection->id->handle);
+ if ((tmp_val != NULL) && (Z_TYPE_P(tmp_val) == IS_RESOURCE)) {
+ tmp = Z_RES_VAL_P(tmp_val);
+ }
+
+ if ((tmp_val != NULL) && (tmp != NULL) &&
+ (tmp->hash_key->len == hashed_details.s->len) &&
+ (memcmp(tmp->hash_key->val, hashed_details.s->val, tmp->hash_key->len) == 0)) {
+ connection = tmp;
++GC_REFCOUNT(connection->id);
/* do nothing */
} else {
@@ -2366,6 +2376,10 @@ static int php_oci_connection_close(php_oci_connection *connection)
connection->private_spool = NULL;
}
+ if (GC_REFCOUNT(connection->hash_key) >= 2) {
+ zend_hash_del(&EG(regular_list), connection->hash_key);
+ }
+
if (connection->hash_key) {
pefree(connection->hash_key, connection->is_persistent);
connection->hash_key = NULL;
diff --git a/ext/oci8/tests/bug27303_2_11gR1.phpt b/ext/oci8/tests/bug27303_2_11gR1.phpt
index 06133e0115..d9a68b8cc7 100644
--- a/ext/oci8/tests/bug27303_2_11gR1.phpt
+++ b/ext/oci8/tests/bug27303_2_11gR1.phpt
@@ -10,6 +10,8 @@ if (!(isset($matches[0]) && $matches[1] < 12)) {
die("skip expected output only valid when using pre-Oracle 12c database");
}
?>
+--ENV--
+NLS_LANG=
--FILE--
<?php
@@ -153,104 +155,104 @@ string(2) "96"
string(2) "97"
string(2) "98"
string(2) "99"
-string(2) "10"
-string(2) "10"
-string(2) "10"
-string(2) "10"
-string(2) "10"
-string(2) "10"
-string(2) "10"
-string(2) "10"
-string(2) "10"
-string(2) "10"
-string(2) "11"
-string(2) "11"
-string(2) "11"
-string(2) "11"
-string(2) "11"
-string(2) "11"
-string(2) "11"
-string(2) "11"
-string(2) "11"
-string(2) "11"
-string(2) "12"
-string(2) "12"
-string(2) "12"
-string(2) "12"
-string(2) "12"
-string(2) "12"
-string(2) "12"
-string(2) "12"
-string(2) "12"
-string(2) "12"
-string(2) "13"
-string(2) "13"
-string(2) "13"
-string(2) "13"
-string(2) "13"
-string(2) "13"
-string(2) "13"
-string(2) "13"
-string(2) "13"
-string(2) "13"
-string(2) "14"
-string(2) "14"
-string(2) "14"
-string(2) "14"
-string(2) "14"
-string(2) "14"
-string(2) "14"
-string(2) "14"
-string(2) "14"
-string(2) "14"
-string(2) "15"
-string(2) "15"
-string(2) "15"
-string(2) "15"
-string(2) "15"
-string(2) "15"
-string(2) "15"
-string(2) "15"
-string(2) "15"
-string(2) "15"
-string(2) "16"
-string(2) "16"
-string(2) "16"
-string(2) "16"
-string(2) "16"
-string(2) "16"
-string(2) "16"
-string(2) "16"
-string(2) "16"
-string(2) "16"
-string(2) "17"
-string(2) "17"
-string(2) "17"
-string(2) "17"
-string(2) "17"
-string(2) "17"
-string(2) "17"
-string(2) "17"
-string(2) "17"
-string(2) "17"
-string(2) "18"
-string(2) "18"
-string(2) "18"
-string(2) "18"
-string(2) "18"
-string(2) "18"
-string(2) "18"
-string(2) "18"
-string(2) "18"
-string(2) "18"
-string(2) "19"
-string(2) "19"
-string(2) "19"
-string(2) "19"
-string(2) "19"
-string(2) "19"
-string(2) "19"
-string(2) "19"
-string(2) "19"
-string(2) "19"
+string(3) "100"
+string(3) "101"
+string(3) "102"
+string(3) "103"
+string(3) "104"
+string(3) "105"
+string(3) "106"
+string(3) "107"
+string(3) "108"
+string(3) "109"
+string(3) "110"
+string(3) "111"
+string(3) "112"
+string(3) "113"
+string(3) "114"
+string(3) "115"
+string(3) "116"
+string(3) "117"
+string(3) "118"
+string(3) "119"
+string(3) "120"
+string(3) "121"
+string(3) "122"
+string(3) "123"
+string(3) "124"
+string(3) "125"
+string(3) "126"
+string(3) "127"
+string(3) "128"
+string(3) "129"
+string(3) "130"
+string(3) "131"
+string(3) "132"
+string(3) "133"
+string(3) "134"
+string(3) "135"
+string(3) "136"
+string(3) "137"
+string(3) "138"
+string(3) "139"
+string(3) "140"
+string(3) "141"
+string(3) "142"
+string(3) "143"
+string(3) "144"
+string(3) "145"
+string(3) "146"
+string(3) "147"
+string(3) "148"
+string(3) "149"
+string(3) "150"
+string(3) "151"
+string(3) "152"
+string(3) "153"
+string(3) "154"
+string(3) "155"
+string(3) "156"
+string(3) "157"
+string(3) "158"
+string(3) "159"
+string(3) "160"
+string(3) "161"
+string(3) "162"
+string(3) "163"
+string(3) "164"
+string(3) "165"
+string(3) "166"
+string(3) "167"
+string(3) "168"
+string(3) "169"
+string(3) "170"
+string(3) "171"
+string(3) "172"
+string(3) "173"
+string(3) "174"
+string(3) "175"
+string(3) "176"
+string(3) "177"
+string(3) "178"
+string(3) "179"
+string(3) "180"
+string(3) "181"
+string(3) "182"
+string(3) "183"
+string(3) "184"
+string(3) "185"
+string(3) "186"
+string(3) "187"
+string(3) "188"
+string(3) "189"
+string(3) "190"
+string(3) "191"
+string(3) "192"
+string(3) "193"
+string(3) "194"
+string(3) "195"
+string(3) "196"
+string(3) "197"
+string(3) "198"
+string(3) "199"
Done
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index 3fa015e162..e6d7005a8b 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -108,6 +108,9 @@ zend_accel_shared_globals *accel_shared_globals = NULL;
zend_bool accel_startup_ok = 0;
static char *zps_failure_reason = NULL;
char *zps_api_failure_reason = NULL;
+#if ENABLE_FILE_CACHE_FALLBACK
+zend_bool fallback_process = 0; /* process uses file cache fallback */
+#endif
static zend_op_array *(*accelerator_orig_compile_file)(zend_file_handle *file_handle, int type);
static int (*accelerator_orig_zend_stream_open_function)(const char *filename, zend_file_handle *handle );
@@ -1804,7 +1807,11 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
ZCSG(hits)++; /* TBFixed: may lose one hit */
persistent_script->dynamic_members.hits++; /* see above */
#else
- INCREMENT(hits);
+#ifdef _M_X64
+ InterlockedIncrement64(&ZCSG(hits));
+#else
+ InterlockedIncrement(&ZCSG(hits));
+#endif
InterlockedIncrement64(&persistent_script->dynamic_members.hits);
#endif
@@ -2651,6 +2658,15 @@ static int accel_startup(zend_extension *extension)
zend_accel_error(ACCEL_LOG_FATAL, "Failure to initialize shared memory structures - can not reattach to exiting shared memory.");
return SUCCESS;
break;
+#if ENABLE_FILE_CACHE_FALLBACK
+ case ALLOC_FALLBACK:
+ zend_shared_alloc_lock();
+ fallback_process = 1;
+ zend_accel_init_auto_globals();
+ zend_shared_alloc_unlock();
+ goto file_cache_fallback;
+ break;
+#endif
}
/* from this point further, shared memory is supposed to be OK */
@@ -2678,6 +2694,9 @@ static int accel_startup(zend_extension *extension)
zend_accel_init_auto_globals();
#endif
}
+#if ENABLE_FILE_CACHE_FALLBACK
+file_cache_fallback:
+#endif
/* Override compiler */
accelerator_orig_compile_file = zend_compile_file;
diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h
index 93344ec0f5..798b2d7365 100644
--- a/ext/opcache/ZendAccelerator.h
+++ b/ext/opcache/ZendAccelerator.h
@@ -139,6 +139,9 @@ extern int lock_file;
#define DO_ALLOCA(x) do_alloca(x, use_heap)
#define FREE_ALLOCA(x) free_alloca(x, use_heap)
+#if defined(HAVE_OPCACHE_FILE_CACHE) && defined(ZEND_WIN32)
+# define ENABLE_FILE_CACHE_FALLBACK 1
+#endif
#if ZEND_WIN32
typedef unsigned __int64 accel_time_t;
@@ -219,6 +222,9 @@ typedef struct _zend_accel_directives {
zend_bool file_cache_only;
zend_bool file_cache_consistency_checks;
#endif
+#if ENABLE_FILE_CACHE_FALLBACK
+ zend_bool file_cache_fallback;
+#endif
#ifdef HAVE_HUGE_CODE_PAGES
zend_bool huge_code_pages;
#endif
@@ -293,6 +299,9 @@ typedef struct _zend_accel_shared_globals {
} zend_accel_shared_globals;
extern zend_bool accel_startup_ok;
+#if ENABLE_FILE_CACHE_FALLBACK
+extern zend_bool fallback_process;
+#endif
extern zend_accel_shared_globals *accel_shared_globals;
#define ZCSG(element) (accel_shared_globals->element)
diff --git a/ext/opcache/shared_alloc_win32.c b/ext/opcache/shared_alloc_win32.c
index 68e5e0cba7..ce4bacf348 100644
--- a/ext/opcache/shared_alloc_win32.c
+++ b/ext/opcache/shared_alloc_win32.c
@@ -146,13 +146,37 @@ static int zend_shared_alloc_reattach(size_t requested_size, char **error_in)
return ALLOC_FAILURE;
}
fclose(fp);
-
/* Check if the requested address space is free */
if (VirtualQuery(wanted_mapping_base, &info, sizeof(info)) == 0 ||
info.State != MEM_FREE ||
info.RegionSize < requested_size) {
+#if ENABLE_FILE_CACHE_FALLBACK
+ if (ZCG(accel_directives).file_cache && ZCG(accel_directives).file_cache_fallback) {
+ size_t pre_size, wanted_mb_save;
+
+ wanted_mb_save = (size_t)wanted_mapping_base;
+
+ err = ERROR_INVALID_ADDRESS;
+ zend_win_error_message(ACCEL_LOG_WARNING, "Base address marks unusable memory region (fall-back to file cache)", err);
+
+ pre_size = ZEND_ALIGNED_SIZE(sizeof(zend_smm_shared_globals)) + ZEND_ALIGNED_SIZE(sizeof(zend_shared_segment)) + ZEND_ALIGNED_SIZE(sizeof(void *)) + ZEND_ALIGNED_SIZE(sizeof(int));
+ /* Map only part of SHM to have access opcache shared globals */
+ mapping_base = MapViewOfFileEx(memfile, FILE_MAP_ALL_ACCESS, 0, 0, pre_size + ZEND_ALIGNED_SIZE(sizeof(zend_accel_shared_globals)), NULL);
+ if (mapping_base == NULL) {
+ err = GetLastError();
+ zend_win_error_message(ACCEL_LOG_FATAL, "Unable to reattach to opcache shared globals", err);
+ return ALLOC_FAILURE;
+ }
+ accel_shared_globals = (zend_accel_shared_globals *)((char *)((zend_smm_shared_globals *)mapping_base)->app_shared_globals + ((char *)mapping_base - (char *)wanted_mb_save));
+
+ /* Make this process to use file-cache only */
+ ZCG(accel_directives).file_cache_only = 1;
+
+ return ALLOC_FALLBACK;
+ }
+#endif
err = ERROR_INVALID_ADDRESS;
- zend_win_error_message(ACCEL_LOG_FATAL, "Unable to reattach to base address", err);
+ zend_win_error_message(ACCEL_LOG_FATAL, "Base address marks unusable memory region", err);
return ALLOC_FAILURE;
}
@@ -251,29 +275,7 @@ static int create_segments(size_t requested_size, zend_shared_segment ***shared_
be taken (fail to map). So under Vista, we try to map into a hard coded predefined addresses
in high memory. */
if (!ZCG(accel_directives).mmap_base || !*ZCG(accel_directives).mmap_base) {
- do {
- OSVERSIONINFOEX osvi;
- SYSTEM_INFO si;
-
- ZeroMemory(&si, sizeof(SYSTEM_INFO));
- ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
-
- osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
-
- if (! GetVersionEx ((OSVERSIONINFO *) &osvi)) {
- osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
- if (!GetVersionEx((OSVERSIONINFO *)&osvi)) {
- break;
- }
- }
-
- GetSystemInfo(&si);
-
- /* Are we running Vista ? */
- if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT && osvi.dwMajorVersion == 6) {
- wanted_mapping_base = vista_mapping_base_set;
- }
- } while (0);
+ wanted_mapping_base = vista_mapping_base_set;
} else {
char *s = ZCG(accel_directives).mmap_base;
diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c
index 11d631c538..bd53f6e373 100644
--- a/ext/opcache/zend_accelerator_module.c
+++ b/ext/opcache/zend_accelerator_module.c
@@ -309,6 +309,9 @@ ZEND_INI_BEGIN()
STD_PHP_INI_ENTRY("opcache.file_cache_only" , "0" , PHP_INI_SYSTEM, OnUpdateBool, accel_directives.file_cache_only, zend_accel_globals, accel_globals)
STD_PHP_INI_ENTRY("opcache.file_cache_consistency_checks" , "1" , PHP_INI_SYSTEM, OnUpdateBool, accel_directives.file_cache_consistency_checks, zend_accel_globals, accel_globals)
#endif
+#if ENABLE_FILE_CACHE_FALLBACK
+ STD_PHP_INI_ENTRY("opcache.file_cache_fallback" , "1" , PHP_INI_SYSTEM, OnUpdateBool, accel_directives.file_cache_fallback, zend_accel_globals, accel_globals)
+#endif
#ifdef HAVE_HUGE_CODE_PAGES
STD_PHP_INI_BOOLEAN("opcache.huge_code_pages" , "0" , PHP_INI_SYSTEM, OnUpdateBool, accel_directives.huge_code_pages, zend_accel_globals, accel_globals)
#endif
@@ -733,7 +736,11 @@ static ZEND_FUNCTION(opcache_reset)
RETURN_FALSE;
}
- if (!ZCG(enabled) || !accel_startup_ok || !ZCSG(accelerator_enabled)) {
+ if ((!ZCG(enabled) || !accel_startup_ok || !ZCSG(accelerator_enabled))
+#if ENABLE_FILE_CACHE_FALLBACK
+ && !fallback_process
+#endif
+ ) {
RETURN_FALSE;
}
diff --git a/ext/opcache/zend_shared_alloc.c b/ext/opcache/zend_shared_alloc.c
index 09da83a6a6..1ad3fd2e28 100644
--- a/ext/opcache/zend_shared_alloc.c
+++ b/ext/opcache/zend_shared_alloc.c
@@ -187,6 +187,11 @@ int zend_shared_alloc_startup(size_t requested_size)
smm_shared_globals = NULL;
return res;
}
+#if ENABLE_FILE_CACHE_FALLBACK
+ if (ALLOC_FALLBACK == res) {
+ return ALLOC_FALLBACK;
+ }
+#endif
if (!g_shared_alloc_handler) {
/* try memory handlers in order */
@@ -207,6 +212,11 @@ int zend_shared_alloc_startup(size_t requested_size)
if (res == SUCCESSFULLY_REATTACHED) {
return res;
}
+#if ENABLE_FILE_CACHE_FALLBACK
+ if (ALLOC_FALLBACK == res) {
+ return ALLOC_FALLBACK;
+ }
+#endif
shared_segments_array_size = ZSMMG(shared_segments_count) * S_H(segment_type_size)();
diff --git a/ext/opcache/zend_shared_alloc.h b/ext/opcache/zend_shared_alloc.h
index 398b64f432..ec67343e89 100644
--- a/ext/opcache/zend_shared_alloc.h
+++ b/ext/opcache/zend_shared_alloc.h
@@ -68,6 +68,7 @@
#define FAILED_REATTACHED 2
#define SUCCESSFULLY_REATTACHED 4
#define ALLOC_FAIL_MAPPING 8
+#define ALLOC_FALLBACK 9
typedef struct _zend_shared_segment {
size_t size;
diff --git a/ext/pcre/tests/bug69864.phpt b/ext/pcre/tests/bug69864.phpt
index d59aaab36e..cf7ba5b72e 100644
--- a/ext/pcre/tests/bug69864.phpt
+++ b/ext/pcre/tests/bug69864.phpt
@@ -6,6 +6,8 @@ if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
?>
--FILE--
<?php
+/* CAUTION: this test will most likely fail with valgrind until --smc-check=all is used. */
+
const PREG_CACHE_SIZE = 4096; // this has to be >= the resp. constant in php_pcre.c
var_dump(preg_replace_callback('/a/', function($m) {
diff --git a/ext/pdo_mysql/tests/bug54929.phpt b/ext/pdo_mysql/tests/bug54929.phpt
index 84b9e7d04f..0a111d8935 100644
--- a/ext/pdo_mysql/tests/bug54929.phpt
+++ b/ext/pdo_mysql/tests/bug54929.phpt
@@ -54,7 +54,7 @@ array(3) {
[1]=>
int(1064)
[2]=>
- string(149) "You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near '--'' at line 1"
+ string(%d) "You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near '--'' at line 1"
}
array(1) {
["f1"]=>
diff --git a/ext/phar/tests/bug70433.phpt b/ext/phar/tests/bug70433.phpt
index cbebb34c37..cc8f438463 100644
--- a/ext/phar/tests/bug70433.phpt
+++ b/ext/phar/tests/bug70433.phpt
@@ -1,7 +1,7 @@
--TEST--
Phar - bug #70433 - Uninitialized pointer in phar_make_dirstream when zip entry filename is "/"
--SKIPIF--
-<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("phar") || !extension_loaded("zlib")) die("skip"); ?>
--FILE--
<?php
$phar = new PharData(__DIR__."/bug70433.zip");
diff --git a/ext/reflection/bug70674.phpt b/ext/reflection/bug70674.phpt
new file mode 100644
index 0000000000..82cfc53f1e
--- /dev/null
+++ b/ext/reflection/bug70674.phpt
@@ -0,0 +1,8 @@
+--TEST--
+Bug #70674 (ReflectionFunction::getClosure() leaks memory when used for internal functions)
+--FILE--
+<?php
+var_dump(((new ReflectionFunction("strlen"))->getClosure())("hello"));
+?>
+--EXPECT--
+int(5)
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 00731c70c3..a095120e18 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -1762,7 +1762,7 @@ ZEND_METHOD(reflection_function, getClosure)
}
GET_REFLECTION_OBJECT_PTR(fptr);
- zend_create_closure(return_value, fptr, NULL, NULL, NULL);
+ zend_create_fake_closure(return_value, fptr, NULL, NULL, NULL);
}
/* }}} */
@@ -3144,7 +3144,7 @@ ZEND_METHOD(reflection_method, getClosure)
GET_REFLECTION_OBJECT_PTR(mptr);
if (mptr->common.fn_flags & ZEND_ACC_STATIC) {
- zend_create_closure(return_value, mptr, mptr->common.scope, mptr->common.scope, NULL);
+ zend_create_fake_closure(return_value, mptr, mptr->common.scope, mptr->common.scope, NULL);
} else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &obj) == FAILURE) {
return;
@@ -3161,7 +3161,7 @@ ZEND_METHOD(reflection_method, getClosure)
{
ZVAL_COPY(return_value, obj);
} else {
- zend_create_closure(return_value, mptr, mptr->common.scope, Z_OBJCE_P(obj), obj);
+ zend_create_fake_closure(return_value, mptr, mptr->common.scope, Z_OBJCE_P(obj), obj);
}
}
}
diff --git a/ext/reflection/tests/ReflectionMethod_getDocComment_property_list.phpt b/ext/reflection/tests/ReflectionMethod_getDocComment_property_list.phpt
new file mode 100644
index 0000000000..4719571124
--- /dev/null
+++ b/ext/reflection/tests/ReflectionMethod_getDocComment_property_list.phpt
@@ -0,0 +1,41 @@
+--TEST--
+ReflectionMethod::getDocComment()
+--INI--
+opcache.save_comments=1
+--FILE--
+<?php
+
+class X {
+ /**
+ * doc 1
+ */
+ // Some comment
+ public
+ $x = "x",
+ $y = 'y',
+ /** doc 2 */
+ $z = 'z'
+ ;
+}
+
+$reflection = new ReflectionProperty('\X', 'x');
+echo 'X::x', PHP_EOL;
+var_dump($reflection->getDocComment());
+
+$reflection = new ReflectionProperty('\X', 'y');
+echo 'X::y', PHP_EOL;
+var_dump($reflection->getDocComment());
+
+$reflection = new ReflectionProperty('\X', 'z');
+echo 'X::z', PHP_EOL;
+var_dump($reflection->getDocComment());
+?>
+--EXPECTF--
+X::x
+string(24) "/**
+ * doc 1
+ */"
+X::y
+bool(false)
+X::z
+string(12) "/** doc 2 */"
diff --git a/ext/snmp/tests/wrong_hostname.phpt b/ext/snmp/tests/wrong_hostname.phpt
index 53c6b22cb0..23424764b8 100644
--- a/ext/snmp/tests/wrong_hostname.phpt
+++ b/ext/snmp/tests/wrong_hostname.phpt
@@ -18,5 +18,5 @@ var_dump(snmpget('192.168..6.1', 'community', '.1.3.6.1.2.1.1.1.0', $timeout, $r
?>
--EXPECTF--
-Warning: snmpget(): php_network_getaddresses:%snot known in %s on line %d
+Warning: snmpget(): php_network_getaddresses:%s in %s on line %d
bool(false)
diff --git a/ext/sockets/tests/socket_cmsg_rights.phpt b/ext/sockets/tests/socket_cmsg_rights.phpt
index 8c1734a568..081ad9a6ac 100644
--- a/ext/sockets/tests/socket_cmsg_rights.phpt
+++ b/ext/sockets/tests/socket_cmsg_rights.phpt
@@ -49,7 +49,7 @@ checktimeout($s, 500);
$data = [
"name" => [],
"buffer_size" => 2000,
- "controllen" => socket_cmsg_space(SOL_SOCKET, SCM_RIGHTS, 3)
+ "controllen" => socket_cmsg_space(SOL_SOCKET, SCM_RIGHTS, 4)
];
var_dump($data);
if (!socket_recvmsg($s, $data, 0)) die("recvmsg");
@@ -68,7 +68,7 @@ array(3) {
["buffer_size"]=>
int(2000)
["controllen"]=>
- int(32)
+ int(%d)
}
Array
(
diff --git a/ext/spl/config.m4 b/ext/spl/config.m4
index 869e542ef4..2f77946ce5 100755
--- a/ext/spl/config.m4
+++ b/ext/spl/config.m4
@@ -1,26 +1,6 @@
dnl $Id$
dnl config.m4 for extension SPL
- AC_MSG_CHECKING(whether zend_object_value is packed)
- old_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$INCLUDES -I$abs_srcdir $CPPFLAGS"
- AC_TRY_RUN([
-#include "Zend/zend_types.h"
-int main(int argc, char **argv) {
- return ((sizeof(zend_object_handle) + sizeof(zend_object_handlers*)) == sizeof(zend_object_value)) ? 0 : 1;
-}
- ], [
- ac_result=1
- AC_MSG_RESULT(yes)
- ],[
- ac_result=0
- AC_MSG_RESULT(no)
- ], [
- ac_result=0
- AC_MSG_RESULT(no)
- ])
- CPPFLAGS=$old_CPPFLAGS
- AC_DEFINE_UNQUOTED(HAVE_PACKED_OBJECT_VALUE, $ac_result, [Whether struct _zend_object_value is packed])
AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) support])
PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_exceptions.c spl_observer.c spl_dllist.c spl_heap.c spl_fixedarray.c, no,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
PHP_INSTALL_HEADERS([ext/spl], [php_spl.h spl_array.h spl_directory.h spl_engine.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h spl_dllist.h spl_heap.h spl_fixedarray.h])
diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c
index 2796d3d93a..b8d0281a87 100644
--- a/ext/spl/spl_observer.c
+++ b/ext/spl/spl_observer.c
@@ -90,7 +90,7 @@ typedef struct _spl_SplObjectStorage { /* {{{ */
zend_object std;
} spl_SplObjectStorage; /* }}} */
-/* {{{ storage is an assoc aray of [zend_object_value]=>[zval *obj, zval *inf] */
+/* {{{ storage is an assoc aray of [zend_object*]=>[zval *obj, zval *inf] */
typedef struct _spl_SplObjectStorageElement {
zval obj;
zval inf;
@@ -138,49 +138,11 @@ static zend_string *spl_object_storage_get_hash(spl_SplObjectStorage *intern, zv
memcpy(ZSTR_VAL(hash), (void*)&Z_OBJ_P(obj), sizeof(zend_object*));
ZSTR_VAL(hash)[ZSTR_LEN(hash)] = '\0';
return hash;
- /* !!! FIXME
- int hash_len = sizeof(zend_object_value);
-
-#if HAVE_PACKED_OBJECT_VALUE
-
- if (hash_len_ptr) {
- *hash_len_ptr = hash_len;
- }
-
- return (char*)&Z_OBJVAL_P(obj);
-#else
- char *hash = emalloc(hash_len + 1);
-
- zend_object_value zvalue;
- memset(&zvalue, 0, sizeof(zend_object_value));
- zvalue.handle = Z_OBJ_HANDLE_P(obj);
- zvalue.handlers = Z_OBJ_HT_P(obj);
-
- memcpy(hash, (char *)&zvalue, hash_len);
- hash[hash_len] = 0;
-
- if (hash_len_ptr) {
- *hash_len_ptr = hash_len;
- }
-
- return hash;
-#endif
-*/
- return NULL;
}
}
static void spl_object_storage_free_hash(spl_SplObjectStorage *intern, zend_string *hash) {
zend_string_release(hash);
-/*
- if (intern->fptr_get_hash) {
- } else {
-#if HAVE_PACKED_OBJECT_VALUE
-#else
- efree(hash);
-#endif
- }
-*/
}
static void spl_object_storage_dtor(zval *element) /* {{{ */
diff --git a/ext/standard/array.c b/ext/standard/array.c
index b9d39ea1a2..4678e14488 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -3282,6 +3282,7 @@ PHP_FUNCTION(array_keys)
if (strict) {
ZEND_HASH_FOREACH_KEY_VAL_IND(Z_ARRVAL_P(input), num_idx, str_idx, entry) {
+ ZVAL_DEREF(entry);
if (fast_is_identical_function(search_value, entry)) {
if (str_idx) {
ZVAL_STR_COPY(&new_val, str_idx);
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 83b977acf8..8da45c4287 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -1763,7 +1763,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_fmod, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_intdiv, 0)
- ZEND_ARG_INFO(0, numerator)
+ ZEND_ARG_INFO(0, dividend)
ZEND_ARG_INFO(0, divisor)
ZEND_END_ARG_INFO()
/* }}} */
diff --git a/ext/standard/dl.c b/ext/standard/dl.c
index cadbc140cc..19d715d4a8 100644
--- a/ext/standard/dl.c
+++ b/ext/standard/dl.c
@@ -71,7 +71,7 @@ PHPAPI PHP_FUNCTION(dl)
}
php_dl(filename, MODULE_TEMPORARY, return_value, 0);
- if (Z_LVAL_P(return_value) == 1) {
+ if (Z_TYPE_P(return_value) == IS_TRUE) {
EG(full_tables_cleanup) = 1;
}
}
@@ -237,7 +237,7 @@ PHP_MINFO_FUNCTION(dl)
PHPAPI void php_dl(char *file, int type, zval *return_value, int start_now)
{
php_error_docref(NULL, E_WARNING, "Cannot dynamically load %s - dynamic modules are not supported", file);
- RETURN_FALSE;
+ RETVAL_FALSE;
}
PHP_MINFO_FUNCTION(dl)
diff --git a/ext/standard/math.c b/ext/standard/math.c
index 9ab457b41d..6059f3dd9b 100644
--- a/ext/standard/math.c
+++ b/ext/standard/math.c
@@ -1456,27 +1456,27 @@ PHP_FUNCTION(fmod)
}
/* }}} */
-/* {{{ proto int intdiv(int numerator, int divisor)
- Returns the integer division of the numerator by the divisor */
+/* {{{ proto int intdiv(int dividend, int divisor)
+ Returns the integer quotient of the division of dividend by divisor */
PHP_FUNCTION(intdiv)
{
- zend_long numerator, divisor;
+ zend_long dividend, divisor;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll", &numerator, &divisor) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll", &dividend, &divisor) == FAILURE) {
return;
}
if (divisor == 0) {
zend_throw_exception_ex(zend_ce_division_by_zero_error, 0, "Division by zero");
return;
- } else if (divisor == -1 && numerator == ZEND_LONG_MIN) {
+ } else if (divisor == -1 && dividend == ZEND_LONG_MIN) {
/* Prevent overflow error/crash ... really should not happen:
We don't return a float here as that violates function contract */
zend_throw_exception_ex(zend_ce_arithmetic_error, 0, "Division of PHP_INT_MIN by -1 is not an integer");
return;
}
- RETURN_LONG(numerator / divisor);
+ RETURN_LONG(dividend / divisor);
}
/* }}} */
diff --git a/ext/standard/random.c b/ext/standard/random.c
index 6d3ec141bc..f46c4e0a14 100644
--- a/ext/standard/random.c
+++ b/ext/standard/random.c
@@ -31,7 +31,7 @@
# include "win32/winutil.h"
#endif
#ifdef __linux__
-# include <linux/random.h>
+# include <sys/syscall.h>
#endif
#ifdef ZTS
@@ -107,7 +107,7 @@ static int php_random_bytes(void *bytes, size_t size)
amount_to_read
*/
- n = getrandom(bytes + read_bytes, amount_to_read, 0);
+ n = syscall(SYS_getrandom, bytes + read_bytes, amount_to_read, 0);
if (n == -1) {
if (errno == EINTR || errno == EAGAIN) {
@@ -140,7 +140,13 @@ static int php_random_bytes(void *bytes, size_t size)
return FAILURE;
}
/* Does the file exist and is it a character device? */
- if (fstat(fd, &st) != 0 || !S_ISCHR(st.st_mode)) {
+ if (fstat(fd, &st) != 0 ||
+# ifdef S_IFNAM
+ !(S_IFNAM(st.st_mode) || S_ISCHR(st.st_mode))
+# else
+ !S_ISCHR(st.st_mode)
+# endif
+ ) {
close(fd);
zend_throw_exception(zend_ce_exception, "Error reading from source device", 0);
return FAILURE;
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 2200762dea..3d5b76caa2 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -3004,7 +3004,7 @@ static void php_strtr_array(zval *return_value, zend_string *input, HashTable *p
zend_ulong *num_bitset;
/* we will collect all possible key lengths */
- num_bitset = ecalloc((slen + (sizeof(zend_ulong)-1)) / sizeof(zend_ulong), sizeof(zend_ulong));
+ num_bitset = ecalloc((slen + sizeof(zend_ulong)) / sizeof(zend_ulong), sizeof(zend_ulong));
memset(bitset, 0, sizeof(bitset));
/* check if original array has numeric keys */
diff --git a/ext/standard/tests/array/bug70668.phpt b/ext/standard/tests/array/bug70668.phpt
new file mode 100644
index 0000000000..b35107a0a6
--- /dev/null
+++ b/ext/standard/tests/array/bug70668.phpt
@@ -0,0 +1,63 @@
+--TEST--
+Bug #70668 (array_keys() doesn't respect references when $strict is true)
+--FILE--
+<?php
+$arr = array(1, "1", "", NULL, 0, false, true, array());
+
+$s = &$arr[0];
+var_dump(array_keys($arr, $s, true));
+
+$s = &$arr[1];
+var_dump(array_keys($arr, $s, true));
+
+$s = &$arr[2];
+var_dump(array_keys($arr, $s, true));
+
+$s = &$arr[3];
+var_dump(array_keys($arr, $s, true));
+
+$s = &$arr[4];
+var_dump(array_keys($arr, $s, true));
+
+$s = &$arr[5];
+var_dump(array_keys($arr, $s, true));
+
+$s = &$arr[6];
+var_dump(array_keys($arr, $s, true));
+
+$s = &$arr[7];
+var_dump(array_keys($arr, $s, true));
+?>
+--EXPECT--
+array(1) {
+ [0]=>
+ int(0)
+}
+array(1) {
+ [0]=>
+ int(1)
+}
+array(1) {
+ [0]=>
+ int(2)
+}
+array(1) {
+ [0]=>
+ int(3)
+}
+array(1) {
+ [0]=>
+ int(4)
+}
+array(1) {
+ [0]=>
+ int(5)
+}
+array(1) {
+ [0]=>
+ int(6)
+}
+array(1) {
+ [0]=>
+ int(7)
+}
diff --git a/ext/standard/tests/serialize/unserialize_error_001.phpt b/ext/standard/tests/serialize/unserialize_error_001.phpt
new file mode 100644
index 0000000000..5589cbd835
--- /dev/null
+++ b/ext/standard/tests/serialize/unserialize_error_001.phpt
@@ -0,0 +1,52 @@
+--TEST--
+Test unserialize() with non-bool/array allowed_classes
+--FILE--
+<?php
+class foo {
+ public $x = "bar";
+}
+$z = array(new foo(), 2, "3");
+$s = serialize($z);
+
+var_dump(unserialize($s, ["allowed_classes" => null]));
+var_dump(unserialize($s, ["allowed_classes" => 0]));
+var_dump(unserialize($s, ["allowed_classes" => 1]));
+
+--EXPECTF--
+array(3) {
+ [0]=>
+ object(__PHP_Incomplete_Class)#%d (2) {
+ ["__PHP_Incomplete_Class_Name"]=>
+ string(3) "foo"
+ ["x"]=>
+ string(3) "bar"
+ }
+ [1]=>
+ int(2)
+ [2]=>
+ string(1) "3"
+}
+array(3) {
+ [0]=>
+ object(__PHP_Incomplete_Class)#%d (2) {
+ ["__PHP_Incomplete_Class_Name"]=>
+ string(3) "foo"
+ ["x"]=>
+ string(3) "bar"
+ }
+ [1]=>
+ int(2)
+ [2]=>
+ string(1) "3"
+}
+array(3) {
+ [0]=>
+ object(foo)#%d (1) {
+ ["x"]=>
+ string(3) "bar"
+ }
+ [1]=>
+ int(2)
+ [2]=>
+ string(1) "3"
+}
diff --git a/ext/standard/tests/serialize/unserialize_subclasses.phpt b/ext/standard/tests/serialize/unserialize_subclasses.phpt
new file mode 100644
index 0000000000..1f2384f72b
--- /dev/null
+++ b/ext/standard/tests/serialize/unserialize_subclasses.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Test unserialize() with allowed_classes and subclasses
+--FILE--
+<?php
+
+class C {}
+class D extends C {}
+
+$c = serialize(new C);
+$d = serialize(new D);
+
+var_dump(unserialize($c, ["allowed_classes" => ["C"]]));
+var_dump(unserialize($c, ["allowed_classes" => ["D"]]));
+var_dump(unserialize($d, ["allowed_classes" => ["C"]]));
+var_dump(unserialize($d, ["allowed_classes" => ["D"]]));
+
+--EXPECTF--
+object(C)#%d (0) {
+}
+object(__PHP_Incomplete_Class)#%d (1) {
+ ["__PHP_Incomplete_Class_Name"]=>
+ string(1) "C"
+}
+object(__PHP_Incomplete_Class)#%d (1) {
+ ["__PHP_Incomplete_Class_Name"]=>
+ string(1) "D"
+}
+object(D)#%d (0) {
+}
diff --git a/ext/standard/tests/strings/bug70667.phpt b/ext/standard/tests/strings/bug70667.phpt
new file mode 100644
index 0000000000..fd3deadb29
--- /dev/null
+++ b/ext/standard/tests/strings/bug70667.phpt
@@ -0,0 +1,9 @@
+--TEST--
+Bug #70667 (strtr() causes invalid writes and a crashes)
+--FILE--
+<?php
+$a = array("{{language_id}}"=>"255", "{{partner_name}}"=>"test1");
+var_dump(strtr("Sign in to test1", $a));
+?>
+--EXPECT--
+string(16) "Sign in to test1"
diff --git a/main/php.h b/main/php.h
index 2a461377f4..90a230705a 100644
--- a/main/php.h
+++ b/main/php.h
@@ -26,7 +26,7 @@
#include <dmalloc.h>
#endif
-#define PHP_API_VERSION 20131218
+#define PHP_API_VERSION 20151012
#define PHP_HAVE_STREAMS
#define YYDEBUG 0
#define PHP_DEFAULT_CHARSET "UTF-8"
diff --git a/main/php_ini.c b/main/php_ini.c
index 67434d6365..17d4e31aeb 100644
--- a/main/php_ini.c
+++ b/main/php_ini.c
@@ -421,7 +421,7 @@ int php_init_config(void)
SetLastError(0);
- /*If the given bugger is not large enough to hold the data, the return value is
+ /*If the given buffer is not large enough to hold the data, the return value is
the buffer size, in characters, required to hold the string and its terminating
null character. We use this return value to alloc the final buffer. */
size = GetEnvironmentVariableA("PHPRC", &dummybuf, 0);
diff --git a/makedist b/makedist
index 50cb49ed3a..5b28dd88d4 100755
--- a/makedist
+++ b/makedist
@@ -118,7 +118,7 @@ sed -i 's,^#ifndef YYTOKENTYPE,#include "zend.h"\n#ifndef YYTOKENTYPE,g' $MY_OLD
# download pear
$ECHO_N "makedist: Attempting to download PEAR's phar archive"
if test ! -x wget; then
- wget https://pear.php.net/~cweiske/1.10.0dev2/install-pear-nozlib.phar -nd -P pear/
+ wget https://pear.php.net/install-pear-nozlib.phar -nd -P pear/
else
$ECHO_N "Missing wget binary needed for pear download";
exit 7
diff --git a/pear/Makefile.frag b/pear/Makefile.frag
index 4cb7bc9d11..bbe8ec3513 100644
--- a/pear/Makefile.frag
+++ b/pear/Makefile.frag
@@ -9,7 +9,7 @@ WGET = `which wget 2>/dev/null`
FETCH = `which fetch 2>/dev/null`
PEAR_PREFIX = -dp a${program_prefix}
PEAR_SUFFIX = -ds a$(program_suffix)
-PEAR_INSTALLER_URL = https://pear.php.net/~cweiske/1.10.0dev2/install-pear-nozlib.phar
+PEAR_INSTALLER_URL = https://pear.php.net/install-pear-nozlib.phar
install-pear-installer: $(SAPI_CLI_PATH)
@$(top_builddir)/sapi/cli/php $(PEAR_INSTALL_FLAGS) pear/install-pear-nozlib.phar -d "$(peardir)" -b "$(bindir)" ${PEAR_PREFIX} ${PEAR_SUFFIX}
diff --git a/run-tests.php b/run-tests.php
index 8222c78709..f3d4a27b15 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -884,7 +884,7 @@ $exts_skipped = 0;
$ignored_by_ext = 0;
sort($exts_to_test);
$test_dirs = array();
-$optionals = array('tests', 'ext', 'Zend', 'ZendEngine2', 'sapi/cli', 'sapi/cgi', 'sapi/fpm');
+$optionals = array('tests', 'ext', 'Zend', 'sapi');
foreach($optionals as $dir) {
if (@filetype($dir) == 'dir') {
diff --git a/sapi/cgi/tests/003.phpt b/sapi/cgi/tests/003.phpt
index 533743323f..1ba94f27ef 100644
--- a/sapi/cgi/tests/003.phpt
+++ b/sapi/cgi/tests/003.phpt
@@ -2,6 +2,11 @@
strip comments and whitespace with -w
--SKIPIF--
<?php
+
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die ("skip not for Windows");
+}
+
include "skipif.inc";
?>
--FILE--
diff --git a/sapi/cgi/tests/004.phpt b/sapi/cgi/tests/004.phpt
index 8769126561..0e7117080d 100644
--- a/sapi/cgi/tests/004.phpt
+++ b/sapi/cgi/tests/004.phpt
@@ -26,7 +26,11 @@ var_dump(test::$pri);
file_put_contents($filename, $code);
-var_dump(`$php -n -f "$filename" 2>/dev/null`);
+if (defined("PHP_WINDOWS_VERSION_MAJOR")) {
+ var_dump(`$php -n -f "$filename"`);
+} else {
+ var_dump(`$php -n -f "$filename" 2>/dev/null`);
+}
var_dump(`$php -n -f "wrong"`);
@unlink($filename);
diff --git a/sapi/cgi/tests/005-win32.phpt b/sapi/cgi/tests/005-win32.phpt
new file mode 100644
index 0000000000..b7efb9b500
--- /dev/null
+++ b/sapi/cgi/tests/005-win32.phpt
@@ -0,0 +1,34 @@
+--TEST--
+using invalid combinations of cmdline options
+--SKIPIF--
+<?php
+
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ die ("skip Windows only");
+}
+
+include "skipif.inc";
+?>
+--FILE--
+<?php
+
+include "include.inc";
+
+$php = get_cgi_path();
+reset_env_vars();
+
+var_dump(`$php -n -a -f "wrong"`);
+var_dump(`$php -n -f "wrong" -a`);
+
+echo "Done\n";
+?>
+--EXPECTF--
+string(51) "Interactive mode enabled
+
+No input file specified.
+"
+string(51) "Interactive mode enabled
+
+No input file specified.
+"
+Done
diff --git a/sapi/cgi/tests/005.phpt b/sapi/cgi/tests/005.phpt
index 34a28f9c5e..259005f3d9 100644
--- a/sapi/cgi/tests/005.phpt
+++ b/sapi/cgi/tests/005.phpt
@@ -1,7 +1,14 @@
--TEST--
using invalid combinations of cmdline options
--SKIPIF--
-<?php include "skipif.inc"; ?>
+<?php
+
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die ("skip not for Windows");
+}
+
+include "skipif.inc";
+?>
--FILE--
<?php
diff --git a/sapi/cgi/tests/006.phpt b/sapi/cgi/tests/006.phpt
index a2b2b2903a..08bfbf5d6c 100644
--- a/sapi/cgi/tests/006.phpt
+++ b/sapi/cgi/tests/006.phpt
@@ -44,7 +44,11 @@ class test
file_put_contents($filename, $code);
-var_dump(`"$php" -n -l "$filename" 2>/dev/null`);
+if (defined("PHP_WINDOWS_VERSION_MAJOR")) {
+ var_dump(`"$php" -n -l "$filename"`);
+} else {
+ var_dump(`"$php" -n -l "$filename" 2>/dev/null`);
+}
@unlink($filename);
diff --git a/sapi/cgi/tests/include.inc b/sapi/cgi/tests/include.inc
index 2d8ed8a2e3..dc98dc0f23 100644
--- a/sapi/cgi/tests/include.inc
+++ b/sapi/cgi/tests/include.inc
@@ -21,18 +21,27 @@ function get_cgi_path() /* {{{ */
if ($cli) {
/* trying to guess ... */
$php_path = $php;
- for ($i = 0; $i < 2; $i++) {
- $slash_pos = strrpos($php_path, "/");
- if ($slash_pos) {
- $php_path = substr($php_path, 0, $slash_pos);
- } else {
- return FALSE;
+ if (defined("PHP_WINDOWS_VERSION_MAJOR")) {
+ /* On Windows it should be in the same dir as php.exe in most of the cases. */
+ $php_path = dirname($php);
+
+ if (is_dir($php_path) && file_exists("$php_path/php-cgi.exe") && is_executable("$php_path/php-cgi.exe")) {
+ return "$php_path/php-cgi.exe";
+ }
+ } else {
+ for ($i = 0; $i < 2; $i++) {
+ $slash_pos = strrpos($php_path, "/");
+ if ($slash_pos) {
+ $php_path = substr($php_path, 0, $slash_pos);
+ } else {
+ return FALSE;
+ }
}
- }
- if ($php_path && is_dir($php_path) && file_exists($php_path."/cgi/php-cgi") && is_executable($php_path."/cgi/php-cgi")) {
- /* gotcha */
- return $php_path."/cgi/php-cgi";
+ if ($php_path && is_dir($php_path) && file_exists($php_path."/cgi/php-cgi") && is_executable($php_path."/cgi/php-cgi")) {
+ /* gotcha */
+ return $php_path."/cgi/php-cgi";
+ }
}
return false;
}
diff --git a/sapi/cgi/tests/skipif.inc b/sapi/cgi/tests/skipif.inc
index 9da8b7934d..d2cef23589 100644
--- a/sapi/cgi/tests/skipif.inc
+++ b/sapi/cgi/tests/skipif.inc
@@ -4,10 +4,6 @@ if (substr(php_sapi_name(), 0, 3) == "cgi") {
exit;
}
-if (substr(PHP_OS, 0, 3) == 'WIN') {
- die ("skip not for Windows");
-}
-
include dirname(__FILE__)."/include.inc";
if (!get_cgi_path()) {
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index 94d5b84f67..b4288b87a2 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -682,17 +682,20 @@ static int do_cli(int argc, char **argv) /* {{{ */
goto out;
case 'v': /* show php version & quit */
- php_printf("PHP %s (%s) (built: %s %s) %s\nCopyright (c) 1997-2015 The PHP Group\n%s",
+ php_printf("PHP %s (%s) (built: %s %s) ( %s)\nCopyright (c) 1997-2015 The PHP Group\n%s",
PHP_VERSION, cli_sapi_module.name, __DATE__, __TIME__,
-#if ZEND_DEBUG && defined(HAVE_GCOV)
- "(DEBUG GCOV)",
-#elif ZEND_DEBUG
- "(DEBUG)",
-#elif defined(HAVE_GCOV)
- "(GCOV)",
+#if ZTS
+ "ZTS "
#else
- "",
+ "NTS "
#endif
+#if ZEND_DEBUG
+ "DEBUG "
+#endif
+#ifdef HAVE_GCOV
+ "GCOV "
+#endif
+ ,
get_zend_version()
);
sapi_deactivate();
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
index c3f0cc6c54..7a96f0ba09 100644
--- a/sapi/phpdbg/phpdbg.c
+++ b/sapi/phpdbg/phpdbg.c
@@ -323,9 +323,9 @@ static PHP_FUNCTION(phpdbg_break_next)
/* {{{ proto void phpdbg_break_file(string file, integer line) */
static PHP_FUNCTION(phpdbg_break_file)
{
- char *file = NULL;
- size_t flen = 0;
- long line;
+ char *file;
+ size_t flen;
+ zend_long line;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl", &file, &flen, &line) == FAILURE) {
return;
@@ -378,9 +378,9 @@ static PHP_FUNCTION(phpdbg_clear)
/* {{{ proto void phpdbg_color(integer element, string color) */
static PHP_FUNCTION(phpdbg_color)
{
- long element = 0L;
- char *color = NULL;
- size_t color_len = 0;
+ zend_long element;
+ char *color;
+ size_t color_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ls", &element, &color, &color_len) == FAILURE) {
return;
@@ -443,14 +443,14 @@ static void phpdbg_oplog_fill_executable(zend_op_array *op_array, HashTable *ins
ZVAL_LONG(&zero, 0);
/* ignore autogenerated return (well, not too precise with finally branches, but that's okay) */
- if (op_array->last >= 1 && (end - 1)->opcode == ZEND_RETURN
- && ((op_array->last > 1 && ((end - 2)->opcode == ZEND_RETURN || (end - 2)->opcode == ZEND_GENERATOR_RETURN || (end - 2)->opcode == ZEND_THROW))
- || op_array->function_name == NULL)) {
+ if (op_array->last >= 1 && (((end - 1)->opcode == ZEND_RETURN || (end - 1)->opcode == ZEND_RETURN_BY_REF || (end - 1)->opcode == ZEND_GENERATOR_RETURN)
+ && ((op_array->last > 1 && ((end - 2)->opcode == ZEND_RETURN || (end - 2)->opcode == ZEND_RETURN_BY_REF || (end - 2)->opcode == ZEND_GENERATOR_RETURN || (end - 2)->opcode == ZEND_THROW))
+ || op_array->function_name == NULL || (end - 1)->extended_value == -1))) {
end--;
}
for (; cur < end; cur++) {
- if (cur->opcode == ZEND_NOP || cur->opcode == ZEND_OP_DATA || cur->opcode == ZEND_FE_FREE || cur->opcode == ZEND_FREE || cur->opcode == ZEND_ASSERT_CHECK
+ if (cur->opcode == ZEND_NOP || cur->opcode == ZEND_OP_DATA || cur->opcode == ZEND_FE_FREE || cur->opcode == ZEND_FREE || cur->opcode == ZEND_ASSERT_CHECK || cur->opcode == ZEND_VERIFY_RETURN_TYPE
|| cur->opcode == ZEND_DECLARE_CONST || cur->opcode == ZEND_DECLARE_CLASS || cur->opcode == ZEND_DECLARE_INHERITED_CLASS || cur->opcode == ZEND_DECLARE_FUNCTION
|| cur->opcode == ZEND_DECLARE_INHERITED_CLASS_DELAYED || cur->opcode == ZEND_VERIFY_ABSTRACT_CLASS || cur->opcode == ZEND_ADD_TRAIT || cur->opcode == ZEND_BIND_TRAITS
|| cur->opcode == ZEND_DECLARE_ANON_CLASS || cur->opcode == ZEND_DECLARE_ANON_INHERITED_CLASS || cur->opcode == ZEND_FAST_RET || cur->opcode == ZEND_TICKS
@@ -793,7 +793,7 @@ static void php_sapi_phpdbg_send_header(sapi_header_struct *sapi_header, void *s
static void php_sapi_phpdbg_log_message(char *message) /* {{{ */
{
/*
- * We must not request TSRM before being boot
+ * We must not request TSRM before being booted
*/
if (phpdbg_booted) {
if (PHPDBG_G(flags) & PHPDBG_IN_EVAL) {
@@ -803,6 +803,10 @@ static void php_sapi_phpdbg_log_message(char *message) /* {{{ */
phpdbg_error("php", "msg=\"%s\"", "%s", message);
+ if (PHPDBG_G(flags) & PHPDBG_PREVENT_INTERACTIVE) {
+ return;
+ }
+
switch (PG(last_error_type)) {
case E_ERROR:
case E_CORE_ERROR:
@@ -813,7 +817,7 @@ static void php_sapi_phpdbg_log_message(char *message) /* {{{ */
const char *file_char = zend_get_executed_filename();
zend_string *file = zend_string_init(file_char, strlen(file_char), 0);
phpdbg_list_file(file, 3, zend_get_executed_lineno() - 1, zend_get_executed_lineno());
- efree(file);
+ zend_string_release(file);
if (!phpdbg_fully_started) {
return;
@@ -1844,7 +1848,9 @@ phpdbg_interact:
} else {
PHPDBG_G(flags) |= PHPDBG_IS_INTERACTIVE;
}
- PHPDBG_COMMAND_HANDLER(run)(NULL);
+ zend_try {
+ PHPDBG_COMMAND_HANDLER(run)(NULL);
+ } zend_end_try();
if (quit_immediately) {
/* if -r is on the command line more than once just quit */
EG(bailout) = __orig_bailout; /* reset zend_try */
@@ -1936,7 +1942,7 @@ phpdbg_out:
/* In case we aborted during script execution, we may not reset CG(unclean_shutdown) */
if (!(PHPDBG_G(flags) & PHPDBG_IS_RUNNING)) {
- is_exit = !PHPDBG_G(in_execution) && EG(exit_status) != 255;
+ is_exit = !PHPDBG_G(in_execution);
CG(unclean_shutdown) = is_exit || PHPDBG_G(unclean_eval);
}
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c
index f5341075d0..50971b25ec 100644
--- a/sapi/phpdbg/phpdbg_prompt.c
+++ b/sapi/phpdbg/phpdbg_prompt.c
@@ -649,9 +649,10 @@ static inline void phpdbg_handle_exception(void) /* {{{ */
msg = zval_get_string(zend_read_property(zend_get_exception_base(&zv), &zv, ZEND_STRL("string"), 1, &rv));
}
- phpdbg_writeln("exception", "name=\"%s\" file=\"%s\" line=\"" ZEND_LONG_FMT "\"", "Uncaught %s in %s on line " ZEND_LONG_FMT "\n%s", ZSTR_VAL(ex->ce->name), ZSTR_VAL(file), line, ZSTR_VAL(msg));
- zend_string_release(msg);
+ phpdbg_error("exception", "name=\"%s\" file=\"%s\" line=\"" ZEND_LONG_FMT "\"", "Uncaught %s in %s on line " ZEND_LONG_FMT, ZSTR_VAL(ex->ce->name), ZSTR_VAL(file), line);
zend_string_release(file);
+ phpdbg_writeln("exceptionmsg", "msg=\"%s\"", ZSTR_VAL(msg));
+ zend_string_release(msg);
if (EG(prev_exception)) {
OBJ_RELEASE(EG(prev_exception));
@@ -659,6 +660,8 @@ static inline void phpdbg_handle_exception(void) /* {{{ */
}
OBJ_RELEASE(ex);
EG(opline_before_exception) = NULL;
+
+ EG(exit_status) = 255;
} /* }}} */
PHPDBG_COMMAND(run) /* {{{ */
@@ -745,12 +748,20 @@ PHPDBG_COMMAND(run) /* {{{ */
if (restore) {
zend_exception_restore();
- zend_try_exception_handler();
+ zend_try {
+ zend_try_exception_handler();
+ PHPDBG_G(in_execution) = 1;
+ } zend_catch {
+ PHPDBG_G(in_execution) = 0;
+
+ if (PHPDBG_G(flags) & PHPDBG_IS_STOPPING) {
+ zend_bailout();
+ }
+ } zend_end_try();
+
if (EG(exception)) {
phpdbg_handle_exception();
}
-
- PHPDBG_G(in_execution) = 1;
}
PHPDBG_G(flags) &= ~PHPDBG_IS_RUNNING;
diff --git a/sapi/phpdbg/tests/exceptions_001.phpt b/sapi/phpdbg/tests/exceptions_001.phpt
index d5646ad40d..991ea1cc71 100644
--- a/sapi/phpdbg/tests/exceptions_001.phpt
+++ b/sapi/phpdbg/tests/exceptions_001.phpt
@@ -16,7 +16,7 @@ prompt> handle first
prompt> frame #0: {closure}() at %s:16
frame #1: {main} at %s:20
prompt> 3
-prompt> Uncaught Error in %s on line 16
+prompt> [Uncaught Error in %s on line 16]
Error: Call to undefined function foo() in %s:16
Stack trace:
#0 %s(20): {closure}()
diff --git a/sapi/phpdbg/tests/exceptions_002.phpt b/sapi/phpdbg/tests/exceptions_002.phpt
index 6c11c58db6..f304cc25db 100644
--- a/sapi/phpdbg/tests/exceptions_002.phpt
+++ b/sapi/phpdbg/tests/exceptions_002.phpt
@@ -20,7 +20,7 @@ Stack trace:
#1 %s(20): {closure}()
#2 {main}
thrown in eval()'d code on line 1
-prompt> Uncaught Error in %s on line 16
+prompt> [Uncaught Error in %s on line 16]
Error: Call to undefined function foo() in %s:16
Stack trace:
#0 %s(20): {closure}()
diff --git a/scripts/dev/check_parameters.php b/scripts/dev/check_parameters.php
index 658471ef2a..0f157a794c 100644
--- a/scripts/dev/check_parameters.php
+++ b/scripts/dev/check_parameters.php
@@ -20,8 +20,8 @@
/* $Id$ */
-define('REPORT_LEVEL', 2); // 0 reports less false-positives. up to level 5.
-define('VERSION', '5.2'); // minimum is 5.2
+define('REPORT_LEVEL', 1); // 0 reports less false-positives. up to level 5.
+define('VERSION', '7.0'); // minimum is 7.0
define('PHPDIR', realpath(dirname(__FILE__) . '/../..'));
@@ -33,31 +33,25 @@ ini_set('pcre.backtrack_limit', 10000000);
$API_params = array(
- 'a' => array('zval**'), // array as zval*
+ 'a' => array('zval**'), // array
+ 'A' => array('zval**'), // array or object
'b' => array('zend_bool*'), // boolean
- 'C' => array('zend_class_entry**'), // class
'd' => array('double*'), // double
'f' => array('zend_fcall_info*', 'zend_fcall_info_cache*'), // function
'h' => array('HashTable**'), // array as an HashTable*
- 'l' => array('long*'), // long
+ 'H' => array('HashTable**'), // array or HASH_OF(object)
+ 'l' => array('zend_long*'), // long
+ //TODO 'L' => array('zend_long*, '), // long
'o' => array('zval**'), //object
'O' => array('zval**', 'zend_class_entry*'), // object of given type
+ 'P' => array('zend_string**'), // valid path
'r' => array('zval**'), // resource
- 's' => array('char**', 'int*'), // string
+ 'S' => array('zend_string**'), // string
'z' => array('zval**'), // zval*
'Z' => array('zval***') // zval**
+ // 's', 'p', 'C' handled separately
);
-// specific to PHP >= 6
-if (version_compare(VERSION, '6', 'ge')) {
- $API_params['S'] = $API_params['s']; // binary string
- $API_params['t'] = array('zstr*', 'int*', 'zend_uchar*'); // text
- $API_params['T'] = $API_params['t'];
- $API_params['u'] = array('UChar**', 'int*'); // unicode
- $API_params['U'] = $API_params['u'];
-}
-
-
/** reports an error, according to its level */
function error($str, $level = 0)
{
@@ -65,7 +59,7 @@ function error($str, $level = 0)
if ($level <= REPORT_LEVEL) {
if (strpos($current_file,PHPDIR) === 0) {
- $filename = substr($current_file, strlen(PHPDIR)+1);
+ $filename = substr($current_file, strlen(PHPDIR)+1);
} else {
$filename = $current_file;
}
@@ -135,7 +129,7 @@ function get_vars($txt)
/** run diagnostic checks against one var. */
-function check_param($db, $idx, $exp, $optional)
+function check_param($db, $idx, $exp, $optional, $allow_uninit = false)
{
global $error_few_vars_given;
@@ -153,15 +147,14 @@ function check_param($db, $idx, $exp, $optional)
error("{$db[$idx][0]}: expected '$exp' but got '{$db[$idx][1]}' [".($idx+1).']');
}
- if ($optional && !$db[$idx][2]) {
- error("optional var not initialized: {$db[$idx][0]} [".($idx+1).']', 1);
-
- } elseif (!$optional && $db[$idx][2]) {
+ if (!$optional && $db[$idx][2]) {
error("not optional var is initialized: {$db[$idx][0]} [".($idx+1).']', 2);
}
+ if (!$allow_uninit && $optional && !$db[$idx][2]) {
+ error("optional var not initialized: {$db[$idx][0]} [".($idx+1).']', 1);
+ }
}
-
/** fetch params passed to zend_parse_params*() */
function get_params($vars, $str)
{
@@ -200,7 +193,15 @@ function check_function($name, $txt, $offset)
{
global $API_params;
- if (preg_match_all('/zend_parse_parameters(?:_ex\s*\([^,]+,[^,]+|\s*\([^,]+),\s*"([^"]*)"\s*,\s*([^{;]*)/S', $txt, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) {
+ $regex = '/
+ (?: zend_parse_parameters(?:_throw)? \s*\([^,]+
+ | zend_parse_(?:parameters_ex|method_parameters) \s*\([^,]+,[^,]+
+ | zend_parse_method_parameters_ex \s*\([^,]+,[^,]+,[^,+]
+ )
+ ,\s*"([^"]*)"\s*
+ ,\s*([^{;]*)
+ /Sx';
+ if (preg_match_all($regex, $txt, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) {
$GLOBALS['current_function'] = $name;
@@ -211,12 +212,14 @@ function check_function($name, $txt, $offset)
$vars = get_vars(substr($txt, 0, $m[0][1])); // limit var search to current location
$params = get_params($vars, $m[2][0]);
$optional = $varargs = false;
- $last_last_char = $last_char = '';
+ $last_char = '';
$j = -1;
- $len = strlen($m[1][0]);
+ $spec = $m[1][0];
+ $len = strlen($spec);
for ($i = 0; $i < $len; ++$i) {
- switch($char = $m[1][0][$i]) {
+ $char = $spec[$i];
+ switch ($char = $spec[$i]) {
// separator for optional parameters
case '|':
if ($optional) {
@@ -231,57 +234,60 @@ function check_function($name, $txt, $offset)
// separate_zval_if_not_ref
case '/':
- if (!in_array($last_char, array('r', 'z'))) {
- error("the '/' specifier cannot be applied to '$last_char'");
+ if (in_array($last_char, array('l', 'L', 'd', 'b'))) {
+ error("the '/' specifier should not be applied to '$last_char'");
}
break;
// nullable arguments
case '!':
- if (!in_array($last_char, array('a', 'C', 'f', 'h', 'o', 'O', 'r', 's', 't', 'z', 'Z'))) {
- error("the '!' specifier cannot be applied to '$last_char'");
+ if (in_array($last_char, array('l', 'L', 'd', 'b'))) {
+ check_param($params, ++$j, 'zend_bool*', $optional);
}
break;
- case '&':
- if (version_compare(VERSION, '6', 'ge')) {
- if ($last_char == 's' || ($last_last_char == 's' && $last_char == '!')) {
- check_param($params, ++$j, 'UConverter*', $optional);
-
- } else {
- error("the '&' specifier cannot be applied to '$last_char'");
- }
+ // variadic arguments
+ case '+':
+ case '*':
+ if ($varargs) {
+ error("A varargs specifier can only be used once. repeated char at column $i");
} else {
- error("unknown char ('&') at column $i");
+ check_param($params, ++$j, 'zval**', $optional);
+ check_param($params, ++$j, 'int*', $optional);
+ $varargs = true;
}
break;
- case '+':
- case '*':
- if (version_compare(VERSION, '6', 'ge')) {
- if ($varargs) {
- error("A varargs specifier can only be used once. repeated char at column $i");
- } else {
- check_param($params, ++$j, 'zval****', $optional);
- check_param($params, ++$j, 'int*', $optional);
- $varargs = true;
- }
- } else {
- error("unknown char ('$char') at column $i");
+ case 's':
+ case 'p':
+ check_param($params, ++$j, 'char**', $optional, $allow_uninit=true);
+ check_param($params, ++$j, 'size_t*', $optional, $allow_uninit=true);
+ if ($optional && !$params[$j-1][2] && !$params[$j][2]
+ && $params[$j-1][0] !== '**dummy**' && $params[$j][0] !== '**dummy**') {
+ error("one of optional vars {$params[$j-1][0]} or {$params[$j][0]} must be initialized", 1);
}
break;
+ case 'C':
+ // C must always be initialized, independently of whether it's optional
+ check_param($params, ++$j, 'zend_class_entry**', false);
+ break;
+
default:
- if (isset($API_params[$char])) {
- foreach($API_params[$char] as $exp) {
- check_param($params, ++$j, $exp, $optional);
- }
- } else {
+ if (!isset($API_params[$char])) {
error("unknown char ('$char') at column $i");
}
+
+ // If an is_null flag is in use, only that flag is required to be
+ // initialized
+ $allow_uninit = $i+1 < $len && $spec[$i+1] === '!'
+ && in_array($char, array('l', 'L', 'd', 'b'));
+
+ foreach ($API_params[$char] as $exp) {
+ check_param($params, ++$j, $exp, $optional, $allow_uninit);
+ }
}
- $last_last_char = $last_char;
$last_char = $char;
}
}
@@ -306,8 +312,10 @@ function recurse($path)
$txt = file_get_contents($file);
// remove comments (but preserve the number of lines)
- $txt = preg_replace(array('@//.*@S', '@/\*.*\*/@SsUe'), array('', 'preg_replace("/[^\r\n]+/S", "", \'$0\')'), $txt);
-
+ $txt = preg_replace('@//.*@S', '', $txt);
+ $txt = preg_replace_callback('@/\*.*\*/@SsU', function($matches) {
+ return preg_replace("/[^\r\n]+/S", "", $matches[0]);
+ }, $txt);
$split = preg_split('/PHP_(?:NAMED_)?(?:FUNCTION|METHOD)\s*\((\w+(?:,\s*\w+)?)\)/S', $txt, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE);
@@ -352,7 +360,7 @@ HELP;
for ($i = 1; $i < $argc; $i++) {
$dirs[] = $argv[$i];
}
-} else {
+} else {
$dirs[] = PHPDIR;
}
diff --git a/win32/build/mkdist.php b/win32/build/mkdist.php
index c37939896c..ca99b0dba9 100644
--- a/win32/build/mkdist.php
+++ b/win32/build/mkdist.php
@@ -498,7 +498,7 @@ if (!$use_pear_template) {
/* grab the bootstrap script */
echo "Downloading go-pear\n";
- copy("https://pear.php.net/~cweiske/1.10.0dev2/go-pear.phar", "$dist_dir/PEAR/go-pear.php");
+ copy("https://pear.php.net/go-pear.phar", "$dist_dir/PEAR/go-pear.php");
/* import the package list -- sets $packages variable */
include "pear/go-pear-list.php";