Re: [Vote] More Appropriate Date/Time Exceptions

From: Date: Mon, 19 Dec 2022 15:05:42 +0000
Subject: Re: [Vote] More Appropriate Date/Time Exceptions
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-119186@lists.php.net to get a copy of this message
On Sun, 18 Dec 2022 at 16:48, Theodore Brown <theodorejb@outlook.com> wrote: > > why it's okay to make a BC break for the OO API, > but not for the procedural API. Because they are different APIs. People who use OO apis are used to handling exceptions and would expect failures in OO code to throw exceptions. That the DateTime OO api isn't currently do so is not conformant to their expectations. People who use the procedural apis of DateTime, or procedural versions of the Intl functionality (e.g. NumberFormatter vs numfmt_format_currency) claim to prefer checking date_get_last_errors(), numfmt_get_error_code() etc., rather than have to worry about exceptions. Changing the procedural functions to use exceptions would be a bigger and more controversial change than the one proposed in this RFC. cheers Dan Ack

« previous php.internals (#119186) next »