Queue implementation in PHP