What is PHP?
PHP (Hypertext Preprocessor) is a general purpose scripting language that quickly became the de facto server-side language of choice for web developers after its initial release in 1995. Today, a majority of sites on the web run on PHP, due in large part to its popularity as the back-end of content management systems (CMS) like WordPress, Drupal, and Joomla. Whether it’s for a simple blog or a small business owner looking to set up a professional landing page, a CMS is usually the quickest, cheapest way to set up an online presence.
As different as they are, there are some top-level similarities worth considering, especially if you are comparing a PHP back-end to Node.js.
- Simplicity. PHP is conceptually much simpler to use than Node.js. When setting up a server, all you need is a “.php” file with some code wrapped between the
<?php ?>tags, enter the URL into your browser, and you’re done. The statement you wrap between those tags can be as simple as
<?php echo ‘Hello World’; ?>and it will work. Behind the scenes, a web server like MySQL with PHP installed will be able to interpret the file and display your web page in your browser. Setting up a Node.js server, while not difficult, usually requires more lines of code, and a basic understanding of how closures and callback functions work.
- CMS’s like WordPress, Drupal, or Joomla etc.
- Servers like MySQL, SQL, MariaDB, Oracle, Sybase, and Postgresql etc.
- Solution Stacks like LAMP (Linux, Apache, MySQL, PHP)
- Dynamic single page applications (SPAs)
- Front-end technologies like jQuery, AngularJS, Backbone.js, Ember.js, ReactJS etc.
- Server-side technologies like Node.js, MongoDB, Express.js, etc.
- Solution Stacks like MEAN (MongoDB, Express.js, AngularJS)
Keep in mind that neither list is extensive. These are only meant as a starting point to help you get a feel for what you can expect and what keywords you can use to assess the best language for your needs.