Binary Search Tree, Queue and Stack in PHP