From 1e45b50d77e4e29db1e3941516872accd64c46c0 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Mon, 21 Mar 2022 14:15:44 +0100 Subject: [PATCH] Fix #8232 - always reference classes in `var_export()` via their FQCN This fix corrects a behavior of `var_export()` that was mostly "hidden" until PHP 8.1 introduced: * properties with object initializers * constants containing object references * default values of class properties containing `enum`s Since `var_export(..., true)` is mostly used in conjunction with code generation, and we cannot make assumptions about the generated code being placed in the root namespace, we must always provide the FQCN of a class in exported code. For example: ```php --EXPECTF-- -Exception::__set_state(array( +\Exception::__set_state(array( 'message' => '', 'string' => 'Exception in %sbug73350.php:%d Stack trace: @@ -20,7 +20,7 @@ Stack trace: 'code' => 0, 'file' => '%sbug73350.php', 'line' => %d, - 'trace' => + 'trace' => array ( ), 'previous' => NULL, diff --git a/Zend/tests/enum/enum-in-var-export.phpt b/Zend/tests/enum/enum-in-var-export.phpt new file mode 100644 index 0000000000000..4650861f513d0 --- /dev/null +++ b/Zend/tests/enum/enum-in-var-export.phpt @@ -0,0 +1,28 @@ +--TEST-- +Enum in var_export() +--FILE-- + +--EXPECT-- +\Foo::BAR +\A\Foo::BAR +\A\B\Foo::BAR diff --git a/ext/date/tests/bug52113.phpt b/ext/date/tests/bug52113.phpt index f6d0962625db4..84cd1b5210157 100644 --- a/ext/date/tests/bug52113.phpt +++ b/ext/date/tests/bug52113.phpt @@ -16,7 +16,7 @@ $diff_un = unserialize($diff_s); $p = new DatePeriod($start, $diff_un, 2); var_dump($diff_un, $p); -$unser = DateInterval::__set_state(array( +$unser = \DateInterval::__set_state(array( 'y' => 7, 'm' => 6, 'd' => 5, @@ -68,7 +68,7 @@ object(DateInterval)#%d (16) { int(0) } string(332) "O:12:"DateInterval":16:{s:1:"y";i:0;s:1:"m";i:0;s:1:"d";i:0;s:1:"h";i:4;s:1:"i";i:0;s:1:"s";i:0;s:1:"f";d:0;s:7:"weekday";i:0;s:16:"weekday_behavior";i:0;s:17:"first_last_day_of";i:0;s:6:"invert";i:0;s:4:"days";i:0;s:12:"special_type";i:0;s:14:"special_amount";i:0;s:21:"have_weekday_relative";i:0;s:21:"have_special_relative";i:0;}" -DateInterval::__set_state(array( +\DateInterval::__set_state(array( 'y' => 0, 'm' => 0, 'd' => 0, diff --git a/ext/intl/tests/dateformat_format.phpt b/ext/intl/tests/dateformat_format.phpt index a545d909b8f12..cc3aa42a41ac5 100644 --- a/ext/intl/tests/dateformat_format.phpt +++ b/ext/intl/tests/dateformat_format.phpt @@ -157,168 +157,168 @@ ut_run(); Input timestamp is : 0 ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 31, 1969 2:00:00 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 31, 1969 2:00:00 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 31, 1969 2:00:00 PM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 12/31/69 2:00 PM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19691231 02:00 PM ------------ Input timestamp is : -1200000 ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 17, 1969 4:40:00 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 17, 1969 4:40:00 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 17, 1969 4:40:00 PM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 12/17/69 4:40 PM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19691217 04:40 PM ------------ Input timestamp is : 1200000 ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, January 14, 1970 11:20:00 AM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : January 14, 1970 11:20:00 AM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Jan 14, 1970 11:20:00 AM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 1/14/70 11:20 AM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19700114 11:20 AM ------------ Input timestamp is : 2200000000 ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Sunday, September 18, 2039 1:06:40 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : September 18, 2039 1:06:40 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Sep 18, 2039 1:06:40 PM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 9/18/39 1:06 PM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 20390918 01:06 PM ------------ Input timestamp is : -2200000000 ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Saturday, April 14, 1900 2:53:20 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : April 14, 1900 2:53:20 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Apr 14, 1900 2:53:20 PM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 4/14/00 2:53 PM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19000414 02:53 PM ------------ Input timestamp is : 90099999 ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, November 8, 1972 9:46:39 AM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : November 8, 1972 9:46:39 AM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Nov 8, 1972 9:46:39 AM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 11/8/72 9:46 AM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19721108 09:46 AM ------------ Input timestamp is : 3600 ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 31, 1969 3:00:00 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 31, 1969 3:00:00 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 31, 1969 3:00:00 PM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 12/31/69 3:00 PM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19691231 03:00 PM ------------ Input timestamp is : -3600 ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 31, 1969 1:00:00 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 31, 1969 1:00:00 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 31, 1969 1:00:00 PM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 12/31/69 1:00 PM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19691231 01:00 PM ------------ -Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_mday : '3' , tm_mon : '3' , tm_year : '105' , +Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_mday : '3' , tm_mon : '3' , tm_year : '105' , ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted localtime_array is : Sunday, April 3, 2005 7:03:24 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted localtime_array is : April 3, 2005 7:03:24 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted localtime_array is : Apr 3, 2005 7:03:24 PM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted localtime_array is : 4/3/05 7:03 PM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted localtime_array is : 20050403 07:03 PM ------------ -Input localtime is : tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_mday : '13' , tm_mon : '4' , tm_year : '205' , +Input localtime is : tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_mday : '13' , tm_mon : '4' , tm_year : '205' , ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted localtime_array is : Wednesday, May 13, 2105 7:05:21 AM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted localtime_array is : May 13, 2105 7:05:21 AM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted localtime_array is : May 13, 2105 7:05:21 AM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted localtime_array is : 5/13/05 7:05 AM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted localtime_array is : 21050513 07:05 AM ------------ -Input localtime is : tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_mday : '17' , tm_mon : '11' , tm_year : '-5' , +Input localtime is : tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_mday : '17' , tm_mon : '11' , tm_year : '-5' , ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted localtime_array is : Tuesday, December 17, 1895 12:13:11 AM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted localtime_array is : December 17, 1895 12:13:11 AM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted localtime_array is : Dec 17, 1895 12:13:11 AM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted localtime_array is : 12/17/95 12:13 AM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted localtime_array is : 18951217 12:13 AM ------------ -Date is: DateTime::__set_state(array( +Date is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 d70e2312564b9..d784c46072468 100644 --- a/ext/intl/tests/dateformat_format_variant2.phpt +++ b/ext/intl/tests/dateformat_format_variant2.phpt @@ -157,168 +157,168 @@ ut_run(); Input timestamp is : 0 ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 31, 1969 at 2:00:00 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 31, 1969 at 2:00:00 PM GMT-10 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 31, 1969, 2:00:00 PM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 12/31/69, 2:00 PM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19691231 02:00 PM ------------ Input timestamp is : -1200000 ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 17, 1969 at 4:40:00 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 17, 1969 at 4:40:00 PM GMT-10 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 17, 1969, 4:40:00 PM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 12/17/69, 4:40 PM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19691217 04:40 PM ------------ Input timestamp is : 1200000 ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, January 14, 1970 at 11:20:00 AM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : January 14, 1970 at 11:20:00 AM GMT-10 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Jan 14, 1970, 11:20:00 AM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 1/14/70, 11:20 AM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19700114 11:20 AM ------------ Input timestamp is : 2200000000 ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Sunday, September 18, 2039 at 1:06:40 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : September 18, 2039 at 1:06:40 PM GMT-10 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Sep 18, 2039, 1:06:40 PM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 9/18/39, 1:06 PM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 20390918 01:06 PM ------------ Input timestamp is : -2200000000 ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Saturday, April 14, 1900 at 2:53:20 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : April 14, 1900 at 2:53:20 PM GMT-10 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Apr 14, 1900, 2:53:20 PM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 4/14/00, 2:53 PM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19000414 02:53 PM ------------ Input timestamp is : 90099999 ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, November 8, 1972 at 9:46:39 AM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : November 8, 1972 at 9:46:39 AM GMT-10 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Nov 8, 1972, 9:46:39 AM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 11/8/72, 9:46 AM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19721108 09:46 AM ------------ Input timestamp is : 3600 ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 31, 1969 at 3:00:00 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 31, 1969 at 3:00:00 PM GMT-10 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 31, 1969, 3:00:00 PM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 12/31/69, 3:00 PM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19691231 03:00 PM ------------ Input timestamp is : -3600 ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 31, 1969 at 1:00:00 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 31, 1969 at 1:00:00 PM GMT-10 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 31, 1969, 1:00:00 PM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 12/31/69, 1:00 PM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19691231 01:00 PM ------------ -Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_mday : '3' , tm_mon : '3' , tm_year : '105' , +Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_mday : '3' , tm_mon : '3' , tm_year : '105' , ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted localtime_array is : Sunday, April 3, 2005 at 7:03:24 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted localtime_array is : April 3, 2005 at 7:03:24 PM GMT-10 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted localtime_array is : Apr 3, 2005, 7:03:24 PM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted localtime_array is : 4/3/05, 7:03 PM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted localtime_array is : 20050403 07:03 PM ------------ -Input localtime is : tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_mday : '13' , tm_mon : '4' , tm_year : '205' , +Input localtime is : tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_mday : '13' , tm_mon : '4' , tm_year : '205' , ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted localtime_array is : Wednesday, May 13, 2105 at 7:05:21 AM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted localtime_array is : May 13, 2105 at 7:05:21 AM GMT-10 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted localtime_array is : May 13, 2105, 7:05:21 AM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted localtime_array is : 5/13/05, 7:05 AM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted localtime_array is : 21050513 07:05 AM ------------ -Input localtime is : tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_mday : '17' , tm_mon : '11' , tm_year : '-5' , +Input localtime is : tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_mday : '17' , tm_mon : '11' , tm_year : '-5' , ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted localtime_array is : Tuesday, December 17, 1895 at 12:13:11 AM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted localtime_array is : December 17, 1895 at 12:13:11 AM GMT-10 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted localtime_array is : Dec 17, 1895, 12:13:11 AM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted localtime_array is : 12/17/95, 12:13 AM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted localtime_array is : 18951217 12:13 AM ------------ -Date is: DateTime::__set_state(array( +Date is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 c8601aadefd88..64948ff937a72 100644 --- a/ext/intl/tests/dateformat_format_variant3.phpt +++ b/ext/intl/tests/dateformat_format_variant3.phpt @@ -157,168 +157,168 @@ ut_run(); Input timestamp is : 0 ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 31, 1969 at 2:00:00 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 31, 1969 at 2:00:00 PM GMT-10 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 31, 1969, 2:00:00 PM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 12/31/69, 2:00 PM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19691231 02:00 PM ------------ Input timestamp is : -1200000 ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 17, 1969 at 4:40:00 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 17, 1969 at 4:40:00 PM GMT-10 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 17, 1969, 4:40:00 PM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 12/17/69, 4:40 PM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19691217 04:40 PM ------------ Input timestamp is : 1200000 ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, January 14, 1970 at 11:20:00 AM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : January 14, 1970 at 11:20:00 AM GMT-10 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Jan 14, 1970, 11:20:00 AM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 1/14/70, 11:20 AM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19700114 11:20 AM ------------ Input timestamp is : 2200000000 ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Sunday, September 18, 2039 at 1:06:40 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : September 18, 2039 at 1:06:40 PM GMT-10 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Sep 18, 2039, 1:06:40 PM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 9/18/39, 1:06 PM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 20390918 01:06 PM ------------ Input timestamp is : -2200000000 ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Saturday, April 14, 1900 at 2:53:20 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : April 14, 1900 at 2:53:20 PM GMT-10 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Apr 14, 1900, 2:53:20 PM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 4/14/00, 2:53 PM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19000414 02:53 PM ------------ Input timestamp is : 90099999 ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, November 8, 1972 at 9:46:39 AM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : November 8, 1972 at 9:46:39 AM GMT-10 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Nov 8, 1972, 9:46:39 AM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 11/8/72, 9:46 AM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19721108 09:46 AM ------------ Input timestamp is : 3600 ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 31, 1969 at 3:00:00 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 31, 1969 at 3:00:00 PM GMT-10 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 31, 1969, 3:00:00 PM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 12/31/69, 3:00 PM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19691231 03:00 PM ------------ Input timestamp is : -3600 ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 31, 1969 at 1:00:00 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 31, 1969 at 1:00:00 PM GMT-10 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 31, 1969, 1:00:00 PM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 12/31/69, 1:00 PM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19691231 01:00 PM ------------ -Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_mday : '3' , tm_mon : '3' , tm_year : '105' , +Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_mday : '3' , tm_mon : '3' , tm_year : '105' , ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted localtime_array is : Sunday, April 3, 2005 at 7:03:24 PM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted localtime_array is : April 3, 2005 at 7:03:24 PM GMT-10 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted localtime_array is : Apr 3, 2005, 7:03:24 PM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted localtime_array is : 4/3/05, 7:03 PM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted localtime_array is : 20050403 07:03 PM ------------ -Input localtime is : tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_mday : '13' , tm_mon : '4' , tm_year : '205' , +Input localtime is : tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_mday : '13' , tm_mon : '4' , tm_year : '205' , ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted localtime_array is : Wednesday, May 13, 2105 at 7:05:21 AM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted localtime_array is : May 13, 2105 at 7:05:21 AM GMT-10 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted localtime_array is : May 13, 2105, 7:05:21 AM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted localtime_array is : 5/13/05, 7:05 AM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted localtime_array is : 21050513 07:05 AM ------------ -Input localtime is : tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_mday : '17' , tm_mon : '11' , tm_year : '-5' , +Input localtime is : tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_mday : '17' , tm_mon : '11' , tm_year : '-5' , ------------ -IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted localtime_array is : Tuesday, December 17, 1895 at 12:13:11 AM GMT-10:00 -IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted localtime_array is : December 17, 1895 at 12:13:11 AM GMT-10 -IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted localtime_array is : Dec 17, 1895, 12:13:11 AM -IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted localtime_array is : 12/17/95, 12:13 AM -IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted localtime_array is : 18951217 12:13 AM ------------ -Date is: DateTime::__set_state(array( +Date is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( '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 is: \DateTime::__set_state(array( 'date' => '2000-12-30 19:04:05.000000', 'timezone_type' => 2, 'timezone' => 'PDT', diff --git a/ext/spl/tests/bug65967.phpt b/ext/spl/tests/bug65967.phpt index e3bb6471c6969..abb83ebf1b330 100644 --- a/ext/spl/tests/bug65967.phpt +++ b/ext/spl/tests/bug65967.phpt @@ -10,5 +10,5 @@ gc_collect_cycles(); var_export($objstore); ?> --EXPECT-- -SplObjectStorage::__set_state(array( +\SplObjectStorage::__set_state(array( )) diff --git a/ext/spl/tests/fixedarray_022.phpt b/ext/spl/tests/fixedarray_022.phpt index c1cff1a926582..c45401bfb8384 100644 --- a/ext/spl/tests/fixedarray_022.phpt +++ b/ext/spl/tests/fixedarray_022.phpt @@ -11,7 +11,7 @@ call_user_func(function () { ?> --EXPECTF-- Warning: var_export does not handle circular references in %s on line 5 -SplFixedArray::__set_state(array( +\SplFixedArray::__set_state(array( 0 => NULL, )) object(SplFixedArray)#2 (1) refcount(4){ diff --git a/ext/spl/tests/fixedarray_023.phpt b/ext/spl/tests/fixedarray_023.phpt index 1d60a2ce6d9f7..9f2506eb2d874 100644 --- a/ext/spl/tests/fixedarray_023.phpt +++ b/ext/spl/tests/fixedarray_023.phpt @@ -18,7 +18,7 @@ call_user_func(function () { Warning: var_export does not handle circular references in %s on line 8 Warning: var_export does not handle circular references in %s on line 8 -SplFixedArray::__set_state(array( +\SplFixedArray::__set_state(array( 0 => NAN, 1 => 0.0, 2 => NULL, @@ -33,4 +33,4 @@ object(SplFixedArray)#2 (4) refcount(6){ *RECURSION* [3]=> *RECURSION* -} \ No newline at end of file +} diff --git a/ext/standard/tests/array/007.phpt b/ext/standard/tests/array/007.phpt index a1c984a18be14..f712b4f2eefa2 100644 --- a/ext/standard/tests/array/007.phpt +++ b/ext/standard/tests/array/007.phpt @@ -247,55 +247,55 @@ array(9) { } -=-=-=-=-=-=-=-=- New functionality from 5.0.0 -=-=-=-=-=-=-=- $a=array ( - '0.1' => - cr::__set_state(array( + '0.1' => + \cr::__set_state(array( 'priv_member' => 9, 'public_member' => 9, )), - '0.5' => - cr::__set_state(array( + '0.5' => + \cr::__set_state(array( 'priv_member' => 12, 'public_member' => 12, )), - 0 => - cr::__set_state(array( + 0 => + \cr::__set_state(array( 'priv_member' => 23, 'public_member' => 23, )), - 1 => - cr::__set_state(array( + 1 => + \cr::__set_state(array( 'priv_member' => 4, 'public_member' => 4, )), - 2 => - cr::__set_state(array( + 2 => + \cr::__set_state(array( 'priv_member' => -15, 'public_member' => -15, )), ); $b=array ( - '0.2' => - cr::__set_state(array( + '0.2' => + \cr::__set_state(array( 'priv_member' => 9, 'public_member' => 9, )), - '0.5' => - cr::__set_state(array( + '0.5' => + \cr::__set_state(array( 'priv_member' => 22, 'public_member' => 22, )), - 0 => - cr::__set_state(array( + 0 => + \cr::__set_state(array( 'priv_member' => 3, 'public_member' => 3, )), - 1 => - cr::__set_state(array( + 1 => + \cr::__set_state(array( 'priv_member' => 4, 'public_member' => 4, )), - 2 => - cr::__set_state(array( + 2 => + \cr::__set_state(array( 'priv_member' => -15, 'public_member' => -15, )), @@ -325,55 +325,55 @@ array(3) { } } $a=array ( - '0.1' => - cr::__set_state(array( + '0.1' => + \cr::__set_state(array( 'priv_member' => 9, 'public_member' => 9, )), - '0.5' => - cr::__set_state(array( + '0.5' => + \cr::__set_state(array( 'priv_member' => 12, 'public_member' => 12, )), - 0 => - cr::__set_state(array( + 0 => + \cr::__set_state(array( 'priv_member' => 23, 'public_member' => 23, )), - 1 => - cr::__set_state(array( + 1 => + \cr::__set_state(array( 'priv_member' => 4, 'public_member' => 4, )), - 2 => - cr::__set_state(array( + 2 => + \cr::__set_state(array( 'priv_member' => -15, 'public_member' => -15, )), ); $b=array ( - '0.2' => - cr::__set_state(array( + '0.2' => + \cr::__set_state(array( 'priv_member' => 9, 'public_member' => 9, )), - '0.5' => - cr::__set_state(array( + '0.5' => + \cr::__set_state(array( 'priv_member' => 22, 'public_member' => 22, )), - 0 => - cr::__set_state(array( + 0 => + \cr::__set_state(array( 'priv_member' => 3, 'public_member' => 3, )), - 1 => - cr::__set_state(array( + 1 => + \cr::__set_state(array( 'priv_member' => 4, 'public_member' => 4, )), - 2 => - cr::__set_state(array( + 2 => + \cr::__set_state(array( 'priv_member' => -15, 'public_member' => -15, )), @@ -403,55 +403,55 @@ array(3) { } } $a=array ( - '0.1' => - cr::__set_state(array( + '0.1' => + \cr::__set_state(array( 'priv_member' => 9, 'public_member' => 9, )), - '0.5' => - cr::__set_state(array( + '0.5' => + \cr::__set_state(array( 'priv_member' => 12, 'public_member' => 12, )), - 0 => - cr::__set_state(array( + 0 => + \cr::__set_state(array( 'priv_member' => 23, 'public_member' => 23, )), - 1 => - cr::__set_state(array( + 1 => + \cr::__set_state(array( 'priv_member' => 4, 'public_member' => 4, )), - 2 => - cr::__set_state(array( + 2 => + \cr::__set_state(array( 'priv_member' => -15, 'public_member' => -15, )), ); $b=array ( - '0.2' => - cr::__set_state(array( + '0.2' => + \cr::__set_state(array( 'priv_member' => 9, 'public_member' => 9, )), - '0.5' => - cr::__set_state(array( + '0.5' => + \cr::__set_state(array( 'priv_member' => 22, 'public_member' => 22, )), - 0 => - cr::__set_state(array( + 0 => + \cr::__set_state(array( 'priv_member' => 3, 'public_member' => 3, )), - 1 => - cr::__set_state(array( + 1 => + \cr::__set_state(array( 'priv_member' => 4, 'public_member' => 4, )), - 2 => - cr::__set_state(array( + 2 => + \cr::__set_state(array( 'priv_member' => -15, 'public_member' => -15, )), @@ -474,55 +474,55 @@ array(2) { } } $a=array ( - '0.1' => - cr::__set_state(array( + '0.1' => + \cr::__set_state(array( 'priv_member' => 9, 'public_member' => 9, )), - '0.5' => - cr::__set_state(array( + '0.5' => + \cr::__set_state(array( 'priv_member' => 12, 'public_member' => 12, )), - 0 => - cr::__set_state(array( + 0 => + \cr::__set_state(array( 'priv_member' => 23, 'public_member' => 23, )), - 1 => - cr::__set_state(array( + 1 => + \cr::__set_state(array( 'priv_member' => 4, 'public_member' => 4, )), - 2 => - cr::__set_state(array( + 2 => + \cr::__set_state(array( 'priv_member' => -15, 'public_member' => -15, )), ); $b=array ( - '0.2' => - cr::__set_state(array( + '0.2' => + \cr::__set_state(array( 'priv_member' => 9, 'public_member' => 9, )), - '0.5' => - cr::__set_state(array( + '0.5' => + \cr::__set_state(array( 'priv_member' => 22, 'public_member' => 22, )), - 0 => - cr::__set_state(array( + 0 => + \cr::__set_state(array( 'priv_member' => 3, 'public_member' => 3, )), - 1 => - cr::__set_state(array( + 1 => + \cr::__set_state(array( 'priv_member' => 4, 'public_member' => 4, )), - 2 => - cr::__set_state(array( + 2 => + \cr::__set_state(array( 'priv_member' => -15, 'public_member' => -15, )), diff --git a/ext/standard/tests/array/array_intersect_1.phpt b/ext/standard/tests/array/array_intersect_1.phpt index 518dfd392f46f..243783d511ea2 100644 --- a/ext/standard/tests/array/array_intersect_1.phpt +++ b/ext/standard/tests/array/array_intersect_1.phpt @@ -65,55 +65,55 @@ echo "end ------------ array_uintersect_uassoc() with method --------\n"; --EXPECTF-- begin ------------ array_uintersect() --------------------------- $a=array ( - '0.1' => - cr::__set_state(array( + '0.1' => + \cr::__set_state(array( 'priv_member' => 9, 'public_member' => 9, )), - '0.5' => - cr::__set_state(array( + '0.5' => + \cr::__set_state(array( 'priv_member' => 12, 'public_member' => 12, )), - 0 => - cr::__set_state(array( + 0 => + \cr::__set_state(array( 'priv_member' => 23, 'public_member' => 23, )), - 1 => - cr::__set_state(array( + 1 => + \cr::__set_state(array( 'priv_member' => 4, 'public_member' => 4, )), - 2 => - cr::__set_state(array( + 2 => + \cr::__set_state(array( 'priv_member' => -15, 'public_member' => -15, )), ); $b=array ( - '0.2' => - cr::__set_state(array( + '0.2' => + \cr::__set_state(array( 'priv_member' => 9, 'public_member' => 9, )), - '0.5' => - cr::__set_state(array( + '0.5' => + \cr::__set_state(array( 'priv_member' => 22, 'public_member' => 22, )), - 0 => - cr::__set_state(array( + 0 => + \cr::__set_state(array( 'priv_member' => 3, 'public_member' => 3, )), - 1 => - cr::__set_state(array( + 1 => + \cr::__set_state(array( 'priv_member' => 4, 'public_member' => 4, )), - 2 => - cr::__set_state(array( + 2 => + \cr::__set_state(array( 'priv_member' => -15, 'public_member' => -15, )), @@ -145,55 +145,55 @@ array(3) { end ------------ array_uintersect() --------------------------- begin ------------ array_uintersect_assoc() --------------------- $a=array ( - '0.1' => - cr::__set_state(array( + '0.1' => + \cr::__set_state(array( 'priv_member' => 9, 'public_member' => 9, )), - '0.5' => - cr::__set_state(array( + '0.5' => + \cr::__set_state(array( 'priv_member' => 12, 'public_member' => 12, )), - 0 => - cr::__set_state(array( + 0 => + \cr::__set_state(array( 'priv_member' => 23, 'public_member' => 23, )), - 1 => - cr::__set_state(array( + 1 => + \cr::__set_state(array( 'priv_member' => 4, 'public_member' => 4, )), - 2 => - cr::__set_state(array( + 2 => + \cr::__set_state(array( 'priv_member' => -15, 'public_member' => -15, )), ); $b=array ( - '0.2' => - cr::__set_state(array( + '0.2' => + \cr::__set_state(array( 'priv_member' => 9, 'public_member' => 9, )), - '0.5' => - cr::__set_state(array( + '0.5' => + \cr::__set_state(array( 'priv_member' => 22, 'public_member' => 22, )), - 0 => - cr::__set_state(array( + 0 => + \cr::__set_state(array( 'priv_member' => 3, 'public_member' => 3, )), - 1 => - cr::__set_state(array( + 1 => + \cr::__set_state(array( 'priv_member' => 4, 'public_member' => 4, )), - 2 => - cr::__set_state(array( + 2 => + \cr::__set_state(array( 'priv_member' => -15, 'public_member' => -15, )), @@ -218,55 +218,55 @@ array(2) { end ------------ array_uintersect_assoc() --------------------- begin ------------ array_uintersect_uassoc() with ordinary func - $a=array ( - '0.1' => - cr::__set_state(array( + '0.1' => + \cr::__set_state(array( 'priv_member' => 9, 'public_member' => 9, )), - '0.5' => - cr::__set_state(array( + '0.5' => + \cr::__set_state(array( 'priv_member' => 12, 'public_member' => 12, )), - 0 => - cr::__set_state(array( + 0 => + \cr::__set_state(array( 'priv_member' => 23, 'public_member' => 23, )), - 1 => - cr::__set_state(array( + 1 => + \cr::__set_state(array( 'priv_member' => 4, 'public_member' => 4, )), - 2 => - cr::__set_state(array( + 2 => + \cr::__set_state(array( 'priv_member' => -15, 'public_member' => -15, )), ); $b=array ( - '0.2' => - cr::__set_state(array( + '0.2' => + \cr::__set_state(array( 'priv_member' => 9, 'public_member' => 9, )), - '0.5' => - cr::__set_state(array( + '0.5' => + \cr::__set_state(array( 'priv_member' => 22, 'public_member' => 22, )), - 0 => - cr::__set_state(array( + 0 => + \cr::__set_state(array( 'priv_member' => 3, 'public_member' => 3, )), - 1 => - cr::__set_state(array( + 1 => + \cr::__set_state(array( 'priv_member' => 4, 'public_member' => 4, )), - 2 => - cr::__set_state(array( + 2 => + \cr::__set_state(array( 'priv_member' => -15, 'public_member' => -15, )), @@ -291,55 +291,55 @@ array(2) { end ------------ array_uintersect_uassoc() with ordinary func - begin ------------ array_uintersect_uassoc() with method -------- $a=array ( - '0.1' => - cr::__set_state(array( + '0.1' => + \cr::__set_state(array( 'priv_member' => 9, 'public_member' => 9, )), - '0.5' => - cr::__set_state(array( + '0.5' => + \cr::__set_state(array( 'priv_member' => 12, 'public_member' => 12, )), - 0 => - cr::__set_state(array( + 0 => + \cr::__set_state(array( 'priv_member' => 23, 'public_member' => 23, )), - 1 => - cr::__set_state(array( + 1 => + \cr::__set_state(array( 'priv_member' => 4, 'public_member' => 4, )), - 2 => - cr::__set_state(array( + 2 => + \cr::__set_state(array( 'priv_member' => -15, 'public_member' => -15, )), ); $b=array ( - '0.2' => - cr::__set_state(array( + '0.2' => + \cr::__set_state(array( 'priv_member' => 9, 'public_member' => 9, )), - '0.5' => - cr::__set_state(array( + '0.5' => + \cr::__set_state(array( 'priv_member' => 22, 'public_member' => 22, )), - 0 => - cr::__set_state(array( + 0 => + \cr::__set_state(array( 'priv_member' => 3, 'public_member' => 3, )), - 1 => - cr::__set_state(array( + 1 => + \cr::__set_state(array( 'priv_member' => 4, 'public_member' => 4, )), - 2 => - cr::__set_state(array( + 2 => + \cr::__set_state(array( 'priv_member' => -15, 'public_member' => -15, )), diff --git a/ext/standard/tests/array/var_export3.phpt b/ext/standard/tests/array/var_export3.phpt index e7d3c851f27c2..723cc514f149e 100644 --- a/ext/standard/tests/array/var_export3.phpt +++ b/ext/standard/tests/array/var_export3.phpt @@ -18,7 +18,7 @@ $kake = new kake; var_export($kake); ?> --EXPECT-- -kake::__set_state(array( +\kake::__set_state(array( 'mann' => 42, 'kvinne' => 43, )) diff --git a/ext/standard/tests/general_functions/bug47027.phpt b/ext/standard/tests/general_functions/bug47027.phpt index e4f5aae9dd744..b7d6604dbe90a 100644 --- a/ext/standard/tests/general_functions/bug47027.phpt +++ b/ext/standard/tests/general_functions/bug47027.phpt @@ -6,7 +6,7 @@ $ao = new ArrayObject(array (2 => "foo", "bar" => "baz")); var_export ($ao); ?> --EXPECT-- -ArrayObject::__set_state(array( +\ArrayObject::__set_state(array( 2 => 'foo', 'bar' => 'baz', )) diff --git a/ext/standard/tests/general_functions/bug77638_1.phpt b/ext/standard/tests/general_functions/bug77638_1.phpt index e2a99ffd19953..9d75a9a7ce498 100644 --- a/ext/standard/tests/general_functions/bug77638_1.phpt +++ b/ext/standard/tests/general_functions/bug77638_1.phpt @@ -7,5 +7,5 @@ com_dotnet var_export(new COM("Scripting.Dictionary")); ?> --EXPECT-- -com::__set_state(array( +\com::__set_state(array( )) diff --git a/ext/standard/tests/general_functions/bug77638_2.phpt b/ext/standard/tests/general_functions/bug77638_2.phpt index cec76659c608d..589697011aa60 100644 --- a/ext/standard/tests/general_functions/bug77638_2.phpt +++ b/ext/standard/tests/general_functions/bug77638_2.phpt @@ -7,5 +7,5 @@ ffi var_export(FFI::new('int')); ?> --EXPECT-- -FFI\CData::__set_state(array( +\FFI\CData::__set_state(array( )) diff --git a/ext/standard/tests/general_functions/var_export-locale.phpt b/ext/standard/tests/general_functions/var_export-locale.phpt index c9b0fa8d8750d..deecd5c17e1cd 100644 --- a/ext/standard/tests/general_functions/var_export-locale.phpt +++ b/ext/standard/tests/general_functions/var_export-locale.phpt @@ -744,26 +744,26 @@ string(20) "array ( Iteration 7 array ( - 0 => + 0 => array ( ), - 1 => + 1 => array ( ), ) array ( - 0 => + 0 => array ( ), - 1 => + 1 => array ( ), ) string(55) "array ( - 0 => + 0 => array ( ), - 1 => + 1 => array ( ), )" @@ -771,36 +771,36 @@ string(55) "array ( Iteration 8 array ( - 0 => + 0 => array ( 0 => 1, 1 => 2, ), - 1 => + 1 => array ( 0 => 'a', 1 => 'b', ), ) array ( - 0 => + 0 => array ( 0 => 1, 1 => 2, ), - 1 => + 1 => array ( 0 => 'a', 1 => 'b', ), ) string(107) "array ( - 0 => + 0 => array ( 0 => 1, 1 => 2, ), - 1 => + 1 => array ( 0 => 'a', 1 => 'b', @@ -914,194 +914,194 @@ string(17) "(object) array( Iteration 2 -foo::__set_state(array( +\foo::__set_state(array( )) -foo::__set_state(array( +\foo::__set_state(array( )) -string(26) "foo::__set_state(array( +string(26) "\foo::__set_state(array( ))" Iteration 3 -concreteClass::__set_state(array( +\concreteClass::__set_state(array( )) -concreteClass::__set_state(array( +\concreteClass::__set_state(array( )) -string(36) "concreteClass::__set_state(array( +string(36) "\concreteClass::__set_state(array( ))" Iteration 4 -Value::__set_state(array( - 'vars' => +\Value::__set_state(array( + 'vars' => array ( ), )) -Value::__set_state(array( - 'vars' => +\Value::__set_state(array( + 'vars' => array ( ), )) -string(57) "Value::__set_state(array( - 'vars' => +string(57) "\Value::__set_state(array( + 'vars' => array ( ), ))" Iteration 5 -myClass::__set_state(array( - 'foo_object' => - foo::__set_state(array( +\myClass::__set_state(array( + 'foo_object' => + \foo::__set_state(array( )), 'public_var' => 10, - 'public_var1' => - foo::__set_state(array( + 'public_var1' => + \foo::__set_state(array( )), - 'private_var' => - foo::__set_state(array( + 'private_var' => + \foo::__set_state(array( )), 'protected_var' => NULL, - 'proected_var' => - foo::__set_state(array( + 'proected_var' => + \foo::__set_state(array( )), )) -myClass::__set_state(array( - 'foo_object' => - foo::__set_state(array( +\myClass::__set_state(array( + 'foo_object' => + \foo::__set_state(array( )), 'public_var' => 10, - 'public_var1' => - foo::__set_state(array( + 'public_var1' => + \foo::__set_state(array( )), - 'private_var' => - foo::__set_state(array( + 'private_var' => + \foo::__set_state(array( )), 'protected_var' => NULL, - 'proected_var' => - foo::__set_state(array( + 'proected_var' => + \foo::__set_state(array( )), )) -string(293) "myClass::__set_state(array( - 'foo_object' => - foo::__set_state(array( +string(293) "\myClass::__set_state(array( + 'foo_object' => + \foo::__set_state(array( )), 'public_var' => 10, - 'public_var1' => - foo::__set_state(array( + 'public_var1' => + \foo::__set_state(array( )), - 'private_var' => - foo::__set_state(array( + 'private_var' => + \foo::__set_state(array( )), 'protected_var' => NULL, - 'proected_var' => - foo::__set_state(array( + 'proected_var' => + \foo::__set_state(array( )), ))" Iteration 6 -myClass::__set_state(array( - 'foo_object' => - foo::__set_state(array( +\myClass::__set_state(array( + 'foo_object' => + \foo::__set_state(array( )), 'public_var' => 10, - 'public_var1' => - foo::__set_state(array( + 'public_var1' => + \foo::__set_state(array( )), - 'private_var' => - foo::__set_state(array( + 'private_var' => + \foo::__set_state(array( )), 'protected_var' => NULL, - 'proected_var' => - foo::__set_state(array( + 'proected_var' => + \foo::__set_state(array( )), )) -myClass::__set_state(array( - 'foo_object' => - foo::__set_state(array( +\myClass::__set_state(array( + 'foo_object' => + \foo::__set_state(array( )), 'public_var' => 10, - 'public_var1' => - foo::__set_state(array( + 'public_var1' => + \foo::__set_state(array( )), - 'private_var' => - foo::__set_state(array( + 'private_var' => + \foo::__set_state(array( )), 'protected_var' => NULL, - 'proected_var' => - foo::__set_state(array( + 'proected_var' => + \foo::__set_state(array( )), )) -string(293) "myClass::__set_state(array( - 'foo_object' => - foo::__set_state(array( +string(293) "\myClass::__set_state(array( + 'foo_object' => + \foo::__set_state(array( )), 'public_var' => 10, - 'public_var1' => - foo::__set_state(array( + 'public_var1' => + \foo::__set_state(array( )), - 'private_var' => - foo::__set_state(array( + 'private_var' => + \foo::__set_state(array( )), 'protected_var' => NULL, - 'proected_var' => - foo::__set_state(array( + 'proected_var' => + \foo::__set_state(array( )), ))" Iteration 7 -foo::__set_state(array( +\foo::__set_state(array( )) -foo::__set_state(array( +\foo::__set_state(array( )) -string(26) "foo::__set_state(array( +string(26) "\foo::__set_state(array( ))" Iteration 8 -foo::__set_state(array( +\foo::__set_state(array( )) -foo::__set_state(array( +\foo::__set_state(array( )) -string(26) "foo::__set_state(array( +string(26) "\foo::__set_state(array( ))" Iteration 9 -foo::__set_state(array( +\foo::__set_state(array( )) -foo::__set_state(array( +\foo::__set_state(array( )) -string(26) "foo::__set_state(array( +string(26) "\foo::__set_state(array( ))" Iteration 10 -Value::__set_state(array( - 'vars' => +\Value::__set_state(array( + 'vars' => array ( ), )) -Value::__set_state(array( - 'vars' => +\Value::__set_state(array( + 'vars' => array ( ), )) -string(57) "Value::__set_state(array( - 'vars' => +string(57) "\Value::__set_state(array( + 'vars' => array ( ), ))" Iteration 11 -concreteClass::__set_state(array( +\concreteClass::__set_state(array( )) -concreteClass::__set_state(array( +\concreteClass::__set_state(array( )) -string(36) "concreteClass::__set_state(array( +string(36) "\concreteClass::__set_state(array( ))" *** Testing var_export() with valid null values *** diff --git a/ext/standard/tests/general_functions/var_export-locale_32.phpt b/ext/standard/tests/general_functions/var_export-locale_32.phpt index 4033eff5c3749..26ac47ad890e8 100644 --- a/ext/standard/tests/general_functions/var_export-locale_32.phpt +++ b/ext/standard/tests/general_functions/var_export-locale_32.phpt @@ -744,26 +744,26 @@ string(20) "array ( Iteration 7 array ( - 0 => + 0 => array ( ), - 1 => + 1 => array ( ), ) array ( - 0 => + 0 => array ( ), - 1 => + 1 => array ( ), ) string(55) "array ( - 0 => + 0 => array ( ), - 1 => + 1 => array ( ), )" @@ -771,36 +771,36 @@ string(55) "array ( Iteration 8 array ( - 0 => + 0 => array ( 0 => 1, 1 => 2, ), - 1 => + 1 => array ( 0 => 'a', 1 => 'b', ), ) array ( - 0 => + 0 => array ( 0 => 1, 1 => 2, ), - 1 => + 1 => array ( 0 => 'a', 1 => 'b', ), ) string(107) "array ( - 0 => + 0 => array ( 0 => 1, 1 => 2, ), - 1 => + 1 => array ( 0 => 'a', 1 => 'b', @@ -914,194 +914,194 @@ string(17) "(object) array( Iteration 2 -foo::__set_state(array( +\foo::__set_state(array( )) -foo::__set_state(array( +\foo::__set_state(array( )) -string(26) "foo::__set_state(array( +string(26) "\foo::__set_state(array( ))" Iteration 3 -concreteClass::__set_state(array( +\concreteClass::__set_state(array( )) -concreteClass::__set_state(array( +\concreteClass::__set_state(array( )) -string(36) "concreteClass::__set_state(array( +string(36) "\concreteClass::__set_state(array( ))" Iteration 4 -Value::__set_state(array( - 'vars' => +\Value::__set_state(array( + 'vars' => array ( ), )) -Value::__set_state(array( - 'vars' => +\Value::__set_state(array( + 'vars' => array ( ), )) -string(57) "Value::__set_state(array( - 'vars' => +string(57) "\Value::__set_state(array( + 'vars' => array ( ), ))" Iteration 5 -myClass::__set_state(array( - 'foo_object' => - foo::__set_state(array( +\myClass::__set_state(array( + 'foo_object' => + \foo::__set_state(array( )), 'public_var' => 10, - 'public_var1' => - foo::__set_state(array( + 'public_var1' => + \foo::__set_state(array( )), - 'private_var' => - foo::__set_state(array( + 'private_var' => + \foo::__set_state(array( )), 'protected_var' => NULL, - 'proected_var' => - foo::__set_state(array( + 'proected_var' => + \foo::__set_state(array( )), )) -myClass::__set_state(array( - 'foo_object' => - foo::__set_state(array( +\myClass::__set_state(array( + 'foo_object' => + \foo::__set_state(array( )), 'public_var' => 10, - 'public_var1' => - foo::__set_state(array( + 'public_var1' => + \foo::__set_state(array( )), - 'private_var' => - foo::__set_state(array( + 'private_var' => + \foo::__set_state(array( )), 'protected_var' => NULL, - 'proected_var' => - foo::__set_state(array( + 'proected_var' => + \foo::__set_state(array( )), )) -string(293) "myClass::__set_state(array( - 'foo_object' => - foo::__set_state(array( +string(293) "\myClass::__set_state(array( + 'foo_object' => + \foo::__set_state(array( )), 'public_var' => 10, - 'public_var1' => - foo::__set_state(array( + 'public_var1' => + \foo::__set_state(array( )), - 'private_var' => - foo::__set_state(array( + 'private_var' => + \foo::__set_state(array( )), 'protected_var' => NULL, - 'proected_var' => - foo::__set_state(array( + 'proected_var' => + \foo::__set_state(array( )), ))" Iteration 6 -myClass::__set_state(array( - 'foo_object' => - foo::__set_state(array( +\myClass::__set_state(array( + 'foo_object' => + \foo::__set_state(array( )), 'public_var' => 10, - 'public_var1' => - foo::__set_state(array( + 'public_var1' => + \foo::__set_state(array( )), - 'private_var' => - foo::__set_state(array( + 'private_var' => + \foo::__set_state(array( )), 'protected_var' => NULL, - 'proected_var' => - foo::__set_state(array( + 'proected_var' => + \foo::__set_state(array( )), )) -myClass::__set_state(array( - 'foo_object' => - foo::__set_state(array( +\myClass::__set_state(array( + 'foo_object' => + \foo::__set_state(array( )), 'public_var' => 10, - 'public_var1' => - foo::__set_state(array( + 'public_var1' => + \foo::__set_state(array( )), - 'private_var' => - foo::__set_state(array( + 'private_var' => + \foo::__set_state(array( )), 'protected_var' => NULL, - 'proected_var' => - foo::__set_state(array( + 'proected_var' => + \foo::__set_state(array( )), )) -string(293) "myClass::__set_state(array( - 'foo_object' => - foo::__set_state(array( +string(293) "\myClass::__set_state(array( + 'foo_object' => + \foo::__set_state(array( )), 'public_var' => 10, - 'public_var1' => - foo::__set_state(array( + 'public_var1' => + \foo::__set_state(array( )), - 'private_var' => - foo::__set_state(array( + 'private_var' => + \foo::__set_state(array( )), 'protected_var' => NULL, - 'proected_var' => - foo::__set_state(array( + 'proected_var' => + \foo::__set_state(array( )), ))" Iteration 7 -foo::__set_state(array( +\foo::__set_state(array( )) -foo::__set_state(array( +\foo::__set_state(array( )) -string(26) "foo::__set_state(array( +string(26) "\foo::__set_state(array( ))" Iteration 8 -foo::__set_state(array( +\foo::__set_state(array( )) -foo::__set_state(array( +\foo::__set_state(array( )) -string(26) "foo::__set_state(array( +string(26) "\foo::__set_state(array( ))" Iteration 9 -foo::__set_state(array( +\foo::__set_state(array( )) -foo::__set_state(array( +\foo::__set_state(array( )) -string(26) "foo::__set_state(array( +string(26) "\foo::__set_state(array( ))" Iteration 10 -Value::__set_state(array( - 'vars' => +\Value::__set_state(array( + 'vars' => array ( ), )) -Value::__set_state(array( - 'vars' => +\Value::__set_state(array( + 'vars' => array ( ), )) -string(57) "Value::__set_state(array( - 'vars' => +string(57) "\Value::__set_state(array( + 'vars' => array ( ), ))" Iteration 11 -concreteClass::__set_state(array( +\concreteClass::__set_state(array( )) -concreteClass::__set_state(array( +\concreteClass::__set_state(array( )) -string(36) "concreteClass::__set_state(array( +string(36) "\concreteClass::__set_state(array( ))" *** Testing var_export() with valid null values *** diff --git a/ext/standard/tests/general_functions/var_export_basic6.phpt b/ext/standard/tests/general_functions/var_export_basic6.phpt index a3d3ae639b0b1..888cee4dc076e 100644 --- a/ext/standard/tests/general_functions/var_export_basic6.phpt +++ b/ext/standard/tests/general_functions/var_export_basic6.phpt @@ -110,193 +110,193 @@ string(17) "(object) array( -- Iteration: new foo -- -foo::__set_state(array( +\foo::__set_state(array( )) -foo::__set_state(array( +\foo::__set_state(array( )) -string(26) "foo::__set_state(array( +string(26) "\foo::__set_state(array( ))" -- Iteration: new concreteClass -- -concreteClass::__set_state(array( +\concreteClass::__set_state(array( )) -concreteClass::__set_state(array( +\concreteClass::__set_state(array( )) -string(36) "concreteClass::__set_state(array( +string(36) "\concreteClass::__set_state(array( ))" -- Iteration: new Value -- -Value::__set_state(array( - 'vars' => +\Value::__set_state(array( + 'vars' => array ( ), )) -Value::__set_state(array( - 'vars' => +\Value::__set_state(array( + 'vars' => array ( ), )) -string(57) "Value::__set_state(array( - 'vars' => +string(57) "\Value::__set_state(array( + 'vars' => array ( ), ))" -- Iteration: new myClass -- -myClass::__set_state(array( - 'foo_object' => - foo::__set_state(array( +\myClass::__set_state(array( + 'foo_object' => + \foo::__set_state(array( )), 'public_var' => 10, - 'public_var1' => - foo::__set_state(array( + 'public_var1' => + \foo::__set_state(array( )), - 'private_var' => - foo::__set_state(array( + 'private_var' => + \foo::__set_state(array( )), 'protected_var' => NULL, - 'proected_var' => - foo::__set_state(array( + 'proected_var' => + \foo::__set_state(array( )), )) -myClass::__set_state(array( - 'foo_object' => - foo::__set_state(array( +\myClass::__set_state(array( + 'foo_object' => + \foo::__set_state(array( )), 'public_var' => 10, - 'public_var1' => - foo::__set_state(array( + 'public_var1' => + \foo::__set_state(array( )), - 'private_var' => - foo::__set_state(array( + 'private_var' => + \foo::__set_state(array( )), 'protected_var' => NULL, - 'proected_var' => - foo::__set_state(array( + 'proected_var' => + \foo::__set_state(array( )), )) -string(293) "myClass::__set_state(array( - 'foo_object' => - foo::__set_state(array( +string(293) "\myClass::__set_state(array( + 'foo_object' => + \foo::__set_state(array( )), 'public_var' => 10, - 'public_var1' => - foo::__set_state(array( + 'public_var1' => + \foo::__set_state(array( )), - 'private_var' => - foo::__set_state(array( + 'private_var' => + \foo::__set_state(array( )), 'protected_var' => NULL, - 'proected_var' => - foo::__set_state(array( + 'proected_var' => + \foo::__set_state(array( )), ))" -- Iteration: myClass_object -- -myClass::__set_state(array( - 'foo_object' => - foo::__set_state(array( +\myClass::__set_state(array( + 'foo_object' => + \foo::__set_state(array( )), 'public_var' => 10, - 'public_var1' => - foo::__set_state(array( + 'public_var1' => + \foo::__set_state(array( )), - 'private_var' => - foo::__set_state(array( + 'private_var' => + \foo::__set_state(array( )), 'protected_var' => NULL, - 'proected_var' => - foo::__set_state(array( + 'proected_var' => + \foo::__set_state(array( )), )) -myClass::__set_state(array( - 'foo_object' => - foo::__set_state(array( +\myClass::__set_state(array( + 'foo_object' => + \foo::__set_state(array( )), 'public_var' => 10, - 'public_var1' => - foo::__set_state(array( + 'public_var1' => + \foo::__set_state(array( )), - 'private_var' => - foo::__set_state(array( + 'private_var' => + \foo::__set_state(array( )), 'protected_var' => NULL, - 'proected_var' => - foo::__set_state(array( + 'proected_var' => + \foo::__set_state(array( )), )) -string(293) "myClass::__set_state(array( - 'foo_object' => - foo::__set_state(array( +string(293) "\myClass::__set_state(array( + 'foo_object' => + \foo::__set_state(array( )), 'public_var' => 10, - 'public_var1' => - foo::__set_state(array( + 'public_var1' => + \foo::__set_state(array( )), - 'private_var' => - foo::__set_state(array( + 'private_var' => + \foo::__set_state(array( )), 'protected_var' => NULL, - 'proected_var' => - foo::__set_state(array( + 'proected_var' => + \foo::__set_state(array( )), ))" -- Iteration: myClass_object->foo_object -- -foo::__set_state(array( +\foo::__set_state(array( )) -foo::__set_state(array( +\foo::__set_state(array( )) -string(26) "foo::__set_state(array( +string(26) "\foo::__set_state(array( ))" -- Iteration: myClass_object->public_var1 -- -foo::__set_state(array( +\foo::__set_state(array( )) -foo::__set_state(array( +\foo::__set_state(array( )) -string(26) "foo::__set_state(array( +string(26) "\foo::__set_state(array( ))" -- Iteration: foo_object -- -foo::__set_state(array( +\foo::__set_state(array( )) -foo::__set_state(array( +\foo::__set_state(array( )) -string(26) "foo::__set_state(array( +string(26) "\foo::__set_state(array( ))" -- Iteration: Value_object -- -Value::__set_state(array( - 'vars' => +\Value::__set_state(array( + 'vars' => array ( ), )) -Value::__set_state(array( - 'vars' => +\Value::__set_state(array( + 'vars' => array ( ), )) -string(57) "Value::__set_state(array( - 'vars' => +string(57) "\Value::__set_state(array( + 'vars' => array ( ), ))" -- Iteration: concreteClass_object -- -concreteClass::__set_state(array( +\concreteClass::__set_state(array( )) -concreteClass::__set_state(array( +\concreteClass::__set_state(array( )) -string(36) "concreteClass::__set_state(array( +string(36) "\concreteClass::__set_state(array( ))" diff --git a/ext/standard/var.c b/ext/standard/var.c index c429763eb9c86..34d45e274c065 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -575,6 +575,7 @@ PHPAPI void php_var_export_ex(zval *struc, int level, smart_str *buf) /* {{{ */ if (ce == zend_standard_class_def) { smart_str_appendl(buf, "(object) array(\n", 16); } else { + smart_str_append(buf, "\\"); smart_str_append(buf, ce->name); if (is_enum) { zend_object *zobj = Z_OBJ_P(struc); diff --git a/main/php_version.h b/main/php_version.h index a879ae407415d..66d4367856e5a 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.ac to change version number */ #define PHP_MAJOR_VERSION 8 #define PHP_MINOR_VERSION 1 -#define PHP_RELEASE_VERSION 5 +#define PHP_RELEASE_VERSION 0 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "8.1.5-dev" -#define PHP_VERSION_ID 80105 +#define PHP_VERSION "8.1.0-dev" +#define PHP_VERSION_ID 80100