Continuing my data structures thoughts from previous posts, I’ve created a linked list example. /* * Node – a basic link node. */ class Node { var $id; var $next; /* * */ function __construct($id) { $this->id = $id; } } $a = new Node(“mark”); var_dump($a); $b = $a->next = new Node(“wes”); var_dump($b); $c = [...]
Recently, I started re-learning c++ and the topic of data structures surfaced. The conversation evolved to their usefulness in web development. Without commenting on that, I decided to partake in an exercise to implement c style functionality in a PHP OOP context. Here is the code I came up with: /* * Stack – the [...]