PHPackages                             ovr/phpsa - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. ovr/phpsa

AbandonedArchivedUtil[Testing &amp; Quality](/categories/testing)

ovr/phpsa
=========

PHPSA aims to bring complex static analysis for PHP applications and libraries.

0.6.2(9y ago)63516.2k44[58 issues](https://github.com/ovr/phpsa/issues)[4 PRs](https://github.com/ovr/phpsa/pulls)3MITPHPPHP &gt;=5.5

Since Jun 22Pushed 7y ago2 watchersCompare

[ Source](https://github.com/ovr/phpsa)[ Packagist](https://packagist.org/packages/ovr/phpsa)[ RSS](/packages/ovr-phpsa/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (13)Versions (22)Used By (3)

[![Logo](https://camo.githubusercontent.com/c2901fb2372b5508be1252b1c54c26f6d34b1396f08161439b52e30dd192f995/687474703a2f2f646d7472792e6d652f696d672f6c6f676f732f70687073612e706e67)](https://camo.githubusercontent.com/c2901fb2372b5508be1252b1c54c26f6d34b1396f08161439b52e30dd192f995/687474703a2f2f646d7472792e6d652f696d672f6c6f676f732f70687073612e706e67)

PHPSA - Smart Analyzer for PHP
==============================

[](#phpsa---smart-analyzer-for-php)

[![Build Status](https://camo.githubusercontent.com/ca4c5acb7b2c735ad526987f5946ff06139ea22e289c5c3cd2ae701ab3b3f8d1/68747470733a2f2f7472617669732d63692e6f72672f6f76722f70687073612e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ovr/phpsa)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/f61207a13930df79b6111b37bc6d27137459cbf17cffaadc3d90d3e473ce60f0/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f76722f70687073612f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ovr/phpsa/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/9a87d0fddb021cdecd86d026c0c336eab4d0f8e515e29d2a6bb3956b2916c936/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f76722f70687073612f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ovr/phpsa/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/bf66876e035b1971de5389613df4414148270d7fc89c0418727e9644332c594c/68747470733a2f2f706f7365722e707567782e6f72672f6f76722f70687073612f762f737461626c652e737667)](https://packagist.org/packages/ovr/phpsa)[![License](https://camo.githubusercontent.com/2584ba7f53334822202579c826b7d38d1a897274fcc49393c7fa36d6cb1f236e/68747470733a2f2f706f7365722e707567782e6f72672f6f76722f70687073612f6c6963656e73652e737667)](https://packagist.org/packages/ovr/phpsa)

> PHPSA is a development tool aimed at bringing complex analysis for PHP applications and libraries.

P.S This software is currently in early alpha state, any contributions/stars will be awesome.

### Components

[](#components)

- Core - Component containing definitions and other core files
- Compiler - Component to compile expression(s) and statement(s) from an abstract syntax tree
- Analyzer - Component doing various checks on your files
- ControlFlow - Component for ControlFlow (WIP)

### Installation [(more)](/docs/01_Installation.md)

[](#installation-more)

The recommended way to install phpsa is via Composer.

Run `php composer.phar require ovr/phpsa` or add a new requirement in your composer.json.

```
{
  "require": {
    "ovr/phpsa": "*"
  }
}
```

### How to use [(more)](/docs/02_Usage.md)

[](#how-to-use-more)

```
$ ./bin/phpsa check fixtures/

Syntax error:  Syntax error, unexpected T_RETURN on line 11 in fixtures/simple/syntax/Error2.php

    $b = $a + 1; 123123

Notice:  Constant BBBB does not exist in self scope in fixtures/simple/undefined/Const.php on 29 [undefined-const]

    return self::BBBB;

Notice:  You are trying to cast 'string' to 'string' in fixtures/simple/code-smell/StandardFunctionCall.php on 16 [stupid.cast]

    return (string) json_encode(array(

Notice:  Missing docblock for callStaticMethodBySelf() method in fixtures/Compiling/Expression/StaticCall.php on 18 [missing-docblock]

    public static function callStaticMethodBySelf()
```

### Requirements

[](#requirements)

PHP &gt;= 7.0, but you can check files that use PHP &gt;= 5.2 with this.

### Documentation

[](#documentation)

See our [documentation](/docs/) in case you need more information on some topic.

### Contributing

[](#contributing)

Check our [Contributing Guide](/.github/CONTRIBUTING.md) to see how you can help.

### Sponsors

[](#sponsors)

Thanks to our sponsors and supporters:

JetBrains[![](https://camo.githubusercontent.com/b0914f08f6b588c7178490d5faf4b159b5c9dd3378288c92812c76aff1936790/68747470733a2f2f7265736f75726365732e6a6574627261696e732e636f6d2f6173736574732f6d656469612f6f70656e2d67726170682f6a6574627261696e735f323530783235302e706e67)](https://www.jetbrains.com/phpstorm/ "PHP IDE :: JetBrains PhpStorm")### LICENSE

[](#license)

This project is open-sourced software licensed under the MIT License.

See the [LICENSE](LICENSE) file for more information.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community32

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~38 days

Recently: every ~58 days

Total

15

Last Release

3447d ago

PHP version history (3 changes)0.0.1PHP &gt;=5.3

0.3.0PHP &gt;=5.4

0.4.0PHP &gt;=5.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/c019ea1f0133ad14d256163bc4d25a428b15f08083b15fdd380dc215e0e26177?d=identicon)[ovr](/maintainers/ovr)

---

Top Contributors

[![ovr](https://avatars.githubusercontent.com/u/572096?v=4)](https://github.com/ovr "ovr (1207 commits)")[![K-Phoen](https://avatars.githubusercontent.com/u/66958?v=4)](https://github.com/K-Phoen "K-Phoen (54 commits)")[![ddmler](https://avatars.githubusercontent.com/u/510150?v=4)](https://github.com/ddmler "ddmler (17 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (12 commits)")[![algo13](https://avatars.githubusercontent.com/u/8383815?v=4)](https://github.com/algo13 "algo13 (11 commits)")[![nikhilsaldanha](https://avatars.githubusercontent.com/u/6678053?v=4)](https://github.com/nikhilsaldanha "nikhilsaldanha (10 commits)")[![strahinjadjuric](https://avatars.githubusercontent.com/u/38068566?v=4)](https://github.com/strahinjadjuric "strahinjadjuric (8 commits)")[![kilgaloon](https://avatars.githubusercontent.com/u/5402073?v=4)](https://github.com/kilgaloon "kilgaloon (7 commits)")[![chasingSublimity](https://avatars.githubusercontent.com/u/21029639?v=4)](https://github.com/chasingSublimity "chasingSublimity (5 commits)")[![Lexty](https://avatars.githubusercontent.com/u/710499?v=4)](https://github.com/Lexty "Lexty (4 commits)")[![tomzx](https://avatars.githubusercontent.com/u/188960?v=4)](https://github.com/tomzx "tomzx (2 commits)")[![ufocoder](https://avatars.githubusercontent.com/u/2094547?v=4)](https://github.com/ufocoder "ufocoder (2 commits)")[![om3rcitak](https://avatars.githubusercontent.com/u/5197413?v=4)](https://github.com/om3rcitak "om3rcitak (2 commits)")[![barroca](https://avatars.githubusercontent.com/u/355251?v=4)](https://github.com/barroca "barroca (2 commits)")[![lex111](https://avatars.githubusercontent.com/u/4408379?v=4)](https://github.com/lex111 "lex111 (1 commits)")[![dmaicher](https://avatars.githubusercontent.com/u/921145?v=4)](https://github.com/dmaicher "dmaicher (1 commits)")[![micheleorselli](https://avatars.githubusercontent.com/u/173605?v=4)](https://github.com/micheleorselli "micheleorselli (1 commits)")[![msjyoo](https://avatars.githubusercontent.com/u/2097812?v=4)](https://github.com/msjyoo "msjyoo (1 commits)")[![necromant2005](https://avatars.githubusercontent.com/u/159874?v=4)](https://github.com/necromant2005 "necromant2005 (1 commits)")[![deepvyas](https://avatars.githubusercontent.com/u/11486797?v=4)](https://github.com/deepvyas "deepvyas (1 commits)")

---

Tags

analyzercontrol-flowphpphp-static-analysisphpsa

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/ovr-phpsa/health.svg)

```
[![Health](https://phpackages.com/badges/ovr-phpsa/health.svg)](https://phpackages.com/packages/ovr-phpsa)
```

###  Alternatives

[behat/behat

Scenario-oriented BDD framework for PHP

4.0k96.8M2.0k](/packages/behat-behat)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
