What is PHP?

What Can I Use PHP For

Recursive acronym for PHP: Hypertext Preprocessor

A widely-used open source general-purpose scripting language

Updated: July 1, 2023
By: RSH Web Editorial Staff

Contact Us

What is PHP


PHP originally stood for Personal Home Page.
PHP is a general purpose scripting language that is widely used by the majority of the websites today.
Especially suited for web development - PHP may be embedded into HTML code or pages.
You can use it in combination with various web template systems, content management systems, web frameworks, or even executed with a Command Line Interface (CLI)

Why is PHP used on the majority of all web pages?
What are the benefits of using PHP?

PHP is used to add functionality to your website that HTML coding alone can not do.

PHP Can Perform Math Calculations

PHP can perform different types of math calculations or Arithmetic Operators, These includes performing mathematical equations. to even calculating dates for a given year.

Here is a link showing how to create a simple PHP calculator.

PHP Can Collect User Input

Users can interact directly with PHP scripts. This might be through a a simple HTML form. Maybe letting you participate in a survey, use a "Contact Us" page or even post to any type of forum.

PHP Can Interact With MySQL Databases

PHP is especially good at interacting with MySQL databases. This can open endless possibilities.
MySQL is an open-source relational database management system (RDBMS). It is the most popular database system used with PHP. MySQL is developed, distributed, and supported by The Oracle Corporation.


What else is PHP Used For

There are three major areas where PHP scripts are mostly used.

Server-side scripting

Server-side scripts provide an interface between the user and the website. This helps limit access to proprietary data and will keep control of the script source code.

You need a few things to make PHP scripting to work. The "PHP parser", CGI or server module, a "Web Server" and of course a "Web Browser".

Many languages can create Server-side scripts. They include but are not limited to the examples below.

Writing Desktop Apps

PHP is primarily designed for web application development and is not commonly used for desktop application development. However, there are some tools and frameworks that allow developers to use PHP for desktop application development But if you use some advanced PHP features in your client side applications. You can write cross-platform applications. PHP-GTK is an extension to PHP, not available in the main distribution. If you are interested in PHP-GTK, visit Their Website

Command line scripting

You can make a PHP script run without any server or browser. You only need the PHP parser to use in this way. This type of use is ideal for PHP scripts regularly executed using cron (on *nix or Linux) or Task Scheduler (on Windows). This can also be used for simple text processing tasks

This type of usage is ideal for scripts regularly executed using cron (on *nix or Linux) or Task Scheduler (on Windows). These scripts can also be used for simple text processing tasks. See the section about Command line usage of PHP for more information.

Advantages of PHP

  • • PHP is used for creating dynamic websites and platforms
  • • PHP is a Server Side coding language
  • • PHP use is completely free, as well as more powerful and efficient over programs such as Microsoft ASP
  • • PHP will run on multiple platforms like Windows, Mac OS X, Linux, Unix, etc
  • • PHP is very portable and convenient to use
  • • PHP can open, write, add, modify, read, delete, and close database information completely on the Web Server
  • • PHP will collect data from forms and send to email or databases
  • • PHP can connect to almost any Web Servers such as Apache, nginx, IIS by Microsoft, LiteSpeed Web Server, GWS by Google
  • • PHP can receive, store and send cookies. Perform data encryption
  • • PHP will output not only HTML, but also PDF, Flash, XML files or any other text type file

What distinguishes PHP from client side JavaScript is that the code is executed on the Web Server. It generates HTML, which is then sent to the client. The client receives the results of the PHP script without knowing what the underlying code was. You can even configure the Web Server to process all your HTML files with PHP and then there would be no way that users can tell how you are coding your website
In fact, RSH Web Services website runs completely by PHP

PHP Hosting

PHP is extremely simple for newcomers, but also offers many advanced features for those professional programmers. Don't be afraid reading the long list of PHP's features. You can jump in and start writing simple scripts in no time

Although PHP's development is focused on server-side scripting, you can do much more with it

An introductory example of a PHP page

<!DOCTYPE html>
<html lang=en>

        echo "Hi, I'm a PHP script!";

Instead of a lot of commands to output HTML (as seen in C or Perl), PHP pages contain HTML with embedded code that does "something" (in this case, output "Hi, I'm a PHP script!"). The PHP code is enclosed in special start and end processing instructions that allow you to jump into and out of "PHP mode"


Typical example of RSH Web's PHP file might look like:


PHP can be used on all major operating systems, including Linux, many Unix variants, including HP-UX, Solaris and OpenBSD, Microsoft Windows, macOS, RISC OS, and no doubt others. PHP also has support for most of the web servers today

This includes Apache, IIS, and many others. And this includes any web server that can utilize the FastCGI PHP binary, like lighttpd and nginx

PHP works as either a module, or as a CGI processor, and you have the freedom of choosing any operating system and Web Server. You also have the choice of using Procedural Programming or Object-Oriented Programming (OOP), or a mixture of both

With PHP, you are not limited to just HTML output. PHP's abilities includes images, PDF files and videos

Using libswf and Ming, generated on the fly. You could also output easily any text, such as XHTML and any other XML file
PHP can auto-generate these files, and save them in the file system, instead of printing it out, forming a server-side cache for your dynamic content

One of the best and most significant features in PHP is the support for a wide range of databases. Writing a database-enabled web page is incredibly simple using one of the database specific extensions to any database supporting the Open Database Connection standard via the ODBC extension. Other databases may utilize cURL or sockets like CouchDB

PHP also has support for talking to other services using protocols such as LDAP, IMAP, SNMP, NNTP, POP3, HTTP, COM (on Windows) and countless others. You can also open raw network sockets and interact using any other protocol. PHP has support for the WDDX, a complex data exchange between virtually all Web programming languages. Talking about interconnection, PHP has support for instantiation of Java objects and using them transparently as PHP objects

PHP Resources

PHP Official Website
A complete resource for everything PHP. PHP is a popular general purpose scripting language that is especially suited to web development

PHP Manual
The official online manual for the PHP language

RSH Web Services PHP Resources Article
PHP Resources, E-books, PHP Script Codes, Videos, Cheat Sheets, Security Cheat Sheet, Code Library, Development Tools

PHP Builder
Articles and tutorials in PHP programming, PHP snippets, PHP tutorials and PHP Forums

This article is about the scripting language PHP: Hypertext Preprocessor. Or simply PHP. A general purpose programming language originally designed for web development

PHP Tutorial by W3Schools
Another popular programming tutorial site for PHP

A free flat forum bulletin board software solution

PHP Extension and Application Repository and useful PHP packages. PEAR is a framework and distribution system for reusable PHP components

Microsoft Azure
Microsoft Azure PHP Tutorial, contains PHP tutorial and documentation related to Azure cloud computing services

MySQL Homepage
From the Oracle Corporation, download the latest MySQL release

Zend Technologies is the leading provider of products and services for developing, deploying and managing business critical PHP applications

PHP Cheat sheets
PHP Cheat sheets is a quick reference guide for intermediate to advanced programmers

PHP Scripts

Listing Free, Open Source and Paid scripts
Warning: Be careful when downloading PHP scripts. Never assume the code is harmless

Source Forge
Listing over 600 PHP scripts

PHP Junkyard
Free PHP scripts for your website. PHP scripts that made this website famous

Claiming over 900 PHP scripts, coding components and classes

The largest collection of free scripts on the web. The PHP category alone has over 9,000 scripts

lists free PHP scripts that you can use on your website to provide various functions

The Website doesn’t host the scripts. It links to the creators sites

Not to be confused with HotScripts, HScripts is a much smaller collection that’s provided by the site itself

PHP Jabbers
Download the free PHP scripts listed below along with the full source codes and customize them

Listing a few Sites that use PHP

Affordable PHP Hosting from RSH Web Services

We welcome your comments, questions, corrections and additional information relating to this article. Please be aware that off-topic comments will be deleted.
If you need specific help with your account, feel free to contact us anytime
Thank you

Tweet  Share  Pin  Email

More Articles Of Interest

Professional, Reliable and Secure Web Hosting from our professional team. at affordable prices. Offering cPanel, Free SSL (HTTPS) Certificate, Free Domain Name and Domain Private Registration