Page MenuHomePhorge
Diviner All Atoms
    • Convert a human-readable unit description into a numeric one. This function allows you to replace this:
    • Function
    • Perform an `fwrite()` which distinguishes between EAGAIN and EPIPE.
    • Function
    • Converts a string to a loggable one, with unprintables and newlines escaped.
    • Function
    • Add an element between every two elements of some array. That is, given a list `A, B, C, D`, and some element to interleave, `x`, this function returns `A, x, B, x, C, x, D`. This works like `implode()`, but does not concatenate the list into a string. In particular:
    • Function
    • Simplifies a common use of `array_combine()`. Specifically, this:
    • Function
    • Split a corpus of text into lines. This function splits on "\n", "\r\n", or a mixture of any of them.
    • Function
    • Merge a vector of arrays performantly. This has the same semantics as array_merge(), so these calls are equivalent:
    • Function
    • Returns the last key of an array.
    • Function
    • Returns the first key of an array.
    • Function
    • Returns the last element of an array. This is exactly like `end()` except that it won't warn you if you pass some non-referencable array to it -- e.g., the result of some other array operation.
    • Function
    • Returns the first element of an array. Exactly like reset(), but doesn't choke if you pass it some non-referenceable value like the return value of a function.
    • Function
    • Invokes the "new" operator with a vector of arguments. There is no way to `call_user_func_array()` on a class constructor, so you can instead use this function:
    • Function
    • Similar to @{function:coalesce}, but less strict: returns the first non-`empty()` argument, instead of the first argument that is strictly non-`null`. If no argument is nonempty, it returns the last argument. This is useful idiomatically for setting defaults:
    • Function
    • Returns the first argument which is not strictly null, or `null` if there are no such arguments. Identical to the MySQL function of the same name.
    • Function
    • Assert that passed data can be converted to string.
    • Function
    • Assert that two arrays have the exact same keys, in any order.
    • Function
    • Checks if all values of array are instances of the passed class. Throws `InvalidArgumentException` if it isn't true for any value.
    • Function
    • Selects a list of keys from an array, returning a new array with only the key-value pairs identified by the selected keys, in the specified order.
    • Function
    • Filter a list of arrays by removing the ones with an empty() value for some index. This function works just like @{function:mfilter}, except that it operates on a list of arrays instead of a list of objects.
    • Function
    • Filter a list of objects by executing a method across all the objects and filter out the ones with empty() results. this function works just like @{function:ifilter}, except that it operates on a list of objects instead of a list of arrays.
    • Function
    • Sort a list of arrays by the value of some index. This method is identical to @{function:msort}, but operates on a list of arrays instead of a list of objects.
    • Function
    • Sort a list of objects by a sort vector.
    • Function
    • Sort a list of objects by the return value of some method. In PHP, this is often vastly more efficient than `usort()` and similar.
    • Function
    • Group a list of arrays by the value of some index. This function is the same as @{function:mgroup}, except it operates on the values of array indexes rather than the return values of method calls.
    • Function
    • Group a list of objects by the result of some method, similar to how GROUP BY works in an SQL query. This function simplifies grouping objects by some property:
    • Function
    • Choose an index from a list of arrays. Short for "index pull", this function works just like @{function:mpull}, except that it operates on a list of arrays and selects an index from them instead of operating on a list of objects and calling a method on them.
    • Function
    • Access a property on a list of objects. Short for "property pull", this function works just like @{function:mpull}, except that it accesses object properties instead of methods. This function simplifies a common type of mapping operation:
    • Function
    • Call a method on a list of objects. Short for "method pull", this function works just like @{function:ipull}, except that it operates on a list of objects instead of a list of arrays. This function simplifies a common type of mapping operation:
    • Function
    • Access a sequence of array indexes, retrieving a deeply nested value if it exists or a default if it does not.
    • Function
    • Access an array index, retrieving the value stored there if it exists or a default if it does not. This function allows you to concisely access an index which may or may not exist without raising a warning.
    • Function
    • Identity function, returns its argument unmodified.
    • Function
    • Interact with the operating system.
    • Class
    • Parse the output of `vm_stat`.
    • Method
    • Parse the output of `/proc/meminfo`.
    • Method
    • Get information about total and free memory on the system.
    • Method
    • Concrete subclass of @{class:AbstractDirectedGraph} which can not load any data from external sources.
    • Class
    • Method
    • Get information about the current execution environment.
    • Class
    • If the PHP configuration setting "variables_order" does not include "E", the `$_ENV` superglobal is not populated with the containing environment. For details, see T12071.
    • Method
    • Compute edit distance between two scalar sequences. This class uses Levenshtein (or Damerau-Levenshtein) to compute the edit distance between two inputs. The inputs are arrays containing any scalars (not just strings) so it can be used with, e.g., utf8 sequences.
    • Class
    • Return a string representing the edits between the sequences. The string has these characters:
    • Method
    • Compute the phase of the terran moon for a given epoch.
    • Class
    • Method
    • Method
    • Method
    • Method
    • Method
    • Simple iterator that loads results page-by-page and handles buffering. In particular, this maps well to iterators that load database results page by page and allows you to implement an iterator over a large result set without needing to hold the entire set in memory.
    • Class
    • Method
    • By default, the iterator assigns a "natural" key (0, 1, 2, ...) to each result. This method is intentionally nonfinal so you can substitute a different behavior by overriding it if you prefer.
    • Method
    • Method
    • Method
    • Method
    • Configure the page size. Note that implementations may ignore this.
    • Method
    • Get the configured page size.
    • Method