Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28241 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62359 invoked by uid 1010); 5 Mar 2007 13:23:27 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 62344 invoked from network); 5 Mar 2007 13:23:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Mar 2007 13:23:27 -0000 X-Host-Fingerprint: 80.123.98.46 unknown Received: from [80.123.98.46] ([80.123.98.46:26819] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5E/95-16561-DC91CE54 for ; Mon, 05 Mar 2007 08:23:26 -0500 Message-ID: <5E.95.16561.DC91CE54@pb1.pair.com> To: internals@lists.php.net Date: Mon, 05 Mar 2007 14:23:30 +0100 User-Agent: Thunderbird 1.5.0.9 (X11/20070103) MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Posted-By: 80.123.98.46 Subject: Re: DateTime object equality From: mike@php.net (Michael Wallner) Hans Lellelid wrote: > Is this DateTime comparison behavior actually intended to be different > from everything else? If there's some reason that DateTime object > properties cannot be compared to each other, wouldn't it be more > appropriate for them to always return FALSE ? In my POV this is easily solvable with a custom comparison object handler. See attached patch. I also think that comparing to Datetime instances should give a reasonable result. Regards, -- Michael