A fence that is ten tefaĥim high is considered a bona fide wall and is effective in transforming even a reshut ha-rabim by Torah law into a reshut ha-yaĥid (as explained above in 21:2-3). Even a chain-link fence is acceptable for this purpose. As long as each of the spaces between the wires is less than three tefaĥim wide, the fence is considered continuous, and it can transform even a reshut ha-rabim by Torah law into a reshut ha-yaĥid.
If a fence or series of tzurot ha-petaĥ encloses an area but has gaps in the perimeter, as long as each gap is less than ten amot wide and the combined width of all the gaps on any side of the perimeter is less than the combined length of the fence or tzurot ha-petaĥ on that side, the eruv is kosher (MB 362:45; however, AHS 362:23 maintains that the lengths to compare are those of the entire perimeter, not just one side). In contrast, if the unfenced section of any side of the city is longer than the fenced section on that side, or if there is a gap anywhere that is longer than ten amot, the eruv is invalid (SA 362:9).
If one side of the city consists of houses with yards enclosed by fences, with open space between the yards, then if the distance between each yard is less than ten amot, and the width of each yard is greater than ten amot, there is no need to enclose that side any further with a wall or tzurat ha-petaĥ. The fences surrounding the yards are considered walls, and the gaps of less than ten amot do not disqualify them.
If a city is encircled by a garden with terraces at least ten tefaĥim high, then it is considered walled, and there is no need to add another wall or tzurat ha-petaĥ. If only part of the city is enclosed by a terrace, then that part needs no additional wall.
If one side of a city is built on a hill, then if the hill is steep enough that it declines ten tefaĥim (76 cm) every four horizontal amot (1.824 m), it renders everything above the slope a reshut ha-yaĥid. The Sages refer to such a hill as a tel ha-mitlaket, and it is considered a bona fide wall (SA 345:2).
If a town is surrounded by a fence, and the gate at the entrance road is wider than ten amot, then as long as the gate will be closed at night, the eruv is valid even when the gate is open (SA 364:2; Melumdei Milĥama §74). However, if the gate is generally left open at night, or if it merely serves as a barrier (or boom gate), which, even when closed, is not a proper wall, a tzurat ha-petaĥ should be erected above the gate.