Re: How to test phpversion() and function existence ?
| From: | Olivier Cahagne | Date: | Fri, 24 Nov 2000 21:29:56 +0000 |
| Subject: | Re: How to test phpversion() and function existence ? | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-39107@lists.php.net to get a copy of this message | ||
> > - the existence of a function ? For example, does this PHP setup has
> > imap_open() ability ?
>
> function_exists('imap_open')
Thanks, I was using it this way function_exists("imap_open") or
function_exists("imap_open()") and got confused the manual examples.
Maybe adding an example in the manual can be useful ?
> > I can test PHP 3 or 4 with floor(phpversion()) but testing 4.0.2 is
> > rather more complicated if you include future test compatibility with
> > v.5, v.4.0.12 on several digits, maybe pl1, etc. is there another PHP
> > version value that can be easily test against ?
>
> Have a look at:
>
>
http://cvs.horde.org/cvsweb.pl/~checkout~/test.php?rev=1.25&cvsroot=horde&hi
deattic=1&sortbydate=0
Thanks again, I checked IMP code knowing there was something like that but
forgot to check Horde code.