Live data from Hacker News

Ask HN: What's your beef with PHP?

news.ycombinator.com

11–20 of 25 posts

Re: Ask HN: What's your beef with PHP?

#11

I've been writing PHP for over 10 years. 1) PHP is slow, uses too much memory. (I wrote the MicroMVC framework and IOSQL) 2) Makes concurrent (and especially parallel) computing hard (file locking and pcntl_fork()) 3) PHP isn't well though-out (like Javascript) so you are always second-guessing the std lib because of odd/short-sighted design choices. I moved to Go and lost nothing. However, PHP is (like Javascript) i…

What other languages are you familiar with to compare it too? Because Javascript is in no way well thought out and it doesn't do parallel computing let alone do it right, it's bound to a single core.

Re: Ask HN: What's your beef with PHP?

#13
post #11

I've been writing PHP for over 10 years. 1) PHP is slow, uses too much memory. (I wrote the MicroMVC framework and IOSQL) 2) Makes concurrent (and especially parallel) computing hard (file locking and pcntl_fork()) 3) PHP isn't well though-out (like Javascript) so you are always second-guessing the std lib because of odd/short-sighted design choices. I moved to Go and lost nothing. However, PHP is (like Javascript) i…

What other languages are you familiar with to compare it too? Because Javascript is in no way well thought out and it doesn't do parallel computing let alone do it right, it's bound to a single core.

I wonder: What in JS ist not well thought. I don't like programming JS, but compared to PHP it has many neat features and ways to get things done. It's just different from other languages.

Parallel works. You can even create a deadlock very easy. Also, Node.js can spawn new processes.

Re: Ask HN: What's your beef with PHP?

#14
My beef with PHP is all the added traffic I get on my http server. Every day I get a list php directories get request from people looking to score on some low hanging miss configured lamp box. Then on the flip side the people that do have php files miss configure they get turn into DDoS boxes against me.

Re: Ask HN: What's your beef with PHP?

#15

My beef with PHP is all the added traffic I get on my http server. Every day I get a list php directories get request from people looking to score on some low hanging miss configured lamp box. Then on the flip side the people that do have php files miss configure they get turn into DDoS boxes against me.

I've actually configured my webservers to start firewalling hosts that make requests for /admin.php, /wordpress/wp-admin/blah.php, and any other request which is destined for a PHP-file.

I don't use PHP, and these kind of bots are just too noisy to put up with.

Re: Ask HN: What's your beef with PHP?

#17
post #10

The one thing that has most frustrated me is PHP's array syntax.

Compared to what?

Compared to almost any other language I've used - it's awkward, and unnecessarily verbose because it mixes in how one would define an associative array/hashmap/object as the only way to use an array. It does not distinguish a traditional list from an associative array.

Re: Ask HN: What's your beef with PHP?

#18
If you embrace what PHP is good at, which to me is fast, easy to understand code that is dispatched once per web request in a shared nothing state, PHP is great. When you have to deal with PEAA style PHP, things start to go off the rails in both speed and simplicity.

I happen to like PHP's standard lib: it's big and addresses a lot of needs in building web apps. But you don't really see tons of new high quality bindings or libraries being introduced at the rate that, say, Go is getting them.

If someone told me I had to build a product from scratch in PHP, I would probably start here: https://github.com/exflickr/flamework/blob/master/docs/philo...

Re: Ask HN: What's your beef with PHP?

#19
post #17

Earlier quoted context omitted.

Compared to what?

Compared to almost any other language I've used - it's awkward, and unnecessarily verbose because it mixes in how one would define an associative array/hashmap/object as the only way to use an array. It does not distinguish a traditional list from an associative array.

But you specifically said its array syntax is annoying.

What is "annoying" about:

    ["foo", $bar, BAZ, 1, 2, 3]

Re: Ask HN: What's your beef with PHP?

#20
post #11

I've been writing PHP for over 10 years. 1) PHP is slow, uses too much memory. (I wrote the MicroMVC framework and IOSQL) 2) Makes concurrent (and especially parallel) computing hard (file locking and pcntl_fork()) 3) PHP isn't well though-out (like Javascript) so you are always second-guessing the std lib because of odd/short-sighted design choices. I moved to Go and lost nothing. However, PHP is (like Javascript) i…

What other languages are you familiar with to compare it too? Because Javascript is in no way well thought out and it doesn't do parallel computing let alone do it right, it's bound to a single core.

I didn't mean that javascript had parallel computing, but that it would get it. I know both PHP and Javascript will get it. Because they have the user-base, they will have the features. (Though I don't expect it until the end of EC6-7 and about PHP 10.)

My languages mostly are C-based Bash, Python, Lua, Objective-c, Javascript (EC5), Go, etc...

Post reply on HN