GitHub copy of LaLit's XML2Array and Array2XML

3.1.0 2019-02-01 14:36 UTC

This package is auto-updated.

Last update: 2021-09-28 16:42:28 UTC


Build Status Code Coverage GitHub issues

PHP Version Stable Version

Total Downloads Monthly Downloads Daily Downloads

\digitickets\LaLit allows you to convert XML to a PHP array and back again.

The base code was developed by Lalit Patel and is available from

XML2Array : Array2XML :

I've added additional unit tests via a generator (so probably too many tests)

Version History

Please read the CHANGELOG document.


  1. Add support for <!-- comments --> within the XML, such that when converting from XML -> PHP -> XML, the comments are preserved.