Uniform Server PHP IDE allows you to quickly test PHP CLI scripts. Having an integrated console window the environment is self-contained making it ideal for learning PHP CLI. Debugging CLI scripts requires only a few mouse scripts.
Example on this page uses a very basic CLI script to demonstrate CLI input and output.
The step-by-step guide details all steps required for debugging.
Test Script
Test script input_output.php is located in folder H:\us_ide_1\us_portable_php_ide\php_scripts
Debugging steps
Open script, debug and console window
Start Notepad++ run Run_IDE.bat.
A) Click debugger icon displays debugger window
B) Click console icon displays console window
C) Open script to be debugged input_output.php
Always perform a syntax check on new scripts or after modifying a script.
Right click in edit window c) from the context menu select Check PHP Syntax
Alternatively Macro > Check PHP Syntax
Results of syntax check are displayed in the console window. Double clicking on any highlighted errors scrolls the edit window and highlights corresponding line in error.
Right click in edit window c) from the context menu select Run PHP CLI Debug
Alternatively Macro > Run PHP CLI Debug
Note: If alerted by your firewall “e.g. CLI is trying to access the Internet” always allow access.
Notepad++ icon flashes indicating debugging has started.
D) The IDE is configured with a default break-point (breaks on first line of code). Green arrow displays current position of debugger.
E) Console window displays "Process started" The script was effectively started from this window using a command script. Script input and output are directed to this window.
F) Local context tab displays variables. We are using a single variable $name this is currently undefined (no value set)