Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91960 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29709 invoked from network); 25 Mar 2016 23:17:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Mar 2016 23:17:56 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.66 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.213.66 mail-vk0-f66.google.com Received: from [209.85.213.66] ([209.85.213.66:33815] helo=mail-vk0-f66.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 89/F7-10214-227C5F65 for ; Fri, 25 Mar 2016 18:17:55 -0500 Received: by mail-vk0-f66.google.com with SMTP id e6so8970033vkh.1 for ; Fri, 25 Mar 2016 16:17:54 -0700 (PDT) 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; bh=yVJBAfpE3607XFxXQUUhMLGXu+dMaQfdXUbib60sP7o=; b=Q4XesBHau5aO0uNFO1C+79xca04m7a4DDP5InwanLoetTD7YzdCyttrN9YMh8HShV7 XZ4I5I2tq3jZN6p/are71BK/Iog5Dwqpp02ByCFRSN3iZ6TGOce7+xH07loFGo3P3dbL sLJWjxr/FXMOS6Q5LLrjSzMVuYn0YrlBQaEbx9sy1A41FPJZO6l/JiYt2PQCEAVzYIFy i34EISqF2XTigmFhc5aF63FcInA28hSkrw5glI85tWYh1bwEoIJgrKOnH23k9h+Ig97I PQKsqcWG+a4t6qagFrKkcUMsFeq9A3vI6rmg/6+IqaELca8WIWTd1YPuafon7Naeg977 TkPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=yVJBAfpE3607XFxXQUUhMLGXu+dMaQfdXUbib60sP7o=; b=C4n1k5z2nYq/X5MMEe0Cl1aFQUD2TesFTHJ9ygkSyNDazlVvXr3h/PzaLmWagWOz7w wxcfhcILp3Qps+RMZ6DXPt/G744n6Iabz0GbzAAZw8o0lVN7Tl+jlLZYRBywiTDw0EbG 7D8wA3nvTOLN/+2bSmCnnPMQjU+VxdT+Re67i6W0kAH7IPyY1kz08AiNTnigGISK4j4j mwexgnu/vlGFTchKDgfdxSNMq0ekqSD9I2T1DgmE8j7lhzf5gJfdPDwwCuWQ70/e/cpG uJqEBacixnAWlhn/ROcKQIn7H7eAqrDjjX5ySzaPOqKSwNvCneeMAjKXfCFYpf9p46+J 7yKg== X-Gm-Message-State: AD7BkJLaGUSv5/WrB6qAZ815pn3wM3MxBTkq7vUB5KoClbin1SjYoaOHHddQANiiZbYgklcmTMmQ4qo3PVATVw== X-Received: by 10.31.34.134 with SMTP id i128mr8634211vki.7.1458947872317; Fri, 25 Mar 2016 16:17:52 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.159.40.98 with HTTP; Fri, 25 Mar 2016 16:17:12 -0700 (PDT) In-Reply-To: References: Date: Sat, 26 Mar 2016 08:17:12 +0900 X-Google-Sender-Auth: q7G_2naJBJLMujIl3fsYb4WP4Ys Message-ID: To: Marco Pivetta Cc: Scott Arciszewski , Nikita Popov , PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Allow empty property names From: yohgaki@ohgaki.net (Yasuo Ohgaki) On Sat, Mar 26, 2016 at 8:08 AM, Yasuo Ohgaki wrote: > On Sat, Mar 26, 2016 at 8:00 AM, Marco Pivetta wrote: >> On 25 March 2016 at 23:56, Yasuo Ohgaki wrote: >>> >>> Hi all, >>> >>> On Sat, Mar 26, 2016 at 5:31 AM, Marco Pivetta wrote: >>> > var_dump((object) ['' => 'foo']); >>> > var_dump((object) ["\0*\0" => 'foo']); >>> > var_dump((object) ["\0Foo\0" => 'foo']); >>> >>> Allowing null char would be too much. We reject null char in path >>> parameters, it should be rejected like path parameter. IMHO. >> >> >> The sequence "\0*\0" means "protected property", while the sequence >> "\0Foo\0" means "private property of class Foo": that's been the case for a >> looooong time :-) > > Oh. Was it? I've never used and encountered this. Thanks. > I'll avoid null char as I use PostgreSQL JSONB extensively, though. > >> Not suggesting allowing "\0" for property names: the example just shows >> creating a public, private and protected property with an empty name. > > Could you show some real world example use cases? You mean PHP converts private/protected property to this form, not currently used as JSON string. I understand your point! It would be good for PHP users supporting null chars in names, then. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net