What is PHP? For what?

Source: Internet
Author: User
PHP (foreign name: Php:hypertext Preprocessor, Chinese name: "Hypertext Preprocessor") 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. PHP's unique syntax mixes the syntax of C, Java, Perl, and PHP's own creation. It can execute Dynamic Web pages more quickly than CGI or Perl. Dynamic pages made in PHP are compared to other programming languages, and PHP is executed in HTML (an application under the standard Universal Markup Language), which is much more efficient than CGI, which generates HTML markup entirely; PHP can also execute post-compilation code, Compilation can achieve encryption and optimize code execution, making code run faster. It can be embedded in HTML, especially for Web development.

The above is a simple answer, but what does it mean? Consider the following example:


Notice the difference between this example and other scripts written in C or Perl--unlike a large number of commands to write a program to output HTML, the PHP page is HTML, except that it embeds some code to do something (in this case, "Hi, I ' m a PHP scrip T! " )。 PHP code is included in special starter characters and Terminator <?php and?>, allowing access to "PHP mode".

Unlike the client's JavaScript, the PHP code is running on the server. If a similar code is established on the server, the client will be able to receive the results after running the script, but they will not know how the code behind it works. You can even set the Web server to allow PHP to process all the HTML files, so that the user doesn't know what the servers are doing.

One of the great benefits of using PHP is that it is extremely simple for beginners and provides a variety of advanced features for professional programmers. Don't be afraid when you see a list of PHP's long features. You can quickly get started by writing simple scripts on your own in just a few hours.

Although PHP has been developed for server-side scripting, its functionality is far from limited.

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.