PHPackages                             sebastian/peek-and-poke - 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. sebastian/peek-and-poke

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

sebastian/peek-and-poke
=======================

Proxy for accessing non-public attributes and methods of an object

36153.9k—0%8[1 issues](https://github.com/sebastianbergmann/peek-and-poke/issues)2PHP

Since Aug 6Pushed 10y ago3 watchersCompare

[ Source](https://github.com/sebastianbergmann/peek-and-poke)[ Packagist](https://packagist.org/packages/sebastian/peek-and-poke)[ RSS](/packages/sebastian-peek-and-poke/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (2)

[![Build Status](https://camo.githubusercontent.com/fe673b4278c973155b5a0cf6d2f1d5e5b63e879bfd0a0e3c3d8e586ea364c9ee/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f73656261737469616e626572676d616e6e2f7065656b2d616e642d706f6b652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/sebastianbergmann/peek-and-poke)

Peek and Poke Proxy
===================

[](#peek-and-poke-proxy)

Proxy for accessing non-public attributes and methods of an object.

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

[](#installation)

To add Peek and Poke Proxy as a local, per-project dependency to your project, simply add a dependency on `sebastian/peek-and-poke` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file that just defines a dependency on Peek and Poke Proxy 1.0:

```
{
    "require": {
        "sebastian/peek-and-poke": "1.0.*"
    }
}
```

Usage
-----

[](#usage)

```
class Foo
{
    private $bar = 'baz';

    private function notPublic()
    {
        print __METHOD__ . PHP_EOL;
    }
}

$foo   = new Foo;
$proxy = new SebastianBergmann\PeekAndPoke\Proxy($foo);

print $proxy->bar . PHP_EOL;
$proxy->notPublic();
```

```
baz
Foo::notPublic

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community16

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://avatars.githubusercontent.com/u/1089?v=4)[Sebastian Probst Eide](/maintainers/sebastian)[@sebastian](https://github.com/sebastian)

---

Top Contributors

[![sebastianbergmann](https://avatars.githubusercontent.com/u/25218?v=4)](https://github.com/sebastianbergmann "sebastianbergmann (14 commits)")

### Embed Badge

![Health badge](/badges/sebastian-peek-and-poke/health.svg)

```
[![Health](https://phpackages.com/badges/sebastian-peek-and-poke/health.svg)](https://phpackages.com/packages/sebastian-peek-and-poke)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)

PHPackages © 2026

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