public function select_fx($fx, $get_array = false)
{
$arr = array();
$l = strlen($this->prefix);
$i = new \APCIterator('user', '/^' . preg_quote($this->prefix) . '/', APC_ITER_KEY + APC_ITER_VALUE);
foreach ($i as $item) {
if (!is_array($item[self::apc_arr_value])) {
continue;
}
$s = $item[self::apc_arr_value];
$index = substr($item[self::apc_arr_key], $l);
if ($fx($s, $index) === true) {
if (!$get_array) {
return $s;
} else {
$arr[$index] = $s;
}
}
}
if (!$get_array || empty($arr)) {
return false;
} else {
return $arr;
}
}