1-Introduction To PHP
1-Introduction To PHP
PHP originally stood for Personal Home Page. However, now, it stands
for Hypertext Pre-processor. It is a recursive acronym because the first word itself is
also an acronym.
PHP was created by Rasmus Lerdorf in 1994. It is currently maintained by the PHP
Development Team.
The web browser sends an HTTP request to a web server where phptutorial.net locates.
The web server receives the request and responds with an HTML document.
In this example, the web browser is a client while the web server is the server. The
client requests for a page, and the server serves the request.
PHP runs on the web server, processes the request, and returns the HTML document.
When it comes to the purpose of the programming languages, there are two main types:
domain-specific and general-purpose languages.
The domain-specific languages are used within specific application domains. For
example, SQL is a domain-specific language. It is used mainly for querying data from
relational databases. And SQL cannot be used for other purposes.
On the other hand, PHP is a general-purpose language because PHP can develop
various applications.
PHP can run on all major operating systems, including Linux, Windows, and macOS.
You can use PHP with all leading web servers such as Nginx, OpenBSD, and Apache.
Some cloud environments also support PHP like Microsoft Azure and Amazon AWS.
PHP is quite flexible. It’s not just limited to processing HTML. PHP has built-in
support for generating PDF, GIF, JPEG, and PNG images.
One notable feature of PHP is that it supports many databases, including MySQL,
PostgreSQL, MS SQL, db2, Oracle Database, and MongoDB.
• First, the web browser sends an HTTP request to the web server, e.g., index.php.
• Second, the PHP pre-processor that locates on the web server processes PHP
code to generate the HTML document.
• Third, the web server sends the HTML document back to the web browser.
Advantages of PHP
Since PHP is designed for the web in the first place, it brings many advantages to web
development: