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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -