Feels like a major bug to me... this got into a release? :-/ --Wez.
On Tue, 5 Oct 2004 13:30:00 +0300 (EEST), Tomas Kuliavas <[EMAIL PROTECTED]> wrote: > php-gettext classes (http://savannah.nongnu.org/projects/php-gettext) > extract four bytes from gettext translation header, convert them to > integer and use it to detect byteorder. > > classes compare > (int) ((222) | (18<<8) | (4<<16) | (149<<24)) with (int)0x950412de > and > (int) ((149) | (4<<8) | (18<<16) | (222<<24)) with (int)0xde120495 > > they work with php versions older than 5.0.2. > > I don't know if it is a bug. I think this is only undocumented change in > php behavior. Or I missed some docs. > > If you are planning to keep such php behavior, just close > http://bugs.php.net/bug.php?id=30315. I think, I've already fixed > php-gettext scripts and they will work until you decide to stop > overflowing in (int) ((222) | (18<<8) | (4<<16) | (149<<24)). If you are > not planning to keep such behavior, then you have one bug filed in your > bugtracker. > > > Do you consider this a bug? How are you relying on these overflown > > numbers? > > > > Andi > > > > > > At 12:50 PM 10/4/2004 +0200, M. Sokolewicz wrote: > > > >> You might want to ask this on the internals list (cc'd) > >> > >> > >> Tomas Kuliavas wrote: > >> > >>> When php 5.0.2 converts float to integer, it uses biggest possible > >>> integer value. Other php versions overflow and use negalive integers. > >>> How to reproduce it: > >>> echo (int)0xde120495; Expected result (php 5.0.1, 4.3.9 and 4.1.2): > >>> ---------------- > >>> -569244523 > >>> Actual result (only php 5.0.2): > >>> -------------- > >>> 2147483647 > >>> Is this a standard behaviour of all future php versions or some error > >>> in php? OS details: Linux Debian Sarge > >>> PHP compilation details (vanilla php-5.0.2.tar.bz2): > >>> ./configure --disable-debug --with-apxs=/somepath/apache/bin/apxs > >>> --prefix=/somepath/php > >>> --with-config-file-path=/somepath/ > >>> --with-pcre-regex --enable-mbstring --enable-session --disable-all > >>> --with-gettext=shared,/usr > >>> php.ini details: error_reporting=E_ALL display_errors=on > >>> register_globals=off asp_tags=on short_tags=off Please CC to my email. > >>> > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php