1. Technology
Send to a Friend via Email
You can opt-out at any time. Please refer to our privacy policy for contact information.

Readers Respond: Do you use Print or Echo in your PHP scripts?

Responses: 92

By

For the most part Print and Echo do the same thing. Which do you choose to use in your PHP programs? Why is this your choice? Share your answers with our readers! Tell Us Why

echo

i usually use echo. and it is much better and faster.
—Guest Abiyu Birhanu

echo

print only takes one parameter, while echo can have multiple parameters. print returns a value (1), so can be used as a function. echo is slightly faster.
—shamith

echo

i like to use echo because its faster.always people like to use fast things brcause world is faster tan anything
—Guest raj

echo vs. print

I fell into a work pattern where I use echo to generate output to be served to a web client. I use print for any other output, to a log file, for example. I think it's funny that that's what I do. One advantage is that when I see print or echo in my work, I know the intent of the script. Weird? Silly? Yeah. My own personal quirks mode.
—Guest LeslieAD

Echo Vs Print

echo is function and print is the statment e.g-echo $_POST[f_name]; prin_r($_POST);
—Guest Sachendra Kumar Srivastava

echo and print

echo is to be faster as compared with print. some times we uses print also . bu I like echo only........
—Guest Girish

echo

echo is easier one compare to print.Also echo is very quick response
—Guest sathyy

echo is the most accustomed

i use echo, because i am accustomised to it. and i think that it is used in all known php scripts
—Guest abdelrhani

better

echo is different from other language of output and mostly use in php echo function.
—Guest Dipu Maurya

Echo

echo is easiar to type and works faster ...........
—Guest person

Echo

I use Echo statement as it's much easier and faster...
—Guest Dilawer Pirzada

echo

i use echo because echo print faster then print echo is not a function is take multiple arguments
—Guest negikaithal

echo vs print

it is best to use echo why means it is faster than print.the reason is when you are working with print ,it is a function and it will returns 1 if the statement successfully executed else returns 0.and it is a function it needs time to execute but echo execute very fast.
—Guest haribabu.p

Echo

..because 'echo' is shorter to type., and I am the "Lé z" type ^_^
—Guest Anup

echo is best

hii As u know echo statement is slight faster between print function. but echo take multiple argument b/w print. —Guest Sujit Srivastava Use Echo Use echo because it's faster than print echo also sound cool..!! —Guest Ameeto echo is gud using echo is much comfortable for me than print, and echo , it sounds good than print —Guest chakravarthy echo I use echo because my leader told me that it faster than print —Guest Sawsan echo all the way i usually use echo with no reasons , but what i know that it's faster than print —Guest loaa
—Guest lovley

Tell Us Why

Do you use Print or Echo in your PHP scripts?

Receive a one-time notification when your response is published.

©2014 About.com. All rights reserved.