What's New in PHP 8.6

(php.net)

215 points by netol8 hours ago

27 comments

  • yabones3 hours ago
    Appears the big scary vulnerability that was announced recently is in 8.5+, so definitely upgrade your stuff if you&#x27;re on a new version... For the rest of us in &quot;debian land&quot; running 8.3-8.4, looks like there&#x27;s nothing to worry about for now.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;php&#x2F;php-src&#x2F;security&#x2F;advisories&#x2F;GHSA-8mjj-2r7p-4hg2" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;php&#x2F;php-src&#x2F;security&#x2F;advisories&#x2F;GHSA-8mjj...</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;php&#x2F;php-src&#x2F;security&#x2F;advisories&#x2F;GHSA-2fjv-p558-g82m" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;php&#x2F;php-src&#x2F;security&#x2F;advisories&#x2F;GHSA-2fjv...</a><p>The other Critical CVE looks very very difficult to actually exploit, since it has to do with a very specific configuration during startup.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;php&#x2F;php-src&#x2F;security&#x2F;advisories&#x2F;GHSA-gr4f-wgx5-jpfv" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;php&#x2F;php-src&#x2F;security&#x2F;advisories&#x2F;GHSA-gr4f...</a>
    • burnte1 hour ago
      This comment saved me an hour of searching and reading. Thank you!
  • beberlei8 hours ago
    Most excited about the ZTS overhead reduction. If you are unfamiliar PHP can run either with or without thread safety (think using pthreads in PHP requests).<p>If the overhead can be further reduced (and people have ideas) then it could be that we only need ZTS mode anymore in the future and that can open up one avenue for PHP to get native async support similar to the existing parallel extension: <a href="https:&#x2F;&#x2F;github.com&#x2F;krakjoe&#x2F;parallel" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;krakjoe&#x2F;parallel</a><p>More &quot;hands-on&quot; is the stream error handling improvements. This greatly improves the old file stream APIs to now allow throwing exceptions instead of returning false on errors:<p><pre><code> $context = stream_context_create([ &#x27;stream&#x27; =&gt; [ &#x27;error_mode&#x27; =&gt; StreamErrorMode::Exception, ], ]); try { $config = file_get_contents(&#x27;&#x2F;etc&#x2F;app&#x2F;config.json&#x27;, context: $context); } catch (StreamException $e) { &#x2F;&#x2F; handle error }</code></pre>
    • jmyeet4 hours ago
      Spawning threads in PHP is a mistake. The beauty of PHP is that a given request is single-threaded. Any IO&#x2F;network bound calls allow off-thread code within that same async-await model. If you want to spawn threads, put it in an extension.
    • gertop1 hour ago
      Async is about IO, you can already do that in PHP with generators.<p>Instead of let x = await func(); it&#x27;s $x = yield from func();<p>Also ZTS is more about running in threaded servers like Apache worker or IIS, it&#x27;s not about user threads.
    • calvinmorrison6 hours ago
      That&#x27;s certainly a use case but I worry async opens the door for all the non PHP to come on in
  • p4bl03 hours ago
    I&#x27;m a bit sad that there&#x27;s still no way to limit the number of arguments of a user-defined function in the type system. The internal functions have that.<p>I know that introducing such a behavior by default could break existing code, but it seems relatively easy to introduce this feature in a backward compatible way by using the void type. For example :<p><pre><code> function foo (void) {} foo(42); &#x2F;&#x2F; fatal error: foo() expects exactly 0 arguments, 1 given function bar ($a, $b, void) {} bar(1, 2, 3); &#x2F;&#x2F; fatal error: bar() expects exactly 2 arguments, 3 given function baz ($a, $b=null, void) {} baz(1, 2, 3); &#x2F;&#x2F; fatal error: baz() expects at most 2 arguments, 3 given</code></pre>
  • nticompass4 hours ago
    I &#x2F;finally&#x2F; just upgraded our PHP app from 7.4 to 8.3 (totally not just because of the PHP vulnerabilities). I can&#x27;t wait to jump to 8.5, so I can use the pipe (`|&gt;`) operator.<p>I&#x27;d love to upgrade to 8.6 so I can use function partials!
    • noir_lord4 hours ago
      `|&gt;` without PFA frequently ends up with longer code and isn&#x27;t pretty because of the need to handle the first arg not been the one you want via closures which works but isn&#x27;t really any better than just nesting them, so if I where you upgrading I&#x27;d get to 8.6 first and then start using pipes since you get both parts in that release.<p>It was a smart decision to roll it out incrementally but it did create a weird gap there for a little bit <i>but</i> they did <i>do it</i> so kudos to the team.
    • asimovDev3 hours ago
      a lot of stuff will require changes when jumping from 8.3 to 8.4 and above. Don&#x27;t forget to use Rector[0] if you haven&#x27;t already. Helped me tremendously when going 7.4 &gt; 8.4<p>0 - <a href="https:&#x2F;&#x2F;getrector.com" rel="nofollow">https:&#x2F;&#x2F;getrector.com</a>
      • nticompass3 hours ago
        Rector is great! It&#x27;s what I used to help migrate from PHP 7.4 to 8.3. I did still have to manually fix things and there was one spot where Rector broke the code, but I don&#x27;t know what I&#x27;d&#x27;ve done without it.
  • petecooper3 hours ago
    Source tagged:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;php&#x2F;php-src&#x2F;releases&#x2F;tag&#x2F;php-8.6.0" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;php&#x2F;php-src&#x2F;releases&#x2F;tag&#x2F;php-8.6.0</a>
  • williamdclt3 hours ago
    I can&#x27;t make up my mind on FPA. On the one hand it&#x27;s very elegant and I always feel like I need it when writing code, on the other hand it makes a function declaration look reaaaaally close to a function invocation, which is super confusing
    • jmyeet3 hours ago
      So there are two potential problems being addressed by this.<p>1. The chosen example is for PHP versions. That might just be the example but this sort of thing is a real problem. Personally I prefer something like the polyfill method as seen in Javascript where possible. Python has to deal with this too since it seems like every 3.x release now makes breaking changes. That might be just be their trivial example; or<p>2. Closures. Looking at the linked doc that seems to be a use case. PHP suffers here (IMHO) from having a really poor type system. Having closure arguments as question marks seems... inelegant. I&#x27;d really prefer to be able to type those and also know that the variable I have itself is a callable of some kind. I always point to the Hack type system as a comparison here.<p>So I dislike the name &quot;partial function arguments&quot; because it&#x27;s unclear what the purpose is. If they&#x27;re closures, call them closures. If PHP&#x27;s PFA&#x27;s can&#x27;t bind variables (I didn&#x27;t look into whether they could or not, call them something else?<p>The word &quot;partial&quot; here is really what I&#x27;m having issue with. I&#x27;m reminded of partial classes from C#, which solved a problem of creating part of a class from, say, a config file. The first example I saw was WPF using XML to define UI elements where the framework compiled the XML into partial classes and you had to fill out the rest for it to compile. I guess it&#x27;s a bit like declaring a header and then failing to link an implementation (in the C&#x2F;C++ world).
  • kijin7 hours ago
    Before you all get excited about the new version, patch the old version you&#x27;re running now!<p>The PHP team announced that they&#x27;re going to release a critical fix between 14:00 and 14:30 UTC today. Doesn&#x27;t say whether 8.6 is affected too, but the vulnerability is probably at the top of their mind right now -- even more so than the 8.6 release.
    • TimWolla7 hours ago
      The PHP 8.6.0 stable release will include the fixes for all applicable vulnerabilities.
      • Joel_Mckay4 hours ago
        And add a few more unknown CVE, as perpetual Beta and DevOps culture does by design.<p>The old approach of out-pacing adversaries though mutation rates is over, given an entire FOSS code-audit looking&#x2F;fuzzing for 0-days can now be done in under a day. In retrospect, over 700 reported LPE and 280 kernel CVE were dropped in the past 3 months from &quot;LLM&quot;. This is not going to stop anytime soon.<p>To be honest, its very nostalgic as kids would clown each others servers in the early days. Ultimately leading to a more robust OS for everyone. =3
    • beberlei7 hours ago
      There are two separate teams handling both, the Release Managers and website team do PHP 8.6 and the Security team works on the vulnerability. :)
    • 40four5 hours ago
      <i>”These releases are part of PHP’s regular four-week release cycle and will address security“</i><p>So I’m not sure what you mean by “before you get excited”? This is their normal release cycle, not some new emergency patch release. Although based on recent events, I see how this could be confused.
      • bnycum3 hours ago
        The notes say &quot;The highest severity is CRITICAL.... Users are strongly encouraged to prepare to upgrade promptly once the releases become available. Technical details and fixed version numbers will be published alongside the releases.&quot;<p>I&#x27;d say this sounds pretty serious.
        • 40four2 hours ago
          No doubt, I’m sure they are indeed “critical”, my point is that this is part of the regular cadence of maintenance releases. Every PHP server SHOULD upgrade. But that’s no different than any other language, when a security&#x2F; maintenance release comes out, you upgrade.<p>The parent comment seemed to be mistaking this for another unplanned security release like we had recently for the 2 RCE vulnerabilities.
    • faangguyindia7 hours ago
      we run serverpilot, it auto patches our php server.
    • PetahNZ7 hours ago
      Link to this?
      • moebrowne6 hours ago
        <a href="https:&#x2F;&#x2F;www.php.net&#x2F;archive&#x2F;2026.php#2026-11-18-1" rel="nofollow">https:&#x2F;&#x2F;www.php.net&#x2F;archive&#x2F;2026.php#2026-11-18-1</a>
        • 40four5 hours ago
          <i>”These releases are part of PHP’s regular four-week release cycle and will address security”</i>
      • r7217 hours ago
        <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=50550111">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=50550111</a>
    • 13176 hours ago
      another one?
  • m4rtink4 hours ago
    CVEs!
  • jmyeet3 hours ago
    I&#x27;m honestly disappointed at the number of snark comments on HN about PHP. It&#x27;s like posting 2007 memes. Yes, we all know the story of htmlspecialchars(). We can make fun of &quot;global&quot; when we don&#x27;t realize &quot;global&quot; actually means &quot;request scoped&quot;. We get it.<p>I&#x27;ve always viewed PHP as having these ideal features:<p>1. A stateless functional core. It&#x27;s cheap to run and quick to start. Compare this to Java or even Python. There&#x27;s no loading a bunch of class libraries;<p>2. Every request has an environment created then torn down. That means it&#x27;s hard for a given request handler to leak memory or other resources. You compare this to, say, Java&#x27;s servlet API (which only really existed because the startup costs were too high) where resource leaking is a real problem and then you get into GC and STW pauses; and<p>3. Every request is single-threaded. This is ideal. Async network&#x2F;IO requests are handled via extensions. You should never need to spawn a thread in a request handler directly. You eliminate a whole class of bugs by doing this.<p>Is PHP perfect? No. The class separator as the backslash still offends me more than a decade later. I really wish Facebook&#x27;s Hack had become PHP because it&#x27;s got a vastly better type system, core collection classes (list, vec, dict) and it did things a decade ago that PHP is only added with this release (eg polling).<p>As for partial functions, the use case seems to be versioning? I actually prefer the Javascript polyfill method here where possible. Don&#x27;t make users care about this kind of stuff.
    • idoubtit2 hours ago
      My main worry with PHP is that its surface constantly grows. This means the language is<p>1. more complex to use (it took years for some parsers to implement the PHP 8.4 property hooks, and I suppose few people can explain how they work with inheritance and traits), 2. more costly to maintain (I remember when the developer of PHP&#x27;s JIT left, the PHP foundation was worried because no one could understand the JIT code), 3. and has more security risks (critical security releases will continue).<p>I don&#x27;t disagree with you, but the situation is more nuanced, and PHP&#x27;s initial promises are now blurred.<p>&gt; 1. A stateless functional core. It&#x27;s cheap to run and quick to start.<p>Most modern codebases use a framework. And once you have to load Wordpress, Drupal, or even worse, Laravel, then it&#x27;s no longer cheap and quick. So PHP added several layers of complexity to mitigate this: an opcode cache, a code-preload system...<p>&gt; 2. Every request has an environment created then torn down.<p>That&#x27;s no longer always true. When the code preload is enabled, a request can leak into another.<p>&gt; 3. Every request is single-threaded. [...] Async network&#x2F;IO requests are handled via extensions.<p>You mixing up two different things. The default PHP SAPIs have single-threaded request handlers (though IIRC the default deploy stack of Laravel differs). But the language has a native async feature through Fibers, from which coroutines can be implemented (see amphp&#x2F;amp).<p>So PHP on the server side is usually like JS on the client side (except for workers): single-threaded with async. Though I haven&#x27;t seen much use of Fibers in the wild, it&#x27;s in the language.
      • moebrowne2 hours ago
        &gt; once you have to load Wordpress, Drupal, or even worse, Laravel, then it&#x27;s no longer cheap and quick<p>The frameworks aren&#x27;t slow: <a href="https:&#x2F;&#x2F;tideways.com&#x2F;profiler&#x2F;blog&#x2F;php-benchmarks-8.6-vs-8.5-8.4-and-7.4" rel="nofollow">https:&#x2F;&#x2F;tideways.com&#x2F;profiler&#x2F;blog&#x2F;php-benchmarks-8.6-vs-8.5...</a>
      • ape42 hours ago
        It would be nice if you could request that unused parts be disabled. Maybe in the first line of your file.
    • ryangittins3 hours ago
      As they say, there are two kind of programming languages: the ones people complain about and the ones no one uses!
  • trippsydrippsy6 hours ago
    [dead]
  • vdanielpop7 hours ago
    Can we not have animations that slow down my scroll on these kinds of pages? It&#x27;s so pointless.<p>Edit: Thank you for pointing out the `prefers-reduced-motion` media feature, I did not have that enabled.
    • PetahNZ7 hours ago
      I didn&#x27;t notice any animations?
      • TimWolla7 hours ago
        The page respects the `prefers-reduced-motion` media feature [1]. You might have enabled that preference.<p>[1] <a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;CSS&#x2F;Reference&#x2F;At-rules&#x2F;@media&#x2F;prefers-reduced-motion" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;CSS&#x2F;Reference&#x2F;A...</a>
        • gregoriol5 hours ago
          Designers should not design things that users want to disable
          • Timon35 hours ago
            The vast majority of people prefer animations. If everything got left out that anyone wants to disable, we&#x27;d be left with `return 0`, if even that.
            • mrob5 hours ago
              The vast majority of <i>designers</i> prefer animations. Without animations, there would be less jobs for designers. But I haven&#x27;t seen any evidence that ordinary people prefer animations. Most ordinary people aren&#x27;t even aware that it&#x27;s possible to turn animations off, because the designers make this difficult.
              • jasonlotito4 hours ago
                &gt; But I haven&#x27;t seen any evidence that ordinary people prefer animations.<p>There are mountains of evidence supporting the idea that people prefer animated UIs over static UIs going back decades. This is true even in the world of TUIs, again, going back decades. I genuinely don&#x27;t understand how you can make this statement so confidently.
                • simondotau3 hours ago
                  Maybe if the question is “hey was that fancy animation really cool?”<p>Animation, used judiciously to communicate valuable information about the UX, is good. Most of the rest is only tolerable so long as it doesn’t slow anything down or change how scrolling works.
                  • mrob3 hours ago
                    A UI should be reactive rather than proactive. Any state changes should be explicitly requested by the user, who naturally knows what they requested, making &quot;informative&quot; animations redundant.<p>However, there is one legitimate use for UI animations: making it easier for spectators to follow what&#x27;s happening. Spectators aren&#x27;t the ones making the requests, so they can be confused if things happen too fast. Most computer use is not done for the benefit of spectators, so animations should be disabled by default, but it&#x27;s beneficial to have the option of enabling them.
                • edoceo4 hours ago
                  Where can I find this evidence?
                  • stronglikedan2 hours ago
                    Asking this in the age of AI says a lot...
            • nchmy3 hours ago
              i despise most animations. Its only something that &quot;product people&quot; want
  • zsoltkacsandi7 hours ago
    I know there were many &quot;PHP is dead&quot; posts in the past, but I think PHP now is really is declining.<p>I started my career as a PHP developer, it was a popular language especially in web development and at web agencies, and the main reason was that it was relatively cheap to employ PHP devs.<p>Now with LLMs it is similarly cheap (if not cheaper) to write code in Go, Rust, or any performant languages that are much more sophisticated than PHP and have many other benefits. I don&#x27;t see any reason anymore to start any new project in PHP.<p>Other than that this &quot;borrow every single feature from other languages and add it to PHP&quot; strategy is not really a good direction IMO.
    • ExtremelyFat7 hours ago
      None of those languages allow me to edit files directly via (S)FTP and see the changes go live within 2 seconds.
      • throw12345678915 hours ago
        For good reasons.
      • slopinthebag7 hours ago
        sure they do, i’ve implemented script-based handlers in go, rust, etc!
      • phplovesong6 hours ago
        Flashback to the 90s!
      • fabioborellini6 hours ago
        The real PHP way is actually ssh&#x27;ing to the server and editing with nano
        • minierpthrowawa2 hours ago
          I have a small saas for construction companies. I run it on shared hosting with Cpanel. I have logged into namecheap, opened cpanel, gone to file browser, opened a php file via the file browser text editor, and fixed bugs in front of customers live. Only once did I forget to implement that same change on my actual official copy on my office computer.<p>There’s different skill levels out there. But if you can sell, you can still make a living with unsophisticated code and practices.
      • evilduck3 hours ago
        Yeah, because we all realized that&#x27;s a cause of trouble and pain and is not a feature to laud.
    • cutler6 hours ago
      Until another language reproduces the whole WordPress, Drupal, Magento, Moodle etc ecosystems PHP isn&#x27;t going away.
      • cbeach6 hours ago
        Are those ecosystems so important these days? They&#x27;re mostly for human developer re-usability and ergonomics, right?<p>When I asked Claude to create a simple online shop the other day, I suggested it use an open source shop framework. Claude explained that Stripe does most of the heavy lifting, and implementing the shop site would be simpler if bespoke. So I let it do that and the result was fantastic. And also highly customisable (with Claude).<p>Times are a-changing.
        • speed_spread6 hours ago
          There are a LOT of PHP shops and they aren&#x27;t going to rewrite working sites tomorrow. Even when they do, there&#x27;s a good chance they&#x27;ll guide their agent to keep using PHP because that&#x27;s what they know. It&#x27;s simple tech for simple use cases, human knowledge is still an important factor if you still value understanding what you&#x27;re putting out.
          • fg1375 hours ago
            &gt; Even when they do, there&#x27;s a good chance they&#x27;ll guide their agent to keep using PHP because that&#x27;s what they know.<p>Claude knows more about php than a random php shop. Or Go, Python etc.
        • 65104 hours ago
          I never use it but my php hosting provider has this wall of icons for one click install. No developer needed on that layer. LLM has the same disadvantages as writing it yourself or the hosting provider writing something themselves. It might have more features, make a better fit and be more flexible, it isn&#x27;t [say] wordpress.
    • downsplat4 hours ago
      It has some historical warts but it&#x27;s still a perfectly decent language with lots of modern features too. I quite like the semi-typed style, strong types for function arguments and returns, and duck typed within. Keeps things concise and well-checked enough. I just finished porting a 120kLoC project into php, and I&#x27;m quite happy with it. Using Slim as a micro framework, with a custom layer on top.
    • ulimn7 hours ago
      I see where you&#x27;re coming from and I agree to some extent, but having a language (or standard library) rich in features also means we don&#x27;t have to rely on third party solutions that much. I think this is a pretty good thing&#x2F;approach - as long as it&#x27;s well tested of course.
    • abujazar6 hours ago
      Obviously Go and Rust are more modern and performant languages, but they simply can&#x27;t compete with the versatility of PHP and its ecosystem for a lot of use cases. Many web applications need a large part of the built-in functionality of PHP and one of its frameworks (Laravel or Symfony) in a tightly integrated application. Implementing one part at a time in Go or Rust is a viable option now for some, but far from all use cases. Time is better spent using that same LLM to use Laravel to its fullest.<p>Your career having moved on from CMS stuff in PHP is not really a good measure for what people actually need : )
      • phplovesong6 hours ago
        To be honest, the PHP &quot;ecosystem&quot; is on par, or even worse than npm (javascript) is. I rarely see as low quality code as i have seen in php, 90-95% of composer packages are just horrible, and most would never pass our QA.<p>There is a handfull of &quot;ok i guess we can use this&quot; packages, but they also tend to be slow and java-esque horrible class based needles abstarctions all the way down.
        • abujazar6 hours ago
          I don&#x27;t think the availability of low quality packages is an argument against either ecosystem. What counts is the availability of high quality packages like the PHP-FIG ones as well as Symfony components and the Laravel framework.
          • br0ceph5 hours ago
            im not very familiar with web dev, but from what ive seen, most web dev packages are total poo.<p>i feel like this is due to being a get (rich) web scheme. promising quick development so that the business can startup quickly.<p>anyone else feel the same?<p>also thoughts on a minimal php subset just for basic interactivity, so that ur not running such a complex environment with so many security avenues
          • phplovesong2 hours ago
            Laravel? Is that the pinnacle of PHP? Its abstractions upon abstractions with LOTS of lipstick. Thats why a vanilla Laravel hello world app gives you something ridiculous like 600 req&#x2F;seq thruput. How is this even on the table?
    • Shish2k7 hours ago
      I&#x27;ve been maintaining (&#x2F;suffering) a PHP project for ~25 years, which started with PHP because it was the most universally deployable runtime available on bargain-basement web hosts, where a novice user can upload a file over FTP and immediately have a running webapp. Has any other language even attempted to fill that niche yet? D:<p>(Has the world bifurcated into &quot;point &amp; click configuration of proprietary web hosting like squarespace&quot; for simple sites and &quot;full kubernetes deployments&quot; for more technical things, and nobody cares about entry-level deployment any more?)
      • mariusor6 hours ago
        I think the static site generators with static hosting have become that. When there&#x27;s interactivity needed, for most purposes, you can today defer to client side logic, so there&#x27;s no real need for a backend in 90% of the cases.
    • ahofmann7 hours ago
      What is a better direction in your opinion?
    • shevy-java7 hours ago
      I agree with you for the most part; I think PHP went into decline several years ago already.<p>TIOBE, while useless, has a trend (there it is somewhat useful; still overall useless, but not 100% useless):<p><a href="https:&#x2F;&#x2F;www.tiobe.com&#x2F;tiobe-index&#x2F;php&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.tiobe.com&#x2F;tiobe-index&#x2F;php&#x2F;</a><p>It shows two big hits, one in 2010, one in 2014. I myself switched to ruby in 2005. Ruby is now in a similar situation too. PHP is at rank #12, so that is still decent. I think it is declining only slowly though.<p>&gt; Now with LLMs it is similarly cheap (if not cheaper) to write code in Go, Rust, or any performant languages that are much more sophisticated than PHP and have many other benefits. I don&#x27;t see any reason anymore to start any new project in PHP.<p>Well, the problem with LLMs is that these users will become dependent on e. g. Anthropic, and Anthropic already showed it will censor at will, e. g. &quot;you are not allowed to 3d print anything that looks like a gun&quot; agenda.<p>I do not think LLMs are what killed PHP or will kill it. The language is simply poorly designed. Not all projects will become LLM though, this is the part I disagree with you. For instance wikipedia will not suddenly be rewritten in LLM-Rust.
    • rowanseymour3 hours ago
      You&#x27;re getting downvoted to oblivion but honestly I agree, I think the only reason anyone has for starting a new project in PHP in 2026 is familiarity. You cannot claim to be picking the best language for the job.
      • Shish2k29 minutes ago
        What&#x27;s a better language for &quot;can easily be deployed to any random web host&quot;?
    • stevelacey4 hours ago
      [dead]
    • trippsydrippsy6 hours ago
      [dead]
  • pryanshu895 hours ago
    [flagged]
    • Lalabadie5 hours ago
      It powers more than half of the Internet&#x27;s known websites (mostly thanks to Wordpress)
    • 65104 hours ago
      Everything works just fine<p><a href="https:&#x2F;&#x2F;phpbb.go-here.nl" rel="nofollow">https:&#x2F;&#x2F;phpbb.go-here.nl</a>
  • tivatech5 hours ago
    [flagged]
    • gg015 hours ago
      [dead]
  • nticompass4 hours ago
    Gotta love all the &quot;PHP bad&quot; comments that appear on any PHP post (regardless of what it&#x27;s about). I, for one, am I excited about this release. Modern PHP (php8+) is pretty nice and a lot of the old &quot;PHP bad&quot; issues from back in the day are non-existent.<p>Though, I guess I&#x27;ve been a PHP developer for a long time now. Professionally, since 2012 and has a hobby years before that. I refuse to stop learning&#x2F;using PHP!<p>Yes, there are other web server languages. Yes, PHP had its issues. Yes, legacy PHP can be pretty awful (ask me how I know). But, it&#x27;s not going anywhere and all the &quot;PHP bad&quot; comments are not helpful.
    • DJBunnies4 hours ago
      Indeed, I started typing out a few replies only to delete them after remembering what you&#x27;ve articulated.<p>PHP (still!) rocks; I&#x27;m quite happy it&#x27;s still relevant (and powers much of the internet.)<p>But I&#x27;m an old man who got into the language during the 3-4 migration around 2000.
  • pwmglenn5 hours ago
    Partial application in PHP? WOW.
  • shdon6 hours ago
    I guess the clamp function really is needed, as even in their release notes, they did the clamping using min&#x2F;max incorrectly.<p>Their PHP8.5 examples are written as:<p><pre><code> var_dump(max($value, min($lower_bound, $upper_bound))); </code></pre> but that should be:<p><pre><code> var_dump(max($lower_bound, min($value, $upper_bound))); </code></pre> &#x2F;facepalm
    • TimWolla5 hours ago
      &gt; Their PHP8.5 examples are written as:<p>That is false. The bounds are [0, 100] in both examples and 0 is correctly put as the first parameter to max() in 8.5.
    • 65103 hours ago
      I would actually write it like:<p><pre><code> $value = max($value, $lower_bound); $value = min($value, $upper_bound); var_dump($value); </code></pre> 10 years from now I can thoughtlessly scan over that without having to think what is going on.<p>This is great:<p><pre><code> clamp($value, $lower_bound, $upper_bound); </code></pre> It&#x27;s even more readable.<p>And since I cant stop typing... (sorry lol)<p><pre><code> $trucks = trucks($ordernum); $boxes = $boxes_per_truck * $trucks; $bananas = $bananas_per_box*$boxes; $bananas = max($bananas, $lower_bound); $bananas = min($bananas, $upper_bound); var_dump($bananas); </code></pre> In stead of:<p><pre><code> var_dump( max($lower_bound,min($boxes*$bananas_per_box*trucks($ordernum)*$boxes_per_truck,$upper_bound)));</code></pre>
      • tosti1 hour ago
        Yes. Write code like how you would do math on paper. Code should be readable without syntax highlighting. Turn it off and it&#x27;s easy to tell where readability is poor.
  • origini7 hours ago
    Ah yes the clamp() function good thats in
  • AuthorizedCust3 hours ago
    Why is this language still around?<p>I get the popularity and installed-base arguments, but I shudder when I see the code.
  • rarisma6 hours ago
    Perhaps it will contain something new that will come back to haunt us in six or so months.
  • HackerThemAll6 hours ago
    &gt; What&#x27;s New in PHP 8.6<p>New CVEs&#x2F;RCEs? <a href="https:&#x2F;&#x2F;www.php.net&#x2F;archive&#x2F;2026.php#2026-11-18-1" rel="nofollow">https:&#x2F;&#x2F;www.php.net&#x2F;archive&#x2F;2026.php#2026-11-18-1</a>
  • phplovesong6 hours ago
    Still no builtin unicode support? What the hell is this? A web language that does not default to unicode, thats pretty weak for a language in 2026
    • downsplat4 hours ago
      The php convention is that strings are bytes, but we store utf8 in them. Convert or validate at ingestion, transform using the mb_* family of functions, and be happy.
      • phplovesong2 hours ago
        I have heard this exact answer for decades. The mb_slop_uppercase() is not, and should not be acceptable for any modern language.
        • downsplat1 hour ago
          It&#x27;s a big world out there, it&#x27;s not like you don&#x27;t have a choice. I quite like the model.<p>Perl was famous for excellent native unicode support in its native string type, but the result was that you had to keep track of whether your variable was native unicode or octets, and many CPAN modules would try to transparently support both, in buggy ways. A richer system is not always an advantage.
    • vrubleg5 hours ago
      The idea of UTF-16 strings in PHP 6 were a mistake. UTF-8 works in PHP just fine. New languages (e.g. Rust, Go, Swift) stick to UTF-8. UTF-16 is legacy that would be nice to get rid of where it&#x27;s used (Java, C#, JS, WinAPI), but that is impossible because of backwards compatibility.
      • downsplat1 hour ago
        Hindsight is 20&#x2F;20, it&#x27;s easy now to say that if Unicode had been utf8 from the start, no 16-bit encoding would have been needed anywhere. But someone had to think of it first, and in the real world, 16-bit came first and became quite entrenched.
      • phplovesong2 hours ago
        PHP6 was such a huge lol overall. The core devs seem so far gone its crazy. I see the odd php apologist every now and then, but luckily PHP use has been on the decline for the last decade and a half.
        • 40four2 hours ago
          Obviously PHP 6 was a huge “lol”, they abandoned the version number completely. I didn’t start working with PHP until v7 so I missed all of that, but what does any of that have to do with v8.6? Seems like you just want to resurrect ancient buried arguments nobody is worried about anymore.
  • skeledrew7 hours ago
    Don&#x27;t forget the new vulnerabilities that AI will find :).
    • beberlei7 hours ago
      You say this and there are nginx, Java and Ruby RCE vulnerabilities in the news this week, so I am unsure you are winning points with the 1990s trope that PHP is more insecure than other projects or languages.
      • skeledrew43 minutes ago
        Well I&#x27;m a Python person, so I&#x27;m just watching and laughing at it all. I&#x27;ll be contrite if&#x2F;when a big news RCE pops up for it that has people similarly scrambling. But until then... :)
  • majestic57627 hours ago
    What&#x27;s New in PHP 8.6?<p>- no RCE
  • durmusk4 hours ago
    Hopefully not another php2shell
  • shevy-java7 hours ago
    [flagged]
    • beberlei7 hours ago
      Unsure how that is a useful comment where there is literally an nginx RCE out released yesterday that allows the same thing.
      • michh7 hours ago
        And a Ruby RCE today. There’s been plenty of Node and Django security vulnerabilities in the past too. And simply demanding everyone rewrites everything in Rust isn’t reasonable - even in “the agentic era”.