PHP is one of the earliest programming languages to become popular across the internet. Originally it was designed by it's creator to be a set of scripting shortcuts for maintaining his personal homepage and grew organically from there. This humble beginning explains a number of frustrating quirks and security issues PHP seems to struggle with. Development done with PHP can look wildly different project to project, developer to developer depending on the framework being used and personal preferences. This means you might have trouble finding a new developer who can deal with the work done in the past.
One of PHP's most popular projects is the Wordpress CMS. Hundreds of blogs, personal web sites and blogs have been made with Wordpress. So is it the best choice for a business website or web application? Over the years Wordpress has been at the center of a number of security breaches and exploits. Not all of these were explained by user error or carelessness. PHP's design and underlying server infrastructure can give web traffic direct, system level access in some unfortunate cases. Locking down these potential exploits can be a time consuming task, and badly designed code can easily open up new problems.
Over the years a lot of effort has been directed at closing these holes, but there are still a lot of legacy products and old code that can introduce problems in projects.
PHP has a long history of working with the web and making full-featured websites. It has a host of open source projects you can build on top of to save time. It's loose coding patterns and wealth of different ways to do the same thing gives you a lot of options. Because of this, PHP has some of the most mature and popular CMS's available. Nothing is quite as user-friendly and powerful for an end user, or site administrator as the projects PHP has to choose from.
We like CraftCMS, which gives you powerful editing tools for designing a webpage that doesn't feel like everything else out there. It is more secure and better designed than Wordpress, but doesn't let you get away with as much. Giving your users the functionality they want may be a bigger lift.
PHP is also closer to the operating system and while that does introduce security concerns, it doesn't require as much optimization to run well. Given the power of modern computers and server hardware, this is not a large concern. Security and maintainability may be a larger priority to most projects.
Designing a secure and well-formed software product with PHP can be a challenge. While there are a number of popular frameworks, they will constrain you the same way a large framework like Django will, and may make your project harder to understand to multiple developers.
If you are designing a new project that does not need to reuse legacy code, we recommend using other technology stacks. Our favorite is Python which has a much cleaner syntax, more powerful open source libraries, and the same great support with 3rd party APIs from payment gateways to social media.