WordPress
WordPress, based on PHP programming language, is a very good option for quick start, when you don’t offer advanced, complex services from the very beginning. By complex services I mean for instance you don’t need to manage users IDs, which include photo copies of documents such as passports or driving licences. Out of the box WordPress has no good protection for files different than text files. There are some plugins which enable more protections, but they are rather messy. On top of that WordPress has huge base of plugins, also very bad plugins, which are not secure.
However, just to get started with business which doesn’t require very advanced functionality and protection, WordPress especially with WooCommerce plugin is a very good option for start, and as long as you don’t use suspicious plugins, and do regular updates, you are rather safe.
Laravel
Laravel is the most popular framework for PHP programming language. Compared to other PHP MVC frameworks it offers faster speed of development, good amount of plugins, so no need to reinvent the wheel every time you need a new piece of functionality. It is possible, that Laravel will offer all what you need. However, maintenance can be tricky. That is due to the fact, that PHP language is quickly evolving – probably in good direction. It means, that you would be forced to upgrade Laravel rather often, depending how often you need to update PHP on your server and PHP may depend on server software. All this means, that Laravel maintenance and development can be rather more expensive than anticipated initially.
The situation with maintenance and development of Laravel can be even worse if your online service is build as monolith, that is – not as Web API, with separated front end (user interface) and server side which communicates with front end via REST API. From my point of view, the front end functionality which comes with Laravel is rather too complex than it should be. Why not just have separate front end, which gets from back end (server, Laravel) all needed info via REST API, so your front end (users, customers interface) doesn’t depend at all on Laravel and PHP as such? I am not surprised, that many businesses prefers to keep front end (based usually on REACT) and back end option totally separate, except REST API communication. And Laravel has a very good support for REST API, out of the box.
Django
Django is something like Laravel, but build on Python programming language, rather much more advanced than PHP. In general Django is a bit more secure than Laravel. Big advantage of Django, except faster development, is fact that it can use all libraries offered by Python. Many of the libraries offers scientific, statistical and analytical functionality, and very advanced support for Machine Learning, which you cannot find in PHP. So, if you need such advanced functionality, it is already in Django/Python, no need to create it from scratch.
Also, what I found also very useful, Django – thanks to Python language – offers more advanced data structures, which makes development faster.
FastAPI
Compared to Django REST API Framework, which is synchronous, FastAPI offers asynchronous calls execution and can be usually significantly faster than the Django option. In fact, FastAPI as almost as fast as Node.js option, but uses Python, which is excellent option if you expect more advanced data processing/modification before you will send response. So, if there is option between Django REST API Framework and FastAPI definitely FastAPI is better choice.
ASP.NET Core 6/7/8 Web API
Most probably the best choice for Web API online applications, however this option maybe shouldn’t be here, mainly due to huge advantage of C# over PHP and Python. ASP.NET Core via Nuget packages, provides all advanced features you would expect, and development is rather faster, than compared to development in frameworks provided by PHP or Python, and the same can be said about quality of documentation for ASP.NET Core. On top of that you can use Visual Studio (Windows version), which is probably the best existing IDE. In my opinion ASP.NET Core will be replacing PHP and Python solutions, maybe except some niches, like Machine Learning, Data Science etc, where Python shines.
One more thing
Having said all the above, in general, what matters, is not this or that language, but stability, reliability and low cost of development and maintenance of an online service. My estimation is, that on average PHP Laravel takes about 20% of maintenance time just to make Laravel versions in sync with PHP versions in sync with server software, and this is true for all frameworks based on PHP, with exception maybe of WordPress. During upgrade/update time, you do not develop new features for customers, or don’t improve existing features, you are busy with getting Laravel (or other framework)/PHP/server software versions in sync.
With Django and Python – due to longe times of versions support – you have more time for development, adding new features, for expansion. The screenshots show support times for PHP and Python languages. And, Python looks better – on average you have more time, before you need to upgrade Python language version.
On average, for simple online projects PHP can be probably better option, you can use for instance PHP MVC CodeIgniter instead of Laravel, but for more complex and advanced projects definitely Django/Python is a better option, especially if you may need some kind of Machine Learning. Or, even better – ASP.NET Core, preferably in Azure environment.
PHP versions support: https://www.php.net/supported-versions.php
Python versions support: https://devguide.python.org/versions/