PHPackages                             lombax85/create\_function - 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. lombax85/create\_function

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

lombax85/create\_function
=========================

A replacement for the function create\_function for PHP 8

1.0.3(5y ago)41.0k—8.9%MITPHPPHP &gt;=8.0

Since Apr 17Pushed 5y ago2 watchersCompare

[ Source](https://github.com/lombax85/create_function)[ Packagist](https://packagist.org/packages/lombax85/create_function)[ RSS](/packages/lombax85-create-function/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

PHP 8 create\_function replacement
==================================

[](#php-8-create_function-replacement)

This repository contains a replacement for the function `create_function` that has been removed from PHP 8

This is a first beta version with some limitations

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

[](#installation)

`composer require lombax85/create_function`

Usage
-----

[](#usage)

```
// Simple function
$f = create_function('$a,$b', 'return $a+$b;');
echo $f(1,2); // prints 3

// pass by reference
$f = create_function('&$a', '$a++;');
$a = 1;
$f($a);
echo $a; // prints 2

```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

3

Last Release

1903d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1051056?v=4)[lombax85](/maintainers/lombax85)[@lombax85](https://github.com/lombax85)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lombax85-create-function/health.svg)

```
[![Health](https://phpackages.com/badges/lombax85-create-function/health.svg)](https://phpackages.com/packages/lombax85-create-function)
```

###  Alternatives

[spatie/laravel-cronless-schedule

Run the Laravel scheduler without relying on cron

391329.6k1](/packages/spatie-laravel-cronless-schedule)[tey/laravel-ddd

A Laravel toolkit for Domain Driven Design patterns

1861.4k](/packages/tey-laravel-ddd)

PHPackages © 2026

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