note 78227 deleted from function.basename by ezyang

From: Date: Wed, 03 Oct 2007 23:19:44 +0000
Subject: note 78227 deleted from function.basename by ezyang
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-131052@lists.php.net to get a copy of this message
Note Submitter: michael at dmgx dot com Reason: useless ---- If you need the suffix try this. baseSuffix ($path) { return array_pop( explode('.', $path))); } Here's a test for common image format extensions /** * @return boolean */ function typeOfImage( $path ) { return in_array( array_pop( explode('.', $path)), array('gif', 'jpg', 'jpeg', 'png')); }

« previous php.notes (#131052) next »