ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
**一.ReflectionClass::export弃用** 1.代码实例 ``` class Foo{ public $name='user1'; public static $age=20; const HOST='localhost'; public function show(){ echo 123; } public static function say(){ echo 123; } } $ref=ReflectionClass::export('Foo',true); echo "<pre>"; print_r($ref); echo "</pre>"; ``` 2.低版本 ``` Class [ class Foo ] { @@ C:\AppServ\www\test\index.php 3-16 - Constants [1] { Constant [ string HOST ] { localhost } } - Static properties [1] { Property [ public static $age ] } - Static methods [1] { Method [ static public method say ] { @@ C:\AppServ\www\test\index.php 13 - 15 } } - Properties [1] { Property [ public $name ] } - Methods [1] { Method [ public method show ] { @@ C:\AppServ\www\test\index.php 9 - 11 } } } ``` 3.新版本 ``` Fatal error: Uncaught Error: Call to undefined method ReflectionClass::export() ```