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]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to