Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116272 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 96512 invoked from network); 13 Oct 2021 11:56:18 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 Oct 2021 11:56:18 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6252A18037E for ; Wed, 13 Oct 2021 05:42:45 -0700 (PDT) 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.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, 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-f53.google.com (mail-wr1-f53.google.com [209.85.221.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, 13 Oct 2021 05:42:44 -0700 (PDT) Received: by mail-wr1-f53.google.com with SMTP id i12so7903300wrb.7 for ; Wed, 13 Oct 2021 05:42:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=Y/VqzELJsMwLgKpQ9wV9R86gAkOHUASKYrDWQDt0qB4=; b=hYdo2WyeYeTXXc1mKlUMEa+GkVhS6nMEZrUL+SCJmCCVIxaWyTCFKtvYmjdL3cbsbc wgo3kKzdjbxge6qb3Di2pHsTIfSN02UzTS4ku7pxlTS1Uf4uyPehw2jjB9XxKV6wMifY ywVhO+wfDB3Sr4mPLfMn5fj7ThYtPfd2YV4HGPeUMwWhy1SkHDl7yIZhhKOn2jnvC36t mLQoVlvLzJHPuUXDBprVswsdXt+l1zIjM44zrurEvY8TfG+7FkUcq6QgFjaQx+60mkbl f6LltVeYgk8PRmFHSGUWNy57da6M56UxG95uWqYpD6mizoH+DK8YjmBBLtLPIJDQHLgU md3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=Y/VqzELJsMwLgKpQ9wV9R86gAkOHUASKYrDWQDt0qB4=; b=pxrQuLSkQQzi3nUmsAt5kj43APa9/wGn2wAyndRd9y4Lih64/1Xf9UXWzBL+c3PFOI SMAPkBa5d0unvCnvIUVgDof1BxqnoOioXQdvcP7QVFhrsjQpiOuqIDfT3uXkGTavWheA bY1HRsH7iAYiunv3iqWP8Dp6HvsvXVFAPEmqR4ggtieo95fvvFD7nLo3sYpukfvY0HqG GM0ksNKLYQdxoTnUg0bgPdaYBQudGXb0W6KPq16gHoSZuWPW06iw92/mM1+wJB3YMyKm 5Fz/xJmlWDQbR34TWCgukzXuDuQnM+FFzcwO1EMr+47QjX1E6fnqjcJrOsEIibPcBMH3 Vb1A== X-Gm-Message-State: AOAM531fKR+amixH4MySIifViKZ6JB8DbiGIWXS5VCE1vXpSlN/VPrrk IoEMQrZ0H+5uPLOJ3XkFCbtO6L4WOiE= X-Google-Smtp-Source: ABdhPJxruY+eQNlfZEnGSOGjnIJu8uuDlfj3UP//XWbRRmW9nCLwzdRSXN1rpOU9CShTrfjaHB67pQ== X-Received: by 2002:a5d:584d:: with SMTP id i13mr38161375wrf.355.1634128961443; Wed, 13 Oct 2021 05:42:41 -0700 (PDT) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id b19sm5508770wmb.1.2021.10.13.05.42.40 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Oct 2021 05:42:40 -0700 (PDT) To: internals@lists.php.net References: Message-ID: Date: Wed, 13 Oct 2021 13:42:40 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB Subject: Re: [PHP-DEV] Re: [RFC] Deprecate dynamic properties From: rowan.collins@gmail.com (Rowan Tommins) On 13/10/2021 10:17, Guilliam Xavier wrote: > Off-topic: > > if ( class_exists('\\WeakMap') ) { > > > People should stop using a leading slash in FQCN *strings*.  > \Foo::class is "Foo", not "\Foo".  It might work generally but that's > asking for problems (e.g. for autoloaders). > > (Sorry.) Hah, good point. I should probably just have just used ::class anyway (in which case the leading backslash is the quickest way of the sample code being pasteable into some other file): if ( class_exists(\WeakMap::class) ) { There's probably a bunch of other style no-noes in that example, but I did at least test it worked. :) Regards, -- Rowan Tommins [IMSoP]