Analyzing Code

The Zend Studio code analyzer helps developers to analyze static source code to enforce good coding practices and scan PHP code. The Code Analyzer achieves this functionality by attempting to reconcile problematic code and locating unreachable code (code that has been defined but is not used or with empty variables).

The Code Analyzer supplies users with a detailed error log while focusing on the error location in the file that is open in the Editing Window. In addition, it supplies you with practical suggestions for improving the code.

Code Analyzer

To run the Code Analyzer:

  1. The Code Analyzer can be run on an active file at any time, from the main menu by pressing or the right-click menu.
    -Or- a Project file/directory can be analyzed by selecting a file/directory from the File Manager's Project tab, and choosing Analyze Code from the right-click menu.  

  2. Double-click the code error in the Code Analyzer Output tab in the Messages window to move the cursor to the exact location in the file.

  3. From the Tools menu, select Analyze Code.
    The Code Analyzer Output window opens with the analysis.  

 

 

Related Links

Related Links:
Code Inspection