Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60587 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19315 invoked from network); 14 May 2012 19:32:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 May 2012 19:32:29 -0000 Authentication-Results: pb1.pair.com header.from=cpriest@zerocue.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cpriest@zerocue.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zerocue.com designates 74.115.204.54 as permitted sender) X-PHP-List-Original-Sender: cpriest@zerocue.com X-Host-Fingerprint: 74.115.204.54 relay-hub202.domainlocalhost.com Windows 2000 SP2+, XP SP1 (seldom 98 4.10.2222) Received: from [74.115.204.54] ([74.115.204.54:25978] helo=relay-hub202.domainlocalhost.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A6/52-03088-7CD51BF4 for ; Mon, 14 May 2012 15:32:27 -0400 Received: from MBX202.domain.local ([169.254.19.147]) by HUB202.domain.local ([192.168.69.2]) with mapi id 14.01.0355.002; Mon, 14 May 2012 15:32:20 -0400 To: Seva Lapsha CC: "internals@lists.php.net" Thread-Topic: [PHP-DEV] [RFC] Custom Casting Thread-Index: AQHNLi6l17XSqeCCQk+EtGzYZ+WSt5bIY1VggAEJtQCAAAFgsIAAY6wA///hxOA= Date: Mon, 14 May 2012 19:31:50 +0000 Message-ID: <9570D903A3BECE4092E924C2985CE48555C04ACC@MBX202.domain.local> References: <9570D903A3BECE4092E924C2985CE48555C0420D@MBX202.domain.local> <9570D903A3BECE4092E924C2985CE48555C0498A@MBX202.domain.local> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.64.27] Content-Type: multipart/alternative; boundary="_000_9570D903A3BECE4092E924C2985CE48555C04ACCMBX202domainloc_" MIME-Version: 1.0 Subject: RE: [PHP-DEV] [RFC] Custom Casting From: cpriest@zerocue.com (Clint Priest) --_000_9570D903A3BECE4092E924C2985CE48555C04ACCMBX202domainloc_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable How would one use your Castable interface to cast a Class "Test" to any of = integer, array or boolean? From: Seva Lapsha [mailto:seva.lapsha@gmail.com] Sent: Monday, May 14, 2012 12:19 PM To: Clint Priest Cc: internals@lists.php.net Subject: Re: [PHP-DEV] [RFC] Custom Casting My pastbin is for casting anything to anything. On Mon, May 14, 2012 at 11:24 AM, Clint Priest > wrote: Both of the RFC's you reference are for casting TO a scalar, not TO an obje= ct type. Your pastbin is for casting FROM a scalar TO an object. -----Original Message----- From: Seva Lapsha [mailto:seva.lapsha@gmail.com] Sent: Monday, May 14, 2012 6:18 AM To: Clint Priest Cc: internals@lists.php.net Subject: Re: [PHP-DEV] [RFC] Custom Casting Sorry, I comprehend neither the cause nor the effect in your argument state= ment. Can you please elaborate? On Sun, May 13, 2012 at 7:27 PM, Clint Priest > wrote: > This has already been covered quite a bit, the problem with your > suggestion is that the compiler needs to determine the type it is cast > to, which is why the __toInt(), __toArray(), etc, so that the language > can request the type it needs to cast to. > > > -----Original Message----- > > From: Seva Lapsha [mailto:seva.lapsha@gmail.com] > > Sent: Wednesday, May 09, 2012 4:56 PM > > To: internals@lists.php.net > > Subject: [PHP-DEV] [RFC] Custom Casting > > > > Hello All, > > > > Please be kind to review and comment my proposal for custom casting > > in > PHP (or let me know if a similar proposal was already > > discussed). > > > > http://pastebin.com/sPb0i8U6 > > > > IMHO, it's more simple and on the other hand more flexible than > > proposed > in: > > > > https://wiki.php.net/rfc/object_cast_to_types > > https://wiki.php.net/rfc/class_casting_to_scalar > > > > Thank you in advance, > > Seva Lapsha > > > > On Wed, Apr 11, 2012 at 6:14 PM, Yasuo Ohgaki > > wrote: > > > > > Hi all, > > > > > > I think my RFC confused people on this list due to improper > > > descriptions and too much information. Sorry for the confusion. I > > > revised the RFC so that most important points can be understood at > > > a > glance. > > > > > > https://wiki.php.net/rfc/nophptags > > > > > > Please read again if you've read already and give comments. > > > Thank you. > > > > > > -- > > > Yasuo Ohgaki > > > yohgaki@ohgaki.net > > > > > > -- > > > PHP Internals - PHP Runtime Development Mailing List To > > > unsubscribe, > > > visit: http://www.php.net/unsub.php > > > > > > > --_000_9570D903A3BECE4092E924C2985CE48555C04ACCMBX202domainloc_--