Although I am also a PHP learner, I didn't know much about the garbage collection process in PHP before, but I used unset, null, mysql_close in our code, __destruct and other functions to release objects to prevent memory overflow. Therefore, go to
Exception Handling is used to change the normal process of the script when a specified error (exception) occurs. This is called an exception.
PHP 5 adds an exception handling module similar to other languages. Exceptions in PHP code can be thrown by
Analysis of variable reference and variable destruction mechanism in PHP, PHP destruction
This paper analyzes the variable reference and the mechanism of variable destruction in PHP. Share to everyone for your reference. The specific analysis is as
1. Try to be static:If a method can be static, it is declared static, the speed can be increased by 1/4, even when I test, this improved by nearly three times times.Of course, this test method needs to be executed at level 100,000 and above, the
Error, Exception level constants tableError: The run-time error cannot be found at compile time, instead of trying to output an unassigned variable with echo, this kind of problem often causes the program or logic to not continue and needs to be
PHP Caching principleWhen the client requests a PHP program, the server's PHP engine parses the PHP program and compiles it into a specific opcode (operatecode, abbreviated opcode) file, which is a binary representation of the PHP code. By default,
1. The difference between single and double quotes
Most PHP developers (including me before) don't care much about their usage, but there's a big difference.
The PHP engine allows the use of single and double quotes to encapsulate string variables,
In this paper, we analyze the mechanism of variable reference and variable destruction in PHP. Share to everyone for your reference. The specific analysis is as follows:
Variable is a very important type in PHP, we have data through variables or
Summarize PHP error handling for new users. PHP provides error handling and logging functions. these functions allow you to define your own error handling rules and how to modify error records. in this way, you can modify and enhance the error
With logging, you can send information directly to other log servers, either to a designated email address (or via a mail gateway), to an operating system log, and so on, so you can selectively record and monitor the most important parts of your
1. Do not copy variables randomly
Sometimes in order to make the PHP code more neat, some novice PHP (including me) will copy the predefined variables into a shorter name of the variable, in fact, the result is an increase in memory consumption,
Learning Essentials:
1.Web Database Overview
Operation of 2.MySQL
3.MySQL Common functions
4.SQL Statement Explanation
5.phpMyadmin
A Web Database Overview
Now that we are familiar with the basics of PHP, this is what we want to leave the PHP
Exception handling is used to change the normal process of a script when a specified error (exception) condition occurs. This condition is called an exception.
PHP 5 adds exception handling modules similar to those in other languages. Exceptions
PHP Code performance Optimization 1. Don't just copy the variables.
Sometimes in order to make the PHP code more neat, some novice PHP (including me) will copy the predefined variables into a shorter name of the variable, in fact, the result is an
Google made "let's make the web" in Google CodeFaster "(making the web faster) websites share some tips, tutorials, and tools such as web page performance optimization. Today I will translate a tip article: PHPI don't know the performance
This article to share the content is the analysis of PHP error handling, automatic loading, stack heap memory and operating mode, has a certain reference value, the need for friends can refer to
Php Error Handling
Php Error Level :
E_error fatal
Although I am also a PHP learner, but did not really understand the PHP internal garbage collection process, just in our code with unset,null,mysql_close,__destruct and so on some functions to release the object to prevent memory overflow, so online
Defined:
The method that begins with the two line "__" in the PHP class is called the Magic method.
Classification:
For example: Construction method: __construct; destructor: __destruct; dynamic reload: __set (), __get (), __call (), __callstatic ()
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.