Earlier quoted context omitted.
> Compare this to, say, the bootstrap time for Python or Java The bootstrap time for a request exists only in a web framework, not in the language. And since you can have the extremes of pure fastcgi or uwsgi, or full Django, you need a more specific comparison.
Java has a high bootstrap time for the JVM. PHP doesn't have that, but the "tear down everything" model might imply a high bootstrap time depending on the framework, because things need to be bootstrapped per request that are already there in Java.
PHP in 2022
151–160 of 318 posts
Re: PHP in 2022
#152Hating on PHP almost feels like racism. All the arguments are biased or false. I always get sad after clicking on PHP articles on HN.
A lot of frustration with PHP comes from using it a lot (not ignorant) and not enjoying it. They want to be better programmers than they language would allow.
Granted, PHP has improved a lot since I last used it (2004). I think a lot of the arguments were true, but are no longer valid.
Re: PHP in 2022
#153I've done some fairly big stuff, in PHP.
Works a treat. Fast, solid, secure. Widely-supported, great way to have a high "bus factor," because so many people can understand it.
All that said, I never did really like the language. It has always been a necessary evil, for me.
Re: PHP in 2022
#154I started my career in PHP ~15 years ago trying to do OOP in PHP 4.x. That was "fun". In the meantime I switched to other stacks but I've been keeping a distant eye on how PHP was evolving and I still am involved with PHP projects to a certain degree, though rarely at code level. I really appreciate the effort put into fixing most of the things I hated about the language, though at times it felt like the language and…
> Why would I choose PHP when starting a greenfield project? LAMP stacks are super ubiquitous, open source, cross-platform, and in many cases to deploy your app you don't need to configure anything, add any modules or dependencies... just copy your files in place. A small project (e.g. contact form with a CAPTCHA) could be just a small file named whatever you want, which you can place anywhere in the public directory…
In my case if the hosting provider doesn't have something like DigitalOcean's droplets I'll still rely on docker compose instead of the default stack deployed on the system whatever stack I'm choosing. But yeah that's raising the bar too much for most people especially for a couple of scripts or pages.
Re: PHP in 2022
#155Earlier quoted context omitted.
More like thirteen. Apparently I misread the comment I was responding to as "for two years some time ago". Now I'm not sure why someone would have chosen PHP for such a task two years ago.
Sorry for unclear phrasing. I meant I used php from 2018-2020. And honestly I don't know why to use php for the task. I started at the company 2018 and the tech stack was given. A good compensation and praising like "PHP has changed and now supports types etc." let me take the opportunity. My bad, because it took me a lot of time. I needed to do benchmarks were actually PHP turned out to have comparable performance i…
Re: PHP in 2022
#156Is 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…
Re: PHP in 2022
#157I started my career in PHP ~15 years ago trying to do OOP in PHP 4.x. That was "fun". In the meantime I switched to other stacks but I've been keeping a distant eye on how PHP was evolving and I still am involved with PHP projects to a certain degree, though rarely at code level. I really appreciate the effort put into fixing most of the things I hated about the language, though at times it felt like the language and…
> I'm curious what is the value proposition of the latest PHP version(s). I think more and more people have started to realise that typed languages make better, more reliable software. The incremental additions to PHP's type system are just a move towards this, I think and can be seen in other languages such as Typescript. I'm just not a fan of dynamically typed languages anymore, even for small scripts. > Why would…
Sure— thinking you’re going to save time writing more complex applications by avoiding boilerplate is flatly wrong. However, if boilerplate would be a double-digit percentage of your code, you probably will save time avoiding it because any unlikely dynamic typing issues will be easily resolved. But if it’s small enough to be inconsequential and you’re in the typed-language zone, why not use your typed language, anyway?
Avoid dogma and use the right tool for the job, I say.
Re: PHP in 2022
#158Hating on PHP almost feels like racism. All the arguments are biased or false. I always get sad after clicking on PHP articles on HN.
I would argue that racism comes from ignorance and insecurity. A lot of frustration with PHP comes from using it a lot (not ignorant) and not enjoying it. They want to be better programmers than they language would allow. Granted, PHP has improved a lot since I last used it (2004). I think a lot of the arguments were true, but are no longer valid.
I also suspect a lot of the people complaining about X language/platform/ecosystem are not even using them in production environments judging by their very idealized view on building software.
Re: PHP in 2022
#159I learned to use php when I was like 14. I’m 27 now and still derive such joy when making my own little projects that will never see the light of day. I try to be humble as far as just being a php trash coder, but I don’t feel too ashamed honestly, as it is the most mainstream thing really. I will always be grateful to php for being accessible and yeah, I guess easy. I don’t know why php is the only one I really stuc…
In a world where everything is fast becoming a JavaScript front end with “some” backend and with the improvements PHP has seen in recent years I don’t see why you’d consider yourself a “lowly” php developer. I’m mainly a C# guy myself as far as the backend goes, but I don’t view PHP as being bad in 2022. I think people who do are stuck in the past to be perfectly honest. It’s sort of like disliking JavaScript because…
PHP has always been considered as a somehow bad language in all corporations I've worked at to date. The same applies to other script languages such as python, ruby or nodejs - but PHP was the most undervalued of them all.
It's kinda strange because the language is really performant and relatively easy to use.
Maybe that's exactly why the big brain architects don't like it. They do tend to love things correlated with pointless complexity after all
Re: PHP in 2022
#160I started my career in PHP ~15 years ago trying to do OOP in PHP 4.x. That was "fun". In the meantime I switched to other stacks but I've been keeping a distant eye on how PHP was evolving and I still am involved with PHP projects to a certain degree, though rarely at code level. I really appreciate the effort put into fixing most of the things I hated about the language, though at times it felt like the language and…
> Why would I choose PHP when starting a greenfield project? For me, the answer is Laravel.