PHP function image_type_to_extension()

Availability in PHP 5.0

Get file extension for image type

Parameters

Parameter Data type Default value Note
$imagetype int not One of the IMAGETYPE_XXX constant.
$include_dot bool null Whether to prepend a dot to the extension or not. Default to true.

Return values

string

A string with the extension corresponding to the given image type.

Other resources

Official documentation for image-type-to-extension

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.