Echo ""; Or Print"";

Started on the old forum in June 2006 · view the original in the archive · old links redirect here

38 replies · 2,976 views · started 20 years ago · 1 min read

TL;DR · summary of 38 replies
  • - Echo ''; is marginally faster than print "", but the difference is negligible.
  • - The choice between echo "" or print "" does not affect WAP users or browsers, and it doesn't matter which one to use for most cases.
  • - Some developers prefer using echo because it's shorter and can be used in more complex expressions.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

11 participants
CLINT #1

echo ""; or print"";

Does it make any difference to wap users and browsers which one you use? or does it not matter, also in wap coding should you use " or '

example:

echo "Hello World";

echo 'hello world';

print "hello world";

print 'hello world';

I know that all these work in theory but I have heard some people say that some give errors in wap. Is this true? And if so then which? External image (may be gone)

/tease.gif" style="vertical-align:middle" emoid="8P" border="0" alt="tease.gif" />t;line-height:100%">Please only reply if you have something good to say, dont just say dont know!

Toddy1989 #2

When I got the uglymonkey toplist it was a mix of echo n print, I removed all the prints n changed them to echos! There was then no errors that others have, were some phones cant viwt the toplist!

Obviously there is cases were u must use ' or " but in the one ur talking about im not sure, ive always used echo " ";

naveen-PHP LEARNER #3

PHP started echo thus PHP owns it. Print was a statement in pearl. Printf in C. Scanf in C. Also , '##' type of comments is owned by pearl. And '/**/' type by C. External image (may be gone)

I think it doesent matter with echo or print but i dont mind using print.

wapkralj Developer · 237 posts #4

I heard that fastest is echo " "

abhisar #7

I had mostly used print for my site.

CLINT #8

I had mostly used print for my site.

Oh no! So did I!

wapkralj Developer · 237 posts #9

I too,and clint clean your inbox ,it's full!!!

abhisar #10

But whats wrong with print"";.It also works fine.java script:emoticon('🤨', 'smid_10')

naveen-PHP LEARNER #12

echo is shorter External image (may be gone) thats why i prefere it

and if you are using

echo 'hello world';

instead of

echo "Hello World";

the script load time is faster, eg. for chat script.....

Its because all chars are stored in array or a pointer. A single char takes 2 bit of memo. A capital char takes a bit for than that. A numerical takes 1 bit. A float takes 1-3 .

Learn C , as it makes PHP easier. External image (may be gone)

abhisar #15

I too started using echo now and its good.

abhisar #17

Yes its smaller to use echo 'hi'; rather than echo "hi"; and you dont need to press the shift key to make the sign ""

lamar-wap #18

i only use echo and if im working on someone script an i see print i replace it with echo and it dont get any error lol.......

abhisar #19

print doesnt give error to me.

hardstyle Developer · 154 posts #20

lol i learned with echo""; so i keep you using that..

8th wonder of the world

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close