How can php quickly know which file a function has been used?

Source: Internet
Author: User
How can php quickly know which file a function has been used? PHP

I want to delete a function, but I don't know where it is used. I want to find it and modify it... How to find it?


Reply to discussion (solution)

Use Dreamweaver to batch search for the folder where the function name site is located

Isn't that easy?
Delete or comment out the function definition and run the program. Php will tell you where to use this function: undefine function xxxx

Isn't that easy?
Delete or comment out the function definition and run the program. Php will tell you where to use this function: undefine function xxxx
In this way, you need to run many pages to know which pages are used.

Let's just try to comment out one by one of include.

But he does not use the search function. Otherwise, he will not ask.


Isn't that easy?
Delete or comment out the function definition and run the program. Php will tell you where to use this function: undefine function xxxx
In this way, you need to run many pages to know which pages are used.

But he does not use the search function. Otherwise, he will not ask.



Isn't that easy?
Delete or comment out the function definition and run the program. Php will tell you where to use this function: undefine function xxxx
In this way, you need to run many pages to know which pages are used.

Or are you thoughtful?
It is recommended that LZ still learn multi-file search. most editors support this

With the help of zend editing tool, you can press ctrl + and click the function or variable used, and he will automatically jump to its defined position

Isn't that easy?
Delete or comment out the function definition and run the program. Php will tell you where to use this function: undefine function xxxx

This is not easy to find, because some logics cannot be obtained during the test, but they are only obtained under certain conditions. Therefore, even if all the entries have been tried, they may not be able to be fully investigated, I have been searching in the editor to find the call point. Although this is the case, the function name and the object method name are the most likely to hit the name .. or the method name hits the method name of another object.

Read-p "Enter string you want find:" findstring

Echo "The following files include the key word: $ findstring"

Echo "--------------------------------------------------------------"

Find-name "*" | awk 'In in {FS = "" }{$ 2 = findstring ""; system ("grep" $2 "\" "$1" \ ""-l ")} 'findstring =" $ findstring"

Echo "--------------------------------------------------------------"

Echo "search over ..."

 

Read this article.
Skills for searching strings in batch in Editplus files

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.