On 22 Jul 2014, at 18:50, Marc Bennewitz <php@mabe.berlin> wrote: > 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?)
This would be likely to cause endless problems since signed integers are used so widely and things would break on conversion, for quite limited gain. I’m currently proposing and implementing bigints for PHP 6: http://wiki.php.net/rfc/bigint This would solve your problem (any unsigned integer would fit) but would cause less issues. -- Andrea Faulds http://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php