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
- PHP version is greater than or equal to 5.6
- 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-reqsFor specific usage, please refer to the specific function code.
This file contains functions for working with arrays. It includes functions for filtering, mapping, and reducing arrays.
This file contains functions for working with colors. It includes functions for converting between different color formats, such as RGB, HSL, and HEX.
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.
This file contains functions for working with Content Security Policy (CSP). It includes functions for building CSP rules and reporting rules.
This file contains functions for working with cURL. It includes functions for sending GET, POST, and other types of HTTP requests.
This file contains functions for working with databases. It includes functions for connecting to databases, executing queries, and retrieving results.
This file contains functions for working with environment variables. It includes functions for getting and setting environment variables.
This file contains functions for working with events. It includes functions for triggering and listening to events.
This file contains functions for working with files. It includes functions for reading, writing, and deleting files.
This file contains functions for working with fonts. It includes functions for loading and manipulating font data.
This file contains functions for working with HTML. It includes functions for parsing and generating HTML.
This file contains functions for working with HTTP. It includes functions for sending and receiving HTTP requests.
This file contains functions for working with sessions. It includes functions for starting, reading, and writing session data.
This file contains functions for working with spreadsheets. It includes functions for reading and writing spreadsheet data.
This file contains functions for working with strings. It includes functions for manipulating and formatting strings.
This file contains functions for working with time and dates. It includes functions for formatting and manipulating dates and times.
This file contains miscellaneous utility functions. It includes functions for working with arrays, strings, and other data types.