說明
This is the procedural version of DateTime::__construct().
Unlike the DateTime constructor, it will return
false
instead of an exception if the passed in
datetime
string is invalid.
參數
返回值
Returns a new DateTime instance.
過程化風格在失敗時返回 false
。
參見
- DateTime::__construct() - 返回一個新的 DateTime 對像
- DateTimeImmutable::__construct() - Returns new DateTimeImmutable object