Re: How to test phpversion() and function existence ?
| From: | Jon Parise | Date: | Fri, 24 Nov 2000 18:32:28 +0000 |
| Subject: | Re: How to test phpversion() and function existence ? | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-39105@lists.php.net to get a copy of this message | ||
On Fri, Nov 24, 2000 at 06:29:20PM +0100, Olivier Cahagne wrote:
> - the existence of a function ? For example, does this PHP setup has
> imap_open() ability ?
function_exists('imap_open')
> - the version number, comparing phpversion() and "4.0.2", when
> there're functions that only exist with 4.0.2 like wordwrap().
function_exists('wordwrap')
> 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&hideattic=1&sortbydate=0
--
Jon Parise (jon@csh.rit.edu) . Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/ : Computer Science House
Member