PHPackages                             nazares/deb-sphp - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. nazares/deb-sphp

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nazares/deb-sphp
================

Script to switch installed PHP versions on Debian based linux systems

1.0.3(2y ago)012MITShell

Since Jul 1Pushed 2y ago1 watchersCompare

[ Source](https://github.com/nazares/deb-sphp)[ Packagist](https://packagist.org/packages/nazares/deb-sphp)[ RSS](/packages/nazares-deb-sphp/feed)WikiDiscussions main Synced yesterday

READMEChangelog (4)DependenciesVersions (4)Used By (0)

Debian-based distributive PHP Switcher
======================================

[](#debian-based-distributive-php-switcher)

[![cover](cover.png)](cover.png)

Debian PHP switcher is a simple script to switch your Apache and CLI configs quickly between major versions of PHP. This supports any version of php installed onto the Debian-based system.

If you support multiple products/projects that are built using either brand new or old legacy PHP functionality and you find it a pain to change config files continually this will make the whole process just one command.

Caveats
-------

[](#caveats)

For use with Debian-based systems. For macOS php switching, I recommend a [Phil Cook's php switcher script](https://github.com/rhukster/sphp.sh)

Installation
------------

[](#installation)

```
curl -L https://raw.githubusercontent.com/nazares/deb-sphp/main/sphp.sh > /usr/local/bin/sphp
chmod +x /usr/local/bin/sphp
```

### Composer installation

[](#composer-installation)

```
composer global require nazares/deb-sphp
```

Usage
-----

[](#usage)

Simply type `sphp` and the version you want to switch:

```
sphp 8.0 #to switch to PHP 8.0 version
sphp 8.1 #to switch to PHP 8.1 version
sphp 8.2 #to switch to PHP 8.2 version
# ...
# etc.
```

to get installed versions of PHP just run:

```
sphp
    # usage: sphp
    # installed php versions: 8.0,8.1,8.2
```

License
-------

[](#license)

MIT

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

732d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1632834?v=4)[Sergei Nazarenko](/maintainers/nazares)[@nazares](https://github.com/nazares)

---

Top Contributors

[![nazares](https://avatars.githubusercontent.com/u/1632834?v=4)](https://github.com/nazares "nazares (16 commits)")

### Embed Badge

![Health badge](/badges/nazares-deb-sphp/health.svg)

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

PHPackages © 2026

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