php8.5
Home/ Manual/ apache / functions/ apache_get_version

apache_get_version

PHP function Edit on GitHub ✎

(PHP 4 >= 4.3.2, PHP 5, PHP 7, PHP 8)

Fetch Apache version

Description

apache_get_version(): string|false

Fetch the Apache version.

Parameters Parameters

Return Values

Returns the Apache version on successFalseforfailure.

Examples

apache_get_version() example

php
<?php
$version = apache_get_version();
echo "$version\n";
?>

The above example will output something similar to:

output
Apache/1.3.29 (Unix) PHP/4.3.4 

See Also

Source: reference/apache/functions/apache-get-version.xml · from the official PHP manual (php/doc-en)