PHPackages                             rindow/phpvenv - 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. [CLI &amp; Console](/categories/cli)
4. /
5. rindow/phpvenv

ActiveLibrary[CLI &amp; Console](/categories/cli)

rindow/phpvenv
==============

A lightweight virtual environment manager for PHP.

1.0.4(3w ago)013↓100%BSD-3-ClausePHPPHP &gt;=8.1CI passing

Since May 15Pushed 3w agoCompare

[ Source](https://github.com/rindow/phpvenv)[ Packagist](https://packagist.org/packages/rindow/phpvenv)[ Docs](https://github.com/rindow/phpvenv)[ RSS](/packages/rindow-phpvenv/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (5)Dependencies (2)Versions (6)Used By (0)

phpvenv
=======

[](#phpvenv)

A lightweight tool to create isolated PHP virtual environments, inspired by Python's `venv`.

It allows you to create a local environment with its own configuration (`php.ini`) and local Composer home, without affecting the system-wide PHP installation.

Features
--------

[](#features)

- Isolated `php.ini` and configuration directory (`conf.d`).
- Environment-specific `COMPOSER_HOME`.
- Support for Bash, Zsh, Command Prompt (CMD), and PowerShell.
- Automatic wrapper scripts to ensure the correct configuration is used.
- Supports multiple installed PHP versions. The virtual environment automatically uses the same PHP interpreter that was used when running `phpvenv`.

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

[](#installation)

You can install this tool globally using Composer:

```
composer global require rindow/phpvenv
```

Ensure your global composer bin directory is in your `PATH`.

Usage
-----

[](#usage)

### 1. Create a new environment

[](#1-create-a-new-environment)

```
phpvenv myenv
```

### 2. Activate the environment

[](#2-activate-the-environment)

**On Unix (Bash/Zsh):**

```
source myenv/bin/activate
```

**On Windows (Command Prompt):**

```
myenv\Scripts\activate.bat
```

**On Windows (PowerShell):**

```
. \myenv\Scripts\Activate.ps1
```

### 3. Deactivate

[](#3-deactivate)

Simply run:

```
deactivate
```

### 4. Multiple PHP Versions

[](#4-multiple-php-versions)

If your system has multiple PHP versions installed, `phpvenv` can create environments tied to a specific PHP interpreter.

The generated virtual environment stores the path to the PHP executable used during creation (PHP\_BINARY) and always uses that interpreter inside the environment.

**Example:**

```
php8.2 /installed/dir/phpvenv env82
php8.4 /installed/dir/phpvenv env84
```

**After activation:**

```
source env82/bin/activate
php -v
# PHP 8.2.x

source env84/bin/activate
php -v
# PHP 8.4.x
```

Note
----

[](#note)

The environment does not bundle PHP itself. Instead, it creates wrapper scripts that forward execution to the PHP binary used at environment creation time.

License
-------

[](#license)

[BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause)

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance95

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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

5

Last Release

25d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6028098?v=4)[Yuichi Ishikawa](/maintainers/yuichiis)[@yuichiis](https://github.com/yuichiis)

---

Top Contributors

[![yuichiis](https://avatars.githubusercontent.com/u/6028098?v=4)](https://github.com/yuichiis "yuichiis (6 commits)")

---

Tags

clicomposercross-platformdevtoolsphpphp-inivenvvirtual-environmentwindows

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24726.4M22](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

13045.3M6.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

596920.8k12](/packages/php-tui-php-tui)[styleci/cli

The CLI tool for StyleCI

70464.1k9](/packages/styleci-cli)

PHPackages © 2026

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