PHPackages                             phpstubs/phpstubs - 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. phpstubs/phpstubs

ActiveLibrary

phpstubs/phpstubs
=================

Contains PHP Stubs which can be used by IDEs, or static analysis tools

5815.5k↓100%11[2 issues](https://github.com/schmittjoh/php-stubs/issues)[1 PRs](https://github.com/schmittjoh/php-stubs/pulls)PHP

Since Nov 15Pushed 13y ago6 watchersCompare

[ Source](https://github.com/schmittjoh/php-stubs)[ Packagist](https://packagist.org/packages/phpstubs/phpstubs)[ RSS](/packages/phpstubs-phpstubs/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

PHPStubs
========

[](#phpstubs)

PHPStubs are PHP files which describe functions, classes, and constants provided by PHP core, and third-party C extensions.

They are commonly used in IDEs for auto-completion, or static analysis tools.

This repository contains stubs for everything covered by the PHP Documentation, and also the scripts necessary to build them. The types for some functions are more precise than in the PHP Documentation. For example, instead of `array`often a type like `string[]` is used. Instead of `mixed`, in some cases we use something like `float|string`.

The code for generating stubs is released under the Apache2 license. All generated stubs automatically inherit their original license, the [PHP Documentation license](http://creativecommons.org/licenses/by/3.0/legalcode).

If you would like to generate stubs, you can use the provided CLI tools:

```
php bin/phpstubs.php generate
```

###  Health Score

31

—

LowBetter than 71% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9da34818b48c46c2690876202264d1e45cb9893c368facb55f8851e47495ecfb?d=identicon)[johannes](/maintainers/johannes)

---

Top Contributors

[![schmittjoh](https://avatars.githubusercontent.com/u/197017?v=4)](https://github.com/schmittjoh "schmittjoh (9 commits)")

### Embed Badge

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

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

PHPackages © 2026

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