Menu

#5 Support for i8 64 bits integer

closed
nobody
None
3
2016-06-26
2007-07-06
Gilles
No

Though the page is not available anymore on xmlrpc.com, a type was proposed to handle 64 bits integer to the protocol, using the i8 type.

PHP doesn't have such integers, but they can easily be manipulated as double, as they are stored on 64 bits.

I've made a small patch for phpxmlrpc in order to support them. The type recognition using the regexp is as valid for 32 bits integer than for 64 bits, so I just added a condition here to cast using (double) rather than (int).

Discussion

  • Gilles

    Gilles - 2007-07-06

    Small patch to add i8 support to xmlrpc.inc

     
  • Gaetano Giunta

    Gaetano Giunta - 2007-07-17

    Logged In: YES
    user_id=114789
    Originator: NO

    Does not look bad...

    A couple of issues:
    + there should be a flag implemented that enables/disables this, in case people want to refuse this nonstandard behaviour (much in the way as support for <NIL/> was added)
    + doubles are very different beasts from integers, ie. they do not respect integer math. I would strongly advise against using them for storing 64 bit integers. Maybe using bcmath or waiting for php6, which will support a native 64 bit int type is a better idea?

     
  • Gaetano Giunta

    Gaetano Giunta - 2016-06-26

    Less than 10 years in the making... and support for i8 has been merged!

     
  • Gaetano Giunta

    Gaetano Giunta - 2016-06-26
    • status: open --> closed
    • Group: --> Next_Release_(example)
     
  • Gilles

    Gilles - 2016-06-26

    wow :)
    I have no idea why I needed this 10 years ago, but thanks ;)

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.