Is it just me or PHP's evolution is a bit "too little, too late" for an almost 30-years old language? PHP is not a likable language but it's probably not going away any time soon. Its concept of "one endpoint is one script" is one of its biggest killer features that no other language has been able to deploy in such an accessible manner. Well, Perl and old-style CGI aside, of course. That, and also the fact that it ma…
Isn't ARC over a GC evident in PHP with its opcode cache? I don't think I have run into a PHP dev who thinks PHP has a GC
PHP in 2022
111–120 of 318 posts
Re: PHP in 2022
#112Earlier quoted context omitted.
Because it's flexible and type-safe. You have both productivity and scalability on both syntax level and infrastructure level. It's suitable for 99% of programmers and the businesses for now.
But now you need a ton of time to type things.
For most cases it's enough to just define interfaces, enums and maybe bundle some of this into discriminated unions. Throw in some generics for good measure. That's not a lot of work.
I've seen people do stuff like dependent types, but unless you're writing a library you don't actually need most of the type system's features.
Re: PHP in 2022
#113Earlier quoted context omitted.
There is a garbage collection: https://www.php.net/manual/en/features.gc.php > This section explains the merits of the new Garbage Collection (also known as GC) mechanism that is part of PHP 5.3. > First of all, the whole reason for implementing the garbage collection mechanism is to reduce memory usage by cleaning up circular-referenced variables as soon as the prerequisites are fulfilled. In PHP's implementation, t…
PHP's garbage collector is ARC, unlike any other dynamic language that I know of. ARC is more performant but can introduce memory leaks via circular references, which is probably not a big problem for short-lived scripts anyway.
Yes, PHP has reference counting, but it also has specific process that kicks in to clean up circular references.
Re: PHP in 2022
#114Earlier quoted context omitted.
There is a garbage collection: https://www.php.net/manual/en/features.gc.php > This section explains the merits of the new Garbage Collection (also known as GC) mechanism that is part of PHP 5.3. > First of all, the whole reason for implementing the garbage collection mechanism is to reduce memory usage by cleaning up circular-referenced variables as soon as the prerequisites are fulfilled. In PHP's implementation, t…
PHP's garbage collector is ARC, unlike any other dynamic language that I know of. ARC is more performant but can introduce memory leaks via circular references, which is probably not a big problem for short-lived scripts anyway.
Re: PHP in 2022
#115Hating on PHP almost feels like racism. All the arguments are biased or false. I always get sad after clicking on PHP articles on HN.
Re: PHP in 2022
#116Earlier quoted context omitted.
You mean the most successful enterprise language and 2nd/3rd most used language overall? TBH, I don't think PHP is going in that direction.
No, just in terms of features and syntax. Too bad you can't remove all the bad stuff from php, or any old tech. This was one of my requests to that new search engine posted here a few days ago.. Filter on minimum version of technology. Should actually just be a field in stackexchange.. packages/languages references + version. And a marker to set if the information is obsolete.
You can, it just takes ages and dedication and will cause a lot of friction. See: Python's changes between 2.x and 3.x, .NET's breaking changes between 1.x and 2.x+
Re: PHP in 2022
#117Earlier quoted context omitted.
PHP's garbage collector is ARC, unlike any other dynamic language that I know of. ARC is more performant but can introduce memory leaks via circular references, which is probably not a big problem for short-lived scripts anyway.
How is it more performant? If you have multiple threads than you will get serious atomic operation or other synchronization overhead.
Whole class of problems around multi-threading, mutexes, dead locks etc. are really foreign to PHP developers.
Re: PHP in 2022
#118Hating on PHP almost feels like racism. All the arguments are biased or false. I always get sad after clicking on PHP articles on HN.
[0]: https://insights.stackoverflow.com/survey/2021#technology-mo...
Re: PHP in 2022
#119Earlier quoted context omitted.
Because it's flexible and type-safe. You have both productivity and scalability on both syntax level and infrastructure level. It's suitable for 99% of programmers and the businesses for now.
But now you need a ton of time to type things.
Re: PHP in 2022
#120Is it just me or PHP's evolution is a bit "too little, too late" for an almost 30-years old language? PHP is not a likable language but it's probably not going away any time soon. Its concept of "one endpoint is one script" is one of its biggest killer features that no other language has been able to deploy in such an accessible manner. Well, Perl and old-style CGI aside, of course. That, and also the fact that it ma…
The big guys, who know what they're doing use PHP because it makes devops stupid simple. Throw it on the server, its ready. That's always been PHP's killer feature.