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

> It's a garbage language, and you know it. But it allows you to get something up and running, so dang quick.

PHP didn't succeed because of the "language" part. It succeeded because it was limited and focussed to just being a tool to write small web-apps in a short time.

It did one thing and did it better than anything else of the same era (I built CGI apps in C, Perl and Python before discovering PHP).

It was just files, that you ftp-d in and it just worked.

99% of the friction is in writing the first thousand lines of code and PHP meant that nearly all of those lines was business logic, not unescaping POST data or parsing GET parameters.

PHP doesn't remove your ability to think clearly. It is true that it does not provide helpful additions for algorithmic work, but it does not put challenges in your way when writing web-apps. And yet, it does not force you into too much magic about how it works - just enough abstraction for a messy coder.



I'd argue it succeeded because it didn't require you to run a server. All those cpanel lamp ISPs mean sign in and upload code.

All other solutions, java, .net, node, python, Haskell, etc require you to run and maintain your own servers. A minor exception for CGI based solutions but those were all too heavy.


I think this is the main selling point - PHP is everywhere, almost for free.


This comment just nails it. It is perfectly possible to have a well written code base in php. I don't understand whatever written in php is shit.

Some good programmers genuinely point out some of the pain points of php, but most programmers paint php as shit just to show off as a good programmer.


Most definitely you can write good code in soho like anything it is a language which you are free to write in however you like.

However Php allows for really sloppy code (not failing on index misses, undefined variables still running, each core part of the language handling errors completely differently) which unfortunately often gets pushed out when not ready because of business pressures. This often creates insurmountable technical debt later on. The amount of confuaing, messy code I've seen in PHP that would not even run on other languages is shocking. The fact it has a super easy initial learning curve but progressively harder is not a benefit on big apps it just hides how many headaches it will cause you later trying to figure out the inconsistent core library once you are trying to do more than hack WordPress templates together


> It did one thing and did it better than anything else of the same era

I would argue that it still does. It's not a great language, but to just get something working I still can't think of anything better that doesn't require lots of planning or infrastructure


Getting up and running with Python + Flask is trivially easy.

If you think it's not then there's something else going on you're not addressing...


Trivial for those who read HN perhaps.




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

Search: