tags:

views:

39

answers:

1

There are at least two implementations of XML-RPC for PHP. Which is best and why?

  1. I've been using the one based on Edd Dumbill's work in the O'Reilly jellyfish book, but I find it extraordinarily awkward and verbose and very hard to debug.
  2. The version built into PHP looks a bit cleaner, but contains warnings that the extension is experimental.

Your favorite? A different one?

A: 

XML-RPC is mostly about marshalling data, so performance differences between the native PHP extension and pure PHP implementations is negligible. The PHP builtin is however just about encoding data, so you need an add-on API to actually send RPC calls.

UsefulIncs xmlrpc library was the one susceptible to eval exploits. So I'd eschew that regardless of what it looks today. Better use the native PHP xmlrpc_* functions and forget about the experimental tag.

An alternative would be Zend Frameworks XmlRpc functions, which are pure PHP code and overly verbose, but time-tested. Personally I once had a custom XML-RPC lib which also performed Content-Encoding et al, but today I'd use ZendFrameworks, HordeFramework or PEARs XMLRPC2. (But am glad we can mostly use JSON nowadays.)

mario