Friday, May 27, 2011

PHP difference between echo,print and printf

Echo, print and printf these three are used for printing the text. Here i am going to explain the difference between these three

echo
----
*) it's a construct.
*) allow multiple parameters
*) does not return any value

print
-----
*) it's also a construct.
*) do not support multiple parameters
*) return true if it success or false if it fail

printf
------
*) it's a function not a construct
*) allow multiple parameters

1 comment: