Announcement

Collapse
No announcement yet.

PHP 8.2 Released With Readonly Classes, Random Extension

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PHP 8.2 Released With Readonly Classes, Random Extension

    Phoronix: PHP 8.2 Released With Readonly Classes, Random Extension

    PHP 8.2 is out today as the annual major feature release to this widely-used scripting language primarily for web purposes...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    PHP really became a nice language. It is quite performant and easy to work with nowadays.

    Comment


    • #3
      Originally posted by lamka02sk View Post
      PHP really became a nice language. It is quite performant and easy to work with nowadays.
      I agree. Modern PHP has essentially become a whole new language compared to PHP 5.x. It reminds me of the differences between C++11 (and beyond) compared to C++98.

      I really enjoy working with it and I strongly suggest to everyone that suffered from the old PHP days to give it a second chance.

      Comment


      • #4
        Same here, PHP 8 is fun to use, tons of performance benefits and lots of nice new features.

        I was impressed by how easy it was to migrate several PHP 5.4 projects to 8.0/8.1.

        Comment


        • #5
          I think it is very exciting to follow the evolution of the PHP language as it as modernized a lot and keeps up with the times. It has not stagnated, and much of the old criticism has been addressed.

          This days it looks like a really good language. A bit unfortunate that it is a web-only language though.

          Things it still miss is generic attributes, i.e. #[\Foo<Bar>] and improvements to the match construct to handle ranges of characters and digits such as 'a'..'z' and 0..9 in the match arms. Rust is king when it comes to pattern matching.

          There are still lots of functions and constants in the global space, I wish they would get moved into namespaces.
          It is a bit unfortunate that the syntax for attributes is #[Foo] which is less nice than @Foo (Java) or [Foo] (C#). I think it has something to do with that the @ (at sign) was already previously used as an operator to silence output and that [] is already used for arrays.

          I also think that the name "trait" is a bit of a weird name. I don't know, are they really traits? Isn't this a mixin? Are traits a good name for what PHP calls traits?

          PHP has Phar (a file format to bundle all PHP into one file) which seems pretty cool. Perhaps it is a bit unfortunate that it never seems to have taken off though.

          Is there anything you want to see in PHP?
          Is there anything that you still dislike about PHP even after all the improvements?

          Comment


          • #6
            Originally posted by bash2bash View Post
            Same here, PHP 8 is fun to use, tons of performance benefits and lots of nice new features.

            I was impressed by how easy it was to migrate several PHP 5.4 projects to 8.0/8.1.
            Often developer performance matter more. That's why Python is the best even though it's the slowest - well at least if we don't count bash

            Comment


            • #7
              I hate PHP. Yes it has come better, but still eons behind other mainstream languages. But why on earth would one want to learn it nowadays given there's modern Java, Kotlin Go, Ruby (with types!) that all have libs available to do web devt (the only thing PHP is suitable for). Even TypeScript is better IMHO.

              Also, for those who already know PHP: why use it for a new project? The only argument I found valid is: I already know it very well. Which is a good reason. But not a reason that speaks in favour of the language.

              Comment


              • #8
                Originally posted by rafanelli View Post
                I hate PHP. Yes it has come better, but still eons behind other mainstream languages. But why on earth would one want to learn it nowadays given there's modern Java, Kotlin Go, Ruby (with types!) that all have libs available to do web devt (the only thing PHP is suitable for). Even TypeScript is better IMHO.

                Also, for those who already know PHP: why use it for a new project? The only argument I found valid is: I already know it very well. Which is a good reason. But not a reason that speaks in favour of the language.
                Because JAVA requires tons of resources compared to PHP or many other programming languages. And GC.... *lol*

                Linuxer since the early beginnings...

                Comment


                • #9
                  Originally posted by Smurphy View Post

                  Because JAVA requires tons of resources compared to PHP or many other programming languages. And GC.... *lol*
                  Lol, Java is the only high level language that uses GC or JIT!

                  Comment


                  • #10
                    Originally posted by rafanelli View Post
                    Also, for those who already know PHP: why use it for a new project? The only argument I found valid is: I already know it very well. Which is a good reason. But not a reason that speaks in favour of the language.
                    PHP is still the ubiquitous platform of the web. It isn't the best, but it's what you get at the commodity level. PHP in many ways is an underdog story of how an inferior product can win if it hits the targets that matter to people. No other language comes close on availability, and to its credit it has a pretty solid performance story despite its many many flaws.

                    You might have a valid argument in the enterprise space, but that's a tiny minority of programming.

                    I personally avoid PHP as much as possible and can write at length about why, but that doesn't change reality.

                    Comment

                    Working...
                    X