Notice that both functions are deprecated and therefore shouldn’t be used when you are programming new code. There could be a discussion comparing PDO::FETCH_ASSOC vs PDO::FETCH_OBJ and if is a good OOP practice what PHP is considering anonymous objects but that is far from what you are asking so I will not go deeper to that.
mysql_fetch_object will give back an object through which we are able to
access the database fields records although mysql_fetch_aaray
give back array of database records as well as return associative