The following example shows the differences between the three functions. var_dump and var_export are less useful, but they are similar. So you can see:
Copy codeThe Code is as follows: $ A = array (32,322,343, 32,232,232 3, array (32 ));
$ B = 1234;
$ C = "alsdfl; asdf ";
$ D = 'a ';
$ E = fopen ("slsl.txt", "r ");
Var_dump ($ );
Echo "Var_dump ($ B );
Echo "Var_dump ($ c );
Echo "Var_dump ($ d );
Echo "Var_dump ($ e );
Echo "Echo "Echo "Echo "Var_export ($ );
Echo "Var_export ($ B );
Echo "Var_
such as: $str = "How does PHP divide 322 of the alphanumeric SF f45d and Chinese in the string?" "; Divide by numbers or letters.
$str = "How does PHP divide 322 alphanumeric asf f45d and Chinese _ in a string?" "; $arr = Preg_split ("/([a-za-z0-9]+)/", $str, 0, Preg_split_no_empty | Preg_split_delim_capture); Print_r ($arr);
Results
$new = Array (); $new [0]= "PHP"; $new [1]= "How to put the string";
If there is a mix of letters, numbers, and Chinese characters in a string, how can we separate them? after some thought, I got the following code and shared it with you: $ str = "how does php split the 322-letter-number sf f45d from the Chinese _ in a string? "; Separated by numbers or letters.
$ Str = "how does php split the 322-letter-number Asf f45d from the Chinese _ character string? "; $ Arr = preg
Differences in usage of php functions var_dump, var_export, and print_r
Warning: fopen(slsl.txt) [function. fopen]: failed to open stream: No such file or directory in E: \ mywww \ yangtest \ base1.php on line 6
Array (6) {[0] => int (1) [1] => int (1) [2] => int (32) [3] => int (322) [4] => int (3433) [5] => array (3) {[0] => int (32) [1] => int (232) [2] => int (23232 )}}
Int (1234)
String (11) "alsdfl;
The following example looks at the specific differences between the three functions, where var_dump and var_export are less useful, but they are very similar to each other. So you can look at:
Copy CodeThe code is as follows:
$a = Array (1,1,32,322,3433,array (32,232,23232));
$b = 1234;
$c = "ALSDFL;ASDF";
$d = ' a ';
$e = fopen ("Slsl.txt", "R");
Var_dump ($a);
echo "
";
Var_dump ($b);
echo "
";
Var_dump ($c);
echo "
";
Var_dump ($d);
echo "
";
Var_dump ($e);
echo "
";
echo "
";
echo "
";
ech
Org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValues ( Defaultresultsethandler.java:322) at Org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSet ( Defaultresultsethandler.java:295) at Org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSets ( Defaultresultsethandler.java:192) at Org.apache.ibatis.executor.statement.PreparedStatementHandler.query (Preparedstatementhandler.java:64) at
disk puzzle;
(2) Moving disk C to column 3 of the single disk puzzle;
(3) Moving discs A and B to column 3 double disk puzzle.
From the above can be seen simplifies the problem each is easier than the original problem, so the problem will become easy to solve the primitive problem.
Tell: The source of the Vatican tower problem.
Question: A disk problem to take a few steps. Two disk problems to walk a few steps. Three, four ... Wait
4, description of the reduction
The method of problem reduct
For example: $str = "How does PHP divide 322 of the alphanumeric characters in the string into SF f45d and Chinese _?" "; Divide by number or letter.
Copy Code code as follows:
$str = "How does PHP divide the alphanumeric f45d and Chinese _ 322 in the string?" ";
$arr = Preg_split ("/([a-za-z0-9]+)/", $str, 0, Preg_split_no_empty | Preg_split_delim_capture);
Print_r ($arr);
Results
symbolic links
-P, -- no-dereference
Dona ?? T follow any symbolic links (this is the default)
-0, -- null
End each output line with 0 byte rather than newline
-S, -- separate-dirs
Do not include size of subdirectories
-S, -- summarize
Display only a total for each argument
-X, -- one-file-system
Skip directories on different filesystems
-X file, -- exclude-from = FILE
Exclude files that match any pattern in FILE.
-- Exclude = PATTERN Exclude files that match PATTERN.
-- Max-depth = N
Print the
Warning:fopen (Slsl.txt) [function.fopen]: failed to open stream:no such file or directory in E:\mywww\yangtest\base1.php On line 6
Array (6) {[0]=> int (1) [1]=> int (1) [2]=> int (+) [3]=> int (322) [4]=> Int (3433) [5]=> Array (3) {[0]= Gt Int (+) [1]=> int (232) [2]=> int (23232)}}
Int (1234)
String (one) "ALSDFL;ASDF"
String (1) "a"
BOOL (FALSE)
Array (0 = 1, 1 = 1, 2 = +, 3 =
situation.2. the integer type is given to the real type, and the value remains unchanged, but it will be stored as a floating point, that is, add the decimal part (the decimal part value is 0 ).3. the Bytes type is given to the integer type. Because the bytes type is one byte and the integer type is two bytes, the ASCII code value of the character is placed in the lower eight bits of the integer, and the height eight bits are 0.4. The integer type is given to the character type, and only the lo
The social product business has many statistical counting functions, such as:
Users: The total number of praise, attention, number of fansPost: Number of praise, comments, heatMessage: Read, unread, red dot message numberTopic: Reading number, post number, collection number
The characteristics of statistical countingHigh Real time requirementsIt's written in a very high frequency.Write performance is a challenge for MySQLRedis can be used to optimize performance requirements for high frequency
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.