timwolla,
@timwolla@phpc.social avatar

@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.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • provamag3
  • JUstTest
  • All magazines