Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4595366
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T22:57:36+00:00 2026-05-21T22:57:36+00:00

^M is the dos carriage return that’s left after each line when you move

  • 0

^M is the dos carriage return that’s left after each line when you move a file from a Windows box to a *NIX box. I know how to remove it. I am curious to know is there any other reason besides aesthetics that it should be removed from a PHP script.

The PHP script runs fine with it in. Normally, I would remove it without hesitation, but don’t want to have my name next to each line in an svn blame command. (besides the point).

Question: Is there a reason in regards to functionality of why it should be remove other than aesthetics? It doesn’t seem to break anything to keep it in. (Give me a good reason plz)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T22:57:37+00:00Added an answer on May 21, 2026 at 10:57 pm

    All in all, it should be fine. Other languages are picky about their line endings; I’ve seen it cause issues in Perl scripts, for example. But for PHP, i’ve never seen it matter much.

    One occasion where it could conceivably matter is in multi-line strings, where the extra chars would make it through to the output. This might matter if your output is not HTML or XML. But JS shouldn’t be particular about extraneous CRs, and HTML and XML will generally treat any whitespace the same as a single space (or in many cases, disregard whitespace altogether). Textareas and <pre> elements and such might end up with extra whitespace in them. That’s about the only issue i can think of.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a file with DOS line endings that I receive at run-time, so
Is there an easy way to see whether particular file has DOS/MAC/UNIX line endings?
I'm currently learning Windows/DOS assembly. I'm just making a small program that adds two
In DOS batch, I have to read file paths from a file encoded in
I have a DOS batch file that show some results on the cmd console.
In a DOS batch file we can only have 1 line if statement body?
I have a command-line C program (DOS/Windows) which produces a hex dump of several
Why did DOS/Windows and Mac decide to use \r\n and \r for line ending
I am passing two filenames from a DOS batch file to a Perl script.
Like the old DOS way of creating a file by writing copy con foo.txt,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.