PHPackages                             tpunt/php-ast-reverter - 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. tpunt/php-ast-reverter

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

tpunt/php-ast-reverter
======================

Reverts an AST back into (somewhat) PSR-compliant code

v2.0(8y ago)528612[1 issues](https://github.com/tpunt/php-ast-reverter/issues)[1 PRs](https://github.com/tpunt/php-ast-reverter/pulls)MITPHPPHP &gt;=7.0

Since Sep 17Pushed 7y ago3 watchersCompare

[ Source](https://github.com/tpunt/php-ast-reverter)[ Packagist](https://packagist.org/packages/tpunt/php-ast-reverter)[ Docs](https://github.com/tpunt/php-ast-reverter)[ RSS](/packages/tpunt-php-ast-reverter/feed)WikiDiscussions master Synced today

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

php-ast-reverter
================

[](#php-ast-reverter)

A tool that reverts an abstract syntax tree (AST) produced by the [php-ast](https://github.com/nikic/php-ast) extension back into (somewhat) PSR-compliant code. This enables for code preprocessing to be done.

Requirements:

- PHP 7.\*
- [php-ast](https://github.com/nikic/php-ast) extension (compatible with versions 30, 35, 40, 45, and 50)

Installation
------------

[](#installation)

### Composer

[](#composer)

```
composer require tpunt/php-ast-reverter

```

Example
-------

[](#example)

Running the following code snippet:

```
