https://github.com/arnaud-lb/php-sema
A library for semantic analysis of PHP code
https://github.com/arnaud-lb/php-sema
Last synced: about 2 months ago
JSON representation
A library for semantic analysis of PHP code
- Host: GitHub
- URL: https://github.com/arnaud-lb/php-sema
- Owner: arnaud-lb
- Created: 2022-04-18T18:31:01.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-29T20:59:46.000Z (about 3 years ago)
- Last Synced: 2024-05-01T22:56:00.028Z (about 1 year ago)
- Language: PHP
- Size: 41 KB
- Stars: 19
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# php-sema
Semantic analysis of PHP code.
php-sema implements an AST-based CFG that is suitable for source-level analysis.
Currently, php-sema implements: SSA conversion, generic data flow analysis algorithms, reachable definitions, dead code analysis, undefined variable analysis.
## Use-cases
- Detecting uses of undefined variables
- Detecting dead code (code without effect)
- Detecting unreachable code## Work in progress
This is a work in progress. There is not enough tests, no support for variable-variables or references, and the API needs improvements.