Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79087 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27704 invoked from network); 21 Nov 2014 16:28:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Nov 2014 16:28:22 -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 209.85.212.181 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.181 mail-wi0-f181.google.com Received: from [209.85.212.181] ([209.85.212.181:62474] helo=mail-wi0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 76/50-26013-4286F645 for ; Fri, 21 Nov 2014 11:28:21 -0500 Received: by mail-wi0-f181.google.com with SMTP id r20so9382126wiv.14 for ; Fri, 21 Nov 2014 08:28:13 -0800 (PST) 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=90RSN4ia5XoEvESDnMdcmcQZ0YfNnkC1A7PR/aPRp7g=; b=wIWlSfD4ocRgmWbev/Itf9uqzW7aINAE7LUmgV6LWgg/d9nQQgU0zaCl4EFNGhAaAQ Na4dyuCFtJnkEeZJAKcaXBg6I3opG5LsJ5CQfR9IhmQIxDac1fy0JSxuOrFE2w8ZRF0j ZjCcGjk673i5de59/xNrEQKmJijcsIsCOpOH2kT8fpeB/V+vD5r5NIN040j2/DWYa9AT jD+k2DVvdk72gWxwiMzRLeebVjmkXnTnercHbTYjBrsjCDsRcdymwjchgm8Z/t+9p/gN WyasET0GHAMkVZDDdMcZzL3BMwuI64u8tcE/3jvIorIG74bvV9jt0L0e3E9Y4Ouc5pu6 Fcfg== X-Received: by 10.180.77.79 with SMTP id q15mr9559253wiw.8.1416587291099; Fri, 21 Nov 2014 08:28:11 -0800 (PST) Received: from [192.168.0.148] ([62.189.198.114]) by mx.google.com with ESMTPSA id n4sm11899210wiz.17.2014.11.21.08.28.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Nov 2014 08:28:10 -0800 (PST) Message-ID: <546F6808.2090101@gmail.com> Date: Fri, 21 Nov 2014 16:27:52 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: internals@lists.php.net References: <546C9E22.6090301@fedoraproject.org> <20141119134632.GV2294@phcomp.co.uk> <546CA8C0.1060707@gmail.com> <20141119143329.GX2294@phcomp.co.uk> <1416476628.15061.4.camel@kuechenschabe> <1416502819.15061.38.camel@kuechenschabe> <1416519555.15061.43.camel@kuechenschabe> <1416586422.15061.46.camel@kuechenschabe> In-Reply-To: <1416586422.15061.46.camel@kuechenschabe> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] Remove PHP 4 Constructors From: rowan.collins@gmail.com (Rowan Collins) Johannes Schlüter wrote on 21/11/2014 16:13: > Hi, > > On Fri, 2014-11-21 at 16:48 +0900, Yasuo Ohgaki wrote: > > >> How about use INI until PHP8? > > No. php.ini needs less settings not more. Especially not for language > things. This makes a mess for creating portable code. ze1 compat mode > was a fault as were other ini settings we had. Let's not go there, > again. I agree; the runtime environment is not the right scope to set such options. I do wonder if it would be useful to make more use of declare() though, which is scoped to a single file, and could be used like Perl's Pragmas. Annoyingly, unrecognised declare() options issue a warning, so you can't rely on older versions silently ignoring a new flag such as declare(compat_flags=php4_constructors); http://3v4l.org/cikUU Apparently, @ can't be used to suppress the warning, either, since the parser chokes (I guess because declare() isn't really a statement as such): http://3v4l.org/DFBfO I'm not sure it would actually make sense for this case, anyway, but some global behaviours would definitely benefit from being scoped this way e.g. suppress notices in deprecated / 3rd-party code, but show them in your own new modules, or ensure strlen is not over-ridden by mbstring in a library which needs to count bytes. Regards, -- Rowan Collins [IMSoP]