A simple library containing a set of PHP helper methods, constants, and classes.
composer i
cp .rc.example .rc
cp .test.example .test
source .rcNow, you can type devt in the terminal to run a simple local command-line test with Symfony-style output:
true # the result of Date::isLeapYear(2024);Generates a random Base62 string with variable length controlled by the parameter.
Converts a decimal number to a Base62 number string.
Converts a Base62 number string to a decimal number string.
Encodes the input string to a URL-safe Base64 format.
Decodes a URL-safe Base64 string back to its original value.
Encrypts the input string using a public key.
Decrypts the input string using a private key.
Validate a datetime string in 'Y-m-d H:i:s' format, including BCE years.
Determine if a year is a leap year.
Validate if a given date is legal.
Validate if a given time is legal.
Validate the validity of an email address (as closely as possible to RFC 5322 and RFC 6531 standards).
Convert Excel column letters to a number.
Convert a number to Excel column letters.
Generates a GUID.
Checks if a given GUID is valid.
Encode a given data into JSON format with special characters and slashes unescaped.
Pretty print a given data into JSON format with special characters and slashes unescaped.
Generates a key pair of private and public keys.
Generate a Base62 TGUID with additional padding to meet 42 characters.
42, the Answer to the Ultimate Question of Life, The Universe, and Everything!
Generate a UUID by combining uniqid and a standard GUID.
Generate a GUID in Base62 encoding.
Generate a TGUID in Base62 encoding.
Convert a Base62 TGUID to a UTC datetime.
Convert a datetime string into a Base62 number string just like the first 10 characters of a TGUID.