Just out of curiosity, why does php (and now I've noticed batch files too) use "echo" as the command to output text.
It kinda makes sense, but certainly less than print, output, write or any other number of commands would.
Just out of curiosity, why does php (and now I've noticed batch files too) use "echo" as the command to output text.
It kinda makes sense, but certainly less than print, output, write or any other number of commands would.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
I don't know exactly, but I should think that it originates from "echo mode" in terminals. When data is sent to a server, the server "echoes" the data back to the terminal.Originally Posted by djr33
Agreed.It kinda makes sense, but certainly less than print, output, write or any other number of commands would.
Mike
It makes sense when executing the script interactively, as the script will literally "echo" back the parameter(s) to the user.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
That's quite a stretch. If what the user sees is only an echo, where's the original being sent?Originally Posted by Twey
Echo mode (which in batch files is also controlled by the echo command) is all about replaying the commands sent to the shell, so it's a sensible name. Another command name could easily have been used for displaying messages.
Mike
Hmm?
Original in red, echo in green.Code:$ echo Some text Some text
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
That's not what I asked (and it was a rhetorical question, at that), nor is it echoing. Repeating the entire line, command included, would be, as that is what's being sent to the command interpreter.Originally Posted by Twey
Mike
I've spurred a debate!
//watches.
Yeah... I can see why it kinda makes sense, as I said before, but just not sure who would've thought of that as the name for it. But the echo mode thing makes sense (though, who named echo mode?)
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
"Echo" is a city you know.![]()
Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
Currently: enjoying the early holidays :)Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide
And a car. Perhaps programming just a marketing scam.
Next, we'll be using the honda command to connect to a database, and the ford command to duplicate a string....
I need sleep...
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Bookmarks