kaujot Posted March 4, 2009 Share Posted March 4, 2009 Hi, I'm trying to implement a doubly linked list as described by SPL. This is my code: <?php $list = new SplDoublyLinkedList(); ?> That's how they create a list in the manual, so, in theory, it's correct. However, I receive this error: Fatal error: Class 'SplDoublyLinkedList' not found in /var/www/joomla/trunk/components/com_camps/views/camp/tmpl/default.php on line 61 My system is running PHP 5.2.4, and the docs tell me that the SPL extension is available and compiled by default in PHP 5.0.0. However, I haven't been able to find any information at all on how to access the data structures that I really need to implement? Anyone know? Thanks so much. Link to comment https://forums.phpfreaks.com/topic/147955-using-spl-data-structures/ Share on other sites More sharing options...
trq Posted March 4, 2009 Share Posted March 4, 2009 Have you checked out phpinfo to make sure spl is available? Link to comment https://forums.phpfreaks.com/topic/147955-using-spl-data-structures/#findComment-776844 Share on other sites More sharing options...
kaujot Posted March 4, 2009 Author Share Posted March 4, 2009 Have you checked out phpinfo to make sure spl is available? Yes, it is, though the DoublyLinkedList is among the classes that phpinfo says are available to SPL. Is there some later version I'm missing? I didn't see anything in the documentation to make me think that DDLs were only available to a certain version of SPL, though I could have easily missed that. Link to comment https://forums.phpfreaks.com/topic/147955-using-spl-data-structures/#findComment-776852 Share on other sites More sharing options...
DarkWater Posted March 5, 2009 Share Posted March 5, 2009 I tested it on 5.3 alpha and it worked. It might be >=5.3...I don't understand why you'd need a linked list-esque structure when an array works just as well. Link to comment https://forums.phpfreaks.com/topic/147955-using-spl-data-structures/#findComment-776895 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.