There are several ways to print output in PHP; including but not limited to:
echo 'Hello'; echo ('Hello'); print 'Hello'; print ('Hello');
Are there any differences between these four? Also, do the parentheses make any difference at all?
echo doesn’t. Therefore
echo accepts multiple arguments. So you may write
echo $a, $b instead of
echo $a . $b.
Concerning the parentheses: They are simply wrong in my eyes. They have no function at all. You could as well write
echo (((((((((($a)))))))))); people usually include parentheses from ignorance, thinking that
print("foo") && print("bar") does not print
foobar, because PHP interprets this as
print(("foo") && print("bar")). So
bar1 would be printed, even though it looks different.