Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64312 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2080 invoked from network); 16 Dec 2012 21:40:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Dec 2012 21:40:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; 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:58285] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8D/6D-27715-1BF3EC05 for ; Sun, 16 Dec 2012 16:40:01 -0500 Received: from localhost (xdebug.org [127.0.0.1]) by xdebug.org (Postfix) with ESMTPS id 734ACDE13D; Sun, 16 Dec 2012 21:39:57 +0000 (GMT) Date: Sun, 16 Dec 2012 21:39:57 +0000 (GMT) X-X-Sender: derick@whisky.home.derickrethans.nl To: Stas Malyshev cc: Lester Caine , PHP internals In-Reply-To: <50CE3EFE.70304@sugarcrm.com> Message-ID: References: <50C63A7C.8090705@gmail.com> <4DBD0EA5-C45B-4C12-BFE9-E263B255B2C3@strojny.net> <50CDD0C8.7080607@lsces.co.uk> <50CE3EFE.70304@sugarcrm.com> 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] DateTime improvement From: derick@php.net (Derick Rethans) On Sun, 16 Dec 2012, Stas Malyshev wrote: > > Al the methods will *still* return the modified DateTime object - > > it's just that the one that you *call* f.e. ->modify() on won't > > change anymore. > > Doesn't it mean you can just call clone() on it in modifier methods > before doing anything else? Yeah, I think so. I tried that but I got some errors. It's something for me to sort out. So far, I've just created all the helper methods etc. clone() however is not a method, but a language construct... so it's not that trivial. cheers, Derick