Tiny php lib to handle retry