All

Requires the output of every comparator to be true.

Any

Requires the output of at least one comparator to be true.

Check if a value is an array or an ArrayAccess object.

Has

Check if a given key exists using dot-notation.

Checks if an array is empty.

Checks if an array is a list.

Checks if an array is a map.

Compare a value using a callback.

Check if the count of the input matches the min and max values.

Checks if the value is equal to the given value. Uses loose comparison.

Checks if a string is a valid datetime in the given format.

Checks if a string is hexadecimal. Optionally allows spaces between each byte.

Checks if a string is a valid JSON string.

Check if the value is of a given type. Supports all scalar types, objects, arrays, callables, classes, interfaces and traits.

Not

Inverts the result of a mutator.

Checks if a number is even.

Checks if a number is odd.

Check if the input matches the min and max values.

One

Only one of the given comparators must be true. Outputs false if none or more than one is true (xor).

Checks if the value is identical to the given value. Uses strict comparison.

Check if a string contains any or all of the search strings, with support for case insensitivity.

Check if the length of the input matches the min and max values.

Check if a string matches a regular expression pattern.

Not yet in use - Should be used for later sanitization of hex strings once implemented.

Allows you to dump the value inside a chain of mutators for inspection while developing.

Allows you to dump the value inside a chain of mutators for inspection while developing. Kills the script afterwards.

Log

Logs a value to a PSR-3 logger.

At

Get element at the specified index. If the index does not exist, the default value is returned.

Collapse an array of arrays into a single array.

Removes specified keys from an array.

Filter an array using a callback. The callback receives both the value and the key of the array.

Retrieve the first element of an array. Optionally, a callback can be provided to filter the array.

Exchanges all keys with their associated values in an arra

Get

Get value from array or object by key using dot-notation.

Implode an array or iterable value.

Changes key casing of an array.

Retrieve all the keys of an array

Returns the last element of an array.

Map

Applies the callback to the elements of the given array

Applies the callback to the keys of the given array

Retrieve only the keys specified.

Return an array with elements in reverse order

Set

Set a value in an array or object by key using dot notation.

Sorts an array. The callback is used to retrieve the value to sort by. If no callback is provided, the value itself is used.

Sorts the keys of an array.

Retrieves all the values of an array

Apply a user function to every member of an array

Apply a user function recursively to every member of an array

Wraps a value in an array (if it isn't already an array)

To

Convert the input to a given type,

Converts a value to a class instance using the given class' constructor.

Mutate a value using a callback.

Abs

Calculate the absolute value of a number.

Rounds a number up. Optionally with a given precision.

Rounds a number down. Optionally with a given precision.

Add

Add a number to a numeric value.

Divides a number with a given divisor.

Calculate the modulo of a number.

Multiply a number with a given multiplier.

Pow

Raise a number to a given exponent.

Calculate the root of a number.

Subtract a number from another number.

Round a number. By default, this will round to the nearest integer. The precision and mode can be set to change this.

Combine multiple mutators into one. The output of the first mutator is passed to the second mutator, and so on.

Decode a base64 encoded string.

Encode a string using to base64.

Deserialize input.

Decode a JSON string to an associative array or object. Associative arrays are the default.

Encode a value into a JSON string.

Serialize input

Retrieves the remainder of a string after a given substring.

Append a string to the input.

Retrieves the part of a string before a given substring.

Converts string between different casing types.

Explode a string into an array

Generates a hash of the input string with the given algorithm.

Generates a hash-based message authentication code (HMAC) using a secret key with the given algorithm.

Masks a string with a single character based on a regular expression

Pad

Pads a string to a given length with another string with specified direction.

Finds the position of the first occurrence of a substring in a string

Prepend a string to the value.

Removes all occurrences of the given string from the input string.

Replace all occurrences of the search string with the replacement string.

Replace the first occurrence of the search string with the replacement string.

Replaces the last occurrence of the search string with the replacement string.

Reverses the string

Splits a string into an array of strings with a specified max size.

Extracts a substring from a string

Replaces tags {{ tag }} in a string with values from a map.

Trims a string with specified direction and characters

Truncate a string to a given length. Appends the provided ellipsis to the end of the string if it is truncated.

Converts the first character of a string to uppercase.

Converts the first character of each word in a string to uppercase.

Wraps a string in a prefix and suffix. Uses the same prefix and suffix if only one is provided.

If the condition is true, executes $then or $otherwise (if set).

Encodes and decodes data to and from base64.

Encodes and decodes data to and from JSON. Decodes to associative arrays by default.

Serialize and deserialize input.