rquadling/lalit

This package is abandoned and no longer maintained. The author suggests using the digitickets/lalit package instead.

GitHub copy of LaLit's XML2Array and Array2XML

Maintainers

Package info

github.com/digitickets/lalit

Homepage

pkg:composer/rquadling/lalit

Statistics

Installs: 30 634

Dependents: 3

Suggesters: 0

Stars: 72

Open Issues: 0

3.4.1 2026-04-02 16:57 UTC

This package is auto-updated.

Last update: 2026-04-02 17:27:25 UTC


README

GitHub Actions Workflow Status GitHub issues

PHP Version Stable Version

Total Downloads Monthly Downloads Daily Downloads

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

The base code was developed by Lalit Patel and was available from http://www.lalit.org/lab/

From around May 7th 2018, the original site is not available.

The Internet Archive copies are mentioned below.

The original code was in the initial commit and all subsequent work has been carried out by me (Richard Quadling) and the contributors. Hopefully I've mentioned them all in the CHANGELOG.md.

XML2Array : Original page / Internet Archive.

Array2XML : Original page / Internet Archive.

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

Extended usage

Alternative labelling

As of v3.2.0, the init() method has been expanded to allow the labels used in the output XML2Array::createArray() and the input to Array2XML::createXML() to be changed. Any value, where null is supplied will revert to the default value.

Version History

Please read the CHANGELOG document.

@todo

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