Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113963 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 96310 invoked from network); 5 Apr 2021 19:32:01 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 5 Apr 2021 19:32:01 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7EED61804E2 for ; Mon, 5 Apr 2021 12:30:51 -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.1 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-Virus: No X-Envelope-From: Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) (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 ; Mon, 5 Apr 2021 12:30:50 -0700 (PDT) Received: by mail-ed1-f44.google.com with SMTP id x21so13721374eds.4 for ; Mon, 05 Apr 2021 12:30:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:cc:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=7mOzK/1oxmwJq+P5DO273LfqxmcVkQa4Y6yPfiVGBkY=; b=cg+FYvlpmxtyXMRfr2bu+cxLFX+54g68I9DT+6QdvFFc6CezEfedRgjYoST3z2oCmd qQTcT31xfrg9QCR7YO9FoOuOBzAXgyeGDKp09rHHhRs21FGWezIZPE6+kldrsvRVYT8l fc0InPsPuWRhkSdwkX1k/hoWuodDO9ZrNyoomu4N3SVz5X5q09eK9c/2Wfz9tcltYB2C BrY6z9OMmPnXj3LsVkNu0OcZPjC7AoLdX/sp0wLUcmXi6wgjIRMhtkD5dyWfkX2g5Ejc 6FpMvqpOf/CRDHHHMjgO8lTngGAtbDfCWErx+BW6SQ+gI1/4/6+AK4K8LWsruLcxAPcf q2Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:cc:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=7mOzK/1oxmwJq+P5DO273LfqxmcVkQa4Y6yPfiVGBkY=; b=ooix2jz4w0xS3HEiZ75T6GfEr20v+MoLiRLFeNbPB7dp4kCsJfxAuSNPAeAK/rUUH9 BJwfqOSWyv6PsXlsJOYEjO7SkO6O4+D44TU0brmo5yESmc2A5KQbN0+FucRat2MJk8OG +ijPYew28SRKdTnowLAMVHOlj4o6FgZal2eeBeG43G3LvqVd9GDNZbh64dzGTf58CenX ah8Ku4mmzUzGND1/06VNlGhmZmM7fx/sgQUDUOH7LiA2Y2AVDCdhdI3wkzITkTTq7Yai u0o0QE/eO8sFzRsK/NjR0PqrSfKbcQjSdvtxArs6xzNEZ2/O5fdfBZ2t4MFm2I1byA5L HI5Q== X-Gm-Message-State: AOAM532T0YZ3K36BoG6JnTsmT83Zi65aE9tNkBKmWe4WjfwRkWiaZzyP KuyjMY8XRsOp7CcjO3985PMcr9K+3e0= X-Google-Smtp-Source: ABdhPJxKfNH4jZB3r+cTtqq1If46BxVjtnMjkz76jUzXJMTf/LPLbetXAzDuUiWCbls/nNQSX8TAMQ== X-Received: by 2002:a05:6402:4407:: with SMTP id y7mr33381740eda.247.1617651048774; Mon, 05 Apr 2021 12:30:48 -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 jo12sm1431247ejb.52.2021.04.05.12.30.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Apr 2021 12:30:48 -0700 (PDT) To: internals@lists.php.net References: Cc: Jesse Rushlow Message-ID: <0c5e70d7-5b11-5251-4ec9-608db63105c9@gmail.com> Date: Mon, 5 Apr 2021 20:30:50 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Subject: Re: [PHP-DEV] Path forward for class_exists with different targeted PHP version implementations From: rowan.collins@gmail.com (Rowan Tommins) On 05/04/2021 18:14, Jesse Rushlow wrote: > I was attempting to use class_exists(UsesPropertyPromotion::class) to > determine if an attribute implementation existed in order to generate a PHP > 8 appropriate class - else fall back to generating a PHP 7 appropriate > class. For context, this check was being written for Symfony's MakerBundle > which generates classes for Symfony projects. Hi Jesse, Can you explain the use case in a bit more detail, perhaps giving some example code you were hoping to write with class_exists()? I suspect there are other ways to achieve what you were trying to do, but don't want to confuse things if I've misunderstood the requirements. Regards, -- Rowan Tommins [IMSoP]