PHP programmers generally ignore some of the essences

xiaoxiao2021-03-06  41

I found a lot of PHP programmers, especially for learning, not for a long time, I don't know the essence of PHP. How does Perl are famous in the business? Its powerful regular expression. And what about PHP? He is a language developed from UNIX, of course, inherits a lot of characteristics of Perl, and the advantages of C are. Fast, concise, clear, especially C programmers, PHP is love, I just love "PHP" (I forgot my girlfriend :)). Here, I want to write a PHP variable, array application skills, and PHP's regular expressions, PHP template applications, and then write PHP and COM, PHP and XML. Combination. 1. Variables, and arrays Application Skills (1) Many people use a lot of array functions. Foreach, List, Each. Take a few examples, you should know. Example: 'DATA1', 'B' => 'DATA2', 'C' => 'DATA3'); While (List ($ Subscript, $ VALUE) = Each ($ DATA)) {Echo "$ subscript => $ value ::"; echo "$ subscript => $ value / n
";} reset ($ data); foreach ($ data as $ subscript => $ Value) {echo "$ subscript => $ value ::"; Echo "$ subscript => $ value / n
";} (2) Variables of the function, variables of the variable, the "pointer": look Example: The reason why it is "pointer" is because he has the same functionality as the pointer in the C language. But this is not a real pointer, which can only be such a understanding. 2. Regular expression regular expressions are a very large topic, and the power of Perl's regular expression is smelling. PHP is not weak, he inherits the regular expression rule of Perl, and has its own set of rules. Here is just PHP's own regular expressions. Regular expressions are the most basic elements. Simply put in a set of rules, it is used to determine that other elements are not in line with their own rules, or have the same feature description. The rules of the regular expression: ^, end $, which are matched between the two symbols. If you check a phone number, it is called to Beijing, and the regular expression is "^ 010 $". As long as the first 3-bit area number is 010, it is the number of Beijing, and the phone number behind will not take it.

转载请注明原文地址:https://www.9cbs.com/read-70535.html

New Post(0)