public function equals($pitch) {
        if ($pitch === null) {
			return false;
		}
        return $pitch->step == $this->step && $pitch->alter == $this->alter && $pitch->octave == $this->octave;
    }
public function equals($pitch) {
        if ($pitch === null) {
			return false;
		}
        return $pitch->step == $this->step && $pitch->alter == $this->alter && $pitch->octave == $this->octave;
    }
public function equals ( $ pitch ) { if ( $ pitch === null ) { return false ; } return $ pitch -> step == $ this -> step && $ pitch -> alter == $ this -> alter && $ pitch -> octave == $ this -> octave ; }
note the difference between this and isEnharmonic - in this one, spelling counts.

@param  Pitch $pitch The pitch being compared to $this
@return boolean true if the step, alter, and octave are all the same.
note the difference between this and isEnharmonic - in this one spelling counts .