by

How to Download & Install XAMPP & NetBeans: PHP Tutorial

What is the best PHP IDE?

A PHP IDE is a program that allows you to easily write PHP codes. PHP IDEs are often equipped with syntax highlighting features and in some cases autocomplete features too.

This means that if you write a PHP keyword that is known by the PHP interpreter, then the keyword will be highlighted a different color from the one used for regular statements.

The autocomplete features automatically pops up known PHP keywords as you type them. Notepad can also be used to write and editor PHP codes. The disadvantage of using an editor such as Notepad is that debugging the scripts becomes difficult because it is not easy to spot errors such as misspelt keywords, unclosed braces etc. an IDE will highlight the statements with errors so it’s easy for you to spot them. The table shown below shows 5 popular PHP editors

EditorLicenseCross PlatformBrief description
Netbeans IDEOpen SourceYesDedicated PHP coding environment with syntax highlighting and code completion for keywords and other known information.Supports integration with PHP MVC frameworks i.e. Zend,Code History that shows the changes made to a fileSFTP,FTP and SVN via plugins.
DreamweaverCommercialYesSupports HTML and PHP.Syntax highlighting, code folding and completion for keywords and other known information.Supports SFTP and FTP.
Zend studioCommercialYesIntegrated with Zend Server and  Zend PHP MVC framework, PHPUnit, phpDocumentor etc.Has syntax highlighting, code folding,Support for Web services etc.
PHP EclipseOpen SourceYesCode formatterSupports SVN, SHH/FTP
Notepad ++FreewareWindows onlySyntax highlightingSupports SFTP and FTP via plugins.

  Netbeans IDE PHP editor As briefly highlighted in the above table, Netbeans IDE has powerful features that enhance the productive of PHP coders. The IDE can be freely downloaded from the https://netbeans.org/downloads/index.html

  • Syntax highlighting and auto-complete features enhances your productivity
  • It has native support for database systems like MySQL. You don’t need to use two programs to code and develop your database.
  • The IDE can be used in a collaborative environment.
  • This comes in handy when you have to work with other developers as a team.
  • the IDE has support for other languages such as;
    • Java SE
    • Java EE
    • C
    • C++

The current version of the Netbeans IDE as of this writing is version 7.3

Introduction to Netbeans IDE

After you have successfully installed the Netbeans IDE PHP editor, run the program just like any other windows program. The window shown below appears

Creating a new PHP project using the Netbeans IDE

  • Click on the create new project button on the tool bar as shown below
Download and Install XAMPP & Netbeans
  • If you downloaded all the bundles available in the Netbeans IDE, make sure you choose PHP under project category, PHP Application under Projects then click on Next button.
Enter the project name as shown below.
  • Make sure the folder is saved in the XAMPP installation directory as shown above.
  • Click on next button when done.
  • Make sure Run as: is set to Local Web Site(running on local web server)
    • The Project URL: is set to http://localhost/phplessons/

Note the above settings will be set for you by default.

  • Click on Next button
  • The Netbeans PHP editor allows for integration with PHP MVC frameworks such as Symfony and Zend.
  • For now we will not select any MVC framework. Click on Finish button.
  • Your newly created project will be displayed in the project browser and an index.php page created for you.
  • The newly create page contains some html code.
  • Replace it with the following code shown below.

Running your first PHP Example

<?php
echo "Hello World!";
?>
  • Click on the run button on the toolbar as shown below
Download and Install XAMPP & Netbeans
  • Your default browser will be opened with the URL http://localhost/phplessons/index.php . The output “Hello World!” will be displayed in your browser.

Summary

  • XAMPP is the acronym for X-cross platform, Apache, MySQL, PHP and Perl
  • A PHP editor is a program that allows you to write PHP code within the shortest possible time and allows you to debug your syntax errors at design time.
  • Netbeans PHP editor is a cross platform open source editor that enhances the productivity of PHP developers.

Comment

Leave a Reply

1 comment

News Feed