PHP implementation of the Circuit Breaker pattern