Re: function_exists() user note

From: Date: Wed, 29 Nov 2000 00:00:16 +0000
Subject: Re: function_exists() user note
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-39431@lists.php.net to get a copy of this message
This is where I'd like to see every module have a version of it's own, that can be queried by PHP. module_version("gd"), or module_features("gd")...this will start to come in really handy as more and more modules are released outside the scope of the PHP cvs tree... On Mon, 27 Nov 2000, Hartmut Holzgraefe wrote the following to...: > Jani Taskinen wrote: > > You could always use imagetypes() function to check which image-types > > are supported. But to be consistent the functions shouldn't be defined if > > the imagetype isn't supported, IMHO. > > > > Should this be changed or not? > > i changed it the other way out some time ago as a lot of people seemed > to have problems with functions not being available although they had > compiled the appropriate extension in > > IMHO the availability of a function should only depend on whether an > extension is enabled or not, every function within an extension that > does not work due to a missing or unsupported feature should produce > a warning and return something that indicates an error condition > > that's the way things are today and from my personal perceptions it > seems to work as i haven't seen any "i have gd compiled in but > ImageGif() > reports 'undefined function ...'" messages lately > > so function_exists() should not be used to determine the availability > of a feature within an extension but only to detect whether an extesnion > as a whole is there or not or to check for the right version of an > extension > > any extension that provides features and functions not working in any > constellation should provide other means to report so, as gd does with > imagetypes() > >

« previous php.dev (#39431) next »