Re: Is there any value in having functions defined which do nothing.
| From: | Stig Bakken | Date: | Tue, 10 Jul 2001 21:04:08 +0000 |
| Subject: | Re: Is there any value in having functions defined which do nothing. | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-59618@lists.php.net to get a copy of this message | ||
yes it would be better to not define it. that has been "the way" in php 3
and 4. only back in v2 we had those "blah is not enabled" messages.
- Stig
On Tue, 10 Jul 2001, Jeremy Bettis wrote:
> Why is the habit of PHP modules to define functions that might or might not
> work depending on library dependancies.
>
> For example, ImageCopyResampled gives this error if libgd < 2.0:
> "ImageCopyResampled required libgd 2.0"
>
> But that makes this code useless:
>
> if (function_exists('ImageCopyResampled')) {
> // doit the good way
> ImageCopyResampled(.....);
> } else {
> ImageCopyResized(.....);
> }
>
> My point was to have the php script work regardless of what version of php
> was installed, but even if the function exists, it might not work. Wouldn't
> it have been better if the function just didn't exist at all?
> --
> Jeremy Bettis
> jeremy+phpnews@deadbeef.com
>
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>