PHPackages                             civicrm/php-array-doc - 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. civicrm/php-array-doc

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

civicrm/php-array-doc
=====================

v1.0.0(3mo ago)014.0k↓32.7%1[1 PRs](https://github.com/totten/php-array-doc/pulls)1MITPHPPHP ~7.3|~8.0CI passing

Since Jun 26Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/totten/php-array-doc)[ Packagist](https://packagist.org/packages/civicrm/php-array-doc)[ RSS](/packages/civicrm-php-array-doc/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (12)Used By (1)

PhpArrayDocument
================

[](#phparraydocument)

This is a parser/printer for a subset of PHP focused on data. (*It serves a role similar to a full-service YAML library - except with `*.php` data-files.*) Key features:

- Allows `array` values and `scalar` values (`string`, `int`, `bool`, etc).
- Allows comments for the overall document and for individual items in the tree.
- Allows *tagged-values* (a.k.a. *factory-functions*) which look like *global or static method-calls*.
- Allows deferred construction (`fn() => [...data...]`)
- Prohibits objects, loops, math, concatenation, includes, custom functions, etc.

Examples: Data documents
------------------------

[](#examples-data-documents)

A basic document looks like this:

```
