summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS72
-rw-r--r--[-rwxr-xr-x]README.namespaces0
-rw-r--r--[-rwxr-xr-x]UPGRADING2
-rw-r--r--Zend/tests/closure_bug66622.phpt37
-rw-r--r--Zend/zend_builtin_functions.c32
-rw-r--r--Zend/zend_closures.c4
-rw-r--r--Zend/zend_vm_def.h9
-rw-r--r--Zend/zend_vm_execute.h9
-rw-r--r--acinclude.m42
-rw-r--r--aclocal.m42
-rwxr-xr-xconfigure4
-rw-r--r--configure.in2
-rw-r--r--ext/date/php_date.c8
-rw-r--r--ext/date/tests/012.phpt6
-rw-r--r--ext/date/tests/013.phpt6
-rw-r--r--ext/date/tests/014.phpt2
-rw-r--r--ext/date/tests/DateTime_clone_basic2.phpt8
-rw-r--r--ext/date/tests/DateTime_clone_basic3.phpt10
-rw-r--r--ext/date/tests/DateTime_construct_basic1.phpt4
-rw-r--r--ext/date/tests/DateTime_construct_variation1.phpt40
-rw-r--r--ext/date/tests/DateTime_construct_variation2.phpt8
-rw-r--r--ext/date/tests/DateTime_modify_variation1.phpt4
-rw-r--r--ext/date/tests/DateTime_serialize.phpt8
-rw-r--r--ext/date/tests/DateTime_setDate_variation1.phpt32
-rw-r--r--ext/date/tests/DateTime_setDate_variation2.phpt30
-rw-r--r--ext/date/tests/DateTime_setDate_variation3.phpt30
-rw-r--r--ext/date/tests/DateTime_setISODate_variation1.phpt30
-rw-r--r--ext/date/tests/DateTime_setISODate_variation2.phpt30
-rw-r--r--ext/date/tests/DateTime_setISODate_variation3.phpt30
-rw-r--r--ext/date/tests/DateTime_setTime_variation1.phpt30
-rw-r--r--ext/date/tests/DateTime_setTime_variation2.phpt30
-rw-r--r--ext/date/tests/DateTime_setTime_variation3.phpt30
-rw-r--r--ext/date/tests/bug41523-64bit.phpt2
-rw-r--r--ext/date/tests/bug41523.phpt2
-rw-r--r--ext/date/tests/bug48097.phpt4
-rw-r--r--ext/date/tests/bug51866.phpt8
-rw-r--r--ext/date/tests/bug52113.phpt4
-rw-r--r--ext/date/tests/bug53437.phpt8
-rw-r--r--ext/date/tests/bug53879.phpt2
-rw-r--r--ext/date/tests/bug54316.phpt4
-rw-r--r--ext/date/tests/bug54340.phpt6
-rw-r--r--ext/date/tests/bug60236.phpt2
-rw-r--r--ext/date/tests/bug67118.phpt18
-rw-r--r--ext/date/tests/bug67118_2.phpt35
-rw-r--r--ext/date/tests/bug67308.phpt28
-rw-r--r--ext/date/tests/date-lenient-create.phpt10
-rw-r--r--ext/date/tests/date_create_basic.phpt10
-rw-r--r--ext/date/tests/date_create_variation1.phpt40
-rw-r--r--ext/date/tests/date_create_variation2.phpt8
-rw-r--r--ext/date/tests/date_date_set_variation2.phpt14
-rw-r--r--ext/date/tests/date_date_set_variation3.phpt30
-rw-r--r--ext/date/tests/date_date_set_variation4.phpt30
-rw-r--r--ext/date/tests/date_diff1.phpt4
-rw-r--r--ext/date/tests/date_isodate_set_variation2.phpt30
-rw-r--r--ext/date/tests/date_isodate_set_variation3.phpt30
-rw-r--r--ext/date/tests/date_isodate_set_variation4.phpt30
-rw-r--r--ext/date/tests/date_modify_variation2.phpt4
-rw-r--r--ext/date/tests/date_time_set_variation2.phpt30
-rw-r--r--ext/date/tests/date_time_set_variation3.phpt32
-rw-r--r--ext/date/tests/date_time_set_variation4.phpt30
-rw-r--r--ext/date/tests/test-parse-from-format.phpt22
-rw-r--r--ext/dom/tests/DOMDocument_validate_external_dtd.phpt1
-rw-r--r--ext/dom/tests/bug67081.phpt4
-rw-r--r--ext/exif/tests/exif004.phpt2
-rw-r--r--ext/fileinfo/libmagic/cdf.c23
-rw-r--r--ext/fileinfo/libmagic/softmagic.c14
-rw-r--r--ext/intl/locale/locale_methods.c17
-rw-r--r--ext/intl/tests/bug62082.phpt7
-rw-r--r--ext/intl/tests/bug67397.phpt21
-rw-r--r--ext/intl/tests/dateformat_format.phpt20
-rw-r--r--ext/intl/tests/locale_parse_locale2.phpt6
-rw-r--r--ext/libxml/tests/libxml_set_external_entity_loader_variation1.phpt1
-rwxr-xr-xext/openssl/openssl.c22
-rw-r--r--ext/openssl/tests/bug65698.crt28
-rw-r--r--ext/openssl/tests/bug65698.phpt19
-rw-r--r--ext/openssl/tests/cve-2013-6420.phpt2
-rw-r--r--ext/pdo_pgsql/tests/bug62479.phpt35
-rw-r--r--ext/reflection/tests/ReflectionFunction_isClosure_basic.phpt2
-rw-r--r--ext/reflection/tests/ReflectionFunction_isDeprecated_basic.phpt2
-rw-r--r--ext/reflection/tests/ReflectionFunction_isDisabled_basic.phpt2
-rw-r--r--ext/soap/soap.c23
-rw-r--r--ext/soap/tests/bug49898.phpt14
-rw-r--r--ext/spl/spl_array.c13
-rw-r--r--ext/spl/spl_directory.c2
-rw-r--r--ext/spl/spl_iterators.c2
-rw-r--r--ext/spl/spl_observer.c2
-rw-r--r--ext/spl/tests/SplObjectStorage_unserialize_bad.phpt5
-rw-r--r--ext/spl/tests/bug66127.phpt25
-rw-r--r--ext/spl/tests/bug67359.phpt28
-rw-r--r--ext/spl/tests/bug67360.phpt34
-rw-r--r--ext/spl/tests/iterator_035.phpt2
-rw-r--r--ext/standard/basic_functions.c111
-rw-r--r--ext/standard/dns.c4
-rw-r--r--ext/standard/info.c8
-rw-r--r--ext/standard/tests/general_functions/bug67498.phpt15
-rw-r--r--ext/standard/tests/general_functions/putenv.phpt9
-rw-r--r--ext/standard/tests/serialize/005.phpt8
-rw-r--r--ext/standard/tests/serialize/bug67072_2.phpt84
-rw-r--r--ext/standard/var_unserializer.c9
-rw-r--r--ext/standard/var_unserializer.re7
-rw-r--r--ext/zlib/tests/gzseek_basic2.phpt4
-rw-r--r--ext/zlib/tests/gzseek_variation1.phpt4
-rw-r--r--ext/zlib/tests/gzseek_variation4.phpt4
-rw-r--r--ext/zlib/tests/gzseek_variation5.phpt4
-rw-r--r--main/php_version.h7
-rwxr-xr-xrun-tests.php25
-rw-r--r--sapi/cli/php_cli_server.c6
107 files changed, 1142 insertions, 573 deletions
diff --git a/NEWS b/NEWS
index c510519af..f04fce169 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,64 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-29 May 2014, PHP 5.4.29
+26 Jun 2014, PHP 5.4.30
+
+- Core:
+ . Fixed BC break introduced by patch for bug #67072. (Anatol, Stas)
+ . Fixed bug #66622 (Closures do not correctly capture the late bound class
+ (static::) in some cases). (Levi Morrison)
+ . Fixed bug #67390 (insecure temporary file use in the configure script).
+ (CVE-2014-3981) (Remi)
+ . Fixed bug #67399 (putenv with empty variable may lead to crash). (Stas)
+ . Fixed bug #67498 (phpinfo() Type Confusion Information Leak Vulnerability).
+ (Stefan Esser)
+
+- CLI server:
+ . Fixed Bug #67406 (built-in web-server segfaults on startup). (Remi)
+
+- Date:
+ . Fixed bug #67308 (Serialize of DateTime truncates fractions of second).
+ (Adam)
+ . Fixed regression in fix for bug #67118 (constructor can't be called twice).
+ (Remi)
+
+- Fileinfo:
+ . Fixed bug #67326 (fileinfo: cdf_read_short_sector insufficient boundary
+ check). (CVE-2014-0207)
+ . Fixed bug #67410 (fileinfo: mconvert incorrect handling of truncated pascal
+ string size). (CVE-2014-3478) (Francisco Alonso, Jan Kaluza, Remi)
+ . Fixed bug #67411 (fileinfo: cdf_check_stream_offset insufficient boundary
+ check). (CVE-2014-3479) (Francisco Alonso, Jan Kaluza, Remi)
+ . Fixed bug #67412 (fileinfo: cdf_count_chain insufficient boundary check).
+ (CVE-2014-3480) (Francisco Alonso, Jan Kaluza, Remi)
+ . Fixed bug #67413 (fileinfo: cdf_read_property_info insufficient boundary
+ check). (CVE-2014-3487) (Francisco Alonso, Jan Kaluza, Remi)
+
+- Intl:
+ . Fixed bug #67349 (Locale::parseLocale Double Free). (Stas)
+ . Fixed bug #67397 (Buffer overflow in locale_get_display_name and
+ uloc_getDisplayName (libicu 4.8.1)). (Stas)
+
+- Network:
+ . Fixed bug #67432 (Fix potential segfault in dns_get_record()).
+ (CVE-2014-4049). (Sara)
+
+- OpenSSL:
+ . Fixed bug #65698 (certificates validity parsing does not work past 2050).
+ (Paul Oehler)
+ . Fixed bug #66636 (openssl_x509_parse warning with V_ASN1_GENERALIZEDTIME).
+ (Paul Oehler)
+
+- SOAP:
+ . Implemented FR #49898 (Add SoapClient::__getCookies()). (Boro Sitnikovski)
+
+- SPL:
+ . Fixed bug #66127 (Segmentation fault with ArrayObject unset). (Stas)
+ . Fixed bug #67359 (Segfault in recursiveDirectoryIterator). (Laruence)
+ . Fixed bug #67360 (Missing element after ArrayObject::getIterator). (Adam)
+ . Fixed bug #67492 (unserialize() SPL ArrayObject / SPLObjectStorage Type
+ Confusion) (CVE-2014-3515). (Stefan Esser)
+
+29 May 2014, PHP 5.4.29
- COM:
. Fixed bug #66431 (Special Character via COM Interface (CP_UTF8)). (Anatol)
@@ -25,12 +83,12 @@ PHP NEWS
. Fixed bug #67081 (DOMDocumentType->internalSubset returns entire DOCTYPE tag,
not only the subset). (Anatol)
- - Fileinfo:
- . Fixed bug #66307 (Fileinfo crashes with powerpoint files). (Anatol)
- . Fixed bug #67327 (fileinfo: CDF infinite loop in nelements DoS).
- (CVE-2014-0238)
- . Fixed bug #67328 (fileinfo: fileinfo: numerous file_printf calls resulting in
- performance degradation). (CVE-2014-0237)
+- Fileinfo:
+ . Fixed bug #66307 (Fileinfo crashes with powerpoint files). (Anatol)
+ . Fixed bug #67327 (fileinfo: CDF infinite loop in nelements DoS).
+ (CVE-2014-0238)
+ . Fixed bug #67328 (fileinfo: fileinfo: numerous file_printf calls resulting in
+ performance degradation). (CVE-2014-0237)
- FPM:
. Fixed bug #66908 (php-fpm reload leaks epoll_create() file descriptor).
diff --git a/README.namespaces b/README.namespaces
index 9c427b634..9c427b634 100755..100644
--- a/README.namespaces
+++ b/README.namespaces
diff --git a/UPGRADING b/UPGRADING
index 74f59e613..80b6fb1aa 100755..100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -373,6 +373,8 @@ PHP 5.4 UPGRADE NOTES
- Added iterator support in MySQLi. mysqli_result implements Traversable.
+- Since 5.4.30, SOAPClient has __getCookies() method.
+
==============================
6. Changes to existing methods
==============================
diff --git a/Zend/tests/closure_bug66622.phpt b/Zend/tests/closure_bug66622.phpt
new file mode 100644
index 000000000..1c9577d68
--- /dev/null
+++ b/Zend/tests/closure_bug66622.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Bug 66622: Closures do not correctly capture the late bound class (static::) in some cases
+
+--FILE--
+<?php
+class A {
+ static function name() { return 'A'; }
+ function foo() {
+ $fn = function() { return static::name(); };
+ echo static::name() . ' vs ' . $fn() . "\n";
+ }
+ function bar() {
+ $fn = static function() { return static::name(); };
+ echo static::name() . ' vs ' . $fn() . "\n";
+ }
+ static function baz() {
+ $fn = function() { return static::name(); };
+ echo static::name() . ' vs ' . $fn() . "\n";
+ }
+}
+class B extends A {
+ static function name() { return 'B'; }
+}
+
+function test() {
+ (new B)->foo();
+ (new B)->bar();
+ (new B)->baz();
+ B::baz();
+}
+test();
+
+--EXPECT--
+B vs B
+B vs B
+B vs B
+B vs B
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index f3dd12346..e4002fa22 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -245,16 +245,16 @@ static const zend_function_entry builtin_functions[] = { /* {{{ */
ZEND_FE(func_num_args, arginfo_zend__void)
ZEND_FE(func_get_arg, arginfo_func_get_arg)
ZEND_FE(func_get_args, arginfo_zend__void)
- ZEND_FE(strlen, arginfo_strlen)
- ZEND_FE(strcmp, arginfo_strcmp)
- ZEND_FE(strncmp, arginfo_strncmp)
- ZEND_FE(strcasecmp, arginfo_strcmp)
+ ZEND_FE(strlen, arginfo_strlen)
+ ZEND_FE(strcmp, arginfo_strcmp)
+ ZEND_FE(strncmp, arginfo_strncmp)
+ ZEND_FE(strcasecmp, arginfo_strcmp)
ZEND_FE(strncasecmp, arginfo_strncmp)
- ZEND_FE(each, arginfo_each)
+ ZEND_FE(each, arginfo_each)
ZEND_FE(error_reporting, arginfo_error_reporting)
- ZEND_FE(define, arginfo_define)
- ZEND_FE(defined, arginfo_defined)
- ZEND_FE(get_class, arginfo_get_class)
+ ZEND_FE(define, arginfo_define)
+ ZEND_FE(defined, arginfo_defined)
+ ZEND_FE(get_class, arginfo_get_class)
ZEND_FE(get_called_class, arginfo_zend__void)
ZEND_FE(get_parent_class, arginfo_get_class)
ZEND_FE(method_exists, arginfo_method_exists)
@@ -274,13 +274,13 @@ static const zend_function_entry builtin_functions[] = { /* {{{ */
ZEND_FE(get_included_files, arginfo_zend__void)
ZEND_FALIAS(get_required_files, get_included_files, arginfo_zend__void)
ZEND_FE(is_subclass_of, arginfo_is_subclass_of)
- ZEND_FE(is_a, arginfo_is_subclass_of)
+ ZEND_FE(is_a, arginfo_is_subclass_of)
ZEND_FE(get_class_vars, arginfo_get_class_vars)
ZEND_FE(get_object_vars, arginfo_get_object_vars)
ZEND_FE(get_class_methods, arginfo_get_class_methods)
ZEND_FE(trigger_error, arginfo_trigger_error)
ZEND_FALIAS(user_error, trigger_error, arginfo_trigger_error)
- ZEND_FE(set_error_handler, arginfo_set_error_handler)
+ ZEND_FE(set_error_handler, arginfo_set_error_handler)
ZEND_FE(restore_error_handler, arginfo_zend__void)
ZEND_FE(set_exception_handler, arginfo_set_exception_handler)
ZEND_FE(restore_exception_handler, arginfo_zend__void)
@@ -288,14 +288,14 @@ static const zend_function_entry builtin_functions[] = { /* {{{ */
ZEND_FE(get_declared_traits, arginfo_zend__void)
ZEND_FE(get_declared_interfaces, arginfo_zend__void)
ZEND_FE(get_defined_functions, arginfo_zend__void)
- ZEND_FE(get_defined_vars, arginfo_zend__void)
- ZEND_FE(create_function, arginfo_create_function)
- ZEND_FE(get_resource_type, arginfo_get_resource_type)
+ ZEND_FE(get_defined_vars, arginfo_zend__void)
+ ZEND_FE(create_function, arginfo_create_function)
+ ZEND_FE(get_resource_type, arginfo_get_resource_type)
ZEND_FE(get_loaded_extensions, arginfo_get_loaded_extensions)
- ZEND_FE(extension_loaded, arginfo_extension_loaded)
+ ZEND_FE(extension_loaded, arginfo_extension_loaded)
ZEND_FE(get_extension_funcs, arginfo_extension_loaded)
ZEND_FE(get_defined_constants, arginfo_get_defined_constants)
- ZEND_FE(debug_backtrace, arginfo_debug_backtrace)
+ ZEND_FE(debug_backtrace, arginfo_debug_backtrace)
ZEND_FE(debug_print_backtrace, arginfo_debug_print_backtrace)
#if ZEND_DEBUG
ZEND_FE(zend_test_func, NULL)
@@ -305,7 +305,7 @@ static const zend_function_entry builtin_functions[] = { /* {{{ */
#endif
ZEND_FE(gc_collect_cycles, arginfo_zend__void)
ZEND_FE(gc_enabled, arginfo_zend__void)
- ZEND_FE(gc_enable, arginfo_zend__void)
+ ZEND_FE(gc_enable, arginfo_zend__void)
ZEND_FE(gc_disable, arginfo_zend__void)
ZEND_FE_END
};
diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c
index c18972a7f..9ae82b418 100644
--- a/Zend/zend_closures.c
+++ b/Zend/zend_closures.c
@@ -487,6 +487,7 @@ ZEND_API void zend_create_closure(zval *res, zend_function *func, zend_class_ent
}
}
+ closure->this_ptr = NULL;
/* Invariants:
* If the closure is unscoped, it has no bound object.
* The the closure is scoped, it's either static or it's bound */
@@ -498,10 +499,7 @@ ZEND_API void zend_create_closure(zval *res, zend_function *func, zend_class_ent
Z_ADDREF_P(this_ptr);
} else {
closure->func.common.fn_flags |= ZEND_ACC_STATIC;
- closure->this_ptr = NULL;
}
- } else {
- closure->this_ptr = NULL;
}
}
/* }}} */
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index ab3346820..a7ad3aa6d 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -5161,6 +5161,7 @@ ZEND_VM_HANDLER(153, ZEND_DECLARE_LAMBDA_FUNCTION, CONST, UNUSED)
{
USE_OPLINE
zend_function *op_array;
+ int closure_is_static, closure_is_being_defined_inside_static_context;
SAVE_OPLINE();
@@ -5169,7 +5170,13 @@ ZEND_VM_HANDLER(153, ZEND_DECLARE_LAMBDA_FUNCTION, CONST, UNUSED)
zend_error_noreturn(E_ERROR, "Base lambda function for closure not found");
}
- zend_create_closure(&EX_T(opline->result.var).tmp_var, op_array, EG(scope), EG(This) TSRMLS_CC);
+ closure_is_static = op_array->common.fn_flags & ZEND_ACC_STATIC;
+ closure_is_being_defined_inside_static_context = EX(prev_execute_data) && EX(prev_execute_data)->function_state.function->common.fn_flags & ZEND_ACC_STATIC;
+ if (closure_is_static || closure_is_being_defined_inside_static_context) {
+ zend_create_closure(&EX_T(opline->result.var).tmp_var, (zend_function *) op_array, EG(called_scope), NULL TSRMLS_CC);
+ } else {
+ zend_create_closure(&EX_T(opline->result.var).tmp_var, (zend_function *) op_array, EG(scope), EG(This) TSRMLS_CC);
+ }
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index fa997b287..fba5f9cc6 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -5847,6 +5847,7 @@ static int ZEND_FASTCALL ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_CONST_UNUSED_HANDLER
{
USE_OPLINE
zend_function *op_array;
+ int closure_is_static, closure_is_being_defined_inside_static_context;
SAVE_OPLINE();
@@ -5855,7 +5856,13 @@ static int ZEND_FASTCALL ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_CONST_UNUSED_HANDLER
zend_error_noreturn(E_ERROR, "Base lambda function for closure not found");
}
- zend_create_closure(&EX_T(opline->result.var).tmp_var, op_array, EG(scope), EG(This) TSRMLS_CC);
+ closure_is_static = op_array->common.fn_flags & ZEND_ACC_STATIC;
+ closure_is_being_defined_inside_static_context = EX(prev_execute_data) && EX(prev_execute_data)->function_state.function->common.fn_flags & ZEND_ACC_STATIC;
+ if (closure_is_static || closure_is_being_defined_inside_static_context) {
+ zend_create_closure(&EX_T(opline->result.var).tmp_var, (zend_function *) op_array, EG(called_scope), NULL TSRMLS_CC);
+ } else {
+ zend_create_closure(&EX_T(opline->result.var).tmp_var, (zend_function *) op_array, EG(scope), EG(This) TSRMLS_CC);
+ }
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
diff --git a/acinclude.m4 b/acinclude.m4
index 448659f92..25f365511 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1711,7 +1711,7 @@ int main(int argc, char *argv[])
{
FILE *fp;
long position;
- char *filename = "/tmp/phpglibccheck";
+ char *filename = tmpnam(NULL);
fp = fopen(filename, "w");
if (fp == NULL) {
diff --git a/aclocal.m4 b/aclocal.m4
index 7404b8561..41ade7a54 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1711,7 +1711,7 @@ int main(int argc, char *argv[])
{
FILE *fp;
long position;
- char *filename = "/tmp/phpglibccheck";
+ char *filename = tmpnam(NULL);
fp = fopen(filename, "w");
if (fp == NULL) {
diff --git a/configure b/configure
index 01551d782..57dac6e45 100755
--- a/configure
+++ b/configure
@@ -3686,7 +3686,7 @@ ac_config_headers="$ac_config_headers main/php_config.h"
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=4
-PHP_RELEASE_VERSION=29
+PHP_RELEASE_VERSION=30
PHP_EXTRA_VERSION=""
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=`expr $PHP_MAJOR_VERSION \* 10000 + $PHP_MINOR_VERSION \* 100 + $PHP_RELEASE_VERSION`
@@ -17997,7 +17997,7 @@ int main(int argc, char *argv[])
{
FILE *fp;
long position;
- char *filename = "/tmp/phpglibccheck";
+ char *filename = tmpnam(NULL);
fp = fopen(filename, "w");
if (fp == NULL) {
diff --git a/configure.in b/configure.in
index ec23fc2f6..5c154fbb3 100644
--- a/configure.in
+++ b/configure.in
@@ -119,7 +119,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=4
-PHP_RELEASE_VERSION=29
+PHP_RELEASE_VERSION=30
PHP_EXTRA_VERSION=""
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index d4058ebee..595b0b040 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -2121,7 +2121,7 @@ static HashTable *date_object_get_properties(zval *object TSRMLS_DC)
/* first we add the date and time in ISO format */
MAKE_STD_ZVAL(zv);
- ZVAL_STRING(zv, date_format("Y-m-d H:i:s", 12, dateobj->time, 1), 0);
+ ZVAL_STRING(zv, date_format("Y-m-d H:i:s.u", 14, dateobj->time, 1), 0);
zend_hash_update(props, "date", 5, &zv, sizeof(zv), NULL);
/* then we add the timezone name (or similar) */
@@ -2441,6 +2441,8 @@ PHPAPI int php_date_initialize(php_date_obj *dateobj, /*const*/ char *time_str,
err->error_messages[0].position, err->error_messages[0].character, err->error_messages[0].message);
}
if (err && err->error_count) {
+ timelib_time_dtor(dateobj->time);
+ dateobj->time = 0;
return 0;
}
@@ -2548,9 +2550,7 @@ PHP_METHOD(DateTime, __construct)
zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC);
if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sO!", &time_str, &time_str_len, &timezone_object, date_ce_timezone)) {
- if (!php_date_initialize(zend_object_store_get_object(getThis() TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 1 TSRMLS_CC)) {
- ZVAL_NULL(getThis());
- }
+ php_date_initialize(zend_object_store_get_object(getThis() TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 1 TSRMLS_CC);
}
zend_restore_error_handling(&error_handling TSRMLS_CC);
}
diff --git a/ext/date/tests/012.phpt b/ext/date/tests/012.phpt
index 0577f1823..be7e4e32a 100644
--- a/ext/date/tests/012.phpt
+++ b/ext/date/tests/012.phpt
@@ -21,7 +21,7 @@ echo "Done\n";
--EXPECTF--
object(DateTime)#1 (3) {
["date"]=>
- string(19) "2006-01-23 00:00:00"
+ string(26) "2006-01-23 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -34,7 +34,7 @@ bool(false)
string(19) "2006/01/23 00:00:00"
object(DateTime)#1 (3) {
["date"]=>
- string(19) "2006-01-30 00:00:00"
+ string(26) "2006-01-30 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -43,7 +43,7 @@ object(DateTime)#1 (3) {
string(19) "2006/01/30 00:00:00"
object(DateTime)#1 (3) {
["date"]=>
- string(19) "2007-12-10 00:00:00"
+ string(26) "2007-12-10 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/013.phpt b/ext/date/tests/013.phpt
index 60fac24f6..266dafe06 100644
--- a/ext/date/tests/013.phpt
+++ b/ext/date/tests/013.phpt
@@ -21,7 +21,7 @@ echo "Done\n";
--EXPECTF--
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2006-12-12 00:00:00"
+ string(26) "2006-12-12 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -38,7 +38,7 @@ bool(false)
string(19) "2006.12.12 00:00:00"
object(DateTime)#1 (3) {
["date"]=>
- string(19) "2006-02-15 00:00:00"
+ string(26) "2006-02-15 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -47,7 +47,7 @@ object(DateTime)#1 (3) {
string(19) "2006.02.15 00:00:00"
object(DateTime)#1 (3) {
["date"]=>
- string(19) "2008-01-29 00:00:00"
+ string(26) "2008-01-29 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/014.phpt b/ext/date/tests/014.phpt
index be0847777..7244499ec 100644
--- a/ext/date/tests/014.phpt
+++ b/ext/date/tests/014.phpt
@@ -20,7 +20,7 @@ echo "Done\n";
--EXPECTF--
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2006-12-12 00:00:00"
+ string(26) "2006-12-12 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/DateTime_clone_basic2.phpt b/ext/date/tests/DateTime_clone_basic2.phpt
index db7ba2271..99659c10a 100644
--- a/ext/date/tests/DateTime_clone_basic2.phpt
+++ b/ext/date/tests/DateTime_clone_basic2.phpt
@@ -37,7 +37,7 @@ object(DateTimeExt1)#%d (5) {
["property2"]=>
string(5) "Hello"
["date"]=>
- string(19) "2009-02-03 12:34:41"
+ string(26) "2009-02-03 12:34:41.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
@@ -49,7 +49,7 @@ object(DateTimeExt1)#%d (5) {
["property2"]=>
string(5) "Hello"
["date"]=>
- string(19) "2009-02-03 12:34:41"
+ string(26) "2009-02-03 12:34:41.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
@@ -65,7 +65,7 @@ object(DateTimeExt2)#%d (7) {
["property2"]=>
string(5) "Hello"
["date"]=>
- string(19) "2009-02-03 12:34:41"
+ string(26) "2009-02-03 12:34:41.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
@@ -81,7 +81,7 @@ object(DateTimeExt2)#%d (7) {
["property2"]=>
string(5) "Hello"
["date"]=>
- string(19) "2009-02-03 12:34:41"
+ string(26) "2009-02-03 12:34:41.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
diff --git a/ext/date/tests/DateTime_clone_basic3.phpt b/ext/date/tests/DateTime_clone_basic3.phpt
index 43e289817..f3d9c142f 100644
--- a/ext/date/tests/DateTime_clone_basic3.phpt
+++ b/ext/date/tests/DateTime_clone_basic3.phpt
@@ -32,7 +32,7 @@ var_dump($d2_clone);
-- Create a DateTime object --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-02-03 12:34:41"
+ string(26) "2009-02-03 12:34:41.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
@@ -42,7 +42,7 @@ object(DateTime)#%d (3) {
-- Add some properties --
object(DateTime)#%d (5) {
["date"]=>
- string(19) "2009-02-03 12:34:41"
+ string(26) "2009-02-03 12:34:41.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
@@ -56,7 +56,7 @@ object(DateTime)#%d (5) {
-- clone it --
object(DateTime)#%d (5) {
["date"]=>
- string(19) "2009-02-03 12:34:41"
+ string(26) "2009-02-03 12:34:41.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
@@ -70,7 +70,7 @@ object(DateTime)#%d (5) {
-- Add some more properties --
object(DateTime)#%d (7) {
["date"]=>
- string(19) "2009-02-03 12:34:41"
+ string(26) "2009-02-03 12:34:41.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
@@ -88,7 +88,7 @@ object(DateTime)#%d (7) {
-- clone it --
object(DateTime)#%d (7) {
["date"]=>
- string(19) "2009-02-03 12:34:41"
+ string(26) "2009-02-03 12:34:41.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
diff --git a/ext/date/tests/DateTime_construct_basic1.phpt b/ext/date/tests/DateTime_construct_basic1.phpt
index a865e6bb9..d6a8956bf 100644
--- a/ext/date/tests/DateTime_construct_basic1.phpt
+++ b/ext/date/tests/DateTime_construct_basic1.phpt
@@ -41,7 +41,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2005-07-14 22:30:41"
+ string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -49,7 +49,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2005-07-14 22:30:41"
+ string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
diff --git a/ext/date/tests/DateTime_construct_variation1.phpt b/ext/date/tests/DateTime_construct_variation1.phpt
index d335b5ab1..f106a4093 100644
--- a/ext/date/tests/DateTime_construct_variation1.phpt
+++ b/ext/date/tests/DateTime_construct_variation1.phpt
@@ -142,7 +142,7 @@ FAILED: DateTime::__construct(): Failed to parse time string (-12345) at positio
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -150,7 +150,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -164,7 +164,7 @@ FAILED: DateTime::__construct(): Failed to parse time string (-10.5) at position
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -172,7 +172,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -198,7 +198,7 @@ FAILED: DateTime::__construct() expects parameter 1 to be string, array given
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -206,7 +206,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -216,7 +216,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -224,7 +224,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -238,7 +238,7 @@ FAILED: DateTime::__construct(): Failed to parse time string (1) at position 0 (
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -246,7 +246,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -260,7 +260,7 @@ FAILED: DateTime::__construct(): Failed to parse time string (1) at position 0 (
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -268,7 +268,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -278,7 +278,7 @@ object(DateTime)#%d (3) {
-- empty string DQ --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -286,7 +286,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -296,7 +296,7 @@ object(DateTime)#%d (3) {
-- empty string SQ --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -304,7 +304,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -338,7 +338,7 @@ FAILED: DateTime::__construct() expects parameter 1 to be string, object given
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -346,7 +346,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -356,7 +356,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -364,7 +364,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/DateTime_construct_variation2.phpt b/ext/date/tests/DateTime_construct_variation2.phpt
index b1d80f900..dfc1047bc 100644
--- a/ext/date/tests/DateTime_construct_variation2.phpt
+++ b/ext/date/tests/DateTime_construct_variation2.phpt
@@ -153,7 +153,7 @@ FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, array gi
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2005-07-14 22:30:41"
+ string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -163,7 +163,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2005-07-14 22:30:41"
+ string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -209,7 +209,7 @@ FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, object g
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2005-07-14 22:30:41"
+ string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -219,7 +219,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2005-07-14 22:30:41"
+ string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/DateTime_modify_variation1.phpt b/ext/date/tests/DateTime_modify_variation1.phpt
index faeb70cbd..ddb36751c 100644
--- a/ext/date/tests/DateTime_modify_variation1.phpt
+++ b/ext/date/tests/DateTime_modify_variation1.phpt
@@ -133,7 +133,7 @@ bool(false)
-- float 10.5 --
object(DateTime)#3 (3) {
["date"]=>
- string(19) "2009-01-31 10:05:00"
+ string(26) "2009-01-31 10:05:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -148,7 +148,7 @@ bool(false)
-- float .5 --
object(DateTime)#3 (3) {
["date"]=>
- string(19) "2009-01-31 00:05:00"
+ string(26) "2009-01-31 00:05:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/DateTime_serialize.phpt b/ext/date/tests/DateTime_serialize.phpt
index ff827360f..b8af87eee 100644
--- a/ext/date/tests/DateTime_serialize.phpt
+++ b/ext/date/tests/DateTime_serialize.phpt
@@ -20,20 +20,20 @@ var_dump( $date2->format( "F j, Y, g:i a") );
--EXPECTF--
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2005-07-14 22:30:41"
+ string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
-string(118) "O:8:"DateTime":3:{s:4:"date";s:19:"2005-07-14 22:30:41";s:13:"timezone_type";i:3;s:8:"timezone";s:13:"Europe/London";}"
+string(125) "O:8:"DateTime":3:{s:4:"date";s:26:"2005-07-14 22:30:41.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:13:"Europe/London";}"
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2005-07-14 22:30:41"
+ string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
string(23) "July 14, 2005, 10:30 pm"
-===DONE=== \ No newline at end of file
+===DONE===
diff --git a/ext/date/tests/DateTime_setDate_variation1.phpt b/ext/date/tests/DateTime_setDate_variation1.phpt
index 5017cc1d7..f5ca4cb72 100644
--- a/ext/date/tests/DateTime_setDate_variation1.phpt
+++ b/ext/date/tests/DateTime_setDate_variation1.phpt
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0000-07-02 08:34:10"
+ string(26) "0000-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0001-07-02 08:34:10"
+ string(26) "0001-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(20) "12345-07-02 08:34:10"
+ string(27) "12345-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(21) "-12345-07-02 08:34:10"
+ string(28) "-12345-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0010-07-02 08:34:10"
+ string(26) "0010-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(20) "-0010-07-02 08:34:10"
+ string(27) "-0010-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0000-07-02 08:34:10"
+ string(26) "0000-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0000-07-02 08:34:10"
+ string(26) "0000-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0000-07-02 08:34:10"
+ string(26) "0000-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0001-07-02 08:34:10"
+ string(26) "0001-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0000-07-02 08:34:10"
+ string(26) "0000-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0001-07-02 08:34:10"
+ string(26) "0001-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0000-07-02 08:34:10"
+ string(26) "0000-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0000-07-02 08:34:10"
+ string(26) "0000-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0000-07-02 08:34:10"
+ string(26) "0000-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -326,4 +326,4 @@ object(DateTime)#%d (3) {
Warning: DateTime::setDate() expects parameter 1 to be long, resource given in %s on line %d
bool(false)
-===DONE=== \ No newline at end of file
+===DONE===
diff --git a/ext/date/tests/DateTime_setDate_variation2.phpt b/ext/date/tests/DateTime_setDate_variation2.phpt
index a853f5ee2..ab715c39a 100644
--- a/ext/date/tests/DateTime_setDate_variation2.phpt
+++ b/ext/date/tests/DateTime_setDate_variation2.phpt
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-02 08:34:10"
+ string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-01-02 08:34:10"
+ string(26) "1963-01-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2991-09-02 08:34:10"
+ string(26) "2991-09-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0934-03-02 08:34:10"
+ string(26) "0934-03-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-10-02 08:34:10"
+ string(26) "1963-10-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-02-02 08:34:10"
+ string(26) "1962-02-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-02 08:34:10"
+ string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-02 08:34:10"
+ string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-02 08:34:10"
+ string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-01-02 08:34:10"
+ string(26) "1963-01-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-02 08:34:10"
+ string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-01-02 08:34:10"
+ string(26) "1963-01-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-02 08:34:10"
+ string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-02 08:34:10"
+ string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-02 08:34:10"
+ string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/DateTime_setDate_variation3.phpt b/ext/date/tests/DateTime_setDate_variation3.phpt
index da98e593f..8f2e894b1 100644
--- a/ext/date/tests/DateTime_setDate_variation3.phpt
+++ b/ext/date/tests/DateTime_setDate_variation3.phpt
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-06-30 08:34:10"
+ string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-07-01 08:34:10"
+ string(26) "1963-07-01 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1997-04-17 08:34:10"
+ string(26) "1997-04-17 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1929-09-11 08:34:10"
+ string(26) "1929-09-11 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-07-10 08:34:10"
+ string(26) "1963-07-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-06-20 08:34:10"
+ string(26) "1963-06-20 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-06-30 08:34:10"
+ string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-06-30 08:34:10"
+ string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-06-30 08:34:10"
+ string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-07-01 08:34:10"
+ string(26) "1963-07-01 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-06-30 08:34:10"
+ string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-07-01 08:34:10"
+ string(26) "1963-07-01 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-06-30 08:34:10"
+ string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-06-30 08:34:10"
+ string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-06-30 08:34:10"
+ string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/DateTime_setISODate_variation1.phpt b/ext/date/tests/DateTime_setISODate_variation1.phpt
index ded968fa8..d685f27ed 100644
--- a/ext/date/tests/DateTime_setISODate_variation1.phpt
+++ b/ext/date/tests/DateTime_setISODate_variation1.phpt
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0000-02-15 08:34:10"
+ string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0001-02-13 08:34:10"
+ string(26) "0001-02-13 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(20) "12345-02-13 08:34:10"
+ string(27) "12345-02-13 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(21) "-12345-02-15 08:34:10"
+ string(28) "-12345-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0010-02-16 08:34:10"
+ string(26) "0010-02-16 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(20) "-0010-02-19 08:34:10"
+ string(27) "-0010-02-19 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0000-02-15 08:34:10"
+ string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0000-02-15 08:34:10"
+ string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0000-02-15 08:34:10"
+ string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0001-02-13 08:34:10"
+ string(26) "0001-02-13 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0000-02-15 08:34:10"
+ string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0001-02-13 08:34:10"
+ string(26) "0001-02-13 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0000-02-15 08:34:10"
+ string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0000-02-15 08:34:10"
+ string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0000-02-15 08:34:10"
+ string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/DateTime_setISODate_variation2.phpt b/ext/date/tests/DateTime_setISODate_variation2.phpt
index ce322d253..496e1c91f 100644
--- a/ext/date/tests/DateTime_setISODate_variation2.phpt
+++ b/ext/date/tests/DateTime_setISODate_variation2.phpt
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-25 08:34:10"
+ string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-01-01 08:34:10"
+ string(26) "1963-01-01 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2199-07-30 08:34:10"
+ string(26) "2199-07-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1726-05-21 08:34:10"
+ string(26) "1726-05-21 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-03-05 08:34:10"
+ string(26) "1963-03-05 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-10-16 08:34:10"
+ string(26) "1962-10-16 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-25 08:34:10"
+ string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-25 08:34:10"
+ string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-25 08:34:10"
+ string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-01-01 08:34:10"
+ string(26) "1963-01-01 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-25 08:34:10"
+ string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-01-01 08:34:10"
+ string(26) "1963-01-01 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-25 08:34:10"
+ string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-25 08:34:10"
+ string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-25 08:34:10"
+ string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/DateTime_setISODate_variation3.phpt b/ext/date/tests/DateTime_setISODate_variation3.phpt
index d2d5644fb..5b69b2faa 100644
--- a/ext/date/tests/DateTime_setISODate_variation3.phpt
+++ b/ext/date/tests/DateTime_setISODate_variation3.phpt
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-02-10 08:34:10"
+ string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-02-11 08:34:10"
+ string(26) "1963-02-11 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1996-11-28 08:34:10"
+ string(26) "1996-11-28 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1929-04-24 08:34:10"
+ string(26) "1929-04-24 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-02-20 08:34:10"
+ string(26) "1963-02-20 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-01-31 08:34:10"
+ string(26) "1963-01-31 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-02-10 08:34:10"
+ string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-02-10 08:34:10"
+ string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-02-10 08:34:10"
+ string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-02-11 08:34:10"
+ string(26) "1963-02-11 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-02-10 08:34:10"
+ string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-02-11 08:34:10"
+ string(26) "1963-02-11 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-02-10 08:34:10"
+ string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-02-10 08:34:10"
+ string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-02-10 08:34:10"
+ string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/DateTime_setTime_variation1.phpt b/ext/date/tests/DateTime_setTime_variation1.phpt
index 7edbd4ea4..180508191 100644
--- a/ext/date/tests/DateTime_setTime_variation1.phpt
+++ b/ext/date/tests/DateTime_setTime_variation1.phpt
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 00:13:45"
+ string(26) "2009-01-31 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 01:13:45"
+ string(26) "2009-01-31 01:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2010-06-29 09:13:45"
+ string(26) "2010-06-29 09:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-30 15:13:45"
+ string(26) "2009-01-30 15:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-30 10:13:45"
+ string(26) "2009-01-30 10:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-29 14:13:45"
+ string(26) "2009-01-29 14:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-29 00:13:45"
+ string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-29 00:13:45"
+ string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-29 00:13:45"
+ string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-29 01:13:45"
+ string(26) "2009-01-29 01:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-29 00:13:45"
+ string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-29 01:13:45"
+ string(26) "2009-01-29 01:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-29 00:13:45"
+ string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-29 00:13:45"
+ string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-29 00:13:45"
+ string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/DateTime_setTime_variation2.phpt b/ext/date/tests/DateTime_setTime_variation2.phpt
index 300eb9c00..fc034bf21 100644
--- a/ext/date/tests/DateTime_setTime_variation2.phpt
+++ b/ext/date/tests/DateTime_setTime_variation2.phpt
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:00:45"
+ string(26) "2009-01-31 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:01:45"
+ string(26) "2009-01-31 10:01:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-02-08 23:45:45"
+ string(26) "2009-02-08 23:45:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-30 20:15:45"
+ string(26) "2009-01-30 20:15:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-30 10:10:45"
+ string(26) "2009-01-30 10:10:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-30 09:50:45"
+ string(26) "2009-01-30 09:50:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-30 10:00:45"
+ string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-30 10:00:45"
+ string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-30 10:00:45"
+ string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-30 10:01:45"
+ string(26) "2009-01-30 10:01:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-30 10:00:45"
+ string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-30 10:01:45"
+ string(26) "2009-01-30 10:01:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-30 10:00:45"
+ string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-30 10:00:45"
+ string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-30 10:00:45"
+ string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/DateTime_setTime_variation3.phpt b/ext/date/tests/DateTime_setTime_variation3.phpt
index 05bf4b5e5..21c62e001 100644
--- a/ext/date/tests/DateTime_setTime_variation3.phpt
+++ b/ext/date/tests/DateTime_setTime_variation3.phpt
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:13:00"
+ string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:13:01"
+ string(26) "2009-01-31 10:13:01.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 13:38:45"
+ string(26) "2009-01-31 13:38:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 06:47:15"
+ string(26) "2009-01-31 06:47:15.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:13:10"
+ string(26) "2009-01-31 10:13:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:12:50"
+ string(26) "2009-01-31 10:12:50.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:13:00"
+ string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:13:00"
+ string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:13:00"
+ string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:13:01"
+ string(26) "2009-01-31 10:13:01.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:13:00"
+ string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:13:01"
+ string(26) "2009-01-31 10:13:01.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:13:00"
+ string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:13:00"
+ string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:13:00"
+ string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/bug41523-64bit.phpt b/ext/date/tests/bug41523-64bit.phpt
index d6d132003..0c0e8076c 100644
--- a/ext/date/tests/bug41523-64bit.phpt
+++ b/ext/date/tests/bug41523-64bit.phpt
@@ -46,7 +46,7 @@ array(12) {
int(-62169984000)
object(DateTime)#1 (3) {
["date"]=>
- string(20) "-0001-11-30 00:00:00"
+ string(27) "-0001-11-30 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/bug41523.phpt b/ext/date/tests/bug41523.phpt
index 948dae7db..05c591f06 100644
--- a/ext/date/tests/bug41523.phpt
+++ b/ext/date/tests/bug41523.phpt
@@ -46,7 +46,7 @@ array(12) {
bool(false)
object(DateTime)#1 (3) {
["date"]=>
- string(20) "-0001-11-30 00:00:00"
+ string(20) "-0001-11-30 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/bug48097.phpt b/ext/date/tests/bug48097.phpt
index d71a97e5a..41ade8124 100644
--- a/ext/date/tests/bug48097.phpt
+++ b/ext/date/tests/bug48097.phpt
@@ -16,7 +16,7 @@ echo $d->format( 'U' ), "\n\n";
--EXPECT--
object(DateTime)#1 (3) {
["date"]=>
- string(19) "1955-05-23 00:00:00"
+ string(26) "1955-05-23 00:00:00.000000"
["timezone_type"]=>
int(1)
["timezone"]=>
@@ -27,7 +27,7 @@ object(DateTime)#1 (3) {
object(DateTime)#1 (3) {
["date"]=>
- string(19) "1955-05-22 23:00:00"
+ string(26) "1955-05-22 23:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/bug51866.phpt b/ext/date/tests/bug51866.phpt
index 8d765b02f..9474f4f58 100644
--- a/ext/date/tests/bug51866.phpt
+++ b/ext/date/tests/bug51866.phpt
@@ -46,7 +46,7 @@ string(6) "Y-m-d+"
string(19) "2001-11-29 13:20:01"
object(DateTime)#2 (3) {
["date"]=>
- string(19) "2001-11-29 %d:%d:%d"
+ string(26) "2001-11-29 %d:%d:%d.%d"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -72,7 +72,7 @@ string(7) "Y-m-d +"
string(19) "2001-11-29 13:20:01"
object(DateTime)#3 (3) {
["date"]=>
- string(19) "2001-11-29 %d:%d:%d"
+ string(26) "2001-11-29 %d:%d:%d.%d"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -98,7 +98,7 @@ string(6) "Y-m-d+"
string(10) "2001-11-29"
object(DateTime)#2 (3) {
["date"]=>
- string(19) "2001-11-29 %d:%d:%d"
+ string(26) "2001-11-29 %d:%d:%d.%d"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -141,7 +141,7 @@ string(7) "Y-m-d +"
string(11) "2001-11-29 "
object(DateTime)#2 (3) {
["date"]=>
- string(19) "2001-11-29 %d:%d:%d"
+ string(26) "2001-11-29 %d:%d:%d.%d"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/bug52113.phpt b/ext/date/tests/bug52113.phpt
index f4730c6a4..62c2fca94 100644
--- a/ext/date/tests/bug52113.phpt
+++ b/ext/date/tests/bug52113.phpt
@@ -117,7 +117,7 @@ object(DatePeriod)#6 (6) {
["start"]=>
object(DateTime)#4 (3) {
["date"]=>
- string(19) "2003-01-02 08:00:00"
+ string(26) "2003-01-02 08:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -201,7 +201,7 @@ object(DatePeriod)#9 (6) {
["start"]=>
object(DateTime)#6 (3) {
["date"]=>
- string(19) "2003-01-02 08:00:00"
+ string(26) "2003-01-02 08:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/bug53437.phpt b/ext/date/tests/bug53437.phpt
index 2ea091453..f82a4879b 100644
--- a/ext/date/tests/bug53437.phpt
+++ b/ext/date/tests/bug53437.phpt
@@ -33,7 +33,7 @@ object(DatePeriod)#1 (6) {
["start"]=>
object(DateTime)#2 (3) {
["date"]=>
- string(19) "2010-01-01 00:00:00"
+ string(26) "2010-01-01 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -42,7 +42,7 @@ object(DatePeriod)#1 (6) {
["current"]=>
object(DateTime)#4 (3) {
["date"]=>
- string(19) "2010-01-04 00:00:00"
+ string(26) "2010-01-04 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -92,7 +92,7 @@ object(DatePeriod)#5 (6) {
["start"]=>
object(DateTime)#10 (3) {
["date"]=>
- string(19) "2010-01-01 00:00:00"
+ string(26) "2010-01-01 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -101,7 +101,7 @@ object(DatePeriod)#5 (6) {
["current"]=>
object(DateTime)#7 (3) {
["date"]=>
- string(19) "2010-01-04 00:00:00"
+ string(26) "2010-01-04 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/bug53879.phpt b/ext/date/tests/bug53879.phpt
index 3d16c9720..3fd825041 100644
--- a/ext/date/tests/bug53879.phpt
+++ b/ext/date/tests/bug53879.phpt
@@ -10,7 +10,7 @@ print_r($date);
--EXPECTF--
DateTime Object
(
- [date] => 2041-01-21 15:24:52
+ [date] => 2041-01-21 15:24:52.000000
[timezone_type] => 2
[timezone] => GMT
)
diff --git a/ext/date/tests/bug54316.phpt b/ext/date/tests/bug54316.phpt
index a02288cdb..21afa637d 100644
--- a/ext/date/tests/bug54316.phpt
+++ b/ext/date/tests/bug54316.phpt
@@ -12,7 +12,7 @@ var_dump($dt);
--EXPECT--
object(DateTime)#1 (3) {
["date"]=>
- string(19) "2011-02-02 00:00:00"
+ string(26) "2011-02-02 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -20,7 +20,7 @@ object(DateTime)#1 (3) {
}
object(DateTime)#2 (3) {
["date"]=>
- string(19) "1970-01-01 00:00:00"
+ string(26) "1970-01-01 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/bug54340.phpt b/ext/date/tests/bug54340.phpt
index 7f00309c9..eb977c35e 100644
--- a/ext/date/tests/bug54340.phpt
+++ b/ext/date/tests/bug54340.phpt
@@ -19,7 +19,7 @@ var_dump($dt);
--EXPECT--
object(DateTime)#2 (3) {
["date"]=>
- string(19) "2011-01-01 00:00:00"
+ string(26) "2011-01-01 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -27,7 +27,7 @@ object(DateTime)#2 (3) {
}
object(DateTime)#2 (3) {
["date"]=>
- string(19) "2011-01-02 00:00:00"
+ string(26) "2011-01-02 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -35,7 +35,7 @@ object(DateTime)#2 (3) {
}
object(DateTime)#3 (3) {
["date"]=>
- string(19) "2010-12-31 00:00:00"
+ string(26) "2010-12-31 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/bug60236.phpt b/ext/date/tests/bug60236.phpt
index faa0e160c..a71bb5a17 100644
--- a/ext/date/tests/bug60236.phpt
+++ b/ext/date/tests/bug60236.phpt
@@ -14,7 +14,7 @@ var_dump($t);
string(10) "1278455908"
object(DateTime)#1 (3) {
["date"]=>
- string(19) "2010-07-06 18:38:28"
+ string(26) "2010-07-06 18:38:28.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
diff --git a/ext/date/tests/bug67118.phpt b/ext/date/tests/bug67118.phpt
index 637175764..973b4eb8d 100644
--- a/ext/date/tests/bug67118.phpt
+++ b/ext/date/tests/bug67118.phpt
@@ -1,5 +1,5 @@
--TEST--
-Bug #67118 php-cgi crashes regularly on IIS 7
+Bug #67118 crashes in DateTime when this used after failed __construct
--INI--
date.timezone=Europe/Berlin
--FILE--
@@ -11,17 +11,17 @@ class mydt extends datetime
if (!empty($tz) && !is_object($tz)) {
$tz = new DateTimeZone($tz);
}
-
- @parent::__construct($time, $tz);
+ try {
+ @parent::__construct($time, $tz);
+ } catch (Exception $e) {
+ echo "Bad date" . $this->format("Y") . "\n";
+ }
}
};
new mydt("Funktionsansvarig rådgivning och juridik", "UTC");
+?>
--EXPECTF--
-Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (Funktionsansvarig rådgivning och juridik) at position 0 (F): The timezone could not be found in the database' in %sbug67118.php:%d
-Stack trace:
-#0 %sbug67118.php(%d): DateTime->__construct('Funktionsansvar...', Object(DateTimeZone))
-#1 %sbug67118.php(%d): mydt->__construct('Funktionsansvar...', 'UTC')
-#2 {main}
- thrown in %sbug67118.php on line %d
+Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in %sbug67118.php on line %d
+Bad date
diff --git a/ext/date/tests/bug67118_2.phpt b/ext/date/tests/bug67118_2.phpt
new file mode 100644
index 000000000..b4904a158
--- /dev/null
+++ b/ext/date/tests/bug67118_2.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Regression introduce in fix for Bug #67118
+--INI--
+date.timezone=Europe/Paris
+--FILE--
+<?php
+class Foo extends DateTime {
+ public function __construct($time = null) {
+ $tz = new DateTimeZone('UTC');
+ try {
+ echo "First try\n";
+ parent::__construct($time, $tz);
+ return;
+ } catch (Exception $e) {
+ echo "Second try\n";
+ parent::__construct($time.'C', $tz);
+ }
+ }
+}
+$date = '12 Sep 2007 15:49:12 UT';
+var_dump(new Foo($date));
+?>
+Done
+--EXPECTF--
+First try
+Second try
+object(Foo)#1 (3) {
+ ["date"]=>
+ string(%d) "2007-09-12 15:49:%s"
+ ["timezone_type"]=>
+ int(3)
+ ["timezone"]=>
+ string(3) "UTC"
+}
+Done
diff --git a/ext/date/tests/bug67308.phpt b/ext/date/tests/bug67308.phpt
new file mode 100644
index 000000000..39fb78188
--- /dev/null
+++ b/ext/date/tests/bug67308.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Bug #67308 (Serialize of DateTime truncates fractions of second)
+--INI--
+date.timezone=America/Vancouver
+--FILE--
+<?php
+// Ensure we can still unserialize the old style.
+var_dump(unserialize('O:8:"DateTime":3:{s:4:"date";s:19:"2005-07-14 22:30:41";s:13:"timezone_type";i:3;s:8:"timezone";s:13:"Europe/London";}'));
+
+// New style.
+var_dump(unserialize('O:8:"DateTime":3:{s:4:"date";s:26:"2005-07-14 22:30:41.123456";s:13:"timezone_type";i:3;s:8:"timezone";s:13:"Europe/London";}'));
+--EXPECTF--
+object(DateTime)#%d (3) {
+ ["date"]=>
+ string(26) "2005-07-14 22:30:41.000000"
+ ["timezone_type"]=>
+ int(3)
+ ["timezone"]=>
+ string(13) "Europe/London"
+}
+object(DateTime)#%d (3) {
+ ["date"]=>
+ string(26) "2005-07-14 22:30:41.123456"
+ ["timezone_type"]=>
+ int(3)
+ ["timezone"]=>
+ string(13) "Europe/London"
+}
diff --git a/ext/date/tests/date-lenient-create.phpt b/ext/date/tests/date-lenient-create.phpt
index 49ee3c137..2d59ceba7 100644
--- a/ext/date/tests/date-lenient-create.phpt
+++ b/ext/date/tests/date-lenient-create.phpt
@@ -46,7 +46,7 @@ Array
==
DateTime Object
(
- [date] => 2004-06-08 00:00:00
+ [date] => 2004-06-08 00:00:00.000000
[timezone_type] => 3
[timezone] => UTC
)
@@ -67,7 +67,7 @@ Array
==
DateTime Object
(
- [date] => 2004-06-08 00:00:00
+ [date] => 2004-06-08 00:00:00.000000
[timezone_type] => 3
[timezone] => UTC
)
@@ -88,7 +88,7 @@ Array
==
DateTime Object
(
- [date] => 2004-06-08 00:00:00
+ [date] => 2004-06-08 00:00:00.000000
[timezone_type] => 3
[timezone] => UTC
)
@@ -109,7 +109,7 @@ Array
==
DateTime Object
(
- [date] => 2004-06-08 00:00:00
+ [date] => 2004-06-08 00:00:00.000000
[timezone_type] => 3
[timezone] => UTC
)
@@ -129,7 +129,7 @@ Array
==
DateTime Object
(
- [date] => 2004-06-08 00:00:00
+ [date] => 2004-06-08 00:00:00.000000
[timezone_type] => 3
[timezone] => UTC
)
diff --git a/ext/date/tests/date_create_basic.phpt b/ext/date/tests/date_create_basic.phpt
index edec80bda..4e13afebb 100644
--- a/ext/date/tests/date_create_basic.phpt
+++ b/ext/date/tests/date_create_basic.phpt
@@ -25,7 +25,7 @@ var_dump( date_create("2005-07-14 22:30:41 GMT") );
*** Testing date_create() : basic functionality ***
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -33,7 +33,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(2)
["timezone"]=>
@@ -41,7 +41,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2005-07-14 22:30:41"
+ string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -49,10 +49,10 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2005-07-14 22:30:41"
+ string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
string(3) "GMT"
}
-===DONE=== \ No newline at end of file
+===DONE===
diff --git a/ext/date/tests/date_create_variation1.phpt b/ext/date/tests/date_create_variation1.phpt
index f5fb2fd91..a476473a1 100644
--- a/ext/date/tests/date_create_variation1.phpt
+++ b/ext/date/tests/date_create_variation1.phpt
@@ -130,7 +130,7 @@ bool(false)
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -138,7 +138,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -152,7 +152,7 @@ bool(false)
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -160,7 +160,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -202,7 +202,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -210,7 +210,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -220,7 +220,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -228,7 +228,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -242,7 +242,7 @@ bool(false)
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -250,7 +250,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -264,7 +264,7 @@ bool(false)
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -272,7 +272,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -282,7 +282,7 @@ object(DateTime)#%d (3) {
-- empty string DQ --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -290,7 +290,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -300,7 +300,7 @@ object(DateTime)#%d (3) {
-- empty string SQ --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -308,7 +308,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -346,7 +346,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -354,7 +354,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -364,7 +364,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -372,7 +372,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
- string(19) "%s"
+ string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/date_create_variation2.phpt b/ext/date/tests/date_create_variation2.phpt
index c43ccb069..ad5d0e870 100644
--- a/ext/date/tests/date_create_variation2.phpt
+++ b/ext/date/tests/date_create_variation2.phpt
@@ -168,7 +168,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2005-07-14 22:30:41"
+ string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -178,7 +178,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2005-07-14 22:30:41"
+ string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -248,7 +248,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2005-07-14 22:30:41"
+ string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -258,7 +258,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2005-07-14 22:30:41"
+ string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/date_date_set_variation2.phpt b/ext/date/tests/date_date_set_variation2.phpt
index 384885c6f..85bfc5e82 100644
--- a/ext/date/tests/date_date_set_variation2.phpt
+++ b/ext/date/tests/date_date_set_variation2.phpt
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0001-07-02 08:34:10"
+ string(26) "0001-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(20) "12345-07-02 08:34:10"
+ string(27) "12345-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(21) "-12345-07-02 08:34:10"
+ string(28) "-12345-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0010-07-02 08:34:10"
+ string(26) "0010-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(20) "-0010-07-02 08:34:10"
+ string(27) "-0010-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0001-07-02 08:34:10"
+ string(26) "0001-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0001-07-02 08:34:10"
+ string(26) "0001-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/date_date_set_variation3.phpt b/ext/date/tests/date_date_set_variation3.phpt
index 80703414b..2cca53d65 100644
--- a/ext/date/tests/date_date_set_variation3.phpt
+++ b/ext/date/tests/date_date_set_variation3.phpt
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-02 08:34:10"
+ string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-01-02 08:34:10"
+ string(26) "1963-01-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2991-09-02 08:34:10"
+ string(26) "2991-09-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0934-03-02 08:34:10"
+ string(26) "0934-03-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-10-02 08:34:10"
+ string(26) "1963-10-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-02-02 08:34:10"
+ string(26) "1962-02-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-02 08:34:10"
+ string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-02 08:34:10"
+ string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-02 08:34:10"
+ string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-01-02 08:34:10"
+ string(26) "1963-01-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-02 08:34:10"
+ string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-01-02 08:34:10"
+ string(26) "1963-01-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-02 08:34:10"
+ string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-02 08:34:10"
+ string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-02 08:34:10"
+ string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/date_date_set_variation4.phpt b/ext/date/tests/date_date_set_variation4.phpt
index 4c7df3d33..f87988e51 100644
--- a/ext/date/tests/date_date_set_variation4.phpt
+++ b/ext/date/tests/date_date_set_variation4.phpt
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-06-30 08:34:10"
+ string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-07-01 08:34:10"
+ string(26) "1963-07-01 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1997-04-17 08:34:10"
+ string(26) "1997-04-17 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1929-09-11 08:34:10"
+ string(26) "1929-09-11 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-07-10 08:34:10"
+ string(26) "1963-07-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-06-20 08:34:10"
+ string(26) "1963-06-20 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-06-30 08:34:10"
+ string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-06-30 08:34:10"
+ string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-06-30 08:34:10"
+ string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-07-01 08:34:10"
+ string(26) "1963-07-01 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-06-30 08:34:10"
+ string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-07-01 08:34:10"
+ string(26) "1963-07-01 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-06-30 08:34:10"
+ string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-06-30 08:34:10"
+ string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-06-30 08:34:10"
+ string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/date_diff1.phpt b/ext/date/tests/date_diff1.phpt
index a908cdba7..fefffcde5 100644
--- a/ext/date/tests/date_diff1.phpt
+++ b/ext/date/tests/date_diff1.phpt
@@ -14,7 +14,7 @@ var_dump($int);
--EXPECT--
object(DateTime)#1 (3) {
["date"]=>
- string(19) "2010-10-04 02:18:48"
+ string(26) "2010-10-04 02:18:48.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
@@ -22,7 +22,7 @@ object(DateTime)#1 (3) {
}
object(DateTime)#2 (3) {
["date"]=>
- string(19) "2010-11-06 18:38:28"
+ string(26) "2010-11-06 18:38:28.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
diff --git a/ext/date/tests/date_isodate_set_variation2.phpt b/ext/date/tests/date_isodate_set_variation2.phpt
index fa42a9581..5b59a696c 100644
--- a/ext/date/tests/date_isodate_set_variation2.phpt
+++ b/ext/date/tests/date_isodate_set_variation2.phpt
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0000-02-15 08:34:10"
+ string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0001-02-13 08:34:10"
+ string(26) "0001-02-13 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(20) "12345-02-13 08:34:10"
+ string(27) "12345-02-13 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(21) "-12345-02-15 08:34:10"
+ string(28) "-12345-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0010-02-16 08:34:10"
+ string(26) "0010-02-16 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(20) "-0010-02-19 08:34:10"
+ string(27) "-0010-02-19 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0000-02-15 08:34:10"
+ string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0000-02-15 08:34:10"
+ string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0000-02-15 08:34:10"
+ string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0001-02-13 08:34:10"
+ string(26) "0001-02-13 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0000-02-15 08:34:10"
+ string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0001-02-13 08:34:10"
+ string(26) "0001-02-13 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0000-02-15 08:34:10"
+ string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0000-02-15 08:34:10"
+ string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "0000-02-15 08:34:10"
+ string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/date_isodate_set_variation3.phpt b/ext/date/tests/date_isodate_set_variation3.phpt
index eeb8471e2..52c2348fe 100644
--- a/ext/date/tests/date_isodate_set_variation3.phpt
+++ b/ext/date/tests/date_isodate_set_variation3.phpt
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-25 08:34:10"
+ string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-01-01 08:34:10"
+ string(26) "1963-01-01 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2199-07-30 08:34:10"
+ string(26) "2199-07-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1726-05-21 08:34:10"
+ string(26) "1726-05-21 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-03-05 08:34:10"
+ string(26) "1963-03-05 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-10-16 08:34:10"
+ string(26) "1962-10-16 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-25 08:34:10"
+ string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-25 08:34:10"
+ string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-25 08:34:10"
+ string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-01-01 08:34:10"
+ string(26) "1963-01-01 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-25 08:34:10"
+ string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-01-01 08:34:10"
+ string(26) "1963-01-01 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-25 08:34:10"
+ string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-25 08:34:10"
+ string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1962-12-25 08:34:10"
+ string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/date_isodate_set_variation4.phpt b/ext/date/tests/date_isodate_set_variation4.phpt
index 5da3c038e..b223f39b6 100644
--- a/ext/date/tests/date_isodate_set_variation4.phpt
+++ b/ext/date/tests/date_isodate_set_variation4.phpt
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-02-10 08:34:10"
+ string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-02-11 08:34:10"
+ string(26) "1963-02-11 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1996-11-28 08:34:10"
+ string(26) "1996-11-28 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1929-04-24 08:34:10"
+ string(26) "1929-04-24 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-02-20 08:34:10"
+ string(26) "1963-02-20 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-01-31 08:34:10"
+ string(26) "1963-01-31 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-02-10 08:34:10"
+ string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-02-10 08:34:10"
+ string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-02-10 08:34:10"
+ string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-02-11 08:34:10"
+ string(26) "1963-02-11 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-02-10 08:34:10"
+ string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-02-11 08:34:10"
+ string(26) "1963-02-11 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-02-10 08:34:10"
+ string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-02-10 08:34:10"
+ string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "1963-02-10 08:34:10"
+ string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/date_modify_variation2.phpt b/ext/date/tests/date_modify_variation2.phpt
index fe6afb16d..a28261be4 100644
--- a/ext/date/tests/date_modify_variation2.phpt
+++ b/ext/date/tests/date_modify_variation2.phpt
@@ -133,7 +133,7 @@ bool(false)
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:05:00"
+ string(26) "2009-01-31 10:05:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -148,7 +148,7 @@ bool(false)
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 00:05:00"
+ string(26) "2009-01-31 00:05:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/date_time_set_variation2.phpt b/ext/date/tests/date_time_set_variation2.phpt
index e8a6d7ef9..c19650c16 100644
--- a/ext/date/tests/date_time_set_variation2.phpt
+++ b/ext/date/tests/date_time_set_variation2.phpt
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 00:13:45"
+ string(26) "2009-01-31 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 01:13:45"
+ string(26) "2009-01-31 01:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2010-06-29 09:13:45"
+ string(26) "2010-06-29 09:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-30 15:13:45"
+ string(26) "2009-01-30 15:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-30 10:13:45"
+ string(26) "2009-01-30 10:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-29 14:13:45"
+ string(26) "2009-01-29 14:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-29 00:13:45"
+ string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-29 00:13:45"
+ string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-29 00:13:45"
+ string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-29 01:13:45"
+ string(26) "2009-01-29 01:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-29 00:13:45"
+ string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-29 01:13:45"
+ string(26) "2009-01-29 01:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-29 00:13:45"
+ string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-29 00:13:45"
+ string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-29 00:13:45"
+ string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/date_time_set_variation3.phpt b/ext/date/tests/date_time_set_variation3.phpt
index 9be25b592..0ad04c8a6 100644
--- a/ext/date/tests/date_time_set_variation3.phpt
+++ b/ext/date/tests/date_time_set_variation3.phpt
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#3 (3) {
["date"]=>
- string(19) "2009-01-31 10:00:45"
+ string(26) "2009-01-31 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#3 (3) {
-- int 1 --
object(DateTime)#3 (3) {
["date"]=>
- string(19) "2009-01-31 10:01:45"
+ string(26) "2009-01-31 10:01:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#3 (3) {
-- int 12345 --
object(DateTime)#3 (3) {
["date"]=>
- string(19) "2009-02-08 23:45:45"
+ string(26) "2009-02-08 23:45:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#3 (3) {
-- int -12345 --
object(DateTime)#3 (3) {
["date"]=>
- string(19) "2009-01-30 20:15:45"
+ string(26) "2009-01-30 20:15:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#3 (3) {
-- float 10.5 --
object(DateTime)#3 (3) {
["date"]=>
- string(19) "2009-01-30 10:10:45"
+ string(26) "2009-01-30 10:10:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#3 (3) {
-- float -10.5 --
object(DateTime)#3 (3) {
["date"]=>
- string(19) "2009-01-30 09:50:45"
+ string(26) "2009-01-30 09:50:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#3 (3) {
-- float .5 --
object(DateTime)#3 (3) {
["date"]=>
- string(19) "2009-01-30 10:00:45"
+ string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-30 10:00:45"
+ string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-30 10:00:45"
+ string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-30 10:01:45"
+ string(26) "2009-01-30 10:01:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-30 10:00:45"
+ string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-30 10:01:45"
+ string(26) "2009-01-30 10:01:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-30 10:00:45"
+ string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-30 10:00:45"
+ string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-30 10:00:45"
+ string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -326,4 +326,4 @@ object(DateTime)#%d (3) {
Warning: date_time_set() expects parameter 3 to be long, resource given in %s on line %d
bool(false)
-===DONE=== \ No newline at end of file
+===DONE===
diff --git a/ext/date/tests/date_time_set_variation4.phpt b/ext/date/tests/date_time_set_variation4.phpt
index 1da497b85..8e6fbfb60 100644
--- a/ext/date/tests/date_time_set_variation4.phpt
+++ b/ext/date/tests/date_time_set_variation4.phpt
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:13:00"
+ string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:13:01"
+ string(26) "2009-01-31 10:13:01.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 13:38:45"
+ string(26) "2009-01-31 13:38:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 06:47:15"
+ string(26) "2009-01-31 06:47:15.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:13:10"
+ string(26) "2009-01-31 10:13:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:12:50"
+ string(26) "2009-01-31 10:12:50.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:13:00"
+ string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:13:00"
+ string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:13:00"
+ string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:13:01"
+ string(26) "2009-01-31 10:13:01.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:13:00"
+ string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:13:01"
+ string(26) "2009-01-31 10:13:01.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:13:00"
+ string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:13:00"
+ string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
- string(19) "2009-01-31 10:13:00"
+ string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
diff --git a/ext/date/tests/test-parse-from-format.phpt b/ext/date/tests/test-parse-from-format.phpt
index 5bb5fe532..ee0bd68d6 100644
--- a/ext/date/tests/test-parse-from-format.phpt
+++ b/ext/date/tests/test-parse-from-format.phpt
@@ -25,7 +25,7 @@ string(13) "Y-m-d\TH:i:sP"
string(25) "2008-07-08T22:14:12+02:00"
object(DateTime)#2 (3) {
["date"]=>
- string(19) "2008-07-08 22:14:12"
+ string(26) "2008-07-08 22:14:12.000000"
["timezone_type"]=>
int(1)
["timezone"]=>
@@ -36,7 +36,7 @@ string(16) "l, d-M-Y H:i:s T"
string(38) "Tuesday, 08-Jul-2008 22:14:12 GMT+0200"
object(DateTime)#1 (3) {
["date"]=>
- string(19) "2008-07-08 22:14:12"
+ string(26) "2008-07-08 22:14:12.000000"
["timezone_type"]=>
int(1)
["timezone"]=>
@@ -47,7 +47,7 @@ string(13) "Y-m-d\TH:i:sO"
string(24) "2008-07-08T22:14:12+0200"
object(DateTime)#3 (3) {
["date"]=>
- string(19) "2008-07-08 22:14:12"
+ string(26) "2008-07-08 22:14:12.000000"
["timezone_type"]=>
int(1)
["timezone"]=>
@@ -58,7 +58,7 @@ string(16) "D, d M y H:i:s O"
string(29) "Tue, 08 Jul 08 22:14:12 +0200"
object(DateTime)#2 (3) {
["date"]=>
- string(19) "2008-07-08 22:14:12"
+ string(26) "2008-07-08 22:14:12.000000"
["timezone_type"]=>
int(1)
["timezone"]=>
@@ -69,7 +69,7 @@ string(16) "l, d-M-y H:i:s T"
string(36) "Tuesday, 08-Jul-08 22:14:12 GMT+0200"
object(DateTime)#1 (3) {
["date"]=>
- string(19) "2008-07-08 22:14:12"
+ string(26) "2008-07-08 22:14:12.000000"
["timezone_type"]=>
int(1)
["timezone"]=>
@@ -80,7 +80,7 @@ string(16) "D, d M y H:i:s O"
string(29) "Tue, 08 Jul 08 22:14:12 +0200"
object(DateTime)#3 (3) {
["date"]=>
- string(19) "2008-07-08 22:14:12"
+ string(26) "2008-07-08 22:14:12.000000"
["timezone_type"]=>
int(1)
["timezone"]=>
@@ -91,7 +91,7 @@ string(16) "D, d M Y H:i:s O"
string(31) "Tue, 08 Jul 2008 22:14:12 +0200"
object(DateTime)#2 (3) {
["date"]=>
- string(19) "2008-07-08 22:14:12"
+ string(26) "2008-07-08 22:14:12.000000"
["timezone_type"]=>
int(1)
["timezone"]=>
@@ -102,7 +102,7 @@ string(16) "D, d M Y H:i:s O"
string(31) "Tue, 08 Jul 2008 22:14:12 +0200"
object(DateTime)#1 (3) {
["date"]=>
- string(19) "2008-07-08 22:14:12"
+ string(26) "2008-07-08 22:14:12.000000"
["timezone_type"]=>
int(1)
["timezone"]=>
@@ -113,7 +113,7 @@ string(13) "Y-m-d\TH:i:sP"
string(25) "2008-07-08T22:14:12+02:00"
object(DateTime)#3 (3) {
["date"]=>
- string(19) "2008-07-08 22:14:12"
+ string(26) "2008-07-08 22:14:12.000000"
["timezone_type"]=>
int(1)
["timezone"]=>
@@ -124,7 +124,7 @@ string(16) "D, d M Y H:i:s O"
string(31) "Tue, 08 Jul 2008 22:14:12 +0200"
object(DateTime)#2 (3) {
["date"]=>
- string(19) "2008-07-08 22:14:12"
+ string(26) "2008-07-08 22:14:12.000000"
["timezone_type"]=>
int(1)
["timezone"]=>
@@ -135,7 +135,7 @@ string(13) "Y-m-d\TH:i:sP"
string(25) "2008-07-08T22:14:12+02:00"
object(DateTime)#1 (3) {
["date"]=>
- string(19) "2008-07-08 22:14:12"
+ string(26) "2008-07-08 22:14:12.000000"
["timezone_type"]=>
int(1)
["timezone"]=>
diff --git a/ext/dom/tests/DOMDocument_validate_external_dtd.phpt b/ext/dom/tests/DOMDocument_validate_external_dtd.phpt
index 51a044c54..dd4ec960d 100644
--- a/ext/dom/tests/DOMDocument_validate_external_dtd.phpt
+++ b/ext/dom/tests/DOMDocument_validate_external_dtd.phpt
@@ -12,6 +12,7 @@ require_once dirname(__FILE__) .'/skipif.inc';
// reusing existing xml: http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/dom.xml?view=co&content-type=text%2Fplain
// reusing existing dtd: http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/dom.ent?view=co&content-type=text%2Fplain
$dom = new DOMDocument('1.0');
+$dom->substituteEntities = true;
$dom->load(dirname(__FILE__).'/dom.xml');
var_dump($dom->validate());
?>
diff --git a/ext/dom/tests/bug67081.phpt b/ext/dom/tests/bug67081.phpt
index 56c2c8e58..c6dc007d4 100644
--- a/ext/dom/tests/bug67081.phpt
+++ b/ext/dom/tests/bug67081.phpt
@@ -7,18 +7,22 @@ require_once('skipif.inc');
--FILE--
<?php
$domDocument = new DOMDocument();
+ $domDocument->substituteEntities = true;
$domDocument->load(dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug67081_0.xml");
var_dump($domDocument->doctype->internalSubset);
$domDocument = new DOMDocument();
+ $domDocument->substituteEntities = true;
$domDocument->load(dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug67081_1.xml");
var_dump($domDocument->doctype->internalSubset);
$domDocument = new DOMDocument();
+ $domDocument->substituteEntities = true;
$domDocument->load(dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug67081_2.xml");
var_dump($domDocument->doctype->internalSubset);
$domDocument = new DOMDocument();
+ $domDocument->substituteEntities = true;
$domDocument->load(dirname(__FILE__) . DIRECTORY_SEPARATOR . "dom.xml");
var_dump($domDocument->doctype->internalSubset);
?>
diff --git a/ext/exif/tests/exif004.phpt b/ext/exif/tests/exif004.phpt
index 229f49e14..8797955f8 100644
--- a/ext/exif/tests/exif004.phpt
+++ b/ext/exif/tests/exif004.phpt
@@ -18,7 +18,7 @@ exif.encode_unicode=ISO-8859-1
test4.jpg is a 1*1 image that contains Exif tags written by WindowsXP
*/
$image = exif_read_data(dirname(__FILE__).'/test4.jpg','',true,false);
-echo var_dump($image['WINXP']);
+var_dump($image['WINXP']);
?>
--EXPECT--
array(5) {
diff --git a/ext/fileinfo/libmagic/cdf.c b/ext/fileinfo/libmagic/cdf.c
index 4712e8494..429f3b952 100644
--- a/ext/fileinfo/libmagic/cdf.c
+++ b/ext/fileinfo/libmagic/cdf.c
@@ -277,13 +277,15 @@ cdf_check_stream_offset(const cdf_stream_t *sst, const cdf_header_t *h,
{
const char *b = (const char *)sst->sst_tab;
const char *e = ((const char *)p) + tail;
+ size_t ss = sst->sst_dirlen < h->h_min_size_standard_stream ?
+ CDF_SHORT_SEC_SIZE(h) : CDF_SEC_SIZE(h);
(void)&line;
- if (e >= b && (size_t)(e - b) <= CDF_SEC_SIZE(h) * sst->sst_len)
+ if (e >= b && (size_t)(e - b) <= ss * sst->sst_len)
return 0;
DPRINTF(("%d: offset begin %p < end %p || %" SIZE_T_FORMAT "u"
" > %" SIZE_T_FORMAT "u [%" SIZE_T_FORMAT "u %"
SIZE_T_FORMAT "u]\n", line, b, e, (size_t)(e - b),
- CDF_SEC_SIZE(h) * sst->sst_len, CDF_SEC_SIZE(h), sst->sst_len));
+ ss * sst->sst_len, ss, sst->sst_len));
errno = EFTYPE;
return -1;
}
@@ -365,10 +367,10 @@ cdf_read_short_sector(const cdf_stream_t *sst, void *buf, size_t offs,
size_t ss = CDF_SHORT_SEC_SIZE(h);
size_t pos = CDF_SHORT_SEC_POS(h, id);
assert(ss == len);
- if (pos > CDF_SEC_SIZE(h) * sst->sst_len) {
+ if (pos + len > CDF_SEC_SIZE(h) * sst->sst_len) {
DPRINTF(("Out of bounds read %" SIZE_T_FORMAT "u > %"
SIZE_T_FORMAT "u\n",
- pos, CDF_SEC_SIZE(h) * sst->sst_len));
+ pos + len, CDF_SEC_SIZE(h) * sst->sst_len));
return -1;
}
(void)memcpy(((char *)buf) + offs,
@@ -468,7 +470,8 @@ size_t
cdf_count_chain(const cdf_sat_t *sat, cdf_secid_t sid, size_t size)
{
size_t i, j;
- cdf_secid_t maxsector = (cdf_secid_t)(sat->sat_len * size);
+ cdf_secid_t maxsector = (cdf_secid_t)((sat->sat_len * size)
+ / sizeof(maxsector));
DPRINTF(("Chain:"));
for (j = i = 0; sid >= 0; i++, j++) {
@@ -478,8 +481,8 @@ cdf_count_chain(const cdf_sat_t *sat, cdf_secid_t sid, size_t size)
errno = EFTYPE;
return (size_t)-1;
}
- if (sid > maxsector) {
- DPRINTF(("Sector %d > %d\n", sid, maxsector));
+ if (sid >= maxsector) {
+ DPRINTF(("Sector %d >= %d\n", sid, maxsector));
errno = EFTYPE;
return (size_t)-1;
}
@@ -809,7 +812,11 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
if (cdf_check_stream_offset(sst, h, e, 0, __LINE__) == -1)
goto out;
for (i = 0; i < sh.sh_properties; i++) {
- size_t ofs = CDF_GETUINT32(p, (i << 1) + 1);
+ size_t ofs, tail = (i << 1) + 1;
+ if (cdf_check_stream_offset(sst, h, p, tail * sizeof(uint32_t),
+ __LINE__) == -1)
+ goto out;
+ ofs = CDF_GETUINT32(p, tail);
q = (const uint8_t *)(const void *)
((const char *)(const void *)p + ofs
- 2 * sizeof(uint32_t));
diff --git a/ext/fileinfo/libmagic/softmagic.c b/ext/fileinfo/libmagic/softmagic.c
index 21fea6b72..01e49778b 100644
--- a/ext/fileinfo/libmagic/softmagic.c
+++ b/ext/fileinfo/libmagic/softmagic.c
@@ -881,10 +881,18 @@ mconvert(struct magic_set *ms, struct magic *m, int flip)
return 1;
}
case FILE_PSTRING: {
- char *ptr1 = p->s, *ptr2 = ptr1 + file_pstring_length_size(m);
+ size_t sz = file_pstring_length_size(m);
+ char *ptr1 = p->s, *ptr2 = ptr1 + sz;
size_t len = file_pstring_get_length(m, ptr1);
- if (len >= sizeof(p->s))
- len = sizeof(p->s) - 1;
+ if (len >= sizeof(p->s)) {
+ /*
+ * The size of the pascal string length (sz)
+ * is 1, 2, or 4. We need at least 1 byte for NUL
+ * termination, but we've already truncated the
+ * string by p->s, so we need to deduct sz.
+ */
+ len = sizeof(p->s) - sz;
+ }
while (len--)
*ptr1++ = *ptr2++;
*ptr1 = '\0';
diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c
index 9c5b09a7b..3bb564835 100644
--- a/ext/intl/locale/locale_methods.c
+++ b/ext/intl/locale/locale_methods.c
@@ -272,8 +272,7 @@ static char* get_icu_value_internal( char* loc_name , char* tag_name, int* resul
grOffset = findOffset( LOC_GRANDFATHERED , loc_name );
if( grOffset >= 0 ){
if( strcmp(tag_name , LOC_LANG_TAG)==0 ){
- tag_value = estrdup(loc_name);
- return tag_value;
+ return estrdup(loc_name);
} else {
/* Since Grandfathered , no value , do nothing , retutn NULL */
return NULL;
@@ -283,8 +282,8 @@ static char* get_icu_value_internal( char* loc_name , char* tag_name, int* resul
if( fromParseLocale==1 ){
/* Handle singletons */
if( strcmp(tag_name , LOC_LANG_TAG)==0 ){
- if( strlen(loc_name)>1 && (isIDPrefix(loc_name) ==1 ) ){
- return loc_name;
+ if( strlen(loc_name)>1 && isIDPrefix(loc_name) ){
+ return estrdup(loc_name);
}
}
@@ -501,8 +500,16 @@ static void get_icu_disp_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAME
RETURN_FALSE;
}
+ if(loc_name_len > ULOC_FULLNAME_CAPACITY) {
+ /* See bug 67397: overlong locale names cause trouble in uloc_getDisplayName */
+ spprintf(&msg , 0, "locale_get_display_%s : name too long", tag_name );
+ intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, msg , 1 TSRMLS_CC );
+ efree(msg);
+ RETURN_FALSE;
+ }
+
if(loc_name_len == 0) {
- loc_name = INTL_G(default_locale);
+ loc_name = INTL_G(default_locale);
}
if( strcmp(tag_name, DISP_NAME) != 0 ){
diff --git a/ext/intl/tests/bug62082.phpt b/ext/intl/tests/bug62082.phpt
index e6ca73e30..dab1252af 100644
--- a/ext/intl/tests/bug62082.phpt
+++ b/ext/intl/tests/bug62082.phpt
@@ -10,6 +10,7 @@ var_dump(locale_get_display_name(str_repeat("a", 300), null));
var_dump(locale_get_display_name(str_repeat("a", 512), null));
var_dump(locale_get_display_name(str_repeat("a", 600), null));
--EXPECT--
-string(300) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-string(512) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-string(600) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+bool(false)
+bool(false)
+bool(false)
+
diff --git a/ext/intl/tests/bug67397.phpt b/ext/intl/tests/bug67397.phpt
new file mode 100644
index 000000000..b2b2911f8
--- /dev/null
+++ b/ext/intl/tests/bug67397.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #67397 (Buffer overflow in locale_get_display_name->uloc_getDisplayName (libicu 4.8.1))
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+function ut_main()
+{
+ $ret = var_export(ut_loc_get_display_name(str_repeat('*', 256), 'en_us'), true);
+ $ret .= "\n";
+ $ret .= var_export(intl_get_error_message(), true);
+ return $ret;
+}
+
+include_once( 'ut_common.inc' );
+ut_run();
+?>
+--EXPECTF--
+false
+'locale_get_display_name : name too long: U_ILLEGAL_ARGUMENT_ERROR'
diff --git a/ext/intl/tests/dateformat_format.phpt b/ext/intl/tests/dateformat_format.phpt
index e5548196d..20908b3f3 100644
--- a/ext/intl/tests/dateformat_format.phpt
+++ b/ext/intl/tests/dateformat_format.phpt
@@ -315,7 +315,7 @@ IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1
Formatted localtime_array is : 18951217 12:13 AM
------------
Date is: DateTime::__set_state(array(
- 'date' => '2010-01-01 01:02:03',
+ 'date' => '2010-01-01 01:02:03.000000',
'timezone_type' => 3,
'timezone' => 'UTC',
))
@@ -323,7 +323,7 @@ Date is: DateTime::__set_state(array(
Formatted DateTime is : Thursday, December 31, 2009 3:02:03 PM GMT-10:00
------------
Date is: DateTime::__set_state(array(
- 'date' => '2010-01-01 01:02:03',
+ 'date' => '2010-01-01 01:02:03.000000',
'timezone_type' => 3,
'timezone' => 'UTC',
))
@@ -331,7 +331,7 @@ Date is: DateTime::__set_state(array(
Formatted DateTime is : December 31, 2009 3:02:03 PM GMT-10:00
------------
Date is: DateTime::__set_state(array(
- 'date' => '2010-01-01 01:02:03',
+ 'date' => '2010-01-01 01:02:03.000000',
'timezone_type' => 3,
'timezone' => 'UTC',
))
@@ -339,7 +339,7 @@ Date is: DateTime::__set_state(array(
Formatted DateTime is : Dec 31, 2009 3:02:03 PM
------------
Date is: DateTime::__set_state(array(
- 'date' => '2010-01-01 01:02:03',
+ 'date' => '2010-01-01 01:02:03.000000',
'timezone_type' => 3,
'timezone' => 'UTC',
))
@@ -347,7 +347,7 @@ Date is: DateTime::__set_state(array(
Formatted DateTime is : 12/31/09 3:02 PM
------------
Date is: DateTime::__set_state(array(
- 'date' => '2010-01-01 01:02:03',
+ 'date' => '2010-01-01 01:02:03.000000',
'timezone_type' => 3,
'timezone' => 'UTC',
))
@@ -355,7 +355,7 @@ Date is: DateTime::__set_state(array(
Formatted DateTime is : 20091231 03:02 PM
------------
Date is: DateTime::__set_state(array(
- 'date' => '2000-12-30 19:04:05',
+ 'date' => '2000-12-30 19:04:05.000000',
'timezone_type' => 3,
'timezone' => 'America/Los_Angeles',
))
@@ -363,7 +363,7 @@ Date is: DateTime::__set_state(array(
Formatted DateTime is : Saturday, December 30, 2000 5:04:05 PM GMT-10:00
------------
Date is: DateTime::__set_state(array(
- 'date' => '2000-12-30 19:04:05',
+ 'date' => '2000-12-30 19:04:05.000000',
'timezone_type' => 3,
'timezone' => 'America/Los_Angeles',
))
@@ -371,7 +371,7 @@ Date is: DateTime::__set_state(array(
Formatted DateTime is : December 30, 2000 5:04:05 PM GMT-10:00
------------
Date is: DateTime::__set_state(array(
- 'date' => '2000-12-30 19:04:05',
+ 'date' => '2000-12-30 19:04:05.000000',
'timezone_type' => 3,
'timezone' => 'America/Los_Angeles',
))
@@ -379,7 +379,7 @@ Date is: DateTime::__set_state(array(
Formatted DateTime is : Dec 30, 2000 5:04:05 PM
------------
Date is: DateTime::__set_state(array(
- 'date' => '2000-12-30 19:04:05',
+ 'date' => '2000-12-30 19:04:05.000000',
'timezone_type' => 3,
'timezone' => 'America/Los_Angeles',
))
@@ -387,7 +387,7 @@ Date is: DateTime::__set_state(array(
Formatted DateTime is : 12/30/00 5:04 PM
------------
Date is: DateTime::__set_state(array(
- 'date' => '2000-12-30 19:04:05',
+ 'date' => '2000-12-30 19:04:05.000000',
'timezone_type' => 3,
'timezone' => 'America/Los_Angeles',
))
diff --git a/ext/intl/tests/locale_parse_locale2.phpt b/ext/intl/tests/locale_parse_locale2.phpt
index 6012862a4..30cc8cc0a 100644
--- a/ext/intl/tests/locale_parse_locale2.phpt
+++ b/ext/intl/tests/locale_parse_locale2.phpt
@@ -63,7 +63,8 @@ function ut_main()
//Some Invalid Tags:
'de-419-DE',
'a-DE',
- 'ar-a-aaa-b-bbb-a-ccc'
+ 'ar-a-aaa-b-bbb-a-ccc',
+ 'x-AAAAAA',
);
@@ -201,3 +202,6 @@ No values found from Locale parsing.
---------------------
ar-a-aaa-b-bbb-a-ccc:
language : 'ar' ,
+---------------------
+x-AAAAAA:
+private0 : 'AAAAAA' ,
diff --git a/ext/libxml/tests/libxml_set_external_entity_loader_variation1.phpt b/ext/libxml/tests/libxml_set_external_entity_loader_variation1.phpt
index c9c45940b..958192704 100644
--- a/ext/libxml/tests/libxml_set_external_entity_loader_variation1.phpt
+++ b/ext/libxml/tests/libxml_set_external_entity_loader_variation1.phpt
@@ -37,6 +37,7 @@ libxml_set_external_entity_loader(
);
$dd = new DOMDocument;
+$dd->substituteEntities = true;
$dd->resolveExternals = true;
$r = $dd->loadXML($xml);
var_dump($dd->validate());
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index 257681f04..0ec2a9a6b 100755
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -649,7 +649,7 @@ static time_t asn1_time_to_time_t(ASN1_UTCTIME * timestr TSRMLS_DC) /* {{{ */
char * thestr;
long gmadjust = 0;
- if (ASN1_STRING_type(timestr) != V_ASN1_UTCTIME) {
+ if (ASN1_STRING_type(timestr) != V_ASN1_UTCTIME && ASN1_STRING_type(timestr) != V_ASN1_GENERALIZEDTIME) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "illegal ASN1 data type for timestamp");
return (time_t)-1;
}
@@ -664,6 +664,11 @@ static time_t asn1_time_to_time_t(ASN1_UTCTIME * timestr TSRMLS_DC) /* {{{ */
return (time_t)-1;
}
+ if (ASN1_STRING_type(timestr) == V_ASN1_GENERALIZEDTIME && ASN1_STRING_length(timestr) < 15) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to parse time string %s correctly", timestr->data);
+ return (time_t)-1;
+ }
+
strbuf = estrdup((char *)ASN1_STRING_data(timestr));
memset(&thetime, 0, sizeof(thetime));
@@ -685,14 +690,21 @@ static time_t asn1_time_to_time_t(ASN1_UTCTIME * timestr TSRMLS_DC) /* {{{ */
*thestr = '\0';
thestr -= 2;
thetime.tm_mon = atoi(thestr)-1;
+
*thestr = '\0';
- thestr -= 2;
- thetime.tm_year = atoi(thestr);
+ if( ASN1_STRING_type(timestr) == V_ASN1_UTCTIME ) {
+ thestr -= 2;
+ thetime.tm_year = atoi(thestr);
- if (thetime.tm_year < 68) {
- thetime.tm_year += 100;
+ if (thetime.tm_year < 68) {
+ thetime.tm_year += 100;
+ }
+ } else if( ASN1_STRING_type(timestr) == V_ASN1_GENERALIZEDTIME ) {
+ thestr -= 4;
+ thetime.tm_year = atoi(thestr) - 1900;
}
+
thetime.tm_isdst = -1;
ret = mktime(&thetime);
diff --git a/ext/openssl/tests/bug65698.crt b/ext/openssl/tests/bug65698.crt
new file mode 100644
index 000000000..c4a026113
--- /dev/null
+++ b/ext/openssl/tests/bug65698.crt
@@ -0,0 +1,28 @@
+-----BEGIN CERTIFICATE-----
+MIIEsTCCA5mgAwIBAgIQdwrGwrpRpBwdXS+ZsmsMGjANBgkqhkiG9w0BAQUFADA+
+MQswCQYDVQQGEwJQTDEbMBkGA1UEChMSVW5pemV0byBTcC4geiBvLm8uMRIwEAYD
+VQQDEwlDZXJ0dW0gQ0EwIhgPMjAwOTAzMDMxMjUzMThaGA8yMDI0MDMwMzEyNTMx
+OFowdzELMAkGA1UEBhMCUEwxIjAgBgNVBAoTGVVuaXpldG8gVGVjaG5vbG9naWVz
+IFMuQS4xJzAlBgNVBAsTHkNlcnR1bSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEb
+MBkGA1UEAxMSQ2VydHVtIExldmVsIElJIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC
+AQ8AMIIBCgKCAQEA4LE0Ixw8h5Lper9tHVtZkWIujxYsPVgUZABeZZgQsKTdJjaG
+VP64B/oiEV5Hd3AxRqaZ7dRRsf4Pg/PSS/2mHRQQ/SH3XACbrDHmucDvYgtU/WoZ
+yp9d6PXVPY4j7J5t/52s+EbZD5swSuQLGjZ9iwg9sXX3JdJ9Ty+B3z80oiajpK0B
+wqAxrcX3DekEOknj7LkAOK6iuQKI85REj4IVb9kD7KKIWdISGbfL4Ezh/TP51e0L
+/WhTJ7lHbHbRzFfPU/oi3Qyt5tEexrPKe+6N+Jrejdb5Ya7Ne3tKujDU7KlbO+dn
+pzFH7VHkBPJcQJ7QUrprPaqVsVg3JJ1PXTqVnwIDAQABo4IBbDCCAWgwDwYDVR0T
+AQH/BAUwAwEB/zAdBgNVHQ4EFgQUgGIR3sBrpxDhCPBVtDCDv/qPCGAwUgYDVR0j
+BEswSaFCpEAwPjELMAkGA1UEBhMCUEwxGzAZBgNVBAoTElVuaXpldG8gU3AuIHog
+by5vLjESMBAGA1UEAxMJQ2VydHVtIENBggMBACAwDgYDVR0PAQH/BAQDAgEGMCwG
+A1UdHwQlMCMwIaAfoB2GG2h0dHA6Ly9jcmwuY2VydHVtLnBsL2NhLmNybDBoBggr
+BgEFBQcBAQRcMFowKAYIKwYBBQUHMAGGHGh0dHA6Ly9zdWJjYS5vY3NwLWNlcnR1
+bS5jb20wLgYIKwYBBQUHMAKGImh0dHA6Ly9yZXBvc2l0b3J5LmNlcnR1bS5wbC9j
+YS5jZXIwOgYDVR0gBDMwMTAvBgRVHSAAMCcwJQYIKwYBBQUHAgEWGWh0dHBzOi8v
+d3d3LmNlcnR1bS5wbC9DUFMwDQYJKoZIhvcNAQEFBQADggEBAI/jSDAW/w9qLzF6
+4oQiIRB7dGKp2Nlj27xZFYDBRINn4DKyZExkpanASF2of9eEzvrS+qoDY29mhXCi
+MkiGr0vCsVhn0ReUpjg4Z5SsiQhZ2BGSjXiOJgaDI7Dw1MH7Ru6jdfSbLyd97EFj
+ER0ERGdrcA2kLw7KfQm78IkClXEEKjKnAUTn1d/5Y4UuBWDCEL0FLgO9AqNXEzIy
+rlXVGIs73kdefAK+Z1T6dm83vUrDMyzemWNRBI2tVBujkN6zkaF6uPjE4hfoIkEQ
+Z4317byFkG4mxjATU+tQLG1Bs88HUAOrxtJOo/WoeCNsFJaxbYPt4oQGxIVYdz29
+OUX9CQA=
+-----END CERTIFICATE-----
diff --git a/ext/openssl/tests/bug65698.phpt b/ext/openssl/tests/bug65698.phpt
new file mode 100644
index 000000000..35d31764d
--- /dev/null
+++ b/ext/openssl/tests/bug65698.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #65689 (GeneralizedTime format parsing)
+--SKIPIF--
+<?php
+if (!extension_loaded("openssl")) die("skip");
+?>
+--FILE--
+<?php
+$crt = substr(__FILE__, 0, -4).'.crt';
+$info = openssl_x509_parse("file://$crt");
+var_dump($info["validFrom"], $info["validFrom_time_t"], $info["validTo"], $info["validTo_time_t"]);
+?>
+Done
+--EXPECTF--
+string(15) "20090303125318Z"
+int(1236084798)
+string(15) "20240303125318Z"
+int(1709470398)
+Done
diff --git a/ext/openssl/tests/cve-2013-6420.phpt b/ext/openssl/tests/cve-2013-6420.phpt
index 87c0210b2..ccead0aab 100644
--- a/ext/openssl/tests/cve-2013-6420.phpt
+++ b/ext/openssl/tests/cve-2013-6420.phpt
@@ -12,7 +12,7 @@ var_dump($info['issuer']['emailAddress'], $info["validFrom_time_t"]);
?>
Done
--EXPECTF--
-%s openssl_x509_parse(): illegal ASN1 data type for timestamp in %s%ecve-2013-6420.php on line 3
+%s openssl_x509_parse(): illegal length in timestamp in %s%ecve-2013-6420.php on line 3
string(27) "stefan.esser@sektioneins.de"
int(-1)
Done
diff --git a/ext/pdo_pgsql/tests/bug62479.phpt b/ext/pdo_pgsql/tests/bug62479.phpt
index a12bb8d1f..913321828 100644
--- a/ext/pdo_pgsql/tests/bug62479.phpt
+++ b/ext/pdo_pgsql/tests/bug62479.phpt
@@ -6,15 +6,34 @@ if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not lo
require dirname(__FILE__) . '/config.inc';
require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
PDOTest::skip();
-if (!isset($conf['ENV']['PDOTEST_DSN'])) die('no dsn found in env');
+
+$dsn = getenv('PDOTEST_DSN');
+if (empty($dsn)) die('skip no dsn found in env');
+
$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
-$rand = rand(5, 5);
+$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+
+
+$user = 'pdo_test_'.rand(5, 400);
+$pass = 'testpass';
+
+// Assume that if we can't create or drop a user, this test needs to be skipped
+try {
+ $db->exec("DROP USER IF EXISTS $user");
+ $db->exec("CREATE USER $user WITH PASSWORD '$pass'");
+} catch (PDOException $e) {
+ die("skip You need CREATEUSER permissions to run the test");
+}
+
+// Peer authentication might prevent the test from properly running
+try {
+ $testConn = new PDO($dsn, $user, $pass);
+} catch (PDOException $e) {
+ echo "skip ".$e->getMessage();
+}
+
+$db->exec("DROP USER $user");
-// Assume that if we can't create a user, this test needs to be skipped
-$testQuery = "CREATE USER pdo_$rand WITH PASSWORD 'testpass'";
-$db->query($testQuery);
-$testQuery = "DROP USER pdo_$rand";
-$db->query($testQuery);
?>
--FILE--
<?php
@@ -22,7 +41,7 @@ require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
$pdo = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
$pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);
$rand = rand(5, 400);
-$user = "pdo_$rand";
+$user = "pdo_test_$rand";
$template = "CREATE USER $user WITH PASSWORD '%s'";
$dropUser = "DROP USER $user";
$testQuery = 'SELECT 1 as verification';
diff --git a/ext/reflection/tests/ReflectionFunction_isClosure_basic.phpt b/ext/reflection/tests/ReflectionFunction_isClosure_basic.phpt
index eeaf8d382..368464e13 100644
--- a/ext/reflection/tests/ReflectionFunction_isClosure_basic.phpt
+++ b/ext/reflection/tests/ReflectionFunction_isClosure_basic.phpt
@@ -13,6 +13,6 @@ if (!extension_loaded('reflection') || !defined('PHP_VERSION_ID') || PHP_VERSION
<?php
$closure = function($param) { return "this is a closure"; };
$rc = new ReflectionFunction($closure);
-echo var_dump($rc->isClosure());
+var_dump($rc->isClosure());
--EXPECTF--
bool(true)
diff --git a/ext/reflection/tests/ReflectionFunction_isDeprecated_basic.phpt b/ext/reflection/tests/ReflectionFunction_isDeprecated_basic.phpt
index 31d37a85f..4148fada0 100644
--- a/ext/reflection/tests/ReflectionFunction_isDeprecated_basic.phpt
+++ b/ext/reflection/tests/ReflectionFunction_isDeprecated_basic.phpt
@@ -10,6 +10,6 @@ if (!extension_loaded('reflection') || !defined('PHP_VERSION_ID') || PHP_VERSION
--FILE--
<?php
$rc = new ReflectionFunction('ereg');
-echo var_dump($rc->isDeprecated());
+var_dump($rc->isDeprecated());
--EXPECTF--
bool(true)
diff --git a/ext/reflection/tests/ReflectionFunction_isDisabled_basic.phpt b/ext/reflection/tests/ReflectionFunction_isDisabled_basic.phpt
index c71b96b8e..30189cf4d 100644
--- a/ext/reflection/tests/ReflectionFunction_isDisabled_basic.phpt
+++ b/ext/reflection/tests/ReflectionFunction_isDisabled_basic.phpt
@@ -12,6 +12,6 @@ disable_functions=is_file
--FILE--
<?php
$rc = new ReflectionFunction('is_file');
-echo var_dump($rc->isDisabled());
+var_dump($rc->isDisabled());
--EXPECTF--
bool(true)
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index ca7f206bd..eaa57d903 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -225,6 +225,7 @@ PHP_METHOD(SoapClient, __getFunctions);
PHP_METHOD(SoapClient, __getTypes);
PHP_METHOD(SoapClient, __doRequest);
PHP_METHOD(SoapClient, __setCookie);
+PHP_METHOD(SoapClient, __getCookies);
PHP_METHOD(SoapClient, __setLocation);
PHP_METHOD(SoapClient, __setSoapHeaders);
@@ -368,6 +369,9 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_soapclient___setcookie, 0, 0, 1)
ZEND_ARG_INFO(0, value)
ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO(arginfo_soapclient___getcookies, 0)
+ZEND_END_ARG_INFO()
+
ZEND_BEGIN_ARG_INFO_EX(arginfo_soapclient___setsoapheaders, 0, 0, 1)
ZEND_ARG_INFO(0, soapheaders)
ZEND_END_ARG_INFO()
@@ -422,6 +426,7 @@ static const zend_function_entry soap_client_functions[] = {
PHP_ME(SoapClient, __getTypes, arginfo_soapclient___gettypes, 0)
PHP_ME(SoapClient, __doRequest, arginfo_soapclient___dorequest, 0)
PHP_ME(SoapClient, __setCookie, arginfo_soapclient___setcookie, 0)
+ PHP_ME(SoapClient, __getCookies, arginfo_soapclient___getcookies, 0)
PHP_ME(SoapClient, __setLocation, arginfo_soapclient___setlocation, 0)
PHP_ME(SoapClient, __setSoapHeaders, arginfo_soapclient___setsoapheaders, 0)
PHP_FE_END
@@ -3132,6 +3137,24 @@ PHP_METHOD(SoapClient, __setCookie)
}
/* }}} */
+/* {{{ proto array SoapClient::__getCookies ( void )
+ Returns list of cookies */
+PHP_METHOD(SoapClient, __getCookies)
+{
+ zval **cookies, *tmp;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+
+ array_init(return_value);
+
+ if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_cookies", sizeof("_cookies"), (void **)&cookies) != FAILURE) {
+ zend_hash_copy(Z_ARRVAL_P(return_value), Z_ARRVAL_P(*cookies), (copy_ctor_func_t) zval_add_ref, (void *)&tmp, sizeof(zval*));
+ }
+}
+/* }}} */
+
/* {{{ proto void SoapClient::__setSoapHeaders(array SoapHeaders)
Sets SOAP headers for subsequent calls (replaces any previous
values).
diff --git a/ext/soap/tests/bug49898.phpt b/ext/soap/tests/bug49898.phpt
new file mode 100644
index 000000000..eea4ea490
--- /dev/null
+++ b/ext/soap/tests/bug49898.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Test for bug #49898: SoapClient::__getCookies() implementation
+--CREDITS--
+Boro Sitnikovski <buritomath@yahoo.com>
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+$client = new SoapClient(null, array('uri' => 'mo:http://www.w3.org/', 'location' => 'http://some.url'));
+$client->__setCookie("CookieTest", "HelloWorld");
+var_dump($client->__getCookies()['CookieTest'][0]);
+?>
+--EXPECT--
+string(10) "HelloWorld"
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
index 68727d136..bf034ab24 100644
--- a/ext/spl/spl_array.c
+++ b/ext/spl/spl_array.c
@@ -402,7 +402,7 @@ static zval *spl_array_read_dimension_ex(int check_inherited, zval *object, zval
/* When in a write context,
* ZE has to be fooled into thinking this is in a reference set
* by separating (if necessary) and returning as an is_ref=1 zval (even if refcount == 1) */
- if ((type == BP_VAR_W || type == BP_VAR_RW || type == BP_VAR_UNSET) && !Z_ISREF_PP(ret)) {
+ if ((type == BP_VAR_W || type == BP_VAR_RW || type == BP_VAR_UNSET) && !Z_ISREF_PP(ret) && ret != &EG(uninitialized_zval_ptr)) {
if (Z_REFCOUNT_PP(ret) > 1) {
zval *newval;
@@ -922,7 +922,14 @@ static int spl_array_skip_protected(spl_array_object *intern, HashTable *aht TSR
if (Z_TYPE_P(intern->array) == IS_OBJECT) {
do {
if (zend_hash_get_current_key_ex(aht, &string_key, &string_length, &num_key, 0, &intern->pos) == HASH_KEY_IS_STRING) {
- if (!string_length || string_key[0]) {
+ /* zend_hash_get_current_key_ex() should never set
+ * string_length to 0 when returning HASH_KEY_IS_STRING, but we
+ * may as well be defensive and consider that successful.
+ * Beyond that, we're looking for protected keys (which will
+ * have a null byte at string_key[0]), but want to avoid
+ * skipping completely empty keys (which will also have the
+ * null byte, but a string_length of 1). */
+ if (!string_length || string_key[0] || string_length == 1) {
return SUCCESS;
}
} else {
@@ -1801,7 +1808,7 @@ SPL_METHOD(Array, unserialize)
++p;
ALLOC_INIT_ZVAL(pmembers);
- if (!php_var_unserialize(&pmembers, &p, s + buf_len, &var_hash TSRMLS_CC)) {
+ if (!php_var_unserialize(&pmembers, &p, s + buf_len, &var_hash TSRMLS_CC) || Z_TYPE_P(pmembers) != IS_ARRAY) {
zval_ptr_dtor(&pmembers);
goto outexcept;
}
diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c
index 0762db625..8cd352f0b 100644
--- a/ext/spl/spl_directory.c
+++ b/ext/spl/spl_directory.c
@@ -829,6 +829,7 @@ SPL_METHOD(DirectoryIterator, seek)
zend_call_method_with_0_params(&this_ptr, Z_OBJCE_P(getThis()), &intern->u.dir.func_rewind, "rewind", &retval);
if (retval) {
zval_ptr_dtor(&retval);
+ retval = NULL;
}
}
@@ -838,6 +839,7 @@ SPL_METHOD(DirectoryIterator, seek)
if (retval) {
valid = zend_is_true(retval);
zval_ptr_dtor(&retval);
+ retval = NULL;
}
if (!valid) {
break;
diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c
index f3120b201..fd2e472f0 100644
--- a/ext/spl/spl_iterators.c
+++ b/ext/spl/spl_iterators.c
@@ -861,6 +861,8 @@ static union _zend_function *spl_recursive_it_get_method(zval **object_ptr, char
*object_ptr = zobj;
function_handler = Z_OBJ_HT_P(*object_ptr)->get_method(object_ptr, method, method_len, key TSRMLS_CC);
}
+ } else {
+ *object_ptr = zobj;
}
}
return function_handler;
diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c
index 1a706f764..da9110bf1 100644
--- a/ext/spl/spl_observer.c
+++ b/ext/spl/spl_observer.c
@@ -898,7 +898,7 @@ SPL_METHOD(SplObjectStorage, unserialize)
++p;
ALLOC_INIT_ZVAL(pmembers);
- if (!php_var_unserialize(&pmembers, &p, s + buf_len, &var_hash TSRMLS_CC)) {
+ if (!php_var_unserialize(&pmembers, &p, s + buf_len, &var_hash TSRMLS_CC) || Z_TYPE_P(pmembers) != IS_ARRAY) {
zval_ptr_dtor(&pmembers);
goto outexcept;
}
diff --git a/ext/spl/tests/SplObjectStorage_unserialize_bad.phpt b/ext/spl/tests/SplObjectStorage_unserialize_bad.phpt
index a52531709..8f0676de3 100644
--- a/ext/spl/tests/SplObjectStorage_unserialize_bad.phpt
+++ b/ext/spl/tests/SplObjectStorage_unserialize_bad.phpt
@@ -7,6 +7,7 @@ $badblobs = array(
'x:i:2;i:0;,i:1;;i:0;,i:2;;m:a:0:{}',
'x:i:3;O:8:"stdClass":0:{},O:8:"stdClass":0:{};R:2;,i:1;;O:8:"stdClass":0:{},r:2;;m:a:0:{}',
'x:i:3;O:8:"stdClass":0:{},O:8:"stdClass":0:{};r:2;,i:1;;O:8:"stdClass":0:{},r:2;;m:a:0:{}',
+'x:i:1;O:8:"stdClass":0:{},N;;m:s:40:"1234567890123456789012345678901234567890"',
);
foreach($badblobs as $blob) {
try {
@@ -17,6 +18,7 @@ try {
echo $e->getMessage()."\n";
}
}
+echo "DONE\n";
--EXPECTF--
Error at offset 6 of 34 bytes
Error at offset 46 of 89 bytes
@@ -42,4 +44,5 @@ object(SplObjectStorage)#2 (1) {
}
}
}
-
+Error at offset 79 of 78 bytes
+DONE
diff --git a/ext/spl/tests/bug66127.phpt b/ext/spl/tests/bug66127.phpt
new file mode 100644
index 000000000..b5d1dcac4
--- /dev/null
+++ b/ext/spl/tests/bug66127.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Bug #66127 (Segmentation fault with ArrayObject unset)
+--INI--
+error_reporting = E_ALL & ~E_NOTICE
+--FILE--
+<?php
+function crash()
+{
+ set_error_handler(function () {});
+ $var = 1;
+ trigger_error('error');
+ $var2 = $var;
+ $var3 = $var;
+ trigger_error('error');
+}
+
+$items = new ArrayObject();
+
+unset($items[0]);
+unset($items[0][0]);
+crash();
+echo "Worked!\n";
+?>
+--EXPECT--
+Worked!
diff --git a/ext/spl/tests/bug67359.phpt b/ext/spl/tests/bug67359.phpt
new file mode 100644
index 000000000..e2e61133f
--- /dev/null
+++ b/ext/spl/tests/bug67359.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Bug #67359 (Segfault in recursiveDirectoryIterator)
+--FILE--
+<?php
+try
+{
+ $rdi = new recursiveDirectoryIterator(dirname(__FILE__), FilesystemIterator::SKIP_DOTS | FilesystemIterator::UNIX_PATHS);
+ $it = new recursiveIteratorIterator( $rdi );
+ $it->seek(1);
+ while( $it->valid())
+ {
+ if( $it->isFile() )
+ {
+ $it->current();
+ }
+
+ $it->next();
+ }
+
+ $it->current();
+}
+catch(Exception $e)
+{
+}
+echo "okey"
+?>
+--EXPECTF--
+okey
diff --git a/ext/spl/tests/bug67360.phpt b/ext/spl/tests/bug67360.phpt
new file mode 100644
index 000000000..552c02ad7
--- /dev/null
+++ b/ext/spl/tests/bug67360.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Bug #67360 (Missing element after ArrayObject::getIterator)
+--FILE--
+<?php
+
+$array = array('' => 1, 1 => 2, 3 => 4);
+$ArrayObject = new ArrayObject($array);
+var_dump($ArrayObject);
+$Iterator = $ArrayObject->getIterator();
+var_dump(count($Iterator) === count($array));
+var_dump(iterator_to_array($Iterator));
+
+?>
+--EXPECTF--
+object(ArrayObject)#%d (1) {
+ ["storage":"ArrayObject":private]=>
+ array(3) {
+ [""]=>
+ int(1)
+ [1]=>
+ int(2)
+ [3]=>
+ int(4)
+ }
+}
+bool(true)
+array(3) {
+ [""]=>
+ int(1)
+ [1]=>
+ int(2)
+ [3]=>
+ int(4)
+}
diff --git a/ext/spl/tests/iterator_035.phpt b/ext/spl/tests/iterator_035.phpt
index 9ce098b69..fc0271e38 100644
--- a/ext/spl/tests/iterator_035.phpt
+++ b/ext/spl/tests/iterator_035.phpt
@@ -12,4 +12,6 @@ $a[] = &$tmp;
echo "Done\n";
?>
--EXPECTF--
+Notice: Indirect modification of overloaded element of ArrayIterator has no effect in %s on line %d
+
Fatal error: Cannot assign by reference to overloaded object in %s on line %d
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index c01365589..4d4354d4a 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -4021,92 +4021,91 @@ PHP_FUNCTION(putenv)
{
char *setting;
int setting_len;
+ char *p, **env;
+ putenv_entry pe;
+#ifdef PHP_WIN32
+ char *value = NULL;
+ int equals = 0;
+ int error_code;
+#endif
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &setting, &setting_len) == FAILURE) {
return;
}
+
+ if(setting_len == 0 || setting[0] == '=') {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter syntax");
+ RETURN_FALSE;
+ }
- if (setting_len) {
- char *p, **env;
- putenv_entry pe;
+ pe.putenv_string = estrndup(setting, setting_len);
+ pe.key = estrndup(setting, setting_len);
+ if ((p = strchr(pe.key, '='))) { /* nullify the '=' if there is one */
+ *p = '\0';
#ifdef PHP_WIN32
- char *value = NULL;
- int equals = 0;
- int error_code;
+ equals = 1;
#endif
+ }
- pe.putenv_string = estrndup(setting, setting_len);
- pe.key = estrndup(setting, setting_len);
- if ((p = strchr(pe.key, '='))) { /* nullify the '=' if there is one */
- *p = '\0';
-#ifdef PHP_WIN32
- equals = 1;
-#endif
- }
-
- pe.key_len = strlen(pe.key);
+ pe.key_len = strlen(pe.key);
#ifdef PHP_WIN32
- if (equals) {
- if (pe.key_len < setting_len - 1) {
- value = p + 1;
- } else {
- /* empty string*/
- value = p;
- }
+ if (equals) {
+ if (pe.key_len < setting_len - 1) {
+ value = p + 1;
+ } else {
+ /* empty string*/
+ value = p;
}
+ }
#endif
- zend_hash_del(&BG(putenv_ht), pe.key, pe.key_len+1);
+ zend_hash_del(&BG(putenv_ht), pe.key, pe.key_len+1);
- /* find previous value */
- pe.previous_value = NULL;
- for (env = environ; env != NULL && *env != NULL; env++) {
- if (!strncmp(*env, pe.key, pe.key_len) && (*env)[pe.key_len] == '=') { /* found it */
+ /* find previous value */
+ pe.previous_value = NULL;
+ for (env = environ; env != NULL && *env != NULL; env++) {
+ if (!strncmp(*env, pe.key, pe.key_len) && (*env)[pe.key_len] == '=') { /* found it */
#if defined(PHP_WIN32)
- /* must copy previous value because MSVCRT's putenv can free the string without notice */
- pe.previous_value = estrdup(*env);
+ /* must copy previous value because MSVCRT's putenv can free the string without notice */
+ pe.previous_value = estrdup(*env);
#else
- pe.previous_value = *env;
+ pe.previous_value = *env;
#endif
- break;
- }
+ break;
}
+ }
#if HAVE_UNSETENV
- if (!p) { /* no '=' means we want to unset it */
- unsetenv(pe.putenv_string);
- }
- if (!p || putenv(pe.putenv_string) == 0) { /* success */
+ if (!p) { /* no '=' means we want to unset it */
+ unsetenv(pe.putenv_string);
+ }
+ if (!p || putenv(pe.putenv_string) == 0) { /* success */
#else
# ifndef PHP_WIN32
- if (putenv(pe.putenv_string) == 0) { /* success */
+ if (putenv(pe.putenv_string) == 0) { /* success */
# else
- error_code = SetEnvironmentVariable(pe.key, value);
+ error_code = SetEnvironmentVariable(pe.key, value);
# if _MSC_VER < 1500
- /* Yet another VC6 bug, unset may return env not found */
- if (error_code != 0 ||
- (error_code == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND)) {
+ /* Yet another VC6 bug, unset may return env not found */
+ if (error_code != 0 ||
+ (error_code == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND)) {
# else
- if (error_code != 0) { /* success */
+ if (error_code != 0) { /* success */
# endif
# endif
#endif
- zend_hash_add(&BG(putenv_ht), pe.key, pe.key_len + 1, (void **) &pe, sizeof(putenv_entry), NULL);
+ zend_hash_add(&BG(putenv_ht), pe.key, pe.key_len + 1, (void **) &pe, sizeof(putenv_entry), NULL);
#ifdef HAVE_TZSET
- if (!strncmp(pe.key, "TZ", pe.key_len)) {
- tzset();
- }
-#endif
- RETURN_TRUE;
- } else {
- efree(pe.putenv_string);
- efree(pe.key);
- RETURN_FALSE;
+ if (!strncmp(pe.key, "TZ", pe.key_len)) {
+ tzset();
}
+#endif
+ RETURN_TRUE;
+ } else {
+ efree(pe.putenv_string);
+ efree(pe.key);
+ RETURN_FALSE;
}
-
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter syntax");
- RETURN_FALSE;
}
/* }}} */
#endif
diff --git a/ext/standard/dns.c b/ext/standard/dns.c
index 6a894467f..214a7dc7e 100644
--- a/ext/standard/dns.c
+++ b/ext/standard/dns.c
@@ -517,6 +517,10 @@ static u_char *php_parserr(u_char *cp, querybuf *answer, int type_to_fetch, int
while (ll < dlen) {
n = cp[ll];
+ if ((ll + n) >= dlen) {
+ // Invalid chunk length, truncate
+ n = dlen - (ll + 1);
+ }
memcpy(tp + ll , cp + ll + 1, n);
add_next_index_stringl(entries, cp + ll + 1, n, 1);
ll = ll + n + 1;
diff --git a/ext/standard/info.c b/ext/standard/info.c
index 70b2e2f61..0f15bbefd 100644
--- a/ext/standard/info.c
+++ b/ext/standard/info.c
@@ -875,16 +875,16 @@ PHPAPI void php_print_info(int flag TSRMLS_DC)
php_info_print_table_start();
php_info_print_table_header(2, "Variable", "Value");
- if (zend_hash_find(&EG(symbol_table), "PHP_SELF", sizeof("PHP_SELF"), (void **) &data) != FAILURE) {
+ if (zend_hash_find(&EG(symbol_table), "PHP_SELF", sizeof("PHP_SELF"), (void **) &data) != FAILURE && Z_TYPE_PP(data) == IS_STRING) {
php_info_print_table_row(2, "PHP_SELF", Z_STRVAL_PP(data));
}
- if (zend_hash_find(&EG(symbol_table), "PHP_AUTH_TYPE", sizeof("PHP_AUTH_TYPE"), (void **) &data) != FAILURE) {
+ if (zend_hash_find(&EG(symbol_table), "PHP_AUTH_TYPE", sizeof("PHP_AUTH_TYPE"), (void **) &data) != FAILURE && Z_TYPE_PP(data) == IS_STRING) {
php_info_print_table_row(2, "PHP_AUTH_TYPE", Z_STRVAL_PP(data));
}
- if (zend_hash_find(&EG(symbol_table), "PHP_AUTH_USER", sizeof("PHP_AUTH_USER"), (void **) &data) != FAILURE) {
+ if (zend_hash_find(&EG(symbol_table), "PHP_AUTH_USER", sizeof("PHP_AUTH_USER"), (void **) &data) != FAILURE && Z_TYPE_PP(data) == IS_STRING) {
php_info_print_table_row(2, "PHP_AUTH_USER", Z_STRVAL_PP(data));
}
- if (zend_hash_find(&EG(symbol_table), "PHP_AUTH_PW", sizeof("PHP_AUTH_PW"), (void **) &data) != FAILURE) {
+ if (zend_hash_find(&EG(symbol_table), "PHP_AUTH_PW", sizeof("PHP_AUTH_PW"), (void **) &data) != FAILURE && Z_TYPE_PP(data) == IS_STRING) {
php_info_print_table_row(2, "PHP_AUTH_PW", Z_STRVAL_PP(data));
}
php_print_gpcse_array(ZEND_STRL("_REQUEST") TSRMLS_CC);
diff --git a/ext/standard/tests/general_functions/bug67498.phpt b/ext/standard/tests/general_functions/bug67498.phpt
new file mode 100644
index 000000000..5b5951b0f
--- /dev/null
+++ b/ext/standard/tests/general_functions/bug67498.phpt
@@ -0,0 +1,15 @@
+--TEST--
+phpinfo() Type Confusion Information Leak Vulnerability
+--FILE--
+<?php
+$PHP_SELF = 1;
+phpinfo(INFO_VARIABLES);
+
+?>
+==DONE==
+--EXPECTF--
+phpinfo()
+
+PHP Variables
+%A
+==DONE==
diff --git a/ext/standard/tests/general_functions/putenv.phpt b/ext/standard/tests/general_functions/putenv.phpt
index afe1badce..254207320 100644
--- a/ext/standard/tests/general_functions/putenv.phpt
+++ b/ext/standard/tests/general_functions/putenv.phpt
@@ -15,6 +15,9 @@ var_dump(getenv($var_name));
var_dump(putenv($var_name));
var_dump(getenv($var_name));
+var_dump(putenv("=123"));
+var_dump(putenv(""));
+
echo "Done\n";
?>
--EXPECTF--
@@ -25,4 +28,10 @@ bool(true)
string(0) ""
bool(true)
bool(false)
+
+Warning: putenv(): Invalid parameter syntax in %s on line %d
+bool(false)
+
+Warning: putenv(): Invalid parameter syntax in %s on line %d
+bool(false)
Done
diff --git a/ext/standard/tests/serialize/005.phpt b/ext/standard/tests/serialize/005.phpt
index 2df270154..07d47bd8c 100644
--- a/ext/standard/tests/serialize/005.phpt
+++ b/ext/standard/tests/serialize/005.phpt
@@ -156,11 +156,9 @@ object(TestNAOld)#%d (0) {
}
===NANew===
unserializer(TestNANew)
-
-Warning: Erroneous data format for unserializing 'TestNANew' in %s005.php on line %d
-
-Notice: unserialize(): Error at offset 19 of 20 bytes in %s005.php on line %d
-bool(false)
+TestNew::__wakeup()
+object(TestNANew)#1 (0) {
+}
===NANew2===
unserializer(TestNANew2)
TestNew::unserialize()
diff --git a/ext/standard/tests/serialize/bug67072_2.phpt b/ext/standard/tests/serialize/bug67072_2.phpt
new file mode 100644
index 000000000..09eadb9ee
--- /dev/null
+++ b/ext/standard/tests/serialize/bug67072_2.phpt
@@ -0,0 +1,84 @@
+--TEST--
+Bug #67072 Echoing unserialized "SplFileObject" crash - BC break fixes
+--FILE--
+<?php
+class MySplFileObject extends SplFileObject {}
+class MyArrayObject extends ArrayObject{ var $a = 1; }
+echo unserialize('O:15:"MySplFileObject":1:{s:9:"*filename";s:15:"/home/flag/flag";}');
+
+function testClass($className)
+{
+ // simulate phpunit
+ $object = unserialize(sprintf('O:%d:"%s":0:{}', strlen($className), $className));
+ return $object;
+}
+
+class MyClass {}
+class MyClassSer implements Serializable {
+ function serialize() { return "";}
+ function unserialize($data) { }
+}
+class MyClassSer2 extends MyClassSer {
+}
+
+$classes = array('stdClass', 'MyClass', 'MyClassSer', 'MyClassSer2', 'SplFileObject', 'MySplFileObject',
+ 'SplObjectStorage', 'FooBar', 'Closure', 'ArrayObject', 'MyArrayObject',
+ 'Directory'
+ );
+foreach($classes as $cl) {
+ var_dump(testClass($cl));
+}
+
+?>
+===DONE==
+--EXPECTF--
+Warning: Erroneous data format for unserializing 'MySplFileObject' in %s on line 4
+
+Notice: unserialize(): Error at offset 26 of 66 bytes in %s on line 4
+object(stdClass)#%d (0) {
+}
+object(MyClass)#%d (0) {
+}
+object(MyClassSer)#%d (0) {
+}
+object(MyClassSer2)#%d (0) {
+}
+
+Warning: Erroneous data format for unserializing 'SplFileObject' in %s on line 9
+
+Notice: unserialize(): Error at offset 24 of 25 bytes in %s on line 9
+bool(false)
+
+Warning: Erroneous data format for unserializing 'MySplFileObject' in %s on line 9
+
+Notice: unserialize(): Error at offset 26 of 27 bytes in %s on line 9
+bool(false)
+object(SplObjectStorage)#%d (1) {
+ ["storage":"SplObjectStorage":private]=>
+ array(0) {
+ }
+}
+object(__PHP_Incomplete_Class)#%d (1) {
+ ["__PHP_Incomplete_Class_Name"]=>
+ string(6) "FooBar"
+}
+
+Warning: Erroneous data format for unserializing 'Closure' in %s on line 9
+
+Notice: unserialize(): Error at offset 17 of 18 bytes in %s on line 9
+bool(false)
+object(ArrayObject)#%d (1) {
+ ["storage":"ArrayObject":private]=>
+ array(0) {
+ }
+}
+object(MyArrayObject)#1 (2) {
+ ["a"]=>
+ int(1)
+ ["storage":"ArrayObject":private]=>
+ array(0) {
+ }
+}
+object(Directory)#1 (0) {
+}
+===DONE==
diff --git a/ext/standard/var_unserializer.c b/ext/standard/var_unserializer.c
index eb1a90d1d..5bdfaf4ce 100644
--- a/ext/standard/var_unserializer.c
+++ b/ext/standard/var_unserializer.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Fri Apr 18 15:07:27 2014 */
+/* Generated by re2c 0.13.5 on Sat Jun 21 21:27:56 2014 */
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
@@ -22,6 +22,7 @@
#include "php.h"
#include "ext/standard/php_var.h"
#include "php_incomplete_class.h"
+#include "Zend/zend_interfaces.h"
/* {{{ reference-handling for unserializer: var_* */
#define VAR_ENTRIES_MAX 1024
@@ -394,7 +395,11 @@ static inline long object_common1(UNSERIALIZE_PARAMETER, zend_class_entry *ce)
(*p) += 2;
- if (ce->serialize == NULL) {
+ /* The internal class check here is a BC fix only, userspace classes implementing the
+ Serializable interface have eventually an inconsistent behavior at this place when
+ unserialized from a manipulated string. Additionaly the interal classes can possibly
+ crash PHP so they're still disabled here. */
+ if (ce->serialize == NULL || ce->unserialize == zend_user_unserialize || (ZEND_INTERNAL_CLASS != ce->type && ce->create_object == NULL)) {
object_init_ex(*rval, ce);
} else {
/* If this class implements Serializable, it should not land here but in object_custom(). The passed string
diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re
index b3f5d29ca..9a9c69333 100644
--- a/ext/standard/var_unserializer.re
+++ b/ext/standard/var_unserializer.re
@@ -21,6 +21,7 @@
#include "php.h"
#include "ext/standard/php_var.h"
#include "php_incomplete_class.h"
+#include "Zend/zend_interfaces.h"
/* {{{ reference-handling for unserializer: var_* */
#define VAR_ENTRIES_MAX 1024
@@ -400,7 +401,11 @@ static inline long object_common1(UNSERIALIZE_PARAMETER, zend_class_entry *ce)
(*p) += 2;
- if (ce->serialize == NULL) {
+ /* The internal class check here is a BC fix only, userspace classes implementing the
+ Serializable interface have eventually an inconsistent behavior at this place when
+ unserialized from a manipulated string. Additionaly the interal classes can possibly
+ crash PHP so they're still disabled here. */
+ if (ce->serialize == NULL || ce->unserialize == zend_user_unserialize || (ZEND_INTERNAL_CLASS != ce->type && ce->create_object == NULL)) {
object_init_ex(*rval, ce);
} else {
/* If this class implements Serializable, it should not land here but in object_custom(). The passed string
diff --git a/ext/zlib/tests/gzseek_basic2.phpt b/ext/zlib/tests/gzseek_basic2.phpt
index a815b8ff4..861b3c8db 100644
--- a/ext/zlib/tests/gzseek_basic2.phpt
+++ b/ext/zlib/tests/gzseek_basic2.phpt
@@ -24,7 +24,7 @@ gzclose($h);
echo "\nreading the output file\n";
$h = gzopen($f, 'r');
echo gzread($h, strlen($str1))."\n";
-echo var_dump(bin2hex(gzread($h, 20)));
+var_dump(bin2hex(gzread($h, 20)));
echo gzread($h, strlen($str2))."\n";
gzclose($h);
unlink($f);
@@ -39,4 +39,4 @@ reading the output file
This is the first line.
string(40) "0000000000000000000000000000000000000000"
This is the second line.
-===DONE=== \ No newline at end of file
+===DONE===
diff --git a/ext/zlib/tests/gzseek_variation1.phpt b/ext/zlib/tests/gzseek_variation1.phpt
index 301b57d15..4dec495f9 100644
--- a/ext/zlib/tests/gzseek_variation1.phpt
+++ b/ext/zlib/tests/gzseek_variation1.phpt
@@ -20,7 +20,7 @@ gzwrite($h, $str2);
gzclose($h);
$h = gzopen($f, 'r');
echo gzread($h, strlen($str1))."\n";
-echo var_dump(bin2hex(gzread($h, 20)));
+var_dump(bin2hex(gzread($h, 20)));
echo gzread($h, strlen($str2))."\n";
gzclose($h);
unlink($f);
@@ -30,4 +30,4 @@ unlink($f);
This is the first line.
string(40) "0000000000000000000000000000000000000000"
This is the second line.
-===DONE=== \ No newline at end of file
+===DONE===
diff --git a/ext/zlib/tests/gzseek_variation4.phpt b/ext/zlib/tests/gzseek_variation4.phpt
index fc641f6c8..4c66d7451 100644
--- a/ext/zlib/tests/gzseek_variation4.phpt
+++ b/ext/zlib/tests/gzseek_variation4.phpt
@@ -24,7 +24,7 @@ gzclose($h);
echo "\nreading the output file\n";
$h = gzopen($f, 'r');
echo gzread($h, strlen($str1))."\n";
-echo var_dump(bin2hex(gzread($h, 20)));
+var_dump(bin2hex(gzread($h, 20)));
echo gzread($h, strlen($str2))."\n";
gzclose($h);
unlink($f);
@@ -39,4 +39,4 @@ reading the output file
This is the first line.
string(40) "0000000000000000000000000000000000000000"
This is the second line.
-===DONE=== \ No newline at end of file
+===DONE===
diff --git a/ext/zlib/tests/gzseek_variation5.phpt b/ext/zlib/tests/gzseek_variation5.phpt
index 0167e204c..b82688b6d 100644
--- a/ext/zlib/tests/gzseek_variation5.phpt
+++ b/ext/zlib/tests/gzseek_variation5.phpt
@@ -24,7 +24,7 @@ gzclose($h);
echo "\nreading the output file\n";
$h = gzopen($f, 'r');
echo gzread($h, strlen($str1))."\n";
-echo var_dump(bin2hex(gzread($h, 20)));
+var_dump(bin2hex(gzread($h, 20)));
echo gzread($h, strlen($str2))."\n";
gzclose($h);
unlink($f);
@@ -39,4 +39,4 @@ reading the output file
This is the first line.
string(40) "0000000000000000000000000000000000000000"
This is the second line.
-===DONE=== \ No newline at end of file
+===DONE===
diff --git a/main/php_version.h b/main/php_version.h
index f2323a282..a5ff7cb0a 100644
--- a/main/php_version.h
+++ b/main/php_version.h
@@ -2,7 +2,8 @@
/* edit configure.in to change version number */
#define PHP_MAJOR_VERSION 5
#define PHP_MINOR_VERSION 4
-#define PHP_RELEASE_VERSION 29
+#define PHP_RELEASE_VERSION 30
+
#define PHP_EXTRA_VERSION ""
-#define PHP_VERSION "5.4.29"
-#define PHP_VERSION_ID 50429
+#define PHP_VERSION "5.4.30"
+#define PHP_VERSION_ID 50430
diff --git a/run-tests.php b/run-tests.php
index 25e480728..a2f552cfd 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -576,8 +576,8 @@ if (isset($argc) && $argc > 1) {
if (!$valgrind_header) {
error("Valgrind returned no version info, cannot proceed.\nPlease check if Valgrind is installed.");
} else {
- $valgrind_version = preg_replace("/valgrind-([0-9])\.([0-9])\.([0-9]+)([.-\w]+)?(\s+)/", '$1$2$3', $valgrind_header, 1, $replace_count);
- if ($replace_count != 1 || !is_numeric($valgrind_version)) {
+ $valgrind_version = preg_replace("/valgrind-(\d+)\.(\d+)\.(\d+)([.\w_-]+)?(\s+)/", '$1.$2.$3', $valgrind_header, 1, $replace_count);
+ if ($replace_count != 1) {
error("Valgrind returned invalid version info (\"$valgrind_header\"), cannot proceed.");
}
$valgrind_header = trim($valgrind_header);
@@ -1349,6 +1349,7 @@ TEST $file
} else {
show_result('SKIP', $tested, $tested_file, "reason: CGI not available");
+ junit_init_suite(junit_get_suitename_for($shortname));
junit_mark_test_as('SKIP', $shortname, $tested, 0, 'CGI not available');
return 'SKIPPED';
}
@@ -1528,7 +1529,7 @@ TEST $file
}
$message = !empty($m[1]) ? $m[1] : '';
- junit_mark_test_as('SKIP', $shortname, $tested, null, "<![CDATA[\n$message\n]]>");
+ junit_mark_test_as('SKIP', $shortname, $tested, null, $message);
return 'SKIPPED';
}
@@ -1553,7 +1554,7 @@ TEST $file
) {
$message = "ext/zlib required";
show_result('SKIP', $tested, $tested_file, "reason: $message", $temp_filenames);
- junit_mark_test_as('SKIP', $shortname, $tested, null, "<![CDATA[\n$message\n]]>");
+ junit_mark_test_as('SKIP', $shortname, $tested, null, $message);
return 'SKIPPED';
}
@@ -1777,7 +1778,7 @@ TEST $file
$env['USE_ZEND_ALLOC'] = '0';
$env['ZEND_DONT_UNLOAD_MODULES'] = 1;
- if ($valgrind_version >= 330) {
+ if (version_compare($valgrind_version, '3.3.0', '>=')) {
/* valgrind 3.3.0+ doesn't have --log-file-exactly option */
$cmd = "valgrind -q --tool=memcheck --trace-children=yes --log-file=$memcheck_filename $cmd";
} else {
@@ -2121,7 +2122,7 @@ $output
$php = $old_php;
}
- $diff = empty($diff) ? '' : "<![CDATA[\n " . preg_replace('/\e/', '<esc>', $diff) . "\n]]>";
+ $diff = empty($diff) ? '' : preg_replace('/\e/', '<esc>', $diff);
junit_mark_test_as($restype, str_replace($cwd . '/', '', $tested_file), $tested, null, $info, $diff);
@@ -2700,6 +2701,10 @@ function junit_mark_test_as($type, $file_name, $test_name, $time = null, $messag
junit_suite_record($suite, 'execution_time', $time);
$escaped_details = htmlspecialchars($details, ENT_QUOTES, 'UTF-8');
+ $escaped_details = preg_replace_callback('/[\0-\x08\x0B\x0C\x0E-\x1F]/', function ($c) {
+ return sprintf('[[0x%02x]]', ord($c[0]));
+ }, $escaped_details);
+ $escaped_message = htmlspecialchars($message, ENT_QUOTES, 'UTF-8');
$escaped_test_name = basename($file_name) . ' - ' . htmlspecialchars($test_name, ENT_QUOTES);
$JUNIT['files'][$file_name]['xml'] = "<testcase classname='$suite' name='$escaped_test_name' time='$time'>\n";
@@ -2716,16 +2721,16 @@ function junit_mark_test_as($type, $file_name, $test_name, $time = null, $messag
junit_suite_record($suite, 'test_pass');
} elseif ('BORK' == $type) {
junit_suite_record($suite, 'test_error');
- $JUNIT['files'][$file_name]['xml'] .= "<error type='$output_type' message='$message'/>\n";
+ $JUNIT['files'][$file_name]['xml'] .= "<error type='$output_type' message='$escaped_message'/>\n";
} elseif ('SKIP' == $type) {
junit_suite_record($suite, 'test_skip');
- $JUNIT['files'][$file_name]['xml'] .= "<skipped>$message</skipped>\n";
+ $JUNIT['files'][$file_name]['xml'] .= "<skipped>$escaped_message</skipped>\n";
} elseif('FAIL' == $type) {
junit_suite_record($suite, 'test_fail');
- $JUNIT['files'][$file_name]['xml'] .= "<failure type='$output_type' message='$message'>$escaped_details</failure>\n";
+ $JUNIT['files'][$file_name]['xml'] .= "<failure type='$output_type' message='$escaped_message'>$escaped_details</failure>\n";
} else {
junit_suite_record($suite, 'test_error');
- $JUNIT['files'][$file_name]['xml'] .= "<error type='$output_type' message='$message'>$escaped_details</error>\n";
+ $JUNIT['files'][$file_name]['xml'] .= "<error type='$output_type' message='$escaped_message'>$escaped_details</error>\n";
}
$JUNIT['files'][$file_name]['xml'] .= "</testcase>\n";
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index e838d3055..3fd24ea12 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -768,11 +768,11 @@ static void php_cli_server_poller_remove(php_cli_server_poller *poller, int mode
#endif
} /* }}} */
-static int php_cli_server_poller_poll(php_cli_server_poller *poller, const struct timeval *tv) /* {{{ */
+static int php_cli_server_poller_poll(php_cli_server_poller *poller, struct timeval *tv) /* {{{ */
{
memmove(&poller->active.rfds, &poller->rfds, sizeof(poller->rfds));
memmove(&poller->active.wfds, &poller->wfds, sizeof(poller->wfds));
- return php_select(poller->max_fd + 1, &poller->active.rfds, &poller->active.wfds, NULL, (struct timeval *)tv);
+ return php_select(poller->max_fd + 1, &poller->active.rfds, &poller->active.wfds, NULL, tv);
} /* }}} */
static int php_cli_server_poller_iter_on_active(php_cli_server_poller *poller, void *opaque, int(*callback)(void *, int fd, int events)) /* {{{ */
@@ -2349,7 +2349,7 @@ static int php_cli_server_do_event_loop(php_cli_server *server TSRMLS_DC) /* {{{
{
int retval = SUCCESS;
while (server->is_running) {
- static const struct timeval tv = { 1, 0 };
+ struct timeval tv = { 1, 0 };
int n = php_cli_server_poller_poll(&server->poller, &tv);
if (n > 0) {
php_cli_server_do_event_for_each_fd(server,