PHP Tips and Tricks

Source: Internet
Author: User
Tags apc install php pear php source code

1. When you are looking for information about a specific PHP function, please go to http://php.net/. For example: Http://php.net/join. This will take you directly to the correct location in the online manual on one server around your location.

2. Try this: Pear install APC. The Pear command is a useful installer that can even be used to install PHP extensions written in C. In this case, it installs the APC opcode cache extension.

3. Use the opcode cache to improve performance.

4. There are no errors in mixing OOP and process code in PHP. Use the object when the object is meaningful, and the rest to switch to the process.

5. Expanding PHP with your own custom C or C extensions is easier than you might think. See the README in the PHP source code version. Ext_skel.

6. The echo <<<eob syntax is useful for outputting text blocks with full $variable substitution, and eliminates the need to avoid anything. EOB;

7. Path_info is great! Use it to clear the ugly URL.

8. Use a recording program, pear install APD.

9. Database abstraction is mostly a fictional story. There is nothing wrong with a direct database call, which takes advantage of all the tricks and tricks you must provide for the database you choose to achieve the highest possible performance.

10. Maintain the use of your basic technology and build simple chunks of the program. Use a wireless path WEB server to avoid complex frameworks and abstraction layers, giving you the opportunity to track and debug any problems that may arise. Solving Web problems is simple; don't try to make it difficult.

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.