During a new installation of lawn sprinkler or irrigation pipes, joints are normally completed using solvent-cement fittings. This becomes less practical, though, if you are trying to replace a broken segment of pipe when the rest of the lines are already in place. In this situation, there simply is not enough slack to easily insert replacement pipes and glue them in place.
A good option in this case is to use a PVC compression fitting. This fitting seals by squeezing washers tightly against the pipes, and it requires no measuring or gluing to use. All that’s necessary is to cut away the bad section of pipe and insert a compression fitting to replace the bad section. If the damage involves a large section of pipe, you can make the repair with a length of replacement pipe and two compression fittings to join each end of the repair segment to the existing system.
Source: The Spruce