直接来代码,更直接,
//__METHOD__:类名+方法名-----test::method
//__FUNCTION__:函数名-----method class test{ public function method(){ echo "方法名:".__METHOD__; echo "<br>"; echo "函数名:".__FUNCTION__; } }$test = new test();
$test->method();
本文共 270 字,大约阅读时间需要 1 分钟。
直接来代码,更直接,
//__METHOD__:类名+方法名-----test::method
//__FUNCTION__:函数名-----method class test{ public function method(){ echo "方法名:".__METHOD__; echo "<br>"; echo "函数名:".__FUNCTION__; } }$test = new test();
$test->method();
转载于:https://my.oschina.net/qimhkaiyuan/blog/796933