php 获取当前文件中的类名
<?php namespace Demo; use Think\core; class Hello{ } echo '<pre>'; print_r(get_declared_classes()); /** array( [0]=> stdClass ... [143] => Redis [144] => RedisArray [145] => RedisCluster [146] => RedisException [147] => RedisClusterException [148] => Demo\Hello ) */