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

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

php5friends/polyfill-create\_function
=====================================

Polyfill of create\_function()

0.0.4(5y ago)4110.8k—7.6%12FSFAPPHPPHP &gt;=5.3.0

Since Dec 9Pushed 5y ago2 watchersCompare

[ Source](https://github.com/php5friends/polyfill-create_function)[ Packagist](https://packagist.org/packages/php5friends/polyfill-create_function)[ RSS](/packages/php5friends-polyfill-create-function/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (5)Used By (2)

Polyfill of `create_function()`
===============================

[](#polyfill-of-create_function)

Uncover the grave of [`create_function()`](https://www.php.net/create_function).

Anonymous functions from this function were introduced in PHP4, obsolete with the introduction of closures in PHP5, and finally purged in PHP8.

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

[](#installation)

```
composer require php5friends/polyfill-create_function

```

Security issue
--------------

[](#security-issue)

This package uses eval to generate functions. The caller user of the function is responsible for not executing unexpected code.

**In particular, generating a function using external input or a string stored in the Database poses a significant risk.**

Functions
---------

[](#functions)

This package provides `Php5Friends\create_function()` and `create_function()`

### `Php5Friends\create_function()`

[](#php5friendscreate_function)

Wrapper function of [`create_function()`](https://www.php.net/create_function). Provides a function generation mechanism for environments where `create_function()` function does not exist.

### `Php5Friends\create_closure()`

[](#php5friendscreate_closure)

Create a `Closure` from same paremeters of `create_function()`.

### `create_function()` for PHP 8

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

Simply Polyfill function of [`create_function()`](https://www.php.net/create_function).

Copyright
---------

[](#copyright)

> (C) Copyright 2020 Friends of PHP5
>
> Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community13

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.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

1986d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[dg/composer-frontline

Composer Frontline: updates all the version constraints in the composer.json file to latest version

288.4k1](/packages/dg-composer-frontline)

PHPackages © 2026

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