php 快速定位需要找到的方法所在的位置(ReflectionMethod)

$func = new ReflectionMethod($this, "template");
$start =     $func->getStartLine() - 1;
$end = $func->getEndLine() - 1;
$filename = $func->getFileName();
echo "function $funcname defined by $filename($start - $end)\n";die;

猜你喜欢

转载自blog.csdn.net/qq_39977679/article/details/80350504