Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108197 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 10155 invoked from network); 19 Jan 2020 00:45:24 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 19 Jan 2020 00:45:24 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D01211804D1 for ; Sat, 18 Jan 2020 14:53:24 -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.9 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,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS8075 40.64.0.0/10 X-Spam-Virus: No X-Envelope-From: Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10olkn2018.outbound.protection.outlook.com [40.92.40.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 18 Jan 2020 14:53:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EIPVBdGFZLTLwj90ZjCqMoW/HhqhAFXdwQnAGlLQDGmWPRqsvBXKtvNa16vyDQ67pMl380XlUe5kOfG/iwtPJ5D5np2HcIMoOVKtCdxCkFHZ3N0ZBWq937xgXlWEDQwzGsDS3RQiMJUBDvB3egUEmaSclBg5YVFlRd8IsCdtSPJVovp7GZ1ad3sW7PZ8cjAGQj1yHylcyt2lojCi+XcJI5GhMCOJZfWD+uztApcTXN/RSkXn+RpuSedmW/Xu1WGeS3JIcK3KB6r90TkmSJj2TI+dWjbo1wbHbfROkIZyoeF6vKoIxuaIXZKlf6QA3YMdoPU1G3ll+lApH/KoQKalHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1IOGdBwONYNIQH2bNHXMVFhOhIqJuAndYofN3+GnXGA=; b=IDb5RK6Xhvfv07EG/jG5QvWDQ3YEdBFcl4E2FwggDltsCaj6bMpJqsjPM0nf1hTA7gr6EEBDdysLaN1tpqzJzQIW68vY1O4qYnoR5ddLdQ6hQRuAUcZw9ABPB4CckjoeiXiZwvd2Ut74zu196CCJ7k5BBvdR5O+/V/VCP0p51eAqYlFmK8LtOEVgoh0He7d22tdEzMR2aEA+y0g6jmyip6MCyrcP9/8OnC2MeDgUOaVRvu2d95idvyeVNyXT2rAo53DjNKPlnil2reGUwk0590yhLlsFe0/fTs+perkAPGIYkZVxq3dyZPEJeVQYA43ayLkqG1GtplaoxQRQHKcjaA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1IOGdBwONYNIQH2bNHXMVFhOhIqJuAndYofN3+GnXGA=; b=SbMwUHxJs6UhxH8tiFtWExhMI67XF/lVnTntdnKWWMCct2RQ7kGA7ReLUmhN4NdbfcGkPCNQB6K+vPgmOy78qG0+hsEV40gv0Z1LaKpUvyYTaW6UN7iNrOcBwpMogicAzOJxsUckyFoKJErISCEajnDuT/FJCky7VPGvAhfOUHWeOIu6P7ltuzbKDQVporSLIP4/bcnh2FYCblrxJ44jYICIk9JXS8oG4U8trYqhmvIj/M9gQ9FVfeJzC+wVZEUaDB2jTnq+NUN2y5HBpm5SVxDaeltZS2TtyUsHGhm3P5QlBpZX1bPunKtNCw7eK8/7JF02kNrv69nmcpHbvsjkjg== Received: from BN7NAM10FT065.eop-nam10.prod.protection.outlook.com (10.13.156.52) by BN7NAM10HT201.eop-nam10.prod.protection.outlook.com (10.13.156.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.19; Sat, 18 Jan 2020 22:53:22 +0000 Received: from DM5PR07MB3067.namprd07.prod.outlook.com (10.13.156.56) by BN7NAM10FT065.mail.protection.outlook.com (10.13.156.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.19 via Frontend Transport; Sat, 18 Jan 2020 22:53:22 +0000 Received: from DM5PR07MB3067.namprd07.prod.outlook.com ([fe80::29e3:53bf:163e:5beb]) by DM5PR07MB3067.namprd07.prod.outlook.com ([fe80::29e3:53bf:163e:5beb%3]) with mapi id 15.20.2644.024; Sat, 18 Jan 2020 22:53:22 +0000 To: Mark Randall , "internals@lists.php.net" Thread-Topic: [PHP-DEV] Re: [RFC] "use global functions/consts" statement Thread-Index: AQHVwNgGtev425C1jEaW2/fYCDQJoKfqjUCogAA6vwCAABZSCIAF7qHQgAA+1YCAABKbIg== Date: Sat, 18 Jan 2020 22:53:22 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-CA, en-US Content-Language: en-CA X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:7F84474A35981DD9473C50499E1B642A03BEFA4F4857C50E6D12F9F6EA1AB3E1;UpperCasedChecksum:D5C49B9B6D270E4C03406765746715653285D7AD940A12CE8BD43C3772D99AB7;SizeAsReceived:7504;Count:45 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [crcx/p/5C6FPi9k7z3NsWp3d9rdBbuGx] x-ms-publictraffictype: Email x-incomingheadercount: 45 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 91d84ba7-770b-4a43-a091-08d79c69386c x-ms-traffictypediagnostic: BN7NAM10HT201: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 9qKRBoAC0WOi9avw3E4ztRIayg7iizZRx6C5sXgfNNNILUYHMKMrTXiuBO2ofTvGkMOG62oTqTt7NFICNoaPFjLk0+9aFdkz1RTNwaJIui90edqdCFFj1LJTeefkRatvaxGnrYdo8AklBguwSZXc8+T5GAeGZKuCJR2b41P8xz+/D817b67oUXKuy1KPqI/LfbhRVJ5LJl0WUE8MlcA9mFyY2PoV649kaIQoPoQ3OIA= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 91d84ba7-770b-4a43-a091-08d79c69386c X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jan 2020 22:53:22.6117 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7NAM10HT201 Subject: Re: [PHP-DEV] Re: [RFC] "use global functions/consts" statement From: tysonandre775@hotmail.com (tyson andre) > I'd much rather have something like:=0A= >=0A= > declare(ambiguous_element_lookup=3D0)=0A= > =0A= > declare(ambiguous_element_lookup=3Doff)=0A= =0A= Aside: declare(unambiguous_element_lookup=3D1) is probably a better choice = than my first choice of (disable_ambiguous_element_lookup=3D1), but probabl= y not the best choice.=0A= =0A= > I find that the =93disable_ambiguous_element_lookup=94 directive name is,= well, ambiguous.=0A= > Does it mean that it will look up only in the current namespace, or only = in the global namespace? I can=92t guess.=0A= > =0A= > Maybe a three-value directive:=0A= > =0A= > declare(function_and_const_lookup=3Dglobal);=0A= > declare(function_and_const_lookup=3Dnamespace);=0A= > declare(function_and_const_lookup=3Dfallback); // the default=0A= =0A= That's my favorite setting name overall so far - it ends up being as long a= s disable_ambiguous_element_lookup and more self-explanatory.=0A= I don't plan to include namespace-only in the RFC - future RFCs could propo= se additional values independently.=0A= =0A= Probably just `=3D global` and `=3D default`, because the default might eve= ntually change (from the fallback),=0A= and =3D fallback could be added if the old fallback was desirable enough.= =0A= - `=3D default` would only be useful to set resolution back to the default= =0A= with future language changes such as https://wiki.php.net/rfc/namespace_s= coped_declares#implementation_considerations=0A= =0A= > "namespace_lookup"=0A= =0A= It might cause confusion when a new php programmer tries to set this settin= g,=0A= and discovers that catch(Exception) {} still means MyNS\Exception with decl= are(namespace_lookup=3Dglobal).=0A= (assuming you meant something along those lines)=