Method export() in Reflection Is removed¶
The Reflection::export() static method was deprecated in PHP 7.4 and removed in 8.0.
PHP code¶
<?php
class A {}
$reflector = new ReflectionClass('A');
print Reflection::export($reflector, true);
?>
Before¶
PHP Deprecated: Function Reflection::export() is deprecated
Deprecated: Function Reflection::export() is deprecated
Class [ <user> class A ] {
@@ /codes/exportReflection.php 3-3
- Constants [0] {
}
- Static properties [0] {
}
- Static methods [0] {
}
- Properties [0] {
}
- Methods [0] {
}
}
After¶
PHP Fatal error: Uncaught Error: Call to undefined method Reflection::export()
Fatal error: Uncaught Error: Call to undefined method Reflection::export()
PHP version change¶
This behavior changed in 8.0