print vs echo
print vs echo
- Started
- Last post
- 7 Responses
- dbloc
in js, print vs echo.... is there really a difference? which one do you use?
- albums0
The reason echo is faster is because it does not return any value, as opposed to print which always returns 1.
- dbloc0
were talking milliseconds though right
- albums0
The print function acts like a function which means it can be used in complex expressions. Something like:
$mynum < 10 ? print "less than 10" : print "10 or more";
Where as echo can not be used in that way.
- vaxorcist0
1 opcode faster, not even a millisecond...
- section_0140
echo takes less time to type. Winner.
Plus it sounds cooler. Also, I can't remember the last time I read code that used print.
- Centigrade0
10 Print "Echo is better"
20 Goto 10Run
- commodore 64dbloc
- :)Centigrade
- Cunt.
You just crashed my computer.detritus