Separate names with a comma.
Discussion in 'cPanel Developers' started by mario2027, Dec 1, 2010.
What's the difference between PHP echo() and PHP print()，especially in the execution time?
There are a few:
- will return nothing, it just sends the string to the output buffer
- has short tag alias <?='something to print'?>, if you have short tags enabled
- can take multiple, scalar argurments.
- will return 1, always
- only takes one argument
Both are language constructs and are not functions.
As far as execution time, I'm not sure that there is any difference. At compile time, there probably is, but other than the subtle differences I mention above, I don't think there's anything to be concerned about.
I suggest looking at the PHP manual pages as the authoritative source for PHP calls:
PHP: print - Manual
PHP: echo - Manual
for PHP tutorials you can go to w3schools site..
PHP Print and Echo both output data to the screen in a same pattern but PHP Echo and PHP Print differ based on how they are structured.
In PHP, echo is not a function but a language construct. In PHP, print is not a realy function but a language construct. However, it behaves like a function in that it returns a value.