last day (15 days later) » 

15:42
-4
Q: Why is there no detail in the php source code?

xu RussellI was looking at a php source code file: data_c.php. I find out there is nothing inside the method of the DateTime class,just some comments and declarations,like below: class DateTime implements DateTimeInterface { /** * @param string $time * @param DateTimeZone $timezone * @return DateTime ...

Where did you find this code? This is probably something bundled along your IDE so that it can show proper signatures.
What file exactly were you looking at?! This looks like a type definition stub file from an IDE.
This isn't the actual source code. It's just a stub created for IDE files. If you really want to see how it works, you can view the actual C/C++ source code at github.com/php/php-src. If you just want information on how to use it in PHP, check out the documentation at secure.php.net
This is a perfectly fine question... no idea why this was downvoted and closed. You could have posted an answer instead. @deceze A light touch on the moderation for questions like these would be appreciated. It would be one thing if it had the four close-votes, but it didn't.
I guess it just implements DateTimeInterface class and adds 2 new functions (format and modify) but it just does anything new but what DateTimeInterface already does..
15:42
@Brad We do not know where OP found that specific file data_c.php. We can guess, but we're not here to guess. So some clarification is needed here.
@deceze Yeah, we're guessing so much here that 4 people independently posted the same answer... No doubt some clarification would be nice, but I don't think this question was bad enough to be insta-closed by a mod.
@Brad the question starts with a false assumption that what was provided is the PHP source code and then asks for a clarification based on that false assumption. It doesn't make any sense as a question since the premise is just flawed. In short we can't answer how it works because this is not how it works.
@apokryfos Isn't this how almost all questions go? A misunderstanding, a false assertion, and then an answer that clarifies the original understanding. 80% of an answer to this question is the fact that what this person is looking at isn't the PHP source code.
Let me put this another way... if four of you had independently voted to close the question, that's fine. That's how this is supposed to work. That's not what happened... instead we have (in my opinion) moderator overreach on a borderline question. If it's borderline, leave it to the community to decide what to do. Moderation should be here for solving the problems that non-moderators cannot.
@Brad I understand that, and yes, with great power comes great responsibility etc. But: there was already 1 close vote, the question was rapidly collecting downvotes, and the comment(s) were/are also less than favourable. Do you really think waiting for another minute or two would have led to a different outcome here?
FYI: I casted the first (unclear) close vote, plus it's also too broad given their "how it works?". So will somebody come after me also? I feel that @deceze wasn't breaking any (mod) rules here. We have to wonder where the OP is in all this also.
15:42
@deceze Yes. People tend to dogpile. In any case, if you think that leaving the question open for a minute or two would have led to the same outcome, what's the problem with waiting to see? Worst case scenario, the question stays open for 2 minutes longer. Best case scenario, the question is updated, answered (that part happened), and the problem is solved.
@FunkFortyNiner I'm not saying he's breaking any rules, or even guidelines... just saying that such swift moderator action wasn't helpful. As for where Op is, the question was posted only a half hour ago... I wouldn't necessarily expect everyone to be able to constantly watch a question they posted. In any case, if others came by to vote to close, even if rapidly, that'd be fine in my opinion.
@Brad In addition to being a moderator, I am also a user of this site. And I use my voting powers as a user too. Yes, in unclear questions I will abstain from voting since my vote would override everyone else's. But this here seemed a pretty dry and cut case. And given the majority of the comments and the fact that there's only one reopen vote (yours I presume), I would say I'm not wrong.
I would love to try an experiment sometime... post two copies of a question that is borderline clear/unclear. Start one with a couple downvotes. Another with a couple upvotes. Perhaps yet another with moderator vote-to-close action. I think (but obviously haven't proven) that there's this dogpile effect where people see a question already downvoted and go to it specifically for that reason to go say, "yeah fuck that guy!", and downvote and pile on the comments unnecessarily.
My hypothesis then is that it is a good thing to close it ASAP, since that removes it from the active question list sooner.
The reason I think this happens is that I've gone to questions like this where there was often some literal interpretation of some poorly translated title, where people will pile on and downvote, until I come in, take the 20 seconds it takes to actually figure out what the real question is, and then comment on it as such.
Once I do that, the downvotes either slow down or stop.
I've seen this happen several times.
I have no idea if that's reality or not, but that's my perception.
There's probably something to that, but it's probably also that there's one instant where the question appears on the frontpage, bringing a wave of users in a very short time, and then it naturally dies down.
15:53
In any case, having that question open longer harms no one. I see zero benefit to having a question closed in 2 minutes, vs an hour, or even days. I think long-term cleanup is great as people tend to find things on Stack Overflow via Google. But, I see no reason on borderline questions like this to have moderator action. To me, this question was clear-cut answerable, since four people answered it (3 in comments, 1 in answer).
I would argue that "why is there no detail in the php source code" (with similarly vague question content) probably isn't going to be a useful search target for anyone in the future. Again, a little clarification, a little more detail, would do wonders here. But only OP can provide that, and unless and until they'll do, this question is probably better off not cluttering up search results. That's what closing and voting is for.

last day (15 days later) »