This question already has an answer here:
I'm using PHP 7.2.10
I'm using Windows 10 Home Single Language 64-bit Operating System
I tried following two codes but I received the same output in both the cases :
Code 1 :
<?php
echo "stackoverflow\nnine" ;
?>
Code 2 :
<?php
echo "stackoverflow\rnine" ;
?>
Same output for both of the above programs :
stackoverflow
nine
As per my knowledge, Linefeed(\n
) means to advance downward to the next line and Carriage return(\r
) means to return to the beginning of the current line without advancing downward.
Then, why I am getting the same output for the things which are entirely different in nature and in meaning?
Why I'm getting the output with carriage return(\r
) on the next line advanced downward?