Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66827 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56649 invoked from network); 27 Mar 2013 11:37:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Mar 2013 11:37:15 -0000 Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:39358] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 99/24-30100-9E9D2515 for ; Wed, 27 Mar 2013 06:37:14 -0500 Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id B004ADE147; Wed, 27 Mar 2013 11:37:10 +0000 (GMT) Date: Wed, 27 Mar 2013 11:37:10 +0000 (GMT) X-X-Sender: derick@whisky.home.derickrethans.nl To: Lester Caine cc: PHP internals In-Reply-To: <5152C9DC.1090006@lsces.co.uk> Message-ID: References: <5152C9DC.1090006@lsces.co.uk> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] Questions regarding DateTimeImmutable From: derick@php.net (Derick Rethans) On Wed, 27 Mar 2013, Lester Caine wrote: > Levi Morrison wrote: > > While I personally think DateTime should have been immutable from the > > beginning, I don't think it's in PHP's best interest to try to fix > > this particular problem by introducing DateTimeImmutable. > > There seems to be some strange assumption that a DateTime value is fixed in > some way? There have been various statements about 'should have been immutable > from the beginning', and while I can see that some uses of it are read only, > much of my own use is in building calendar arrays where one is adding months, > days or hours to select the next set of matches. If this should always have > been 'immutable' then how would one handle all the situations where one does > need to update the value? The updated value is still returned, it's just that the original object you call (f.e.) ->modify() on is not. cheers, Derick