Re: PHP version and Zend API Number
| From: | Michael Wallner | Date: | Tue, 20 Mar 2007 12:17:24 +0000 |
| Subject: | Re: PHP version and Zend API Number | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-28479@lists.php.net to get a copy of this message | ||
Michael B Allen wrote:
> Hi,
>
> Is there a way to get the version of the PHP binary that loaded an
> extension from within the extension? I don't mean the PHP version the
> extension was compiled with (PHP_VERSION), I mean the version of the
> PHP binary itself?
>
> Can I call the phpversion function from within an extension?
>
> Similarly is there a way to get the zend API version of the PHP binary
> (not the version the extension was compiled with)?
mike@honeybadger:~/cvs/php-5.2$ grep -E 'version.*\);' Zend/*.h
Zend/zend_API.h:ZEND_API char *zend_get_module_version(char *module_name);
Zend/zend_extensions.h:void zend_append_version_info(zend_extension *extension);
Zend/zend.h:ZEND_API char *get_zend_version(void);
You could query ext/standard for the PHP version, everything else should be self explanatory.
Regards,
--
Michael