Home  >  Article  >  Backend Development  >  How to get the calling method name in php

How to get the calling method name in php

coldplay.xixi
coldplay.xixiOriginal
2020-08-29 14:08:263568browse

php method to get the calling method name: call the submit method in the onGroupDelete method, the code is [StackTraceElement temp=Thread.currentThread().getStackTrace()].

How to get the calling method name in php

Related learning recommendations: php graphic tutorial

php method to get the calling method name:

As shown in the picture: I called the submit method in the onGroupDelete method, and I want to get it in the submit method The onGroupDelete method name uses the code in the submit method:

// 获取调用此方法的方法名
    StackTraceElement temp=Thread.currentThread().getStackTrace();
    String methodName = temp.getMethodName();

How to get the calling method name in php

How to get the calling method name in php

##Related learning recommendations:

php programming (video)

The above is the detailed content of How to get the calling method name in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn