PHP 8.5.0 Beta 3 available for testing

APCUIterator::__construct

(PECL apcu >= 5.0.0)

APCUIterator::__construct โ€” Construye un objeto iterador APCUIterator

Descripciรณn

public APCUIterator::__construct(
    array|string|null $search = null,
    int $format = APC_ITER_ALL,
    int $chunk_size = 100,
    int $list = APC_LIST_ACTIVE
)

Construye un APCUIterator object.

Parรกmetros

search

O bien una expresiรณn regular PCRE que coincide con nombres de clave APCu, dada como string. O una array de strings con nombres de claves APCu. O, opcionalmente null para omitir la bรบsqueda.

format

El formato deseado, tal como estรก configurado con una o mรกs de las constantes APC_ITER_*.

chunk_size

El tamaรฑo del fragmento. Debe ser un valor mayor que 0. El valor por defecto es 100.

list

El tipo de lista. O bien pasar en APC_LIST_ACTIVE o APC_LIST_DELETED.

Ejemplos

Ejemplo #1 Un ejemplo de APCUIterator::__construct()

<?php
foreach (new APCUIterator('/^counter\./') as $counter) {
echo
"$counter[key]: $counter[value]\n";
apc_dec($counter['key'], $counter['value']);
}
?>

Ver tambiรฉn

๏ผ‹add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top