Detect unnecessary code outside of php

    General discussion

  • Is there anyway to detected unwanted code using Php Tools and/or Visual Studio between php tags. This notification could come in any form.

     <?php ?>

    This should not be here, detect me!

    <?php ?>

    Thursday, March 2, 2017 8:10 PM

All replies

  • Hi VSTS(git) to GoDaddy Staging,Production,

    If you are developing a PHP project, you can use the PHP Dead Code Detector (PHPDCD) to detect unnecessary code. It scans a PHP project for all declared functions and methods and reports those as being "dead code" that are not called at least once.

    If you want to detect unnecessary code in Visual Studio, we recommend you can use the Code Coverage Tools from the Command Line.

    MSDN Community Support<br/> Please remember to click &quot;Mark as Answer&quot; the responses that resolved your issue, and to click &quot;Unmark as Answer&quot; if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact <a href=""></a>.

    Friday, March 3, 2017 11:29 AM