What is PHP?

PHP started out as a small open source project, but on the rise, more and more people find it increasingly useful. PHP was developed from a product called PHP / FI. PHP / FI was created by Rasmus Lerdorf in 1994, originally seen as a simple subset of Perl script code to monitor the status of access to his resume online. He named this script set "Personal Home Page Tools". When more extensive functions are needed, Rasmus has written a larger C implementation to query the Database and help users develop simple web applications. Rasmus has decided to publish the source code of PHP / FI for everyone to see, use and fix the errors in it, and improve the source code.

PHP regression of "PHP: Hypertext Preprocessor".

PHP is a scripting language written for servers that are embedded in HTML. It is used to manage dynamic content, Database, Session tracking, .

It is integrated with some popular Database like MySQL, PostgreSQL, Oracle, Sybase, Informix, and Microsoft SQL Server.

PHP performs very well, especially when compiled as an Apache Module on Unix side. The MySQL Server, when started, executes complex queries with huge result sets in Record-setting time.

PHP supports a large number of large protocols like POP3, IMAP, and LDAP. PHP4 adds support for Java and distributed object structures (COM and CORBA). PHP syntax is like C.

General use of PHP

PHP implements system functions, for example, from files on a system, it can create, open, read, write and close them.

PHP can handle forms, for example, collecting data from files, saving data to a file, through email you can send data, returning data to users.

You can add, delete, modify elements within your Database via PHP.

Access Cookie variables and set Cookies.

Using PHP, you can restrict users from accessing some pages in your Website.

It can encrypt data.

Features of PHP

5 important features that make PHP a quite convenient language:

  1. Simplify
  2. Effective
  3. High security
  4. Flexible
  5. Friendly

"Hello World" Script in PHP

To get used to PHP, we start with a simple PHP script. We will start with the first example of PHP as "Hello, World" script.

As mentioned earlier, PHP is embedded in HTML. That is, inside HTML (or XHTML) you will be able to have PHP commands as follows:



Hello World Hello





Save the above program in a file named test.php in htdocs , then open the browser and type the address http:/// localhost: 8080 / test.php will result:

What is PHP? Picture 1

If you check the HTML output of the example above, notice that PHP code is not present in the file sent from the Server to your web browser. All PHP content present in the site is processed from that page; The only thing returned to the Client from the Web Server is the pure HTML output.

All PHP code must be contained within one of the 3 special markup tags identified by PHP Parser.





The most popular card is and we will also use the same tag in this series.

For static sites or HTML websites when a user requests to view a website, the request will be sent to the server. The server here simply sends the website content that the user wants to see about the browser to the user.

For PHP pages when requesting to view the website, the Server will proceed to generate that web page from PHP source code to HTML source code, then transfer that source code to the web browser for users to see. Because web browsers cannot read PHP source code, they can only read HTML source code.

In the next chapter we will discuss installing the PHP environment on the computer and then discuss the basic concepts related to PHP.

Follow tutorialspoint

Previous article: Variable in PHP

Next article: Constants in PHP

4 ★ | 1 Vote

May be interested

  • Check out the 'buffalo' Pokémon in Pokémon GoCheck out the 'buffalo' Pokémon in Pokémon Go
    each type of pokemon has hp, cp, ability to attack and endure differently. based on these indicators, players can determine as well as choosing the most powerful pokemon for their offensive tactics.
  • Sitting home can also locate Pokemon around, do you believe it?Sitting home can also locate Pokemon around, do you believe it?
    the tightening of the niantic developers' rules to prevent players from abusing the support tools also brings annoyance, such as those who have no conditions to move much, go away, it is hard to know. get the location of the pokemon around the area they live in
  • 5 undeniable benefits when playing Pokemon Go5 undeniable benefits when playing Pokemon Go
    get to know many new people, breathe fresh air, relieve stress, increase concentration thanks to going out for a walk .... are compelling reasons to force you to try pokemon go now .
  • Want to earn the fastest Pokécoins in Pokémon Go? So don't miss this article!Want to earn the fastest Pokécoins in Pokémon Go?  So don't miss this article!
    pokécoins in pokémon go play the role of buying items in the store. the more coins you earn, the more likely you are to buy more items. to earn pokécoins, players will have to complete certain tasks or buy real money.
  • Pokémon systems when fighting in Pokémon GoPokémon systems when fighting in Pokémon Go
    each pokémon system in pokémon go has different strengths, along with a specific weakness. this type of pokémon will have the power to attack the other pokémon, but can defeat the other pokémon. if you know the characteristics of each type, it will be easier to choose which pokémon to battle.
  • The terms you need to know when playing Pokémon GoThe terms you need to know when playing Pokémon Go
    pokémon go is the most prominent name in recent days. this game of capturing and training virtual animals has created a relatively new way of playing, as players have to constantly move to catch pokémon. during the process of joining pokémon go, you will encounter and use a lot of important terms. so what do they mean?
  • How to play Pokemon GO on Windows computersHow to play Pokemon GO on Windows computers
    recently, pokemon go has become a popular game, attracting thousands of gamers around the world. in previous posts network administrator has guided you on how to play pokemon go on android devices and ios devices. in the article below, network administrator will guide you how to play pokemon go on windows computers using bluestacks emulator software.
  • How to become a good Pokémon Go hunter?How to become a good Pokémon Go hunter?
    with a new way of playing, pokémon go has created a new phenomenon in the game village around the world. players will have to go around and find pokémon for themselves. so how to quickly catch pokémon and in large numbers?
  • Things to know to upgrade Pokémon in Pokémon GoThings to know to upgrade Pokémon in Pokémon Go
    the whirlwind pokémon go has spread its power right on the first day of its release. everyone rushed to the street to find a pokémon for themselves. therefore, in order to become a pokémon hunter, you need to master the basics of participating in pokémon go battlefield.
  • List of medals received in Pokemon GoList of medals received in Pokemon Go
    in addition to getting items when leveling up, gamers who join pokemon go also have the opportunity to receive their proud achievements.