|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-07-14 14:13 UTC] cmb@php.net
-Status: Open
+Status: Verified
-Assigned To:
+Assigned To: cmb
[2016-07-14 14:13 UTC] cmb@php.net
[2016-07-14 15:31 UTC] cmb@php.net
[2016-07-14 15:31 UTC] cmb@php.net
-Status: Verified
+Status: Closed
[2016-07-14 15:38 UTC] cmb@php.net
[2016-07-14 15:48 UTC] cmb@php.net
[2016-10-17 10:11 UTC] bwoebi@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 09:00:01 2025 UTC |
Description: ------------ The imagetypes function will not return a bitmask value for if WEBP support is available, which is available with read/write since PHP 5.5. All other formats are currently covered (except for GD which is implied, and XBM which is implied by XPM). Here's the code from PHP7 to confirm... /* {{{ proto int imagetypes(void) Return the types of images supported in a bitfield - 1=GIF, 2=JPEG, 4=PNG, 8=WBMP, 16=XPM */ PHP_FUNCTION(imagetypes) { int ret=0; ret = 1; #ifdef HAVE_GD_JPG ret |= 2; #endif #ifdef HAVE_GD_PNG ret |= 4; #endif ret |= 8; #if defined(HAVE_GD_XPM) ret |= 16; #endif if (zend_parse_parameters_none() == FAILURE) { return; } RETURN_LONG(ret); } Personally I'd recommend just dropping the function, given that GD-Info returns details in its report and you can just use function_exists. Removing a function and a set of constants may lower the PHP overhead slightly. But if it stays it should be consistent with what PHP can do.