Six Easy Setups for Local PHP Development — Beginners

Checking PHP version

1. Start PHP local web server

In the root of your PHP application or file. Simply start PHP web server using:

Running PHP Local Web Server

2. Use PHP interactive shell

A good number of PHP developers are not aware of this. It is simply a REPL environment to quickly run your span with some PHP code. Simply run:

PHP Interactive Shell.

3. Using the php command

Simply type php before a filename to execute a PHP script. Below is an example:

Using php command.

4. Using Sublime Text’s Build System.

If you use Sublime Text editor, you can run your php script within ST3 using the Build System feature by running cmd + B or Ctrl + B. To setup build system for PHP in ST3, follow the guideline here. Here is an example:

ST3 PHP Build System.

5. Using Atom’s Build System

Similar to using ST3’s Build System, running PHP code within your Atom editor comes out of the box. Just run cmd + I or Ctrl + I.

6. Using PHP Server within Atom

Starting PHP server within Atom editor is easy by using this plugin. With this, you can easily spin up your server with few keys. See example below:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Surajudeen Akande

Surajudeen Akande

Apprentice, T-shaped, Goal-digger and Public Speaker