https://github.com/rightcapitalhq/php-ast-viewer
The PHP AST Viewer is a tool for viewing the Abstract Syntax Tree of PHP code. By visualizing the structure, it helps developers gain a deeper understanding of the code, thus improving code quality and maintenance efficiency.
https://github.com/rightcapitalhq/php-ast-viewer
ast inspector php php-ast viewer
Last synced: about 1 year ago
JSON representation
The PHP AST Viewer is a tool for viewing the Abstract Syntax Tree of PHP code. By visualizing the structure, it helps developers gain a deeper understanding of the code, thus improving code quality and maintenance efficiency.
- Host: GitHub
- URL: https://github.com/rightcapitalhq/php-ast-viewer
- Owner: RightCapitalHQ
- License: mit
- Created: 2024-04-28T02:11:07.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-05T09:57:29.000Z (almost 2 years ago)
- Last Synced: 2025-04-05T18:51:34.958Z (about 1 year ago)
- Topics: ast, inspector, php, php-ast, viewer
- Language: TypeScript
- Homepage: https://php-ast-viewer.com
- Size: 33.8 MB
- Stars: 36
- Watchers: 6
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#  PHP AST Viewer
The PHP AST Viewer is a tool for viewing the Abstract Syntax Tree of PHP code. By visualizing the structure, it helps developers gain a deeper understanding of the code, thus improving code quality and maintenance efficiency.

## Getting Started
First, run commands by this sequence for development server:
```bash
composer install
pnpm install
pnpm dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the page.
or
```bash
pnpm all-in-one # This command runs the above three commands.
```
After the development server is running, use the following command to copy the `vendor` folder to `.next/server/`
```bash
pnpm copy-vendor
```
The purpose is to copy the php-parser dependency into the Next.js server folder.
## Demo video
https://github.com/RightCapitalHQ/php-ast-viewer/assets/43896664/e6dd70c3-5e58-466d-808e-6eaac383d37f