Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71467 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9964 invoked from network); 23 Jan 2014 21:52:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jan 2014 21:52:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.173 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.217.173 mail-lb0-f173.google.com Received: from [209.85.217.173] ([209.85.217.173:45949] helo=mail-lb0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 30/2E-39789-C0F81E25 for ; Thu, 23 Jan 2014 16:52:12 -0500 Received: by mail-lb0-f173.google.com with SMTP id y6so1909622lbh.4 for ; Thu, 23 Jan 2014 13:52:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=HnmIqhPQgjIfBTE7SrsuzOYInsoxtTrX8p4S7xy5UmE=; b=sXmWzwNCFExKDKNQCvlEQ5X8jn77CNs0LEpKGvhjaKC4lS7krIqqwb79FSoI2vbGgW a7C2ckUKbKUwxU/cM/kKCunNDL/48mUhOZmxPp2XDEB9Z4QZepKjCha0f6DRnCwt1pqy Dn6+12X7qxxCiHjLFY+bp8f885rI4e/OhnOxfvd3SCM/Xf94ihdYzpKV/TY8x8KhoCKc radUGtCcnYl5mUkGDbBilmoUib0JnOQwaGkNy6QTiZtTeaMAhPJwsYR2Xd/Psgux6jw2 glTiF/tSSik7hcLWyF3NAgsEY44jI9ZJal+iLN2jE4mliL+/Beq8kFakU0GBG7e4Rb1+ wZGg== X-Received: by 10.153.9.97 with SMTP id dr1mr14318lad.45.1390513928764; Thu, 23 Jan 2014 13:52:08 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.132.134 with HTTP; Thu, 23 Jan 2014 13:51:28 -0800 (PST) In-Reply-To: References: <2D2D996C-9455-4DD1-9669-90AFAF591E32@strojny.net> Date: Fri, 24 Jan 2014 06:51:28 +0900 X-Google-Sender-Auth: iBivfAMMztIrGDoZz8TS2Gxe-CU Message-ID: To: Derick Rethans Cc: Lars Strojny , Sara Golemon , PHP internals Content-Type: multipart/alternative; boundary=001a11381b4ec7812004f0aa40fe Subject: Re: __set_state (Was: Re: [PHP-DEV] [RFC] __debug_info()) From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11381b4ec7812004f0aa40fe Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Derick, On Thu, Jan 23, 2014 at 8:30 PM, Derick Rethans wrote: > > > > Could anyone add __setState() for 5.6? > > > > > > Why would you want to do that? If at all, all the *newer* methods > > > should be __debug_info etc. __set_state was first and changing it to > > > __setState() would mean that var_export'ed() variables in < PHP 5.6 > > > would now no longer work? Or the other way around? It's a cosmetic > > > change that helps nobody=E2=80=94just like renaming other standard fu= nctions > > > to make them more "organised". > > > > I mean add alias for __set_state() to keep consistent names. > > __set_state() should be there very long time or forever for > > compatibility. > > You seem to misunderstand what __set_state() is for. It is for reliably > representing a value so that you can "include" it's contents with > var_export(). If 5.6 would suddenly start spitting out > Class::__setState() instead of Classs::__set_state() then older PHP > versions can't parse/include that outputted data anymore. > I have to check code, but don't we have options for this? We may use __set_state() for var_export and still have alias as __setState. People are using var_export exchange PHP data, so we should be careful. I agree this. > It's small cosmetic change, but it would assure PHP to be a good > > language to learn in the future. IMHO. > > But it makes as much sense as adding a str_len > I understand both opinion, strlen could be str_len. Other str function may be reamed. Some names are easy to decide, some are not. We may have list of votes for these. I'll make list after 5.6 release :) Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a11381b4ec7812004f0aa40fe--