Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112411 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 50324 invoked from network); 4 Dec 2020 12:31:12 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Dec 2020 12:31:12 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8C57F180537 for ; Fri, 4 Dec 2020 03:59:22 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 4 Dec 2020 03:59:21 -0800 (PST) Received: by mail-pg1-f169.google.com with SMTP id f17so3376916pge.6 for ; Fri, 04 Dec 2020 03:59:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=m2DHL7+z3DfATZ/ZJQObSkMecQPRDdw7yVs8YauUrkg=; b=U97M2+8pP4HsASFV/IkJi6SYSFno43BkH/ILKE+UkugBqIxkzFZhRAF9gBLwG6Kz8O q85cuNVac3dGZAIhECKY/XQXcH9QNLVBunqmDD+kSpQ6ddb2MqVeK5vUti6WtV4+g9ld Ih1WflO/q0PgBXc94FNA+if/YhW7AwKXgc6beXwXwyZRp2vQDZxw3I9N8cw8NGQ+KrMj riXy7sk7EyLsUCNaIE3aVmmhE2BspjZ+YAscnSDDI8k9gE/0QSLmX59eLPAUtAbmNjdF /W7cXoeJdZLbKOgyCaBovuBUtELn/XYQ73CCV0lg9PnMVP2/tqiSeXmecW2S1uwFX8Pe X+oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=m2DHL7+z3DfATZ/ZJQObSkMecQPRDdw7yVs8YauUrkg=; b=RenBbISKkhGYeukRSEodmYYDZuXJkO99yjDCeIoywD0Z8m1WhjhDrVdF2Cpgdy8OFH DRKGEiw+p7dcQZO4QX8Eu+7+LT/Xu+773hdOpaHadaYSXGHZzEiNIDLr6IOsC8A5aW34 TEYW27YuBWX5ti9JF88CO464bQamclbtiTM6UpjjN2pLlKiU+CRBg0bF6kjaC7kSGiQa DsI7XZ1dttOKF0jreYf2fvwSESbR27J6Q6vVVXM/Niaok30OmYSVKsy+f4y2+WpS4tdX KccgKbEwA8zdQMMhcs/yXrd8Cyv20L6FkiSeLIq6rq8o+gfTqG9PCNz0CUMXzXRs2Zow x4NA== X-Gm-Message-State: AOAM530Fu9gZPs6UOHHFLkgAYu8aVsUQAyYbpZCfgTRrYWhBXJaqa55U 3tMPjm+CbyN4Xp4z84Xt9n7T/KbyLnGA6ynXoR0BadZU+VVoxQ== X-Google-Smtp-Source: ABdhPJzWn9bQ35OloBsXzOPZthS1EiosIysc90S4p2nULNTkEcMrl7VKMw69SGKrBV78DjB1p56qQsPbKO0hFfNoS94= X-Received: by 2002:a63:131a:: with SMTP id i26mr7322379pgl.232.1607083157743; Fri, 04 Dec 2020 03:59:17 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 4 Dec 2020 12:59:04 +0100 Message-ID: To: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC] Restrict $GLOBALS usage From: divinity76@gmail.com (Hans Henrik Bergan) if this gets rid of a significant amount of implementation complexity or runtime overhead, i'm all for it, and don't think i've ever seen code like $GLOBALS = []; before, given that it's technically a BC break, would have been nice as a 8.0.0 thing, but i hope it's small enough for an 8.x instead of waiting for php9 On Fri, 4 Dec 2020 at 12:04, Nicolas Grekas wrote: > > Hello Nikita, > > > > I would like to propose the following RFC, which restricts certain rare > > usages of $GLOBALS. This change will improve performance, reduce internal > > implementation complexity, and fix a very large class of bugs relating to > > $GLOBALS handling in internal functions. > > > > https://wiki.php.net/rfc/restrict_globals_usage > > > Yes please! This will allow removing some black magic from Symfony's > VarDumper component, which detects these "copies" of $GLOBALS: > https://github.com/symfony/symfony/blob/31ee43a8c67897a2f61782060965f5c8a81f58a2/src/Symfony/Component/VarDumper/Cloner/VarCloner.php#L144-L155 > > Nicolas