Open In App

PHP | gd_info() Function

The gd_info() function is an inbuilt function in PHP which is used to retrieve the information about the currently installed GD library. This function returns the information about the version and capabilities of the installed GD library.

Syntax:



array gd_info( void )

Parameters: This function does not accept any parameter.

Return Value: This function returns an associative array contains information about installed GD library.
The information returned by this function are listed below:



Below program illustrate the gd_info() function in PHP:

Program:




<?php
var_dump(gd_info());
?>

Output:

array(12) { 
    ["GD Version"]=> string(26) "bundled (2.1.0 compatible)" 
    ["FreeType Support"]=> bool(true) 
    ["FreeType Linkage"]=> string(13) "with freetype" 
    ["GIF Read Support"]=> bool(true) 
    ["GIF Create Support"]=> bool(true) 
    ["JPEG Support"]=> bool(true) 
    ["PNG Support"]=> bool(true) 
    ["WBMP Support"]=> bool(true) 
    ["XPM Support"]=> bool(true) 
    ["XBM Support"]=> bool(true) 
    ["WebP Support"]=> bool(true) 
    ["JIS-mapped Japanese Font Support"]=> bool(false) 
} 

Related Articles:

Reference: http://php.net/manual/en/function.gd-info.php

Article Tags :