PHP Race-conditions Resources