I need to use a double linked list using PHP for my script so I dug on the web and found a very good one:
http://www.codediesel.com/algorithms/doubly-linked-list-in-php/
this one made me understand how it works, and how the elements are tied together etc…
Now, PHP has its own set of SPL functions for double linked lists, which makes it very easy but on the other hand, I have to trust what php do and I am also limited to what they have.
Should I use instead the one from PHP? Or should I use this code in the link and in case I want to customize it, can I easily?
Use whatever is more appropriate for you, but here are some considerations:
SplDoublyLinkedListis already there, no extra code to maintainSplDoublyLinkedListis only there if your PHP version is currentextendand customize theSplDoublyLinkedListclass to your likingSplDoublyLinkedListmay be faster, since it’s native code (I guess); benchmark if this an important factor to you