Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14587 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54990 invoked by uid 1010); 3 Feb 2005 19:35:50 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 54964 invoked from network); 3 Feb 2005 19:35:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Feb 2005 19:35:50 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.4/2.6 Received: from ([80.74.107.235:56928] helo=mail.zend.com) by pb1.pair.com (ecelerity HEAD (r4105:4106)) with SMTP id BA/A5-10528-41D72024 for ; Thu, 03 Feb 2005 14:35:49 -0500 Received: (qmail 24154 invoked from network); 3 Feb 2005 19:28:54 -0000 Received: from shire.zend.office (10.1.2.160) by internal.zend.office with SMTP; 3 Feb 2005 19:28:54 -0000 Date: Thu, 3 Feb 2005 21:28:54 +0200 (IST) X-X-Sender: frodo@shire.zend.office To: Pierre-Alain Joye cc: internals@lists.php.net, Terje =?ISO-8859-1?B?U2xldHRlYvg=?= In-Reply-To: <20050203195911.512edfd9@localhost.localdomain> Message-ID: References: <5.1.0.14.2.20050201111730.0299da70@localhost> <20050203122955.292e6da9@localhost.localdomain> <02da01c50a13$93728720$a900000a@adstate.local> <20050203195911.512edfd9@localhost.localdomain> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] [Operators overloading] PHP 5.1 From: stas@zend.com (Stanislav Malyshev) PJ>>$b->a++; gives tmp = a; tmp = tmp+1; b->a = tmp; PJ>> PJ>>In my example (a date object, day being 31), at this I do not know PJ>>if one is assigning 32 to the property or if it's the result of PJ>>incrementation (or decrementation from 1 to 0). That's why one should use $date->NextDay() and $date->PreviousDay() and neither ++, nor --, nor manipulating properties directly :) -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115