Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108316 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 96932 invoked from network); 29 Jan 2020 12:45:20 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Jan 2020 12:45:20 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2D29C1804D1 for ; Wed, 29 Jan 2020 02:55:56 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) (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 ; Wed, 29 Jan 2020 02:55:52 -0800 (PST) Received: by mail-io1-f53.google.com with SMTP id c16so18072641ioh.6 for ; Wed, 29 Jan 2020 02:55:52 -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 :cc; bh=tB+0KWkUe3mCP2wsK4grxOwgK3m6ZKxI3Y+C/ZAwTGQ=; b=nAe1V0fjQf4uxBghPXaKXJTZCYyyTDt0j39deqOPt/yGO5yKthq+tQ9o/OgWFIT0v1 kTvPhQOVEPR+hB6JQcKgF3VGZ759fgMsOpbpjTVCQjpap1DKfBwpL32PAPeVlD/EqK0D cjKOnbGRwl6pxiC4/JxJ2U1rMhzSj6IrfNOkI9q4pVLhzCcZj6KpFbqhELJcI4M0JMqO /42gToEhAr/dV/Tvwn6Yf1sqWoNZSnKvVoOzIjERFjrRZdRaLdzydh3DGGi43JPPLcaC javQc6gNEjzDARSZ0NV5SXPSBHRGQ5i86aLTPlqKk5FYwIQMqNPKtpiWh6R0tgu6Fz6I jufA== 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:cc; bh=tB+0KWkUe3mCP2wsK4grxOwgK3m6ZKxI3Y+C/ZAwTGQ=; b=gpKQZJkZqjPJdaWD0Zs3/pMitwYfMDvdJhu055ziPGNIGPdoN4sRj9SFFCsYUF6uvC 1tW0EQmNXS69P0RnTrASe+WojCikfLmtrBfU7AADC2Tgt6ENz0qkpJWdZASxYgYJZ649 qTorzIYoJlHdOtEmvajTePK90cEOUnHUMWo20XIKnuAYbbabwODgyxXQt6SOgF8zmx8O ODJlklDmF41jx59aFNhIeZc2ErMMfC+XvK3M208qO87PWwE5XOZbbbsZc1Mi06DBmj9O KVfOw8AHAASVp4lt2rXslS7B8uASRufXJ8KObpA7PDqpT1AR/DTPOUT1Nnb/qqhh/0n3 wBJw== X-Gm-Message-State: APjAAAX3YO0AYxndR2FzUwF94GOPY5aitvM9HCLN22I307futR0CjxDr SIFtb1jWAv02mK4fYnDRjFXQr9JLof0XO42uNvc= X-Google-Smtp-Source: APXvYqw3WqJOgAGhN3/HwlMeIQ5Wk85eKNZlDKeN6q1VOi7qVPni+mGJdVQHFOrwuWnuiO/C7Q/vRZEOO8K69aZ0l6c= X-Received: by 2002:a5d:9742:: with SMTP id c2mr20726273ioo.165.1580295350267; Wed, 29 Jan 2020 02:55:50 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 29 Jan 2020 11:55:38 +0100 Message-ID: To: tyson andre Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary="000000000000fe3837059d452e01" Subject: Re: [PHP-DEV] [VOTE] declare(function_and_const_lookup='global') From: ocramius@gmail.com (Marco Pivetta) --000000000000fe3837059d452e01 Content-Type: text/plain; charset="UTF-8" Hey Tyson, I voted "No" on this one, sorry. TL;DR: I'd rather have a mechanism to disable global function fallback, not something that makes un-imported symbols immediately global. The idea to disable PHP's implicit "fallback-to-something-that-may-or-may-not-exist" is great, and it could simplify some of the engine, as well as remove some caching mechanisms (lookup) in some contexts, but I'm pretty happy with disabling all global lookup functionality, rather than making them the default. I don't have a problem with `use function sprintf;` to import things from PHP, and actually use it to quickly grep whenever I do something extremely dangerous (like `use function umask;`). This gives me also a good overview of how much of the global symbols are still in my system, and to be replaced with something like `thecodingmachine/safe`. I also deal with merge conflicts regularly: not a big issue either. Greets, Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Wed, Jan 29, 2020 at 3:22 AM tyson andre wrote: > Hi internals, > > I've opened the vote on https://wiki.php.net/rfc/use_global_elements > after weighing the pros and cons of discussed alternative approaches. > Yesterday, I've finished the last set of updates I announced I would do > based on RFC feedback. > > (that update was to require the statement 'use function ...'/'use const > ...' before declaring that function/const > outside the global namespace, > if declare(function_and_const_lookup='global') is opted into) > > Voting closes on 2020-02-11. > > Thanks, > - Tyson > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --000000000000fe3837059d452e01--