13 ms·
PHP Doesn't Suck Anymore
- practicalrs 2y ago" Performance PHP has experienced a 400% performance increase between 5.6 and 7, and another 20% between 7 and 8. It's fast enough for most use cases, and if you need a specialized use case, use a specialized language." If you like to pay for servers... https://aws.amazon.com/blogs/opensource/sustainability-with-rust/ https://aws.amazon.com/blogs/opensource/sustainability-with-...
- gred 2y agoInteresting, thanks for the link. But by those metrics, Erlang is worse than PHP... Definitely just one data point of many.
- langsoul-com 2y agoThe last part of the article, it's good for most use cases. Unless your Google, it doesn't matter. Most of us aren't hitting billions of requests. What good is it to send ungodly time and effort when you'll most likely never ever need it?
- dfgdfg34545456 2y agoPHP worse energy efficiency than Haskell? Maybe I'm not understanding something.
- panzi 2y agoHaskell can be compiled to native code.
- cardanome 2y agoOr you pay 5 Dollars a month for some good old shared hosting, upload you php files and be done with it. Save big money not even having to worry about all the DevOps stuff. PHP is amazing for small and medium sized companies that just need to get stuff done.
- dfgdfg34545456 2y agoJava is better than Javascript, I'm mystified. I have used Java and Javascript lambdas, the Java ones use 4 times the memory of the JS lambdas and are slower, to do the same thing.
- labrador 2y agoIt's late Friday night so this what I really think of PHP: It is the purest form of web programming. You don't need a framework. Spin up a server and just start writing. Experiment. Do crazy things with it, like an art project. Every page is it's own world. Have fun with it. PHP is freedom.
- zarzavat 2y agoThis is nothing to do with PHP the language. You can have an HTTP server and templating engine in any scripting language. It’s just the way that PHP is distributed is particularly easy. Someone could throw together a “PHPython” from existing components and get the same effect.
- nurettin 2y agoApache knows how to serve php, it is harder with python.
- KronisLV 2y ago> Someone could throw together a “PHPython” from existing components and get the same effect. Python has been around for like 30 years, why isn't that quite the case? I guess there was mod_python but nobody cared enough: https://modpython.org/ https://modpython.org/ I guess there's now mod_wsgi which is similar to PHP-FPM in some ways: https://modwsgi.readthedocs.io/en/develop/ https://modwsgi.readthedocs.io/en/develop/ Yet, even with the actual deployment not being much different (just used Apache as an example here), there's still dependency management, which Python is often described to be pretty messy at, virtual environments or not. With PHP, most of the stuff you need for common use cases often is pre-installed and is just a matter of enabling some plugin in the config. That said, I deploy most of my stuff in containers, so PHP, Python, Node, .NET, Java and others all become more alike when viewed from the outside.
- BonusPlay 2y agoFrom developers perspective, it never did. From security perspective, it still does.
- gbuk2013 2y agoIt’s 2024 and PHP still doesn’t natively support UTF-8. :(
- hnarn 2y agoCan you elaborate on what exactly you mean by “natively support”?
- gbuk2013 2y agohttps://phptherightway.com/#php_and_utf8 https://phptherightway.com/#php_and_utf8
- MissTake 2y agoI’d argue that it does natively support MultiByte strings, albeit with an extension library that’s part of the language. Even your supplied link states they’re not supported at a “low level”, but states nothing about “native”.
- gbuk2013 2y agoIf you want to be pedantic then multi-byte string !== UTF-8 support. ;) Consider the intended purpose of the language and then consider whether the abstraction offered is appropriate. IMO in the case of PHP and UTF-8 it is not. In my specific case it made my job harder than I would like on 2 projects I used PHP for, which is why I am complaining.
- SXX 2y agoWhile proper description is linked already in neighbouring comment. TLDR: in 2024 with PHP8 you still need mbstring extension and also you should be careful around UTF-8 if you do any text processing. In almost all other modern programming languages it's just works.
- mgaunard 2y agoAnyone claiming such things doesn't understand Unicode at all. The whole concept of having special Unicode-aware strlen or substr is nonsense.
- baq 2y agoPHP is just htmx taken to the extreme - no js needed at all if you don’t want to! It’s liberating. That said last time I used it was ~2007 and I don’t plan to come back.
- arunix 2y agoWhy wouldn't you use it again?
- baq 2y agoNo ROI for me. Got other stacks for the backend and ‘just ftp it’ realistically isn’t a deployment option anymore unless you’re a single man Wordpress shop or whatever.
- sexy_seedbox 2y agoFTP? Seriously? And PHP isn't just Wordpress.
- baq 2y ago> FTP? Seriously? exactly - if I have to build a docker image anyway the deployment advantage of php is completely wiped out.
- sexy_seedbox 2y ago> PHP is just htmx taken to the extreme What a close-minded and weird comparison.
- creshal 2y agoThe article would be a lot better with examples - PHP has (had?) a history of implementing good features in very un-ergonomic ways (classes/namespaces). It'd help to demonstrate that all these improvements aren't like that.
- nolok 2y agoCan always have a look at this https://stitcher.io/blog/evolution-of-a-php-object https://stitcher.io/blog/evolution-of-a-php-object Latest code sample is at the bottom, covers a single specific use case (DTO) and it's still old as last update is november 2022. PHP in general has managed to had great feature while cleaning up and keeping true to its mantra of "it should be simple and easy". Modern PHP is super fun to use, and whether you like the verbosity and completeness of symfony, the "take a shortcut around the things you don't care so you can focus on your stuff" of laravel, the event based system of swoole or similar, the microframework like slim or just raw php, it's hard not to find a shoe that fit. What's notably funny is how they managed to do that without breaking bc, and how that is perceived highly depend on who is reading. Take switch(). The original php version of it is rather terrible in what it does in term of "programming language correctness", but it worked and had its use. At the same time, a clean one that did what was needed was really wanted. So instead of breaking every single software out there, making wordpress and company stuck on old version forever, they added a match(), which is a bit different and much cleaner. It's not really "the broken one and the good one", as their feature is different, but it's obvious that people who look for something bad will see that as terrible. In reality, you mostly don't use switch() in new code, but its behavior is fully described and documented.
- sverhagen 2y agoAfter having been in an abusive relationship for a while, and having liberated yourself from it, I imagine a lot of folks wouldn't go back, even if that other person has presumably improved their ways...
- anonzzzies 2y agoI recently had to work on a large php project with mixed all and new php; it’s very refreshing vs node/react etc. Enough to make me wonder about the choices I made in my work life. I started with php when it was still a perl script and did it professionally for 10 years after that.
- projektfu 2y ago"I wonder why people keep writing that PHP was ever written in Perl. It never was. #php" https://twitter.com/rasmus/status/226405807305138176 https://twitter.com/rasmus/status/226405807305138176
- askonomm 2y agoAfter 6 years of Clojure, I went back to PHP because it now has type safety and an amazing ecosystem of high quality libraries, allowing me to be very performant in my work. But then again, I was never in a abusive relationship because back when I did PHP, I didn't really know any better, so it was totally fine.
- kqr 2y agoI kept hearing these "PHP doesn't suck anymore" sentiments so in 2019, I started a new project in PHP. I read all the modern books, followed all the recent best practises, used all the sane configuration... ...and PHP still kinda sucked. Maybe it has improved between 2021 (when I last committed to that new project) and 2024, but I'm skeptical. It was a huge disappointment to me because I really want PHP to be nice. PHP was the second language I learned for bigger projects after Perl, so some part of it still feels like home and evokes a beautiful naive feeling towards programming in me. Alas, I'm unlikely to try it again in the next decade. I suspect it's slowly catching up to other languages, but at this rate I think more than a few years are needed until parity.
- rrr_oh_man 2y ago> ..and PHP still kinda sucked Can you elaborate?
- euph0ria 2y agoWhat do you use now instead?
- trog 2y agoI keep hearing these "I heard PHP doesn't suck any more but I tried it and it still sucks" sentiments but they inexplicably never explain why
- saltysalt 2y agoNever did. I've been quietly using PHP for decades on real projects, without the need to seek approval from anyone.
- peter_retief 2y agoI don't doubt that php will be with us for many years so any improvements are great. Personally prefer to use a language like python that has depth of libraries and also useful for non web based apps.
- cynicalsecurity 2y agoLet me share a secret with you: PHP runs just like a python script.
- peter_retief 2y agoi do know people who write scripts in php, however, there are no libraries like pandas in php as far as I know https://pandas.pydata.org/ https://pandas.pydata.org/
- cess11 2y agoThe extension system allows you to interface with pretty much anything you could compile on the same machine. For quick development of wrappers or whatever, take a look at https://zephir-lang.com/en https://zephir-lang.com/en .
- dools 2y agoI didn't think PHP sucked in 2012!
- hyperman1 2y agoI've migrated code to PHP 8 last year. It is not as bad as it used to be but it is still a lot worse than most languages. Meanwhile it left behind its fortes as quick an dirty hack language, and traded it for being a very bad pseudo java.
- skywhopper 2y agoI used to use PHP all the time. It really was revelatory when it came out. This article is a little short on explanations or examples, though, so it’s hard to even really know what a lot of this is about, but it sounds mostly like syntax refinements and a few new language features. Which is great. Between that and the performance improvements, I’m glad to hear that PHP is still alive and well. All that said, my memory of why PHP got such a bad rep was not so much the language itself, but the truly dangerous defaults, magically populated variables and more, that were so embedded into the usage of the language that for years, the maintainers were reluctant to make the necessary breaking changes to address the risks. Those issues drove far more people away—to the emerging frameworks like Rails and Django or all the way to Java or .NET—than the lack of named parameters or the need for the ‘array’ keyword.
- arp242 2y agoThe main problem with PHP 5 was never the lack of features, but things like "there is no way I can get an error code from fopen()", and things like that. Can I now get EEXISTS and such out of fopen()? Looking at the docs it still just returns false and emits an uncatchable E_WARNING that can't be examined programmatically. Having to write a bit more code because it doesn't have some feature is not ideal, but whatever. Not able to correctly race-free implement file access is a much bigger issue. I have some other gripes (which may or may not be fixed), but this was and remains my main one.
- some_furry 2y ago> Can I now get EEXISTS and such out of fopen()? Looking at the docs it still just returns false and emits an uncatchable E_WARNING that can't be examined programmatically. Sure, the most straightforward way is to first use the "x" flag for write-only, and "x+" for read/write access. $fp = fopen('file.txt', 'x+'); From the PHP docs: "If the file already exists, the fopen() call will fail by returning false and generating an error of level E_WARNING. If the file does not exist, attempt to create it. This is equivalent to specifying O_EXCL|O_CREAT flags for the underlying open(2) system call." And finally to convert E_WARNING errors to exceptions, use you can use set_error_handler() to throw an exception (and even write business logic to filter them): https://www.php.net/manual/en/language.exceptions.php https://www.php.net/manual/en/language.exceptions.php They're not unhandleable. But if you want a single function that throws a specific exception when a file exists, specific to the behavior you want, I got you: <?php declare(strict_types=1); namespace Argp242; use function fopen as php_fopen; function fopen( string $filename, string $mode, bool $use_include_path = false, $context = null ) { if (file_exists($filename)) { throw new \RuntimeException('E_EXISTS'); } return php_fopen($filename, $mode, $use_include_path, $context); } To run this code from outside a namespace, simply: try { $fp = Argp242\fopen($filename, $mode); } catch (RuntimeException $ex) { // Handle $ex } Throw it in a library somewhere, having written it once, and now you can just use that whenever you want that behavior in your PHP code.
- asddubs 2y agothis code will run into problems with race conditions if the file is created after file_exists is called but before fopen is called
- valenterry 2y agoDon't lie to us. We all know it can't be true!!1!
- hobofan 2y agoEvery argument like this that just focuses on the language features and performance completely misses the point. When I hear people expressing that PHP "sucks", that's mostly coupled to the ecosystem, not necessarily the language itself. Yes, the biggest warts in the language might be non-issues now if you write 100% of your code yourself, but the ecosystem is the same as it ever was. PHPs utilitarianism is its biggest strength but also its biggest weakness when it comes to its libraries. Packagist is mostly a graveyard of libraries that people have coded up for their exact niche use-case 8 years ago (with no updates since), with little flexiblity beyond that (like you would see for libraries in other ecosystems). The popular frameworks (mainly the CMSs, but also some of the MVC ones) suffer from a similar fate: Great if you want to hack something up quickly or do a small extension to it, but full of footguns and lacking in developer tooling.
- CiPHPerCoder 2y ago> Packagist is mostly a graveyard of libraries that people have coded up for their exact niche use-case 8 years ago (with no updates since), with little flexiblity beyond that (like you would see for libraries in other ecosystems). Could you provide some examples? I wrote a lot of PHP libraries over the years, and while some are definitely stale because nobody uses them (and thus I have no incentive to keep the lights on), the only time I see dead packages, they're actually forks of other open source software that people contributed exactly one commit to (to change the package name).
- 4bpp 2y agoThe problem is that PHP still has no credible competition whatsoever in core use cases like "take an HTML document and replace static part with something fetched from a database", or "take multiple HTML documents and factor out a common structure that you might want to change everywhere at once later". Of course there exist solutions in "modern, well-designed languages" for these, but I will confidently take a challenge from any node.js, Elixir or Ruby developer on who can get it done faster. Sophistry about how my solution won't scale to a million users per day or I should have used their framework from the start rather than having a bunch of HTML files won't matter to me nor the <10k people I expect on my website. In many cases, modern languages and frameworks drive adoption for themselves by tricking you into solving a problem that is not actually the problem you have, but they happen to be adapted to.
- bazlan 2y agoLet it die
- mgaunard 2y agoWhy would you use PHP when Python exists?
- cess11 2y agoIt's a better language. Better performance, better typing, better syntax, and so on. Build an application in Python, then as soon as it becomes pushed by load you're going to need a rewrite. A few small load balancers and virtual web servers doing PHP can handle tens of thousands of requests per second, the database is almost guaranteed to be the bottleneck. Python is a (according to some) nicer bash, it's not a good alternative for implementing non-trivial systems and web services.
- skywalqer 2y agoYou can't build a good house with bad foundations.
- allan_s 2y agoYou can build a resistant house on seismic ground. (I know you're being metaphoric)
- JD557 2y agoOne of the issues I have with "languages that don't suck anymore" is that, even after the language gets all the cool new features, you'll still end up having to use some libraries targeting old versions. So you end up having to choose between stable libraries in the old style or experimental modern libraries. While some features can be retrofitted to work with old code (e.g. Java 8's SAMs were smart a way for old libraries to support the new lambdas), in a lot of situations you'll have to wait years for the stable libraries to support the new features. Having said that, it's nice to see PHP catching up. I haven't used it in a long time, but I like to check the changelog once in a while.
- nolok 2y agoIt really doesn't apply with PHP though. I mean that. Nowaday you use composer so your versionning and compatibility is done for you, everything is made out of libraries instead of monolithic bloc, and no major libraries use anything below PHP 7.X I don't think you can find any sort-of-major library that doesn't work on PHP 8, nor anything with any kind of serious usage that isn't working on PHP 7. That's sort of the point of PHP making sure backward compatibility remains. And if you mean "but my code can't use the good stuff", actually nothing stops it, even the type system stictness is decided caller side, specifically to avoid the issue you mention.
- some_furry 2y ago> One of the issues I have with "languages that don't suck anymore" is that, even after the language gets all the cool new features, you'll still end up having to use some libraries targeting old versions Can you name any PHP libraries that don't support the latest version, that you wanted to use, and held you back from upgrading?
- chrismorgan 2y agoThis article focuses on added features, but although some of them may help, those features weren’t really the problem with PHP. I haven’t meaningfully used PHP since about 2010, but https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/ https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/ generally rang true, and I get the impression that most of that is still valid (though some points have certainly been fixed).
- 1oooqooq 2y agosome good usability points on method names, but the bulk is mostly complaints by someone clearly unable to understand webservers or security. complaining that error level hides errors from output is very amateur. also complaining about info missing from the manual in open source is silly. test the two failure cases and send a manual improvement patch, instead of being annoying and wasting more effort on a blog post
- chrismorgan 2y agoYou’re looking at it too simply. These are complaints of an expert with broad experience across PHP and similar systems, who found a steady stream of problems wherever she looked. These are systemic issues. The foundations themselves are unsound, and that’s difficult to ever fix. I think the analogy is good to give a basic sense of all this. And then the remainder of the article was written in such specific and extensive detail deliberately to counter shallow dismissals like yours.
- tasuki 2y agoIt is hard to blame PHP for having been badly designed when... it wasn't "designed" to begin with. Rasmus Lerdorf had to following to say: > I don't know how to stop it [...] there was never any intent to write a programming language [...] I have absolutely no idea how to write a programming language [...] I just kept adding the next logical step on the way.
- lexicality 2y agoI used PHP again last year after almost a decade and it sucks less (a lot less!), but it still sucks. Going from a language with a well organised stdlib with consistent syntax to php is not fun. Sure, it has a lot of nice features now, and some of the footguns have been removed, but the core language is still there and it's still a mishmash with a bunch of hidden landmines.
- bovermyer 2y agoWhat do you mean you don't have every disjointed combination of needle, haystack memorized? ;p As someone who spent many years developing in (and defending) PHP, I agree with everything you just said. Nowadays, I'd rather reach for Crystal, Go, or Rust for back-end application development, and Python or Typescript (!) for automation scripts.
- nolok 2y ago> What do you mean you don't have every disjointed combination of needle, haystack memorized? ;p This is one of the weakest, "not happening in reality" issue of PHP though. It's the most obvious, and the one who don't use php but glance at it point. But in the real world, any editor you use not only show it but also show a type error if you made a mistake, on top of that after a few hours you know which is which (yes strpos and in_array have an opposite haystack/needle, but each always use the same, once you use them more than 5 times you remember the same way you remember to check for 0 on strpos). There are still flaws in the php world, but the one most commonly pointed out are always sounding funny to me because they're flaws if you show an exemple in a conversation but that you don't actually hit when coding.
- some_furry 2y agoAlso you can just name your arguments now
- lexicality 2y agoI would rather get it right first time every time than get it wrong half the time and have my editor correct me. Good languages don't make you memorize exceptions.
- dep_b 2y agoPHP comes with all nuts and bolts included. It’s just me, my text editor and an FTP client.
- freecodyx 2y agoGood for you!
- askonomm 2y agoPHP is awesome if you're a pragmatic engineer who just wants to get things done, and with things like Laravel Octane, it's also a decent solution for high performance applications now, something it historically wasn't good at. That said, if you only care about the elegance of your code, refer to it as "prose" and instead of making solutions prefer to wrangle ideologies, then PHP is most definitely not for you.
- zb3 2y agoIt's the opposite: "professional" php sucks now, with all this overengineering and developers constantly trying to prove how PHP doesn't suck by adding new complexity. "Look, I've overengineered it to death! It's possible in PHP so now you can't say it sucks"
- pawelduda 2y agoFor me it's not what the language itself is like, but what's the average project I can end up working on. So PHP was magical when I was using it on my side projects, but as soon as I started commercial work on full blown projects with frameworks, it made me question my life choices. Lack of version control or test suites, editing files directly via FTP were common practices. Wordpress plugins that invited hackers to mess with your code. Maybe I was just too incompetent back then, but moving to Ruby saved me - for instance how much emphasis the community puts on writing testable code and testing it. Few years later I tried PHP again and it felt like Wild West compared to Ruby (that was 10 years ago). So while it may not suck anymore, it's not the case for all the legacy code out there.
- Arisaka1 2y agoThis is awfully similar to how I feel about C# the language itself really feels like "improved Java" and making side projects was a joy. But, I realized that the vast majority of companies that use .NET are not tech first, meaning developers and software is a cost center, meaning there's little to no internal engineer culture or investment to the development department, and everyone just wants to "flip the burger and move on".
- diarrhea 2y agoWell said! I once heard C# referred to as a “blue collar language”. Perhaps snarky, but it mirrors my experience. There’s little in the way of fun in the ecosystem. Not a lot of true open source in the conventional sense, lots of Microsoft MVP consultant types with blogs promoting their services. Those websites look like time capsules from 2011. You won’t find many beautiful, “handcrafted” blogs on .NET topics. A perhaps bizarre metric, but it helped me well in gauging an ecosystem’s vibe (Rust, Go, Python and others pass that vibe check, for example).
- deleted 2y ago[deleted]
- neonsunset 2y ago
- JimDabell 2y agoI’ve been hearing “Yes, PHP used to suck but it’s good now!” after every major release since v4. And even after minor releases during v5! Yes, PHP 3 sucked, but PHP 4 is good now! Yes, PHP 4 sucked, but PHP 5 is good now! Yes, PHP 5.0 sucked, but PHP 5.3 is good now! Yes, PHP 5.3 sucked, but PHP 5.5 is good now! Let’s not talk about PHP 6! Yes, PHP 5 sucked, but PHP 7 is good now! Every so often I have to deal with some PHP code, and every time I see that, no, it’s still just the boy who cried wolf. It seems like PHP fans are all too happy to agree with the people saying PHP sucks… as long as it’s not the latest version. And suddenly they can see that version’s faults… as soon as a new version is released that they can tell people doesn’t suck. Maybe if PHP fans hadn’t spent the last two decades telling people PHP didn’t suck when it most obviously did, people would be more inclined to listen today.
- simultsop 2y agoWhat I find most important recently is at least getting to do something, being busy sort of. After all, definitively, there will not be a language which satisfies everyone. So, your negativity might be the source of motivation keeping you up to do something involving... php. At least be busy developing, complaining not a good sport.
- DarkNova6 2y agoPeople focus too much on syntax. I have worked with PHP professionally and I have to grant those folks that they got genuinely good libraries and frameworks. But coming from Java, I always found that you are ultimately boxed into a corner. It surface seems productive and shiny and for 90% of use-cases you get the job done quickly. But for those other 10% you realize that at its center lies a rotten heart, wired together with duct tape. Syntax is not the problem. Horrendous stdlib and IO interop is what keeps it a mess. Once you try to do anything more sophisticated you realize its many sharp angles which don't make sense. Such as call-by-reference only working 2 recursions deep. Silently failing when opening files which are too large. Arbitrary decisions and namings on stdlib. The hassle of debugging your program. Or an ongoing struggle in my old company: Wanting to set up old PHP projects and realizing that your package manager doesn't have them anymore. PHP is a ticking time bomb.
- cess11 2y agoPHP is great, but you need to be a pretty decent developer to use it effectively. It has a rather nice interactive shell, https://psysh.org/ https://psysh.org/ . I've built non-trivial, non-web systems in it. Concurrency 'within' the language isn't as nice as some alternatives, but the FCGI-style deployment is quite reliable and convenient in practice.
- phoboslab 2y agoFor the past few years I've been building a B2B SAAS. Naturally I've chosen my "get shit done" language PHP to do it. While the product itself is as boring as it gets, I've had stretches of good fun with it by building _everything_ myself. Naturally the web frontend is written in PHP, so are the cronjobs, shell scripts, message queues, WebSocket server, client software, statistics and the server automation (think Ansible, but imperative). Sharing my own libraries between all these parts is extremely valuable. Owning the whole stack means I never have to deal with black boxes or fiddle with dependency management. The language just gets out of the way so you can solve your actual problems. The fact that PHP is reasonably good at all these things is a big advantage. The performance is certainly good enough (never became a problem) and the long running server applications (e.g. the WebSocket servers) are rock solid.
- bpfrh 2y agoI'm curious on how you did the websocket part? I thought php has a per request execution model.
- askonomm 2y agoIt doesn't have to. Laravel Octane (or Swoole, OpenSwoole, FrankenPHP) support serving multiple request with just one process.
- nolok 2y agoIt used to. Hell, in PHP 5 era and before, it even HAD to, PHP had been designed as "you get a brand new process every request" and so a lot of things with memory went wrong if you ran for too long. This changed with PHP 7, some framework appeared to allow an event based system, and then PHP 8 (or a later minor update) added fibers to the core to support it more easily. These day, event based php has several well supported frameworks, is stable and fast, and allows you to have the same codebase on your websocket or other event system as you use on the rest of your app (sharing libraries is super cool, using the same DTO on the sender and receiver also, etc ...)
- 2y ago
- anticodon 2y agoNo matter what PHP project I worked on, it was always a mess. Unreadable mess of HTML, PHP and SQL all of them intermixed in one file. Instead of templates, there's a line of PHP, line of HTML, line of PHP again. Instead of using SQL placeholders, there's usually string interpolation. Lots of copy paste, I've seen a commercial PHP project, that was sold for around ~200 EUR, that had almost no functions: every repeating part of functionality was copy pasted 3-10 times. All the PHP projects I've seen, eventually failed and had to be rewritten in another language. It was impossible to add new features and fix bugs in such a code. For example, if the original code uses copy paste instead of functions (and it is very often the case for PHP code), you'd have to fix every bug 3-5 times (most of the time, you fix it in one place and only after deployment realize, that the bug still manifests itself in 2-4 other places). Yeah, maybe PHP is very easy to write and deploy, but this simplicity somehow makes bad programmer out of the person writing in PHP. I know, it's very subjective, but I had such a negative experience that I gave myself a promise to avoid PHP related jobs at all costs. Also, maybe it was slightly more difficult to use other languages for web development 20 years ago. You'd have to use CGI, or set up some mod_python with all of its quirks, but those times are long gone. It's almost as easy now to develop/deploy Web apps in any other language.
- kgdiem 2y agoI like it. I returned to PHP after nearly a decade and with Laravel I’m able to ship products really quickly. Laravel’s collections fix my syntactic issues with PHP arrays. My only complaint is that type checking is performed at runtime, so if you forget to mark a field as optional you get a type error even if you account for the nullref in your code.
- kgdiem 2y agoOh! And last time I checked, maybe 2015, a lot of the stdlib of uncompiled Zend PHP is just plain old C code.
- deleted 2y ago[deleted]
- softgrow 2y agoI am I the only person who scrolled to the end? I was somewhat intrigued by the subscription model Developer (person) as a service subscription.
- g_m_m 2y agoPHP is fine, the problem is one request per worker, but for small projects not so important.
- dandellion 2y agoI had the misfortune of having to use PHP again last year for six months, after not having used it in more than a decade. My opinion is that while it certainly has improved in some aspects, it still sucks very much.
- grishka 2y ago> Assigning an array to a temporary variable is a thing of the past. You can now use array destructuring to directly assign variables from an array. It has existed approximately forever, in this form: list($username, $domain) = explode("@", $email);
- florinutz 2y ago[dead]
- MrSkelter 2y agoPHP is the foundation of Wordpress and Wordpress is a third of the web. For that reason alone PHP is important and worth improving.
- develop7 2y agoMe from 2013 when I've left PHP for Ruby would definitely be in awe. Today, not using Ruby for 5 years now, it's "meh". With the utmost respect to the effort of everyone involved.