Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85370 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46194 invoked from network); 21 Mar 2015 14:58:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Mar 2015 14:58:11 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.51 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.218.51 mail-oi0-f51.google.com Received: from [209.85.218.51] ([209.85.218.51:36760] helo=mail-oi0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 10/B4-18917-0078D055 for ; Sat, 21 Mar 2015 09:58:08 -0500 Received: by oigv203 with SMTP id v203so111882530oig.3 for ; Sat, 21 Mar 2015 07:58:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=FGNDhztbszUzXHiiDflrEq3jt7ugcz7Qr00/b2AM2gs=; b=i2EX0jI6/BTh1HdAaNaenmpvQmVi8riCU2gnpChMi076jqCwH7u54R9l4rILLoBhL2 9U30VCuOVuWfajAiH8JkZXR30hkfBgzu91fGPqlH36GvaRRpGMsmMbfyOYqgqSP8rHKm 3nlLhCgCFxpNkVx77nqiDZuAljtdYQu7ot0TYoKgRekeEEE2yF8pXvfhWcDycbGteEX8 gCvgqqhzDC9g+dRZ/kXApTAGGWWHMFfNmYGxZ3gqZrtBs557k/NjCkuINKSBOyMl+9Tq tFu7XsEl8CrFj6GldVJBnR+Hfocpfl+M5GWhphysCYHzNLdNI9h9E6qC4a94RxBVc3Bg /B5Q== MIME-Version: 1.0 X-Received: by 10.182.227.132 with SMTP id sa4mr2032200obc.40.1426949884897; Sat, 21 Mar 2015 07:58:04 -0700 (PDT) Received: by 10.60.157.67 with HTTP; Sat, 21 Mar 2015 07:58:04 -0700 (PDT) In-Reply-To: References: Date: Sat, 21 Mar 2015 15:58:04 +0100 Message-ID: To: Mike Willbanks Cc: PHP Internals Content-Type: multipart/alternative; boundary=001a11c2ee9e006e4f0511cda9ba Subject: Re: [PHP-DEV] WIKI Account Request From: tyra3l@gmail.com (Ferenc Kovacs) --001a11c2ee9e006e4f0511cda9ba Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, Mar 19, 2015 at 3:35 PM, Mike Willbanks wrote: > Hello Internals, > > I had requested a wiki account (mwillbanks) as I would like to propose an > RFC on Object casts to scalar types. This has previously been discussed > prior to scalar type hints and since we have those now coming into PHP 7,= I > believe it would be a great time to take a look at this for 7.1 (Discussi= on > will not be immediate as focus needs to be put into 7.0) > > The last RFC had gone inactive back from 2012: > https://wiki.php.net/rfc/object_cast_to_types and I have talked with > ircmaxell about doing something similar but making it more inline with ST= H > as well as supporting a generalized __cast. > > The general cruft of it is to have objects have the ability to support: > + __toInt > + __toFloat > + __toBool > + __toArray > + __cast > > Removing the existing having __toScalar as it would no longer make sense = in > this context. __cast would be utilized more or less as function((int) > constant_type) where as it may mean PHP_TYPE_* as initial feedback on the > idea showed that it would be the most generalist approach and might be > useful in that context. > > Regards, > > Mike > Hi, I can't find your account request, are you sure you was able to submit it? The form won't be submitted if you fill out the ' To which email address do you have to send an email now?' question wrong. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --001a11c2ee9e006e4f0511cda9ba--