Open the file you want to work with. Right-click the project name in the project tab in the upper left corner of the netbeans window. Choose Configuration Setup> Configure, click Run Configuration. In the drop-down menu, select a script (run on the command line)
In the options window, select the php tab. Set the location of your php 5 interpreter and check the output / editor window checkbox.
source share