Hi there - looks like a "caper" spurge to me - euphorbia lathyris. The ones I have in the garden have leaves at regular intervals at right angles to each other. The "flowers"/bracts are pretty insignificant, in my opinion, but the bees seem to love it !! It's a biennual and has self seeded readily but not as invasive as other euphorbias that I have come across. Although a common name is caper it's NOT edible and care should be taken as mentioned with the sap etc - all parts of the plant, including the root are, I believe, poisonous. From memory I think that the seed pods once formed are "explosive" when pressed hence, can self-seed some distance from the parent plant.
I'm not particularly fond of euphorbias but this is one which I do allow to grow in the graden !! 