Duration for PHP v4.1 Release Notes
Release Date: 2020-04-26 // almost 5 years ago-
- PHP 7.3.4 is now the minimum required version.
Duration
now extendsDateInterval
and can be used interchangeably.- ๐ Objects having a
__toString()
method are now supported values. - ๐
Duration::toDateInterval()
is now deprecated.
Previous changes from v4.0
-
- PHP 7.3 is now the minimum required version.
- ๐
0
,null
,false
,true
are now supported values as in that they result inDuration::none()
(PT0S
). - ๐ An
InvalidDuration
error will be thrown if a value is given without a unit or if the given value cannot be parsed. toIntervalSpec()
did more than it needed to do. Instead of formatting the current value the spec itself is now returned.