Skip to content

matthiasnoback/php-ast-inspector

Repository files navigation

PHP AST Inspector

This package offers a command-line utility for parsing a PHP script and navigating the resulting Abstract Syntax Tree (AST), showing information about the nodes and highlighting the corresponding part of the original script.

Example output

Installation

composer require --dev matthiasnoback/php-ast-inspector

Usage

Run ast-inspect by pointing it at a script that you want to inspect, e.g. if your script is called file.php:

vendor/bin/ast-inspect inspect file.php

Now use the keys (a, s, d, w) to navigate the node tree. Quit using Ctrl + C.

About

Kind of a step-debugger for your Abstract Syntax Tree

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •