Print and Echo

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
treesa
Forum Commoner
Posts: 29
Joined: Sun Aug 31, 2008 10:19 pm

Print and Echo

Post by treesa »

Is there any difference between print and echo statements in php?
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: Print and Echo

Post by jaoudestudios »

Echo is faster! I cant remember why, but I remember researching it a while back and it was faster.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Print and Echo

Post by josh »

one is a function the other is a construct, that is, one returns one does not.
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Re: Print and Echo

Post by jayshields »

User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: Print and Echo

Post by jaoudestudios »

Ah hah...now that makes sense. Thanks :)
Post Reply