<?php
/*
echo Output a string [does not behave like a function]
No value is returned.
print Output one or more strings [behaves like a function]
Returns 1, always.
*/
#( TRUE ) ? echo 'true' : echo 'false'; // PHP Parse error: syntax error, unexpected T_ECHO
( TRUE ) ? print 'true' : print 'false'; // Okay!
?>
Return to Kesavan Muthuvel's home page. Please send comments on these web pages to hi@kesavan.info (or) Feedback here CopyLeft (Ͻ) 2008 - 2023 Kesavan Muthuvel More on CopyLeft |