On Thu, 27 Apr 2023, Máté Kocsis wrote:

> As you have possibly already experienced, overloaded signatures cause 
> various smaller and bigger issues, while the concept is not natively 
> supported by PHP. That's why I drafted an RFC which intends to phase 
> out the majority of overloaded function/method signatures and also 
> forbid the introduction of such functions in the future: 
> https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures

I'm going to nitpick on the newly suggested names and argument order for the
DatePeriod factory methods — althoughI do agree that they need to get created:

createFromInterval(DateTimeInterface $start, DateInterval $interval, 
DateTimeInterface $end, int $options = 0)
→ createWithRange(DateTimeInterface $begin, DateTimeInterface $end, 
DateTimeInterface $int, int $options = 0)

createFromRecurrences(DateTimeInterface $start, DateInterval $interval, int 
$recurrences, int $options = 0)
→ createWithRecurrences(DateInterval $begin, int $recurrences, DateInterval 
$interval, int $options = 0)

We also should fix the argument names. Either $start/$finish, or $begin/$end. I
prefer the latter.

createFromIso8601(string $specification, int $options = 0)
-> createFromISO8601String

I am open to bike shedding about this :-)

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

Reply via email to