Checking Your Configuration with gd_info()

Although the GD library is bundled with PHP, some features (such as JPEG support, for example) require external libraries. You can see which features PHP is compiled to support with the gd_info() function. gd_info() requires no arguments and returns an associative array describing your GD setup. Table 15.1 lists the elements of the array returned by gd_info().

Table 15.1. The Array Returned by gd_info()
ElementDescription
GD VersionThe version of GD used; bundled (2.0.15 compatible), for example
FreeType SupportWhether FreeType fonts are supported (0 or 1)
FreeType LinkageThe library used to provide FreeType functionality; with TTF library, for example.
T1Lib SupportSupport for Type 1 fonts
GIF Read Support ...

Get Sams Teach Yourself PHP in 24 Hours, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.