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.