Support for i8 64 bits integer
Brought to you by:
ggiunta
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).
Anonymous
Small patch to add i8 support to xmlrpc.inc
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?
Less than 10 years in the making... and support for i8 has been merged!
wow :)
I have no idea why I needed this 10 years ago, but thanks ;)