Home > PHP > Function > PHP Options/Info > phpversion()

phpversion()

phpversion - Gets the current PHP version

Syntax

string phpversion (string $extension)

Arguments

  • extension - An optional extension name.

Description

Returns a string containing the version of the currently running PHP parser or extension.

Version

PHP 4, 5

Return value

If the optional extension parameter is specified, phpversion() returns the version of that extension, or FALSE if there is no version information associated or the extension isn't enabled.