One wall of the show grounds in the (Australian) city where I live has broken bottles cemented into the top, so I’d guess it probably is.
As mentioned by real cites above, it’s probably legal until you get sued.
Phoenix, eh? Nogales is only four hours away, and as (also) mentioned above, it’s pretty common there (as is honest-to-goodness concertina wire!).
Here’s an alternative with essentially the same aim: Why Homes and Businesses Love Prikla Strip Anti Climb Spikes
Of course a true wall-hopper might be just putting his/her hands on the top to vault over, with little of his body actually touching the top.
My grandmother’s house in India was surrounded by a wall topped with glass shards. So, the story could be set in India.