public function select_fx($fx, $get_array = false)
{
$this->readmemory();
if (empty($this->mem[self::map_keys])) {
return false;
}
$arr = array();
foreach ($this->mem[self::map_keys] as $index => $s) {
if (!is_array($s)) {
continue;
}
if ($fx($s, $index) === true) {
if (!$get_array) {
return $s;
} else {
$arr[$index] = $s;
}
}
}
if (!$get_array || empty($arr)) {
return false;
} else {
return $arr;
}
}