Although the syntax echo and print in php is almost do same function. On the performance based work there are some difference between then:-
- Echo is much faster in performance than Print, Since it will not return any value.
- On the basis of multiple print the result
Echo syntax can print multiple params lets see the example below:-
echo "printing count ", 22, 33, 44;
As you can see I can print multiple segment using the same syntax in same line
echo ("printing count ", 22, 33, 44");
Now above you can see I'm printing using one single param string.
Now case of print:-
print() can only take one parameter:
print ("printing count ", 22, 33, 44");
In above line you noticed I'm strict to use only one param using one syntax print in same line
0 Comment(s)