Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108315 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 87829 invoked from network); 29 Jan 2020 11:56:35 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Jan 2020 11:56:35 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DE3561804F2 for ; Wed, 29 Jan 2020 02:07:12 -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-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (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:07:12 -0800 (PST) Received: by mail-wr1-f46.google.com with SMTP id g17so19435653wro.2 for ; Wed, 29 Jan 2020 02:07:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=dtMBLDui1/8DrwFbfPHDNdnYG1B9tnOppbMG3djHxO0=; b=K+SZ2p5oFZnlpJI6FsP9QxZ3ECSKyooE+RrPTxq+Q6rqg4okxr4LC3cM/SAlhnz5yG DQXwTsz40mnTFZcjugHy/11g2NYdwZKAb0vlTJcxhRn/9H59j1KTLnLU9fbKPR0bze+W 9kx/JAuITjF7mtsyHNGd3uac5e58MG9IamwTeabB0LMg/EaXCleujJMUSaiyUwWv1MXi +rjAxnyA0RnB9/UttAQq4NqTjNEsWzn5zzQwJboHzGQZGXj0vUtjCQabZfjte2plfnUw D8U0jZ+8NAREuGv6m5HX481ZmjtLh72HarWTczf3oOtful215aivdll8r9RppS4yLJ2w a1jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=dtMBLDui1/8DrwFbfPHDNdnYG1B9tnOppbMG3djHxO0=; b=oFuzMOsCRjWWeVNwV3iwqdNAM+fRJnR7DeM7oORLU+ljDRSzlt+D8mXlATLRgPxOYp xRa6IIZ4Bld1fI9ug4fB6Z9XtIE5y71z7WQCJSGMkLD4twso2hpsMAwpUlJSLVXtMWE/ eY4q0hZkSg743BnFBh5McDdpyBRjThTs+PyGe+ut/SiGtFaETXFrR3S39909F6+JmeIA pAYQLT6q9pUoI5hK8y/9zeJeqMvbwEXgYgtcbgty91Cdc7yKrHIOqFPhdW+cP+ADGhrs 2q+R9j48EiKbma1Ihp+5JOolnV0zdhyRIsaDENe7QbyXJYPQVf5VEv4XxtLQY6SfHW1O +OZQ== X-Gm-Message-State: APjAAAXV8GyfqKZCoSbKDAZga6SqLoaA6T8/QoA1fqnY5PaJKrSWZOqw pmiShIOMtVnaqJ7+nJIYXDA= X-Google-Smtp-Source: APXvYqyl89taXppn3z2H0Ko5HJ7Om76JUyymzh2tvXwtn79gXn+kLm0FeI883+eGblK9bn+Pn0gLpQ== X-Received: by 2002:adf:e547:: with SMTP id z7mr33903698wrm.258.1580292430606; Wed, 29 Jan 2020 02:07:10 -0800 (PST) Received: from [192.168.0.63] (84-75-30-51.dclient.hispeed.ch. [84.75.30.51]) by smtp.gmail.com with ESMTPSA id f207sm1804519wme.9.2020.01.29.02.07.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Jan 2020 02:07:09 -0800 (PST) Message-ID: <26078CD3-CAD9-4249-8B68-831510425E96@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_33C35DCD-BE0D-485B-B2E0-80B7263AAC99" Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\)) Date: Wed, 29 Jan 2020 11:07:09 +0100 In-Reply-To: Cc: tyson andre , "internals@lists.php.net" To: bishop@php.net References: X-Mailer: Apple Mail (2.3608.40.2.2.4) Subject: Re: [PHP-DEV] [VOTE] declare(function_and_const_lookup='global') From: claude.pache@gmail.com (Claude Pache) --Apple-Mail=_33C35DCD-BE0D-485B-B2E0-80B7263AAC99 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Le 29 janv. 2020 =C3=A0 09:55, Bishop Bettini a = =C3=A9crit : >=20 > Suppose I'm presented with this diff (and only this diff): >=20 > $a =3D array_diff($x, $y); > + if (count($a)) die('Unexpected differences'); >=20 Realistically, when I see that diff, I assume that those functions are = the well-known global ones. The eventual presence = `declare(function_and_const_lookup=3D'global')` directive would make my = assumption provable, which is an improvement. In the rare cases where = that my assumption is false, an explicit `use function MyNs\{array_diff, = count}` is welcome (and is already possible) in order to make my = assumption refutable without needing to look for improbable redefinition = of those functions in other files; such an explicit declaration would be = mandatory in presence `declare(function_and_const_lookup=3D'global')`, = which is an improvement. =E2=80=94Claude= --Apple-Mail=_33C35DCD-BE0D-485B-B2E0-80B7263AAC99--