Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14690 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88367 invoked by uid 1010); 7 Feb 2005 13:50:55 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 88352 invoked from network); 7 Feb 2005 13:50:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Feb 2005 13:50:55 -0000 X-Host-Fingerprint: 83.97.50.139 jan.prima.de FreeBSD 4.6-4.9 Received: from ([83.97.50.139:1745] helo=jan.prima.de) by pb1.pair.com (ecelerity HEAD (r4105:4106)) with SMTP id 44/25-39421-E3277024 for ; Mon, 07 Feb 2005 08:50:55 -0500 Received: from BAUMBART (p508EBAD8.dip.t-dialin.net [::ffff:80.142.186.216]) (IDENT: HydraIRC, AUTH: LOGIN tobi) by jan.prima.de with esmtp; Mon, 07 Feb 2005 13:50:51 +0000 Date: Mon, 7 Feb 2005 14:48:49 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <1297697280.20050207144849@marcus-boerger.de> To: "M. Sokolewicz" CC: internals@lists.php.net In-Reply-To: <20050207130706.25728.qmail@lists.php.net> References: <5247385.20050207140940@vk.kiev.ua> <20050207130706.25728.qmail@lists.php.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] #define for zend engine 2.1 From: helly@php.net (Marcus Boerger) Hello M., as found in SRM the correct code is: #if (PHP_MAJOR_VERSION > 5) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1) regards marcus Monday, February 7, 2005, 2:07:47 PM, you wrote: > Derick Rethans wrote: >> On Mon, 7 Feb 2005, val khokhlov wrote: >> >> >>> is there a way to find out version of zend engine (2 or 2.1)? >>> i need it in the code like this: >>>#if defined(ZEND_ENGINE_2_1) >>> ZEND_VM_SET_OPCODE_HANDLER(zo); >>>#elif defined(ZEND_ENGINE_2) >>> zo->handler = zend_opcode_handlers[zo->opcode]; >>>#endif >> >> >> #if PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1 >> >> works ;-) >> >> Derick >> > wouldn't > #if PHP_MAJOR_VERSION >= 5 && PHP_MINOR_VERSION >= 1 > be better in case this code would ever be used with a hypothetical PHP > version 6? ;) > - tul -- Best regards, Marcus mailto:helly@php.net