ID: 20094 Updated by: [EMAIL PROTECTED] -Summary: image_type_to_mime_type() missing from docs Reported By: [EMAIL PROTECTED] -Status: Closed +Status: Open -Bug Type: Documentation problem +Bug Type: *Graphics related PHP Version: 4.3.0-pre1 New Comment:
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); Previous Comments: ------------------------------------------------------------------------ [2002-11-07 20:13:53] [EMAIL PROTECTED] Function is added at least in online help. ------------------------------------------------------------------------ [2002-10-25 13:06:51] [EMAIL PROTECTED] 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)); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20094&edit=1