Re: 5.NEXT Integer and String type modifications

From: Date: Fri, 31 May 2013 20:48:19 +0000
Subject: Re: 5.NEXT Integer and String type modifications
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-67600@lists.php.net to get a copy of this message
On Fri, May 31, 2013 at 4:21 PM, Derick Rethans <derick@php.net> wrote: > Anthony Ferrara <ircmaxell@gmail.com> 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. > > PDO does a lot of that in various places. > Cheers, > Derick > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.internals (#67600) next »