Buy both
Between them... If I could have only one...
I would lean towards the BMW, but they are two very different cars... The porsche makes a great second car, and it is fun to drive on PCH - it definitly gets more looks than the M3, but it is not something I would want as my only mode of transportation. The M3 (my 3rd, which I just picked up today, incidentally) is fun to drive, cheaper to mod, cheaper to maintain, and has more comforts when used as a daily driver. I am also quite a bit more-confident racking up the miles on an M3 than I would be with my porsche.