protected function equalValues($value1, $value2)
    {
        if (gettype($value1) !== gettype($value2)) {
            return false;
        }

        if (is_object($value1) && ($value1 instanceof Value)) {
            return $value1->equals($value2);
        }

        return ($value1 === $value2);
    }
protected function equalValues($value1, $value2)
    {
        if (gettype($value1) !== gettype($value2)) {
            return false;
        }

        if (is_object($value1) && ($value1 instanceof Value)) {
            return $value1->equals($value2);
        }

        return ($value1 === $value2);
    }
protected function equalValues ( $ value1 , $ value2 ) { if ( gettype ( $ value1 ) !== gettype ( $ value2 ) ) { return false ; } if ( is_object ( $ value1 ) && ( $ value1 instanceof Value ) ) { return $ value1 -> equals ( $ value2 ) ; } return ( $ value1 === $ value2 ) ; }
Checks whether the two specified values are the same.

Scalars and nodes are checked for identity, value objects for
equality.

@param mixed $value1 Value 1.
@param mixed $value2 Value 2.

@return bool Returns true if the two values are equals; otherwise false.
Checks whether the two specified values are the same .