Earlier quoted context omitted.
Honest question: what are people using if not PHP? Node? Python? The 80% of us who aren’t FAANG and are writing CRUD apps. I’ve tried researching the pros/cons and all I get are low quality listicles. Nobody can tell me why PHP is “bad” or what Python does that PHP can’t. Inconsistent params are the only argument I’ve heard. Which my IDE solves. What about JavaScript splice vs slice. I look it up every time.
Out of date but this is the classic anti-PHP polemic. https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/
PHP 8.1.0
161–170 of 286 posts
Re: PHP 8.1.0
#162Genuinely curious: who here thinks PHP is a good choice for a new project and also has experience with other languages such as Scala, Kotlin, Python, or JavaScript and their respective web frameworks?
Re: PHP 8.1.0
#163Re: PHP 8.1.0
#164PHP has a lot of warts, and I mean a lot , but one thing I really like about PHP that virtually no other Web languages offer is that I can just drop code in my Web server's document root, go to that path in my browser, and it runs, without needing to deal with frameworks, boilerplate, compiling, etc.
Re: PHP 8.1.0
#165Reading some comments here and it does confuse me Promises, async and await in javascript, coroutines and threads in kotlin, fibers in some language runtime (including this php 8.1 [0]), single process (nodejs), multi-process(php-fpm worker), single-thread, multi-thread, goroutines in go, multi-core coroutines Googling the definitions and x vs y situation helps a little, the main confusion to me is why some people wa…
Not everyone does. There's also https://reactphp.org (which is an event loop runtime, similar to Node), and https://amphp.org (also event loops), and Swoole https://github.com/swoole/swoole-src (coroutine runtime, similar to Go).
Fibers are basically an API that event-loop runtime libs can use so that userland code doesn't need to use promises or generators to run non-blocking operations. Fibers are not useful for php-fpm or swoole users.
Re: PHP 8.1.0
#166Earlier quoted context omitted.
There isn't a language that can replace php in 2021. Javascript doesn't have the size of build-in library. Golang is compiled and limited, blank spaces/tabs will kill a Python program. Ruby /rails is slower. All are harder to host. What could you replace php with? The tales of legacy mistakes holding back php are things with no basis in reality. What legacy mistake holds php back? Method names/parameter ordering? Whe…
Honest question: what are people using if not PHP? Node? Python? The 80% of us who aren’t FAANG and are writing CRUD apps. I’ve tried researching the pros/cons and all I get are low quality listicles. Nobody can tell me why PHP is “bad” or what Python does that PHP can’t. Inconsistent params are the only argument I’ve heard. Which my IDE solves. What about JavaScript splice vs slice. I look it up every time.
Personally, I can't stand writing PHP, because, sure, I can write secure, testable, safe code in any language, including PHP, but, how do I say this, PHP is the only language that feels actively hostile to my attempts to do so. The house style at my current company could be boiled down to "Check 3 times that there are no PHP footguns present in this code. We have been burned before." The developer experience and tooling is far behind comparable languages. I feel like I have to put my sysadmin hat on to fix anything that goes wrong with my environment.
When I write Javascript or Python, I have complaints and issues, but I enjoy writing code. I think PHP, for many programmers, including myself, is just a hostile and unenjoyable experience. If you enjoy writing PHP, I have nothing against you and am certain you will remain employable, there's a lot of PHP out there.
> Honest question: what are people using if not PHP? Node? Python? The 80% of us who aren’t FAANG and are writing CRUD apps.
Python, Node, Java, .NET, Ruby. MVC CRUD apps are pretty similar in all of these (also in PHP). All of those languages (including PHP) power many many many software companies (including FAANG, who use a lot of Java and C++, and Facebook famously was built on PHP).
Re: PHP 8.1.0
#167Earlier quoted context omitted.
There's already kinds of classes that can't be instantiated, why would this specifically be a breaking change?
If by "kinds" you mean abstract classes, yeah. I just checked, there's no special handling for those since requesting them from the container makes no sense. I suppose a constructor could depend on an abstract type and expect an actual implementation, though. I haven't thought about that use case actually, but it's possible to configure a substitute for this case. Other IoC containers may handle this one better, sinc…
Re: PHP 8.1.0
#168Earlier quoted context omitted.
I think you (and to be fair, many people) are missing a huge part of why PHP is still popular. Saying Ruby can replace PHP sounds to me like saying that Ruby can replace Excel. It's fundamentally misunderstanding _why_ it's popular in the first place. I have a HTML page. How do I add a hit counter to it with Ruby? I can do it right now in PHP with zero dependencies and it'll fit in this comment: You are visitor numbe…
This example seems to be a great demo of why people do not like working with PHP. PHP makes the shit method the massively simpler way and the good method much harder. Now you open yourself up to risks like what happens if we accidentally let some user input change the file opened as well as the content written. While with rails, to do basically anything, you already have a full db ready and incrementing a counter usi…
Re: PHP 8.1.0
#169Re: PHP 8.1.0
#170Earlier quoted context omitted.
Once you throw that stuff in K8s, you’re back to 10seconds.
Do you debug your apps in a K8s environment? Why?