Hi,

I ran into 32-bit problems, too, when working with >2GB files (in this
case, raw DVD ISO images) on a 32-bit system (I couldn't find a
reliable(!!) way to read a 4-byte absolute offset and seek to it).
Of course, this warning is mentioned in the manpage, but really, not
having at least a class for unsigned 32-bit ints (e.g. a Uint32 or a
Uint64 for 64-bit platforms) which native functions like seek and
friends coerce into a 32/64-bit uint makes PHP useless for anything
that involves access to files or memory offsets (a problem from
another project) > 2GB.
>From a technical point of view: would such a UInt32 class actually be
implementable, and at what cost to BC?

Marco

On Tue, Sep 3, 2013 at 2:21 AM, Rasmus Schultz <ras...@mindplay.dk> wrote:
> if I wanted strings or something else, that would be simple enough -
> sprintf() will do the job.
>
> in my case, I needed a scalar value that I can actually persist to the
> database.
>
> On Mon, Sep 2, 2013 at 4:21 PM, Stas Malyshev <smalys...@sugarcrm.com>
>  wrote:
>
>> Hi!
>>
>> > What I'm suggesting is simply a set of alternative functions to
>> > ip2long() and crc32() that return consistent values on all platforms,
>> > e.g. 32-bit signed integer values - a couple of new functions and a
>> > couple of quick updates to the documentation explaining why you might
>> > want to use them, that's all.
>>
>> Why 32-bit signed values and not something else - like binhex or some
>> other form? What these values are to be used for?
>>
>> --
>> Stanislav Malyshev, Software Architect
>> SugarCRM: http://www.sugarcrm.com/
>> (408)454-6900 ext. 227
>>
>>
>
> On Mon, Sep 2, 2013 at 4:21 PM, Stas Malyshev <smalys...@sugarcrm.com>wrote:
>
>> Hi!
>>
>> > What I'm suggesting is simply a set of alternative functions to
>> > ip2long() and crc32() that return consistent values on all platforms,
>> > e.g. 32-bit signed integer values - a couple of new functions and a
>> > couple of quick updates to the documentation explaining why you might
>> > want to use them, that's all.
>>
>> Why 32-bit signed values and not something else - like binhex or some
>> other form? What these values are to be used for?
>>
>> --
>> Stanislav Malyshev, Software Architect
>> SugarCRM: http://www.sugarcrm.com/
>> (408)454-6900 ext. 227
>>

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to