Re: [PHP-DEV] #define for zend engine 2.1

2005-02-07 Thread 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

Re: [PHP-DEV] #define for zend engine 2.1

2005-02-07 Thread messju mohr
On Mon, Feb 07, 2005 at 02:07:47PM +0100, M. Sokolewicz wrote: [...] > 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 no, it wouldn't. it would work with 6.1, but not with 6.0 mes

Re: [PHP-DEV] #define for zend engine 2.1

2005-02-07 Thread Derick Rethans
On Mon, 7 Feb 2005, M. Sokolewicz wrote: > > #if PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1 > > > > works ;-) > > 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? ;) No - then it wouldn't be

Re: [PHP-DEV] #define for zend engine 2.1

2005-02-07 Thread 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_handler

Re: [PHP-DEV] #define for zend engine 2.1

2005-02-07 Thread Derick Rethans
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->