summaryrefslogtreecommitdiff
path: root/ext/date/php_date.h
diff options
context:
space:
mode:
authormike <mike.simonson@gmail.com>2019-12-16 14:31:14 +0100
committerNikita Popov <nikita.ppv@gmail.com>2020-01-03 16:55:12 +0100
commit1658b5babc34c46b3b78b852e7a5f134845ace7c (patch)
treeedb3122b32957995bb4a658d3be6644f25403973 /ext/date/php_date.h
parentfb8ffda690b0a13d1ee4f464c1aeb1e129feedf4 (diff)
downloadphp-git-1658b5babc34c46b3b78b852e7a5f134845ace7c.tar.gz
Adding DateTime(Immutable)::createFromInterface()
These are like DateTime::createFromImmutable() DateTimeImmutable::createFromMutable() but accept any DateTimeInterface instead. Closes GH-5016.
Diffstat (limited to 'ext/date/php_date.h')
-rw-r--r--ext/date/php_date.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/date/php_date.h b/ext/date/php_date.h
index 57a9e28d88..8458b0187e 100644
--- a/ext/date/php_date.h
+++ b/ext/date/php_date.h
@@ -46,6 +46,7 @@ PHP_METHOD(DateTime, __construct);
PHP_METHOD(DateTime, __wakeup);
PHP_METHOD(DateTime, __set_state);
PHP_METHOD(DateTime, createFromImmutable);
+PHP_METHOD(DateTime, createFromInterface);
PHP_FUNCTION(date_create);
PHP_FUNCTION(date_create_immutable);
PHP_FUNCTION(date_create_from_format);
@@ -79,6 +80,7 @@ PHP_METHOD(DateTimeImmutable, setDate);
PHP_METHOD(DateTimeImmutable, setISODate);
PHP_METHOD(DateTimeImmutable, setTimestamp);
PHP_METHOD(DateTimeImmutable, createFromMutable);
+PHP_METHOD(DateTimeImmutable, createFromInterface);
PHP_METHOD(DateTimeZone, __construct);
PHP_METHOD(DateTimeZone, __wakeup);