Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101778 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80706 invoked from network); 5 Feb 2018 16:54:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Feb 2018 16:54:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=kontakt@beberlei.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=kontakt@beberlei.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain beberlei.de from 209.85.215.47 cause and error) X-PHP-List-Original-Sender: kontakt@beberlei.de X-Host-Fingerprint: 209.85.215.47 mail-lf0-f47.google.com Received: from [209.85.215.47] ([209.85.215.47:41396] helo=mail-lf0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 17/0F-49805-75C887A5 for ; Mon, 05 Feb 2018 11:54:48 -0500 Received: by mail-lf0-f47.google.com with SMTP id f136so42689644lff.8 for ; Mon, 05 Feb 2018 08:54:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beberlei-de.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=6aquTMpBA/RoR3TQeZnCq83KgScLqKpjxKDLQO7ltFc=; b=UnIPnMEZ3gkshle/S6uN6JzVqMFI//2VyiY6WG8ranZRGQL8G5Z1EWSwFUd+sQCj6O 4VGuQyTbUoVu+SCqtyKKpOWL+iLQPK9oIo31ZIDTIWqFaRHG3Rc76puwChIOig1ZXYEJ y4Kff4naMMw1C66vkC4jS4tT47D8CK6wcn6UQl56/6k1Z5soLp1/9zpc1u5v9GZQJTIa AxHObxrcnDUonZA7GndGvVMbH5kTiW0idcuCrwJNMReTT70OuTBtVU1gJ5nJg3KgOXzy 3gLnV4Q7UmRPZkxDXzLvpYcgyOo3o7kaiEXv9KK7u2zatUDIpSflydFem8mkVrwgMbtH DT7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=6aquTMpBA/RoR3TQeZnCq83KgScLqKpjxKDLQO7ltFc=; b=Zn679iNu0lGKaiwZFSWjzNgmby4GXFe6ETMUmT9+MdU9H2blehlNs2+Y4cLbiEGQo7 8jC+FISAr7KnSDG8Ug7ySSEnTIjxg4K/q+hksHExab1/DlWDO/sM6EzLpt2PKSO9OBiF 5lHLwEaUPUbzPa8p7PVnaKoplm3ZmeDKeLoWHYAcyBUuVxReChuokcMG7pv1eT+boCiV qslTbSyX0hJH+TS55NpR/2PG8ZQwP6Tue97rCq16UNdr+EdRNZZ9dnkaXhQk/aTVHUrz SY4zcObHPvvIrkZbrUoP5V0GhgGzzIJmetLUUkSztqqOii8A9BxxC93EGGG6gN6fhHZL o2cw== X-Gm-Message-State: APf1xPD7DtplfkFPjzVQ8Uyjc0GUN73f1ZFdn4p19QPdq5U6EcLIuJel A0zJKiWvq1rXo9yPfJ00BT+CQkn/600JBFuaU04yiw== X-Google-Smtp-Source: AH8x227TvLVxOyl5GGePTj81C0iVlkV8+aCXe/jI3mFAHTnCOPjkCK95+7miyZ8thKH+KL5Em0nDoXq3T1XFJP1X+jQ= X-Received: by 10.46.84.2 with SMTP id i2mr4340762ljb.83.1517849684904; Mon, 05 Feb 2018 08:54:44 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.209.147 with HTTP; Mon, 5 Feb 2018 08:54:44 -0800 (PST) X-Originating-IP: [2003:e5:bbc5:1400:3054:d8d6:b546:f4de] In-Reply-To: <07d9e3a0-d516-aa77-4818-ce8b02e8dd08@gmail.com> References: <07d9e3a0-d516-aa77-4818-ce8b02e8dd08@gmail.com> Date: Mon, 5 Feb 2018 17:54:44 +0100 Message-ID: To: Stanislav Malyshev Cc: Wes , PHP Internals Content-Type: multipart/alternative; boundary="f403045fb9944aa0cd056479ebf8" Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Deprecation of fallback to root scope From: kontakt@beberlei.de (Benjamin Eberlei) --f403045fb9944aa0cd056479ebf8 Content-Type: text/plain; charset="UTF-8" On Sun, Feb 4, 2018 at 10:56 PM, Stanislav Malyshev wrote: > Hi! > > > To get the same benefits (jit and such) wouldn't it be better to > introduce > > a "use function root;" or similar statement or a declare() to specify > this > > file imports all root functions? > > We already have this right now, and realistically speaking, who wouldn't > do that in their code instead of writing weird \strlen() code? Everybody > would configure their IDEs and so to insert this automatically. So we're > talking about RFC to make people work harder for what they already have > now and then end up in the same place we are already right now. > Yes we do have root namespace lookup, but its not automatic, it is only as a fallback. This RFC is about removing the intermediate namespace'd check, hence requiring \strlen. My idea was to force all function lookups into the global nameespace first by doing the declare or use. This way someone writing a file could state "i dont use namespaced functions in this file, don't try to load them". I agree its annoying and more work, just wanted to present it as an alternative option. > > > was acted on at any time in the future. and in addition people will > silence > > the notices on global error reporting level, because violations would > > And note also that we can't silence just this warning. Which means > people would have to silence *all* warnings, thus making all other > messages useless. This is not a good development and this is not what we > should be training users to do - saying "well, it's a warning, just > silence it" is the worth idea we could have. If we create a warning, > recommendation should be "it's important enough so we call your > attention to it, please deal with it", not "just silence it". If it's OK > in most cases (as opposed to rare exceptional cases) for it to be > silenced, it shouldn't be there in the first place. > Yes, this is why I have a problem with using E_STRICT (we don't have a lot of them at the moment, but maybe in preparation of 8 more?) warning for it. It would send a wrong signal to ignore rather than fix, because the amount of violations would be massive. > > -- > Stas Malyshev > smalyshev@gmail.com > --f403045fb9944aa0cd056479ebf8--