timwolla, 2 months ago @Crell @nielsdos @beberlei No. Looking at the code it's a single-linked list. To insert at the end you need to traverse it in full. Effectively: $item = $listStart; while ($item->next !== null) { $item = $item->next; } assert($item->next === null); $item->next = $newItem; Reindexing is not a thing for linked lists, because they don't have an index.
@Crell @nielsdos @beberlei No. Looking at the code it's a single-linked list. To insert at the end you need to traverse it in full. Effectively:
$item = $listStart; while ($item->next !== null) { $item = $item->next; } assert($item->next === null); $item->next = $newItem;
Reindexing is not a thing for linked lists, because they don't have an index.