Re: Zend engine bug

From: Date: Thu, 06 Sep 2001 08:59:58 +0000
Subject: Re: Zend engine bug
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-65229@lists.php.net to get a copy of this message
GS>> It cannot do this since l (zval.value.lval) is signed. This also means
GS>> that other functions using using zendi_convert_to_long() are
GS>> busted: modulus and rest of the bitwise implementation.

Oh, that's an old weird story. In short, we have two contradicting
requirements:
1. We have 'long' type, which is signed long
2. We have requirement to support 32-bit values, such as IP addresses, and
bit-wise operations with them.

The result is that hack - otherwise (like, if we promoted this to floats,
as, for example, arythmetic operators do) you could not handle 32-bit
values in no way in the long.
-- 
Stanislav Malyshev, Zend Products Engineer
stas@zend.com  http://www.zend.com/ +972-3-6139665 ext.115




Thread (8 messages)

« previous php.dev (#65229) next »