This is Galium parisiense or wall bedstraw. It looks a bit like hedge bedstraw but the differences are its weak roots, more prostrate habit, the recurved prickles on the angles of the stems and the forward pointing prickles on the leaves. It is now rare in the British Isles and declining so I was suprised to find it growing at the base of a wall not more than 20 metres from my house.
The leaves aren't actually all leaves. Only two are leaves, the others are stipules. Quite why the stipules evolved to mimic the leaves is beyond me.