An open API service indexing awesome lists of open source software.

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

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.