1.2.1598. ext/teds

teds (Tentative Extra Data Structures) is a collection of data structures and iterable functionality.

<?php
// discards keys
$it = new Teds\BitVector(['first' => true, 'second' => false]);
foreach ($it as $key => $value) {
    printf("Key: %s\nValue: %s\n", var_export($key, true), var_export($value, true));
}
var_dump($it);
var_dump((array)$it);

$it = new Teds\BitVector([]);
var_dump($it);
var_dump((array)$it);
foreach ($it as $key => $value) {
    echo "Unreachable\n";
}

// Teds\BitVector will always reindex keys in the order of iteration, like array_values() does.
$it = new Teds\BitVector([2 => true, 0 => false]);
var_dump($it);

var_dump(new Teds\BitVector([-1 => false]));
?>

See also PECL TEDS.

1.2.1598.1. Specs

Short name

Extensions/Extteds

Rulesets

All, Appinfo

Exakat since

2.4.8

PHP Version

All

Severity

Minor

Time To Fix

Quick (30 mins)

Precision

Very high

Available in

Entreprise Edition, Exakat Cloud