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

I don’t get that feeling. And I like that people are doing their best to try to improve the reputation of the language. The reality is that modern php is very decent, but a lot of people that have never used it or have used a very old version mock or look down upon it for no apparent reason.

It’s important to try to improve the reputation so that it gets new developers interested in it in order for the language to keep being relevant.

If you want a concrete reason why I think php is great and has many things that are very useful compared to its competition:

Extensive native support for classes and types.

Php does class-based OO better than its competition (JavaScript, python).

Designing a traditional object oriented system using classes and interfaces is better in PHP than in JavaScript and python, if we limit ourselves to the native features of the language.

For example, you cannot define a native interface or an abstract class in python or JavaScript. JavaScript classes, since they’re just syntactic sugar, have a lot of unexpected behavior.

In python you have to accept the this/self object in every method definition.

Here are a couple of links about php classes, interfaces and types for anyone interested:

https://www.php.net/manual/en/language.oop5.variance.php

https://www.php.net/manual/en/language.oop5.interfaces.php



You just prove my point... you start your post with something that reads like "it's decent now, please look at PHP again". But:

    - you make bold claims about PHP OO
    - you make downright false points about other languages
    - you nitpick things that are non-issues in other languages
All in all, nothing in your post really seals the deal about PHP. It's not about mocking or looking down on PHP for no apparent reason. I'm pretty sure most of us on HN have used it already and most of us have followed its development. I sure did. And every time a new version comes out, I welcome the improvements although it's just mostly catching up with the competition. So what compelling reason do I have to use it again in 2023 for greenfield projects ? None. It used to be "the web specialist", but now all platforms have great web frameworks along their distinctive features.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: