New features of PHPV5.3.0

Source: Internet
Author: User
As the popular PHP language continues to evolve, many new features make it more object-oriented. This article uses some PHPV5.3 instances to demonstrate delayed static binding, namespace support, class method overloading, variable parsing, and heredoc support.

Features

This article mainly describes the following features of PHP V5.3:

  • Delayed static binding
  • Namespace
  • Class method overload
  • Variable parsing and heredoc

However, you need to set PHP V5.3 before continuing.

Set

A well-known feature of PHP is that it is difficult to set up. This may be because PHP is installed on a Web server (such as Apache) and often needs to be connected to an external database (such as MySQL ). In a sense, PHP scripts are embedded in HTML code. In other words, PHP is a technology that spans multiple complex fields. Therefore, you must overcome many obstacles before writing PHP script code. I hope this situation can be improved, but many things related to software technology are still very difficult.

However, for those lucky readers who use Apple Macs, the setting process is much simpler:

  1. Get the PHP binary installation file (http://www.entropy.ch/software/macosx/php ).
  2. Disable Web Sharing in System Preferences.
  3. Find the/etc/apache2/httpd. conf file.
  4. Comment out the following line in the httpd. conf file: LoadModule php5_module.
  5. Run the PHP V5.3 installation file (you can also build the source code if you want ).
  6. Open Web Sharing in System Preferences.

The purpose of this article is not just to introduce how to install, so if your platform is Microsoft®Windows®Or Linux®For more information, see some excellent PHP reference books (see the books I recommend in reference materials ).

To check whether PHP is installed and the version is appropriate, create a file named phpinfo1.php in the/Library/WebServer/Documents folder. Listing 1 shows the content of this script file. All the scripts in this article are in the compressed (ZIP) file provided in the download section, so you do not need to create any files.

Listing 1. phpinfo1.php

 


Phpinfo ();
?>

 

Put the script file in the/Library/WebServer/Documents folder and access http: // localhost/phpinfo1.php. You can see a page similar to Figure 1. Here, you may need to replace "localhost" in the URL with the IP address of your host ".

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.