what the mean of PHP_EOL | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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

4th Jun 2020, 11:25 AM
Leon Lim
Leon Lim - avatar
1 Answer
+ 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.
4th Jun 2020, 12:38 PM
HNNX 🐿
HNNX 🐿 - avatar