Hacker News new | ask | show | jobs
by cleong 2992 days ago
PHP was built for the web and has been successful at that job. It is easy to use because the core developers have made some good design choices for the task at hand. For example no threads, stateless requests, core functionality focused on outputting HTML, etc.

MySql and PHP are good. They do the job they were designed for in a cost effective way and of course that means there will be trade offs.

1 comments

PHP is crap. It's actively hard to write good code in it. Not good code like SOLID or pretty code that's self documenting, it's hard to write code that's not going to break in unique and interesting ways.

Sure, you can knock up a contact form in it really quickly, but that ease of use hides significant dangers.

I've programmed it, it's a terrible language.

This might have been true 10 years ago with versions like PHP 4. But remember many companies have invested a lot into PHP including Facebook. In the newest version of PHP what you said cannot apply with a type system, OOP features like traits, class inheritance etc.