> Would a reasonable way forward be to have such a named method, and have it 
> throw an exception if the instance is not representable in that form?
> 
> That way, you'd be guaranteed that new 
> DateInterval($period->toIsoPeriodString()) would result in an equivalent 
> object, rather than discarding special relative values.

Yep, this sounds like a good idea. Derick, would this work for you?


Regards,
Moritz
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to