What does PHP mean? Why is PHP a well-spoken language in the world?

Source: Internet
Author: User
Tags learn php
What does PHP mean? Probably a lot of people do not know very well, but many people may have heard a word: "PHP is the best language in the world"。 So, today's article PHP Chinese network will give you a detailed talk about the content of PHP, why say PHP is a good language in the world

A: the definition of PHP

According to Baidu Encyclopedia we can know that PHP is a common open source scripting language. The grammar absorbs the C language, Java and Perl features, is conducive to learning, widely used, mainly for the field of web development. So why is PHP the best language in the world?

First, let's take a look at the features of PHP:

(1) PHP running on the server side: Learn PHP, you can command the server to work for you, most of the Web site data is stored on the server side, PHP is used to handle the data stored in the server (powerful bar).

(2) PHP cross-platform: the server can be a variety of platform servers, such as Linux, Windows, Unix, you can command.

(3) PHP is a scripting language: PHP is to write a script, that is, a line of computer instructions to command the server to work, so in the process of writing PHP is actually the process of communication with the server, the language of communication is PHP.

(4) PHP free of charge: PHP is free to use.

Second: Why is PHP a good language in the world?

For the reason that PHP is the best language in the world, I have summed up the following several:

(1) PHP learning threshold is relatively low, PHP is designed for the Web language (although it is now in the Common programming language), it just built a. php file is a Web page, with $_get[' x '] can get the get parameters. (Related recommendation: PHP learning Roadmap)

(2) PHP syntax is relatively simple, PHP is a weak language type, basically for the type of PHP is not necessary to consider, PHP can be very simple to access the data from the database; (related video recommendation: Php.cn lonely Nine Cheap (4)-php video tutorial)

For example, read data:

<?php$servername = "localhost"; $username = "username"; $password = "password"; $dbname = "MyDB"; Create connection $conn = new Mysqli ($servername, $username, $password, $dbname);//Check connectionif ($conn->connect_error) {
  die ("Connection failed:". $conn->connect_error);} $sql = "SELECT ID, FirstName, LastName from myguests"; $result = $conn->query ($sql); if ($result->num_rows > 0) {//Output data while ($row = $result->fetch_assoc ()) {    echo "ID:". $row ["id"]. "-Name:". $ row["FirstName"]. " ". $row [" LastName "]." <br> ";}} else {   echo "0 result";} $conn->close ();? >

Insert data:

<?php$servername = "localhost"; $username = "username"; $password = "password"; $dbname = "MyDB";//Create connection $conn = new mysqli ($servername, $username, $password, $dbname);//Detect connection if ($conn->connect_error) {die    ("Connection failed:". $conn->connect_error);} $sql = "INSERT into Myguests (firstname, LastName, email) VALUES (' John ', ' Doe ', ' john@example.com ')," if ($conn->query ( $sql) = = = TRUE) {    echo "new record inserted successfully";} else {    echo "Error:". $sql. "<br>". $conn->error;} $conn->close ();? >

The above for the implementation of getting data from the database and inserting data is very simple, and now half of the site is basically read and write data from the database.

Three. Summary

Finally, if you do not want to be very troublesome to deploy a site, then PHP is a good language choice, so that PHP is the best language in the world, it should be PHP is the best language for Web development, but also the most dynamic language, in short, the study of PHP is also very easy to find work, After all, many websites are now written in PHP.

Related Courses recommended:

PHP 0 Basics Getting Started Tutorial

Hanshunping 2016 php+mysql Basic Video tutorial

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.