开发者

How can I check which file is a function in? [closed]

开发者 https://www.devze.com 2023-03-06 13:38 出处:网络
It's difficult to tell what is being ask开发者_如何转开发ed here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current for
It's difficult to tell what is being ask开发者_如何转开发ed here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

I'm working with PHP and sometimes, I want to find where the function being used is located. How can I do this easily without tracing through everything?


I usually just do a quick

'grep -d recurse "function\ function_name" *

from the root of the project.


Use the __FILE__ constant.

See here: http://php.net/manual/en/language.constants.predefined.php


you can use the notepad++ find in files function, works wonders.


Ctrl+Click in IDE (NetBeans, PhpStorm) at function's name


Add a logging class: Example here: http://llihp.blogspot.com/2011/05/php-logger-class.html


Cannot redeclare the function error

Check out the answer from dev-null-dweller here. VERY handy extension.

0

精彩评论

暂无评论...
验证码 换一张
取 消