In this article, we will learn how to get the PHP version in Php


Example


<?php
    echo 'My PHP version is: ' . phpversion();
?>

Output:

My PHP version is: 7.3.25