Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130450 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 6A0291A00BC for ; Wed, 25 Mar 2026 14:30:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1774449033; bh=malSOpyyD16FIkXWjxudLfZLsuq7WgJvVwd8r5fL0jA=; h=Date:From:To:In-Reply-To:References:Subject:From; b=FN8yirbJ7CKQbQ+uHnlTQk9VcicXiYXPrnSprxcmp59LBdhhvi0U13TvbzfHT2hXR 2Ec5VrAIKieWUil/n+7DUGorHmCy0Vpl/KbMgdOoYwKuTl3/0CNo5MZfgnlsUITD9n y592t2wUR/EqyX0o64GJnyilXlrFFNpY1Jhpx2p5cRDo+6iMCekK/LU6EVtYMoc3FL q3XobAp4uqMIcI5m0udytGjvpt7c/Zd8sgV8OcgCJ+GbVeYTLIbObN5Gr0mJpC5WFL Iu4WmxEm/oPB4CnWTkM69DHQqeAnUReVZmlptSo3pIs2ofuHsU8G+sCn1k6S5yT18i GtGrXciPXXLnQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0FA63180062 for ; Wed, 25 Mar 2026 14:30:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-a5-smtp.messagingengine.com (fhigh-a5-smtp.messagingengine.com [103.168.172.156]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 25 Mar 2026 14:30:32 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id A7508140022F for ; Wed, 25 Mar 2026 10:30:26 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-04.internal (MEProxy); Wed, 25 Mar 2026 10:30:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm1; t=1774449026; x=1774535426; bh=uxQgyseao9O8xFTD25qDz F6XxOb/R35fwMS8v3cX7SQ=; b=WcRHWh0eXNfJYhgWhuM6MCQDYMoaDpr72r4sj opaPQ4v7bFaGsZ9KypF9hHRYdVTDNnr3Vma/OyhYWC+iaVWncJo2uRj2nz98SbkW LupODobYmZU9BdyF5kPoTzE3vxyOwq893FyqcflTnAIEGpbaE/66vPlLxkY3WM+S sRUEWkxxiNHhK7KTshtwlsjvApHPSyUMUMH9G22cSvIPnktzw7gUC+/hdgW49jC2 IHOKSj5Wz/gNUWUzbdhHEC2Pmpw2i4yb728P5h7cx37MNTwoF6iJj+jF1h7hPw57 wDEnUuEiLMbQlW7l4/l6m0IC6FKzylR4MoUGqb6sOL4xsj5sg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1774449026; x=1774535426; bh=u xQgyseao9O8xFTD25qDzF6XxOb/R35fwMS8v3cX7SQ=; b=T2oES8YM7UivRBu3m sopa7rZQ/6ax636FeEFz8dR756L7IRtIUqF2CJLqgoxCpV4sqi71fUhddRxnLx/4 y61DCnbOeb2MM8/Dt8OE6CxDqS6WsOOPdTmGktguwX1tMYWBdG7fZtDcCVN5I3Cz tMDvYRck9uheq328W5rrQLfB0C8+GjH5hFn3HZTbCdX1GQB4svd0GON825rugfgw fN2VnedSGXnyVUxBOSmut7Rt1le0Khd4cbhuV8j5+EeXZYfX9AmmNvK3xa55KI1E 5rCiQOT8Q8Irg4B/jcOjL7Z+Rv3Vt6ASQzU0hry2SxDhdbPylC6oJ7ZgYrZCRPzX ZiuFg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdefvdegjedtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvffkjghfufgtgfesthhqredtredtjeenucfhrhhomhepfdfnrghrrhih ucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhmqe enucggtffrrghtthgvrhhnpeffieeivdfhvdeguddttdegteeiueegvefhteehfeeffeet udeitdehtdegjeeuieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomhdpnhgspghrtghp thhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepihhnthgvrhhnrghlsh eslhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id B342C700065; Wed, 25 Mar 2026 10:30:25 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 X-ThreadId: Ab9VLDEDI133 Date: Wed, 25 Mar 2026 09:30:05 -0500 To: "php internals" Message-ID: In-Reply-To: References: Subject: =?UTF-8?Q?Re:_[PHP-DEV]_Is_PHP_intentionally_following_Java=E2=80=99s_pa?= =?UTF-8?Q?th=3F?= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: larry@garfieldtech.com ("Larry Garfield") On Tue, Mar 24, 2026, at 8:02 PM, hao qin wrote: > Hi internals, > > I=E2=80=99m a developer who uses both Java and PHP regularly, and I=E2= =80=99m writing=20 > because I care deeply about PHP=E2=80=99s future. > > I=E2=80=99ve been following the language=E2=80=99s evolution closely, = especially since=20 > PHP 7 and PHP 8. I=E2=80=99ve noticed a growing trend of adding featur= es that=20 > feel very "enterprise-oriented" =E2=80=94 such as typed properties, at= tributes,=20 > and property hooks. While I understand the value of these features in=20 > certain contexts, I can=E2=80=99t help but wonder: is PHP intentionall= y=20 > following Java=E2=80=99s path? > > I ask this not as criticism, but out of genuine curiosity about the=20 > language=E2=80=99s direction. PHP=E2=80=99s traditional strength has b= een simplicity,=20 > pragmatism, and being web-native. Java, on the other hand, excels in=20 > large-scale enterprise ecosystems with strong type safety and tooling. > > From a developer=E2=80=99s perspective, when I see PHP adding more Jav= a-like=20 > features, it makes me question whether the goal is to compete with Jav= a=20 > in the enterprise space =E2=80=94 or if these additions are meant to s= olve=20 > specific problems without changing PHP=E2=80=99s core identity. > > I=E2=80=99d really appreciate it if you could share some insight into = how the=20 > internals team views this balance. Is there a conscious effort to avoi= d=20 > making PHP feel like "Java for the web"? Or is the thinking that these=20 > features are simply useful tools, regardless of where they originate? > > Thank you for all the hard work you put into maintaining and evolving=20 > PHP. I=E2=80=99m looking forward to understanding more about where the= language=20 > 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 ro= admap. It's just a bunch of people throwing stuff at the wall to see wh= at 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 i= tch is larger or more abstract than others, but it's generally always "t= his 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 beat= ing up other languages in dark alleys and going through their pockets fo= r 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. I= f we find it in TypeScript, we steal it. If we find it in Ruby, we stea= l it. If we find it in F#, we steal it. PHP is an equal-opportunity la= nguage-feature-thief. Other ideas are indeed home-grown in PHP, like th= e 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 languag= es, but OOP is a lot more than just Java. And it's not even the most-fe= atured 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 li= ke 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 R= ust (which is our long-term goal for enums and ATDs)? As I said, we're an equal opportunity language-feature-thief. --Larry Garfield