DelphiFAQ Home Search:
General :: Programming :: php
Find help with php (PHP: Hypertext Preprocessor), an open source, server-side, HTML embedded scripting language used to create dynamic Web pages.

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Featured Article

Get information about php version and configuration

Question:

How can I find out which version of php is installed on my server?

Answer:

Use the php function phpinfo() which delivers lots of information about your server's configuration. Typically this will look like below. The function will put out the information HTML encoded when called within a web page and as plain text when using the CLI mode.

There is a configuration variable expose_php which decides whether PHP will expose the fact that it is installed on the server (e.g. by adding its signature to the Web server header). If this variable is set to off then see less information.

If you're just interested in the version number, you can call phpversion() instead. This function returns version information as a string.

<?php
   phpinfo();
 
   // prints e.g. 'Current PHP version: 4.1.1'
  echo 'PHP version: ' . phpversion();
 ?>
 

Generated 12:02:04 on Oct 20, 2017