diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 95c68f1a78ca6..61de590e5bf9f 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -480,7 +480,7 @@ const zend_function_entry date_funcs_immutable[] = { PHP_ME(DateTimeImmutable, __construct, arginfo_date_create, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC) PHP_ME(DateTime, __wakeup, NULL, ZEND_ACC_PUBLIC) PHP_ME(DateTimeImmutable, __set_state, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME_MAPPING(createFromFormat, date_create_from_format, arginfo_date_create_from_format, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + PHP_ME_MAPPING(createFromFormat, date_create_immutable_from_format, arginfo_date_create_from_format, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) PHP_ME_MAPPING(getLastErrors, date_get_last_errors, arginfo_date_get_last_errors, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) PHP_ME_MAPPING(format, date_format, arginfo_date_method_format, 0) PHP_ME_MAPPING(getTimezone, date_timezone_get, arginfo_date_method_timezone_get, 0) diff --git a/ext/date/tests/bug65502.phpt b/ext/date/tests/bug65502.phpt new file mode 100644 index 0000000000000..8819c1ff745f2 --- /dev/null +++ b/ext/date/tests/bug65502.phpt @@ -0,0 +1,12 @@ +--TEST-- +Test for bug #65502: DateTimeImmutable::createFromFormat returns DateTime +--CREDITS-- +Boro Sitnikovski +--INI-- +date.timezone = UTC +--FILE-- + +--EXPECT-- +DateTimeImmutable