PHPackages                             lfphp/func - 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. lfphp/func

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

lfphp/func
==========

A lite function pack for PHP.

2.0.90(1mo ago)36.2k↑155.6%210Apache-2.0PHPPHP &gt;=7.1CI failing

Since Mar 30Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/sasumi/Func)[ Packagist](https://packagist.org/packages/lfphp/func)[ Docs](http://blog.yikepi.com/)[ GitHub Sponsors](https://github.com/sasumi)[ RSS](/packages/lfphp-func/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)Dependencies (2)Versions (259)Used By (10)

PHP Enhancement Functions Library
=================================

[](#php-enhancement-functions-library)

Common PHP function library, some functions of this library depend on PHP extensions, if the use environment does not need to use these functions, you can manually ignore them. The list of dependent extensions is as follows:

- mbstring string processing function
- json json processing function, json network request related
- curl network request library
- pdo DB operation function, other functions basically do not depend on this extension

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

[](#installation)

1. PHP version is greater than or equal to 5.6
2. Some functions must be installed with extensions: mb\_string, json to use

Please use Composer to install:

```
# Normal installation mode
composer require lfphp/func

# Ignore platform environment extension dependency installation mode
composer require lfphp/func --ignore-platform-reqs
```

For specific usage, please refer to the specific function code.

[Detailed function list](functions.md)

Source Introduction
-------------------

[](#source-introduction)

### [array.php](./doc/array.md)

[](#arrayphp)

This file contains functions for working with arrays. It includes functions for filtering, mapping, and reducing arrays.

### [color.php](./doc/color.md)

[](#colorphp)

This file contains functions for working with colors. It includes functions for converting between different color formats, such as RGB, HSL, and HEX.

### [cron.php](./doc/cron.md)

[](#cronphp)

This file contains functions for working with cron schedules. It includes functions for checking if a cron format matches a specified timestamp and for monitoring cron commands.

### [csp.php](./doc/csp.md)

[](#cspphp)

This file contains functions for working with Content Security Policy (CSP). It includes functions for building CSP rules and reporting rules.

### [curl.php](./doc/curl.md)

[](#curlphp)

This file contains functions for working with cURL. It includes functions for sending GET, POST, and other types of HTTP requests.

### [db.php](./doc/db.md)

[](#dbphp)

This file contains functions for working with databases. It includes functions for connecting to databases, executing queries, and retrieving results.

### [env.php](./doc/env.md)

[](#envphp)

This file contains functions for working with environment variables. It includes functions for getting and setting environment variables.

### [event.php](./doc/event.md)

[](#eventphp)

This file contains functions for working with events. It includes functions for triggering and listening to events.

### [file.php](./doc/file.md)

[](#filephp)

This file contains functions for working with files. It includes functions for reading, writing, and deleting files.

### [font.php](./doc/font.md)

[](#fontphp)

This file contains functions for working with fonts. It includes functions for loading and manipulating font data.

### [html.php](./doc/html.md)

[](#htmlphp)

This file contains functions for working with HTML. It includes functions for parsing and generating HTML.

### [http.php](./doc/http.md)

[](#httpphp)

This file contains functions for working with HTTP. It includes functions for sending and receiving HTTP requests.

### [session.php](./doc/session.md)

[](#sessionphp)

This file contains functions for working with sessions. It includes functions for starting, reading, and writing session data.

### [sheet.php](./doc/sheet.md)

[](#sheetphp)

This file contains functions for working with spreadsheets. It includes functions for reading and writing spreadsheet data.

### [string.php](./doc/string.md)

[](#stringphp)

This file contains functions for working with strings. It includes functions for manipulating and formatting strings.

### [time.php](./doc/time.md)

[](#timephp)

This file contains functions for working with time and dates. It includes functions for formatting and manipulating dates and times.

### [util.php](./doc/util.md)

[](#utilphp)

This file contains miscellaneous utility functions. It includes functions for working with arrays, strings, and other data types.

Get the latest version of the library
-------------------------------------

[](#get-the-latest-version-of-the-library)

###  Health Score

55

—

FairBetter than 97% of packages

Maintenance89

Actively maintained with recent releases

Popularity28

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 96% 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 ~8 days

Total

257

Last Release

54d ago

Major Versions

1.3.26 → 2.0.02024-11-21

PHP version history (2 changes)1.0.4PHP &gt;=5.6

1.3.14PHP &gt;=7.1

### Community

Maintainers

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

---

Top Contributors

[![sasumi](https://avatars.githubusercontent.com/u/166525?v=4)](https://github.com/sasumi "sasumi (310 commits)")[![CnSwing](https://avatars.githubusercontent.com/u/189636526?v=4)](https://github.com/CnSwing "CnSwing (12 commits)")[![pwj1230](https://avatars.githubusercontent.com/u/17899798?v=4)](https://github.com/pwj1230 "pwj1230 (1 commits)")

---

Tags

enhancementfunctionlightweightphpfunction

### Embed Badge

![Health badge](/badges/lfphp-func/health.svg)

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

###  Alternatives

[laravelista/ekko

Framework agnostic PHP package for marking navigation items active.

274691.7k4](/packages/laravelista-ekko)[rybakit/arguments-resolver

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

26111.1k7](/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.3k20](/packages/nilportugues-php-backslasher)[clausnz/php-helpers

A Collection of useful php helper functions.

389.8k](/packages/clausnz-php-helpers)[bayfrontmedia/php-array-helpers

Helper class to provide useful array functions.

1414.3k26](/packages/bayfrontmedia-php-array-helpers)[nilportugues/php_todo

Looks into the code using a user-defined list of to-do phrases and stops commit if the total amount increased or is above a threshold.

1210.0k](/packages/nilportugues-php-todo)

PHPackages © 2026

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