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.
![image](https://private-user-images.githubusercontent.com/43896664/331158521-e1568e1d-2da1-4af7-955d-276d413d3338.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4OTE3NDksIm5iZiI6MTczODg5MTQ0OSwicGF0aCI6Ii80Mzg5NjY2NC8zMzExNTg1MjEtZTE1NjhlMWQtMmRhMS00YWY3LTk1NWQtMjc2ZDQxM2QzMzM4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDAxMjQwOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTcwY2ViOTM2NTdiYTUxNDlmMTczMGI1ZjIzNGFkNjljOTk5NzQwZGU4YzgyMTM3MGUzNWNhM2FjZGVlMGM5ZGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.32KuZT-Jh4UI8JH5FM_e-4F72FwPnI6sa0rOToLDhDc)
First, run commands by this sequence for development server:
composer install
pnpm install
pnpm dev
Open http://localhost:3000 with your browser to see the page.
or
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/
pnpm copy-vendor
The purpose is to copy the php-parser dependency into the Next.js server folder.