Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14687 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25770 invoked by uid 1010); 7 Feb 2005 13:07:06 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 25731 invoked by uid 1007); 7 Feb 2005 13:07:06 -0000 Message-ID: <20050207130706.25728.qmail@lists.php.net> To: internals@lists.php.net Date: Mon, 07 Feb 2005 14:07:47 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050106 X-Accept-Language: en-us, en MIME-Version: 1.0 References: <5247385.20050207140940@vk.kiev.ua> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 62.131.2.67 Subject: Re: [PHP-DEV] #define for zend engine 2.1 From: tularis@php.net ("M. Sokolewicz") 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