Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67599 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85081 invoked from network); 31 May 2013 20:21:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 May 2013 20:21:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; 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:36365] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A9/00-02347-45609A15 for ; Fri, 31 May 2013 16:21:40 -0400 Received: from [10.21.1.104] (php.xs4all.nl [83.163.231.87]) by xdebug.org (Postfix) with ESMTPSA id 6E4BBDE151; Fri, 31 May 2013 21:21:37 +0100 (BST) User-Agent: K-9 Mail for Android In-Reply-To: References: <6dae6c81-3e50-42f3-9a7e-87eedf8861d4@email.android.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: Fri, 31 May 2013 22:21:35 +0200 To: Anthony Ferrara CC: "internals@lists.php.net" Message-ID: Subject: Re: [PHP-DEV] 5.NEXT Integer and String type modifications From: derick@php.net (Derick Rethans) Anthony Ferrara wrote: > Derick, > > In principle I think this is great thing to do. Not having a 64 bit > type is > > annoying. I'm a bit curious on how this is going to work with all > sorts of > > object wrappers that are now in place as workaround. And casting > int64 to > > int32 needs to very well looked at as well. > > > > > As far as the casting, my first reaction would be to raise an > E_ENGINE_NOTICE on data loss (casting from int64 to int32 with ints > > 32 > bit) and then adjusting the value to the nearest representable value > (LONG_MAX or LONG_MIN). In other words, it may need to be more than a > simple cast (an inline function perhaps) That can't be handled in applications though ... > As far as object wrappers, any particular examples that you're > thinking of? It happens on atleast two extensions that I've written, dbus and mongodb, so I was thinking there must be a few more. Cheers, Derick