Personally, I've been taught to always declare variables - whether I need to or not - I find it makes my code a lot easier to debug...
Also, you could use Hungarian notation (I think that's what this is) for naming variables - then you always know what a variable is meant to be used for:
string $sObjectName;
int $iNumObjects;
bool $bFinished;
float $fValue;
and so on....
Then if you find yourself doing:
$iObject = "myObject";
You'll know you're doing something wrong, as you can see at a quick glance that $iObject is meant to hold an int....