Self-taught PHP for almost 2 months. Learn to do something, basic functions with the same, with the help point open plus search to find. Basically, no problem.
However, the description of the PHP homepage is very vague, a lot of parameters to say or do not understand, there is practice to the truth. There's nothing wrong with that.
The first is the difference between Echo and print, summed up the following:
Echo () and print () the difference between the small talk
Same as String output echo and Echo, what's the difference, Nikki?!!
PHP said, in fact, which is not very strict. They can all work without brackets ().
At present, only 3 points are found to be relatively large differences.
1. Echo () can be separated by a comma, the number of strings, print () can not
Print "Hello", "World"; Syntax error.
echo "Hello", "World"; Syntax ok!!
※echo () After the parentheses "()", add a comma, or distinguish the number of strings also not! Please note that.
2. Print () returns, Echo () does not return.
1 $output 1 = print "Hello world"; This one with the output.
2 $output 2 = echo "Hello World"; This one's not there!
3. If you do not need to return the result operation, Echo () is slightly faster.
echo () vs print ()
Echoing 100000 of Nothing
Exe time is 0.034925937652588 secs.
Printing 100000 of Nothing
Exe time I s 0.037981986999512 secs.
Do you need to judge the difference?