Five practical tips for optimizing PHP performance: The following are five optimization techniques, which are very helpful for development after mastery. 1. Use single quotation marks for strings The PHP engine allows the use of
This article adds to my favorites some of the questions or small issues that php developers often encounter. For more information, see.
The differences between the above functions,
1. Differences between isset () and empty ()Both are used to test
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
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
to indicate the start of the PHP identifier, then put in the PHP statement and exit PHP mode by adding a terminating identifier ?>Calling function phpinfo (), you will see a lot of information about your system, as well as predefined variables,
PHP Global Variables-Super global variablesMany of the predefined variables in PHP are "hyper-global", which means they are available in all scopes of a script. There is no need to perform a global $variable in a function or method; You can access
Before reading, it is recommended to read the first knowledge of Nginx. After that, let's look at the Nginx configuration.In abstract terms, configuring Nginx as a WEB server is the definition URLS of what to do and how to handle those URLS
Generally we use $_post or $_request two predefined variables to receive post-submitted data. However, if the submitted data does not have a variable name, but rather a direct string, then it needs to be received in other ways.Method One: Use the
Original: pre-defined variables-PHP manual notesThe predefined variables represent all external variables as built-in environment variables, and the error information is represented as a return header. A hyper-global variable is a built-in variable
I use winXP for local development, but the uploaded server is linux. I always need to change the configuration file before each upload, and there are other things,Now, by determining the type of the current server to determine what program to
"Constant"constants can be defined with the define() function, and after PHP 5.3.0, constants can be defined outside the class definition using the const keyword. Once a constant is defined, it can no longer be changed or undefined. constants can
The following are five optimization skills that will be helpful for development after you have mastered them. 1. Use single quotes for strings. The PHP engine allows single quotes and double quotes to encapsulate string variables. However, this is a
Environment variable; location parameter variable; predefined variable, environment variable
Environment Variable
Set the environment variable: 1. export variable name = variable value
2. variable name = variable value
Export variable name
(Export
Generally we use $_post or $_request two predefined variables to receive post-submitted data.
However, if the submitted data does not have a variable name, but rather a direct string, then it needs to be received in other ways.
Method One: Use
What are the two types of exceptions in 43.Java? What difference do they have?There are two types of exceptions in Java: checked (checked) exceptions and unchecked (unchecked) exceptions. An unchecked exception does not need to be declared on a
PHP High-efficiency notation (explanation)
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
The HTTP authentication mechanism of PHP is only valid when PHP runs in the Apache module mode. Therefore, this function is not applicable to CGI versions. In the PHP script of the Apache module, you can use the header () function to send the
Global variables and "global" keywordsPHP defines some "Superglobals" variables by default. These variables are automatically merged and can bePrograms are called anywhere, such as $ _ GET and $ _ REQUEST. They generally come from data or other
$_file's Problem
$_file () Whether this format is a system function or a predefined variable, I think the PHP manual is a predefined variable, but some of the course lecturers speak of system functions, who is positive?
Share to:
I. Variable assignmentYou can assign values to variables after they are declared. There are two methods: value assignment and reference assignment.1. Value assignment$ Color = "red ";$ Sum = 12 + "15";/* $ sum = 27 */2. If you want two variables to
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.