3 ms·
> 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 ap
by elondaits 5y ago
> 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, and it'll work.
If you don't want to maintain the server you can get a managed VPS and things will probably run and continue to run for years without any intervention on your part, even through software updates.
... The exception is that PHP breaks backwards compatibility often, but even then most hosting services let you choose between different PHP versions which they'll maintain for a while. Installing older versions from package managers is very easy as well.
That said, I don't think this is a strong reason to use PHP in most projects. I do think it could be one of the strongest ones to justify its use in some specific projects.
- cntainer 5y agoHaven't thought of this, I guess for some people it makes sense especially for small, personal projects. I'm more biased towards startups with a plan to grow or larger projects. 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.