Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6592739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:35:35+00:00 2026-05-25T17:35:35+00:00

On a quest to expand my programming prowess, I’ve delved ever-so-slightly into The Standard

  • 0

On a quest to expand my programming prowess, I’ve delved ever-so-slightly into The Standard PHP Library. This led to my discovery of the SplDoublyLinkedList class. From there I read the descriptions of Linked Lists and Doubly Linked Lists on Wikipedia.

I understand how they work… But I cannot conceive of a reason WHY we need it—or better yet a practical example of SplDoublyLinkedList since we have indexed and associative arrays in PHP.

How are Linked Lists normally used in-and-out of PHP?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:35:37+00:00Added an answer on May 25, 2026 at 5:35 pm

    The SPL data structures reduce memory consumption and improve performance. Good explanations:

    Data structures are inherently language-independent and exist as a set of logical concepts based in mathematics. These containers use different algorithms as appropriate to maximize efficiency.

    For example, if you don’t need the hash map capabilities of an associative array — that is, if you aren’t using the array key for a specific purpose and only need an enumerated array — SplFixedArray (formerly SplFastArray, currently undocumented) may be a suitable replacement. The only caveat is that the size of the array is fixed, meaning that you must specify the size when you instantiate the class and an error will occur if you attempt to store more than that number of elements. This is the reason that, on average, it performs better than standard PHP arrays.

    http://web.archive.org/web/20130805120049/http://blueparabola.com/blog/spl-deserves-some-reiteration

    Within the C code that makes up the PHP interpreter, arrays are implemented as a data structure called a hash table or hash map. When a value contained within an array is referenced by its index, PHP uses a hashing function to convert that index into a unique hash representing the location of the corresponding value within the array.

    This hash map implementation enables arrays to store an arbitrary number of elements and provide access to all of those elements simultaneously using either numeric or string keys. Arrays are extremely fast for the capabilities they provide and are an excellent general purpose data structure.

    In computer science, a list is defined as an ordered collection of values. A linked list is a data structure in which each element in the list includes a reference to one or both of the elements on either side of it within the list. The term “doubly-linked list” is used to refer to the latter case. In the SPL, this takes the form of the class SplDoublyLinkedList…. It makes sense to use lists when the number of elements to be stored is not known in advance and the elements only need to be accessed by sequential position.

    http://matthewturland.com/2010/05/20/new-spl-features-in-php-5-3/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my quest for looking for a BigInt library, I came across this post:
My quest of starting to use namespaces in PHP keeps continuing. This time PHPUnit
I've noticed while on my quest to lean functional programming that there are cases
Update: This question was inspired by my larger quest for mapping ontologically the whole
My quest for d3.js wisdom continues! This time, I have added a guide line
On a quest to migrate some new UI into Managed/C# land, I have recently
In my quest in trying to learn more about OOP in PHP. I have
I'm really struggling with this,Day three of the unending quest to save and load
I'm reading this article by Jon Skeet as part of my quest to get
As I continue my quest of learning functional programming, I've come to wonder if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.