Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28479 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65513 invoked by uid 1010); 20 Mar 2007 12:17:29 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 65498 invoked from network); 20 Mar 2007 12:17:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Mar 2007 12:17:29 -0000 X-Host-Fingerprint: 80.123.98.46 unknown Received: from [80.123.98.46] ([80.123.98.46:4912] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C7/60-61497-7D0DFF54 for ; Tue, 20 Mar 2007 07:17:28 -0500 Message-ID: To: internals@lists.php.net Date: Tue, 20 Mar 2007 13:17:24 +0100 User-Agent: Thunderbird 1.5.0.9 (X11/20070103) MIME-Version: 1.0 References: <20070319201618.082eac46.mba2000@ioplex.com> In-Reply-To: <20070319201618.082eac46.mba2000@ioplex.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Posted-By: 80.123.98.46 Subject: Re: PHP version and Zend API Number From: mike@php.net (Michael Wallner) 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