First Fit Memory Allocation in PHP