Who said that? Was it George Carlin? Hunter S Thompson? WC Fields? Arthur Schopenhauer? Napoleon Bonaparte? Tecumseh? Voltaire? Thomas More? Julius Caesar? Aristotle? Confucius?
The answer is: yes. They all said that. As have countless other people, speaking and writing in many languages, all over the world, for thousands of years.
The date of the earliest known specimen of writing keeps being pushed further back, as older specimens are found. You think writing began "shortly before 3,100 BC, either in Egypt or Mesopotamia"? You're a little bit out of date. Right now it's not certain which artifact of writing is the oldest currently known, because, for one thing, the dating of these artifacts is not always very exact, and for another, there are some things upon which lines were carved before 3,500 BC, which could be the oldest-known writing, if we were sure that the lines are writing, but we're not yet sure about that. Part of the problem is defining what writing is. It developed from pictures, and mankind has been making pictures for tens of thousands of years, and occasionally a picture really does say a thousand words or so.
Anyhoo. One of the oldest known specimens which everyone agrees is writing is located on a cliff in Egypt, a little bit of graffiti scratched into the cliff. It may actually be the oldest piece of writing yet discovered. It's definitely older than 3,200 BC. Most often the oldest heiroglyphs we know have an official character, having to do with kings and religion, but this message is quite informal, as if a court scribe took a break from his official duties to write what he really thought. It's one short line of symbols, among which can clearly be seen a man and a dog. The dog is especially well drawn. He -- it is definitely a he -- looks happy and frisky, with his short tail and triangular ears standing straight up.
The graffiti says, "People stink and dogs are great." That's an attempt to give you the flavor and sense of the message. A much more literal translation would be, "People bring plague. Dogs bring the sun."
PS None of what I said in this post is true, unless I got something right by accident. One or more of the people I listed may actually have written the title phrase. But all of it should be true.
PPS I like dogs an awful lot, but I still like cats even more. And in rare cases, people are actually the best.