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)PHP

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 today

READMEChangelogDependenciesVersions (1)Used By (0)

[![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

31

—

LowBetter than 71% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community12

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

[mockery/mockery

Mockery is a simple yet flexible PHP mock object framework

10.7k488.3M20.8k](/packages/mockery-mockery)[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k548.7M613](/packages/phpspec-prophecy)[sebastian/global-state

Snapshotting of global state

6.6k848.0M40](/packages/sebastian-global-state)[hamcrest/hamcrest-php

This is the PHP port of Hamcrest Matchers

7.1k475.4M94](/packages/hamcrest-hamcrest-php)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k76.1M6.0k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k113.9M623](/packages/brianium-paratest)

PHPackages © 2026

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