First, strlen function
size_t __cdecl strlen (
const char * str
)
{
const char *eos = str;
while (*eos++);
return (eos-str-1);
}
The above source is visible strlen () and does not count the Terminator to
First on the machine, because the previous passed the Huawei Programming competition 2nd round, so free on the machine, so only need to carry on the machine personality test. Personality test or to brush people, so try not to contradict.
This year
I. Type of injection type of attackThere may be many different types of attack motives, but at first glance there seems to be more types. This is very real-if a malicious user discovers a way to execute multiple queries. We will discuss this in
It is quicker to use single quotes instead of double quotes to contain strings. Because PHP searches for variables in a string enclosed in double quotes, single quotes are not, note: only echo can do this, it is a "function" that can take multiple
PHP Multiple optimization methodsOne of the PHP optimization configurations lets the forum speed faster PHP acceleration set PHP Acceleration: Zend Optimizer Optimize PHP program
Zend Optimizer V2.5.7 for WindowsSoftware language: EnglishOperating
1. If a method can be static, make a static declaration on it. The rate can be raised to 4 times times.
2.echo is faster than print.
3. Use Echo's multiple parameters (meaning to use a comma instead of a period) instead of a string connection.
4.
The goal of PHP optimization is to get the fastest running speed and the easiest code to maintain with the least cost. To provide you with the following optimization techniques:
1. Echo is faster than print.
2. Use Echo's multiple parameters
1, stitching stringThe concatenation string is one of the most commonly used string operations and supports three ways to stitch strings in a PHP tutorial. is a dot. Delimiter {} operation, there is also a dot equals. = to operate, the dot equals
oracle| Data | database | Original I use the Oracle database for working relationship, found that there are not many people here, but often found that someone mentioned in the PHP operation of the Oracle database problem is not answered, I have
It is quicker to use single quotes instead of double quotes to contain strings. Because PHP searches for variables in a string enclosed in double quotes, single quotes are not, note: only echo can do this, it is a "function" that can take multiple
PHP's unique syntax mixes C, Java, Perl, and PHP with its own innovative syntax. It can execute dynamic Web pages faster than CGI or Perl. Dynamic pages made with PHP compared to other programming languages, PHP embeds programs into HTML documents
Experienced programmers found that PHP judged the length of the string, using Isset () faster than strlen () and executing more efficiently.That
Copy Code code as follows:
$str = ' aaaaaa ';
if (strlen ($STR) > 6)
Vs
if (!isset (
0. It is quicker to use single quotes instead of double quotes to contain strings. Because PHP searches for variables in a string enclosed in double quotes, single quotes are not, note: only echo can do this, it is a "function" that can take
1. Convert a string to an arrayStr_split () is used to convert a string to an array
Syntax:
Copy Code code as follows:
Str_split (String,length)
//string is required, is the string to be segmented;
Length is optional, specify
Sometimes we need to calculate the number of words contained in a string, and for the pure English string, the word number equals the length of the string,The strlen function can be obtained, but what if the string contains Chinese? Mb_strlen can be
PHP's ability to handle strings is very powerful, and there are a variety of ways, but sometimes you need to choose the simplest and most desirable solution. This article lists 10 common string processing cases in PHP, and provides the most
Introduction to 1.MySQL DatabasesMySQL is an open source code of small relational database management system, small size, fast, low overall cost, open source. MySQL has the following features:(1) Use C and C + + written, and use a variety of
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 uses
First, the string basisNote: The string must end with a.Printf ("yang\n");Where Yang is a string constant, "yang" = ' y ' + ' a ' + ' n ' + ' g ' + '. Strings consist of a number of characters, usually using a character array to store strings, such
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 can do this, it is a "function" that can treat
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.