← All docs

image_type_to_extension()

Returns the filename extension for an IMAGETYPE_* constant.

image_type_to_extension()

function image_type_to_extension(int $image_type, bool $include_dot = true): mixed

Returns the filename extension for an IMAGETYPE_* constant.

Parameters:

  • $image_type (int)
  • $include_dot (bool), default true, optional

Returns: mixed

Availability

Compiled (AOT)Magician (eval)
AvailableNot available yet

No examples yet. Check examples/ and showcases/ for usage patterns.

Internals

For how image_type_to_extension is implemented in the compiler, see the internals page.