Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53248 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56231 invoked from network); 10 Jun 2011 16:52:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jun 2011 16:52:53 -0000 Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:48863] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3D/FC-54720-4EB42FD4 for ; Fri, 10 Jun 2011 12:52:52 -0400 Received: from localhost (xdebug.org [127.0.0.1]) by xdebug.org (Postfix) with ESMTPS id C0226DE143; Fri, 10 Jun 2011 17:52:49 +0100 (BST) Date: Fri, 10 Jun 2011 17:52:49 +0100 (BST) X-X-Sender: derick@whisky To: Stas Malyshev cc: Hannes Landeholm , PHP Developers Mailing List In-Reply-To: <4DF24AA1.4070907@sugarcrm.com> Message-ID: References: <4DF24AA1.4070907@sugarcrm.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] 32 bit / 64 bit integer confusion From: derick@php.net (Derick Rethans) On Fri, 10 Jun 2011, Stas Malyshev wrote: > > I agree that that should be the same. But sadly, Windows uses a > > different integer size model than almost everything else modern. > > Where Linux and Mac and other unices use 8 bytes for an "int", > > Windows uses 4 bytes > > (http://en.wikipedia.org/wiki/LP64#Specific_C-language_data_models). > > Because PHP internally uses "int" for its integer type, on Windows > > that's still only 32 bit. > > Erm... > typedef union _zvalue_value { > long lval; /* long value */ > double dval; /* double value */ > > ITYM PHP uses "long" which unfortunately isn't long on windows. Yes, indeed. That was a typo. The original point still stands though. And IMO, this should be fixed in the Windows port so that on 64 bit processors, the PHP "int" type (the C "long" type) is actually 64 bits, just like almost any other current operating system/compiler set-up. cheers, Derick -- http://derickrethans.nl | http://xdebug.org Like Xdebug? Consider a donation: http://xdebug.org/donate.php twitter: @derickr and @xdebug