PHPackages                             bubujka/def - 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. bubujka/def

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

bubujka/def
===========

Function defining and redefining

0.0.2(12y ago)41512MITPHPPHP &gt;=5.3.0

Since Oct 14Pushed 12y ago1 watchersCompare

[ Source](https://github.com/Bubujka/bu.defun)[ Packagist](https://packagist.org/packages/bubujka/def)[ Docs](http://github.com/Bubujka/bu.defun)[ RSS](/packages/bubujka-def/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (3)Used By (0)

```
Bu.defun - библиотека, позволяющая контролироват процесс объявления функций в
php.

С ней можно переопределять функции.

--------------

Примеры того что можно сделать с помощью bu.defun: http://defun.bubujka.org/doc.html

--------------

Чтобы подключить bu.defun пропишите в своём проекте:
require_once 'lib/bu.defun/load.php';

--------------

Bu.defun использует замыкания, которые появились в php5.3 - так что это
минимально необходимая версия.

--------------

Для запуска тестов достаточно запустить `make' из этого каталога.

Файлы в папке tests, которые начинаются с нижнего подчёркивания - тестируют
ошибки.

--------------

Документация по bu.defun находится в папке tests, вместе с примерами исходного
кода.

Чтобы получить все примеры одним файлом - выполните `make doc' - это создаст
файл doc.html

--------------

$ ./benchmark.php  1000000
PHP version: 5.4.4-14
Normal vs bu.defun: 0.11888813972473 x 2.1282949447632
Bu.defun at least 17 times slower than native php =(

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

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 ~254 days

Total

2

Last Release

4709d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/65e1468273af5f025a1cb03307036dee81b0eaea9d2ef0160f622753572617d2?d=identicon)[bubujka](/maintainers/bubujka)

---

Top Contributors

[![Bubujka](https://avatars.githubusercontent.com/u/261817?v=4)](https://github.com/Bubujka "Bubujka (75 commits)")

---

Tags

functionDSLmetaprogramming

### Embed Badge

![Health badge](/badges/bubujka-def/health.svg)

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

###  Alternatives

[hanneskod/classtools

Find, extract and process classes from file system

1319.1M40](/packages/hanneskod-classtools)[laravelista/ekko

Framework agnostic PHP package for marking navigation items active.

278673.4k4](/packages/laravelista-ekko)[ginq/ginq

LINQ to Object inspired DSL for PHP

192257.5k3](/packages/ginq-ginq)[rybakit/arguments-resolver

ArgumentsResolver allows you to determine the arguments to pass to a function or method.

26107.7k7](/packages/rybakit-arguments-resolver)[nilportugues/php_backslasher

Adds all PHP internal functions to its namespace by adding backslash to them. Improves the application's performance when OPCache is on.

889.3k18](/packages/nilportugues-php-backslasher)[clausnz/php-helpers

A Collection of useful php helper functions.

388.7k](/packages/clausnz-php-helpers)

PHPackages © 2026

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