PHP: Pass another object as an argument to a function within the same class? -
php: can pass object argument function within same class? need function compares "this" object object of same class. like:
class user { ... public $reputation; ... public function comparewithanotheruser($user2) { if ($this->reputation < $user2->reputation) // } }
Comments
Post a Comment