|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2002-10-25 13:06 UTC] leon at leonatkinson dot com
 Please add php_image_type_to_mime_type() to the documentation.
array image_type_to_mime_type(int imagetype)
Convert internal image_type to mime type
<?
    //returns "image/gif"
    print(image_type_to_mime_type(IMAGETYPE_GIF));
?>
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 19:00:02 2025 UTC | 
It's currently documented BUT there is a discrepancy. According to the php4 proto, it returns an array. According to the code, docs and examples, it returns a string. The proto in image.c needs to be updated. Opening as a graphics related bug. php4/ext/standard/image.c {{{ proto array image_type_to_mime_type(int imagetype) ... ZVAL_STRING(return_value, (char*)php_image_type_to_mime_type(Z_LVAL_PP(p_image_type)), 1);