The PHP Editor Explained

PHsPeed contains several syntax-aware editors. Keywords are highlighted, Comments colored etc. The basic edit functionality of all editors is similar. However, the PHP editor has some enhanced capabilities.


The editors use a standard command set for cutting and pasting text; and other functions. While typing every recognized keyword will be styled to distinguish it from other parts in the text. 


Example:



While typing the PHP editor might pop up with a window showing the available PHP functions one can apply. To force a pop-up to appear, use ctrl-space. 


Another option is to use code templates. Entering the short code followed by shift-space will insert the template text:


I.e. “Fo”+ <shift><space> leads to 


for($i=0;$i<= ;$i++) {

}   


One may define custom code templates.


Use right mouse-click to reveal functions like toggling breakpoints, adding functions, and to switch between editor views.


To check syntax of the code in the current file, click the checkmark button, which is in the right lower corner of the editor. This avoids running into such issues later, when the code is generated, and testing has been started. 

In case of errors, the error list will be displayed in the message area. Clicking on an error will cause the file to open (if it isn’t already), and the cursor moves to the failing line. Be aware that the real error can be in some earlier line, i.e. when a missing quote is found.