I was one of the people who downvoted your answer (as well as the other answer) as well as I am one of the regulars in PHP chat.
Let's start with the why: because the answer basically is wrong. I mean the answer works, but it isn't considered best practice (understatement). The use of the global
keyword isn't the way to go and should be replaced by dependency injection.
The sad fact is that the [php] tag has a lot of bad practice or plain wrong answers / questions. I blame the different resources on the internet for a big part for this. Now the really sad fact is that other people see them and use them (without knowing it is wrong). One way of showing this is by downvoting questions / answers.
What happened was the following: we were discussing the question and after that saw answers coming in (with some stuff in it you should "never" do: global
keyword). When we see a wrong answer we may indeed downvote. And we may indeed post a [dv-pls] with a link (this doesn't really happen that often).
I should say that [dv-pls] is not a: hey guys look at this, downvote the h*ll out of it. It is rather a way of getting an answer / question in the spotlight for review. All people in chat (who want to) will review it and do with it whatever they want. They may even start a discussion which may convert a downvote to a neutral vote / upvote. Again everyone decides for themselves what somebody does with it.
The only thing what somebody could have done was post a comment on your answer to say what was wrong. Although this is not mandatory you will see that most times a comment will be posteda comment will be posted.
People can call bad names on us, however the fact is that we are trying to make this site better by making sure the best answers get the most attention. So imho calling us a jerk circle or whatever isn't really the way to go.
So in conclusion:
First let it be clear it was nothing personal against you. Simply because the answer was wrong in the sense that when other people would use it they would be doing it wrong. It's too bad that no comment was left on the answer (which as you can see is something that will happen most of the time). IMHO the [cv-ring] has it's place here given the cleaning up we have done on this site. But again it was not a: "all forces attack!!!" type of thing, but rather that some people thought the answer wasn't correct and acted on it accordingly.
It was not meant to be some kind of Pleeeeeaaaase can you give back that precious reputation to me?
I didn't think it was. But rather you wanted to know why all the downvotes which is a valid question. If you (or anybody else) have any more questions feel free to join the php chat roomthe php chat room and you will see we are not the army of downvote fanatics ;) you people think we are. :-)