summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2014-06-07 09:49:55 +0200
committerOndřej Surý <ondrej@sury.org>2014-06-07 09:49:55 +0200
commitc63e1a09f5cbd757f59beb729fb0fb36516819a9 (patch)
tree901250de5d55280e0163cd59e99b05cd07d4db0b
parent32c3fbba663e5b1da38bdd2d84b0a9a78271ddfa (diff)
downloadphp-c63e1a09f5cbd757f59beb729fb0fb36516819a9.tar.gz
New upstream version 5.6.0~beta4+dfsgupstream/5.6.0_beta4+dfsg
-rw-r--r--Makefile.gcov2
-rw-r--r--NEWS24
-rw-r--r--Zend/zend_operators.c3
-rwxr-xr-xconfigure2
-rw-r--r--configure.in2
-rw-r--r--ext/date/php_date.c2
-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/DateTimeImmutable_createFromMutable.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/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/fileinfo/libmagic.patch68
-rw-r--r--ext/fileinfo/libmagic/cdf.c35
-rw-r--r--ext/fileinfo/libmagic/cdf.h3
-rw-r--r--ext/fileinfo/libmagic/readcdf.c77
-rw-r--r--ext/intl/tests/dateformat_format.phpt20
-rw-r--r--ext/intl/tests/dateformat_format_variant2.phpt20
-rw-r--r--ext/intl/tests/dateformat_format_variant3.phpt20
-rw-r--r--ext/opcache/Optimizer/pass1_5.c3
-rw-r--r--ext/opcache/Optimizer/pass3.c8
-rw-r--r--ext/opcache/Optimizer/zend_optimizer.c29
-rw-r--r--ext/opcache/ZendAccelerator.h1
-rw-r--r--ext/opcache/tests/issue0183.phpt25
-rw-r--r--ext/opcache/zend_persist.c6
-rw-r--r--ext/pdo_pgsql/tests/bug62479.phpt35
-rw-r--r--ext/spl/spl_array.c26
-rw-r--r--ext/spl/spl_directory.c2
-rw-r--r--ext/spl/spl_iterators.c2
-rw-r--r--ext/spl/tests/bug66834.phpt15
-rw-r--r--ext/spl/tests/bug67359.phpt28
-rw-r--r--ext/spl/tests/bug67360.phpt34
-rw-r--r--ext/standard/formatted_print.c6
-rw-r--r--ext/standard/tests/strings/bug67249.phpt8
-rw-r--r--main/php_version.h4
-rwxr-xr-xrun-tests.php25
-rw-r--r--sapi/phpdbg/phpdbg.c51
-rw-r--r--sapi/phpdbg/phpdbg_watch.c2
-rw-r--r--sapi/phpdbg/tests/commands/0002_set.test2
-rw-r--r--sapi/phpdbg/tests/commands/0103_register.test10
-rw-r--r--sapi/phpdbg/tests/commands/0106_compile.test1
-rw-r--r--sapi/phpdbg/tests/run-tests.php28
83 files changed, 885 insertions, 538 deletions
diff --git a/Makefile.gcov b/Makefile.gcov
index 37c1b4b44..8d30f34ae 100644
--- a/Makefile.gcov
+++ b/Makefile.gcov
@@ -14,7 +14,7 @@ php_lcov.info: lcov-test
@rm -rf lcov_data/
@$(mkinstalldirs) lcov_data/
@echo
- -@files=`find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.c -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | $(EGREP) $(LCOV_INCLUDE) | uniq` ;\
+ -@files=`find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.c -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | $(EGREP) $(LCOV_INCLUDE) | sed -e 's/.libs/zzzz/g' | sort | sed -e 's/zzzz/.libs/g' | uniq` ;\
for x in $$files; do \
echo -n . ;\
y=`echo $$x | sed -e 's!\.libs/!!'`; \
diff --git a/NEWS b/NEWS
index 29cdcaadb..f57932c5b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,29 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+05 Jun 2014, PHP 5.6.0 Beta 4
+
+- Core:
+ . Fixed bug #67249 (printf out-of-bounds read). (Stas)
+
+- Date:
+ . Fixed bug #67308 (Serialize of DateTime truncates fractions of second).
+ (Adam)
+
+- Fileinfo:
+ . Fixed bug #67327 (fileinfo: CDF infinite loop in nelements DoS).
+ . Fixed bug #67328 (fileinfo: fileinfo: numerous file_printf calls resulting in
+ performance degradation).
+ . Fixed bug #67326 (fileinfo: cdf_read_short_sector insufficient boundary check).
+ . Fixed bug #67329 (fileinfo: NULL pointer deference flaw by processing certain
+ CDF files).
+
+- SPL:
+ . Fixed bug #67359 (Segfault in recursiveDirectoryIterator). (Laruence)
+
+- phpdbg:
+ . Fixed bug which caused phpdbg to fail immediately on startup in non-debug
+ builds. (Bob)
+
15 May 2014, PHP 5.6.0 Beta 3
- Core:
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index f022909bc..ef21b47a4 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -963,7 +963,7 @@ ZEND_API int mul_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ *
}
/* }}} */
-ZEND_API int pow_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+ZEND_API int pow_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
zval op1_copy, op2_copy;
int converted = 0;
@@ -1045,6 +1045,7 @@ ZEND_API int pow_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
}
}
}
+/* }}} */
ZEND_API int div_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
diff --git a/configure b/configure
index cbfc85092..513680e74 100755
--- a/configure
+++ b/configure
@@ -3666,7 +3666,7 @@ ac_config_headers="$ac_config_headers main/php_config.h"
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=6
PHP_RELEASE_VERSION=0
-PHP_EXTRA_VERSION="beta3"
+PHP_EXTRA_VERSION="beta4"
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/configure.in b/configure.in
index 8313c3956..ff81da632 100644
--- a/configure.in
+++ b/configure.in
@@ -120,7 +120,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=6
PHP_RELEASE_VERSION=0
-PHP_EXTRA_VERSION="beta3"
+PHP_EXTRA_VERSION="beta4"
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 f81f87e4c..e8a7ebfe1 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -2218,7 +2218,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) */
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 5e609c868..3adb32c96 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/DateTimeImmutable_createFromMutable.phpt b/ext/date/tests/DateTimeImmutable_createFromMutable.phpt
index db893b982..ac92fb4bb 100644
--- a/ext/date/tests/DateTimeImmutable_createFromMutable.phpt
+++ b/ext/date/tests/DateTimeImmutable_createFromMutable.phpt
@@ -15,7 +15,7 @@ var_dump( $i );
--EXPECTF--
object(DateTimeImmutable)#%d (3) {
["date"]=>
- string(19) "2014-03-02 16:24:08"
+ string(26) "2014-03-02 16:24:08.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/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/fileinfo/libmagic.patch b/ext/fileinfo/libmagic.patch
index 662537bf7..bb9a0dafa 100644
--- a/ext/fileinfo/libmagic.patch
+++ b/ext/fileinfo/libmagic.patch
@@ -822,7 +822,7 @@ diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c
}
diff -u libmagic.orig/cdf.c libmagic/cdf.c
--- libmagic.orig/cdf.c Tue Feb 26 17:20:42 2013
-+++ libmagic/cdf.c Fri Feb 21 00:21:27 2014
++++ libmagic/cdf.c Tue May 27 22:28:51 2014
@@ -43,7 +43,17 @@
#include <err.h>
#endif
@@ -853,7 +853,63 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
return -1;
return (ssize_t)len;
-@@ -1132,7 +1145,7 @@
+@@ -810,6 +823,10 @@
+ i, inp[i].pi_id, inp[i].pi_type, q - p, offs));
+ if (inp[i].pi_type & CDF_VECTOR) {
+ nelements = CDF_GETUINT32(q, 1);
++ if (nelements == 0) {
++ DPRINTF(("CDF_VECTOR with nelements == 0\n"));
++ goto out;
++ }
+ o = 2;
+ } else {
+ nelements = 1;
+@@ -884,7 +901,9 @@
+ }
+ DPRINTF(("nelements = %" SIZE_T_FORMAT "u\n",
+ nelements));
+- for (j = 0; j < nelements; j++, i++) {
++ for (j = 0; j < nelements && i < sh.sh_properties;
++ j++, i++)
++ {
+ uint32_t l = CDF_GETUINT32(q, o);
+ inp[i].pi_str.s_len = l;
+ inp[i].pi_str.s_buf = (const char *)
+@@ -929,7 +948,7 @@
+ cdf_unpack_summary_info(const cdf_stream_t *sst, const cdf_header_t *h,
+ cdf_summary_info_header_t *ssi, cdf_property_info_t **info, size_t *count)
+ {
+- size_t i, maxcount;
++ size_t maxcount;
+ const cdf_summary_info_header_t *si =
+ CAST(const cdf_summary_info_header_t *, sst->sst_tab);
+ const cdf_section_declaration_t *sd =
+@@ -944,21 +963,13 @@
+ ssi->si_os = CDF_TOLE2(si->si_os);
+ ssi->si_class = si->si_class;
+ cdf_swap_class(&ssi->si_class);
+- ssi->si_count = CDF_TOLE2(si->si_count);
++ ssi->si_count = CDF_TOLE4(si->si_count);
+ *count = 0;
+ maxcount = 0;
+ *info = NULL;
+- for (i = 0; i < CDF_TOLE4(si->si_count); i++) {
+- if (i >= CDF_LOOP_LIMIT) {
+- DPRINTF(("Unpack summary info loop limit"));
+- errno = EFTYPE;
+- return -1;
+- }
+- if (cdf_read_property_info(sst, h, CDF_TOLE4(sd->sd_offset),
+- info, count, &maxcount) == -1) {
++ if (cdf_read_property_info(sst, h, CDF_TOLE4(sd->sd_offset), info,
++ count, &maxcount) == -1)
+ return -1;
+- }
+- }
+ return 0;
+ }
+
+@@ -1132,7 +1143,7 @@
cdf_directory_t *d;
char name[__arraycount(d->d_name)];
cdf_stream_t scn;
@@ -862,7 +918,7 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
static const char *types[] = { "empty", "user storage",
"user stream", "lockbytes", "property", "root storage" };
-@@ -1185,7 +1198,7 @@
+@@ -1185,7 +1196,7 @@
cdf_dump_property_info(const cdf_property_info_t *info, size_t count)
{
cdf_timestamp_t tp;
@@ -871,7 +927,7 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
char buf[64];
size_t i, j;
-@@ -1229,7 +1242,11 @@
+@@ -1229,7 +1240,11 @@
break;
case CDF_FILETIME:
tp = info[i].pi_tp;
@@ -885,7 +941,7 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
} else {
diff -u libmagic.orig/cdf.h libmagic/cdf.h
--- libmagic.orig/cdf.h Thu Jun 21 00:19:55 2012
-+++ libmagic/cdf.h Fri Feb 21 00:21:27 2014
++++ libmagic/cdf.h Tue May 27 22:28:51 2014
@@ -35,10 +35,12 @@
#ifndef _H_CDF_
#define _H_CDF_
@@ -2543,7 +2599,7 @@ diff -u libmagic.orig/print.c libmagic/print.c
}
diff -u libmagic.orig/readcdf.c libmagic/readcdf.c
--- libmagic.orig/readcdf.c Tue Jan 7 04:13:42 2014
-+++ libmagic/readcdf.c Thu Apr 24 20:07:51 2014
++++ libmagic/readcdf.c Tue May 27 22:28:51 2014
@@ -30,7 +30,11 @@
#endif
diff --git a/ext/fileinfo/libmagic/cdf.c b/ext/fileinfo/libmagic/cdf.c
index dd7177ed9..cbe3b0cf7 100644
--- a/ext/fileinfo/libmagic/cdf.c
+++ b/ext/fileinfo/libmagic/cdf.c
@@ -35,7 +35,7 @@
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: cdf.c,v 1.53 2013/02/26 16:20:42 christos Exp $")
+FILE_RCSID("@(#)$File: cdf.c,v 1.55 2014/02/27 23:26:17 christos Exp $")
#endif
#include <assert.h>
@@ -365,10 +365,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,
@@ -688,11 +688,13 @@ out:
int
cdf_read_short_stream(const cdf_info_t *info, const cdf_header_t *h,
- const cdf_sat_t *sat, const cdf_dir_t *dir, cdf_stream_t *scn)
+ const cdf_sat_t *sat, const cdf_dir_t *dir, cdf_stream_t *scn,
+ const cdf_directory_t **root)
{
size_t i;
const cdf_directory_t *d;
+ *root = NULL;
for (i = 0; i < dir->dir_len; i++)
if (dir->dir_tab[i].d_type == CDF_DIR_TYPE_ROOT_STORAGE)
break;
@@ -701,6 +703,7 @@ cdf_read_short_stream(const cdf_info_t *info, const cdf_header_t *h,
if (i == dir->dir_len)
goto out;
d = &dir->dir_tab[i];
+ *root = d;
/* If the it is not there, just fake it; some docs don't have it */
if (d->d_stream_first_sector < 0)
@@ -823,6 +826,10 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
i, inp[i].pi_id, inp[i].pi_type, q - p, offs));
if (inp[i].pi_type & CDF_VECTOR) {
nelements = CDF_GETUINT32(q, 1);
+ if (nelements == 0) {
+ DPRINTF(("CDF_VECTOR with nelements == 0\n"));
+ goto out;
+ }
o = 2;
} else {
nelements = 1;
@@ -897,7 +904,9 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
}
DPRINTF(("nelements = %" SIZE_T_FORMAT "u\n",
nelements));
- for (j = 0; j < nelements; j++, i++) {
+ for (j = 0; j < nelements && i < sh.sh_properties;
+ j++, i++)
+ {
uint32_t l = CDF_GETUINT32(q, o);
inp[i].pi_str.s_len = l;
inp[i].pi_str.s_buf = (const char *)
@@ -942,7 +951,7 @@ int
cdf_unpack_summary_info(const cdf_stream_t *sst, const cdf_header_t *h,
cdf_summary_info_header_t *ssi, cdf_property_info_t **info, size_t *count)
{
- size_t i, maxcount;
+ size_t maxcount;
const cdf_summary_info_header_t *si =
CAST(const cdf_summary_info_header_t *, sst->sst_tab);
const cdf_section_declaration_t *sd =
@@ -957,21 +966,13 @@ cdf_unpack_summary_info(const cdf_stream_t *sst, const cdf_header_t *h,
ssi->si_os = CDF_TOLE2(si->si_os);
ssi->si_class = si->si_class;
cdf_swap_class(&ssi->si_class);
- ssi->si_count = CDF_TOLE2(si->si_count);
+ ssi->si_count = CDF_TOLE4(si->si_count);
*count = 0;
maxcount = 0;
*info = NULL;
- for (i = 0; i < CDF_TOLE4(si->si_count); i++) {
- if (i >= CDF_LOOP_LIMIT) {
- DPRINTF(("Unpack summary info loop limit"));
- errno = EFTYPE;
+ if (cdf_read_property_info(sst, h, CDF_TOLE4(sd->sd_offset), info,
+ count, &maxcount) == -1)
return -1;
- }
- if (cdf_read_property_info(sst, h, CDF_TOLE4(sd->sd_offset),
- info, count, &maxcount) == -1) {
- return -1;
- }
- }
return 0;
}
diff --git a/ext/fileinfo/libmagic/cdf.h b/ext/fileinfo/libmagic/cdf.h
index 70eb51946..00131e02f 100644
--- a/ext/fileinfo/libmagic/cdf.h
+++ b/ext/fileinfo/libmagic/cdf.h
@@ -300,7 +300,8 @@ int cdf_read_dir(const cdf_info_t *, const cdf_header_t *, const cdf_sat_t *,
int cdf_read_ssat(const cdf_info_t *, const cdf_header_t *, const cdf_sat_t *,
cdf_sat_t *);
int cdf_read_short_stream(const cdf_info_t *, const cdf_header_t *,
- const cdf_sat_t *, const cdf_dir_t *, cdf_stream_t *);
+ const cdf_sat_t *, const cdf_dir_t *, cdf_stream_t *,
+ const cdf_directory_t **);
int cdf_read_property_info(const cdf_stream_t *, const cdf_header_t *, uint32_t,
cdf_property_info_t **, size_t *, size_t *);
int cdf_read_summary_info(const cdf_info_t *, const cdf_header_t *,
diff --git a/ext/fileinfo/libmagic/readcdf.c b/ext/fileinfo/libmagic/readcdf.c
index 1600625eb..ec97ced44 100644
--- a/ext/fileinfo/libmagic/readcdf.c
+++ b/ext/fileinfo/libmagic/readcdf.c
@@ -26,7 +26,7 @@
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: readcdf.c,v 1.37 2014/01/06 13:41:18 rrt Exp $")
+FILE_RCSID("@(#)$File: readcdf.c,v 1.40 2014/03/06 15:23:33 christos Exp $")
#endif
#include <stdlib.h>
@@ -77,6 +77,40 @@ static const struct nv {
# define strcasestr strstr
#endif
+static const struct cv {
+ uint64_t clsid[2];
+ const char *mime;
+} clsid2mime[] = {
+ {
+#ifdef PHP_WIN32
+ { 0x00000000000c1084ui64, 0x46000000000000c0ui64 },
+#else
+ { 0x00000000000c1084LLU, 0x46000000000000c0LLU },
+#endif
+ "x-msi",
+ }
+}, clsid2desc[] = {
+ {
+#ifdef PHP_WIN32
+ { 0x00000000000c1084ui64, 0x46000000000000c0ui64 },
+#else
+ { 0x00000000000c1084LLU, 0x46000000000000c0LLU },
+#endif
+ "MSI Installer",
+ },
+};
+
+private const char *
+cdf_clsid_to_mime(const uint64_t clsid[2], const struct cv *cv)
+{
+ size_t i;
+ for (i = 0; cv[i].mime != NULL; i++) {
+ if (clsid[0] == cv[i].clsid[0] && clsid[1] == cv[i].clsid[1])
+ return cv[i].mime;
+ }
+ return NULL;
+}
+
private const char *
cdf_app_to_mime(const char *vbuf, const struct nv *nv)
{
@@ -95,7 +129,7 @@ cdf_app_to_mime(const char *vbuf, const struct nv *nv)
private int
cdf_file_property_info(struct magic_set *ms, const cdf_property_info_t *info,
- size_t count)
+ size_t count, const cdf_directory_t *root_storage)
{
size_t i;
cdf_timestamp_t tp;
@@ -107,6 +141,9 @@ cdf_file_property_info(struct magic_set *ms, const cdf_property_info_t *info,
memset(&ts, 0, sizeof(ts));
+ if (!NOTMIME(ms) && root_storage)
+ str = cdf_clsid_to_mime(root_storage->d_storage_uuid, clsid2mime);
+
for (i = 0; i < count; i++) {
cdf_print_property_name(buf, sizeof(buf), info[i].pi_id);
switch (info[i].pi_type) {
@@ -163,7 +200,7 @@ cdf_file_property_info(struct magic_set *ms, const cdf_property_info_t *info,
buf, vbuf) == -1)
return -1;
}
- } else if (info[i].pi_id ==
+ } else if (str == NULL && info[i].pi_id ==
CDF_PROPERTY_NAME_OF_APPLICATION) {
str = cdf_app_to_mime(vbuf, app2mime);
}
@@ -217,7 +254,7 @@ cdf_file_property_info(struct magic_set *ms, const cdf_property_info_t *info,
private int
cdf_file_summary_info(struct magic_set *ms, const cdf_header_t *h,
- const cdf_stream_t *sst)
+ const cdf_stream_t *sst, const cdf_directory_t *root_storage)
{
cdf_summary_info_header_t si;
cdf_property_info_t *info;
@@ -228,6 +265,8 @@ cdf_file_summary_info(struct magic_set *ms, const cdf_header_t *h,
return -1;
if (NOTMIME(ms)) {
+ const char *str;
+
if (file_printf(ms, "Composite Document File V2 Document")
== -1)
return -1;
@@ -255,9 +294,15 @@ cdf_file_summary_info(struct magic_set *ms, const cdf_header_t *h,
return -2;
break;
}
- }
+ if (root_storage) {
+ str = cdf_clsid_to_mime(root_storage->d_storage_uuid, clsid2desc);
+ if (str)
+ if (file_printf(ms, ", %s", str) == -1)
+ return -2;
+ }
+ }
- m = cdf_file_property_info(ms, info, count);
+ m = cdf_file_property_info(ms, info, count, root_storage);
free(info);
return m == -1 ? -2 : m;
@@ -275,6 +320,7 @@ file_trycdf(struct magic_set *ms, int fd, const unsigned char *buf,
int i;
const char *expn = "";
const char *corrupt = "corrupt: ";
+ const cdf_directory_t *root_storage;
info.i_fd = fd;
info.i_buf = buf;
@@ -308,7 +354,8 @@ file_trycdf(struct magic_set *ms, int fd, const unsigned char *buf,
goto out2;
}
- if ((i = cdf_read_short_stream(&info, &h, &sat, &dir, &sst)) == -1) {
+ if ((i = cdf_read_short_stream(&info, &h, &sat, &dir, &sst,
+ &root_storage)) == -1) {
expn = "Cannot read short stream";
goto out3;
}
@@ -329,23 +376,21 @@ file_trycdf(struct magic_set *ms, int fd, const unsigned char *buf,
#ifdef CDF_DEBUG
cdf_dump_summary_info(&h, &scn);
#endif
- if ((i = cdf_file_summary_info(ms, &h, &scn)) < 0)
- expn = "Can't expand summary_info";
+ if ((i = cdf_file_summary_info(ms, &h, &scn, root_storage)) < 0)
+ expn = "Can't expand summary_info";
+
if (i == 0) {
const char *str = NULL;
cdf_directory_t *d;
char name[__arraycount(d->d_name)];
size_t j, k;
- for (j = 0; j < dir.dir_len; j++) {
+
+ for (j = 0; str == NULL && j < dir.dir_len; j++) {
d = &dir.dir_tab[j];
for (k = 0; k < sizeof(name); k++)
name[k] = (char)cdf_tole2(d->d_name[k]);
- if (NOTMIME(ms))
- str = cdf_app_to_mime(name, name2desc);
- else
- str = cdf_app_to_mime(name, name2mime);
- if (str != NULL)
- break;
+ str = cdf_app_to_mime(name,
+ NOTMIME(ms) ? name2desc : name2mime);
}
if (NOTMIME(ms)) {
if (str != NULL) {
diff --git a/ext/intl/tests/dateformat_format.phpt b/ext/intl/tests/dateformat_format.phpt
index 8b410876c..f9a90684d 100644
--- a/ext/intl/tests/dateformat_format.phpt
+++ b/ext/intl/tests/dateformat_format.phpt
@@ -318,7 +318,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',
))
@@ -326,7 +326,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',
))
@@ -334,7 +334,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',
))
@@ -342,7 +342,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',
))
@@ -350,7 +350,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',
))
@@ -358,7 +358,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' => 2,
'timezone' => 'PDT',
))
@@ -366,7 +366,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' => 2,
'timezone' => 'PDT',
))
@@ -374,7 +374,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' => 2,
'timezone' => 'PDT',
))
@@ -382,7 +382,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' => 2,
'timezone' => 'PDT',
))
@@ -390,7 +390,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' => 2,
'timezone' => 'PDT',
))
diff --git a/ext/intl/tests/dateformat_format_variant2.phpt b/ext/intl/tests/dateformat_format_variant2.phpt
index eb606a53d..07c67e932 100644
--- a/ext/intl/tests/dateformat_format_variant2.phpt
+++ b/ext/intl/tests/dateformat_format_variant2.phpt
@@ -318,7 +318,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',
))
@@ -326,7 +326,7 @@ Date is: DateTime::__set_state(array(
Formatted DateTime is : Thursday, December 31, 2009 at 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',
))
@@ -334,7 +334,7 @@ Date is: DateTime::__set_state(array(
Formatted DateTime is : December 31, 2009 at 3:02:03 PM GMT-10
------------
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',
))
@@ -342,7 +342,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',
))
@@ -350,7 +350,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',
))
@@ -358,7 +358,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',
))
@@ -366,7 +366,7 @@ Date is: DateTime::__set_state(array(
Formatted DateTime is : Saturday, December 30, 2000 at 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',
))
@@ -374,7 +374,7 @@ Date is: DateTime::__set_state(array(
Formatted DateTime is : December 30, 2000 at 5:04:05 PM GMT-10
------------
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',
))
@@ -382,7 +382,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',
))
@@ -390,7 +390,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/dateformat_format_variant3.phpt b/ext/intl/tests/dateformat_format_variant3.phpt
index 40d49c8dc..d770473f4 100644
--- a/ext/intl/tests/dateformat_format_variant3.phpt
+++ b/ext/intl/tests/dateformat_format_variant3.phpt
@@ -318,7 +318,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',
))
@@ -326,7 +326,7 @@ Date is: DateTime::__set_state(array(
Formatted DateTime is : Thursday, December 31, 2009 at 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',
))
@@ -334,7 +334,7 @@ Date is: DateTime::__set_state(array(
Formatted DateTime is : December 31, 2009 at 3:02:03 PM GMT-10
------------
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',
))
@@ -342,7 +342,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',
))
@@ -350,7 +350,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',
))
@@ -358,7 +358,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' => 2,
'timezone' => 'PDT',
))
@@ -366,7 +366,7 @@ Date is: DateTime::__set_state(array(
Formatted DateTime is : Saturday, December 30, 2000 at 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' => 2,
'timezone' => 'PDT',
))
@@ -374,7 +374,7 @@ Date is: DateTime::__set_state(array(
Formatted DateTime is : December 30, 2000 at 5:04:05 PM GMT-10
------------
Date is: DateTime::__set_state(array(
- 'date' => '2000-12-30 19:04:05',
+ 'date' => '2000-12-30 19:04:05.000000',
'timezone_type' => 2,
'timezone' => 'PDT',
))
@@ -382,7 +382,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' => 2,
'timezone' => 'PDT',
))
@@ -390,7 +390,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' => 2,
'timezone' => 'PDT',
))
diff --git a/ext/opcache/Optimizer/pass1_5.c b/ext/opcache/Optimizer/pass1_5.c
index 577d1b660..30705ff18 100644
--- a/ext/opcache/Optimizer/pass1_5.c
+++ b/ext/opcache/Optimizer/pass1_5.c
@@ -25,6 +25,9 @@ if (ZEND_OPTIMIZER_PASS_1 & OPTIMIZATION_LEVEL) {
case ZEND_MUL:
case ZEND_DIV:
case ZEND_MOD:
+#if ZEND_EXTENSION_API_NO >= PHP_5_6_X_API_NO
+ case ZEND_POW:
+#endif
case ZEND_SL:
case ZEND_SR:
case ZEND_CONCAT:
diff --git a/ext/opcache/Optimizer/pass3.c b/ext/opcache/Optimizer/pass3.c
index fd2a19000..1ee641ca5 100644
--- a/ext/opcache/Optimizer/pass3.c
+++ b/ext/opcache/Optimizer/pass3.c
@@ -45,6 +45,9 @@ if (ZEND_OPTIMIZER_PASS_3 & OPTIMIZATION_LEVEL) {
case ZEND_MUL:
case ZEND_DIV:
case ZEND_MOD:
+#if ZEND_EXTENSION_API_NO >= PHP_5_6_X_API_NO
+ case ZEND_POW:
+#endif
case ZEND_CONCAT:
case ZEND_SL:
case ZEND_SR:
@@ -104,6 +107,11 @@ if (ZEND_OPTIMIZER_PASS_3 & OPTIMIZATION_LEVEL) {
case ZEND_MOD:
opline->opcode = ZEND_ASSIGN_MOD;
break;
+#if ZEND_EXTENSION_API_NO >= PHP_5_6_X_API_NO
+ case ZEND_POW:
+ opline->opcode = ZEND_ASSIGN_POW;
+ break;
+#endif
case ZEND_CONCAT:
opline->opcode = ZEND_ASSIGN_CONCAT;
break;
diff --git a/ext/opcache/Optimizer/zend_optimizer.c b/ext/opcache/Optimizer/zend_optimizer.c
index 973ba3aaa..fc7d0a29b 100644
--- a/ext/opcache/Optimizer/zend_optimizer.c
+++ b/ext/opcache/Optimizer/zend_optimizer.c
@@ -367,20 +367,41 @@ static void replace_tmp_by_const(zend_op_array *op_array,
if (ZEND_OP1_TYPE(opline) == IS_TMP_VAR &&
ZEND_OP1(opline).var == var) {
- update_op1_const(op_array, opline, val TSRMLS_CC);
- /* TMP_VAR my be used only once */
- break;
+ /* In most cases IS_TMP_VAR operand may be used only once.
+ * The operands are usually destroyed by the opcode handler.
+ * ZEND_CASE is an exception, that keeps operand unchanged,
+ * and allows its reuse. The number of ZEND_CASE instructions
+ * usually terminated by ZEND_FREE that finally kills the value.
+ */
+ if (opline->opcode == ZEND_CASE) {
+ zval old_val;
+ old_val = *val;
+ zval_copy_ctor(val);
+ update_op1_const(op_array, opline, val TSRMLS_CC);
+ *val = old_val;
+ } else if (opline->opcode == ZEND_FREE) {
+ MAKE_NOP(opline);
+ break;
+ } else {
+ update_op1_const(op_array, opline, val TSRMLS_CC);
+ val = NULL;
+ break;
+ }
}
if (ZEND_OP2_TYPE(opline) == IS_TMP_VAR &&
ZEND_OP2(opline).var == var) {
update_op2_const(op_array, opline, val TSRMLS_CC);
- /* TMP_VAR my be used only once */
+ /* TMP_VAR may be used only once */
+ val = NULL;
break;
}
opline++;
}
+ if (val) {
+ zval_dtor(val);
+ }
}
#include "Optimizer/nop_removal.c"
diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h
index d3fa38ea6..a25e76624 100644
--- a/ext/opcache/ZendAccelerator.h
+++ b/ext/opcache/ZendAccelerator.h
@@ -93,6 +93,7 @@
#define PHP_5_3_X_API_NO 220090626
#define PHP_5_4_X_API_NO 220100525
#define PHP_5_5_X_API_NO 220121212
+#define PHP_5_6_X_API_NO 220131226
/*** file locking ***/
#ifndef ZEND_WIN32
diff --git a/ext/opcache/tests/issue0183.phpt b/ext/opcache/tests/issue0183.phpt
new file mode 100644
index 000000000..9e18f6d2e
--- /dev/null
+++ b/ext/opcache/tests/issue0183.phpt
@@ -0,0 +1,25 @@
+--TEST--
+ISSUE #183 (TMP_VAR is not only used once)
+--INI--
+opcache.enable=1
+opcache.enable_cli=1
+opcache.optimization_level=-1
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+<?php if (PHP_OS != "Linux") die("skip, only for linux"); ?>
+--FILE--
+<?php
+
+switch (PHP_OS) {
+ case "Windows":
+ break;
+ case "Darwin":
+ break;
+ case "Linux":
+ echo "okey";
+ break;
+ default:
+ break;
+}
+--EXPECT--
+okey
diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c
index 17f8e8798..fdc21d6c5 100644
--- a/ext/opcache/zend_persist.c
+++ b/ext/opcache/zend_persist.c
@@ -686,6 +686,12 @@ static int zend_update_parent_ce(zend_class_entry **pce TSRMLS_DC)
ce->__callstatic->op_array.refcount++;
}
#endif
+#if ZEND_EXTENSION_API_NO >= PHP_5_6_X_API_NO
+ if (ce->__debugInfo) {
+ ce->__debugInfo = zend_shared_alloc_get_xlat_entry(ce->__debugInfo);
+ ce->__debugInfo->op_array.refcount++;
+ }
+#endif
zend_hash_apply(&ce->properties_info, (apply_func_t) zend_update_property_info_ce TSRMLS_CC);
return 0;
}
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/spl/spl_array.c b/ext/spl/spl_array.c
index 0611cfe38..f450e0b71 100644
--- a/ext/spl/spl_array.c
+++ b/ext/spl/spl_array.c
@@ -603,7 +603,7 @@ static int spl_array_has_dimension_ex(int check_inherited, zval *object, zval *o
if (rv && zend_is_true(rv)) {
zval_ptr_dtor(&rv);
- if (check_empty == 2) {
+ if (check_empty != 1) {
return 1;
} else if (intern->fptr_offset_get) {
value = spl_array_read_dimension_ex(1, object, offset, BP_VAR_R TSRMLS_CC);
@@ -629,6 +629,7 @@ static int spl_array_has_dimension_ex(int check_inherited, zval *object, zval *o
return 0;
}
break;
+
case IS_DOUBLE:
case IS_RESOURCE:
case IS_BOOL:
@@ -646,28 +647,20 @@ static int spl_array_has_dimension_ex(int check_inherited, zval *object, zval *o
return 0;
}
break;
+
default:
zend_error(E_WARNING, "Illegal offset type");
return 0;
}
- if (check_inherited && intern->fptr_offset_get) {
+ if (check_empty && check_inherited && intern->fptr_offset_get) {
value = spl_array_read_dimension_ex(1, object, offset, BP_VAR_R TSRMLS_CC);
} else {
value = *tmp;
}
}
- switch (check_empty) {
- case 0:
- return Z_TYPE_P(value) != IS_NULL;
- case 2:
- return 1;
- case 1:
- return zend_is_true(value);
- }
-
- return 0;
+ return check_empty ? zend_is_true(value) : Z_TYPE_P(value) != IS_NULL;
} /* }}} */
static int spl_array_has_dimension(zval *object, zval *offset, int check_empty TSRMLS_DC) /* {{{ */
@@ -938,7 +931,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 {
diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c
index 03315b7bb..4159d1ae3 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 679fc85af..cade34efd 100644
--- a/ext/spl/spl_iterators.c
+++ b/ext/spl/spl_iterators.c
@@ -848,6 +848,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/tests/bug66834.phpt b/ext/spl/tests/bug66834.phpt
index 6d944b274..66686c771 100644
--- a/ext/spl/tests/bug66834.phpt
+++ b/ext/spl/tests/bug66834.phpt
@@ -75,14 +75,13 @@ var_dump($object->offsetexists('qux'), isset($object['qux']), empty($object['qux
echo "==== class with offsetGet() and offsetSet() ====\n";
$object = new ArrayObjectGetSet;
$object['foo'] = 42;
-var_dump($object->offsetExists('foo'), $object->offsetExists('sbb'), isset($object['foo']), isset($object['sbb']));
+var_dump($object->offsetExists('foo'), $object->offsetExists('sbb'), isset($object['foo']), isset($object['sbb']), empty($object['sbb']));
?>
--EXPECTF--
==== class with offsetExists() and offsetGet() ====
string(37) "Called: ArrayObjectBoth::offsetExists"
string(37) "Called: ArrayObjectBoth::offsetExists"
-string(34) "Called: ArrayObjectBoth::offsetGet"
string(37) "Called: ArrayObjectBoth::offsetExists"
string(34) "Called: ArrayObjectBoth::offsetGet"
bool(true)
@@ -90,15 +89,13 @@ bool(true)
bool(true)
string(37) "Called: ArrayObjectBoth::offsetExists"
string(37) "Called: ArrayObjectBoth::offsetExists"
-string(34) "Called: ArrayObjectBoth::offsetGet"
string(37) "Called: ArrayObjectBoth::offsetExists"
string(34) "Called: ArrayObjectBoth::offsetGet"
bool(true)
-bool(false)
+bool(true)
bool(true)
string(37) "Called: ArrayObjectBoth::offsetExists"
string(37) "Called: ArrayObjectBoth::offsetExists"
-string(34) "Called: ArrayObjectBoth::offsetGet"
string(37) "Called: ArrayObjectBoth::offsetExists"
string(34) "Called: ArrayObjectBoth::offsetGet"
bool(true)
@@ -121,7 +118,7 @@ string(39) "Called: ArrayObjectExists::offsetExists"
string(39) "Called: ArrayObjectExists::offsetExists"
string(39) "Called: ArrayObjectExists::offsetExists"
bool(true)
-bool(false)
+bool(true)
bool(true)
string(39) "Called: ArrayObjectExists::offsetExists"
string(39) "Called: ArrayObjectExists::offsetExists"
@@ -137,17 +134,14 @@ bool(false)
bool(true)
==== class with offsetGet() ====
string(33) "Called: ArrayObjectGet::offsetGet"
-string(33) "Called: ArrayObjectGet::offsetGet"
bool(true)
bool(true)
bool(true)
string(33) "Called: ArrayObjectGet::offsetGet"
-string(33) "Called: ArrayObjectGet::offsetGet"
bool(true)
bool(false)
bool(true)
string(33) "Called: ArrayObjectGet::offsetGet"
-string(33) "Called: ArrayObjectGet::offsetGet"
bool(true)
bool(true)
bool(false)
@@ -160,4 +154,5 @@ Notice: Undefined index: foo in %s on line %d
bool(false)
bool(true)
bool(false)
-bool(false)
+bool(true)
+bool(true)
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/standard/formatted_print.c b/ext/standard/formatted_print.c
index 3cd583931..2592b1655 100644
--- a/ext/standard/formatted_print.c
+++ b/ext/standard/formatted_print.c
@@ -376,6 +376,7 @@ php_formatted_print(int ht, int *len, int use_array, int format_offset TSRMLS_DC
int alignment, currarg, adjusting, argnum, width, precision;
char *format, *result, padding;
int always_sign;
+ int format_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "+", &args, &argc) == FAILURE) {
return NULL;
@@ -414,11 +415,12 @@ php_formatted_print(int ht, int *len, int use_array, int format_offset TSRMLS_DC
convert_to_string_ex(args[format_offset]);
format = Z_STRVAL_PP(args[format_offset]);
+ format_len = Z_STRLEN_PP(args[format_offset]);
result = emalloc(size);
currarg = 1;
- while (inpos<Z_STRLEN_PP(args[format_offset])) {
+ while (inpos<format_len) {
int expprec = 0, multiuse = 0;
zval *tmp;
@@ -473,7 +475,7 @@ php_formatted_print(int ht, int *len, int use_array, int format_offset TSRMLS_DC
/* space padding, the default */
} else if (format[inpos] == '+') {
always_sign = 1;
- } else if (format[inpos] == '\'') {
+ } else if (format[inpos] == '\'' && inpos+1<format_len) {
padding = format[++inpos];
} else {
PRINTF_DEBUG(("sprintf: end of modifiers\n"));
diff --git a/ext/standard/tests/strings/bug67249.phpt b/ext/standard/tests/strings/bug67249.phpt
new file mode 100644
index 000000000..6ea75289e
--- /dev/null
+++ b/ext/standard/tests/strings/bug67249.phpt
@@ -0,0 +1,8 @@
+--TEST--
+Bug #67249 (printf out-of-bounds read)
+--FILE--
+<?php
+var_dump(sprintf("%'", "foo"));
+?>
+--EXPECT--
+string(0) ""
diff --git a/main/php_version.h b/main/php_version.h
index 84bcafd3e..9f5f55ec9 100644
--- a/main/php_version.h
+++ b/main/php_version.h
@@ -3,6 +3,6 @@
#define PHP_MAJOR_VERSION 5
#define PHP_MINOR_VERSION 6
#define PHP_RELEASE_VERSION 0
-#define PHP_EXTRA_VERSION "beta3"
-#define PHP_VERSION "5.6.0beta3"
+#define PHP_EXTRA_VERSION "beta4"
+#define PHP_VERSION "5.6.0beta4"
#define PHP_VERSION_ID 50600
diff --git a/run-tests.php b/run-tests.php
index f4e1599c5..1b5bcec25 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -581,8 +581,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-(\d)\.(\d)\.(\d+)([.\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);
@@ -1356,6 +1356,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';
}
@@ -1535,7 +1536,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';
}
@@ -1560,7 +1561,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';
}
@@ -1784,7 +1785,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 {
@@ -2128,7 +2129,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);
@@ -2707,6 +2708,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";
@@ -2723,16 +2728,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/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
index fc121839e..93fdbd742 100644
--- a/sapi/phpdbg/phpdbg.c
+++ b/sapi/phpdbg/phpdbg.c
@@ -159,8 +159,6 @@ static PHP_RINIT_FUNCTION(phpdbg) /* {{{ */
zend_hash_init(&PHPDBG_G(bp)[PHPDBG_BREAK_COND], 8, NULL, php_phpdbg_destroy_bp_condition, 0);
zend_hash_init(&PHPDBG_G(bp)[PHPDBG_BREAK_MAP], 8, NULL, NULL, 0);
- phpdbg_setup_watchpoints(TSRMLS_C);
-
zend_hash_init(&PHPDBG_G(seek), 8, NULL, NULL, 0);
zend_hash_init(&PHPDBG_G(registered), 8, NULL, php_phpdbg_destroy_registered, 0);
@@ -879,6 +877,32 @@ void phpdbg_signal_handler(int sig, siginfo_t *info, void *context) {
}
#endif
+static inline zend_mm_heap *phpdbg_mm_get_heap() {
+ zend_mm_heap *mm_heap;
+
+ TSRMLS_FETCH();
+
+ mm_heap = zend_mm_set_heap(NULL TSRMLS_CC);
+ zend_mm_set_heap(mm_heap TSRMLS_CC);
+
+ return mm_heap;
+}
+
+void *phpdbg_malloc_wrapper(size_t size)
+{
+ return zend_mm_alloc(phpdbg_mm_get_heap(), size);
+}
+
+void phpdbg_free_wrapper(void *p)
+{
+ zend_mm_free(phpdbg_mm_get_heap(), p);
+}
+
+void *phpdbg_realloc_wrapper(void *ptr, size_t size)
+{
+ return zend_mm_realloc(phpdbg_mm_get_heap(), ptr, size);
+}
+
int main(int argc, char **argv) /* {{{ */
{
sapi_module_struct *phpdbg = &phpdbg_sapi_module;
@@ -1221,23 +1245,22 @@ phpdbg_main:
EXCEPTION_POINTERS *xp;
__try {
#endif
- zend_mm_heap *mm_heap = zend_mm_set_heap(NULL TSRMLS_CC);
-#if ZEND_DEBUG
- if (!mm_heap->use_zend_alloc) {
- mm_heap->_malloc = malloc;
- mm_heap->_realloc = realloc;
- mm_heap->_free = free;
-#endif
- PHPDBG_G(original_free_function) = mm_heap->_free;
- mm_heap->_free = phpdbg_watch_efree;
+ zend_mm_heap *mm_heap = phpdbg_mm_get_heap();
+
+ if (mm_heap->use_zend_alloc) {
+ mm_heap->_malloc = phpdbg_malloc_wrapper;
+ mm_heap->_realloc = phpdbg_realloc_wrapper;
+ mm_heap->_free = phpdbg_free_wrapper;
mm_heap->use_zend_alloc = 0;
-#if ZEND_DEBUG
}
-#endif
- zend_mm_set_heap(mm_heap TSRMLS_CC);
zend_activate(TSRMLS_C);
+ PHPDBG_G(original_free_function) = mm_heap->_free;
+ mm_heap->_free = phpdbg_watch_efree;
+
+ phpdbg_setup_watchpoints(TSRMLS_C);
+
#if defined(ZEND_SIGNALS) && !defined(_WIN32)
zend_try {
zend_signal_activate(TSRMLS_C);
diff --git a/sapi/phpdbg/phpdbg_watch.c b/sapi/phpdbg/phpdbg_watch.c
index 2efbb1237..e88622444 100644
--- a/sapi/phpdbg/phpdbg_watch.c
+++ b/sapi/phpdbg/phpdbg_watch.c
@@ -580,7 +580,7 @@ void phpdbg_setup_watchpoints(TSRMLS_D) {
zend_llist_init(&PHPDBG_G(watchlist_mem), sizeof(void *), phpdbg_watch_mem_dtor, 1);
phpdbg_btree_init(&PHPDBG_G(watchpoint_tree), sizeof(void *) * 8);
phpdbg_btree_init(&PHPDBG_G(watch_HashTables), sizeof(void *) * 8);
- _zend_hash_init(&PHPDBG_G(watchpoints), 8, phpdbg_watch_dtor, 0 ZEND_FILE_LINE_CC);
+ zend_hash_init(&PHPDBG_G(watchpoints), 8, NULL, phpdbg_watch_dtor, 0 ZEND_FILE_LINE_CC);
}
static void phpdbg_print_changed_zval(phpdbg_watch_memdump *dump TSRMLS_DC) {
diff --git a/sapi/phpdbg/tests/commands/0002_set.test b/sapi/phpdbg/tests/commands/0002_set.test
index 7720f94ff..468ac6d9e 100644
--- a/sapi/phpdbg/tests/commands/0002_set.test
+++ b/sapi/phpdbg/tests/commands/0002_set.test
@@ -9,7 +9,6 @@
# setting notice color
# Failed to find breakpoint #0
# oplog disabled
-# not enabled
# opened oplog test.log
# nothing
#################################################
@@ -19,5 +18,4 @@ set color notice none
set prompt promot>
set break 0
set oplog
-set oplog 0
set oplog test.log
diff --git a/sapi/phpdbg/tests/commands/0103_register.test b/sapi/phpdbg/tests/commands/0103_register.test
index 38841591c..703a12f77 100644
--- a/sapi/phpdbg/tests/commands/0103_register.test
+++ b/sapi/phpdbg/tests/commands/0103_register.test
@@ -7,15 +7,15 @@
#[Registered test_function]
#array(5) {
# [0]=>
-# string(1) "1"
+# int(1)
# [1]=>
-# string(1) "2"
+# int(2)
# [2]=>
-# string(1) "3"
+# int(3)
# [3]=>
-# string(1) "4"
+# int(4)
# [4]=>
-# string(1) "5"
+# int(5)
#}
#################################################
<:
diff --git a/sapi/phpdbg/tests/commands/0106_compile.test b/sapi/phpdbg/tests/commands/0106_compile.test
index d79211ddf..7193600ea 100644
--- a/sapi/phpdbg/tests/commands/0106_compile.test
+++ b/sapi/phpdbg/tests/commands/0106_compile.test
@@ -14,6 +14,5 @@ define('OUT',
file_put_contents(OUT, "<?php echo \"Hello World\"; ?>");
phpdbg_exec(OUT);
:>
-compile
run
quit
diff --git a/sapi/phpdbg/tests/run-tests.php b/sapi/phpdbg/tests/run-tests.php
index 1fb6fa122..47a998cca 100644
--- a/sapi/phpdbg/tests/run-tests.php
+++ b/sapi/phpdbg/tests/run-tests.php
@@ -284,6 +284,8 @@ namespace phpdbg\testing {
$test->purpose,
$result ? "PASS" : "FAIL",
PHP_EOL);
+
+ return $result;
}
protected $config;
@@ -426,7 +428,7 @@ namespace phpdbg\testing {
*/
public function getResult() {
$options = sprintf(
- '-i%s -qb', $this->file);
+ '-i%s -nqb', $this->file);
if ($this->options) {
$options = sprintf(
@@ -492,13 +494,18 @@ namespace phpdbg\testing {
*
*/
protected function writeDiff() {
- $diff = sprintf(
- '%s/%s.diff',
- dirname($this->file), basename($this->file));
-
if (count($this->diff['wants'])) {
- if (!in_array('nodiff', $this->config['flags'])) {
- if (($diff = fopen($diff, 'w+'))) {
+ if (!$this->config->hasFlag('nodiff')) {
+ if ($this->config->hasFlag('diff2stdout')) {
+ $difffile = "php://stdout";
+ file_put_contents($difffile, "====DIFF====\n");
+ } else {
+ $difffile = sprintf(
+ '%s/%s.diff',
+ dirname($this->file), basename($this->file));
+ }
+
+ if (($diff = fopen($difffile, 'w+'))) {
foreach ($this->diff['wants'] as $line => $want) {
$got = $this->diff['gets'][$line];
@@ -552,6 +559,9 @@ namespace {
$cwd = dirname(__FILE__);
$cmd = $_SERVER['argv'];
+
+ $retval = 0;
+
{
$config = new TestsConfiguration(array(
'exec' => realpath(array_shift($cmd)),
@@ -571,7 +581,7 @@ namespace {
$tests->logPath($path);
foreach ($tests->findTests($path) as $test) {
- $tests->logTest($path, $test);
+ $retval |= !$tests->logTest($path, $test);
}
$tests->logPathStats($path);
@@ -579,5 +589,7 @@ namespace {
$tests->logStats();
}
+
+ die($retval);
}
?>