Answer the question
In order to leave comments, you need to log in
What is php echo?
What is php echo at the level of client-server communication?
In all textbooks, a deceptive explanation is given: "outputting text to the screen."
Answer the question
In order to leave comments, you need to log in
echo by default outputs data not to the screen but to STDOUT.
STDOUT can be redirected to the screen (default), or to a file, or to a browser, and so on, depending on where and how the echo was executed
. json is text.
First, echo does exactly that. Outputs data from the script execution environment.
Second, json is one of the text data formats.
Thirdly, the output happens to the output stream. If you run the php script in the console, you will see the result in the console.
Judging by the slurred text under the spoiler, you should delve into the principles of client-server programming in general and the HTTP protocol in particular.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question