PHPackages                             phpxmlrpc/polyfill-xmlrpc - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. phpxmlrpc/polyfill-xmlrpc

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

phpxmlrpc/polyfill-xmlrpc
=========================

A pure-php reimplementation of the API exposed by the native XML-RPC extension

1.0.0(2y ago)12424.1k↓36.3%52BSD-3-ClausePHPPHP ^5.4.0 || ^7.0 || ^8.0CI passing

Since Dec 31Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/gggeek/polyfill-xmlrpc)[ Packagist](https://packagist.org/packages/phpxmlrpc/polyfill-xmlrpc)[ RSS](/packages/phpxmlrpc-polyfill-xmlrpc/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (4)Dependencies (4)Versions (5)Used By (2)

Polyfill-XMLRPC
===============

[](#polyfill-xmlrpc)

A pure-php reimplementation of the API exposed by the native XML-RPC extension.

Originally bundled as part of the [phpxmlrpc/extras](https://github.com/gggeek/phpxmlrpc-extras) package.

Requirements
------------

[](#requirements)

Any PHP version from 5.4 to 8.3 is supported. The `phpxmlrpc/phpxmlrpc` library is used as the underlying XML-RPC engine. It will get automatically pulled in for you when you install via Composer.

Installation and usage
----------------------

[](#installation-and-usage)

Installation: the recommended way to install this library is via usage of Composer. Just add

```
"phpxmlrpc/polyfill-xmlrpc": "^1.0.0"

```

to your Composer "require" section.

Usage: once your autoload configuration is set up properly (which is normally taken care for you by Composer), you can just use in your code all the functions described at

Known differences from the original extension
---------------------------------------------

[](#known-differences-from-the-original-extension)

### Work in Progress!

[](#work-in-progress)

This library is not *fully* complete yet, but it should be good enough for most users.

The main features missing are:

- character set handling: at the moment only utf-8 and iso-8859-1 charset encodings are supported; iso-8859-1 as default, and utf-8 via:
    - using the `$encoding` argument to `xmlrpc_decode()` and `xmlrpc_decode_request()`
    - setting `'encoding' => 'UTF-8'` and `'escaping' => 'markup'` in the `$options` argument to `xmlrpc_encode_request`
- the `xmlrpc_parse_method_descriptions` and `xmlrpc_server_register_introspection_callback` functions exist but do nothing
- the `xmlrpc_encode_request` function has partial support for the `$options` argument

For a detailed list of all known differences compared to the behaviour of the PHP extension, see comments at the top of file [XmlRpc.php](src/XmlRpc.php).

### Compatibility goals

[](#compatibility-goals)

We strive to reproduce the same behaviour as the XML-RPC extension to the best "reasonable" extent.

This means that the following are *not* goals of this package:

- being able to produce the same xml streams as the native extension, where "same" means byte-by-byte identical. Eg. whitespace and element indentation in the produced xml strings do differ
- reproducing behaviour of the native extension which is clearly buggy Eg. the native extension will produce invalid xmlrpc requests when some specific values are passed to an `xmlrpc_encode_request` call

Running tests
-------------

[](#running-tests)

The recommended way to run the library test suite is via the provided Docker containers. A handy shell script is available that simplifies usage of Docker.

The full sequence of operations is:

```
./tests/ci/vm.sh build
./tests/ci/vm.sh start
./tests/ci/vm.sh runtests
./tests/ci/vm.sh stop

# and, once you have finished all testing related work:
./tests/ci/vm.sh cleanup

```

By default, tests are run using php 7.4 in a Container based on Ubuntu 20 Focal. You can change the version of PHP and Ubuntu in use by setting the environment variables PHP\_VERSION and UBUNTU\_VERSION before building the Container.

To generate the code-coverage report, run `./tests/ci/vm.sh runcoverage`

FAQ
---

[](#faq)

Q: is it possible to specify the precision used to serialize Double values? A: yes, by setting a positive integer value to `\PhpXmlRpc\Polyfill\XmlRpc\XmlRpc::$xmlpc_double_precision`

License
-------

[](#license)

Use of this software is subject to the terms in the [license.txt](license.txt) file

[![License](https://camo.githubusercontent.com/ef0fb5ae8a4e3bd21fafa5b1c136d252dfa9b9b610ca2123909f837fa99ba5e7/68747470733a2f2f706f7365722e707567782e6f72672f706870786d6c7270632f706f6c7966696c6c2d786d6c7270632f6c6963656e7365)](https://packagist.org/packages/phpxmlrpc/polyfill-xmlrpc)[![Latest Stable Version](https://camo.githubusercontent.com/fb2886df4a682bec83d0b0095b5620fc204684001d591bc51df4e3e02b6d5c16/68747470733a2f2f706f7365722e707567782e6f72672f706870786d6c7270632f706f6c7966696c6c2d786d6c7270632f762f737461626c65)](https://packagist.org/packages/phpxmlrpc/polyfill-xmlrpc)[![Total Downloads](https://camo.githubusercontent.com/4cf282612c8a1a9c52d14889f2c854a75873d4f2b36d1cf4abf8891d12e25f09/68747470733a2f2f706f7365722e707567782e6f72672f706870786d6c7270632f706f6c7966696c6c2d786d6c7270632f646f776e6c6f616473)](https://packagist.org/packages/phpxmlrpc/polyfill-xmlrpc)

[![Build Status](https://github.com/gggeek/polyfill-xmlrpc/actions/workflows/ci.yaml/badge.svg)](https://github.com/gggeek/polyfill-xmlrpc/actions/workflows/ci.yaml)[![Code Coverage](https://camo.githubusercontent.com/d41c285859ced0b316bd21dc21a9e35ab9a040b43fbf258d7a264fe8b3bf0e63/68747470733a2f2f636f6465636f762e696f2f67682f67676765656b2f706f6c7966696c6c2d786d6c7270632f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://app.codecov.io/gh/gggeek/polyfill-xmlrpc)

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance44

Moderate activity, may be stable

Popularity45

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 98.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~400 days

Total

4

Last Release

809d ago

PHP version history (2 changes)1.0.0-alphaPHP ^5.3.0 || ^7.0 || ^8.0

1.0.0PHP ^5.4.0 || ^7.0 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/f641f7d6edabf83c56f6c4998b04e6c59a00b46bf51ca6699c31b09f9c948677?d=identicon)[gggeek](/maintainers/gggeek)

---

Top Contributors

[![gggeek](https://avatars.githubusercontent.com/u/308634?v=4)](https://github.com/gggeek "gggeek (79 commits)")[![prudloff-insite](https://avatars.githubusercontent.com/u/50333926?v=4)](https://github.com/prudloff-insite "prudloff-insite (1 commits)")

---

Tags

phpxmlrpcpolyfillphpextensionxmlrpcwebservices

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/phpxmlrpc-polyfill-xmlrpc/health.svg)

```
[![Health](https://phpackages.com/badges/phpxmlrpc-polyfill-xmlrpc/health.svg)](https://phpackages.com/packages/phpxmlrpc-polyfill-xmlrpc)
```

###  Alternatives

[php-ds/php-ds

Specialized data structures as alternatives to the PHP array

4109.5M170](/packages/php-ds-php-ds)[rubix/tensor

A library and extension that provides objects for scientific computing in PHP.

2801.6M5](/packages/rubix-tensor)[memio/spec-gen

phpspec extension for better code generation

67204.7k28](/packages/memio-spec-gen)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
