Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. So, about PHP...

So, about PHP...

Scheduled Pinned Locked Moved The Lounge
javascriptc++phpcomdesign
19 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Jeremy Falcon

    There was a PHP post in the lounge recently. So, it got me thinking (dun dun dun)... Keep in mind, for years I loved, loved, loved PHP despite its design flaws. It was everywhere and always had a ton of functionality. I mean a lot, out of the box. Reading a PDF in PHP is very easy, for instance. But, why are people still using that for new projects? Like for real, did they not get the memo it's not 1995 anymore? Have they not heard of Node or V8? Or with Node you can use C/C++ modules and WASM? And don't tell me it's for speed. PHP is zippy, and I'll still defend it to the haters. But, it had its day that's over now. JavaScript runtimes have been optimized so much it belongs in its own category of scripting languages. Sure, it's not as fast as Rust or C/C++, but as far as scripting languages go I bet most people would be surprised just how quickly it runs. V8 will JIT JS even down to machine code when it detects a function is being used a lot.

    Jeremy Falcon

    P Offline
    P Offline
    Peter Adam
    wrote on last edited by
    #7

    Well, PHP is not Javascript, and that alone saves millions of developer hours and hundreds of polar bears per year.

    J 1 Reply Last reply
    0
    • J Jeremy Falcon

      There was a PHP post in the lounge recently. So, it got me thinking (dun dun dun)... Keep in mind, for years I loved, loved, loved PHP despite its design flaws. It was everywhere and always had a ton of functionality. I mean a lot, out of the box. Reading a PDF in PHP is very easy, for instance. But, why are people still using that for new projects? Like for real, did they not get the memo it's not 1995 anymore? Have they not heard of Node or V8? Or with Node you can use C/C++ modules and WASM? And don't tell me it's for speed. PHP is zippy, and I'll still defend it to the haters. But, it had its day that's over now. JavaScript runtimes have been optimized so much it belongs in its own category of scripting languages. Sure, it's not as fast as Rust or C/C++, but as far as scripting languages go I bet most people would be surprised just how quickly it runs. V8 will JIT JS even down to machine code when it detects a function is being used a lot.

      Jeremy Falcon

      B Offline
      B Offline
      BryanFazekas
      wrote on last edited by
      #8

      Jeremy Falcon wrote:

      But, it had its day that's over now.

      Sorry, but the facts indicate that you're wrong. Reading different web statistics pages, there are over 33 million PHP web sites in existence. Another states that 21% of the top 10,000 sites (however the top sites are defined) are PHP. Please note that the exact numbers don't matter -- they simply indicate there's a LOT of PHP on the net. Why isn't PHP going away?

      * It has critical mass, possibly more than any other language. * It is fully supported and updated. * It works, and it works well. * Newer languages are not better, and none approach the critical mass of PHP. * The cost of rewriting millions of sites in a different language is not realistic.

      Like many others on this forum, I've been in IT for decades, and during that time a lot of languages have come-n-gone. For many reasons PHP is a survivor and will continue to thrive. If I was a serious PHP developer (I dabble in it) I'd not worry about finding a job.

      J 1 Reply Last reply
      0
      • O Ovidiu Gabriel

        For me NodeJS or even Python was never a solution to replace PHP. First I would go for TypeScript instead of JS and Bun instead of Node/V8. Take a look at Bun — A fast all-in-one JavaScript runtime[^], you can run TypeScript with it directly (though it is internally converting it to JS not running TS directly). Probably a good replacement for PHP was Scala IMHO, not js, but that was in the past, now Lightbend prioritised Java support and that was a disaster for Scala. I personally now use Haxe to target both PHP and JS runtimes, Haxe is stronger typed than TypeScript and that's why I prefer it, at the same time I can target C# and Java runtimes from the same Haxe codebase (this is not possible with TypeScript yet). But unfortunatelly Haxe doesn't have php8 support yet. The advancements in php8 are stunning. You should take a look.

        J Offline
        J Offline
        Jeremy Falcon
        wrote on last edited by
        #9

        TypeScript is a superset of JavaScript. You still run "TypeScript" code on Node after it's transpiled. Also, I've looked at Bun, but it's not as mature as Node. Maybe one day, but not today.

        Jeremy Falcon

        O 1 Reply Last reply
        0
        • P Peter Adam

          Well, PHP is not Javascript, and that alone saves millions of developer hours and hundreds of polar bears per year.

          J Offline
          J Offline
          Jeremy Falcon
          wrote on last edited by
          #10

          Yeah, no. The "omg I don't like JavaScript" joke has been played 1,000,000 times. And it's usually by people who know nothing about it.

          Jeremy Falcon

          P 1 Reply Last reply
          0
          • B BryanFazekas

            Jeremy Falcon wrote:

            But, it had its day that's over now.

            Sorry, but the facts indicate that you're wrong. Reading different web statistics pages, there are over 33 million PHP web sites in existence. Another states that 21% of the top 10,000 sites (however the top sites are defined) are PHP. Please note that the exact numbers don't matter -- they simply indicate there's a LOT of PHP on the net. Why isn't PHP going away?

            * It has critical mass, possibly more than any other language. * It is fully supported and updated. * It works, and it works well. * Newer languages are not better, and none approach the critical mass of PHP. * The cost of rewriting millions of sites in a different language is not realistic.

            Like many others on this forum, I've been in IT for decades, and during that time a lot of languages have come-n-gone. For many reasons PHP is a survivor and will continue to thrive. If I was a serious PHP developer (I dabble in it) I'd not worry about finding a job.

            J Offline
            J Offline
            Jeremy Falcon
            wrote on last edited by
            #11

            I've been in IT for over 30 years, and I can tell you firsthand you're not only off base and know nothing about me. But... 1. I no longer have the desire to spend time on these types of chats. This is the reason I avoid places like CP way more than I used to. 2. You're presumptuous. 3. It's a dying language. You wanna squabble over the minutiae fine, but look where the money goes. If you don't understand this concept, I'm not spending time talking about it. 4. I said for new projects. 5. Critical mass is the only reason it's still around. Again I said for new projects. Not sure why you didn't pick up on that. Guess you're getting emotional. This is the part where you deny it. 6. Nothing you can say I haven't heard before.

            Jeremy Falcon

            1 Reply Last reply
            0
            • J Jeremy Falcon

              TypeScript is a superset of JavaScript. You still run "TypeScript" code on Node after it's transpiled. Also, I've looked at Bun, but it's not as mature as Node. Maybe one day, but not today.

              Jeremy Falcon

              O Offline
              O Offline
              Ovidiu Gabriel
              wrote on last edited by
              #12

              TypeScript is a superset of JavaScript.

              Correct, but it is still an improvement that JavaScrip neeeded, in my opinion. Of course, not everybody agrees or needs to agree. The whole point is that I could never switch to Node for backend (even though I've tried) because I found JavaScript too dynamic, even though I was writing JavaScript for the browser, but at that point I had no alternative, WASM to the rescue.

              J 1 Reply Last reply
              0
              • O Ovidiu Gabriel

                TypeScript is a superset of JavaScript.

                Correct, but it is still an improvement that JavaScrip neeeded, in my opinion. Of course, not everybody agrees or needs to agree. The whole point is that I could never switch to Node for backend (even though I've tried) because I found JavaScript too dynamic, even though I was writing JavaScript for the browser, but at that point I had no alternative, WASM to the rescue.

                J Offline
                J Offline
                Jeremy Falcon
                wrote on last edited by
                #13

                You're missing the point actually. You can do TS in Node. It's not as "dynamic" as you say. I guess you just wanna argue. Tootles.

                Jeremy Falcon

                O 1 Reply Last reply
                0
                • J Jeremy Falcon

                  Yeah, no. The "omg I don't like JavaScript" joke has been played 1,000,000 times. And it's usually by people who know nothing about it.

                  Jeremy Falcon

                  P Offline
                  P Offline
                  Peter Adam
                  wrote on last edited by
                  #14

                  Oh, I know more about it than ever wanted. As a TestComplete test creator. Which says enough about how widespread the cancer is.

                  J 1 Reply Last reply
                  0
                  • J Jeremy Falcon

                    You're missing the point actually. You can do TS in Node. It's not as "dynamic" as you say. I guess you just wanna argue. Tootles.

                    Jeremy Falcon

                    O Offline
                    O Offline
                    Ovidiu Gabriel
                    wrote on last edited by
                    #15

                    No, I dont want to argue. Of course I can do TS in Node, but first TS was widely adopted later on than Node as far as I remember. And as I already said, I can equally use Haxe to generate JavaScript for Node as I can also use Haxe to generate PHP. I just think ... why should I switch from PHP exactly to Node when I can switch from PHP to any other technology (let's say anything from Elixir and Closure to Go and Rust). I assume some developers stay with PHP for serious reasons. :rolleyes:

                    J 1 Reply Last reply
                    0
                    • P Peter Adam

                      Oh, I know more about it than ever wanted. As a TestComplete test creator. Which says enough about how widespread the cancer is.

                      J Offline
                      J Offline
                      Jeremy Falcon
                      wrote on last edited by
                      #16

                      Ok dude... whatever.

                      Jeremy Falcon

                      1 Reply Last reply
                      0
                      • O Ovidiu Gabriel

                        No, I dont want to argue. Of course I can do TS in Node, but first TS was widely adopted later on than Node as far as I remember. And as I already said, I can equally use Haxe to generate JavaScript for Node as I can also use Haxe to generate PHP. I just think ... why should I switch from PHP exactly to Node when I can switch from PHP to any other technology (let's say anything from Elixir and Closure to Go and Rust). I assume some developers stay with PHP for serious reasons. :rolleyes:

                        J Offline
                        J Offline
                        Jeremy Falcon
                        wrote on last edited by
                        #17

                        You missed the point.

                        Jeremy Falcon

                        O 1 Reply Last reply
                        0
                        • J Jeremy Falcon

                          You missed the point.

                          Jeremy Falcon

                          O Offline
                          O Offline
                          Ovidiu Gabriel
                          wrote on last edited by
                          #18

                          Yes, I am stupid and I know it 😂 But I know lot of people that think just because something is mature, it must be worthless or dead. By the way, I think Fortran really just got resurrected from it's death.

                          1 Reply Last reply
                          0
                          • J Jeremy Falcon

                            There was a PHP post in the lounge recently. So, it got me thinking (dun dun dun)... Keep in mind, for years I loved, loved, loved PHP despite its design flaws. It was everywhere and always had a ton of functionality. I mean a lot, out of the box. Reading a PDF in PHP is very easy, for instance. But, why are people still using that for new projects? Like for real, did they not get the memo it's not 1995 anymore? Have they not heard of Node or V8? Or with Node you can use C/C++ modules and WASM? And don't tell me it's for speed. PHP is zippy, and I'll still defend it to the haters. But, it had its day that's over now. JavaScript runtimes have been optimized so much it belongs in its own category of scripting languages. Sure, it's not as fast as Rust or C/C++, but as far as scripting languages go I bet most people would be surprised just how quickly it runs. V8 will JIT JS even down to machine code when it detects a function is being used a lot.

                            Jeremy Falcon

                            J Offline
                            J Offline
                            jkirkerx
                            wrote on last edited by
                            #19

                            I didn't read the replies first, but will post my response to the question. I started working on a customers PHP project in Sept 2020, which was written in PHP 4.2 between 2004 to 2010 by some Chinese students from China. They did a terrible job, and everything you can possibly do wrong they did wrong. I can't even read the code. Anyways, it was so bad, that I told the customer that they really need to sort of start from scratch again. Why I chose pure PHP 7.4 for them. Drum roll please .... Because of time and money ... So many of the new technologies are constantly being updated so fast, that it's hard to keep up with the changes. PHP 7.4 is still that Swiss Army knife that can do almost anything, and PHP doesn't bug you to update code, or doesn't require a team of skilled software engineers to maintain over decades. Once you write it and deploy, it can run for a long time without more time and money. I can move on to the next project, and the customer can use their new app for years to come, and pass that app to their next generation of children that will take over the business when they come home from College or University. Our economy in the US has a strong service sector, comprised of small business owners with family involved, and have become generational now spanning their services across decades of time. I look at pure PHP 7.4+ from an economic point of view, and not from a superior technology point of view, considering time, labor, capital investment and maintenance being more stable and predictable across good times and bad. I don't agree with PHP Laravel as being a framework built on PHP, but opted for pure PHP, in which I was able to build a near MVC type of Web Application using modern objects and smarter HTML views with the objects, and include robust HTTP request and response handling, and robust security features. I have no regrets in my decision for my customers path forward, and I'm very happy with the results. Well that's my argument for PHP. May not be what you were expecting to hear or read, but I hope it satisfies your thirst to know why.

                            If it ain't broke don't fix it Discover my world at jkirkerx.com

                            1 Reply Last reply
                            0
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • World
                            • Users
                            • Groups