Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14582 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56425 invoked by uid 1010); 3 Feb 2005 19:00:26 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 54488 invoked by uid 1007); 3 Feb 2005 18:59:20 -0000 To: internals@lists.php.net, tslettebo@broadpark.no (Terje =?ISO-8859-1?B?U2xldHRlYvg=?=) Date: Thu, 3 Feb 2005 19:59:11 +0100 Message-ID: <20050203195911.512edfd9@localhost.localdomain> In-Reply-To: <02da01c50a13$93728720$a900000a@adstate.local> References: <5.1.0.14.2.20050201111730.0299da70@localhost> <20050203122955.292e6da9@localhost.localdomain> <02da01c50a13$93728720$a900000a@adstate.local> X-Newsreader: Sylpheed-Claws 1.0.0cvs1.1 (GTK+ 2.4.14; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Posted-By: 84.56.67.106 Subject: Re: [PHP-DEV] [Operators overloading] PHP 5.1 From: pierre@dotgeek.org (Pierre-Alain Joye) On Thu, 3 Feb 2005 18:12:44 +0100 tslettebo@broadpark.no (Terje Sletteb=F8) wrote: > > On Thu, 3 Feb 2005 11:47:13 +0100 (CET) > > derick@php.net (Derick Rethans) wrote: > > > > > On Thu, 3 Feb 2005, Sebastian Bergmann wrote: > > > > > > > Derick Rethans wrote: > > > > > Use C++/Java if you want this. > > > > > > > > Java does not support operator overloading. > > > > > > So, that means PHP shouldn't get it either, right? ;-) > > > > As I already asked in the past, I'm in favour to have them for > > intern usage only (understand used by extension). >=20 > Internal in what way? And why? Available for extensions only (means also not in user land), like the get/set get_properties for objects. > > As we already for > > propoerties read or write. For those who do not know, you have > > no way to know that you in a ++, -- call. At least for ++,-- and > > friends. >=20 > I'm not sure I understood the above, but if I understood it right, > why would that be? For now you cannot know if are in a '++' or a '--'. The operations (I have to check that again :) are: $b->a++; gives tmp =3D a; tmp =3D tmp+1; b->a =3D tmp; In my example (a date object, day being 31), at this I do not know if one is assigning 32 to the property or if it's the result of incrementation (or decrementation from 1 to 0). Regards, --Pierre