Are there any best practices for using ReflectionClass in PHP to avoid inadvertently triggering class instantiation?
When using ReflectionClass in PHP, it's important to be cautious as simply creating a new instance of ReflectionClass can trigger the instantiation of the class being reflected upon, which may have unintended side effects. To avoid this, you can use the static method `ReflectionClass::export()` instead of directly instantiating a new ReflectionClass object.
// Using ReflectionClass::export() to avoid inadvertent class instantiation
$class = 'ClassName';
ReflectionClass::export($class);