0
what the mean of PHP_EOL
I saw a code of PHP there is $date.PHP.EOL I just don't understand what is EOL
1 Réponse
+ 1
Think of PHP_EOL as a safer solution than using \n or \r for new line
It stands for end of line - it's platform independent so it's often recommended to use it instead of \n or when you want to reach the end of line
From the Web:
Use the php constant PHP_EOL to print the correct end of line symbol no matter what system you're on.
Example:
<?php
print "Hello World," . PHP_EOL . "I've missed you.";
?>
Hello World,
I've missed you.