Is there any IDE in PHP that can quickly find out whether members of a certain class have been called in other files in the project folder?
淡淡烟草味
淡淡烟草味 2017-05-27 17:41:57
0
4
651

RT, I am currently doing a code audit for a PHP project and found a vulnerable method, but how can I quickly find out where this method has been called in all other files, and where the parameters for calling this method are in other files? Where did it come from? It would be much more convenient if there was such a tool. Please recommend

淡淡烟草味
淡淡烟草味

reply all (4)
滿天的星座

I don’t have any good methods. I’m just going to talk about my approach. I feel like the poster has already tried it.

  1. PhpStorm,点击方法,按快捷键ALT + F7CTRL + ALT +SHIFT +F7查找所有使用。参数变量按F4CTRL + 鼠标左键Find the source.(This kind of search actually has many references that cannot be found), such as looping through a collection of objects to call the method of this object

  2. If it is a dynamic method, such asfunction test()全局搜索->test(->test (

  3. If it is a static method, such asstatic function test()全局搜索Class::test(Class::test (

Through the above three steps, you may still miss things such as dynamic parameter calls, so you also need to consider searching for method strings'test'

$func = 'test'; $ojb->$func();
    PHPzhong

    PHPStorm

      洪涛

      phpStorm but you can’t judge with ajax

        滿天的星座

        If you want to check the parameter transfer and value changes of the running call, you can use the php debug tool. Kint is recommended.
        If you want to know which files may be called, you can use sublime to search in thefolder.
        The above recommended tools are all It's very light and small.

          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!