PHP Polyfills (analogues PHP functions replacement) (tag)
| array_all() | Checks whether all elements of an array satisfy the specified condition. |
| array_any() | Checks whether at least one element of an array satisfies a condition. |
| array_find() | Finds the first array value that satisfies a condition. |
| array_find_key() | Finds the key of the first array element that satisfies a condition. |
| array_is_list() | Checks if an array is a list. |
| is_iterable() | Checks whether the contents of the variable match the pseudo-type |
| str_contains() | Checks if the specified string (substring) is in another string. Case sensitive. |
| str_ends_with() | Checks if the string ends with the specified substring. Case sensitive. |
| str_starts_with() | Checks if the string starts with the specified substring. Case sensitive. |
| wp_basename() | Gets the last component from the specified path or URL, retrieving everything after the last |
| wp_filesize() | Gets the size of the specified file. |
| wp_generate_uuid4() | Generates an identifier - a random unique string consisting of letters and numbers. Creates UUID (Universally unique identifier) version 4. |
| wp_json_encode() | Encode a variable into JSON, with some sanity checks. Checks strings and translates them to UTF-8. |
| wp_mkdir_p() | Recursively creates a directory (folder) at the specified path. Does nothing if the folder already exists. Grants parent permissions to new folders. |
| wp_parse_str() | Parses the query string, for example, |
| wp_rand() | Generates a random number between the specified min and max. |
| wp_sprintf() | Variant of the PHP function |