Source: Security FocusAuthor: T_Torchidy (jnchaha_at_163.com)
Currently, many php software vendors have begun to use Zend encryption to encrypt their products for some purposes. When customers use it, they do not know the details in the program, it
Common syntax formats:foreach ($arr as $key = = $value) {$arr _str = $arr [' x_id ']. ‘,‘ . $arr _str;}Assume that the characters in the character array $arr areArr[0] = ' a ';Arr[1] = ' B ';ARR[2] = ' C ';Then, after the concatenation of the $arr
Explanation of PHP binary security
Explanation 1:
PHP has the concept of string.
In string, the size of each Character is byte (compared with PHP, each Character in Java is Character, UTF8, and each Character in C can be selected during
1. Ifamethodc ++ anbestatic, declareitstatic. Speedimprovementisbyafactorof4. if a method can be static, it will be declared as static. The speed can be increased to 4 times. 2. echoisfastert... "> 1. If a method c ++ an be static, declare it static.
Method 1 to optimize the PHP program. Ifamethodc ++ anbestatic, declareitstatic. Speedimprovementisbyafactorof4. if a method can be static, it should be declared as static. The speed can be increased to 4 times. 2. echoisfasterthanprint. echo method
We all know that English characters take up one byte, while Chinese characters gbk take up two, and utf8 take up three. many people think that php calculates the string length as the strlen () function, it calculates the length of a byte rather than
50 tips to improve the efficiency of PHP execution,
1. It is quicker to use single quotes instead of double quotes to contain strings. Because PHP will search for variables in a string surrounded by double quotes, single quotes will not, note: only
However, if the Utf-8 encoding, a Chinese character is 3 characters in length, such as the string $str= "Hello Ah!!";
If you use the Strlen function to judge that the length is 11, just over the length of the varchar, but in fact it is not so, if
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
Methods to optimize the PHP program (learn more) 1. Ifamethodc ++ anbestatic, declareitstatic. Speedimprovementisbyafactorof4. if a method can be static, make a static statement on it. The speed can be increased to 4 times. 2. echoisfasterthanprint.
First, using the pointer out of the decomposed numberThe effect of implementing a method "multiple return Values": Returns a three-digit digit, 10 bits, and hundreds. Here, we use pointers to "return" the results of the decomposition. This
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
Some basic functions commonly used by PHP (II) 11. the number of bytes of the variable obtained by The strlen () function $ aaA013strlen ($ aa); the number of bytes obtained is 412. function substr () echosubstr (abcdef, 1 );???? Bcdefechosubstr
1, stitching strings
The concatenation of strings is one of the most commonly used string operations, and in PHP there are three ways to stitch strings, namely dots. The delimiter {} operation, and the dot equals sign. = to operate, the dot equals
This article mainly introduces 50 tips for improving PHP Execution efficiency. For more information, see 1. Use single quotes instead of double quotation marks to include strings. This will be faster. Because PHP will search for variables in strings
Note: This article is a video tutorial from Li Yanhui PHP. This article is intended for communication purposes only and cannot be used for commercial purposes. Otherwise, the consequences will be borne by you.
Learning points:1. String formatting2.
1. Implementation goals Use assembler to call the C-database function, that is, the function can be called when the function name and parameter are given. II. Problem description when implementing the C interpreter, parse the function call
I. Definition of arrays 1. Definition
L declare the array type
L declare the number of elements in the array (How much storage space is required)2. Format
Element type array name [number of elements];
For example: int ages [3];3. Easy to use
L
OC object-oriented-Polymorphism
I. Basic Concepts
Polymorphism is embodied in code, that is, there are multiple forms. There must be inheritance, and there is no polymorphism without inheritance.
When polymorphism is used, dynamic detection is
UNICODE: Wide-Byte Character Set 1. How to obtain the number of characters in a string that contains both single-byte and double-byte characters?
You can call the Runtime Library of Microsoft Visual C ++ to contain the function _ mbslen to operate
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.