Live data from Hacker News

Ask HN: Why no love for PHP?

news.ycombinator.com

11–20 of 150 posts

Re: Ask HN: Why no love for PHP?

#11
In the past I've purposefully avoided submitting articles to Hacker News if they were about PHP. I kind of just assumed that they would be downvoted just for being PHP. I wonder if I'm alone in that?

Edit: fixed a typo.

Re: Ask HN: Why no love for PHP?

#12
I'd love to see more PHP on HN (I am here to learn, primarily, and PHP is what I do), but the problem seems to lie in there being a lack of quality PHP articles. Maybe I'm being unfair, but just lately I've been getting the impression that the more someone knows, the less likely they are to share.

Re: Ask HN: Why no love for PHP?

#13

In the past I've purposefully avoided submitting articles to Hacker News if they were about PHP. I kind of just assumed that they would be downvoted just for being PHP. I wonder if I'm alone in that? Edit: fixed a typo.

You can't downvote articles (only flag them)?

Re: Ask HN: Why no love for PHP?

#14

I have often thought the same thing as PHP is a fantastic web development language, and it is very well developed. The documentation is very good, and as you mentioned there are useful code examples right in the documentation. The learning curve for PHP is very low, and there is library support for pretty much anything you want to do. Oh, and it is dead simple to deploy. I think RoR is one large reason why PHP is loo…

WHat would you recommend for getting into Ruby? I tried it once but their site is horrible and the "Hello World" example is really babyish and idiotic - and it put me off :)

I've never "got" RoR. Python makes sense to me as a killer all-purpose language just as PHP makes sense to me as a niche for-the-web language (I cant get these people that insist on running PHP standalone :o). But I never quite figured the rails niche.

Re: Ask HN: Why no love for PHP?

#15
One of the things that I think is relevant to startups hiring is that (warning experience mixed with opinion ahead) there are lots and lots of PHP developers of wildly varying quality. This makes the initial stages of recruitment time consuming. By looking for people with skills or interest in Ruby, Python or Scala (or whatever is hot that month) you'll probably see less interest but, on average, the quality and enthusiasm will probably be greater. Which means it takes less time to hire (well, maybe), as well as getting the better people (hopefully).

Re: Ask HN: Why no love for PHP?

#16
post #12

I'd love to see more PHP on HN (I am here to learn, primarily, and PHP is what I do), but the problem seems to lie in there being a lack of quality PHP articles. Maybe I'm being unfair, but just lately I've been getting the impression that the more someone knows, the less likely they are to share.

I follow the Zend Developer Zone (http://devzone.zend.com/public/view) and find that an interesting article pops up every now and then. I've added a few developer blogs to my feed reader from articles that I discovered there.

Re: Ask HN: Why no love for PHP?

#17
I've been using PHP at work and on personal projects for years. It has a very low "barrier for entry", which is both good and bad. It's easy/cheap to hire entry level programmers to write simple PHP, but it's all too easy to let them jump into big projects too soon and write something that turns into a huge mess. Well written PHP code can be just as easy to read as Python/Ruby/etc., but PHP makes it far too easy to write something that is a horrible mess.

At work we are still mostly a PHP shop, but anything I write on my own now gets done in Python. PHP's complete lack of a coherent function naming scheme is enough reason alone to get away from it.

Re: Ask HN: Why no love for PHP?

#18

PHP has a few downsides, everything from poor naming conventions to security vulnerabilities. People around these parts are always looking for the cleanest solutions to their problems and the latest methods available. PHP's relative age and problems make it neither. That said, I coded my first startup in PHP. It's dead simple to make a dynamic web page with PHP, but it's also dead simple to create a huge mess. In tha…

I agree with more or less with what you said but a downside of PHP is not security vulnerabilities, that's really just a myth. I can't remember the last vulnerability which could be directly attributed to PHP as a language. Sure, there are plenty of apps containing holes but those are not caused by PHP but by not coding correctly, eg not checking input making SQL injections possible etc. Which might confirm what you…

The security issues mostly come from the community; PHP is branded as a language that's easy to learn, and in that same spirit, a lot of the examples offered by the manual and by people trying to teach others are horribly insecure.

I think nearly every SQL example, for instance, totally ignores the concept of SQL injection.

Re: Ask HN: Why no love for PHP?

#19
post #4

It reminds me of Perl. Perl literally gave me a headache last time I coded in it. (Incidentally, this is why I'm wary of Ruby as well.) Besides, I am totally satisfied with Python.

I don't see too much similarity between Perl and PHP. Perl has a the syntax of a loose cannon. PHP's syntax is very Java like.

* PHP doesn't have special variables that change things about the language like, the starting index of an array.

* Out of the box, Perl requires you to import modules to get functionality that PHP has with a simple function call.

* Perl has support for classes, but you feel like it's a hack every time you write one.

* PHP has classes, that give you the notion that they are part of the language (which they are of course, so are Perl's)

Until recently, I hadn't programmed in Perl in years, but I find that coming back to it again has given me a new outlook on it. You might wanna take another look. I still much prefer Python though.

Re: Ask HN: Why no love for PHP?

#20
PHP doesn't get mentioned, because it isn't interesting. I've done a lot of PHP work, and still do. But there's not a lot of NEW going on in the PHP world. Their latest earth shattering move is namespaces. The only interesting thing about PHP's namespace support is how awful it is.

Almost all of the cool concurrency, natural language, efficiency, functional programming, and what-have-you research and development, is going on outside of the PHP community. Those are topics that HN collectively finds interesting, so PHP gets left out.

That said, just because PHP itself isn't particularly interesting, doesn't mean people don't build interesting things using it, and doesn't mean you shouldn't use it.

Post reply on HN