Libvirt Functions
PHP Manual

libvirt_version

(php-libvirt 0.1)

libvirt_versionGet libvirt version

Description

array libvirt_version ([ string $type= null ] )

Provides two information back, libvirt is the version of the library while type will be the version of the hypervisor type against which the library was compiled

Parameters

type

Hypervisor type against which the library was compiled. If type is NULL, "Xen" is assumed.

Return Values

Associative array containing version information. It cointains these members:

Examples

Example #1 libvirt_version() example

Get version of libvirt and xen driver.

<?php

    $version
=libvirt_version("xen")
    
print_r($version);

?>

The above example will output something similar to:

Array
(
    [libvirt.release] => 0
    [libvirt.minor] => 6
    [libvirt.major] => 0
    [type.release] => 1
    [type.minor] => 0
    [type.major] => 3
)


Libvirt Functions
PHP Manual