Skip to content

AxiosLeo/php-tools

Repository files navigation

PHP Tools

CI Build Status Latest Stable Version MIT

Some code snippets that are often used in PHP.

Need PHP 7.4/8.0 and above.

  • Util Class
Class Name Feature Description
SM3 SM3 crypt tool
HMac support custom algorithm with HMac
UUID generate uuid string
Path path operator
Files files operator
CRC64 tool for crc64 arithmetic
ArrayMap tool for array and map data
RSACrypt RSA crypt tool
Datetime tool for date time operation
XMLParser the parser for XML string
MimeTypes tool for MimeTypes
ListToTree convert list to tree
TreeToList convert tree to list
ForkProcess multi-process demo
PharOperator tool for build phar file
BHDConverter tool for binary conversions
CDKEYProducer tool for produce CDKEY
  • Util Functions
Function Name Description
sm3 encode string with sm3 algorithm
sm3_file encode file with sm3 algorithm
hmac encode string with hmac algorithm
halt dump some information and exit process
xml_encode convert array to xml string
xml_decode convert xml string to array
uuid generate uuid string
path_join join path string
client_ip get client ip
render_str render string with params

Install

composer require axios/tools

Usage

see Unit Test Case

License

The project is open-sourced software licensed under the MIT.