PHPackages                             breux/prototype - 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. breux/prototype

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

breux/prototype
===============

PHP 5.4 - Prototype

1.0(13y ago)118MITPHPPHP &gt;=5.4.1

Since Jan 6Pushed 12y ago1 watchersCompare

[ Source](https://github.com/JulienBreux/php5.4-prototype)[ Packagist](https://packagist.org/packages/breux/prototype)[ RSS](/packages/breux-prototype/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (2)Used By (0)

PHP 5.4 - Prototype
===================

[](#php-54---prototype)

[![Build Status](https://camo.githubusercontent.com/5bfbbce6401a43de1a263c73a527ecb3d9787cf325bb8ebb0ad05414a44b8c97/68747470733a2f2f7472617669732d63692e6f72672f4a756c69656e42726575782f706870352e342d70726f746f747970652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/JulienBreux/php5.4-prototype)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/c810c56562f9aa75a638a1b53b418d1ec18d96c56779d99e96ebcbe5c29b9dda/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4a756c69656e42726575782f706870352e342d70726f746f747970652f6261646765732f7175616c6974792d73636f72652e706e673f733d35656662616635363461656433303436313266313138623438313164353831343533613961323237)](https://scrutinizer-ci.com/g/JulienBreux/php5.4-prototype/)[![Code Coverage](https://camo.githubusercontent.com/c76576eb8197d40c7294c514c35aa25393326ed05bf94dde42768ef5971b9e1b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4a756c69656e42726575782f706870352e342d70726f746f747970652f6261646765732f636f7665726167652e706e673f733d31323235663663653936353763623833653336373239396230313965376463396634636334646266)](https://scrutinizer-ci.com/g/JulienBreux/php5.4-prototype/)

Play with prototype in PHP 5.4!

Example
-------

[](#example)

### Class

[](#class)

```
class Foo
{
	use Prototype\Prototype;
}
```

### Add prototype to object (and others objects)

[](#add-prototype-to-object-and-others-objects)

```
$foo = new Foo;

$foo->saidHello = function($lastName)
{
	return "Hello $lastName";
};

echo $foo->saidHello('Julien');
```

### Add prototype to class (for all objects)

[](#add-prototype-to-class-for-all-objects)

```
Foo::prototype('saidHello', function($lastName)
{
  return "Hello $lastName";
});
```

### Usage

[](#usage)

```
$bar = new Foo;

echo $bar->saidHello('Laura');
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

4902d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d2f6c51d2ba0aaa2e8f0255cb7ab2c08c4f81f658b71e8c7953aac21e04a505a?d=identicon)[JulienBreux](/maintainers/JulienBreux)

---

Top Contributors

[![JulienBreux](https://avatars.githubusercontent.com/u/964330?v=4)](https://github.com/JulienBreux "JulienBreux (26 commits)")

### Embed Badge

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

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

PHPackages © 2026

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