On Tue, Mar 24, 2026, at 8:02 PM, hao qin wrote:
> Hi internals,
>
> I’m a developer who uses both Java and PHP regularly, and I’m writing 
> because I care deeply about PHP’s future.
>
> I’ve been following the language’s evolution closely, especially since 
> PHP 7 and PHP 8. I’ve noticed a growing trend of adding features that 
> feel very "enterprise-oriented" — such as typed properties, attributes, 
> and property hooks. While I understand the value of these features in 
> certain contexts, I can’t help but wonder: is PHP intentionally 
> following Java’s path?
>
> I ask this not as criticism, but out of genuine curiosity about the 
> language’s direction. PHP’s traditional strength has been simplicity, 
> pragmatism, and being web-native. Java, on the other hand, excels in 
> large-scale enterprise ecosystems with strong type safety and tooling.
>
> From a developer’s perspective, when I see PHP adding more Java-like 
> features, it makes me question whether the goal is to compete with Java 
> in the enterprise space — or if these additions are meant to solve 
> specific problems without changing PHP’s core identity.
>
> I’d really appreciate it if you could share some insight into how the 
> internals team views this balance. Is there a conscious effort to avoid 
> making PHP feel like "Java for the web"? Or is the thinking that these 
> features are simply useful tools, regardless of where they originate?
>
> Thank you for all the hard work you put into maintaining and evolving 
> PHP. I’m looking forward to understanding more about where the language 
> is headed.
>
> Best regards,
> [haoqin]

Did you just post an almost-identical thread the other day?  Because the above 
looks like it's largely quoting from the other post.

But to the point, PHP doesn't have a formal "direction."  There is no roadmap.  
It's just a bunch of people throwing stuff at the wall to see what sticks.  One 
could argue (and we frequently do) whether that's a good or bad approach, but 
it is the current approach.

In most cases, RFCs are designed to "scratch an itch."  Sometimes that itch is 
larger or more abstract than others, but it's generally always "this would make 
the author's life easier in some way."  And if it passes, it's because enough 
other people agree.

There is no coordinated plan to "imitate Java."  But neither is there a 
coordinated plan to avoid Java.  PHP is like English: It evolves by beating up 
other languages in dark alleys and going through their pockets for loose 
syntax.  If we find an idea in C# that seems like it would work well in PHP, we 
steal it.  If we find an idea in Kotlin, we steal it.  If we find it in 
TypeScript, we steal it.  If we find it in Ruby, we steal it.  If we find it in 
F#, we steal it.  PHP is an equal-opportunity language-feature-thief.  Other 
ideas are indeed home-grown in PHP, like the upcoming Partial Function 
Application syntax, which AFAIK is unique to PHP.

People always seem to compare to Java when making this kind of comment, which I 
find... very odd.  Java was one of the first popular OOP languages, but OOP is 
a lot more than just Java.  And it's not even the most-featured language by a 
long shot at the moment.  Hell, Javascript is more popular (because web).  So 
why is it any time someone objects to adding new features, it's always "making 
PHP more like Java"?  Why not "more like Kotlin" (which is where we borrowed 
the property hooks syntax from)?  Or more like Swift (where the asymmetric 
visibility syntax came from)?  Or more like OCAML (where the pipe operator came 
from)?  Or more like Rust (which is our long-term goal for enums and ATDs)?

As I said, we're an equal opportunity language-feature-thief.

--Larry Garfield

Reply via email to