Lead
Practical experience from the frontline
There's a bloody lesson behind every military rule.
Do not be gorgeous, as long as practical
If there's one that benefits you, you'll be comforting.
Primarily for database
In view of the lessons of the Mini project, many places are not standard enough and inefficient. Therefore, in the further study of PHP, combined with Internet resources on the knowledge of PHP to do a certain summary, in order to avoid
1. If a method can be static, declare it static. Speed improvement are by a factor of 4. If a method is static, it is statically declared. The rate can be increased to 4 times times.
2. Echo is faster than print. echo is faster than print.
3. Use
[Size=5] [Color=red] 40 Suggestions for optimizing PHP code [/color][/size]Tips for optimizing your PHP CodeOriginal address: Http://reinholdweber.com/?p=3The English copyright belongs to Reinhold Weber, the author of Yangyang (aka Davidkoree). The
1. If a method C++an be static, declare it static. Speed improvement are by a factor of 4. If a method is static, it is statically declared. The rate can be increased to 4 times times.2. Echo is faster than print. echo is faster than print.3. Use
40 tips to optimize your PHP code
The English copyright belongs to Reinhold Weber, the author of Yangyang (aka Davidkoree). The bilingual version may be used for non-commercial communication, provided that the English version of the author,
1. If a method C++an be static, declare it static. Speed improvement are by a factor of 4. If a method is static, it is statically declared. The rate can be increased to 4 times times.2. Echo is faster than print. echo is faster than print.3. Use
1. In the case of file_get_contents instead of file, fopen, feof, Fgets and other series of methods, try to use file_get_contents, because he is much more efficient! But pay attention to file_get_ Contents PHP version problem when opening a URL file;
1. In the case of file_get_contents instead of file, fopen, feof, Fgets and other series of methods, try to use file_get_contents, because he is much more efficient! But pay attention to file_get_ Contents PHP version problem when opening a URL file;
1. In the case of file_get_contents instead of file, fopen, feof, Fgets and other series of methods, try to use file_get_contents, because he is much more efficient! But pay attention to file_get_ Contents PHP version problem when opening a URL file;
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.