On Thu, 5 Mar 2015, Trevor Suarez wrote:

> Good morning internals!
> 
> I would like to propose a small addition be made to the DateTime class.
> 
> https://github.com/php/php-src/pull/1145

When the factory method was added, we had this same discussion. And the 
discussions lead to the conclusion that it does not make sense to have 
this "createFromImmutable" factory method on DateTime. Basically with 
the same reasons that people should type hint against the Interface 
instead. To emulate that in PHP 5.5 and lower, users can just do:

class DateTimeInterface extends DateTime {}

I know, that's a bit of a hack.

I am against this addition, even though the patch looks OK.

cheers,
Derick

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

Reply via email to