public function isIdenticalTo(Zval $other) { $type = $this->getType(); $otherType = $other->getType(); if ('array' === $type && 'array' === $otherType) { return 0 === $this->compareArrays($this->getValue(), $other->getValue(), function ($a, $b) { return $a->isIdenticalTo($b); }, true); } elseif ($type == $otherType) { return $this->getValue() === $other->getValue(); } return false; }