How to get the calling method name in php

coldplay.xixi
Release: 2023-03-05 13:20:01
Original
3561 people have browsed it

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();
Copy after login

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!

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!