Announcement

Collapse
No announcement yet.

PHP 8.0 Ready To Ship With Many New Features, Even Better Performance

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

  • #11
    Originally posted by szymon_g View Post
    Why bother with PHP when we have the python?
    Because WordPress powers about 38% of the websites out there and it's written in PHP, not in Python.

    Besides, because Phoronix runs on PHP too...
    Last edited by lucrus; 26 November 2020, 08:16 AM.

    Comment


    • #12
      Originally posted by szymon_g View Post
      Why bother with PHP when we have the python?
      I prefer Python whenever I get the chance, but if you do any backend logic for websites, PHP is the only obvious choice. That being said, for both work and fun, I've created pages that used both PHP and Python, where Python did the "heavy lifting" and PHP acted more like a medium/control. Doing everything in Python would've been possible, but it'd also have taken more time and effort than I'd care to spend.

      Comment


      • #13
        PHP has way better application and testing frameworks than Python. When you're doing big server-side apps, those go a long way towards code reliability and longevity, as well as velocity (of getting things done) and developer experience which always go hand to hand.

        There are many other uses Python is way superior to PHP, again nothing to do with the language per se but the ecosystem around it. Always strive to use the right tool for a job.

        Comment


        • #14
          Originally posted by szymon_g View Post
          Why bother with PHP when we have the python?
          Is there an equivalent to php-fpm with python?

          Comment


          • #15
            I don't know of any. A typical python web app is a long running python process with an event loop to dispatch the request/response cycle. There are advantages to this approach as it helps with latency by negating application bootstrap (php has swoole and react-php to do this for lower-latency apps) but there are many disadvantages too - requiring an external tool like supervisord to handle the processes being one. Another is the potential for data leakage from one req/res cycle to another as well as exacerbating any latent memory leaks.

            php-fpm is actually a strength of PHP in my opinion.

            Comment


            • #16
              Originally posted by szymon_g View Post
              Why bother with PHP when we have the python?
              Why either of those when literally any other language is better than both?

              Comment


              • #17
                Will it get into Debian 11? Or it will ship with 7.4?

                Comment

                Working...
                X