I agree with the "over coding" statement but, this is certainly a good start. I urge looking further into the date() function (specifically the 'M' flag), as your last line could have been
date('M j, Y', $stamp);
Also your suggestion about appending 'ago' will provide undesired results after 24 hours. (ex: May 22, 2013 ago).
Sidenote: I've made a similar function some time ago here, if you'd like a friendly reference :) I hope to see more PHP contributions!