Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Python docs are way better on a technical level IMO (more detailed, more accurate - if you want to know what a function does in PHP you need to spend hours reading through the massive comment threads to find the corrections, and then ignore the comments from years ago since the API changed and the comments didn't, etc etc); but much like the rest of PHP, the PHP docs are incredibly convenient - php.net/function_name will go direct to the docs for that function if it's unique, or search for function_name in all libraries if not.

This is really useful when your standard library is an incredible cockup of str_pos vs strpos vs string_pos vs sposition vs StrLib::Position vs ($haystack, $needle) vs ($needle, $haystack) - it means you only need to spend a few seconds double-checking the docs every time you use a standard library function.

Sure, a library which was consistent and thus needed no lookups at all would be better, but if you abandon all hope of making sense of it and understand that you'll need to use the documentation several times per line of code, the convenience of the docs makes it not quite so painful.



No serious PHP developer actually go to php.net to read the documentation, literally all of the big PHP editors/IDEs come with an embedded manual so when you write strpos( it automatically tells you the order of variables.

If I really had to go to php.net to look up order of variables or even a function name then I wouldn't be programming in PHP at all, would take too long. Thankfully, since I'm not restricted to notepad I don't have to worry about this aspect.


You're basically saying that no serious PHP developers are using, say, VIM or Sublime Text, which is not true. I still hit php.net from time to time.


Yeah, this is me too. I haven't done much PHP in the past year, but when I did, PHP.net was ALWAYS open in a tab or two. There was NO WAY you were gonna get me to use some bloated nasty Java based editor just to have code completion. Honestly though, Stackoverflow is my goto point if I want the better parts of php documentation comments. An answer with 7 or more votes is worth taking a look at.


Then you are needlessly torturing yourself, if that's your thing then go ahead, but yeah I'm being blunt and calling that stupid.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: