Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / PHP

Knowledge base — PHP

Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.

Entries: 504

PHP

array_key_exists()

Check a key at the first level independently of the stored value.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

array_key_first()

Read the first key in the current iteration order without moving the internal array pointer.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

array_key_last()

Read the last key in the current iteration order without advancing or resetting the internal pointer.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

array_keys()

List every key, or supply a value to list only its matching keys.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

array_map: transforming array values

array_map builds an array of callback results for successive values. With one input array it preserves keys; with several it creates consecutive numeric keys.

Basic · PHP 8.4
PHP

array_merge()

Combine arrays in argument order.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

array_merge_recursive()

Merge nested arrays recursively.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

array_multisort()

Sort arrays together by position, using later columns to break ties.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

array_pad()

Extend an array to the absolute target length using a repeated value.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

array_pop()

Remove and return the last value of an array, modifying the array passed by reference.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

array_product()

Multiply the elements to obtain one numeric product, for example a combined scaling factor.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

array_push()

Append values to an array passed by reference and return its new element count.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

array_rand()

Select keys at random from a nonempty array.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

array_reduce()

Fold values from left to right using a callback that receives the previous accumulator and the next value.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

array_replace()

Overlay later arrays on the first array by key, including integer keys.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

array_reverse()

Build an array in reverse iteration order without changing the original.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

array_search()

Return the key of the first matching value or false if no match exists.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

array_shift()

Remove and return the first element, modifying the array passed by reference.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

array_slice()

Copy a segment using positions in iteration order.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

array_splice()

Replace a positional segment in the original array and return the removed elements.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

array_sum()

Add numeric array values to calculate a total.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

array_unique()

Return the first entry of each group of equal values and preserve its key.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

array_unshift()

Insert values at the start of the array in their argument order and return the new element count.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

array_values()

Discard the original keys and return a list of values in iteration order, indexed from zero.

Intermediate · PHP 8.4; repository runtime, production runtime not attested