On Sun, 18 Dec 2022 at 16:48, Theodore Brown <theodor...@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

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

Reply via email to