TEENFRONT Posted May 21, 2007 Share Posted May 21, 2007 Whats the difference? Im sure theres an explantion but i google and cannot seem to find any things for this simple bit of info.. Quote Link to comment https://forums.phpfreaks.com/topic/52349-print-or-echo/ Share on other sites More sharing options...
MadTechie Posted May 21, 2007 Share Posted May 21, 2007 someone said theirs a speed differents (depending on what your doing) but from what i know,, theirs none Quote Link to comment https://forums.phpfreaks.com/topic/52349-print-or-echo/#findComment-258325 Share on other sites More sharing options...
TEENFRONT Posted May 21, 2007 Author Share Posted May 21, 2007 there must be a difference of preffered use in a certain situation as why would they have 2? Quote Link to comment https://forums.phpfreaks.com/topic/52349-print-or-echo/#findComment-258330 Share on other sites More sharing options...
MadTechie Posted May 21, 2007 Share Posted May 21, 2007 print("test","test2"); will fail echo("test1","test2"); will work.. Quote Link to comment https://forums.phpfreaks.com/topic/52349-print-or-echo/#findComment-258331 Share on other sites More sharing options...
marf Posted May 21, 2007 Share Posted May 21, 2007 Half empty or half full? Quote Link to comment https://forums.phpfreaks.com/topic/52349-print-or-echo/#findComment-258332 Share on other sites More sharing options...
colombian Posted May 21, 2007 Share Posted May 21, 2007 echo is faster. Echo simply outputs whatever into the screen - without doing much. Print is a little slower (in the vast majority of cases you won't notice it) but the statement is evaluated before being sent to the screen, hence the slight delay. Other than that, they work almost exactly the same, and 99.9% of the time can be used interchangeably. Quote Link to comment https://forums.phpfreaks.com/topic/52349-print-or-echo/#findComment-258342 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.