Method | Description | |
---|---|---|
array_change_key_case ( |
Converts string keys in PhpArray to lower case. Integer keys as well as all values remain unchanged. |
|
array_change_key_case ( |
Converts string keys in PhpArray to specified case. Integer keys as well as all values remain unchanged. |
|
array_chunk ( |
Splits an array into chunks. Chunks will contain deep copies of array items. |
|
array_combine ( |
Creates an array using one array for its keys and the second for its values. keys and values should have the same length (zero is adminssible - an empty array is returned). Keys are converted using PHP.Core.Convert.ObjectToArrayKey before hashed to resulting array. If more keys has the same value after conversion the last one is used. If a key is not a legal array key it is skipped.Doesn't dereference PHP references. |
|
array_count_values ( |
Counts frequency of each value in an array. Only string and int values are counted. Note, string numbers (e.g. "10") and their integer equivalents (e.g. 10) are counted separately. |
|
array_diff ( |
Computes the difference of arrays. Keys are preserved. Entries are considered to be equal iff values compared by by string comparison method are the same (see ValueComparer.String). |
|
array_diff_assoc ( |
Computes the difference of arrays. Keys are preserved. Entries are considered to be equal iff they has the same keys and values according to string method comparison (see EntryComparer and PhpStringComparer). |
|
array_diff_key ( |
Computes the difference of arrays. Entries are considered to be equal iff keys compared by by string comparison method are the same (see KeyComparer.String). |
|
array_diff_uassoc ( |
Computes the difference of arrays using a specified comparer.
|
|
array_diff_ukey ( |
Computes the difference of arrays using a specified key comparer.
|
|
array_fill ( int startIndex, int count, |
Creates a new array filled with a specified value.
|
|
array_fill_keys ( |
||
array_filter ( |
Filters an array using a specified callback.
|
|
array_filter ( |
Retuns the specified array. see http://php.net/manual/en/function.array-filter.php The caller argument is here just because of the second Filter() method. Phalanger shares the function properties over the overloads. |
|
array_flip ( |
Swaps all keys and their associated values in an array. Values which are not of type string nor int are skipped and for each such value a warning is reported. If there are more entries with the same value in the array the last key is considered others are ignored. String keys are converted using Core.Convert.StringToArrayKey. Unlike PHP this method doesn't return false on failure but a null reference. This is because it fails only if array is a null reference. |
|
array_intersect ( |
Computes the intersection of arrays.
|
|
array_intersect_assoc ( |
Computes the intersection of arrays.
|
|
array_intersect_key ( |
Computes the intersection of arrays.
|
|
array_intersect_uassoc ( |
Computes the intersection of arrays using a specified comparer.
|
|
array_intersect_ukey ( |
Computes the intersection of arrays using a specified key comparer.
|
|
array_key_exists ( IntStringKey key, |
Checks if a key exists in the array. key is converted before the search. |
|
array_keys ( |
Retrieves an array of keys contained in a given array.
|
|
array_keys ( |
Retrieves an array of some keys contained in a given array.
|
|
array_map ( |
Applies a callback function on specified tuples one by one storing its results to an array. In the i-th call the j-th parameter of the callback will be the i-th value of the j-the array or a null if that array has less then i entries. If the callback assigns a value to a parameter passed by reference in the i-the call and the respective array contains at least i elements the assigned value is propagated to the array. |
|
array_merge ( ) : |
Merges one or more arrays. Integer keys are changed to new ones, string keys are preserved. Values associated with existing string keys are be overwritten.
|
|
array_merge_recursive ( |
Merges arrays recursively. Integer keys are reset so there cannot be a conflict among them. Conflicts among string keys are resolved by merging associated values into arrays. Merging is propagated recursively. Merged values are dereferenced. References are preserved in non-merged values. |
|
array_multisort ( |
Sort multiple arrays. Reindexes integer keys in the sorted arrays and restarts their intrinsic enumerators. |
|
array_pad ( |
Pads array to the specified length with a value. If the length is negative adds |length| elements at beginning otherwise adds elements at the end. Values with integer keys that are contained in the source array are inserted to the resulting one with new integer keys counted from zero (or from |length| if length negative).
|
|
array_pop ( |
Removes the last item from an array and returns it. Resets intrinsic enumerator. |
|
array_product ( |
Computes a product of all values in an array. Each value is converted to a number in the same way it is done by PHP.
|
|
array_push ( |
Adds multiple items into an array.
|
|
array_rand ( |
Chooses specified number of keys from an array at random. Items are chosen uniformly in time O(n), where n is the number of items in the array using conveyor belt sampling. |
|
array_reduce ( |
||
array_reduce ( |
||
array_replace ( [ array ) : |
array_replace() replaces the values of the first array with the same values from all the following arrays. If a key from the first array exists in the second array, its value will be replaced by the value from the second array. If the key exists in the second array, and not the first, it will be created in the first array. If a key only exists in the first array, it will be left as is. If several arrays are passed for replacement, they will be processed in order, the later arrays overwriting the previous values. array_replace() is not recursive : it will replace values in the first array by whatever type is in the second array.
|
|
array_replace_recursive ( [ array ) : |
array_replace_recursive() replaces the values of the first array with the same values from all the following arrays. If a key from the first array exists in the second array, its value will be replaced by the value from the second array. If the key exists in the second array, and not the first, it will be created in the first array. If a key only exists in the first array, it will be left as is. If several arrays are passed for replacement, they will be processed in order, the later array overwriting the previous values. array_replace_recursive() is recursive : it will recurse into arrays and apply the same process to the inner value. When the value in array is scalar, it will be replaced by the value in array1, may it be scalar or array. When the value in array and array1 are both arrays, array_replace_recursive() will replace their respective value recursively.
|
|
array_reverse ( |
Returns array which elements are taken from a specified one in reversed order.
|
|
array_search ( |
Searches the array for a given value and returns the corresponding key if successful.
|
|
array_shift ( |
Removes the first item of an array and reindex integer keys starting from zero. Resets intrinsic enumerator. |
|
array_slice ( |
Retrieves a slice of specified array. See PhpMath.AbsolutizeRange for details about offset and length. |
|
array_splice ( |
Removes a slice of an array. length items are removed from array starting with the offset-th one. |
|
array_splice ( |
Replaces a slice of an array with specified item(s). The same as Splice(PhpArray,int,int,object) except for that replacement items are deeply copied to the array. |
|
array_sum ( |
Sums all values in an array. Each value is converted to a number in the same way it is done by PHP.
|
|
array_udiff ( |
Computes the difference of arrays using a specified comparer.
|
|
array_udiff_assoc ( |
Computes the difference of arrays using a specified comparer.
|
|
array_udiff_uassoc ( |
Computes the difference of arrays using specified comparers.
|
|
array_uintersect ( |
Computes the intersection of arrays using a specified comparer.
|
|
array_uintersect_assoc ( |
Computes the intersection of arrays using a specified comparer.
|
|
array_uintersect_uassoc ( |
Computes the intersection of arrays using specified comparers.
|
|
array_unique ( |
Removes duplicate values from an array. Values are compared using string comparison method (ValueComparer.String). |
|
array_unshift ( |
Inserts specified items before the first item of an array and reindex integer keys starting from zero.
|
|
array_values ( |
Retrieves an array of values contained in a given array. Doesn't dereference PHP references. |
|
array_walk ( |
Applies a user function or method on each element of a specified array or dictionary. See Walk(PHP.Core.Reflection.DTypeDesc,PhpHashtable,PhpCallback,object) for details. |
|
array_walk ( |
Applies a user function or method on each element (value) of a specified dictionary.
|
|
array_walk_recursive ( |
Applies a user function or method on each element of a specified array recursively. See Walk(PHP.Core.Reflection.DTypeDesc,PhpHashtable,PhpCallback,object) for details. |
|
array_walk_recursive ( |
Applies a user function or method on each element (value) of a specified dictionary recursively. Walk. |
|
arsort ( |
Sorts an array using specified comparison method for comparing values in reverse order preserving key-value associations. Resets array's intrinsic enumerator. |
|
asort ( |
Sorts an array using specified comparison method for comparing values preserving key-value associations. Resets array's intrinsic enumerator. |
|
current ( IPhpEnumerable array ) : |
Retrieves a value being pointed by an array intrinsic enumerator. The value returned is dereferenced. |
|
each ( IPhpEnumerable array ) : |
Retrieves the current entry and advances array intrinsic enumerator one item forward.
|
|
end ( IPhpEnumerable array ) : |
Moves array intrinsic enumerator so it will point to the last item of the array. The value returned is dereferenced. |
|
in_array ( |
Checks if a value exists in an array.
|
|
key ( IPhpEnumerable array ) : |
Retrieves a key being pointed by an array intrinsic enumerator.
|
|
key_exists ( IntStringKey key, |
Alias of array_key_exists.
|
|
krsort ( |
Sorts an array using specified comparison method for comparing keys in reverse order. Resets array's intrinsic enumerator. |
|
ksort ( |
Sorts an array using specified comparison method for comparing keys. Resets array's intrinsic enumerator. |
|
natcasesort ( |
Sorts an array using case insensitive natural comparison method for comparing values preserving key-value association. Resets array's intrinsic enumerator. |
|
natsort ( |
Sorts an array using case sensitive natural comparison method for comparing values preserving key-value association. Resets array's intrinsic enumerator. |
|
next ( IPhpEnumerable array ) : |
Advances array intrinsic enumerator one item forward. The value returned is dereferenced. |
|
pos ( IPhpEnumerable array ) : object |
Retrieves a value being pointed by an array intrinsic enumerator. Alias of current. The value returned is dereferenced. |
|
prev ( IPhpEnumerable array ) : |
Moves array intrinsic enumerator one item backward. The value returned is dereferenced. |
|
range ( |
Creates an array containing range of elements with step 1.
|
|
range ( |
Creates an array containing range of elements with arbitrary step. Implements PHP awful range function. The result depends on types and content of parameters under the following rules: |
|
range ( long low, long high ) : |
Creates an array containing range of elements with step 1.
|
|
reset ( IPhpEnumerable array ) : |
Moves array intrinsic enumerator so it will point to the first item of the array. The value returned is dereferenced. |
|
rsort ( |
Sorts an array using specified comparison method for comparing values in reverse order. Resets array's intrinsic enumerator. |
|
shuffle ( |
Randomizes the order of elements in the array using PhpMath random numbers generator. Reindexes all keys in the resulting array. |
|
sort ( |
Sorts an array using specified comparison method for comparing values. Resets array's intrinsic enumerator. |
|
uasort ( |
Sorts an array user comparison callback method for comparing values preserving key-value associations. Resets array's intrinsic enumerator. |
|
uksort ( |
Sorts an array using user comparison callback for comparing keys. Resets array's intrinsic enumerator. |
|
usort ( |
Sorts an array using user comparison callback for comparing values. Resets array's intrinsic enumerator. |
Method | Description | |
---|---|---|
ArrayReplaceImpl ( |
Performs deep copy of array, return array with replacements. | |
ArrayReplaceImpl ( |
Performs replacements on deeply-copied array. Performs deep copies of replace values.
|
|
Chunk ( |
Splits an array into chunks.
|
|
ChunkInternal ( |
Internal version of Chunk with deep-copy option.
|
|
GetComparer ( |
Gets an instance of PHP comparer parametrized by specified method, order, and compared item type.
|
|
MergeRecursive ( |
Merges arrays recursively.
|
|
MergeRecursiveInternal ( |
Adds items of "array" to "result" merging those whose string keys are the same.
|
|
MultiSortResolveArgs ( |
Resolves arguments passed to MultiSort method according to PHP manual for Arrays and comparers can be a null reference. In such a case only number of arrays to be sorted is returned. Otherwise, arrays is filled with these arrays and comparers with comparers defined by appropriate arguments. |
|
PrepareWalk ( IDictionary array, IPhpCallable callback, |
Prepares a walk for array_walk(Context, PhpHashtable, IPhpCallable, PhpValue) and array_walk_recursive(Context, PhpHashtable, IPhpCallable, PhpValue) methods.
|
|
RandomSubset ( ICollection |
Chooses specified number of items from a collection at random. Items are chosen uniformly in time O(n), where n is the number of items in the collection using conveyor belt sampling. |
|
RangeOfChars ( char low, char high, int step ) : |
Creates an array containing range of characters from the [low;high] interval with arbitrary step.
|
|
RangeOfDoubles ( double low, double high, double step ) : |
Creates an array containing range of doubles from the [low;high] interval with arbitrary step.
|
|
RangeOfLongInts ( long low, long high, long step ) : |
Creates an array containing range of long integers from the [low;high] interval with arbitrary step.
|
|
SetOperation ( SetOperations op, |
Internal method common for all functions.
|
|
SpliceInternal ( |
Implementation of array_splice(PhpArray,int,int,object) and array_splice(PhpArray,int,int,object). Whether to make a deep-copy of items in the replacement. |
|
SplitArraysAndComparers ( int comparerCount, |
There have to be at least 1 value in vars. The last is converted to callback, the rest to arrays.
|
|
StringKeysToLower ( |
Converts string keys in PhpArray to lower case. Integer keys as well as all values remain unchanged. |
|
StringKeysToUpper ( |
Converts string keys in PhpArray to upper case. Integer keys as well as all values remain unchanged. |
|
VisitEntryOnWalk ( |
Visits an entry of array which array_walk(Context, PhpHashtable, IPhpCallable, PhpValue) or array_walk_recursive(Context, PhpHashtable, IPhpCallable, PhpValue) is walking through.
|
public static array_change_key_case ( |
||
array | The |
|
return |
public static array_change_key_case ( |
||
array | The |
|
keyCase | LetterCase | The |
return |
public static array_chunk ( |
||
array | The array to be split. | |
size | int | The number of items in each chunk (except for the last one where can be lesser items). |
preserveKeys | bool | Whether to preserve keys in chunks. |
return |
public static array_combine ( |
||
keys | The keys of resulting array. | |
values | The values of resulting array. | |
return |
public static array_count_values ( |
||
array | The array which values to count. | |
return |
public static array_diff ( |
||
ctx | Current runtime context. | |
array | The array from which to take items away. | |
return |
public static array_diff_assoc ( |
||
ctx | Current runtime context. | |
array | The array from which to take items away. | |
return |
public static array_diff_key ( |
||
ctx | Current runtime context. | |
array | The array from which to take items away. | |
return |
public static array_diff_uassoc ( |
||
ctx | ||
array | ||
array0 | ||
return |
public static array_diff_ukey ( |
||
ctx | ||
array | ||
array0 | ||
return |
public static array_fill ( int startIndex, int count, |
||
startIndex | int | The value of the key of the first item in the array. |
count | int | The number of items in the array. |
value | The value copied to all items in the array. | |
return |
public static array_fill_keys ( |
||
keys | ||
value | ||
return |
public static array_filter ( |
||
ctx | Current runtime context. | |
array | The array to be filtered. | |
callback | IPhpCallable |
/// The callback called on each value in the |
return |
public static array_filter ( |
||
array | ||
return |
public static array_flip ( |
||
array | The array. | |
return |
public static array_intersect ( |
||
ctx | ||
array | ||
return |
public static array_intersect_assoc ( |
||
ctx | ||
array | ||
return |
public static array_intersect_key ( |
||
ctx | ||
array | ||
return |
public static array_intersect_uassoc ( |
||
ctx | ||
array | ||
array0 | ||
return |
public static array_intersect_ukey ( |
||
ctx | ||
array | ||
array0 | ||
return |
public static array_key_exists ( IntStringKey key, |
||
key | IntStringKey | The key to be searched for. |
array | The array where to search for the key. | |
return | bool |
public static array_keys ( |
||
array | An array which keys to get. | |
return |
public static array_keys ( |
||
array | An array which keys to get. | |
searchValue | Only the keys for this value are returned.
/// Values are compared using regular comparison method ( |
|
strict | bool | If true, uses strict comparison method (operator "==="). |
return |
public static array_map ( |
||
ctx | Current runtime context. | |
map | IPhpCallable |
/// A callback to be called on tuples. The number of arguments should be the same as
/// the number of arrays specified by |
return |
public static array_merge ( ) : |
||
return |
public static array_merge_recursive ( |
||
array | The first array to merge. | |
return |
public static array_multisort ( |
||
ctx | Current runtime context. | |
first | [ | The first array to be sorted. |
return | bool |
public static array_pad ( |
||
array | The source array. | |
length | int | The length of the resulting array. |
value | The value to add in array. | |
return |
public static array_pop ( |
||
array | The array whcih item to pop. | |
return |
public static array_product ( |
||
array | ||
return | PhpNumber |
public static array_push ( |
||
array | The array where to add values. | |
return | int |
public static array_rand ( |
||
array | The |
|
count | int | The number of items to choose. |
return |
public static array_reduce ( |
||
ctx | ||
array | [ | |
function | IPhpCallable | |
return |
public static array_reduce ( |
||
ctx | ||
array | [ | |
function | IPhpCallable | |
initialValue | ||
return |
public static array_replace ( [ array ) : |
||
array | [ | The array in which elements are replaced. |
return |
public static array_replace_recursive ( [ array ) : |
||
array | [ | The array in which elements are replaced. |
return |
public static array_reverse ( |
||
array | The array to be reversed. | |
preserveKeys | bool | Whether keys should be left untouched. /// If set to false then integer keys are reindexed starting from zero. |
return |
public static array_search ( |
||
needle | The value to search for. | |
haystack | The |
|
strict | bool | Whether strict comparison method (operator ===) is used for comparing values. |
return |
public static array_shift ( |
||
array | The array to be shifted. | |
return |
public static array_slice ( |
||
array | The array which slice to get. | |
offset | int | The relativized offset of the first item of the slice. |
length | int | The relativized length of the slice. |
preserveKeys | bool | Whether to preserve integer keys. If false, the integer keys are reset. |
return |
public static array_splice ( |
||
array | The array which slice to remove. | |
offset | int | The relativized offset of a first item of the slice. |
length | int | The relativized length of the slice. |
return |
public static array_splice ( |
||
array | ||
offset | int | |
length | int | |
replacement | ||
return |
public static array_sum ( |
||
array | ||
return | PhpNumber |
public static array_udiff ( |
||
ctx | ||
array | ||
array0 | ||
return |
public static array_udiff_assoc ( |
||
ctx | ||
array | ||
array0 | ||
return |
public static array_udiff_uassoc ( |
||
ctx | ||
array | ||
array0 | ||
return |
public static array_uintersect ( |
||
ctx | ||
array | ||
array0 | ||
return |
public static array_uintersect_assoc ( |
||
ctx | ||
array | ||
array0 | ||
return |
public static array_uintersect_uassoc ( |
||
ctx | ||
array | ||
array0 | ||
return |
public static array_unique ( |
||
ctx | Current runtime context. | |
array | The array which duplicate values to remove. | |
sortFlags | ComparisonMethod | Specifies how the values are compared to be identical. |
return |
public static array_unshift ( |
||
array | The array to be unshifted. | |
return | int |
public static array_values ( |
||
array | An array which values to get. | |
return |
public static array_walk ( |
||
ctx | ||
array | [ | |
function | IPhpCallable | |
return | bool |
public static array_walk ( |
||
ctx | Current runtime context. | |
array | [ | The array (or generic dictionary) to walk through. |
callback | IPhpCallable |
/// The callback called for each element of
|
data | An additional parameter passed to |
|
return | bool |
public static array_walk_recursive ( |
||
ctx | ||
array | [ | |
callback | IPhpCallable | |
return | bool |
public static array_walk_recursive ( |
||
ctx | Current runtime context. | |
array | [ | The array to walk through. |
callback | IPhpCallable | The callback called for each element of |
data | An additional parameter passed to |
|
return | bool |
public static arsort ( |
||
ctx | Current runtime context. | |
array | [ | The array to be sorted. |
comparisonMethod | ComparisonMethod | The method to be used for comparison of values. |
return | bool |
public static asort ( |
||
ctx | Current runtime context. | |
array | [ | The array to be sorted. |
comparisonMethod | ComparisonMethod | The method to be used for comparison of values. |
return | bool |
public static current ( IPhpEnumerable array ) : |
||
array | IPhpEnumerable | The array which current value to return. |
return |
public static each ( IPhpEnumerable array ) : |
||
array | IPhpEnumerable | The array which entry get and which intrinsic enumerator to advance. |
return |
public static end ( IPhpEnumerable array ) : |
||
array | IPhpEnumerable | The array which intrinsic enumerator to move. |
return |
public static in_array ( |
||
needle | The value to search for. | |
haystack | The |
|
strict | bool | Whether strict comparison method (operator ===) is used for comparing values. |
return | bool |
public static key ( IPhpEnumerable array ) : |
||
array | IPhpEnumerable | The array which current key to return. |
return |
public static key_exists ( IntStringKey key, |
||
key | IntStringKey | |
array | ||
return | bool |
public static krsort ( |
||
ctx | Current runtime context. | |
array | [ | The array to be sorted. |
comparisonMethod | ComparisonMethod | The method to be used for comparison of keys. |
return | bool |
public static ksort ( |
||
ctx | Current runtime context. | |
array | [ | The array to be sorted. |
comparisonMethod | ComparisonMethod | The method to be used for comparison of keys. |
return | bool |
public static natcasesort ( |
||
ctx | Current runtime context. | |
array | [ | The array to be sorted. |
return | bool |
public static natsort ( |
||
ctx | Current runtime context. | |
array | [ | The array to be sorted. |
return | bool |
public static next ( IPhpEnumerable array ) : |
||
array | IPhpEnumerable | The array which intrinsic enumerator to advance. |
return |
public static pos ( IPhpEnumerable array ) : object | ||
array | IPhpEnumerable | The array which current value to return. |
return | object |
public static prev ( IPhpEnumerable array ) : |
||
array | IPhpEnumerable | The array which intrinsic enumerator to move. |
return |
public static range ( |
||
ctx | Current runtime context. | |
low | Lower bound of the interval. | |
high | Upper bound of the interval. | |
return |
public static range ( |
||
ctx | Current runtime context. | |
low | Lower bound of the interval. | |
high | Upper bound of the interval. | |
step | The step. | |
return |
public static range ( long low, long high ) : |
||
low | long | Lower bound of the interval. |
high | long | Upper bound of the interval. |
return |
public static reset ( IPhpEnumerable array ) : |
||
array | IPhpEnumerable | The array which intrinsic enumerator to move. |
return |
public static rsort ( |
||
ctx | Current runtime context. | |
array | [ | The array to be sorted. |
comparisonMethod | ComparisonMethod | The method to be used for comparison of keys. |
return | bool |
public static shuffle ( |
||
array | ||
return | bool |
public static sort ( |
||
ctx | Current runtime context. | |
array | [ | The array to be sorted. |
comparisonMethod | ComparisonMethod | The method to be used for comparison of values. |
return | bool |
public static uasort ( |
||
ctx | Current runtime context. | |
array | [ | The array to be sorted. |
compare | IPhpCallable | The user callback to be used for comparison of values. |
return | bool |
public static uksort ( |
||
ctx | Current runtime context. | |
array | [ | The array to be sorted. |
compare | IPhpCallable | The user callback to be used for comparison of values. |
return | bool |
public static usort ( |
||
ctx | Current runtime context. | |
array | [ | The array to be sorted. |
compare | IPhpCallable | The user callback to be used for comparison of values. |
return | bool |