02 PHP Site 03 Php Local

02 PHP Site 03 Php Local

Local PHP Method 1

Using powershell you can run PHP code called scripts. These scripts do not require a server to run and are able to access anything on you local machine. This can be done a couple ways, first would be to write out the PHP code and have powershell run that code line by line. Second would be to write all the code into a notepad editor and then run that script using powershell.

Local PHP Method 2

Using a local web server is another way to easily run PHP scripts. You can create a local server using the localhost function of PHP and in the command line and from there you can use localhost again to run files.

Local PHP Method 3

Using an application such as sublime and atom give you the freedom to run PHP code locally through those services. In an application like sublime you are able to type out your PHP code then once done have it run just like you would with any other language IDE.

Summary

Running PHP locally shifts what exactly PHP is capable of. Locally PHP can be used to script and automate things. While useful there is no error checking in regards to this without special software.