note 37180 deleted from function.imagetypes by cmb

From: Date: Mon, 17 Oct 2016 11:35:06 +0000
Subject: note 37180 deleted from function.imagetypes by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-206905@lists.php.net to get a copy of this message
Note Submitter: enyo ---- Why not use this function? <?php function getSupportedImageTypes() { $aSupportedTypes = array(); $aPossibleImageTypeBits = array( IMG_GIF=>'GIF', IMG_JPG=>'JPG', IMG_PNG=>'PNG', IMG_WBMP=>'WBMP' ); foreach ($aPossibleImageTypeBits as $iImageTypeBits => $sImageTypeString) { if (imagetypes() & $iImageTypeBits) { $aSupportedTypes[] = $sImageTypeString; } } return $aSupportedTypes; } ?>

« previous php.notes (#206905) next »