Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77905 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56220 invoked from network); 13 Oct 2014 00:35:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Oct 2014 00:35:16 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.44 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.44 mail-wg0-f44.google.com Received: from [74.125.82.44] ([74.125.82.44:59589] helo=mail-wg0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 91/20-54452-14E1B345 for ; Sun, 12 Oct 2014 20:35:14 -0400 Received: by mail-wg0-f44.google.com with SMTP id y10so7472774wgg.15 for ; Sun, 12 Oct 2014 17:35:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=Bm5Xd9pGEPNMZkIiPeS5ubV5moEo4R9UiE0jpBgUJCQ=; b=tw+nJY5qUr1aMFMRnz2VTZjA8xiO+WYuhBtHgaRPNVVoAb80WRBBBbWgEvdTR9ZmO3 xKIRckp1y+eLSTH1ssU7l03pvkUoE9i49fVOQxrUsPeJwoNMaHSHuceryZr7mVyFMVa9 Kz2mXYjjP6eEN7bOrRNsUZcrtxXpuYOx35idsjMDa3fmcc6YRe4TSdXBRkoR7kM1PN1e kZYpTS33RcBjTHTqWxcMegUMV03bncFLB1aN+bdVy/Wd7HUPCtjp0yg0b87ZWNe6cI4V r5YuuPmeQ7yDqB6Eaj9B6i5Ee3tqw4xVGaQnPM8PlkgoGYQf7+bru9XKAeMpnIOgx8Rm EPsg== X-Received: by 10.194.89.225 with SMTP id br1mr17803394wjb.51.1413160511045; Sun, 12 Oct 2014 17:35:11 -0700 (PDT) Received: from [192.168.0.2] (cpc68956-brig15-2-0-cust215.3-3.cable.virginm.net. [82.6.24.216]) by mx.google.com with ESMTPSA id pm6sm14841717wjb.36.2014.10.12.17.35.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 12 Oct 2014 17:35:10 -0700 (PDT) Message-ID: <543B1E3D.5000500@gmail.com> Date: Mon, 13 Oct 2014 01:35:09 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Remove deprecated functionality in PHP 7 From: rowan.collins@gmail.com (Rowan Collins) On 12/10/2014 11:11, Nikita Popov wrote: >> For example, things like this: >> > >> > # style comments in ini files (since PHP 5.3) >> > >> >I don't think we should remove at all (or why is this even deprecated?! >> > > Because ini files use ; for comments and not #. I was curious enough about this to dig into source control and do some sleuthing, and it looks like what actually led to this situation was: - Between 5.2 and 5.3 (late 2007 and early 2008), the ini parsing code saw a lot of heavy modifications [1], including a patch adding many new syntax features, and a subsequent rewrite from flex to re2c. - This, inevitably, led to a bunch of regressions. As later pointed out, the accepted format wasn't really documented in the first place. [2] - One of those bugs had to do with the parsing of # characters. [3] - The behaviour of # as comments in earlier versions seems to have been a side-effect of something else, rather than a deliberate feature. In fact, it was possible to have a key starting with #, but a line starting # that had no = was silently discarded. [4] - As a result, # was added back as an explicit comment character, but with a deprecation notice. [5] My guess is that the reasoning was that semicolon was always the "correct" comment character, so people should be encouraged to use it. Whether "deprecated" is the right word for that, I'm not sure. [1] http://lxr.php.net/history/PHP_5_3/Zend/zend_ini_scanner.l [2] https://bugs.php.net/bug.php?id=47703 [3] https://bugs.php.net/bug.php?id=44575 [4] http://3v4l.org/AoI5H [5] http://lxr.php.net/diff/PHP_5_3/Zend/zend_ini_scanner.l?r2=%2FPHP_5_3%2FZend%2Fzend_ini_scanner.l%40b3d0514b6f87af37a7750a0f4c95e4a12a8f7009&r1=%2FPHP_5_3%2FZend%2Fzend_ini_scanner.l%40193dd31a22a52cfdbd30135b1025ca774d1e98b4 -- Rowan Collins [IMSoP]