When comparing PHP vs Bootstrap, the Slant community recommends Bootstrap for most people. In the question“What are the best web design tools?” Bootstrap is ranked 11th while PHP is ranked 26th. The most important reason people chose Bootstrap is:
Ranked in these QuestionsQuestion Ranking
Pro One of the most common languages
According to the 2015 Stack Overflow Developer Survey (26,086 people surveyed), PHP was the 5th most popular/used language at 29.7%.
Pro Lots of tutorials online
Pro Used by most common CMS platforms
Many clients are looking for an easy-to-update web site that's flexible and free. Drupal and Wordpress fill those needs very well.
Pro Most prominent language for web applications
Part of the de facto standard web application stack.
Pro Great third-party package manager
PHP standard library is somewhat subpar, but if you need plugins, language features, composer has them all( you can even puzzle together a custom framework from composer).
Since 7.x was released, PHP has become a pretty fast language.
Pro Lots of PHP frameworks available which help with development
PHP people love frameworks, and with frameworks such as Laravel, you can build a web app or API really fast (Facades, ORMs, scaffolding etc.)
Pro Great documentation
Pro Consistency across browsers
Pro Responsive design philosophy
Bootstrap is developed to be instantly compatible with all sizes of screens, so you don't have to worry about which device the user is accessing your site from. Yet if you prefer, you can disable responsiveness of Bootstrap.
Pro Well documented
Documentation is thorough, well organized and full of live examples and templates ready for use. Every component and every part of the framework is explained and covered in depth.
Pro Custom builds
Pro Designed to get a site running quickly
Bootstrap is designed to get a site up and running quickly. Each of it's components is pre-configured to help with getting a site up and running quickly.
Pro Great community
Bootstrap is very popular and has a large community. As a result of this it is much easier to find help with anything you might need. This also gives you a treasure trove of prebuilt components to use and add to your site.
Pro Supports responsive embeds
Allows easily adding responsiveness to
Pro Easily make professional looking websites
Bootstrap makes it easy to learn how to make professional looking websites. It can even make code junkies semi-enjoy design.
Bootstrap can be customized in a variety of ways. Either by overriding the default CSS styles with new CSS styles or by editing the
.scss Bootstrap files.
Pro A wide variety of themes available
To help you avoid the "Bootstrap look", there are many resources that provide a great selection of themes and templates for Bootstrap.
Pro One of the most popular ones
Ranked on GitHub as the most starred CSS repository.
Con Poorly designed language
Despite its widespread use, PHP is generally looked upon poorly from a design point of view. The consistency of function names and function argument order, lazily and borderline non-functional implementation of object oriented programming, can only receive requests via POST methods, slow version adoption (the PHP you learn right now may not work on every webserver you'll work on), and a focus on "hacking things together" rather than "doing it right". These are all very common complaints when it comes to working with PHP. While not a bad language to learn, PHP is not at all a good language to learn first, as it will probably teach bad habits.
Con Immense catalog of insecure frameworks
The most serious security problems in websites on the web today are almost universally found in popular PHP frameworks, CMS platforms, libraries and code samples, almost all stemming from poor language design, bad tutorials and awful resources.
Con After python, probably one of the worst languages ever
Con Poorly designed language, awful syntax & luckily on the decline
Nobody in their right mind is using PHP for new software, if you decide to learn it as your first language you'll be stuck working in teams with old developers who have had no interest in the computer programming field since they landed their first job while maintaining some 2000 era archaic website codebase.
Con Most tutorials are out of date
A lot of very bad tutorials are still widely circulated among beginners, and these tutorials teach very poor programming practices.
Con Most resources are poorly-written
Few resources exemplify the "correct" or secure use of features.
Con Interpreter being too permissive
If you forget the dollar sign, the variable name will be converted to a string.
Con Large file size out of the box
Bootstrap has an out-of-the box filesize of ~276K, which is pretty large considering it's just CSS. Most of those styles aren't even used in 90% of web pages built with Bootstrap. By only including the required styles it can be trimmed by 70%-75%.
Con Too many classes
Bootstrap's over-reliance on HTML classes for styling can get very messy very quickly. There's also an overabundance of DOM elements which have a lot of classes and are more often than not nested inside DOM elements with even more classes. This gets problematic down the line because the maintainability of the project gets harder when the project starts to get large.
Con Websites can start to look the same
If the initial Bootstrap colors and styles are not changed or edited, different websites start looking the same even if they have nothing to do with each other and they are made by different developers.
Con Hard to customise
It's quite hard to customise Bootstrap using pre-processors like SASS and LESS, the only real flexibility is with typography and colours.