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

I'm not really sure why this comment is getting downvoted, but literally every single thing in that post still holds true.


No, it's not. PHP has disabled or removed the major anti-features like magic quotes, globals, URL includes and the bad mysql extension. It has a proper AST-compatible parser which removed tons of quirks, and added syntax sugar to look more normal to outsiders.

The remaining things are:

• the endless whine about inconsistent underscores in function names and haystack/needle. These are a bad look, but aren't really an obstacle to using the language (PHP devs memorize the common functions, rely on IDE or docs for the rest, and move on).

• being offended about use of backslash as the namespace separator. It really doesn't matter at all.

• old constructs and edge cases that exist, but are not used in new code.

• general upset about dynamically-typed languages, and all the consequences and compromises that dynamic typing brings.

That post is just a rant. It presents insignificant/arbitrary choices as flaws (e.g. "clone is an operator?!" — so what?). Some complaints are totally ridiculous, e.g. exceptions thrown in destructors were fatal errors, and that was bad. When the restriction has been removed, the post has been updated to complain that this is bad too, because now you can throw literally everywhere! Apparently, no matter what PHP does, it's bad.


> (PHP devs memorize the common functions..

Nope (c) Me, after 5 years on trying to but still falling back to googling every 20 minutes despite years and years of using the language.

... And just writing code without looking into docs much after a week with ruby


I'm quite shocked that a common complaint of any language is function syntax. Maybe it's been awhile since I've used PHP, but is it really worse than any other language? The problem with PHP is that, at least years ago, it had no equivalent of C's man pages. In C, you're constantly doing "man memchr" or what have you. Perl has "perldoc -f sort".

Don't get me started on Ruby, though. Wading through a tower of classes to figure out where and how some method is defined, only to much later find out it was actually created by define_method or method_missing is absolute torture. And yeah, I know the REPL can provide this info to you. The point is: source code should be obvious in how it functions. Not obscure things through cleverness.


What are you talking about? I have been using php.net/{funcname} since forever.


I didn't use PHP for 2 years and upon coming back still know most of the common functions and the ones I don't the IDE helps with, so I am not sure why you're having such issue. What functions are you using that you don't remember the names for?


Ruby does not have the best standard library, just good enough. replying to the question - basically all of them, from strrpos, str_ireplace to array_search. Also, Null, false, 0, "" etc are adding degree of chaos


An auto-completing editor is a big help when using PHP. :)


Switching to a whole nother editor to use php might be annoying to some people


Well really programmers shouldn't be using notepad.exe to write code in any language.


And on its quest towards JIT the language becomes less and less dynamically typed. strict_types=1 is already a standard in most major applications and all the cleanup that has been done already, such as count() raises an error if you try to count a non-countable variable, and many more.


If you read the article, it's full of notes about "this was fixed in 5.4" or whatever. A decent chunk of the remainder has been fixed in the 7.x series, and some of the remainder is slated to be solved in the (as of yet, unreleased) 8.0 version.

Just scrolling through at random:

> A function’s return value can’t be hinted.

But of course, this has been incorrect for years. The next was fixed in 5.3, the next two be fixed in 7.4, the next was fixed in 5.4, etc., etc. Which is fine; it's an old article, and one which was deeply influential on PHPs development, but it's completely false to suggest that "literally every single thing in that post still holds true". Many are outdated.


I agree some of it has been fixed - but definitely not all of it, or even anywhere close. Some highlights of why I wouldn't rely on PHP in my stack:

- A fair chunk of phpsadness is still unfixed - e.g. https://bugs.php.net/bug.php?id=49664 where recursing too much producing a segfault is Not A Bug.

- PHP's release machines were compromised. Let's not worry who downloaded it. http://news.php.net/php.internals/77695

- PHP 6. There's no hope of making PHP work in Unicode, ever. It's like Python 3, except half way through, they went 'let's not even bother'.

- The rebuttal elsewhere on this thread points to the very problem in the PHP community:

>> PHP’s one unique operator is @ (actually borrowed from DOS), which silences errors.

> Yup. I find it very useful on the unlink() function which will raise an error if the file you're trying to delete doesn't exist.

That just demonstrates that unlink is broken! PHP's error handling is some horrible collection of C, C++ and just spamming stderr.




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

Search: