Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67016 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82083 invoked from network); 9 Apr 2013 13:47:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Apr 2013 13:47:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=steve@mrclay.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=steve@mrclay.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mrclay.org from 50.22.11.19 cause and error) X-PHP-List-Original-Sender: steve@mrclay.org X-Host-Fingerprint: 50.22.11.19 bedford.accountservergroup.com Received: from [50.22.11.19] ([50.22.11.19:36238] helo=bedford.accountservergroup.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CA/23-63798-EEB14615 for ; Tue, 09 Apr 2013 09:47:27 -0400 Received: from n128-227-214-25.xlate.ufl.edu ([128.227.214.25]:62485 helo=Distance-Ed-Sclay.local) by bedford.accountservergroup.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.80) (envelope-from ) id 1UPYtP-0000eH-SP for internals@lists.php.net; Tue, 09 Apr 2013 08:47:23 -0500 Message-ID: <51641BED.7070501@mrclay.org> Date: Tue, 09 Apr 2013 09:47:25 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: PHP Internals References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bedford.accountservergroup.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - mrclay.org Subject: Re: [PHP-DEV] [PROPOSAL] add a leading backslash to classname when serializing/var_exporting From: steve@mrclay.org (Steve Clay) On 4/8/13 11:28 PM, Laruence wrote: > bug is described at #64554 -> https://bugs.php.net/bug.php?id=64554 > I proposal to add a leading backslash to all classnames (not only ns > names, since no harm, consistent and make sense) when doing serialize, > var_export etc. Short term: Add note to the var_export() docs: "For full compatibility with namespaces, the representation must be executed within the root namespace." Proposal seems reasonable to me (as Johannes mentioned, serialize should already be OK). I think we're under no obligation to have serialized forms created in one version work in previous versions [1], though FC of already persisted strings are important. Note this won't solve the problem of existing var_export strings created in past versions. (We'll still need some kind of note.) [1] If an app needs BC of code like \Foo::__set_state(... I would think it'd be easy enough to strip away the escapes. Steve Clay -- http://www.mrclay.org/