Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:21707 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2278 invoked by uid 1010); 27 Jan 2006 16:42:08 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 2263 invoked from network); 27 Jan 2006 16:42:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jan 2006 16:42:08 -0000 X-Host-Fingerprint: 69.12.155.130 69-12-155-130.dsl.static.sonic.net Linux 2.4/2.6 Received: from ([69.12.155.130:4360] helo=pigeon.alphaweb.net) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 51/A9-03249-E5D4AD34 for ; Fri, 27 Jan 2006 11:42:06 -0500 Received: from localhost ([127.0.0.1] helo=stumpy) by pigeon.alphaweb.net with smtp (Exim 4.10) id 1F2Vm6-00023f-00; Fri, 27 Jan 2006 07:44:34 -0800 Message-ID: <000601c62361$02f8fdb0$7d051fac@stumpy> To: "Thomas Moenicke" Cc: References: <1728334199.20050925143657@marcus-boerger.de> <200601271617.40669.tm@ippfp.org> <200601271708.29763.tm@ippfp.org> Date: Fri, 27 Jan 2006 08:44:53 -0800 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Subject: Re: [PHP-DEV] [PATCH] __toString() From: pollita@php.net ("Sara Golemon") >> The pecl package 'operator' (http://pecl.php.net/package/operator) >> sounds like what you might be looking for. > > Wow, great! All I have to do is to implement a __assign_concat() method? > Yep, atm you can refer to the test files included in the package (no other docs yet). Patrick also blogged up a nice summary: http://blog.ghostwhowalksinside.org/archives/2006/programming/php/operator-magic which includes objectified string handling and one particularly frightening use of the mod operator... > Why this is not in the core? > Because PHP is not C++ :) Not to mention this is about two weeks old and very experimental. :) > And what is 'Plan A'? ;) > There are two ways to ask an object for a property. Either is sufficient for operator's needs, but the first version is preferred since it's less likely to cause an unnecessary duplication. -Sara