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)4114.6k↓83.4%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 2d 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

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity42

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

2032d 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

[asantibanez/laravel-eloquent-state-machines

State machines for your Laravel Eloquent models

568638.4k](/packages/asantibanez-laravel-eloquent-state-machines)[voku/stop-words

Stop-Words via PHP

9011.5M17](/packages/voku-stop-words)[outl1ne/nova-settings

A Laravel Nova tool for editing custom settings using native Nova fields.

2971.0M3](/packages/outl1ne-nova-settings)[e0ipso/shaper

Lightweight library to handle in and out transformations in PHP.

158.4M5](/packages/e0ipso-shaper)[nicebooks/isbn

ISBN tools

28361.1k3](/packages/nicebooks-isbn)[dma/dma_simple_grid

Contao Extension for simple multiple grid-support

1120.7k](/packages/dma-dma-simple-grid)

PHPackages © 2026

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