How to determine the current PHP version
A dynamic website consists of several components that generate an individual response after each request and send it to the visitor. Most Content Management Systems (CMS) and web designers use PHP as the programming language - alternatives like Python or Perl, on the other hand, are usually only used in commercial and complex projects.
Like any other language, PHP evolves continuously over time to incorporate new features and address newly discovered security vulnerabilities. For this reason, it is essential in some situations to determine the current version - the difference between PHP 5.6 or PHP 7 can significantly impact the functionality and performance of a CMS such as WordPress or Joomla.
PHP - the programming language for the internet
The abbreviation originally stood for Personal HomePage Tools - from version 3 onwards, the letters represent the recursive acronym PHP: Hypertext Preprocessor. It is an interpreter programmed in the very efficient but abstract language C. In contrast to this, PHP is a scripting language that uses clear and relatively easy-to-interpret source code. A program or script consists of a sequence of written commands that are executed in order. It does not require conversion by a compiler into machine-readable code - this task is handled by the interpreter, which serves as the interface between the program and the processor. This allows users to quickly and comfortably edit, modify, and customise the scripts with a simple text editor.
Due to its versatility and user-friendly interface, PHP has become a de facto standard for the internet when used in conjunction with a web server like Apache 2 or NGINX, as well as a database server such as MySQL or MariaDB. This allows for the rapid and convenient development of individual websites that can be graphically customised or enhanced in functionality through plugins.
Secure web hosting with the latest PHP version now
Go to PHP Web Hosting Comparison
PHP - a rather accidental development
Like many standards in modern IT - such as the Linux Kernel - PHP originated from a simple project that was quickly picked up, adapted, and further developed by numerous other individuals due to its versatility and suitability. Originally intended to replace a collection of Perl scripts to help programmer Rasmus Lerdorf manage his website, the code released under a free license proved to be so flexible and adaptable that it was perfect for the conditions in the emerging e-commerce industry of the late 90s.
Why is the version crucial?
Typically, a change in the first number of a software version signifies a "generation leap" - implementing new features, enhancing security and performance, and simplifying usability. While programmers usually ensure compatibility with previous versions, this is not always possible. Due to internal processes and some structural flaws in version 6, the language's developers also decided to jump directly from PHP 5.6 to PHP 7.
PHP version 5.6 dates back to 2014, with official support ending on 1.1.2019. The critical issue is that - except for significant exceptions - no security updates are provided. As a result, PHP 5.6 is generally considered unreliable and should be promptly replaced with PHP 7.
Finding out the used version
There are numerous ways to determine the current version. The simplest method is through the web interface of the provider or host. Accessing the webspace, a VPS hosting, or a Dedicated Server also allows for creating a simple script named show-php.php containing the following code:
echo 'PHP Version:'. phpversion();
Once the file is created in the root directory of a domain, the current version can be easily verified. The query is simply made by entering the address:
http::/Domain.TLD/show-php.php
Updating the PHP Version
For your own Virtual Private Server (VPS hosting) or Dedicated Server, it is sufficient to update the packages. No Linux distribution supports outdated versions anymore - regular updates of the operating system are essential for security and compatibility with existing software.
Secure web hosting with the latest PHP version now
Compare PHP Web Hosting
Photo: simplu27 from Pixabay
Write a comment
- Webhosting
- Webspace
- PHP
Tags for this article
More web hosts
More interesting articles
Is it worth using a Content Delivery Network (CDN) for website operators?
Despite the increasing amount of data generated by more frequently used high-resolution images and HD videos, content de...
Affiliate Marketing and Partner Programs for Hosting Providers
The partner programs are an easy and usually inexpensive way for web hosting providers to turn the satisfaction of their...