mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-29 22:46:22 +00:00
17 lines
389 B
Markdown
17 lines
389 B
Markdown
---
|
|
id: 6e9abc7a-fef2-4450-9694-8311eb70d7cf
|
|
title: createFromInterface()
|
|
---
|
|
|
|
# Description
|
|
|
|
Similar to [createFromImmutable()](20201113123648-createfromimmutable),
|
|
but this method creates a date from any object that uses
|
|
`DateTimeInterface`
|
|
|
|
# Syntax
|
|
|
|
``` php
|
|
DateTime::createFromInterface(DateTimeInterface $other);
|
|
DateTimeImmutable::createFromInterface(DateTimeInterface $other);
|
|
```
|