Implementation of popular data structures in php