Q:

Write a PHP script to print current PHP version

0

Write a PHP script to print current PHP version.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

<?php
echo 'Current PHP version : ' . phpversion();
  // prints e.g. '2.0' or nothing if the extension isn't enabled
  echo phpversion('tidy')."\n";
?>

Sample Output:

Current PHP version : 7.0.15-0ubuntu0.16.04.4

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now