I came across this article written by Google's Webmaster which recommends setting/getting object parameters directly to improve code efficiency. However, I thought that doing as suggested (below) instead of accessing an object's properties through getter/setter methods) leaves the code vulnerable to attacks?
$rover = new dog();
$rover->name = 'rover';
echo $rover->name;
__setmagic method, there isn't really any way of stopping that, regardless of whether you use getters and setters.->name = .., just with the additional overhead of a function call.