Re: Path forward for class_exists with different targeted PHP version implementations

From: Date: Mon, 05 Apr 2021 19:30:50 +0000
Subject: Re: Path forward for class_exists with different targeted PHP version implementations
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-113963@lists.php.net to get a copy of this message
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]

Thread (6 messages)

« previous php.internals (#113963) next »