Red-black tree in PHP.