During the development process, we often take into account the execution efficiency of some php code, so that our program will run more smoothly. here is a simple summary, for more information, see. 1. when file_get_contents can be used to replace
PHP supports an error control operator: @. Any error messages that may be generated by the expression are ignored until it is placed in a PHP expression.
If a custom error handler is set with Set_error_handler (), it will still be called, but this
PHP references (add & symbols before variables or functions, objects, etc.)
The reference in PHP means: Different names access the same variable content.
A reference to a variable
PHP references allow you to use two variables to point to the same
1, if the method of the class can be defined as static, as far as possible to define as static, it will increase the speed of nearly 4 times times.
2. The speed of $row [' ID '] is 7 times times that of $row[id].
3. Echo is faster than print, and
What is the difference between single and double quotes in PHP?
1. As can be seen, the double-quote variable is parsed and output, and the single-quote variable is not resolved.
2. The resolution of single quotation marks is faster than double
: This article describes how to use cookies and user sessions. For more information about PHP tutorials, see. Use cookies and user sessions
Cookie
Cookie, which stores small user information. It is consistent with a request from a server or script.
Usage of $ _ GET, $ _ POST, $ _ REQUEST, and $ _ SERVER in php
Echo $ _ GET ['xingming']."";
Echo $ _ GET ['age']."";
Echo $ _ POST ['xingming']."";
Echo $ _ POST ['age']."";
Most people will think that global and $globals[] are just different, but it's not, so let's take a look at what's the difference between them.
According to the official explanation,
$GLOBALS [' var '] is the external global variable $var
1. replace double quotation marks with single quotes to include strings, which is faster. Because PHP will search for variables in strings enclosed by double quotation marks, but not in single quotation marks. Note: Only echo can do this. 1. use
Php backtracking algorithm solves the n Queen problem. The basic method of backtracking is to search, or a well-organized search method that can avoid unnecessary search. This method is suitable for solving problems with a large number of
Indirect reference, connection string, and join value assignment operator of variables in php getting started variables. [1] Indirect reference of a variable :? Php $ AB; $ a123; echo $ B ;? The above output is 123. we can see that $ is added in the
PHP user guide-cookies-PHP user guide-cookies
In this tutorial, we will learn how to use PHP to process cookies. I will try to make things as simple as possible to explain some practical applications of cookies.
What are cookies and their
53 points to improve PHP programming efficiency. Use single quotes instead of double quotes to include strings, which is faster. Because PHP will search for variables in strings enclosed by double quotes, but not in single quotes. Note: Only echo
Php is optimized in this way. PHP-some performance optimization methods 0. use single quotes instead of double quotation marks to include strings, which is faster. Because PHP will search for variables in strings enclosed by double quotes, single
PHP_MySQL tutorial-the next day while loop and the first page of database operations while loop
In this lesson, we will continue to use PHP and MySQL to write some simple and useful pages. We started to display the data in the database from the
PHP is simple, but mastering is not an easy thing to do. We have to know how it works in addition to using it.
PHP is a dynamic language for web development. Specifically, it is a software framework that implements a large number of components in
PHP User Guide-cookies section
In this tutorial we will learn how to use PHP to process cookies, and I will try to make things as simple as possible to explain some of the practical applications of cookies.
What is a cookie and its role?
Cookies
This article is a detailed analysis of the scope of the PHP variable is introduced, the need for a friend reference
Each variable in PHP has a scope for it, which is a field in which the variable can be accessed (thereby accessing its value). For
The encryption function of PHP Security programming data encryption has become more and more important in our lives, especially considering the large volume of transactions and transmitted data on the network. If you are interested in using security
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.