1.1. Add test = 1 for all the following links.
Eg.
<A href = "www.google.com"> Google </a>
<A href = "www.guokr.com? A = 3 "> shell </a>
Result:
<A href = "www.google.com? Test = 3 "> Google </a>
<A href = "www.guokr.com? A = 3 & test = 3 "> shell </a>
1.2. Add test = 1 to the href attribute containing the URL www.google.com.
Eg.
<A href = "www.google.com"> Google </a>
<A href = "www.google.com? A = 3 "> Google </a>
<A href = "www.guokr.com? A = 3 "> shell </a>
Result:
<A href = "www.google.com? Test = 3 "> Google </a>
<A href = "www.google.com? A = 3 & test = 3 "> Google </a>
<A href = "www.guokr.com? A = 3 "> shell </a> the link cannot be matched.
Preg_replace_callback (this function is the easiest to implement), and preg_replace is cumbersome.
2. Briefly describe the factory mode and single-State mode, and write instances respectively!
See http://baike.baidu.com/view/1306799.htm
3. Functions of the following commands in Linux
Grep, Cat, Echo, ls, top, less, WC, PS, iptables, kill, and so on (it seems like this is the case. Repeat Common commands once)
4. Use at least two methods to determine whether the first three characters in a string are ABC.
If ('abc' ==$ STR {0}. $ STR {1}. $ STR {2 })
If (0 === strpos ($ STR, 'abc '))
If (preg_match ('$ ^ ABC $', $ Str ))
If ('abc' = substr ($ STR, 0, 3 ))
5. Briefly describe the functions of the following functions
Sort, asort, ksort, rsort
Use usort () to sort the following arrays in ascending order of the 4th values of the array
$ Arr = array (
Array (1, 2, 4, 5 ),
Array (1, 2, 4 ),
Array (1, 2, 4, 3 ),
Array (1, 2, 4, 2 ),
);
Result After sorting:
$ Arr = array (
Array (1, 2, 4, 2 ),
Array (1, 2, 4, 3 ),
Array (1, 2, 4 ),
Array (1, 2, 4, 5 ),
);
6. Design a high-concurrency, efficient, secure, and stable system.
Tip: from the database, system architecture, and Framework Design Aspects (free to use ).
7. databases are usually used for interviews, with a large number of questions.
About the interview (you will usually ask questions based on your expertise)