views:

222

answers:

2

I just finished coding a complex job assignment application where a lot of the work was done using priority queues. When I deployed, however, I discovered the web server ran PHP 5.2.

Has there been an implementation for PHP<5.3 that can server as a drop-in replacement for SPLPriorityQueue?

A: 

I would have thought it would be quite simple to build one using SPLMaxHeap and a wrapper for each item?

C.

symcbean
A: 

I don't know of anything that has the same interface.

But, I'd like to point out that if you don't need the performance characteristics of the heap implementation(small data sets probably don't), it wouldn't be much work to write your own using a regular php array.

chris
Thanks. I did exactly just that.
Zahymaka