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:
SplDoublyLinkedList is already there, no extra code to maintainSplDoublyLinkedList is only there if your PHP version is currentextend and customize the SplDoublyLinkedList class to your likingSplDoublyLinkedList may be faster, since it's native code (I guess); benchmark if this an important factor to youIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With