PHPackages                             bstoots/wox-php - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. bstoots/wox-php

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

bstoots/wox-php
===============

WOX is an XML serializer for PHP

1.0.0(8y ago)0579[3 issues](https://github.com/bstoots/wox-php/issues)MITPHP

Since Oct 5Pushed 8y ago1 watchersCompare

[ Source](https://github.com/bstoots/wox-php)[ Packagist](https://packagist.org/packages/bstoots/wox-php)[ RSS](/packages/bstoots-wox-php/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

wox-php
=======

[](#wox-php)

[![Build Status](https://camo.githubusercontent.com/e210a890f533739f1dec5c99f2e97e2afe2712b6bd3191cf51c58ca585bccdfd/68747470733a2f2f7472617669732d63692e6f72672f6273746f6f74732f776f782d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/bstoots/wox-php)

WOX is an XML serializer for PHP

(based on )

Features
--------

[](#features)

Some of the WOX main features are listed below:

- Easy to use.
- Simple XML. The XML generated is simple, easy to understand, and language independent.
- Requires no class modifications. Classes do not require to have default constructors, getters or setters.
- Field visibility. Currently only serializes public properties. This may change in the future to match Java and C# implementations.
- Interoperability Java, C#, and now PHP. WOX can (de)serialize Java, C#, or PHP objects to XML, and reconstruct the XML back to any of the supported languages.
- Standard XML object representation. The goal is parity between Java, C#, and PHP. Possibly others in the future.
- WOX data types. The WOX mapping table specifies how primitive data types are mapped to WOX data types.
- Robust to class changes. Defaults will be used for newly added fields.
- Arrays. Handles arrays and multi-dimensional arrays of primitives and Objects.
- Class and Type. Objects of these classes are saved by their String name.
- Small footprint. Strives to use only PHP built-ins where ever possible.

Usage
-----

[](#usage)

TODO

Example
-------

[](#example)

```
use Bstoots\WOX\Serial\{SimpleWriter, SimpleReader};

$doubles = [12.45, 878.98, 987.98, 435.87, 537.87, 89.0, 0.0, 667.332];

$writer = new SimpleWriter();
$xml = $writer->write($doubles);
var_dump($xml);
// string(138) "
// 12.45 878.98 987.98 435.87 537.87 89 0 667.332
// "

$reader = new SimpleReader();
$sameDoubles = $reader->read($xml);
var_dump($sameDoubles);
// array(8) {
//   [0]=>
//   float(12.45)
//   [1]=>
//   float(878.98)
//   [2]=>
//   float(987.98)
//   [3]=>
//   float(435.87)
//   [4]=>
//   float(537.87)
//   [5]=>
//   float(89)
//   [6]=>
//   float(0)
//   [7]=>
//   float(667.332)
// }
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~4 days

Total

2

Last Release

3135d ago

Major Versions

0.0.1 → 1.0.02017-10-09

### Community

Maintainers

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

---

Top Contributors

[![bstoots](https://avatars.githubusercontent.com/u/5334637?v=4)](https://github.com/bstoots "bstoots (32 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bstoots-wox-php/health.svg)

```
[![Health](https://phpackages.com/badges/bstoots-wox-php/health.svg)](https://phpackages.com/packages/bstoots-wox-php)
```

###  Alternatives

[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[opis/closure

A library that can be used to serialize closures (anonymous functions) and arbitrary data.

2.6k230.0M284](/packages/opis-closure)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[michelf/php-markdown

PHP Markdown

3.5k52.4M345](/packages/michelf-php-markdown)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)

PHPackages © 2026

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