Zend Studio's Semantic Analysis mechanisms can detect problems beyond the regular parsing warnings and errors. This helps developers to analyze static source code to enforce good coding practices and scan PHP code. The Semantic Analysis feature 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).
Semantic Analysis warning messages help to ensure that your code is written and formatted in a way that will result in optimal performance for your script. In addition, it supplies you with practical suggestions for improving the code.
Semantic Analysis problems will be displayed in the Problems view and be indicated in the code with warning and error icons (see Real Time Error Detection for more information).
The Semantic Analysis Quick Fix option enables you to easily change your problematic code according to suggestions supplied by the Semantic Analysis mechanism. This includes suggested actions for element creation or implementation.
|
|
|
Example:
|
|
See Applying Quick Fixes for more information.
To enable/disable Semantic Analysis and to configure which occurrences will trigger warning or error messages, go to the Semantic Analysis Preferences page, accessible by going to Window | Preferences | PHP | Semantic Analysis Properties.
|
|
|
Related Links: |
|
|
©1999-2013 Zend Technologies LTD. All rights reserved.