On Tue, Jul 22, 2014 at 9:55 PM, Marc Bennewitz <p...@marc-bennewitz.de>
wrote:

> Hi all,
>
> I like to create an RFC to add an unsinged integer type for the
> following purposes:
>
> - higher max value
>   - DBs already allow UNSIGNED INT/BIGINT which is a farce to work with
> in PHP
> - better support pack/unpack unsigned integers from/to PHP using the
> un/pack functions
> - simplified right shift of unsinged integers because PHP "safes" the
> sing bit on singed integers which leads to bugs or overcomplicated code
> if you need that bit for others than a sign
> - if a parameter type-hint or similar functionality will be implemented
> this type will be very useful, too. Else it will be also useful to make
> sure you have no negative integer by simply converting to it.
>
> What do you think?
> (Does it worth the expense for a RFC?)
>

Could you please further clarify what you mean by "type" here? If you mean
an actual new type (like integers currently are), then I highly doubt this
is feasible (implementationally).

If you mean something like an UnsignedInt class with overloaded operators,
that should be easy to implement. Not sure if we want it in core though.

Nikita

Reply via email to